!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,(function(t){"use strict";var e,i=2311,n=function(){return i++},o="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:function(t){var e={},i=t.match(/Firefox\/([\d.]+)/),n=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge\/([\d.]+)/),a=/micromessenger/i.test(t);return i&&(e.firefox=!0,e.version=i[1]),n&&(e.ie=!0,e.version=n[1]),o&&(e.edge=!0,e.version=o[1]),a&&(e.weChat=!0),{browser:e,os:{},node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!e.ie&&!e.edge,pointerEventsSupported:"onpointerdown"in window&&(e.edge||e.ie&&11<=e.version),domSupported:"undefined"!=typeof document}}(navigator.userAgent),a={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},r={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},s=Object.prototype.toString,l=Array.prototype,u=l.forEach,h=l.filter,c=l.slice,d=l.map,f=l.reduce,p={};function g(t,i){"createCanvas"===t&&(e=null),p[t]=i}function m(t){if(null==t||"object"!=typeof t)return t;var e=t,i=s.call(t);if("[object Array]"===i){if(!$(t)){e=[];for(var n=0,o=t.length;n<o;n++)e[n]=m(t[n])}}else if(r[i]){if(!$(t)){var l=t.constructor;if(t.constructor.from)e=l.from(t);else for(e=new l(t.length),n=0,o=t.length;n<o;n++)e[n]=m(t[n])}}else if(!a[i]&&!$(t)&&!G(t))for(var u in e={},t)t.hasOwnProperty(u)&&(e[u]=m(t[u]));return e}function v(t,e,i){if(!z(e)||!z(t))return i?m(e):t;for(var n in e)if(e.hasOwnProperty(n)){var o=t[n],a=e[n];!z(a)||!z(o)||N(a)||N(o)||G(a)||G(o)||B(a)||B(o)||$(a)||$(o)?!i&&n in t||(t[n]=m(e[n])):v(o,a,i)}return t}function y(t,e){for(var i=t[0],n=1,o=t.length;n<o;n++)i=v(i,t[n],e);return i}function x(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function _(t,e,i){for(var n in e)e.hasOwnProperty(n)&&(i?null!=e[n]:null==t[n])&&(t[n]=e[n]);return t}function w(){return p.createCanvas()}function b(){return e=e||w().getContext("2d")}function S(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var i=0,n=t.length;i<n;i++)if(t[i]===e)return i}return-1}function M(t,e){var i=t.prototype;function n(){}for(var o in n.prototype=e.prototype,t.prototype=new n,i)i.hasOwnProperty(o)&&(t.prototype[o]=i[o]);(t.prototype.constructor=t).superClass=e}function I(t,e,i){_(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,i)}function T(t){if(t)return"string"!=typeof t&&"number"==typeof t.length}function A(t,e,i){if(t&&e)if(t.forEach&&t.forEach===u)t.forEach(e,i);else if(t.length===+t.length)for(var n=0,o=t.length;n<o;n++)e.call(i,t[n],n,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(i,t[a],a,t)}function D(t,e,i){if(t&&e){if(t.map&&t.map===d)return t.map(e,i);for(var n=[],o=0,a=t.length;o<a;o++)n.push(e.call(i,t[o],o,t));return n}}function C(t,e,i,n){if(t&&e){if(t.reduce&&t.reduce===f)return t.reduce(e,i,n);for(var o=0,a=t.length;o<a;o++)i=e.call(n,i,t[o],o,t);return i}}function L(t,e,i){if(t&&e){if(t.filter&&t.filter===h)return t.filter(e,i);for(var n=[],o=0,a=t.length;o<a;o++)e.call(i,t[o],o,t)&&n.push(t[o]);return n}}function k(t,e,i){if(t&&e)for(var n=0,o=t.length;n<o;n++)if(e.call(i,t[n],n,t))return t[n]}function P(t,e){var i=c.call(arguments,2);return function(){return t.apply(e,i.concat(c.call(arguments)))}}function O(t){var e=c.call(arguments,1);return function(){return t.apply(this,e.concat(c.call(arguments)))}}function N(t){return"[object Array]"===s.call(t)}function E(t){return"function"==typeof t}function R(t){return"[object String]"===s.call(t)}function z(t){var e=typeof t;return"function"==e||!!t&&"object"==e}function B(t){return!!a[s.call(t)]}function V(t){return!!r[s.call(t)]}function G(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function F(t){return t!=t}function W(t){for(var e=0,i=arguments.length;e<i;e++)if(null!=arguments[e])return arguments[e]}function H(t,e){return null!=t?t:e}function Z(t,e,i){return null!=t?t:null!=e?e:i}function U(){return Function.call.apply(c,arguments)}function X(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function Y(t,e){if(!t)throw new Error(e)}function j(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}p.createCanvas=function(){return document.createElement("canvas")};var q="__ec_primitive__";function K(t){t[q]=!0}function $(t){return t[q]}function J(t){var e=N(t);this.data={};var i=this;function n(t,n){e?i.set(t,n):i.set(n,t)}t instanceof J?t.each(n):t&&A(t,n)}function Q(t){return new J(t)}function tt(t,e){for(var i=new t.constructor(t.length+e.length),n=0;n<t.length;n++)i[n]=t[n];var o=t.length;for(n=0;n<e.length;n++)i[n+o]=e[n];return i}function et(){}J.prototype={constructor:J,get:function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},set:function(t,e){return this.data[t]=e},each:function(t,e){for(var i in void 0!==e&&(t=P(t,e)),this.data)this.data.hasOwnProperty(i)&&t(this.data[i],i)},removeKey:function(t){delete this.data[t]}};var it=(Object.freeze||Object)({$override:g,clone:m,merge:v,mergeAll:y,extend:x,defaults:_,createCanvas:w,getContext:b,indexOf:S,inherits:M,mixin:I,isArrayLike:T,each:A,map:D,reduce:C,filter:L,find:k,bind:P,curry:O,isArray:N,isFunction:E,isString:R,isObject:z,isBuiltInObject:B,isTypedArray:V,isDom:G,eqNaN:F,retrieve:W,retrieve2:H,retrieve3:Z,slice:U,normalizeCssArray:X,assert:Y,trim:j,setAsPrimitive:K,isPrimitive:$,createHashMap:Q,concatArray:tt,noop:et}),nt="undefined"==typeof Float32Array?Array:Float32Array;function ot(t,e){var i=new nt(2);return null==t&&(t=0),null==e&&(e=0),i[0]=t,i[1]=e,i}function at(t,e){return t[0]=e[0],t[1]=e[1],t}function rt(t){var e=new nt(2);return e[0]=t[0],e[1]=t[1],e}function st(t,e,i){return t[0]=e,t[1]=i,t}function lt(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t}function ut(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t}function ht(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t}function ct(t){return Math.sqrt(dt(t))}function dt(t){return t[0]*t[0]+t[1]*t[1]}function ft(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t}function pt(t,e){var i=ct(e);return 0===i?(t[0]=0,t[1]=0):(t[0]=e[0]/i,t[1]=e[1]/i),t}function gt(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var mt=gt;function vt(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var yt=vt;function xt(t,e,i,n){return t[0]=e[0]+n*(i[0]-e[0]),t[1]=e[1]+n*(i[1]-e[1]),t}function _t(t,e,i){var n=e[0],o=e[1];return t[0]=i[0]*n+i[2]*o+i[4],t[1]=i[1]*n+i[3]*o+i[5],t}function wt(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t}function bt(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t}var St=(Object.freeze||Object)({create:ot,copy:at,clone:rt,set:st,add:lt,scaleAndAdd:ut,sub:ht,len:ct,length:ct,lenSquare:dt,lengthSquare:dt,mul:function(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t},div:function(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},scale:ft,normalize:pt,distance:gt,dist:mt,distanceSquare:vt,distSquare:yt,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},lerp:xt,applyTransform:_t,min:wt,max:bt});function Mt(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}function It(t,e){return{target:t,topTarget:e&&e.topTarget}}Mt.prototype={constructor:Mt,_dragStart:function(t){var e=t.target;e&&e.draggable&&((this._draggingTarget=e).dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(It(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,n=t.offsetY,o=i-this._x,a=n-this._y;this._x=i,this._y=n,e.drift(o,a,t),this.dispatchToElement(It(e,t),"drag",t.event);var r=this.findHover(i,n,e).target,s=this._dropTarget;e!==(this._dropTarget=r)&&(s&&r!==s&&this.dispatchToElement(It(s,t),"dragleave",t.event),r&&r!==s&&this.dispatchToElement(It(r,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(It(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(It(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};var Tt=Array.prototype.slice,At=function(t){this._$handlers={},this._$eventProcessor=t};function Dt(t,e,i,n,o,a){var r=t._$handlers;if("function"==typeof i&&(o=n,n=i,i=null),!n||!e)return t;i=function(t,e){var i=t._$eventProcessor;return null!=e&&i&&i.normalizeQuery&&(e=i.normalizeQuery(e)),e}(t,i),r[e]||(r[e]=[]);for(var s=0;s<r[e].length;s++)if(r[e][s].h===n)return t;var l={h:n,one:a,query:i,ctx:o||t,callAtLast:n.zrEventfulCallAtLast},u=r[e].length-1,h=r[e][u];return h&&h.callAtLast?r[e].splice(u,0,l):r[e].push(l),t}At.prototype={constructor:At,one:function(t,e,i,n){return Dt(this,t,e,i,n,!0)},on:function(t,e,i,n){return Dt(this,t,e,i,n,!1)},isSilent:function(t){var e=this._$handlers;return!e[t]||!e[t].length},off:function(t,e){var i=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(i[t]){for(var n=[],o=0,a=i[t].length;o<a;o++)i[t][o].h!==e&&n.push(i[t][o]);i[t]=n}i[t]&&0===i[t].length&&delete i[t]}else delete i[t];return this},trigger:function(t){var e=this._$handlers[t],i=this._$eventProcessor;if(e){var n=arguments,o=n.length;3<o&&(n=Tt.call(n,1));for(var a=e.length,r=0;r<a;){var s=e[r];if(i&&i.filter&&null!=s.query&&!i.filter(t,s.query))r++;else{switch(o){case 1:s.h.call(s.ctx);break;case 2:s.h.call(s.ctx,n[1]);break;case 3:s.h.call(s.ctx,n[1],n[2]);break;default:s.h.apply(s.ctx,n)}s.one?(e.splice(r,1),a--):r++}}}return i&&i.afterTrigger&&i.afterTrigger(t),this},triggerWithContext:function(t){var e=this._$handlers[t],i=this._$eventProcessor;if(e){var n=arguments,o=n.length;4<o&&(n=Tt.call(n,1,n.length-1));for(var a=n[n.length-1],r=e.length,s=0;s<r;){var l=e[s];if(i&&i.filter&&null!=l.query&&!i.filter(t,l.query))s++;else{switch(o){case 1:l.h.call(a);break;case 2:l.h.call(a,n[1]);break;case 3:l.h.call(a,n[1],n[2]);break;default:l.h.apply(a,n)}l.one?(e.splice(s,1),r--):s++}}}return i&&i.afterTrigger&&i.afterTrigger(t),this}};var Ct=Math.log(2);function Lt(t,e,i,n,o,a){var r=n+"-"+o,s=t.length;if(a.hasOwnProperty(r))return a[r];if(1===e){var l=Math.round(Math.log((1<<s)-1&~o)/Ct);return t[i][l]}for(var u=n|1<<i,h=i+1;n&1<<h;)h++;for(var c=0,d=0,f=0;d<s;d++){var p=1<<d;p&o||(c+=(f%2?-1:1)*t[i][d]*Lt(t,e-1,h,u,o|p,a),f++)}return a[r]=c}var kt="undefined"!=typeof window&&!!window.addEventListener,Pt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ot="___zrEVENTSAVED",Nt=[];function Et(t,e,i,n){return i=i||{},n||!o.canvasSupported?Rt(t,e,i):o.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(i.zrX=e.layerX,i.zrY=e.layerY):null!=e.offsetX?(i.zrX=e.offsetX,i.zrY=e.offsetY):Rt(t,e,i),i}function Rt(t,e,i){if(t.getBoundingClientRect&&o.domSupported){var n=e.clientX,a=e.clientY;if("CANVAS"===t.nodeName.toUpperCase()){var r=t.getBoundingClientRect();return i.zrX=n-r.left,void(i.zrY=a-r.top)}var s=t[Ot]||(t[Ot]={}),l=function(t,e){for(var i=e.transformer,n=e.srcCoords,o=!0,a=[],r=[],s=0;s<4;s++){var l=t[s].getBoundingClientRect(),u=2*s,h=l.left,c=l.top;a.push(h,c),o&=n&&h===n[u]&&c===n[1+u],r.push(t[s].offsetLeft,t[s].offsetTop)}return o?i:(e.srcCoords=a,e.transformer=function(t,e){var i=[[t[0],t[1],1,0,0,0,-e[0]*t[0],-e[0]*t[1]],[0,0,0,t[0],t[1],1,-e[1]*t[0],-e[1]*t[1]],[t[2],t[3],1,0,0,0,-e[2]*t[2],-e[2]*t[3]],[0,0,0,t[2],t[3],1,-e[3]*t[2],-e[3]*t[3]],[t[4],t[5],1,0,0,0,-e[4]*t[4],-e[4]*t[5]],[0,0,0,t[4],t[5],1,-e[5]*t[4],-e[5]*t[5]],[t[6],t[7],1,0,0,0,-e[6]*t[6],-e[6]*t[7]],[0,0,0,t[6],t[7],1,-e[7]*t[6],-e[7]*t[7]]],n={},o=Lt(i,8,0,0,0,n);if(0!==o){for(var a=[],r=0;r<8;r++)for(var s=0;s<8;s++)null==a[s]&&(a[s]=0),a[s]+=((r+s)%2?-1:1)*Lt(i,7,0===r?1:0,1<<r,1<<s,n)/o*e[r];return function(t,e,i){var n=e*a[6]+i*a[7]+1;t[0]=(e*a[0]+i*a[1]+a[2])/n,t[1]=(e*a[3]+i*a[4]+a[5])/n}}}(a,r))}(function(t,e){var i=e.markers;if(i)return i;i=e.markers=[];for(var n=["left","right"],o=["top","bottom"],a=0;a<4;a++){var r=document.createElement("div"),s=a%2,l=(a>>1)%2;r.style.cssText=["position:absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","width:0","height:0",n[s]+":0",o[l]+":0",n[1-s]+":auto",o[1-l]+":auto",""].join("!important;"),t.appendChild(r),i.push(r)}return i}(t,s),s);if(l)return l(Nt,n,a),i.zrX=Nt[0],void(i.zrY=Nt[1])}i.zrX=i.zrY=0}function zt(t){return t||window.event}function Bt(t,e,i){if(null!=(e=zt(e)).zrX)return e;var n=e.type;if(n&&0<=n.indexOf("touch")){var o="touchend"!==n?e.targetTouches[0]:e.changedTouches[0];o&&Et(t,o,e,i)}else Et(t,e,e,i),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var a=e.button;return null==e.which&&void 0!==a&&Pt.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function Vt(t,e,i,n){kt?t.addEventListener(e,i,n):t.attachEvent("on"+e,i)}var Gt=kt?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};function Ft(t){return 2===t.which||3===t.which}function Wt(){this._track=[]}function Ht(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}Wt.prototype={constructor:Wt,recognize:function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,i){var n=t.touches;if(n){for(var o={points:[],touches:[],target:e,event:t},a=0,r=n.length;a<r;a++){var s=n[a],l=Et(i,s,{});o.points.push([l.zrX,l.zrY]),o.touches.push(s)}this._track.push(o)}},_recognize:function(t){for(var e in Zt)if(Zt.hasOwnProperty(e)){var i=Zt[e](this._track,t);if(i)return i}}};var Zt={pinch:function(t,e){var i=t.length;if(i){var n=(t[i-1]||{}).points,o=(t[i-2]||{}).points||n;if(o&&1<o.length&&n&&1<n.length){var a=Ht(n)/Ht(o);isFinite(a)||(a=1),e.pinchScale=a;var r=function(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}(n);return e.pinchX=r[0],e.pinchY=r[1],{type:"pinch",target:t[0].target,event:e}}}}};function Ut(){Gt(this.event)}function Xt(){}function Yt(t,e,i,n){At.call(this),this.storage=t,this.painter=e,this.painterRoot=n,i=i||new Xt,this.proxy=null,this._hovered={},Mt.call(this),this.setHandlerProxy(i)}Xt.prototype.dispose=function(){};var jt=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"];function qt(t,e,i){if(t[t.rectHover?"rectContain":"contain"](e,i)){for(var n,o=t;o;){if(o.clipPath&&!o.clipPath.contain(e,i))return!1;o.silent&&(n=!0),o=o.parent}return!n||"silent"}return!1}function Kt(t,e,i){var n=t.painter;return e<0||e>n.getWidth()||i<0||i>n.getHeight()}Yt.prototype={constructor:Yt,setHandlerProxy:function(t){this.proxy&&this.proxy.dispose(),t&&(A(jt,(function(e){t.on&&t.on(e,this[e],this)}),this),t.handler=this),this.proxy=t},mousemove:function(t){var e=t.zrX,i=t.zrY,n=Kt(this,e,i),o=this._hovered,a=o.target;a&&!a.__zr&&(a=(o=this.findHover(o.x,o.y)).target);var r=this._hovered=n?{x:e,y:i}:this.findHover(e,i),s=r.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),a&&s!==a&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(r,"mousemove",t),s&&s!==a&&this.dispatchToElement(r,"mouseover",t)},mouseout:function(t){var e=t.zrEventControl,i=t.zrIsToLocalDOM;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&(i||this.trigger("globalout",{type:"globalout",event:t}))},resize:function(t){this._hovered={}},dispatch:function(t,e){var i=this[t];i&&i.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,i){var n=(t=t||{}).target;if(!n||!n.silent){for(var o="on"+e,a=function(t,e,i){return{type:t,event:i,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:i.zrX,offsetY:i.zrY,gestureEvent:i.gestureEvent,pinchX:i.pinchX,pinchY:i.pinchY,pinchScale:i.pinchScale,wheelDelta:i.zrDelta,zrByTouch:i.zrByTouch,which:i.which,stop:Ut}}(e,t,i);n&&(n[o]&&(a.cancelBubble=n[o].call(n,a)),n.trigger(e,a),n=n.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(e,a),this.painter&&this.painter.eachOtherLayer((function(t){"function"==typeof t[o]&&t[o].call(t,a),t.trigger&&t.trigger(e,a)})))}},findHover:function(t,e,i){for(var n=this.storage.getDisplayList(),o={x:t,y:e},a=n.length-1;0<=a;a--){var r;if(n[a]!==i&&!n[a].ignore&&(r=qt(n[a],t,e))&&(o.topTarget||(o.topTarget=n[a]),"silent"!==r)){o.target=n[a];break}}return o},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new Wt);var i=this._gestureMgr;"start"===e&&i.clear();var n=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&i.clear(),n){var o=n.type;t.gestureEvent=o,this.dispatchToElement({target:n.target},o,n.event)}}},A(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){Yt.prototype[t]=function(e){var i,n,o=e.zrX,a=e.zrY,r=Kt(this,o,a);if("mouseup"===t&&r||(n=(i=this.findHover(o,a)).target),"mousedown"===t)this._downEl=n,this._downPoint=[e.zrX,e.zrY],this._upEl=n;else if("mouseup"===t)this._upEl=n;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||4<mt(this._downPoint,[e.zrX,e.zrY]))return;this._downPoint=null}this.dispatchToElement(i,t,e)}})),I(Yt,At),I(Yt,Mt);var $t="undefined"==typeof Float32Array?Array:Float32Array;function Jt(){var t=new $t(6);return Qt(t),t}function Qt(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function te(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function ee(t,e,i){var n=e[1]*i[0]+e[3]*i[1],o=e[0]*i[2]+e[2]*i[3],a=e[1]*i[2]+e[3]*i[3],r=e[0]*i[4]+e[2]*i[5]+e[4],s=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=e[0]*i[0]+e[2]*i[1],t[1]=n,t[2]=o,t[3]=a,t[4]=r,t[5]=s,t}function ie(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t}function ne(t,e,i){var n=e[0],o=e[2],a=e[4],r=e[1],s=e[3],l=e[5],u=Math.sin(i),h=Math.cos(i);return t[0]=n*h+r*u,t[1]=-n*u+r*h,t[2]=o*h+s*u,t[3]=-o*u+h*s,t[4]=h*a+u*l,t[5]=h*l-u*a,t}function oe(t,e,i){var n=i[0],o=i[1];return t[0]=e[0]*n,t[1]=e[1]*o,t[2]=e[2]*n,t[3]=e[3]*o,t[4]=e[4]*n,t[5]=e[5]*o,t}function ae(t,e){var i=e[0],n=e[2],o=e[4],a=e[1],r=e[3],s=e[5],l=i*r-a*n;return l?(t[0]=r*(l=1/l),t[1]=-a*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-r*o)*l,t[5]=(a*o-i*s)*l,t):null}function re(t){var e=Jt();return te(e,t),e}var se=(Object.freeze||Object)({create:Jt,identity:Qt,copy:te,mul:ee,translate:ie,rotate:ne,scale:oe,invert:ae,clone:re}),le=Qt;function ue(t){return 5e-5<t||t<-5e-5}var he=function(t){(t=t||{}).position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},ce=he.prototype;ce.transform=null,ce.needLocalTransform=function(){return ue(this.rotation)||ue(this.position[0])||ue(this.position[1])||ue(this.scale[0]-1)||ue(this.scale[1]-1)};var de=[];ce.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),n=this.transform;if(i||e){n=n||Jt(),i?this.getLocalTransform(n):le(n),e&&(i?ee(n,t.transform,n):te(n,t.transform)),this.transform=n;var o=this.globalScaleRatio;if(null!=o&&1!==o){this.getGlobalScale(de);var a=de[0]<0?-1:1,r=de[1]<0?-1:1,s=((de[0]-a)*o+a)/de[0]||0,l=((de[1]-r)*o+r)/de[1]||0;n[0]*=s,n[1]*=s,n[2]*=l,n[3]*=l}this.invTransform=this.invTransform||Jt(),ae(this.invTransform,n)}else n&&le(n)},ce.getLocalTransform=function(t){return he.getLocalTransform(this,t)},ce.setTransform=function(t){var e=this.transform,i=t.dpr||1;e?t.setTransform(i*e[0],i*e[1],i*e[2],i*e[3],i*e[4],i*e[5]):t.setTransform(i,0,0,i,0,0)},ce.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var fe=[],pe=Jt();ce.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],n=this.position,o=this.scale;ue(e-1)&&(e=Math.sqrt(e)),ue(i-1)&&(i=Math.sqrt(i)),t[0]<0&&(e=-e),t[3]<0&&(i=-i),n[0]=t[4],n[1]=t[5],o[0]=e,o[1]=i,this.rotation=Math.atan2(-t[1]/i,t[0]/e)}},ce.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(ee(fe,t.invTransform,e),e=fe);var i=this.origin;i&&(i[0]||i[1])&&(pe[4]=i[0],pe[5]=i[1],ee(fe,e,pe),fe[4]-=i[0],fe[5]-=i[1],e=fe),this.setLocalTransform(e)}},ce.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[0]=1,t[1]=1),t},ce.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&_t(i,i,n),i},ce.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&_t(i,i,n),i},he.getLocalTransform=function(t,e){le(e=e||[]);var i=t.origin,n=t.scale||[1,1],o=t.rotation||0,a=t.position||[0,0];return i&&(e[4]-=i[0],e[5]-=i[1]),oe(e,e,n),o&&ne(e,e,o),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=a[0],e[5]+=a[1],e};var ge={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,i=.1;return 0===t?0:1===t?1:(e=!i||i<1?(i=1,.1):.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(e=!i||i<1?(i=1,.1):.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(e=!i||i<1?(i=1,.1):.4*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*.5+1)},backIn:function(t){return t*t*(2.70158*t-1.70158)},backOut:function(t){return--t*t*(2.70158*t+1.70158)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((1+e)*t-e)*.5:.5*((t-=2)*t*((1+e)*t+e)+2)},bounceIn:function(t){return 1-ge.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*ge.bounceIn(2*t):.5*ge.bounceOut(2*t-1)+.5}};function me(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,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,this._pausedTime=0,this._paused=!1}function ve(){this.head=null,this.tail=null,this._len=0}me.prototype={constructor:me,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)this._pausedTime+=e;else{var i=(t-this._startTime-this._pausedTime)/this._life;if(!(i<0)){i=Math.min(i,1);var n=this.easing,o="string"==typeof n?ge[n]:n,a="function"==typeof o?o(i):i;return this.fire("frame",a),1===i?this.loop?(this.restart(t),"restart"):(this._needsRemove=!0,"destroy"):null}}},restart:function(t){this._startTime=t-(t-this._startTime-this._pausedTime)%this._life+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(t,e){this[t="on"+t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var ye=ve.prototype;function xe(t){this._list=new ve,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null}ye.insert=function(t){var e=new _e(t);return this.insertEntry(e),e},ye.insertEntry=function(t){this.head?((this.tail.next=t).prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},ye.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},ye.len=function(){return this._len},ye.clear=function(){this.head=this.tail=null,this._len=0};var _e=function(t){this.value=t},we=xe.prototype;we.put=function(t,e){var i=this._list,n=this._map,o=null;if(null==n[t]){var a=i.len(),r=this._lastRemovedEntry;if(a>=this._maxSize&&0<a){var s=i.head;i.remove(s),delete n[s.key],o=s.value,this._lastRemovedEntry=s}r?r.value=e:r=new _e(e),r.key=t,i.insertEntry(r),n[t]=r}return o},we.get=function(t){var e=this._map[t],i=this._list;if(null!=e)return e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value},we.clear=function(){this._list.clear(),this._map={}};var be={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 Se(t){return(t=Math.round(t))<0?0:255<t?255:t}function Me(t){return t<0?0:1<t?1:t}function Ie(t){return t.length&&"%"===t.charAt(t.length-1)?Se(parseFloat(t)/100*255):Se(parseInt(t,10))}function Te(t){return t.length&&"%"===t.charAt(t.length-1)?Me(parseFloat(t)/100):Me(parseFloat(t))}function Ae(t,e,i){return i<0?i+=1:1<i&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}function De(t,e,i){return t+(e-t)*i}function Ce(t,e,i,n,o){return t[0]=e,t[1]=i,t[2]=n,t[3]=o,t}function Le(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var ke=new xe(20),Pe=null;function Oe(t,e){Pe&&Le(Pe,e),Pe=ke.put(t,Pe||e.slice())}function Ne(t,e){if(t){e=e||[];var i=ke.get(t);if(i)return Le(e,i);var n,o=(t+="").replace(/ /g,"").toLowerCase();if(o in be)return Le(e,be[o]),Oe(t,e),e;if("#"===o.charAt(0))return 4===o.length?0<=(n=parseInt(o.substr(1),16))&&n<=4095?(Ce(e,(3840&n)>>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,1),Oe(t,e),e):void Ce(e,0,0,0,1):7===o.length?0<=(n=parseInt(o.substr(1),16))&&n<=16777215?(Ce(e,(16711680&n)>>16,(65280&n)>>8,255&n,1),Oe(t,e),e):void Ce(e,0,0,0,1):void 0;var a=o.indexOf("("),r=o.indexOf(")");if(-1!==a&&r+1===o.length){var s=o.substr(0,a),l=o.substr(a+1,r-(a+1)).split(","),u=1;switch(s){case"rgba":if(4!==l.length)return void Ce(e,0,0,0,1);u=Te(l.pop());case"rgb":return 3!==l.length?void Ce(e,0,0,0,1):(Ce(e,Ie(l[0]),Ie(l[1]),Ie(l[2]),u),Oe(t,e),e);case"hsla":return 4!==l.length?void Ce(e,0,0,0,1):(l[3]=Te(l[3]),Ee(l,e),Oe(t,e),e);case"hsl":return 3!==l.length?void Ce(e,0,0,0,1):(Ee(l,e),Oe(t,e),e);default:return}}Ce(e,0,0,0,1)}}function Ee(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=Te(t[1]),o=Te(t[2]),a=o<=.5?o*(n+1):o+n-o*n,r=2*o-a;return Ce(e=e||[],Se(255*Ae(r,a,i+1/3)),Se(255*Ae(r,a,i)),Se(255*Ae(r,a,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Re(t,e){var i=Ne(t);if(i){for(var n=0;n<3;n++)i[n]=e<0?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0,255<i[n]?i[n]=255:t[n]<0&&(i[n]=0);return We(i,4===i.length?"rgba":"rgb")}}function ze(t){var e=Ne(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function Be(t,e,i){if(e&&e.length&&0<=t&&t<=1){i=i||[];var n=t*(e.length-1),o=Math.floor(n),a=Math.ceil(n),r=e[o],s=e[a],l=n-o;return i[0]=Se(De(r[0],s[0],l)),i[1]=Se(De(r[1],s[1],l)),i[2]=Se(De(r[2],s[2],l)),i[3]=Me(De(r[3],s[3],l)),i}}function Ve(t,e,i){if(e&&e.length&&0<=t&&t<=1){var n=t*(e.length-1),o=Math.floor(n),a=Math.ceil(n),r=Ne(e[o]),s=Ne(e[a]),l=n-o,u=We([Se(De(r[0],s[0],l)),Se(De(r[1],s[1],l)),Se(De(r[2],s[2],l)),Me(De(r[3],s[3],l))],"rgba");return i?{color:u,leftIndex:o,rightIndex:a,value:n}:u}}function Ge(t,e,i,n){if(t=Ne(t))return t=function(t){if(t){var e,i,n=t[0]/255,o=t[1]/255,a=t[2]/255,r=Math.min(n,o,a),s=Math.max(n,o,a),l=s-r,u=(s+r)/2;if(0==l)i=e=0;else{i=u<.5?l/(s+r):l/(2-s-r);var h=((s-n)/6+l/2)/l,c=((s-o)/6+l/2)/l,d=((s-a)/6+l/2)/l;n===s?e=d-c:o===s?e=1/3+h-d:a===s&&(e=2/3+c-h),e<0&&(e+=1),1<e&&(e-=1)}var f=[360*e,i,u];return null!=t[3]&&f.push(t[3]),f}}(t),null!=e&&(t[0]=function(t){return(t=Math.round(t))<0?0:360<t?360:t}(e)),null!=i&&(t[1]=Te(i)),null!=n&&(t[2]=Te(n)),We(Ee(t),"rgba")}function Fe(t,e){if((t=Ne(t))&&null!=e)return t[3]=Me(e),We(t,"rgba")}function We(t,e){if(t&&t.length){var i=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(i+=","+t[3]),e+"("+i+")"}}var He=(Object.freeze||Object)({parse:Ne,lift:Re,toHex:ze,fastLerp:Be,fastMapToColor:Be,lerp:Ve,mapToColor:Ve,modifyHSL:Ge,modifyAlpha:Fe,stringify:We}),Ze=Array.prototype.slice;function Ue(t,e){return t[e]}function Xe(t,e,i){t[e]=i}function Ye(t,e,i){return(e-t)*i+t}function je(t,e,i){return.5<i?e:t}function qe(t,e,i,n,o){var a=t.length;if(1===o)for(var r=0;r<a;r++)n[r]=Ye(t[r],e[r],i);else{var s=a&&t[0].length;for(r=0;r<a;r++)for(var l=0;l<s;l++)n[r][l]=Ye(t[r][l],e[r][l],i)}}function Ke(t,e,i){var n=t.length,o=e.length;if(n!==o)if(o<n)t.length=o;else for(var a=n;a<o;a++)t.push(1===i?e[a]:Ze.call(e[a]));var r=t[0]&&t[0].length;for(a=0;a<t.length;a++)if(1===i)isNaN(t[a])&&(t[a]=e[a]);else for(var s=0;s<r;s++)isNaN(t[a][s])&&(t[a][s]=e[a][s])}function $e(t,e,i){if(t===e)return!0;var n=t.length;if(n!==e.length)return!1;if(1===i){for(var o=0;o<n;o++)if(t[o]!==e[o])return!1}else{var a=t[0].length;for(o=0;o<n;o++)for(var r=0;r<a;r++)if(t[o][r]!==e[o][r])return!1}return!0}function Je(t,e,i,n,o,a,r,s,l){var u=t.length;if(1===l)for(var h=0;h<u;h++)s[h]=Qe(t[h],e[h],i[h],n[h],o,a,r);else{var c=t[0].length;for(h=0;h<u;h++)for(var d=0;d<c;d++)s[h][d]=Qe(t[h][d],e[h][d],i[h][d],n[h][d],o,a,r)}}function Qe(t,e,i,n,o,a,r){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*r+(-3*(e-i)-2*s-l)*a+s*o+e}function ti(t){if(T(t)){var e=t.length;if(T(t[0])){for(var i=[],n=0;n<e;n++)i.push(Ze.call(t[n]));return i}return Ze.call(t)}return t}function ei(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function ii(t,e,i,n,o,a){var r=t._getter,s=t._setter,l="spline"===e,u=n.length;if(u){var h,c=T(n[0].value),d=!1,f=!1,p=c?function(t){var e=t[t.length-1].value;return T(e&&e[0])?2:1}(n):0;n.sort((function(t,e){return t.time-e.time})),h=n[u-1].time;for(var g=[],m=[],v=n[0].value,y=!0,x=0;x<u;x++){g.push(n[x].time/h);var _=n[x].value;if(c&&$e(_,v,p)||!c&&_===v||(y=!1),"string"==typeof(v=_)){var w=Ne(_);w?(_=w,d=!0):f=!0}m.push(_)}if(a||!y){var b=m[u-1];for(x=0;x<u-1;x++)c?Ke(m[x],b,p):!isNaN(m[x])||isNaN(b)||f||d||(m[x]=b);c&&Ke(r(t._target,o),b,p);var S,M,I,A,D,C=0,L=0;if(d)var k=[0,0,0,0];var P=new me({target:t._target,life:h,loop:t._loop,delay:t._delay,onframe:function(t,e){var i;if(e<0)i=0;else if(e<L){for(i=Math.min(C+1,u-1);0<=i&&!(g[i]<=e);i--);i=Math.min(i,u-2)}else{for(i=C;i<u&&!(g[i]>e);i++);i=Math.min(i-1,u-2)}L=e;var n=g[(C=i)+1]-g[i];if(0!=n)if(S=(e-g[i])/n,l)if(I=m[i],M=m[0===i?i:i-1],A=m[u-2<i?u-1:i+1],D=m[u-3<i?u-1:i+2],c)Je(M,I,A,D,S,S*S,S*S*S,r(t,o),p);else{if(d)a=Je(M,I,A,D,S,S*S,S*S*S,k,1),a=ei(k);else{if(f)return je(I,A,S);a=Qe(M,I,A,D,S,S*S,S*S*S)}s(t,o,a)}else if(c)qe(m[i],m[i+1],S,r(t,o),p);else{var a;if(d)qe(m[i],m[i+1],S,k,1),a=ei(k);else{if(f)return je(m[i],m[i+1],S);a=Ye(m[i],m[i+1],S)}s(t,o,a)}},ondestroy:i});return e&&"spline"!==e&&(P.easing=e),P}}}function ni(t,e,i,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||Ue,this._setter=n||Xe,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]}ni.prototype={when:function(t,e){var i=this._tracks;for(var n in e)if(e.hasOwnProperty(n)){if(!i[n]){i[n]=[];var o=this._getter(this._target,n);if(null==o)continue;0!==t&&i[n].push({time:0,value:ti(o)})}i[n].push({time:t,value:e[n]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].pause();this._paused=!0},resume:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var t=this._doneList,e=t.length,i=0;i<e;i++)t[i].call(this)},start:function(t,e){function i(){--a||o._doneCallback()}var n,o=this,a=0;for(var r in this._tracks)if(this._tracks.hasOwnProperty(r)){var s=ii(this,t,i,this._tracks[r],r,e);s&&(this._clipList.push(s),a++,this.animation&&this.animation.addClip(s),n=s)}if(n){var l=n.onframe;n.onframe=function(t,e){l(t,e);for(var i=0;i<o._onframeList.length;i++)o._onframeList[i](t,e)}}return a||this._doneCallback(),this},stop:function(t){for(var e=this._clipList,i=this.animation,n=0;n<e.length;n++){var o=e[n];t&&o.onframe(this._target,1),i&&i.removeClip(o)}e.length=0},delay:function(t){return this._delay=t,this},done:function(t){return t&&this._doneList.push(t),this},getClips:function(){return this._clipList}};var oi=1;"undefined"!=typeof window&&(oi=Math.max(window.devicePixelRatio||1,1));var ai=oi;function ri(){this.animators=[]}function si(t,e,i,n,o,a,r,s){R(n)?(a=o,o=n,n=0):E(o)?(a=o,o="linear",n=0):E(n)?(a=n,n=0):i=E(i)?(a=i,500):i||500,t.stopAnimation(),function t(e,i,n,o,a,r,s){var l={},u=0;for(var h in o)o.hasOwnProperty(h)&&(null!=n[h]?z(o[h])&&!T(o[h])?t(e,i?i+"."+h:h,n[h],o[h],a,r,s):(s?(l[h]=n[h],li(e,i,h,o[h])):l[h]=o[h],u++):null==o[h]||s||li(e,i,h,o[h]));0<u&&e.animate(i,!1).when(null==a?500:a,l).delay(r||0)}(t,"",t,e,i,n,s);var l=t.animators.slice(),u=l.length;function h(){--u||a&&a()}u||a&&a();for(var c=0;c<l.length;c++)l[c].done(h).start(o,r)}function li(t,e,i,n){if(e){var o={};o[e]={},o[e][i]=n,t.attr(o)}else t.attr(i,n)}ri.prototype={constructor:ri,animate:function(t,e){var i,n=!1,o=this,a=this.__zr;if(t){var r=t.split("."),s=o;n="shape"===r[0];for(var l=0,u=r.length;l<u;l++)s=s&&s[r[l]];s&&(i=s)}else i=o;if(i){var h=o.animators,c=new ni(i,e);return c.during((function(t){o.dirty(n)})).done((function(){h.splice(S(h,c),1)})),h.push(c),a&&a.animation.addAnimator(c),c}},stopAnimation:function(t){for(var e=this.animators,i=e.length,n=0;n<i;n++)e[n].stop(t);return e.length=0,this},animateTo:function(t,e,i,n,o,a){si(this,t,e,i,n,o,a)},animateFrom:function(t,e,i,n,o,a){si(this,t,e,i,n,o,a,!0)}};var ui=function(t){he.call(this,t),At.call(this,t),ri.call(this,t),this.id=t.id||n()};ui.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;(i=i||(this.transform=[1,0,0,1,0,0]))[4]+=t,i[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(t,e){},attrKV:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var i=this[t];(i=i||(this[t]=[]))[0]=e[0],i[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(z(t))for(var i in t)t.hasOwnProperty(i)&&this.attrKV(i,t[i]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),(this.clipPath=t).__zr=e,(t.__clipTarget=this).dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.addAnimator(e[i]);this.clipPath&&this.clipPath.addSelfToZr(t)},removeSelfFromZr:function(t){this.__zr=null;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.removeAnimator(e[i]);this.clipPath&&this.clipPath.removeSelfFromZr(t)}},I(ui,ri),I(ui,he),I(ui,At);var hi,ci,di,fi,pi=_t,gi=Math.min,mi=Math.max;function vi(t,e,i,n){i<0&&(t+=i,i=-i),n<0&&(e+=n,n=-n),this.x=t,this.y=e,this.width=i,this.height=n}vi.prototype={constructor:vi,union:function(t){var e=gi(t.x,this.x),i=gi(t.y,this.y);this.width=mi(t.x+t.width,this.x+this.width)-e,this.height=mi(t.y+t.height,this.y+this.height)-i,this.x=e,this.y=i},applyTransform:(hi=[],ci=[],di=[],fi=[],function(t){if(t){hi[0]=di[0]=this.x,hi[1]=fi[1]=this.y,ci[0]=fi[0]=this.x+this.width,ci[1]=di[1]=this.y+this.height,pi(hi,hi,t),pi(ci,ci,t),pi(di,di,t),pi(fi,fi,t),this.x=gi(hi[0],ci[0],di[0],fi[0]),this.y=gi(hi[1],ci[1],di[1],fi[1]);var e=mi(hi[0],ci[0],di[0],fi[0]),i=mi(hi[1],ci[1],di[1],fi[1]);this.width=e-this.x,this.height=i-this.y}}),calculateTransform:function(t){var e=t.width/this.width,i=t.height/this.height,n=Jt();return ie(n,n,[-this.x,-this.y]),oe(n,n,[e,i]),ie(n,n,[t.x,t.y]),n},intersect:function(t){if(!t)return!1;t instanceof vi||(t=vi.create(t));var e=this;return!(e.x+e.width<t.x||t.x+t.width<e.x||e.y+e.height<t.y||t.y+t.height<e.y)},contain:function(t,e){var i=this;return t>=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new vi(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},vi.create=function(t){return new vi(t.x,t.y,t.width,t.height)};var yi=function(t){for(var e in ui.call(this,t=t||{}),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};function xi(t,e,i,n){var o=e+1;if(o===i)return 1;if(n(t[o++],t[e])<0){for(;o<i&&n(t[o],t[o-1])<0;)o++;!function(t,e,i){for(i--;e<i;){var n=t[e];t[e++]=t[i],t[i--]=n}}(t,e,o)}else for(;o<i&&0<=n(t[o],t[o-1]);)o++;return o-e}function _i(t,e,i,n,o){for(n===e&&n++;n<i;n++){for(var a,r=t[n],s=e,l=n;s<l;)o(r,t[a=s+l>>>1])<0?l=a:s=1+a;var u=n-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;0<u;)t[s+u]=t[s+u-1],u--}t[s]=r}}function wi(t,e,i,n,o,a){var r=0,s=0,l=1;if(0<a(t,e[i+o])){for(s=n-o;l<s&&0<a(t,e[i+o+l]);)(l=1+((r=l)<<1))<=0&&(l=s);s<l&&(l=s),r+=o,l+=o}else{for(s=o+1;l<s&&a(t,e[i+o-l])<=0;)(l=1+((r=l)<<1))<=0&&(l=s);s<l&&(l=s);var u=r;r=o-l,l=o-u}for(r++;r<l;){var h=r+(l-r>>>1);0<a(t,e[i+h])?r=h+1:l=h}return l}function bi(t,e,i,n,o,a){var r=0,s=0,l=1;if(a(t,e[i+o])<0){for(s=o+1;l<s&&a(t,e[i+o-l])<0;)(l=1+((r=l)<<1))<=0&&(l=s);s<l&&(l=s);var u=r;r=o-l,l=o-u}else{for(s=n-o;l<s&&0<=a(t,e[i+o+l]);)(l=1+((r=l)<<1))<=0&&(l=s);s<l&&(l=s),r+=o,l+=o}for(r++;r<l;){var h=r+(l-r>>>1);a(t,e[i+h])<0?l=h:r=h+1}return l}function Si(t,e){var i,n,o=7,a=0,r=[];function s(s){var l=i[s],u=n[s],h=i[s+1],c=n[s+1];n[s]=u+c,s===a-3&&(i[s+1]=i[s+2],n[s+1]=n[s+2]),a--;var d=bi(t[h],t,l,u,0,e);l+=d,0!=(u-=d)&&0!==(c=wi(t[l+u-1],t,h,c,c-1,e))&&(u<=c?function(i,n,a,s){var l=0;for(l=0;l<n;l++)r[l]=t[i+l];var u=0,h=a,c=i;if(t[c++]=t[h++],0!=--s){if(1===n){for(l=0;l<s;l++)t[c+l]=t[h+l];return t[c+s]=r[u]}for(var d,f,p,g=o;;){f=d=0,p=!1;do{if(e(t[h],r[u])<0){if(t[c++]=t[h++],f++,(d=0)==--s){p=!0;break}}else if(t[c++]=r[u++],d++,f=0,1==--n){p=!0;break}}while((d|f)<g);if(p)break;do{if(0!==(d=bi(t[h],r,u,n,0,e))){for(l=0;l<d;l++)t[c+l]=r[u+l];if(c+=d,u+=d,(n-=d)<=1){p=!0;break}}if(t[c++]=t[h++],0==--s){p=!0;break}if(0!==(f=wi(r[u],t,h,s,0,e))){for(l=0;l<f;l++)t[c+l]=t[h+l];if(c+=f,h+=f,0==(s-=f)){p=!0;break}}if(t[c++]=r[u++],1==--n){p=!0;break}g--}while(7<=d||7<=f);if(p)break;g<0&&(g=0),g+=2}if((o=g)<1&&(o=1),1===n){for(l=0;l<s;l++)t[c+l]=t[h+l];t[c+s]=r[u]}else{if(0===n)throw new Error;for(l=0;l<n;l++)t[c+l]=r[u+l]}}else for(l=0;l<n;l++)t[c+l]=r[u+l]}(l,u,h,c):function(i,n,a,s){var l=0;for(l=0;l<s;l++)r[l]=t[a+l];var u=i+n-1,h=s-1,c=a+s-1,d=0,f=0;if(t[c--]=t[u--],0!=--n){if(1===s){for(f=1+(c-=n),d=1+(u-=n),l=n-1;0<=l;l--)t[f+l]=t[d+l];return t[c]=r[h]}for(var p=o;;){var g=0,m=0,v=!1;do{if(e(r[h],t[u])<0){if(t[c--]=t[u--],g++,(m=0)==--n){v=!0;break}}else if(t[c--]=r[h--],m++,g=0,1==--s){v=!0;break}}while((g|m)<p);if(v)break;do{if(0!=(g=n-bi(r[h],t,i,n,n-1,e))){for(n-=g,f=1+(c-=g),d=1+(u-=g),l=g-1;0<=l;l--)t[f+l]=t[d+l];if(0===n){v=!0;break}}if(t[c--]=r[h--],1==--s){v=!0;break}if(0!=(m=s-wi(t[u],r,0,s,s-1,e))){for(s-=m,f=1+(c-=m),d=1+(h-=m),l=0;l<m;l++)t[f+l]=r[d+l];if(s<=1){v=!0;break}}if(t[c--]=t[u--],0==--n){v=!0;break}p--}while(7<=g||7<=m);if(v)break;p<0&&(p=0),p+=2}if((o=p)<1&&(o=1),1===s){for(f=1+(c-=n),d=1+(u-=n),l=n-1;0<=l;l--)t[f+l]=t[d+l];t[c]=r[h]}else{if(0===s)throw new Error;for(d=c-(s-1),l=0;l<s;l++)t[d+l]=r[l]}}else for(d=c-(s-1),l=0;l<s;l++)t[d+l]=r[l]}(l,u,h,c))}i=[],n=[],this.mergeRuns=function(){for(;1<a;){var t=a-2;if(1<=t&&n[t-1]<=n[t]+n[t+1]||2<=t&&n[t-2]<=n[t]+n[t-1])n[t-1]<n[t+1]&&t--;else if(n[t]>n[t+1])break;s(t)}},this.forceMergeRuns=function(){for(;1<a;){var t=a-2;0<t&&n[t-1]<n[t+1]&&t--,s(t)}},this.pushRun=function(t,e){i[a]=t,n[a]=e,a+=1}}function Mi(t,e,i,n){var o=(n=n||t.length)-(i=i||0);if(!(o<2)){var a=0;if(o<32)_i(t,i,n,i+(a=xi(t,i,n,e)),e);else{var r=new Si(t,e),s=function(t){for(var e=0;32<=t;)e|=1&t,t>>=1;return t+e}(o);do{if((a=xi(t,i,n,e))<s){var l=o;s<l&&(l=s),_i(t,i,i+l,i+a,e),a=l}r.pushRun(i,a),r.mergeRuns(),o-=a,i+=a}while(0!==o);r.forceMergeRuns()}}}function Ii(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function Ti(){this._roots=[],this._displayList=[],this._displayListLen=0}yi.prototype={constructor:yi,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,i=0;i<e.length;i++)if(e[i].name===t)return e[i]},childCount:function(){return this._children.length},add:function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},addBefore:function(t,e){if(t&&t!==this&&t.parent!==this&&e&&e.parent===this){var i=this._children,n=i.indexOf(e);0<=n&&(i.splice(n,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t);var e=(t.parent=this).__storage,i=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof yi&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,n=this._children,o=S(n,t);return o<0||(n.splice(o,1),t.parent=null,i&&(i.delFromStorage(t),t instanceof yi&&t.delChildrenFromStorage(i)),e&&e.refresh()),this},removeAll:function(){var t,e,i=this._children,n=this.__storage;for(e=0;e<i.length;e++)t=i[e],n&&(n.delFromStorage(t),t instanceof yi&&t.delChildrenFromStorage(n)),t.parent=null;return i.length=0,this},eachChild:function(t,e){for(var i=this._children,n=0;n<i.length;n++)t.call(e,i[n],n);return this},traverse:function(t,e){for(var i=0;i<this._children.length;i++){var n=this._children[i];t.call(e,n),"group"===n.type&&n.traverse(t,e)}return this},addChildrenToStorage:function(t){for(var e=0;e<this._children.length;e++){var i=this._children[e];t.addToStorage(i),i instanceof yi&&i.addChildrenToStorage(t)}},delChildrenFromStorage:function(t){for(var e=0;e<this._children.length;e++){var i=this._children[e];t.delFromStorage(i),i instanceof yi&&i.delChildrenFromStorage(t)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(t){for(var e=null,i=new vi(0,0,0,0),n=t||this._children,o=[],a=0;a<n.length;a++){var r=n[a];if(!r.ignore&&!r.invisible){var s=r.getBoundingRect(),l=r.getLocalTransform(o);l?(i.copy(s),i.applyTransform(l),(e=e||i.clone()).union(i)):(e=e||s.clone()).union(s)}}return e||i}},M(yi,ui),Ti.prototype={constructor:Ti,traverse:function(t,e){for(var i=0;i<this._roots.length;i++)this._roots[i].traverse(t,e)},getDisplayList:function(t,e){return e=e||!1,t&&this.updateDisplayList(e),this._displayList},updateDisplayList:function(t){this._displayListLen=0;for(var e=this._roots,i=this._displayList,n=0,a=e.length;n<a;n++)this._updateAndAddDisplayable(e[n],null,t);i.length=this._displayListLen,o.canvasSupported&&Mi(i,Ii)},_updateAndAddDisplayable:function(t,e,i){if(!t.ignore||i){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var n=t.clipPath;if(n){e=e?e.slice():[];for(var o=n,a=t;o;)o.parent=a,o.updateTransform(),e.push(o),o=(a=o).clipPath}if(t.isGroup){for(var r=t._children,s=0;s<r.length;s++){var l=r[s];t.__dirty&&(l.__dirty=!0),this._updateAndAddDisplayable(l,e,i)}t.__dirty=!1}else t.__clipPaths=e,this._displayList[this._displayListLen++]=t}},addRoot:function(t){t.__storage!==this&&(t instanceof yi&&t.addChildrenToStorage(this),this.addToStorage(t),this._roots.push(t))},delRoot:function(t){if(null==t){for(var e=0;e<this._roots.length;e++){var i=this._roots[e];i instanceof yi&&i.delChildrenFromStorage(this)}return this._roots=[],this._displayList=[],void(this._displayListLen=0)}if(t instanceof Array){e=0;for(var n=t.length;e<n;e++)this.delRoot(t[e])}else{var o=S(this._roots,t);0<=o&&(this.delFromStorage(t),this._roots.splice(o,1),t instanceof yi&&t.delChildrenFromStorage(this))}},addToStorage:function(t){return t&&(t.__storage=this,t.dirty(!1)),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:Ii};var Ai={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},Di=function(t,e,i){return Ai.hasOwnProperty(e)?i*t.dpr:i},Ci=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],Li=function(t){this.extendFrom(t,!1)};function ki(t,e,i){var n=null==e.x?0:e.x,o=null==e.x2?1:e.x2,a=null==e.y?0:e.y,r=null==e.y2?0:e.y2;return e.global||(n=n*i.width+i.x,o=o*i.width+i.x,a=a*i.height+i.y,r=r*i.height+i.y),n=isNaN(n)?0:n,o=isNaN(o)?1:o,a=isNaN(a)?0:a,r=isNaN(r)?0:r,t.createLinearGradient(n,a,o,r)}function Pi(t,e,i){var n=i.width,o=i.height,a=Math.min(n,o),r=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;return e.global||(r=r*n+i.x,s=s*o+i.y,l*=a),t.createRadialGradient(r,s,0,r,s,l)}for(var Oi=Li.prototype={constructor:Li,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,i){var n=this,o=i&&i.style,a=!o||1!==t.__attrCachedBy;t.__attrCachedBy=1;for(var r=0;r<Ci.length;r++){var s=Ci[r],l=s[0];!a&&n[l]===o[l]||(t[l]=Di(t,l,n[l]||s[1]))}!a&&n.fill===o.fill||(t.fillStyle=n.fill),!a&&n.stroke===o.stroke||(t.strokeStyle=n.stroke),!a&&n.opacity===o.opacity||(t.globalAlpha=null==n.opacity?1:n.opacity),!a&&n.blend===o.blend||(t.globalCompositeOperation=n.blend||"source-over"),this.hasStroke()&&(t.lineWidth=n.lineWidth/(this.strokeNoScale&&e&&e.getLineScale?e.getLineScale():1))},hasFill:function(){var t=this.fill;return null!=t&&"none"!==t},hasStroke:function(){var t=this.stroke;return null!=t&&"none"!==t&&0<this.lineWidth},extendFrom:function(t,e){if(t)for(var i in t)!t.hasOwnProperty(i)||!0!==e&&(!1===e?this.hasOwnProperty(i):null==t[i])||(this[i]=t[i])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,i){for(var n=("radial"===e.type?Pi:ki)(t,e,i),o=e.colorStops,a=0;a<o.length;a++)n.addColorStop(o[a].offset,o[a].color);return n}},Ni=0;Ni<Ci.length;Ni++){var Ei=Ci[Ni];Ei[0]in Oi||(Oi[Ei[0]]=Ei[1])}function Ri(t,e){this.image=t,this.repeat=e,this.type="pattern"}function zi(){return!1}function Bi(t,e,i){var n=w(),o=e.getWidth(),a=e.getHeight(),r=n.style;return r&&(r.position="absolute",r.left=0,r.top=0,r.width=o+"px",r.height=a+"px",n.setAttribute("data-zr-dom-id",t)),n.width=o*i,n.height=a*i,n}function Vi(t,e,i){var n;i=i||ai,"string"==typeof t?n=Bi(t,e,i):z(t)&&(t=(n=t).id),this.id=t;var o=(this.dom=n).style;o&&(n.onselectstart=zi,o["-webkit-user-select"]="none",o["user-select"]="none",o["-webkit-touch-callout"]="none",o["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",o.padding=0,o.margin=0,o["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=e,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=i}Li.getGradient=Oi.getGradient,Vi.prototype={constructor:Vi,__dirty:!0,__used:!(Ri.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")}),__drawIndex:0,__startIndex:0,__endIndex:0,incremental:!1,getElementCount:function(){return this.__endIndex-this.__startIndex},initContext:function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},createBackBuffer:function(){var t=this.dpr;this.domBack=Bi("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},resize:function(t,e){var i=this.dpr,n=this.dom,o=n.style,a=this.domBack;o&&(o.width=t+"px",o.height=e+"px"),n.width=t*i,n.height=e*i,a&&(a.width=t*i,a.height=e*i,1!==i&&this.ctxBack.scale(i,i))},clear:function(t,e){var i,n=this.dom,o=this.ctx,a=n.width,r=n.height,s=(e=e||this.clearColor,this.motionBlur&&!t),l=this.lastFrameAlpha,u=this.dpr;if(s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(n,0,0,a/u,r/u)),o.clearRect(0,0,a,r),e&&"transparent"!==e&&(e.colorStops?(i=e.__canvasGradient||Li.getGradient(o,e,{x:0,y:0,width:a,height:r}),e.__canvasGradient=i):e.image&&(i=Ri.prototype.getCanvasPattern.call(e,o)),o.save(),o.fillStyle=i||e,o.fillRect(0,0,a,r),o.restore()),s){var h=this.domBack;o.save(),o.globalAlpha=l,o.drawImage(h,0,0,a,r),o.restore()}}};var Gi="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)},Fi=new xe(50);function Wi(t){if("string"!=typeof t)return t;var e=Fi.get(t);return e&&e.image}function Hi(t,e,i,n,o){if(t){if("string"!=typeof t)return t;if(e&&e.__zrImageSrc===t||!i)return e;var a=Fi.get(t),r={hostEl:i,cb:n,cbPayload:o};return a?Ui(e=a.image)||a.pending.push(r):((e=new Image).onload=e.onerror=Zi,Fi.put(t,e.__cachedImgObj={image:e,pending:[r]}),e.src=e.__zrImageSrc=t),e}return e}function Zi(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var i=t.pending[e],n=i.cb;n&&n(this,i.cbPayload),i.hostEl.dirty()}t.pending.length=0}function Ui(t){return t&&t.width&&t.height}var Xi={},Yi=0,ji=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,qi="12px sans-serif",Ki={};function $i(t,e){var i=t+":"+(e=e||qi);if(Xi[i])return Xi[i];for(var n,o,a=(t+"").split("\n"),r=0,s=0,l=a.length;s<l;s++)r=Math.max((n=a[s],o=e,Ki.measureText(n,o)).width,r);return 5e3<Yi&&(Yi=0,Xi={}),Yi++,Xi[i]=r}function Ji(t,e,i,n,o,a,r,s){return r?function(t,e,i,n,o,a,r,s){var l=un(t,{rich:r,truncate:s,font:e,textAlign:i,textPadding:o,textLineHeight:a}),u=l.outerWidth,h=l.outerHeight;return new vi(Qi(0,u,i),tn(0,h,n),u,h)}(t,e,i,n,o,a,r,s):function(t,e,i,n,o,a,r){var s=ln(t,e,o,a,r),l=$i(t,e);o&&(l+=o[1]+o[3]);var u=s.outerHeight,h=new vi(Qi(0,l,i),tn(0,u,n),l,u);return h.lineHeight=s.lineHeight,h}(t,e,i,n,o,a,s)}function Qi(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function tn(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function en(t,e,i){var n=e.textDistance,o=i.x,a=i.y;n=n||0;var r=i.height,s=i.width,l=r/2,u="left",h="top";switch(e.textPosition){case"left":o-=n,a+=l,u="right",h="middle";break;case"right":o+=n+s,a+=l,h="middle";break;case"top":o+=s/2,a-=n,u="center",h="bottom";break;case"bottom":o+=s/2,a+=r+n,u="center";break;case"inside":o+=s/2,a+=l,u="center",h="middle";break;case"insideLeft":o+=n,a+=l,h="middle";break;case"insideRight":o+=s-n,a+=l,u="right",h="middle";break;case"insideTop":o+=s/2,a+=n,u="center";break;case"insideBottom":o+=s/2,a+=r-n,u="center",h="bottom";break;case"insideTopLeft":o+=n,a+=n;break;case"insideTopRight":o+=s-n,a+=n,u="right";break;case"insideBottomLeft":o+=n,a+=r-n,h="bottom";break;case"insideBottomRight":o+=s-n,a+=r-n,u="right",h="bottom"}return(t=t||{}).x=o,t.y=a,t.textAlign=u,t.textVerticalAlign=h,t}function nn(t,e,i,n,o){if(!e)return"";var a=(t+"").split("\n");o=on(e,i,n,o);for(var r=0,s=a.length;r<s;r++)a[r]=an(a[r],o);return a.join("\n")}function on(t,e,i,n){(n=x({},n)).font=e,i=H(i,"..."),n.maxIterations=H(n.maxIterations,2);var o=n.minChar=H(n.minChar,0);n.cnCharWidth=$i("\u56fd",e);var a=n.ascCharWidth=$i("a",e);n.placeholder=H(n.placeholder,"");for(var r=t=Math.max(0,t-1),s=0;s<o&&a<=r;s++)r-=a;var l=$i(i,e);return r<l&&(i="",l=0),r=t-l,n.ellipsis=i,n.ellipsisWidth=l,n.contentWidth=r,n.containerWidth=t,n}function an(t,e){var i=e.containerWidth,n=e.font,o=e.contentWidth;if(!i)return"";var a=$i(t,n);if(a<=i)return t;for(var r=0;;r++){if(a<=o||r>=e.maxIterations){t+=e.ellipsis;break}var s=0===r?rn(t,o,e.ascCharWidth,e.cnCharWidth):0<a?Math.floor(t.length*o/a):0;a=$i(t=t.substr(0,s),n)}return""===t&&(t=e.placeholder),t}function rn(t,e,i,n){for(var o=0,a=0,r=t.length;a<r&&o<e;a++){var s=t.charCodeAt(a);o+=0<=s&&s<=127?i:n}return a}function sn(t){return $i("\u56fd",t)}function ln(t,e,i,n,o){null!=t&&(t+="");var a=H(n,sn(e)),r=t?t.split("\n"):[],s=r.length*a,l=s,u=!0;if(i&&(l+=i[0]+i[2]),t&&o){u=!1;var h=o.outerHeight,c=o.outerWidth;if(null!=h&&h<l)t="",r=[];else if(null!=c)for(var d=on(c-(i?i[1]+i[3]:0),e,o.ellipsis,{minChar:o.minChar,placeholder:o.placeholder}),f=0,p=r.length;f<p;f++)r[f]=an(r[f],d)}return{lines:r,height:s,outerHeight:l,lineHeight:a,canCacheByTextString:u}}function un(t,e){var i={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return i;for(var n,o=ji.lastIndex=0;null!=(n=ji.exec(t));){var a=n.index;o<a&&hn(i,t.substring(o,a)),hn(i,n[2],n[1]),o=ji.lastIndex}o<t.length&&hn(i,t.substring(o,t.length));var r=i.lines,s=0,l=0,u=[],h=e.textPadding,c=e.truncate,d=c&&c.outerWidth,f=c&&c.outerHeight;h&&(null!=d&&(d-=h[1]+h[3]),null!=f&&(f-=h[0]+h[2]));for(var p=0;p<r.length;p++){for(var g=r[p],m=0,v=0,y=0;y<g.tokens.length;y++){var x=(C=g.tokens[y]).styleName&&e.rich[C.styleName]||{},_=C.textPadding=x.textPadding,w=C.font=x.font||e.font,b=C.textHeight=H(x.textHeight,sn(w));if(_&&(b+=_[0]+_[2]),C.height=b,C.lineHeight=Z(x.textLineHeight,e.textLineHeight,b),C.textAlign=x&&x.textAlign||e.textAlign,C.textVerticalAlign=x&&x.textVerticalAlign||"middle",null!=f&&s+C.lineHeight>f)return{lines:[],width:0,height:0};C.textWidth=$i(C.text,w);var S=x.textWidth,M=null==S||"auto"===S;if("string"==typeof S&&"%"===S.charAt(S.length-1))C.percentWidth=S,u.push(C),S=0;else{if(M){S=C.textWidth;var I=x.textBackgroundColor,T=I&&I.image;T&&Ui(T=Wi(T))&&(S=Math.max(S,T.width*b/T.height))}var A=_?_[1]+_[3]:0;S+=A;var D=null!=d?d-v:null;null!=D&&D<S&&(!M||D<A?(C.text="",C.textWidth=S=0):(C.text=nn(C.text,D-A,w,c.ellipsis,{minChar:c.minChar}),C.textWidth=$i(C.text,w),S=C.textWidth+A))}v+=C.width=S,x&&(m=Math.max(m,C.lineHeight))}g.width=v,s+=g.lineHeight=m,l=Math.max(l,v)}for(i.outerWidth=i.width=H(e.textWidth,l),i.outerHeight=i.height=H(e.textHeight,s),h&&(i.outerWidth+=h[1]+h[3],i.outerHeight+=h[0]+h[2]),p=0;p<u.length;p++){var C,L=(C=u[p]).percentWidth;C.width=parseInt(L,10)/100*l}return i}function hn(t,e,i){for(var n=""===e,o=e.split("\n"),a=t.lines,r=0;r<o.length;r++){var s=o[r],l={styleName:i,text:s,isLineHolder:!s&&!n};if(r)a.push({tokens:[l]});else{var u=(a[a.length-1]||(a[0]={tokens:[]})).tokens,h=u.length;1===h&&u[0].isLineHolder?u[0]=l:!s&&h&&!n||u.push(l)}}}function cn(t){var e=(t.fontSize||t.fontFamily)&&[t.fontStyle,t.fontWeight,(t.fontSize||12)+"px",t.fontFamily||"sans-serif"].join(" ");return e&&j(e)||t.textFont||t.font}function dn(t,e){var i,n,o,a,r,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?i=n=o=a=c:c instanceof Array?1===c.length?i=n=o=a=c[0]:2===c.length?(i=o=c[0],n=a=c[1]):3===c.length?(i=c[0],n=a=c[1],o=c[2]):(i=c[0],n=c[1],o=c[2],a=c[3]):i=n=o=a=0,u<i+n&&(i*=u/(r=i+n),n*=u/r),u<o+a&&(o*=u/(r=o+a),a*=u/r),h<n+o&&(n*=h/(r=n+o),o*=h/r),h<i+a&&(i*=h/(r=i+a),a*=h/r),t.moveTo(s+i,l),t.lineTo(s+u-n,l),0!==n&&t.arc(s+u-n,l+n,n,-Math.PI/2,0),t.lineTo(s+u,l+h-o),0!==o&&t.arc(s+u-o,l+h-o,o,0,Math.PI/2),t.lineTo(s+a,l+h),0!==a&&t.arc(s+a,l+h-a,a,Math.PI/2,Math.PI),t.lineTo(s,l+i),0!==i&&t.arc(s+i,l+i,i,Math.PI,1.5*Math.PI)}Ki.measureText=function(t,e){var i=b();return i.font=e||qi,i.measureText(t)};var fn=qi,pn={left:1,right:1,center:1},gn={top:1,bottom:1,middle:1},mn=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],vn={},yn={};function xn(t){return _n(t),A(t.rich,_n),t}function _n(t){if(t){t.font=cn(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||pn[e]?e:"left";var i=t.textVerticalAlign||t.textBaseline;"center"===i&&(i="middle"),t.textVerticalAlign=null==i||gn[i]?i:"top",t.textPadding&&(t.textPadding=X(t.textPadding))}}function wn(t,e,i,n,o,a){n.rich?function(t,e,i,n,o,a){9!==a&&(e.__attrCachedBy=0);var r=t.__textCotentBlock;r&&!t.__dirtyText||(r=t.__textCotentBlock=un(i,n)),function(t,e,i,n,o){var a=i.width,r=i.outerWidth,s=i.outerHeight,l=n.textPadding,u=An(yn,t,n,o),h=u.baseX,c=u.baseY,d=u.textAlign,f=u.textVerticalAlign;bn(e,n,o,h,c);var p=Qi(h,r,d),g=tn(c,s,f),m=p,v=g;l&&(m+=l[3],v+=l[0]);var y=m+a;Mn(n)&&In(t,e,n,p,g,r,s);for(var x=0;x<i.lines.length;x++){for(var _,w=i.lines[x],b=w.tokens,S=b.length,M=w.lineHeight,I=w.width,T=0,A=m,D=y,C=S-1;T<S&&(!(_=b[T]).textAlign||"left"===_.textAlign);)Sn(t,e,_,n,M,v,A,"left"),I-=_.width,A+=_.width,T++;for(;0<=C&&"right"===(_=b[C]).textAlign;)Sn(t,e,_,n,M,v,D,"right"),I-=_.width,D-=_.width,C--;for(A+=(a-(A-m)-(y-D)-I)/2;T<=C;)Sn(t,e,_=b[T],n,M,v,A+_.width/2,"center"),A+=_.width,T++;v+=M}}(t,e,r,n,o)}(t,e,i,n,o,a):function(t,e,i,n,o,a){var r,s=Mn(n),l=!1,u=2===e.__attrCachedBy;9!==a?(a&&(r=a.style,l=!s&&u&&r),e.__attrCachedBy=s?0:2):u&&(e.__attrCachedBy=0);var h=n.font||fn;l&&h===(r.font||fn)||(e.font=h);var c=t.__computedFont;t.__styleFont!==h&&(t.__styleFont=h,c=t.__computedFont=e.font);var d=n.textPadding,f=t.__textCotentBlock;f&&!t.__dirtyText||(f=t.__textCotentBlock=ln(i,c,d,n.textLineHeight,n.truncate));var p=f.outerHeight,g=f.lines,m=f.lineHeight,v=An(yn,t,n,o),y=v.baseX,x=v.baseY,_=v.textAlign||"left",w=v.textVerticalAlign;bn(e,n,o,y,x);var b=tn(x,p,w),S=y,M=b;if(s||d){var I=$i(i,c);d&&(I+=d[1]+d[3]);var T=Qi(y,I,_);s&&In(t,e,n,T,b,I,p),d&&(S=Pn(y,_,d),M+=d[0])}e.textAlign=_,e.textBaseline="middle",e.globalAlpha=n.opacity||1;for(var A=0;A<mn.length;A++){var D=mn[A],C=D[0],L=D[1],k=n[C];l&&k===r[C]||(e[L]=Di(e,L,k||D[2]))}M+=m/2;var P=n.textStrokeWidth,O=!l||P!==(l?r.textStrokeWidth:null),N=!l||O||n.textStroke!==r.textStroke,E=Cn(n.textStroke,P),R=Ln(n.textFill);if(E&&(O&&(e.lineWidth=P),N&&(e.strokeStyle=E)),R&&(l&&n.textFill===r.textFill||(e.fillStyle=R)),1===g.length)E&&e.strokeText(g[0],S,M),R&&e.fillText(g[0],S,M);else for(A=0;A<g.length;A++)E&&e.strokeText(g[A],S,M),R&&e.fillText(g[A],S,M),M+=m}(t,e,i,n,o,a)}function bn(t,e,i,n,o){if(i&&e.textRotation){var a=e.textOrigin;"center"===a?(n=i.width/2+i.x,o=i.height/2+i.y):a&&(n=a[0]+i.x,o=a[1]+i.y),t.translate(n,o),t.rotate(-e.textRotation),t.translate(-n,-o)}}function Sn(t,e,i,n,o,a,r,s){var l=n.rich[i.styleName]||{};l.text=i.text;var u=i.textVerticalAlign,h=a+o/2;"top"===u?h=a+i.height/2:"bottom"===u&&(h=a+o-i.height/2),!i.isLineHolder&&Mn(l)&&In(t,e,l,"right"===s?r-i.width:"center"===s?r-i.width/2:r,h-i.height/2,i.width,i.height);var c=i.textPadding;c&&(r=Pn(r,s,c),h-=i.height/2-c[2]-i.textHeight/2),Dn(e,"shadowBlur",Z(l.textShadowBlur,n.textShadowBlur,0)),Dn(e,"shadowColor",l.textShadowColor||n.textShadowColor||"transparent"),Dn(e,"shadowOffsetX",Z(l.textShadowOffsetX,n.textShadowOffsetX,0)),Dn(e,"shadowOffsetY",Z(l.textShadowOffsetY,n.textShadowOffsetY,0)),Dn(e,"textAlign",s),Dn(e,"textBaseline","middle"),Dn(e,"font",i.font||fn);var d=Cn(l.textStroke||n.textStroke,p),f=Ln(l.textFill||n.textFill),p=H(l.textStrokeWidth,n.textStrokeWidth);d&&(Dn(e,"lineWidth",p),Dn(e,"strokeStyle",d),e.strokeText(i.text,r,h)),f&&(Dn(e,"fillStyle",f),e.fillText(i.text,r,h))}function Mn(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function In(t,e,i,n,o,a,r){var s=i.textBackgroundColor,l=i.textBorderWidth,u=i.textBorderColor,h=R(s);if(Dn(e,"shadowBlur",i.textBoxShadowBlur||0),Dn(e,"shadowColor",i.textBoxShadowColor||"transparent"),Dn(e,"shadowOffsetX",i.textBoxShadowOffsetX||0),Dn(e,"shadowOffsetY",i.textBoxShadowOffsetY||0),h||l&&u){e.beginPath();var c=i.textBorderRadius;c?dn(e,{x:n,y:o,width:a,height:r,r:c}):e.rect(n,o,a,r),e.closePath()}if(h)if(Dn(e,"fillStyle",s),null!=i.fillOpacity){var d=e.globalAlpha;e.globalAlpha=i.fillOpacity*i.opacity,e.fill(),e.globalAlpha=d}else e.fill();else if(z(s)){var f=s.image;(f=Hi(f,null,t,Tn,s))&&Ui(f)&&e.drawImage(f,n,o,a,r)}l&&u&&(Dn(e,"lineWidth",l),Dn(e,"strokeStyle",u),null!=i.strokeOpacity?(d=e.globalAlpha,e.globalAlpha=i.strokeOpacity*i.opacity,e.stroke(),e.globalAlpha=d):e.stroke())}function Tn(t,e){e.image=t}function An(t,e,i,n){var o=i.x||0,a=i.y||0,r=i.textAlign,s=i.textVerticalAlign;if(n){var l=i.textPosition;if(l instanceof Array)o=n.x+kn(l[0],n.width),a=n.y+kn(l[1],n.height);else{var u=e&&e.calculateTextPosition?e.calculateTextPosition(vn,i,n):en(vn,i,n);o=u.x,a=u.y,r=r||u.textAlign,s=s||u.textVerticalAlign}var h=i.textOffset;h&&(o+=h[0],a+=h[1])}return(t=t||{}).baseX=o,t.baseY=a,t.textAlign=r,t.textVerticalAlign=s,t}function Dn(t,e,i){return t[e]=Di(t,e,i),t[e]}function Cn(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function Ln(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function kn(t,e){return"string"==typeof t?0<=t.lastIndexOf("%")?parseFloat(t)/100*e:parseFloat(t):t}function Pn(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function On(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function Nn(){}var En=new vi;function Rn(t){for(var e in ui.call(this,t=t||{}),t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new Li(t.style,this),this._rect=null,this.__clipPaths=null}function zn(t){Rn.call(this,t)}Rn.prototype={constructor:Rn,type:"displayable",__dirty:!0,invisible:!(Nn.prototype={constructor:Nn,drawRectText:function(t,e){var i=this.style;e=i.textRect||e,this.__dirty&&xn(i);var n=i.text;if(null!=n&&(n+=""),On(n,i)){t.save();var o=this.transform;i.transformText?this.setTransform(t):o&&(En.copy(e),En.applyTransform(o),e=En),wn(this,t,n,i,e,9),t.restore()}}}),z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,globalScaleRatio:1,beforeBrush:function(t){},afterBrush:function(t){},brush:function(t,e){},getBoundingRect:function(){},contain:function(t,e){return this.rectContain(t,e)},traverse:function(t,e){t.call(e,this)},rectContain:function(t,e){var i=this.transformCoordToLocal(t,e);return this.getBoundingRect().contain(i[0],i[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){"style"!==t?ui.prototype.attrKV.call(this,t,e):this.style.set(e)},setStyle:function(t,e){return this.style.set(t,e),this.dirty(!1),this},useStyle:function(t){return this.style=new Li(t,this),this.dirty(!1),this},calculateTextPosition:null},M(Rn,ui),I(Rn,Nn),zn.prototype={constructor:zn,type:"image",brush:function(t,e){var i=this.style,n=i.image;i.bind(t,this,e);var o=this._image=Hi(n,this._image,this,this.onload);if(o&&Ui(o)){var a=i.x||0,r=i.y||0,s=i.width,l=i.height,u=o.width/o.height;if(null==s&&null!=l?s=l*u:null==l&&null!=s?l=s/u:null==s&&null==l&&(s=o.width,l=o.height),this.setTransform(t),i.sWidth&&i.sHeight){var h=i.sx||0,c=i.sy||0;t.drawImage(o,h,c,i.sWidth,i.sHeight,a,r,s,l)}else if(i.sx&&i.sy){var d=s-(h=i.sx),f=l-(c=i.sy);t.drawImage(o,h,c,d,f,a,r,s,l)}else t.drawImage(o,a,r,s,l);null!=i.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))}},getBoundingRect:function(){var t=this.style;return this._rect||(this._rect=new vi(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},M(zn,Rn);var Bn=314159;function Vn(t){return parseInt(t,10)}var Gn=new vi(0,0,0,0),Fn=new vi(0,0,0,0);function Wn(t,e,i){this.type="canvas";var n=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=i=x({},i||{}),this.dpr=i.devicePixelRatio||ai,this._singleCanvas=n;var o=(this.root=t).style;o&&(o["-webkit-tap-highlight-color"]="transparent",o["-webkit-user-select"]=o["user-select"]=o["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var a=this._zlevelList=[],r=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,n){var s=t.width,l=t.height;null!=i.width&&(s=i.width),null!=i.height&&(l=i.height),this.dpr=i.devicePixelRatio||1,t.width=s*this.dpr,t.height=l*this.dpr,this._width=s,this._height=l;var u=new Vi(t,this,this.dpr);u.__builtin__=!0,u.initContext(),(r[Bn]=u).zlevel=Bn,a.push(Bn),this._domRoot=t}else{this._width=this._getSize(0),this._height=this._getSize(1);var h=this._domRoot=function(t,e){var i=document.createElement("div");return i.style.cssText=["position:relative","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",i}(this._width,this._height);t.appendChild(h)}this._hoverlayer=null,this._hoverElements=[]}function Hn(t){this.stage=(t=t||{}).stage||{},this.onframe=t.onframe||function(){},this._clips=[],this._running=!1,this._paused=!1,At.call(this)}Wn.prototype={constructor:Wn,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(t){var e=this.storage.getDisplayList(!0),i=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,t,this._redrawId);for(var n=0;n<i.length;n++){var o=this._layers[i[n]];!o.__builtin__&&o.refresh&&o.refresh(0===n?this._backgroundColor:null)}return this.refreshHover(),this},addHover:function(t,e){if(!t.__hoverMir){var i=new t.constructor({style:t.style,shape:t.shape,z:t.z,z2:t.z2,silent:t.silent});return(i.__from=t).__hoverMir=i,e&&i.setStyle(e),this._hoverElements.push(i),i}},removeHover:function(t){var e=this._hoverElements,i=S(e,t.__hoverMir);0<=i&&e.splice(i,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,i=0;i<e.length;i++){var n=e[i].__from;n&&(n.__hoverMir=null)}e.length=0},refreshHover:function(){var t=this._hoverElements,e=t.length,i=this._hoverlayer;if(i&&i.clear(),e){Mi(t,this.storage.displayableSortFunc);var n={};(i=i||(this._hoverlayer=this.getLayer(1e5))).ctx.save();for(var o=0;o<e;){var a=t[o],r=a.__from;r&&r.__zr?(o++,r.invisible||(a.transform=r.transform,a.invTransform=r.invTransform,a.__clipPaths=r.__clipPaths,this._doPaintEl(a,i,!0,n))):(t.splice(o,1),r.__hoverMir=null,e--)}i.ctx.restore()}},getHoverLayer:function(){return this.getLayer(1e5)},_paintList:function(t,e,i){if(this._redrawId===i){e=e||!1,this._updateLayerStatus(t);var n=this._doPaintList(t,e);if(this._needsManuallyCompositing&&this._compositeManually(),!n){var o=this;Gi((function(){o._paintList(t,e,i)}))}}},_compositeManually:function(){var t=this.getLayer(Bn).ctx,e=this._domRoot.width,i=this._domRoot.height;t.clearRect(0,0,e,i),this.eachBuiltinLayer((function(n){n.virtual&&t.drawImage(n.dom,0,0,e,i)}))},_doPaintList:function(t,e){for(var i=[],n=0;n<this._zlevelList.length;n++)(s=this._layers[this._zlevelList[n]]).__builtin__&&s!==this._hoverlayer&&(s.__dirty||e)&&i.push(s);for(var a=!0,r=0;r<i.length;r++){var s,l=(s=i[r]).ctx,u={};l.save();var h=e?s.__startIndex:s.__drawIndex,c=!e&&s.incremental&&Date.now,d=c&&Date.now(),f=s.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(s.__startIndex===s.__endIndex)s.clear(!1,f);else if(h===s.__startIndex){var p=t[h];p.incremental&&p.notClear&&!e||s.clear(!1,f)}-1===h&&(console.error("For some unknown reason. drawIndex is -1"),h=s.__startIndex);for(var g=h;g<s.__endIndex;g++){var m=t[g];if(this._doPaintEl(m,s,e,u),m.__dirty=m.__dirtyText=!1,c&&15<Date.now()-d)break}s.__drawIndex=g,s.__drawIndex<s.__endIndex&&(a=!1),u.prevElClipPaths&&l.restore(),l.restore()}return o.wxa&&A(this._layers,(function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()})),a},_doPaintEl:function(t,e,i,n){var o=e.ctx,a=t.transform;if((e.__dirty||i)&&!t.invisible&&0!==t.style.opacity&&(!a||a[0]||a[3])&&(!t.culling||!function(t,e,i){return Gn.copy(t.getBoundingRect()),t.transform&&Gn.applyTransform(t.transform),Fn.width=e,Fn.height=i,!Gn.intersect(Fn)}(t,this._width,this._height))){var r=t.__clipPaths,s=n.prevElClipPaths;s&&!function(t,e){if(t===e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i<t.length;i++)if(t[i]!==e[i])return!0;return!1}(r,s)||(s&&(o.restore(),n.prevElClipPaths=null,n.prevEl=null),r&&(o.save(),function(t,e){for(var i=0;i<t.length;i++){var n=t[i];n.setTransform(e),e.beginPath(),n.buildPath(e,n.shape),e.clip(),n.restoreTransform(e)}}(r,o),n.prevElClipPaths=r)),t.beforeBrush&&t.beforeBrush(o),t.brush(o,n.prevEl||null),(n.prevEl=t).afterBrush&&t.afterBrush(o)}},getLayer:function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=Bn);var i=this._layers[t];return i||((i=new Vi("zr_"+t,this,this.dpr)).zlevel=t,i.__builtin__=!0,this._layerConfig[t]&&v(i,this._layerConfig[t],!0),e&&(i.virtual=e),this.insertLayer(t,i),i.initContext()),i},insertLayer:function(t,e){var i=this._layers,n=this._zlevelList,o=n.length,a=null,r=-1,s=this._domRoot;if(i[t]);else if(function(t){return!!t&&(!!t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh)}(e)){if(0<o&&t>n[0]){for(r=0;r<o-1&&!(n[r]<t&&n[r+1]>t);r++);a=i[n[r]]}if(n.splice(r+1,0,t),!(i[t]=e).virtual)if(a){var l=a.dom;l.nextSibling?s.insertBefore(e.dom,l.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}},eachLayer:function(t,e){var i,n,o=this._zlevelList;for(n=0;n<o.length;n++)t.call(e,this._layers[i=o[n]],i)},eachBuiltinLayer:function(t,e){var i,n,o,a=this._zlevelList;for(o=0;o<a.length;o++)(i=this._layers[n=a[o]]).__builtin__&&t.call(e,i,n)},eachOtherLayer:function(t,e){var i,n,o,a=this._zlevelList;for(o=0;o<a.length;o++)(i=this._layers[n=a[o]]).__builtin__||t.call(e,i,n)},getLayers:function(){return this._layers},_updateLayerStatus:function(t){function e(t){n&&(n.__endIndex!==t&&(n.__dirty=!0),n.__endIndex=t)}if(this.eachBuiltinLayer((function(t,e){t.__dirty=t.__used=!1})),this._singleCanvas)for(var i=1;i<t.length;i++)if((a=t[i]).zlevel!==t[i-1].zlevel||a.incremental){this._needsManuallyCompositing=!0;break}var n=null,o=0;for(i=0;i<t.length;i++){var a,r,s=(a=t[i]).zlevel;a.incremental?((r=this.getLayer(s+.001,this._needsManuallyCompositing)).incremental=!0,o=1):r=this.getLayer(s+(0<o?.01:0),this._needsManuallyCompositing),r!==n&&(r.__used=!0,r.__startIndex!==i&&(r.__dirty=!0),r.__startIndex=i,r.__drawIndex=r.incremental?-1:i,e(i),n=r),a.__dirty&&(r.__dirty=!0,r.incremental&&r.__drawIndex<0&&(r.__drawIndex=i))}e(i),this.eachBuiltinLayer((function(t,e){!t.__used&&0<t.getElementCount()&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)}))},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},setBackgroundColor:function(t){this._backgroundColor=t},configLayer:function(t,e){if(e){var i=this._layerConfig;i[t]?v(i[t],e,!0):i[t]=e;for(var n=0;n<this._zlevelList.length;n++){var o=this._zlevelList[n];o!==t&&o!==t+.01||v(this._layers[o],i[t],!0)}}},delLayer:function(t){var e=this._layers,i=this._zlevelList,n=e[t];n&&(n.dom.parentNode.removeChild(n.dom),delete e[t],i.splice(S(i,t),1))},resize:function(t,e){if(this._domRoot.style){var i=this._domRoot;i.style.display="none";var n=this._opts;if(null!=t&&(n.width=t),null!=e&&(n.height=e),t=this._getSize(0),e=this._getSize(1),i.style.display="",this._width!==t||e!==this._height){for(var o in i.style.width=t+"px",i.style.height=e+"px",this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(t,e);A(this._progressiveLayers,(function(i){i.resize(t,e)})),this.refresh(!0)}this._width=t,this._height=e}else{if(null==t||null==e)return;this._width=t,this._height=e,this.getLayer(Bn).resize(t,e)}return this},clearLayer:function(t){var e=this._layers[t];e&&e.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(t){if(this._singleCanvas&&!this._compositeManually)return this._layers[Bn].dom;var e=new Vi("image",this,(t=t||{}).pixelRatio||this.dpr);if(e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor),t.pixelRatio<=this.dpr){this.refresh();var i=e.dom.width,n=e.dom.height,o=e.ctx;this.eachLayer((function(t){t.__builtin__?o.drawImage(t.dom,0,0,i,n):t.renderToCanvas&&(e.ctx.save(),t.renderToCanvas(e.ctx),e.ctx.restore())}))}else for(var a={},r=this.storage.getDisplayList(!0),s=0;s<r.length;s++)this._doPaintEl(r[s],e,!0,a);return e.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,i=["width","height"][t],n=["clientWidth","clientHeight"][t],o=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var r=this.root,s=document.defaultView.getComputedStyle(r);return(r[n]||Vn(s[i])||Vn(r.style[i]))-(Vn(s[o])||0)-(Vn(s[a])||0)|0},pathToImage:function(t,e){e=e||this.dpr;var i=document.createElement("canvas"),n=i.getContext("2d"),o=t.getBoundingRect(),a=t.style,r=a.shadowBlur*e,s=a.shadowOffsetX*e,l=a.shadowOffsetY*e,u=a.hasStroke()?a.lineWidth:0,h=Math.max(u/2,r-s),c=Math.max(u/2,s+r),d=Math.max(u/2,r-l),f=Math.max(u/2,l+r),p=o.width+h+c,g=o.height+d+f;i.width=p*e,i.height=g*e,n.scale(e,e),n.clearRect(0,0,p,g),n.dpr=e;var m={position:t.position,rotation:t.rotation,scale:t.scale};t.position=[h-o.x,d-o.y],t.rotation=0,t.scale=[1,1],t.updateTransform(),t&&t.brush(n);var v=new zn({style:{x:0,y:0,image:i}});return null!=m.position&&(v.position=t.position=m.position),null!=m.rotation&&(v.rotation=t.rotation=m.rotation),null!=m.scale&&(v.scale=t.scale=m.scale),v}},Hn.prototype={constructor:Hn,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),i=0;i<e.length;i++)this.addClip(e[i])},removeClip:function(t){var e=S(this._clips,t);0<=e&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;i<e.length;i++)this.removeClip(e[i]);t.animation=null},_update:function(){for(var t=(new Date).getTime()-this._pausedTime,e=t-this._time,i=this._clips,n=i.length,o=[],a=[],r=0;r<n;r++){var s=i[r],l=s.step(t,e);l&&(o.push(l),a.push(s))}for(r=0;r<n;)i[r]._needsRemove?(i[r]=i[n-1],i.pop(),n--):r++;for(n=o.length,r=0;r<n;r++)a[r].fire(o[r]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){var t=this;this._running=!0,Gi((function e(){t._running&&(Gi(e),t._paused||t._update())}))},start:function(){this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},clear:function(){this._clips=[]},isFinished:function(){return!this._clips.length},animate:function(t,e){var i=new ni(t,(e=e||{}).loop,e.getter,e.setter);return this.addAnimator(i),i}},I(Hn,At);var Zn,Un,Xn=o.domSupported,Yn=(Un={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:Zn=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:D(Zn,(function(t){var e=t.replace("mouse","pointer");return Un.hasOwnProperty(e)?e:t}))}),jn=["mousemove","mouseup"],qn=["pointermove","pointerup"];function Kn(t){return"mousewheel"===t&&o.browser.firefox?"DOMMouseScroll":t}function $n(t){var e=t.pointerType;return"pen"===e||"touch"===e}function Jn(t){t&&(t.zrByTouch=!0)}function Qn(t,e){for(var i=!1;(e=e&&e.parentNode)&&9!==e.nodeType&&!(i=e===t.painterRoot););return i}function to(t,e){this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}var eo=to.prototype;eo.stopPropagation=eo.stopImmediatePropagation=eo.preventDefault=et;var io={mousedown:function(t){t=Bt(this.dom,t),this._mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=Bt(this.dom,t);var e=this._mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||ro(this,!0),this.trigger("mousemove",t)},mouseup:function(t){t=Bt(this.dom,t),ro(this,!1),this.trigger("mouseup",t)},mouseout:function(t){t=Bt(this.dom,t),this._pointerCapturing&&(t.zrEventControl="no_globalout"),t.zrIsToLocalDOM=Qn(this,t.toElement||t.relatedTarget),this.trigger("mouseout",t)},touchstart:function(t){Jn(t=Bt(this.dom,t)),this._lastTouchMoment=new Date,this.handler.processGesture(t,"start"),io.mousemove.call(this,t),io.mousedown.call(this,t)},touchmove:function(t){Jn(t=Bt(this.dom,t)),this.handler.processGesture(t,"change"),io.mousemove.call(this,t)},touchend:function(t){Jn(t=Bt(this.dom,t)),this.handler.processGesture(t,"end"),io.mouseup.call(this,t),+new Date-this._lastTouchMoment<300&&io.click.call(this,t)},pointerdown:function(t){io.mousedown.call(this,t)},pointermove:function(t){$n(t)||io.mousemove.call(this,t)},pointerup:function(t){io.mouseup.call(this,t)},pointerout:function(t){$n(t)||io.mouseout.call(this,t)}};A(["click","mousewheel","dblclick","contextmenu"],(function(t){io[t]=function(e){e=Bt(this.dom,e),this.trigger(t,e)}}));var no={pointermove:function(t){$n(t)||no.mousemove.call(this,t)},pointerup:function(t){no.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this._pointerCapturing;ro(this,!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function oo(t,e,i,n){t.mounted[e]=i,t.listenerOpts[e]=n,Vt(t.domTarget,Kn(e),i,n)}function ao(t){var e,i,n,o=t.mounted;for(var a in o)o.hasOwnProperty(a)&&(e=t.domTarget,i=Kn(a),n=o[a],kt?e.removeEventListener(i,n,t.listenerOpts[a]):e.detachEvent("on"+i,n));t.mounted={}}function ro(t,e){if(t._mayPointerCapture=null,Xn&&t._pointerCapturing^e){t._pointerCapturing=e;var i=t._globalHandlerScope;e?function(t,e){function i(i){oo(e,i,(function(n){n=zt(n),Qn(t,n.target)||(n=function(t,e){return Bt(t.dom,new to(t,e),!0)}(t,n),e.domHandlers[i].call(t,n))}),{capture:!0})}o.pointerEventsSupported?A(qn,i):o.touchEventsSupported||A(jn,i)}(t,i):ao(i)}}function so(t,e){this.domTarget=t,this.domHandlers=e,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function lo(t,e){At.call(this),this.dom=t,this.painterRoot=e,this._localHandlerScope=new so(t,io),Xn&&(this._globalHandlerScope=new so(document,no)),this._pointerCapturing=!1,this._mayPointerCapture=null,function(t,e){var i=e.domHandlers;o.pointerEventsSupported?A(Yn.pointer,(function(n){oo(e,n,(function(e){i[n].call(t,e)}))})):(o.touchEventsSupported&&A(Yn.touch,(function(n){oo(e,n,(function(o){i[n].call(t,o),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)}))})),A(Yn.mouse,(function(n){oo(e,n,(function(o){o=zt(o),e.touching||i[n].call(t,o)}))})))}(this,this._localHandlerScope)}var uo=lo.prototype;uo.dispose=function(){ao(this._localHandlerScope),Xn&&ao(this._globalHandlerScope)},uo.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},I(lo,At);var ho=!o.canvasSupported,co={canvas:Wn},fo={};function po(t,e){var i=new mo(n(),t,e);return fo[i.id]=i}function go(t,e){co[t]=e}var mo=function(t,e,i){i=i||{},this.dom=e,this.id=t;var n=this,a=new Ti,r=i.renderer;if(ho){if(!co.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");r="vml"}else r&&co[r]||(r="canvas");var s=new co[r](e,a,i,t);this.storage=a,this.painter=s;var l=o.node||o.worker?null:new lo(s.getViewportRoot(),s.root);this.handler=new Yt(a,s,l,s.root),this.animation=new Hn({stage:{update:P(this.flush,this)}}),this.animation.start();var u=a.delFromStorage,h=a.addToStorage;a.delFromStorage=function(t){u.call(a,t),t&&t.removeSelfFromZr(n)},a.addToStorage=function(t){h.call(a,t),t.addSelfToZr(n)}};mo.prototype={constructor:mo,getId:function(){return this.id},add:function(t){this.storage.addRoot(t),this._needsRefresh=!0},remove:function(t){this.storage.delRoot(t),this._needsRefresh=!0},configLayer:function(t,e){this.painter.configLayer&&this.painter.configLayer(t,e),this._needsRefresh=!0},setBackgroundColor:function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh(),this._needsRefresh=this._needsRefreshHover=!1},refresh:function(){this._needsRefresh=!0},flush:function(){var t;this._needsRefresh&&(t=!0,this.refreshImmediately()),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately()),t&&this.trigger("rendered")},addHover:function(t,e){if(this.painter.addHover){var i=this.painter.addHover(t,e);return this.refreshHover(),i}},removeHover:function(t){this.painter.removeHover&&(this.painter.removeHover(t),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},resize:function(t){this.painter.resize((t=t||{}).width,t.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(t,e){return this.painter.pathToImage(t,e)},setCursorStyle:function(t){this.handler.setCursorStyle(t)},findHover:function(t,e){return this.handler.findHover(t,e)},on:function(t,e,i){this.handler.on(t,e,i)},off:function(t,e){this.handler.off(t,e)},trigger:function(t,e){this.handler.trigger(t,e)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,function(t){delete fo[t]}(this.id)}};var vo=(Object.freeze||Object)({version:"4.2.0",init:po,dispose:function(t){if(t)t.dispose();else{for(var e in fo)fo.hasOwnProperty(e)&&fo[e].dispose();fo={}}return this},getInstance:function(t){return fo[t]},registerPainter:go}),yo=A,xo=z,_o=N,wo="series\0";function bo(t){return t instanceof Array?t:null==t?[]:[t]}function So(t,e,i){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var n=0,o=i.length;n<o;n++){var a=i[n];!t.emphasis[e].hasOwnProperty(a)&&t[e].hasOwnProperty(a)&&(t.emphasis[e][a]=t[e][a])}}}var Mo=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function Io(t){return!xo(t)||_o(t)||t instanceof Date?t:t.value}function To(t,e){e=(e||[]).slice();var i=D(t||[],(function(t,e){return{exist:t}}));return yo(e,(function(t,n){if(xo(t)){for(var o=0;o<i.length;o++)if(!i[o].option&&null!=t.id&&i[o].exist.id===t.id+"")return i[o].option=t,void(e[n]=null);for(o=0;o<i.length;o++){var a=i[o].exist;if(!(i[o].option||null!=a.id&&null!=t.id||null==t.name||Co(t)||Co(a)||a.name!==t.name+""))return i[o].option=t,void(e[n]=null)}}})),yo(e,(function(t,e){if(xo(t)){for(var n=0;n<i.length;n++)if(!i[n].option&&!Co(i[n].exist)&&null==t.id){i[n].option=t;break}n>=i.length&&i.push({option:t})}})),i}function Ao(t){var e=Q();yo(t,(function(t,i){var n=t.exist;n&&e.set(n.id,t)})),yo(t,(function(t,i){var n=t.option;Y(!n||null==n.id||!e.get(n.id)||e.get(n.id)===t,"id duplicates: "+(n&&n.id)),n&&null!=n.id&&e.set(n.id,t),t.keyInfo||(t.keyInfo={})})),yo(t,(function(t,i){var n=t.exist,o=t.option,a=t.keyInfo;if(xo(o)){if(a.name=null!=o.name?o.name+"":n?n.name:wo+i,n)a.id=n.id;else if(null!=o.id)a.id=o.id+"";else for(var r=0;a.id="\0"+a.name+"\0"+r++,e.get(a.id););e.set(a.id,t)}}))}function Do(t){var e=t.name;return!(!e||!e.indexOf(wo))}function Co(t){return xo(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}function Lo(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?N(e.dataIndex)?D(e.dataIndex,(function(e){return t.indexOfRawIndex(e)})):t.indexOfRawIndex(e.dataIndex):null!=e.name?N(e.name)?D(e.name,(function(e){return t.indexOfName(e)})):t.indexOfName(e.name):void 0}function ko(){var t="__\0ec_inner_"+Po+++"_"+Math.random().toFixed(5);return function(e){return e[t]||(e[t]={})}}var Po=0;function Oo(t,e,i){if(R(e)){var n={};n[e+"Index"]=0,e=n}var o=i&&i.defaultMainType;!o||No(e,o+"Index")||No(e,o+"Id")||No(e,o+"Name")||(e[o+"Index"]=0);var a={};return yo(e,(function(n,o){if(n=e[o],"dataIndex"!==o&&"dataIndexInside"!==o){var r=o.match(/^(\w+)(Index|Id|Name)$/)||[],s=r[1],l=(r[2]||"").toLowerCase();if(!(!s||!l||null==n||"index"===l&&"none"===n||i&&i.includeMainTypes&&S(i.includeMainTypes,s)<0)){var u={mainType:s};"index"===l&&"all"===n||(u[l]=n);var h=t.queryComponents(u);a[s+"Models"]=h,a[s+"Model"]=h[0]}}else a[o]=n})),a}function No(t,e){return t&&t.hasOwnProperty(e)}function Eo(t,e,i){t.setAttribute?t.setAttribute(e,i):t[e]=i}function Ro(t){return"auto"===t?o.domSupported?"html":"richText":t||"html"}function zo(t,e){var i=Q(),n=[];return A(t,(function(t){var o=e(t);(i.get(o)||(n.push(o),i.set(o,[]))).push(t)})),{keys:n,buckets:i}}var Bo="___EC__COMPONENT__CONTAINER___";function Vo(t){var e={main:"",sub:""};return t&&(t=t.split("."),e.main=t[0]||"",e.sub=t[1]||""),e}function Go(t){(t.$constructor=t).extend=function(t){function e(){t.$constructor?t.$constructor.apply(this,arguments):i.apply(this,arguments)}var i=this;return x(e.prototype,t),e.extend=this.extend,e.superCall=Ho,e.superApply=Zo,M(e,this),e.superClass=i,e}}var Fo=0;function Wo(t){var e=["__\0is_clz",Fo++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function Ho(t,e){var i=U(arguments,2);return this.superClass.prototype[e].apply(t,i)}function Zo(t,e,i){return this.superClass.prototype[e].apply(t,i)}function Uo(t,e){e=e||{};var i={};if(t.registerClass=function(t,e){return e&&(function(t){Y(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}(e),(e=Vo(e)).sub?e.sub!==Bo&&((function(t){var e=i[t.main];return e&&e[Bo]||((e=i[t.main]={})[Bo]=!0),e}(e))[e.sub]=t):i[e.main]=t),t},t.getClass=function(t,e,n){var o=i[t];if(o&&o[Bo]&&(o=e?o[e]:null),n&&!o)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return o},t.getClassesByMainType=function(t){t=Vo(t);var e=[],n=i[t.main];return n&&n[Bo]?A(n,(function(t,i){i!==Bo&&e.push(t)})):e.push(n),e},t.hasClass=function(t){return t=Vo(t),!!i[t.main]},t.getAllClassMainTypes=function(){var t=[];return A(i,(function(e,i){t.push(i)})),t},t.hasSubTypes=function(t){t=Vo(t);var e=i[t.main];return e&&e[Bo]},t.parseClassType=Vo,e.registerWhenExtend){var n=t.extend;n&&(t.extend=function(e){var i=n.call(this,e);return t.registerClass(i,e.type)})}return t}function Xo(t){for(var e=0;e<t.length;e++)t[e][1]||(t[e][1]=t[e][0]);return function(e,i,n){for(var o={},a=0;a<t.length;a++){var r=t[a][1];if(!(i&&0<=S(i,r)||n&&S(n,r)<0)){var s=e.getShallow(r);null!=s&&(o[t[a][0]]=s)}}return o}}var Yo=Xo([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),jo={getLineStyle:function(t){var e=Yo(this,t);return e.lineDash=this.getLineDash(e.lineWidth),e},getLineDash:function(t){null==t&&(t=1);var e=this.get("type"),i=Math.max(t,2),n=4*t;return"solid"!==e&&null!=e&&("dashed"===e?[n,n]:[i,i])}},qo=Xo([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Ko={getAreaStyle:function(t,e){return qo(this,t,e)}},$o=Math.pow,Jo=Math.sqrt,Qo=Jo(3),ta=ot(),ea=ot(),ia=ot();function na(t){return-1e-8<t&&t<1e-8}function oa(t){return 1e-8<t||t<-1e-8}function aa(t,e,i,n,o){var a=1-o;return a*a*(a*t+3*o*e)+o*o*(o*n+3*a*i)}function ra(t,e,i,n,o){var a=1-o;return 3*(((e-t)*a+2*(i-e)*o)*a+(n-i)*o*o)}function sa(t,e,i,n,o){var a=6*i-12*e+6*t,r=9*e+3*n-3*t-9*i,s=3*e-3*t,l=0;if(na(r))oa(a)&&0<=(h=-s/a)&&h<=1&&(o[l++]=h);else{var u=a*a-4*r*s;if(na(u))o[0]=-a/(2*r);else if(0<u){var h,c=Jo(u),d=(-a-c)/(2*r);0<=(h=(-a+c)/(2*r))&&h<=1&&(o[l++]=h),0<=d&&d<=1&&(o[l++]=d)}}return l}function la(t,e,i,n,o,a){var r=(e-t)*o+t,s=(i-e)*o+e,l=(n-i)*o+i,u=(s-r)*o+r,h=(l-s)*o+s,c=(h-u)*o+u;a[0]=t,a[1]=r,a[2]=u,a[3]=c,a[4]=c,a[5]=h,a[6]=l,a[7]=n}function ua(t,e,i,n){var o=1-n;return o*(o*t+2*n*e)+n*n*i}function ha(t,e,i,n){return 2*((1-n)*(e-t)+n*(i-e))}function ca(t,e,i){var n=t+i-2*e;return 0==n?.5:(t-e)/n}function da(t,e,i,n,o){var a=(e-t)*n+t,r=(i-e)*n+e,s=(r-a)*n+a;o[0]=t,o[1]=a,o[2]=s,o[3]=s,o[4]=r,o[5]=i}var fa=Math.min,pa=Math.max,ga=Math.sin,ma=Math.cos,va=2*Math.PI,ya=ot(),xa=ot(),_a=ot();function wa(t,e,i){if(0!==t.length){var n,o=t[0],a=o[0],r=o[0],s=o[1],l=o[1];for(n=1;n<t.length;n++)a=fa(a,(o=t[n])[0]),r=pa(r,o[0]),s=fa(s,o[1]),l=pa(l,o[1]);e[0]=a,e[1]=s,i[0]=r,i[1]=l}}function ba(t,e,i,n,o,a){o[0]=fa(t,i),o[1]=fa(e,n),a[0]=pa(t,i),a[1]=pa(e,n)}var Sa=[],Ma=[];function Ia(t,e,i,n,o,a,r,s,l,u){var h,c=sa,d=aa,f=c(t,i,o,r,Sa);for(l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0,h=0;h<f;h++){var p=d(t,i,o,r,Sa[h]);l[0]=fa(p,l[0]),u[0]=pa(p,u[0])}for(f=c(e,n,a,s,Ma),h=0;h<f;h++){var g=d(e,n,a,s,Ma[h]);l[1]=fa(g,l[1]),u[1]=pa(g,u[1])}l[0]=fa(t,l[0]),u[0]=pa(t,u[0]),l[0]=fa(r,l[0]),u[0]=pa(r,u[0]),l[1]=fa(e,l[1]),u[1]=pa(e,u[1]),l[1]=fa(s,l[1]),u[1]=pa(s,u[1])}function Ta(t,e,i,n,o,a,r,s,l){var u=wt,h=bt,c=Math.abs(o-a);if(c%va<1e-4&&1e-4<c)return s[0]=t-i,s[1]=e-n,l[0]=t+i,void(l[1]=e+n);if(ya[0]=ma(o)*i+t,ya[1]=ga(o)*n+e,xa[0]=ma(a)*i+t,xa[1]=ga(a)*n+e,u(s,ya,xa),h(l,ya,xa),(o%=va)<0&&(o+=va),(a%=va)<0&&(a+=va),a<o&&!r?a+=va:o<a&&r&&(o+=va),r){var d=a;a=o,o=d}for(var f=0;f<a;f+=Math.PI/2)o<f&&(_a[0]=ma(f)*i+t,_a[1]=ga(f)*n+e,u(s,_a,s),h(l,_a,l))}var Aa={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Da=[],Ca=[],La=[],ka=[],Pa=Math.min,Oa=Math.max,Na=Math.cos,Ea=Math.sin,Ra=Math.sqrt,za=Math.abs,Ba="undefined"!=typeof Float32Array,Va=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};function Ga(t,e,i,n,o,a,r){if(0===o)return!1;var s,l=o;if(e+l<r&&n+l<r||r<e-l&&r<n-l||t+l<a&&i+l<a||a<t-l&&a<i-l)return!1;if(t===i)return Math.abs(a-t)<=l/2;var u=(s=(e-n)/(t-i))*a-r+(t*n-i*e)/(t-i);return u*u/(s*s+1)<=l/2*l/2}function Fa(t,e,i,n,o,a,r,s,l,u,h){if(0===l)return!1;var c=l;return!(e+c<h&&n+c<h&&a+c<h&&s+c<h||h<e-c&&h<n-c&&h<a-c&&h<s-c||t+c<u&&i+c<u&&o+c<u&&r+c<u||u<t-c&&u<i-c&&u<o-c&&u<r-c)&&function(t,e,i,n,o,a,r,s,l,u,h){var c,d,f,p,g,m=.005,v=1/0;ta[0]=l,ta[1]=u;for(var y=0;y<1;y+=.05)ea[0]=aa(t,i,o,r,y),ea[1]=aa(e,n,a,s,y),(p=yt(ta,ea))<v&&(c=y,v=p);v=1/0;for(var x=0;x<32&&!(m<1e-4);x++)f=c+m,ea[0]=aa(t,i,o,r,d=c-m),ea[1]=aa(e,n,a,s,d),p=yt(ea,ta),0<=d&&p<v?(c=d,v=p):(ia[0]=aa(t,i,o,r,f),ia[1]=aa(e,n,a,s,f),g=yt(ia,ta),f<=1&&g<v?(c=f,v=g):m*=.5);return Jo(v)}(t,e,i,n,o,a,r,s,u,h)<=c/2}function Wa(t,e,i,n,o,a,r,s,l){if(0===r)return!1;var u=r;return!(e+u<l&&n+u<l&&a+u<l||l<e-u&&l<n-u&&l<a-u||t+u<s&&i+u<s&&o+u<s||s<t-u&&s<i-u&&s<o-u)&&function(t,e,i,n,o,a,r,s,l){var u,h=.005,c=1/0;ta[0]=r,ta[1]=s;for(var d=0;d<1;d+=.05)ea[0]=ua(t,i,o,d),ea[1]=ua(e,n,a,d),(m=yt(ta,ea))<c&&(u=d,c=m);c=1/0;for(var f=0;f<32&&!(h<1e-4);f++){var p=u-h,g=u+h;ea[0]=ua(t,i,o,p),ea[1]=ua(e,n,a,p);var m=yt(ea,ta);if(0<=p&&m<c)u=p,c=m;else{ia[0]=ua(t,i,o,g),ia[1]=ua(e,n,a,g);var v=yt(ia,ta);g<=1&&v<c?(u=g,c=v):h*=.5}}return Jo(c)}(t,e,i,n,o,a,s,l)<=u/2}Va.prototype={constructor:Va,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e,i){this._ux=za((i=i||0)/ai/t)||0,this._uy=za(i/ai/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return(this._ctx=t)&&t.beginPath(),t&&(this.dpr=t.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(t,e){return this.addData(Aa.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var i=za(t-this._xi)>this._ux||za(e-this._yi)>this._uy||this._len<5;return this.addData(Aa.L,t,e),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),i&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,i,n,o,a){return this.addData(Aa.C,t,e,i,n,o,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,o,a):this._ctx.bezierCurveTo(t,e,i,n,o,a)),this._xi=o,this._yi=a,this},quadraticCurveTo:function(t,e,i,n){return this.addData(Aa.Q,t,e,i,n),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,i,n):this._ctx.quadraticCurveTo(t,e,i,n)),this._xi=i,this._yi=n,this},arc:function(t,e,i,n,o,a){return this.addData(Aa.A,t,e,i,i,n,o-n,0,a?0:1),this._ctx&&this._ctx.arc(t,e,i,n,o,a),this._xi=Na(o)*i+t,this._yi=Ea(o)*i+e,this},arcTo:function(t,e,i,n,o){return this._ctx&&this._ctx.arcTo(t,e,i,n,o),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData(Aa.R,t,e,i,n),this},closePath:function(){this.addData(Aa.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,i),t.closePath()),this._xi=e,this._yi=i,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t;for(var e=this._dashIdx=0,i=0;i<t.length;i++)e+=t[i];this._dashSum=e}return this},setLineDashOffset:function(t){return this._dashOffset=t,this},len:function(){return this._len},setData:function(t){var e=t.length;this.data&&this.data.length===e||!Ba||(this.data=new Float32Array(e));for(var i=0;i<e;i++)this.data[i]=t[i];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,i=0,n=this._len,o=0;o<e;o++)i+=t[o].len();for(Ba&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i)),o=0;o<e;o++)for(var a=t[o].data,r=0;r<a.length;r++)this.data[n++]=a[r];this._len=n},addData:function(t){if(this._saveData){var e=this.data;this._len+arguments.length>e.length&&(this._expandData(),e=this.data);for(var i=0;i<arguments.length;i++)e[this._len++]=arguments[i];this._prevCmd=t}},_expandData:function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(t,e){var i,n,o=this._dashSum,a=this._dashOffset,r=this._lineDash,s=this._ctx,l=this._xi,u=this._yi,h=t-l,c=e-u,d=Ra(h*h+c*c),f=l,p=u,g=r.length;for(a<0&&(a=o+a),f-=(a%=o)*(h/=d),p-=a*(c/=d);0<h&&f<=t||h<0&&t<=f||0===h&&(0<c&&p<=e||c<0&&e<=p);)f+=h*(i=r[n=this._dashIdx]),p+=c*i,this._dashIdx=(n+1)%g,0<h&&f<l||h<0&&l<f||0<c&&p<u||c<0&&u<p||s[n%2?"moveTo":"lineTo"](0<=h?Pa(f,t):Oa(f,t),0<=c?Pa(p,e):Oa(p,e));this._dashOffset=-Ra((h=f-t)*h+(c=p-e)*c)},_dashedBezierTo:function(t,e,i,n,o,a){var r,s,l,u,h,c=this._dashSum,d=this._dashOffset,f=this._lineDash,p=this._ctx,g=this._xi,m=this._yi,v=aa,y=0,x=this._dashIdx,_=f.length,w=0;for(d<0&&(d=c+d),d%=c,r=0;r<1;r+=.1)s=v(g,t,i,o,r+.1)-v(g,t,i,o,r),l=v(m,e,n,a,r+.1)-v(m,e,n,a,r),y+=Ra(s*s+l*l);for(;x<_&&!(d<(w+=f[x]));x++);for(r=(w-d)/y;r<=1;)u=v(g,t,i,o,r),h=v(m,e,n,a,r),x%2?p.moveTo(u,h):p.lineTo(u,h),r+=f[x]/y,x=(x+1)%_;x%2!=0&&p.lineTo(o,a),this._dashOffset=-Ra((s=o-u)*s+(l=a-h)*l)},_dashedQuadraticTo:function(t,e,i,n){var o=i,a=n;i=(i+2*t)/3,n=(n+2*e)/3,this._dashedBezierTo(t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,i,n,o,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,Ba&&(this.data=new Float32Array(t)))},getBoundingRect:function(){Da[0]=Da[1]=La[0]=La[1]=Number.MAX_VALUE,Ca[0]=Ca[1]=ka[0]=ka[1]=-Number.MAX_VALUE;for(var t,e,i,n,o,a,r,s,l,u,h,c,d,f,p=this.data,g=0,m=0,v=0,y=0,x=0;x<p.length;){var _=p[x++];switch(1===x&&(v=g=p[x],y=m=p[x+1]),_){case Aa.M:g=v=p[x++],m=y=p[x++],La[0]=v,La[1]=y,ka[0]=v,ka[1]=y;break;case Aa.L:ba(g,m,p[x],p[x+1],La,ka),g=p[x++],m=p[x++];break;case Aa.C:Ia(g,m,p[x++],p[x++],p[x++],p[x++],p[x],p[x+1],La,ka),g=p[x++],m=p[x++];break;case Aa.Q:e=m,i=p[x++],n=p[x++],a=p[x+1],r=La,s=ka,u=l=void 0,u=ua,h=pa(fa((l=ca)(t=g,i,o=p[x]),1),0),c=pa(fa(l(e,n,a),1),0),d=u(t,i,o,h),f=u(e,n,a,c),r[0]=fa(t,o,d),r[1]=fa(e,a,f),s[0]=pa(t,o,d),s[1]=pa(e,a,f),g=p[x++],m=p[x++];break;case Aa.A:var w=p[x++],b=p[x++],S=p[x++],M=p[x++],I=p[x++],T=p[x++]+I;x+=1;var A=1-p[x++];1===x&&(v=Na(I)*S+w,y=Ea(I)*M+b),Ta(w,b,S,M,I,T,A,La,ka),g=Na(T)*S+w,m=Ea(T)*M+b;break;case Aa.R:ba(v=g=p[x++],y=m=p[x++],v+p[x++],y+p[x++],La,ka);break;case Aa.Z:g=v,m=y}wt(Da,Da,La),bt(Ca,Ca,ka)}return 0===x&&(Da[0]=Da[1]=Ca[0]=Ca[1]=0),new vi(Da[0],Da[1],Ca[0]-Da[0],Ca[1]-Da[1])},rebuildPath:function(t){for(var e,i,n,o,a,r,s=this.data,l=this._ux,u=this._uy,h=this._len,c=0;c<h;){var d=s[c++];switch(1===c&&(e=n=s[c],i=o=s[c+1]),d){case Aa.M:e=n=s[c++],i=o=s[c++],t.moveTo(n,o);break;case Aa.L:a=s[c++],r=s[c++],(za(a-n)>l||za(r-o)>u||c===h-1)&&(t.lineTo(a,r),n=a,o=r);break;case Aa.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],o=s[c-1];break;case Aa.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],o=s[c-1];break;case Aa.A:var f=s[c++],p=s[c++],g=s[c++],m=s[c++],v=s[c++],y=s[c++],x=s[c++],_=s[c++],w=m<g?g:m,b=m<g?1:g/m,S=m<g?m/g:1,M=v+y;.001<Math.abs(g-m)?(t.translate(f,p),t.rotate(x),t.scale(b,S),t.arc(0,0,w,v,M,1-_),t.scale(1/b,1/S),t.rotate(-x),t.translate(-f,-p)):t.arc(f,p,w,v,M,1-_),1===c&&(e=Na(v)*g+f,i=Ea(v)*m+p),n=Na(M)*g+f,o=Ea(M)*m+p;break;case Aa.R:e=n=s[c],i=o=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case Aa.Z:t.closePath(),n=e,o=i}}}},Va.CMD=Aa;var Ha=2*Math.PI;function Za(t){return(t%=Ha)<0&&(t+=Ha),t}var Ua=2*Math.PI;function Xa(t,e,i,n,o,a,r,s,l){if(0===r)return!1;var u=r;s-=t,l-=e;var h=Math.sqrt(s*s+l*l);if(i<h-u||h+u<i)return!1;if(Math.abs(n-o)%Ua<1e-4)return!0;if(a){var c=n;n=Za(o),o=Za(c)}else n=Za(n),o=Za(o);o<n&&(o+=Ua);var d=Math.atan2(l,s);return d<0&&(d+=Ua),n<=d&&d<=o||n<=d+Ua&&d+Ua<=o}function Ya(t,e,i,n,o,a){if(e<a&&n<a||a<e&&a<n)return 0;if(n===e)return 0;var r=n<e?1:-1,s=(a-e)/(n-e);1!=s&&0!=s||(r=n<e?.5:-.5);var l=s*(i-t)+t;return l===o?1/0:o<l?r:0}var ja=Va.CMD,qa=2*Math.PI,Ka=[-1,-1,-1],$a=[-1,-1];function Ja(t,e,i,n,o,a,r,s,l,u){if(e<u&&n<u&&a<u&&s<u||u<e&&u<n&&u<a&&u<s)return 0;var h,c=function(t,e,i,n,o,a){var r=n+3*(e-i)-t,s=3*(i-2*e+t),l=3*(e-t),u=t-o,h=s*s-3*r*l,c=s*l-9*r*u,d=l*l-3*s*u,f=0;if(na(h)&&na(c))na(s)?a[0]=0:0<=(M=-l/s)&&M<=1&&(a[f++]=M);else{var p=c*c-4*h*d;if(na(p)){var g=c/h,m=-g/2;0<=(M=-s/r+g)&&M<=1&&(a[f++]=M),0<=m&&m<=1&&(a[f++]=m)}else if(0<p){var v=Jo(p),y=h*s+1.5*r*(-c+v),x=h*s+1.5*r*(-c-v);0<=(M=(-s-((y=y<0?-$o(-y,1/3):$o(y,1/3))+(x=x<0?-$o(-x,1/3):$o(x,1/3))))/(3*r))&&M<=1&&(a[f++]=M)}else{var _=(2*h*s-3*r*c)/(2*Jo(h*h*h)),w=Math.acos(_)/3,b=Jo(h),S=Math.cos(w),M=(-s-2*b*S)/(3*r),I=(m=(-s+b*(S+Qo*Math.sin(w)))/(3*r),(-s+b*(S-Qo*Math.sin(w)))/(3*r));0<=M&&M<=1&&(a[f++]=M),0<=m&&m<=1&&(a[f++]=m),0<=I&&I<=1&&(a[f++]=I)}}return f}(e,n,a,s,u,Ka);if(0===c)return 0;for(var d,f,p=0,g=-1,m=0;m<c;m++){var v=Ka[m],y=0===v||1===v?.5:1;aa(t,i,o,r,v)<l||(g<0&&(g=sa(e,n,a,s,$a),$a[1]<$a[0]&&1<g&&(h=$a[0],$a[0]=$a[1],$a[1]=h),d=aa(e,n,a,s,$a[0]),1<g&&(f=aa(e,n,a,s,$a[1]))),p+=2===g?v<$a[0]?d<e?y:-y:v<$a[1]?f<d?y:-y:s<f?y:-y:v<$a[0]?d<e?y:-y:s<d?y:-y)}return p}function Qa(t,e,i,n,o,a,r,s){if(e<s&&n<s&&a<s||s<e&&s<n&&s<a)return 0;var l=function(t,e,i,n,o){var a=t-2*e+i,r=2*(e-t),s=t-n,l=0;if(na(a))oa(r)&&0<=(h=-s/r)&&h<=1&&(o[l++]=h);else{var u=r*r-4*a*s;if(na(u))0<=(h=-r/(2*a))&&h<=1&&(o[l++]=h);else if(0<u){var h,c=Jo(u),d=(-r-c)/(2*a);0<=(h=(-r+c)/(2*a))&&h<=1&&(o[l++]=h),0<=d&&d<=1&&(o[l++]=d)}}return l}(e,n,a,s,Ka);if(0===l)return 0;var u=ca(e,n,a);if(0<=u&&u<=1){for(var h=0,c=ua(e,n,a,u),d=0;d<l;d++){var f=0===Ka[d]||1===Ka[d]?.5:1;ua(t,i,o,Ka[d])<r||(h+=Ka[d]<u?c<e?f:-f:a<c?f:-f)}return h}return f=0===Ka[0]||1===Ka[0]?.5:1,ua(t,i,o,Ka[0])<r?0:a<e?f:-f}function tr(t,e,i,n,o,a,r,s){if(i<(s-=e)||s<-i)return 0;var l=Math.sqrt(i*i-s*s);Ka[0]=-l,Ka[1]=l;var u=Math.abs(n-o);if(u<1e-4)return 0;if(u%qa<1e-4){o=qa;var h=a?1:-1;return r>=Ka[n=0]+t&&r<=Ka[1]+t?h:0}a?(l=n,n=Za(o),o=Za(l)):(n=Za(n),o=Za(o)),o<n&&(o+=qa);for(var c=0,d=0;d<2;d++){var f=Ka[d];if(r<f+t){var p=Math.atan2(s,f);h=a?1:-1,p<0&&(p=qa+p),(n<=p&&p<=o||n<=p+qa&&p+qa<=o)&&(p>Math.PI/2&&p<1.5*Math.PI&&(h=-h),c+=h)}}return c}function er(t,e,i,n,o){for(var a=0,r=0,s=0,l=0,u=0,h=0;h<t.length;){var c=t[h++];switch(c===ja.M&&1<h&&(i||(a+=Ya(r,s,l,u,n,o))),1===h&&(l=r=t[h],u=s=t[h+1]),c){case ja.M:r=l=t[h++],s=u=t[h++];break;case ja.L:if(i){if(Ga(r,s,t[h],t[h+1],e,n,o))return!0}else a+=Ya(r,s,t[h],t[h+1],n,o)||0;r=t[h++],s=t[h++];break;case ja.C:if(i){if(Fa(r,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],e,n,o))return!0}else a+=Ja(r,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],n,o)||0;r=t[h++],s=t[h++];break;case ja.Q:if(i){if(Wa(r,s,t[h++],t[h++],t[h],t[h+1],e,n,o))return!0}else a+=Qa(r,s,t[h++],t[h++],t[h],t[h+1],n,o)||0;r=t[h++],s=t[h++];break;case ja.A:var d=t[h++],f=t[h++],p=t[h++],g=t[h++],m=t[h++],v=t[h++];h+=1;var y=1-t[h++],x=Math.cos(m)*p+d,_=Math.sin(m)*g+f;1<h?a+=Ya(r,s,x,_,n,o):(l=x,u=_);var w=(n-d)*g/p+d;if(i){if(Xa(d,f,g,m,m+v,y,e,w,o))return!0}else a+=tr(d,f,g,m,m+v,y,w,o);r=Math.cos(m+v)*p+d,s=Math.sin(m+v)*g+f;break;case ja.R:if(l=r=t[h++],u=s=t[h++],x=l+t[h++],_=u+t[h++],i){if(Ga(l,u,x,u,e,n,o)||Ga(x,u,x,_,e,n,o)||Ga(x,_,l,_,e,n,o)||Ga(l,_,l,u,e,n,o))return!0}else a+=Ya(x,u,x,_,n,o),a+=Ya(l,_,l,u,n,o);break;case ja.Z:if(i){if(Ga(r,s,l,u,e,n,o))return!0}else a+=Ya(r,s,l,u,n,o);r=l,s=u}}return i||function(t,e){return Math.abs(t-e)<1e-4}(s,u)||(a+=Ya(r,s,l,u,n,o)||0),0!==a}var ir=Ri.prototype.getCanvasPattern,nr=Math.abs,or=new Va(!0);function ar(t){Rn.call(this,t),this.path=null}function rr(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}ar.prototype={constructor:ar,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(t,e){var i,n=this.style,o=this.path||or,a=n.hasStroke(),r=n.hasFill(),s=n.fill,l=n.stroke,u=r&&!!s.colorStops,h=a&&!!l.colorStops,c=r&&!!s.image,d=a&&!!l.image;n.bind(t,this,e),this.setTransform(t),this.__dirty&&(u&&(i=i||this.getBoundingRect(),this._fillGradient=n.getGradient(t,s,i)),h&&(i=i||this.getBoundingRect(),this._strokeGradient=n.getGradient(t,l,i))),u?t.fillStyle=this._fillGradient:c&&(t.fillStyle=ir.call(s,t)),h?t.strokeStyle=this._strokeGradient:d&&(t.strokeStyle=ir.call(l,t));var f=n.lineDash,p=n.lineDashOffset,g=!!t.setLineDash,m=this.getGlobalScale();if(o.setScale(m[0],m[1],this.segmentIgnoreThreshold),this.__dirtyPath||f&&!g&&a?(o.beginPath(t),f&&!g&&(o.setLineDash(f),o.setLineDashOffset(p)),this.buildPath(o,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),r)if(null!=n.fillOpacity){var v=t.globalAlpha;t.globalAlpha=n.fillOpacity*n.opacity,o.fill(t),t.globalAlpha=v}else o.fill(t);f&&g&&(t.setLineDash(f),t.lineDashOffset=p),a&&(null!=n.strokeOpacity?(v=t.globalAlpha,t.globalAlpha=n.strokeOpacity*n.opacity,o.stroke(t),t.globalAlpha=v):o.stroke(t)),f&&g&&t.setLineDash([]),null!=n.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(t,e,i){},createPathProxy:function(){this.path=new Va},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;n=n||(this.path=new Va),this.__dirtyPath&&(n.beginPath(),this.buildPath(n,this.shape,!1)),t=n.getBoundingRect()}if(this._rect=t,e.hasStroke()){var o=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){o.copy(t);var a=e.lineWidth,r=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(a=Math.max(a,this.strokeContainThreshold||4)),1e-10<r&&(o.width+=a/r,o.height+=a/r,o.x-=a/r/2,o.y-=a/r/2)}return o}return t},contain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),o=this.style;if(n.contain(t=i[0],e=i[1])){var a=this.path.data;if(o.hasStroke()){var r=o.lineWidth,s=o.strokeNoScale?this.getLineScale():1;if(1e-10<s&&(o.hasFill()||(r=Math.max(r,this.strokeContainThreshold)),function(t,e,i,n){return er(t,e,!0,i,n)}(a,r/s,t,e)))return!0}if(o.hasFill())return function(t,e,i){return er(t,0,!1,e,i)}(a,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):Rn.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(z(t))for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);else i[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&1e-10<nr(t[0]-1)&&1e-10<nr(t[3]-1)?Math.sqrt(nr(t[0]*t[3]-t[2]*t[1])):1}},ar.extend=function(t){function e(e){ar.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var n=this.shape;for(var o in i)!n.hasOwnProperty(o)&&i.hasOwnProperty(o)&&(n[o]=i[o])}t.init&&t.init.call(this,e)}for(var i in M(e,ar),t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},M(ar,Rn);var sr=Va.CMD,lr=[[],[],[]],ur=Math.sqrt,hr=Math.atan2,cr=Math.sqrt,dr=Math.sin,fr=Math.cos,pr=Math.PI,gr=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(rr(t)*rr(e))},mr=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(gr(t,e))};function vr(t,e,i,n,o,a,r,s,l,u,h){var c=l*(pr/180),d=fr(c)*(t-i)/2+dr(c)*(e-n)/2,f=-1*dr(c)*(t-i)/2+fr(c)*(e-n)/2,p=d*d/(r*r)+f*f/(s*s);1<p&&(r*=cr(p),s*=cr(p));var g=(o===a?-1:1)*cr((r*r*(s*s)-r*r*(f*f)-s*s*(d*d))/(r*r*(f*f)+s*s*(d*d)))||0,m=g*r*f/s,v=g*-s*d/r,y=(t+i)/2+fr(c)*m-dr(c)*v,x=(e+n)/2+dr(c)*m+fr(c)*v,_=mr([1,0],[(d-m)/r,(f-v)/s]),w=[(d-m)/r,(f-v)/s],b=[(-1*d-m)/r,(-1*f-v)/s],S=mr(w,b);gr(w,b)<=-1&&(S=pr),1<=gr(w,b)&&(S=0),0===a&&0<S&&(S-=2*pr),1===a&&S<0&&(S+=2*pr),h.addData(u,y,x,r,s,_,S,c,a)}var yr=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,xr=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function _r(t,e){var i=function(t){if(!t)return new Va;for(var e,i=0,n=0,o=i,a=n,r=new Va,s=Va.CMD,l=t.match(yr),u=0;u<l.length;u++){for(var h,c=l[u],d=c.charAt(0),f=c.match(xr)||[],p=f.length,g=0;g<p;g++)f[g]=parseFloat(f[g]);for(var m=0;m<p;){var v,y,x,_,w,b,S,M=i,I=n;switch(d){case"l":i+=f[m++],n+=f[m++],r.addData(h=s.L,i,n);break;case"L":i=f[m++],n=f[m++],r.addData(h=s.L,i,n);break;case"m":i+=f[m++],n+=f[m++],r.addData(h=s.M,i,n),o=i,a=n,d="l";break;case"M":i=f[m++],n=f[m++],r.addData(h=s.M,i,n),o=i,a=n,d="L";break;case"h":i+=f[m++],r.addData(h=s.L,i,n);break;case"H":i=f[m++],r.addData(h=s.L,i,n);break;case"v":n+=f[m++],r.addData(h=s.L,i,n);break;case"V":n=f[m++],r.addData(h=s.L,i,n);break;case"C":r.addData(h=s.C,f[m++],f[m++],f[m++],f[m++],f[m++],f[m++]),i=f[m-2],n=f[m-1];break;case"c":r.addData(h=s.C,f[m++]+i,f[m++]+n,f[m++]+i,f[m++]+n,f[m++]+i,f[m++]+n),i+=f[m-2],n+=f[m-1];break;case"S":v=i,y=n;var T=r.len(),A=r.data;e===s.C&&(v+=i-A[T-4],y+=n-A[T-3]),M=f[m++],I=f[m++],i=f[m++],n=f[m++],r.addData(h=s.C,v,y,M,I,i,n);break;case"s":v=i,y=n,T=r.len(),A=r.data,e===s.C&&(v+=i-A[T-4],y+=n-A[T-3]),M=i+f[m++],I=n+f[m++],i+=f[m++],n+=f[m++],r.addData(h=s.C,v,y,M,I,i,n);break;case"Q":M=f[m++],I=f[m++],i=f[m++],n=f[m++],r.addData(h=s.Q,M,I,i,n);break;case"q":M=f[m++]+i,I=f[m++]+n,i+=f[m++],n+=f[m++],r.addData(h=s.Q,M,I,i,n);break;case"T":v=i,y=n,T=r.len(),A=r.data,e===s.Q&&(v+=i-A[T-4],y+=n-A[T-3]),i=f[m++],n=f[m++],r.addData(h=s.Q,v,y,i,n);break;case"t":v=i,y=n,T=r.len(),A=r.data,e===s.Q&&(v+=i-A[T-4],y+=n-A[T-3]),i+=f[m++],n+=f[m++],r.addData(h=s.Q,v,y,i,n);break;case"A":x=f[m++],_=f[m++],w=f[m++],b=f[m++],S=f[m++],vr(M=i,I=n,i=f[m++],n=f[m++],b,S,x,_,w,h=s.A,r);break;case"a":x=f[m++],_=f[m++],w=f[m++],b=f[m++],S=f[m++],vr(M=i,I=n,i+=f[m++],n+=f[m++],b,S,x,_,w,h=s.A,r)}}"z"!==d&&"Z"!==d||(r.addData(h=s.Z),i=o,n=a),e=h}return r.toStatic(),r}(t);return(e=e||{}).buildPath=function(t){if(t.setData)t.setData(i.data),(e=t.getContext())&&t.rebuildPath(e);else{var e=t;i.rebuildPath(e)}},e.applyTransform=function(t){(function(t,e){var i,n,o,a,r,s=t.data,l=sr.M,u=sr.C,h=sr.L,c=sr.R,d=sr.A,f=sr.Q;for(a=o=0;o<s.length;){switch(i=s[o++],a=o,n=0,i){case l:case h:n=1;break;case u:n=3;break;case f:n=2;break;case d:var p=e[4],g=e[5],m=ur(e[0]*e[0]+e[1]*e[1]),v=ur(e[2]*e[2]+e[3]*e[3]),y=hr(-e[1]/v,e[0]/m);s[o]*=m,s[o++]+=p,s[o]*=v,s[o++]+=g,s[o++]*=m,s[o++]*=v,s[o++]+=y,s[o++]+=y,a=o+=2;break;case c:x[0]=s[o++],x[1]=s[o++],_t(x,x,e),s[a++]=x[0],s[a++]=x[1],x[0]+=s[o++],x[1]+=s[o++],_t(x,x,e),s[a++]=x[0],s[a++]=x[1]}for(r=0;r<n;r++){var x;(x=lr[r])[0]=s[o++],x[1]=s[o++],_t(x,x,e),s[a++]=x[0],s[a++]=x[1]}}})(i,t),this.dirty(!0)},e}function wr(t,e){return new ar(_r(t,e))}var br=function(t){Rn.call(this,t)};function Sr(t){return o.browser.ie&&11<=o.browser.version?function(){var e,i=this.__clipPaths,n=this.style;if(i)for(var o=0;o<i.length;o++){var a=i[o],r=a&&a.shape,s=a&&a.type;if(r&&("sector"===s&&r.startAngle===r.endAngle||"rect"===s&&(!r.width||!r.height))){for(var l=0;l<Ir.length;l++)Ir[l][2]=n[Ir[l][0]],n[Ir[l][0]]=Ir[l][1];e=!0;break}}if(t.apply(this,arguments),e)for(l=0;l<Ir.length;l++)n[Ir[l][0]]=Ir[l][2]}:t}br.prototype={constructor:br,type:"text",brush:function(t,e){var i=this.style;this.__dirty&&xn(i),i.fill=i.stroke=i.shadowBlur=i.shadowColor=i.shadowOffsetX=i.shadowOffsetY=null;var n=i.text;null!=n&&(n+=""),On(n,i)?(this.setTransform(t),wn(this,t,n,i,null,e),this.restoreTransform(t)):t.__attrCachedBy=0},getBoundingRect:function(){var t=this.style;if(this.__dirty&&xn(t),!this._rect){var e=t.text;null!=e?e+="":e="";var i=Ji(t.text+"",t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich);if(i.x+=t.x||0,i.y+=t.y||0,Cn(t.textStroke,t.textStrokeWidth)){var n=t.textStrokeWidth;i.x-=n/2,i.y-=n/2,i.width+=n,i.height+=n}this._rect=i}return this._rect}},M(br,Rn);var Mr=ar.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,i){i&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI,!0)}}),Ir=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]],Tr=ar.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:Sr(ar.prototype.brush),buildPath:function(t,e){var i=e.cx,n=e.cy,o=Math.max(e.r0||0,0),a=Math.max(e.r,0),r=e.startAngle,s=e.endAngle,l=e.clockwise,u=Math.cos(r),h=Math.sin(r);t.moveTo(u*o+i,h*o+n),t.lineTo(u*a+i,h*a+n),t.arc(i,n,a,r,s,!l),t.lineTo(Math.cos(s)*o+i,Math.sin(s)*o+n),0!==o&&t.arc(i,n,o,s,r,l),t.closePath()}}),Ar=ar.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var i=e.cx,n=e.cy,o=2*Math.PI;t.moveTo(i+e.r,n),t.arc(i,n,e.r,0,o,!1),t.moveTo(i+e.r0,n),t.arc(i,n,e.r0,0,o,!0)}});function Dr(t,e,i,n,o,a,r){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*r+(-3*(e-i)-2*s-l)*a+s*o+e}function Cr(t,e,i){var n=e.points,o=e.smooth;if(n&&2<=n.length){if(o&&"spline"!==o){var a=function(t,e,i,n){var o,a,r,s,l=[],u=[],h=[],c=[];if(n){r=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=t.length;d<f;d++)wt(r,r,t[d]),bt(s,s,t[d]);wt(r,r,n[0]),bt(s,s,n[1])}for(d=0,f=t.length;d<f;d++){var p=t[d];if(i)o=t[d?d-1:f-1],a=t[(d+1)%f];else{if(0===d||d===f-1){l.push(rt(t[d]));continue}o=t[d-1],a=t[d+1]}ht(u,a,o),ft(u,u,e);var g=gt(p,o),m=gt(p,a),v=g+m;0!==v&&(g/=v,m/=v),ft(h,u,-g),ft(c,u,m);var y=lt([],p,h),x=lt([],p,c);n&&(bt(y,y,r),wt(y,y,s),bt(x,x,r),wt(x,x,s)),l.push(y),l.push(x)}return i&&l.push(l.shift()),l}(n,o,i,e.smoothConstraint);t.moveTo(n[0][0],n[0][1]);for(var r=n.length,s=0;s<(i?r:r-1);s++){var l=a[2*s],u=a[2*s+1],h=n[(s+1)%r];t.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{"spline"===o&&(n=function(t,e){for(var i=t.length,n=[],o=0,a=1;a<i;a++)o+=gt(t[a-1],t[a]);var r=o/2;for(r=r<i?i:r,a=0;a<r;a++){var s,l,u,h=a/(r-1)*(e?i:i-1),c=Math.floor(h),d=h-c,f=t[c%i];u=e?(s=t[(c-1+i)%i],l=t[(c+1)%i],t[(c+2)%i]):(s=t[0===c?c:c-1],l=t[i-2<c?i-1:c+1],t[i-3<c?i-1:c+2]);var p=d*d,g=d*p;n.push([Dr(s[0],f[0],l[0],u[0],d,p,g),Dr(s[1],f[1],l[1],u[1],d,p,g)])}return n}(n,i)),t.moveTo(n[0][0],n[0][1]),s=1;for(var c=n.length;s<c;s++)t.lineTo(n[s][0],n[s][1])}i&&t.closePath()}}var Lr=ar.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){Cr(t,e,!0)}}),kr=ar.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){Cr(t,e,!1)}}),Pr=Math.round;function Or(t,e,i){var n=i&&i.lineWidth;if(e&&n){var o=e.x1,a=e.x2,r=e.y1,s=e.y2;Pr(2*o)===Pr(2*a)?t.x1=t.x2=Er(o,n,!0):(t.x1=o,t.x2=a),Pr(2*r)===Pr(2*s)?t.y1=t.y2=Er(r,n,!0):(t.y1=r,t.y2=s)}}function Nr(t,e,i){var n=i&&i.lineWidth;if(e&&n){var o=e.x,a=e.y,r=e.width,s=e.height;t.x=Er(o,n,!0),t.y=Er(a,n,!0),t.width=Math.max(Er(o+r,n,!1)-t.x,0===r?0:1),t.height=Math.max(Er(a+s,n,!1)-t.y,0===s?0:1)}}function Er(t,e,i){var n=Pr(2*t);return(n+Pr(e))%2==0?n/2:(n+(i?1:-1))/2}var Rr={},zr=ar.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var i,n,o,a;this.subPixelOptimize?(Nr(Rr,e,this.style),i=Rr.x,n=Rr.y,o=Rr.width,a=Rr.height,Rr.r=e.r,e=Rr):(i=e.x,n=e.y,o=e.width,a=e.height),e.r?dn(t,e):t.rect(i,n,o,a),t.closePath()}}),Br={},Vr=ar.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i,n,o,a;a=this.subPixelOptimize?(Or(Br,e,this.style),i=Br.x1,n=Br.y1,o=Br.x2,Br.y2):(i=e.x1,n=e.y1,o=e.x2,e.y2);var r=e.percent;0!==r&&(t.moveTo(i,n),r<1&&(o=i*(1-r)+o*r,a=n*(1-r)+a*r),t.lineTo(o,a))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),Gr=[];function Fr(t,e,i){return null===t.cpx2||null===t.cpy2?[(i?ra:aa)(t.x1,t.cpx1,t.cpx2,t.x2,e),(i?ra:aa)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(i?ha:ua)(t.x1,t.cpx1,t.x2,e),(i?ha:ua)(t.y1,t.cpy1,t.y2,e)]}function Wr(t){this.colorStops=t||[]}var Hr=ar.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.x1,n=e.y1,o=e.x2,a=e.y2,r=e.cpx1,s=e.cpy1,l=e.cpx2,u=e.cpy2,h=e.percent;0!==h&&(t.moveTo(i,n),null==l||null==u?(h<1&&(da(i,r,o,h,Gr),r=Gr[1],o=Gr[2],da(n,s,a,h,Gr),s=Gr[1],a=Gr[2]),t.quadraticCurveTo(r,s,o,a)):(h<1&&(la(i,r,l,o,h,Gr),r=Gr[1],l=Gr[2],o=Gr[3],la(n,s,u,a,h,Gr),s=Gr[1],u=Gr[2],a=Gr[3]),t.bezierCurveTo(r,s,l,u,o,a)))},pointAt:function(t){return Fr(this.shape,t,!1)},tangentAt:function(t){var e=Fr(this.shape,t,!0);return pt(e,e)}}),Zr=ar.extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.cx,n=e.cy,o=Math.max(e.r,0),a=e.startAngle,r=e.endAngle,s=e.clockwise,l=Math.cos(a),u=Math.sin(a);t.moveTo(l*o+i,u*o+n),t.arc(i,n,o,a,r,!s)}}),Ur=ar.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,i=0;i<e.length;i++)t=t||e[i].__dirtyPath;this.__dirtyPath=t,this.__dirty=this.__dirty||t},beforeBrush:function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),i=0;i<t.length;i++)t[i].path||t[i].createPathProxy(),t[i].path.setScale(e[0],e[1],t[i].segmentIgnoreThreshold)},buildPath:function(t,e){for(var i=e.paths||[],n=0;n<i.length;n++)i[n].buildPath(t,i[n].shape,!0)},afterBrush:function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),ar.prototype.getBoundingRect.call(this)}});function Xr(t,e,i,n,o,a){this.x=null==t?0:t,this.y=null==e?0:e,this.x2=null==i?1:i,this.y2=null==n?0:n,this.type="linear",this.global=a||!1,Wr.call(this,o)}function Yr(t,e,i,n,o){this.x=null==t?.5:t,this.y=null==e?.5:e,this.r=null==i?.5:i,this.type="radial",this.global=o||!1,Wr.call(this,n)}function jr(t){Rn.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}Wr.prototype={constructor:Wr,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}},Xr.prototype={constructor:Xr},M(Xr,Wr),Yr.prototype={constructor:Yr},M(Yr,Wr),jr.prototype.incremental=!0,jr.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},jr.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.dirty()},jr.prototype.addDisplayables=function(t,e){e=e||!1;for(var i=0;i<t.length;i++)this.addDisplayable(t[i],e)},jr.prototype.eachPendingDisplayable=function(t){for(var e=this._cursor;e<this._displayables.length;e++)t&&t(this._displayables[e]);for(e=0;e<this._temporaryDisplayables.length;e++)t&&t(this._temporaryDisplayables[e])},jr.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++)(e=this._displayables[t]).parent=this,e.update(),e.parent=null;for(t=0;t<this._temporaryDisplayables.length;t++){var e;(e=this._temporaryDisplayables[t]).parent=this,e.update(),e.parent=null}},jr.prototype.brush=function(t,e){for(var i=this._cursor;i<this._displayables.length;i++)(n=this._displayables[i]).beforeBrush&&n.beforeBrush(t),n.brush(t,i===this._cursor?null:this._displayables[i-1]),n.afterBrush&&n.afterBrush(t);for(this._cursor=i,i=0;i<this._temporaryDisplayables.length;i++){var n;(n=this._temporaryDisplayables[i]).beforeBrush&&n.beforeBrush(t),n.brush(t,0===i?null:this._temporaryDisplayables[i-1]),n.afterBrush&&n.afterBrush(t)}this._temporaryDisplayables=[],this.notClear=!0};var qr=[];jr.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new vi(1/0,1/0,-1/0,-1/0),e=0;e<this._displayables.length;e++){var i=this._displayables[e],n=i.getBoundingRect().clone();i.needLocalTransform()&&n.applyTransform(i.getLocalTransform(qr)),t.union(n)}this._rect=t}return this._rect},jr.prototype.contain=function(t,e){var i=this.transformCoordToLocal(t,e);if(this.getBoundingRect().contain(i[0],i[1]))for(var n=0;n<this._displayables.length;n++)if(this._displayables[n].contain(t,e))return!0;return!1},M(jr,Rn);var Kr=Math.max,$r=Math.min,Jr={},Qr={color:"textFill",textBorderColor:"textStroke",textBorderWidth:"textStrokeWidth"},ts="emphasis",es=1,is={},ns={};function os(t){return ar.extend(t)}function as(t,e){ns[t]=e}function rs(t){if(ns.hasOwnProperty(t))return ns[t]}function ss(t,e,i,n){var o=wr(t,e);return i&&("center"===n&&(i=us(i,o.getBoundingRect())),cs(o,i)),o}function ls(t,e,i){var n=new zn({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){"center"===i&&n.setStyle(us(e,{width:t.width,height:t.height}))}});return n}function us(t,e){var i,n=e.width/e.height,o=t.height*n;return i=o<=t.width?t.height:(o=t.width)/n,{x:t.x+t.width/2-o/2,y:t.y+t.height/2-i/2,width:o,height:i}}var hs=function(t,e){for(var i=[],n=t.length,o=0;o<n;o++){var a=t[o];a.path||a.createPathProxy(),a.__dirtyPath&&a.buildPath(a.path,a.shape,!0),i.push(a.path)}var r=new ar(e);return r.createPathProxy(),r.buildPath=function(t){t.appendPath(i);var e=t.getContext();e&&t.rebuildPath(e)},r};function cs(t,e){if(t.applyTransform){var i=t.getBoundingRect().calculateTransform(e);t.applyTransform(i)}}var ds=Er;function fs(t){return null!=t&&"none"!==t}var ps=Q(),gs=0;function ms(t){var e=t.__hoverStl;if(e&&!t.__highlighted){var i=t.__zr,n=t.useHoverLayer&&i&&"canvas"===i.painter.type;if(t.__highlighted=n?"layer":"plain",!(t.isGroup||!i&&t.useHoverLayer)){var o=t,a=t.style;n&&(a=(o=i.addHover(t)).style),zs(a),n||function(t){if(t.__hoverStlDirty){t.__hoverStlDirty=!1;var e=t.__hoverStl;if(e){var i=t.__cachedNormalStl={};t.__cachedNormalZ2=t.z2;var n=t.style;for(var o in e)null!=e[o]&&(i[o]=n[o]);i.fill=n.fill,i.stroke=n.stroke}else t.__cachedNormalStl=t.__cachedNormalZ2=null}}(o),a.extendFrom(e),vs(a,e,"fill"),vs(a,e,"stroke"),Rs(a),n||(t.dirty(!1),t.z2+=1)}}}function vs(t,e,i){!fs(e[i])&&fs(t[i])&&(t[i]=function(t){if("string"!=typeof t)return t;var e=ps.get(t);return e||(e=Re(t,-.1),gs<1e4&&(ps.set(t,e),gs++)),e}(t[i]))}function ys(t){var e=t.__highlighted;if(e&&(t.__highlighted=!1,!t.isGroup))if("layer"===e)t.__zr&&t.__zr.removeHover(t);else{var i=t.style,n=t.__cachedNormalStl;n&&(zs(i),t.setStyle(n),Rs(i));var o=t.__cachedNormalZ2;null!=o&&t.z2-o==1&&(t.z2=o)}}function xs(t,e,i){var n,o="normal",a="normal";t.__highlighted&&(o=ts,n=!0),e(t,i),t.__highlighted&&(a=ts,n=!0),t.isGroup&&t.traverse((function(t){t.isGroup||e(t,i)})),n&&t.__highDownOnUpdate&&t.__highDownOnUpdate(o,a)}function _s(t,e){e=t.__hoverStl=!1!==e&&(t.hoverStyle||e||{}),t.__hoverStlDirty=!0,t.__highlighted&&(t.__cachedNormalStl=null,ys(t),ms(t))}function ws(t){Is(this,t)||this.__highByOuter||xs(this,ms)}function bs(t){Is(this,t)||this.__highByOuter||xs(this,ys)}function Ss(t){this.__highByOuter|=1<<(t||0),xs(this,ms)}function Ms(t){(this.__highByOuter&=~(1<<(t||0)))||xs(this,ys)}function Is(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function Ts(t,e){As(t,!0),xs(t,_s,e)}function As(t,e){var i=!1===e;if(t.__highDownSilentOnTouch=t.highDownSilentOnTouch,t.__highDownOnUpdate=t.highDownOnUpdate,!i||t.__highDownDispatcher){var n=i?"off":"on";t[n]("mouseover",ws)[n]("mouseout",bs),t[n]("emphasis",Ss)[n]("normal",Ms),t.__highByOuter=t.__highByOuter||0,t.__highDownDispatcher=!i}}function Ds(t){return!(!t||!t.__highDownDispatcher)}function Cs(t){var e=is[t];return null==e&&es<=32&&(e=is[t]=es++),e}function Ls(t,e,i,n,o,a,r){var s,l=(o=o||Jr).labelFetcher,u=o.labelDataIndex,h=o.labelDimIndex,c=i.getShallow("show"),d=n.getShallow("show");(c||d)&&(l&&(s=l.getFormattedLabel(u,"normal",null,h)),null==s&&(s=E(o.defaultText)?o.defaultText(u,o):o.defaultText));var f=c?s:null,p=d?H(l?l.getFormattedLabel(u,"emphasis",null,h):null,s):null;null==f&&null==p||(Ps(t,i,a,o),Ps(e,n,r,o,!0)),t.text=f,e.text=p}function ks(t,e,i){var n=t.style;e&&(zs(n),t.setStyle(e),Rs(n)),n=t.__hoverStl,i&&n&&(zs(n),x(n,i),Rs(n))}function Ps(t,e,i,n,o){return Os(t,e,n,o),i&&x(t,i),t}function Os(t,e,i,n){if((i=i||Jr).isRectText){var o;i.getTextPosition?o=i.getTextPosition(e,n):"outside"===(o=e.getShallow("position")||(n?null:"inside"))&&(o="top"),t.textPosition=o,t.textOffset=e.getShallow("offset");var a=e.getShallow("rotate");null!=a&&(a*=Math.PI/180),t.textRotation=a,t.textDistance=H(e.getShallow("distance"),n?null:5)}var r,s=e.ecModel,l=s&&s.option.textStyle,u=function(t){for(var e;t&&t!==t.ecModel;){var i=(t.option||Jr).rich;if(i)for(var n in e=e||{},i)i.hasOwnProperty(n)&&(e[n]=1);t=t.parentModel}return e}(e);if(u)for(var h in r={},u)if(u.hasOwnProperty(h)){var c=e.getModel(["rich",h]);Ns(r[h]={},c,l,i,n)}return t.rich=r,Ns(t,e,l,i,n,!0),i.forceRich&&!i.textStyle&&(i.textStyle={}),t}function Ns(t,e,i,n,o,a){i=!o&&i||Jr,t.textFill=Es(e.getShallow("color"),n)||i.color,t.textStroke=Es(e.getShallow("textBorderColor"),n)||i.textBorderColor,t.textStrokeWidth=H(e.getShallow("textBorderWidth"),i.textBorderWidth),o||(a&&(t.insideRollbackOpt=n,Rs(t)),null==t.textFill&&(t.textFill=n.autoColor)),t.fontStyle=e.getShallow("fontStyle")||i.fontStyle,t.fontWeight=e.getShallow("fontWeight")||i.fontWeight,t.fontSize=e.getShallow("fontSize")||i.fontSize,t.fontFamily=e.getShallow("fontFamily")||i.fontFamily,t.textAlign=e.getShallow("align"),t.textVerticalAlign=e.getShallow("verticalAlign")||e.getShallow("baseline"),t.textLineHeight=e.getShallow("lineHeight"),t.textWidth=e.getShallow("width"),t.textHeight=e.getShallow("height"),t.textTag=e.getShallow("tag"),a&&n.disableBox||(t.textBackgroundColor=Es(e.getShallow("backgroundColor"),n),t.textPadding=e.getShallow("padding"),t.textBorderColor=Es(e.getShallow("borderColor"),n),t.textBorderWidth=e.getShallow("borderWidth"),t.textBorderRadius=e.getShallow("borderRadius"),t.textBoxShadowColor=e.getShallow("shadowColor"),t.textBoxShadowBlur=e.getShallow("shadowBlur"),t.textBoxShadowOffsetX=e.getShallow("shadowOffsetX"),t.textBoxShadowOffsetY=e.getShallow("shadowOffsetY")),t.textShadowColor=e.getShallow("textShadowColor")||i.textShadowColor,t.textShadowBlur=e.getShallow("textShadowBlur")||i.textShadowBlur,t.textShadowOffsetX=e.getShallow("textShadowOffsetX")||i.textShadowOffsetX,t.textShadowOffsetY=e.getShallow("textShadowOffsetY")||i.textShadowOffsetY}function Es(t,e){return"auto"!==t?t:e&&e.autoColor?e.autoColor:null}function Rs(t){var e,i=t.textPosition,n=t.insideRollbackOpt;if(n&&null==t.textFill){var o=n.autoColor,a=n.useInsideStyle,r=!1!==a&&(!0===a||n.isRectText&&i&&"string"==typeof i&&0<=i.indexOf("inside")),s=!r&&null!=o;(r||s)&&(e={textFill:t.textFill,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth}),r&&(t.textFill="#fff",null==t.textStroke&&(t.textStroke=o,null==t.textStrokeWidth&&(t.textStrokeWidth=2))),s&&(t.textFill=o)}t.insideRollback=e}function zs(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function Bs(t,e){var i=e&&e.getModel("textStyle");return j([t.fontStyle||i&&i.getShallow("fontStyle")||"",t.fontWeight||i&&i.getShallow("fontWeight")||"",(t.fontSize||i&&i.getShallow("fontSize")||12)+"px",t.fontFamily||i&&i.getShallow("fontFamily")||"sans-serif"].join(" "))}function Vs(t,e,i,n,o,a){if("function"==typeof o&&(a=o,o=null),n&&n.isAnimationEnabled()){var r=t?"Update":"",s=n.getShallow("animationDuration"+r),l=n.getShallow("animationEasing"+r),u=n.getShallow("animationDelay"+r);"function"==typeof u&&(u=u(o,n.getAnimationDelayParams?n.getAnimationDelayParams(e,o):null)),"function"==typeof s&&(s=s(o)),0<s?e.animateTo(i,s,u||0,l,a,!!a):(e.stopAnimation(),e.attr(i),a&&a())}else e.stopAnimation(),e.attr(i),a&&a()}function Gs(t,e,i,n,o){Vs(!0,t,e,i,n,o)}function Fs(t,e,i,n,o){Vs(!1,t,e,i,n,o)}function Ws(t,e){for(var i=Qt([]);t&&t!==e;)ee(i,t.getLocalTransform(),i),t=t.parent;return i}function Hs(t,e,i){return e&&!T(e)&&(e=he.getLocalTransform(e)),i&&(e=ae([],e)),_t([],t,e)}function Zs(t,e,i){var n=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),o=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),a=["left"===t?-n:"right"===t?n:0,"top"===t?-o:"bottom"===t?o:0];return a=Hs(a,e,i),Math.abs(a[0])>Math.abs(a[1])?0<a[0]?"right":"left":0<a[1]?"bottom":"top"}function Us(t,e,i,n){if(t&&e){var o,a=(o={},t.traverse((function(t){!t.isGroup&&t.anid&&(o[t.anid]=t)})),o);e.traverse((function(t){if(!t.isGroup&&t.anid){var e=a[t.anid];if(e){var n=r(t);t.attr(r(e)),Gs(t,n,i,t.dataIndex)}}}))}function r(t){var e={position:rt(t.position),rotation:t.rotation};return t.shape&&(e.shape=x({},t.shape)),e}}function Xs(t,e){return D(t,(function(t){var i=t[0];i=Kr(i,e.x),i=$r(i,e.x+e.width);var n=t[1];return n=Kr(n,e.y),[i,n=$r(n,e.y+e.height)]}))}function Ys(t,e,i){var n=(e=x({rectHover:!0},e)).style={strokeNoScale:!0};if(i=i||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(n.image=t.slice(8),_(n,i),new zn(e)):ss(t.replace("path://",""),e,i,"center")}function js(t,e,i,n,o){for(var a=0,r=o[o.length-1];a<o.length;a++){var s=o[a];if(qs(t,e,i,n,s[0],s[1],r[0],r[1]))return!0;r=s}}function qs(t,e,i,n,o,a,r,s){var l=i-t,u=n-e,h=r-o,c=s-a,d=Ks(h,c,l,u);if(function(t){return t<=1e-6&&-1e-6<=t}(d))return!1;var f=t-o,p=e-a,g=Ks(f,p,l,u)/d;if(g<0||1<g)return!1;var m=Ks(f,p,h,c)/d;return!(m<0||1<m)}function Ks(t,e,i,n){return t*n-i*e}as("circle",Mr),as("sector",Tr),as("ring",Ar),as("polygon",Lr),as("polyline",kr),as("rect",zr),as("line",Vr),as("bezierCurve",Hr),as("arc",Zr);var $s=(Object.freeze||Object)({Z2_EMPHASIS_LIFT:1,CACHED_LABEL_STYLE_PROPERTIES:Qr,extendShape:os,extendPath:function(t,e){return function(t,e){return ar.extend(_r(t,e))}(t,e)},registerShape:as,getShapeClass:rs,makePath:ss,makeImage:ls,mergePath:hs,resizePath:cs,subPixelOptimizeLine:function(t){return Or(t.shape,t.shape,t.style),t},subPixelOptimizeRect:function(t){return Nr(t.shape,t.shape,t.style),t},subPixelOptimize:ds,setElementHoverStyle:_s,setHoverStyle:Ts,setAsHighDownDispatcher:As,isHighDownDispatcher:Ds,getHighlightDigit:Cs,setLabelStyle:Ls,modifyLabelStyle:ks,setTextStyle:Ps,setText:function(t,e,i){var n,o={isRectText:!0};!1===i?n=!0:o.autoColor=i,Os(t,e,o,n)},getFont:Bs,updateProps:Gs,initProps:Fs,getTransform:Ws,applyTransform:Hs,transformDirection:Zs,groupTransition:Us,clipPointsByRect:Xs,clipRectByRect:function(t,e){var i=Kr(t.x,e.x),n=$r(t.x+t.width,e.x+e.width),o=Kr(t.y,e.y),a=$r(t.y+t.height,e.y+e.height);if(i<=n&&o<=a)return{x:i,y:o,width:n-i,height:a-o}},createIcon:Ys,linePolygonIntersect:js,lineLineIntersect:qs,Group:yi,Image:zn,Text:br,Circle:Mr,Sector:Tr,Ring:Ar,Polygon:Lr,Polyline:kr,Rect:zr,Line:Vr,BezierCurve:Hr,Arc:Zr,IncrementalDisplayable:jr,CompoundPath:Ur,LinearGradient:Xr,RadialGradient:Yr,BoundingRect:vi}),Js=["textStyle","color"],Qs={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(Js):null)},getFont:function(){return Bs({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return Ji(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("lineHeight"),this.getShallow("rich"),this.getShallow("truncateText"))}},tl=Xo([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),el={getItemStyle:function(t,e){var i=tl(this,t,e),n=this.getBorderLineDash();return n&&(i.lineDash=n),i},getBorderLineDash:function(){var t=this.get("borderType");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}},il=I,nl=ko();function ol(t,e,i){this.parentModel=e,this.ecModel=i,this.option=t}function al(t,e,i){for(var n=0;n<e.length&&(!e[n]||null!=(t=t&&"object"==typeof t?t[e[n]]:null));n++);return null==t&&i&&(t=i.get(e)),t}function rl(t,e){var i=nl(t).getParent;return i?i.call(t,e):t.parentModel}ol.prototype={constructor:ol,init:null,mergeOption:function(t){v(this.option,t,!0)},get:function(t,e){return null==t?this.option:al(this.option,this.parsePath(t),!e&&rl(this,t))},getShallow:function(t,e){var i=this.option,n=null==i?i:i[t],o=!e&&rl(this,t);return null==n&&o&&(n=o.getShallow(t)),n},getModel:function(t,e){var i;return new ol(null==t?this.option:al(this.option,t=this.parsePath(t)),e=e||(i=rl(this,t))&&i.getModel(t),this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new this.constructor(m(this.option))},setReadOnly:function(t){},parsePath:function(t){return"string"==typeof t&&(t=t.split(".")),t},customizeGetParent:function(t){nl(this).getParent=t},isAnimationEnabled:function(){if(!o.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},Go(ol),Wo(ol),il(ol,jo),il(ol,Ko),il(ol,Qs),il(ol,el);var sl=0;function ll(t){return[t||"",sl++,Math.random().toFixed(5)].join("_")}function ul(t,e,i,n){var o=e[1]-e[0],a=i[1]-i[0];if(0==o)return 0==a?i[0]:(i[0]+i[1])/2;if(n)if(0<o){if(t<=e[0])return i[0];if(t>=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/o*a+i[0]}function hl(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?function(t){return t.replace(/^\s+|\s+$/g,"")}(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t}function cl(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),i?t:+t}function dl(t){return t.sort((function(t,e){return t-e})),t}function fl(t){if(t=+t,isNaN(t))return 0;for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i}function pl(t){var e=t.toString(),i=e.indexOf("e");if(0<i){var n=+e.slice(i+1);return n<0?-n:0}var o=e.indexOf(".");return o<0?0:e.length-1-o}function gl(t,e){var i=Math.log,n=Math.LN10,o=Math.floor(i(t[1]-t[0])/n),a=Math.round(i(Math.abs(e[1]-e[0]))/n),r=Math.min(Math.max(-o+a,0),20);return isFinite(r)?r:20}function ml(t,e,i){if(!t[e])return 0;var n=C(t,(function(t,e){return t+(isNaN(e)?0:e)}),0);if(0===n)return 0;for(var o=Math.pow(10,i),a=D(t,(function(t){return(isNaN(t)?0:t)/n*o*100})),r=100*o,s=D(a,(function(t){return Math.floor(t)})),l=C(s,(function(t,e){return t+e}),0),u=D(a,(function(t,e){return t-s[e]}));l<r;){for(var h=Number.NEGATIVE_INFINITY,c=null,d=0,f=u.length;d<f;++d)u[d]>h&&(h=u[d],c=d);++s[c],u[c]=0,++l}return s[e]/o}var vl=9007199254740991;function yl(t){var e=2*Math.PI;return(t%e+e)%e}function xl(t){return-1e-4<t&&t<1e-4}var _l=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function wl(t){if(t instanceof Date)return t;if("string"!=typeof t)return null==t?new Date(NaN):new Date(Math.round(t));var e=_l.exec(t);if(!e)return new Date(NaN);if(e[8]){var i=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(i-=e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,i,+(e[5]||0),+e[6]||0,+e[7]||0))}return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0)}function bl(t){return Math.pow(10,Sl(t))}function Sl(t){if(0===t)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return 10<=t/Math.pow(10,e)&&e++,e}function Ml(t,e){var i=Sl(t),n=Math.pow(10,i),o=t/n;return t=(e?o<1.5?1:o<2.5?2:o<4?3:o<7?5:10:o<1?1:o<2?2:o<3?3:o<5?5:10)*n,-20<=i?+t.toFixed(i<0?-i:0):t}function Il(t){t.sort((function(t,e){return function t(e,i,n){return e.interval[n]<i.interval[n]||e.interval[n]===i.interval[n]&&(e.close[n]-i.close[n]==(n?-1:1)||!n&&t(e,i,1))}(t,e,0)?-1:1}));for(var e=-1/0,i=1,n=0;n<t.length;){for(var o=t[n].interval,a=t[n].close,r=0;r<2;r++)o[r]<=e&&(o[r]=e,a[r]=r?1:1-i),e=o[r],i=a[r];o[0]===o[1]&&a[0]*a[1]!=1?t.splice(n,1):n++}return t}function Tl(t){return 0<=t-parseFloat(t)}var Al=(Object.freeze||Object)({linearMap:ul,parsePercent:hl,round:cl,asc:dl,getPrecision:fl,getPrecisionSafe:pl,getPixelPrecision:gl,getPercentWithPrecision:ml,MAX_SAFE_INTEGER:vl,remRadian:yl,isRadianAroundZero:xl,parseDate:wl,quantity:bl,quantityExponent:Sl,nice:Ml,quantile:function(t,e){var i=(t.length-1)*e+1,n=Math.floor(i),o=+t[n-1],a=i-n;return a?o+a*(t[n]-o):o},reformIntervals:Il,isNumeric:Tl});function Dl(t){return isNaN(t)?"-":(t=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(1<t.length?"."+t[1]:"")}function Cl(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 Ll=X,kl=/([&<>"'])/g,Pl={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Ol(t){return null==t?"":(t+"").replace(kl,(function(t,e){return Pl[e]}))}function Nl(t,e){return"{"+t+(null==e?"":e)+"}"}var El=["a","b","c","d","e","f","g"];function Rl(t,e,i){N(e)||(e=[e]);var n=e.length;if(!n)return"";for(var o=e[0].$vars||[],a=0;a<o.length;a++){var r=El[a];t=t.replace(Nl(r),Nl(r,0))}for(var s=0;s<n;s++)for(var l=0;l<o.length;l++){var u=e[s][o[l]];t=t.replace(Nl(El[l],s),i?Ol(u):u)}return t}function zl(t,e,i){return A(e,(function(e,n){t=t.replace("{"+n+"}",i?Ol(e):e)})),t}function Bl(t,e){var i=(t=R(t)?{color:t,extraCssText:e}:t||{}).color,n=(e=t.extraCssText,t.renderMode||"html"),o=t.markerId||"X";return i?"html"===n?"subItem"===t.type?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Ol(i)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+Ol(i)+";"+(e||"")+'"></span>':{renderMode:n,content:"{marker"+o+"|}  ",style:{color:i}}:""}function Vl(t,e){return"0000".substr(0,e-(t+="").length)+t}function Gl(t,e,i){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var n=wl(e),o=i?"UTC":"",a=n["get"+o+"FullYear"](),r=n["get"+o+"Month"]()+1,s=n["get"+o+"Date"](),l=n["get"+o+"Hours"](),u=n["get"+o+"Minutes"](),h=n["get"+o+"Seconds"](),c=n["get"+o+"Milliseconds"]();return t.replace("MM",Vl(r,2)).replace("M",r).replace("yyyy",a).replace("yy",a%100).replace("dd",Vl(s,2)).replace("d",s).replace("hh",Vl(l,2)).replace("h",l).replace("mm",Vl(u,2)).replace("m",u).replace("ss",Vl(h,2)).replace("s",h).replace("SSS",Vl(c,3))}function Fl(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}var Wl=nn,Hl=(Object.freeze||Object)({addCommas:Dl,toCamelCase:Cl,normalizeCssArray:Ll,encodeHTML:Ol,formatTpl:Rl,formatTplSimple:zl,getTooltipMarker:Bl,formatTime:Gl,capitalFirst:Fl,truncateText:Wl,getTextBoundingRect:function(t){return Ji(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)},getTextRect:function(t,e,i,n,o,a,r,s){return Ji(t,e,i,n,o,s,a,r)}}),Zl=A,Ul=["left","right","top","bottom","width","height"],Xl=[["width","left","right"],["height","top","bottom"]];function Yl(t,e,i,n,o){var a=0,r=0;null==n&&(n=1/0),null==o&&(o=1/0);var s=0;e.eachChild((function(l,u){var h,c,d=l.position,f=l.getBoundingRect(),p=e.childAt(u+1),g=p&&p.getBoundingRect();if("horizontal"===t){var m=f.width+(g?-g.x+f.x:0);s=n<(h=a+m)||l.newline?(a=0,h=m,r+=s+i,f.height):Math.max(s,f.height)}else{var v=f.height+(g?-g.y+f.y:0);s=o<(c=r+v)||l.newline?(a+=s+i,r=0,c=v,f.width):Math.max(s,f.width)}l.newline||(d[0]=a,d[1]=r,"horizontal"===t?a=h+i:r=c+i)}))}var jl=Yl;function ql(t,e,i){i=Ll(i||0);var n=e.width,o=e.height,a=hl(t.left,n),r=hl(t.top,o),s=hl(t.right,n),l=hl(t.bottom,o),u=hl(t.width,n),h=hl(t.height,o),c=i[2]+i[0],d=i[1]+i[3],f=t.aspect;switch(isNaN(u)&&(u=n-s-d-a),isNaN(h)&&(h=o-l-c-r),null!=f&&(isNaN(u)&&isNaN(h)&&(n/o<f?u=.8*n:h=.8*o),isNaN(u)&&(u=f*h),isNaN(h)&&(h=u/f)),isNaN(a)&&(a=n-s-u-d),isNaN(r)&&(r=o-l-h-c),t.left||t.right){case"center":a=n/2-u/2-i[3];break;case"right":a=n-u-d}switch(t.top||t.bottom){case"middle":case"center":r=o/2-h/2-i[0];break;case"bottom":r=o-h-c}a=a||0,r=r||0,isNaN(u)&&(u=n-d-a-(s||0)),isNaN(h)&&(h=o-c-r-(l||0));var p=new vi(a+i[3],r+i[0],u,h);return p.margin=i,p}function Kl(t,e,i,n,o){var a=!o||!o.hv||o.hv[0],r=!o||!o.hv||o.hv[1],s=o&&o.boundingMode||"all";if(a||r){var l;if("raw"===s)l="group"===t.type?new vi(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)}e=ql(_({width:l.width,height:l.height},e),i,n);var h=t.position,c=a?e.x-l.x:0,d=r?e.y-l.y:0;t.attr("position","raw"===s?[c,d]:[h[0]+c,h[1]+d])}}function $l(t,e,i){z(i)||(i={});var n=i.ignoreSize;N(n)||(n=[n,n]);var o=r(Xl[0],0),a=r(Xl[1],1);function r(i,o){var a={},r=0,u={},h=0;if(Zl(i,(function(e){u[e]=t[e]})),Zl(i,(function(t){s(e,t)&&(a[t]=u[t]=e[t]),l(a,t)&&r++,l(u,t)&&h++})),n[o])return l(e,i[1])?u[i[2]]=null:l(e,i[2])&&(u[i[1]]=null),u;if(2!==h&&r){if(2<=r)return a;for(var c=0;c<i.length;c++){var d=i[c];if(!s(a,d)&&s(t,d)){a[d]=t[d];break}}return a}return u}function s(t,e){return t.hasOwnProperty(e)}function l(t,e){return null!=t[e]&&"auto"!==t[e]}function u(t,e,i){Zl(t,(function(t){e[t]=i[t]}))}u(Xl[0],t,o),u(Xl[1],t,a)}function Jl(t){return Ql({},t)}function Ql(t,e){return e&&t&&Zl(Ul,(function(i){e.hasOwnProperty(i)&&(t[i]=e[i])})),t}O(Yl,"vertical"),O(Yl,"horizontal");var tu,eu,iu,nu=ko(),ou=ol.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,i,n){ol.call(this,t,e,i,n),this.uid=ll("ec_cpt_model")},init:function(t,e,i,n){this.mergeDefaultAndTheme(t,i)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?Jl(t):{};v(t,e.getTheme().get(this.mainType)),v(t,this.getDefaultOption()),i&&$l(t,n,i)},mergeOption:function(t,e){v(this.option,t,!0);var i=this.layoutMode;i&&$l(this.option,t,i)},optionUpdated:function(t,e){},getDefaultOption:function(){var t=nu(this);if(!t.defaultOption){for(var e=[],i=this.constructor;i;){var n=i.prototype.defaultOption;n&&e.push(n),i=i.superClass}for(var o={},a=e.length-1;0<=a;a--)o=v(o,e[a],!0);t.defaultOption=o}return t.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});function au(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}Uo(ou,{registerWhenExtend:!0}),eu={},(tu=ou).registerSubTypeDefaulter=function(t,e){t=Vo(t),eu[t.main]=e},tu.determineSubType=function(t,e){var i=e.type;if(!i){var n=Vo(t).main;tu.hasSubTypes(t)&&eu[n]&&(i=eu[n](e))}return i},iu=function(t){var e=[];return A(ou.getClassesByMainType(t),(function(t){e=e.concat(t.prototype.dependencies||[])})),e=D(e,(function(t){return Vo(t).main})),"dataset"!==t&&S(e,"dataset")<=0&&e.unshift("dataset"),e},ou.topologicalTravel=function(t,e,i,n){if(t.length){var o=function(t){var e={},i=[];return A(t,(function(n){var o=au(e,n),a=function(t,e){var i=[];return A(t,(function(t){0<=S(e,t)&&i.push(t)})),i}(o.originalDeps=iu(n),t);o.entryCount=a.length,0===o.entryCount&&i.push(n),A(a,(function(t){S(o.predecessor,t)<0&&o.predecessor.push(t);var i=au(e,t);S(i.successor,t)<0&&i.successor.push(n)}))})),{graph:e,noEntryList:i}}(e),a=o.graph,r=o.noEntryList,s={};for(A(t,(function(t){s[t]=!0}));r.length;){var l=r.pop(),u=a[l],h=!!s[l];h&&(i.call(n,l,u.originalDeps.slice()),delete s[l]),A(u.successor,h?d:c)}A(s,(function(){throw new Error("Circle dependency may exists")}))}function c(t){a[t].entryCount--,0===a[t].entryCount&&r.push(t)}function d(t){s[t]=!0,c(t)}},I(ou,{getBoxLayoutParams:function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}}});var ru="";"undefined"!=typeof navigator&&(ru=navigator.platform||"");var su={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:ru.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,animation:"auto",animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},lu=ko(),uu={clearColorPalette:function(){lu(this).colorIdx=0,lu(this).colorNameMap={}},getColorFromPalette:function(t,e,i){var n=lu(e=e||this),o=n.colorIdx||0,a=n.colorNameMap=n.colorNameMap||{};if(a.hasOwnProperty(t))return a[t];var r=bo(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=i&&s?function(t,e){for(var i=t.length,n=0;n<i;n++)if(t[n].length>e)return t[n];return t[i-1]}(s,i):r;if((l=l||r)&&l.length){var u=l[o];return t&&(a[t]=u),n.colorIdx=(o+1)%l.length,u}}},hu="original",cu="arrayRows",du="objectRows",fu="keyedColumns",pu="unknown",gu="typedArray";function mu(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===fu?{}:[]),this.sourceFormat=t.sourceFormat||pu,this.seriesLayoutBy=t.seriesLayoutBy||"column",this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&Q(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}mu.seriesDataToSource=function(t){return new mu({data:t,sourceFormat:V(t)?gu:hu,fromDataset:!1})},Wo(mu);var vu=ko();function yu(t){var e=t.option,i=e.data,n=V(i)?gu:hu,o=!1,a=e.seriesLayoutBy,r=e.sourceHeader,s=e.dimensions,l=Su(t);if(l){var u=l.option;i=u.source,n=vu(l).sourceFormat,o=!0,a=a||u.seriesLayoutBy,null==r&&(r=u.sourceHeader),s=s||u.dimensions}var h=function(t,e,i,n,o){if(!t)return{dimensionsDefine:xu(o)};var a,r;if(e===cu)"auto"===n||null==n?_u((function(t){null!=t&&"-"!==t&&(R(t)?null==r&&(r=1):r=0)}),i,t,10):r=n?1:0,o||1!==r||(o=[],_u((function(t,e){o[e]=null!=t?t:""}),i,t)),a=o?o.length:"row"===i?t.length:t[0]?t[0].length:null;else if(e===du)o=o||function(t){for(var e,i=0;i<t.length&&!(e=t[i++]););if(e){var n=[];return A(e,(function(t,e){n.push(e)})),n}}(t);else if(e===fu)o||(o=[],A(t,(function(t,e){o.push(e)})));else if(e===hu){var s=Io(t[0]);a=N(s)&&s.length||1}return{startIndex:r,dimensionsDefine:xu(o),dimensionsDetectCount:a}}(i,n,a,r,s);vu(t).source=new mu({data:i,fromDataset:o,seriesLayoutBy:a,sourceFormat:n,dimensionsDefine:h.dimensionsDefine,startIndex:h.startIndex,dimensionsDetectCount:h.dimensionsDetectCount,encodeDefine:e.encode})}function xu(t){if(t){var e=Q();return D(t,(function(t,i){if(null==(t=x({},z(t)?t:{name:t})).name)return t;t.name+="",null==t.displayName&&(t.displayName=t.name);var n=e.get(t.name);return n?t.name+="-"+n.count++:e.set(t.name,{count:1}),t}))}}function _u(t,e,i,n){if(null==n&&(n=1/0),"row"===e)for(var o=0;o<i.length&&o<n;o++)t(i[o]?i[o][0]:null,o);else{var a=i[0]||[];for(o=0;o<a.length&&o<n;o++)t(a[o],o)}}function wu(t,e,i){var n={},o=Su(e);if(!o||!t)return n;var a,r,s=[],l=[],u=vu(e.ecModel).datasetMap,h=o.uid+"_"+i.seriesLayoutBy;A(t=t.slice(),(function(e,i){z(e)||(t[i]={name:e}),"ordinal"===e.type&&null==a&&(r=f(t[a=i])),n[e.name]=[]}));var c=u.get(h)||u.set(h,{categoryWayDim:r,valueWayDim:0});function d(t,e,i){for(var n=0;n<i;n++)t.push(e+n)}function f(t){var e=t.dimsDef;return e?e.length:1}return A(t,(function(t,e){var i=t.name,o=f(t);if(null==a){var r=c.valueWayDim;d(n[i],r,o),d(l,r,o),c.valueWayDim+=o}else a===e?(d(n[i],0,o),d(s,0,o)):(d(n[i],r=c.categoryWayDim,o),d(l,r,o),c.categoryWayDim+=o)})),s.length&&(n.itemName=s),l.length&&(n.seriesName=l),n}function bu(t,e,i){var n={};if(!Su(t))return n;var o,a=e.sourceFormat,r=e.dimensionsDefine;a!==du&&a!==fu||A(r,(function(t,e){"name"===(z(t)?t.name:t)&&(o=e)}));var s=function(){for(var t={},n={},s=[],l=0,u=Math.min(5,i);l<u;l++){var h=Mu(e.data,a,e.seriesLayoutBy,r,e.startIndex,l);s.push(h);var c=3===h;if(c&&null==t.v&&l!==o&&(t.v=l),null!=t.n&&t.n!==t.v&&(c||3!==s[t.n])||(t.n=l),d(t)&&3!==s[t.n])return t;c||(2===h&&null==n.v&&l!==o&&(n.v=l),null!=n.n&&n.n!==n.v||(n.n=l))}function d(t){return null!=t.v&&null!=t.n}return d(t)?t:d(n)?n:null}();if(s){n.value=s.v;var l=null!=o?o:s.n;n.itemName=[l],n.seriesName=[l]}return n}function Su(t){var e=t.option;if(!e.data)return t.ecModel.getComponent("dataset",e.datasetIndex||0)}function Mu(t,e,i,n,o,a){var r,s,l;if(V(t))return 3;if(n){var u=n[a];z(u)?(s=u.name,l=u.type):R(u)&&(s=u)}if(null!=l)return"ordinal"===l?1:3;if(e===cu)if("row"===i){for(var h=t[a],c=0;c<(h||[]).length&&c<5;c++)if(null!=(r=g(h[o+c])))return r}else for(c=0;c<t.length&&c<5;c++){var d=t[o+c];if(d&&null!=(r=g(d[a])))return r}else if(e===du){if(!s)return 3;for(c=0;c<t.length&&c<5;c++)if((f=t[c])&&null!=(r=g(f[s])))return r}else if(e===fu){if(!s)return 3;if(!(h=t[s])||V(h))return 3;for(c=0;c<h.length&&c<5;c++)if(null!=(r=g(h[c])))return r}else if(e===hu)for(c=0;c<t.length&&c<5;c++){var f,p=Io(f=t[c]);if(!N(p))return 3;if(null!=(r=g(p[a])))return r}function g(t){var e=R(t);return null!=t&&isFinite(t)&&""!==t?e?2:3:e&&"-"!==t?1:void 0}return 3}var Iu="\0_ec_inner",Tu=ol.extend({init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new ol(i),this._optionManager=n},setOption:function(t,e){Y(!(Iu in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e=!1,i=this._optionManager;if(!t||"recreate"===t){var n=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(n)):(function(t){t=t,this.option={},this.option[Iu]=1,this._componentsMap=Q({series:[]}),function(t,e){var i=t.color&&!t.colorLayer;A(e,(function(e,n){"colorLayer"===n&&i||ou.hasClass(n)||("object"==typeof e?t[n]=t[n]?v(t[n],e,!1):m(e):null==t[n]&&(t[n]=e))}))}(t,this._theme.option),v(t,su,!1),this.mergeOption(t)}).call(this,n),e=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var o=i.getTimelineOption(this);o&&(this.mergeOption(o),e=!0)}if(!t||"recreate"===t||"media"===t){var a=i.getMediaOption(this,this._api);a.length&&A(a,(function(t){this.mergeOption(t,e=!0)}),this)}return e},mergeOption:function(t){var e=this.option,i=this._componentsMap,n=[];!function(t){vu(t).datasetMap=Q()}(this),A(t,(function(t,i){null!=t&&(ou.hasClass(i)?i&&n.push(i):e[i]=null==e[i]?m(t):v(e[i],t,!0))})),ou.topologicalTravel(n,ou.getAllClassMainTypes(),(function(n,o){var a=bo(t[n]),r=To(i.get(n),a);Ao(r),A(r,(function(t,e){var i=t.option;z(i)&&(t.keyInfo.mainType=n,t.keyInfo.subType=function(t,e,i){return e.type?e.type:i?i.subType:ou.determineSubType(t,e)}(n,i,t.exist))}));var s=function(t,e){N(e)||(e=e?[e]:[]);var i={};return A(e,(function(e){i[e]=(t.get(e)||[]).slice()})),i}(i,o);e[n]=[],i.set(n,[]),A(r,(function(t,o){var a=t.exist,r=t.option;if(Y(z(r)||a,"Empty component definition"),r){var l=ou.getClass(n,t.keyInfo.subType,!0);if(a&&a.constructor===l)a.name=t.keyInfo.name,a.mergeOption(r,this),a.optionUpdated(r,!1);else{var u=x({dependentModels:s,componentIndex:o},t.keyInfo);x(a=new l(r,this,this,u),u),a.init(r,this,this,u),a.optionUpdated(null,!0)}}else a.mergeOption({},this),a.optionUpdated({},!1);i.get(n)[o]=a,e[n][o]=a.option}),this),"series"===n&&Au(this,i.get("series"))}),this),this._seriesIndicesMap=Q(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var t=m(this.option);return A(t,(function(e,i){if(ou.hasClass(i)){for(var n=(e=bo(e)).length-1;0<=n;n--)Co(e[n])&&e.splice(n,1);t[i]=e}})),delete t[Iu],t},getTheme:function(){return this._theme},getComponent:function(t,e){var i=this._componentsMap.get(t);if(i)return i[e||0]},queryComponents:function(t){var e=t.mainType;if(!e)return[];var i,n=t.index,o=t.id,a=t.name,r=this._componentsMap.get(e);if(!r||!r.length)return[];if(null!=n)N(n)||(n=[n]),i=L(D(n,(function(t){return r[t]})),(function(t){return!!t}));else if(null!=o){var s=N(o);i=L(r,(function(t){return s&&0<=S(o,t.id)||!s&&t.id===o}))}else if(null!=a){var l=N(a);i=L(r,(function(t){return l&&0<=S(a,t.name)||!l&&t.name===a}))}else i=r.slice();return Du(i,t)},findComponents:function(t){var e,i,n,o,a,r=t.mainType,s=(i=r+"Index",n=r+"Id",o=r+"Name",!(e=t.query)||null==e[i]&&null==e[n]&&null==e[o]?null:{mainType:r,index:e[i],id:e[n],name:e[o]});return a=Du(s?this.queryComponents(s):this._componentsMap.get(r),t),t.filter?L(a,t.filter):a},eachComponent:function(t,e,i){var n=this._componentsMap;"function"==typeof t?(i=e,e=t,n.each((function(t,n){A(t,(function(t,o){e.call(i,n,t,o)}))}))):R(t)?A(n.get(t),e,i):z(t)&&A(this.findComponents(t),e,i)},getSeriesByName:function(t){return L(this._componentsMap.get("series"),(function(e){return e.name===t}))},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(t){return L(this._componentsMap.get("series"),(function(e){return e.subType===t}))},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(t,e){A(this._seriesIndices,(function(i){var n=this._componentsMap.get("series")[i];t.call(e,n,i)}),this)},eachRawSeries:function(t,e){A(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,i){A(this._seriesIndices,(function(n){var o=this._componentsMap.get("series")[n];o.subType===t&&e.call(i,o,n)}),this)},eachRawSeriesByType:function(t,e,i){return A(this.getSeriesByType(t),e,i)},isSeriesFiltered:function(t){return null==this._seriesIndicesMap.get(t.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){Au(this,L(this._componentsMap.get("series"),t,e))},restoreData:function(t){var e=this._componentsMap;Au(this,e.get("series"));var i=[];e.each((function(t,e){i.push(e)})),ou.topologicalTravel(i,ou.getAllClassMainTypes(),(function(i,n){A(e.get(i),(function(e){"series"===i&&function(t,e){if(e){var i=e.seiresIndex,n=e.seriesId,o=e.seriesName;return null!=i&&t.componentIndex!==i||null!=n&&t.id!==n||null!=o&&t.name!==o}}(e,t)||e.restoreData()}))}))}});function Au(t,e){t._seriesIndicesMap=Q(t._seriesIndices=D(e,(function(t){return t.componentIndex}))||[])}function Du(t,e){return e.hasOwnProperty("subType")?L(t,(function(t){return t.subType===e.subType})):t}I(Tu,uu);var Cu=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];function Lu(t){A(Cu,(function(e){this[e]=P(t[e],t)}),this)}var ku={};function Pu(){this._coordinateSystems=[]}Pu.prototype={constructor:Pu,create:function(t,e){var i=[];A(ku,(function(n,o){var a=n.create(t,e);i=i.concat(a||[])})),this._coordinateSystems=i},update:function(t,e){A(this._coordinateSystems,(function(i){i.update&&i.update(t,e)}))},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},Pu.register=function(t,e){ku[t]=e},Pu.get=function(t){return ku[t]};var Ou=A,Nu=m,Eu=D,Ru=v,zu=/^(min|max)?(.+)$/;function Bu(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[]}function Vu(t,e,i){var n={width:e,height:i,aspectratio:e/i},o=!0;return A(t,(function(t,e){var i=e.match(zu);if(i&&i[1]&&i[2]){var a=i[1],r=i[2].toLowerCase();!function(t,e,i){return"min"===i?e<=t:"max"===i?t<=e:t===e}(n[r],t,a)&&(o=!1)}})),o}Bu.prototype={constructor:Bu,setOption:function(t,e){t&&A(bo(t.series),(function(t){t&&t.data&&V(t.data)&&K(t.data)})),t=Nu(t);var i=this._optionBackup,n=(function(t,e,i){var n,o,a=[],r=[],s=t.timeline;return t.baseOption&&(o=t.baseOption),(s||t.options)&&(o=o||{},a=(t.options||[]).slice()),t.media&&(o=o||{},Ou(t.media,(function(t){t&&t.option&&(t.query?r.push(t):n=n||t)}))),(o=o||t).timeline||(o.timeline=s),Ou([o].concat(a).concat(D(r,(function(t){return t.option}))),(function(t){Ou(e,(function(e){e(t,i)}))})),{baseOption:o,timelineOptions:a,mediaDefault:n,mediaList:r}}).call(this,t,e,!i);this._newBaseOption=n.baseOption,i?(function(t,e){Ou(e=e||{},(function(e,i){if(null!=e){var n=t[i];if(ou.hasClass(i)){e=bo(e);var o=To(n=bo(n),e);t[i]=Eu(o,(function(t){return t.option&&t.exist?Ru(t.exist,t.option,!0):t.exist||t.option}))}else t[i]=Ru(n,e,!0)}}))}(i.baseOption,n.baseOption),n.timelineOptions.length&&(i.timelineOptions=n.timelineOptions),n.mediaList.length&&(i.mediaList=n.mediaList),n.mediaDefault&&(i.mediaDefault=n.mediaDefault)):this._optionBackup=n},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=Eu(e.timelineOptions,Nu),this._mediaList=Eu(e.mediaList,Nu),this._mediaDefault=Nu(e.mediaDefault),this._currentMediaIndices=[],Nu(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=Nu(i[n.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e=this._api.getWidth(),i=this._api.getHeight(),n=this._mediaList,o=this._mediaDefault,a=[],r=[];if(!n.length&&!o)return r;for(var s=0,l=n.length;s<l;s++)Vu(n[s].query,e,i)&&a.push(s);return!a.length&&o&&(a=[-1]),a.length&&!function(t,e){return t.join(",")===e.join(",")}(a,this._currentMediaIndices)&&(r=Eu(a,(function(t){return Nu(-1===t?o.option:n[t].option)}))),this._currentMediaIndices=a,r}};var Gu=A,Fu=z,Wu=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Hu(t){var e=t&&t.itemStyle;if(e)for(var i=0,n=Wu.length;i<n;i++){var o=Wu[i],a=e.normal,r=e.emphasis;a&&a[o]&&(t[o]=t[o]||{},t[o].normal?v(t[o].normal,a[o]):t[o].normal=a[o],a[o]=null),r&&r[o]&&(t[o]=t[o]||{},t[o].emphasis?v(t[o].emphasis,r[o]):t[o].emphasis=r[o],r[o]=null)}}function Zu(t,e,i){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var n=t[e].normal,o=t[e].emphasis;n&&(i?(t[e].normal=t[e].emphasis=null,_(t[e],n)):t[e]=n),o&&(t.emphasis=t.emphasis||{},t.emphasis[e]=o)}}function Uu(t){Zu(t,"itemStyle"),Zu(t,"lineStyle"),Zu(t,"areaStyle"),Zu(t,"label"),Zu(t,"labelLine"),Zu(t,"upperLabel"),Zu(t,"edgeLabel")}function Xu(t,e){var i=Fu(t)&&t[e],n=Fu(i)&&i.textStyle;if(n)for(var o=0,a=Mo.length;o<a;o++)n.hasOwnProperty(e=Mo[o])&&(i[e]=n[e])}function Yu(t){t&&(Uu(t),Xu(t,"label"),t.emphasis&&Xu(t.emphasis,"label"))}function ju(t){return N(t)?t:t?[t]:[]}function qu(t){return(N(t)?t[0]:t)||{}}function Ku(t){A($u,(function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])}))}var $u=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],Ju=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],Qu=function(t,e){(function(t,e){Gu(ju(t.series),(function(t){Fu(t)&&function(t){if(Fu(t)){Hu(t),Uu(t),Xu(t,"label"),Xu(t,"upperLabel"),Xu(t,"edgeLabel"),t.emphasis&&(Xu(t.emphasis,"label"),Xu(t.emphasis,"upperLabel"),Xu(t.emphasis,"edgeLabel")),(i=t.markPoint)&&(Hu(i),Yu(i)),(n=t.markLine)&&(Hu(n),Yu(n));var e=t.markArea;e&&Yu(e);var i,n,o=t.data;if("graph"===t.type){o=o||t.nodes;var a=t.links||t.edges;if(a&&!V(a))for(var r=0;r<a.length;r++)Yu(a[r]);A(t.categories,(function(t){Uu(t)}))}if(o&&!V(o))for(r=0;r<o.length;r++)Yu(o[r]);if((i=t.markPoint)&&i.data){var s=i.data;for(r=0;r<s.length;r++)Yu(s[r])}if((n=t.markLine)&&n.data){var l=n.data;for(r=0;r<l.length;r++)N(l[r])?(Yu(l[r][0]),Yu(l[r][1])):Yu(l[r])}"gauge"===t.type?(Xu(t,"axisLabel"),Xu(t,"title"),Xu(t,"detail")):"treemap"===t.type?(Zu(t.breadcrumb,"itemStyle"),A(t.levels,(function(t){Uu(t)}))):"tree"===t.type&&Uu(t.leaves)}}(t)}));var i=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&i.push("valueAxis","categoryAxis","logAxis","timeAxis"),Gu(i,(function(e){Gu(ju(t[e]),(function(t){t&&(Xu(t,"axisLabel"),Xu(t.axisPointer,"label"))}))})),Gu(ju(t.parallel),(function(t){var e=t&&t.parallelAxisDefault;Xu(e,"axisLabel"),Xu(e&&e.axisPointer,"label")})),Gu(ju(t.calendar),(function(t){Zu(t,"itemStyle"),Xu(t,"dayLabel"),Xu(t,"monthLabel"),Xu(t,"yearLabel")})),Gu(ju(t.radar),(function(t){Xu(t,"name")})),Gu(ju(t.geo),(function(t){Fu(t)&&(Yu(t),Gu(ju(t.regions),(function(t){Yu(t)})))})),Gu(ju(t.timeline),(function(t){Yu(t),Zu(t,"label"),Zu(t,"itemStyle"),Zu(t,"controlStyle",!0);var e=t.data;N(e)&&A(e,(function(t){z(t)&&(Zu(t,"label"),Zu(t,"itemStyle"))}))})),Gu(ju(t.toolbox),(function(t){Zu(t,"iconStyle"),Gu(t.feature,(function(t){Zu(t,"iconStyle")}))})),Xu(qu(t.axisPointer),"label"),Xu(qu(t.tooltip).axisPointer,"label")})(t,e),t.series=bo(t.series),A(t.series,(function(t){if(z(t)){var e=t.type;if("line"===e)null!=t.clipOverflow&&(t.clip=t.clipOverflow);else if("pie"===e||"gauge"===e)null!=t.clockWise&&(t.clockwise=t.clockWise);else if("gauge"===e){var i=function(t,e){e=e.split(",");for(var i=t,n=0;n<e.length&&null!=(i=i&&i[e[n]]);n++);return i}(t,"pointer.color");null!=i&&function(t,e,i,n){e=e.split(",");for(var o,a=t,r=0;r<e.length-1;r++)null==a[o=e[r]]&&(a[o]={}),a=a[o];null!=a[e[r]]||(a[e[r]]=i)}(t,"itemStyle.color",i)}Ku(t)}})),t.dataRange&&(t.visualMap=t.dataRange),A(Ju,(function(e){var i=t[e];i&&(N(i)||(i=[i]),A(i,(function(t){Ku(t)})))}))};function th(t){A(t,(function(e,i){var n=[],o=[NaN,NaN],a=e.data,r=e.isStackedByIndex,s=a.map([e.stackResultDimension,e.stackedOverDimension],(function(s,l,u){var h,c,d=a.get(e.stackedDimension,u);if(isNaN(d))return o;r?c=a.getRawIndex(u):h=a.get(e.stackedByDimension,u);for(var f=NaN,p=i-1;0<=p;p--){var g=t[p];if(r||(c=g.data.rawIndexOf(g.stackedByDimension,h)),0<=c){var m=g.data.getByRawIndex(g.stackResultDimension,c);if(0<=d&&0<m||d<=0&&m<0){d+=m,f=m;break}}}return n[0]=d,n[1]=f,n}));a.hostModel.setData(s),e.data=s}))}function eh(t,e){mu.isInstance(t)||(t=mu.seriesDataToSource(t)),this._source=t;var i=this._data=t.data,n=t.sourceFormat;n===gu&&(this._offset=0,this._dimSize=e,this._data=i),x(this,nh[n===cu?n+"_"+t.seriesLayoutBy:n])}var ih=eh.prototype;ih.pure=!1;var nh={arrayRows_column:{pure:ih.persistent=!0,count:function(){return Math.max(0,this._data.length-this._source.startIndex)},getItem:function(t){return this._data[t+this._source.startIndex]},appendData:rh},arrayRows_row:{pure:!0,count:function(){var t=this._data[0];return t?Math.max(0,t.length-this._source.startIndex):0},getItem:function(t){t+=this._source.startIndex;for(var e=[],i=this._data,n=0;n<i.length;n++){var o=i[n];e.push(o?o[t]:null)}return e},appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},objectRows:{pure:!0,count:oh,getItem:ah,appendData:rh},keyedColumns:{pure:!0,count:function(){var t=this._data[this._source.dimensionsDefine[0].name];return t?t.length:0},getItem:function(t){for(var e=[],i=this._source.dimensionsDefine,n=0;n<i.length;n++){var o=this._data[i[n].name];e.push(o?o[t]:null)}return e},appendData:function(t){var e=this._data;A(t,(function(t,i){for(var n=e[i]||(e[i]=[]),o=0;o<(t||[]).length;o++)n.push(t[o])}))}},original:{count:oh,getItem:ah,appendData:rh},typedArray:{persistent:!(ih.getSource=function(){return this._source}),pure:!0,count:function(){return this._data?this._data.length/this._dimSize:0},getItem:function(t,e){e=e||[];for(var i=this._dimSize*(t-=this._offset),n=0;n<this._dimSize;n++)e[n]=this._data[i+n];return e},appendData:function(t){this._data=t},clean:function(){this._offset+=this.count(),this._data=null}}};function oh(){return this._data.length}function ah(t){return this._data[t]}function rh(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}var sh={arrayRows:lh,objectRows:function(t,e,i,n){return null!=i?t[n]:t},keyedColumns:lh,original:function(t,e,i,n){var o=Io(t);return null!=i&&o instanceof Array?o[i]:o},typedArray:lh};function lh(t,e,i,n){return null!=i?t[i]:t}var uh={arrayRows:hh,objectRows:function(t,e,i,n){return ch(t[e],this._dimensionInfos[e])},keyedColumns:hh,original:function(t,e,i,n){var o=t&&(null==t.value?t:t.value);return!this._rawData.pure&&function(t){return xo(t)&&!(t instanceof Array)}(t)&&(this.hasItemOption=!0),ch(o instanceof Array?o[n]:o,this._dimensionInfos[e])},typedArray:function(t,e,i,n){return t[n]}};function hh(t,e,i,n){return ch(t[n],this._dimensionInfos[e])}function ch(t,e){var i=e&&e.type;if("ordinal"!==i)return"time"===i&&"number"!=typeof t&&null!=t&&"-"!==t&&(t=+wl(t)),null==t||""===t?NaN:+t;var n=e&&e.ordinalMeta;return n?n.parseAndCollect(t):t}function dh(t,e,i){if(t){var n=t.getRawDataItem(e);if(null!=n){var o,a,r=t.getProvider().getSource().sourceFormat,s=t.getDimensionInfo(i);return s&&(o=s.name,a=s.index),sh[r](n,e,a,o)}}}function fh(t,e,i){if(t){var n=t.getProvider().getSource().sourceFormat;if(n===hu||n===du){var o=t.getRawDataItem(e);return n!==hu||z(o)||(o=null),o?o[i]:void 0}}}var ph=/\{@(.+?)\}/g,gh={getDataParams:function(t,e){var i=this.getData(e),n=this.getRawValue(t,e),o=i.getRawIndex(t),a=i.getName(t),r=i.getRawDataItem(t),s=i.getItemVisual(t,"color"),l=i.getItemVisual(t,"borderColor"),u=this.ecModel.getComponent("tooltip"),h=Ro(u&&u.get("renderMode")),c=this.mainType,d="series"===c,f=i.userOutput;return{componentType:c,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:a,dataIndex:o,data:r,dataType:e,value:n,color:s,borderColor:l,dimensionNames:f?f.dimensionNames:null,encode:f?f.encode:null,marker:Bl({color:s,renderMode:h}),$vars:["seriesName","name","value"]}},getFormattedLabel:function(t,e,i,n,o){e=e||"normal";var a=this.getData(i),r=a.getItemModel(t),s=this.getDataParams(t,i);null!=n&&s.value instanceof Array&&(s.value=s.value[n]);var l=r.get("normal"===e?[o||"label","formatter"]:[e,o||"label","formatter"]);return"function"==typeof l?(s.status=e,s.dimensionIndex=n,l(s)):"string"==typeof l?Rl(l,s).replace(ph,(function(e,i){var n=i.length;return"["===i.charAt(0)&&"]"===i.charAt(n-1)&&(i=+i.slice(1,n-1)),dh(a,t,i)})):void 0},getRawValue:function(t,e){return dh(this.getData(e),t)},formatTooltip:function(){}};function mh(t){return new vh(t)}function vh(t){this._reset=(t=t||{}).reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}var yh=vh.prototype;yh.perform=function(t){var e,i=this._upstream,n=t&&t.skip;if(this._dirty&&i){var o=this.context;o.data=o.outputData=i.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!n&&(e=this._plan(this.context));var a,r=h(this._modBy),s=this._modDataCount||0,l=h(t&&t.modBy),u=t&&t.modDataCount||0;function h(t){return 1<=t||(t=1),t}r===l&&s===u||(e="reset"),!this._dirty&&"reset"!==e||(this._dirty=!1,a=function(t,e){var i,n;t._dueIndex=t._outputDueEnd=t._dueEnd=0,t._settedOutputEnd=null,!e&&t._reset&&((i=t._reset(t.context))&&i.progress&&(n=i.forceFirstProgress,i=i.progress),N(i)&&!i.length&&(i=null)),t._progress=i,t._modBy=t._modDataCount=null;var o=t._downstream;return o&&o.dirty(),n}(this,n)),this._modBy=l,this._modDataCount=u;var c=t&&t.step;if(this._dueEnd=i?i._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,f=Math.min(null!=c?this._dueIndex+c:1/0,this._dueEnd);if(!n&&(a||d<f)){var p=this._progress;if(N(p))for(var g=0;g<p.length;g++)Dh(this,p[g],d,f,l,u);else Dh(this,p,d,f,l,u)}this._dueIndex=f,this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:f}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()};var xh,_h,wh,bh,Sh,Mh,Ih=Mh={reset:function(t,e,i,n){_h=t,xh=e,wh=i,bh=n,Sh=Math.ceil(bh/wh),Mh.next=1<wh&&0<bh?Ah:Th}};function Th(){return _h<xh?_h++:null}function Ah(){var t=_h%Sh*wh+Math.ceil(_h/Sh),e=xh<=_h?null:t<bh?t:_h;return _h++,e}function Dh(t,e,i,n,o,a){Ih.reset(i,n,o,a),t._callingProgress=e,t._callingProgress({start:i,end:n,count:n-i,next:Ih.next},t.context)}yh.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},yh.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},yh.pipe=function(t){this._downstream===t&&!this._dirty||((this._downstream=t)._upstream=this,t.dirty())},yh.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},yh.getUpstream=function(){return this._upstream},yh.getDownstream=function(){return this._downstream},yh.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t};var Ch=ko(),Lh=ou.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendVisualProvider:null,visualColorAccessPath:"itemStyle.color",visualBorderColorAccessPath:"itemStyle.borderColor",layoutMode:null,init:function(t,e,i,n){this.seriesIndex=this.componentIndex,this.dataTask=mh({count:Ph,reset:Oh}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,i),yu(this);var o=this.getInitialData(t,i);Eh(o,this),this.dataTask.context.data=o,Ch(this).dataBeforeProcessed=o,kh(this)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?Jl(t):{},o=this.subType;ou.hasClass(o)&&(o+="Series"),v(t,e.getTheme().get(this.subType)),v(t,this.getDefaultOption()),So(t,"label",["show"]),this.fillDataTextStyle(t.data),i&&$l(t,n,i)},mergeOption:function(t,e){t=v(this.option,t,!0),this.fillDataTextStyle(t.data);var i=this.layoutMode;i&&$l(this.option,t,i),yu(this);var n=this.getInitialData(t,e);Eh(n,this),this.dataTask.dirty(),this.dataTask.context.data=n,Ch(this).dataBeforeProcessed=n,kh(this)},fillDataTextStyle:function(t){if(t&&!V(t))for(var e=["show"],i=0;i<t.length;i++)t[i]&&t[i].label&&So(t[i],"label",e)},getInitialData:function(){},appendData:function(t){this.getRawData().appendData(t.data)},getData:function(t){var e=zh(this);if(e){var i=e.context.data;return null==t?i:i.getLinkedData(t)}return Ch(this).data},setData:function(t){var e=zh(this);if(e){var i=e.context;i.data!==t&&e.modifyOutputEnd&&e.setOutputEnd(t.count()),i.outputData=t,e!==this.dataTask&&(i.data=t)}Ch(this).data=t},getSource:function(){return function(t){return vu(t).source}(this)},getRawData:function(){return Ch(this).dataBeforeProcessed},getBaseAxis:function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},formatTooltip:function(t,e,i,n){var o=this,a="html"===(n=n||"html")?"<br/>":"\n",r="richText"===n,s={},l=0,u=this.getData(),h=u.mapDimension("defaultedTooltip",!0),c=h.length,d=this.getRawValue(t),f=N(d),p=u.getItemVisual(t,"color");z(p)&&p.colorStops&&(p=(p.colorStops[0]||{}).color),p=p||"transparent";var g=(1<c||f&&!c?function(i){var a=C(i,(function(t,e,i){var n=u.getDimensionInfo(i);return t|(n&&!1!==n.tooltip&&null!=n.displayName)}),0),c=[];function d(t,i){var h=u.getDimensionInfo(i);if(h&&!1!==h.otherDims.tooltip){var d=h.type,f="sub"+o.seriesIndex+"at"+l,g=Bl({color:p,type:"subItem",renderMode:n,markerId:f}),m=(a?("string"==typeof g?g:g.content)+Ol(h.displayName||"-")+": ":"")+Ol("ordinal"===d?t+"":"time"===d?e?"":Gl("yyyy/MM/dd hh:mm:ss",t):Dl(t));m&&c.push(m),r&&(s[f]=p,++l)}}h.length?A(h,(function(e){d(dh(u,t,e),e)})):A(i,d);var f=a?r?"\n":"<br/>":"",g=f+c.join(f||", ");return{renderMode:n,content:g,style:s}}(d):function(t){return{renderMode:n,content:Ol(Dl(t)),style:s}}(c?dh(u,t,h[0]):f?d[0]:d)).content,m=o.seriesIndex+"at"+l,v=Bl({color:p,type:"item",renderMode:n,markerId:m});s[m]=p,++l;var y=u.getName(t),x=this.name;Do(this)||(x=""),x=x?Ol(x)+(e?": ":a):"";var _="string"==typeof v?v:v.content;return{html:e?_+x+g:x+_+(y?Ol(y)+": "+g:g),markers:s}},isAnimationEnabled:function(){if(o.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,i){var n=this.ecModel;return uu.getColorFromPalette.call(this,t,e,i)||n.getColorFromPalette(t,e,i)},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});function kh(t){var e=t.name;Do(t)||(t.name=function(t){var e=t.getRawData(),i=e.mapDimension("seriesName",!0),n=[];return A(i,(function(t){var i=e.getDimensionInfo(t);i.displayName&&n.push(i.displayName)})),n.join(" ")}(t)||e)}function Ph(t){return t.model.getRawData().count()}function Oh(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),Nh}function Nh(t,e){t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Eh(t,e){A(t.CHANGABLE_METHODS,(function(i){t.wrapMethod(i,O(Rh,e))}))}function Rh(t){var e=zh(t);e&&e.setOutputEnd(this.count())}function zh(t){var e=(t.ecModel||{}).scheduler,i=e&&e.getPipeline(t.uid);if(i){var n=i.currentTask;if(n){var o=n.agentStubMap;o&&(n=o.get(t.uid))}return n}}I(Lh,gh),I(Lh,uu);var Bh=function(){this.group=new yi,this.uid=ll("viewComponent")},Vh=Bh.prototype={constructor:Bh,init:function(t,e){},render:function(t,e,i,n){},dispose:function(){},filterForExposedEvent:null};function Gh(){var t=ko();return function(e){var i=t(e),n=e.pipelineContext,o=i.large,a=i.progressiveRender,r=i.large=n.large,s=i.progressiveRender=n.progressiveRender;return!!(o^r||a^s)&&"reset"}}Vh.updateView=Vh.updateLayout=Vh.updateVisual=function(t,e,i,n){},Go(Bh),Uo(Bh,{registerWhenExtend:!0});var Fh=ko(),Wh=Gh();function Hh(){this.group=new yi,this.uid=ll("viewChart"),this.renderTask=mh({plan:Yh,reset:jh}),this.renderTask.context={view:this}}var Zh=Hh.prototype={type:"chart",init:function(t,e){},render:function(t,e,i,n){},highlight:function(t,e,i,n){Xh(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){Xh(t.getData(),n,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};function Uh(t,e,i){if(t&&(t.trigger(e,i),t.isGroup&&!Ds(t)))for(var n=0,o=t.childCount();n<o;n++)Uh(t.childAt(n),e,i)}function Xh(t,e,i){var n=Lo(t,e),o=e&&null!=e.highlightKey?Cs(e.highlightKey):null;null!=n?A(bo(n),(function(e){Uh(t.getItemGraphicEl(e),i,o)})):t.eachItemGraphicEl((function(t){Uh(t,i,o)}))}function Yh(t){return Wh(t.model)}function jh(t){var e=t.model,i=t.ecModel,n=t.api,o=t.payload,a=e.pipelineContext.progressiveRender,r=t.view,s=o&&Fh(o).updateMethod,l=a?"incrementalPrepareRender":s&&r[s]?s:"render";return"render"!==l&&r[l](e,i,n,o),qh[l]}Zh.updateView=Zh.updateLayout=Zh.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},Go(Hh),Uo(Hh,{registerWhenExtend:!0}),Hh.markUpdateMethod=function(t,e){Fh(t).updateMethod=e};var qh={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)}}},Kh="\0__throttleOriginMethod",$h="\0__throttleRate",Jh="\0__throttleType";function Qh(t,e,i){var n,o,a,r,s,l=0,u=0,h=null;function c(){u=(new Date).getTime(),h=null,t.apply(a,r||[])}function d(){n=(new Date).getTime(),a=this,r=arguments;var t=s||e,d=s||i;s=null,o=n-(d?l:u)-t,clearTimeout(h),d?h=setTimeout(c,t):0<=o?c():h=setTimeout(c,-o),l=n}return e=e||0,d.clear=function(){h&&(clearTimeout(h),h=null)},d.debounceNextCall=function(t){s=t},d}function tc(t,e,i,n){var o=t[e];if(o){var a=o[Kh]||o;if(o[$h]!==i||o[Jh]!==n){if(null==i||!n)return t[e]=a;(o=t[e]=Qh(a,i,"debounce"===n))[Kh]=a,o[Jh]=n,o[$h]=i}return o}}function ec(t,e){var i=t[e];i&&i[Kh]&&(t[e]=i[Kh])}var ic={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var i=t.getData(),n=(t.visualColorAccessPath||"itemStyle.color").split("."),o=t.get(n),a=!E(o)||o instanceof Wr?null:o;o&&!a||(o=t.getColorFromPalette(t.name,null,e.getSeriesCount())),i.setVisual("color",o);var r=(t.visualBorderColorAccessPath||"itemStyle.borderColor").split("."),s=t.get(r);if(i.setVisual("borderColor",s),!e.isSeriesFiltered(t))return a&&i.each((function(e){i.setItemVisual(e,"color",a(t.getDataParams(e)))})),{dataEach:i.hasItemOption?function(t,e){var i=t.getItemModel(e),o=i.get(n,!0),a=i.get(r,!0);null!=o&&t.setItemVisual(e,"color",o),null!=a&&t.setItemVisual(e,"borderColor",a)}:null}}},nc={legend:{selector:{all:"\u5168\u9009",inverse:"\u53cd\u9009"}},toolbox:{brush:{title:{rect:"\u77e9\u5f62\u9009\u62e9",polygon:"\u5708\u9009",lineX:"\u6a2a\u5411\u9009\u62e9",lineY:"\u7eb5\u5411\u9009\u62e9",keep:"\u4fdd\u6301\u9009\u62e9",clear:"\u6e05\u9664\u9009\u62e9"}},dataView:{title:"\u6570\u636e\u89c6\u56fe",lang:["\u6570\u636e\u89c6\u56fe","\u5173\u95ed","\u5237\u65b0"]},dataZoom:{title:{zoom:"\u533a\u57df\u7f29\u653e",back:"\u533a\u57df\u7f29\u653e\u8fd8\u539f"}},magicType:{title:{line:"\u5207\u6362\u4e3a\u6298\u7ebf\u56fe",bar:"\u5207\u6362\u4e3a\u67f1\u72b6\u56fe",stack:"\u5207\u6362\u4e3a\u5806\u53e0",tiled:"\u5207\u6362\u4e3a\u5e73\u94fa"}},restore:{title:"\u8fd8\u539f"},saveAsImage:{title:"\u4fdd\u5b58\u4e3a\u56fe\u7247",lang:["\u53f3\u952e\u53e6\u5b58\u4e3a\u56fe\u7247"]}},series:{typeNames:{pie:"\u997c\u56fe",bar:"\u67f1\u72b6\u56fe",line:"\u6298\u7ebf\u56fe",scatter:"\u6563\u70b9\u56fe",effectScatter:"\u6d9f\u6f2a\u6563\u70b9\u56fe",radar:"\u96f7\u8fbe\u56fe",tree:"\u6811\u56fe",treemap:"\u77e9\u5f62\u6811\u56fe",boxplot:"\u7bb1\u578b\u56fe",candlestick:"K\u7ebf\u56fe",k:"K\u7ebf\u56fe",heatmap:"\u70ed\u529b\u56fe",map:"\u5730\u56fe",parallel:"\u5e73\u884c\u5750\u6807\u56fe",lines:"\u7ebf\u56fe",graph:"\u5173\u7cfb\u56fe",sankey:"\u6851\u57fa\u56fe",funnel:"\u6f0f\u6597\u56fe",gauge:"\u4eea\u8868\u76d8\u56fe",pictorialBar:"\u8c61\u5f62\u67f1\u56fe",themeRiver:"\u4e3b\u9898\u6cb3\u6d41\u56fe",sunburst:"\u65ed\u65e5\u56fe"}},aria:{general:{withTitle:"\u8fd9\u662f\u4e00\u4e2a\u5173\u4e8e\u201c{title}\u201d\u7684\u56fe\u8868\u3002",withoutTitle:"\u8fd9\u662f\u4e00\u4e2a\u56fe\u8868\uff0c"},series:{single:{prefix:"",withName:"\u56fe\u8868\u7c7b\u578b\u662f{seriesType}\uff0c\u8868\u793a{seriesName}\u3002",withoutName:"\u56fe\u8868\u7c7b\u578b\u662f{seriesType}\u3002"},multiple:{prefix:"\u5b83\u7531{seriesCount}\u4e2a\u56fe\u8868\u7cfb\u5217\u7ec4\u6210\u3002",withName:"\u7b2c{seriesId}\u4e2a\u7cfb\u5217\u662f\u4e00\u4e2a\u8868\u793a{seriesName}\u7684{seriesType}\uff0c",withoutName:"\u7b2c{seriesId}\u4e2a\u7cfb\u5217\u662f\u4e00\u4e2a{seriesType}\uff0c",separator:{middle:"\uff1b",end:"\u3002"}}},data:{allData:"\u5176\u6570\u636e\u662f\u2014\u2014",partialData:"\u5176\u4e2d\uff0c\u524d{displayCnt}\u9879\u662f\u2014\u2014",withName:"{name}\u7684\u6570\u636e\u662f{value}",withoutName:"{value}",separator:{middle:"\uff0c",end:""}}}},oc=Math.PI;function ac(t,e,i,n){this.ecInstance=t,this.api=e,i=this._dataProcessorHandlers=i.slice(),n=this._visualHandlers=n.slice(),this._allHandlers=i.concat(n),this._stageTaskMap=Q()}var rc=ac.prototype;function sc(t,e,i,n,o){var a;function r(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}o=o||{},A(e,(function(e,s){if(!o.visualType||o.visualType===e.visualType){var l=t._stageTaskMap.get(e.uid),u=l.seriesTaskMap,h=l.overallTask;if(h){var c,d=h.agentStubMap;d.each((function(t){r(o,t)&&(t.dirty(),c=!0)})),c&&h.dirty(),lc(h,n);var f=t.getPerformArgs(h,o.block);d.each((function(t){t.perform(f)})),a|=h.perform(f)}else u&&u.each((function(s,l){r(o,s)&&s.dirty();var u=t.getPerformArgs(s,o.block);u.skip=!e.performRawSeries&&i.isSeriesFiltered(s.context.model),lc(s,n),a|=s.perform(u)}))}})),t.unfinished|=a}rc.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each((function(t){var e=t.overallTask;e&&e.dirty()}))},rc.getPerformArgs=function(t,e){if(t.__pipeline){var i=this._pipelineMap.get(t.__pipeline.id),n=i.context,o=!e&&i.progressiveEnabled&&(!n||n.progressiveRender)&&t.__idxInPipeline>i.blockIndex?i.step:null,a=n&&n.modDataCount;return{step:o,modBy:null!=a?Math.ceil(a/o):null,modDataCount:a}}},rc.getPipeline=function(t){return this._pipelineMap.get(t)},rc.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),n=t.getData().count(),o=i.progressiveEnabled&&e.incrementalPrepareRender&&n>=i.threshold,a=t.get("large")&&n>=t.get("largeThreshold"),r="mod"===t.get("progressiveChunkMode")?n:null;t.pipelineContext=i.context={progressiveRender:o,modDataCount:r,large:a}},rc.restorePipelines=function(t){var e=this,i=e._pipelineMap=Q();t.eachSeries((function(t){var n=t.getProgressive(),o=t.uid;i.set(o,{id:o,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:n&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(n||700),count:0}),yc(e,t,t.dataTask)}))},rc.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.ecInstance.getModel(),i=this.api;A(this._allHandlers,(function(n){var o=t.get(n.uid)||t.set(n.uid,[]);n.reset&&function(t,e,i,n,o){var a=i.seriesTaskMap||(i.seriesTaskMap=Q()),r=e.seriesType,s=e.getTargetSeries;function l(i){var r=i.uid,s=a.get(r)||a.set(r,mh({plan:fc,reset:pc,count:vc}));s.context={model:i,ecModel:n,api:o,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:t},yc(t,i,s)}e.createOnAllSeries?n.eachRawSeries(l):r?n.eachRawSeriesByType(r,l):s&&s(n,o).each(l);var u=t._pipelineMap;a.each((function(t,e){u.get(e)||(t.dispose(),a.removeKey(e))}))}(this,n,o,e,i),n.overallReset&&function(t,e,i,n,o){var a=i.overallTask=i.overallTask||mh({reset:uc});a.context={ecModel:n,api:o,overallReset:e.overallReset,scheduler:t};var r=a.agentStubMap=a.agentStubMap||Q(),s=e.seriesType,l=e.getTargetSeries,u=!0,h=e.modifyOutputEnd;function c(e){var i=e.uid,n=r.get(i);n||(n=r.set(i,mh({reset:hc,onDirty:dc})),a.dirty()),n.context={model:e,overallProgress:u,modifyOutputEnd:h},n.agent=a,n.__block=u,yc(t,e,n)}s?n.eachRawSeriesByType(s,c):l?l(n,o).each(c):(u=!1,A(n.getSeries(),c));var d=t._pipelineMap;r.each((function(t,e){d.get(e)||(t.dispose(),a.dirty(),r.removeKey(e))}))}(this,n,o,e,i)}),this)},rc.prepareView=function(t,e,i,n){var o=t.renderTask,a=o.context;a.model=e,a.ecModel=i,a.api=n,o.__block=!t.incrementalPrepareRender,yc(this,e,o)},rc.performDataProcessorTasks=function(t,e){sc(this,this._dataProcessorHandlers,t,e,{block:!0})},rc.performVisualTasks=function(t,e,i){sc(this,this._visualHandlers,t,e,i)},rc.performSeriesTasks=function(t){var e;t.eachSeries((function(t){e|=t.dataTask.perform()})),this.unfinished|=e},rc.plan=function(){this._pipelineMap.each((function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)}))};var lc=rc.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)};function uc(t){t.overallReset(t.ecModel,t.api,t.payload)}function hc(t,e){return t.overallProgress&&cc}function cc(){this.agent.dirty(),this.getDownstream().dirty()}function dc(){this.agent&&this.agent.dirty()}function fc(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function pc(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=bo(t.reset(t.model,t.ecModel,t.api,t.payload));return 1<e.length?D(e,(function(t,e){return mc(e)})):gc}var gc=mc(0);function mc(t){return function(e,i){var n=i.data,o=i.resetDefines[t];if(o&&o.dataEach)for(var a=e.start;a<e.end;a++)o.dataEach(n,a);else o&&o.progress&&o.progress(e,n)}}function vc(t){return t.data.count()}function yc(t,e,i){var n=t._pipelineMap.get(e.uid);n.head||(n.head=i),n.tail&&n.tail.pipe(i),(n.tail=i).__idxInPipeline=n.count++,i.__pipeline=n}ac.wrapStageHandler=function(t,e){return E(t)&&(t={overallReset:t,seriesType:function(t){xc=null;try{t(_c,wc)}catch(t){}return xc}(t)}),t.uid=ll("stageHandler"),e&&(t.visualType=e),t};var xc,_c={},wc={};function bc(t,e){for(var i in e.prototype)t[i]=et}function Sc(){return{axisLine:{lineStyle:{color:Tc}},axisTick:{lineStyle:{color:Tc}},axisLabel:{textStyle:{color:Tc}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:Tc}}}}bc(_c,Tu),bc(wc,Lu),_c.eachSeriesByType=_c.eachRawSeriesByType=function(t){xc=t},_c.eachComponent=function(t){"series"===t.mainType&&t.subType&&(xc=t.subType)};var Mc=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],Ic={color:Mc,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],Mc]},Tc="#eee",Ac=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],Dc={color:Ac,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:Tc},crossStyle:{color:Tc},label:{color:"#000"}}},legend:{textStyle:{color:Tc}},textStyle:{color:Tc},title:{textStyle:{color:Tc}},toolbox:{iconStyle:{normal:{borderColor:Tc}}},dataZoom:{textStyle:{color:Tc}},visualMap:{textStyle:{color:Tc}},timeline:{lineStyle:{color:Tc},itemStyle:{normal:{color:Ac[1]}},label:{normal:{textStyle:{color:Tc}}},controlStyle:{normal:{color:Tc,borderColor:Tc}}},timeAxis:Sc(),logAxis:Sc(),valueAxis:Sc(),categoryAxis:Sc(),line:{symbol:"circle"},graph:{color:Ac},gauge:{title:{textStyle:{color:Tc}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};Dc.categoryAxis.splitLine.show=!1,ou.extend({type:"dataset",defaultOption:{seriesLayoutBy:"column",sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){!function(t){var e=t.option.source,i=pu;if(V(e))i=gu;else if(N(e)){0===e.length&&(i=cu);for(var n=0,o=e.length;n<o;n++){var a=e[n];if(null!=a){if(N(a)){i=cu;break}if(z(a)){i=du;break}}}}else if(z(e)){for(var r in e)if(e.hasOwnProperty(r)&&T(e[r])){i=fu;break}}else if(null!=e)throw new Error("Invalid data");vu(t).sourceFormat=i}(this)}}),Bh.extend({type:"dataset"});var Cc=ar.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(t,e){var i=e.cx,n=e.cy,o=e.rx,a=e.ry,r=.5522848*o,s=.5522848*a;t.moveTo(i-o,n),t.bezierCurveTo(i-o,n-s,i-r,n-a,i,n-a),t.bezierCurveTo(i+r,n-a,i+o,n-s,i+o,n),t.bezierCurveTo(i+o,n+s,i+r,n+a,i,n+a),t.bezierCurveTo(i-r,n+a,i-o,n+s,i-o,n),t.closePath()}}),Lc=/[\s,]+/;function kc(t){for(R(t)&&(t=(new DOMParser).parseFromString(t,"text/xml")),9===t.nodeType&&(t=t.firstChild);"svg"!==t.nodeName.toLowerCase()||1!==t.nodeType;)t=t.nextSibling;return t}function Pc(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}Pc.prototype.parse=function(t,e){e=e||{};var i=kc(t);if(!i)throw new Error("Illegal svg");var n=new yi;this._root=n;var o=i.getAttribute("viewBox")||"",a=parseFloat(i.getAttribute("width")||e.width),r=parseFloat(i.getAttribute("height")||e.height);isNaN(a)&&(a=null),isNaN(r)&&(r=null),Bc(i,n,null,!0);for(var s,l,u=i.firstChild;u;)this._parseNode(u,n),u=u.nextSibling;if(o){var h=j(o).split(Lc);4<=h.length&&(s={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(s&&null!=a&&null!=r&&(l=Hc(s,a,r),!e.ignoreViewBox)){var c=n;(n=new yi).add(c),c.scale=l.scale.slice(),c.position=l.position.slice()}return e.ignoreRootClip||null==a||null==r||n.setClipPath(new zr({shape:{x:0,y:0,width:a,height:r}})),{root:n,width:a,height:r,viewBoxRect:s,viewBoxTransform:l}},Pc.prototype._parseNode=function(t,e){var i,n,o=t.nodeName.toLowerCase();if("defs"===o?this._isDefine=!0:"text"===o&&(this._isText=!0),this._isDefine){if(n=Nc[o]){var a=n.call(this,t),r=t.getAttribute("id");r&&(this._defs[r]=a)}}else(n=Oc[o])&&(i=n.call(this,t,e),e.add(i));for(var s=t.firstChild;s;)1===s.nodeType&&this._parseNode(s,i),3===s.nodeType&&this._isText&&this._parseText(s,i),s=s.nextSibling;"defs"===o?this._isDefine=!1:"text"===o&&(this._isText=!1)},Pc.prototype._parseText=function(t,e){if(1===t.nodeType){var i=t.getAttribute("dx")||0,n=t.getAttribute("dy")||0;this._textX+=parseFloat(i),this._textY+=parseFloat(n)}var o=new br({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});Ec(e,o),Bc(t,o,this._defs);var a=o.style.fontSize;a&&a<9&&(o.style.fontSize=9,o.scale=o.scale||[1,1],o.scale[0]*=a/9,o.scale[1]*=a/9);var r=o.getBoundingRect();return this._textX+=r.width,e.add(o),o};var Oc={g:function(t,e){var i=new yi;return Ec(e,i),Bc(t,i,this._defs),i},rect:function(t,e){var i=new zr;return Ec(e,i),Bc(t,i,this._defs),i.setShape({x:parseFloat(t.getAttribute("x")||0),y:parseFloat(t.getAttribute("y")||0),width:parseFloat(t.getAttribute("width")||0),height:parseFloat(t.getAttribute("height")||0)}),i},circle:function(t,e){var i=new Mr;return Ec(e,i),Bc(t,i,this._defs),i.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),r:parseFloat(t.getAttribute("r")||0)}),i},line:function(t,e){var i=new Vr;return Ec(e,i),Bc(t,i,this._defs),i.setShape({x1:parseFloat(t.getAttribute("x1")||0),y1:parseFloat(t.getAttribute("y1")||0),x2:parseFloat(t.getAttribute("x2")||0),y2:parseFloat(t.getAttribute("y2")||0)}),i},ellipse:function(t,e){var i=new Cc;return Ec(e,i),Bc(t,i,this._defs),i.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),rx:parseFloat(t.getAttribute("rx")||0),ry:parseFloat(t.getAttribute("ry")||0)}),i},polygon:function(t,e){var i=t.getAttribute("points");i=i&&Rc(i);var n=new Lr({shape:{points:i||[]}});return Ec(e,n),Bc(t,n,this._defs),n},polyline:function(t,e){var i=new ar;Ec(e,i),Bc(t,i,this._defs);var n=t.getAttribute("points");return n=n&&Rc(n),new kr({shape:{points:n||[]}})},image:function(t,e){var i=new zn;return Ec(e,i),Bc(t,i,this._defs),i.setStyle({image:t.getAttribute("xlink:href"),x:t.getAttribute("x"),y:t.getAttribute("y"),width:t.getAttribute("width"),height:t.getAttribute("height")}),i},text:function(t,e){var i=t.getAttribute("x")||0,n=t.getAttribute("y")||0,o=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0;this._textX=parseFloat(i)+parseFloat(o),this._textY=parseFloat(n)+parseFloat(a);var r=new yi;return Ec(e,r),Bc(t,r,this._defs),r},tspan:function(t,e){var i=t.getAttribute("x"),n=t.getAttribute("y");null!=i&&(this._textX=parseFloat(i)),null!=n&&(this._textY=parseFloat(n));var o=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0,r=new yi;return Ec(e,r),Bc(t,r,this._defs),this._textX+=o,this._textY+=a,r},path:function(t,e){var i=wr(t.getAttribute("d")||"");return Ec(e,i),Bc(t,i,this._defs),i}},Nc={lineargradient:function(t){var e=new Xr(parseInt(t.getAttribute("x1")||0,10),parseInt(t.getAttribute("y1")||0,10),parseInt(t.getAttribute("x2")||10,10),parseInt(t.getAttribute("y2")||0,10));return function(t,e){for(var i=t.firstChild;i;){if(1===i.nodeType){var n=i.getAttribute("offset");n=0<n.indexOf("%")?parseInt(n,10)/100:n?parseFloat(n):0;var o=i.getAttribute("stop-color")||"#000000";e.addColorStop(n,o)}i=i.nextSibling}}(t,e),e},radialgradient:function(t){}};function Ec(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),_(e.__inheritedStyle,t.__inheritedStyle))}function Rc(t){for(var e=j(t).split(Lc),i=[],n=0;n<e.length;n+=2){var o=parseFloat(e[n]),a=parseFloat(e[n+1]);i.push([o,a])}return i}var zc={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-align":"textAlign","alignment-baseline":"textBaseline"};function Bc(t,e,i,n){var o=e.__inheritedStyle||{},a="text"===e.type;if(1===t.nodeType&&(function(t,e){var i=t.getAttribute("transform");if(i){i=i.replace(/,/g," ");var n=null,o=[];i.replace(Fc,(function(t,e,i){o.push(e,i)}));for(var a=o.length-1;0<a;a-=2){var r=o[a],s=o[a-1];switch(n=n||Jt(),s){case"translate":r=j(r).split(Lc),ie(n,n,[parseFloat(r[0]),parseFloat(r[1]||0)]);break;case"scale":r=j(r).split(Lc),oe(n,n,[parseFloat(r[0]),parseFloat(r[1]||r[0])]);break;case"rotate":r=j(r).split(Lc),ne(n,n,parseFloat(r[0]));break;case"skew":r=j(r).split(Lc),console.warn("Skew transform is not supported yet");break;case"matrix":r=j(r).split(Lc),n[0]=parseFloat(r[0]),n[1]=parseFloat(r[1]),n[2]=parseFloat(r[2]),n[3]=parseFloat(r[3]),n[4]=parseFloat(r[4]),n[5]=parseFloat(r[5])}}e.setLocalTransform(n)}}(t,e),x(o,function(t){var e=t.getAttribute("style"),i={};if(!e)return i;var n,o={};for(Wc.lastIndex=0;null!=(n=Wc.exec(e));)o[n[1]]=n[2];for(var a in zc)zc.hasOwnProperty(a)&&null!=o[a]&&(i[zc[a]]=o[a]);return i}(t)),!n))for(var r in zc)if(zc.hasOwnProperty(r)){var s=t.getAttribute(r);null!=s&&(o[zc[r]]=s)}var l=a?"textFill":"fill",u=a?"textStroke":"stroke";e.style=e.style||new Li;var h=e.style;null!=o.fill&&h.set(l,Gc(o.fill,i)),null!=o.stroke&&h.set(u,Gc(o.stroke,i)),A(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],(function(t){null!=o[t]&&h.set("lineWidth"===t&&a?"textStrokeWidth":t,parseFloat(o[t]))})),o.textBaseline&&"auto"!==o.textBaseline||(o.textBaseline="alphabetic"),"alphabetic"===o.textBaseline&&(o.textBaseline="bottom"),"start"===o.textAlign&&(o.textAlign="left"),"end"===o.textAlign&&(o.textAlign="right"),A(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],(function(t){null!=o[t]&&h.set(t,o[t])})),o.lineDash&&(e.style.lineDash=j(o.lineDash).split(Lc)),h[u]&&"none"!==h[u]&&(e[u]=!0),e.__inheritedStyle=o}var Vc=/url\(\s*#(.*?)\)/;function Gc(t,e){var i=e&&t&&t.match(Vc);return i?e[j(i[1])]:t}var Fc=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g,Wc=/([^\s:;]+)\s*:\s*([^:;]+)/g;function Hc(t,e,i){var n=Math.min(e/t.width,i/t.height);return{scale:[n,n],position:[-(t.x+t.width/2)*n+e/2,-(t.y+t.height/2)*n+i/2]}}var Zc=Q(),Uc=function(t){return Zc.get(t)},Xc={geoJSON:function(t){var e=t.source;t.geoJSON=R(e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=kc(t.source)}},Yc=Y,jc=A,qc=E,Kc=z,$c=ou.parseClassType,Jc={PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:2e3,CHART:3e3,POST_CHART_LAYOUT:3500,COMPONENT:4e3,BRUSH:5e3}},Qc="__flagInMainProcess",td="__optionUpdated",ed=/^[a-zA-Z0-9_]+$/;function id(t,e){return function(i,n,o){!e&&this._disposed||(i=i&&i.toLowerCase(),At.prototype[t].call(this,i,n,o))}}function nd(){At.call(this)}function od(t,e,i){i=i||{},"string"==typeof e&&(e=Dd[e]),this._dom=t;var n=this._zr=po(t,{renderer:i.renderer||"canvas",devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height});this._throttledZrFlush=Qh(P(n.flush,n),17),(e=m(e))&&Qu(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new Pu;var o=this._api=function(t){var e=t._coordSysMgr;return x(new Lu(t),{getCoordinateSystems:P(e.getCoordinateSystems,e),getComponentByElement:function(e){for(;e;){var i=e.__ecComponentInfo;if(null!=i)return t._model.getComponent(i.mainType,i.index);e=e.parent}}})}(this);function a(t,e){return t.__prio-e.__prio}Mi(Ad,a),Mi(Md,a),this._scheduler=new ac(this,o,Md,Ad),At.call(this,this._ecEventProcessor=new wd),this._messageCenter=new nd,this._initEvents(),this.resize=P(this.resize,this),this._pendingActions=[],n.animation.on("frame",this._onframe,this),function(t,e){t.on("rendered",(function(){e.trigger("rendered"),!t.animation.isFinished()||e[td]||e._scheduler.unfinished||e._pendingActions.length||e.trigger("finished")}))}(n,this),K(this)}nd.prototype.on=id("on",!0),nd.prototype.off=id("off",!0),nd.prototype.one=id("one",!0),I(nd,At);var ad=od.prototype;function rd(t,e,i){if(!this._disposed){var n,o=this._model,a=this._coordSysMgr.getCoordinateSystems();e=Oo(o,e);for(var r=0;r<a.length;r++){var s=a[r];if(s[t]&&null!=(n=s[t](o,e,i)))return n}}}ad._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[td]){var e=this[td].silent;this[Qc]=!0,ld(this),sd.update.call(this),this[Qc]=!1,this[td]=!1,dd.call(this,e),fd.call(this,e)}else if(t.unfinished){var i=1,n=this._model;t.unfinished=!1;do{var o=+new Date;t.performSeriesTasks(n),t.performDataProcessorTasks(n),hd(this,n),t.performVisualTasks(n),vd(this,this._model,0,"remain"),i-=+new Date-o}while(0<i&&t.unfinished);t.unfinished||this._zr.flush()}}},ad.getDom=function(){return this._dom},ad.getZr=function(){return this._zr},ad.setOption=function(t,e,i){if(!this._disposed){var n;if(Kc(e)&&(i=e.lazyUpdate,n=e.silent,e=e.notMerge),this[Qc]=!0,!this._model||e){var o=new Bu(this._api),a=this._theme,r=this._model=new Tu;r.scheduler=this._scheduler,r.init(null,null,a,o)}this._model.setOption(t,Id),i?(this[td]={silent:n},this[Qc]=!1):(ld(this),sd.update.call(this),this._zr.flush(),this[td]=!1,this[Qc]=!1,dd.call(this,n),fd.call(this,n))}},ad.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},ad.getModel=function(){return this._model},ad.getOption=function(){return this._model&&this._model.getOption()},ad.getWidth=function(){return this._zr.getWidth()},ad.getHeight=function(){return this._zr.getHeight()},ad.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},ad.getRenderedCanvas=function(t){if(o.canvasSupported)return(t=t||{}).pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(t)},ad.getSvgDataUrl=function(){if(o.svgSupported){var t=this._zr;return A(t.storage.getDisplayList(),(function(t){t.stopAnimation(!0)})),t.painter.pathToDataUrl()}},ad.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,i=this._model,n=[],o=this;jc(e,(function(t){i.eachComponent({mainType:t},(function(t){var e=o._componentsMap[t.__viewId];e.group.ignore||(n.push(e),e.group.ignore=!0)}))}));var a="svg"===this._zr.painter.getType()?this.getSvgDataUrl():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return jc(n,(function(t){t.group.ignore=!1})),a}},ad.getConnectedDataURL=function(t){if(!this._disposed&&o.canvasSupported){var e=this.group,i=Math.min,n=Math.max;if(kd[e]){var a=1/0,r=1/0,s=-1/0,l=-1/0,u=[],h=t&&t.pixelRatio||1;A(Ld,(function(o,h){if(o.group===e){var c=o.getRenderedCanvas(m(t)),d=o.getDom().getBoundingClientRect();a=i(d.left,a),r=i(d.top,r),s=n(d.right,s),l=n(d.bottom,l),u.push({dom:c,left:d.left,top:d.top})}}));var c=(s*=h)-(a*=h),d=(l*=h)-(r*=h),f=w();f.width=c,f.height=d;var p=po(f);return t.connectedBackgroundColor&&p.add(new zr({shape:{x:0,y:0,width:c,height:d},style:{fill:t.connectedBackgroundColor}})),jc(u,(function(t){var e=new zn({style:{x:t.left*h-a,y:t.top*h-r,image:t.dom}});p.add(e)})),p.refreshImmediately(),f.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},ad.convertToPixel=O(rd,"convertToPixel"),ad.convertFromPixel=O(rd,"convertFromPixel"),ad.containPixel=function(t,e){var i;if(!this._disposed)return A(t=Oo(this._model,t),(function(t,n){0<=n.indexOf("Models")&&A(t,(function(t){var o=t.coordinateSystem;if(o&&o.containPoint)i|=!!o.containPoint(e);else if("seriesModels"===n){var a=this._chartsMap[t.__viewId];a&&a.containPoint&&(i|=a.containPoint(e,t))}}),this)}),this),!!i},ad.getVisual=function(t,e){var i=(t=Oo(this._model,t,{defaultMainType:"series"})).seriesModel.getData(),n=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?i.indexOfRawIndex(t.dataIndex):null;return null!=n?i.getItemVisual(n,e):i.getVisual(e)},ad.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},ad.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var sd={prepareAndUpdate:function(t){ld(this),sd.update.call(this,t)},update:function(t){var e=this._model,i=this._api,n=this._zr,a=this._coordSysMgr,r=this._scheduler;if(e){r.restoreData(e,t),r.performSeriesTasks(e),a.create(e,i),r.performDataProcessorTasks(e,t),hd(this,e),a.update(e,i),gd(e),r.performVisualTasks(e,t),md(this,e,i,t);var s=e.get("backgroundColor")||"transparent";if(o.canvasSupported)n.setBackgroundColor(s);else{var l=Ne(s);s=We(l,"rgb"),0===l[3]&&(s="transparent")}yd(e,i)}},updateTransform:function(t){var e=this._model,i=this,n=this._api;if(e){var o=[];e.eachComponent((function(a,r){var s=i.getViewOfComponentModel(r);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(r,e,n,t);l&&l.update&&o.push(s)}else o.push(s)}));var a=Q();e.eachSeries((function(o){var r=i._chartsMap[o.__viewId];if(r.updateTransform){var s=r.updateTransform(o,e,n,t);s&&s.update&&a.set(o.uid,1)}else a.set(o.uid,1)})),gd(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0,dirtyMap:a}),vd(i,e,0,t,a),yd(e,this._api)}},updateView:function(t){var e=this._model;e&&(Hh.markUpdateMethod(t,"updateView"),gd(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),md(this,this._model,this._api,t),yd(e,this._api))},updateVisual:function(t){sd.update.call(this,t)},updateLayout:function(t){sd.update.call(this,t)}};function ld(t){var e=t._model,i=t._scheduler;i.restorePipelines(e),i.prepareStageTasks(),pd(t,"component",e,i),pd(t,"chart",e,i),i.plan()}function ud(t,e,i,n,o){var a=t._model;if(n){var r={};r[n+"Id"]=i[n+"Id"],r[n+"Index"]=i[n+"Index"],r[n+"Name"]=i[n+"Name"];var s={mainType:n,query:r};o&&(s.subType=o);var l=i.excludeSeriesId;null!=l&&(l=Q(bo(l))),a&&a.eachComponent(s,(function(e){l&&null!=l.get(e.id)||u(t["series"===n?"_chartsMap":"_componentsMap"][e.__viewId])}),t)}else jc(t._componentsViews.concat(t._chartsViews),u);function u(n){n&&n.__alive&&n[e]&&n[e](n.__model,a,t._api,i)}}function hd(t,e){var i=t._chartsMap,n=t._scheduler;e.eachSeries((function(t){n.updateStreamModes(t,i[t.__viewId])}))}function cd(t,e){var i=t.type,n=t.escapeConnect,o=bd[i],a=o.actionInfo,r=(a.update||"update").split(":"),s=r.pop();r=null!=r[0]&&$c(r[0]),this[Qc]=!0;var l=[t],u=!1;t.batch&&(u=!0,l=D(t.batch,(function(e){return(e=_(x({},e),t)).batch=null,e})));var h,c=[],d="highlight"===i||"downplay"===i;jc(l,(function(t){(h=(h=o.action(t,this._model,this._api))||x({},t)).type=a.event||h.type,c.push(h),d?ud(this,s,t,"series"):r&&ud(this,s,t,r.main,r.sub)}),this),"none"===s||d||r||(this[td]?(ld(this),sd.update.call(this,t),this[td]=!1):sd[s].call(this,t)),h=u?{type:a.event||i,escapeConnect:n,batch:c}:c[0],this[Qc]=!1,e||this._messageCenter.trigger(h.type,h)}function dd(t){for(var e=this._pendingActions;e.length;){var i=e.shift();cd.call(this,i,t)}}function fd(t){t||this.trigger("updated")}function pd(t,e,i,n){for(var o="component"===e,a=o?t._componentsViews:t._chartsViews,r=o?t._componentsMap:t._chartsMap,s=t._zr,l=t._api,u=0;u<a.length;u++)a[u].__alive=!1;function h(t){var e="_ec_"+t.id+"_"+t.type,u=r[e];if(!u){var h=$c(t.type);(u=new(o?Bh.getClass(h.main,h.sub):Hh.getClass(h.sub))).init(i,l),r[e]=u,a.push(u),s.add(u.group)}t.__viewId=u.__id=e,u.__alive=!0,u.__model=t,u.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},o||n.prepareView(u,t,i,l)}for(o?i.eachComponent((function(t,e){"series"!==t&&h(e)})):i.eachSeries(h),u=0;u<a.length;){var c=a[u];c.__alive?u++:(o||c.renderTask.dispose(),s.remove(c.group),c.dispose(i,l),a.splice(u,1),delete r[c.__id],c.__id=c.group.__ecComponentInfo=null)}}function gd(t){t.clearColorPalette(),t.eachSeries((function(t){t.clearColorPalette()}))}function md(t,e,i,n){!function(t,e,i,n,o){jc(t._componentsViews,(function(t){var o=t.__model;t.render(o,e,i,n),_d(o,t)}))}(t,e,i,n),jc(t._chartsViews,(function(t){t.__alive=!1})),vd(t,e,0,n),jc(t._chartsViews,(function(t){t.__alive||t.remove(e,i)}))}function vd(t,e,i,n,a){var r,s=t._scheduler;e.eachSeries((function(e){var i=t._chartsMap[e.__viewId];i.__alive=!0;var o=i.renderTask;s.updatePayload(o,n),a&&a.get(e.uid)&&o.dirty(),r|=o.perform(s.getPerformArgs(o)),i.group.silent=!!e.get("silent"),_d(e,i),function(t,e){var i=t.get("blendMode")||null;e.group.traverse((function(t){t.isGroup||t.style.blend!==i&&t.setStyle("blend",i),t.eachPendingDisplayable&&t.eachPendingDisplayable((function(t){t.setStyle("blend",i)}))}))}(e,i)})),s.unfinished|=r,function(t,e){var i=0;t._zr.storage.traverse((function(t){i++})),i>e.get("hoverLayerThreshold")&&!o.node&&e.eachSeries((function(e){if(!e.preventUsingHoverLayer){var i=t._chartsMap[e.__viewId];i.__alive&&i.group.traverse((function(t){t.useHoverLayer=!0}))}}))}(t,e),function(t,e){var i=e.getModel("aria");if(i.get("show"))if(i.get("description"))t.setAttribute("aria-label",i.get("description"));else{var n=0;e.eachSeries((function(t,e){++n}),this);var o,a=i.get("data.maxCount")||10,r=i.get("series.maxCount")||10,s=Math.min(n,r);if(!(n<1)){var l=function(){var t=e.getModel("title").option;return t&&t.length&&(t=t[0]),t&&t.text}();o=l?h(c("general.withTitle"),{title:l}):c("general.withoutTitle");var u=[];o+=h(c(1<n?"series.multiple.prefix":"series.single.prefix"),{seriesCount:n}),e.eachSeries((function(t,e){if(e<s){var i,o=t.get("name"),r="series."+(1<n?"multiple":"single")+".";i=h(i=c(o?r+"withName":r+"withoutName"),{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:function(t){return nc.series.typeNames[t]||"\u81ea\u5b9a\u4e49\u56fe"}(t.subType)});var l=t.getData();(window.data=l).count()>a?i+=h(c("data.partialData"),{displayCnt:a}):i+=c("data.allData");for(var d=[],f=0;f<l.count();f++)if(f<a){var p=l.getName(f),g=dh(l,f);d.push(h(c(p?"data.withName":"data.withoutName"),{name:p,value:g}))}i+=d.join(c("data.separator.middle"))+c("data.separator.end"),u.push(i)}})),o+=u.join(c("series.multiple.separator.middle"))+c("series.multiple.separator.end"),t.setAttribute("aria-label",o)}}function h(t,e){if("string"!=typeof t)return t;var i=t;return A(e,(function(t,e){i=i.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)})),i}function c(t){var e=i.get(t);if(null!=e)return e;for(var n=t.split("."),o=nc.aria,a=0;a<n.length;++a)o=o[n[a]];return o}}(t._zr.dom,e)}function yd(t,e){jc(Td,(function(i){i(t,e)}))}ad.resize=function(t){if(!this._disposed){this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var i=e.resetOption("media"),n=t&&t.silent;this[Qc]=!0,i&&ld(this),sd.update.call(this),this[Qc]=!1,dd.call(this,n),fd.call(this,n)}}},ad.showLoading=function(t,e){if(!this._disposed&&(Kc(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),Cd[t])){var i=Cd[t](this._api,e),n=this._zr;this._loadingFX=i,n.add(i)}},ad.hideLoading=function(){this._disposed||(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},ad.makeActionFromEvent=function(t){var e=x({},t);return e.type=Sd[t.type],e},ad.dispatchAction=function(t,e){this._disposed||(Kc(e)||(e={silent:!!e}),bd[t.type]&&this._model&&(this[Qc]?this._pendingActions.push(t):(cd.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&o.browser.weChat&&this._throttledZrFlush(),dd.call(this,e.silent),fd.call(this,e.silent))))},ad.appendData=function(t){if(!this._disposed){var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0}},ad.on=id("on",!1),ad.off=id("off",!1),ad.one=id("one",!1);var xd=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function _d(t,e){var i=t.get("z"),n=t.get("zlevel");e.group.traverse((function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))}))}function wd(){}ad._initEvents=function(){jc(xd,(function(t){function e(e){var i,n=this.getModel(),o=e.target;if("globalout"===t)i={};else if(o&&null!=o.dataIndex){var a=o.dataModel||n.getSeriesByIndex(o.seriesIndex);i=a&&a.getDataParams(o.dataIndex,o.dataType,o)||{}}else o&&o.eventData&&(i=x({},o.eventData));if(i){var r=i.componentType,s=i.componentIndex;"markLine"!==r&&"markPoint"!==r&&"markArea"!==r||(r="series",s=i.seriesIndex);var l=r&&null!=s&&n.getComponent(r,s),u=l&&this["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];i.event=e,i.type=t,this._ecEventProcessor.eventInfo={targetEl:o,packedEvent:i,model:l,view:u},this.trigger(t,i)}}e.zrEventfulCallAtLast=!0,this._zr.on(t,e,this)}),this),jc(Sd,(function(t,e){this._messageCenter.on(e,(function(t){this.trigger(e,t)}),this)}),this)},ad.isDisposed=function(){return this._disposed},ad.clear=function(){this._disposed||this.setOption({series:[]},!0)},ad.dispose=function(){if(!this._disposed){this._disposed=!0,Eo(this.getDom(),Nd,"");var t=this._api,e=this._model;jc(this._componentsViews,(function(i){i.dispose(e,t)})),jc(this._chartsViews,(function(i){i.dispose(e,t)})),this._zr.dispose(),delete Ld[this.id]}},I(od,At),wd.prototype={constructor:wd,normalizeQuery:function(t){var e={},i={},n={};if(R(t)){var o=$c(t);e.mainType=o.main||null,e.subType=o.sub||null}else{var a=["Index","Name","Id"],r={name:1,dataIndex:1,dataType:1};A(t,(function(t,o){for(var s=!1,l=0;l<a.length;l++){var u=a[l],h=o.lastIndexOf(u);if(0<h&&h===o.length-u.length){var c=o.slice(0,h);"data"!==c&&(e.mainType=c,e[u.toLowerCase()]=t,s=!0)}}r.hasOwnProperty(o)&&(i[o]=t,s=!0),s||(n[o]=t)}))}return{cptQuery:e,dataQuery:i,otherQuery:n}},filter:function(t,e,i){var n=this.eventInfo;if(!n)return!0;var o=n.targetEl,a=n.packedEvent,r=n.model,s=n.view;if(!r||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return h(l,r,"mainType")&&h(l,r,"subType")&&h(l,r,"index","componentIndex")&&h(l,r,"name")&&h(l,r,"id")&&h(u,a,"name")&&h(u,a,"dataIndex")&&h(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,o,a));function h(t,e,i,n){return null==t[i]||e[n||i]===t[i]}},afterTrigger:function(){this.eventInfo=null}};var bd={},Sd={},Md=[],Id=[],Td=[],Ad=[],Dd={},Cd={},Ld={},kd={},Pd=new Date-0,Od=new Date-0,Nd="_echarts_instance_";function Ed(t){kd[t]=!1}var Rd=Ed;function zd(t){return Ld[function(t,e){return t.getAttribute?t.getAttribute(e):t[e]}(t,Nd)]}function Bd(t,e){Dd[t]=e}function Vd(t){Id.push(t)}function Gd(t,e){Ud(Md,t,e,1e3)}function Fd(t,e,i){"function"==typeof e&&(i=e,e="");var n=Kc(t)?t.type:[t,t={event:e}][0];t.event=(t.event||n).toLowerCase(),e=t.event,Yc(ed.test(n)&&ed.test(e)),bd[n]||(bd[n]={action:i,actionInfo:t}),Sd[e]=n}function Wd(t,e){Pu.register(t,e)}function Hd(t,e){Ud(Ad,t,e,1e3,"layout")}function Zd(t,e){Ud(Ad,t,e,3e3,"visual")}function Ud(t,e,i,n,o){(qc(e)||Kc(e))&&(i=e,e=n);var a=ac.wrapStageHandler(i,o);return a.__prio=e,a.__raw=i,t.push(a),a}function Xd(t,e){Cd[t]=e}function Yd(t){return ou.extend(t)}function jd(t){return Bh.extend(t)}function qd(t){return Lh.extend(t)}function Kd(t){return Hh.extend(t)}function $d(t){return t}function Jd(t,e,i,n,o){this._old=t,this._new=e,this._oldKeyGetter=i||$d,this._newKeyGetter=n||$d,this.context=o}function Qd(t,e,i,n,o){for(var a=0;a<t.length;a++){var r="_ec_"+o[n](t[a],a),s=e[r];null==s?(i.push(r),e[r]=a):(s.length||(e[r]=s=[s]),s.push(a))}}Zd(2e3,ic),Vd(Qu),Gd(900,(function(t){var e=Q();t.eachSeries((function(t){var i=t.get("stack");if(i){var n=e.get(i)||e.set(i,[]),o=t.getData(),a={stackResultDimension:o.getCalculationInfo("stackResultDimension"),stackedOverDimension:o.getCalculationInfo("stackedOverDimension"),stackedDimension:o.getCalculationInfo("stackedDimension"),stackedByDimension:o.getCalculationInfo("stackedByDimension"),isStackedByIndex:o.getCalculationInfo("isStackedByIndex"),data:o,seriesModel:t};if(!a.stackedDimension||!a.isStackedByIndex&&!a.stackedByDimension)return;n.length&&o.setCalculationInfo("stackedOnSeries",n[n.length-1].seriesModel),n.push(a)}})),e.each(th)})),Xd("default",(function(t,e){_(e=e||{},{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var i=new zr({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4}),n=new Zr({shape:{startAngle:-oc/2,endAngle:-oc/2+.1,r:10},style:{stroke:e.color,lineCap:"round",lineWidth:5},zlevel:e.zlevel,z:10001}),o=new zr({style:{fill:"none",text:e.text,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});n.animateShape(!0).when(1e3,{endAngle:3*oc/2}).start("circularInOut"),n.animateShape(!0).when(1e3,{startAngle:3*oc/2}).delay(300).start("circularInOut");var a=new yi;return a.add(n),a.add(o),a.add(i),a.resize=function(){var e=t.getWidth()/2,a=t.getHeight()/2;n.setShape({cx:e,cy:a});var r=n.shape.r;o.setShape({x:e-r,y:a-r,width:2*r,height:2*r}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},a.resize(),a})),Fd({type:"highlight",event:"highlight",update:"highlight"},et),Fd({type:"downplay",event:"downplay",update:"downplay"},et),Bd("light",Ic),Bd("dark",Dc),Jd.prototype={constructor:Jd,add:function(t){return this._add=t,this},update:function(t){return this._update=t,this},remove:function(t){return this._remove=t,this},execute:function(){var t=this._old,e=this._new,i={},n=[],o=[];for(Qd(t,{},n,"_oldKeyGetter",this),Qd(e,i,o,"_newKeyGetter",this),a=0;a<t.length;a++)null!=(s=i[r=n[a]])?((u=s.length)?(1===u&&(i[r]=null),s=s.shift()):i[r]=null,this._update&&this._update(s,a)):this._remove&&this._remove(a);for(var a=0;a<o.length;a++){var r=o[a];if(i.hasOwnProperty(r)){var s;if(null==(s=i[r]))continue;if(s.length)for(var l=0,u=s.length;l<u;l++)this._add&&this._add(s[l]);else this._add&&this._add(s)}}}};var tf=Q(["tooltip","label","itemName","itemId","seriesName"]);function ef(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}function nf(t){return"category"===t?"ordinal":"time"===t?"time":"float"}function of(t){null!=t&&x(this,t),this.otherDims={}}var af=z,rf="undefined",sf={float:typeof Float64Array==rf?Array:Float64Array,int:typeof Int32Array==rf?Array:Int32Array,ordinal:Array,number:Array,time:Array},lf=typeof Uint32Array==rf?Array:Uint32Array,uf=typeof Int32Array==rf?Array:Int32Array,hf=typeof Uint16Array==rf?Array:Uint16Array;function cf(t){return 65535<t._rawCount?lf:hf}var df=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],ff=["_extent","_approximateExtent","_rawExtent"];function pf(t,e){A(df.concat(e.__wrappedMethods||[]),(function(i){e.hasOwnProperty(i)&&(t[i]=e[i])})),t.__wrappedMethods=e.__wrappedMethods,A(ff,(function(i){t[i]=m(e[i])})),t._calculationInfo=x(e._calculationInfo)}var gf=function(t,e){t=t||["x","y"];for(var i={},n=[],o={},a=0;a<t.length;a++){var r=t[a];R(r)?r=new of({name:r}):r instanceof of||(r=new of(r));var s=r.name;r.type=r.type||"float",r.coordDim||(r.coordDim=s,r.coordDimIndex=0),r.otherDims=r.otherDims||{},n.push(s),(i[s]=r).index=a,r.createInvertedIndices&&(o[s]=[])}this.dimensions=n,this._dimensionInfos=i,this.hostModel=e,this._indices=null,this._count=0,this._rawCount=0,this._storage={},this._nameList=[],this._idList=[],this._optionModels=[],this._visual={},this._layout={},this._itemVisuals=[],this.hasItemVisual={},this._itemLayouts=[],this._graphicEls=[],this._chunkSize=1e5,this._chunkCount=0,this._rawExtent={},this._extent={},this._approximateExtent={},this._dimensionsSummary=function(t){var e={},i=e.encode={},n=Q(),o=[],a=[],r=e.userOutput={dimensionNames:t.dimensions.slice(),encode:{}};A(t.dimensions,(function(e){var s=t.getDimensionInfo(e),l=s.coordDim;if(l){var u=s.coordDimIndex;ef(i,l)[u]=e,s.isExtraCoord||(n.set(l,1),function(t){return!("ordinal"===t||"time"===t)}(s.type)&&(o[0]=e),ef(r.encode,l)[u]=s.index),s.defaultTooltip&&a.push(e)}tf.each((function(t,e){var n=ef(i,e),o=s.otherDims[e];null!=o&&!1!==o&&(n[o]=s.name)}))}));var s=[],l={};n.each((function(t,e){var n=i[e];l[e]=n[0],s=s.concat(n)})),e.dataDimsOnCoord=s,e.encodeFirstDimNotExtra=l;var u=i.label;u&&u.length&&(o=u.slice());var h=i.tooltip;return h&&h.length?a=h.slice():a.length||(a=o.slice()),i.defaultedLabel=o,i.defaultedTooltip=a,e}(this),this._invertedIndicesMap=o,this._calculationInfo={},this.userOutput=this._dimensionsSummary.userOutput},mf=gf.prototype;function vf(t,e,i,n,o){var a=sf[e.type],r=n-1,s=e.name,l=t[s][r];if(l&&l.length<i){for(var u=new a(Math.min(o-r*i,i)),h=0;h<l.length;h++)u[h]=l[h];t[s][r]=u}for(var c=n*i;c<o;c+=i)t[s].push(new a(Math.min(o-c,i)))}function yf(t){var e=t._invertedIndicesMap;A(e,(function(i,n){var o=t._dimensionInfos[n].ordinalMeta;if(o){i=e[n]=new uf(o.categories.length);for(var a=0;a<i.length;a++)i[a]=-1;for(a=0;a<t._count;a++)i[t.get(n,a)]=a}}))}function xf(t,e,i){var n;if(null!=e){var o=t._chunkSize,a=Math.floor(i/o),r=t.dimensions[e],s=t._storage[r][a];if(s){n=s[i%o];var l=t._dimensionInfos[r].ordinalMeta;l&&l.categories.length&&(n=l.categories[n])}}return n}function _f(t){return t}function wf(t){return t<this._count&&0<=t?this._indices[t]:-1}function bf(t,e){var i=t._idList[e];return null==i&&(i=xf(t,t._idDimIdx,e)),null==i&&(i="e\0\0"+e),i}function Sf(t){return N(t)||(t=[t]),t}function Mf(t,e){var i=t.dimensions,n=new gf(D(i,t.getDimensionInfo,t),t.hostModel);pf(n,t);for(var o=n._storage={},a=t._storage,r=0;r<i.length;r++){var s=i[r];a[s]&&(0<=S(e,s)?(o[s]=If(a[s]),n._rawExtent[s]=[1/0,-1/0],n._extent[s]=null):o[s]=a[s])}return n}function If(t){for(var e,i,n=new Array(t.length),o=0;o<t.length;o++)n[o]=(i=void 0,(i=(e=t[o]).constructor)===Array?e.slice():new i(e));return n}function Tf(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType}function Af(t,e,i){mu.isInstance(e)||(e=mu.seriesDataToSource(e)),i=i||{},t=(t||[]).slice();for(var n=(i.dimsDef||[]).slice(),o=Q(),a=Q(),r=[],s=function(t,e,i,n){var o=Math.max(t.dimensionsDetectCount||1,e.length,i.length,n||0);return A(e,(function(t){var e=t.dimsDef;e&&(o=Math.max(o,e.length))})),o}(e,t,n,i.dimCount),l=0;l<s;l++){var u=n[l]=x({},z(n[l])?n[l]:{name:n[l]}),h=u.name,c=r[l]=new of;null!=h&&null==o.get(h)&&(c.name=c.displayName=h,o.set(h,l)),null!=u.type&&(c.type=u.type),null!=u.displayName&&(c.displayName=u.displayName)}var d=i.encodeDef;!d&&i.encodeDefaulter&&(d=i.encodeDefaulter(e,s)),(d=Q(d)).each((function(t,e){if(1===(t=bo(t).slice()).length&&!R(t[0])&&t[0]<0)d.set(e,!1);else{var i=d.set(e,[]);A(t,(function(t,n){R(t)&&(t=o.get(t)),null!=t&&t<s&&(i[n]=t,p(r[t],e,n))}))}}));var f=0;function p(t,e,i){null!=tf.get(e)?t.otherDims[e]=i:(t.coordDim=e,t.coordDimIndex=i,a.set(e,!0))}A(t,(function(t,e){var i,n,o;if(R(t))i=t,t={};else{i=t.name;var a=t.ordinalMeta;t.ordinalMeta=null,(t=m(t)).ordinalMeta=a,n=t.dimsDef,o=t.otherDims,t.name=t.coordDim=t.coordDimIndex=t.dimsDef=t.otherDims=null}if(!1!==(s=d.get(i))){var s;if(!(s=bo(s)).length)for(var l=0;l<(n&&n.length||1);l++){for(;f<r.length&&null!=r[f].coordDim;)f++;f<r.length&&s.push(f++)}A(s,(function(e,a){var s=r[e];if(p(_(s,t),i,a),null==s.name&&n){var l=n[a];z(l)||(l={name:l}),s.name=s.displayName=l.name,s.defaultTooltip=l.defaultTooltip}o&&_(s.otherDims,o)}))}}));var g=i.generateCoord,v=i.generateCoordCount,y=null!=v;v=g?v||1:0;for(var w,b=g||"value",S=0;S<s;S++)null==(c=r[S]=r[S]||new of).coordDim&&(c.coordDim=Df(b,a,y),c.coordDimIndex=0,(!g||v<=0)&&(c.isExtraCoord=!0),v--),null==c.name&&(c.name=Df(c.coordDim,o)),null==c.type&&(1===Mu((w=e).data,w.sourceFormat,w.seriesLayoutBy,w.dimensionsDefine,w.startIndex,S)||c.isExtraCoord&&(null!=c.otherDims.itemName||null!=c.otherDims.seriesName))&&(c.type="ordinal");return r}function Df(t,e,i){if(i||null!=e.get(t)){for(var n=0;null!=e.get(t+n);)n++;t+=n}return e.set(t,!0),t}mf.type="list",mf.hasItemOption=!0,mf.getDimension=function(t){return"number"!=typeof t&&(isNaN(t)||this._dimensionInfos.hasOwnProperty(t))||(t=this.dimensions[t]),t},mf.getDimensionInfo=function(t){return this._dimensionInfos[this.getDimension(t)]},mf.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},mf.mapDimension=function(t,e){var i=this._dimensionsSummary;if(null==e)return i.encodeFirstDimNotExtra[t];var n=i.encode[t];return!0===e?(n||[]).slice():n&&n[e]},mf.initData=function(t,e,i){(mu.isInstance(t)||T(t))&&(t=new eh(t,this.dimensions.length)),this._rawData=t,this._storage={},this._indices=null,this._nameList=e||[],this._idList=[],this._nameRepeatCount={},i||(this.hasItemOption=!1),this.defaultDimValueGetter=uh[this._rawData.getSource().sourceFormat],this._dimValueGetter=i=i||this.defaultDimValueGetter,this._dimValueGetterArrayRows=uh.arrayRows,this._rawExtent={},this._initDataFromProvider(0,t.count()),t.pure&&(this.hasItemOption=!1)},mf.getProvider=function(){return this._rawData},mf.appendData=function(t){var e=this._rawData,i=this.count();e.appendData(t);var n=e.count();e.persistent||(n+=i),this._initDataFromProvider(i,n)},mf.appendValues=function(t,e){for(var i=this._chunkSize,n=this._storage,o=this.dimensions,a=o.length,r=this._rawExtent,s=this.count(),l=s+Math.max(t.length,e?e.length:0),u=this._chunkCount,h=0;h<a;h++)r[v=o[h]]||(r[v]=[1/0,-1/0]),n[v]||(n[v]=[]),vf(n,this._dimensionInfos[v],i,u,l),this._chunkCount=n[v].length;for(var c=new Array(a),d=s;d<l;d++){for(var f=d-s,p=Math.floor(d/i),g=d%i,m=0;m<a;m++){var v=o[m],y=this._dimValueGetterArrayRows(t[f]||c,v,f,m);n[v][p][g]=y;var x=r[v];y<x[0]&&(x[0]=y),y>x[1]&&(x[1]=y)}e&&(this._nameList[d]=e[f])}this._rawCount=this._count=l,this._extent={},yf(this)},mf._initDataFromProvider=function(t,e){if(!(e<=t)){for(var i,n=this._chunkSize,o=this._rawData,a=this._storage,r=this.dimensions,s=r.length,l=this._dimensionInfos,u=this._nameList,h=this._idList,c=this._rawExtent,d=this._nameRepeatCount={},f=this._chunkCount,p=0;p<s;p++){c[w=r[p]]||(c[w]=[1/0,-1/0]);var g=l[w];0===g.otherDims.itemName&&(i=this._nameDimIdx=p),0===g.otherDims.itemId&&(this._idDimIdx=p),a[w]||(a[w]=[]),vf(a,g,n,f,e),this._chunkCount=a[w].length}for(var m=new Array(s),v=t;v<e;v++){m=o.getItem(v,m);for(var y=Math.floor(v/n),x=v%n,_=0;_<s;_++){var w,b=a[w=r[_]][y],S=this._dimValueGetter(m,w,v,_);b[x]=S;var M=c[w];S<M[0]&&(M[0]=S),S>M[1]&&(M[1]=S)}if(!o.pure){var I=u[v];if(m&&null==I)if(null!=m.name)u[v]=I=m.name;else if(null!=i){var T=r[i],A=a[T][y];if(A){I=A[x];var D=l[T].ordinalMeta;D&&D.categories.length&&(I=D.categories[I])}}var C=null==m?null:m.id;null==C&&null!=I&&(d[I]=d[I]||0,0<d[C=I]&&(C+="__ec__"+d[I]),d[I]++),null!=C&&(h[v]=C)}}!o.persistent&&o.clean&&o.clean(),this._rawCount=this._count=e,this._extent={},yf(this)}},mf.count=function(){return this._count},mf.getIndices=function(){var t=this._indices;if(t){var e=t.constructor,i=this._count;if(e===Array){o=new e(i);for(var n=0;n<i;n++)o[n]=t[n]}else o=new e(t.buffer,0,i)}else{var o=new(e=cf(this))(this.count());for(n=0;n<o.length;n++)o[n]=n}return o},mf.get=function(t,e){if(!(0<=e&&e<this._count))return NaN;var i=this._storage;if(!i[t])return NaN;e=this.getRawIndex(e);var n=Math.floor(e/this._chunkSize);return i[t][n][e%this._chunkSize]},mf.getByRawIndex=function(t,e){if(!(0<=e&&e<this._rawCount))return NaN;var i=this._storage[t];return i?i[Math.floor(e/this._chunkSize)][e%this._chunkSize]:NaN},mf._getFast=function(t,e){var i=Math.floor(e/this._chunkSize);return this._storage[t][i][e%this._chunkSize]},mf.getValues=function(t,e){var i=[];N(t)||(e=t,t=this.dimensions);for(var n=0,o=t.length;n<o;n++)i.push(this.get(t[n],e));return i},mf.hasValue=function(t){for(var e=this._dimensionsSummary.dataDimsOnCoord,i=0,n=e.length;i<n;i++)if(isNaN(this.get(e[i],t)))return!1;return!0},mf.getDataExtent=function(t){t=this.getDimension(t);var e=[1/0,-1/0];if(!this._storage[t])return e;var i,n=this.count();if(!this._indices)return this._rawExtent[t].slice();if(i=this._extent[t])return i.slice();for(var o=(i=e)[0],a=i[1],r=0;r<n;r++){var s=this._getFast(t,this.getRawIndex(r));s<o&&(o=s),a<s&&(a=s)}return this._extent[t]=[o,a]},mf.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},mf.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},mf.getCalculationInfo=function(t){return this._calculationInfo[t]},mf.setCalculationInfo=function(t,e){af(t)?x(this._calculationInfo,t):this._calculationInfo[t]=e},mf.getSum=function(t){var e=0;if(this._storage[t])for(var i=0,n=this.count();i<n;i++){var o=this.get(t,i);isNaN(o)||(e+=o)}return e},mf.getMedian=function(t){var e=[];this.each(t,(function(t,i){isNaN(t)||e.push(t)}));var i=[].concat(e).sort((function(t,e){return t-e})),n=this.count();return 0===n?0:n%2==1?i[(n-1)/2]:(i[n/2]+i[n/2-1])/2},mf.rawIndexOf=function(t,e){var i=(t&&this._invertedIndicesMap[t])[e];return null==i||isNaN(i)?-1:i},mf.indexOfName=function(t){for(var e=0,i=this.count();e<i;e++)if(this.getName(e)===t)return e;return-1},mf.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,i=e[t];if(null!=i&&i<this._count&&i===t)return t;for(var n=0,o=this._count-1;n<=o;){var a=(n+o)/2|0;if(e[a]<t)n=1+a;else{if(!(e[a]>t))return a;o=a-1}}return-1},mf.indicesOfNearest=function(t,e,i){var n=[];if(!this._storage[t])return n;null==i&&(i=1/0);for(var o=1/0,a=-1,r=0,s=0,l=this.count();s<l;s++){var u=e-this.get(t,s),h=Math.abs(u);h<=i&&((h<o||h===o&&0<=u&&a<0)&&(o=h,a=u,r=0),u===a&&(n[r++]=s))}return n.length=r,n},mf.getRawIndex=_f,mf.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],i=0;i<this.dimensions.length;i++)e.push(this.get(this.dimensions[i],t));return e},mf.getName=function(t){var e=this.getRawIndex(t);return this._nameList[e]||xf(this,this._nameDimIdx,e)||""},mf.getId=function(t){return bf(this,this.getRawIndex(t))},mf.each=function(t,e,i,n){if(this._count){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this;for(var o=(t=D(Sf(t),this.getDimension,this)).length,a=0;a<this.count();a++)switch(o){case 0:e.call(i,a);break;case 1:e.call(i,this.get(t[0],a),a);break;case 2:e.call(i,this.get(t[0],a),this.get(t[1],a),a);break;default:for(var r=0,s=[];r<o;r++)s[r]=this.get(t[r],a);s[r]=a,e.apply(i,s)}}},mf.filterSelf=function(t,e,i,n){if(this._count){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this,t=D(Sf(t),this.getDimension,this);for(var o=this.count(),a=new(cf(this))(o),r=[],s=t.length,l=0,u=t[0],h=0;h<o;h++){var c,d=this.getRawIndex(h);if(0===s)c=e.call(i,h);else if(1===s){var f=this._getFast(u,d);c=e.call(i,f,h)}else{for(var p=0;p<s;p++)r[p]=this._getFast(u,d);r[p]=h,c=e.apply(i,r)}c&&(a[l++]=d)}return l<o&&(this._indices=a),this._count=l,this._extent={},this.getRawIndex=this._indices?wf:_f,this}},mf.selectRange=function(t){if(this._count){var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(i);var n=e.length;if(n){var o=this.count(),a=new(cf(this))(o),r=0,s=e[0],l=t[s][0],u=t[s][1],h=!1;if(!this._indices){var c=0;if(1===n){for(var d=this._storage[e[0]],f=0;f<this._chunkCount;f++)for(var p=d[f],g=Math.min(this._count-f*this._chunkSize,this._chunkSize),m=0;m<g;m++)(l<=(w=p[m])&&w<=u||isNaN(w))&&(a[r++]=c),c++;h=!0}else if(2===n){d=this._storage[s];var v=this._storage[e[1]],y=t[e[1]][0],x=t[e[1]][1];for(f=0;f<this._chunkCount;f++){p=d[f];var _=v[f];for(g=Math.min(this._count-f*this._chunkSize,this._chunkSize),m=0;m<g;m++){var w=p[m],b=_[m];(l<=w&&w<=u||isNaN(w))&&(y<=b&&b<=x||isNaN(b))&&(a[r++]=c),c++}}h=!0}}if(!h)if(1===n)for(m=0;m<o;m++){var S=this.getRawIndex(m);(l<=(w=this._getFast(s,S))&&w<=u||isNaN(w))&&(a[r++]=S)}else for(m=0;m<o;m++){var M=!0;for(S=this.getRawIndex(m),f=0;f<n;f++){var I=e[f];((w=this._getFast(i,S))<t[I][0]||w>t[I][1])&&(M=!1)}M&&(a[r++]=this.getRawIndex(m))}return r<o&&(this._indices=a),this._count=r,this._extent={},this.getRawIndex=this._indices?wf:_f,this}}},mf.mapArray=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]);var o=[];return this.each(t,(function(){o.push(e&&e.apply(this,arguments))}),i=i||n||this),o},mf.map=function(t,e,i,n){i=i||n||this;var o=Mf(this,t=D(Sf(t),this.getDimension,this));o._indices=this._indices,o.getRawIndex=o._indices?wf:_f;for(var a=o._storage,r=[],s=this._chunkSize,l=t.length,u=this.count(),h=[],c=o._rawExtent,d=0;d<u;d++){for(var f=0;f<l;f++)h[f]=this.get(t[f],d);h[l]=d;var p=e&&e.apply(i,h);if(null!=p){"object"!=typeof p&&(r[0]=p,p=r);for(var g=this.getRawIndex(d),m=Math.floor(g/s),v=g%s,y=0;y<p.length;y++){var x=t[y],_=p[y],w=c[x],b=a[x];b&&(b[m][v]=_),_<w[0]&&(w[0]=_),_>w[1]&&(w[1]=_)}}}return o},mf.downSample=function(t,e,i,n){for(var o=Mf(this,[t]),a=o._storage,r=[],s=Math.floor(1/e),l=a[t],u=this.count(),h=this._chunkSize,c=o._rawExtent[t],d=new(cf(this))(u),f=0,p=0;p<u;p+=s){u-p<s&&(r.length=s=u-p);for(var g=0;g<s;g++){var m=this.getRawIndex(p+g),v=Math.floor(m/h);r[g]=l[v][m%h]}var y=i(r),x=this.getRawIndex(Math.min(p+n(r,y)||0,u-1)),_=x%h;(l[Math.floor(x/h)][_]=y)<c[0]&&(c[0]=y),y>c[1]&&(c[1]=y),d[f++]=x}return o._count=f,o._indices=d,o.getRawIndex=wf,o},mf.getItemModel=function(t){var e=this.hostModel;return new ol(this.getRawDataItem(t),e,e&&e.ecModel)},mf.diff=function(t){var e=this;return new Jd(t?t.getIndices():[],this.getIndices(),(function(e){return bf(t,e)}),(function(t){return bf(e,t)}))},mf.getVisual=function(t){var e=this._visual;return e&&e[t]},mf.setVisual=function(t,e){if(af(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},mf.setLayout=function(t,e){if(af(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},mf.getLayout=function(t){return this._layout[t]},mf.getItemLayout=function(t){return this._itemLayouts[t]},mf.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?x(this._itemLayouts[t]||{},e):e},mf.clearItemLayouts=function(){this._itemLayouts.length=0},mf.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],o=n&&n[e];return null!=o||i?o:this.getVisual(e)},mf.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{},o=this.hasItemVisual;if(this._itemVisuals[t]=n,af(e))for(var a in e)e.hasOwnProperty(a)&&(n[a]=e[a],o[a]=!0);else n[e]=i,o[e]=!0},mf.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}},mf.setItemGraphicEl=function(t,e){var i=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=i&&i.seriesIndex,"group"===e.type&&e.traverse(Tf,e)),this._graphicEls[t]=e},mf.getItemGraphicEl=function(t){return this._graphicEls[t]},mf.eachItemGraphicEl=function(t,e){A(this._graphicEls,(function(i,n){i&&t&&t.call(e,i,n)}))},mf.cloneShallow=function(t){if(!t){var e=D(this.dimensions,this.getDimensionInfo,this);t=new gf(e,this.hostModel)}return t._storage=this._storage,pf(t,this),t._indices=this._indices?new(0,this._indices.constructor)(this._indices):null,t.getRawIndex=t._indices?wf:_f,t},mf.wrapMethod=function(t,e){var i=this[t];"function"==typeof i&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=i.apply(this,arguments);return e.apply(this,[t].concat(U(arguments)))})},mf.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],mf.CHANGABLE_METHODS=["filterSelf","selectRange"];var Cf=function(t,e){return Af((e=e||{}).coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,encodeDefaulter:e.encodeDefaulter,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})};function Lf(t){this.coordSysName=t,this.coordSysDims=[],this.axisMap=Q(),this.categoryAxisMap=Q(),this.firstCategoryDimIndex=null}var kf={cartesian2d:function(t,e,i,n){var o=t.getReferringComponents("xAxis")[0],a=t.getReferringComponents("yAxis")[0];e.coordSysDims=["x","y"],i.set("x",o),i.set("y",a),Pf(o)&&(n.set("x",o),e.firstCategoryDimIndex=0),Pf(a)&&(n.set("y",a),e.firstCategoryDimIndex=1)},singleAxis:function(t,e,i,n){var o=t.getReferringComponents("singleAxis")[0];e.coordSysDims=["single"],i.set("single",o),Pf(o)&&(n.set("single",o),e.firstCategoryDimIndex=0)},polar:function(t,e,i,n){var o=t.getReferringComponents("polar")[0],a=o.findAxisModel("radiusAxis"),r=o.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],i.set("radius",a),i.set("angle",r),Pf(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),Pf(r)&&(n.set("angle",r),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e,i,n){e.coordSysDims=["lng","lat"]},parallel:function(t,e,i,n){var o=t.ecModel,a=o.getComponent("parallel",t.get("parallelIndex")),r=e.coordSysDims=a.dimensions.slice();A(a.parallelAxisIndex,(function(t,a){var s=o.getComponent("parallelAxis",t),l=r[a];i.set(l,s),Pf(s)&&null==e.firstCategoryDimIndex&&(n.set(l,s),e.firstCategoryDimIndex=a)}))}};function Pf(t){return"category"===t.get("type")}function Of(t,e,i){var n,o,a,r,s=(i=i||{}).byIndex,l=i.stackedCoordDimension,u=!(!t||!t.get("stack"));if(A(e,(function(t,i){R(t)&&(e[i]=t={name:t}),u&&!t.isExtraCoord&&(s||n||!t.ordinalMeta||(n=t),o||"ordinal"===t.type||"time"===t.type||l&&l!==t.coordDim||(o=t))})),!o||s||n||(s=!0),o){a="__\0ecstackresult",r="__\0ecstackedover",n&&(n.createInvertedIndices=!0);var h=o.coordDim,c=o.type,d=0;A(e,(function(t){t.coordDim===h&&d++})),e.push({name:a,coordDim:h,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0}),d++,e.push({name:r,coordDim:r,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:o&&o.name,stackedByDimension:n&&n.name,isStackedByIndex:s,stackedOverDimension:r,stackResultDimension:a}}function Nf(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function Ef(t,e){return Nf(t,e)?t.getCalculationInfo("stackResultDimension"):e}function Rf(t,e,i){i=i||{},mu.isInstance(t)||(t=mu.seriesDataToSource(t));var n,o=e.get("coordinateSystem"),a=Pu.get(o),r=function(t){var e=t.get("coordinateSystem"),i=new Lf(e),n=kf[e];if(n)return n(t,i,i.axisMap,i.categoryAxisMap),i}(e);r&&(n=D(r.coordSysDims,(function(t){var e={name:t},i=r.axisMap.get(t);if(i){var n=i.get("type");e.type=nf(n)}return e}))),n=n||a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"];var s,l,u=Cf(t,{coordDimensions:n,generateCoord:i.generateCoord,encodeDefaulter:i.useEncodeDefaulter?O(wu,n,e):null});r&&A(u,(function(t,e){var i=r.categoryAxisMap.get(t.coordDim);i&&(null==s&&(s=e),t.ordinalMeta=i.getOrdinalMeta()),null!=t.otherDims.itemName&&(l=!0)})),l||null==s||(u[s].otherDims.itemName=0);var h=Of(e,u),c=new gf(u,e);c.setCalculationInfo(h);var d=null!=s&&function(t){if(t.sourceFormat===hu){var e=function(t){for(var e=0;e<t.length&&null==t[e];)e++;return t[e]}(t.data||[]);return null!=e&&!N(Io(e))}}(t)?function(t,e,i,n){return n===s?i:this.defaultDimValueGetter(t,e,i,n)}:null;return c.hasItemOption=!1,c.initData(t,null,d),c}function zf(t){this._setting=t||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}function Bf(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication}zf.prototype.parse=function(t){return t},zf.prototype.getSetting=function(t){return this._setting[t]},zf.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},zf.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},zf.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},zf.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},zf.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},zf.prototype.getExtent=function(){return this._extent.slice()},zf.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},zf.prototype.isBlank=function(){return this._isBlank},zf.prototype.setBlank=function(t){this._isBlank=t},zf.prototype.getLabel=null,Go(zf),Uo(zf,{registerWhenExtend:!0}),Bf.createByAxisModel=function(t){var e=t.option,i=e.data,n=i&&D(i,Ff);return new Bf({categories:n,needCollect:!n,deduplication:!1!==e.dedplication})};var Vf=Bf.prototype;function Gf(t){return t._map||(t._map=Q(t.categories))}function Ff(t){return z(t)&&null!=t.value?t.value:t+""}Vf.getOrdinal=function(t){return Gf(this).get(t)},Vf.parseAndCollect=function(t){var e,i=this._needCollect;if("string"!=typeof t&&!i)return t;if(i&&!this._deduplication)return this.categories[e=this.categories.length]=t,e;var n=Gf(this);return null==(e=n.get(t))&&(i?(this.categories[e=this.categories.length]=t,n.set(t,e)):e=NaN),e};var Wf=zf.prototype,Hf=zf.extend({type:"ordinal",init:function(t,e){t&&!N(t)||(t=new Bf({categories:t})),this._ordinalMeta=t,this._extent=e||[0,t.categories.length-1]},parse:function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},contain:function(t){return t=this.parse(t),Wf.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return Wf.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(Wf.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,i=e[0];i<=e[1];)t.push(i),i++;return t},getLabel:function(t){if(!this.isBlank())return this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:et,niceExtent:et});Hf.create=function(){return new Hf};var Zf=cl;function Uf(t){return pl(t)+2}function Xf(t,e,i){t[e]=Math.max(Math.min(t[e],i[1]),i[0])}function Yf(t,e){isFinite(t[0])||(t[0]=e[0]),isFinite(t[1])||(t[1]=e[1]),Xf(t,0,e),Xf(t,1,e),t[0]>t[1]&&(t[0]=t[1])}var jf=cl,qf=zf.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(e)||(i[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]),qf.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Uf(t)},getTicks:function(t){var e=this._interval,i=this._extent,n=this._niceExtent,o=this._intervalPrecision,a=[];if(!e)return a;i[0]<n[0]&&a.push(t?jf(n[0]-e):i[0]);for(var r=n[0];r<=n[1]&&(a.push(r),(r=jf(r+e,o))!==a[a.length-1]);)if(1e4<a.length)return[];var s=a.length?a[a.length-1]:n[1];return i[1]>s&&a.push(t?s+e:i[1]),a},getMinorTicks:function(t){for(var e=this.getTicks(!0),i=[],n=this.getExtent(),o=1;o<e.length;o++){for(var a=e[o-1],r=0,s=[],l=(e[o]-a)/t;r<t-1;){var u=cl(a+(r+1)*l);u>n[0]&&u<n[1]&&s.push(u),r++}i.push(s)}return i},getLabel:function(t,e){if(null==t)return"";var i=e&&e.precision;return null==i?i=pl(t)||0:"auto"===i&&(i=this._intervalPrecision),Dl(t=jf(t,i,!0))},niceTicks:function(t,e,i){t=t||5;var n=this._extent,o=n[1]-n[0];if(isFinite(o)){o<0&&(o=-o,n.reverse());var a=function(t,e,i,n){var o={},a=o.interval=Ml((t[1]-t[0])/e,!0);null!=i&&a<i&&(a=o.interval=i),null!=n&&n<a&&(a=o.interval=n);var r=o.intervalPrecision=Uf(a);return Yf(o.niceTickExtent=[Zf(Math.ceil(t[0]/a)*a,r),Zf(Math.floor(t[1]/a)*a,r)],t),o}(n,t,e,i);this._intervalPrecision=a.intervalPrecision,this._interval=a.interval,this._niceExtent=a.niceTickExtent}},niceExtent:function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var i=e[0];t.fixMax||(e[1]+=i/2),e[0]-=i/2}else e[1]=1;isFinite(e[1]-e[0])||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var n=this._interval;t.fixMin||(e[0]=jf(Math.floor(e[0]/n)*n)),t.fixMax||(e[1]=jf(Math.ceil(e[1]/n)*n))}});qf.create=function(){return new qf};var Kf="__ec_stack_",$f="undefined"!=typeof Float32Array?Float32Array:Array;function Jf(t){return t.get("stack")||Kf+t.seriesIndex}function Qf(t){return t.dim+t.index}function tp(t,e){var i=[];return e.eachSeriesByType(t,(function(t){rp(t)&&!sp(t)&&i.push(t)})),i}function ep(t){var e=function(t){var e={};A(t,(function(t){var i=t.coordinateSystem.getBaseAxis();if("time"===i.type||"value"===i.type)for(var n=t.getData(),o=i.dim+"_"+i.index,a=n.mapDimension(i.dim),r=0,s=n.count();r<s;++r){var l=n.get(a,r);e[o]?e[o].push(l):e[o]=[l]}}));var i=[];for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];if(o){o.sort((function(t,e){return t-e}));for(var a=null,r=1;r<o.length;++r){var s=o[r]-o[r-1];0<s&&(a=null===a?s:Math.min(a,s))}i[n]=a}}return i}(t),i=[];return A(t,(function(t){var n,o=t.coordinateSystem.getBaseAxis(),a=o.getExtent();if("category"===o.type)n=o.getBandWidth();else if("value"===o.type||"time"===o.type){var r=e[o.dim+"_"+o.index],s=Math.abs(a[1]-a[0]),l=o.scale.getExtent(),u=Math.abs(l[1]-l[0]);n=r?s/u*r:s}else{var h=t.getData();n=Math.abs(a[1]-a[0])/h.count()}var c=hl(t.get("barWidth"),n),d=hl(t.get("barMaxWidth"),n),f=hl(t.get("barMinWidth")||1,n),p=t.get("barGap"),g=t.get("barCategoryGap");i.push({bandWidth:n,barWidth:c,barMaxWidth:d,barMinWidth:f,barGap:p,barCategoryGap:g,axisKey:Qf(o),stackId:Jf(t)})})),ip(i)}function ip(t){var e={};A(t,(function(t,i){var n=t.axisKey,o=t.bandWidth,a=e[n]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},r=a.stacks;e[n]=a;var s=t.stackId;r[s]||a.autoWidthCount++,r[s]=r[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!r[s].width&&(r[s].width=l,l=Math.min(a.remainedWidth,l),a.remainedWidth-=l);var u=t.barMaxWidth;u&&(r[s].maxWidth=u);var h=t.barMinWidth;h&&(r[s].minWidth=h);var c=t.barGap;null!=c&&(a.gap=c);var d=t.barCategoryGap;null!=d&&(a.categoryGap=d)}));var i={};return A(e,(function(t,e){i[e]={};var n=t.stacks,o=t.bandWidth,a=hl(t.categoryGap,o),r=hl(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,u=(s-a)/(l+(l-1)*r);u=Math.max(u,0),A(n,(function(t){var e=t.maxWidth,i=t.minWidth;if(t.width)n=t.width,e&&(n=Math.min(n,e)),i&&(n=Math.max(n,i)),t.width=n,s-=n+r*n,l--;else{var n=u;e&&e<n&&(n=Math.min(e,s)),i&&n<i&&(n=i),n!==u&&(t.width=n,s-=n+r*n,l--)}})),u=(s-a)/(l+(l-1)*r),u=Math.max(u,0);var h,c=0;A(n,(function(t,e){t.width||(t.width=u),c+=(h=t).width*(1+r)})),h&&(c-=h.width*r);var d=-c/2;A(n,(function(t,n){i[e][n]=i[e][n]||{bandWidth:o,offset:d,width:t.width},d+=t.width*(1+r)}))})),i}function np(t,e,i){if(t&&e){var n=t[Qf(e)];return null!=n&&null!=i&&(n=n[Jf(i)]),n}}function op(t,e){var i=tp(t,e),n=ep(i),o={};A(i,(function(t){var e=t.getData(),i=t.coordinateSystem,a=i.getBaseAxis(),r=Jf(t),s=n[Qf(a)][r],l=s.offset,u=s.width,h=i.getOtherAxis(a),c=t.get("barMinHeight")||0;o[r]=o[r]||[],e.setLayout({bandWidth:s.bandWidth,offset:l,size:u});for(var d=e.mapDimension(h.dim),f=e.mapDimension(a.dim),p=Nf(e,d),g=h.isHorizontal(),m=lp(0,h),v=0,y=e.count();v<y;v++){var x=e.get(d,v),_=e.get(f,v);if(!isNaN(x)&&!isNaN(_)){var w,b,S,M,I,T=0<=x?"p":"n",A=m;p&&(o[r][_]||(o[r][_]={p:m,n:m}),A=o[r][_][T]),g?(w=A,b=(I=i.dataToPoint([x,_]))[1]+l,S=I[0]-m,M=u,Math.abs(S)<c&&(S=(S<0?-1:1)*c),p&&(o[r][_][T]+=S)):(w=(I=i.dataToPoint([_,x]))[0]+l,b=A,S=u,M=I[1]-m,Math.abs(M)<c&&(M=(M<=0?-1:1)*c),p&&(o[r][_][T]+=M)),e.setItemLayout(v,{x:w,y:b,width:S,height:M})}}}),this)}var ap={seriesType:"bar",plan:Gh(),reset:function(t){if(rp(t)&&sp(t)){var e=t.getData(),i=t.coordinateSystem,n=i.getBaseAxis(),o=i.getOtherAxis(n),a=e.mapDimension(o.dim),r=e.mapDimension(n.dim),s=o.isHorizontal(),l=s?0:1,u=np(ep([t]),n,t).width;return.5<u||(u=.5),{progress:function(t,e){for(var n,h=t.count,c=new $f(2*h),d=new $f(h),f=[],p=[],g=0,m=0;null!=(n=t.next());)p[l]=e.get(a,n),p[1-l]=e.get(r,n),f=i.dataToPoint(p,null,f),c[g++]=f[0],c[g++]=f[1],d[m++]=n;e.setLayout({largePoints:c,largeDataIndices:d,barWidth:u,valueAxisStart:lp(0,o),valueAxisHorizontal:s})}}}}};function rp(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function sp(t){return t.pipelineContext&&t.pipelineContext.large}function lp(t,e){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}var up=qf.prototype,hp=Math.ceil,cp=Math.floor,dp=864e5,fp=qf.extend({type:"time",getLabel:function(t){var e=this._stepLvl,i=new Date(t);return Gl(e[0],i,this.getSetting("useUTC"))},niceExtent:function(t){var e=this._extent;if(e[0]===e[1]&&(e[0]-=dp,e[1]+=dp),e[1]===-1/0&&e[0]===1/0){var i=new Date;e[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),e[0]=e[1]-dp}this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var n=this._interval;t.fixMin||(e[0]=cl(cp(e[0]/n)*n)),t.fixMax||(e[1]=cl(hp(e[1]/n)*n))},niceTicks:function(t,e,i){var n=this._extent,o=n[1]-n[0],a=o/(t=t||10);null!=e&&a<e&&(a=e),null!=i&&i<a&&(a=i);var r=pp.length,s=function(t,e,i,n){for(;i<n;){var o=i+n>>>1;t[o][1]<e?i=1+o:n=o}return i}(pp,a,0,r),l=pp[Math.min(s,r-1)],u=l[1];"year"===l[0]&&(u*=Ml(o/u/t,!0));var h=this.getSetting("useUTC")?0:60*new Date(+n[0]||+n[1]).getTimezoneOffset()*1e3,c=[Math.round(hp((n[0]-h)/u)*u+h),Math.round(cp((n[1]-h)/u)*u+h)];Yf(c,n),this._stepLvl=l,this._interval=u,this._niceExtent=c},parse:function(t){return+wl(t)}});A(["contain","normalize"],(function(t){fp.prototype[t]=function(e){return up[t].call(this,this.parse(e))}}));var pp=[["hh:mm:ss",1e3],["hh:mm:ss",5e3],["hh:mm:ss",1e4],["hh:mm:ss",15e3],["hh:mm:ss",3e4],["hh:mm\nMM-dd",6e4],["hh:mm\nMM-dd",3e5],["hh:mm\nMM-dd",6e5],["hh:mm\nMM-dd",9e5],["hh:mm\nMM-dd",18e5],["hh:mm\nMM-dd",36e5],["hh:mm\nMM-dd",72e5],["hh:mm\nMM-dd",216e5],["hh:mm\nMM-dd",432e5],["MM-dd\nyyyy",dp],["MM-dd\nyyyy",2*dp],["MM-dd\nyyyy",3*dp],["MM-dd\nyyyy",4*dp],["MM-dd\nyyyy",5*dp],["MM-dd\nyyyy",6*dp],["week",7*dp],["MM-dd\nyyyy",864e6],["week",14*dp],["week",21*dp],["month",31*dp],["week",42*dp],["month",62*dp],["week",70*dp],["quarter",95*dp],["month",31*dp*4],["month",13392e6],["half-year",16416e6],["month",31*dp*8],["month",26784e6],["year",380*dp]];fp.create=function(t){return new fp({useUTC:t.ecModel.get("useUTC")})};var gp=zf.prototype,mp=qf.prototype,vp=pl,yp=cl,xp=Math.floor,_p=Math.ceil,wp=Math.pow,bp=Math.log,Sp=zf.extend({type:"log",base:10,$constructor:function(){zf.apply(this,arguments),this._originalScale=new qf},getTicks:function(t){var e=this._originalScale,i=this._extent,n=e.getExtent();return D(mp.getTicks.call(this,t),(function(t){var o=cl(wp(this.base,t));return o=t===i[0]&&e.__fixMin?Mp(o,n[0]):o,t===i[1]&&e.__fixMax?Mp(o,n[1]):o}),this)},getMinorTicks:mp.getMinorTicks,getLabel:mp.getLabel,scale:function(t){return t=gp.scale.call(this,t),wp(this.base,t)},setExtent:function(t,e){var i=this.base;t=bp(t)/bp(i),e=bp(e)/bp(i),mp.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=gp.getExtent.call(this);e[0]=wp(t,e[0]),e[1]=wp(t,e[1]);var i=this._originalScale,n=i.getExtent();return i.__fixMin&&(e[0]=Mp(e[0],n[0])),i.__fixMax&&(e[1]=Mp(e[1],n[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=bp(t[0])/bp(e),t[1]=bp(t[1])/bp(e),gp.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(i==1/0||i<=0)){var n=bl(i);for(t/i*n<=.5&&(n*=10);!isNaN(n)&&Math.abs(n)<1&&0<Math.abs(n);)n*=10;var o=[cl(_p(e[0]/n)*n),cl(xp(e[1]/n)*n)];this._interval=n,this._niceExtent=o}},niceExtent:function(t){mp.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});function Mp(t,e){return yp(t,vp(e))}function Ip(t,e){var i,n,o,a=t.type,r=e.getMin(),s=e.getMax(),l=null!=r,u=null!=s,h=t.getExtent();"ordinal"===a?i=e.getCategories().length:(N(n=e.get("boundaryGap"))||(n=[n||0,n||0]),"boolean"==typeof n[0]&&(n=[0,0]),n[0]=hl(n[0],1),n[1]=hl(n[1],1),o=h[1]-h[0]||Math.abs(h[0])),null==r&&(r="ordinal"===a?i?0:NaN:h[0]-n[0]*o),null==s&&(s="ordinal"===a?i?i-1:NaN:h[1]+n[1]*o),"dataMin"===r?r=h[0]:"function"==typeof r&&(r=r({min:h[0],max:h[1]})),"dataMax"===s?s=h[1]:"function"==typeof s&&(s=s({min:h[0],max:h[1]})),null!=r&&isFinite(r)||(r=NaN),null!=s&&isFinite(s)||(s=NaN),t.setBlank(F(r)||F(s)||"ordinal"===a&&!t.getOrdinalMeta().categories.length),e.getNeedCrossZero()&&(0<r&&0<s&&!l&&(r=0),r<0&&s<0&&!u&&(s=0));var c=e.ecModel;if(c&&"time"===a){var d,f=tp("bar",c);if(A(f,(function(t){d|=t.getBaseAxis()===e.axis})),d){var p=ep(f),g=function(t,e,i,n){var o=i.axis.getExtent(),a=o[1]-o[0],r=np(n,i.axis);if(void 0===r)return{min:t,max:e};var s=1/0;A(r,(function(t){s=Math.min(t.offset,s)}));var l=-1/0;A(r,(function(t){l=Math.max(t.offset+t.width,l)})),s=Math.abs(s),l=Math.abs(l);var u=s+l,h=e-t,c=h/(1-(s+l)/a)-h;return{min:t-=s/u*c,max:e+=l/u*c}}(r,s,e,p);r=g.min,s=g.max}}return[r,s]}function Tp(t,e){var i=Ip(t,e),n=null!=e.getMin(),o=null!=e.getMax(),a=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var r=t.type;t.setExtent(i[0],i[1]),t.niceExtent({splitNumber:a,fixMin:n,fixMax:o,minInterval:"interval"===r||"time"===r?e.get("minInterval"):null,maxInterval:"interval"===r||"time"===r?e.get("maxInterval"):null});var s=e.get("interval");null!=s&&t.setInterval&&t.setInterval(s)}function Ap(t,e){if(e=e||t.get("type"))switch(e){case"category":return new Hf(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new qf;default:return(zf.getClass(e)||qf).create(t)}}function Dp(t){var e,i=t.getLabelModel().get("formatter"),n="category"===t.type?t.scale.getExtent()[0]:null;return"string"==typeof i?(e=i,i=function(i){return i=t.scale.getLabel(i),e.replace("{value}",null!=i?i:"")}):"function"==typeof i?function(e,o){return null!=n&&(o=e-n),i(Cp(t,e),o)}:function(e){return t.scale.getLabel(e)}}function Cp(t,e){return"category"===t.type?t.scale.getLabel(e):e}function Lp(t){var e=t.get("interval");return null==e?"auto":e}function kp(t){return"category"===t.type&&0===Lp(t.getLabelModel())}A(["contain","normalize"],(function(t){Sp.prototype[t]=function(e){return e=bp(e)/bp(this.base),gp[t].call(this,e)}})),Sp.create=function(){return new Sp};var Pp={getMin:function(t){var e=this.option,i=t||null==e.rangeStart?e.min:e.rangeStart;return this.axis&&null!=i&&"dataMin"!==i&&"function"!=typeof i&&!F(i)&&(i=this.axis.scale.parse(i)),i},getMax:function(t){var e=this.option,i=t||null==e.rangeEnd?e.max:e.rangeEnd;return this.axis&&null!=i&&"dataMax"!==i&&"function"!=typeof i&&!F(i)&&(i=this.axis.scale.parse(i)),i},getNeedCrossZero:function(){var t=this.option;return null==t.rangeStart&&null==t.rangeEnd&&!t.scale},getCoordSysModel:et,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},Op=os({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,o=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+o,n+a),t.lineTo(i-o,n+a),t.closePath()}}),Np=os({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,o=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+o,n),t.lineTo(i,n+a),t.lineTo(i-o,n),t.closePath()}}),Ep=os({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,o=e.width/5*3,a=Math.max(o,e.height),r=o/2,s=r*r/(a-r),l=n-a+r+s,u=Math.asin(s/r),h=Math.cos(u)*r,c=Math.sin(u),d=Math.cos(u),f=.6*r,p=.7*r;t.moveTo(i-h,l+s),t.arc(i,l,r,Math.PI-u,2*Math.PI+u),t.bezierCurveTo(i+h-c*f,l+s+d*f,i,n-p,i,n),t.bezierCurveTo(i,n-p,i-h+c*f,l+s+d*f,i-h,l+s),t.closePath()}}),Rp=os({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.height,n=e.x,o=e.y,a=e.width/3*2;t.moveTo(n,o),t.lineTo(n+a,o+i),t.lineTo(n,o+i/4*3),t.lineTo(n-a,o+i),t.lineTo(n,o),t.closePath()}}),zp={line:function(t,e,i,n,o){o.x1=t,o.y1=e+n/2,o.x2=t+i,o.y2=e+n/2},rect:function(t,e,i,n,o){o.x=t,o.y=e,o.width=i,o.height=n},roundRect:function(t,e,i,n,o){o.x=t,o.y=e,o.width=i,o.height=n,o.r=Math.min(i,n)/4},square:function(t,e,i,n,o){var a=Math.min(i,n);o.x=t,o.y=e,o.width=a,o.height=a},circle:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.r=Math.min(i,n)/2},diamond:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.width=i,o.height=n},pin:function(t,e,i,n,o){o.x=t+i/2,o.y=e+n/2,o.width=i,o.height=n},arrow:function(t,e,i,n,o){o.x=t+i/2,o.y=e+n/2,o.width=i,o.height=n},triangle:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.width=i,o.height=n}},Bp={};A({line:Vr,rect:zr,roundRect:zr,square:zr,circle:Mr,diamond:Np,pin:Ep,arrow:Rp,triangle:Op},(function(t,e){Bp[e]=new t}));var Vp=os({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,i){var n=en(t,e,i),o=this.shape;return o&&"pin"===o.symbolType&&"inside"===e.textPosition&&(n.y=i.y+.4*i.height),n},buildPath:function(t,e,i){var n=e.symbolType;if("none"!==n){var o=Bp[n];o=o||Bp[n="rect"],zp[n](e.x,e.y,e.width,e.height,o.shape),o.buildPath(t,o.shape,i)}}});function Gp(t,e){if("image"!==this.type){var i=this.style,n=this.shape;n&&"line"===n.symbolType?i.stroke=t:this.__isEmptyBrush?(i.stroke=t,i.fill=e||"#fff"):(i.fill&&(i.fill=t),i.stroke&&(i.stroke=t)),this.dirty(!1)}}function Fp(t,e,i,n,o,a,r){var s,l=0===t.indexOf("empty");return l&&(t=t.substr(5,1).toLowerCase()+t.substr(6)),(s=0===t.indexOf("image://")?ls(t.slice(8),new vi(e,i,n,o),r?"center":"cover"):0===t.indexOf("path://")?ss(t.slice(7),{},new vi(e,i,n,o),r?"center":"cover"):new Vp({shape:{symbolType:t,x:e,y:i,width:n,height:o}})).__isEmptyBrush=l,s.setColor=Gp,s.setColor(a),s}var Wp=(Object.freeze||Object)({createList:function(t){return Rf(t.getSource(),t)},getLayoutRect:ql,dataStack:{isDimensionStacked:Nf,enableDataStack:Of,getStackedDimension:Ef},createScale:function(t,e){var i=e;ol.isInstance(e)||I(i=new ol(e),Pp);var n=Ap(i);return n.setExtent(t[0],t[1]),Tp(n,i),n},mixinAxisModelCommonMethods:function(t){I(t,Pp)},completeDimensions:Af,createDimensions:Cf,createSymbol:Fp});function Hp(t,e){return Math.abs(t-e)<1e-8}function Zp(t,e,i){var n=0,o=t[0];if(!o)return!1;for(var a=1;a<t.length;a++){var r=t[a];n+=Ya(o[0],o[1],r[0],r[1],e,i),o=r}var s=t[0];return Hp(o[0],s[0])&&Hp(o[1],s[1])||(n+=Ya(o[0],o[1],s[0],s[1],e,i)),0!==n}function Up(t,e,i){if(this.name=t,this.geometries=e,i)i=[i[0],i[1]];else{var n=this.getBoundingRect();i=[n.x+n.width/2,n.y+n.height/2]}this.center=i}function Xp(t,e,i){for(var n=[],o=e[0],a=e[1],r=0;r<t.length;r+=2){var s=t.charCodeAt(r)-64,l=t.charCodeAt(r+1)-64;s=s>>1^-(1&s),l=l>>1^-(1&l),o=s+=o,a=l+=a,n.push([s/i,l/i])}return n}function Yp(t){return function(t){if(t.UTF8Encoding){var e=t.UTF8Scale;null==e&&(e=1024);for(var i=t.features,n=0;n<i.length;n++)for(var o=i[n].geometry,a=o.coordinates,r=o.encodeOffsets,s=0;s<a.length;s++){var l=a[s];if("Polygon"===o.type)a[s]=Xp(l,r[s],e);else if("MultiPolygon"===o.type)for(var u=0;u<l.length;u++)l[u]=Xp(l[u],r[s][u],e)}t.UTF8Encoding=!1}}(t),D(L(t.features,(function(t){return t.geometry&&t.properties&&0<t.geometry.coordinates.length})),(function(t){var e=t.properties,i=t.geometry,n=i.coordinates,o=[];"Polygon"===i.type&&o.push({type:"polygon",exterior:n[0],interiors:n.slice(1)}),"MultiPolygon"===i.type&&A(n,(function(t){t[0]&&o.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})}));var a=new Up(e.name,o,e.cp);return a.properties=e,a}))}Up.prototype={constructor:Up,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,i=[e,e],n=[-e,-e],o=[],a=[],r=this.geometries,s=0;s<r.length;s++)"polygon"===r[s].type&&(wa(r[s].exterior,o,a),wt(i,i,o),bt(n,n,a));return 0===s&&(i[0]=i[1]=n[0]=n[1]=0),this._rect=new vi(i[0],i[1],n[0]-i[0],n[1]-i[1])},contain:function(t){var e=this.getBoundingRect(),i=this.geometries;if(!e.contain(t[0],t[1]))return!1;t:for(var n=0,o=i.length;n<o;n++)if("polygon"===i[n].type){var a=i[n].interiors;if(Zp(i[n].exterior,t[0],t[1])){for(var r=0;r<(a?a.length:0);r++)if(Zp(a[r]))continue t;return!0}}return!1},transformTo:function(t,e,i,n){var o=this.getBoundingRect(),a=o.width/o.height;i?n=n||i/a:i=a*n;for(var r=new vi(t,e,i,n),s=o.calculateTransform(r),l=this.geometries,u=0;u<l.length;u++)if("polygon"===l[u].type){for(var h=l[u].exterior,c=l[u].interiors,d=0;d<h.length;d++)_t(h[d],h[d],s);for(var f=0;f<(c?c.length:0);f++)for(d=0;d<c[f].length;d++)_t(c[f][d],c[f][d],s)}(o=this._rect).copy(r),this.center=[o.x+o.width/2,o.y+o.height/2]},cloneShallow:function(t){null==t&&(t=this.name);var e=new Up(t,this.geometries,this.center);return e._rect=this._rect,e.transformTo=null,e}};var jp=ko();function qp(t,e){var i,n=Kp(t,"labels"),o=Lp(e);return $p(n,o)||Jp(n,o,{labels:E(o)?tg(t,o):Qp(t,i="auto"===o?function(t){var e=jp(t).autoInterval;return null!=e?e:jp(t).autoInterval=t.calculateCategoryInterval()}(t):o),labelCategoryInterval:i})}function Kp(t,e){return jp(t)[e]||(jp(t)[e]=[])}function $p(t,e){for(var i=0;i<t.length;i++)if(t[i].key===e)return t[i].value}function Jp(t,e,i){return t.push({key:e,value:i}),i}function Qp(t,e,i){var n=Dp(t),o=t.scale,a=o.getExtent(),r=t.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=a[0],h=o.count();0!==u&&1<l&&2<h/l&&(u=Math.round(Math.ceil(u/l)*l));var c=kp(t),d=r.get("showMinLabel")||c,f=r.get("showMaxLabel")||c;d&&u!==a[0]&&g(a[0]);for(var p=u;p<=a[1];p+=l)g(p);function g(t){s.push(i?t:{formattedLabel:n(t),rawLabel:o.getLabel(t),tickValue:t})}return f&&p-l!==a[1]&&g(a[1]),s}function tg(t,e,i){var n=t.scale,o=Dp(t),a=[];return A(n.getTicks(),(function(t){var r=n.getLabel(t);e(t,r)&&a.push(i?t:{formattedLabel:o(t),rawLabel:r,tickValue:t})})),a}var eg=[0,1],ig=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onBand=!1};function ng(t,e){var i=(t[1]-t[0])/e/2;t[0]+=i,t[1]-=i}ig.prototype={constructor:ig,contain:function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return i<=t&&t<=n},containData:function(t){return this.scale.contain(t)},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return gl(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var i=this._extent;i[0]=t,i[1]=e},dataToCoord:function(t,e){var i=this._extent,n=this.scale;return t=n.normalize(t),this.onBand&&"ordinal"===n.type&&ng(i=i.slice(),n.count()),ul(t,eg,i,e)},coordToData:function(t,e){var i=this._extent,n=this.scale;this.onBand&&"ordinal"===n.type&&ng(i=i.slice(),n.count());var o=ul(t,i,eg,e);return this.scale.scale(o)},pointToData:function(t,e){},getTicksCoords:function(t){var e=(t=t||{}).tickModel||this.getTickModel(),i=D(function(t,e){return"category"===t.type?function(t,e){var i,n,o=Kp(t,"ticks"),a=Lp(e),r=$p(o,a);if(r)return r;if(e.get("show")&&!t.scale.isBlank()||(i=[]),E(a))i=tg(t,a,!0);else if("auto"===a){var s=qp(t,t.getLabelModel());n=s.labelCategoryInterval,i=D(s.labels,(function(t){return t.tickValue}))}else i=Qp(t,n=a,!0);return Jp(o,a,{ticks:i,tickCategoryInterval:n})}(t,e):{ticks:t.scale.getTicks()}}(this,e).ticks,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this);return function(t,e,i,n){var o=e.length;if(t.onBand&&!i&&o){var a,r=t.getExtent();if(1===o)e[0].coord=r[0],a=e[1]={coord:r[0]};else{var s=(e[o-1].coord-e[0].coord)/(e[o-1].tickValue-e[0].tickValue);A(e,(function(t){t.coord-=s/2}));var l=t.scale.getExtent();e.push(a={coord:e[o-1].coord+s*(1+l[1]-e[o-1].tickValue)})}var u=r[0]>r[1];h(e[0].coord,r[0])&&(n?e[0].coord=r[0]:e.shift()),n&&h(r[0],e[0].coord)&&e.unshift({coord:r[0]}),h(r[1],a.coord)&&(n?a.coord=r[1]:e.pop()),n&&h(a.coord,r[1])&&e.push({coord:r[1]})}function h(t,e){return t=cl(t),e=cl(e),u?e<t:t<e}}(this,i,e.get("alignWithLabel"),t.clamp),i},getMinorTicksCoords:function(){if("ordinal"===this.scale.type)return[];var t=this.model.getModel("minorTick").get("splitNumber");return 0<t&&t<100||(t=5),D(this.scale.getMinorTicks(t),(function(t){return D(t,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this)}),this)},getViewLabels:function(){return function(t){return"category"===t.type?function(t){var e=t.getLabelModel(),i=qp(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:i.labelCategoryInterval}:i}(t):function(t){var e=t.scale.getTicks(),i=Dp(t);return{labels:D(e,(function(e,n){return{formattedLabel:i(e,n),rawLabel:t.scale.getLabel(e),tickValue:e}}))}}(t)}(this).labels},getLabelModel:function(){return this.model.getModel("axisLabel")},getTickModel:function(){return this.model.getModel("axisTick")},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),i=e[1]-e[0]+(this.onBand?1:0);0===i&&(i=1);var n=Math.abs(t[1]-t[0]);return Math.abs(n)/i},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return 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),i=Dp(t),n=(e.axisRotate-e.labelRotate)/180*Math.PI,o=t.scale,a=o.getExtent(),r=o.count();if(a[1]-a[0]<1)return 0;var s=1;40<r&&(s=Math.max(1,Math.floor(r/40)));for(var l=a[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),h=Math.abs(u*Math.cos(n)),c=Math.abs(u*Math.sin(n)),d=0,f=0;l<=a[1];l+=s){var p,g=Ji(i(l),e.font,"center","top");p=1.3*g.height,d=Math.max(d,1.3*g.width,7),f=Math.max(f,p,7)}var m=d/h,v=f/c;isNaN(m)&&(m=1/0),isNaN(v)&&(v=1/0);var y=Math.max(0,Math.floor(Math.min(m,v))),x=jp(t.model),_=t.getExtent(),w=x.lastAutoInterval,b=x.lastTickCount;return null!=w&&null!=b&&Math.abs(w-y)<=1&&Math.abs(b-r)<=1&&y<w&&x.axisExtend0===_[0]&&x.axisExtend1===_[1]?y=w:(x.lastTickCount=r,x.lastAutoInterval=y,x.axisExtend0=_[0],x.axisExtend1=_[1]),y}(this)}};var og=Yp,ag={};A(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],(function(t){ag[t]=it[t]}));var rg={};function sg(t,e){var i=t.mapDimension("defaultedLabel",!0),n=i.length;if(1===n)return dh(t,e,i[0]);if(n){for(var o=[],a=0;a<i.length;a++){var r=dh(t,e,i[a]);o.push(r)}return o.join(" ")}}function lg(t,e,i){yi.call(this),this.updateData(t,e,i)}A(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","setHoverStyle","setLabelStyle","setTextStyle","setText","getFont","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","registerShape","getShapeClass","Group","Image","Text","Circle","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],(function(t){rg[t]=$s[t]})),Lh.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(t,e){return Rf(this.getSource(),this,{useEncodeDefaulter:!0})},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,clip:!0,label:{position:"top"},lineStyle:{width:2,type:"solid"},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0}});var ug=lg.prototype,hg=lg.getSymbolSize=function(t,e){var i=t.getItemVisual(e,"symbolSize");return i instanceof Array?i.slice():[+i,+i]};function cg(t){return[t[0]/2,t[1]/2]}function dg(t,e){this.parent.drift(t,e)}ug._createSymbol=function(t,e,i,n,o){this.removeAll();var a=Fp(t,-1,-1,2,2,e.getItemVisual(i,"color"),o);a.attr({z2:100,culling:!0,scale:cg(n)}),a.drift=dg,this._symbolType=t,this.add(a)},ug.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(t)},ug.getSymbolPath=function(){return this.childAt(0)},ug.getScale=function(){return this.childAt(0).scale},ug.highlight=function(){this.childAt(0).trigger("emphasis")},ug.downplay=function(){this.childAt(0).trigger("normal")},ug.setZ=function(t,e){var i=this.childAt(0);i.zlevel=t,i.z=e},ug.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":e.cursor},ug.updateData=function(t,e,i){this.silent=!1;var n=t.getItemVisual(e,"symbol")||"circle",o=t.hostModel,a=hg(t,e),r=n!==this._symbolType;if(r){var s=t.getItemVisual(e,"symbolKeepAspect");this._createSymbol(n,t,e,a,s)}else(l=this.childAt(0)).silent=!1,Gs(l,{scale:cg(a)},o,e);if(this._updateCommon(t,e,a,i),r){var l=this.childAt(0),u=i&&i.fadeIn,h={scale:l.scale.slice()};u&&(h.style={opacity:l.style.opacity}),l.scale=[0,0],u&&(l.style.opacity=0),Fs(l,h,o,e)}this._seriesModel=o};var fg=["itemStyle"],pg=["emphasis","itemStyle"],gg=["label"],mg=["emphasis","label"];function vg(t,e){if(!this.incremental&&!this.useHoverLayer)if("emphasis"===e){var i=this.__symbolOriginalScale,n=i[1]/i[0],o={scale:[Math.max(1.1*i[0],i[0]+3),Math.max(1.1*i[1],i[1]+3*n)]};this.animateTo(o,400,"elasticOut")}else"normal"===e&&this.animateTo({scale:this.__symbolOriginalScale},400,"elasticOut")}function yg(t){this.group=new yi,this._symbolCtor=t||lg}ug._updateCommon=function(t,e,i,n){var o=this.childAt(0),a=t.hostModel,r=t.getItemVisual(e,"color");"image"!==o.type?o.useStyle({strokeNoScale:!0}):o.setStyle({opacity:null,shadowBlur:null,shadowOffsetX:null,shadowOffsetY:null,shadowColor:null});var s=n&&n.itemStyle,l=n&&n.hoverItemStyle,u=n&&n.symbolRotate,h=n&&n.symbolOffset,c=n&&n.labelModel,d=n&&n.hoverLabelModel,f=n&&n.hoverAnimation,p=n&&n.cursorStyle;if(!n||t.hasItemOption){var g=n&&n.itemModel?n.itemModel:t.getItemModel(e);s=g.getModel(fg).getItemStyle(["color"]),l=g.getModel(pg).getItemStyle(),u=g.getShallow("symbolRotate"),h=g.getShallow("symbolOffset"),c=g.getModel(gg),d=g.getModel(mg),f=g.getShallow("hoverAnimation"),p=g.getShallow("cursor")}else l=x({},l);var m=o.style;o.attr("rotation",(u||0)*Math.PI/180||0),h&&o.attr("position",[hl(h[0],i[0]),hl(h[1],i[1])]),p&&o.attr("cursor",p),o.setColor(r,n&&n.symbolInnerColor),o.setStyle(s);var v=t.getItemVisual(e,"opacity");null!=v&&(m.opacity=v);var y=t.getItemVisual(e,"liftZ"),_=o.__z2Origin;null!=y?null==_&&(o.__z2Origin=o.z2,o.z2+=y):null!=_&&(o.z2=_,o.__z2Origin=null);var w=n&&n.useNameLabel;Ls(m,l,c,d,{labelFetcher:a,labelDataIndex:e,defaultText:function(e,i){return w?t.getName(e):sg(t,e)},isRectText:!0,autoColor:r}),o.__symbolOriginalScale=cg(i),o.hoverStyle=l,o.highDownOnUpdate=f&&a.isAnimationEnabled()?vg:null,Ts(o)},ug.fadeOut=function(t,e){var i=this.childAt(0);this.silent=i.silent=!0,e&&e.keepLabel||(i.style.text=null),Gs(i,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,t)},M(lg,yi);var xg=yg.prototype;function _g(t,e,i,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(i))&&!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&"none"!==t.getItemVisual(i,"symbol")}function wg(t){return null==t||z(t)||(t={isIgnore:t}),t||{}}function bg(t){var e=t.hostModel;return{itemStyle:e.getModel("itemStyle").getItemStyle(["color"]),hoverItemStyle:e.getModel("emphasis.itemStyle").getItemStyle(),symbolRotate:e.get("symbolRotate"),symbolOffset:e.get("symbolOffset"),hoverAnimation:e.get("hoverAnimation"),labelModel:e.getModel("label"),hoverLabelModel:e.getModel("emphasis.label"),cursorStyle:e.get("cursor")}}function Sg(t,e,i){var n,o=t.getBaseAxis(),a=t.getOtherAxis(o),r=function(t,e){var i=0,n=t.scale.getExtent();return"start"===e?i=n[0]:"end"===e?i=n[1]:0<n[0]?i=n[0]:n[1]<0&&(i=n[1]),i}(a,i),s=o.dim,l=a.dim,u=e.mapDimension(l),h=e.mapDimension(s),c="x"===l||"radius"===l?1:0,d=D(t.dimensions,(function(t){return e.mapDimension(t)})),f=e.getCalculationInfo("stackResultDimension");return(n|=Nf(e,d[0]))&&(d[0]=f),(n|=Nf(e,d[1]))&&(d[1]=f),{dataDimsForPoint:d,valueStart:r,valueAxisDim:l,baseAxisDim:s,stacked:!!n,valueDim:u,baseDim:h,baseDataOffset:c,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function Mg(t,e,i,n){var o=NaN;t.stacked&&(o=i.get(i.getCalculationInfo("stackedOverDimension"),n)),isNaN(o)&&(o=t.valueStart);var a=t.baseDataOffset,r=[];return r[a]=i.get(t.baseDim,n),r[1-a]=o,e.dataToPoint(r)}xg.updateData=function(t,e){e=wg(e);var i=this.group,n=t.hostModel,o=this._data,a=this._symbolCtor,r=bg(t);o||i.removeAll(),t.diff(o).add((function(n){var o=t.getItemLayout(n);if(_g(t,o,n,e)){var s=new a(t,n,r);s.attr("position",o),t.setItemGraphicEl(n,s),i.add(s)}})).update((function(s,l){var u=o.getItemGraphicEl(l),h=t.getItemLayout(s);_g(t,h,s,e)?(u?(u.updateData(t,s,r),Gs(u,{position:h},n)):(u=new a(t,s)).attr("position",h),i.add(u),t.setItemGraphicEl(s,u)):i.remove(u)})).remove((function(t){var e=o.getItemGraphicEl(t);e&&e.fadeOut((function(){i.remove(e)}))})).execute(),this._data=t},xg.isPersistent=function(){return!0},xg.updateLayout=function(){var t=this._data;t&&t.eachItemGraphicEl((function(e,i){var n=t.getItemLayout(i);e.attr("position",n)}))},xg.incrementalPrepareUpdate=function(t){this._seriesScope=bg(t),this._data=null,this.group.removeAll()},xg.incrementalUpdate=function(t,e,i){function n(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}i=wg(i);for(var o=t.start;o<t.end;o++){var a=e.getItemLayout(o);if(_g(e,a,o,i)){var r=new this._symbolCtor(e,o,this._seriesScope);r.traverse(n),r.attr("position",a),this.group.add(r),e.setItemGraphicEl(o,r)}}},xg.remove=function(t){var e=this.group,i=this._data;i&&t?i.eachItemGraphicEl((function(t){t.fadeOut((function(){e.remove(t)}))})):e.removeAll()};var Ig=wt,Tg=bt,Ag=ut,Dg=at,Cg=[],Lg=[],kg=[];function Pg(t){return isNaN(t[0])||isNaN(t[1])}function Og(t,e,i,n,o,a,r,s,l,u){return"none"!==u&&u?(function(t,e,i,n,o,a,r,s,l,u,h){for(var c=0,d=i,f=0;f<n;f++){var p=e[d];if(o<=d||d<0)break;if(Pg(p)){if(h){d+=a;continue}break}if(d===i)t[0<a?"moveTo":"lineTo"](p[0],p[1]);else if(0<l){var g=e[c],m="y"===u?1:0,v=(p[m]-g[m])*l;Dg(Lg,g),Lg[m]=g[m]+v,Dg(kg,p),kg[m]=p[m]-v,t.bezierCurveTo(Lg[0],Lg[1],kg[0],kg[1],p[0],p[1])}else t.lineTo(p[0],p[1]);c=d,d+=a}return f}).apply(this,arguments):(function(t,e,i,n,o,a,r,s,l,u,h){for(var c=0,d=i,f=0;f<n;f++){var p=e[d];if(o<=d||d<0)break;if(Pg(p)){if(h){d+=a;continue}break}if(d===i)t[0<a?"moveTo":"lineTo"](p[0],p[1]),Dg(Lg,p);else if(0<l){var g=d+a,m=e[g];if(h)for(;m&&Pg(e[g]);)m=e[g+=a];var v=.5,y=e[c];if(!(m=e[g])||Pg(m))Dg(kg,p);else{var x,_;if(Pg(m)&&!h&&(m=p),ht(Cg,m,y),"x"===u||"y"===u){var w="x"===u?0:1;x=Math.abs(p[w]-y[w]),_=Math.abs(p[w]-m[w])}else x=mt(p,y),_=mt(p,m);Ag(kg,p,Cg,-l*(1-(v=_/(_+x))))}Ig(Lg,Lg,s),Tg(Lg,Lg,r),Ig(kg,kg,s),Tg(kg,kg,r),t.bezierCurveTo(Lg[0],Lg[1],kg[0],kg[1],p[0],p[1]),Ag(Lg,p,Cg,l*v)}else t.lineTo(p[0],p[1]);c=d,d+=a}return f}).apply(this,arguments)}function Ng(t,e){var i=[1/0,1/0],n=[-1/0,-1/0];if(e)for(var o=0;o<t.length;o++){var a=t[o];a[0]<i[0]&&(i[0]=a[0]),a[1]<i[1]&&(i[1]=a[1]),a[0]>n[0]&&(n[0]=a[0]),a[1]>n[1]&&(n[1]=a[1])}return{min:e?i:n,max:e?n:i}}var Eg=ar.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:Sr(ar.prototype.brush),buildPath:function(t,e){var i=e.points,n=0,o=i.length,a=Ng(i,e.smoothConstraint);if(e.connectNulls){for(;0<o&&Pg(i[o-1]);o--);for(;n<o&&Pg(i[n]);n++);}for(;n<o;)n+=Og(t,i,n,o,o,1,a.min,a.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),Rg=ar.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:Sr(ar.prototype.brush),buildPath:function(t,e){var i=e.points,n=e.stackedOnPoints,o=0,a=i.length,r=e.smoothMonotone,s=Ng(i,e.smoothConstraint),l=Ng(n,e.smoothConstraint);if(e.connectNulls){for(;0<a&&Pg(i[a-1]);a--);for(;o<a&&Pg(i[o]);o++);}for(;o<a;){var u=Og(t,i,o,a,a,1,s.min,s.max,e.smooth,r,e.connectNulls);Og(t,n,o+u-1,u,a,-1,l.min,l.max,e.stackedOnSmooth,r,e.connectNulls),o+=u+1,t.closePath()}}});function zg(t,e,i){var n=t.getArea(),o=t.getBaseAxis().isHorizontal(),a=n.x,r=n.y,s=n.width,l=n.height,u=i.get("lineStyle.width")||2,h=new zr({shape:{x:a-=u/2,y:r-=u/2,width:s+=u,height:l+=u}});return e&&(h.shape[o?"width":"height"]=0,Fs(h,{shape:{width:s,height:l}},i)),h}function Bg(t,e,i){var n=t.getArea(),o=new Tr({shape:{cx:cl(t.cx,1),cy:cl(t.cy,1),r0:cl(n.r0,1),r:cl(n.r,1),startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});return e&&(o.shape.endAngle=n.startAngle,Fs(o,{shape:{endAngle:n.endAngle}},i)),o}function Vg(t,e,i){return t?"polar"===t.type?Bg(t,e,i):"cartesian2d"===t.type?zg(t,e,i):null:null}function Gg(t,e){if(t.length===e.length){for(var i=0;i<t.length;i++){var n=t[i],o=e[i];if(n[0]!==o[0]||n[1]!==o[1])return}return!0}}function Fg(t){return"number"==typeof t?t:t?.5:0}function Wg(t,e,i){for(var n=e.getBaseAxis(),o="x"===n.dim||"radius"===n.dim?0:1,a=[],r=0;r<t.length-1;r++){var s=t[r+1],l=t[r];a.push(l);var u=[];switch(i){case"end":u[o]=s[o],u[1-o]=l[1-o],a.push(u);break;case"middle":var h=[];u[o]=h[o]=(l[o]+s[o])/2,u[1-o]=l[1-o],h[1-o]=s[1-o],a.push(u),a.push(h);break;default:u[o]=l[o],u[1-o]=s[1-o],a.push(u)}}return t[r]&&a.push(t[r]),a}function Hg(t,e,i){if("cartesian2d"!==t.type)return Bg(t,e,i);var n=t.getBaseAxis().isHorizontal(),o=zg(t,e,i);if(!i.get("clip",!0)){var a=o.shape,r=Math.max(a.width,a.height);n?(a.y-=r,a.height+=2*r):(a.x-=r,a.width+=2*r)}return o}function Zg(t,e,i){return{seriesType:t,performRawSeries:!0,reset:function(t,n,o){var a=t.getData(),r=t.get("symbol"),s=t.get("symbolSize"),l=t.get("symbolKeepAspect"),u=E(r),h=E(s),c=u||h,d=!u&&r?r:e;if(a.setVisual({legendSymbol:i||d,symbol:d,symbolSize:h?null:s,symbolKeepAspect:l}),!n.isSeriesFiltered(t))return{dataEach:a.hasItemOption||c?function(e,i){if(c){var n=t.getRawValue(i),o=t.getDataParams(i);u&&e.setItemVisual(i,"symbol",r(n,o)),h&&e.setItemVisual(i,"symbolSize",s(n,o))}if(e.hasItemOption){var a=e.getItemModel(i),l=a.getShallow("symbol",!0),d=a.getShallow("symbolSize",!0),f=a.getShallow("symbolKeepAspect",!0);null!=l&&e.setItemVisual(i,"symbol",l),null!=d&&e.setItemVisual(i,"symbolSize",d),null!=f&&e.setItemVisual(i,"symbolKeepAspect",f)}}:null}}}}function Ug(t){return{seriesType:t,plan:Gh(),reset:function(t){var e=t.getData(),i=t.coordinateSystem,n=t.pipelineContext.large;if(i){var o=D(i.dimensions,(function(t){return e.mapDimension(t)})).slice(0,2),a=o.length,r=e.getCalculationInfo("stackResultDimension");return Nf(e,o[0])&&(o[0]=r),Nf(e,o[1])&&(o[1]=r),a&&{progress:function(t,e){for(var r=n&&new Float32Array((t.end-t.start)*a),s=t.start,l=0,u=[],h=[];s<t.end;s++){var c;if(1===a){var d=e.get(o[0],s);c=!isNaN(d)&&i.dataToPoint(d,null,h)}else{d=u[0]=e.get(o[0],s);var f=u[1]=e.get(o[1],s);c=!isNaN(d)&&!isNaN(f)&&i.dataToPoint(u,null,h)}n?(r[l++]=c?c[0]:NaN,r[l++]=c?c[1]:NaN):e.setItemLayout(s,c&&c.slice()||[NaN,NaN])}n&&e.setLayout("symbolPoints",r)}}}}}}function Xg(t,e){return Math.round(t.length/2)}Hh.extend({type:"line",init:function(){var t=new yi,e=new yg;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,i){var n=t.coordinateSystem,o=this.group,a=t.getData(),r=t.getModel("lineStyle"),s=t.getModel("areaStyle"),l=a.mapArray(a.getItemLayout),u="polar"===n.type,h=this._coordSys,c=this._symbolDraw,d=this._polyline,f=this._polygon,p=this._lineGroup,g=t.get("animation"),m=!s.isEmpty(),v=s.get("origin"),y=function(t,e,i){if(!i.valueDim)return[];for(var n=[],o=0,a=e.count();o<a;o++)n.push(Mg(i,t,e,o));return n}(n,a,Sg(n,a,v)),x=t.get("showSymbol"),w=x&&!u&&function(t,e,i){var n=t.get("showAllSymbol"),o="auto"===n;if(!n||o){var a=i.getAxesByScale("ordinal")[0];if(a&&(!o||!function(t,e){var i=t.getExtent(),n=Math.abs(i[1]-i[0])/t.scale.count();isNaN(n)&&(n=0);for(var o=e.count(),a=Math.max(1,Math.round(o/5)),r=0;r<o;r+=a)if(1.5*lg.getSymbolSize(e,r)[t.isHorizontal()?1:0]>n)return!1;return!0}(a,e))){var r=e.mapDimension(a.dim),s={};return A(a.getViewLabels(),(function(t){s[t.tickValue]=1})),function(t){return!s.hasOwnProperty(e.get(r,t))}}}}(t,a,n),b=this._data;b&&b.eachItemGraphicEl((function(t,e){t.__temp&&(o.remove(t),b.setItemGraphicEl(e,null))})),x||c.remove(),o.add(p);var S,M=!u&&t.get("step");n&&n.getArea&&t.get("clip",!0)&&(null!=(S=n.getArea()).width?(S.x-=.1,S.y-=.1,S.width+=.2,S.height+=.2):S.r0&&(S.r0-=.5,S.r1+=.5)),this._clipShapeForSymbol=S,d&&h.type===n.type&&M===this._step?(m&&!f?f=this._newPolygon(l,y,n,g):f&&!m&&(p.remove(f),f=this._polygon=null),p.setClipPath(Hg(n,!1,t)),x&&c.updateData(a,{isIgnore:w,clipShape:S}),a.eachItemGraphicEl((function(t){t.stopAnimation(!0)})),Gg(this._stackedOnPoints,y)&&Gg(this._points,l)||(g?this._updateAnimation(a,y,n,i,M,v):(M&&(l=Wg(l,n,M),y=Wg(y,n,M)),d.setShape({points:l}),f&&f.setShape({points:l,stackedOnPoints:y})))):(x&&c.updateData(a,{isIgnore:w,clipShape:S}),M&&(l=Wg(l,n,M),y=Wg(y,n,M)),d=this._newPolyline(l,n,g),m&&(f=this._newPolygon(l,y,n,g)),p.setClipPath(Hg(n,!0,t)));var I=function(t,e){var i=t.getVisual("visualMeta");if(i&&i.length&&t.count()&&"cartesian2d"===e.type){for(var n,o,a=i.length-1;0<=a;a--){var r=t.getDimensionInfo(t.dimensions[i[a].dimension]);if("x"===(n=r&&r.coordDim)||"y"===n){o=i[a];break}}if(o){var s=e.getAxis(n),l=D(o.stops,(function(t){return{coord:s.toGlobalCoord(s.dataToCoord(t.value)),color:t.color}})),u=l.length,h=o.outerColors.slice();u&&l[0].coord>l[u-1].coord&&(l.reverse(),h.reverse());var c=l[0].coord-10,d=l[u-1].coord+10,f=d-c;if(f<.001)return"transparent";A(l,(function(t){t.offset=(t.coord-c)/f})),l.push({offset:u?l[u-1].offset:.5,color:h[1]||"transparent"}),l.unshift({offset:u?l[0].offset:.5,color:h[0]||"transparent"});var p=new Xr(0,0,0,0,l,!0);return p[n]=c,p[n+"2"]=d,p}}}(a,n)||a.getVisual("color");d.useStyle(_(r.getLineStyle(),{fill:"none",stroke:I,lineJoin:"bevel"}));var T=t.get("smooth");if(T=Fg(t.get("smooth")),d.setShape({smooth:T,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),f){var C=a.getCalculationInfo("stackedOnSeries"),L=0;f.useStyle(_(s.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel"})),C&&(L=Fg(C.get("smooth"))),f.setShape({smooth:T,stackedOnSmooth:L,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=a,this._coordSys=n,this._stackedOnPoints=y,this._points=l,this._step=M,this._valueOrigin=v},dispose:function(){},highlight:function(t,e,i,n){var o=t.getData(),a=Lo(o,n);if(!(a instanceof Array)&&null!=a&&0<=a){var r=o.getItemGraphicEl(a);if(!r){var s=o.getItemLayout(a);if(!s)return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(s[0],s[1]))return;(r=new lg(o,a)).position=s,r.setZ(t.get("zlevel"),t.get("z")),r.ignore=isNaN(s[0])||isNaN(s[1]),r.__temp=!0,o.setItemGraphicEl(a,r),r.stopSymbolAnimation(!0),this.group.add(r)}r.highlight()}else Hh.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var o=t.getData(),a=Lo(o,n);if(null!=a&&0<=a){var r=o.getItemGraphicEl(a);r&&(r.__temp?(o.setItemGraphicEl(a,null),this.group.remove(r)):r.downplay())}else Hh.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new Eg({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e},_newPolygon:function(t,e){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new Rg({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(i),this._polygon=i},_updateAnimation:function(t,e,i,n,o,a){var r=this._polyline,s=this._polygon,l=t.hostModel,u=function(t,e,i,n,o,a,r,s){for(var l=function(t,e){var i=[];return e.diff(t).add((function(t){i.push({cmd:"+",idx:t})})).update((function(t,e){i.push({cmd:"=",idx:e,idx1:t})})).remove((function(t){i.push({cmd:"-",idx:t})})).execute(),i}(t,e),u=[],h=[],c=[],d=[],f=[],p=[],g=[],m=Sg(o,e,r),v=Sg(a,t,s),y=0;y<l.length;y++){var x=l[y],_=!0;switch(x.cmd){case"=":var w=t.getItemLayout(x.idx),b=e.getItemLayout(x.idx1);(isNaN(w[0])||isNaN(w[1]))&&(w=b.slice()),u.push(w),h.push(b),c.push(i[x.idx]),d.push(n[x.idx1]),g.push(e.getRawIndex(x.idx1));break;case"+":var S=x.idx;u.push(o.dataToPoint([e.get(m.dataDimsForPoint[0],S),e.get(m.dataDimsForPoint[1],S)])),h.push(e.getItemLayout(S).slice()),c.push(Mg(m,o,e,S)),d.push(n[S]),g.push(e.getRawIndex(S));break;case"-":var M=t.getRawIndex(S=x.idx);M!==S?(u.push(t.getItemLayout(S)),h.push(a.dataToPoint([t.get(v.dataDimsForPoint[0],S),t.get(v.dataDimsForPoint[1],S)])),c.push(i[S]),d.push(Mg(v,a,t,S)),g.push(M)):_=!1}_&&(f.push(x),p.push(p.length))}p.sort((function(t,e){return g[t]-g[e]}));var I=[],T=[],A=[],D=[],C=[];for(y=0;y<p.length;y++)I[y]=u[S=p[y]],T[y]=h[S],A[y]=c[S],D[y]=d[S],C[y]=f[S];return{current:I,next:T,stackedOnCurrent:A,stackedOnNext:D,status:C}}(this._data,t,this._stackedOnPoints,e,this._coordSys,i,this._valueOrigin,a),h=u.current,c=u.stackedOnCurrent,d=u.next,f=u.stackedOnNext;o&&(h=Wg(u.current,i,o),c=Wg(u.stackedOnCurrent,i,o),d=Wg(u.next,i,o),f=Wg(u.stackedOnNext,i,o)),r.shape.__points=u.current,r.shape.points=h,Gs(r,{shape:{points:d}},l),s&&(s.setShape({points:h,stackedOnPoints:c}),Gs(s,{shape:{points:d,stackedOnPoints:f}},l));for(var p=[],g=u.status,m=0;m<g.length;m++)if("="===g[m].cmd){var v=t.getItemGraphicEl(g[m].idx1);v&&p.push({el:v,ptIdx:m})}r.animators&&r.animators.length&&r.animators[0].during((function(){for(var t=0;t<p.length;t++)p[t].el.attr("position",r.shape.__points[p[t].ptIdx])}))},remove:function(t){var e=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl((function(t,n){t.__temp&&(e.remove(t),i.setItemGraphicEl(n,null))})),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._data=null}});var Yg={average:function(t){for(var e=0,i=0,n=0;n<t.length;n++)isNaN(t[n])||(e+=t[n],i++);return 0===i?NaN:e/i},sum:function(t){for(var e=0,i=0;i<t.length;i++)e+=t[i]||0;return e},max:function(t){for(var e=-1/0,i=0;i<t.length;i++)t[i]>e&&(e=t[i]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,i=0;i<t.length;i++)t[i]<e&&(e=t[i]);return isFinite(e)?e:NaN},nearest:function(t){return t[0]}};function jg(t){return this._axes[t]}function qg(t){this._axes={},this._dimList=[],this.name=t||""}function Kg(t){qg.call(this,t)}function $g(t,e,i,n,o){ig.call(this,t,e,i),this.type=n||"value",this.position=o||"bottom"}qg.prototype={constructor:qg,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return D(this._dimList,jg,this)},getAxesByScale:function(t){return t=t.toLowerCase(),L(this.getAxes(),(function(e){return e.scale.type===t}))},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var i=this._dimList,n=t instanceof Array?[]:{},o=0;o<i.length;o++){var a=i[o];n[a]=this._axes[a][e](t[a])}return n}},Kg.prototype={constructor:Kg,type:"cartesian2d",dimensions:["x","y"],getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},containPoint:function(t){var e=this.getAxis("x"),i=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&i.contain(i.toLocalCoord(t[1]))},containData:function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},dataToPoint:function(t,e,i){var n=this.getAxis("x"),o=this.getAxis("y");return(i=i||[])[0]=n.toGlobalCoord(n.dataToCoord(t[0])),i[1]=o.toGlobalCoord(o.dataToCoord(t[1])),i},clampData:function(t,e){var i=this.getAxis("x").scale,n=this.getAxis("y").scale,o=i.getExtent(),a=n.getExtent(),r=i.parse(t[0]),s=n.parse(t[1]);return(e=e||[])[0]=Math.min(Math.max(Math.min(o[0],o[1]),r),Math.max(o[0],o[1])),e[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),e},pointToData:function(t,e){var i=this.getAxis("x"),n=this.getAxis("y");return(e=e||[])[0]=i.coordToData(i.toLocalCoord(t[0])),e[1]=n.coordToData(n.toLocalCoord(t[1])),e},getOtherAxis:function(t){return this.getAxis("x"===t.dim?"y":"x")},getArea:function(){var t=this.getAxis("x").getGlobalExtent(),e=this.getAxis("y").getGlobalExtent(),i=Math.min(t[0],t[1]),n=Math.min(e[0],e[1]);return new vi(i,n,Math.max(t[0],t[1])-i,Math.max(e[0],e[1])-n)}},M(Kg,qg),$g.prototype={constructor:$g,index:0,getAxesOnZeroOf:null,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},getGlobalExtent:function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},M($g,ig);var Jg={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#333",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},Qg={};function tm(t,e,i,n){A(em,(function(o){e.extend({type:t+"Axis."+o,mergeDefaultAndTheme:function(e,n){var a=this.layoutMode,r=a?Jl(e):{};v(e,n.getTheme().get(o+"Axis")),v(e,this.getDefaultOption()),e.type=i(t,e),a&&$l(e,r,a)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=Bf.createByAxisModel(this))},getCategories:function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:y([{},Qg[o+"Axis"],n],!0)})})),ou.registerSubTypeDefaulter(t+"Axis",O(i,t))}Qg.categoryAxis=v({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Jg),Qg.valueAxis=v({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},Jg),Qg.timeAxis=_({scale:!0,min:"dataMin",max:"dataMax"},Qg.valueAxis),Qg.logAxis=_({scale:!0,logBase:10},Qg.valueAxis);var em=["value","category","time","log"],im=ou.extend({type:"cartesian2dAxis",axis:null,init:function(){im.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){im.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){im.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function nm(t,e){return e.type||(e.data?"category":"value")}v(im.prototype,Pp);var om={offset:0};function am(t,e){return t.getCoordSysModel()===e}function rm(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this.model=t}tm("x",im,nm,om),tm("y",im,nm,om),ou.extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});var sm=rm.prototype;function lm(t,e,i,n){i.getAxesOnZeroOf=function(){return o?[o]:[]};var o,a=t[e],r=i.model,s=r.get("axisLine.onZero"),l=r.get("axisLine.onZeroAxisIndex");if(s){if(null!=l)um(a[l])&&(o=a[l]);else for(var u in a)if(a.hasOwnProperty(u)&&um(a[u])&&!n[h(a[u])]){o=a[u];break}o&&(n[h(o)]=!0)}function h(t){return t.dim+"_"+t.index}}function um(t){return t&&"category"!==t.type&&"time"!==t.type&&function(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(0<i&&0<n||i<0&&n<0)}(t)}sm.type="grid",sm.axisPointerEnabled=!0,sm.getRect=function(){return this._rect},sm.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model),A(i.x,(function(t){Tp(t.scale,t.model)})),A(i.y,(function(t){Tp(t.scale,t.model)}));var n={};A(i.x,(function(t){lm(i,"y",t,n)})),A(i.y,(function(t){lm(i,"x",t,n)})),this.resize(this.model,e)},sm.resize=function(t,e,i){var n=ql(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=n;var o=this._axesList;function a(){A(o,(function(t){var e=t.isHorizontal(),i=e?[0,n.width]:[0,n.height],o=t.inverse?1:0;t.setExtent(i[o],i[1-o]),function(t,e){var i=t.getExtent(),n=i[0]+i[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return n-t+e}}(t,e?n.x:n.y)}))}a(),!i&&t.get("containLabel")&&(A(o,(function(t){if(!t.model.get("axisLabel.inside")){var e=function(t){var e=t.scale;if(t.model.get("axisLabel.show")&&!e.isBlank()){var i,n,o="category"===t.type,a=e.getExtent();n=o?e.count():(i=e.getTicks()).length;var r,s,l,u,h,c,d,f,p=t.getLabelModel(),g=Dp(t),m=1;40<n&&(m=Math.ceil(n/40));for(var v=0;v<n;v+=m){var y=g(i?i[v]:a[0]+v),x=(s=p.getTextRect(y),l=(p.get("rotate")||0)*Math.PI/180,c=(u=s.plain()).height,d=(h=u.width)*Math.cos(l)+c*Math.sin(l),f=h*Math.sin(l)+c*Math.cos(l),new vi(u.x,u.y,d,f));r?r.union(x):r=x}return r}}(t);if(e){var i=t.isHorizontal()?"height":"width",o=t.model.get("axisLabel.margin");n[i]-=e[i]+o,"top"===t.position?n.y+=e.height+o:"left"===t.position&&(n.x+=e.width+o)}}})),a())},sm.getAxis=function(t,e){var i=this._axesMap[t];if(null!=i){if(null==e)for(var n in i)if(i.hasOwnProperty(n))return i[n];return i[e]}},sm.getAxes=function(){return this._axesList.slice()},sm.getCartesian=function(t,e){if(null!=t&&null!=e)return this._coordsMap["x"+t+"y"+e];z(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,n=this._coordsList;i<n.length;i++)if(n[i].getAxis("x").index===t||n[i].getAxis("y").index===e)return n[i]},sm.getCartesians=function(){return this._coordsList.slice()},sm.convertToPixel=function(t,e,i){var n=this._findConvertTarget(t,e);return n.cartesian?n.cartesian.dataToPoint(i):n.axis?n.axis.toGlobalCoord(n.axis.dataToCoord(i)):null},sm.convertFromPixel=function(t,e,i){var n=this._findConvertTarget(t,e);return n.cartesian?n.cartesian.pointToData(i):n.axis?n.axis.coordToData(n.axis.toLocalCoord(i)):null},sm._findConvertTarget=function(t,e){var i,n,o=e.seriesModel,a=e.xAxisModel||o&&o.getReferringComponents("xAxis")[0],r=e.yAxisModel||o&&o.getReferringComponents("yAxis")[0],s=e.gridModel;return o?S(this._coordsList,i=o.coordinateSystem)<0&&(i=null):a&&r?i=this.getCartesian(a.componentIndex,r.componentIndex):a?n=this.getAxis("x",a.componentIndex):r?n=this.getAxis("y",r.componentIndex):s&&s.coordinateSystem===this&&(i=this._coordsList[0]),{cartesian:i,axis:n}},sm.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},sm._initCartesian=function(t,e,i){var n={left:!1,right:!1,top:!1,bottom:!1},o={x:{},y:{}},a={x:0,y:0};if(e.eachComponent("xAxis",r("x"),this),e.eachComponent("yAxis",r("y"),this),!a.x||!a.y)return this._axesMap={},void(this._axesList=[]);function r(e){return function(i,r){if(am(i,t)){var s=i.get("position");"x"===e?"top"!==s&&"bottom"!==s&&(s=n.bottom?"top":"bottom"):"left"!==s&&"right"!==s&&(s=n.left?"right":"left"),n[s]=!0;var l=new $g(e,Ap(i),[0,0],i.get("type"),s);l.onBand="category"===l.type&&i.get("boundaryGap"),l.inverse=i.get("inverse"),(i.axis=l).model=i,l.grid=this,l.index=r,this._axesList.push(l),o[e][r]=l,a[e]++}}}A((this._axesMap=o).x,(function(e,i){A(o.y,(function(n,o){var a="x"+i+"y"+o,r=new Kg(a);r.grid=this,r.model=t,this._coordsMap[a]=r,this._coordsList.push(r),r.addAxis(e),r.addAxis(n)}),this)}),this)},sm._updateScale=function(t,e){function i(t,e){A(t.mapDimension(e.dim,!0),(function(i){e.scale.unionExtentFromData(t,Ef(t,i))}))}A(this._axesList,(function(t){t.scale.setExtent(1/0,-1/0)})),t.eachSeries((function(t){if(dm(t)){var n=cm(t),o=n[0],a=n[1];if(!am(o,e)||!am(a,e))return;var r=this.getCartesian(o.componentIndex,a.componentIndex),s=t.getData(),l=r.getAxis("x"),u=r.getAxis("y");"list"===s.type&&(i(s,l),i(s,u))}}),this)},sm.getTooltipAxes=function(t){var e=[],i=[];return A(this.getCartesians(),(function(n){var o=null!=t&&"auto"!==t?n.getAxis(t):n.getBaseAxis(),a=n.getOtherAxis(o);S(e,o)<0&&e.push(o),S(i,a)<0&&i.push(a)})),{baseAxes:e,otherAxes:i}};var hm=["xAxis","yAxis"];function cm(t){return D(hm,(function(e){return t.getReferringComponents(e)[0]}))}function dm(t){return"cartesian2d"===t.get("coordinateSystem")}function fm(t,e){this.opt=e,this.axisModel=t,_(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new yi;var i=new yi({position:e.position.slice(),rotation:e.rotation});i.updateTransform(),this._transform=i.transform,this._dumbGroup=i}rm.create=function(t,e){var i=[];return t.eachComponent("grid",(function(n,o){var a=new rm(n,t,e);a.name="grid_"+o,a.resize(n,e,!0),n.coordinateSystem=a,i.push(a)})),t.eachSeries((function(t){if(dm(t)){var e=cm(t),i=e[0],n=e[1],o=i.getCoordSysModel().coordinateSystem;t.coordinateSystem=o.getCartesian(i.componentIndex,n.componentIndex)}})),i},rm.dimensions=rm.prototype.dimensions=Kg.prototype.dimensions,Pu.register("cartesian2d",rm);var pm=Math.PI;fm.prototype={constructor:fm,hasBuilder:function(t){return!!gm[t]},add:function(t){gm[t].call(this)},getGroup:function(){return this.group}};var gm={axisLine:function(){var t=this.opt,e=this.axisModel;if(e.get("axisLine.show")){var i=this.axisModel.axis.getExtent(),n=this._transform,o=[i[0],0],a=[i[1],0];n&&(_t(o,o,n),_t(a,a,n));var r=x({lineCap:"round"},e.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new Vr({anid:"line",subPixelOptimize:!0,shape:{x1:o[0],y1:o[1],x2:a[0],y2:a[1]},style:r,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1}));var s=e.get("axisLine.symbol"),l=e.get("axisLine.symbolSize"),u=e.get("axisLine.symbolOffset")||0;if("number"==typeof u&&(u=[u,u]),null!=s){"string"==typeof s&&(s=[s,s]),"string"!=typeof l&&"number"!=typeof l||(l=[l,l]);var h=l[0],c=l[1];A([{rotate:t.rotation+Math.PI/2,offset:u[0],r:0},{rotate:t.rotation-Math.PI/2,offset:u[1],r:Math.sqrt((o[0]-a[0])*(o[0]-a[0])+(o[1]-a[1])*(o[1]-a[1]))}],(function(e,i){if("none"!==s[i]&&null!=s[i]){var n=Fp(s[i],-h/2,-c/2,h,c,r.stroke,!0),a=e.r+e.offset,l=[o[0]+a*Math.cos(t.rotation),o[1]-a*Math.sin(t.rotation)];n.attr({rotation:e.rotate,position:l,silent:!0,z2:11}),this.group.add(n)}}),this)}}},axisTickLabel:function(){var t=this.axisModel,e=this.opt,i=function(t,e,i){var n=e.axis,o=e.getModel("axisTick");if(o.get("show")&&!n.scale.isBlank()){for(var a=o.getModel("lineStyle"),r=i.tickDirection*o.get("length"),s=bm(n.getTicksCoords(),t._transform,r,_(a.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}),"ticks"),l=0;l<s.length;l++)t.group.add(s[l]);return s}}(this,t,e);!function(t,e,i){if(!kp(t.axis)){var n=t.get("axisLabel.showMinLabel"),o=t.get("axisLabel.showMaxLabel"),a=(e=e||[])[0],r=e[1],s=e[e.length-1],l=e[e.length-2],u=(i=i||[])[0],h=i[1],c=i[i.length-1],d=i[i.length-2];!1===n?(xm(a),xm(u)):_m(a,r)&&(n?(xm(r),xm(h)):(xm(a),xm(u))),!1===o?(xm(s),xm(c)):_m(l,s)&&(o?(xm(l),xm(d)):(xm(s),xm(c)))}}(t,function(t,e,i){var n=e.axis;if(W(i.axisLabelShow,e.get("axisLabel.show"))&&!n.scale.isBlank()){var o=e.getModel("axisLabel"),a=o.get("margin"),r=n.getViewLabels(),s=(W(i.labelRotate,o.get("rotate"))||0)*pm/180,l=vm(i.rotation,s,i.labelDirection),u=e.getCategories&&e.getCategories(!0),h=[],c=ym(e),d=e.get("triggerEvent");return A(r,(function(r,s){var f=r.tickValue,p=r.formattedLabel,g=r.rawLabel,m=o;u&&u[f]&&u[f].textStyle&&(m=new ol(u[f].textStyle,o,e.ecModel));var v=m.getTextColor()||e.get("axisLine.lineStyle.color"),y=[n.dataToCoord(f),i.labelOffset+i.labelDirection*a],x=new br({anid:"label_"+f,position:y,rotation:l.rotation,silent:c,z2:10});Ps(x.style,m,{text:p,textAlign:m.getShallow("align",!0)||l.textAlign,textVerticalAlign:m.getShallow("verticalAlign",!0)||m.getShallow("baseline",!0)||l.textVerticalAlign,textFill:"function"==typeof v?v("category"===n.type?g:"value"===n.type?f+"":f,s):v}),d&&(x.eventData=mm(e),x.eventData.targetType="axisLabel",x.eventData.value=g),t._dumbGroup.add(x),x.updateTransform(),h.push(x),t.group.add(x),x.decomposeTransform()})),h}}(this,t,e),i),function(t,e,i){var n=e.axis,o=e.getModel("minorTick");if(o.get("show")&&!n.scale.isBlank()){var a=n.getMinorTicksCoords();if(a.length)for(var r=o.getModel("lineStyle"),s=i.tickDirection*o.get("length"),l=_(r.getLineStyle(),_(e.getModel("axisTick").getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")})),u=0;u<a.length;u++)for(var h=bm(a[u],t._transform,s,l,"minorticks_"+u),c=0;c<h.length;c++)t.group.add(h[c])}}(this,t,e)},axisName:function(){var t=this.opt,e=this.axisModel,i=W(t.axisName,e.get("name"));if(i){var n,o,a=e.get("nameLocation"),r=t.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=this.axisModel.axis.getExtent(),h=u[0]>u[1]?-1:1,c=["start"===a?u[0]-h*l:"end"===a?u[1]+h*l:(u[0]+u[1])/2,wm(a)?t.labelOffset+r*l:0],d=e.get("nameRotate");null!=d&&(d=d*pm/180),wm(a)?n=vm(t.rotation,null!=d?d:t.rotation,r):(n=function(t,e,i,n){var o,a=yl(i-t.rotation),r=n[0]>n[1],s="start"===e&&!r||"start"!==e&&r;return{rotation:a,textAlign:xl(a-pm/2)?(o=s?"bottom":"top","center"):xl(a-1.5*pm)?(o=s?"top":"bottom","center"):(o="middle",a<1.5*pm&&pm/2<a?s?"left":"right":s?"right":"left"),textVerticalAlign:o}}(t,a,d||0,u),null!=(o=t.axisNameAvailableWidth)&&(o=Math.abs(o/Math.sin(n.rotation)),isFinite(o)||(o=null)));var f=s.getFont(),p=e.get("nameTruncate",!0)||{},g=p.ellipsis,m=W(t.nameTruncateMaxWidth,p.maxWidth,o),v=null!=g&&null!=m?Wl(i,m,f,g,{minChar:2,placeholder:p.placeholder}):i,y=e.get("tooltip",!0),_=e.mainType,w={componentType:_,name:i,$vars:["name"]};w[_+"Index"]=e.componentIndex;var b=new br({anid:"name",__fullText:i,__truncatedText:v,position:c,rotation:n.rotation,silent:ym(e),z2:1,tooltip:y&&y.show?x({content:i,formatter:function(){return i},formatterParams:w},y):null});Ps(b.style,s,{text:v,textFont:f,textFill:s.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:s.get("align")||n.textAlign,textVerticalAlign:s.get("verticalAlign")||n.textVerticalAlign}),e.get("triggerEvent")&&(b.eventData=mm(e),b.eventData.targetType="axisName",b.eventData.name=i),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},mm=fm.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},vm=fm.innerTextLayout=function(t,e,i){var n,o=yl(e-t);return{rotation:o,textAlign:xl(o)?(n=0<i?"top":"bottom","center"):xl(o-pm)?(n=0<i?"bottom":"top","center"):(n="middle",0<o&&o<pm?0<i?"right":"left":0<i?"left":"right"),textVerticalAlign:n}},ym=fm.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)};function xm(t){t&&(t.ignore=!0)}function _m(t,e){var i=t&&t.getBoundingRect().clone(),n=e&&e.getBoundingRect().clone();if(i&&n){var o=Qt([]);return ne(o,o,-t.rotation),i.applyTransform(ee([],o,t.getLocalTransform())),n.applyTransform(ee([],o,e.getLocalTransform())),i.intersect(n)}}function wm(t){return"middle"===t||"center"===t}function bm(t,e,i,n,o){for(var a=[],r=[],s=[],l=0;l<t.length;l++){var u=t[l].coord;r[0]=u,s[r[1]=0]=u,s[1]=i,e&&(_t(r,r,e),_t(s,s,e));var h=new Vr({anid:o+"_"+t[l].tickValue,subPixelOptimize:!0,shape:{x1:r[0],y1:r[1],x2:s[0],y2:s[1]},style:n,z2:2,silent:!0});a.push(h)}return a}var Sm=A,Mm=O;function Im(t,e){return"all"===t||N(t)&&0<=S(t,e)||t===e}function Tm(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[Dm(t)]}function Am(t){return!!t.get("handle.show")}function Dm(t){return t.type+"||"+t.id}var Cm=jd({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,i,n){this.axisPointerClass&&function(t){var e=Tm(t);if(e){var i=e.axisPointerModel,n=e.axis.scale,o=i.option,a=i.get("status"),r=i.get("value");null!=r&&(r=n.parse(r));var s=Am(i);null==a&&(o.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==r||r>l[1])&&(r=l[1]),r<l[0]&&(r=l[0]),o.value=r,s&&(o.status=e.axis.scale.isBlank()?"hide":"show")}}(t),Cm.superApply(this,"render",arguments),Lm(this,t,0,i,0,!0)},updateAxisPointer:function(t,e,i,n,o){Lm(this,t,0,i,0,!1)},remove:function(t,e){var i=this._axisPointer;i&&i.remove(e),Cm.superApply(this,"remove",arguments)},dispose:function(t,e){km(this,e),Cm.superApply(this,"dispose",arguments)}});function Lm(t,e,i,n,o,a){var r=Cm.getAxisPointerClass(t.axisPointerClass);if(r){var s=function(t){var e=Tm(t);return e&&e.axisPointerModel}(e);s?(t._axisPointer||(t._axisPointer=new r)).render(e,s,n,a):km(t,n)}}function km(t,e,i){var n=t._axisPointer;n&&n.dispose(e,i),t._axisPointer=null}var Pm=[];function Om(t,e,i){i=i||{};var n=t.coordinateSystem,o=e.axis,a={},r=o.getAxesOnZeroOf()[0],s=o.position,l=r?"onZero":s,u=o.dim,h=n.getRect(),c=[h.x,h.x+h.width,h.y,h.y+h.height],d={left:0,right:1,top:0,bottom:1,onZero:2},f=e.get("offset")||0,p="x"===u?[c[2]-f,c[3]+f]:[c[0]-f,c[1]+f];if(r){var g=r.toGlobalCoord(r.dataToCoord(0));p[d.onZero]=Math.max(Math.min(g,p[1]),p[0])}a.position=["y"===u?p[d[l]]:c[0],"x"===u?p[d[l]]:c[3]],a.rotation=Math.PI/2*("x"===u?0:1),a.labelDirection=a.tickDirection=a.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],a.labelOffset=r?p[d[s]]-p[d.onZero]:0,e.get("axisTick.inside")&&(a.tickDirection=-a.tickDirection),W(i.labelInside,e.get("axisLabel.inside"))&&(a.labelDirection=-a.labelDirection);var m=e.get("axisLabel.rotate");return a.labelRotate="top"===l?-m:m,a.z2=1,a}Cm.registerAxisPointerClass=function(t,e){Pm[t]=e},Cm.getAxisPointerClass=function(t){return t&&Pm[t]};var Nm=["axisLine","axisTickLabel","axisName"],Em=["splitArea","splitLine","minorSplitLine"],Rm=Cm.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,i,n){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new yi,this.group.add(this._axisGroup),t.get("show")){var a=t.getCoordSysModel(),r=Om(a,t),s=new fm(t,r);A(Nm,s.add,s),this._axisGroup.add(s.getGroup()),A(Em,(function(e){t.get(e+".show")&&this["_"+e](t,a)}),this),Us(o,this._axisGroup,t),Rm.superCall(this,"render",t,e,i,n)}},remove:function(){this._splitAreaColors=null},_splitLine:function(t,e){var i=t.axis;if(!i.scale.isBlank()){var n=t.getModel("splitLine"),o=n.getModel("lineStyle"),a=o.get("color");a=N(a)?a:[a];for(var r=e.coordinateSystem.getRect(),s=i.isHorizontal(),l=0,u=i.getTicksCoords({tickModel:n}),h=[],c=[],d=o.getLineStyle(),f=0;f<u.length;f++){var p=i.toGlobalCoord(u[f].coord);s?(h[0]=p,h[1]=r.y,c[0]=p,c[1]=r.y+r.height):(h[0]=r.x,h[1]=p,c[0]=r.x+r.width,c[1]=p);var g=l++%a.length;this._axisGroup.add(new Vr({anid:null!=u[f].tickValue?"line_"+u[f].tickValue:null,subPixelOptimize:!0,shape:{x1:h[0],y1:h[1],x2:c[0],y2:c[1]},style:_({stroke:a[g]},d),silent:!0}))}}},_minorSplitLine:function(t,e){var i=t.axis,n=t.getModel("minorSplitLine").getModel("lineStyle"),o=e.coordinateSystem.getRect(),a=i.isHorizontal(),r=i.getMinorTicksCoords();if(r.length)for(var s=[],l=[],u=n.getLineStyle(),h=0;h<r.length;h++)for(var c=0;c<r[h].length;c++){var d=i.toGlobalCoord(r[h][c].coord);a?(s[0]=d,s[1]=o.y,l[0]=d,l[1]=o.y+o.height):(s[0]=o.x,s[1]=d,l[0]=o.x+o.width,l[1]=d),this._axisGroup.add(new Vr({anid:"minor_line_"+r[h][c].tickValue,subPixelOptimize:!0,shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:u,silent:!0}))}},_splitArea:function(t,e){var i=t.axis;if(!i.scale.isBlank()){var n=t.getModel("splitArea"),o=n.getModel("areaStyle"),a=o.get("color"),r=e.coordinateSystem.getRect(),s=i.getTicksCoords({tickModel:n,clamp:!0});if(s.length){var l=a.length,u=this._splitAreaColors,h=Q(),c=0;if(u)for(var d=0;d<s.length;d++){var f=u.get(s[d].tickValue);if(null!=f){c=(f+(l-1)*d)%l;break}}var p=i.toGlobalCoord(s[0].coord),g=o.getAreaStyle();for(a=N(a)?a:[a],d=1;d<s.length;d++){var m,v,y,x,w=i.toGlobalCoord(s[d].coord);p=i.isHorizontal()?(v=r.y,x=r.height,(m=p)+(y=w-m)):(m=r.x,y=r.width,(v=p)+(x=w-v));var b=s[d-1].tickValue;null!=b&&h.set(b,c),this._axisGroup.add(new zr({anid:null!=b?"area_"+b:null,shape:{x:m,y:v,width:y,height:x},style:_({fill:a[c]},g),silent:!0})),c=(c+1)%l}this._splitAreaColors=h}}}});Rm.extend({type:"xAxis"}),Rm.extend({type:"yAxis"}),jd({type:"grid",render:function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new zr({shape:t.coordinateSystem.getRect(),style:_({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))}}),Vd((function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})})),Zd(Zg("line","circle","line")),Hd(Ug("line")),Gd(Jc.PROCESSOR.STATISTIC,{seriesType:"line",modifyOutputEnd:!0,reset:function(t,e,i){var n=t.getData(),o=t.get("sampling"),a=t.coordinateSystem;if("cartesian2d"===a.type&&o){var r,s=a.getBaseAxis(),l=a.getOtherAxis(s),u=s.getExtent(),h=u[1]-u[0],c=Math.round(n.count()/h);1<c&&("string"==typeof o?r=Yg[o]:"function"==typeof o&&(r=o),r&&t.setData(n.downSample(n.mapDimension(l.dim),1/c,r,Xg)))}}});var zm=Lh.extend({type:"series.__base_bar__",getInitialData:function(t,e){return Rf(this.getSource(),this,{useEncodeDefaulter:!0})},getMarkerPosition:function(t){var e=this.coordinateSystem;if(e){var i=e.dataToPoint(e.clampData(t)),n=this.getData(),o=n.getLayout("offset"),a=n.getLayout("size");return i[e.getBaseAxis().isHorizontal()?0:1]+=o+a/2,i}return[NaN,NaN]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",itemStyle:{},emphasis:{}}});function Bm(t,e,i,n,o,a){Ls(t,e,i.getModel("label"),i.getModel("emphasis.label"),{labelFetcher:o,labelDataIndex:a,defaultText:sg(o.getData(),a),isRectText:!0,autoColor:n}),Vm(t),Vm(e)}function Vm(t,e){"outside"===t.textPosition&&(t.textPosition=e)}zm.extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect",getProgressive:function(){return!!this.get("large")&&this.get("progressive")},getProgressiveThreshold:function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return t<e&&(t=e),t},defaultOption:{clip:!0,roundCap:!1}});var Gm=Xo([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Fm={getBarItemStyle:function(t){var e=Gm(this,t);if(this.getBorderLineDash){var i=this.getBorderLineDash();i&&(e.lineDash=i)}return e}},Wm=os({type:"sausage",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},buildPath:function(t,e){var i=e.cx,n=e.cy,o=Math.max(e.r0||0,0),a=Math.max(e.r,0),r=.5*(a-o),s=o+r,l=e.startAngle,u=e.endAngle,h=e.clockwise,c=Math.cos(l),d=Math.sin(l),f=Math.cos(u),p=Math.sin(u);(h?u-l<2*Math.PI:l-u<2*Math.PI)&&(t.moveTo(c*o+i,d*o+n),t.arc(c*s+i,d*s+n,r,-Math.PI+l,l,!h)),t.arc(i,n,a,l,u,!h),t.moveTo(f*a+i,p*a+n),t.arc(f*s+i,p*s+n,r,u-2*Math.PI,u-Math.PI,!h),0!==o&&(t.arc(i,n,o,u,l,h),t.moveTo(c*o+i,p*o+n)),t.closePath()}}),Hm=["itemStyle","barBorderWidth"],Zm=[0,0];x(ol.prototype,Fm),Kd({type:"bar",render:function(t,e,i){this._updateDrawMode(t);var n=t.get("coordinateSystem");return"cartesian2d"!==n&&"polar"!==n||(this._isLargeDraw?this._renderLarge(t,e,i):this._renderNormal(t,e,i)),this.group},incrementalPrepareRender:function(t,e,i){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e,i,n){this._incrementalRenderLarge(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(null==this._isLargeDraw||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(t,e,i){var n,o=this.group,a=t.getData(),r=this._data,s=t.coordinateSystem,l=s.getBaseAxis();"cartesian2d"===s.type?n=l.isHorizontal():"polar"===s.type&&(n="angle"===l.dim);var u=t.isAnimationEnabled()?t:null,h=t.get("clip",!0),c=function(t,e){var i=t.getArea&&t.getArea();if("cartesian2d"===t.type){var n=t.getBaseAxis();if("category"!==n.type||!n.onBand){var o=e.getLayout("bandWidth");n.isHorizontal()?(i.x-=o,i.width+=2*o):(i.y-=o,i.height+=2*o)}}return i}(s,a);o.removeClipPath();var d=t.get("roundCap",!0);a.diff(r).add((function(e){if(a.hasValue(e)){var i=a.getItemModel(e),r=$m[s.type](a,e,i);if(h&&Ym[s.type](c,r))return void o.remove(l);var l=jm[s.type](e,r,n,u,!1,d);a.setItemGraphicEl(e,l),o.add(l),Qm(l,a,e,i,r,t,0,"polar"===s.type)}})).update((function(e,i){var l=r.getItemGraphicEl(i);if(a.hasValue(e)){var f=a.getItemModel(e),p=$m[s.type](a,e,f);if(h&&Ym[s.type](c,p))return void o.remove(l);l?Gs(l,{shape:p},u,e):l=jm[s.type](e,p,n,u,!0,d),a.setItemGraphicEl(e,l),o.add(l),Qm(l,a,e,f,p,t,0,"polar"===s.type)}else o.remove(l)})).remove((function(t){var e=r.getItemGraphicEl(t);"cartesian2d"===s.type?e&&qm(t,u,e):e&&Km(t,u,e)})).execute(),this._data=a},_renderLarge:function(t,e,i){this._clear(),ev(t,this.group);var n=t.get("clip",!0)?Vg(t.coordinateSystem,!1,t):null;n?this.group.setClipPath(n):this.group.removeClipPath()},_incrementalRenderLarge:function(t,e){ev(e,this.group,!0)},dispose:et,remove:function(t){this._clear(t)},_clear:function(t){var e=this.group,i=this._data;t&&t.get("animation")&&i&&!this._isLargeDraw?i.eachItemGraphicEl((function(e){"sector"===e.type?Km(e.dataIndex,t,e):qm(e.dataIndex,t,e)})):e.removeAll(),this._data=null}});var Um=Math.max,Xm=Math.min,Ym={cartesian2d:function(t,e){var i=e.width<0?-1:1,n=e.height<0?-1:1;i<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height);var o=Um(e.x,t.x),a=Xm(e.x+e.width,t.x+t.width),r=Um(e.y,t.y),s=Xm(e.y+e.height,t.y+t.height);e.x=o,e.y=r,e.width=a-o,e.height=s-r;var l=e.width<0||e.height<0;return i<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height),l},polar:function(t){return!1}},jm={cartesian2d:function(t,e,i,n,o){var a=new zr({shape:x({},e)});if(n){var r=i?"height":"width",s={};a.shape[r]=0,s[r]=e[r],$s[o?"updateProps":"initProps"](a,{shape:s},n,t)}return a},polar:function(t,e,i,n,o,a){var r=new(!i&&a?Wm:Tr)({shape:_({clockwise:e.startAngle<e.endAngle},e)});if(n){var s=i?"r":"endAngle",l={};r.shape[s]=i?0:e.startAngle,l[s]=e[s],$s[o?"updateProps":"initProps"](r,{shape:l},n,t)}return r}};function qm(t,e,i){i.style.text=null,Gs(i,{shape:{width:0}},e,t,(function(){i.parent&&i.parent.remove(i)}))}function Km(t,e,i){i.style.text=null,Gs(i,{shape:{r:i.shape.r0}},e,t,(function(){i.parent&&i.parent.remove(i)}))}var $m={cartesian2d:function(t,e,i){var n=t.getItemLayout(e),o=function(t,e){var i=t.get(Hm)||0;return Math.min(i,Math.abs(e.width),Math.abs(e.height))}(i,n),a=0<n.width?1:-1,r=0<n.height?1:-1;return{x:n.x+a*o/2,y:n.y+r*o/2,width:n.width-a*o,height:n.height-r*o}},polar:function(t,e,i){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle}}};function Jm(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}function Qm(t,e,i,n,o,a,r,s){var l=e.getItemVisual(i,"color"),u=e.getItemVisual(i,"opacity"),h=e.getVisual("borderColor"),c=n.getModel("itemStyle"),d=n.getModel("emphasis.itemStyle").getBarItemStyle();s||t.setShape("r",c.get("barBorderRadius")||0),t.useStyle(_({stroke:Jm(o)?"none":h,fill:Jm(o)?"none":l,opacity:u},c.getBarItemStyle()));var f=n.getShallow("cursor");f&&t.attr("cursor",f),s||Bm(t.style,d,n,l,a,i),Jm(o)&&(d.fill=d.stroke="none"),Ts(t,d)}var tv=ar.extend({type:"largeBar",shape:{points:[]},buildPath:function(t,e){for(var i=e.points,n=this.__startPoint,o=this.__baseDimIdx,a=0;a<i.length;a+=2)n[o]=i[a+o],t.moveTo(n[0],n[1]),t.lineTo(i[a],i[a+1])}});function ev(t,e,i){var n=t.getData(),o=[],a=n.getLayout("valueAxisHorizontal")?1:0;o[1-a]=n.getLayout("valueAxisStart");var r=new tv({shape:{points:n.getLayout("largePoints")},incremental:!!i,__startPoint:o,__baseDimIdx:a,__largeDataIndices:n.getLayout("largeDataIndices"),__barWidth:n.getLayout("barWidth")});e.add(r),function(t,e,i){var n=i.getVisual("borderColor")||i.getVisual("color"),o=e.getModel("itemStyle").getItemStyle(["color","borderColor"]);t.useStyle(o),t.style.fill=null,t.style.stroke=n,t.style.lineWidth=i.getLayout("barWidth")}(r,t,n),r.seriesIndex=t.seriesIndex,t.get("silent")||(r.on("mousedown",iv),r.on("mousemove",iv))}var iv=Qh((function(t){var e=function(t,e,i){var n=t.__baseDimIdx,o=1-n,a=t.shape.points,r=t.__largeDataIndices,s=Math.abs(t.__barWidth/2),l=t.__startPoint[o];Zm[0]=e,Zm[1]=i;for(var u=Zm[n],h=Zm[1-n],c=u-s,d=u+s,f=0,p=a.length/2;f<p;f++){var g=2*f,m=a[g+n],v=a[g+o];if(c<=m&&m<=d&&(l<=v?l<=h&&h<=v:v<=h&&h<=l))return r[f]}return-1}(this,t.offsetX,t.offsetY);this.dataIndex=0<=e?e:null}),30,!1);function nv(t,e,i){e=N(e)&&{coordDimensions:e}||x({},e);var n=t.getSource(),o=Cf(n,e),a=new gf(o,t);return a.initData(n,i),a}Hd(Jc.VISUAL.LAYOUT,O(op,"bar")),Hd(Jc.VISUAL.PROGRESSIVE_LAYOUT,ap),Zd({seriesType:"bar",reset:function(t){t.getData().setVisual("legendSymbol","roundRect")}});var ov={updateSelectedMap:function(t){this._targetList=N(t)?t.slice():[],this._selectTargetMap=C(t||[],(function(t,e){return t.set(e.name,e),t}),Q())},select:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);"single"===this.get("selectedMode")&&this._selectTargetMap.each((function(t){t.selected=!1})),i&&(i.selected=!0)},unSelect:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);i&&(i.selected=!1)},toggleSelected:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);if(null!=i)return this[i.selected?"unSelect":"select"](t,e),i.selected},isSelected:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);return i&&i.selected}};function av(t,e){this.getAllNames=function(){var t=e();return t.mapArray(t.getName)},this.containName=function(t){return 0<=e().indexOfName(t)},this.indexOfName=function(e){return t().indexOfName(e)},this.getItemVisual=function(e,i){return t().getItemVisual(e,i)}}var rv=qd({type:"series.pie",init:function(t){rv.superApply(this,"init",arguments),this.legendVisualProvider=new av(P(this.getData,this),P(this.getRawData,this)),this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(t)},mergeOption:function(t){rv.superCall(this,"mergeOption",t),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(t,e){return nv(this,{coordDimensions:["value"],encodeDefaulter:O(bu,this)})},_createSelectableList:function(){for(var t=this.getRawData(),e=t.mapDimension("value"),i=[],n=0,o=t.count();n<o;n++)i.push({name:t.getName(n),value:t.get(e,n),selected:fh(t,n,"selected")});return i},getDataParams:function(t){var e=this.getData(),i=rv.superCall(this,"getDataParams",t),n=[];return e.each(e.mapDimension("value"),(function(t){n.push(t)})),i.percent=ml(n,t,e.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},_defaultLabelLine:function(t){So(t,"labelLine",["show"]);var e=t.labelLine,i=t.emphasis.labelLine;e.show=e.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:!1,show:!0,position:"outer",alignTo:"none",margin:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},animationType:"expansion",animationTypeUpdate:"transition",animationEasing:"cubicOut"}});function sv(t,e,i,n){var o=e.getData(),a=o.getName(this.dataIndex),r=e.get("selectedOffset");n.dispatchAction({type:"pieToggleSelect",from:t,name:a,seriesId:e.id}),o.each((function(t){lv(o.getItemGraphicEl(t),o.getItemLayout(t),e.isSelected(o.getName(t)),r,i)}))}function lv(t,e,i,n,o){var a=(e.startAngle+e.endAngle)/2,r=i?n:0,s=[Math.cos(a)*r,Math.sin(a)*r];o?t.animate().when(200,{position:s}).start("bounceOut"):t.attr("position",s)}function uv(t,e){yi.call(this);var i=new Tr({z2:2}),n=new kr,o=new br;this.add(i),this.add(n),this.add(o),this.updateData(t,e,!0)}I(rv,ov);var hv=uv.prototype;function cv(t,e){A(e,(function(e){e.update="updateView",Fd(e,(function(i,n){var o={};return n.eachComponent({mainType:"series",subType:t,query:i},(function(t){t[e.method]&&t[e.method](i.name,i.dataIndex);var n=t.getData();n.each((function(e){var i=n.getName(e);o[i]=t.isSelected(i)||!1}))})),{name:i.name,selected:o,seriesId:i.seriesId}}))}))}function dv(t){return{getTargetSeries:function(e){var i={},n=Q();return e.eachSeriesByType(t,(function(t){t.__paletteScope=i,n.set(t.uid,t)})),n},reset:function(t,e){var i=t.getRawData(),n={},o=t.getData();o.each((function(t){var e=o.getRawIndex(t);n[e]=t})),i.each((function(e){var a,r=n[e],s=null!=r&&o.getItemVisual(r,"color",!0),l=null!=r&&o.getItemVisual(r,"borderColor",!0);if(s&&l||(a=i.getItemModel(e)),!s){var u=a.get("itemStyle.color")||t.getColorFromPalette(i.getName(e)||e+"",t.__paletteScope,i.count());null!=r&&o.setItemVisual(r,"color",u)}if(!l){var h=a.get("itemStyle.borderColor");null!=r&&o.setItemVisual(r,"borderColor",h)}}))}}}hv.updateData=function(t,e,i){var n=this.childAt(0),o=this.childAt(1),a=this.childAt(2),r=t.hostModel,s=t.getItemModel(e),l=t.getItemLayout(e),u=x({},l);u.label=null;var h=r.getShallow("animationTypeUpdate");i?(n.setShape(u),"scale"===r.getShallow("animationType")?(n.shape.r=l.r0,Fs(n,{shape:{r:l.r}},r,e)):(n.shape.endAngle=l.startAngle,Gs(n,{shape:{endAngle:l.endAngle}},r,e))):"expansion"===h?n.setShape(u):Gs(n,{shape:u},r,e);var c=t.getItemVisual(e,"color");n.useStyle(_({lineJoin:"bevel",fill:c},s.getModel("itemStyle").getItemStyle())),n.hoverStyle=s.getModel("emphasis.itemStyle").getItemStyle();var d=s.getShallow("cursor");d&&n.attr("cursor",d),lv(this,t.getItemLayout(e),r.isSelected(null,e),r.get("selectedOffset"),r.get("animation")),this._updateLabel(t,e,!i&&"transition"===h),this.highDownOnUpdate=s.get("hoverAnimation")&&r.isAnimationEnabled()?function(t,e){"emphasis"===e?(o.ignore=o.hoverIgnore,a.ignore=a.hoverIgnore,n.stopAnimation(!0),n.animateTo({shape:{r:l.r+r.get("hoverOffset")}},300,"elasticOut")):(o.ignore=o.normalIgnore,a.ignore=a.normalIgnore,n.stopAnimation(!0),n.animateTo({shape:{r:l.r}},300,"elasticOut"))}:null,Ts(this)},hv._updateLabel=function(t,e,i){var n=this.childAt(1),o=this.childAt(2),a=t.hostModel,r=t.getItemModel(e),s=t.getItemLayout(e).label,l=t.getItemVisual(e,"color");if(!s||isNaN(s.x)||isNaN(s.y))o.ignore=o.normalIgnore=o.hoverIgnore=n.ignore=n.normalIgnore=n.hoverIgnore=!0;else{var u={points:s.linePoints||[[s.x,s.y],[s.x,s.y],[s.x,s.y]]},h={x:s.x,y:s.y};i?(Gs(n,{shape:u},a,e),Gs(o,{style:h},a,e)):(n.attr({shape:u}),o.attr({style:h})),o.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var c=r.getModel("label"),d=r.getModel("emphasis.label"),f=r.getModel("labelLine"),p=r.getModel("emphasis.labelLine");l=t.getItemVisual(e,"color"),Ls(o.style,o.hoverStyle={},c,d,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:s.text,autoColor:l,useInsideStyle:!!s.inside},{textAlign:s.textAlign,textVerticalAlign:s.verticalAlign,opacity:t.getItemVisual(e,"opacity")}),o.ignore=o.normalIgnore=!c.get("show"),o.hoverIgnore=!d.get("show"),n.ignore=n.normalIgnore=!f.get("show"),n.hoverIgnore=!p.get("show"),n.setStyle({stroke:l,opacity:t.getItemVisual(e,"opacity")}),n.setStyle(f.getModel("lineStyle").getLineStyle()),n.hoverStyle=p.getModel("lineStyle").getLineStyle();var g=f.get("smooth");g&&!0===g&&(g=.4),n.setShape({smooth:g})}},M(uv,yi),Hh.extend({type:"pie",init:function(){var t=new yi;this._sectorGroup=t},render:function(t,e,i,n){if(!n||n.from!==this.uid){var o=t.getData(),a=this._data,r=this.group,s=e.get("animation"),l=!a,u=t.get("animationType"),h=t.get("animationTypeUpdate"),c=O(sv,this.uid,t,s,i),d=t.get("selectedMode");if(o.diff(a).add((function(t){var e=new uv(o,t);l&&"scale"!==u&&e.eachChild((function(t){t.stopAnimation(!0)})),d&&e.on("click",c),o.setItemGraphicEl(t,e),r.add(e)})).update((function(t,e){var i=a.getItemGraphicEl(e);l||"transition"===h||i.eachChild((function(t){t.stopAnimation(!0)})),i.updateData(o,t),i.off("click"),d&&i.on("click",c),r.add(i),o.setItemGraphicEl(t,i)})).remove((function(t){var e=a.getItemGraphicEl(t);r.remove(e)})).execute(),s&&0<o.count()&&(l?"scale"!==u:"transition"!==h)){for(var f=o.getItemLayout(0),p=1;isNaN(f.startAngle)&&p<o.count();++p)f=o.getItemLayout(p);var g=Math.max(i.getWidth(),i.getHeight())/2,m=P(r.removeClipPath,r);r.setClipPath(this._createClipPath(f.cx,f.cy,g,f.startAngle,f.clockwise,m,t,l))}else r.removeClipPath();this._data=o}},dispose:function(){},_createClipPath:function(t,e,i,n,o,a,r,s){var l=new Tr({shape:{cx:t,cy:e,r0:0,r:i,startAngle:n,endAngle:n,clockwise:o}});return(s?Fs:Gs)(l,{shape:{endAngle:n+(o?1:-1)*Math.PI*2}},r,a),l},containPoint:function(t,e){var i=e.getData().getItemLayout(0);if(i){var n=t[0]-i.cx,o=t[1]-i.cy,a=Math.sqrt(n*n+o*o);return a<=i.r&&a>=i.r0}}});var fv=Math.PI/180;function pv(t,e,i,n,o,a,r,s,l,u){function h(e,i,n){for(var o=e;o<i&&!(t[o].y+n>l+r);o++)if(t[o].y+=n,e<o&&o+1<i&&t[o+1].y>t[o].y+t[o].height)return void c(o,n/2);c(i-1,n/2)}function c(e,i){for(var n=e;0<=n&&!(t[n].y-i<l)&&(t[n].y-=i,!(0<n&&t[n].y>t[n-1].y+t[n-1].height));n--);}function d(t,e,i,n,o,a){for(var r=e?Number.MAX_VALUE:0,s=0,l=t.length;s<l;s++)if("none"===t[s].labelAlignTo){var u=Math.abs(t[s].y-n),h=t[s].len,c=t[s].len2,d=u<o+h?Math.sqrt((o+h+c)*(o+h+c)-u*u):Math.abs(t[s].x-i);e&&r<=d&&(d=r-10),!e&&d<=r&&(d=r+10),t[s].x=i+d*a,r=d}}t.sort((function(t,e){return t.y-e.y}));for(var f,p=0,g=t.length,m=[],v=[],y=0;y<g;y++)"outer"===t[y].position&&"labelLine"===t[y].labelAlignTo&&(t[y].linePoints[1][0]+=t[y].x-u,t[y].x=u),(f=t[y].y-p)<0&&h(y,g,-f),p=t[y].y+t[y].height;for(r-p<0&&c(g-1,p-r),y=0;y<g;y++)t[y].y>=i?v.push(t[y]):m.push(t[y]);d(m,!1,e,i,n,o),d(v,!0,e,i,n,o)}function gv(t){return"center"===t.position}var mv=2*Math.PI,vv=Math.PI/180;function yv(t){return{seriesType:t,reset:function(t,e){var i=e.findComponents({mainType:"legend"});if(i&&i.length){var n=t.getData();n.filterSelf((function(t){for(var e=n.getName(t),o=0;o<i.length;o++)if(!i[o].isSelected(e))return!1;return!0}))}}}}cv("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),Zd(dv("pie")),Hd(O((function(t,e,i,n){e.eachSeriesByType(t,(function(t){var e=t.getData(),n=e.mapDimension("value"),o=function(t,e){return ql(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,i),a=t.get("center"),r=t.get("radius");N(r)||(r=[0,r]),N(a)||(a=[a,a]);var s=hl(o.width,i.getWidth()),l=hl(o.height,i.getHeight()),u=Math.min(s,l),h=hl(a[0],s)+o.x,c=hl(a[1],l)+o.y,d=hl(r[0],u/2),f=hl(r[1],u/2),p=-t.get("startAngle")*vv,g=t.get("minAngle")*vv,m=0;e.each(n,(function(t){isNaN(t)||m++}));var v=e.getSum(n),y=Math.PI/(v||m)*2,x=t.get("clockwise"),_=t.get("roseType"),w=t.get("stillShowZeroSum"),b=e.getDataExtent(n);b[0]=0;var S=mv,M=0,I=p,T=x?1:-1;if(e.each(n,(function(t,i){var n;if(isNaN(t))e.setItemLayout(i,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:x,cx:h,cy:c,r0:d,r:_?NaN:f,viewRect:o});else{(n="area"!==_?0===v&&w?y:t*y:mv/m)<g?S-=n=g:M+=t;var a=I+T*n;e.setItemLayout(i,{angle:n,startAngle:I,endAngle:a,clockwise:x,cx:h,cy:c,r0:d,r:_?ul(t,b,[d,f]):f,viewRect:o}),I=a}})),S<mv&&m)if(S<=.001){var A=mv/m;e.each(n,(function(t,i){if(!isNaN(t)){var n=e.getItemLayout(i);n.angle=A,n.startAngle=p+T*i*A,n.endAngle=p+T*(i+1)*A}}))}else y=S/M,I=p,e.each(n,(function(t,i){if(!isNaN(t)){var n=e.getItemLayout(i),o=n.angle===g?g:t*y;n.startAngle=I,n.endAngle=I+T*o,I+=T*o}}));!function(t,e,i,n,o,a){var r,s,l=t.getData(),u=[],h=!1,c=(t.get("minShowLabelAngle")||0)*fv;l.each((function(n){var a=l.getItemLayout(n),d=l.getItemModel(n),f=d.getModel("label"),p=f.get("position")||d.get("emphasis.label.position"),g=f.get("distanceToLabelLine"),m=f.get("alignTo"),v=hl(f.get("margin"),i),y=f.get("bleedMargin"),x=f.getFont(),_=d.getModel("labelLine"),w=_.get("length");w=hl(w,i);var b=_.get("length2");if(b=hl(b,i),!(a.angle<c)){var S,M,I,T,A=(a.startAngle+a.endAngle)/2,D=Math.cos(A),C=Math.sin(A);r=a.cx,s=a.cy;var L,k=t.getFormattedLabel(n,"normal")||l.getName(n),P=Ji(k,x,T,"top"),O="inside"===p||"inner"===p;if("center"===p)S=a.cx,M=a.cy,T="center";else{var N=(O?(a.r+a.r0)/2*D:a.r*D)+r,E=(O?(a.r+a.r0)/2*C:a.r*C)+s;if(S=N+3*D,M=E+3*C,!O){var R=N+D*(w+e-a.r),z=E+C*(w+e-a.r),B=R+(D<0?-1:1)*b;S="edge"===m?D<0?o+v:o+i-v:B+(D<0?-g:g),I=[[N,E],[R,z],[B,M=z]]}T=O?"center":"edge"===m?0<D?"right":"left":0<D?"left":"right"}var V=f.get("rotate");L="number"==typeof V?V*(Math.PI/180):V?D<0?-A+Math.PI:-A:0,h=!!L,a.label={x:S,y:M,position:p,height:P.height,len:w,len2:b,linePoints:I,textAlign:T,verticalAlign:"middle",rotation:L,inside:O,labelDistance:g,labelAlignTo:m,labelMargin:v,bleedMargin:y,textRect:P,text:k,font:x},O||u.push(a.label)}})),!h&&t.get("avoidLabelOverlap")&&function(t,e,i,n,o,a,r,s){for(var l=[],u=[],h=Number.MAX_VALUE,c=-Number.MAX_VALUE,d=0;d<t.length;d++)gv(t[d])||(t[d].x<e?(h=Math.min(h,t[d].x),l.push(t[d])):(c=Math.max(c,t[d].x),u.push(t[d])));for(pv(u,e,i,n,1,0,a,0,s,c),pv(l,e,i,n,-1,0,a,0,s,h),d=0;d<t.length;d++){var f=t[d];if(!gv(f)){var p=f.linePoints;if(p){var g,m="edge"===f.labelAlignTo,v=f.textRect.width;(g=m?f.x<e?p[2][0]-f.labelDistance-r-f.labelMargin:r+o-f.labelMargin-p[2][0]-f.labelDistance:f.x<e?f.x-r-f.bleedMargin:r+o-f.x-f.bleedMargin)<f.textRect.width&&(f.text=nn(f.text,g,f.font),"edge"===f.labelAlignTo&&(v=$i(f.text,f.font)));var y=p[1][0]-p[2][0];m?p[2][0]=f.x<e?r+f.labelMargin+v+f.labelDistance:r+o-f.labelMargin-v-f.labelDistance:(p[2][0]=f.x<e?f.x+f.labelDistance:f.x-f.labelDistance,p[1][0]=p[2][0]+y),p[1][1]=p[2][1]=f.y}}}}(u,r,s,e,i,n,o,a)}(t,f,o.width,o.height,o.x,o.y)}))}),"pie")),Gd(yv("pie")),Lh.extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(t,e){return Rf(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},clip:!0}});var xv=os({shape:{points:null},symbolProxy:null,softClipShape:null,buildPath:function(t,e){var i=e.points,n=e.size,o=this.symbolProxy,a=o.shape;if(!((t.getContext?t.getContext():t)&&n[0]<4))for(var r=0;r<i.length;){var s=i[r++],l=i[r++];isNaN(s)||isNaN(l)||this.softClipShape&&!this.softClipShape.contain(s,l)||(a.x=s-n[0]/2,a.y=l-n[1]/2,a.width=n[0],a.height=n[1],o.buildPath(t,a,!0))}},afterBrush:function(t){var e=this.shape,i=e.points,n=e.size;if(n[0]<4){this.setTransform(t);for(var o=0;o<i.length;){var a=i[o++],r=i[o++];isNaN(a)||isNaN(r)||this.softClipShape&&!this.softClipShape.contain(a,r)||t.fillRect(a-n[0]/2,r-n[1]/2,n[0],n[1])}this.restoreTransform(t)}},findDataIndex:function(t,e){for(var i=this.shape,n=i.points,o=i.size,a=Math.max(o[0],4),r=Math.max(o[1],4),s=n.length/2-1;0<=s;s--){var l=2*s,u=n[l]-a/2,h=n[1+l]-r/2;if(u<=t&&h<=e&&t<=u+a&&e<=h+r)return s}return-1}});function _v(){this.group=new yi}var wv=_v.prototype;function bv(t,e,i){ig.call(this,t,e,i),this.type="value",this.angle=0,this.name=""}function Sv(t,e,i){this._model=t,this.dimensions=[],this._indicatorAxes=D(t.getIndicatorModels(),(function(t,e){var i="indicator_"+e,n=new bv(i,"log"===t.get("axisType")?new Sp:new qf);return n.name=t.get("name"),(n.model=t).axis=n,this.dimensions.push(i),n}),this),this.resize(t,i)}wv.isPersistent=function(){return!this._incremental},wv.updateData=function(t,e){this.group.removeAll();var i=new xv({rectHover:!0,cursor:"default"});i.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(i,t,!1,e),this.group.add(i),this._incremental=null},wv.updateLayout=function(t){if(!this._incremental){var e=t.getLayout("symbolPoints");this.group.eachChild((function(t){null!=t.startIndex&&(e=new Float32Array(e.buffer,4*t.startIndex*2,2*(t.endIndex-t.startIndex))),t.setShape("points",e)}))}},wv.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),2e6<t.count()?(this._incremental||(this._incremental=new jr({silent:!0})),this.group.add(this._incremental)):this._incremental=null},wv.incrementalUpdate=function(t,e,i){var n;this._incremental?(n=new xv,this._incremental.addDisplayable(n,!0)):((n=new xv({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end})).incremental=!0,this.group.add(n)),n.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(n,e,!!this._incremental,i)},wv._setCommon=function(t,e,i,n){var o=e.hostModel;n=n||{};var a=e.getVisual("symbolSize");t.setShape("size",a instanceof Array?a:[a,a]),t.softClipShape=n.clipShape||null,t.symbolProxy=Fp(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var r=t.shape.size[0]<4;t.useStyle(o.getModel("itemStyle").getItemStyle(r?["color","shadowBlur","shadowColor"]:["color"]));var s=e.getVisual("color");s&&t.setColor(s),i||(t.seriesIndex=o.seriesIndex,t.on("mousemove",(function(e){t.dataIndex=null;var i=t.findDataIndex(e.offsetX,e.offsetY);0<=i&&(t.dataIndex=i+(t.startIndex||0))})))},wv.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},wv._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},Kd({type:"scatter",render:function(t,e,i){var n=t.getData();this._updateSymbolDraw(n,t).updateData(n,{clipShape:this._getClipShape(t)}),this._finished=!0},incrementalPrepareRender:function(t,e,i){var n=t.getData();this._updateSymbolDraw(n,t).incrementalPrepareUpdate(n),this._finished=!1},incrementalRender:function(t,e,i){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,i){var n=t.getData();if(this.group.dirty(),!this._finished||1e4<n.count()||!this._symbolDraw.isPersistent())return{update:!0};var o=Ug().reset(t);o.progress&&o.progress({start:0,end:n.count()},n),this._symbolDraw.updateLayout(n)},_getClipShape:function(t){var e=t.coordinateSystem,i=e&&e.getArea&&e.getArea();return t.get("clip",!0)?i:null},_updateSymbolDraw:function(t,e){var i=this._symbolDraw,n=e.pipelineContext.large;return i&&n===this._isLargeDraw||(i&&i.remove(),i=this._symbolDraw=n?new _v:new yg,this._isLargeDraw=n,this.group.removeAll()),this.group.add(i.group),i},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}}),Zd(Zg("scatter","circle")),Hd(Ug("scatter")),M(bv,ig),Sv.prototype.getIndicatorAxes=function(){return this._indicatorAxes},Sv.prototype.dataToPoint=function(t,e){return this.coordToPoint(this._indicatorAxes[e].dataToCoord(t),e)},Sv.prototype.coordToPoint=function(t,e){var i=this._indicatorAxes[e].angle;return[this.cx+t*Math.cos(i),this.cy-t*Math.sin(i)]},Sv.prototype.pointToData=function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=Math.sqrt(e*e+i*i);e/=n,i/=n;for(var o,a=Math.atan2(-i,e),r=1/0,s=-1,l=0;l<this._indicatorAxes.length;l++){var u=this._indicatorAxes[l],h=Math.abs(a-u.angle);h<r&&(o=u,s=l,r=h)}return[s,+(o&&o.coordToData(n))]},Sv.prototype.resize=function(t,e){var i=t.get("center"),n=e.getWidth(),o=e.getHeight(),a=Math.min(n,o)/2;this.cx=hl(i[0],n),this.cy=hl(i[1],o),this.startAngle=t.get("startAngle")*Math.PI/180;var r=t.get("radius");"string"!=typeof r&&"number"!=typeof r||(r=[0,r]),this.r0=hl(r[0],a),this.r=hl(r[1],a),A(this._indicatorAxes,(function(t,e){t.setExtent(this.r0,this.r);var i=this.startAngle+e*Math.PI*2/this._indicatorAxes.length;i=Math.atan2(Math.sin(i),Math.cos(i)),t.angle=i}),this)},Sv.prototype.update=function(t,e){var i=this._indicatorAxes,n=this._model;A(i,(function(t){t.scale.setExtent(1/0,-1/0)})),t.eachSeriesByType("radar",(function(e,o){if("radar"===e.get("coordinateSystem")&&t.getComponent("radar",e.get("radarIndex"))===n){var a=e.getData();A(i,(function(t){t.scale.unionExtentFromData(a,a.mapDimension(t.dim))}))}}),this);var o=n.get("splitNumber");function a(t){var e=Math.pow(10,Math.floor(Math.log(t)/Math.LN10)),i=t/e;return 2===i?i=5:i*=2,i*e}A(i,(function(t,e){var i=Ip(t.scale,t.model);Tp(t.scale,t.model);var n=t.model,r=t.scale,s=n.getMin(),l=n.getMax(),u=r.getInterval();if(null!=s&&null!=l)r.setExtent(+s,+l),r.setInterval((l-s)/o);else if(null!=s)for(var h;r.setExtent(+s,h=s+u*o),r.setInterval(u),u=a(u),h<i[1]&&isFinite(h)&&isFinite(i[1]););else if(null!=l)for(var c;r.setExtent(c=l-u*o,+l),r.setInterval(u),u=a(u),c>i[0]&&isFinite(c)&&isFinite(i[0]););else{var d=r.getTicks().length-1;o<d&&(u=a(u));var f=Math.round((i[0]+i[1])/2/u)*u,p=Math.round(o/2);r.setExtent(cl(f-p*u),cl(f+(o-p)*u)),r.setInterval(u)}}))},Sv.dimensions=[],Sv.create=function(t,e){var i=[];return t.eachComponent("radar",(function(n){var o=new Sv(n,t,e);i.push(o),n.coordinateSystem=o})),t.eachSeriesByType("radar",(function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("radarIndex")||0])})),i},Pu.register("radar",Sv);var Mv=Qg.valueAxis;function Iv(t,e){return _({show:e},t)}Yd({type:"radar",optionUpdated:function(){var t=this.get("boundaryGap"),e=this.get("splitNumber"),i=this.get("scale"),n=this.get("axisLine"),o=this.get("axisTick"),a=this.get("axisType"),r=this.get("axisLabel"),s=this.get("name"),l=this.get("name.show"),u=this.get("name.formatter"),h=this.get("nameGap"),c=this.get("triggerEvent"),d=D(this.get("indicator")||[],(function(d){null!=d.max&&0<d.max&&!d.min?d.min=0:null!=d.min&&d.min<0&&!d.max&&(d.max=0);var f=s;if(null!=d.color&&(f=_({color:d.color},s)),d=v(m(d),{boundaryGap:t,splitNumber:e,scale:i,axisLine:n,axisTick:o,axisType:a,axisLabel:r,name:d.text,nameLocation:"end",nameGap:h,nameTextStyle:f,triggerEvent:c},!1),l||(d.name=""),"string"==typeof u){var p=d.name;d.name=u.replace("{value}",null!=p?p:"")}else"function"==typeof u&&(d.name=u(d.name,d));var g=x(new ol(d,null,this.ecModel),Pp);return g.mainType="radar",g.componentIndex=this.componentIndex,g}),this);this.getIndicatorModels=function(){return d}},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,name:{show:!0},boundaryGap:[0,0],splitNumber:5,nameGap:15,scale:!1,shape:"polygon",axisLine:v({lineStyle:{color:"#bbb"}},Mv.axisLine),axisLabel:Iv(Mv.axisLabel,!1),axisTick:Iv(Mv.axisTick,!1),axisType:"interval",splitLine:Iv(Mv.splitLine,!0),splitArea:Iv(Mv.splitArea,!0),indicator:[]}});var Tv=["axisLine","axisTickLabel","axisName"];jd({type:"radar",render:function(t,e,i){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},_buildAxes:function(t){var e=t.coordinateSystem;A(D(e.getIndicatorAxes(),(function(t){return new fm(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})})),(function(t){A(Tv,t.add,t),this.group.add(t.getGroup())}),this)},_buildSplitLineAndArea:function(t){var e=t.coordinateSystem,i=e.getIndicatorAxes();if(i.length){var n=t.get("shape"),o=t.getModel("splitLine"),a=t.getModel("splitArea"),r=o.getModel("lineStyle"),s=a.getModel("areaStyle"),l=o.get("show"),u=a.get("show"),h=r.get("color"),c=s.get("color");h=N(h)?h:[h],c=N(c)?c:[c];var d=[],f=[];if("circle"===n)for(var p=i[0].getTicksCoords(),g=e.cx,m=e.cy,v=0;v<p.length;v++)l&&d[T(d,h,v)].push(new Mr({shape:{cx:g,cy:m,r:p[v].coord}})),u&&v<p.length-1&&f[T(f,c,v)].push(new Ar({shape:{cx:g,cy:m,r0:p[v].coord,r:p[v+1].coord}}));else{var y,x=D(i,(function(t,i){var n=t.getTicksCoords();return y=null==y?n.length-1:Math.min(n.length-1,y),D(n,(function(t){return e.coordToPoint(t.coord,i)}))})),w=[];for(v=0;v<=y;v++){for(var b=[],S=0;S<i.length;S++)b.push(x[S][v]);b[0]&&b.push(b[0].slice()),l&&d[T(d,h,v)].push(new kr({shape:{points:b}})),u&&w&&f[T(f,c,v-1)].push(new Lr({shape:{points:b.concat(w)}})),w=b.slice().reverse()}}var M=r.getLineStyle(),I=s.getAreaStyle();A(f,(function(t,e){this.group.add(hs(t,{style:_({stroke:"none",fill:c[e%c.length]},I),silent:!0}))}),this),A(d,(function(t,e){this.group.add(hs(t,{style:_({fill:"none",stroke:h[e%h.length]},M),silent:!0}))}),this)}function T(t,e,i){var n=i%e.length;return t[n]=t[n]||[],n}}});var Av=Lh.extend({type:"series.radar",dependencies:["radar"],init:function(t){Av.superApply(this,"init",arguments),this.legendVisualProvider=new av(P(this.getData,this),P(this.getRawData,this))},getInitialData:function(t,e){return nv(this,{generateCoord:"indicator_",generateCoordCount:1/0})},formatTooltip:function(t){var e=this.getData(),i=this.coordinateSystem.getIndicatorAxes(),n=this.getData().getName(t);return Ol(""===n?this.name:n)+"<br/>"+D(i,(function(i,n){var o=e.get(e.mapDimension(i.dim),t);return Ol(i.name+" : "+o)})).join("<br />")},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}});function Dv(t){return!isNaN(t[0])&&!isNaN(t[1])}function Cv(t){return[t.cx,t.cy]}Kd({type:"radar",render:function(t,e,i){var n=t.coordinateSystem,o=this.group,a=t.getData(),r=this._data;function s(t,e){var i=t.getItemVisual(e,"symbol")||"circle",n=t.getItemVisual(e,"color");if("none"!==i){var o=function(t){return N(t)||(t=[+t,+t]),t}(t.getItemVisual(e,"symbolSize")),a=Fp(i,-1,-1,2,2,n);return a.attr({style:{strokeNoScale:!0},z2:100,scale:[o[0]/2,o[1]/2]}),a}}function l(e,i,n,o,a,r){n.removeAll();for(var l=0;l<i.length-1;l++){var u=s(o,a);u&&(e[u.__dimIdx=l]?(u.attr("position",e[l]),$s[r?"initProps":"updateProps"](u,{position:i[l]},t,a)):u.attr("position",i[l]),n.add(u))}}function u(t){return D(t,(function(t){return[n.cx,n.cy]}))}a.diff(r).add((function(e){var i=a.getItemLayout(e);if(i){var n=new Lr,o=new kr,r={shape:{points:i}};n.shape.points=u(i),o.shape.points=u(i),Fs(n,r,t,e),Fs(o,r,t,e);var s=new yi,h=new yi;s.add(o),s.add(n),s.add(h),l(o.shape.points,i,h,a,e,!0),a.setItemGraphicEl(e,s)}})).update((function(e,i){var n=r.getItemGraphicEl(i),o=n.childAt(0),s=n.childAt(1),u=n.childAt(2),h={shape:{points:a.getItemLayout(e)}};h.shape.points&&(l(o.shape.points,h.shape.points,u,a,e,!1),Gs(o,h,t),Gs(s,h,t),a.setItemGraphicEl(e,n))})).remove((function(t){o.remove(r.getItemGraphicEl(t))})).execute(),a.eachItemGraphicEl((function(t,e){var i=a.getItemModel(e),n=t.childAt(0),r=t.childAt(1),s=t.childAt(2),l=a.getItemVisual(e,"color");o.add(t),n.useStyle(_(i.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:l})),n.hoverStyle=i.getModel("emphasis.lineStyle").getLineStyle();var u=i.getModel("areaStyle"),h=i.getModel("emphasis.areaStyle"),c=u.isEmpty()&&u.parentModel.isEmpty(),d=h.isEmpty()&&h.parentModel.isEmpty();d=d&&c,r.ignore=c,r.useStyle(_(u.getAreaStyle(),{fill:l,opacity:.7})),r.hoverStyle=h.getAreaStyle();var f=i.getModel("itemStyle").getItemStyle(["color"]),p=i.getModel("emphasis.itemStyle").getItemStyle(),g=i.getModel("label"),v=i.getModel("emphasis.label");s.eachChild((function(t){t.setStyle(f),t.hoverStyle=m(p);var i=a.get(a.dimensions[t.__dimIdx],e);null!=i&&!isNaN(i)||(i=""),Ls(t.style,t.hoverStyle,g,v,{labelFetcher:a.hostModel,labelDataIndex:e,labelDimIndex:t.__dimIdx,defaultText:i,autoColor:l,isRectText:!0})})),t.highDownOnUpdate=function(t,e){r.attr("ignore","emphasis"===e?d:c)},Ts(t)})),this._data=a},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}}),Zd(dv("radar")),Zd(Zg("radar","circle")),Hd((function(t){t.eachSeriesByType("radar",(function(t){var e=t.getData(),i=[],n=t.coordinateSystem;if(n){var o=n.getIndicatorAxes();A(o,(function(t,a){e.each(e.mapDimension(o[a].dim),(function(t,e){i[e]=i[e]||[];var o=n.dataToPoint(t,a);i[e][a]=Dv(o)?o:Cv(n)}))})),e.each((function(t){var o=k(i[t],(function(t){return Dv(t)}))||Cv(n);i[t].push(o.slice()),e.setItemLayout(t,i[t])}))}}))})),Gd(yv("radar")),Vd((function(t){var e=t.polar;if(e){N(e)||(e=[e]);var i=[];A(e,(function(e,n){e.indicator?(e.type&&!e.shape&&(e.shape=e.type),t.radar=t.radar||[],N(t.radar)||(t.radar=[t.radar]),t.radar.push(e)):i.push(e)})),t.polar=i}A(t.series,(function(t){t&&"radar"===t.type&&t.polarIndex&&(t.radarIndex=t.polarIndex)}))}));for(var Lv=[126,25],kv=[[[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]]],Pv=0;Pv<kv.length;Pv++)for(var Ov=0;Ov<kv[Pv].length;Ov++)kv[Pv][Ov][0]/=10.5,kv[Pv][Ov][1]/=-14,kv[Pv][Ov][0]+=Lv[0],kv[Pv][Ov][1]+=Lv[1];var Nv={"\u5357\u6d77\u8bf8\u5c9b":[32,80],"\u5e7f\u4e1c":[0,-10],"\u9999\u6e2f":[10,5],"\u6fb3\u95e8":[-10,10],"\u5929\u6d25":[5,5]},Ev={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]},Rv=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]],zv=ko(),Bv={load:function(t,e){var i=zv(e).parsed;if(i)return i;var n,o=e.specialAreas||{},a=e.geoJSON;try{n=a?Yp(a):[]}catch(e){throw new Error("Invalid geoJson format\n"+e.message)}return function(t,e){"china"===t&&e.push(new Up("\u5357\u6d77\u8bf8\u5c9b",D(kv,(function(t){return{type:"polygon",exterior:t}})),Lv))}(t,n),A(n,(function(e){var i=e.name;!function(t,e){if("china"===t){var i=Nv[e.name];if(i){var n=e.center;n[0]+=i[0]/10.5,n[1]+=-i[1]/14}}}(t,e),function(t,e){if("world"===t){var i=Ev[e.name];if(i){var n=e.center;n[0]=i[0],n[1]=i[1]}}}(t,e),function(t,e){"china"===t&&"\u53f0\u6e7e"===e.name&&e.geometries.push({type:"polygon",exterior:Rv[0]})}(t,e);var n=o[i];n&&e.transformTo(n.left,n.top,n.width,n.height)})),zv(e).parsed={regions:n,boundingRect:function(t){for(var e,i=0;i<t.length;i++){var n=t[i].getBoundingRect();(e=e||n.clone()).union(n)}return e}(n)}}},Vv=ko();function Gv(t,e){var i,n,o=t.svgXML;try{Y(null!=(n=(i=o&&function(t,e){return(new Pc).parse(t,{ignoreViewBox:!0,ignoreRootClip:!0})}(o)||{}).root))}catch(t){throw new Error("Invalid svg format\n"+t.message)}var a=i.width,r=i.height,s=i.viewBoxRect;if(e||(e=null==a||null==r?n.getBoundingRect():new vi(0,0,0,0),null!=a&&(e.width=a),null!=r&&(e.height=r)),s){var l=Hc(s,e.width,e.height),u=n;(n=new yi).add(u),u.scale=l.scale,u.position=l.position}return n.setClipPath(new zr({shape:e.plain()})),{root:n,boundingRect:e}}var Fv={geoJSON:Bv,svg:{load:function(t,e){var i=Vv(e).originRoot;if(i)return{root:i,boundingRect:Vv(e).boundingRect};var n=Gv(e);return Vv(e).originRoot=n.root,Vv(e).boundingRect=n.boundingRect,n},makeGraphic:function(t,e,i){var n=Vv(e),o=n.rootMap||(n.rootMap=Q()),a=o.get(i);if(a)return a;var r=n.originRoot;return a=n.originRootHostKey?Gv(e,n.boundingRect).root:(n.originRootHostKey=i,r),o.set(i,a)},removeGraphic:function(t,e,i){var n=Vv(e),o=n.rootMap;o&&o.removeKey(i),i===n.originRootHostKey&&(n.originRootHostKey=null)}}},Wv={load:function(t,e){var i,n=[],o=Q(),a=Q();return A(Zv(t),(function(r){var s=Fv[r.type].load(t,r);A(s.regions,(function(t){var i=t.name;e&&e.hasOwnProperty(i)&&(t=t.cloneShallow(i=e[i])),n.push(t),o.set(i,t),a.set(i,t.center)}));var l=s.boundingRect;l&&(i?i.union(l):i=l.clone())})),{regions:n,regionsMap:o,nameCoordMap:a,boundingRect:i||new vi(0,0,0,0)}},makeGraphic:Hv("makeGraphic"),removeGraphic:Hv("removeGraphic")};function Hv(t){return function(e,i){var n=Zv(e),o=[];return A(n,(function(n){var a=Fv[n.type][t];a&&o.push(a(e,n,i))})),o}}function Zv(t){return Uc(t)||[]}I(Lh.extend({type:"series.map",dependencies:["geo"],layoutMode:"box",needsDrawMap:!1,seriesGroup:[],getInitialData:function(t){for(var e=nv(this,{coordDimensions:["value"],encodeDefaulter:O(bu,this)}),i=e.mapDimension("value"),n=Q(),o=[],a=[],r=0,s=e.count();r<s;r++){var l=e.getName(r);n.set(l,!0),o.push({name:l,value:e.get(i,r),selected:fh(e,r,"selected")})}return A(Wv.load(this.getMapType(),this.option.nameMap).regions,(function(t){var e=t.name;n.get(e)||(o.push({name:e}),a.push(e))})),this.updateSelectedMap(o),e.appendValues([],a),e},getHostGeoModel:function(){var t=this.option.geoIndex;return null!=t?this.dependentModels.geo[t]:null},getMapType:function(){return(this.getHostGeoModel()||this).option.map},getRawValue:function(t){var e=this.getData();return e.get(e.mapDimension("value"),t)},getRegionModel:function(t){var e=this.getData();return e.getItemModel(e.indexOfName(t))},formatTooltip:function(t){for(var e=this.getData(),i=Dl(this.getRawValue(t)),n=e.getName(t),o=this.seriesGroup,a=[],r=0;r<o.length;r++){var s=o[r].originalData.indexOfName(n),l=e.mapDimension("value");isNaN(o[r].originalData.get(l,s))||a.push(Ol(o[r].name))}return a.join(", ")+"<br />"+Ol(n+" : "+i)},getTooltipPosition:function(t){if(null!=t){var e=this.getData().getName(t),i=this.coordinateSystem,n=i.getRegion(e);return n&&i.dataToPoint(n.center)}},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}}}}),ov);var Uv="\0_ec_interaction_mutex";function Xv(t,e){return!!Yv(t)[e]}function Yv(t){return t[Uv]||(t[Uv]={})}function jv(t){this._zr=t,this._opt={};var e=P,i=e(qv,this),n=e(Kv,this),o=e($v,this),a=e(Jv,this),r=e(Qv,this);At.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(e,s){this.disable(),this._opt=_(m(s)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==e&&(e=!0),!0!==e&&"move"!==e&&"pan"!==e||(t.on("mousedown",i),t.on("mousemove",n),t.on("mouseup",o)),!0!==e&&"scale"!==e&&"zoom"!==e||(t.on("mousewheel",a),t.on("pinch",r))},this.disable=function(){t.off("mousedown",i),t.off("mousemove",n),t.off("mouseup",o),t.off("mousewheel",a),t.off("pinch",r)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function qv(t){if(!(Ft(t)||t.target&&t.target.draggable)){var e=t.offsetX,i=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,i)&&(this._x=e,this._y=i,this._dragging=!0)}}function Kv(t){if(this._dragging&&iy("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!Xv(this._zr,"globalPan")){var e=t.offsetX,i=t.offsetY,n=this._x,o=this._y,a=e-n,r=i-o;this._x=e,this._y=i,this._opt.preventDefaultMouseMove&&Gt(t.event),ey(this,"pan","moveOnMouseMove",t,{dx:a,dy:r,oldX:n,oldY:o,newX:e,newY:i})}}function $v(t){Ft(t)||(this._dragging=!1)}function Jv(t){var e=iy("zoomOnMouseWheel",t,this._opt),i=iy("moveOnMouseWheel",t,this._opt),n=t.wheelDelta,o=Math.abs(n),a=t.offsetX,r=t.offsetY;if(0!==n&&(e||i)){if(e){var s=3<o?1.4:1<o?1.2:1.1;ty(this,"zoom","zoomOnMouseWheel",t,{scale:0<n?s:1/s,originX:a,originY:r})}if(i){var l=Math.abs(n);ty(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(0<n?1:-1)*(3<l?.4:1<l?.15:.05),originX:a,originY:r})}}}function Qv(t){Xv(this._zr,"globalPan")||ty(this,"zoom",null,t,{scale:1<t.pinchScale?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY})}function ty(t,e,i,n,o){t.pointerChecker&&t.pointerChecker(n,o.originX,o.originY)&&(Gt(n.event),ey(t,e,i,n,o))}function ey(t,e,i,n,o){o.isAvailableBehavior=P(iy,null,i,n),t.trigger(e,o)}function iy(t,e,i){var n=i[t];return!t||n&&(!R(n)||e.event[n+"Key"])}function ny(t,e,i){var n=t.target,o=n.position;o[0]+=e,o[1]+=i,n.dirty()}function oy(t,e,i,n){var o=t.target,a=t.zoomLimit,r=o.position,s=o.scale,l=t.zoom=t.zoom||1;if(l*=e,a){var u=a.min||0;l=Math.max(Math.min(a.max||1/0,l),u)}var h=l/t.zoom;t.zoom=l,r[0]-=(i-r[0])*(h-1),r[1]-=(n-r[1])*(h-1),s[0]*=h,s[1]*=h,o.dirty()}Fd({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},(function(){})),I(jv,At);var ay={axisPointer:1,tooltip:1,brush:1};function ry(t,e,i){var n=e.getComponentByElement(t.topTarget),o=n&&n.coordinateSystem;return n&&n!==i&&!ay[n.mainType]&&o&&o.model!==i}function sy(t){var e=t.getItemStyle(),i=t.get("areaColor");return null!=i&&(e.fill=i),e}function ly(t,e){e.eachChild((function(e){A(e.__regions,(function(i){e.trigger(t.isSelected(i.name)?"emphasis":"normal")}))}))}function uy(t,e){var i=new yi;this.uid=ll("ec_map_draw"),this._controller=new jv(t.getZr()),this._controllerHost={target:e?i:null},this.group=i,this._updateGroup=e,i.add(this._regionsGroup=new yi),i.add(this._backgroundGroup=new yi)}uy.prototype={constructor:uy,draw:function(t,e,i,n,o){var a="geo"===t.mainType,r=t.getData&&t.getData();a&&e.eachComponent({mainType:"series",subType:"map"},(function(e){r||e.getHostGeoModel()!==t||(r=e.getData())}));var s=t.coordinateSystem;this._updateBackground(s);var l=this._regionsGroup,u=this.group;s._roamTransformable.transform&&(u.transform=s._roamTransformable.transform.slice(),u.decomposeTransform());var h=s._rawTransformable.scale,c=s._rawTransformable.position;l.removeAll();var d=["itemStyle"],f=["emphasis","itemStyle"],p=["label"],g=["emphasis","label"],m=Q();A(s.regions,(function(e){var i=m.get(e.name)||m.set(e.name,new yi),n=new Ur({segmentIgnoreThreshold:1,shape:{paths:[]}});i.add(n);var o,s=(P=t.getRegionModel(e.name)||t).getModel(d),v=P.getModel(f),y=sy(s),x=sy(v),_=P.getModel(p),w=P.getModel(g);if(r){o=r.indexOfName(e.name);var b=r.getItemVisual(o,"color",!0);b&&(y.fill=b)}function S(t){return[t[0]*h[0]+c[0],t[1]*h[1]+c[1]]}A(e.geometries,(function(t){if("polygon"===t.type){for(var e=[],i=0;i<t.exterior.length;++i)e.push(S(t.exterior[i]));for(n.shape.paths.push(new Lr({segmentIgnoreThreshold:1,shape:{points:e}})),i=0;i<(t.interiors?t.interiors.length:0);++i){for(var o=t.interiors[i],a=(e=[],0);a<o.length;++a)e.push(S(o[a]));n.shape.paths.push(new Lr({segmentIgnoreThreshold:1,shape:{points:e}}))}}})),n.setStyle(y),n.style.strokeNoScale=!0,n.culling=!0;var M=_.get("show"),I=w.get("show"),T=r&&isNaN(r.get(r.mapDimension("value"),o)),D=r&&r.getItemLayout(o);if(a||T&&(M||I)||D&&D.showLabel){var C,L=a?e.name:o;(!r||0<=o)&&(C=t);var k=new br({position:S(e.center.slice()),scale:[1/u.scale[0],1/u.scale[1]],z2:10,silent:!0});Ls(k.style,k.hoverStyle={},_,w,{labelFetcher:C,labelDataIndex:L,defaultText:e.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),i.add(k)}if(r)r.setItemGraphicEl(o,i);else{var P=t.getRegionModel(e.name);n.eventData={componentType:"geo",componentIndex:t.componentIndex,geoIndex:t.componentIndex,name:e.name,region:P&&P.option||{}}}(i.__regions||(i.__regions=[])).push(e),i.highDownSilentOnTouch=!!t.get("selectedMode"),Ts(i,x),l.add(i)})),this._updateController(t,e,i),function(t,e,i,n,o){i.off("click"),i.off("mousedown"),e.get("selectedMode")&&(i.on("mousedown",(function(){t._mouseDownFlag=!0})),i.on("click",(function(a){if(t._mouseDownFlag){t._mouseDownFlag=!1;for(var r=a.target;!r.__regions;)r=r.parent;if(r){var s={type:("geo"===e.mainType?"geo":"map")+"ToggleSelect",batch:D(r.__regions,(function(t){return{name:t.name,from:o.uid}}))};s[e.mainType+"Id"]=e.id,n.dispatchAction(s),ly(e,i)}}})))}(this,t,l,i,n),ly(t,l)},remove:function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&Wv.removeGraphic(this._mapName,this.uid),this._mapName=null,this._controllerHost={}},_updateBackground:function(t){var e=t.map;this._mapName!==e&&A(Wv.makeGraphic(e,this.uid),(function(t){this._backgroundGroup.add(t)}),this),this._mapName=e},_updateController:function(t,e,i){var n=t.coordinateSystem,o=this._controller,a=this._controllerHost;a.zoomLimit=t.get("scaleLimit"),a.zoom=n.getZoom(),o.enable(t.get("roam")||!1);var r=t.mainType;function s(){var e={type:"geoRoam",componentType:r};return e[r+"Id"]=t.id,e}o.off("pan").on("pan",(function(t){this._mouseDownFlag=!1,ny(a,t.dx,t.dy),i.dispatchAction(x(s(),{dx:t.dx,dy:t.dy}))}),this),o.off("zoom").on("zoom",(function(t){if(this._mouseDownFlag=!1,oy(a,t.scale,t.originX,t.originY),i.dispatchAction(x(s(),{zoom:t.scale,originX:t.originX,originY:t.originY})),this._updateGroup){var e=this.group.scale;this._regionsGroup.traverse((function(t){"text"===t.type&&t.attr("scale",[1/e[0],1/e[1]])}))}}),this),o.setPointerChecker((function(e,o,a){return n.getViewRectAfterRoam().contain(o,a)&&!ry(e,i,t)}))}};var hy="__seriesMapHighDown",cy="__seriesMapCallKey";function dy(t){var e=this[hy];e&&e.recordVersion===this[cy]&&fy(e,t)}function fy(t,e){var i=t.circle,n=t.labelModel,o=t.hoverLabelModel,a=t.emphasisText,r=t.normalText;e?(i.style.extendFrom(Ps({},o,{text:o.get("show")?a:null},{isRectText:!0,useInsideStyle:!1},!0)),i.__mapOriginalZ2=i.z2,i.z2+=1):(Ps(i.style,n,{text:n.get("show")?r:null,textPosition:n.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),i.dirty(!1),null!=i.__mapOriginalZ2&&(i.z2=i.__mapOriginalZ2,i.__mapOriginalZ2=null))}function py(t,e,i){var n=t.getZoom(),o=t.getCenter(),a=e.zoom,r=t.dataToPoint(o);if(null!=e.dx&&null!=e.dy&&(r[0]-=e.dx,r[1]-=e.dy,o=t.pointToData(r),t.setCenter(o)),null!=a){if(i){var s=i.min||0;a=Math.max(Math.min(n*a,i.max||1/0),s)/n}t.scale[0]*=a,t.scale[1]*=a;var l=t.position,u=(e.originY-l[1])*(a-1);l[0]-=(e.originX-l[0])*(a-1),l[1]-=u,t.updateTransform(),o=t.pointToData(r),t.setCenter(o),t.setZoom(a*n)}return{center:t.getCenter(),zoom:t.getZoom()}}Kd({type:"map",render:function(t,e,i,n){if(!n||"mapToggleSelect"!==n.type||n.from!==this.uid){var o=this.group;if(o.removeAll(),!t.getHostGeoModel()){if(n&&"geoRoam"===n.type&&"series"===n.componentType&&n.seriesId===t.id)(a=this._mapDraw)&&o.add(a.group);else if(t.needsDrawMap){var a=this._mapDraw||new uy(i,!0);o.add(a.group),a.draw(t,e,i,this,n),this._mapDraw=a}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,i)}}},remove:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},dispose:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},_renderSymbols:function(t,e,i){var n=t.originalData,o=this.group;n.each(n.mapDimension("value"),(function(e,i){if(!isNaN(e)){var a=n.getItemLayout(i);if(a&&a.point){var r=a.point,s=a.offset,l=new Mr({style:{fill:t.getData().getVisual("color")},shape:{cx:r[0]+9*s,cy:r[1],r:3},silent:!0,z2:8+(s?0:2)});if(!s){var u=t.mainSeries.getData(),h=n.getName(i),c=u.indexOfName(h),d=n.getItemModel(i),f=d.getModel("label"),p=d.getModel("emphasis.label"),g=u.getItemGraphicEl(c),m=H(t.getFormattedLabel(c,"normal"),h),v=H(t.getFormattedLabel(c,"emphasis"),m),y=g[hy],_=Math.random();if(!y){y=g[hy]={};var w=O(dy,!0),b=O(dy,!1);g.on("mouseover",w).on("mouseout",b).on("emphasis",w).on("normal",b)}x(y,{recordVersion:g[cy]=_,circle:l,labelModel:f,hoverLabelModel:p,emphasisText:v,normalText:m}),fy(y,!1)}o.add(l)}}}))}}),Fd({type:"geoRoam",event:"geoRoam",update:"updateTransform"},(function(t,e){var i=t.componentType||"series";e.eachComponent({mainType:i,query:t},(function(e){var n=e.coordinateSystem;if("geo"===n.type){var o=py(n,t,e.get("scaleLimit"));e.setCenter&&e.setCenter(o.center),e.setZoom&&e.setZoom(o.zoom),"series"===i&&A(e.seriesGroup,(function(t){t.setCenter(o.center),t.setZoom(o.zoom)}))}}))}));var gy=_t;function my(){he.call(this)}function vy(t){this.name=t,he.call(this),this._roamTransformable=new my,this._rawTransformable=new my}function yy(t,e,i,n){var o=i.seriesModel,a=o?o.coordinateSystem:null;return a===this?a[t](n):null}function xy(t,e,i,n){vy.call(this,t),this.map=e;var o=Wv.load(e,i);this._nameCoordMap=o.nameCoordMap,this._regionsMap=o.regionsMap,this._invertLongitute=null==n||n,this.regions=o.regions,this._rect=o.boundingRect}function _y(t,e,i,n){var o=i.geoModel,a=i.seriesModel,r=o?o.coordinateSystem:a?a.coordinateSystem||(a.getReferringComponents("geo")[0]||{}).coordinateSystem:null;return r===this?r[t](n):null}function wy(t,e){var i=t.get("boundingCoords");if(null!=i){var n=i[0],o=i[1];isNaN(n[0])||isNaN(n[1])||isNaN(o[0])||isNaN(o[1])||this.setBoundingRect(n[0],n[1],o[0]-n[0],o[1]-n[1])}var a,r=this.getBoundingRect(),s=t.get("layoutCenter"),l=t.get("layoutSize"),u=e.getWidth(),h=e.getHeight(),c=r.width/r.height*this.aspectScale,d=!1;if(s&&l&&(s=[hl(s[0],u),hl(s[1],h)],l=hl(l,Math.min(u,h)),isNaN(s[0])||isNaN(s[1])||isNaN(l)||(d=!0)),d){var f={};1<c?(f.width=l,f.height=l/c):(f.height=l,f.width=l*c),f.y=s[1]-f.height/2,f.x=s[0]-f.width/2}else(a=t.getBoxLayoutParams()).aspect=c,f=ql(a,{width:u,height:h});this.setViewRect(f.x,f.y,f.width,f.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function by(t,e){A(e.get("geoCoord"),(function(e,i){t.addGeoCoord(i,e)}))}I(my,he),vy.prototype={constructor:vy,type:"view",dimensions:["x","y"],setBoundingRect:function(t,e,i,n){return this._rect=new vi(t,e,i,n),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(t,e,i,n){this.transformTo(t,e,i,n),this._viewRect=new vi(t,e,i,n)},transformTo:function(t,e,i,n){var o=this.getBoundingRect(),a=this._rawTransformable;a.transform=o.calculateTransform(new vi(t,e,i,n)),a.decomposeTransform(),this._updateTransform()},setCenter:function(t){t&&(this._center=t,this._updateCenterAndZoom())},setZoom:function(t){t=t||1;var e=this.zoomLimit;e&&(null!=e.max&&(t=Math.min(e.max,t)),null!=e.min&&(t=Math.max(e.min,t))),this._zoom=t,this._updateCenterAndZoom()},getDefaultCenter:function(){var t=this.getBoundingRect();return[t.x+t.width/2,t.y+t.height/2]},getCenter:function(){return this._center||this.getDefaultCenter()},getZoom:function(){return this._zoom||1},getRoamTransform:function(){return this._roamTransformable.getLocalTransform()},_updateCenterAndZoom:function(){var t=this._rawTransformable.getLocalTransform(),e=this._roamTransformable,i=this.getDefaultCenter(),n=this.getCenter(),o=this.getZoom();n=_t([],n,t),i=_t([],i,t),e.origin=n,e.position=[i[0]-n[0],i[1]-n[1]],e.scale=[o,o],this._updateTransform()},_updateTransform:function(){var t=this._rawTransformable;(t.parent=this._roamTransformable).updateTransform(),t.updateTransform(),te(this.transform||(this.transform=[]),t.transform||Jt()),this._rawTransform=t.getLocalTransform(),this.invTransform=this.invTransform||[],ae(this.invTransform,this.transform),this.decomposeTransform()},getViewRect:function(){return this._viewRect},getViewRectAfterRoam:function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},dataToPoint:function(t,e,i){var n=e?this._rawTransform:this.transform;return i=i||[],n?gy(i,t,n):at(i,t)},pointToData:function(t){var e=this.invTransform;return e?gy([],t,e):[t[0],t[1]]},convertToPixel:O(yy,"dataToPoint"),convertFromPixel:O(yy,"pointToData"),containPoint:function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])}},I(vy,he),xy.prototype={constructor:xy,type:"geo",dimensions:["lng","lat"],containCoord:function(t){for(var e=this.regions,i=0;i<e.length;i++)if(e[i].contain(t))return!0;return!1},transformTo:function(t,e,i,n){var o=this.getBoundingRect(),a=this._invertLongitute;o=o.clone(),a&&(o.y=-o.y-o.height);var r=this._rawTransformable;if(r.transform=o.calculateTransform(new vi(t,e,i,n)),r.decomposeTransform(),a){var s=r.scale;s[1]=-s[1]}r.updateTransform(),this._updateTransform()},getRegion:function(t){return this._regionsMap.get(t)},getRegionByCoord:function(t){for(var e=this.regions,i=0;i<e.length;i++)if(e[i].contain(t))return e[i]},addGeoCoord:function(t,e){this._nameCoordMap.set(t,e)},getGeoCoord:function(t){return this._nameCoordMap.get(t)},getBoundingRect:function(){return this._rect},dataToPoint:function(t,e,i){if("string"==typeof t&&(t=this.getGeoCoord(t)),t)return vy.prototype.dataToPoint.call(this,t,e,i)},convertToPixel:O(_y,"dataToPoint"),convertFromPixel:O(_y,"pointToData")},I(xy,vy);var Sy={dimensions:xy.prototype.dimensions,create:function(t,e){var i=[];t.eachComponent("geo",(function(t,n){var o=t.get("map"),a=t.get("aspectScale"),r=!0,s=Uc(o);s&&s[0]&&"svg"===s[0].type?(null==a&&(a=1),r=!1):null==a&&(a=.75);var l=new xy(o+n,o,t.get("nameMap"),r);l.aspectScale=a,l.zoomLimit=t.get("scaleLimit"),i.push(l),by(l,t),(t.coordinateSystem=l).model=t,l.resize=wy,l.resize(t,e)})),t.eachSeries((function(t){if("geo"===t.get("coordinateSystem")){var e=t.get("geoIndex")||0;t.coordinateSystem=i[e]}}));var n={};return t.eachSeriesByType("map",(function(t){if(!t.getHostGeoModel()){var e=t.getMapType();n[e]=n[e]||[],n[e].push(t)}})),A(n,(function(t,n){var o=new xy(n,n,y(D(t,(function(t){return t.get("nameMap")}))));o.zoomLimit=W.apply(null,D(t,(function(t){return t.get("scaleLimit")}))),i.push(o),o.resize=wy,o.aspectScale=t[0].get("aspectScale"),o.resize(t[0],e),A(t,(function(t){by(t.coordinateSystem=o,t)}))})),i},getFilledRegions:function(t,e,i){for(var n=(t||[]).slice(),o=Q(),a=0;a<n.length;a++)o.set(n[a].name,n[a]);return A(Wv.load(e,i).regions,(function(t){var e=t.name;o.get(e)||n.push({name:e})})),n}};Wd("geo",Sy),Hd((function(t){var e={};t.eachSeriesByType("map",(function(i){var n=i.getMapType();if(!i.getHostGeoModel()&&!e[n]){var o={};A(i.seriesGroup,(function(e){var i=e.coordinateSystem,n=e.originalData;e.get("showLegendSymbol")&&t.getComponent("legend")&&n.each(n.mapDimension("value"),(function(t,e){var a=n.getName(e),r=i.getRegion(a);if(r&&!isNaN(t)){var s=o[a]||0,l=i.dataToPoint(r.center);o[a]=s+1,n.setItemLayout(e,{point:l,offset:s})}}))}));var a=i.getData();a.each((function(t){var e=a.getName(t),i=a.getItemLayout(t)||{};i.showLabel=!o[e],a.setItemLayout(t,i)})),e[n]=!0}}))})),Zd((function(t){t.eachSeriesByType("map",(function(t){var e=t.get("color"),i=t.getModel("itemStyle"),n=i.get("areaColor"),o=i.get("color")||e[t.seriesIndex%e.length];t.getData().setVisual({areaColor:n,color:o})}))})),Gd(Jc.PROCESSOR.STATISTIC,(function(t){var e={};t.eachSeriesByType("map",(function(t){var i=t.getHostGeoModel(),n=i?"o"+i.id:"i"+t.getMapType();(e[n]=e[n]||[]).push(t)})),A(e,(function(t,e){for(var i=function(t,e){var i={};return A(t,(function(t){t.each(t.mapDimension("value"),(function(e,n){var o="ec-"+t.getName(n);i[o]=i[o]||[],isNaN(e)||i[o].push(e)}))})),t[0].map(t[0].mapDimension("value"),(function(n,o){for(var a="ec-"+t[0].getName(o),r=0,s=1/0,l=-1/0,u=i[a].length,h=0;h<u;h++)s=Math.min(s,i[a][h]),l=Math.max(l,i[a][h]),r+=i[a][h];return 0===u?NaN:"min"===e?s:"max"===e?l:"average"===e?r/u:r}))}(D(t,(function(t){return t.getData()})),t[0].get("mapValueCalculation")),n=0;n<t.length;n++)t[n].originalData=t[n].getData();for(n=0;n<t.length;n++)(t[n].seriesGroup=t)[n].needsDrawMap=0===n&&!t[n].getHostGeoModel(),t[n].setData(i.cloneShallow()),t[n].mainSeries=t[0]}))})),Vd((function(t){var e=[];A(t.series,(function(t){t&&"map"===t.type&&(e.push(t),t.map=t.map||t.mapType,_(t,t.mapLocation))}))})),cv("map",[{type:"mapToggleSelect",event:"mapselectchanged",method:"toggleSelected"},{type:"mapSelect",event:"mapselected",method:"select"},{type:"mapUnSelect",event:"mapunselected",method:"unSelect"}]);var My=A,Iy="\0__link_datas",Ty="\0__link_mainData";function Ay(t){var e=t.mainData,i=t.datas;i||(i={main:e},t.datasAttr={main:"data"}),t.datas=t.mainData=null,Py(e,i,t),My(i,(function(i){My(e.TRANSFERABLE_METHODS,(function(e){i.wrapMethod(e,O(Dy,t))}))})),e.wrapMethod("cloneShallow",O(Ly,t)),My(e.CHANGABLE_METHODS,(function(i){e.wrapMethod(i,O(Cy,t))})),Y(i[e.dataType]===e)}function Dy(t,e){if(function(t){return t[Ty]===t}(this)){var i=x({},this[Iy]);Py(i[this.dataType]=e,i,t)}else Oy(e,this.dataType,this[Ty],t);return e}function Cy(t,e){return t.struct&&t.struct.update(this),e}function Ly(t,e){return My(e[Iy],(function(i,n){i!==e&&Oy(i.cloneShallow(),n,e,t)})),e}function ky(t){var e=this[Ty];return null==t||null==e?e:e[Iy][t]}function Py(t,e,i){t[Iy]={},My(e,(function(e,n){Oy(e,n,t,i)}))}function Oy(t,e,i,n){(i[Iy][e]=t)[Ty]=i,t.dataType=e,n.struct&&(t[n.structAttr]=n.struct,n.struct[n.datasAttr[e]]=t),t.getLinkedData=ky}function Ny(t,e){this.name=t||"",this.depth=0,this.height=0,this.parentNode=null,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.hostTree=e}function Ey(t,e,i){this._nodes=[],this.hostModel=t,this.levelModels=D(e||[],(function(e){return new ol(e,t,t.ecModel)})),this.leavesModel=new ol(i||{},t,t.ecModel)}function Ry(t,e){var i=t.isExpand?t.children:[],n=t.parentNode.children,o=t.hierNode.i?n[t.hierNode.i-1]:null;if(i.length){!function(t){for(var e=t.children,i=e.length,n=0,o=0;0<=--i;){var a=e[i];a.hierNode.prelim+=n,a.hierNode.modifier+=n,n+=a.hierNode.shift+(o+=a.hierNode.change)}}(t);var a=(i[0].hierNode.prelim+i[i.length-1].hierNode.prelim)/2;o?(t.hierNode.prelim=o.hierNode.prelim+e(t,o),t.hierNode.modifier=t.hierNode.prelim-a):t.hierNode.prelim=a}else o&&(t.hierNode.prelim=o.hierNode.prelim+e(t,o));t.parentNode.hierNode.defaultAncestor=function(t,e,i,n){if(e){for(var o=t,a=t,r=a.parentNode.children[0],s=e,l=o.hierNode.modifier,u=a.hierNode.modifier,h=r.hierNode.modifier,c=s.hierNode.modifier;s=Gy(s),a=Fy(a),s&&a;){o=Gy(o),r=Fy(r),o.hierNode.ancestor=t;var d=s.hierNode.prelim+c-a.hierNode.prelim-u+n(s,a);0<d&&(Wy((f=s).hierNode.ancestor.parentNode===t.parentNode?f.hierNode.ancestor:i,t,d),u+=d,l+=d),c+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=o.hierNode.modifier,h+=r.hierNode.modifier}s&&!Gy(o)&&(o.hierNode.thread=s,o.hierNode.modifier+=c-l),a&&!Fy(r)&&(r.hierNode.thread=a,r.hierNode.modifier+=u-h,i=t)}var f;return i}(t,o,t.parentNode.hierNode.defaultAncestor||n[0],e)}function zy(t){t.setLayout({x:t.hierNode.prelim+t.parentNode.hierNode.modifier},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function By(t){return arguments.length?t:Hy}function Vy(t,e){var i={};return t-=Math.PI/2,i.x=e*Math.cos(t),i.y=e*Math.sin(t),i}function Gy(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function Fy(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function Wy(t,e,i){var n=i/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=n,e.hierNode.shift+=i,e.hierNode.modifier+=i,e.hierNode.prelim+=i,t.hierNode.change+=n}function Hy(t,e){return t.parentNode===e.parentNode?1:2}function Zy(t,e){var i=t.getItemLayout(e);return i&&!isNaN(i.x)&&!isNaN(i.y)&&"none"!==t.getItemVisual(e,"symbol")}function Uy(t,e,i){return i.itemModel=e,i.itemStyle=e.getModel("itemStyle").getItemStyle(),i.hoverItemStyle=e.getModel("emphasis.itemStyle").getItemStyle(),i.lineStyle=e.getModel("lineStyle").getLineStyle(),i.labelModel=e.getModel("label"),i.hoverLabelModel=e.getModel("emphasis.label"),i.symbolInnerColor=!1===t.isExpand&&0!==t.children.length?i.itemStyle.fill:"#fff",i}function Xy(t,e,i,n,o,a){var r=!i,s=t.tree.getNodeByDataIndex(e),l=s.getModel(),u=(a=Uy(s,l,a),t.tree.root),h=s.parentNode===u?s:s.parentNode||s,c=t.getItemGraphicEl(h.dataIndex),d=h.getLayout(),f=c?{x:c.position[0],y:c.position[1],rawX:c.__radialOldRawX,rawY:c.__radialOldRawY}:d,p=s.getLayout();r?(i=new lg(t,e,a)).attr("position",[f.x,f.y]):i.updateData(t,e,a),i.__radialOldRawX=i.__radialRawX,i.__radialOldRawY=i.__radialRawY,i.__radialRawX=p.rawX,i.__radialRawY=p.rawY,n.add(i),t.setItemGraphicEl(e,i),Gs(i,{position:[p.x,p.y]},o);var g=i.getSymbolPath();if("radial"===a.layout){var m,v,y=u.children[0],x=y.getLayout(),w=y.children.length;if(p.x===x.x&&!0===s.isExpand){var b={};b.x=(y.children[0].getLayout().x+y.children[w-1].getLayout().x)/2,b.y=(y.children[0].getLayout().y+y.children[w-1].getLayout().y)/2,(m=Math.atan2(b.y-x.y,b.x-x.x))<0&&(m=2*Math.PI+m),(v=b.x<x.x)&&(m-=Math.PI)}else(m=Math.atan2(p.y-x.y,p.x-x.x))<0&&(m=2*Math.PI+m),0===s.children.length||0!==s.children.length&&!1===s.isExpand?(v=p.x<x.x)&&(m-=Math.PI):(v=p.x>x.x)||(m-=Math.PI);var S=v?"left":"right",M=a.labelModel.get("rotate"),I=M*(Math.PI/180);g.setStyle({textPosition:a.labelModel.get("position")||S,textRotation:null==M?-m:I,textOrigin:"center",verticalAlign:"middle"})}if(s.parentNode&&s.parentNode!==u){var T=i.__edge;Gs(T=T||(i.__edge=new Hr({shape:jy(a,f,f),style:_({opacity:0,strokeNoScale:!0},a.lineStyle)})),{shape:jy(a,d,p),style:{opacity:1}},o),n.add(T)}}function Yy(t,e,i,n,o,a){for(var r,s=t.tree.getNodeByDataIndex(e),l=t.tree.root,u=s.getModel(),h=(a=Uy(s,u,a),s.parentNode===l?s:s.parentNode||s);null==(r=h.getLayout());)h=h.parentNode===l?h:h.parentNode||h;Gs(i,{position:[r.x+1,r.y+1]},o,(function(){n.remove(i),t.setItemGraphicEl(e,null)})),i.fadeOut(null,{keepLabel:!0});var c=i.__edge;c&&Gs(c,{shape:jy(a,r,r),style:{opacity:0}},o,(function(){n.remove(c)}))}function jy(t,e,i){var n,o,a,r,s,l,u,h,c=t.orient;if("radial"!==t.layout)return s=e.x,u=e.y,l=i.x,h=i.y,"LR"!==c&&"RL"!==c||(n=s+(l-s)*t.curvature,o=u,a=l+(s-l)*t.curvature,r=h),"TB"!==c&&"BT"!==c||(n=s,o=u+(h-u)*t.curvature,a=l,r=h+(u-h)*t.curvature),{x1:s,y1:u,x2:l,y2:h,cpx1:n,cpy1:o,cpx2:a,cpy2:r};l=i.rawX,h=i.rawY;var d=Vy(s=e.rawX,u=e.rawY),f=Vy(s,u+(h-u)*t.curvature),p=Vy(l,h+(u-h)*t.curvature),g=Vy(l,h);return{x1:d.x,y1:d.y,x2:g.x,y2:g.y,cpx1:f.x,cpy1:f.y,cpx2:p.x,cpy2:p.y}}function qy(t,e){for(var i,n=[t];i=n.pop();)if(e(i),i.isExpand){var o=i.children;if(o.length)for(var a=o.length-1;0<=a;a--)n.push(o[a])}}function Ky(t,e,i){if(t&&0<=S(e,t.type)){var n=i.getData().tree.root,o=t.targetNode;if("string"==typeof o&&(o=n.getNodeById(o)),o&&n.contains(o))return{node:o};var a=t.targetNodeId;if(null!=a&&(o=n.getNodeById(a)))return{node:o}}}function $y(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function Jy(t,e){return 0<=S($y(t),e)}function Qy(t,e){for(var i=[];t;){var n=t.dataIndex;i.push({name:t.name,dataIndex:n,value:e.getRawValue(n)}),t=t.parentNode}return i.reverse(),i}function tx(t){this.group=new yi,t.add(this.group)}function ex(t,e,i,n,o,a){var r=[[o?t:t-5,e],[t+i,e],[t+i,e+n],[o?t:t-5,e+n]];return a||r.splice(2,0,[t+i+5,e+n/2]),o||r.push([t,e+n/2]),r}function ix(t){var e=cx(t);return e.stroke=e.fill=e.lineWidth=null,e}Ny.prototype={constructor:Ny,isRemoved:function(){return this.dataIndex<0},eachNode:function(t,e,i){"function"==typeof t&&(i=e,e=t,t=null),R(t=t||{})&&(t={order:t});var n,o=t.order||"preorder",a=this[t.attr||"children"];"preorder"===o&&(n=e.call(i,this));for(var r=0;!n&&r<a.length;r++)a[r].eachNode(t,e,i);"postorder"===o&&e.call(i,this)},updateDepthAndHeight:function(t){var e=0;this.depth=t;for(var i=0;i<this.children.length;i++){var n=this.children[i];n.updateDepthAndHeight(t+1),n.height>e&&(e=n.height)}this.height=e+1},getNodeById:function(t){if(this.getId()===t)return this;for(var e=0,i=this.children,n=i.length;e<n;e++){var o=i[e].getNodeById(t);if(o)return o}},contains:function(t){if(t===this)return!0;for(var e=0,i=this.children,n=i.length;e<n;e++){var o=i[e].contains(t);if(o)return o}},getAncestors:function(t){for(var e=[],i=t?this:this.parentNode;i;)e.push(i),i=i.parentNode;return e.reverse(),e},getValue:function(t){var e=this.hostTree.data;return e.get(e.getDimension(t||"value"),this.dataIndex)},setLayout:function(t,e){0<=this.dataIndex&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this.hostTree.data.getItemLayout(this.dataIndex)},getModel:function(t){if(!(this.dataIndex<0)){var e,i=this.hostTree,n=i.data.getItemModel(this.dataIndex),o=this.getLevelModel();return o||0!==this.children.length&&(0===this.children.length||!1!==this.isExpand)||(e=this.getLeavesModel()),n.getModel(t,(o||e||i.hostModel).getModel(t))}},getLevelModel:function(){return(this.hostTree.levelModels||[])[this.depth]},getLeavesModel:function(){return this.hostTree.leavesModel},setVisual:function(t,e){0<=this.dataIndex&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this.hostTree.data.getItemVisual(this.dataIndex,t,e)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)},getId:function(){return this.hostTree.data.getId(this.dataIndex)},isAncestorOf:function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},isDescendantOf:function(t){return t!==this&&t.isAncestorOf(this)}},Ey.prototype={constructor:Ey,type:"tree",eachNode:function(t,e,i){this.root.eachNode(t,e,i)},getNodeByDataIndex:function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},getNodeByName:function(t){return this.root.getNodeByName(t)},update:function(){for(var t=this.data,e=this._nodes,i=0,n=e.length;i<n;i++)e[i].dataIndex=-1;for(i=0,n=t.count();i<n;i++)e[t.getRawIndex(i)].dataIndex=i},clearLayouts:function(){this.data.clearItemLayouts()}},Ey.createTree=function(t,e,i,n){var o=new Ey(e,i.levels,i.leaves),a=[],r=1;!function t(e,i){var n=e.value;r=Math.max(r,N(n)?n.length:1),a.push(e);var s=new Ny(e.name,o);i?function(t,e){t.parentNode!==e&&(e.children.push(t),t.parentNode=e)}(s,i):o.root=s,o._nodes.push(s);var l=e.children;if(l)for(var u=0;u<l.length;u++)t(l[u],s)}(t),o.root.updateDepthAndHeight(0);var s=Cf(a,{coordDimensions:["value"],dimensionsCount:r}),l=new gf(s,e);return l.initData(a),Ay({mainData:l,struct:o,structAttr:"tree"}),o.update(),n&&n(l),o},Lh.extend({type:"series.tree",layoutInfo:null,layoutMode:"box",getInitialData:function(t){var e={name:t.name,children:t.data},i={};i.leaves=t.leaves||{};var n=Ey.createTree(e,this,i,(function(t){t.wrapMethod("getItemModel",(function(t,e){var i=n.getNodeByDataIndex(e),o=i.getLeavesModel();return i.children.length&&i.isExpand||(t.parentModel=o),t}))})),o=0;n.eachNode("preorder",(function(t){t.depth>o&&(o=t.depth)}));var a=t.expandAndCollapse&&0<=t.initialTreeDepth?t.initialTreeDepth:o;return n.root.eachNode("preorder",(function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=a})),n.data},getOrient:function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},formatTooltip:function(t){for(var e=this.getData().tree,i=e.root.children[0],n=e.getNodeByDataIndex(t),o=n.getValue(),a=n.name;n&&n!==i;)a=n.parentNode.name+"."+a,n=n.parentNode;return Ol(a+(isNaN(o)||null==o?"":" : "+o))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}}),Kd({type:"tree",init:function(t,e){this._mainGroup=new yi,this._controller=new jv(e.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},render:function(t,e,i,n){var o=t.getData(),a=t.layoutInfo,r=this._mainGroup,s=t.get("layout");r.attr("position","radial"===s?[a.x+a.width/2,a.y+a.height/2]:[a.x,a.y]),this._updateViewCoordSys(t,a,s),this._updateController(t,e,i);var l=this._data,u={expandAndCollapse:t.get("expandAndCollapse"),layout:s,orient:t.getOrient(),curvature:t.get("lineStyle.curveness"),symbolRotate:t.get("symbolRotate"),symbolOffset:t.get("symbolOffset"),hoverAnimation:t.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};o.diff(l).add((function(e){Zy(o,e)&&Xy(o,e,null,r,t,u)})).update((function(e,i){var n=l.getItemGraphicEl(i);Zy(o,e)?Xy(o,e,n,r,t,u):n&&Yy(l,i,n,r,t,u)})).remove((function(e){var i=l.getItemGraphicEl(e);i&&Yy(l,e,i,r,t,u)})).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),!0===u.expandAndCollapse&&o.eachItemGraphicEl((function(e,n){e.off("click").on("click",(function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:n})}))})),this._data=o},_updateViewCoordSys:function(t){var e=t.getData(),i=[];e.each((function(t){var n=e.getItemLayout(t);!n||isNaN(n.x)||isNaN(n.y)||i.push([+n.x,+n.y])}));var n=[],o=[];wa(i,n,o);var a=this._min,r=this._max;o[0]-n[0]==0&&(n[0]=a?a[0]:n[0]-1,o[0]=r?r[0]:o[0]+1),o[1]-n[1]==0&&(n[1]=a?a[1]:n[1]-1,o[1]=r?r[1]:o[1]+1);var s=t.coordinateSystem=new vy;s.zoomLimit=t.get("scaleLimit"),s.setBoundingRect(n[0],n[1],o[0]-n[0],o[1]-n[1]),s.setCenter(t.get("center")),s.setZoom(t.get("zoom")),this.group.attr({position:s.position,scale:s.scale}),this._viewCoordSys=s,this._min=n,this._max=o},_updateController:function(t,e,i){var n=this._controller,o=this._controllerHost,a=this.group;n.setPointerChecker((function(e,n,o){var r=a.getBoundingRect();return r.applyTransform(a.transform),r.contain(n,o)&&!ry(e,i,t)})),n.enable(t.get("roam")),o.zoomLimit=t.get("scaleLimit"),o.zoom=t.coordinateSystem.getZoom(),n.off("pan").off("zoom").on("pan",(function(e){ny(o,e.dx,e.dy),i.dispatchAction({seriesId:t.id,type:"treeRoam",dx:e.dx,dy:e.dy})}),this).on("zoom",(function(e){oy(o,e.scale,e.originX,e.originY),i.dispatchAction({seriesId:t.id,type:"treeRoam",zoom:e.scale,originX:e.originX,originY:e.originY}),this._updateNodeAndLinkScale(t)}),this)},_updateNodeAndLinkScale:function(t){var e=t.getData(),i=this._getNodeGlobalScale(t),n=[i,i];e.eachItemGraphicEl((function(t,e){t.attr("scale",n)}))},_getNodeGlobalScale:function(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var i=this._nodeScaleRatio,n=e.scale,o=n&&n[0]||1;return((e.getZoom()-1)*i+1)/o},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},remove:function(){this._mainGroup.removeAll(),this._data=null}}),Fd({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},(function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},(function(e){var i=t.dataIndex,n=e.getData().tree.getNodeByDataIndex(i);n.isExpand=!n.isExpand}))})),Fd({type:"treeRoam",event:"treeRoam",update:"none"},(function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},(function(e){var i=py(e.coordinateSystem,t);e.setCenter&&e.setCenter(i.center),e.setZoom&&e.setZoom(i.zoom)}))})),Zd(Zg("tree","circle")),Hd((function(t,e){t.eachSeriesByType("tree",(function(t){!function(t,e){var i=function(t,e){return ql(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=i;var n=t.get("layout"),o=0,a=0,r=null;r="radial"===n?(o=2*Math.PI,a=Math.min(i.height,i.width)/2,By((function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth}))):(o=i.width,a=i.height,By());var s=t.getData().tree.root,l=s.children[0];if(l){!function(t){t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var e,i,n=[t];e=n.pop();)if(i=e.children,e.isExpand&&i.length)for(var o=i.length-1;0<=o;o--){var a=i[o];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},n.push(a)}}(s),function(t,e,i){for(var n,o=[t],a=[];n=o.pop();)if(a.push(n),n.isExpand){var r=n.children;if(r.length)for(var s=0;s<r.length;s++)o.push(r[s])}for(;n=a.pop();)e(n,i)}(l,Ry,r),s.hierNode.modifier=-l.hierNode.prelim,qy(l,zy);var u=l,h=l,c=l;qy(l,(function(t){var e=t.getLayout().x;e<u.getLayout().x&&(u=t),e>h.getLayout().x&&(h=t),t.depth>c.depth&&(c=t)}));var d=u===h?1:r(u,h)/2,f=d-u.getLayout().x,p=0,g=0,m=0,v=0;if("radial"===n)p=o/(h.getLayout().x+d+f),g=a/(c.depth-1||1),qy(l,(function(t){var e=Vy(m=(t.getLayout().x+f)*p,v=(t.depth-1)*g);t.setLayout({x:e.x,y:e.y,rawX:m,rawY:v},!0)}));else{var y=t.getOrient();"RL"===y||"LR"===y?(g=a/(h.getLayout().x+d+f),p=o/(c.depth-1||1),qy(l,(function(t){v=(t.getLayout().x+f)*g,t.setLayout({x:m="LR"===y?(t.depth-1)*p:o-(t.depth-1)*p,y:v},!0)}))):"TB"!==y&&"BT"!==y||(p=o/(h.getLayout().x+d+f),g=a/(c.depth-1||1),qy(l,(function(t){m=(t.getLayout().x+f)*p,t.setLayout({x:m,y:v="TB"===y?(t.depth-1)*g:a-(t.depth-1)*g},!0)})))}}}(t,e)}))})),Lh.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],preventUsingHoverLayer:!0,_viewRoot:null,defaultOption:{progressive:0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"\u25b6",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperLabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(t,e){var i={name:t.name,children:t.data};!function t(e){var i=0;A(e.children,(function(e){t(e);var n=e.value;N(n)&&(n=n[0]),i+=n}));var n=e.value;N(n)&&(n=n[0]),null!=n&&!isNaN(n)||(n=i),n<0&&(n=0),N(e.value)?e.value[0]=n:e.value=n}(i);var n=t.levels||[];n=t.levels=function(t,e){var i,n=e.get("color");if(n)return A(t=t||[],(function(t){var e=new ol(t),n=e.get("color");(e.get("itemStyle.color")||n&&"none"!==n)&&(i=!0)})),i||((t[0]||(t[0]={})).color=n.slice()),t}(n,e);var o={};return o.levels=n,Ey.createTree(i,this,o).data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=N(i)?Dl(i[0]):Dl(i);return Ol(e.getName(t)+": "+n)},getDataParams:function(t){var e=Lh.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=Qy(i,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},x(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=Q(),this._idIndexMapCount=0);var i=e.get(t);return null==i&&e.set(t,i=this._idIndexMapCount++),i},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)}}),tx.prototype={constructor:tx,render:function(t,e,i,n){var o=t.getModel("breadcrumb"),a=this.group;if(a.removeAll(),o.get("show")&&i){var r=o.getModel("itemStyle"),s=r.getModel("textStyle"),l={pos:{left:o.get("left"),right:o.get("right"),top:o.get("top"),bottom:o.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:o.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(i,l,s),this._renderContent(t,l,r,s,n),Kl(a,l.pos,l.box)}},_prepare:function(t,e,i){for(var n=t;n;n=n.parentNode){var o=n.getModel().get("name"),a=i.getTextRect(o),r=Math.max(a.width+16,e.emptyItemWidth);e.totalWidth+=r+8,e.renderList.push({node:n,text:o,width:r})}},_renderContent:function(t,e,i,n,o){for(var a,r,s=0,l=e.emptyItemWidth,u=t.get("breadcrumb.height"),h=function(t,e,i){var n=e.width,o=e.height,a=hl(t.x,n),r=hl(t.y,o),s=hl(t.x2,n),l=hl(t.y2,o);return(isNaN(a)||isNaN(parseFloat(t.x)))&&(a=0),(isNaN(s)||isNaN(parseFloat(t.x2)))&&(s=n),(isNaN(r)||isNaN(parseFloat(t.y)))&&(r=0),(isNaN(l)||isNaN(parseFloat(t.y2)))&&(l=o),i=Ll(i||0),{width:Math.max(s-a-i[1]-i[3],0),height:Math.max(l-r-i[0]-i[2],0)}}(e.pos,e.box),c=e.totalWidth,d=e.renderList,f=d.length-1;0<=f;f--){var p=d[f],g=p.node,m=p.width,v=p.text;c>h.width&&(c-=m-l,m=l,v=null);var y=new Lr({shape:{points:ex(s,0,m,u,f===d.length-1,0===f)},style:_(i.getItemStyle(),{lineJoin:"bevel",text:v,textFill:n.getTextColor(),textFont:n.getFont()}),z:10,onclick:O(o,g)});this.group.add(y),y.eventData={componentType:"series",componentSubType:"treemap",componentIndex:(a=t).componentIndex,seriesIndex:a.componentIndex,seriesName:a.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:(r=g)&&r.dataIndex,name:r&&r.name},treePathInfo:r&&Qy(r,a)},s+=m+8}},remove:function(){this.group.removeAll()}};var nx=P,ox=yi,ax=zr,rx=A,sx=["label"],lx=["emphasis","label"],ux=["upperLabel"],hx=["emphasis","upperLabel"],cx=Xo([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]);function dx(t,e,i,n,o,a,r,s,l,u){if(r){var h=r.getLayout();if(h&&h.isInView){var c=h.width,d=h.height,f=h.borderWidth,p=h.invisible,g=r.getRawIndex(),v=s&&s.getRawIndex(),y=r.viewChildren,_=h.upperHeight,w=y&&y.length,b=r.getModel("itemStyle"),S=r.getModel("emphasis.itemStyle"),M=C("nodeGroup",ox);if(M){if(l.add(M),M.attr("position",[h.x||0,h.y||0]),M.__tmNodeWidth=c,M.__tmNodeHeight=d,h.isAboveViewRoot)return M;var I=C("background",ax,u,1);if(I&&function(e,i,n){i.dataIndex=r.dataIndex,i.seriesIndex=t.seriesIndex,i.setShape({x:0,y:0,width:c,height:d});var o=r.getVisual("borderColor",!0),a=S.get("borderColor");A(i,(function(){var t=ix(b);t.fill=o;var e=cx(S);if(e.fill=a,n){var r=c-2*f;D(t,e,o,r,_,{x:f,y:0,width:r,height:_})}else t.text=e.text=null;i.setStyle(t),Ts(i,e)})),e.add(i)}(M,I,w&&h.upperHeight),!w){var T=C("content",ax,u,2);T&&function(e,i){i.dataIndex=r.dataIndex,i.seriesIndex=t.seriesIndex;var n=Math.max(c-2*f,0),o=Math.max(d-2*f,0);i.culling=!0,i.setShape({x:f,y:f,width:n,height:o});var a=r.getVisual("color",!0);A(i,(function(){var t=ix(b);t.fill=a;var e=cx(S);D(t,e,a,n,o),i.setStyle(t),Ts(i,e)})),e.add(i)}(M,T)}return M}}}function A(t,e){p?t.invisible||a.push(t):(e(),t.__tmWillVisible||(t.invisible=!1))}function D(e,i,n,o,a,s){var l=r.getModel(),u=W(t.getFormattedLabel(r.dataIndex,"normal",null,null,s?"upperLabel":"label"),l.get("name"));if(!s&&h.isLeafRoot){var c=t.get("drillDownIcon",!0);u=c?c+" "+u:u}var d=l.getModel(s?ux:sx),f=l.getModel(s?hx:lx),p=d.getShallow("show");Ls(e,i,d,f,{defaultText:p?u:null,autoColor:n,isRectText:!0}),s&&(e.textRect=m(s)),e.truncate=p&&d.get("ellipsis")?{outerWidth:o,outerHeight:a,minChar:2}:null}function C(t,a,s,l){var u=null!=v&&i[t][v],h=o[t];return u?(i[t][v]=null,function(t,e,i){(t[g]={}).old="nodeGroup"===i?e.position.slice():x({},e.shape)}(h,u,t)):p||((u=new a({z:function(t,e){var i=10*t+e;return(i-1)/i}(s,l)})).__tmDepth=s,function(t,e,i){var a=t[g]={},s=r.parentNode;if(s&&(!n||"drillDown"===n.direction)){var l=0,u=0,h=o.background[s.getRawIndex()];!n&&h&&h.old&&(l=h.old.width,u=h.old.height),a.old="nodeGroup"===i?[0,u]:{x:l,y:u,width:0,height:0}}a.fadein="nodeGroup"!==i}(h,0,u.__tmStorageName=t)),e[t][g]=u}}Kd({type:"treemap",init:function(t,e){this._storage={nodeGroup:[],background:[],content:[]},this._state="ready"},render:function(t,e,i,n){if(!(S(e.findComponents({mainType:"series",subType:"treemap",query:n}),t)<0)){this.seriesModel=t,this.api=i,this.ecModel=e;var o=Ky(n,["treemapZoomToNode","treemapRootToNode"],t),a=n&&n.type,r=t.layoutInfo,s=!this._oldTree,l=this._storage,u="treemapRootToNode"===a&&o&&l?{rootNodeGroup:l.nodeGroup[o.node.getRawIndex()],direction:n.direction}:null,h=this._giveContainerGroup(r),c=this._doRender(h,t,u);s||a&&"treemapZoomToNode"!==a&&"treemapRootToNode"!==a?c.renderFinally():this._doAnimation(h,c,t,u),this._resetController(i),this._renderBreadcrumb(t,i,o)}},_giveContainerGroup:function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new ox,this._initEvents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_doRender:function(t,e,i){var n=e.getData().tree,o=this._oldTree,a={nodeGroup:[],background:[],content:[]},r={nodeGroup:[],background:[],content:[]},s=this._storage,l=[],u=O(dx,e,r,s,i,a,l);!function t(e,i,n,o,a){function r(t){return t.getId()}function s(r,s){var l=null!=r?e[r]:null,h=null!=s?i[s]:null,c=u(l,h,n,a);c&&t(l&&l.viewChildren||[],h&&h.viewChildren||[],c,o,a+1)}o?rx(i=e,(function(t,e){t.isRemoved()||s(e,e)})):new Jd(i,e,r,r).add(s).update(s).remove(O(s,null)).execute()}(n.root?[n.root]:[],o&&o.root?[o.root]:[],t,n===o||!o,0);var h,c,d=(c={nodeGroup:[],background:[],content:[]},(h=s)&&rx(h,(function(t,e){var i=c[e];rx(t,(function(t){t&&(i.push(t),t.__tmWillDelete=1)}))})),c);return this._oldTree=n,this._storage=r,{lastsForAnimation:a,willDeleteEls:d,renderFinally:function(){rx(d,(function(t){rx(t,(function(t){t.parent&&t.parent.remove(t)}))})),rx(l,(function(t){t.invisible=!0,t.dirty()}))}}},_doAnimation:function(t,e,i,n){if(i.get("animation")){var o=i.get("animationDurationUpdate"),a=i.get("animationEasing"),r=function(){var t,e=[],i={};return{add:function(t,n,o,a,r){return R(a)&&(r=a,a=0),!i[t.id]&&(i[t.id]=1,e.push({el:t,target:n,time:o,delay:a,easing:r}),!0)},done:function(e){return t=e,this},start:function(){for(var n=e.length,o=0,a=e.length;o<a;o++){var r=e[o];r.el.animateTo(r.target,r.time,r.delay,r.easing,s)}return this;function s(){--n||(e.length=0,i={},t&&t())}}}}();rx(e.willDeleteEls,(function(t,e){rx(t,(function(t,i){if(!t.invisible){var s,l=t.parent;if(n&&"drillDown"===n.direction)s=l===n.rootNodeGroup?{shape:{x:0,y:0,width:l.__tmNodeWidth,height:l.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var u=0,h=0;l.__tmWillDelete||(u=l.__tmNodeWidth/2,h=l.__tmNodeHeight/2),s="nodeGroup"===e?{position:[u,h],style:{opacity:0}}:{shape:{x:u,y:h,width:0,height:0},style:{opacity:0}}}s&&r.add(t,s,o,a)}}))})),rx(this._storage,(function(t,i){rx(t,(function(t,n){var s=e.lastsForAnimation[i][n],l={};s&&("nodeGroup"===i?s.old&&(l.position=t.position.slice(),t.attr("position",s.old)):(s.old&&(l.shape=x({},t.shape),t.setShape(s.old)),s.fadein?(t.setStyle("opacity",0),l.style={opacity:1}):1!==t.style.opacity&&(l.style={opacity:1})),r.add(t,l,o,a))}))}),this),this._state="animating",r.done(nx((function(){this._state="ready",e.renderFinally()}),this)).start()}},_resetController:function(t){var e=this._controller;e||((e=this._controller=new jv(t.getZr())).enable(this.seriesModel.get("roam")),e.on("pan",nx(this._onPan,this)),e.on("zoom",nx(this._onZoom,this)));var i=new vi(0,0,t.getWidth(),t.getHeight());e.setPointerChecker((function(t,e,n){return i.contain(e,n)}))},_clearController:function(){var t=this._controller;t&&(t.dispose(),t=null)},_onPan:function(t){if("animating"!==this._state&&(3<Math.abs(t.dx)||3<Math.abs(t.dy))){var e=this.seriesModel.getData().tree.root;if(!e)return;var i=e.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+t.dx,y:i.y+t.dy,width:i.width,height:i.height}})}},_onZoom:function(t){var e=t.originX,i=t.originY;if("animating"!==this._state){var n=this.seriesModel.getData().tree.root;if(!n)return;var o=n.getLayout();if(!o)return;var a=new vi(o.x,o.y,o.width,o.height),r=this.seriesModel.layoutInfo;e-=r.x,i-=r.y;var s=Jt();ie(s,s,[-e,-i]),oe(s,s,[t.scale,t.scale]),ie(s,s,[e,i]),a.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:a.x,y:a.y,width:a.width,height:a.height}})}},_initEvents:function(t){t.on("click",(function(t){if("ready"===this._state){var e=this.seriesModel.get("nodeClick",!0);if(e){var i=this.findTarget(t.offsetX,t.offsetY);if(i){var n=i.node;if(n.getLayout().isLeafRoot)this._rootToNode(i);else if("zoomToNode"===e)this._zoomToNode(i);else if("link"===e){var o=n.hostTree.data.getItemModel(n.dataIndex),a=o.get("link",!0),r=o.get("target",!0)||"blank";a&&window.open(a,r)}}}}}),this)},_renderBreadcrumb:function(t,e,i){i=i||(i=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2))||{node:t.getData().tree.root},(this._breadcrumb||(this._breadcrumb=new tx(this.group))).render(t,e,i.node,nx((function(e){"animating"!==this._state&&(Jy(t.getViewRoot(),e)?this._rootToNode({node:e}):this._zoomToNode({node:e}))}),this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},_rootToNode:function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},findTarget:function(t,e){var i;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},(function(n){var o=this._storage.background[n.getRawIndex()];if(o){var a=o.transformCoordToLocal(t,e),r=o.shape;if(!(r.x<=a[0]&&a[0]<=r.x+r.width&&r.y<=a[1]&&a[1]<=r.y+r.height))return!1;i={node:n,offsetX:a[0],offsetY:a[1]}}}),this),i}});for(var fx=function(){},px=["treemapZoomToNode","treemapRender","treemapMove"],gx=0;gx<px.length;gx++)Fd({type:px[gx],update:"updateView"},fx);Fd({type:"treemapRootToNode",update:"updateView"},(function(t,e){e.eachComponent({mainType:"series",subType:"treemap",query:t},(function(e,i){var n=Ky(t,["treemapZoomToNode","treemapRootToNode"],e);if(n){var o=e.getViewRoot();o&&(t.direction=Jy(o,n.node)?"rollUp":"drillDown"),e.resetViewRoot(n.node)}}))}));var mx=A,vx=z,yx=function(t){var e=t.mappingMethod,i=t.type,n=this.option=m(t);this.type=i,this.mappingMethod=e,this._normalizeData=Lx[e];var o=xx[i];this.applyVisual=o.applyVisual,this.getColorMapper=o.getColorMapper,this._doMap=o._doMap[e],"piecewise"===e?(_x(n),function(t){var e=t.pieceList;t.hasSpecialVisual=!1,A(e,(function(e,i){e.originIndex=i,null!=e.visual&&(t.hasSpecialVisual=!0)}))}(n)):"category"===e?n.categories?function(t){var e=t.categories,i=t.visual,n=t.categoryMap={};if(mx(e,(function(t,e){n[t]=e})),!N(i)){var o=[];z(i)?mx(i,(function(t,e){var i=n[e];o[null!=i?i:-1]=t})):o[-1]=i,i=Cx(t,o)}for(var a=e.length-1;0<=a;a--)null==i[a]&&(delete n[e[a]],e.pop())}(n):_x(n,!0):(Y("linear"!==e||n.dataExtent),_x(n))};yx.prototype={constructor:yx,mapValueToVisual:function(t){var e=this._normalizeData(t);return this._doMap(e,t)},getNormalizer:function(){return P(this._normalizeData,this)}};var xx=yx.visualHandlers={color:{applyVisual:Mx("color"),getColorMapper:function(){var t=this.option;return P("category"===t.mappingMethod?function(t,e){return e||(t=this._normalizeData(t)),Ix.call(this,t)}:function(e,i,n){var o=!!n;return i||(e=this._normalizeData(e)),n=Be(e,t.parsedVisual,n),o?n:We(n,"rgba")},this)},_doMap:{linear:function(t){return We(Be(t,this.option.parsedVisual),"rgba")},category:Ix,piecewise:function(t,e){var i=Dx.call(this,e);return null==i&&(i=We(Be(t,this.option.parsedVisual),"rgba")),i},fixed:Tx}},colorHue:bx((function(t,e){return Ge(t,e)})),colorSaturation:bx((function(t,e){return Ge(t,null,e)})),colorLightness:bx((function(t,e){return Ge(t,null,null,e)})),colorAlpha:bx((function(t,e){return Fe(t,e)})),opacity:{applyVisual:Mx("opacity"),_doMap:Ax([0,1])},liftZ:{applyVisual:Mx("liftZ"),_doMap:{linear:Tx,category:Tx,piecewise:Tx,fixed:Tx}},symbol:{applyVisual:function(t,e,i){var n=this.mapValueToVisual(t);if(R(n))i("symbol",n);else if(vx(n))for(var o in n)n.hasOwnProperty(o)&&i(o,n[o])},_doMap:{linear:Sx,category:Ix,piecewise:function(t,e){var i=Dx.call(this,e);return null==i&&(i=Sx.call(this,t)),i},fixed:Tx}},symbolSize:{applyVisual:Mx("symbolSize"),_doMap:Ax([0,1])}};function _x(t,e){var i=t.visual,n=[];z(i)?mx(i,(function(t){n.push(t)})):null!=i&&n.push(i),e||1!==n.length||{color:1,symbol:1}.hasOwnProperty(t.type)||(n[1]=n[0]),Cx(t,n)}function bx(t){return{applyVisual:function(e,i,n){e=this.mapValueToVisual(e),n("color",t(i("color"),e))},_doMap:Ax([0,1])}}function Sx(t){var e=this.option.visual;return e[Math.round(ul(t,[0,1],[0,e.length-1],!0))]||{}}function Mx(t){return function(e,i,n){n(t,this.mapValueToVisual(e))}}function Ix(t){var e=this.option.visual;return e[this.option.loop&&-1!==t?t%e.length:t]}function Tx(){return this.option.visual[0]}function Ax(t){return{linear:function(e){return ul(e,t,this.option.visual,!0)},category:Ix,piecewise:function(e,i){var n=Dx.call(this,i);return null==n&&(n=ul(e,t,this.option.visual,!0)),n},fixed:Tx}}function Dx(t){var e=this.option,i=e.pieceList;if(e.hasSpecialVisual){var n=i[yx.findPieceIndex(t,i)];if(n&&n.visual)return n.visual[this.type]}}function Cx(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=D(e,(function(t){return Ne(t)}))),e}var Lx={linear:function(t){return ul(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,i=yx.findPieceIndex(t,e,!0);if(null!=i)return ul(i,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return null==e?-1:e},fixed:et};function kx(t,e,i){return t?e<=i:e<i}yx.listVisualTypes=function(){var t=[];return A(xx,(function(e,i){t.push(i)})),t},yx.addVisualHandler=function(t,e){xx[t]=e},yx.isValidType=function(t){return xx.hasOwnProperty(t)},yx.eachVisual=function(t,e,i){z(t)?A(t,e,i):e.call(i,t)},yx.mapVisual=function(t,e,i){var n,o=N(t)?[]:z(t)?{}:(n=!0,null);return yx.eachVisual(t,(function(t,a){var r=e.call(i,t,a);n?o=r:o[a]=r})),o},yx.retrieveVisuals=function(t){var e,i={};return t&&mx(xx,(function(n,o){t.hasOwnProperty(o)&&(i[o]=t[o],e=!0)})),e?i:null},yx.prepareVisualTypes=function(t){if(vx(t)){var e=[];mx(t,(function(t,i){e.push(i)})),t=e}else{if(!N(t))return[];t=t.slice()}return t.sort((function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1})),t},yx.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},yx.findPieceIndex=function(t,e,i){for(var n,o=1/0,a=0,r=e.length;a<r;a++){var s=e[a].value;if(null!=s){if(s===t||"string"==typeof s&&s===t+"")return a;i&&c(s,a)}}for(a=0,r=e.length;a<r;a++){var l=e[a],u=l.interval,h=l.close;if(u){if(u[0]===-1/0){if(kx(h[1],t,u[1]))return a}else if(u[1]===1/0){if(kx(h[0],u[0],t))return a}else if(kx(h[0],u[0],t)&&kx(h[1],t,u[1]))return a;i&&c(u[0],a),i&&c(u[1],a)}}if(i)return t===1/0?e.length-1:t===-1/0?0:n;function c(e,i){var a=Math.abs(e-t);a<o&&(o=a,n=i)}};var Px=N,Ox="itemStyle",Nx={seriesType:"treemap",reset:function(t,e,i,n){var o=t.getData().tree,a=o.root,r=t.getModel(Ox);a.isRemoved()||function t(e,i,n,o,a,r){var s=e.getModel(),l=e.getLayout();if(l&&!l.invisible&&l.isInView){var u,h,c=e.getModel(Ox),d=function(t,e,i,n){var o=x({},e);return A(["color","colorAlpha","colorSaturation"],(function(a){var r=t.get(a,!0);null==r&&i&&(r=i[a]),null==r&&(r=e[a]),null==r&&(r=n.get(a)),null!=r&&(o[a]=r)})),o}(c,i,n[e.depth],o),f=c.get("borderColor"),p=c.get("borderColorSaturation");null!=p&&(f=null!=(h=u=Ex(d))?Ge(h,null,null,p):null),e.setVisual("borderColor",f);var g=e.viewChildren;if(g&&g.length){var m=function(t,e,i,n,o,a){if(a&&a.length){var r=zx(e,"color")||null!=o.color&&"none"!==o.color&&(zx(e,"colorAlpha")||zx(e,"colorSaturation"));if(r){var s=e.get("visualMin"),l=e.get("visualMax"),u=i.dataExtent.slice();null!=s&&s<u[0]&&(u[0]=s),null!=l&&l>u[1]&&(u[1]=l);var h=e.get("colorMappingBy"),c={type:r.name,dataExtent:u,visual:r.range};"color"!==c.type||"index"!==h&&"id"!==h?c.mappingMethod="linear":(c.mappingMethod="category",c.loop=!0);var d=new yx(c);return d.__drColorMappingBy=h,d}}}(0,s,l,0,d,g);A(g,(function(e,i){if(e.depth>=a.length||e===a[e.depth]){var l=function(t,e,i,n,o,a){var r=x({},e);if(o){var s=o.type,l="color"===s&&o.__drColorMappingBy,u="index"===l?n:"id"===l?a.mapIdToIndex(i.getId()):i.getValue(t.get("visualDimension"));r[s]=o.mapValueToVisual(u)}return r}(s,d,e,i,m,r);t(e,l,n,o,a,r)}}))}else u=Ex(d),e.setVisual("color",u)}}(a,{},D(o.levelModels,(function(t){return t?t.get(Ox):null})),r,t.getViewRoot().getAncestors(),t)}};function Ex(t){var e=Rx(t,"color");if(e){var i=Rx(t,"colorAlpha"),n=Rx(t,"colorSaturation");return n&&(e=Ge(e,null,null,n)),i&&(e=Fe(e,i)),e}}function Rx(t,e){var i=t[e];if(null!=i&&"none"!==i)return i}function zx(t,e){var i=t.get(e);return Px(i)&&i.length?{name:e,range:i}:null}var Bx=Math.max,Vx=Math.min,Gx=W,Fx=A,Wx=["itemStyle","borderWidth"],Hx=["itemStyle","gapWidth"],Zx=["upperLabel","show"],Ux=["upperLabel","height"],Xx={seriesType:"treemap",reset:function(t,e,i,n){var o=i.getWidth(),a=i.getHeight(),r=t.option,s=ql(t.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()}),l=r.size||[],u=hl(Gx(s.width,l[0]),o),h=hl(Gx(s.height,l[1]),a),c=n&&n.type,d=Ky(n,["treemapZoomToNode","treemapRootToNode"],t),f="treemapRender"===c||"treemapMove"===c?n.rootRect:null,p=t.getViewRoot(),g=$y(p);if("treemapMove"!==c){var m="treemapZoomToNode"===c?function(t,e,i,n,o){var a,r=(e||{}).node,s=[n,o];if(!r||r===i)return s;for(var l=n*o,u=l*t.option.zoomToNodeRatio;a=r.parentNode;){for(var h=0,c=a.children,d=0,f=c.length;d<f;d++)h+=c[d].getValue();var p=r.getValue();if(0===p)return s;u*=h/p;var g=a.getModel(),m=g.get(Wx);u+=4*m*m+(3*m+Math.max(m,Kx(g)))*Math.pow(u,.5),vl<u&&(u=vl),r=a}u<l&&(u=l);var v=Math.pow(u/l,.5);return[n*v,o*v]}(t,d,p,u,h):f?[f.width,f.height]:[u,h],v=r.sort;v&&"asc"!==v&&"desc"!==v&&(v="desc");var y={squareRatio:r.squareRatio,sort:v,leafDepth:r.leafDepth};p.hostTree.clearLayouts();var _={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};p.setLayout(_),function t(e,i,n,o){var a,r;if(!e.isRemoved()){var s=e.getLayout();a=s.width,r=s.height;var l=(p=e.getModel()).get(Wx),u=p.get(Hx)/2,h=Kx(p),c=Math.max(l,h),d=l-u,f=c-u,p=e.getModel();e.setLayout({borderWidth:l,upperHeight:c,upperLabelHeight:h},!0);var g=(a=Bx(a-2*d,0))*(r=Bx(r-d-f,0)),m=Yx(e,p,g,i,n,o);if(m.length){var v={x:d,y:f,width:a,height:r},y=Vx(a,r),x=1/0,_=[];_.area=0;for(var w=0,b=m.length;w<b;){var S=m[w];_.push(S),_.area+=S.getLayout().area;var M=jx(_,y,i.squareRatio);x=M<=x?(w++,M):(_.area-=_.pop().getLayout().area,qx(_,y,v,u,!1),y=Vx(v.width,v.height),_.length=_.area=0,1/0)}if(_.length&&qx(_,y,v,u,!0),!n){var I=p.get("childrenVisibleMin");null!=I&&g<I&&(n=!0)}for(w=0,b=m.length;w<b;w++)t(m[w],i,n,o+1)}}}(p,y,!1,0),_=p.getLayout(),Fx(g,(function(t,e){var i=(g[e+1]||p).getValue();t.setLayout(x({dataExtent:[i,i],borderWidth:0,upperHeight:0},_))}))}var w=t.getData().tree.root;w.setLayout(function(t,e,i){if(e)return{x:e.x,y:e.y};var n={x:0,y:0};if(!i)return n;var o=i.node,a=o.getLayout();if(!a)return n;for(var r=[a.width/2,a.height/2],s=o;s;){var l=s.getLayout();r[0]+=l.x,r[1]+=l.y,s=s.parentNode}return{x:t.width/2-r[0],y:t.height/2-r[1]}}(s,f,d),!0),t.setLayoutInfo(s),function t(e,i,n,o,a){var r=e.getLayout(),s=n[a],l=s&&s===e;if(!(s&&!l||a===n.length&&e!==o)){e.setLayout({isInView:!0,invisible:!l&&!i.intersect(r),isAboveViewRoot:l},!0);var u=new vi(i.x-r.x,i.y-r.y,i.width,i.height);Fx(e.viewChildren||[],(function(e){t(e,u,n,o,a+1)}))}}(w,new vi(-s.x,-s.y,o,a),g,p,0)}};function Yx(t,e,i,n,o,a){var r=t.children||[],s=n.sort;"asc"!==s&&"desc"!==s&&(s=null);var l=null!=n.leafDepth&&n.leafDepth<=a;if(o&&!l)return t.viewChildren=[];!function(t,e){e&&t.sort((function(t,i){var n="asc"===e?t.getValue()-i.getValue():i.getValue()-t.getValue();return 0==n?"asc"===e?t.dataIndex-i.dataIndex:i.dataIndex-t.dataIndex:n}))}(r=L(r,(function(t){return!t.isRemoved()})),s);var u=function(t,e,i){for(var n=0,o=0,a=e.length;o<a;o++)n+=e[o].getValue();var r=t.get("visualDimension");if(e&&e.length)if("value"===r&&i)s=[e[e.length-1].getValue(),e[0].getValue()],"asc"===i&&s.reverse();else{var s=[1/0,-1/0];Fx(e,(function(t){var e=t.getValue(r);e<s[0]&&(s[0]=e),e>s[1]&&(s[1]=e)}))}else s=[NaN,NaN];return{sum:n,dataExtent:s}}(e,r,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=function(t,e,i,n,o){if(!n)return i;for(var a=t.get("visibleMin"),r=o.length,s=r,l=r-1;0<=l;l--){var u=o["asc"===n?r-l-1:l].getValue();u/i*e<a&&(s=l,i-=u)}return o.splice("asc"===n?0:s,r-s),i}(e,i,u.sum,s,r),0===u.sum)return t.viewChildren=[];for(var h=0,c=r.length;h<c;h++){var d=r[h].getValue()/u.sum*i;r[h].setLayout({area:d})}return l&&(r.length&&t.setLayout({isLeafRoot:!0},!0),r.length=0),t.viewChildren=r,t.setLayout({dataExtent:u.dataExtent},!0),r}function jx(t,e,i){for(var n,o=0,a=1/0,r=0,s=t.length;r<s;r++)(n=t[r].getLayout().area)&&(n<a&&(a=n),o<n&&(o=n));var l=t.area*t.area,u=e*e*i;return l?Bx(u*o/l,l/(u*a)):1/0}function qx(t,e,i,n,o){var a=e===i.width?0:1,r=1-a,s=["x","y"],l=["width","height"],u=i[s[a]],h=e?t.area/e:0;(o||h>i[l[r]])&&(h=i[l[r]]);for(var c=0,d=t.length;c<d;c++){var f=t[c],p={},g=h?f.getLayout().area/h:0,m=p[l[r]]=Bx(h-2*n,0),v=i[s[a]]+i[l[a]]-u,y=c===d-1||v<g?v:g,x=p[l[a]]=Bx(y-2*n,0);p[s[r]]=i[s[r]]+Vx(n,m/2),p[s[a]]=u+Vx(n,x/2),u+=y,f.setLayout(p,!0)}i[s[r]]+=h,i[l[r]]-=h}function Kx(t){return t.get(Zx)?t.get(Ux):0}function $x(t){return"_EC_"+t}function Jx(t){this._directed=t||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={}}Zd(Nx),Hd(Xx);var Qx=Jx.prototype;function t_(t,e){this.id=null==t?"":t,this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=null==e?-1:e}function e_(t,e,i){this.node1=t,this.node2=e,this.dataIndex=null==i?-1:i}function i_(t,e){return{getValue:function(i){var n=this[t][e];return n.get(n.getDimension(i||"value"),this.dataIndex)},setVisual:function(i,n){0<=this.dataIndex&&this[t][e].setItemVisual(this.dataIndex,i,n)},getVisual:function(i,n){return this[t][e].getItemVisual(this.dataIndex,i,n)},setLayout:function(i,n){0<=this.dataIndex&&this[t][e].setItemLayout(this.dataIndex,i,n)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}}function n_(t,e,i,n,o){for(var a=new Jx(n),r=0;r<t.length;r++)a.addNode(W(t[r].id,t[r].name,r),r);var s=[],l=[],u=0;for(r=0;r<e.length;r++){var h=e[r],c=h.source,d=h.target;a.addEdge(c,d,u)&&(l.push(h),s.push(W(h.id,c+" > "+d)),u++)}var f,p=i.get("coordinateSystem");if("cartesian2d"===p||"polar"===p)f=Rf(t,i);else{var g=Pu.get(p),m=g&&"view"!==g.type&&g.dimensions||[];S(m,"value")<0&&m.concat(["value"]);var v=Cf(t,{coordDimensions:m});(f=new gf(v,i)).initData(t)}var y=new gf(["value"],i);return y.initData(l,s),o&&o(f,y),Ay({mainData:f,struct:a,structAttr:"graph",datas:{node:f,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}Qx.type="graph",Qx.isDirected=function(){return this._directed},Qx.addNode=function(t,e){var i=this._nodesMap;if(!i[$x(t=null==t?""+e:""+t)]){var n=new t_(t,e);return(n.hostGraph=this).nodes.push(n),i[$x(t)]=n}},Qx.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},Qx.getNodeById=function(t){return this._nodesMap[$x(t)]},Qx.addEdge=function(t,e,i){var n=this._nodesMap,o=this._edgesMap;if("number"==typeof t&&(t=this.nodes[t]),"number"==typeof e&&(e=this.nodes[e]),t_.isInstance(t)||(t=n[$x(t)]),t_.isInstance(e)||(e=n[$x(e)]),t&&e){var a=t.id+"-"+e.id;if(!o[a]){var r=new e_(t,e,i);return(r.hostGraph=this)._directed&&(t.outEdges.push(r),e.inEdges.push(r)),t.edges.push(r),t!==e&&e.edges.push(r),this.edges.push(r),o[a]=r}}},Qx.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},Qx.getEdge=function(t,e){t_.isInstance(t)&&(t=t.id),t_.isInstance(e)&&(e=e.id);var i=this._edgesMap;return this._directed?i[t+"-"+e]:i[t+"-"+e]||i[e+"-"+t]},Qx.eachNode=function(t,e){for(var i=this.nodes,n=i.length,o=0;o<n;o++)0<=i[o].dataIndex&&t.call(e,i[o],o)},Qx.eachEdge=function(t,e){for(var i=this.edges,n=i.length,o=0;o<n;o++)0<=i[o].dataIndex&&0<=i[o].node1.dataIndex&&0<=i[o].node2.dataIndex&&t.call(e,i[o],o)},Qx.breadthFirstTraverse=function(t,e,i,n){if(t_.isInstance(e)||(e=this._nodesMap[$x(e)]),e){for(var o="out"===i?"outEdges":"in"===i?"inEdges":"edges",a=0;a<this.nodes.length;a++)this.nodes[a].__visited=!1;if(!t.call(n,e,null))for(var r=[e];r.length;){var s=r.shift(),l=s[o];for(a=0;a<l.length;a++){var u=l[a],h=u.node1===s?u.node2:u.node1;if(!h.__visited){if(t.call(n,h,s))return;r.push(h),h.__visited=!0}}}}},Qx.update=function(){for(var t=this.data,e=this.edgeData,i=this.nodes,n=this.edges,o=0,a=i.length;o<a;o++)i[o].dataIndex=-1;for(o=0,a=t.count();o<a;o++)i[t.getRawIndex(o)].dataIndex=o;for(e.filterSelf((function(t){var i=n[e.getRawIndex(t)];return 0<=i.node1.dataIndex&&0<=i.node2.dataIndex})),o=0,a=n.length;o<a;o++)n[o].dataIndex=-1;for(o=0,a=e.count();o<a;o++)n[e.getRawIndex(o)].dataIndex=o},Qx.clone=function(){for(var t=new Jx(this._directed),e=this.nodes,i=this.edges,n=0;n<e.length;n++)t.addNode(e[n].id,e[n].dataIndex);for(n=0;n<i.length;n++){var o=i[n];t.addEdge(o.node1.id,o.node2.id,o.dataIndex)}return t},t_.prototype={constructor:t_,degree:function(){return this.edges.length},inDegree:function(){return this.inEdges.length},outDegree:function(){return this.outEdges.length},getModel:function(t){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(t)}},e_.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(t)},I(t_,i_("hostGraph","data")),I(e_,i_("hostGraph","edgeData")),Jx.Node=t_,Jx.Edge=e_,Wo(t_),Wo(e_);var o_=qd({type:"series.graph",init:function(t){o_.superApply(this,"init",arguments);var e=this;function i(){return e._categoriesData}this.legendVisualProvider=new av(i,i),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){o_.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){o_.superApply(this,"mergeDefaultAndTheme",arguments),So(t,["edgeLabel"],["show"])},getInitialData:function(t,e){var i=t.edges||t.links||[],n=t.data||t.nodes||[],o=this;if(n&&i)return n_(n,i,this,!0,(function(t,i){t.wrapMethod("getItemModel",(function(t){var e=o._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t}));var n=o.getModel("edgeLabel"),a=new ol({label:n.option},n.parentModel,e),r=o.getModel("emphasis.edgeLabel"),s=new ol({emphasis:{label:r.option}},r.parentModel,e);function l(t){return(t=this.parsePath(t))&&"label"===t[0]?a:t&&"emphasis"===t[0]&&"label"===t[1]?s:this.parentModel}i.wrapMethod("getItemModel",(function(t){return t.customizeGetParent(l),t}))})).data},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,i){if("edge"!==i)return o_.superApply(this,"formatTooltip",arguments);var n=this.getData(),o=this.getDataParams(t,i),a=n.graph.getEdgeByIndex(t),r=n.getName(a.node1.dataIndex),s=n.getName(a.node2.dataIndex),l=[];return null!=r&&l.push(r),null!=s&&l.push(s),l=Ol(l.join(" > ")),o.value&&(l+=" : "+Ol(o.value)),l},_updateCategoriesData:function(){var t=D(this.option.categories||[],(function(t){return null!=t.value?t:x({value:0},t)})),e=new gf(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray((function(t){return e.getItemModel(t,!0)}))},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},isAnimationEnabled:function(){return o_.superCall(this,"isAnimationEnabled")&&!("force"===this.get("layout")&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle"},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{label:{show:!0}}}}),a_=Vr.prototype,r_=Hr.prototype;function s_(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}var l_=os({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){this[s_(e)?"_buildPathLine":"_buildPathCurve"](t,e)},_buildPathLine:a_.buildPath,_buildPathCurve:r_.buildPath,pointAt:function(t){return this[s_(this.shape)?"_pointAtLine":"_pointAtCurve"](t)},_pointAtLine:a_.pointAt,_pointAtCurve:r_.pointAt,tangentAt:function(t){var e=this.shape,i=s_(e)?[e.x2-e.x1,e.y2-e.y1]:this._tangentAtCurve(t);return pt(i,i)},_tangentAtCurve:r_.tangentAt}),u_=["fromSymbol","toSymbol"];function h_(t){return"_"+t+"Type"}function c_(t,e,i){var n=e.getItemVisual(i,"color"),o=e.getItemVisual(i,t),a=e.getItemVisual(i,t+"Size");if(o&&"none"!==o){N(a)||(a=[a,a]);var r=Fp(o,-a[0]/2,-a[1]/2,a[0],a[1],n);return r.name=t,r}}function d_(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;var i=e[2];i?(t.cpx1=i[0],t.cpy1=i[1]):(t.cpx1=NaN,t.cpy1=NaN)}function f_(t,e,i){yi.call(this),this._createLine(t,e,i)}var p_=f_.prototype;function g_(t){this._ctor=t||f_,this.group=new yi}p_.beforeUpdate=function(){var t=this.childOfName("fromSymbol"),e=this.childOfName("toSymbol"),i=this.childOfName("label");if(t||e||!i.ignore){for(var n=1,o=this.parent;o;)o.scale&&(n/=o.scale[0]),o=o.parent;var a=this.childOfName("line");if(this.__dirty||a.__dirty){var r=a.shape.percent,s=a.pointAt(0),l=a.pointAt(r),u=ht([],l,s);if(pt(u,u),t){t.attr("position",s);var h=a.tangentAt(0);t.attr("rotation",Math.PI/2-Math.atan2(h[1],h[0])),t.attr("scale",[n*r,n*r])}if(e&&(e.attr("position",l),h=a.tangentAt(1),e.attr("rotation",-Math.PI/2-Math.atan2(h[1],h[0])),e.attr("scale",[n*r,n*r])),!i.ignore){var c,d,f;i.attr("position",l);var p=5*n;if("end"===i.__position)c=[u[0]*p+l[0],u[1]*p+l[1]],d=.8<u[0]?"left":u[0]<-.8?"right":"center",f=.8<u[1]?"top":u[1]<-.8?"bottom":"middle";else if("middle"===i.__position){var g=r/2,m=[(h=a.tangentAt(g))[1],-h[0]],v=a.pointAt(g);0<m[1]&&(m[0]=-m[0],m[1]=-m[1]),c=[v[0]+m[0]*p,v[1]+m[1]*p],d="center",f="bottom";var y=-Math.atan2(h[1],h[0]);l[0]<s[0]&&(y=Math.PI+y),i.attr("rotation",y)}else c=[-u[0]*p+s[0],-u[1]*p+s[1]],d=.8<u[0]?"right":u[0]<-.8?"left":"center",f=.8<u[1]?"bottom":u[1]<-.8?"top":"middle";i.attr({style:{textVerticalAlign:i.__verticalAlign||f,textAlign:i.__textAlign||d},position:c,scale:[n,n]})}}}},p_._createLine=function(t,e,i){var n=t.hostModel,o=function(t){var e=new l_({name:"line",subPixelOptimize:!0});return d_(e.shape,t),e}(t.getItemLayout(e));o.shape.percent=0,Fs(o,{shape:{percent:1}},n,e),this.add(o);var a=new br({name:"label",lineLabelOriginalOpacity:1});this.add(a),A(u_,(function(i){var n=c_(i,t,e);this.add(n),this[h_(i)]=t.getItemVisual(e,i)}),this),this._updateCommonStl(t,e,i)},p_.updateData=function(t,e,i){var n=t.hostModel,o=this.childOfName("line"),a=t.getItemLayout(e),r={shape:{}};d_(r.shape,a),Gs(o,r,n,e),A(u_,(function(i){var n=t.getItemVisual(e,i),o=h_(i);if(this[o]!==n){this.remove(this.childOfName(i));var a=c_(i,t,e);this.add(a)}this[o]=n}),this),this._updateCommonStl(t,e,i)},p_._updateCommonStl=function(t,e,i){var n=t.hostModel,o=this.childOfName("line"),a=i&&i.lineStyle,r=i&&i.hoverLineStyle,s=i&&i.labelModel,l=i&&i.hoverLabelModel;if(!i||t.hasItemOption){var u=t.getItemModel(e);a=u.getModel("lineStyle").getLineStyle(),r=u.getModel("emphasis.lineStyle").getLineStyle(),s=u.getModel("label"),l=u.getModel("emphasis.label")}var h=t.getItemVisual(e,"color"),c=Z(t.getItemVisual(e,"opacity"),a.opacity,1);o.useStyle(_({strokeNoScale:!0,fill:"none",stroke:h,opacity:c},a)),o.hoverStyle=r,A(u_,(function(t){var e=this.childOfName(t);e&&(e.setColor(h),e.setStyle({opacity:c}))}),this);var d,f,p=s.getShallow("show"),g=l.getShallow("show"),m=this.childOfName("label");if((p||g)&&(d=h||"#000",null==(f=n.getFormattedLabel(e,"normal",t.dataType)))){var v=n.getRawValue(e);f=null==v?t.getName(e):isFinite(v)?cl(v):v}var y=p?f:null,x=g?H(n.getFormattedLabel(e,"emphasis",t.dataType),f):null,w=m.style;null==y&&null==x||(Ps(m.style,s,{text:y},{autoColor:d}),m.__textAlign=w.textAlign,m.__verticalAlign=w.textVerticalAlign,m.__position=s.get("position")||"middle"),m.hoverStyle=null!=x?{text:x,textFill:l.getTextColor(!0),fontStyle:l.getShallow("fontStyle"),fontWeight:l.getShallow("fontWeight"),fontSize:l.getShallow("fontSize"),fontFamily:l.getShallow("fontFamily")}:{text:null},m.ignore=!p&&!g,Ts(this)},p_.highlight=function(){this.trigger("emphasis")},p_.downplay=function(){this.trigger("normal")},p_.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},p_.setLinePoints=function(t){var e=this.childOfName("line");d_(e.shape,t),e.dirty()},M(f_,yi);var m_=g_.prototype;function v_(t){var e=t.hostModel;return{lineStyle:e.getModel("lineStyle").getLineStyle(),hoverLineStyle:e.getModel("emphasis.lineStyle").getLineStyle(),labelModel:e.getModel("label"),hoverLabelModel:e.getModel("emphasis.label")}}function y_(t){return isNaN(t[0])||isNaN(t[1])}function x_(t){return!y_(t[0])&&!y_(t[1])}function __(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var i=t.option.nodeScaleRatio,n=e.scale,o=n&&n[0]||1;return((e.getZoom()-1)*i+1)/o}function w_(t){var e=t.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}m_.isPersistent=function(){return!0},m_.updateData=function(t){var e=this,i=e.group,n=e._lineData;e._lineData=t,n||i.removeAll();var o=v_(t);t.diff(n).add((function(i){!function(t,e,i,n){if(x_(e.getItemLayout(i))){var o=new t._ctor(e,i,n);e.setItemGraphicEl(i,o),t.group.add(o)}}(e,t,i,o)})).update((function(i,a){!function(t,e,i,n,o,a){var r=e.getItemGraphicEl(n);if(!x_(i.getItemLayout(o)))return t.group.remove(r);r?r.updateData(i,o,a):r=new t._ctor(i,o,a),i.setItemGraphicEl(o,r),t.group.add(r)}(e,n,t,a,i,o)})).remove((function(t){i.remove(n.getItemGraphicEl(t))})).execute()},m_.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl((function(e,i){e.updateLayout(t,i)}),this)},m_.incrementalPrepareUpdate=function(t){this._seriesScope=v_(t),this._lineData=null,this.group.removeAll()},m_.incrementalUpdate=function(t,e){function i(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}for(var n=t.start;n<t.end;n++)if(x_(e.getItemLayout(n))){var o=new this._ctor(e,n,this._seriesScope);o.traverse(i),this.group.add(o),e.setItemGraphicEl(n,o)}},m_.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},m_._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var b_=[],S_=[],M_=[],I_=ua,T_=yt,A_=Math.abs;function D_(t,e,i){for(var n,o=t[0],a=t[1],r=t[2],s=1/0,l=i*i,u=.1,h=.1;h<=.9;h+=.1)b_[0]=I_(o[0],a[0],r[0],h),b_[1]=I_(o[1],a[1],r[1],h),(f=A_(T_(b_,e)-l))<s&&(s=f,n=h);for(var c=0;c<32;c++){var d=n+u;S_[0]=I_(o[0],a[0],r[0],n),S_[1]=I_(o[1],a[1],r[1],n),M_[0]=I_(o[0],a[0],r[0],d),M_[1]=I_(o[1],a[1],r[1],d);var f=T_(S_,e)-l;if(A_(f)<.01)break;var p=T_(M_,e)-l;u/=2,f<0?0<=p?n+=u:n-=u:0<=p?n-=u:n+=u}return n}function C_(t,e){var i=[],n=da,o=[[],[],[]],a=[[],[]],r=[];e/=2,t.eachEdge((function(t,s){var l=t.getLayout(),u=t.getVisual("fromSymbol"),h=t.getVisual("toSymbol");l.__original||(l.__original=[rt(l[0]),rt(l[1])],l[2]&&l.__original.push(rt(l[2])));var c=l.__original;if(null!=l[2]){if(at(o[0],c[0]),at(o[1],c[2]),at(o[2],c[1]),u&&"none"!==u){var d=w_(t.node1),f=D_(o,c[0],d*e);n(o[0][0],o[1][0],o[2][0],f,i),o[0][0]=i[3],o[1][0]=i[4],n(o[0][1],o[1][1],o[2][1],f,i),o[0][1]=i[3],o[1][1]=i[4]}h&&"none"!==h&&(d=w_(t.node2),f=D_(o,c[1],d*e),n(o[0][0],o[1][0],o[2][0],f,i),o[1][0]=i[1],o[2][0]=i[2],n(o[0][1],o[1][1],o[2][1],f,i),o[1][1]=i[1],o[2][1]=i[2]),at(l[0],o[0]),at(l[1],o[2]),at(l[2],o[1])}else at(a[0],c[0]),at(a[1],c[1]),ht(r,a[1],a[0]),pt(r,r),u&&"none"!==u&&(d=w_(t.node1),ut(a[0],a[0],r,d*e)),h&&"none"!==h&&(d=w_(t.node2),ut(a[1],a[1],r,-d*e)),at(l[0],a[0]),at(l[1],a[1])}))}var L_="__focusNodeAdjacency",k_="__unfocusNodeAdjacency",P_=["itemStyle","opacity"],O_=["lineStyle","opacity"];function N_(t,e){var i=t.getVisual("opacity");return null!=i?i:t.getModel().get(e)}function E_(t,e,i){var n=t.getGraphicEl(),o=N_(t,e);null!=i&&(null==o&&(o=1),o*=i),n.downplay&&n.downplay(),n.traverse((function(t){if(!t.isGroup){var e=t.lineLabelOriginalOpacity;null!=e&&null==i||(e=o),t.setStyle("opacity",e)}}))}function R_(t,e){var i=N_(t,e),n=t.getGraphicEl();n.traverse((function(t){t.isGroup||t.setStyle("opacity",i)})),n.highlight&&n.highlight()}function z_(t){return t instanceof Array||(t=[t,t]),t}function B_(t){var e=t.coordinateSystem;if(!e||"view"===e.type){var i=t.getGraph();i.eachNode((function(t){var e=t.getModel();t.setLayout([+e.get("x"),+e.get("y")])})),V_(i)}}function V_(t){t.eachEdge((function(t){var e=t.getModel().get("lineStyle.curveness")||0,i=rt(t.node1.getLayout()),n=rt(t.node2.getLayout()),o=[i,n];+e&&o.push([(i[0]+n[0])/2-(i[1]-n[1])*e,(i[1]+n[1])/2-(n[0]-i[0])*e]),t.setLayout(o)}))}Kd({type:"graph",init:function(t,e){var i=new yg,n=new g_,o=this.group;this._controller=new jv(e.getZr()),this._controllerHost={target:o},o.add(i.group),o.add(n.group),this._symbolDraw=i,this._lineDraw=n,this._firstRender=!0},render:function(t,e,i){var n=this,o=t.coordinateSystem;this._model=t;var a=this._symbolDraw,r=this._lineDraw,s=this.group;if("view"===o.type){var l={position:o.position,scale:o.scale};this._firstRender?s.attr(l):Gs(s,l,t)}C_(t.getGraph(),__(t));var u=t.getData();a.updateData(u);var h=t.getEdgeData();r.updateData(h),this._updateNodeAndLinkScale(),this._updateController(t,e,i),clearTimeout(this._layoutTimeout);var c=t.forceLayout,d=t.get("force.layoutAnimation");c&&this._startForceLayoutIteration(c,d),u.eachItemGraphicEl((function(e,o){var a=u.getItemModel(o);e.off("drag").off("dragend");var r=a.get("draggable");r&&e.on("drag",(function(){c&&(c.warmUp(),this._layouting||this._startForceLayoutIteration(c,d),c.setFixed(o),u.setItemLayout(o,e.position))}),this).on("dragend",(function(){c&&c.setUnfixed(o)}),this),e.setDraggable(r&&c),e[L_]&&e.off("mouseover",e[L_]),e[k_]&&e.off("mouseout",e[k_]),a.get("focusNodeAdjacency")&&(e.on("mouseover",e[L_]=function(){n._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,dataIndex:e.dataIndex})}),e.on("mouseout",e[k_]=function(){n._dispatchUnfocus(i)}))}),this),u.graph.eachEdge((function(e){var o=e.getGraphicEl();o[L_]&&o.off("mouseover",o[L_]),o[k_]&&o.off("mouseout",o[k_]),e.getModel().get("focusNodeAdjacency")&&(o.on("mouseover",o[L_]=function(){n._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,edgeDataIndex:e.dataIndex})}),o.on("mouseout",o[k_]=function(){n._dispatchUnfocus(i)}))}));var f="circular"===t.get("layout")&&t.get("circular.rotateLabel"),p=u.getLayout("cx"),g=u.getLayout("cy");u.eachItemGraphicEl((function(t,e){var i=u.getItemModel(e).get("label.rotate")||0,n=t.getSymbolPath();if(f){var o=u.getItemLayout(e),a=Math.atan2(o[1]-g,o[0]-p);a<0&&(a=2*Math.PI+a);var r=o[0]<p;r&&(a-=Math.PI);var s=r?"left":"right";ks(n,{textRotation:-a,textPosition:s,textOrigin:"center"},{textPosition:s})}else ks(n,{textRotation:i*=Math.PI/180})})),this._firstRender=!1},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={},this._clearTimer()},_dispatchUnfocus:function(t,e){var i=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout((function(){i._unfocusDelayTimer=null,t.dispatchAction({type:"unfocusNodeAdjacency",seriesId:i._model.id})}),500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(t,e,i,n){var o=this._model.getData().graph,a=n.edgeDataIndex,r=o.getNodeByIndex(n.dataIndex),s=o.getEdgeByIndex(a);(r||s)&&(o.eachNode((function(t){E_(t,P_,.1)})),o.eachEdge((function(t){E_(t,O_,.1)})),r&&(R_(r,P_),A(r.edges,(function(t){t.dataIndex<0||(R_(t,O_),R_(t.node1,P_),R_(t.node2,P_))}))),s&&(R_(s,O_),R_(s.node1,P_),R_(s.node2,P_)))},unfocusNodeAdjacency:function(t,e,i,n){var o=this._model.getData().graph;o.eachNode((function(t){E_(t,P_)})),o.eachEdge((function(t){E_(t,O_)}))},_startForceLayoutIteration:function(t,e){var i=this;!function n(){t.step((function(t){i.updateLayout(i._model),(i._layouting=!t)&&(e?i._layoutTimeout=setTimeout(n,16):n())}))}()},_updateController:function(t,e,i){var n=this._controller,o=this._controllerHost,a=this.group;n.setPointerChecker((function(e,n,o){var r=a.getBoundingRect();return r.applyTransform(a.transform),r.contain(n,o)&&!ry(e,i,t)})),"view"===t.coordinateSystem.type?(n.enable(t.get("roam")),o.zoomLimit=t.get("scaleLimit"),o.zoom=t.coordinateSystem.getZoom(),n.off("pan").off("zoom").on("pan",(function(e){ny(o,e.dx,e.dy),i.dispatchAction({seriesId:t.id,type:"graphRoam",dx:e.dx,dy:e.dy})})).on("zoom",(function(e){oy(o,e.scale,e.originX,e.originY),i.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:e.scale,originX:e.originX,originY:e.originY}),this._updateNodeAndLinkScale(),C_(t.getGraph(),__(t)),this._lineDraw.updateLayout()}),this)):n.disable()},_updateNodeAndLinkScale:function(){var t=this._model,e=t.getData(),i=__(t),n=[i,i];e.eachItemGraphicEl((function(t,e){t.attr("scale",n)}))},updateLayout:function(t){C_(t.getGraph(),__(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()}}),Fd({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},(function(){})),Fd({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},(function(){})),Fd({type:"graphRoam",event:"graphRoam",update:"none"},(function(t,e){e.eachComponent({mainType:"series",query:t},(function(e){var i=py(e.coordinateSystem,t);e.setCenter&&e.setCenter(i.center),e.setZoom&&e.setZoom(i.zoom)}))}));var G_=Math.PI,F_=[];function W_(t,e){var i=t.coordinateSystem;if(!i||"view"===i.type){var n=i.getBoundingRect(),o=t.getData(),a=o.graph,r=n.width/2+n.x,s=n.height/2+n.y,l=Math.min(n.width,n.height)/2,u=o.count();o.setLayout({cx:r,cy:s}),u&&(H_[e](t,i,a,o,l,r,s,u),a.eachEdge((function(t){var e,i=t.getModel().get("lineStyle.curveness")||0,n=rt(t.node1.getLayout()),o=rt(t.node2.getLayout());+i&&(e=[r*(i*=3)+(n[0]+o[0])/2*(1-i),s*i+(n[1]+o[1])/2*(1-i)]),t.setLayout([n,o,e])})))}}var H_={value:function(t,e,i,n,o,a,r,s){var l=0,u=n.getSum("value"),h=2*Math.PI/(u||s);i.eachNode((function(t){var e=t.getValue("value"),i=h*(u?e:1)/2;l+=i,t.setLayout([o*Math.cos(l)+a,o*Math.sin(l)+r]),l+=i}))},symbolSize:function(t,e,i,n,o,a,r,s){var l=0;F_.length=s;var u=__(t);i.eachNode((function(t){var e=w_(t);isNaN(e)&&(e=2),e<0&&(e=0),e*=u;var i=Math.asin(e/2/o);isNaN(i)&&(i=G_/2),F_[t.dataIndex]=i,l+=2*i}));var h=(2*G_-l)/s/2,c=0;i.eachNode((function(t){var e=h+F_[t.dataIndex];c+=e,t.setLayout([o*Math.cos(c)+a,o*Math.sin(c)+r]),c+=e}))}},Z_=ut;Gd((function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.eachSeriesByType("graph",(function(t){var i=t.getCategoriesData(),n=t.getGraph().data,o=i.mapArray(i.getName);n.filterSelf((function(t){var i=n.getItemModel(t).getShallow("category");if(null!=i){"number"==typeof i&&(i=o[i]);for(var a=0;a<e.length;a++)if(!e[a].isSelected(i))return!1}return!0}))}),this)})),Zd(Zg("graph","circle",null)),Zd((function(t){var e={};t.eachSeriesByType("graph",(function(t){var i=t.getCategoriesData(),n=t.getData(),o={};i.each((function(n){var a=i.getName(n);o["ec-"+a]=n;var r=i.getItemModel(n),s=r.get("itemStyle.color")||t.getColorFromPalette(a,e);i.setItemVisual(n,"color",s);for(var l=["opacity","symbol","symbolSize","symbolKeepAspect"],u=0;u<l.length;u++){var h=r.getShallow(l[u],!0);null!=h&&i.setItemVisual(n,l[u],h)}})),i.count()&&n.each((function(t){var e=n.getItemModel(t).getShallow("category");if(null!=e){"string"==typeof e&&(e=o["ec-"+e]);for(var a=["color","opacity","symbol","symbolSize","symbolKeepAspect"],r=0;r<a.length;r++)null==n.getItemVisual(t,a[r],!0)&&n.setItemVisual(t,a[r],i.getItemVisual(e,a[r]))}}))}))})),Zd((function(t){t.eachSeriesByType("graph",(function(t){var e=t.getGraph(),i=t.getEdgeData(),n=z_(t.get("edgeSymbol")),o=z_(t.get("edgeSymbolSize")),a="lineStyle.color".split("."),r="lineStyle.opacity".split(".");i.setVisual("fromSymbol",n&&n[0]),i.setVisual("toSymbol",n&&n[1]),i.setVisual("fromSymbolSize",o&&o[0]),i.setVisual("toSymbolSize",o&&o[1]),i.setVisual("color",t.get(a)),i.setVisual("opacity",t.get(r)),i.each((function(t){var n=i.getItemModel(t),o=e.getEdgeByIndex(t),s=z_(n.getShallow("symbol",!0)),l=z_(n.getShallow("symbolSize",!0)),u=n.get(a),h=n.get(r);switch(u){case"source":u=o.node1.getVisual("color");break;case"target":u=o.node2.getVisual("color")}s[0]&&o.setVisual("fromSymbol",s[0]),s[1]&&o.setVisual("toSymbol",s[1]),l[0]&&o.setVisual("fromSymbolSize",l[0]),l[1]&&o.setVisual("toSymbolSize",l[1]),o.setVisual("color",u),o.setVisual("opacity",h)}))}))})),Hd((function(t,e){t.eachSeriesByType("graph",(function(t){var e=t.get("layout"),i=t.coordinateSystem;if(i&&"view"!==i.type){var n=t.getData(),o=[];A(i.dimensions,(function(t){o=o.concat(n.mapDimension(t,!0))}));for(var a=0;a<n.count();a++){for(var r=[],s=!1,l=0;l<o.length;l++){var u=n.get(o[l],a);isNaN(u)||(s=!0),r.push(u)}n.setItemLayout(a,s?i.dataToPoint(r):[NaN,NaN])}V_(n.graph)}else e&&"none"!==e||B_(t)}))})),Hd(Jc.VISUAL.POST_CHART_LAYOUT,(function(t){t.eachSeriesByType("graph",(function(t){"circular"===t.get("layout")&&W_(t,"symbolSize")}))})),Hd((function(t){t.eachSeriesByType("graph",(function(t){if(!(c=t.coordinateSystem)||"view"===c.type)if("force"===t.get("layout")){var e=t.preservedPoints||{},i=t.getGraph(),n=i.data,o=i.edgeData,a=t.getModel("force"),r=a.get("initLayout");t.preservedPoints?n.each((function(t){var i=n.getId(t);n.setItemLayout(t,e[i]||[NaN,NaN])})):r&&"none"!==r?"circular"===r&&W_(t,"value"):B_(t);var s=n.getDataExtent("value"),l=o.getDataExtent("value"),u=a.get("repulsion"),h=a.get("edgeLength");N(u)||(u=[u,u]),N(h)||(h=[h,h]),h=[h[1],h[0]];var c,d=n.mapArray("value",(function(t,e){var i=n.getItemLayout(e),o=ul(t,s,u);return isNaN(o)&&(o=(u[0]+u[1])/2),{w:o,rep:o,fixed:n.getItemModel(e).get("fixed"),p:!i||isNaN(i[0])||isNaN(i[1])?null:i}})),f=o.mapArray("value",(function(t,e){var n=i.getEdgeByIndex(e),o=ul(t,l,h);isNaN(o)&&(o=(h[0]+h[1])/2);var a=n.getModel();return{n1:d[n.node1.dataIndex],n2:d[n.node2.dataIndex],d:o,curveness:a.get("lineStyle.curveness")||0,ignoreForceLayout:a.get("ignoreForceLayout")}})),p=(c=t.coordinateSystem).getBoundingRect(),g=function(t,e,i){for(var n=i.rect,o=n.width,a=n.height,r=[n.x+o/2,n.y+a/2],s=null==i.gravity?.1:i.gravity,l=0;l<t.length;l++){var u=t[l];u.p||(u.p=ot(o*(Math.random()-.5)+r[0],a*(Math.random()-.5)+r[1])),u.pp=rt(u.p),u.edges=null}var h=null==i.friction?.6:i.friction,c=h;return{warmUp:function(){c=.8*h},setFixed:function(e){t[e].fixed=!0},setUnfixed:function(e){t[e].fixed=!1},step:function(i){for(var n=[],o=t.length,a=0;a<e.length;a++){var l=e[a];if(!l.ignoreForceLayout){var u=l.n1;ht(n,(p=l.n2).p,u.p);var h=ct(n)-l.d,d=p.w/(u.w+p.w);isNaN(d)&&(d=0),pt(n,n),u.fixed||Z_(u.p,u.p,n,d*h*c),p.fixed||Z_(p.p,p.p,n,-(1-d)*h*c)}}for(a=0;a<o;a++)(v=t[a]).fixed||(ht(n,r,v.p),Z_(v.p,v.p,n,s*c));for(a=0;a<o;a++){u=t[a];for(var f=a+1;f<o;f++){var p;ht(n,(p=t[f]).p,u.p),0===(h=ct(n))&&(st(n,Math.random()-.5,Math.random()-.5),h=1);var g=(u.rep+p.rep)/h/h;u.fixed||Z_(u.pp,u.pp,n,g),p.fixed||Z_(p.pp,p.pp,n,-g)}}var m=[];for(a=0;a<o;a++){var v;(v=t[a]).fixed||(ht(m,v.p,v.pp),Z_(v.p,v.p,m,c),at(v.pp,v.p))}c*=.992,i&&i(t,e,c<.01)}}}(d,f,{rect:p,gravity:a.get("gravity"),friction:a.get("friction")}),m=g.step;g.step=function(t){for(var o=0,a=d.length;o<a;o++)d[o].fixed&&at(d[o].p,i.getNodeByIndex(o).getLayout());m((function(o,a,r){for(var s=0,l=o.length;s<l;s++)o[s].fixed||i.getNodeByIndex(s).setLayout(o[s].p),e[n.getId(s)]=o[s].p;for(s=0,l=a.length;s<l;s++){var u=a[s],h=i.getEdgeByIndex(s),c=u.n1.p,d=u.n2.p,f=h.getLayout();(f=f?f.slice():[])[0]=f[0]||[],f[1]=f[1]||[],at(f[0],c),at(f[1],d),+u.curveness&&(f[2]=[(c[0]+d[0])/2-(c[1]-d[1])*u.curveness,(c[1]+d[1])/2-(d[0]-c[0])*u.curveness]),h.setLayout(f)}t&&t(r)}))},t.forceLayout=g,t.preservedPoints=e,g.step()}else t.forceLayout=null}))})),Wd("graphView",{create:function(t,e){var i=[];return t.eachSeriesByType("graph",(function(t){var n=t.get("coordinateSystem");if(!n||"view"===n){var o=t.getData(),a=[],r=[];wa(o.mapArray((function(t){var e=o.getItemModel(t);return[+e.get("x"),+e.get("y")]})),a,r),r[0]-a[0]==0&&(r[0]+=1,a[0]-=1),r[1]-a[1]==0&&(r[1]+=1,a[1]-=1);var s=(r[0]-a[0])/(r[1]-a[1]),l=function(t,e,i){var n=t.getBoxLayoutParams();return n.aspect=i,ql(n,{width:e.getWidth(),height:e.getHeight()})}(t,e,s);isNaN(s)&&(a=[l.x,l.y],r=[l.x+l.width,l.y+l.height]);var u=r[0]-a[0],h=r[1]-a[1],c=l.width,d=l.height,f=t.coordinateSystem=new vy;f.zoomLimit=t.get("scaleLimit"),f.setBoundingRect(a[0],a[1],u,h),f.setViewRect(l.x,l.y,c,d),f.setCenter(t.get("center")),f.setZoom(t.get("zoom")),i.push(f)}})),i}}),Lh.extend({type:"series.gauge",getInitialData:function(t,e){return nv(this,["value"])},defaultOption:{zlevel:0,z:2,center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,lineStyle:{color:[[.2,"#91c7ae"],[.8,"#63869e"],[1,"#c23531"]],width:30}},splitLine:{show:!0,length:30,lineStyle:{color:"#eee",width:2,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:8,lineStyle:{color:"#eee",width:1,type:"solid"}},axisLabel:{show:!0,distance:5,color:"auto"},pointer:{show:!0,length:"80%",width:8},itemStyle:{color:"auto"},title:{show:!0,offsetCenter:[0,"-40%"],color:"#333",fontSize:15},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"auto",fontSize:30}}});var U_=ar.extend({type:"echartsGaugePointer",shape:{angle:0,width:10,r:10,x:0,y:0},buildPath:function(t,e){var i=Math.cos,n=Math.sin,o=e.r,a=e.width,r=e.angle,s=e.x-i(r)*a*(o/3<=a?1:2),l=e.y-n(r)*a*(o/3<=a?1:2);r=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+i(r)*a,e.y+n(r)*a),t.lineTo(e.x+i(e.angle)*o,e.y+n(e.angle)*o),t.lineTo(e.x-i(r)*a,e.y-n(r)*a),t.lineTo(s,l)}});function X_(t,e){return e&&("string"==typeof e?t=e.replace("{value}",null!=t?t:""):"function"==typeof e&&(t=e(t))),t}var Y_=2*Math.PI,j_=(Hh.extend({type:"gauge",render:function(t,e,i){this.group.removeAll();var n=t.get("axisLine.lineStyle.color"),o=function(t,e){var i=t.get("center"),n=e.getWidth(),o=e.getHeight(),a=Math.min(n,o);return{cx:hl(i[0],e.getWidth()),cy:hl(i[1],e.getHeight()),r:hl(t.get("radius"),a/2)}}(t,i);this._renderMain(t,e,i,n,o)},dispose:function(){},_renderMain:function(t,e,i,n,o){for(var a=this.group,r=t.getModel("axisLine"),s=r.getModel("lineStyle"),l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,h=((g=-t.get("endAngle")/180*Math.PI)-u)%Y_,c=u,d=s.get("width"),f=r.get("show"),p=0;f&&p<n.length;p++){var g,m=Math.min(Math.max(n[p][0],0),1),v=new Tr({shape:{startAngle:c,endAngle:g=u+h*m,cx:o.cx,cy:o.cy,clockwise:l,r0:o.r-d,r:o.r},silent:!0});v.setStyle({fill:n[p][1]}),v.setStyle(s.getLineStyle(["color","borderWidth","borderColor"])),a.add(v),c=g}function y(t){if(t<=0)return n[0][1];for(var e=0;e<n.length;e++)if(n[e][0]>=t&&(0===e?0:n[e-1][0])<t)return n[e][1];return n[e-1][1]}if(!l){var x=u;u=g,g=x}this._renderTicks(t,e,i,y,o,u,g,l),this._renderPointer(t,e,i,y,o,u,g,l),this._renderTitle(t,e,i,y,o),this._renderDetail(t,e,i,y,o)},_renderTicks:function(t,e,i,n,o,a,r,s){for(var l=this.group,u=o.cx,h=o.cy,c=o.r,d=+t.get("min"),f=+t.get("max"),p=t.getModel("splitLine"),g=t.getModel("axisTick"),m=t.getModel("axisLabel"),v=t.get("splitNumber"),y=g.get("splitNumber"),x=hl(p.get("length"),c),_=hl(g.get("length"),c),w=a,b=(r-a)/v,S=b/y,M=p.getModel("lineStyle").getLineStyle(),I=g.getModel("lineStyle").getLineStyle(),T=0;T<=v;T++){var A=Math.cos(w),D=Math.sin(w);if(p.get("show")){var C=new Vr({shape:{x1:A*c+u,y1:D*c+h,x2:A*(c-x)+u,y2:D*(c-x)+h},style:M,silent:!0});"auto"===M.stroke&&C.setStyle({stroke:n(T/v)}),l.add(C)}if(m.get("show")){var L=X_(cl(T/v*(f-d)+d),m.get("formatter")),k=m.get("distance"),P=n(T/v);l.add(new br({style:Ps({},m,{text:L,x:A*(c-x-k)+u,y:D*(c-x-k)+h,textVerticalAlign:D<-.4?"top":.4<D?"bottom":"middle",textAlign:A<-.4?"left":.4<A?"right":"center"},{autoColor:P}),silent:!0}))}if(g.get("show")&&T!==v){for(var O=0;O<=y;O++){A=Math.cos(w),D=Math.sin(w);var N=new Vr({shape:{x1:A*c+u,y1:D*c+h,x2:A*(c-_)+u,y2:D*(c-_)+h},silent:!0,style:I});"auto"===I.stroke&&N.setStyle({stroke:n((T+O/y)/v)}),l.add(N),w+=S}w-=S}else w+=b}},_renderPointer:function(t,e,i,n,o,a,r,s){var l=this.group,u=this._data;if(t.get("pointer.show")){var h=[+t.get("min"),+t.get("max")],c=[a,r],d=t.getData(),f=d.mapDimension("value");d.diff(u).add((function(e){var i=new U_({shape:{angle:a}});Fs(i,{shape:{angle:ul(d.get(f,e),h,c,!0)}},t),l.add(i),d.setItemGraphicEl(e,i)})).update((function(e,i){var n=u.getItemGraphicEl(i);Gs(n,{shape:{angle:ul(d.get(f,e),h,c,!0)}},t),l.add(n),d.setItemGraphicEl(e,n)})).remove((function(t){var e=u.getItemGraphicEl(t);l.remove(e)})).execute(),d.eachItemGraphicEl((function(t,e){var i=d.getItemModel(e),a=i.getModel("pointer");t.setShape({x:o.cx,y:o.cy,width:hl(a.get("width"),o.r),r:hl(a.get("length"),o.r)}),t.useStyle(i.getModel("itemStyle").getItemStyle()),"auto"===t.style.fill&&t.setStyle("fill",n(ul(d.get(f,e),h,[0,1],!0))),Ts(t,i.getModel("emphasis.itemStyle").getItemStyle())})),this._data=d}else u&&u.eachItemGraphicEl((function(t){l.remove(t)}))},_renderTitle:function(t,e,i,n,o){var a=t.getData(),r=a.mapDimension("value"),s=t.getModel("title");if(s.get("show")){var l=s.get("offsetCenter"),u=o.cx+hl(l[0],o.r),h=o.cy+hl(l[1],o.r),c=+t.get("min"),d=+t.get("max"),f=n(ul(t.getData().get(r,0),[c,d],[0,1],!0));this.group.add(new br({silent:!0,style:Ps({},s,{x:u,y:h,text:a.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:f,forceRich:!0})}))}},_renderDetail:function(t,e,i,n,o){var a=t.getModel("detail"),r=+t.get("min"),s=+t.get("max");if(a.get("show")){var l=a.get("offsetCenter"),u=o.cx+hl(l[0],o.r),h=o.cy+hl(l[1],o.r),c=hl(a.get("width"),o.r),d=hl(a.get("height"),o.r),f=t.getData(),p=f.get(f.mapDimension("value"),0),g=n(ul(p,[r,s],[0,1],!0));this.group.add(new br({silent:!0,style:Ps({},a,{x:u,y:h,text:X_(p,a.get("formatter")),textWidth:isNaN(c)?null:c,textHeight:isNaN(d)?null:d,textAlign:"center",textVerticalAlign:"middle"},{autoColor:g,forceRich:!0})}))}}}),qd({type:"series.funnel",init:function(t){j_.superApply(this,"init",arguments),this.legendVisualProvider=new av(P(this.getData,this),P(this.getRawData,this)),this._defaultLabelLine(t)},getInitialData:function(t,e){return nv(this,{coordDimensions:["value"],encodeDefaulter:O(bu,this)})},_defaultLabelLine:function(t){So(t,"labelLine",["show"]);var e=t.labelLine,i=t.emphasis.labelLine;e.show=e.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},getDataParams:function(t){var e=this.getData(),i=j_.superCall(this,"getDataParams",t),n=e.mapDimension("value"),o=e.getSum(n);return i.percent=o?+(e.get(n,t)/o*100).toFixed(2):0,i.$vars.push("percent"),i},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}}}}));function q_(t,e){yi.call(this);var i=new Lr,n=new kr,o=new br;this.add(i),this.add(n),this.add(o),this.highDownOnUpdate=function(t,e){"emphasis"===e?(n.ignore=n.hoverIgnore,o.ignore=o.hoverIgnore):(n.ignore=n.normalIgnore,o.ignore=o.normalIgnore)},this.updateData(t,e,!0)}var K_=q_.prototype,$_=["itemStyle","opacity"];function J_(t,e,i,n,o){ig.call(this,t,e,i),this.type=n||"value",this.axisIndex=o}function Q_(t,e,i,n,o,a){t=t||0;var r=i[1]-i[0];if(null!=o&&(o=ew(o,[0,r])),null!=a&&(a=Math.max(a,null!=o?o:0)),"all"===n){var s=Math.abs(e[1]-e[0]);o=a=ew(s=ew(s,[0,r]),[o,a]),n=0}e[0]=ew(e[0],i),e[1]=ew(e[1],i);var l=tw(e,n);e[n]+=t;var u=o||0,h=i.slice();l.sign<0?h[0]+=u:h[1]-=u,e[n]=ew(e[n],h);var c=tw(e,n);return null!=o&&(c.sign!==l.sign||c.span<o)&&(e[1-n]=e[n]+l.sign*o),c=tw(e,n),null!=a&&c.span>a&&(e[1-n]=e[n]+c.sign*a),e}function tw(t,e){var i=t[e]-t[1-e];return{span:Math.abs(i),sign:0<i?-1:i<0?1:e?-1:1}}function ew(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}K_.updateData=function(t,e,i){var n=this.childAt(0),o=t.hostModel,a=t.getItemModel(e),r=t.getItemLayout(e),s=t.getItemModel(e).get($_);s=null==s?1:s,n.useStyle({}),i?(n.setShape({points:r.points}),n.setStyle({opacity:0}),Fs(n,{style:{opacity:s}},o,e)):Gs(n,{style:{opacity:s},shape:{points:r.points}},o,e);var l=a.getModel("itemStyle"),u=t.getItemVisual(e,"color");n.setStyle(_({lineJoin:"round",fill:u},l.getItemStyle(["opacity"]))),n.hoverStyle=l.getModel("emphasis").getItemStyle(),this._updateLabel(t,e),Ts(this)},K_._updateLabel=function(t,e){var i=this.childAt(1),n=this.childAt(2),o=t.hostModel,a=t.getItemModel(e),r=t.getItemLayout(e).label,s=t.getItemVisual(e,"color");Gs(i,{shape:{points:r.linePoints||r.linePoints}},o,e),Gs(n,{style:{x:r.x,y:r.y}},o,e),n.attr({rotation:r.rotation,origin:[r.x,r.y],z2:10});var l=a.getModel("label"),u=a.getModel("emphasis.label"),h=a.getModel("labelLine"),c=a.getModel("emphasis.labelLine");s=t.getItemVisual(e,"color"),Ls(n.style,n.hoverStyle={},l,u,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:s,useInsideStyle:!!r.inside},{textAlign:r.textAlign,textVerticalAlign:r.verticalAlign}),n.ignore=n.normalIgnore=!l.get("show"),n.hoverIgnore=!u.get("show"),i.ignore=i.normalIgnore=!h.get("show"),i.hoverIgnore=!c.get("show"),i.setStyle({stroke:s}),i.setStyle(h.getModel("lineStyle").getLineStyle()),i.hoverStyle=c.getModel("lineStyle").getLineStyle()},M(q_,yi),Hh.extend({type:"funnel",render:function(t,e,i){var n=t.getData(),o=this._data,a=this.group;n.diff(o).add((function(t){var e=new q_(n,t);n.setItemGraphicEl(t,e),a.add(e)})).update((function(t,e){var i=o.getItemGraphicEl(e);i.updateData(n,t),a.add(i),n.setItemGraphicEl(t,i)})).remove((function(t){var e=o.getItemGraphicEl(t);a.remove(e)})).execute(),this._data=n},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}}),Zd(dv("funnel")),Hd((function(t,e,i){t.eachSeriesByType("funnel",(function(t){var i=t.getData(),n=i.mapDimension("value"),o=t.get("sort"),a=function(t,e){return ql(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e),r=function(t,e){for(var i=t.mapDimension("value"),n=t.mapArray(i,(function(t){return t})),o=[],a="ascending"===e,r=0,s=t.count();r<s;r++)o[r]=r;return"function"==typeof e?o.sort(e):"none"!==e&&o.sort((function(t,e){return a?n[t]-n[e]:n[e]-n[t]})),o}(i,o),s=[hl(t.get("minSize"),a.width),hl(t.get("maxSize"),a.width)],l=i.getDataExtent(n),u=t.get("min"),h=t.get("max");function c(t,e){var o,r=ul(i.get(n,t)||0,[u,h],s,!0);switch(d){case"left":o=a.x;break;case"center":o=a.x+(a.width-r)/2;break;case"right":o=a.x+a.width-r}return[[o,e],[o+r,e]]}null==u&&(u=Math.min(l[0],0)),null==h&&(h=l[1]);var d=t.get("funnelAlign"),f=t.get("gap"),p=(a.height-f*(i.count()-1))/i.count(),g=a.y;"ascending"===o&&(p=-p,f=-f,g+=a.height,r=r.reverse());for(var m=0;m<r.length;m++){var v=r[m],y=r[m+1],x=i.getItemModel(v).get("itemStyle.height");null==x?x=p:(x=hl(x,a.height),"ascending"===o&&(x=-x));var _=c(v,g),w=c(y,g+x);g+=x+f,i.setItemLayout(v,{points:_.concat(w.slice().reverse())})}!function(t){t.each((function(e){var i,n,o,a,r=t.getItemModel(e),s=r.getModel("label").get("position"),l=r.getModel("labelLine"),u=t.getItemLayout(e),h=u.points,c="inner"===s||"inside"===s||"center"===s||"insideLeft"===s||"insideRight"===s;if(c)i="insideLeft"===s?(n=(h[0][0]+h[3][0])/2+5,o=(h[0][1]+h[3][1])/2,"left"):"insideRight"===s?(n=(h[1][0]+h[2][0])/2-5,o=(h[1][1]+h[2][1])/2,"right"):(n=(h[0][0]+h[1][0]+h[2][0]+h[3][0])/4,o=(h[0][1]+h[1][1]+h[2][1]+h[3][1])/4,"center"),a=[[n,o],[n,o]];else{var d,f,p,g=l.get("length");i="left"===s?(f=(h[3][1]+h[0][1])/2,n=(p=(d=(h[3][0]+h[0][0])/2)-g)-5,"right"):"right"===s?(f=(h[1][1]+h[2][1])/2,n=(p=(d=(h[1][0]+h[2][0])/2)+g)+5,"left"):"rightTop"===s?(f=h[1][1],n=(p=(d=h[1][0])+g)+5,"top"):"rightBottom"===s?(f=h[2][1],n=(p=(d=h[2][0])+g)+5,"bottom"):"leftTop"===s?(f=h[1][1],n=(p=(d=h[0][0])-g)-5,"right"):"leftBottom"===s?(f=h[2][1],n=(p=(d=h[3][0])-g)-5,"right"):(f=(h[1][1]+h[2][1])/2,n=(p=(d=(h[1][0]+h[2][0])/2)+g)+5,"left"),a=[[d,f],[p,f]],o=f}u.label={linePoints:a,x:n,y:o,verticalAlign:"middle",textAlign:i,inside:c}}))}(i)}))})),Gd(yv("funnel")),J_.prototype={constructor:J_,model:null,isHorizontal:function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")}},M(J_,ig);var iw=A,nw=Math.min,ow=Math.max,aw=Math.floor,rw=Math.ceil,sw=cl,lw=Math.PI;function uw(t,e,i){this._axesMap=Q(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,i)}function hw(t,e){return nw(ow(t,e[0]),e[1])}uw.prototype={type:"parallel",constructor:uw,_init:function(t,e,i){var n=t.parallelAxisIndex;iw(t.dimensions,(function(t,i){var o=n[i],a=e.getComponent("parallelAxis",o),r=this._axesMap.set(t,new J_(t,Ap(a),[0,0],a.get("type"),o));r.onBand="category"===r.type&&a.get("boundaryGap"),r.inverse=a.get("inverse"),(a.axis=r).model=a,r.coordinateSystem=a.coordinateSystem=this}),this)},update:function(t,e){this._updateAxesFromSeries(this._model,t)},containPoint:function(t){var e=this._makeLayoutInfo(),i=e.axisBase,n=e.layoutBase,o=e.pixelDimIndex,a=t[1-o],r=t[o];return i<=a&&a<=i+e.axisLength&&n<=r&&r<=n+e.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(t,e){e.eachSeries((function(i){if(t.contains(i,e)){var n=i.getData();iw(this.dimensions,(function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(n,n.mapDimension(t)),Tp(e.scale,e.model)}),this)}}),this)},resize:function(t,e){this._rect=ql(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},getRect:function(){return this._rect},_makeLayoutInfo:function(){var t,e=this._model,i=this._rect,n=["x","y"],o=["width","height"],a=e.get("layout"),r="horizontal"===a?0:1,s=i[o[r]],l=[0,s],u=this.dimensions.length,h=hw(e.get("axisExpandWidth"),l),c=hw(e.get("axisExpandCount")||0,[0,u]),d=e.get("axisExpandable")&&3<u&&c<u&&1<c&&0<h&&0<s,f=e.get("axisExpandWindow");f?(t=hw(f[1]-f[0],l),f[1]=f[0]+t):(t=hw(h*(c-1),l),(f=[h*(e.get("axisExpandCenter")||aw(u/2))-t/2])[1]=f[0]+t);var p=(s-t)/(u-c);p<3&&(p=0);var g=[aw(sw(f[0]/h,1))+1,rw(sw(f[1]/h,1))-1];return{layout:a,pixelDimIndex:r,layoutBase:i[n[r]],layoutLength:s,axisBase:i[n[1-r]],axisLength:i[o[1-r]],axisExpandable:d,axisExpandWidth:h,axisCollapseWidth:p,axisExpandWindow:f,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:p/h*f[0]}},_layoutAxes:function(){var t=this._rect,e=this._axesMap,i=this.dimensions,n=this._makeLayoutInfo(),o=n.layout;e.each((function(t){var e=[0,n.axisLength],i=t.inverse?1:0;t.setExtent(e[i],e[1-i])})),iw(i,(function(e,i){var a=(n.axisExpandable?function(t,e){var i,n,o=e.axisExpandWidth,a=e.axisCollapseWidth,r=e.winInnerIndices,s=a,l=!1;return t<r[0]?(i=t*a,n=a):t<=r[1]?(i=e.axisExpandWindow0Pos+t*o-e.axisExpandWindow[0],s=o,l=!0):(i=e.layoutLength-(e.axisCount-1-t)*a,n=a),{position:i,axisNameAvailableWidth:s,axisLabelShow:l,nameTruncateMaxWidth:n}}:function(t,e){var i=e.layoutLength/(e.axisCount-1);return{position:i*t,axisNameAvailableWidth:i,axisLabelShow:!0}})(i,n),r={horizontal:{x:a.position,y:n.axisLength},vertical:{x:0,y:a.position}},s=[r[o].x+t.x,r[o].y+t.y],l={horizontal:lw/2,vertical:0}[o],u=Jt();ne(u,u,l),ie(u,u,s),this._axesLayout[e]={position:s,rotation:l,transform:u,axisNameAvailableWidth:a.axisNameAvailableWidth,axisLabelShow:a.axisLabelShow,nameTruncateMaxWidth:a.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}}),this)},getAxis:function(t){return this._axesMap.get(t)},dataToPoint:function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},eachActiveState:function(t,e,i,n){null==i&&(i=0),null==n&&(n=t.count());var o=this._axesMap,a=this.dimensions,r=[],s=[];A(a,(function(e){r.push(t.mapDimension(e)),s.push(o.get(e).model)}));for(var l=this.hasAxisBrushed(),u=i;u<n;u++){var h;if(l){h="active";for(var c=t.getValues(r,u),d=0,f=a.length;d<f;d++)if("inactive"===s[d].getActiveState(c[d])){h="inactive";break}}else h="normal";e(h,u)}},hasAxisBrushed:function(){for(var t=this.dimensions,e=this._axesMap,i=!1,n=0,o=t.length;n<o;n++)"normal"!==e.get(t[n]).model.getActiveState()&&(i=!0);return i},axisCoordToPoint:function(t,e){return Hs([t,0],this._axesLayout[e].transform)},getAxisLayout:function(t){return m(this._axesLayout[t])},getSlidedAxisExpandWindow:function(t){var e=this._makeLayoutInfo(),i=e.pixelDimIndex,n=e.axisExpandWindow.slice(),o=n[1]-n[0],a=[0,e.axisExpandWidth*(e.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:n};var r,s=t[i]-e.layoutBase-e.axisExpandWindow0Pos,l="slide",u=e.axisCollapseWidth,h=this._model.get("axisExpandSlideTriggerArea"),c=null!=h[0];return u?(c&&u&&s<o*h[0]?(l="jump",r=s-o*h[2]):c&&u&&s>o*(1-h[0])?(l="jump",r=s-o*(1-h[2])):0<=(r=s-o*h[1])&&(r=s-o*(1-h[1]))<=0&&(r=0),(r*=e.axisExpandWidth/u)?Q_(r,n,a,"all"):l="none"):((n=[ow(0,a[1]*s/(o=n[1]-n[0])-o/2)])[1]=nw(a[1],n[0]+o),n[0]=n[1]-o),{axisExpandWindow:n,behavior:l}}},Pu.register("parallel",{create:function(t,e){var i=[];return t.eachComponent("parallel",(function(n,o){var a=new uw(n,t,e);a.name="parallel_"+o,a.resize(n,e),(n.coordinateSystem=a).model=n,i.push(a)})),t.eachSeries((function(e){if("parallel"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"parallel",index:e.get("parallelIndex"),id:e.get("parallelId")})[0];e.coordinateSystem=i.coordinateSystem}})),i}});var cw=ou.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return Xo([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=m(t);if(e)for(var i=e.length-1;0<=i;i--)dl(e[i])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(t))return"inactive";if(1===e.length){var i=e[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var n=0,o=e.length;n<o;n++)if(e[n][0]<=t&&t<=e[n][1])return"active";return"inactive"}});v(cw.prototype,Pp),tm("parallel",cw,(function(t,e){return e.type||(e.data?"category":"value")}),{type:"value",dim:null,areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10}),ou.extend({type:"parallel",dependencies:["parallelAxis"],coordinateSystem:null,dimensions:null,parallelAxisIndex:null,layoutMode:"box",defaultOption:{zlevel:0,z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},init:function(){ou.prototype.init.apply(this,arguments),this.mergeOption({})},mergeOption:function(t){t&&v(this.option,t,!0),this._initDimensions()},contains:function(t,e){var i=t.get("parallelIndex");return null!=i&&e.getComponent("parallel",i)===this},setAxisExpand:function(t){A(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],(function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])}),this)},_initDimensions:function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[];A(L(this.dependentModels.parallelAxis,(function(t){return(t.get("parallelIndex")||0)===this.componentIndex}),this),(function(i){t.push("dim"+i.get("dim")),e.push(i.componentIndex)}))}}),Fd({type:"axisAreaSelect",event:"axisAreaSelected"},(function(t,e){e.eachComponent({mainType:"parallelAxis",query:t},(function(e){e.axis.model.setActiveIntervals(t.intervals)}))})),Fd("parallelAxisExpand",(function(t,e){e.eachComponent({mainType:"parallel",query:t},(function(e){e.setAxisExpand(t)}))}));var dw=O,fw=A,pw=D,gw=Math.min,mw=Math.max,vw=Math.pow,yw={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},xw={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},_w={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},ww=0;function bw(t){At.call(this),this._zr=t,this.group=new yi,this._track=[],this._covers=[],this._uid="brushController_"+ww++,this._handlers={},fw(jw,(function(t,e){this._handlers[e]=P(t,this)}),this)}function Sw(t,e){var i=Kw[e.brushType].createCover(t,e);return i.__brushOption=e,Tw(i,e),t.group.add(i),i}function Mw(t,e){var i=Dw(e);return i.endCreating&&(i.endCreating(t,e),Tw(e,e.__brushOption)),e}function Iw(t,e){var i=e.__brushOption;Dw(e).updateCoverShape(t,e,i.range,i)}function Tw(t,e){var i=e.z;null==i&&(i=1e4),t.traverse((function(t){t.z=i,t.z2=i}))}function Aw(t,e){Dw(e).updateCommon(t,e),Iw(t,e)}function Dw(t){return Kw[t.__brushOption.brushType]}function Cw(t,e,i){var n,o=t._panels;if(!o)return!0;var a=t._transform;return fw(o,(function(t){t.isTargetByCursor(e,i,a)&&(n=t)})),n}function Lw(t,e){var i=t._panels;if(!i)return!0;var n=e.__brushOption.panelId;return null==n||i[n]}function kw(t){var e=t._covers,i=e.length;return fw(e,(function(e){t.group.remove(e)}),t),e.length=0,!!i}function Pw(t,e){var i=pw(t._covers,(function(t){var e=t.__brushOption,i=m(e.range);return{brushType:e.brushType,panelId:e.panelId,range:i}}));t.trigger("brush",i,{isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function Ow(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function Nw(t,e,i,n){var o=new yi;return o.add(new zr({name:"main",style:Bw(i),silent:!0,draggable:!0,cursor:"move",drift:dw(t,e,o,"nswe"),ondragend:dw(Pw,e,{isEnd:!0})})),fw(n,(function(i){o.add(new zr({name:i,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:dw(t,e,o,i),ondragend:dw(Pw,e,{isEnd:!0})}))})),o}function Ew(t,e,i,n){var o=n.brushStyle.lineWidth||0,a=mw(o,6),r=i[0][0],s=i[1][0],l=r-o/2,u=s-o/2,h=i[0][1],c=i[1][1],d=h-a+o/2,f=c-a+o/2,p=h-r,g=c-s,m=p+o,v=g+o;zw(t,e,"main",r,s,p,g),n.transformable&&(zw(t,e,"w",l,u,a,v),zw(t,e,"e",d,u,a,v),zw(t,e,"n",l,u,m,a),zw(t,e,"s",l,f,m,a),zw(t,e,"nw",l,u,a,a),zw(t,e,"ne",d,u,a,a),zw(t,e,"sw",l,f,a,a),zw(t,e,"se",d,f,a,a))}function Rw(t,e){var i=e.__brushOption,n=i.transformable,o=e.childAt(0);o.useStyle(Bw(i)),o.attr({silent:!n,cursor:n?"move":"default"}),fw(["w","e","n","s","se","sw","ne","nw"],(function(i){var o=e.childOfName(i),a=function t(e,i){return 1<i.length?("e"!==(n=[t(e,(i=i.split(""))[0]),t(e,i[1])])[0]&&"w"!==n[0]||n.reverse(),n.join("")):{left:"w",right:"e",top:"n",bottom:"s"}[n=Zs({w:"left",e:"right",n:"top",s:"bottom"}[i],Ws(e.group))];var n}(t,i);o&&o.attr({silent:!n,invisible:!n,cursor:n?xw[a]+"-resize":null})}))}function zw(t,e,i,n,o,a,r){var s=e.childOfName(i);s&&s.setShape(function(t){var e=gw(t[0][0],t[1][0]),i=gw(t[0][1],t[1][1]);return{x:e,y:i,width:mw(t[0][0],t[1][0])-e,height:mw(t[0][1],t[1][1])-i}}(Hw(t,e,[[n,o],[n+a,o+r]])))}function Bw(t){return _({strokeNoScale:!0},t.brushStyle)}function Vw(t,e,i,n){var o=[gw(t,i),gw(e,n)],a=[mw(t,i),mw(e,n)];return[[o[0],a[0]],[o[1],a[1]]]}function Gw(t,e,i,n,o,a,r,s){var l=n.__brushOption,u=t(l.range),h=Ww(i,a,r);fw(o.split(""),(function(t){var e=yw[t];u[e[0]][e[1]]+=h[e[0]]})),l.range=e(Vw(u[0][0],u[1][0],u[0][1],u[1][1])),Aw(i,n),Pw(i,{isEnd:!1})}function Fw(t,e,i,n,o){var a=e.__brushOption.range,r=Ww(t,i,n);fw(a,(function(t){t[0]+=r[0],t[1]+=r[1]})),Aw(t,e),Pw(t,{isEnd:!1})}function Ww(t,e,i){var n=t.group,o=n.transformCoordToLocal(e,i),a=n.transformCoordToLocal(0,0);return[o[0]-a[0],o[1]-a[1]]}function Hw(t,e,i){var n=Lw(t,e);return n&&!0!==n?n.clipPath(i,t._transform):m(i)}function Zw(t){var e=t.event;e.preventDefault&&e.preventDefault()}function Uw(t,e,i){return t.childOfName("main").contain(e,i)}function Xw(t,e,i,n){var o,a=t._creatingCover,r=t._creatingPanel,s=t._brushOption;if(t._track.push(i.slice()),function(t){var e=t._track;if(!e.length)return!1;var i=e[e.length-1],n=e[0],o=i[0]-n[0],a=i[1]-n[1];return 6<vw(o*o+a*a,.5)}(t)||a){if(r&&!a){"single"===s.brushMode&&kw(t);var l=m(s);l.brushType=Yw(l.brushType,r),l.panelId=!0===r?null:r.panelId,a=t._creatingCover=Sw(t,l),t._covers.push(a)}if(a){var u=Kw[Yw(t._brushType,r)];a.__brushOption.range=u.getCreatingRange(Hw(t,a,t._track)),n&&(Mw(t,a),u.updateCommon(t,a)),Iw(t,a),o={isEnd:n}}}else n&&"single"===s.brushMode&&s.removeOnClick&&Cw(t,e,i)&&kw(t)&&(o={isEnd:n,removeOnClick:!0});return o}function Yw(t,e){return"auto"===t?e.defaultBrushType:t}bw.prototype={constructor:bw,enableBrush:function(t){return this._brushType&&function(t){var e=t._zr;(function(t,e,i){var n=Yv(t);n[e]===i&&(n[e]=null)})(e,"globalPan",t._uid),function(t,e){fw(e,(function(e,i){t.off(i,e)}))}(e,t._handlers),t._brushType=t._brushOption=null}(this),t.brushType&&function(t,e){var i=t._zr;t._enableGlobalPan||function(t,e,i){Yv(t).globalPan=i}(i,0,t._uid),function(t,e){fw(e,(function(e,i){t.on(i,e)}))}(i,t._handlers),t._brushType=e.brushType,t._brushOption=v(m(_w),e,!0)}(this,t),this},setPanels:function(t){if(t&&t.length){var e=this._panels={};A(t,(function(t){e[t.panelId]=m(t)}))}else this._panels=null;return this},mount:function(t){this._enableGlobalPan=(t=t||{}).enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({position:t.position||[0,0],rotation:t.rotation||0,scale:t.scale||[1,1]}),this._transform=e.getLocalTransform(),this},eachCover:function(t,e){fw(this._covers,t,e)},updateCovers:function(t){t=D(t,(function(t){return v(m(_w),t,!0)}));var e=this._covers,i=this._covers=[],n=this,o=this._creatingCover;return new Jd(e,t,(function(t,e){return a(t.__brushOption,e)}),a).add(r).update(r).remove((function(t){e[t]!==o&&n.group.remove(e[t])})).execute(),this;function a(t,e){return(null!=t.id?t.id:"\0-brush-index-"+e)+"-"+t.brushType}function r(a,r){var s=t[a];if(null!=r&&e[r]===o)i[a]=e[r];else{var l=i[a]=null!=r?(e[r].__brushOption=s,e[r]):Mw(n,Sw(n,s));Aw(n,l)}}},unmount:function(){return this.enableBrush(!1),kw(this),this._zr.remove(this.group),this},dispose:function(){this.unmount(),this.off()}},I(bw,At);var jw={mousedown:function(t){if(this._dragging)qw(this,t);else if(!t.target||!t.target.draggable){Zw(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=Cw(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);if(function(t,e,i){if(t._brushType&&!function(t,e,i){var n=t._zr;return e<0||e>n.getWidth()||void 0>n.getHeight()}(t,e)){var n=t._zr,o=t._covers,a=Cw(t,e,i);if(!t._dragging)for(var r=0;r<o.length;r++){var s=o[r].__brushOption;if(a&&(!0===a||s.panelId===a.panelId)&&Kw[s.brushType].contain(o[r],i[0],i[1]))return}a&&n.setCursorStyle("crosshair")}}(this,t,e),this._dragging){Zw(t);var i=Xw(this,t,e,!1);i&&Pw(this,i)}},mouseup:function(t){qw(this,t)}};function qw(t,e){if(t._dragging){Zw(e);var i=t.group.transformCoordToLocal(e.offsetX,e.offsetY),n=Xw(t,e,i,!0);t._dragging=!1,t._track=[],t._creatingCover=null,n&&Pw(t,n)}}var Kw={lineX:$w(0),lineY:$w(1),rect:{createCover:function(t,e){return Nw(dw(Gw,(function(t){return t}),(function(t){return t})),t,e,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(t){var e=Ow(t);return Vw(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,i,n){Ew(t,e,i,n)},updateCommon:Rw,contain:Uw},polygon:{createCover:function(t,e){var i=new yi;return i.add(new kr({name:"main",style:Bw(e),silent:!0})),i},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new Lr({name:"main",draggable:!0,drift:dw(Fw,t,e),ondragend:dw(Pw,t,{isEnd:!0})}))},updateCoverShape:function(t,e,i,n){e.childAt(0).setShape({points:Hw(t,e,i)})},updateCommon:Rw,contain:Uw}};function $w(t){return{createCover:function(e,i){return Nw(dw(Gw,(function(e){var i=[e,[0,100]];return t&&i.reverse(),i}),(function(e){return e[t]})),e,i,[["w","e"],["n","s"]][t])},getCreatingRange:function(e){var i=Ow(e);return[gw(i[0][t],i[1][t]),mw(i[0][t],i[1][t])]},updateCoverShape:function(e,i,n,o){var a,r=Lw(e,i);if(!0!==r&&r.getLinearBrushOtherExtent)a=r.getLinearBrushOtherExtent(t,e._transform);else{var s=e._zr;a=[0,[s.getWidth(),s.getHeight()][1-t]]}var l=[n,a];t&&l.reverse(),Ew(e,i,l,o)},updateCommon:Rw,contain:Uw}}function Jw(t){return t=eb(t),function(e,i){return Xs(e,t)}}function Qw(t,e){return t=eb(t),function(i){var n=null!=e?e:i,o=n?t.x:t.y;return[o,o+((n?t.width:t.height)||0)]}}function tb(t,e,i){return t=eb(t),function(n,o,a){return t.contain(o[0],o[1])&&!ry(n,e,i)}}function eb(t){return vi.create(t)}var ib=["axisLine","axisTickLabel","axisName"],nb=jd({type:"parallelAxis",init:function(t,e){nb.superApply(this,"init",arguments),(this._brushController=new bw(e.getZr())).on("brush",P(this._onBrush,this))},render:function(t,e,i,n){if(!function(t,e,i){return i&&"axisAreaSelect"===i.type&&e.findComponents({mainType:"parallelAxis",query:i})[0]===t}(t,e,n)){this.axisModel=t,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new yi,this.group.add(this._axisGroup),t.get("show")){var a=function(t,e){return e.getComponent("parallel",t.get("parallelIndex"))}(t,e),r=a.coordinateSystem,s=t.getAreaSelectStyle(),l=s.width,u=x({strokeContainThreshold:l},r.getAxisLayout(t.axis.dim)),h=new fm(t,u);A(ib,h.add,h),this._axisGroup.add(h.getGroup()),this._refreshBrushController(u,s,t,a,l,i),Us(o,this._axisGroup,n&&!1===n.animation?null:t)}}},_refreshBrushController:function(t,e,i,n,o,a){var r=i.axis.getExtent(),s=r[1]-r[0],l=Math.min(30,.1*Math.abs(s)),u=vi.create({x:r[0],y:-o/2,width:s,height:o});u.x-=l,u.width+=2*l,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,position:t.position}).setPanels([{panelId:"pl",clipPath:Jw(u),isTargetByCursor:tb(u,a,n),getLinearBrushOtherExtent:Qw(u,0)}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:!0}).updateCovers(function(t){var e=t.axis;return D(t.activeIntervals,(function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}}))}(i))},_onBrush:function(t,e){var i=this.axisModel,n=i.axis,o=D(t,(function(t){return[n.coordToData(t.range[0],!0),n.coordToData(t.range[1],!0)]}));!i.option.realtime!==e.isEnd&&!e.removeOnClick||this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},dispose:function(){this._brushController.dispose()}});jd({type:"parallel",render:function(t,e,i){this._model=t,this._api=i,this._handlers||(this._handlers={},A(ob,(function(t,e){i.getZr().on(e,this._handlers[e]=P(t,this))}),this)),tc(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},dispose:function(t,e){A(this._handlers,(function(t,i){e.getZr().off(i,t)})),this._handlers=null},_throttledDispatchExpand:function(t){this._dispatchExpand(t)},_dispatchExpand:function(t){t&&this._api.dispatchAction(x({type:"parallelAxisExpand"},t))}});var ob={mousedown:function(t){ab(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(ab(this,"click")&&e){var i=[t.offsetX,t.offsetY];if(5<Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2))return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==n.behavior&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&ab(this,"mousemove")){var e=this._model,i=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),n=i.behavior;"jump"===n&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===n?null:{axisExpandWindow:i.axisExpandWindow,animation:"jump"===n&&null})}}};function ab(t,e){var i=t._model;return i.get("axisExpandable")&&i.get("axisExpandTriggerOn")===e}function rb(t,e,i,n){for(var o,a=[],r=0;r<i.length;r++){var s=i[r],l=t.get(t.mapDimension(s),e);o=l,("category"===n.getAxis(s).type?null==o:null==o||isNaN(o))||a.push(n.dataToPoint(l,s))}return a}function sb(t,e,i,n,o){var a=rb(t,i,n,o),r=new kr({shape:{points:a},silent:!0,z2:10});return e.add(r),t.setItemGraphicEl(i,r),r}function lb(t){var e=t.get("smooth",!0);return!0===e&&(e=.3),{lineStyle:t.getModel("lineStyle").getLineStyle(),smooth:null!=e?e:.3}}function ub(t,e,i,n){var o=n.lineStyle;e.hasItemOption&&(o=e.getItemModel(i).getModel("lineStyle").getLineStyle()),t.useStyle(o);var a=t.style;a.fill=null,a.stroke=e.getItemVisual(i,"color"),a.opacity=e.getItemVisual(i,"opacity"),n.smooth&&(t.shape.smooth=n.smooth)}Vd((function(t){!function(t){if(!t.parallel){var e=!1;A(t.series,(function(t){t&&"parallel"===t.type&&(e=!0)})),e&&(t.parallel=[{}])}}(t),function(t){A(bo(t.parallelAxis),(function(e){if(z(e)){var i=e.parallelIndex||0,n=bo(t.parallel)[i];n&&n.parallelAxisDefault&&v(e,n.parallelAxisDefault,!1)}}))}(t)})),Lh.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(t,e){var i=this.getSource();return function(t,e){if(!t.encodeDefine){var i=e.ecModel.getComponent("parallel",e.get("parallelIndex"));if(i){var n=t.encodeDefine=Q();A(i.dimensions,(function(t){var e=function(t){return+t.replace("dim","")}(t);n.set(t,e)}))}}}(i,this),Rf(i,this)},getRawIndicesByActiveState:function(t){var e=this.coordinateSystem,i=this.getData(),n=[];return e.eachActiveState(i,(function(e,o){t===e&&n.push(i.getRawIndex(o))})),n},defaultOption:{zlevel:0,z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"}}),Hh.extend({type:"parallel",init:function(){this._dataGroup=new yi,this.group.add(this._dataGroup)},render:function(t,e,i,n){var o=this._dataGroup,a=t.getData(),r=this._data,s=t.coordinateSystem,l=s.dimensions,u=lb(t);if(a.diff(r).add((function(t){ub(sb(a,o,t,l,s),a,t,u)})).update((function(e,i){var o=r.getItemGraphicEl(i),h=rb(a,e,l,s);a.setItemGraphicEl(e,o),Gs(o,{shape:{points:h}},n&&!1===n.animation?null:t,e),ub(o,a,e,u)})).remove((function(t){var e=r.getItemGraphicEl(t);o.remove(e)})).execute(),!this._initialized){this._initialized=!0;var h=function(t,e,i){var n=t.model,o=t.getRect(),a=new zr({shape:{x:o.x,y:o.y,width:o.width,height:o.height}}),r="horizontal"===n.get("layout")?"width":"height";return a.setShape(r,0),Fs(a,{shape:{width:o.width,height:o.height}},e,i),a}(s,t,(function(){setTimeout((function(){o.removeClipPath()}))}));o.setClipPath(h)}this._data=a},incrementalPrepareRender:function(t,e,i){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},incrementalRender:function(t,e,i){for(var n=e.getData(),o=e.coordinateSystem,a=o.dimensions,r=lb(e),s=t.start;s<t.end;s++){var l=sb(n,this._dataGroup,s,a,o);l.incremental=!0,ub(l,n,s,r)}},dispose:function(){},remove:function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null}});var hb=["lineStyle","normal","opacity"];Zd({seriesType:"parallel",reset:function(t,e,i){var n=t.getModel("itemStyle"),o=t.getModel("lineStyle"),a=e.get("color"),r=o.get("color")||n.get("color")||a[t.seriesIndex%a.length],s=t.get("inactiveOpacity"),l=t.get("activeOpacity"),u=t.getModel("lineStyle").getLineStyle(),h=t.coordinateSystem,c=t.getData(),d={normal:u.opacity,active:l,inactive:s};return c.setVisual("color",r),{progress:function(t,e){h.eachActiveState(e,(function(t,i){var n=d[t];if("normal"===t&&e.hasItemOption){var o=e.getItemModel(i).get(hb,!0);null!=o&&(n=o)}e.setItemVisual(i,"opacity",n)}),t.start,t.end)}}}});var cb=Lh.extend({type:"series.sankey",layoutInfo:null,levelModels:null,getInitialData:function(t,e){for(var i=t.edges||t.links,n=t.data||t.nodes,o=t.levels,a=this.levelModels={},r=0;r<o.length;r++)null!=o[r].depth&&0<=o[r].depth&&(a[o[r].depth]=new ol(o[r],this,e));if(n&&i)return n_(n,i,this,!0,(function(t,e){t.wrapMethod("getItemModel",(function(t,e){return t.customizeGetParent((function(t){var i=this.parentModel,n=i.getData().getItemLayout(e).depth;return i.levelModels[n]||this.parentModel})),t})),e.wrapMethod("getItemModel",(function(t,e){return t.customizeGetParent((function(t){var i=this.parentModel,n=i.getGraph().getEdgeByIndex(e).node1.getLayout().depth;return i.levelModels[n]||this.parentModel})),t}))})).data},setNodePosition:function(t,e){var i=this.option.data[t];i.localX=e[0],i.localY=e[1]},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},formatTooltip:function(t,e,i){if("edge"===i){var n=this.getDataParams(t,i),o=n.data,a=o.source+" -- "+o.target;return n.value&&(a+=" : "+n.value),Ol(a)}if("node"!==i)return cb.superCall(this,"formatTooltip",t,e);var r=this.getGraph().getNodeByIndex(t).getLayout().value,s=this.getDataParams(t,i).data.name;return r&&(a=s+" : "+r),Ol(a)},optionUpdated:function(){var t=this.option;!0===t.focusNodeAdjacency&&(t.focusNodeAdjacency="allEdges")},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,focusNodeAdjacency:!1,layoutIterations:32,label:{show:!0,position:"right",color:"#000",fontSize:12},levels:[],nodeAlign:"justify",itemStyle:{borderWidth:1,borderColor:"#333"},lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.6}},animationEasing:"linear",animationDuration:1e3}}),db=["itemStyle","opacity"],fb=["lineStyle","opacity"];function pb(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function gb(t,e,i){var n=t.getGraphicEl(),o=pb(t,e);null!=i&&(null==o&&(o=1),o*=i),n.downplay&&n.downplay(),n.traverse((function(t){"group"!==t.type&&t.setStyle("opacity",o)}))}function mb(t,e){var i=pb(t,e),n=t.getGraphicEl();n.highlight&&n.highlight(),n.traverse((function(t){"group"!==t.type&&t.setStyle("opacity",i)}))}var vb=os({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0,orient:""},buildPath:function(t,e){var i=e.extent;t.moveTo(e.x1,e.y1),t.bezierCurveTo(e.cpx1,e.cpy1,e.cpx2,e.cpy2,e.x2,e.y2),"vertical"===e.orient?(t.lineTo(e.x2+i,e.y2),t.bezierCurveTo(e.cpx2+i,e.cpy2,e.cpx1+i,e.cpy1,e.x1+i,e.y1)):(t.lineTo(e.x2,e.y2+i),t.bezierCurveTo(e.cpx2,e.cpy2+i,e.cpx1,e.cpy1+i,e.x1,e.y1+i)),t.closePath()}});function yb(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=e.depth&&0<=e.depth}function xb(t,e,i,n,o){var a="vertical"===o?"x":"y";A(t,(function(t){var r,s,l;t.sort((function(t,e){return t.getLayout()[a]-e.getLayout()[a]}));for(var u=0,h=t.length,c="vertical"===o?"dx":"dy",d=0;d<h;d++)0<(l=u-(s=t[d]).getLayout()[a])&&(r=s.getLayout()[a]+l,s.setLayout("vertical"===o?{x:r}:{y:r},!0)),u=s.getLayout()[a]+s.getLayout()[c]+e;if(0<(l=u-e-("vertical"===o?n:i)))for(r=s.getLayout()[a]-l,s.setLayout("vertical"===o?{x:r}:{y:r},!0),u=r,d=h-2;0<=d;--d)0<(l=(s=t[d]).getLayout()[a]+s.getLayout()[c]+e-u)&&(r=s.getLayout()[a]-l,s.setLayout("vertical"===o?{x:r}:{y:r},!0)),u=s.getLayout()[a]}))}function _b(t,e,i){A(t.slice().reverse(),(function(t){A(t,(function(t){if(t.outEdges.length){var n=Ib(t.outEdges,wb,i)/Ib(t.outEdges,Mb,i);if("vertical"===i){var o=t.getLayout().x+(n-Sb(t,i))*e;t.setLayout({x:o},!0)}else{var a=t.getLayout().y+(n-Sb(t,i))*e;t.setLayout({y:a},!0)}}}))}))}function wb(t,e){return Sb(t.node2,e)*t.getValue()}function bb(t,e){return Sb(t.node1,e)*t.getValue()}function Sb(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function Mb(t){return t.getValue()}function Ib(t,e,i){for(var n=0,o=t.length,a=-1;++a<o;){var r=+e.call(t,t[a],i);isNaN(r)||(n+=r)}return n}function Tb(t,e,i){A(t,(function(t){A(t,(function(t){if(t.inEdges.length){var n=Ib(t.inEdges,bb,i)/Ib(t.inEdges,Mb,i);if("vertical"===i){var o=t.getLayout().x+(n-Sb(t,i))*e;t.setLayout({x:o},!0)}else{var a=t.getLayout().y+(n-Sb(t,i))*e;t.setLayout({y:a},!0)}}}))}))}Kd({type:"sankey",_model:null,_focusAdjacencyDisabled:!1,render:function(t,e,i){var n=this,o=t.getGraph(),a=this.group,r=t.layoutInfo,s=r.width,l=r.height,u=t.getData(),h=t.getData("edge"),c=t.get("orient");this._model=t,a.removeAll(),a.attr("position",[r.x,r.y]),o.eachEdge((function(e){var i=new vb;i.dataIndex=e.dataIndex,i.seriesIndex=t.seriesIndex,i.dataType="edge";var n,o,r,u,d,f,p,g,m=e.getModel("lineStyle"),v=m.get("curveness"),y=e.node1.getLayout(),x=e.node1.getModel(),_=x.get("localX"),w=x.get("localY"),b=e.node2.getLayout(),S=e.node2.getModel(),M=S.get("localX"),I=S.get("localY"),T=e.getLayout();switch(i.shape.extent=Math.max(1,T.dy),g="vertical"===(i.shape.orient=c)?(d=n=(null!=_?_*s:y.x)+T.sy,f=(o=(null!=w?w*l:y.y)+y.dy)*(1-v)+(u=null!=I?I*l:b.y)*v,p=r=(null!=M?M*s:b.x)+T.ty,o*v+u*(1-v)):(d=(n=(null!=_?_*s:y.x)+y.dx)*(1-v)+(r=null!=M?M*s:b.x)*v,f=o=(null!=w?w*l:y.y)+T.sy,p=n*v+r*(1-v),u=(null!=I?I*l:b.y)+T.ty),i.setShape({x1:n,y1:o,x2:r,y2:u,cpx1:d,cpy1:f,cpx2:p,cpy2:g}),i.setStyle(m.getItemStyle()),i.style.fill){case"source":i.style.fill=e.node1.getVisual("color");break;case"target":i.style.fill=e.node2.getVisual("color")}Ts(i,e.getModel("emphasis.lineStyle").getItemStyle()),a.add(i),h.setItemGraphicEl(e.dataIndex,i)})),o.eachNode((function(e){var i=e.getLayout(),n=e.getModel(),o=n.get("localX"),r=n.get("localY"),h=n.getModel("label"),c=n.getModel("emphasis.label"),d=new zr({shape:{x:null!=o?o*s:i.x,y:null!=r?r*l:i.y,width:i.dx,height:i.dy},style:n.getModel("itemStyle").getItemStyle()}),f=e.getModel("emphasis.itemStyle").getItemStyle();Ls(d.style,f,h,c,{labelFetcher:t,labelDataIndex:e.dataIndex,defaultText:e.id,isRectText:!0}),d.setStyle("fill",e.getVisual("color")),Ts(d,f),a.add(d),u.setItemGraphicEl(e.dataIndex,d),d.dataType="node"})),u.eachItemGraphicEl((function(e,o){var a=u.getItemModel(o);a.get("draggable")&&(e.drift=function(e,a){n._focusAdjacencyDisabled=!0,this.shape.x+=e,this.shape.y+=a,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:u.getRawIndex(o),localX:this.shape.x/s,localY:this.shape.y/l})},e.ondragend=function(){n._focusAdjacencyDisabled=!1},e.draggable=!0,e.cursor="move"),a.get("focusNodeAdjacency")&&(e.off("mouseover").on("mouseover",(function(){n._focusAdjacencyDisabled||(n._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,dataIndex:e.dataIndex}))})),e.off("mouseout").on("mouseout",(function(){n._focusAdjacencyDisabled||n._dispatchUnfocus(i)})))})),h.eachItemGraphicEl((function(e,o){h.getItemModel(o).get("focusNodeAdjacency")&&(e.off("mouseover").on("mouseover",(function(){n._focusAdjacencyDisabled||(n._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,edgeDataIndex:e.dataIndex}))})),e.off("mouseout").on("mouseout",(function(){n._focusAdjacencyDisabled||n._dispatchUnfocus(i)})))})),!this._data&&t.get("animation")&&a.setClipPath(function(t,e,i){var n=new zr({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return Fs(n,{shape:{width:t.width+20,height:t.height+20}},e,(function(){a.removeClipPath()})),n}(a.getBoundingRect(),t)),this._data=t.getData()},dispose:function(){this._clearTimer()},_dispatchUnfocus:function(t){var e=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout((function(){e._unfocusDelayTimer=null,t.dispatchAction({type:"unfocusNodeAdjacency",seriesId:e._model.id})}),500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(t,e,i,n){var o=this._model.getData(),a=o.graph,r=n.dataIndex,s=o.getItemModel(r),l=n.edgeDataIndex;if(null!=r||null!=l){var u=a.getNodeByIndex(r),h=a.getEdgeByIndex(l);if(a.eachNode((function(t){gb(t,db,.1)})),a.eachEdge((function(t){gb(t,fb,.1)})),u){mb(u,db);var c=s.get("focusNodeAdjacency");"outEdges"===c?A(u.outEdges,(function(t){t.dataIndex<0||(mb(t,fb),mb(t.node2,db))})):"inEdges"===c?A(u.inEdges,(function(t){t.dataIndex<0||(mb(t,fb),mb(t.node1,db))})):"allEdges"===c&&A(u.edges,(function(t){t.dataIndex<0||(mb(t,fb),mb(t.node1,db),mb(t.node2,db))}))}h&&(mb(h,fb),mb(h.node1,db),mb(h.node2,db))}},unfocusNodeAdjacency:function(t,e,i,n){var o=this._model.getGraph();o.eachNode((function(t){gb(t,db)})),o.eachEdge((function(t){gb(t,fb)}))}}),Fd({type:"dragNode",event:"dragnode",update:"update"},(function(t,e){e.eachComponent({mainType:"series",subType:"sankey",query:t},(function(e){e.setNodePosition(t.dataIndex,[t.localX,t.localY])}))})),Hd((function(t,e,i){t.eachSeriesByType("sankey",(function(t){var i=t.get("nodeWidth"),n=t.get("nodeGap"),o=function(t,e){return ql(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e),a=(t.layoutInfo=o).width,r=o.height,s=t.getGraph(),l=s.nodes,u=s.edges;!function(t){A(t,(function(t){var e=Ib(t.outEdges,Mb),i=Ib(t.inEdges,Mb),n=Math.max(e,i);t.setLayout({value:n},!0)}))}(l),function(t,e,i,n,o,a,r,s,l){(function(t,e,i,n,o,a,r){for(var s=[],l=[],u=[],h=[],c=0,d=0;d<e.length;d++)s[d]=1;for(d=0;d<t.length;d++)l[d]=t[d].inEdges.length,0===l[d]&&u.push(t[d]);for(var f=-1;u.length;){for(var p=0;p<u.length;p++){var g=u[p],m=g.hostGraph.data.getRawDataItem(g.dataIndex),v=null!=m.depth&&0<=m.depth;v&&m.depth>f&&(f=m.depth),g.setLayout({depth:v?m.depth:c},!0),g.setLayout("vertical"===a?{dy:i}:{dx:i},!0);for(var y=0;y<g.outEdges.length;y++){var x=g.outEdges[y];s[e.indexOf(x)]=0;var _=x.node2;0==--l[t.indexOf(_)]&&h.indexOf(_)<0&&h.push(_)}}++c,u=h,h=[]}for(d=0;d<s.length;d++)if(1===s[d])throw new Error("Sankey is a DAG, the original data has cycle!");var w=c-1<f?f:c-1;r&&"left"!==r&&function(t,e,i,n){if("right"===e){for(var o=[],a=t,r=0;a.length;){for(var s=0;s<a.length;s++){var l=a[s];l.setLayout({skNodeHeight:r},!0);for(var u=0;u<l.inEdges.length;u++){var h=l.inEdges[u];o.indexOf(h.node1)<0&&o.push(h.node1)}}a=o,o=[],++r}A(t,(function(t){yb(t)||t.setLayout({depth:Math.max(0,n-t.getLayout().skNodeHeight)},!0)}))}else"justify"===e&&function(t,e){A(t,(function(t){yb(t)||t.outEdges.length||t.setLayout({depth:e},!0)}))}(t,n)}(t,r,0,w),function(t,e,i){A(t,(function(t){var n=t.getLayout().depth*e;t.setLayout("vertical"===i?{y:n}:{x:n},!0)}))}(t,"vertical"===a?(o-i)/w:(n-i)/w,a)})(t,e,i,o,a,s,l),function(t,e,i,n,o,a,r){var s=function(t,e){var i=[],n="vertical"===e?"y":"x",o=zo(t,(function(t){return t.getLayout()[n]}));return o.keys.sort((function(t,e){return t-e})),A(o.keys,(function(t){i.push(o.buckets.get(t))})),i}(t,r);(function(t,e,i,n,o,a){var r=1/0;A(t,(function(t){var e=t.length,s=0;A(t,(function(t){s+=t.getLayout().value}));var l="vertical"===a?(n-(e-1)*o)/s:(i-(e-1)*o)/s;l<r&&(r=l)})),A(t,(function(t){A(t,(function(t,e){var i=t.getLayout().value*r;"vertical"===a?(t.setLayout({x:e},!0),t.setLayout({dx:i},!0)):(t.setLayout({y:e},!0),t.setLayout({dy:i},!0))}))})),A(e,(function(t){var e=+t.getValue()*r;t.setLayout({dy:e},!0)}))})(s,e,i,n,o,r),xb(s,o,i,n,r);for(var l=1;0<a;a--)_b(s,l*=.99,r),xb(s,o,i,n,r),Tb(s,l,r),xb(s,o,i,n,r)}(t,e,a,o,n,r,s),function(t,e){var i="vertical"===e?"x":"y";A(t,(function(t){t.outEdges.sort((function(t,e){return t.node2.getLayout()[i]-e.node2.getLayout()[i]})),t.inEdges.sort((function(t,e){return t.node1.getLayout()[i]-e.node1.getLayout()[i]}))})),A(t,(function(t){var e=0,i=0;A(t.outEdges,(function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy})),A(t.inEdges,(function(t){t.setLayout({ty:i},!0),i+=t.getLayout().dy}))}))}(t,s)}(l,u,i,n,a,r,0!==L(l,(function(t){return 0===t.getLayout().value})).length?0:t.get("layoutIterations"),t.get("orient"),t.get("nodeAlign"))}))})),Zd((function(t,e){t.eachSeriesByType("sankey",(function(t){var e=t.getGraph().nodes;if(e.length){var i=1/0,n=-1/0;A(e,(function(t){var e=t.getLayout().value;e<i&&(i=e),n<e&&(n=e)})),A(e,(function(e){var o=new yx({type:"color",mappingMethod:"linear",dataExtent:[i,n],visual:t.get("color")}).mapValueToVisual(e.getLayout().value),a=e.getModel().get("itemStyle.color");e.setVisual("color",null!=a?a:o)}))}}))}));var Ab={_baseAxisDim:null,getInitialData:function(t,e){var i,n,o=e.getComponent("xAxis",this.get("xAxisIndex")),a=e.getComponent("yAxis",this.get("yAxisIndex")),r=o.get("type"),s=a.get("type");"category"===r?(t.layout="horizontal",i=o.getOrdinalMeta(),n=!0):"category"===s?(t.layout="vertical",i=a.getOrdinalMeta(),n=!0):t.layout=t.layout||"horizontal";var l=["x","y"],u="horizontal"===t.layout?0:1,h=this._baseAxisDim=l[u],c=l[1-u],d=[o,a],f=d[u].get("type"),p=d[1-u].get("type"),g=t.data;if(g&&n){var m=[];A(g,(function(t,e){var i;t.value&&N(t.value)?(i=t.value.slice(),t.value.unshift(e)):N(t)?(i=t.slice(),t.unshift(e)):i=t,m.push(i)})),t.data=m}var v=this.defaultValueDimensions,y=[{name:h,type:nf(f),ordinalMeta:i,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:c,type:nf(p),dimsDef:v.slice()}];return nv(this,{coordDimensions:y,dimensionsCount:v.length+1,encodeDefaulter:O(wu,y,this)})},getBaseAxis:function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis}};I(Lh.extend({type:"series.boxplot",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:2,shadowOffsetY:2,shadowColor:"rgba(0,0,0,0.4)"}},animationEasing:"elasticOut",animationDuration:800}}),Ab,!0);var Db=["itemStyle"],Cb=["emphasis","itemStyle"],Lb=(Hh.extend({type:"boxplot",render:function(t,e,i){var n=t.getData(),o=this.group,a=this._data;this._data||o.removeAll();var r="horizontal"===t.get("layout")?1:0;n.diff(a).add((function(t){if(n.hasValue(t)){var e=kb(n.getItemLayout(t),n,t,r,!0);n.setItemGraphicEl(t,e),o.add(e)}})).update((function(t,e){var i=a.getItemGraphicEl(e);if(n.hasValue(t)){var s=n.getItemLayout(t);i?Pb(s,i,n,t):i=kb(s,n,t,r),o.add(i),n.setItemGraphicEl(t,i)}else o.remove(i)})).remove((function(t){var e=a.getItemGraphicEl(t);e&&o.remove(e)})).execute(),this._data=n},remove:function(t){var e=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl((function(t){t&&e.remove(t)}))},dispose:et}),ar.extend({type:"boxplotBoxPath",shape:{},buildPath:function(t,e){var i=e.points,n=0;for(t.moveTo(i[n][0],i[n][1]),n++;n<4;n++)t.lineTo(i[n][0],i[n][1]);for(t.closePath();n<i.length;n++)t.moveTo(i[n][0],i[n][1]),n++,t.lineTo(i[n][0],i[n][1])}}));function kb(t,e,i,n,o){var a=t.ends,r=new Lb({shape:{points:o?function(t,e,i){return D(t,(function(t){return(t=t.slice())[e]=i.initBaseline,t}))}(a,n,t):a}});return Pb(t,r,e,i,o),r}function Pb(t,e,i,n,o){(0,$s[o?"initProps":"updateProps"])(e,{shape:{points:t.ends}},i.hostModel,n);var a=i.getItemModel(n),r=a.getModel(Db),s=i.getItemVisual(n,"color"),l=r.getItemStyle(["borderColor"]);l.stroke=s,l.strokeNoScale=!0,e.useStyle(l),e.z2=100,Ts(e,a.getModel(Cb).getItemStyle())}var Ob=["itemStyle","borderColor"],Nb=A;Zd((function(t,e){var i=t.get("color");t.eachRawSeriesByType("boxplot",(function(e){var n=i[e.seriesIndex%i.length],o=e.getData();o.setVisual({legendSymbol:"roundRect",color:e.get(Ob)||n}),t.isSeriesFiltered(e)||o.each((function(t){var e=o.getItemModel(t);o.setItemVisual(t,{color:e.get(Ob,!0)})}))}))})),Hd((function(t){var e=function(t){var e=[],i=[];return t.eachSeriesByType("boxplot",(function(t){var n=t.getBaseAxis(),o=S(i,n);o<0&&(i[o=i.length]=n,e[o]={axis:n,seriesModels:[]}),e[o].seriesModels.push(t)})),e}(t);Nb(e,(function(t){var e=t.seriesModels;e.length&&(function(t){var e,i,n=t.axis,o=t.seriesModels,a=o.length,r=t.boxWidthList=[],s=t.boxOffsetList=[],l=[];if("category"===n.type)i=n.getBandWidth();else{var u=0;Nb(o,(function(t){u=Math.max(u,t.getData().count())})),e=n.getExtent(),Math.abs(e[1]-e[0])}Nb(o,(function(t){var e=t.get("boxWidth");N(e)||(e=[e,e]),l.push([hl(e[0],i)||0,hl(e[1],i)||0])}));var h=.8*i-2,c=h/a*.3,d=(h-c*(a-1))/a,f=d/2-h/2;Nb(o,(function(t,e){s.push(f),f+=c+d,r.push(Math.min(Math.max(d,l[e][0]),l[e][1]))}))}(t),Nb(e,(function(e,i){!function(t,e,i){var n=t.coordinateSystem,o=t.getData(),a=i/2,r="horizontal"===t.get("layout")?0:1,s=1-r,l=["x","y"],u=o.mapDimension(l[r]),h=o.mapDimension(l[s],!0);if(!(null==u||h.length<5))for(var c=0;c<o.count();c++){var d=o.get(u,c),f=x(d,h[2],c),p=x(d,h[0],c),g=x(d,h[1],c),m=x(d,h[3],c),v=x(d,h[4],c),y=[];_(y,g,0),_(y,m,1),y.push(p,g,v,m),w(y,p),w(y,v),w(y,f),o.setItemLayout(c,{initBaseline:f[s],ends:y})}function x(t,i,a){var l,u=o.get(i,a),h=[];return h[r]=t,h[s]=u,isNaN(t)||isNaN(u)?l=[NaN,NaN]:(l=n.dataToPoint(h))[r]+=e,l}function _(t,e,i){var n=e.slice(),o=e.slice();n[r]+=a,o[r]-=a,i?t.push(n,o):t.push(o,n)}function w(t,e){var i=e.slice(),n=e.slice();i[r]-=a,n[r]+=a,t.push(i,n)}}(e,t.boxOffsetList[i],t.boxWidthList[i])})))}))})),I(Lh.extend({type:"series.candlestick",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,clip:!0,itemStyle:{color:"#c23531",color0:"#314656",borderWidth:1,borderColor:"#c23531",borderColor0:"#314656"},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationUpdate:!1,animationEasing:"linear",animationDuration:300},getShadowDim:function(){return"open"},brushSelector:function(t,e,i){var n=e.getItemLayout(t);return n&&i.rect(n.brushRect)}}),Ab,!0);var Eb=["itemStyle"],Rb=["emphasis","itemStyle"],zb=["color","color0","borderColor","borderColor0"],Bb=(Hh.extend({type:"candlestick",render:function(t,e,i){this.group.removeClipPath(),this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},incrementalPrepareRender:function(t,e,i){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e,i,n){this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(null==this._isLargeDraw||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(t){var e=t.getData(),i=this._data,n=this.group,o=e.getLayout("isSimpleBox"),a=t.get("clip",!0),r=t.coordinateSystem,s=r.getArea&&r.getArea();this._data||n.removeAll(),e.diff(i).add((function(i){if(e.hasValue(i)){var r,l=e.getItemLayout(i);if(a&&Gb(s,l))return;Fs(r=Vb(l,0,!0),{shape:{points:l.ends}},t,i),Fb(r,e,i,o),n.add(r),e.setItemGraphicEl(i,r)}})).update((function(r,l){var u=i.getItemGraphicEl(l);if(e.hasValue(r)){var h=e.getItemLayout(r);a&&Gb(s,h)?n.remove(u):(u?Gs(u,{shape:{points:h.ends}},t,r):u=Vb(h),Fb(u,e,r,o),n.add(u),e.setItemGraphicEl(r,u))}else n.remove(u)})).remove((function(t){var e=i.getItemGraphicEl(t);e&&n.remove(e)})).execute(),this._data=e},_renderLarge:function(t){this._clear(),Hb(t,this.group);var e=t.get("clip",!0)?Vg(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},_incrementalRenderNormal:function(t,e){for(var i,n=e.getData(),o=n.getLayout("isSimpleBox");null!=(i=t.next());){var a;Fb(a=Vb(n.getItemLayout(i)),n,i,o),a.incremental=!0,this.group.add(a)}},_incrementalRenderLarge:function(t,e){Hb(e,this.group,!0)},remove:function(t){this._clear()},_clear:function(){this.group.removeAll(),this._data=null},dispose:et}),ar.extend({type:"normalCandlestickBox",shape:{},buildPath:function(t,e){var i=e.points;this.__simpleBox?(t.moveTo(i[4][0],i[4][1]),t.lineTo(i[6][0],i[6][1])):(t.moveTo(i[0][0],i[0][1]),t.lineTo(i[1][0],i[1][1]),t.lineTo(i[2][0],i[2][1]),t.lineTo(i[3][0],i[3][1]),t.closePath(),t.moveTo(i[4][0],i[4][1]),t.lineTo(i[5][0],i[5][1]),t.moveTo(i[6][0],i[6][1]),t.lineTo(i[7][0],i[7][1]))}}));function Vb(t,e,i){var n=t.ends;return new Bb({shape:{points:i?function(t,e){return D(t,(function(t){return(t=t.slice())[1]=e.initBaseline,t}))}(n,t):n},z2:100})}function Gb(t,e){for(var i=!0,n=0;n<e.ends.length;n++)if(t.contain(e.ends[n][0],e.ends[n][1])){i=!1;break}return i}function Fb(t,e,i,n){var o=e.getItemModel(i),a=o.getModel(Eb),r=e.getItemVisual(i,"color"),s=e.getItemVisual(i,"borderColor")||r,l=a.getItemStyle(zb);t.useStyle(l),t.style.strokeNoScale=!0,t.style.fill=r,t.style.stroke=s,t.__simpleBox=n,Ts(t,o.getModel(Rb).getItemStyle())}var Wb=ar.extend({type:"largeCandlestickBox",shape:{},buildPath:function(t,e){for(var i=e.points,n=0;n<i.length;)if(this.__sign===i[n++]){var o=i[n++];t.moveTo(o,i[n++]),t.lineTo(o,i[n++])}else n+=3}});function Hb(t,e,i){var n=t.getData(),o=n.getLayout("largePoints"),a=new Wb({shape:{points:o},__sign:1});e.add(a);var r=new Wb({shape:{points:o},__sign:-1});e.add(r),Zb(1,a,t,n),Zb(-1,r,t,n),i&&(a.incremental=!0,r.incremental=!0)}function Zb(t,e,i,n){var o=0<t?"P":"N",a=n.getVisual("borderColor"+o)||n.getVisual("color"+o),r=i.getModel(Eb).getItemStyle(zb);e.useStyle(r),e.style.fill=null,e.style.stroke=a}var Ub=["itemStyle","borderColor"],Xb=["itemStyle","borderColor0"],Yb=["itemStyle","color"],jb=["itemStyle","color0"],qb={seriesType:"candlestick",plan:Gh(),performRawSeries:!0,reset:function(t,e){var i=t.getData(),n=t.pipelineContext.large;if(i.setVisual({legendSymbol:"roundRect",colorP:o(1,t),colorN:o(-1,t),borderColorP:a(1,t),borderColorN:a(-1,t)}),!e.isSeriesFiltered(t))return!n&&{progress:function(t,e){for(var i;null!=(i=t.next());){var n=e.getItemModel(i),r=e.getItemLayout(i).sign;e.setItemVisual(i,{color:o(r,n),borderColor:a(r,n)})}}};function o(t,e){return e.get(0<t?Yb:jb)}function a(t,e){return e.get(0<t?Ub:Xb)}}},Kb="undefined"!=typeof Float32Array?Float32Array:Array,$b={seriesType:"candlestick",plan:Gh(),reset:function(t){var e=t.coordinateSystem,i=t.getData(),n=function(t,e){var i,n=t.getBaseAxis(),o="category"===n.type?n.getBandWidth():(i=n.getExtent(),Math.abs(i[1]-i[0])/e.count()),a=hl(H(t.get("barMaxWidth"),o),o),r=hl(H(t.get("barMinWidth"),1),o),s=t.get("barWidth");return null!=s?hl(s,o):Math.max(Math.min(o/2,a),r)}(t,i),o=["x","y"],a=i.mapDimension(o[0]),r=i.mapDimension(o[1],!0),s=r[0],l=r[1],u=r[2],h=r[3];if(i.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),!(null==a||r.length<4))return{progress:t.pipelineContext.large?function(t,i){for(var n,o,r=new Kb(4*t.count),c=0,d=[],f=[];null!=(o=t.next());){var p=i.get(a,o),g=i.get(s,o),m=i.get(l,o),v=i.get(u,o),y=i.get(h,o);isNaN(p)||isNaN(v)||isNaN(y)?(r[c++]=NaN,c+=3):(r[c++]=Jb(i,o,g,m,l),d[0]=p,d[1]=v,n=e.dataToPoint(d,null,f),r[c++]=n?n[0]:NaN,r[c++]=n?n[1]:NaN,d[1]=y,n=e.dataToPoint(d,null,f),r[c++]=n?n[1]:NaN)}i.setLayout("largePoints",r)}:function(t,i){for(var o;null!=(o=t.next());){var r=i.get(a,o),c=i.get(s,o),d=i.get(l,o),f=i.get(u,o),p=i.get(h,o),g=Math.min(c,d),m=Math.max(c,d),v=b(g,r),y=b(m,r),x=b(f,r),_=b(p,r),w=[];S(w,y,0),S(w,v,1),w.push(I(_),I(y),I(x),I(v)),i.setItemLayout(o,{sign:Jb(i,o,c,d,l),initBaseline:d<c?y[1]:v[1],ends:w,brushRect:M(f,p,r)})}function b(t,i){var n=[];return n[0]=i,n[1]=t,isNaN(i)||isNaN(t)?[NaN,NaN]:e.dataToPoint(n)}function S(t,e,i){var o=e.slice(),a=e.slice();o[0]=ds(o[0]+n/2,1,!1),a[0]=ds(a[0]-n/2,1,!0),i?t.push(o,a):t.push(a,o)}function M(t,e,i){var o=b(t,i),a=b(e,i);return o[0]-=n/2,a[0]-=n/2,{x:o[0],y:o[1],width:n,height:a[1]-o[1]}}function I(t){return t[0]=ds(t[0],1),t}}}}};function Jb(t,e,i,n,o){return n<i?-1:i<n?1:0<e?t.get(o,e-1)<=n?1:-1:1}function Qb(t,e){var i=e.rippleEffectColor||e.color;t.eachChild((function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?i:null,fill:"fill"===e.brushType?i:null}})}))}function tS(t,e){yi.call(this);var i=new lg(t,e),n=new yi;this.add(i),this.add(n),n.beforeUpdate=function(){this.attr(i.getScale())},this.updateData(t,e)}Vd((function(t){t&&N(t.series)&&A(t.series,(function(t){z(t)&&"k"===t.type&&(t.type="candlestick")}))})),Zd(qb),Hd($b),Lh.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(t,e){return Rf(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",rippleEffect:{period:4,scale:2.5,brushType:"fill"},symbolSize:10}});var eS=tS.prototype;eS.stopEffectAnimation=function(){this.childAt(1).removeAll()},eS.startEffectAnimation=function(t){for(var e=t.symbolType,i=t.color,n=this.childAt(1),o=0;o<3;o++){var a=Fp(e,-1,-1,2,2,i);a.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scale:[.5,.5]});var r=-o/3*t.period+t.effectOffset;a.animate("",!0).when(t.period,{scale:[t.rippleScale/2,t.rippleScale/2]}).delay(r).start(),a.animateStyle(!0).when(t.period,{opacity:0}).delay(r).start(),n.add(a)}Qb(n,t)},eS.updateEffectAnimation=function(t){for(var e=this._effectCfg,i=this.childAt(1),n=["symbolType","period","rippleScale"],o=0;o<n.length;o++){var a=n[o];if(e[a]!==t[a])return this.stopEffectAnimation(),void this.startEffectAnimation(t)}Qb(i,t)},eS.highlight=function(){this.trigger("emphasis")},eS.downplay=function(){this.trigger("normal")},eS.updateData=function(t,e){var i=t.hostModel;this.childAt(0).updateData(t,e);var n=this.childAt(1),o=t.getItemModel(e),a=t.getItemVisual(e,"symbol"),r=function(t){return N(t)||(t=[+t,+t]),t}(t.getItemVisual(e,"symbolSize")),s=t.getItemVisual(e,"color");n.attr("scale",r),n.traverse((function(t){t.attr({fill:s})}));var l=o.getShallow("symbolOffset");if(l){var u=n.position;u[0]=hl(l[0],r[0]),u[1]=hl(l[1],r[1])}n.rotation=(o.getShallow("symbolRotate")||0)*Math.PI/180||0;var h={};if(h.showEffectOn=i.get("showEffectOn"),h.rippleScale=o.get("rippleEffect.scale"),h.brushType=o.get("rippleEffect.brushType"),h.period=1e3*o.get("rippleEffect.period"),h.effectOffset=e/t.count(),h.z=o.getShallow("z")||0,h.zlevel=o.getShallow("zlevel")||0,h.symbolType=a,h.color=s,h.rippleEffectColor=o.get("rippleEffect.color"),this.off("mouseover").off("mouseout").off("emphasis").off("normal"),"render"===h.showEffectOn)this._effectCfg?this.updateEffectAnimation(h):this.startEffectAnimation(h),this._effectCfg=h;else{this._effectCfg=null,this.stopEffectAnimation();var c=this.childAt(0),d=function(){c.highlight(),"render"!==h.showEffectOn&&this.startEffectAnimation(h)},f=function(){c.downplay(),"render"!==h.showEffectOn&&this.stopEffectAnimation()};this.on("mouseover",d,this).on("mouseout",f,this).on("emphasis",d,this).on("normal",f,this)}this._effectCfg=h},eS.fadeOut=function(t){this.off("mouseover").off("mouseout").off("emphasis").off("normal"),t&&t()},M(tS,yi),Kd({type:"effectScatter",init:function(){this._symbolDraw=new yg(tS)},render:function(t,e,i){var n=t.getData(),o=this._symbolDraw;o.updateData(n),this.group.add(o.group)},updateTransform:function(t,e,i){var n=t.getData();this.group.dirty();var o=Ug().reset(t);o.progress&&o.progress({start:0,end:n.count()},n),this._symbolDraw.updateLayout(n)},_updateGroupTransform:function(t){var e=t.coordinateSystem;e&&e.getRoamTransform&&(this.group.transform=re(e.getRoamTransform()),this.group.decomposeTransform())},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(e)},dispose:function(){}}),Zd(Zg("effectScatter","circle")),Hd(Ug("effectScatter"));var iS="undefined"==typeof Uint32Array?Array:Uint32Array,nS="undefined"==typeof Float64Array?Array:Float64Array;function oS(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=D(e,(function(t){var e={coords:[t[0].coord,t[1].coord]};return t[0].name&&(e.fromName=t[0].name),t[1].name&&(e.toName=t[1].name),y([e,t[0],t[1]])})))}var aS=Lh.extend({type:"series.lines",dependencies:["grid","polar"],visualColorAccessPath:"lineStyle.color",init:function(t){t.data=t.data||[],oS(t);var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count)),aS.superApply(this,"init",arguments)},mergeOption:function(t){if(t.data=t.data||[],oS(t),t.data){var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count))}aS.superApply(this,"mergeOption",arguments)},appendData:function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=tt(this._flatCoords,e.flatCoords),this._flatCoordsOffset=tt(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},_getCoordsFromItemModel:function(t){var e=this.getData().getItemModel(t);return e.option instanceof Array?e.option:e.getShallow("coords")},getLineCoordsCount:function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},getLineCoords:function(t,e){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[2*t],n=this._flatCoordsOffset[2*t+1],o=0;o<n;o++)e[o]=e[o]||[],e[o][0]=this._flatCoords[i+2*o],e[o][1]=this._flatCoords[i+2*o+1];return n}var a=this._getCoordsFromItemModel(t);for(o=0;o<a.length;o++)e[o]=e[o]||[],e[o][0]=a[o][0],e[o][1]=a[o][1];return a.length},_processFlatCoordsArray:function(t){var e=0;if(this._flatCoords&&(e=this._flatCoords.length),"number"!=typeof t[0])return{flatCoordsOffset:null,flatCoords:null,count:t.length};for(var i=t.length,n=new iS(i),o=new nS(i),a=0,r=0,s=0,l=0;l<i;){s++;var u=t[l++];n[r++]=a+e,n[r++]=u;for(var h=0;h<u;h++){var c=t[l++],d=t[l++];o[a++]=c,o[a++]=d}}return{flatCoordsOffset:new Uint32Array(n.buffer,0,r),flatCoords:o,count:s}},getInitialData:function(t,e){var i=new gf(["value"],this);return i.hasItemOption=!1,i.initData(t.data,[],(function(t,e,n,o){if(t instanceof Array)return NaN;i.hasItemOption=!0;var a=t.value;return null!=a?a instanceof Array?a[o]:a:void 0})),i},formatTooltip:function(t){var e=this.getData().getItemModel(t),i=e.get("name");if(i)return i;var n=e.get("fromName"),o=e.get("toName"),a=[];return null!=n&&a.push(n),null!=o&&a.push(o),Ol(a.join(" > "))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}}});function rS(t,e,i){yi.call(this),this.add(this.createLine(t,e,i)),this._updateEffectSymbol(t,e)}var sS=rS.prototype;function lS(t,e,i){yi.call(this),this._createPolyline(t,e,i)}sS.createLine=function(t,e,i){return new f_(t,e,i)},sS._updateEffectSymbol=function(t,e){var i=t.getItemModel(e).getModel("effect"),n=i.get("symbolSize"),o=i.get("symbol");N(n)||(n=[n,n]);var a=i.get("color")||t.getItemVisual(e,"color"),r=this.childAt(1);this._symbolType!==o&&(this.remove(r),(r=Fp(o,-.5,-.5,1,1,a)).z2=100,r.culling=!0,this.add(r)),r&&(r.setStyle("shadowColor",a),r.setStyle(i.getItemStyle(["color"])),r.attr("scale",n),r.setColor(a),r.attr("scale",n),this._symbolType=o,this._updateEffectAnimation(t,i,e))},sS._updateEffectAnimation=function(t,e,i){var n=this.childAt(1);if(n){var o=this,a=t.getItemLayout(i),r=1e3*e.get("period"),s=e.get("loop"),l=e.get("constantSpeed"),u=W(e.get("delay"),(function(e){return e/t.count()*r/3})),h="function"==typeof u;if(n.ignore=!0,this.updateAnimationPoints(n,a),0<l&&(r=this.getLineLength(n)/l*1e3),r!==this._period||s!==this._loop){n.stopAnimation();var c=u;h&&(c=u(i)),0<n.__t&&(c=-r*n.__t),n.__t=0;var d=n.animate("",s).when(r,{__t:1}).delay(c).during((function(){o.updateSymbolPosition(n)}));s||d.done((function(){o.remove(n)})),d.start()}this._period=r,this._loop=s}},sS.getLineLength=function(t){return mt(t.__p1,t.__cp1)+mt(t.__cp1,t.__p2)},sS.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]},sS.updateData=function(t,e,i){this.childAt(0).updateData(t,e,i),this._updateEffectSymbol(t,e)},sS.updateSymbolPosition=function(t){var e=t.__p1,i=t.__p2,n=t.__cp1,o=t.__t,a=t.position,r=ua,s=ha;a[0]=r(e[0],n[0],i[0],o),a[1]=r(e[1],n[1],i[1],o);var l=s(e[0],n[0],i[0],o),u=s(e[1],n[1],i[1],o);t.rotation=-Math.atan2(u,l)-Math.PI/2,t.ignore=!1},sS.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var i=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,i,e)},M(rS,yi);var uS=lS.prototype;function hS(t,e,i){rS.call(this,t,e,i),this._lastFrame=0,this._lastFramePercent=0}uS._createPolyline=function(t,e,i){var n=t.getItemLayout(e),o=new kr({shape:{points:n}});this.add(o),this._updateCommonStl(t,e,i)},uS.updateData=function(t,e,i){var n=t.hostModel;Gs(this.childAt(0),{shape:{points:t.getItemLayout(e)}},n,e),this._updateCommonStl(t,e,i)},uS._updateCommonStl=function(t,e,i){var n=this.childAt(0),o=t.getItemModel(e),a=t.getItemVisual(e,"color"),r=i&&i.lineStyle,s=i&&i.hoverLineStyle;i&&!t.hasItemOption||(r=o.getModel("lineStyle").getLineStyle(),s=o.getModel("emphasis.lineStyle").getLineStyle()),n.useStyle(_({strokeNoScale:!0,fill:"none",stroke:a},r)),n.hoverStyle=s,Ts(this)},uS.updateLayout=function(t,e){this.childAt(0).setShape("points",t.getItemLayout(e))},M(lS,yi);var cS=hS.prototype;cS.createLine=function(t,e,i){return new lS(t,e,i)},cS.updateAnimationPoints=function(t,e){this._points=e;for(var i=[0],n=0,o=1;o<e.length;o++)n+=mt(e[o-1],e[o]),i.push(n);if(0!==n){for(o=0;o<i.length;o++)i[o]/=n;this._offsets=i,this._length=n}},cS.getLineLength=function(t){return this._length},cS.updateSymbolPosition=function(t){var e=t.__t,i=this._points,n=this._offsets,o=i.length;if(n){var a=this._lastFrame;if(e<this._lastFramePercent){for(r=Math.min(a+1,o-1);0<=r&&!(n[r]<=e);r--);r=Math.min(r,o-2)}else{for(var r=a;r<o&&!(n[r]>e);r++);r=Math.min(r-1,o-2)}xt(t.position,i[r],i[r+1],(e-n[r])/(n[r+1]-n[r])),t.rotation=-Math.atan2(i[r+1][1]-i[r][1],i[r+1][0]-i[r][0])-Math.PI/2,this._lastFrame=r,this._lastFramePercent=e,t.ignore=!1}},M(hS,rS);var dS=os({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(t,e){var i=e.segs,n=e.curveness;if(e.polyline)for(var o=0;o<i.length;){var a=i[o++];if(0<a){t.moveTo(i[o++],i[o++]);for(var r=1;r<a;r++)t.lineTo(i[o++],i[o++])}}else for(o=0;o<i.length;){var s=i[o++],l=i[o++],u=i[o++],h=i[o++];t.moveTo(s,l),0<n?t.quadraticCurveTo((s+u)/2-(l-h)*n,(l+h)/2-(u-s)*n,u,h):t.lineTo(u,h)}},findDataIndex:function(t,e){var i=this.shape,n=i.segs,o=i.curveness;if(i.polyline)for(var a=0,r=0;r<n.length;){var s=n[r++];if(0<s)for(var l=n[r++],u=n[r++],h=1;h<s;h++)if(Ga(l,u,c=n[r++],d=n[r++]))return a;a++}else for(a=0,r=0;r<n.length;){l=n[r++],u=n[r++];var c=n[r++],d=n[r++];if(0<o){if(Wa(l,u,(l+c)/2-(u-d)*o,(u+d)/2-(c-l)*o,c,d))return a}else if(Ga(l,u,c,d))return a;a++}return-1}});function fS(){this.group=new yi}var pS=fS.prototype;pS.isPersistent=function(){return!this._incremental},pS.updateData=function(t){this.group.removeAll();var e=new dS({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},pS.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),5e5<t.count()?(this._incremental||(this._incremental=new jr({silent:!0})),this.group.add(this._incremental)):this._incremental=null},pS.incrementalUpdate=function(t,e){var i=new dS;i.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(i,e,!!this._incremental),this._incremental?this._incremental.addDisplayable(i,!0):(i.rectHover=!0,i.cursor="default",i.__startIndex=t.start,this.group.add(i))},pS.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},pS._setCommon=function(t,e,i){var n=e.hostModel;t.setShape({polyline:n.get("polyline"),curveness:n.get("lineStyle.curveness")}),t.useStyle(n.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var o=e.getVisual("color");o&&t.setStyle("stroke",o),t.setStyle("fill"),i||(t.seriesIndex=n.seriesIndex,t.on("mousemove",(function(e){t.dataIndex=null;var i=t.findDataIndex(e.offsetX,e.offsetY);0<i&&(t.dataIndex=i+t.__startIndex)})))},pS._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var gS={seriesType:"lines",plan:Gh(),reset:function(t){var e=t.coordinateSystem,i=t.get("polyline"),n=t.pipelineContext.large;return{progress:function(o,a){var r=[];if(n){var s,l=o.end-o.start;if(i){for(var u=0,h=o.start;h<o.end;h++)u+=t.getLineCoordsCount(h);s=new Float32Array(l+2*u)}else s=new Float32Array(4*l);var c=0,d=[];for(h=o.start;h<o.end;h++){var f=t.getLineCoords(h,r);i&&(s[c++]=f);for(var p=0;p<f;p++)d=e.dataToPoint(r[p],!1,d),s[c++]=d[0],s[c++]=d[1]}a.setLayout("linesPoints",s)}else for(h=o.start;h<o.end;h++){var g=a.getItemModel(h),m=(f=t.getLineCoords(h,r),[]);if(i)for(var v=0;v<f;v++)m.push(e.dataToPoint(r[v]));else{m[0]=e.dataToPoint(r[0]),m[1]=e.dataToPoint(r[1]);var y=g.get("lineStyle.curveness");+y&&(m[2]=[(m[0][0]+m[1][0])/2-(m[0][1]-m[1][1])*y,(m[0][1]+m[1][1])/2-(m[1][0]-m[0][0])*y])}a.setItemLayout(h,m)}}}}};function mS(t){return t instanceof Array||(t=[t,t]),t}Kd({type:"lines",init:function(){},render:function(t,e,i){var n=t.getData(),o=this._updateLineDraw(n,t),a=t.get("zlevel"),r=t.get("effect.trailLength"),s=i.getZr(),l="svg"===s.painter.getType();l||s.painter.getLayer(a).clear(!0),null==this._lastZlevel||l||s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&r&&(l||s.configLayer(a,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(r/10+.9,1),0)})),o.updateData(n);var u=t.get("clip",!0)&&Vg(t.coordinateSystem,!1,t);u?this.group.setClipPath(u):this.group.removeClipPath(),this._lastZlevel=a,this._finished=!0},incrementalPrepareRender:function(t,e,i){var n=t.getData();this._updateLineDraw(n,t).incrementalPrepareUpdate(n),this._clearLayer(i),this._finished=!1},incrementalRender:function(t,e,i){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,i){var n=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var a=gS.reset(t);a.progress&&a.progress({start:0,end:n.count()},n),this._lineDraw.updateLayout(),this._clearLayer(i)},_updateLineDraw:function(t,e){var i=this._lineDraw,n=this._showEffect(e),o=!!e.get("polyline"),a=e.pipelineContext.large;return i&&n===this._hasEffet&&o===this._isPolyline&&a===this._isLargeDraw||(i&&i.remove(),i=this._lineDraw=a?new fS:new g_(o?n?hS:lS:n?rS:f_),this._hasEffet=n,this._isPolyline=o,this._isLargeDraw=a,this.group.removeAll()),this.group.add(i.group),i},_showEffect:function(t){return!!t.get("effect.show")},_clearLayer:function(t){var e=t.getZr();"svg"===e.painter.getType()||null==this._lastZlevel||e.painter.getLayer(this._lastZlevel).clear(!0)},remove:function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},dispose:function(){}});var vS="lineStyle.opacity".split("."),yS={seriesType:"lines",reset:function(t,e,i){var n=mS(t.get("symbol")),o=mS(t.get("symbolSize")),a=t.getData();return a.setVisual("fromSymbol",n&&n[0]),a.setVisual("toSymbol",n&&n[1]),a.setVisual("fromSymbolSize",o&&o[0]),a.setVisual("toSymbolSize",o&&o[1]),a.setVisual("opacity",t.get(vS)),{dataEach:a.hasItemOption?function(t,e){var i=t.getItemModel(e),n=mS(i.getShallow("symbol",!0)),o=mS(i.getShallow("symbolSize",!0)),a=i.get(vS);n[0]&&t.setItemVisual(e,"fromSymbol",n[0]),n[1]&&t.setItemVisual(e,"toSymbol",n[1]),o[0]&&t.setItemVisual(e,"fromSymbolSize",o[0]),o[1]&&t.setItemVisual(e,"toSymbolSize",o[1]),t.setItemVisual(e,"opacity",a)}:null}}};function xS(){var t=w();this.canvas=t,this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={}}Hd(gS),Zd(yS),Lh.extend({type:"series.heatmap",getInitialData:function(t,e){return Rf(this.getSource(),this,{generateCoord:"value"})},preventIncremental:function(){var t=Pu.get(this.get("coordinateSystem"));if(t&&t.dimensions)return"lng"===t.dimensions[0]&&"lat"===t.dimensions[1]},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0}}),xS.prototype={update:function(t,e,i,n,o,a){var r=this._getBrush(),s=this._getGradient(t,o,"inRange"),l=this._getGradient(t,o,"outOfRange"),u=this.pointSize+this.blurSize,h=this.canvas,c=h.getContext("2d"),d=t.length;h.width=e,h.height=i;for(var f=0;f<d;++f){var p=t[f],g=p[0],m=p[1],v=n(p[2]);c.globalAlpha=v,c.drawImage(r,g-u,m-u)}if(!h.width||!h.height)return h;for(var y=c.getImageData(0,0,h.width,h.height),x=y.data,_=0,w=x.length,b=this.minOpacity,S=this.maxOpacity-b;_<w;){v=x[_+3]/256;var M=4*Math.floor(255*v);if(0<v){var I=a(v)?s:l;0<v&&(v=v*S+b),x[_++]=I[M],x[_++]=I[1+M],x[_++]=I[2+M],x[_++]=I[3+M]*v*256}else _+=4}return c.putImageData(y,0,0),h},_getBrush:function(){var t=this._brushCanvas||(this._brushCanvas=w()),e=this.pointSize+this.blurSize,i=2*e;t.width=i,t.height=i;var n=t.getContext("2d");return n.clearRect(0,0,i,i),n.shadowOffsetX=i,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-e,e,this.pointSize,0,2*Math.PI,!0),n.closePath(),n.fill(),t},_getGradient:function(t,e,i){for(var n=this._gradientPixels,o=n[i]||(n[i]=new Uint8ClampedArray(1024)),a=[0,0,0,0],r=0,s=0;s<256;s++)e[i](s/255,!0,a),o[r++]=a[0],o[r++]=a[1],o[r++]=a[2],o[r++]=a[3];return o}},Kd({type:"heatmap",render:function(t,e,i){var n;e.eachComponent("visualMap",(function(e){e.eachTargetSeries((function(i){i===t&&(n=e)}))})),this.group.removeAll(),this._incrementalDisplayable=null;var o=t.coordinateSystem;"cartesian2d"===o.type||"calendar"===o.type?this._renderOnCartesianAndCalendar(t,i,0,t.getData().count()):function(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}(o)&&this._renderOnGeo(o,t,n,i)},incrementalPrepareRender:function(t,e,i){this.group.removeAll()},incrementalRender:function(t,e,i,n){e.coordinateSystem&&this._renderOnCartesianAndCalendar(e,n,t.start,t.end,!0)},_renderOnCartesianAndCalendar:function(t,e,i,n,o){var a,r,s=t.coordinateSystem;if("cartesian2d"===s.type){var l=s.getAxis("x"),u=s.getAxis("y");a=l.getBandWidth(),r=u.getBandWidth()}for(var h=this.group,c=t.getData(),d="emphasis.itemStyle",f="emphasis.label",p=t.getModel("itemStyle").getItemStyle(["color"]),g=t.getModel(d).getItemStyle(),m=t.getModel("label"),v=t.getModel(f),y=s.type,_="cartesian2d"===y?[c.mapDimension("x"),c.mapDimension("y"),c.mapDimension("value")]:[c.mapDimension("time"),c.mapDimension("value")],w=i;w<n;w++){var b;if("cartesian2d"===y){if(isNaN(c.get(_[2],w)))continue;var S=s.dataToPoint([c.get(_[0],w),c.get(_[1],w)]);b=new zr({shape:{x:Math.floor(S[0]-a/2),y:Math.floor(S[1]-r/2),width:Math.ceil(a),height:Math.ceil(r)},style:{fill:c.getItemVisual(w,"color"),opacity:c.getItemVisual(w,"opacity")}})}else{if(isNaN(c.get(_[1],w)))continue;b=new zr({z2:1,shape:s.dataToRect([c.get(_[0],w)]).contentShape,style:{fill:c.getItemVisual(w,"color"),opacity:c.getItemVisual(w,"opacity")}})}var M=c.getItemModel(w);c.hasItemOption&&(p=M.getModel("itemStyle").getItemStyle(["color"]),g=M.getModel(d).getItemStyle(),m=M.getModel("label"),v=M.getModel(f));var I=t.getRawValue(w),T="-";I&&null!=I[2]&&(T=I[2]),Ls(p,g,m,v,{labelFetcher:t,labelDataIndex:w,defaultText:T,isRectText:!0}),b.setStyle(p),Ts(b,c.hasItemOption?g:x({},g)),(b.incremental=o)&&(b.useHoverLayer=!0),h.add(b),c.setItemGraphicEl(w,b)}},_renderOnGeo:function(t,e,i,n){var o=i.targetVisuals.inRange,a=i.targetVisuals.outOfRange,r=e.getData(),s=this._hmLayer||this._hmLayer||new xS;s.blurSize=e.get("blurSize"),s.pointSize=e.get("pointSize"),s.minOpacity=e.get("minOpacity"),s.maxOpacity=e.get("maxOpacity");var l=t.getViewRect().clone(),u=t.getRoamTransform();l.applyTransform(u);var h=Math.max(l.x,0),c=Math.max(l.y,0),d=Math.min(l.width+l.x,n.getWidth()),f=Math.min(l.height+l.y,n.getHeight()),p=d-h,g=f-c,m=[r.mapDimension("lng"),r.mapDimension("lat"),r.mapDimension("value")],v=r.mapArray(m,(function(e,i,n){var o=t.dataToPoint([e,i]);return o[0]-=h,o[1]-=c,o.push(n),o})),y=i.getExtent(),x="visualMap.continuous"===i.type?function(t,e){var i=t[1]-t[0];return e=[(e[0]-t[0])/i,(e[1]-t[0])/i],function(t){return t>=e[0]&&t<=e[1]}}(y,i.option.range):function(t,e,i){var n=t[1]-t[0],o=(e=D(e,(function(e){return{interval:[(e.interval[0]-t[0])/n,(e.interval[1]-t[0])/n]}}))).length,a=0;return function(t){for(var n=a;n<o;n++)if((r=e[n].interval)[0]<=t&&t<=r[1]){a=n;break}if(n===o)for(n=a-1;0<=n;n--){var r;if((r=e[n].interval)[0]<=t&&t<=r[1]){a=n;break}}return 0<=n&&n<o&&i[n]}}(y,i.getPieceList(),i.option.selected);s.update(v,p,g,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:a.color.getColorMapper()},x);var _=new zn({style:{width:p,height:g,x:h,y:c,image:s.canvas},silent:!0});this.group.add(_)},dispose:function(){}});var _S=zm.extend({type:"series.pictorialBar",dependencies:["grid"],defaultOption:{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,hoverAnimation:!1},getInitialData:function(t){return t.stack=null,_S.superApply(this,"getInitialData",arguments)}}),wS=["itemStyle","borderWidth"],bS=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],SS=new Mr;function MS(t,e,i,n){var o=t.getItemLayout(e),a=i.get("symbolRepeat"),r=i.get("symbolClip"),s=i.get("symbolPosition")||"start",l=(i.get("symbolRotate")||0)*Math.PI/180||0,u=i.get("symbolPatternSize")||2,h=i.isAnimationEnabled(),c={dataIndex:e,layout:o,itemModel:i,symbolType:t.getItemVisual(e,"symbol")||"circle",color:t.getItemVisual(e,"color"),symbolClip:r,symbolRepeat:a,symbolRepeatDirection:i.get("symbolRepeatDirection"),symbolPatternSize:u,rotation:l,animationModel:h?i:null,hoverAnimation:h&&i.get("hoverAnimation"),z2:i.getShallow("z",!0)||0};!function(t,e,i,n,o){var a,r=n.valueDim,s=t.get("symbolBoundingData"),l=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),u=l.toGlobalCoord(l.dataToCoord(0)),h=1-+(i[r.wh]<=0);if(N(s)){var c=[IS(l,s[0])-u,IS(l,s[1])-u];c[1]<c[0]&&c.reverse(),a=c[h]}else a=null!=s?IS(l,s)-u:e?n.coordSysExtent[r.index][h]-u:i[r.wh];o.boundingLength=a,e&&(o.repeatCutLength=i[r.wh]),o.pxSign=0<a?1:a<0?-1:0}(i,a,o,n,c),function(t,e,i,n,o,a,r,s,l,u){var h=l.valueDim,c=l.categoryDim,d=Math.abs(i[c.wh]),f=t.getItemVisual(e,"symbolSize");(f=N(f)?f.slice():(null==f&&(f="100%"),[f,f]))[c.index]=hl(f[c.index],d),f[h.index]=hl(f[h.index],n?d:Math.abs(a)),u.symbolSize=f,(u.symbolScale=[f[0]/s,f[1]/s])[h.index]*=(l.isHorizontal?-1:1)*r}(t,e,o,a,0,c.boundingLength,c.pxSign,u,n,c),function(t,e,i,n,o){var a=t.get(wS)||0;a&&(SS.attr({scale:e.slice(),rotation:i}),SS.updateTransform(),a/=SS.getLineScale(),a*=e[n.valueDim.index]),o.valueLineWidth=a}(i,c.symbolScale,l,n,c);var d=c.symbolSize,f=i.get("symbolOffset");return N(f)&&(f=[hl(f[0],d[0]),hl(f[1],d[1])]),function(t,e,i,n,o,a,r,s,l,u,h,c){var d=h.categoryDim,f=h.valueDim,p=c.pxSign,g=Math.max(e[f.index]+s,0),m=g;if(n){var v=Math.abs(l),y=W(t.get("symbolMargin"),"15%")+"",_=!1;y.lastIndexOf("!")===y.length-1&&(_=!0,y=y.slice(0,y.length-1)),y=hl(y,e[f.index]);var w=Math.max(g+2*y,0),b=_?0:2*y,S=Tl(n),M=S?n:FS((v+b)/w);w=g+2*(y=(v-M*g)/2/(_?M:M-1)),b=_?0:2*y,S||"fixed"===n||(M=u?FS((Math.abs(u)+b)/w):0),m=M*w-b,c.repeatTimes=M,c.symbolMargin=y}var I=p*(m/2),T=c.pathPosition=[];T[d.index]=i[d.wh]/2,T[f.index]="start"===r?I:"end"===r?l-I:l/2,a&&(T[0]+=a[0],T[1]+=a[1]);var A=c.bundlePosition=[];A[d.index]=i[d.xy],A[f.index]=i[f.xy];var D=c.barRectShape=x({},i);D[f.wh]=p*Math.max(Math.abs(i[f.wh]),Math.abs(T[f.index]+I)),D[d.wh]=i[d.wh];var C=c.clipShape={};C[d.xy]=-i[d.xy],C[d.wh]=h.ecSize[d.wh],C[f.xy]=0,C[f.wh]=i[f.wh]}(i,d,o,a,0,f,s,c.valueLineWidth,c.boundingLength,c.repeatCutLength,n,c),c}function IS(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function TS(t){var e=t.symbolPatternSize,i=Fp(t.symbolType,-e/2,-e/2,e,e,t.color);return i.attr({culling:!0}),"image"!==i.type&&i.setStyle({strokeNoScale:!0}),i}function AS(t,e,i,n){var o=t.__pictorialBundle,a=i.pathPosition,r=e.valueDim,s=i.repeatTimes||0,l=0,u=i.symbolSize[e.valueDim.index]+i.valueLineWidth+2*i.symbolMargin;for(BS(t,(function(t){t.__pictorialAnimationIndex=l,t.__pictorialRepeatTimes=s,l<s?VS(t,null,d(l),i,n):VS(t,null,{scale:[0,0]},i,n,(function(){o.remove(t)})),NS(t,i),l++}));l<s;l++){var h=TS(i);h.__pictorialAnimationIndex=l,h.__pictorialRepeatTimes=s,o.add(h);var c=d(l);VS(h,{position:c.position,scale:[0,0]},{scale:c.scale,rotation:c.rotation},i,n),h.on("mouseover",f).on("mouseout",p),NS(h,i)}function d(t){var e=a.slice(),n=i.pxSign,o=t;return("start"===i.symbolRepeatDirection?0<n:n<0)&&(o=s-1-t),e[r.index]=u*(o-s/2+.5)+a[r.index],{position:e,scale:i.symbolScale.slice(),rotation:i.rotation}}function f(){BS(t,(function(t){t.trigger("emphasis")}))}function p(){BS(t,(function(t){t.trigger("normal")}))}}function DS(t,e,i,n){var o=t.__pictorialBundle,a=t.__pictorialMainPath;a?VS(a,null,{position:i.pathPosition.slice(),scale:i.symbolScale.slice(),rotation:i.rotation},i,n):(a=t.__pictorialMainPath=TS(i),o.add(a),VS(a,{position:i.pathPosition.slice(),scale:[0,0],rotation:i.rotation},{scale:i.symbolScale.slice()},i,n),a.on("mouseover",(function(){this.trigger("emphasis")})).on("mouseout",(function(){this.trigger("normal")}))),NS(a,i)}function CS(t,e,i){var n=x({},e.barRectShape),o=t.__pictorialBarRect;o?VS(o,null,{shape:n},e,i):(o=t.__pictorialBarRect=new zr({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),t.add(o))}function LS(t,e,i,n){if(i.symbolClip){var o=t.__pictorialClipPath,a=x({},i.clipShape),r=e.valueDim,s=i.animationModel,l=i.dataIndex;if(o)Gs(o,{shape:a},s,l);else{a[r.wh]=0,o=new zr({shape:a}),t.__pictorialBundle.setClipPath(o),t.__pictorialClipPath=o;var u={};u[r.wh]=i.clipShape[r.wh],$s[n?"updateProps":"initProps"](o,{shape:u},s,l)}}}function kS(t,e){var i=t.getItemModel(e);return i.getAnimationDelayParams=PS,i.isAnimationEnabled=OS,i}function PS(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function OS(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function NS(t,e){t.off("emphasis").off("normal");var i=e.symbolScale.slice();e.hoverAnimation&&t.on("emphasis",(function(){this.animateTo({scale:[1.1*i[0],1.1*i[1]]},400,"elasticOut")})).on("normal",(function(){this.animateTo({scale:i.slice()},400,"elasticOut")}))}function ES(t,e,i,n){var o=new yi,a=new yi;return o.add(a),(o.__pictorialBundle=a).attr("position",i.bundlePosition.slice()),i.symbolRepeat?AS(o,e,i):DS(o,0,i),CS(o,i,n),LS(o,e,i,n),o.__pictorialShapeStr=zS(t,i),o.__pictorialSymbolMeta=i,o}function RS(t,e,i,n){var o=n.__pictorialBarRect;o&&(o.style.text=null);var a=[];BS(n,(function(t){a.push(t)})),n.__pictorialMainPath&&a.push(n.__pictorialMainPath),n.__pictorialClipPath&&(i=null),A(a,(function(t){Gs(t,{scale:[0,0]},i,e,(function(){n.parent&&n.parent.remove(n)}))})),t.setItemGraphicEl(e,null)}function zS(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function BS(t,e,i){A(t.__pictorialBundle.children(),(function(n){n!==t.__pictorialBarRect&&e.call(i,n)}))}function VS(t,e,i,n,o,a){e&&t.attr(e),n.symbolClip&&!o?i&&t.attr(i):i&&$s[o?"updateProps":"initProps"](t,i,n.animationModel,n.dataIndex,a)}function GS(t,e,i){var n=i.color,o=i.dataIndex,a=i.itemModel,r=a.getModel("itemStyle").getItemStyle(["color"]),s=a.getModel("emphasis.itemStyle").getItemStyle(),l=a.getShallow("cursor");BS(t,(function(t){t.setColor(n),t.setStyle(_({fill:n,opacity:i.opacity},r)),Ts(t,s),l&&(t.cursor=l),t.z2=i.z2}));var u={},h=t.__pictorialBarRect;Bm(h.style,u,a,n,e.seriesModel,o),Ts(h,u)}function FS(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}function WS(t,e,i,n,o){ig.call(this,t,e,i),this.type=n||"value",this.position=o||"bottom",this.orient=null}function HS(t,e,i){this.dimension="single",this.dimensions=["single"],this._axis=null,this._init(t,e,i),this.model=t}function ZS(t,e){e=e||{};var i=t.axis,n={},o=i.position,a=i.orient,r=t.coordinateSystem.getRect(),s=[r.x,r.x+r.width,r.y,r.y+r.height],l={horizontal:{top:s[2],bottom:s[3]},vertical:{left:s[0],right:s[1]}};n.position=["vertical"===a?l.vertical[o]:s[0],"horizontal"===a?l.horizontal[o]:s[3]],n.rotation=Math.PI/2*{horizontal:0,vertical:1}[a],n.labelDirection=n.tickDirection=n.nameDirection={top:-1,bottom:1,right:1,left:-1}[o],t.get("axisTick.inside")&&(n.tickDirection=-n.tickDirection),W(e.labelInside,t.get("axisLabel.inside"))&&(n.labelDirection=-n.labelDirection);var u=e.rotate;return null==u&&(u=t.get("axisLabel.rotate")),n.labelRotation="top"===o?-u:u,n.z2=1,n}Kd({type:"pictorialBar",render:function(t,e,i){var n=this.group,o=t.getData(),a=this._data,r=t.coordinateSystem,s=!!r.getBaseAxis().isHorizontal(),l=r.grid.getRect(),u={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:t,coordSys:r,coordSysExtent:[[l.x,l.x+l.width],[l.y,l.y+l.height]],isHorizontal:s,valueDim:bS[+s],categoryDim:bS[1-s]};return o.diff(a).add((function(t){if(o.hasValue(t)){var e=kS(o,t),i=MS(o,t,e,u),a=ES(o,u,i);o.setItemGraphicEl(t,a),n.add(a),GS(a,u,i)}})).update((function(t,e){var i=a.getItemGraphicEl(e);if(o.hasValue(t)){var r=kS(o,t),s=MS(o,t,r,u),l=zS(o,s);i&&l!==i.__pictorialShapeStr&&(n.remove(i),o.setItemGraphicEl(t,null),i=null),i?function(t,e,i){var n=i.animationModel,o=i.dataIndex;Gs(t.__pictorialBundle,{position:i.bundlePosition.slice()},n,o),i.symbolRepeat?AS(t,e,i,!0):DS(t,0,i,!0),CS(t,i,!0),LS(t,e,i,!0)}(i,u,s):i=ES(o,u,s,!0),o.setItemGraphicEl(t,i),i.__pictorialSymbolMeta=s,n.add(i),GS(i,u,s)}else n.remove(i)})).remove((function(t){var e=a.getItemGraphicEl(t);e&&RS(a,t,e.__pictorialSymbolMeta.animationModel,e)})).execute(),this._data=o,this.group},dispose:et,remove:function(t,e){var i=this.group,n=this._data;t.get("animation")?n&&n.eachItemGraphicEl((function(e){RS(n,e.dataIndex,t,e)})):i.removeAll()}}),Hd(O(op,"pictorialBar")),Zd(Zg("pictorialBar","roundRect")),WS.prototype={constructor:WS,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},pointToData:function(t,e){return this.coordinateSystem.pointToData(t,e)[0]},toGlobalCoord:null,toLocalCoord:null},M(WS,ig),Pu.register("single",{create:function(t,e){var i=[];return t.eachComponent("singleAxis",(function(n,o){var a=new HS(n,t,e);a.name="single_"+o,a.resize(n,e),n.coordinateSystem=a,i.push(a)})),t.eachSeries((function(e){if("singleAxis"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"singleAxis",index:e.get("singleAxisIndex"),id:e.get("singleAxisId")})[0];e.coordinateSystem=i&&i.coordinateSystem}})),i},dimensions:(HS.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:HS,_init:function(t,e,i){var n=new WS(this.dimension,Ap(t),[0,0],t.get("type"),t.get("position"));n.onBand="category"===n.type&&t.get("boundaryGap"),n.inverse=t.get("inverse"),n.orient=t.get("orient"),(t.axis=n).model=t,(n.coordinateSystem=this)._axis=n},update:function(t,e){t.eachSeries((function(t){if(t.coordinateSystem===this){var e=t.getData();A(e.mapDimension(this.dimension,!0),(function(t){this._axis.scale.unionExtentFromData(e,t)}),this),Tp(this._axis.scale,this._axis.model)}}),this)},resize:function(t,e){this._rect=ql({left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")},{width:e.getWidth(),height:e.getHeight()}),this._adjustAxis()},getRect:function(){return this._rect},_adjustAxis:function(){var t=this._rect,e=this._axis,i=e.isHorizontal(),n=i?[0,t.width]:[0,t.height],o=e.reverse?1:0;e.setExtent(n[o],n[1-o]),this._updateAxisTransform(e,i?t.x:t.y)},_updateAxisTransform:function(t,e){var i=t.getExtent(),n=i[0]+i[1],o=t.isHorizontal();t.toGlobalCoord=o?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord=o?function(t){return t-e}:function(t){return n-t+e}},getAxis:function(){return this._axis},getBaseAxis:function(){return this._axis},getAxes:function(){return[this._axis]},getTooltipAxes:function(){return{baseAxes:[this.getAxis()]}},containPoint:function(t){var e=this.getRect(),i=this.getAxis();return"horizontal"===i.orient?i.contain(i.toLocalCoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:i.contain(i.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},pointToData:function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},dataToPoint:function(t){var e=this.getAxis(),i=this.getRect(),n=[],o="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),n[o]=e.toGlobalCoord(e.dataToCoord(+t)),n[1-o]=0==o?i.y+i.height/2:i.x+i.width/2,n}}).dimensions});var US=["axisLine","axisTickLabel","axisName"],XS="splitLine",YS=Cm.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,i,n){var o=this.group;o.removeAll();var a=new fm(t,ZS(t));A(US,a.add,a),o.add(a.getGroup()),t.get(XS+".show")&&this["_"+XS](t),YS.superCall(this,"render",t,e,i,n)},_splitLine:function(t){var e=t.axis;if(!e.scale.isBlank()){var i=t.getModel("splitLine"),n=i.getModel("lineStyle"),o=n.get("width"),a=n.get("color");a=a instanceof Array?a:[a];for(var r=t.coordinateSystem.getRect(),s=e.isHorizontal(),l=[],u=0,h=e.getTicksCoords({tickModel:i}),c=[],d=[],f=0;f<h.length;++f){var p=e.toGlobalCoord(h[f].coord);s?(c[0]=p,c[1]=r.y,d[0]=p,d[1]=r.y+r.height):(c[0]=r.x,c[1]=p,d[0]=r.x+r.width,d[1]=p);var g=u++%a.length;l[g]=l[g]||[],l[g].push(new Vr({subPixelOptimize:!0,shape:{x1:c[0],y1:c[1],x2:d[0],y2:d[1]},style:{lineWidth:o},silent:!0}))}for(f=0;f<l.length;++f)this.group.add(hs(l[f],{style:{stroke:a[f%a.length],lineDash:n.getLineDash(o),lineWidth:o},silent:!0}))}}}),jS=ou.extend({type:"singleAxis",layoutMode:"box",axis:null,coordinateSystem:null,getCoordSysModel:function(){return this}});function qS(t,e){var i,n=[],o=t.seriesIndex;if(null==o||!(i=e.getSeriesByIndex(o)))return{point:[]};var a=i.getData(),r=Lo(a,t);if(null==r||r<0||N(r))return{point:[]};var s=a.getItemGraphicEl(r),l=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(r)||[];else if(l&&l.dataToPoint)n=l.dataToPoint(a.getValues(D(l.dimensions,(function(t){return a.mapDimension(t)})),r,!0))||[];else if(s){var u=s.getBoundingRect().clone();u.applyTransform(s.transform),n=[u.x+u.width/2,u.y+u.height/2]}return{point:n,el:s}}v(jS.prototype,Pp),tm("single",jS,(function(t,e){return e.type||(e.data?"category":"value")}),{left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}});var KS=A,$S=O,JS=ko();function QS(t,e,i,n,o){var a=t.axis;if(!a.scale.isBlank()&&a.containData(e))if(t.involveSeries){var r=function(t,e){var i=e.axis,n=i.dim,o=t,a=[],r=Number.MAX_VALUE,s=-1;return KS(e.seriesModels,(function(e,l){var u,h,c=e.getData().mapDimension(n,!0);if(e.getAxisTooltipData){var d=e.getAxisTooltipData(c,t,i);h=d.dataIndices,u=d.nestestValue}else{if(!(h=e.getData().indicesOfNearest(c[0],t,"category"===i.type?.5:null)).length)return;u=e.getData().get(c[0],h[0])}if(null!=u&&isFinite(u)){var f=t-u,p=Math.abs(f);p<=r&&((p<r||0<=f&&s<0)&&(r=p,s=f,o=u,a.length=0),KS(h,(function(t){a.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})})))}})),{payloadBatch:a,snapToValue:o}}(e,t),s=r.payloadBatch,l=r.snapToValue;s[0]&&null==o.seriesIndex&&x(o,s[0]),!n&&t.snap&&a.containData(l)&&null!=l&&(e=l),i.showPointer(t,e,s,o),i.showTooltip(t,r,l)}else i.showPointer(t,e)}function tM(t,e,i,n){t[e.key]={value:i,payloadBatch:n}}function eM(t,e,i,n){var o=i.payloadBatch,a=e.axis,r=a.model,s=e.axisPointerModel;if(e.triggerTooltip&&o.length){var l=e.coordSys.model,u=Dm(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:a.dim,axisIndex:r.componentIndex,axisType:r.type,axisId:r.id,value:n,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:o.slice()})}}function iM(t){var e=t.axis.model,i={},n=i.axisDim=t.axis.dim;return i.axisIndex=i[n+"AxisIndex"]=e.componentIndex,i.axisName=i[n+"AxisName"]=e.name,i.axisId=i[n+"AxisId"]=e.id,i}function nM(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}Yd({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}}});var oM=ko(),aM=A;function rM(t,e,i){if(!o.node){var n=e.getZr();oM(n).records||(oM(n).records={}),function(t,e){function i(i,n){t.on(i,(function(i){var o=function(t){var e={showTip:[],hideTip:[]},i=function(n){var o=e[n.type];o?o.push(n):(n.dispatchAction=i,t.dispatchAction(n))};return{dispatchAction:i,pendings:e}}(e);aM(oM(t).records,(function(t){t&&n(t,i,o.dispatchAction)})),function(t,e){var i,n=t.showTip.length,o=t.hideTip.length;n?i=t.showTip[n-1]:o&&(i=t.hideTip[o-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}(o.pendings,e)}))}oM(t).initialized||(oM(t).initialized=!0,i("click",O(lM,"click")),i("mousemove",O(lM,"mousemove")),i("globalout",sM))}(n,e),(oM(n).records[t]||(oM(n).records[t]={})).handler=i}}function sM(t,e,i){t.handler("leave",null,i)}function lM(t,e,i,n){e.handler(t,i,n)}function uM(t,e){if(!o.node){var i=e.getZr();(oM(i).records||{})[t]&&(oM(i).records[t]=null)}}var hM=jd({type:"axisPointer",render:function(t,e,i){var n=e.getComponent("tooltip"),o=t.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";rM("axisPointer",i,(function(t,e,i){"none"!==o&&("leave"===t||0<=o.indexOf(t))&&i({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})}))},remove:function(t,e){uM(e.getZr(),"axisPointer"),hM.superApply(this._model,"remove",arguments)},dispose:function(t,e){uM("axisPointer",e),hM.superApply(this._model,"dispose",arguments)}}),cM=ko(),dM=m,fM=P;function pM(){}function gM(t,e,i,n){!function t(e,i){if(z(e)&&z(i)){var n=!0;return A(i,(function(i,o){n=n&&t(e[o],i)})),!!n}return e===i}(cM(i).lastProp,n)&&(cM(i).lastProp=n,e?Gs(i,n,t):(i.stopAnimation(),i.attr(n)))}function mM(t,e){t[e.get("label.show")?"show":"hide"]()}function vM(t){return{position:t.position.slice(),rotation:t.rotation||0}}function yM(t,e,i){var n=e.get("z"),o=e.get("zlevel");t&&t.traverse((function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=o&&(t.zlevel=o),t.silent=i)}))}function xM(t){var e,i=t.get("type"),n=t.getModel(i+"Style");return"line"===i?(e=n.getLineStyle()).fill=null:"shadow"===i&&((e=n.getAreaStyle()).stroke=null),e}function _M(t,e,i,n,o){var a=wM(i.get("value"),e.axis,e.ecModel,i.get("seriesDataIndices"),{precision:i.get("label.precision"),formatter:i.get("label.formatter")}),r=i.getModel("label"),s=Ll(r.get("padding")||0),l=r.getFont(),u=Ji(a,l),h=o.position,c=u.width+s[1]+s[3],d=u.height+s[0]+s[2],f=o.align;"right"===f&&(h[0]-=c),"center"===f&&(h[0]-=c/2);var p=o.verticalAlign;"bottom"===p&&(h[1]-=d),"middle"===p&&(h[1]-=d/2),function(t,e,i,n){var o=n.getWidth(),a=n.getHeight();t[0]=Math.min(t[0]+e,o)-e,t[1]=Math.min(t[1]+i,a)-i,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}(h,c,d,n);var g=r.get("backgroundColor");g&&"auto"!==g||(g=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:c,height:d,r:r.get("borderRadius")},position:h.slice(),style:{text:a,textFont:l,textFill:r.getTextColor(),textPosition:"inside",textPadding:s,fill:g,stroke:r.get("borderColor")||"transparent",lineWidth:r.get("borderWidth")||0,shadowBlur:r.get("shadowBlur"),shadowColor:r.get("shadowColor"),shadowOffsetX:r.get("shadowOffsetX"),shadowOffsetY:r.get("shadowOffsetY")},z2:10}}function wM(t,e,i,n,o){t=e.scale.parse(t);var a=e.scale.getLabel(t,{precision:o.precision}),r=o.formatter;if(r){var s={value:Cp(e,t),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};A(n,(function(t){var e=i.getSeriesByIndex(t.seriesIndex),n=e&&e.getDataParams(t.dataIndexInside);n&&s.seriesData.push(n)})),R(r)?a=r.replace("{value}",a):E(r)&&(a=r(s))}return a}function bM(t,e,i){var n=Jt();return ne(n,n,i.rotation),ie(n,n,i.position),Hs([t.dataToCoord(e),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],n)}function SM(t,e,i,n,o,a){var r=fm.innerTextLayout(i.rotation,0,i.labelDirection);i.labelMargin=o.get("label.margin"),_M(e,n,o,a,{position:bM(n.axis,t,i),align:r.textAlign,verticalAlign:r.textVerticalAlign})}function MM(t,e,i){return{x1:t[i=i||0],y1:t[1-i],x2:e[i],y2:e[1-i]}}function IM(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}}function TM(t,e,i,n,o,a){return{cx:t,cy:e,r0:i,r:n,startAngle:o,endAngle:a,clockwise:!0}}Go((pM.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,i,n){var o=e.get("value"),a=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,n||this._lastValue!==o||this._lastStatus!==a){this._lastValue=o,this._lastStatus=a;var r=this._group,s=this._handle;if(!a||"hide"===a)return r&&r.hide(),void(s&&s.hide());r&&r.show(),s&&s.show();var l={};this.makeElOption(l,o,t,e,i);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=u;var h=this._moveAnimation=this.determineAnimation(t,e);if(r){var c=O(gM,e,h);this.updatePointerEl(r,l,c,e),this.updateLabelEl(r,l,c,e)}else r=this._group=new yi,this.createPointerEl(r,l,t,e),this.createLabelEl(r,l,t,e),i.getZr().add(r);yM(r,e,!0),this._renderHandle(o)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var i=e.get("animation"),n=t.axis,o="category"===n.type,a=e.get("snap");if(!a&&!o)return!1;if("auto"!==i&&null!=i)return!0===i;var r=this.animationThreshold;if(o&&n.getBandWidth()>r)return!0;if(a){var s=Tm(t).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>r}return!1},makeElOption:function(t,e,i,n,o){},createPointerEl:function(t,e,i,n){var o=e.pointer;if(o){var a=cM(t).pointerEl=new $s[o.type](dM(e.pointer));t.add(a)}},createLabelEl:function(t,e,i,n){if(e.label){var o=cM(t).labelEl=new zr(dM(e.label));t.add(o),mM(o,n)}},updatePointerEl:function(t,e,i){var n=cM(t).pointerEl;n&&e.pointer&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var o=cM(t).labelEl;o&&(o.setStyle(e.label.style),i(o,{shape:e.label.shape,position:e.label.position}),mM(o,n))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e,i=this._axisPointerModel,n=this._api.getZr(),o=this._handle,a=i.getModel("handle"),r=i.get("status");if(!a.get("show")||!r||"hide"===r)return o&&n.remove(o),void(this._handle=null);this._handle||(e=!0,o=this._handle=Ys(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Gt(t.event)},onmousedown:fM(this._onHandleDragMove,this,0,0),drift:fM(this._onHandleDragMove,this),ondragend:fM(this._onHandleDragEnd,this)}),n.add(o)),yM(o,i,!1),o.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=a.get("size");N(s)||(s=[s,s]),o.attr("scale",[s[0]/2,s[1]/2]),tc(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},_moveHandleToValue:function(t,e){gM(this._axisPointerModel,!e&&this._moveAnimation,this._handle,vM(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(vM(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(vM(n)),cM(i).lastProp=null,this._doDispatchAxisPointer()}},_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}]})}},_onHandleDragEnd:function(t){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}}}).constructor=pM);var AM=pM.extend({makeElOption:function(t,e,i,n,o){var a=i.axis,r=a.grid,s=n.get("type"),l=DM(r,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(e,!0));if(s&&"none"!==s){var h=xM(n),c=CM[s](a,u,l);c.style=h,t.graphicKey=c.type,t.pointer=c}SM(e,t,Om(r.model,i),i,n,o)},getHandleTransform:function(t,e,i){var n=Om(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:bM(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var o=i.axis,a=o.grid,r=o.getGlobalExtent(!0),s=DM(a,o).getOtherAxis(o).getGlobalExtent(),l="x"===o.dim?0:1,u=t.position;u[l]+=e[l],u[l]=Math.min(r[1],u[l]),u[l]=Math.max(r[0],u[l]);var h=(s[1]+s[0])/2,c=[h,h];return c[l]=u[l],{position:u,rotation:t.rotation,cursorPoint:c,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}}});function DM(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}var CM={line:function(t,e,i){return{type:"Line",subPixelOptimize:!0,shape:MM([e,i[0]],[e,i[1]],LM(t))}},shadow:function(t,e,i){var n=Math.max(1,t.getBandWidth());return{type:"Rect",shape:IM([e-n/2,i[0]],[n,i[1]-i[0]],LM(t))}}};function LM(t){return"x"===t.dim?0:1}Cm.registerAxisPointerClass("CartesianAxisPointer",AM),Vd((function(t){if(t){t.axisPointer&&0!==t.axisPointer.length||(t.axisPointer={});var e=t.axisPointer.link;e&&!N(e)&&(t.axisPointer.link=[e])}})),Gd(Jc.PROCESSOR.STATISTIC,(function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=function(t,e){var i={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(t,e,i){var n=e.getComponent("tooltip"),o=e.getComponent("axisPointer"),a=o.get("link",!0)||[],r=[];Sm(i.getCoordinateSystems(),(function(i){if(i.axisPointerEnabled){var s=Dm(i.model),l=t.coordSysAxesInfo[s]={},u=(t.coordSysMap[s]=i).model.getModel("tooltip",n);if(Sm(i.getAxes(),Mm(f,!1,null)),i.getTooltipAxes&&n&&u.get("show")){var h="axis"===u.get("trigger"),c="cross"===u.get("axisPointer.type"),d=i.getTooltipAxes(u.get("axisPointer.axis"));(h||c)&&Sm(d.baseAxes,Mm(f,!c||"cross",h)),c&&Sm(d.otherAxes,Mm(f,"cross",!1))}}function f(n,s,h){var c=h.model.getModel("axisPointer",o),d=c.get("show");if(d&&("auto"!==d||n||Am(c))){null==s&&(s=c.get("triggerTooltip"));var f=(c=n?function(t,e,i,n,o,a){var r=e.getModel("axisPointer"),s={};Sm(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],(function(t){s[t]=m(r.get(t))})),s.snap="category"!==t.type&&!!a,"cross"===r.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===o){var u=r.get("label.show");if(l.show=null==u||u,!a){var h=s.lineStyle=r.get("crossStyle");h&&_(l,h.textStyle)}}return t.model.getModel("axisPointer",new ol(s,i,n))}(h,u,o,e,n,s):c).get("snap"),p=Dm(h.model),g=s||f||"category"===h.type,v=t.axesInfo[p]={key:p,axis:h,coordSys:i,axisPointerModel:c,triggerTooltip:s,involveSeries:g,snap:f,useHandle:Am(c),seriesModels:[]};l[p]=v,t.seriesInvolved|=g;var y=function(t,e){for(var i=e.model,n=e.dim,o=0;o<t.length;o++){var a=t[o]||{};if(Im(a[n+"AxisId"],i.id)||Im(a[n+"AxisIndex"],i.componentIndex)||Im(a[n+"AxisName"],i.name))return o}}(a,h);if(null!=y){var x=r[y]||(r[y]={axesInfo:{}});x.axesInfo[p]=v,x.mapper=a[y].mapper,v.linkGroup=x}}}}))}(i,t,e),i.seriesInvolved&&function(t,e){e.eachSeries((function(e){var i=e.coordinateSystem,n=e.get("tooltip.trigger",!0),o=e.get("tooltip.show",!0);i&&"none"!==n&&!1!==n&&"item"!==n&&!1!==o&&!1!==e.get("axisPointer.show",!0)&&Sm(t.coordSysAxesInfo[Dm(i.model)],(function(t){var n=t.axis;i.getAxis(n.dim)===n&&(t.seriesModels.push(e),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=e.getData().count())}))}),this)}(i,t),i}(t,e)})),Fd({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},(function(t,e,i){var n=t.currTrigger,o=[t.x,t.y],a=t,r=t.dispatchAction||P(i.dispatchAction,i),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){nM(o)&&(o=qS({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=nM(o),u=a.axesInfo,h=s.axesInfo,c="leave"===n||nM(o),d={},f={},p={list:[],map:{}},g={showPointer:$S(tM,f),showTooltip:$S(eM,p)};KS(s.coordSysMap,(function(t,e){var i=l||t.containPoint(o);KS(s.coordSysAxesInfo[e],(function(t,e){var n=t.axis,a=function(t,e){for(var i=0;i<(t||[]).length;i++){var n=t[i];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}(u,t);if(!c&&i&&(!u||a)){var r=a&&a.value;null!=r||l||(r=n.pointToData(o)),null!=r&&QS(t,r,g,!1,d)}}))}));var m={};return KS(h,(function(t,e){var i=t.linkGroup;i&&!f[e]&&KS(i.axesInfo,(function(e,n){var o=f[n];if(e!==t&&o){var a=o.value;i.mapper&&(a=t.axis.scale.parse(i.mapper(a,iM(e),iM(t)))),m[t.key]=a}}))})),KS(m,(function(t,e){QS(h[e],t,g,!0,d)})),function(t,e,i){var n=i.axesInfo=[];KS(e,(function(e,i){var o=e.axisPointerModel.option,a=t[i];a?(e.useHandle||(o.status="show"),o.value=a.value,o.seriesDataIndices=(a.payloadBatch||[]).slice()):e.useHandle||(o.status="hide"),"show"===o.status&&n.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:o.value})}))}(f,h,d),function(t,e,i,n){if(nM(e)||!t.list.length)return n({type:"hideTip"});var o=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:i.tooltipOption,position:i.position,dataIndexInside:o.dataIndexInside,dataIndex:o.dataIndex,seriesIndex:o.seriesIndex,dataByCoordSys:t.list})}(p,o,t,r),function(t,e,i){var n=i.getZr(),o="axisPointerLastHighlights",a=JS(n)[o]||{},r=JS(n)[o]={};KS(t,(function(t,e){var i=t.axisPointerModel.option;"show"===i.status&&KS(i.seriesDataIndices,(function(t){r[t.seriesIndex+" | "+t.dataIndex]=t}))}));var s=[],l=[];A(a,(function(t,e){r[e]||l.push(t)})),A(r,(function(t,e){a[e]||s.push(t)})),l.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,batch:l}),s.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,batch:s})}(h,0,i),d}}));var kM=["x","y"],PM=["width","height"],OM=pM.extend({makeElOption:function(t,e,i,n,o){var a=i.axis,r=a.coordinateSystem,s=RM(r,1-EM(a)),l=r.dataToPoint(e)[0],u=n.get("type");if(u&&"none"!==u){var h=xM(n),c=NM[u](a,l,s);c.style=h,t.graphicKey=c.type,t.pointer=c}SM(e,t,ZS(i),i,n,o)},getHandleTransform:function(t,e,i){var n=ZS(e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:bM(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var o=i.axis,a=o.coordinateSystem,r=EM(o),s=RM(a,r),l=t.position;l[r]+=e[r],l[r]=Math.min(s[1],l[r]),l[r]=Math.max(s[0],l[r]);var u=RM(a,1-r),h=(u[1]+u[0])/2,c=[h,h];return c[r]=l[r],{position:l,rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}}}),NM={line:function(t,e,i){return{type:"Line",subPixelOptimize:!0,shape:MM([e,i[0]],[e,i[1]],EM(t))}},shadow:function(t,e,i){var n=t.getBandWidth();return{type:"Rect",shape:IM([e-n/2,i[0]],[n,i[1]-i[0]],EM(t))}}};function EM(t){return t.isHorizontal()?0:1}function RM(t,e){var i=t.getRect();return[i[kM[e]],i[kM[e]]+i[PM[e]]]}Cm.registerAxisPointerClass("SingleAxisPointer",OM),jd({type:"single"});var zM=Lh.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(t){zM.superApply(this,"init",arguments),this.legendVisualProvider=new av(P(this.getData,this),P(this.getRawData,this))},fixData:function(t){var e=t.length,i=zo(t,(function(t){return t[2]})),n=[];i.buckets.each((function(t,e){n.push({name:e,dataList:t})}));for(var o=n.length,a=-1,r=-1,s=0;s<o;++s){var l=n[s].dataList.length;a<l&&(a=l,r=s)}for(var u=0;u<o;++u)if(u!==r)for(var h=n[u].name,c=0;c<a;++c){for(var d=n[r].dataList[c][0],f=n[u].dataList.length,p=-1,g=0;g<f;++g)if(n[u].dataList[g][0]===d){p=g;break}-1===p&&(t[e]=[],t[e][0]=d,t[e][1]=0,t[e][2]=h,e++)}return t},getInitialData:function(t,e){for(var i=e.queryComponents({mainType:"singleAxis",index:this.get("singleAxisIndex"),id:this.get("singleAxisId")})[0].get("type"),n=L(t.data,(function(t){return void 0!==t[2]})),o=this.fixData(n||[]),a=[],r=this.nameMap=Q(),s=0,l=0;l<o.length;++l)a.push(o[l][2]),r.get(o[l][2])||(r.set(o[l][2],s),s++);var u=Cf(o,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:nf(i)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}),h=new gf(u,this);return h.initData(o),h},getLayerSeries:function(){for(var t=this.getData(),e=t.count(),i=[],n=0;n<e;++n)i[n]=n;var o=t.mapDimension("single"),a=zo(i,(function(e){return t.get("name",e)})),r=[];return a.buckets.each((function(e,i){e.sort((function(e,i){return t.get(o,e)-t.get(o,i)})),r.push({name:i,indices:e})})),r},getAxisTooltipData:function(t,e,i){N(t)||(t=t?[t]:[]);for(var n,o=this.getData(),a=this.getLayerSeries(),r=[],s=a.length,l=0;l<s;++l){for(var u=Number.MAX_VALUE,h=-1,c=a[l].indices.length,d=0;d<c;++d){var f=o.get(t[0],a[l].indices[d]),p=Math.abs(f-e);p<=u&&(n=f,u=p,h=a[l].indices[d])}r.push(h)}return{dataIndices:r,nestestValue:n}},formatTooltip:function(t){var e=this.getData(),i=e.getName(t),n=e.get(e.mapDimension("value"),t);return!isNaN(n)&&null!=n||(n="-"),Ol(i+" : "+n)},defaultOption:{zlevel:0,z:2,coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",color:"#000",fontSize:11},emphasis:{label:{show:!0}}}});function BM(t,e,i){if(t.count())for(var n,o=e.coordinateSystem,a=e.getLayerSeries(),r=t.mapDimension("single"),s=t.mapDimension("value"),l=D(a,(function(e){return D(e.indices,(function(e){var i=o.dataToPoint(t.get(r,e));return i[1]=t.get(s,e),i}))})),u=function(t){for(var e=t.length,i=t[0].length,n=[],o=[],a=0,r={},s=0;s<i;++s){for(var l=0,u=0;l<e;++l)u+=t[l][s][1];a<u&&(a=u),n.push(u)}for(var h=0;h<i;++h)o[h]=(a-n[h])/2;for(var c=a=0;c<i;++c){var d=n[c]+o[c];a<d&&(a=d)}return r.y0=o,r.max=a,r}(l),h=u.y0,c=i/u.max,d=a.length,f=a[0].indices.length,p=0;p<f;++p){t.setItemLayout(a[0].indices[p],{layerIndex:0,x:l[0][p][0],y0:n=h[p]*c,y:l[0][p][1]*c});for(var g=1;g<d;++g)t.setItemLayout(a[g].indices[p],{layerIndex:g,x:l[g][p][0],y0:n+=l[g-1][p][1]*c,y:l[g][p][1]*c})}}function VM(t,e,i){yi.call(this);var n=new Tr({z2:2});n.seriesIndex=e.seriesIndex;var o=new br({z2:4,silent:t.getModel("label").get("silent")});function a(){o.ignore=o.hoverIgnore}function r(){o.ignore=o.normalIgnore}this.add(n),this.add(o),this.updateData(!0,t,"normal",e,i),this.on("emphasis",a).on("normal",r).on("mouseover",a).on("mouseout",r)}Kd({type:"themeRiver",init:function(){this._layers=[]},render:function(t,e,i){var n=t.getData(),o=this.group,a=t.getLayerSeries(),r=n.getLayout("layoutInfo");function s(t){return t.name}o.attr("position",[0,r.rect.y+r.boundaryGap[0]]);var l=new Jd(this._layersSeries||[],a,s,s),u={};function h(e,i,r){var s=this._layers;if("remove"!==e){for(var l,h,c,d=[],f=[],p=a[i].indices,g=0;g<p.length;g++){var m=n.getItemLayout(p[g]),v=m.x,y=m.y0,_=m.y;d.push([v,y]),f.push([v,y+_]),l=n.getItemVisual(p[g],"color")}var w=n.getItemLayout(p[0]),b=n.getItemModel(p[g-1]),S=b.getModel("label"),M=S.get("margin");if("add"===e){var I=u[i]=new yi;h=new Rg({shape:{points:d,stackedOnPoints:f,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),c=new br({style:{x:w.x-M,y:w.y0+w.y/2}}),I.add(h),I.add(c),o.add(I),h.setClipPath(function(t,e,i){var n=new zr({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return Fs(n,{shape:{width:t.width+20,height:t.height+20}},e,(function(){h.removeClipPath()})),n}(h.getBoundingRect(),t))}else h=(I=s[r]).childAt(0),c=I.childAt(1),o.add(I),u[i]=I,Gs(h,{shape:{points:d,stackedOnPoints:f}},t),Gs(c,{style:{x:w.x-M,y:w.y0+w.y/2}},t);var T=b.getModel("emphasis.itemStyle"),A=b.getModel("itemStyle");Ps(c.style,S,{text:S.get("show")?t.getFormattedLabel(p[g-1],"normal")||n.getName(p[g-1]):null,textVerticalAlign:"middle"}),h.setStyle(x({fill:l},A.getItemStyle(["color"]))),Ts(h,T.getItemStyle())}else o.remove(s[i])}l.add(P(h,this,"add")).update(P(h,this,"update")).remove(P(h,this,"remove")).execute(),this._layersSeries=a,this._layers=u},dispose:function(){}}),Hd((function(t,e){t.eachSeriesByType("themeRiver",(function(t){var e=t.getData(),i=t.coordinateSystem,n={},o=i.getRect();n.rect=o;var a=t.get("boundaryGap"),r=i.getAxis();n.boundaryGap=a,"horizontal"===r.orient?(a[0]=hl(a[0],o.height),a[1]=hl(a[1],o.height),BM(e,t,o.height-a[0]-a[1])):(a[0]=hl(a[0],o.width),a[1]=hl(a[1],o.width),BM(e,t,o.width-a[0]-a[1])),e.setLayout("layoutInfo",n)}))})),Zd((function(t){t.eachSeriesByType("themeRiver",(function(t){var e=t.getData(),i=t.getRawData(),n=t.get("color"),o=Q();e.each((function(t){o.set(e.getRawIndex(t),t)})),i.each((function(a){var r=i.getName(a),s=n[(t.nameMap.get(r)-1)%n.length];i.setItemVisual(a,"color",s);var l=o.get(a);null!=l&&e.setItemVisual(l,"color",s)}))}))})),Gd(yv("themeRiver")),Lh.extend({type:"series.sunburst",_viewRoot:null,getInitialData:function(t,e){var i={name:t.name,children:t.data};!function t(e){var i=0;A(e.children,(function(e){t(e);var n=e.value;N(n)&&(n=n[0]),i+=n}));var n=e.value;N(n)&&(n=n[0]),null!=n&&!isNaN(n)||(n=i),n<0&&(n=0),N(e.value)?e.value[0]=n:e.value=n}(i);var n={};return n.levels=t.levels||[],Ey.createTree(i,this,n).data},optionUpdated:function(){this.resetViewRoot()},getDataParams:function(t){var e=Lh.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=Qy(i,this),e},defaultOption:{zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,percentPrecision:2,stillShowZeroSum:!0,highlightPolicy:"descendant",nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0,emphasis:{}},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1,emphasis:{},highlight:{opacity:1},downplay:{opacity:.9}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicOut",data:[],levels:[],sort:"desc"},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)}});var GM=VM.prototype;GM.updateData=function(t,e,i,n,o){(this.node=e).piece=this,n=n||this._seriesModel,o=o||this._ecModel;var a=this.childAt(0);a.dataIndex=e.dataIndex;var r=e.getModel(),s=e.getLayout(),l=x({},s);l.label=null;var u=function(t,e,i){var n=t.getVisual("color"),o=t.getVisual("visualMeta");o&&0!==o.length||(n=null);var a=t.getModel("itemStyle").get("color");if(a)return a;if(n)return n;if(0===t.depth)return i.option.color[0];var r=i.option.color.length;return i.option.color[function(t){for(var e=t;1<e.depth;)e=e.parentNode;return S(t.getAncestors()[0].children,e)}(t)%r]}(e,0,o);!function(t,e,i){e.getData().setItemVisual(t.dataIndex,"color",i)}(e,n,u);var h,c=r.getModel("itemStyle").getItemStyle();h=_({lineJoin:"bevel",fill:(h="normal"===i?c:v(r.getModel(i+".itemStyle").getItemStyle(),c)).fill||u},h),t?(a.setShape(l),a.shape.r=s.r0,Gs(a,{shape:{r:s.r}},n,e.dataIndex),a.useStyle(h)):"object"==typeof h.fill&&h.fill.type||"object"==typeof a.style.fill&&a.style.fill.type?(Gs(a,{shape:l},n),a.useStyle(h)):Gs(a,{shape:l,style:h},n),this._updateLabel(n,u,i);var d=r.getShallow("cursor");if(d&&a.attr("cursor",d),t){var f=n.getShallow("highlightPolicy");this._initEvents(a,e,n,f)}this._seriesModel=n||this._seriesModel,this._ecModel=o||this._ecModel},GM.onEmphasis=function(t){var e=this;this.node.hostTree.root.eachNode((function(i){i.piece&&(e.node===i?i.piece.updateData(!1,i,"emphasis"):function(t,e,i){return"none"!==i&&("self"===i?t===e:"ancestor"===i?t===e||t.isAncestorOf(e):t===e||t.isDescendantOf(e))}(i,e.node,t)?i.piece.childAt(0).trigger("highlight"):"none"!==t&&i.piece.childAt(0).trigger("downplay"))}))},GM.onNormal=function(){this.node.hostTree.root.eachNode((function(t){t.piece&&t.piece.updateData(!1,t,"normal")}))},GM.onHighlight=function(){this.updateData(!1,this.node,"highlight")},GM.onDownplay=function(){this.updateData(!1,this.node,"downplay")},GM._updateLabel=function(t,e,i){var n=this.node.getModel(),o=n.getModel("label"),a="normal"===i||"emphasis"===i?o:n.getModel(i+".label"),r=n.getModel("emphasis.label"),s=W(t.getFormattedLabel(this.node.dataIndex,i,null,null,"label"),this.node.name);!1===_("show")&&(s="");var l=this.node.getLayout(),u=a.get("minAngle");null==u&&(u=o.get("minAngle")),null!=(u=u/180*Math.PI)&&Math.abs(l.endAngle-l.startAngle)<u&&(s="");var h=this.childAt(1);Ls(h.style,h.hoverStyle||{},o,r,{defaultText:a.getShallow("show")?s:null,autoColor:e,useInsideStyle:!0});var c,d=(l.startAngle+l.endAngle)/2,f=Math.cos(d),p=Math.sin(d),g=_("position"),m=_("distance")||0,v=_("align");"outside"===g?(c=l.r+m,v=d>Math.PI/2?"right":"left"):v&&"center"!==v?"left"===v?(c=l.r0+m,d>Math.PI/2&&(v="right")):"right"===v&&(c=l.r-m,d>Math.PI/2&&(v="left")):(c=(l.r+l.r0)/2,v="center"),h.attr("style",{text:s,textAlign:v,textVerticalAlign:_("verticalAlign")||"middle",opacity:_("opacity")}),h.attr("position",[c*f+l.cx,c*p+l.cy]);var y=_("rotate"),x=0;function _(t){var e=a.get(t);return null==e?o.get(t):e}"radial"===y?(x=-d)<-Math.PI/2&&(x+=Math.PI):"tangential"===y?(x=Math.PI/2-d)>Math.PI/2?x-=Math.PI:x<-Math.PI/2&&(x+=Math.PI):"number"==typeof y&&(x=y*Math.PI/180),h.attr("rotation",x)},GM._initEvents=function(t,e,i,n){function o(){r.onEmphasis(n)}function a(){r.onNormal()}t.off("mouseover").off("mouseout").off("emphasis").off("normal");var r=this;i.isAnimationEnabled()&&t.on("mouseover",o).on("mouseout",a).on("emphasis",o).on("normal",a).on("downplay",(function(){r.onDownplay()})).on("highlight",(function(){r.onHighlight()}))},M(VM,yi),Hh.extend({type:"sunburst",init:function(){},render:function(t,e,i,n){var o=this;this.seriesModel=t,this.api=i,this.ecModel=e;var a=t.getData(),r=a.tree.root,s=t.getViewRoot(),l=this.group,u=t.get("renderLabelForZeroData"),h=[];if(s.eachNode((function(t){h.push(t)})),function(i,n){function o(t){return t.getId()}function s(o,s){!function(i,n){if(u||!i||i.getValue()||(i=null),i!==r&&n!==r)if(n&&n.piece)i?(n.piece.updateData(!1,i,"normal",t,e),a.setItemGraphicEl(i.dataIndex,n.piece)):function(t){t&&t.piece&&(l.remove(t.piece),t.piece=null)}(n);else if(i){var o=new VM(i,t,e);l.add(o),a.setItemGraphicEl(i.dataIndex,o)}}(null==o?null:i[o],null==s?null:n[s])}0===i.length&&0===n.length||new Jd(n,i,o,o).add(s).update(s).remove(O(s,null)).execute()}(h,this._oldChildren||[]),function(i,n){if(0<n.depth){o.virtualPiece?o.virtualPiece.updateData(!1,i,"normal",t,e):(o.virtualPiece=new VM(i,t,e),l.add(o.virtualPiece)),n.piece._onclickEvent&&n.piece.off("click",n.piece._onclickEvent);var a=function(t){o._rootToNode(n.parentNode)};n.piece._onclickEvent=a,o.virtualPiece.on("click",a)}else o.virtualPiece&&(l.remove(o.virtualPiece),o.virtualPiece=null)}(r,s),n&&n.highlight&&n.highlight.piece){var c=t.getShallow("highlightPolicy");n.highlight.piece.onEmphasis(c)}else if(n&&n.unhighlight){var d=this.virtualPiece;!d&&r.children.length&&(d=r.children[0].piece),d&&d.onNormal()}this._initEvents(),this._oldChildren=h},dispose:function(){},_initEvents:function(){function t(t){var i=!1;e.seriesModel.getViewRoot().eachNode((function(n){if(!i&&n.piece&&n.piece.childAt(0)===t.target){var o=n.getModel().get("nodeClick");if("rootToNode"===o)e._rootToNode(n);else if("link"===o){var a=n.getModel(),r=a.get("link");if(r){var s=a.get("target",!0)||"_blank";window.open(r,s)}}i=!0}}))}var e=this;this.group._onclickEvent&&this.group.off("click",this.group._onclickEvent),this.group.on("click",t),this.group._onclickEvent=t},_rootToNode:function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:"sunburstRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},containPoint:function(t,e){var i=e.getData().getItemLayout(0);if(i){var n=t[0]-i.cx,o=t[1]-i.cy,a=Math.sqrt(n*n+o*o);return a<=i.r&&a>=i.r0}}});var FM="sunburstRootToNode";Fd({type:FM,update:"updateView"},(function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},(function(e,i){var n=Ky(t,[FM],e);if(n){var o=e.getViewRoot();o&&(t.direction=Jy(o,n.node)?"rollUp":"drillDown"),e.resetViewRoot(n.node)}}))}));var WM="sunburstHighlight";Fd({type:WM,update:"updateView"},(function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},(function(e,i){var n=Ky(t,[WM],e);n&&(t.highlight=n.node)}))})),Fd({type:"sunburstUnhighlight",update:"updateView"},(function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},(function(e,i){t.unhighlight=!0}))}));var HM=Math.PI/180;function ZM(t,e){return e=e||[0,0],D(["x","y"],(function(i,n){var o=this.getAxis(i),a=e[n],r=t[n]/2;return"category"===o.type?o.getBandWidth():Math.abs(o.dataToCoord(a-r)-o.dataToCoord(a+r))}),this)}function UM(t,e){return e=e||[0,0],D([0,1],(function(i){var n=e[i],o=t[i]/2,a=[],r=[];return a[i]=n-o,r[i]=n+o,a[1-i]=r[1-i]=e[1-i],Math.abs(this.dataToPoint(a)[i]-this.dataToPoint(r)[i])}),this)}function XM(t,e){var i=this.getAxis(),n=e instanceof Array?e[0]:e,o=(t instanceof Array?t[0]:t)/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(n-o)-i.dataToCoord(n+o))}function YM(t,e){return D(["Radius","Angle"],(function(i,n){var o=this["get"+i+"Axis"](),a=e[n],r=t[n]/2,s="dataTo"+i,l="category"===o.type?o.getBandWidth():Math.abs(o[s](a-r)-o[s](a+r));return"Angle"===i&&(l=l*Math.PI/180),l}),this)}Zd(O(dv,"sunburst")),Hd(O((function(t,e,i,n){e.eachSeriesByType(t,(function(t){var e=t.get("center"),n=t.get("radius");N(n)||(n=[0,n]),N(e)||(e=[e,e]);var o=i.getWidth(),a=i.getHeight(),r=Math.min(o,a),s=hl(e[0],o),l=hl(e[1],a),u=hl(n[0],r/2),h=hl(n[1],r/2),c=-t.get("startAngle")*HM,d=t.get("minAngle")*HM,f=t.getData().tree.root,p=t.getViewRoot(),g=p.depth,m=t.get("sort");null!=m&&function t(e,i){var n=e.children||[];e.children=function(t,e){if("function"==typeof e)return t.sort(e);var i="asc"===e;return t.sort((function(t,e){var n=(t.getValue()-e.getValue())*(i?1:-1);return 0==n?(t.dataIndex-e.dataIndex)*(i?-1:1):n}))}(n,i),n.length&&A(e.children,(function(e){t(e,i)}))}(p,m);var v=0;A(p.children,(function(t){isNaN(t.getValue())||v++}));var y=p.getValue(),x=Math.PI/(y||v)*2,_=0<p.depth,w=(h-u)/(p.height-(_?-1:1)||1),b=t.get("clockwise"),S=t.get("stillShowZeroSum"),M=b?1:-1,I=function(t,e){if(t){var i=e;if(t!==f){var n=t.getValue(),o=0===y&&S?x:n*x;o<d&&(o=d),i=e+M*o;var a=t.depth-g-(_?-1:1),h=u+w*a,c=u+w*(1+a),p=t.getModel();null!=p.get("r0")&&(h=hl(p.get("r0"),r/2)),null!=p.get("r")&&(c=hl(p.get("r"),r/2)),t.setLayout({angle:o,startAngle:e,endAngle:i,clockwise:b,cx:s,cy:l,r0:h,r:c})}if(t.children&&t.children.length){var m=0;A(t.children,(function(t){m+=I(t,e+m)}))}return i-e}};if(_){var T=2*Math.PI;f.setLayout({angle:T,startAngle:c,endAngle:c+T,clockwise:b,cx:s,cy:l,r0:u,r:u+w})}I(p,c)}))}),"sunburst")),Gd(O(yv,"sunburst"));var jM=Qr,qM=["itemStyle"],KM=["emphasis","itemStyle"],$M=["label"],JM=["emphasis","label"],QM={cartesian2d:function(t){var e=t.grid.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(e){return t.dataToPoint(e)},size:P(ZM,t)}}},geo:function(t){var e=t.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:t.getZoom()},api:{coord:function(e){return t.dataToPoint(e)},size:P(UM,t)}}},singleAxis:function(t){var e=t.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(e){return t.dataToPoint(e)},size:P(XM,t)}}},polar:function(t){var e=t.getRadiusAxis(),i=t.getAngleAxis(),n=e.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:n[1],r0:n[0]},api:{coord:P((function(n){var o=e.dataToRadius(n[0]),a=i.dataToAngle(n[1]),r=t.coordToPoint([o,a]);return r.push(o,a*Math.PI/180),r})),size:P(YM,t)}}},calendar:function(t){var e=t.getRect(),i=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:i.start,end:i.end,weeks:i.weeks,dayCount:i.allDay}},api:{coord:function(e,i){return t.dataToPoint(e,i)}}}}};function tI(t,e,i,n,o){null==i[t]||o||(e[t]=i[t],i[t]=n[t])}function eI(t,e,i,n){var o=t.get("renderItem"),a=t.coordinateSystem,r={};a&&(r=a.prepareCustoms?a.prepareCustoms():QM[a.type](a));var s,l,u,h,c,d=_({getWidth:n.getWidth,getHeight:n.getHeight,getZr:n.getZr,getDevicePixelRatio:n.getDevicePixelRatio,value:function(t,i){return null==i&&(i=s),e.get(e.getDimension(t||0),i)},style:function(i,n){null==n&&(n=s),g(n);var o=l.getModel(qM).getItemStyle();null!=c&&(o.fill=c);var a=e.getItemVisual(n,"opacity");null!=a&&(o.opacity=a);var r=i?rI(i,u):u;return Ps(o,r,null,{autoColor:c,isRectText:!0}),o.text=r.getShallow("show")?H(t.getFormattedLabel(n,"normal"),sg(e,n)):null,i&&sI(o,i),o},styleEmphasis:function(i,n){null==n&&(n=s),g(n);var o=l.getModel(KM).getItemStyle(),a=i?rI(i,h):h;return Ps(o,a,null,{isRectText:!0},!0),o.text=a.getShallow("show")?Z(t.getFormattedLabel(n,"emphasis"),t.getFormattedLabel(n,"normal"),sg(e,n)):null,i&&sI(o,i),o},visual:function(t,i){return null==i&&(i=s),e.getItemVisual(i,t)},barLayout:function(t){if(a.getBaseAxis)return function(t){var e=[],i=t.axis;if("category"===i.type){for(var n=i.getBandWidth(),o=0;o<t.count;o++)e.push(_({bandWidth:n,axisKey:"axis0",stackId:Kf+o},t));var a=ip(e),r=[];for(o=0;o<t.count;o++){var s=a.axis0[Kf+o];s.offsetCenter=s.offset+s.width/2,r.push(s)}return r}}(_({axis:a.getBaseAxis()},t))},currentSeriesIndices:function(){return i.getCurrentSeriesIndices()},font:function(t){return Bs(t,i)}},r.api||{}),f={context:{},seriesId:t.id,seriesName:t.name,seriesIndex:t.seriesIndex,coordSys:r.coordSys,dataInsideLength:e.count(),encode:function(t){var e={};return A(t.dimensions,(function(i,n){var o=t.getDimensionInfo(i);if(!o.isExtraCoord){var a=o.coordDim;(e[a]=e[a]||[])[o.coordDimIndex]=n}})),e}(t.getData())},p=!0;return function(t,i){return s=t,p=!0,o&&o(_({dataIndexInside:t,dataIndex:e.getRawIndex(t),actionType:i?i.type:null},f),d)};function g(t){null==t&&(t=s),p&&(l=e.getItemModel(t),u=l.getModel($M),h=l.getModel(JM),c=e.getItemVisual(t,"color"),p=!1)}}function iI(t,e,i,n,o,a){return(t=nI(t,e,i,n,o,a,!0))&&a.setItemGraphicEl(e,t),t}function nI(t,e,i,n,o,a,r){var s=!i,l=(i=i||{}).type,u=i.shape,h=i.style;if(t&&(s||null!=l&&l!==t.__customGraphicType||"path"===l&&function(t){return t&&(t.hasOwnProperty("pathData")||t.hasOwnProperty("d"))}(u)&&uI(u)!==t.__customPathData||"image"===l&&hI(h,"image")&&h.image!==t.__customImagePath||"text"===l&&hI(u,"text")&&h.text!==t.__customText)&&(o.remove(t),t=null),!s){var c=!t;return function(t,e,i,n,o,a,r){var s={},l=i.style||{};if(i.shape&&(s.shape=m(i.shape)),i.position&&(s.position=i.position.slice()),i.scale&&(s.scale=i.scale.slice()),i.origin&&(s.origin=i.origin.slice()),i.rotation&&(s.rotation=i.rotation),"image"===t.type&&i.style){var u=s.style={};A(["x","y","width","height"],(function(e){tI(e,u,l,t.style,a)}))}if("text"===t.type&&i.style&&(u=s.style={},A(["x","y"],(function(e){tI(e,u,l,t.style,a)})),!l.hasOwnProperty("textFill")&&l.fill&&(l.textFill=l.fill),!l.hasOwnProperty("textStroke")&&l.stroke&&(l.textStroke=l.stroke)),"group"!==t.type&&(t.useStyle(l),a)){t.style.opacity=0;var h=l.opacity;null==h&&(h=1),Fs(t,{style:{opacity:h}},n,e)}a?t.attr(s):Gs(t,s,n,e),i.hasOwnProperty("z2")&&t.attr("z2",i.z2||0),i.hasOwnProperty("silent")&&t.attr("silent",i.silent),i.hasOwnProperty("invisible")&&t.attr("invisible",i.invisible),i.hasOwnProperty("ignore")&&t.attr("ignore",i.ignore),i.hasOwnProperty("info")&&t.attr("info",i.info);var c=i.styleEmphasis;_s(t,c),r&&As(t,!1!==c)}(t=t||function(t){var e,i=t.type;if("path"===i){var n=t.shape,o=null!=n.width&&null!=n.height?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,a=uI(n);(e=ss(a,null,o,n.layout||"center")).__customPathData=a}else if("image"===i)(e=new zn({})).__customImagePath=t.style.image;else if("text"===i)(e=new br({})).__customText=t.style.text;else if("group"===i)e=new yi;else{if("compoundPath"===i)throw new Error('"compoundPath" is not supported yet.');e=new(rs(i))}return e.__customGraphicType=i,e.name=t.name,e}(i),e,i,n,0,c,r),"group"===l&&function(t,e,i,n,o){var a=i.children,r=a?a.length:0,s=i.$mergeChildren,l="byName"===s||i.diffChildrenByName,u=!1===s;if(r||l||u){if(l)return function(t){new Jd(t.oldChildren,t.newChildren,oI,oI,t).add(aI).update(aI).remove(lI).execute()}({oldChildren:t.children()||[],newChildren:a||[],dataIndex:e,animatableModel:n,group:t,data:o});u&&t.removeAll();for(var h=0;h<r;h++)a[h]&&nI(t.childAt(h),e,a[h],n,t,o)}}(t,e,i,n,a),o.add(t),t}}function oI(t,e){var i=t&&t.name;return null!=i?i:"e\0\0"+e}function aI(t,e){var i=this.context;nI(null!=e?i.oldChildren[e]:null,i.dataIndex,null!=t?i.newChildren[t]:null,i.animatableModel,i.group,i.data)}function rI(t,e){var i=new ol({},e);return A(jM,(function(e,n){t.hasOwnProperty(e)&&(i.option[n]=t[e])})),i}function sI(t,e){for(var i in e)!e.hasOwnProperty(i)&&jM.hasOwnProperty(i)||(t[i]=e[i])}function lI(t){var e=this.context,i=e.oldChildren[t];i&&e.group.remove(i)}function uI(t){return t&&(t.pathData||t.d)}function hI(t,e){return t&&t.hasOwnProperty(e)}function cI(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function dI(t,e){return e.dim+t.model.componentIndex}function fI(t,e){ig.call(this,"radius",t,e),this.type="category"}Lh.extend({type:"series.custom",dependencies:["grid","polar","geo","singleAxis","calendar"],defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,useTransform:!0,clip:!1},getInitialData:function(t,e){return Rf(this.getSource(),this)},getDataParams:function(t,e,i){var n=Lh.prototype.getDataParams.apply(this,arguments);return i&&(n.info=i.info),n}}),Hh.extend({type:"custom",_data:null,render:function(t,e,i,n){var o=this._data,a=t.getData(),r=this.group,s=eI(t,a,e,i);a.diff(o).add((function(e){iI(null,e,s(e,n),t,r,a)})).update((function(e,i){iI(o.getItemGraphicEl(i),e,s(e,n),t,r,a)})).remove((function(t){var e=o.getItemGraphicEl(t);e&&r.remove(e)})).execute();var l=t.get("clip",!0)?Vg(t.coordinateSystem,!1,t):null;l?r.setClipPath(l):r.removeClipPath(),this._data=a},incrementalPrepareRender:function(t,e,i){this.group.removeAll(),this._data=null},incrementalRender:function(t,e,i,n,o){var a=e.getData(),r=eI(e,a,i,n);function s(t){t.isGroup||(t.incremental=!0,t.useHoverLayer=!0)}for(var l=t.start;l<t.end;l++)iI(null,l,r(l,o),e,this.group,a).traverse(s)},dispose:et,filterForExposedEvent:function(t,e,i,n){var o=e.element;if(null==o||i.name===o)return!0;for(;(i=i.parent)&&i!==this.group;)if(i.name===o)return!0;return!1}}),fI.prototype={constructor:fI,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToRadius:ig.prototype.dataToCoord,radiusToData:ig.prototype.coordToData},M(fI,ig);var pI=ko();function gI(t,e){ig.call(this,"angle",t,e=e||[0,360]),this.type="category"}function mI(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new fI,this._angleAxis=new gI,this._radiusAxis.polar=this._angleAxis.polar=this}gI.prototype={constructor:gI,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToAngle:ig.prototype.dataToCoord,angleToData:ig.prototype.coordToData,calculateCategoryInterval:function(){var t=this.getLabelModel(),e=this.scale,i=e.getExtent(),n=e.count();if(i[1]-i[0]<1)return 0;var o=i[0],a=this.dataToCoord(o+1)-this.dataToCoord(o),r=Math.abs(a),s=Ji(o,t.getFont(),"center","top"),l=Math.max(s.height,7)/r;isNaN(l)&&(l=1/0);var u=Math.max(0,Math.floor(l)),h=pI(this.model),c=h.lastAutoInterval,d=h.lastTickCount;return null!=c&&null!=d&&Math.abs(c-u)<=1&&Math.abs(d-n)<=1&&u<c?u=c:(h.lastTickCount=n,h.lastAutoInterval=u),u}},M(gI,ig),mI.prototype={type:"polar",axisPointerEnabled:!0,constructor:mI,dimensions:["radius","angle"],model:null,containPoint:function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},containData:function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},getAxis:function(t){return this["_"+t+"Axis"]},getAxes:function(){return[this._radiusAxis,this._angleAxis]},getAxesByScale:function(t){var e=[],i=this._angleAxis,n=this._radiusAxis;return i.scale.type===t&&e.push(i),n.scale.type===t&&e.push(n),e},getAngleAxis:function(){return this._angleAxis},getRadiusAxis:function(){return this._radiusAxis},getOtherAxis:function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},getTooltipAxes:function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},dataToPoint:function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},pointToData:function(t,e){var i=this.pointToCoord(t);return[this._radiusAxis.radiusToData(i[0],e),this._angleAxis.angleToData(i[1],e)]},pointToCoord:function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=this.getAngleAxis(),o=n.getExtent(),a=Math.min(o[0],o[1]),r=Math.max(o[0],o[1]);n.inverse?a=r-360:r=a+360;var s=Math.sqrt(e*e+i*i);e/=s,i/=s;for(var l=Math.atan2(-i,e)/Math.PI*180,u=l<a?1:-1;l<a||r<l;)l+=360*u;return[s,l]},coordToPoint:function(t){var e=t[0],i=t[1]/180*Math.PI;return[Math.cos(i)*e+this.cx,-Math.sin(i)*e+this.cy]},getArea:function(){var t=this.getAngleAxis(),e=this.getRadiusAxis().getExtent().slice();e[0]>e[1]&&e.reverse();var i=t.getExtent(),n=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-i[0]*n,endAngle:-i[1]*n,clockwise:t.inverse,contain:function(t,e){var i=t-this.cx,n=e-this.cy,o=i*i+n*n,a=this.r,r=this.r0;return o<=a*a&&r*r<=o}}}};var vI=ou.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});function yI(t,e){return e.type||(e.data?"category":"value")}function xI(t,e){var i=this,n=i.getAngleAxis(),o=i.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),o.scale.setExtent(1/0,-1/0),t.eachSeries((function(t){if(t.coordinateSystem===i){var e=t.getData();A(e.mapDimension("radius",!0),(function(t){o.scale.unionExtentFromData(e,Ef(e,t))})),A(e.mapDimension("angle",!0),(function(t){n.scale.unionExtentFromData(e,Ef(e,t))}))}})),Tp(n.scale,n.model),Tp(o.scale,o.model),"category"===n.type&&!n.onBand){var a=n.getExtent(),r=360/n.scale.count();n.inverse?a[1]+=r:a[1]-=r,n.setExtent(a[0],a[1])}}function _I(t,e){if(t.type=e.get("type"),t.scale=Ap(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),"angleAxis"===e.mainType){t.inverse^=e.get("clockwise");var i=e.get("startAngle");t.setExtent(i,i+(t.inverse?-360:360))}(e.axis=t).model=e}v(vI.prototype,Pp),tm("angle",vI,yI,{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}}),tm("radius",vI,yI,{splitNumber:5}),Yd({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(t){var e;return this.ecModel.eachComponent(t,(function(t){t.getCoordSysModel()===this&&(e=t)}),this),e},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}}),Pu.register("polar",{dimensions:mI.prototype.dimensions,create:function(t,e){var i=[];return t.eachComponent("polar",(function(t,n){var o=new mI(n);o.update=xI;var a=o.getRadiusAxis(),r=o.getAngleAxis(),s=t.findAxisModel("radiusAxis"),l=t.findAxisModel("angleAxis");_I(a,s),_I(r,l),function(t,e,i){var n=e.get("center"),o=i.getWidth(),a=i.getHeight();t.cx=hl(n[0],o),t.cy=hl(n[1],a);var r=t.getRadiusAxis(),s=Math.min(o,a)/2,l=e.get("radius");null==l?l=[0,"100%"]:N(l)||(l=[0,l]),l=[hl(l[0],s),hl(l[1],s)],r.inverse?r.setExtent(l[1],l[0]):r.setExtent(l[0],l[1])}(o,t,e),i.push(o),(t.coordinateSystem=o).model=t})),t.eachSeries((function(e){if("polar"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"polar",index:e.get("polarIndex"),id:e.get("polarId")})[0];e.coordinateSystem=i.coordinateSystem}})),i}});var wI=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function bI(t,e,i){e[1]>e[0]&&(e=e.slice().reverse());var n=t.coordToPoint([e[0],i]),o=t.coordToPoint([e[1],i]);return{x1:n[0],y1:n[1],x2:o[0],y2:o[1]}}function SI(t){return t.getRadiusAxis().inverse?0:1}function MI(t){var e=t[0],i=t[t.length-1];e&&i&&Math.abs(Math.abs(e.coord-i.coord)-360)<1e-4&&t.pop()}Cm.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(t,e){if(this.group.removeAll(),t.get("show")){var i=t.axis,n=i.polar,o=n.getRadiusAxis().getExtent(),a=i.getTicksCoords(),r=i.getMinorTicksCoords(),s=D(i.getViewLabels(),(function(t){return(t=m(t)).coord=i.dataToCoord(t.tickValue),t}));MI(s),MI(a),A(wI,(function(e){!t.get(e+".show")||i.scale.isBlank()&&"axisLine"!==e||this["_"+e](t,n,a,r,o,s)}),this)}},_axisLine:function(t,e,i,n,o){var a,r=t.getModel("axisLine.lineStyle"),s=SI(e),l=s?0:1;(a=0===o[l]?new Mr({shape:{cx:e.cx,cy:e.cy,r:o[s]},style:r.getLineStyle(),z2:1,silent:!0}):new Ar({shape:{cx:e.cx,cy:e.cy,r:o[s],r0:o[l]},style:r.getLineStyle(),z2:1,silent:!0})).style.fill=null,this.group.add(a)},_axisTick:function(t,e,i,n,o){var a=t.getModel("axisTick"),r=(a.get("inside")?-1:1)*a.get("length"),s=o[SI(e)],l=D(i,(function(t){return new Vr({shape:bI(e,[s,s+r],t.coord)})}));this.group.add(hs(l,{style:_(a.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_minorTick:function(t,e,i,n,o){if(n.length){for(var a=t.getModel("axisTick"),r=t.getModel("minorTick"),s=(a.get("inside")?-1:1)*r.get("length"),l=o[SI(e)],u=[],h=0;h<n.length;h++)for(var c=0;c<n[h].length;c++)u.push(new Vr({shape:bI(e,[l,l+s],n[h][c].coord)}));this.group.add(hs(u,{style:_(r.getModel("lineStyle").getLineStyle(),_(a.getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")}))}))}},_axisLabel:function(t,e,i,n,o,a){var r=t.getCategories(!0),s=t.getModel("axisLabel"),l=s.get("margin"),u=t.get("triggerEvent");A(a,(function(i,n){var a=s,h=i.tickValue,c=o[SI(e)],d=e.coordToPoint([c+l,i.coord]),f=e.cx,p=e.cy,g=Math.abs(d[0]-f)/c<.3?"center":d[0]>f?"left":"right",m=Math.abs(d[1]-p)/c<.3?"middle":d[1]>p?"top":"bottom";r&&r[h]&&r[h].textStyle&&(a=new ol(r[h].textStyle,s,s.ecModel));var v=new br({silent:fm.isLabelSilent(t)});this.group.add(v),Ps(v.style,a,{x:d[0],y:d[1],textFill:a.getTextColor()||t.get("axisLine.lineStyle.color"),text:i.formattedLabel,textAlign:g,textVerticalAlign:m}),u&&(v.eventData=fm.makeAxisEventDataBase(t),v.eventData.targetType="axisLabel",v.eventData.value=i.rawLabel)}),this)},_splitLine:function(t,e,i,n,o){var a=t.getModel("splitLine").getModel("lineStyle"),r=a.get("color"),s=0;r=r instanceof Array?r:[r];for(var l=[],u=0;u<i.length;u++){var h=s++%r.length;l[h]=l[h]||[],l[h].push(new Vr({shape:bI(e,o,i[u].coord)}))}for(u=0;u<l.length;u++)this.group.add(hs(l[u],{style:_({stroke:r[u%r.length]},a.getLineStyle()),silent:!0,z:t.get("z")}))},_minorSplitLine:function(t,e,i,n,o){if(n.length){for(var a=t.getModel("minorSplitLine").getModel("lineStyle"),r=[],s=0;s<n.length;s++)for(var l=0;l<n[s].length;l++)r.push(new Vr({shape:bI(e,o,n[s][l].coord)}));this.group.add(hs(r,{style:a.getLineStyle(),silent:!0,z:t.get("z")}))}},_splitArea:function(t,e,i,n,o){if(i.length){var a=t.getModel("splitArea").getModel("areaStyle"),r=a.get("color"),s=0;r=r instanceof Array?r:[r];for(var l=[],u=Math.PI/180,h=-i[0].coord*u,c=Math.min(o[0],o[1]),d=Math.max(o[0],o[1]),f=t.get("clockwise"),p=1;p<i.length;p++){var g=s++%r.length;l[g]=l[g]||[],l[g].push(new Tr({shape:{cx:e.cx,cy:e.cy,r0:c,r:d,startAngle:h,endAngle:-i[p].coord*u,clockwise:f},silent:!0})),h=-i[p].coord*u}for(p=0;p<l.length;p++)this.group.add(hs(l[p],{style:_({fill:r[p%r.length]},a.getAreaStyle()),silent:!0}))}}});var II=["axisLine","axisTickLabel","axisName"],TI=["splitLine","splitArea","minorSplitLine"];Cm.extend({type:"radiusAxis",axisPointerClass:"PolarAxisPointer",render:function(t,e){if(this.group.removeAll(),t.get("show")){var i=t.axis,n=i.polar,o=n.getAngleAxis(),a=i.getTicksCoords(),r=i.getMinorTicksCoords(),s=o.getExtent()[0],l=i.getExtent(),u=function(t,e,i){return{position:[t.cx,t.cy],rotation:i/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}(n,t,s),h=new fm(t,u);A(II,h.add,h),this.group.add(h.getGroup()),A(TI,(function(e){t.get(e+".show")&&!i.scale.isBlank()&&this["_"+e](t,n,s,l,a,r)}),this)}},_splitLine:function(t,e,i,n,o){var a=t.getModel("splitLine").getModel("lineStyle"),r=a.get("color"),s=0;r=r instanceof Array?r:[r];for(var l=[],u=0;u<o.length;u++){var h=s++%r.length;l[h]=l[h]||[],l[h].push(new Mr({shape:{cx:e.cx,cy:e.cy,r:o[u].coord}}))}for(u=0;u<l.length;u++)this.group.add(hs(l[u],{style:_({stroke:r[u%r.length],fill:null},a.getLineStyle()),silent:!0}))},_minorSplitLine:function(t,e,i,n,o,a){if(a.length){for(var r=t.getModel("minorSplitLine").getModel("lineStyle"),s=[],l=0;l<a.length;l++)for(var u=0;u<a[l].length;u++)s.push(new Mr({shape:{cx:e.cx,cy:e.cy,r:a[l][u].coord}}));this.group.add(hs(s,{style:_({fill:null},r.getLineStyle()),silent:!0}))}},_splitArea:function(t,e,i,n,o){if(o.length){var a=t.getModel("splitArea").getModel("areaStyle"),r=a.get("color"),s=0;r=r instanceof Array?r:[r];for(var l=[],u=o[0].coord,h=1;h<o.length;h++){var c=s++%r.length;l[c]=l[c]||[],l[c].push(new Tr({shape:{cx:e.cx,cy:e.cy,r0:u,r:o[h].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),u=o[h].coord}for(h=0;h<l.length;h++)this.group.add(hs(l[h],{style:_({fill:r[h%r.length]},a.getAreaStyle()),silent:!0}))}}});var AI=pM.extend({makeElOption:function(t,e,i,n,o){var a=i.axis;"angle"===a.dim&&(this.animationThreshold=Math.PI/18);var r,s=a.polar,l=s.getOtherAxis(a).getExtent();r=a["dataTo"+Fl(a.dim)](e);var u=n.get("type");if(u&&"none"!==u){var h=xM(n),c=DI[u](a,s,r,l,h);c.style=h,t.graphicKey=c.type,t.pointer=c}var d=n.get("label.margin");_M(t,i,n,o,function(t,e,i,n,o){var a=e.axis,r=a.dataToCoord(t),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,h,c=n.getRadiusAxis().getExtent();if("radius"===a.dim){var d=Jt();ne(d,d,s),ie(d,d,[n.cx,n.cy]),l=Hs([r,-o],d);var f=e.getModel("axisLabel").get("rotate")||0,p=fm.innerTextLayout(s,f*Math.PI/180,-1);u=p.textAlign,h=p.textVerticalAlign}else{var g=c[1];l=n.coordToPoint([g+o,r]);var m=n.cx,v=n.cy;u=Math.abs(l[0]-m)/g<.3?"center":l[0]>m?"left":"right",h=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:h}}(e,i,0,s,d))}}),DI={line:function(t,e,i,n,o){return"angle"===t.dim?{type:"Line",shape:MM(e.coordToPoint([n[0],i]),e.coordToPoint([n[1],i]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:i}}},shadow:function(t,e,i,n,o){var a=Math.max(1,t.getBandWidth()),r=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:TM(e.cx,e.cy,n[0],n[1],(-i-a/2)*r,(a/2-i)*r)}:{type:"Sector",shape:TM(e.cx,e.cy,i-a/2,i+a/2,0,2*Math.PI)}}};function CI(t,e){e.update="updateView",Fd(e,(function(e,i){var n={};return i.eachComponent({mainType:"geo",query:e},(function(i){i[t](e.name),A(i.coordinateSystem.regions,(function(t){n[t.name]=i.isSelected(t.name)||!1}))})),{selected:n,name:e.name}}))}function LI(t,e,i){this._model=t}function kI(t,e,i,n){var o=i.calendarModel,a=i.seriesModel,r=o?o.coordinateSystem:a?a.coordinateSystem:null;return r===this?r[t](n):null}Cm.registerAxisPointerClass("PolarAxisPointer",AI),Hd(O((function(t,e,i){var n={},o=function(t){var e={};A(t,(function(t,i){var n=t.getData(),o=t.coordinateSystem,a=o.getBaseAxis(),r=dI(o,a),s=a.getExtent(),l="category"===a.type?a.getBandWidth():Math.abs(s[1]-s[0])/n.count(),u=e[r]||{bandWidth:l,remainedWidth:l,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},h=u.stacks;e[r]=u;var c=cI(t);h[c]||u.autoWidthCount++,h[c]=h[c]||{width:0,maxWidth:0};var d=hl(t.get("barWidth"),l),f=hl(t.get("barMaxWidth"),l),p=t.get("barGap"),g=t.get("barCategoryGap");d&&!h[c].width&&(d=Math.min(u.remainedWidth,d),h[c].width=d,u.remainedWidth-=d),f&&(h[c].maxWidth=f),null!=p&&(u.gap=p),null!=g&&(u.categoryGap=g)}));var i={};return A(e,(function(t,e){i[e]={};var n=t.stacks,o=hl(t.categoryGap,t.bandWidth),a=hl(t.gap,1),r=t.remainedWidth,s=t.autoWidthCount,l=(r-o)/(s+(s-1)*a);l=Math.max(l,0),A(n,(function(t,e){var i=t.maxWidth;i&&i<l&&(i=Math.min(i,r),t.width&&(i=Math.min(i,t.width)),r-=i,t.width=i,s--)})),l=(r-o)/(s+(s-1)*a),l=Math.max(l,0);var u,h=0;A(n,(function(t,e){t.width||(t.width=l),h+=(u=t).width*(1+a)})),u&&(h-=u.width*a);var c=-h/2;A(n,(function(t,n){i[e][n]=i[e][n]||{offset:c,width:t.width},c+=t.width*(1+a)}))})),i}(L(e.getSeriesByType(t),(function(t){return!e.isSeriesFiltered(t)&&t.coordinateSystem&&"polar"===t.coordinateSystem.type})));e.eachSeriesByType(t,(function(t){if("polar"===t.coordinateSystem.type){var e=t.getData(),i=t.coordinateSystem,a=i.getBaseAxis(),r=dI(i,a),s=cI(t),l=o[r][s],u=l.offset,h=l.width,c=i.getOtherAxis(a),d=t.coordinateSystem.cx,f=t.coordinateSystem.cy,p=t.get("barMinHeight")||0,g=t.get("barMinAngle")||0;n[s]=n[s]||[];for(var m=e.mapDimension(c.dim),v=e.mapDimension(a.dim),y=Nf(e,m),x="radius"!==a.dim||!t.get("roundCap",!0),_=c.getExtent()[0],w=0,b=e.count();w<b;w++){var S=e.get(m,w),M=e.get(v,w);if(!isNaN(S)){var I,T,A,D,C=0<=S?"p":"n",L=_;if(y&&(n[s][M]||(n[s][M]={p:_,n:_}),L=n[s][M][C]),"radius"===c.dim){var k=c.dataToRadius(S)-_,P=a.dataToAngle(M);Math.abs(k)<p&&(k=(k<0?-1:1)*p),T=(I=L)+k,D=(A=P-u)-h,y&&(n[s][M][C]=T)}else{var O=c.dataToAngle(S,x)-_,N=a.dataToRadius(M);Math.abs(O)<g&&(O=(O<0?-1:1)*g),T=(I=N+u)+h,D=(A=L)+O,y&&(n[s][M][C]=D)}e.setItemLayout(w,{cx:d,cy:f,r0:I,r:T,startAngle:-A*Math.PI/180,endAngle:-D*Math.PI/180})}}}}),this)}),"bar")),jd({type:"polar"}),I(ou.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(t){ou.prototype.init.apply(this,arguments),So(t,"label",["show"])},optionUpdated:function(){var t=this.option,e=this;t.regions=Sy.getFilledRegions(t.regions,t.map,t.nameMap),this._optionModelMap=C(t.regions||[],(function(t,i){return i.name&&t.set(i.name,new ol(i,e)),t}),Q()),this.updateSelectedMap(t.regions)},defaultOption:{zlevel:0,z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",color:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},getRegionModel:function(t){return this._optionModelMap.get(t)||new ol(null,this,this.ecModel)},getFormattedLabel:function(t,e){var i=this.getRegionModel(t).get("label"+("normal"===e?".":e+".")+"formatter"),n={name:t};return"function"==typeof i?(n.status=e,i(n)):"string"==typeof i?i.replace("{a}",null!=t?t:""):void 0},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t}}),ov),jd({type:"geo",init:function(t,e){var i=new uy(e,!0);this._mapDraw=i,this.group.add(i.group)},render:function(t,e,i,n){if(!n||"geoToggleSelect"!==n.type||n.from!==this.uid){var o=this._mapDraw;t.get("show")?o.draw(t,e,i,this,n):this._mapDraw.group.removeAll(),this.group.silent=t.get("silent")}},dispose:function(){this._mapDraw&&this._mapDraw.remove()}}),CI("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),CI("select",{type:"geoSelect",event:"geoselected"}),CI("unSelect",{type:"geoUnSelect",event:"geounselected"}),LI.prototype={constructor:LI,type:"calendar",dimensions:["time","value"],getDimensionsInfo:function(){return[{name:"time",type:"time"},"value"]},getRangeInfo:function(){return this._rangeInfo},getModel:function(){return this._model},getRect:function(){return this._rect},getCellWidth:function(){return this._sw},getCellHeight:function(){return this._sh},getOrient:function(){return this._orient},getFirstDayOfWeek:function(){return this._firstDayOfWeek},getDateInfo:function(t){var e=(t=wl(t)).getFullYear(),i=t.getMonth()+1;i=i<10?"0"+i:i;var n=t.getDate();n=n<10?"0"+n:n;var o=t.getDay();return{y:e,m:i,d:n,day:o=Math.abs((o+7-this.getFirstDayOfWeek())%7),time:t.getTime(),formatedDate:e+"-"+i+"-"+n,date:t}},getNextNDay:function(t,e){return 0===(e=e||0)||(t=new Date(this.getDateInfo(t).time)).setDate(t.getDate()+e),this.getDateInfo(t)},update:function(t,e){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var i=this._rangeInfo.weeks||1,n=["width","height"],o=this._model.get("cellSize").slice(),a=this._model.getBoxLayoutParams(),r="horizontal"===this._orient?[i,7]:[7,i];A([0,1],(function(t){u(o,t)&&(a[n[t]]=o[t]*r[t])}));var s={width:e.getWidth(),height:e.getHeight()},l=this._rect=ql(a,s);function u(t,e){return null!=t[e]&&"auto"!==t[e]}A([0,1],(function(t){u(o,t)||(o[t]=l[n[t]]/r[t])})),this._sw=o[0],this._sh=o[1]},dataToPoint:function(t,e){N(t)&&(t=t[0]),null==e&&(e=!0);var i=this.getDateInfo(t),n=this._rangeInfo;if(e&&!(i.time>=n.start.time&&i.time<n.end.time+864e5))return[NaN,NaN];var o=i.day,a=this._getRangeInfo([n.start.time,i.formatedDate]).nthWeek;return"vertical"===this._orient?[this._rect.x+o*this._sw+this._sw/2,this._rect.y+a*this._sh+this._sh/2]:[this._rect.x+a*this._sw+this._sw/2,this._rect.y+o*this._sh+this._sh/2]},pointToData:function(t){var e=this.pointToDate(t);return e&&e.time},dataToRect:function(t,e){var i=this.dataToPoint(t,e);return{contentShape:{x:i[0]-(this._sw-this._lineWidth)/2,y:i[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:i,tl:[i[0]-this._sw/2,i[1]-this._sh/2],tr:[i[0]+this._sw/2,i[1]-this._sh/2],br:[i[0]+this._sw/2,i[1]+this._sh/2],bl:[i[0]-this._sw/2,i[1]+this._sh/2]}},pointToDate:function(t){var e=Math.floor((t[0]-this._rect.x)/this._sw)+1,i=Math.floor((t[1]-this._rect.y)/this._sh)+1,n=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(i,e-1,n):this._getDateByWeeksAndDay(e,i-1,n)},convertToPixel:O(kI,"dataToPoint"),convertFromPixel:O(kI,"pointToData"),_initRangeOption:function(){var t=this._model.get("range"),e=t;if(N(e)&&1===e.length&&(e=e[0]),/^\d{4}$/.test(e)&&(t=[e+"-01-01",e+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(e)){var i=this.getDateInfo(e),n=i.date;n.setMonth(n.getMonth()+1);var o=this.getNextNDay(n,-1);t=[i.formatedDate,o.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(e)&&(t=[e,e]);var a=this._getRangeInfo(t);return a.start.time>a.end.time&&t.reverse(),t},_getRangeInfo:function(t){var e;(t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])])[0].time>t[1].time&&(e=!0,t.reverse());var i=Math.floor(t[1].time/864e5)-Math.floor(t[0].time/864e5)+1,n=new Date(t[0].time),o=n.getDate(),a=t[1].date.getDate();if(n.setDate(o+i-1),n.getDate()!==a)for(var r=0<n.getTime()-t[1].time?1:-1;n.getDate()!==a&&0<(n.getTime()-t[1].time)*r;)n.setDate(o+(i-=r)-1);var s=Math.floor((i+t[0].day+6)/7),l=e?1-s:s-1;return e&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:i,weeks:s,nthWeek:l,fweek:t[0].day,lweek:t[1].day}},_getDateByWeeksAndDay:function(t,e,i){var n=this._getRangeInfo(i);if(t>n.weeks||0===t&&e<n.fweek||t===n.weeks&&e>n.lweek)return!1;var o=7*(t-1)-n.fweek+e,a=new Date(n.start.time);return a.setDate(n.start.d+o),this.getDateInfo(a)}},LI.dimensions=LI.prototype.dimensions,LI.getDimensionsInfo=LI.prototype.getDimensionsInfo,LI.create=function(t,e){var i=[];return t.eachComponent("calendar",(function(n){var o=new LI(n,t,e);i.push(o),n.coordinateSystem=o})),t.eachSeries((function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("calendarIndex")||0])})),i},Pu.register("calendar",LI);var PI=ou.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(t,e,i,n){var o=Jl(t);PI.superApply(this,"init",arguments),OI(t,o)},mergeOption:function(t,e){PI.superApply(this,"mergeOption",arguments),OI(this.option,t)}});function OI(t,e){var i=t.cellSize;N(i)?1===i.length&&(i[1]=i[0]):i=t.cellSize=[i,i];var n=D([0,1],(function(t){return function(t,e){return null!=t[Xl[e][0]]||null!=t[Xl[e][1]]&&null!=t[Xl[e][2]]}(e,t)&&(i[t]="auto"),null!=i[t]&&"auto"!==i[t]}));$l(t,e,{type:"box",ignoreSize:n})}var NI={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"]},EI={EN:["S","M","T","W","T","F","S"],CN:["\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d"]};jd({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t,e,i){var n=this.group;n.removeAll();var o=t.coordinateSystem,a=o.getRangeInfo(),r=o.getOrient();this._renderDayRect(t,a,n),this._renderLines(t,a,r,n),this._renderYearText(t,a,r,n),this._renderMonthText(t,r,n),this._renderWeekText(t,a,r,n)},_renderDayRect:function(t,e,i){for(var n=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),a=n.getCellWidth(),r=n.getCellHeight(),s=e.start.time;s<=e.end.time;s=n.getNextNDay(s,1).time){var l=n.dataToRect([s],!1).tl,u=new zr({shape:{x:l[0],y:l[1],width:a,height:r},cursor:"default",style:o});i.add(u)}},_renderLines:function(t,e,i,n){var o=this,a=t.coordinateSystem,r=t.getModel("splitLine.lineStyle").getLineStyle(),s=t.get("splitLine.show"),l=r.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=e.start,h=0;u.time<=e.end.time;h++){d(u.formatedDate),0===h&&(u=a.getDateInfo(e.start.y+"-"+e.start.m));var c=u.date;c.setMonth(c.getMonth()+1),u=a.getDateInfo(c)}function d(e){o._firstDayOfMonth.push(a.getDateInfo(e)),o._firstDayPoints.push(a.dataToRect([e],!1).tl);var l=o._getLinePointsOfOneWeek(t,e,i);o._tlpoints.push(l[0]),o._blpoints.push(l[l.length-1]),s&&o._drawSplitline(l,r,n)}d(a.getNextNDay(e.end.time,1).formatedDate),s&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,l,i),r,n),s&&this._drawSplitline(o._getEdgesPoints(o._blpoints,l,i),r,n)},_getEdgesPoints:function(t,e,i){var n=[t[0].slice(),t[t.length-1].slice()],o="horizontal"===i?0:1;return n[0][o]=n[0][o]-e/2,n[1][o]=n[1][o]+e/2,n},_drawSplitline:function(t,e,i){var n=new kr({z2:20,shape:{points:t},style:e});i.add(n)},_getLinePointsOfOneWeek:function(t,e,i){var n=t.coordinateSystem;e=n.getDateInfo(e);for(var o=[],a=0;a<7;a++){var r=n.getNextNDay(e.time,a),s=n.dataToRect([r.time],!1);o[2*r.day]=s.tl,o[2*r.day+1]=s["horizontal"===i?"bl":"tr"]}return o},_formatterLabel:function(t,e){return"string"==typeof t&&t?zl(t,e):"function"==typeof t?t(e):e.nameMap},_yearTextPositionControl:function(t,e,i,n,o){e=e.slice();var a=["center","bottom"];"bottom"===n?(e[1]+=o,a=["center","top"]):"left"===n?e[0]-=o:"right"===n?(e[0]+=o,a=["center","top"]):e[1]-=o;var r=0;return"left"!==n&&"right"!==n||(r=Math.PI/2),{rotation:r,position:e,style:{textAlign:a[0],textVerticalAlign:a[1]}}},_renderYearText:function(t,e,i,n){var o=t.getModel("yearLabel");if(o.get("show")){var a=o.get("margin"),r=o.get("position");r=r||("horizontal"!==i?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,h="horizontal"===i?0:1,c={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var f=o.get("formatter"),p=this._formatterLabel(f,{start:e.start.y,end:e.end.y,nameMap:d}),g=new br({z2:30});Ps(g.style,o,{text:p}),g.attr(this._yearTextPositionControl(g,c[r],i,r,a)),n.add(g)}},_monthTextPositionControl:function(t,e,i,n,o){var a="left",r="top",s=t[0],l=t[1];return"horizontal"===i?(l+=o,e&&(a="center"),"start"===n&&(r="bottom")):(s+=o,e&&(r="middle"),"start"===n&&(a="right")),{x:s,y:l,textAlign:a,textVerticalAlign:r}},_renderMonthText:function(t,e,i){var n=t.getModel("monthLabel");if(n.get("show")){var o=n.get("nameMap"),a=n.get("margin"),r=n.get("position"),s=n.get("align"),l=[this._tlpoints,this._blpoints];R(o)&&(o=NI[o.toUpperCase()]||[]);var u="start"===r?0:1,h="horizontal"===e?0:1;a="start"===r?-a:a;for(var c="center"===s,d=0;d<l[u].length-1;d++){var f=l[u][d].slice(),p=this._firstDayOfMonth[d];c&&(f[h]=(this._firstDayPoints[d][h]+l[0][d+1][h])/2);var g=n.get("formatter"),m=o[+p.m-1],v={yyyy:p.y,yy:(p.y+"").slice(2),MM:p.m,M:+p.m,nameMap:m},y=this._formatterLabel(g,v),_=new br({z2:30});x(Ps(_.style,n,{text:y}),this._monthTextPositionControl(f,c,e,r,a)),i.add(_)}}},_weekTextPositionControl:function(t,e,i,n,o){var a="center",r="middle",s=t[0],l=t[1],u="start"===i;return"horizontal"===e?(s=s+n+(u?1:-1)*o[0]/2,a=u?"right":"left"):(l=l+n+(u?1:-1)*o[1]/2,r=u?"bottom":"top"),{x:s,y:l,textAlign:a,textVerticalAlign:r}},_renderWeekText:function(t,e,i,n){var o=t.getModel("dayLabel");if(o.get("show")){var a=t.coordinateSystem,r=o.get("position"),s=o.get("nameMap"),l=o.get("margin"),u=a.getFirstDayOfWeek();R(s)&&(s=EI[s.toUpperCase()]||[]);var h=a.getNextNDay(e.end.time,7-e.lweek).time,c=[a.getCellWidth(),a.getCellHeight()];l=hl(l,c["horizontal"===i?0:1]),"start"===r&&(h=a.getNextNDay(e.start.time,-(7+e.fweek)).time,l=-l);for(var d=0;d<7;d++){var f,p=a.getNextNDay(h,d),g=a.dataToRect([p.time],!1).center;f=Math.abs((d+u)%7);var m=new br({z2:30});x(Ps(m.style,o,{text:s[f]}),this._weekTextPositionControl(g,i,r,l,c)),n.add(m)}}}});var RI={path:null,compoundPath:null,group:yi,image:zn,text:br};Vd((function(t){var e=t.graphic;N(e)?t.graphic=e[0]&&e[0].elements?[t.graphic[0]]:[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])}));var zI=Yd({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(t){var e=this.option.elements;this.option.elements=null,zI.superApply(this,"mergeOption",arguments),this.option.elements=e},optionUpdated:function(t,e){var i=this.option,n=(e?i:t).elements,o=i.elements=e?[]:i.elements,a=[];this._flatten(n,a);var r=To(o,a);Ao(r);var s=this._elOptionsToUpdate=[];A(r,(function(t,e){var i=t.option;i&&(s.push(i),function(t,e){var i=t.exist;if(e.id=t.keyInfo.id,!e.type&&i&&(e.type=i.type),null==e.parentId){var n=e.parentOption;n?e.parentId=n.id:i&&(e.parentId=i.parentId)}e.parentOption=null}(t,i),function(t,e,i){var n=x({},i),o=t[e],a=i.$action||"merge";"merge"===a?o?(v(o,n,!0),$l(o,n,{ignoreSize:!0}),Ql(i,o)):t[e]=n:"replace"===a?t[e]=n:"remove"===a&&o&&(t[e]=null)}(o,e,i),function(t,e){t&&(t.hv=e.hv=[GI(e,["left","right"]),GI(e,["top","bottom"])],"group"===t.type&&(null==t.width&&(t.width=e.width=0),null==t.height&&(t.height=e.height=0)))}(o[e],i))}),this);for(var l=o.length-1;0<=l;l--)null==o[l]?o.splice(l,1):delete o[l].$action},_flatten:function(t,e,i){A(t,(function(t){if(t){i&&(t.parentOption=i),e.push(t);var n=t.children;"group"===t.type&&n&&this._flatten(n,e,t),delete t.children}}),this)},useElOptionsToUpdate:function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t}});function BI(t,e,i,n){var o=i.type,a=new(RI.hasOwnProperty(o)?RI[o]:rs(o))(i);e.add(a),n.set(t,a),a.__ecGraphicId=t}function VI(t,e){var i=t&&t.parent;i&&("group"===t.type&&t.traverse((function(t){VI(t,e)})),e.removeKey(t.__ecGraphicId),i.remove(t))}function GI(t,e){var i;return A(e,(function(e){null!=t[e]&&"auto"!==t[e]&&(i=!0)})),i}jd({type:"graphic",init:function(t,e){this._elMap=Q()},render:function(t,e,i){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,i)},_updateElements:function(t){var e=t.useElOptionsToUpdate();if(e){var i=this._elMap,n=this.group;A(e,(function(e){var o=e.$action,a=e.id,r=i.get(a),s=e.parentId,l=null!=s?i.get(s):n,u=e.style;"text"===e.type&&u&&(e.hv&&e.hv[1]&&(u.textVerticalAlign=u.textBaseline=null),!u.hasOwnProperty("textFill")&&u.fill&&(u.textFill=u.fill),!u.hasOwnProperty("textStroke")&&u.stroke&&(u.textStroke=u.stroke));var h=function(t){return t=x({},t),A(["id","parentId","$action","hv","bounding"].concat(Ul),(function(e){delete t[e]})),t}(e);o&&"merge"!==o?"replace"===o?(VI(r,i),BI(a,l,h,i)):"remove"===o&&VI(r,i):r?r.attr(h):BI(a,l,h,i);var c=i.get(a);c&&(c.__ecGraphicWidthOption=e.width,c.__ecGraphicHeightOption=e.height,function(t,e){var i=t.eventData;t.silent||t.ignore||i||(i=t.eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name}),i&&(i.info=t.info)}(c,t))}))}},_relocate:function(t,e){for(var i=t.option.elements,n=this.group,o=this._elMap,a=e.getWidth(),r=e.getHeight(),s=0;s<i.length;s++){var l=i[s];if((h=o.get(l.id))&&h.isGroup){var u=(c=h.parent)===n;h.__ecGraphicWidth=hl(h.__ecGraphicWidthOption,u?a:c.__ecGraphicWidth)||0,h.__ecGraphicHeight=hl(h.__ecGraphicHeightOption,u?r:c.__ecGraphicHeight)||0}}for(s=i.length-1;0<=s;s--){var h,c;(h=o.get((l=i[s]).id))&&Kl(h,l,(c=h.parent)===n?{width:a,height:r}:{width:c.__ecGraphicWidth,height:c.__ecGraphicHeight},null,{hv:l.hv,boundingMode:l.bounding})}},_clear:function(){var t=this._elMap;t.each((function(e){VI(e,t)})),this._elMap=Q()},dispose:function(){this._clear()}});var FI={};function WI(t,e){FI[t]=e}function HI(t){return FI[t]}var ZI=Yd({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){ZI.superApply(this,"optionUpdated",arguments),A(this.option.feature,(function(t,e){var i=HI(e);i&&v(t,i.defaultOption)}))},defaultOption:{show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1}}});function UI(t,e){var i=Ll(e.get("padding")),n=e.getItemStyle(["color","opacity"]);return n.fill=e.get("backgroundColor"),new zr({shape:{x:t.x-i[3],y:t.y-i[0],width:t.width+i[1]+i[3],height:t.height+i[0]+i[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1})}jd({type:"toolbox",render:function(t,e,i,n){var o=this.group;if(o.removeAll(),t.get("show")){var a=+t.get("itemSize"),r=t.get("feature")||{},s=this._features||(this._features={}),l=[];A(r,(function(t,e){l.push(e)})),new Jd(this._featureNames||[],l).add(u).update(u).remove(O(u,null)).execute(),this._featureNames=l,function(t,e,i){var n=e.getBoxLayoutParams(),o=e.get("padding"),a={width:i.getWidth(),height:i.getHeight()},r=ql(n,a,o);jl(e.get("orient"),t,e.get("itemGap"),r.width,r.height),Kl(t,n,a,o)}(o,t,i),o.add(UI(o.getBoundingRect(),t)),o.eachChild((function(t){var e=t.__title,n=t.hoverStyle;if(n&&e){var r=Ji(e,cn(n)),s=t.position[0]+o.position[0],l=!1;t.position[1]+o.position[1]+a+r.height>i.getHeight()&&(n.textPosition="top",l=!0);var u=l?-5-r.height:a+8;s+r.width/2>i.getWidth()?(n.textPosition=["100%",u],n.textAlign="right"):s-r.width/2<0&&(n.textPosition=[0,u],n.textAlign="left")}}))}function u(u,h){var c,d=l[u],f=l[h],p=r[d],g=new ol(p,t,t.ecModel);if(n&&null!=n.newTitle&&(p.title=n.newTitle),d&&!f){if(function(t){return 0===t.indexOf("my")}(d))c={model:g,onclick:g.option.onclick,featureName:d};else{var m=HI(d);if(!m)return;c=new m(g,e,i)}s[d]=c}else{if(!(c=s[f]))return;c.model=g,c.ecModel=e,c.api=i}d||!f?g.get("show")&&!c.unusable?(function(n,r,s){var l=n.getModel("iconStyle"),u=n.getModel("emphasis.iconStyle"),h=r.getIcons?r.getIcons():n.get("icon"),c=n.get("title")||{};if("string"==typeof h){var d=h,f=c;c={},(h={})[s]=d,c[s]=f}var p=n.iconPaths={};A(h,(function(s,h){var d=Ys(s,{},{x:-a/2,y:-a/2,width:a,height:a});d.setStyle(l.getItemStyle()),d.hoverStyle=u.getItemStyle(),d.setStyle({text:c[h],textAlign:u.get("textAlign"),textBorderRadius:u.get("textBorderRadius"),textPadding:u.get("textPadding"),textFill:null});var f=t.getModel("tooltip");f&&f.get("show")&&d.attr("tooltip",x({content:c[h],formatter:f.get("formatter",!0)||function(){return c[h]},formatterParams:{componentType:"toolbox",name:h,title:c[h],$vars:["name","title"]},position:f.get("position",!0)||"bottom"},f.option)),Ts(d),t.get("showTitle")&&(d.__title=c[h],d.on("mouseover",(function(){var e=u.getItemStyle(),i="vertical"===t.get("orient")?null==t.get("right")?"right":"left":null==t.get("bottom")?"bottom":"top";d.setStyle({textFill:u.get("textFill")||e.fill||e.stroke||"#000",textBackgroundColor:u.get("textBackgroundColor"),textPosition:u.get("textPosition")||i})})).on("mouseout",(function(){d.setStyle({textFill:null,textBackgroundColor:null})}))),d.trigger(n.get("iconStatus."+h)||"normal"),o.add(d),d.on("click",P(r.onclick,r,e,i,h)),p[h]=d}))}(g,c,d),g.setIconStatus=function(t,e){var i=this.option,n=this.iconPaths;i.iconStatus=i.iconStatus||{},i.iconStatus[t]=e,n[t]&&n[t].trigger(e)},c.render&&c.render(g,e,i,n)):c.remove&&c.remove(e,i):c.dispose&&c.dispose(e,i)}},updateView:function(t,e,i,n){A(this._features,(function(t){t.updateView&&t.updateView(t.model,e,i,n)}))},remove:function(t,e){A(this._features,(function(i){i.remove&&i.remove(t,e)})),this.group.removeAll()},dispose:function(t,e){A(this._features,(function(i){i.dispose&&i.dispose(t,e)}))}});var XI=nc.toolbox.saveAsImage;function YI(t){this.model=t}YI.defaultOption={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:XI.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:XI.lang.slice()},YI.prototype.unusable=!o.canvasSupported,YI.prototype.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",a=i.get("type",!0)||"png",r=e.getConnectedDataURL({type:a,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if("function"!=typeof MouseEvent||o.browser.ie||o.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var s=atob(r.split(",")[1]),l=s.length,u=new Uint8Array(l);l--;)u[l]=s.charCodeAt(l);var h=new Blob([u]);window.navigator.msSaveOrOpenBlob(h,n+"."+a)}else{var c=i.get("lang"),d='<body style="margin:0;"><img src="'+r+'" style="max-width:100%;" title="'+(c&&c[0]||"")+'" /></body>';window.open().document.write(d)}else{var f=document.createElement("a");f.download=n+"."+a,f.target="_blank",f.href=r;var p=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});f.dispatchEvent(p)}},WI("saveAsImage",YI);var jI=nc.toolbox.magicType,qI="__ec_magicType_stack__";function KI(t){this.model=t}KI.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:m(jI.title),option:{},seriesIndex:{}};var $I=KI.prototype;$I.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return A(t.get("type"),(function(t){e[t]&&(i[t]=e[t])})),i};var JI={line:function(t,e,i,n){if("bar"===t)return v({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.line")||{},!0)},bar:function(t,e,i,n){if("line"===t)return v({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.bar")||{},!0)},stack:function(t,e,i,n){var o=i.get("stack")===qI;if("line"===t||"bar"===t)return n.setIconStatus("stack",o?"normal":"emphasis"),v({id:e,stack:o?"":qI},n.get("option.stack")||{},!0)}},QI=[["line","bar"],["stack"]];$I.onclick=function(t,e,i){var n=this.model,o=n.get("seriesIndex."+i);if(JI[i]){var a,r={series:[]};A(QI,(function(t){0<=S(t,i)&&A(t,(function(t){n.setIconStatus(t,"normal")}))})),n.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:null==o?null:{seriesIndex:o}},(function(e){var o=JI[i](e.subType,e.id,e,n);o&&(_(o,e.option),r.series.push(o));var a=e.coordinateSystem;if(a&&"cartesian2d"===a.type&&("line"===i||"bar"===i)){var s=a.getAxesByScale("ordinal")[0];if(s){var l=s.dim+"Axis",u=t.queryComponents({mainType:l,index:e.get(name+"Index"),id:e.get(name+"Id")})[0].componentIndex;r[l]=r[l]||[];for(var h=0;h<=u;h++)r[l][u]=r[l][u]||{};r[l][u].boundaryGap="bar"===i}}})),"stack"===i&&(a=r.series&&r.series[0]&&r.series[0].stack===qI?v({stack:jI.title.tiled},jI.title):m(jI.title)),e.dispatchAction({type:"changeMagicType",currentType:i,newOption:r,newTitle:a})}},Fd({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(t,e){e.mergeOption(t.newOption)})),WI("magicType",KI);var tT=nc.toolbox.dataView,eT=new Array(60).join("-"),iT="\t";function nT(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var oT=new RegExp("[\t]+","g");function aT(t){this._dom=null,this.model=t}aT.defaultOption={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:m(tT.title),lang:m(tT.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},aT.prototype.onclick=function(t,e){var i=e.getDom(),n=this.model;this._dom&&i.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",o.style.backgroundColor=n.get("backgroundColor")||"#fff";var a=document.createElement("h4"),r=n.get("lang")||[];a.innerHTML=r[0]||n.get("title"),a.style.cssText="margin: 10px 20px;",a.style.color=n.get("textColor");var s=document.createElement("div"),l=document.createElement("textarea");s.style.cssText="display:block;width:100%;overflow:auto;";var u=n.get("optionToContent"),h=n.get("contentToOption"),c=function(t){var e=function(t){var e={},i=[],n=[];return t.eachRawSeries((function(t){var o=t.coordinateSystem;if(!o||"cartesian2d"!==o.type&&"polar"!==o.type)i.push(t);else{var a=o.getBaseAxis();if("category"===a.type){var r=a.dim+"_"+a.index;e[r]||(e[r]={categoryAxis:a,valueAxis:o.getOtherAxis(a),series:[]},n.push({axisDim:a.dim,axisIndex:a.index})),e[r].series.push(t)}else i.push(t)}})),{seriesGroupByCategoryAxis:e,other:i,meta:n}}(t);return{value:L([function(t){var e=[];return A(t,(function(t,i){var n=t.categoryAxis,o=t.valueAxis.dim,a=[" "].concat(D(t.series,(function(t){return t.name}))),r=[n.model.getCategories()];A(t.series,(function(t){r.push(t.getRawData().mapArray(o,(function(t){return t})))}));for(var s=[a.join(iT)],l=0;l<r[0].length;l++){for(var u=[],h=0;h<r.length;h++)u.push(r[h][l]);s.push(u.join(iT))}e.push(s.join("\n"))})),e.join("\n\n"+eT+"\n\n")}(e.seriesGroupByCategoryAxis),function(t){return D(t,(function(t){var e=t.getRawData(),i=[t.name],n=[];return e.each(e.dimensions,(function(){for(var t=arguments.length,o=arguments[t-1],a=e.getName(o),r=0;r<t-1;r++)n[r]=arguments[r];i.push((a?a+iT:"")+n.join(iT))})),i.join("\n")})).join("\n\n"+eT+"\n\n")}(e.other)],(function(t){return t.replace(/[\n\t\s]/g,"")})).join("\n\n"+eT+"\n\n"),meta:e.meta}}(t);if("function"==typeof u){var d=u(e.getOption());"string"==typeof d?s.innerHTML=d:G(d)&&s.appendChild(d)}else s.appendChild(l),l.readOnly=n.get("readOnly"),l.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",l.style.color=n.get("textColor"),l.style.borderColor=n.get("textareaBorderColor"),l.style.backgroundColor=n.get("textareaColor"),l.value=c.value;var f=c.meta,p=document.createElement("div");p.style.cssText="position:absolute;bottom:0;left:0;right:0;";var g="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",m=document.createElement("div"),v=document.createElement("div");g+=";background-color:"+n.get("buttonColor"),g+=";color:"+n.get("buttonTextColor");var y=this;function x(){i.removeChild(o),y._dom=null}Vt(m,"click",x),Vt(v,"click",(function(){var t;try{t="function"==typeof h?h(s,e.getOption()):function(t,e){var i=t.split(new RegExp("\n*"+eT+"\n*","g")),n={series:[]};return A(i,(function(t,i){if(function(t){if(0<=t.slice(0,t.indexOf("\n")).indexOf(iT))return!0}(t)){var o=function(t){for(var e=t.split(/\n+/g),i=[],n=D(nT(e.shift()).split(oT),(function(t){return{name:t,data:[]}})),o=0;o<e.length;o++){var a=nT(e[o]).split(oT);i.push(a.shift());for(var r=0;r<a.length;r++)n[r]&&(n[r].data[o]=a[r])}return{series:n,categories:i}}(t),a=e[i],r=a.axisDim+"Axis";a&&(n[r]=n[r]||[],n[r][a.axisIndex]={data:o.categories},n.series=n.series.concat(o.series))}else o=function(t){for(var e=t.split(/\n+/g),i=nT(e.shift()),n=[],o=0;o<e.length;o++){var a,r=nT(e[o]).split(oT),s="",l=!1;a=isNaN(r[0])?(l=!0,s=r[0],r=r.slice(1),n[o]={name:s,value:[]},n[o].value):n[o]=[];for(var u=0;u<r.length;u++)a.push(+r[u]);1===a.length&&(l?n[o].value=a[0]:n[o]=a[0])}return{name:i,data:n}}(t),n.series.push(o)})),n}(l.value,f)}catch(t){throw x(),new Error("Data view format error "+t)}t&&e.dispatchAction({type:"changeDataView",newOption:t}),x()})),m.innerHTML=r[1],v.innerHTML=r[2],v.style.cssText=g,m.style.cssText=g,n.get("readOnly")||p.appendChild(v),p.appendChild(m),o.appendChild(a),o.appendChild(s),o.appendChild(p),s.style.height=i.clientHeight-80+"px",i.appendChild(o),this._dom=o},aT.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},aT.prototype.dispose=function(t,e){this.remove(t,e)},WI("dataView",aT),Fd({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},(function(t,e){var i=[];A(t.newOption.series,(function(t){var n=e.getSeriesByName(t.name)[0];if(n){var o=n.get("data");i.push({name:t.name,data:function(t,e){return D(t,(function(t,i){var n=e&&e[i];return z(n)&&!N(n)?(z(t)&&!N(t)&&(t=t.value),_({value:t},n)):t}))}(t.data,o)})}else i.push(x({type:"scatter"},t))})),e.mergeOption(_({series:i},t.newOption))}));var rT=A,sT=S,lT=O,uT=["dataToPoint","pointToData"],hT=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"];function cT(t,e,i){var n=this._targetInfoList=[],o={},a=pT(e,t);rT(gT,(function(t,e){i&&i.include&&!(0<=sT(i.include,e))||t(a,n,o)}))}var dT=cT.prototype;function fT(t){return t[0]>t[1]&&t.reverse(),t}function pT(t,e){return Oo(t,e,{includeMainTypes:hT})}dT.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,(function(t,e,i){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var n=yT[t.brushType](0,i,e);t.__rangeOffset={offset:_T[t.brushType](n.values,t.range,[1,1]),xyMinMax:n.xyMinMax}}}))},dT.matchOutputRanges=function(t,e,i){rT(t,(function(t){var n=this.findTargetInfo(t,e);n&&!0!==n&&A(n.coordSyses,(function(n){var o=yT[t.brushType](1,n,t.range);i(t,o.values,n,e)}))}),this)},dT.setInputRanges=function(t,e){rT(t,(function(t){var i=this.findTargetInfo(t,e);if(t.range=t.range||[],i&&!0!==i){t.panelId=i.panelId;var n=yT[t.brushType](0,i.coordSys,t.coordRange),o=t.__rangeOffset;t.range=o?_T[t.brushType](n.values,o.offset,function(t,e){var i=bT(t),n=bT(e),o=[i[0]/n[0],i[1]/n[1]];return isNaN(o[0])&&(o[0]=1),isNaN(o[1])&&(o[1]=1),o}(n.xyMinMax,o.xyMinMax)):n.values}}),this)},dT.makePanelOpts=function(t,e){return D(this._targetInfoList,(function(i){var n=i.getPanelRect();return{panelId:i.panelId,defaultBrushType:e&&e(i),clipPath:Jw(n),isTargetByCursor:tb(n,t,i.coordSysModel),getLinearBrushOtherExtent:Qw(n)}}))},dT.controlSeries=function(t,e,i){var n=this.findTargetInfo(t,i);return!0===n||n&&0<=sT(n.coordSyses,e.coordinateSystem)},dT.findTargetInfo=function(t,e){for(var i=this._targetInfoList,n=pT(e,t),o=0;o<i.length;o++){var a=i[o],r=t.panelId;if(r){if(a.panelId===r)return a}else for(o=0;o<mT.length;o++)if(mT[o](n,a))return a}return!0};var gT={grid:function(t,e){var i=t.xAxisModels,n=t.yAxisModels,o=t.gridModels,a=Q(),r={},s={};(i||n||o)&&(rT(i,(function(t){var e=t.axis.grid.model;a.set(e.id,e),r[e.id]=!0})),rT(n,(function(t){var e=t.axis.grid.model;a.set(e.id,e),s[e.id]=!0})),rT(o,(function(t){a.set(t.id,t),r[t.id]=!0,s[t.id]=!0})),a.each((function(t){var o=[];rT(t.coordinateSystem.getCartesians(),(function(t,e){(0<=sT(i,t.getAxis("x").model)||0<=sT(n,t.getAxis("y").model))&&o.push(t)})),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:o[0],coordSyses:o,getPanelRect:vT.grid,xAxisDeclared:r[t.id],yAxisDeclared:s[t.id]})})))},geo:function(t,e){rT(t.geoModels,(function(t){var i=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:i,coordSyses:[i],getPanelRect:vT.geo})}))}},mT=[function(t,e){var i=t.xAxisModel,n=t.yAxisModel,o=t.gridModel;return!o&&i&&(o=i.axis.grid.model),!o&&n&&(o=n.axis.grid.model),o&&o===e.gridModel},function(t,e){var i=t.geoModel;return i&&i===e.geoModel}],vT={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(Ws(t)),e}},yT={lineX:lT(xT,0),lineY:lT(xT,1),rect:function(t,e,i){var n=e[uT[t]]([i[0][0],i[1][0]]),o=e[uT[t]]([i[0][1],i[1][1]]),a=[fT([n[0],o[0]]),fT([n[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(t,e,i){var n=[[1/0,-1/0],[1/0,-1/0]];return{values:D(i,(function(i){var o=e[uT[t]](i);return n[0][0]=Math.min(n[0][0],o[0]),n[1][0]=Math.min(n[1][0],o[1]),n[0][1]=Math.max(n[0][1],o[0]),n[1][1]=Math.max(n[1][1],o[1]),o})),xyMinMax:n}}};function xT(t,e,i,n){var o=i.getAxis(["x","y"][t]),a=fT(D([0,1],(function(t){return e?o.coordToData(o.toLocalCoord(n[t])):o.toGlobalCoord(o.dataToCoord(n[t]))}))),r=[];return r[t]=a,r[1-t]=[NaN,NaN],{values:a,xyMinMax:r}}var _T={lineX:lT(wT,0),lineY:lT(wT,1),rect:function(t,e,i){return[[t[0][0]-i[0]*e[0][0],t[0][1]-i[0]*e[0][1]],[t[1][0]-i[1]*e[1][0],t[1][1]-i[1]*e[1][1]]]},polygon:function(t,e,i){return D(t,(function(t,n){return[t[0]-i[0]*e[n][0],t[1]-i[1]*e[n][1]]}))}};function wT(t,e,i,n){return[e[0]-n[t]*i[0],e[1]-n[t]*i[1]]}function bT(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var ST=A,MT="\0_ec_hist_store";function IT(t){return t[MT]||(t[MT]=[{}])}ou.registerSubTypeDefaulter("dataZoom",(function(){return"slider"}));var TT,AT,DT,CT,LT=["cartesian2d","polar","singleAxis"],kT=(AT=["axisIndex","axis","index","id"],DT=D(TT=(TT=["x","y","z","radius","angle","single"]).slice(),Fl),CT=D(AT=(AT||[]).slice(),Fl),function(t,e){A(TT,(function(i,n){for(var o={name:i,capital:DT[n]},a=0;a<AT.length;a++)o[AT[a]]=i+CT[a];t.call(e,o)}))});function PT(t,e,i,n){this._dimName=t,this._axisIndex=e,this.ecModel=n,this._dataZoomModel=i}var OT=A,NT=dl;function ET(t,e){var i=t.getAxisModel(),n=t._percentWindow,o=t._valueWindow;if(n){var a=gl(o,[0,500]);a=Math.min(a,20);var r=e||0===n[0]&&100===n[1];i.setRange(r?null:+o[0].toFixed(a),r?null:+o[1].toFixed(a))}}PT.prototype={constructor:PT,hostedBy:function(t){return this._dataZoomModel===t},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var t=[],e=this.ecModel;return e.eachSeries((function(i){if(function(t){return 0<=S(LT,t)}(i.get("coordinateSystem"))){var n=this._dimName,o=e.queryComponents({mainType:n+"Axis",index:i.get(n+"AxisIndex"),id:i.get(n+"AxisId")})[0];this._axisIndex===(o&&o.componentIndex)&&t.push(i)}}),this),t},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var t,e,i,n=this._dimName,o=this.ecModel,a=this.getAxisModel();return t="x"===n||"y"===n?(e="gridIndex","x"===n?"y":"x"):(e="polarIndex","angle"===n?"radius":"angle"),o.eachComponent(t+"Axis",(function(t){(t.get(e)||0)===(a.get(e)||0)&&(i=t)})),i},getMinMaxSpan:function(){return m(this._minMaxSpan)},calculateDataWindow:function(t){var e,i=this._dataExtent,n=this.getAxisModel().axis.scale,o=this._dataZoomModel.getRangePropMode(),a=[0,100],r=[],s=[];OT(["start","end"],(function(l,u){var h=t[l],c=t[l+"Value"];"percent"===o[u]?(null==h&&(h=a[u]),c=n.parse(ul(h,a,i))):(e=!0,h=ul(c=null==c?i[u]:n.parse(c),i,a)),s[u]=c,r[u]=h})),NT(s),NT(r);var l=this._minMaxSpan;function u(t,e,i,o,a){var r=a?"Span":"ValueSpan";Q_(0,t,i,"all",l["min"+r],l["max"+r]);for(var s=0;s<2;s++)e[s]=ul(t[s],i,o,!0),a&&(e[s]=n.parse(e[s]))}return e?u(s,r,i,a,!1):u(r,s,a,i,!0),{valueWindow:s,percentWindow:r}},reset:function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=function(t,e,i){var n=[1/0,-1/0];return OT(i,(function(t){var i=t.getData();i&&OT(i.mapDimension(e,!0),(function(t){var e=i.getApproximateExtent(t);e[0]<n[0]&&(n[0]=e[0]),e[1]>n[1]&&(n[1]=e[1])}))})),n[1]<n[0]&&(n=[NaN,NaN]),function(t,e){var i=t.getAxisModel(),n=i.getMin(!0),o="category"===i.get("type"),a=o&&i.getCategories().length;null!=n&&"dataMin"!==n&&"function"!=typeof n?e[0]=n:o&&(e[0]=0<a?0:NaN);var r=i.getMax(!0);null!=r&&"dataMax"!==r&&"function"!=typeof r?e[1]=r:o&&(e[1]=0<a?a-1:NaN),i.get("scale",!0)||(0<e[0]&&(e[0]=0),e[1]<0&&(e[1]=0))}(t,n),n}(this,this._dimName,e),function(t){var e=t._minMaxSpan={},i=t._dataZoomModel,n=t._dataExtent;OT(["min","max"],(function(o){var a=i.get(o+"Span"),r=i.get(o+"ValueSpan");null!=r&&(r=t.getAxisModel().axis.scale.parse(r)),null!=r?a=ul(n[0]+r,n,[0,100],!0):null!=a&&(r=ul(a,[0,100],n,!0)-n[0]),e[o+"Span"]=a,e[o+"ValueSpan"]=r}))}(this);var i=this.calculateDataWindow(t.settledOption);this._valueWindow=i.valueWindow,this._percentWindow=i.percentWindow,ET(this)}},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,ET(this,!0))},filterData:function(t,e){if(t===this._dataZoomModel){var i=this._dimName,n=this.getTargetSeriesModels(),o=t.get("filterMode"),a=this._valueWindow;"none"!==o&&OT(n,(function(t){var e=t.getData(),n=e.mapDimension(i,!0);n.length&&("weakFilter"===o?e.filterSelf((function(t){for(var i,o,r,s=0;s<n.length;s++){var l=e.get(n[s],t),u=!isNaN(l),h=l<a[0],c=l>a[1];if(u&&!h&&!c)return!0;u&&(r=!0),h&&(i=!0),c&&(o=!0)}return r&&i&&o})):OT(n,(function(i){if("empty"===o)t.setData(e=e.map(i,(function(t){return function(t){return t>=a[0]&&t<=a[1]}(t)?t:NaN})));else{var n={};n[i]=a,e.selectRange(n)}})),OT(n,(function(t){e.setApproximateExtent(a,t)})))}))}}};var RT=A,zT=kT,BT=Yd({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,i){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var n=VT(t);this.settledOption=n,this.mergeDefaultAndTheme(t,i),this.doInit(n)},mergeOption:function(t){var e=VT(t);v(this.option,t,!0),v(this.settledOption,e,!0),this.doInit(e)},doInit:function(t){var e=this.option;o.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),GT(this,t);var i=this.settledOption;RT([["start","startValue"],["end","endValue"]],(function(t,n){"value"===this._rangePropMode[n]&&(e[t[0]]=i[t[0]]=null)}),this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var t=this._axisProxies;this.eachTargetAxis((function(e,i,n,o){var a=this.dependentModels[e.axis][i],r=a.__dzAxisProxy||(a.__dzAxisProxy=new PT(e.name,i,this,o));t[e.name+"_"+i]=r}),this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();zT((function(e){var i=e.axisIndex;t[i]=bo(t[i])}),this),"axisIndex"===e?this._autoSetAxisIndex():"orient"===e&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;zT((function(i){null!=t[i.axisIndex]&&(e=!0)}),this);var i=t.orient;return null==i&&e?"orient":e?void 0:(null==i&&(t.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var t=!0,e=this.get("orient",!0),i=this.option,n=this.dependentModels;if(t){var o="vertical"===e?"y":"x";n[o+"Axis"].length?(i[o+"AxisIndex"]=[0],t=!1):RT(n.singleAxis,(function(n){t&&n.get("orient",!0)===e&&(i.singleAxisIndex=[n.componentIndex],t=!1)}))}t&&zT((function(e){if(t){var n=[],o=this.dependentModels[e.axis];if(o.length&&!n.length)for(var a=0,r=o.length;a<r;a++)"category"===o[a].get("type")&&n.push(a);(i[e.axisIndex]=n).length&&(t=!1)}}),this),t&&this.ecModel.eachSeries((function(t){this._isSeriesHasAllAxesTypeOf(t,"value")&&zT((function(e){var n=i[e.axisIndex],o=t.get(e.axisIndex),a=t.get(e.axisId);S(n,o=t.ecModel.queryComponents({mainType:e.axis,index:o,id:a})[0].componentIndex)<0&&n.push(o)}))}),this)},_autoSetOrient:function(){var t;this.eachTargetAxis((function(e){t=t||e.name}),this),this.option.orient="y"===t?"vertical":"horizontal"},_isSeriesHasAllAxesTypeOf:function(t,e){var i=!0;return zT((function(n){var o=t.get(n.axisIndex),a=this.dependentModels[n.axis][o];a&&a.get("type")===e||(i=!1)}),this),i},_setDefaultThrottle:function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&0<e.animationDurationUpdate?100:20}},getFirstTargetAxisModel:function(){var t;return zT((function(e){if(null==t){var i=this.get(e.axisIndex);i.length&&(t=this.dependentModels[e.axis][i[0]])}}),this),t},eachTargetAxis:function(t,e){var i=this.ecModel;zT((function(n){RT(this.get(n.axisIndex),(function(o){t.call(e,n,o,this,i)}),this)}),this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},getAxisModel:function(t,e){var i=this.getAxisProxy(t,e);return i&&i.getAxisModel()},setRawRange:function(t){var e=this.option,i=this.settledOption;RT([["start","startValue"],["end","endValue"]],(function(n){null==t[n[0]]&&null==t[n[1]]||(e[n[0]]=i[n[0]]=t[n[0]],e[n[1]]=i[n[1]]=t[n[1]])}),this),GT(this,t)},setCalculatedRange:function(t){var e=this.option;RT(["start","startValue","end","endValue"],(function(i){e[i]=t[i]}))},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},getValueRange:function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var i=this.findRepresentativeAxisProxy();return i?i.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(t){if(t)return t.__dzAxisProxy;var e=this._axisProxies;for(var i in e)if(e.hasOwnProperty(i)&&e[i].hostedBy(this))return e[i];for(var i in e)if(e.hasOwnProperty(i)&&!e[i].hostedBy(this))return e[i]},getRangePropMode:function(){return this._rangePropMode.slice()}});function VT(t){var e={};return RT(["start","end","startValue","endValue","throttle"],(function(i){t.hasOwnProperty(i)&&(e[i]=t[i])})),e}function GT(t,e){var i=t._rangePropMode,n=t.get("rangeMode");RT([["start","startValue"],["end","endValue"]],(function(t,o){var a=null!=e[t[0]],r=null!=e[t[1]];a&&!r?i[o]="percent":!a&&r?i[o]="value":n?i[o]=n[o]:a&&(i[o]="percent")}))}var FT=Bh.extend({type:"dataZoom",render:function(t,e,i,n){this.dataZoomModel=t,this.ecModel=e,this.api=i},getTargetCoordInfo:function(){var t=this.ecModel,e={};return this.dataZoomModel.eachTargetAxis((function(i,n){var o=t.getComponent(i.axis,n);if(o){var a=o.getCoordSysModel();a&&function(t,e,i,n){for(var o,a=0;a<i.length;a++)if(i[a].model===t){o=i[a];break}o||i.push(o={model:t,axisModels:[],coordIndex:n}),o.axisModels.push(e)}(a,o,e[a.mainType]||(e[a.mainType]=[]),a.componentIndex)}}),this),e}});BT.extend({type:"dataZoom.select"}),FT.extend({type:"dataZoom.select"}),Gd({getTargetSeries:function(t){var e=Q();return t.eachComponent("dataZoom",(function(t){t.eachTargetAxis((function(t,i,n){A(n.getAxisProxy(t.name,i).getTargetSeriesModels(),(function(t){e.set(t.uid,t)}))}))})),e},modifyOutputEnd:!0,overallReset:function(t,e){t.eachComponent("dataZoom",(function(t){t.eachTargetAxis((function(t,i,n){n.getAxisProxy(t.name,i).reset(n,e)})),t.eachTargetAxis((function(t,i,n){n.getAxisProxy(t.name,i).filterData(n,e)}))})),t.eachComponent("dataZoom",(function(t){var e=t.findRepresentativeAxisProxy(),i=e.getDataPercentWindow(),n=e.getDataValueWindow();t.setCalculatedRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]})}))}}),Fd("dataZoom",(function(t,e){var i=function(t,e,i){return function(o){var a,r={nodes:[],records:{}};if(e((function(t){r.records[t.name]={}})),!o)return r;for(n(o,r);a=!1,t(s),a;);function s(t){!function(t,e){return 0<=S(e.nodes,t)}(t,r)&&function(t,n){var o=!1;return e((function(e){A(i(t,e)||[],(function(t){n.records[e.name][t]&&(o=!0)}))})),o}(t,r)&&(n(t,r),a=!0)}return r};function n(t,n){n.nodes.push(t),e((function(e){A(i(t,e)||[],(function(t){n.records[e.name][t]=!0}))}))}}(P(e.eachComponent,e,"dataZoom"),kT,(function(t,e){return t.get(e.axisIndex)})),n=[];e.eachComponent({mainType:"dataZoom",query:t},(function(t,e){n.push.apply(n,i(t).nodes)})),A(n,(function(e,i){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})}))}));var WT=A;function HT(t,e,i){(this._brushController=new bw(i.getZr())).on("brush",P(this._onBrush,this)).mount()}HT.defaultOption={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:m(nc.toolbox.dataZoom.title)};var ZT=HT.prototype;ZT.render=function(t,e,i,n){this.model=t,this.ecModel=e,this.api=i,function(t,e,i,n,o){var a=i._isZoomActive;n&&"takeGlobalCursor"===n.type&&(a="dataZoomSelect"===n.key&&n.dataZoomSelectActive),i._isZoomActive=a,t.setIconStatus("zoom",a?"emphasis":"normal");var r=new cT(XT(t.option),e,{include:["grid"]});i._brushController.setPanels(r.makePanelOpts(o,(function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"}))).enableBrush(!!a&&{brushType:"auto",brushStyle:{lineWidth:0,fill:"rgba(0,0,0,0.2)"}})}(t,e,this,n,i),function(t,e){t.setIconStatus("back",1<function(t){return IT(t).length}(e)?"emphasis":"normal")}(t,e)},ZT.onclick=function(t,e,i){UT[i].call(this)},ZT.remove=function(t,e){this._brushController.unmount()},ZT.dispose=function(t,e){this._brushController.dispose()};var UT={zoom:function(){this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:!this._isZoomActive})},back:function(){this._dispatchZoomAction(function(t){var e=IT(t),i=e[e.length-1];1<e.length&&e.pop();var n={};return ST(i,(function(t,i){for(var o=e.length-1;0<=o;o--)if(t=e[o][i]){n[i]=t;break}})),n}(this.ecModel))}};function XT(t){var e={};return A(["xAxisIndex","yAxisIndex"],(function(i){e[i]=t[i],null==e[i]&&(e[i]="all"),!1!==e[i]&&"none"!==e[i]||(e[i]=[])})),e}function YT(t){this.model=t}ZT._onBrush=function(t,e){if(e.isEnd&&t.length){var i={},n=this.ecModel;this._brushController.updateCovers([]),new cT(XT(this.model.option),n,{include:["grid"]}).matchOutputRanges(t,n,(function(t,e,i){if("cartesian2d"===i.type){var n=t.brushType;"rect"===n?(o("x",i,e[0]),o("y",i,e[1])):o({lineX:"x",lineY:"y"}[n],i,e)}})),function(t,e){var i=IT(t);ST(e,(function(e,n){for(var o=i.length-1;0<=o&&!i[o][n];o--);if(o<0){var a=t.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(a){var r=a.getPercentRange();i[0][n]={dataZoomId:n,start:r[0],end:r[1]}}}})),i.push(e)}(n,i),this._dispatchZoomAction(i)}function o(t,e,o){var a=e.getAxis(t),r=a.model,s=function(t,e,i){var n;return i.eachComponent({mainType:"dataZoom",subType:"select"},(function(i){i.getAxisModel(t,e.componentIndex)&&(n=i)})),n}(t,r,n),l=s.findRepresentativeAxisProxy(r).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(o=Q_(0,o.slice(),a.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(i[s.id]={dataZoomId:s.id,startValue:o[0],endValue:o[1]})}},ZT._dispatchZoomAction=function(t){var e=[];WT(t,(function(t,i){e.push(m(t))})),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},WI("dataZoom",HT),Vd((function(t){if(t){var e=t.dataZoom||(t.dataZoom=[]);N(e)||(t.dataZoom=e=[e]);var i=t.toolbox;if(i&&(N(i)&&(i=i[0]),i&&i.feature)){var n=i.feature.dataZoom;o("xAxis",n),o("yAxis",n)}}function o(i,n){if(n){var o=i+"Index",a=n[o];null==a||"all"===a||N(a)||(a=!1===a||"none"===a?[]:[a]),function(r,s){var l=t[r];N(l)||(l=l?[l]:[]),WT(l,(function(t,r){if(null==a||"all"===a||-1!==S(a,r)){var s={type:"select",$fromToolbox:!0,filterMode:n.filterMode||"filter",id:"\0_ec_\0toolbox-dataZoom_"+i+r};s[o]=r,e.push(s)}}))}(i)}}})),YT.defaultOption={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:nc.toolbox.restore.title},YT.prototype.onclick=function(t,e,i){!function(t){t[MT]=null}(t),e.dispatchAction({type:"restore",from:this.uid})},WI("restore",YT),Fd({type:"restore",event:"restore",update:"prepareAndUpdate"},(function(t,e){e.resetOption("recreate")})),Yd({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}});var jT=A,qT=Cl,KT=["","-webkit-","-moz-","-o-"];function $T(t,e){if(o.wxa)return null;var i=document.createElement("div"),n=this._zr=e.getZr();this.el=i,this._x=e.getWidth()/2,this._y=e.getHeight()/2,t.appendChild(i),this._container=t,this._show=!1;var a=this;i.onmouseenter=function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0},i.onmousemove=function(e){if(e=e||window.event,!a._enterable){var i=n.handler;Bt(t,e,!0),i.dispatch("mousemove",e)}},i.onmouseleave=function(){a._enterable&&a._show&&a.hideLater(a._hideDelay),a._inContent=!1}}function JT(t){this._zr=t.getZr(),this._show=!1}$T.prototype={constructor:$T,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),i=t.style;"absolute"!==i.position&&"absolute"!==e.position&&(i.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el;e.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+function(t){var e=[],i=t.get("transitionDuration"),n=t.get("backgroundColor"),a=t.getModel("textStyle"),r=t.get("padding");return i&&e.push(function(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",i="left "+t+"s "+e+",top "+t+"s "+e;return D(KT,(function(t){return t+"transition:"+i})).join(";")}(i)),n&&(o.canvasSupported?e.push("background-Color:"+n):(e.push("background-Color:#"+ze(n)),e.push("filter:alpha(opacity=70)"))),jT(["width","color","radius"],(function(i){var n="border-"+i,o=qT(n),a=t.get(o);null!=a&&e.push(n+":"+a+("color"===i?"":"px"))})),e.push(function(t){var e=[],i=t.get("fontSize"),n=t.getTextColor();return n&&e.push("color:"+n),e.push("font:"+t.getFont()),i&&e.push("line-height:"+Math.round(3*i/2)+"px"),jT(["decoration","align"],(function(i){var n=t.get(i);n&&e.push("text-"+i+":"+n)})),e.join(";")}(a)),null!=r&&e.push("padding:"+Ll(r).join("px ")+"px"),e.join(";")+";"}(t)+";left:"+this._x+"px;top:"+this._y+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",e.style.pointerEvents=this._enterable?"auto":"none",this._show=!0},setContent:function(t){this.el.innerHTML=null==t?"":t},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var i,n=this._zr;n&&n.painter&&(i=n.painter.getViewportRootOffset())&&(t+=i.offsetLeft,e+=i.offsetTop);var o=this.el.style;o.left=t+"px",o.top=e+"px",this._x=t,this._y=e},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(P(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){var t=this.el.clientWidth,e=this.el.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var i=document.defaultView.getComputedStyle(this.el);i&&(t+=parseInt(i.borderLeftWidth,10)+parseInt(i.borderRightWidth,10),e+=parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10))}return{width:t,height:e}}},JT.prototype={constructor:JT,_enterable:!0,update:function(){},show:function(t){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(t,e,i){this.el&&this._zr.remove(this.el);for(var n={},o=t,a="{marker",r=o.indexOf(a);0<=r;){var s=o.indexOf("|}"),l=o.substr(r+a.length,s-r-a.length);n["marker"+l]=-1<l.indexOf("sub")?{textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:e[l],textOffset:[3,0]}:{textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:e[l]},r=(o=o.substr(s+1)).indexOf("{marker")}this.el=new br({style:{rich:n,text:t,textLineHeight:20,textBackgroundColor:i.get("backgroundColor"),textBorderRadius:i.get("borderRadius"),textFill:i.get("textStyle.color"),textPadding:i.get("padding")},z:i.get("z")}),this._zr.add(this.el);var u=this;this.el.on("mouseover",(function(){u._enterable&&(clearTimeout(u._hideTimeout),u._show=!0),u._inContent=!0})),this.el.on("mouseout",(function(){u._enterable&&u._show&&u.hideLater(u._hideDelay),u._inContent=!1}))},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el.getBoundingRect();return[t.width,t.height]},moveTo:function(t,e){this.el&&this.el.attr("position",[t,e])},hide:function(){this.el&&this.el.hide(),this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(P(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){var t=this.getSize();return{width:t[0],height:t[1]}}};var QT=P,tA=A,eA=hl,iA=new zr({shape:{x:-1,y:-1,width:2,height:2}});function nA(t){for(var e=t.pop();t.length;){var i=t.pop();i&&(ol.isInstance(i)&&(i=i.get("tooltip",!0)),"string"==typeof i&&(i={formatter:i}),e=new ol(i,e,e.ecModel))}return e}function oA(t,e){return t.dispatchAction||P(e.dispatchAction,e)}function aA(t){return"center"===t||"middle"===t}jd({type:"tooltip",init:function(t,e){if(!o.node){var i,n=t.getComponent("tooltip").get("renderMode");this._renderMode=Ro(n),"html"===this._renderMode?(i=new $T(e.getDom(),e),this._newLine="<br/>"):(i=new JT(e),this._newLine="\n"),this._tooltipContent=i}},render:function(t,e,i){if(!o.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=i,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var n=this._tooltipContent;n.update(),n.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel.get("triggerOn");rM("itemTooltip",this._api,QT((function(e,i,n){"none"!==t&&(0<=t.indexOf(e)?this._tryShow(i,n):"leave"===e&&this._hide(n))}),this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,i=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var n=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){i.isDisposed()||n.manuallyShowTip(t,e,i,{x:n._lastX,y:n._lastY})}))}},manuallyShowTip:function(t,e,i,n){if(n.from!==this.uid&&!o.node){var a=oA(n,i);this._ticket="";var r=n.dataByCoordSys;if(n.tooltip&&null!=n.x&&null!=n.y){var s=iA;s.position=[n.x,n.y],s.update(),s.tooltip=n.tooltip,this._tryShow({offsetX:n.x,offsetY:n.y,target:s},a)}else if(r)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,event:{},dataByCoordSys:n.dataByCoordSys,tooltipOption:n.tooltipOption},a);else if(null!=n.seriesIndex){if(this._manuallyAxisShowTip(t,e,i,n))return;var l=qS(n,e),u=l.point[0],h=l.point[1];null!=u&&null!=h&&this._tryShow({offsetX:u,offsetY:h,position:n.position,target:l.el,event:{}},a)}else null!=n.x&&null!=n.y&&(i.dispatchAction({type:"updateAxisPointer",x:n.x,y:n.y}),this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,target:i.getZr().findHover(n.x,n.y).target,event:{}},a))}},manuallyHideTip:function(t,e,i,n){!this._alwaysShowContent&&this._tooltipModel&&this._tooltipContent.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,n.from!==this.uid&&this._hide(oA(n,i))},_manuallyAxisShowTip:function(t,e,i,n){var o=n.seriesIndex,a=n.dataIndex,r=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=o&&null!=a&&null!=r){var s=e.getSeriesByIndex(o);if(s&&"axis"===(t=nA([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model,t])).get("trigger"))return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:a,position:n.position}),!0}},_tryShow:function(t,e){var i=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var n=t.dataByCoordSys;n&&n.length?this._showAxisTooltip(n,t):i&&null!=i.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,i,e)):i&&i.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,i,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var i=t.get("showDelay");e=P(e,this),clearTimeout(this._showTimout),0<i?this._showTimout=setTimeout(e,i):e()},_showAxisTooltip:function(t,e){var i=this._ecModel,n=[e.offsetX,e.offsetY],o=[],a=[],r=nA([e.tooltipOption,this._tooltipModel]),s=this._renderMode,l=this._newLine,u={};tA(t,(function(t){tA(t.dataByAxis,(function(t){var e=i.getComponent(t.axisDim+"Axis",t.axisIndex),n=t.value,r=[];if(e&&null!=n){var h=wM(n,e.axis,i,t.seriesDataIndices,t.valueLabelOpt);A(t.seriesDataIndices,(function(o){var l=i.getSeriesByIndex(o.seriesIndex),c=o.dataIndexInside,d=l&&l.getDataParams(c);if(d.axisDim=t.axisDim,d.axisIndex=t.axisIndex,d.axisType=t.axisType,d.axisId=t.axisId,d.axisValue=Cp(e.axis,n),d.axisValueLabel=h,d){a.push(d);var f,p=l.formatTooltip(c,!0,null,s);z(p)?(f=p.html,v(u,p.markers)):f=p,r.push(f)}}));var c=h;o.push("html"!==s?r.join(l):(c?Ol(c)+l:"")+r.join(l))}}))}),this),o.reverse(),o=o.join(this._newLine+this._newLine);var h=e.position;this._showOrMove(r,(function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(r,h,n[0],n[1],this._tooltipContent,a):this._showTooltipContent(r,o,a,Math.random(),n[0],n[1],h,void 0,u)}))},_showSeriesItemTooltip:function(t,e,i){var n=e.seriesIndex,o=this._ecModel.getSeriesByIndex(n),a=e.dataModel||o,r=e.dataIndex,s=e.dataType,l=a.getData(),u=nA([l.getItemModel(r),a,o&&(o.coordinateSystem||{}).model,this._tooltipModel]),h=u.get("trigger");if(null==h||"item"===h){var c,d,f=a.getDataParams(r,s),p=a.formatTooltip(r,!1,s,this._renderMode);d=z(p)?(c=p.html,p.markers):(c=p,null);var g="item_"+a.name+"_"+r;this._showOrMove(u,(function(){this._showTooltipContent(u,c,f,g,t.offsetX,t.offsetY,t.position,t.target,d)})),i({type:"showTip",dataIndexInside:r,dataIndex:l.getRawIndex(r),seriesIndex:n,from:this.uid})}},_showComponentItemTooltip:function(t,e,i){var n=e.tooltip;"string"==typeof n&&(n={content:n,formatter:n});var o=new ol(n,this._tooltipModel,this._ecModel),a=o.get("content"),r=Math.random();this._showOrMove(o,(function(){this._showTooltipContent(o,a,o.get("formatterParams")||{},r,t.offsetX,t.offsetY,t.position,e)})),i({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,i,n,o,a,r,s,l){if(this._ticket="",t.get("showContent")&&t.get("show")){var u=this._tooltipContent,h=t.get("formatter");r=r||t.get("position");var c=e;if(h&&"string"==typeof h)c=Rl(h,i,!0);else if("function"==typeof h){var d=QT((function(e,n){e===this._ticket&&(u.setContent(n,l,t),this._updatePosition(t,r,o,a,u,i,s))}),this);this._ticket=n,c=h(i,n,d)}u.setContent(c,l,t),u.show(t),this._updatePosition(t,r,o,a,u,i,s)}},_updatePosition:function(t,e,i,n,o,a,r){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u=o.getSize(),h=t.get("align"),c=t.get("verticalAlign"),d=r&&r.getBoundingRect().clone();if(r&&d.applyTransform(r.transform),"function"==typeof e&&(e=e([i,n],a,o.el,d,{viewSize:[s,l],contentSize:u.slice()})),N(e))i=eA(e[0],s),n=eA(e[1],l);else if(z(e)){e.width=u[0],e.height=u[1];var f=ql(e,{width:s,height:l});i=f.x,n=f.y,c=h=null}else if("string"==typeof e&&r)i=(p=function(t,e,i){var n=i[0],o=i[1],a=0,r=0,s=e.width,l=e.height;switch(t){case"inside":a=e.x+s/2-n/2,r=e.y+l/2-o/2;break;case"top":a=e.x+s/2-n/2,r=e.y-o-5;break;case"bottom":a=e.x+s/2-n/2,r=e.y+l+5;break;case"left":a=e.x-n-5,r=e.y+l/2-o/2;break;case"right":a=e.x+s+5,r=e.y+l/2-o/2}return[a,r]}(e,d,u))[0],n=p[1];else{var p;i=(p=function(t,e,i,n,o,a,r){var s=i.getOuterSize(),l=s.width,u=s.height;return null!=a&&(n<t+l+a?t-=l+a:t+=a),null!=r&&(o<e+u+r?e-=u+r:e+=r),[t,e]}(i,n,o,s,l,h?null:20,c?null:20))[0],n=p[1]}h&&(i-=aA(h)?u[0]/2:"right"===h?u[0]:0),c&&(n-=aA(c)?u[1]/2:"bottom"===c?u[1]:0),t.get("confine")&&(i=(p=function(t,e,i,n,o){var a=i.getOuterSize(),r=a.width,s=a.height;return t=Math.min(t+r,n)-r,e=Math.min(e+s,o)-s,[t=Math.max(t,0),e=Math.max(e,0)]}(i,n,o,s,l))[0],n=p[1]),o.moveTo(i,n)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,i=!!e&&e.length===t.length;return i&&tA(e,(function(e,n){var o=e.dataByAxis||{},a=(t[n]||{}).dataByAxis||[];(i&=o.length===a.length)&&tA(o,(function(t,e){var n=a[e]||{},o=t.seriesDataIndices||[],r=n.seriesDataIndices||[];(i&=t.value===n.value&&t.axisType===n.axisType&&t.axisId===n.axisId&&o.length===r.length)&&tA(o,(function(t,e){var n=r[e];i&=t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex}))}))})),this._lastDataByCoordSys=t,!!i},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){o.node||(this._tooltipContent.hide(),uM("itemTooltip",e))}}),Fd({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},(function(){})),Fd({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},(function(){}));var rA=["rect","polygon","keep","clear"],sA=A;function lA(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function uA(t,e,i){var n={};return sA(e,(function(e){var o=n[e]=function(){function t(){}return t.prototype.__hidden=t.prototype,new t}();sA(t[e],(function(t,n){if(yx.isValidType(n)){var a={type:n,visual:t};i&&i(a,e),o[n]=new yx(a),"opacity"===n&&((a=m(a)).type="colorAlpha",o.__hidden.__alphaForOpacity=new yx(a))}}))})),n}function hA(t,e,i){var n;A(i,(function(t){e.hasOwnProperty(t)&&lA(e[t])&&(n=!0)})),n&&A(i,(function(i){e.hasOwnProperty(i)&&lA(e[i])?t[i]=m(e[i]):delete t[i]}))}var cA={lineX:dA(0),lineY:dA(1),rect:{point:function(t,e,i){return t&&i.boundingRect.contain(t[0],t[1])},rect:function(t,e,i){return t&&i.boundingRect.intersect(t)}},polygon:{point:function(t,e,i){return t&&i.boundingRect.contain(t[0],t[1])&&Zp(i.range,t[0],t[1])},rect:function(t,e,i){var n=i.range;if(!t||n.length<=1)return!1;var o=t.x,a=t.y,r=t.width,s=t.height,l=n[0];return!!(Zp(n,o,a)||Zp(n,o+r,a)||Zp(n,o,a+s)||Zp(n,o+r,a+s)||vi.create(t).contain(l[0],l[1])||js(o,a,o+r,a,n)||js(o,a,o,a+s,n)||js(o+r,a,o+r,a+s,n)||js(o,a+s,o+r,a+s,n))||void 0}}};function dA(t){var e=["x","y"],i=["width","height"];return{point:function(e,i,n){if(e)return fA(e[t],n.range)},rect:function(n,o,a){if(n){var r=a.range,s=[n[e[t]],n[e[t]]+n[i[t]]];return s[1]<s[0]&&s.reverse(),fA(s[0],r)||fA(s[1],r)||fA(r[0],s)||fA(r[1],s)}}}}function fA(t,e){return e[0]<=t&&t<=e[1]}var pA=["inBrush","outOfBrush"],gA="__ecBrushSelect",mA="__ecInBrushSelectEvent",vA=Jc.VISUAL.BRUSH;function yA(t,e){if(!t.isDisposed()){var i=t.getZr();i[mA]=!0,t.dispatchAction({type:"brushSelect",batch:e}),i[mA]=!1}}function xA(t,e,i,n){for(var o=0,a=e.length;o<a;o++){var r=e[o];if(t[r.brushType](n,i,r.selectors,r))return!0}}function _A(t){var e=t.brushSelector;if(R(e)){var i=[];return A(cA,(function(t,n){i[n]=function(i,n,o,a){var r=n.getItemLayout(i);return t[e](r,o,a)}})),i}if(E(e)){var n={};return A(cA,(function(t,i){n[i]=e})),n}return e}Hd(vA,(function(t,e,i){t.eachComponent({mainType:"brush"},(function(e){i&&"takeGlobalCursor"===i.type&&e.setBrushOption("brush"===i.key?i.brushOption:{brushType:!1}),(e.brushTargetManager=new cT(e.option,t)).setInputRanges(e.areas,t)}))})),Zd(vA,(function(t,e,i){var n,o,a=[];t.eachComponent({mainType:"brush"},(function(e,i){var r={brushId:e.id,brushIndex:i,brushName:e.name,areas:m(e.areas),selected:[]};a.push(r);var s=e.option,l=s.brushLink,u=[],h=[],c=[],d=0;i||(n=s.throttleType,o=s.throttleDelay);var f=D(e.areas,(function(t){return function(t){var e=t.selectors={};return A(cA[t.brushType],(function(i,n){e[n]=function(n){return i(n,e,t)}})),t}(_({boundingRect:wA[t.brushType](t)},t))})),p=uA(e.option,pA,(function(t){t.mappingMethod="fixed"}));function g(t){return"all"===l||u[t]}function v(t){return!!t.length}N(l)&&A(l,(function(t){u[t]=1})),t.eachSeries((function(i,n){var o=c[n]=[];"parallel"===i.subType?function(t,e){var i=t.coordinateSystem;d|=i.hasAxisBrushed(),g(e)&&i.eachActiveState(t.getData(),(function(t,e){"active"===t&&(h[e]=1)}))}(i,n):function(i,n,o){var a=_A(i);if(a&&!function(t,e){var i=t.option.seriesIndex;return null!=i&&"all"!==i&&(N(i)?S(i,e)<0:e!==i)}(e,n)&&(A(f,(function(n){a[n.brushType]&&e.brushTargetManager.controlSeries(n,i,t)&&o.push(n),d|=v(o)})),g(n)&&v(o))){var r=i.getData();r.each((function(t){xA(a,o,r,t)&&(h[t]=1)}))}}(i,n,o)})),t.eachSeries((function(t,e){var i={seriesId:t.id,seriesIndex:e,seriesName:t.name,dataIndex:[]};r.selected.push(i);var n=_A(t),o=c[e],a=t.getData(),s=g(e)?function(t){return h[t]?(i.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"}:function(t){return xA(n,o,a,t)?(i.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"};(g(e)?d:v(o))&&function(t,e,i,n,o,a){var r,s={};function l(t){return i.getItemVisual(r,t)}function u(t,e){i.setItemVisual(r,t,e)}A(t,(function(t){var i=yx.prepareVisualTypes(e[t]);s[t]=i})),i.each((function(t,o){var a=i.getRawDataItem(r=t);if(!a||!1!==a.visualMap)for(var h=n.call(void 0,t),c=e[h],d=s[h],f=0,p=d.length;f<p;f++){var g=d[f];c[g]&&c[g].applyVisual(t,l,u)}}))}(pA,p,a,s)}))})),function(t,e,i,n,o){if(o){var a=t.getZr();a[mA]||(a[gA]||(a[gA]=yA),tc(a,gA,i,e)(t,n))}}(e,n,o,a,i)}));var wA={lineX:et,lineY:et,rect:function(t){return bA(t.range)},polygon:function(t){for(var e,i=t.range,n=0,o=i.length;n<o;n++){var a=i[n];a[0]<(e=e||[[1/0,-1/0],[1/0,-1/0]])[0][0]&&(e[0][0]=a[0]),a[0]>e[0][1]&&(e[0][1]=a[0]),a[1]<e[1][0]&&(e[1][0]=a[1]),a[1]>e[1][1]&&(e[1][1]=a[1])}return e&&bA(e)}};function bA(t){return new vi(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var SA=["#ddd"];function MA(t,e){return v({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new ol(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}function IA(t,e,i,n){n&&n.$from===t.id||this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}function TA(t,e,i){this.model=t,this.ecModel=e,this.api=i}Yd({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(t,e){var i=this.option;e||hA(i,t,["inBrush","outOfBrush"]);var n=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:SA},n.hasOwnProperty("liftZ")||(n.liftZ=5)},setAreas:function(t){t&&(this.areas=D(t,(function(t){return MA(this.option,t)}),this))},setBrushOption:function(t){this.brushOption=MA(this.option,t),this.brushType=this.brushOption.brushType}}),jd({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,(this._brushController=new bw(e.getZr())).on("brush",P(this._onBrush,this)).mount()},render:function(t){return this.model=t,IA.apply(this,arguments)},updateTransform:IA,updateView:IA,dispose:function(){this._brushController.dispose()},_onBrush:function(t,e){var i=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel),e.isEnd&&!e.removeOnClick||this.api.dispatchAction({type:"brush",brushId:i,areas:m(t),$from:i}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:i,areas:m(t),$from:i})}}),Fd({type:"brush",event:"brush"},(function(t,e){e.eachComponent({mainType:"brush",query:t},(function(e){e.setAreas(t.areas)}))})),Fd({type:"brushSelect",event:"brushSelected",update:"none"},(function(){})),Fd({type:"brushEnd",event:"brushEnd",update:"none"},(function(){})),TA.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:m(nc.toolbox.brush.title)};var AA=TA.prototype;function DA(t){var e=t.itemStyle||(t.itemStyle={}),i=e.emphasis||(e.emphasis={}),n=t.label||t.label||{},o=n.normal||(n.normal={}),a={normal:1,emphasis:1};A(n,(function(t,e){a[e]||CA(o,e)||(o[e]=t)})),i.label&&!CA(n,"emphasis")&&(n.emphasis=i.label,delete i.label)}function CA(t,e){return t.hasOwnProperty(e)}AA.render=AA.updateView=function(t,e,i){var n,o,a;e.eachComponent({mainType:"brush"},(function(t){n=t.brushType,o=t.brushOption.brushMode||"single",a|=t.areas.length})),this._brushType=n,this._brushMode=o,A(t.get("type",!0),(function(e){t.setIconStatus(e,("keep"===e?"multiple"===o:"clear"===e?a:e===n)?"emphasis":"normal")}))},AA.getIcons=function(){var t=this.model,e=t.get("icon",!0),i={};return A(t.get("type",!0),(function(t){e[t]&&(i[t]=e[t])})),i},AA.onclick=function(t,e,i){var n=this._brushType,o=this._brushMode;"clear"===i?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===i?n:n!==i&&i,brushMode:"keep"===i?"multiple"===o?"single":"multiple":o}})},WI("brush",TA),Vd((function(t,e){var i=t&&t.brush;if(N(i)||(i=i?[i]:[]),i.length){var n=[];A(i,(function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(n=n.concat(e))}));var o=t&&t.toolbox;N(o)&&(o=o[0]),o||(t.toolbox=[o={feature:{}}]);var a=o.feature||(o.feature={}),r=a.brush||(a.brush={}),s=r.type||(r.type=[]);s.push.apply(s,n),function(t){var e={};A(t,(function(t){e[t]=1})),t.length=0,A(e,(function(e,i){t.push(i)}))}(s),e&&!s.length&&s.push.apply(s,rA)}})),Yd({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),jd({type:"title",render:function(t,e,i){if(this.group.removeAll(),t.get("show")){var n=this.group,o=t.getModel("textStyle"),a=t.getModel("subtextStyle"),r=t.get("textAlign"),s=H(t.get("textBaseline"),t.get("textVerticalAlign")),l=new br({style:Ps({},o,{text:t.get("text"),textFill:o.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=t.get("subtext"),c=new br({style:Ps({},a,{text:h,textFill:a.getTextColor(),y:u.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),f=t.get("sublink"),p=t.get("triggerEvent",!0);l.silent=!d&&!p,c.silent=!f&&!p,d&&l.on("click",(function(){window.open(d,"_"+t.get("target"))})),f&&c.on("click",(function(){window.open(f,"_"+t.get("subtarget"))})),l.eventData=c.eventData=p?{componentType:"title",componentIndex:t.componentIndex}:null,n.add(l),h&&n.add(c);var g=n.getBoundingRect(),m=t.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=ql(m,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));r||("middle"===(r=t.get("left")||t.get("right"))&&(r="center"),"right"===r?v.x+=v.width:"center"===r&&(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"),n.attr("position",[v.x,v.y]);var y={textAlign:r,textVerticalAlign:s};l.setStyle(y),c.setStyle(y),g=n.getBoundingRect();var x=v.margin,_=t.getItemStyle(["color","opacity"]);_.fill=t.get("backgroundColor");var w=new zr({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:t.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0});n.add(w)}}}),ou.registerSubTypeDefaulter("timeline",(function(){return"slider"})),Fd({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},(function(t,e){var i=e.getComponent("timeline");return i&&null!=t.currentIndex&&(i.setCurrentIndex(t.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.setPlayState(!1)),e.resetOption("timeline"),_({currentIndex:i.option.currentIndex},t)})),Fd({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},(function(t,e){var i=e.getComponent("timeline");i&&null!=t.playState&&i.setPlayState(t.playState)}));var LA=ou.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},init:function(t,e,i){this.mergeDefaultAndTheme(t,i),this._initData()},mergeOption:function(t){LA.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(e<=t&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var t=this.option,e=t.data||[],i=t.axisType,n=this._names=[];if("category"===i){var o=[];A(e,(function(t,e){var i,a=Io(t);z(t)?(i=m(t)).value=e:i=e,o.push(i),R(a)||null!=a&&!isNaN(a)||(a=""),n.push(a+"")})),e=o}(this._data=new gf([{name:"value",type:{category:"ordinal",time:"time"}[i]||"number"}],this)).initData(e,n)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}});function kA(t,e,i,n){ig.call(this,t,e,i),this.type=n||"value",this.model=null}I(LA.extend({type:"timeline.slider",defaultOption:{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptyCircle",symbolSize:10,lineStyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#304654"},itemStyle:{color:"#304654",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:13,color:"#c23531",borderWidth:5,borderColor:"rgba(194,53,49, 0.5)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:22,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",prevIcon:"path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{label:{show:!0,color:"#c23531"},itemStyle:{color:"#c23531"},controlStyle:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}}),gh);var PA=Bh.extend({type:"timeline"});kA.prototype={constructor:kA,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},M(kA,ig);var OA=P,NA=A,EA=Math.PI;function RA(t,e,i,n,o,a){var r=e.get("color");o?(o.setColor(r),i.add(o),a&&a.onUpdate(o)):((o=Fp(t.get("symbol"),-1,-1,2,2,r)).setStyle("strokeNoScale",!0),i.add(o),a&&a.onCreate(o));var s=e.getItemStyle(["color","symbol","symbolSize"]);o.setStyle(s),n=v({rectHover:!0,z2:100},n,!0);var l=t.get("symbolSize");(l=l instanceof Array?l.slice():[+l,+l])[0]/=2,l[1]/=2,n.scale=l;var u=t.get("symbolOffset");if(u){var h=n.position=n.position||[0,0];h[0]+=hl(u[0],l[0]),h[1]+=hl(u[1],l[1])}var c=t.get("symbolRotate");return n.rotation=(c||0)*Math.PI/180||0,o.attr(n),o.updateTransform(),o}function zA(t,e,i,n,o){if(!t.dragging){var a=n.getModel("checkpointStyle"),r=i.dataToCoord(n.getData().get(["value"],e));o||!a.get("animation",!0)?t.attr({position:[r,0]}):(t.stopAnimation(!0),t.animateTo({position:[r,0]},a.get("animationDuration",!0),a.get("animationEasing",!0)))}}PA.extend({type:"timeline.slider",init:function(t,e){this.api=e},render:function(t,e,i,n){if(this.model=t,this.api=i,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var o=this._layout(t,i),a=this._createGroup("mainGroup"),r=this._createGroup("labelGroup"),s=this._axis=this._createAxis(o,t);t.formatTooltip=function(t){return Ol(s.scale.getLabel(t))},NA(["AxisLine","AxisTick","Control","CurrentPointer"],(function(e){this["_render"+e](o,a,s,t)}),this),this._renderAxisLabel(o,r,s,t),this._position(o,t)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var i=t.get("label.position"),n=t.get("orient"),o=function(t,e){return ql(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}(t,e);null==i||"auto"===i?i="horizontal"===n?o.y+o.height/2<e.getHeight()/2?"-":"+":o.x+o.width/2<e.getWidth()/2?"+":"-":isNaN(i)&&(i={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[n][i]);var a,r,s,l,u={horizontal:"center",vertical:0<=i||"+"===i?"left":"right"},h={horizontal:0<=i||"+"===i?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:EA/2},d="vertical"===n?o.height:o.width,f=t.getModel("controlStyle"),p=f.get("show",!0),g=p?f.get("itemSize"):0,m=p?f.get("itemGap"):0,v=g+m,y=t.get("label.rotate")||0;y=y*EA/180;var x=f.get("position",!0),_=p&&f.get("showPlayBtn",!0),w=p&&f.get("showPrevBtn",!0),b=0,S=d;return"left"===x||"bottom"===x?(_&&(a=[0,0],b+=v),w&&(r=[b,0],b+=v)):(_&&(a=[S-g,0],S-=v),w&&(r=[0,0],b+=v)),p&&f.get("showNextBtn",!0)&&(s=[S-g,0],S-=v),l=[b,S],t.get("inverse")&&l.reverse(),{viewRect:o,mainLength:d,orient:n,rotation:c[n],labelRotation:y,labelPosOpt:i,labelAlign:t.get("label.align")||u[n],labelBaseline:t.get("label.verticalAlign")||t.get("label.baseline")||h[n],playPosition:a,prevBtnPosition:r,nextBtnPosition:s,axisExtent:l,controlSize:g,controlGap:m}},_position:function(t,e){var i=this._mainGroup,n=this._labelGroup,o=t.viewRect;if("vertical"===t.orient){var a=Jt(),r=o.x,s=o.y+o.height;ie(a,a,[-r,-s]),ne(a,a,-EA/2),ie(a,a,[r,s]),(o=o.clone()).applyTransform(a)}var l=m(o),u=m(i.getBoundingRect()),h=m(n.getBoundingRect()),c=i.position,d=n.position;d[0]=c[0]=l[0][0];var f,p=t.labelPosOpt;function g(t){var e=t.position;t.origin=[l[0][0]-e[0],l[1][0]-e[1]]}function m(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function v(t,e,i,n,o){t[n]+=i[n][o]-e[n][o]}isNaN(p)?(v(c,u,l,1,f="+"===p?0:1),v(d,h,l,1,1-f)):(v(c,u,l,1,f=0<=p?0:1),d[1]=c[1]+p),i.attr("position",c),n.attr("position",d),i.rotation=n.rotation=t.rotation,g(i),g(n)},_createAxis:function(t,e){var i=e.getData(),n=e.get("axisType"),o=Ap(e,n);o.getTicks=function(){return i.mapArray(["value"],(function(t){return t}))};var a=i.getDataExtent("value");o.setExtent(a[0],a[1]),o.niceTicks();var r=new kA("value",o,t.axisExtent,n);return r.model=e,r},_createGroup:function(t){var e=this["_"+t]=new yi;return this.group.add(e),e},_renderAxisLine:function(t,e,i,n){var o=i.getExtent();n.get("lineStyle.show")&&e.add(new Vr({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:x({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,e,i,n){var o=n.getData(),a=i.scale.getTicks();NA(a,(function(t){var a=i.dataToCoord(t),r=o.getItemModel(t),s=r.getModel("itemStyle"),l=r.getModel("emphasis.itemStyle"),u={position:[a,0],onclick:OA(this._changeTimeline,this,t)},h=RA(r,s,e,u);Ts(h,l.getItemStyle()),r.get("tooltip")?(h.dataIndex=t,h.dataModel=n):h.dataIndex=h.dataModel=null}),this)},_renderAxisLabel:function(t,e,i,n){if(i.getLabelModel().get("show")){var o=n.getData(),a=i.getViewLabels();NA(a,(function(n){var a=n.tickValue,r=o.getItemModel(a),s=r.getModel("label"),l=r.getModel("emphasis.label"),u=i.dataToCoord(n.tickValue),h=new br({position:[u,0],rotation:t.labelRotation-t.rotation,onclick:OA(this._changeTimeline,this,a),silent:!1});Ps(h.style,s,{text:n.formattedLabel,textAlign:t.labelAlign,textVerticalAlign:t.labelBaseline}),e.add(h),Ts(h,Ps({},l))}),this)}},_renderControl:function(t,e,i,n){var o=t.controlSize,a=t.rotation,r=n.getModel("controlStyle").getItemStyle(),s=n.getModel("emphasis.controlStyle").getItemStyle(),l=[0,-o/2,o,o],u=n.getPlayState(),h=n.get("inverse",!0);function c(t,i,u,h){if(t){var c=function(t,e,i,n){return ss(t.get(e).replace(/^path:\/\//,""),m(n||{}),new vi(i[0],i[1],i[2],i[3]),"center")}(n,i,l,{position:t,origin:[o/2,0],rotation:h?-a:0,rectHover:!0,style:r,onclick:u});e.add(c),Ts(c,s)}}c(t.nextBtnPosition,"controlStyle.nextIcon",OA(this._changeTimeline,this,h?"-":"+")),c(t.prevBtnPosition,"controlStyle.prevIcon",OA(this._changeTimeline,this,h?"+":"-")),c(t.playPosition,"controlStyle."+(u?"stopIcon":"playIcon"),OA(this._handlePlayClick,this,!u),!0)},_renderCurrentPointer:function(t,e,i,n){var o=n.getData(),a=n.getCurrentIndex(),r=o.getItemModel(a).getModel("checkpointStyle"),s=this;this._currentPointer=RA(r,r,this._mainGroup,{},this._currentPointer,{onCreate:function(t){t.draggable=!0,t.drift=OA(s._handlePointerDrag,s),t.ondragend=OA(s._handlePointerDragend,s),zA(t,a,i,n,!0)},onUpdate:function(t){zA(t,a,i,n)}})},_handlePlayClick:function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},_handlePointerDrag:function(t,e,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},_handlePointerDragend:function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},_pointerChangeTimeline:function(t,e){var i=this._toAxisCoord(t)[0],n=dl(this._axis.getExtent().slice());i>n[1]&&(i=n[1]),i<n[0]&&(i=n[0]),this._currentPointer.position[0]=i,this._currentPointer.dirty();var o=this._findNearestTick(i),a=this.model;(e||o!==a.getCurrentIndex()&&a.get("realtime"))&&this._changeTimeline(o)},_doPlayStop:function(){this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(OA((function(){var t=this.model;this._changeTimeline(t.getCurrentIndex()+(t.get("rewind",!0)?-1:1))}),this),this.model.get("playInterval")))},_toAxisCoord:function(t){return Hs(t,this._mainGroup.getLocalTransform(),!0)},_findNearestTick:function(t){var e,i=this.model.getData(),n=1/0,o=this._axis;return i.each(["value"],(function(i,a){var r=o.dataToCoord(i),s=Math.abs(r-t);s<n&&(n=s,e=a)})),e},_clearTimer:function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},_changeTimeline:function(t){var e=this.model.getCurrentIndex();"+"===t?t=e+1:"-"===t&&(t=e-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})}}),Vd((function(t){var e=t&&t.timeline;N(e)||(e=e?[e]:[]),A(e,(function(t){t&&function(t){var e=t.type,i={number:"value",time:"time"};if(i[e]&&(t.axisType=i[e],delete t.type),DA(t),CA(t,"controlPosition")){var n=t.controlStyle||(t.controlStyle={});CA(n,"position")||(n.position=t.controlPosition),"none"!==n.position||CA(n,"show")||(n.show=!1,delete n.position),delete t.controlPosition}A(t.data||[],(function(t){z(t)&&!N(t)&&(!CA(t,"value")&&CA(t,"name")&&(t.value=t.name),DA(t))}))}(t)}))}));var BA=Dl,VA=Ol;function GA(t){So(t,"label",["show"])}var FA=Yd({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,i){this.mergeDefaultAndTheme(t,i),this._mergeOption(t,i,!1,!0)},isAnimationEnabled:function(){if(o.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e){this._mergeOption(t,e,!1,!1)},_mergeOption:function(t,e,i,n){var o=this.constructor,a=this.mainType+"Model";i||e.eachSeries((function(t){var i=t.get(this.mainType,!0),r=t[a];i&&i.data?(r?r._mergeOption(i,e,!0):(n&&GA(i),A(i.data,(function(t){t instanceof Array?(GA(t[0]),GA(t[1])):GA(t)})),x(r=new o(i,this,e),{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),r.__hostSeries=t),t[a]=r):t[a]=null}),this)},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=N(i)?D(i,BA).join(", "):BA(i),o=e.getName(t),a=VA(this.name);return null==i&&!o||(a+="<br />"),o&&(a+=VA(o),null!=i&&(a+=" : ")),null!=i&&(a+=VA(n)),a},getData:function(){return this._data},setData:function(t){this._data=t}});I(FA,gh),FA.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}});var WA=S;function HA(t,e,i,n,o,a){var r=[],s=Nf(e,n)?e.getCalculationInfo("stackResultDimension"):n,l=KA(e,s,t),u=e.indicesOfNearest(s,l)[0];r[o]=e.get(i,u),r[a]=e.get(n,u);var h=fl(e.get(n,u));return 0<=(h=Math.min(h,20))&&(r[a]=+r[a].toFixed(h)),r}var ZA=O,UA={min:ZA(HA,"min"),max:ZA(HA,"max"),average:ZA(HA,"average")};function XA(t,e){var i=t.getData(),n=t.coordinateSystem;if(e&&!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!N(e.coord)&&n){var o=n.dimensions,a=YA(e,i,n,t);if((e=m(e)).type&&UA[e.type]&&a.baseAxis&&a.valueAxis){var r=WA(o,a.baseAxis.dim),s=WA(o,a.valueAxis.dim);e.coord=UA[e.type](i,a.baseDataDim,a.valueDataDim,r,s),e.value=e.coord[s]}else{for(var l=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],u=0;u<2;u++)UA[l[u]]&&(l[u]=KA(i,i.mapDimension(o[u]),l[u]));e.coord=l}}return e}function YA(t,e,i,n){var o={};return null!=t.valueIndex||null!=t.valueDim?(o.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,o.valueAxis=i.getAxis(function(t,e){var i=t.getData(),n=i.dimensions;e=i.getDimension(e);for(var o=0;o<n.length;o++){var a=i.getDimensionInfo(n[o]);if(a.name===e)return a.coordDim}}(n,o.valueDataDim)),o.baseAxis=i.getOtherAxis(o.valueAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim)):(o.baseAxis=n.getBaseAxis(),o.valueAxis=i.getOtherAxis(o.baseAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim),o.valueDataDim=e.mapDimension(o.valueAxis.dim)),o}function jA(t,e){return!(t&&t.containData&&e.coord&&!function(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}(e))||t.containData(e.coord)}function qA(t,e,i,n){return n<2?t.coord&&t.coord[n]:t.value}function KA(t,e,i){if("average"!==i)return"median"===i?t.getMedian(e):t.getDataExtent(e,!0)["max"===i?1:0];var n=0,o=0;return t.each(e,(function(t,e){isNaN(t)||(n+=t,o++)})),n/o}var $A=jd({type:"marker",init:function(){this.markerGroupMap=Q()},render:function(t,e,i){var n=this.markerGroupMap;n.each((function(t){t.__keep=!1}));var o=this.type+"Model";e.eachSeries((function(t){var n=t[o];n&&this.renderSeries(t,n,e,i)}),this),n.each((function(t){t.__keep||this.group.remove(t.group)}),this)},renderSeries:function(){}});function JA(t,e,i){var n=e.coordinateSystem;t.each((function(o){var a,r=t.getItemModel(o),s=hl(r.get("x"),i.getWidth()),l=hl(r.get("y"),i.getHeight());if(isNaN(s)||isNaN(l)){if(e.getMarkerPosition)a=e.getMarkerPosition(t.getValues(t.dimensions,o));else if(n){var u=t.get(n.dimensions[0],o),h=t.get(n.dimensions[1],o);a=n.dataToPoint([u,h])}}else a=[s,l];isNaN(s)||(a[0]=s),isNaN(l)||(a[1]=l),t.setItemLayout(o,a)}))}function QA(t,e,i,n){var o=t.getData(),a=n.type;if(!N(n)&&("min"===a||"max"===a||"average"===a||"median"===a||null!=n.xAxis||null!=n.yAxis)){var r,s;if(null!=n.yAxis||null!=n.xAxis)r=e.getAxis(null!=n.yAxis?"y":"x"),s=W(n.yAxis,n.xAxis);else{var l=YA(n,o,e,t);r=l.valueAxis,s=KA(o,Ef(o,l.valueDataDim),a)}var u="x"===r.dim?0:1,h=1-u,c=m(n),d={};c.type=null,c.coord=[],d.coord=[],c.coord[h]=-1/0,d.coord[h]=1/0;var f=i.get("precision");0<=f&&"number"==typeof s&&(s=+s.toFixed(Math.min(f,20))),c.coord[u]=d.coord[u]=s,n=[c,d,{type:a,valueIndex:n.valueIndex,value:s}]}return(n=[XA(t,n[0]),XA(t,n[1]),x({},n[2])])[2].type=n[2].type||"",v(n[2],n[0]),v(n[2],n[1]),n}function tD(t){return!isNaN(t)&&!isFinite(t)}function eD(t,e,i,n){var o=1-t,a=n.dimensions[t];return tD(e[o])&&tD(i[o])&&e[t]===i[t]&&n.getAxis(a).containData(e[t])}function iD(t,e){if("cartesian2d"===t.type){var i=e[0].coord,n=e[1].coord;if(i&&n&&(eD(1,i,n,t)||eD(0,i,n,t)))return!0}return jA(t,e[0])&&jA(t,e[1])}function nD(t,e,i,n,o){var a,r=n.coordinateSystem,s=t.getItemModel(e),l=hl(s.get("x"),o.getWidth()),u=hl(s.get("y"),o.getHeight());if(isNaN(l)||isNaN(u)){if(n.getMarkerPosition)a=n.getMarkerPosition(t.getValues(t.dimensions,e));else{var h=r.dimensions,c=t.get(h[0],e),d=t.get(h[1],e);a=r.dataToPoint([c,d])}if("cartesian2d"===r.type){var f=r.getAxis("x"),p=r.getAxis("y");tD(t.get((h=r.dimensions)[0],e))?a[0]=f.toGlobalCoord(f.getExtent()[i?0:1]):tD(t.get(h[1],e))&&(a[1]=p.toGlobalCoord(p.getExtent()[i?0:1]))}isNaN(l)||(a[0]=l),isNaN(u)||(a[1]=u)}else a=[l,u];t.setItemLayout(e,a)}function oD(t,e,i,n){var o=XA(t,n[0]),a=XA(t,n[1]),r=W,s=o.coord,l=a.coord;s[0]=r(s[0],-1/0),s[1]=r(s[1],-1/0),l[0]=r(l[0],1/0),l[1]=r(l[1],1/0);var u=y([{},o,a]);return u.coord=[o.coord,a.coord],u.x0=o.x,u.y0=o.y,u.x1=a.x,u.y1=a.y,u}function aD(t){return!isNaN(t)&&!isFinite(t)}function rD(t,e,i){var n=1-t;return aD(e[n])&&aD(i[n])}function sD(t,e){var i=e.coord[0],n=e.coord[1];return!("cartesian2d"!==t.type||!i||!n||!rD(1,i,n)&&!rD(0,i,n))||jA(t,{coord:i,x:e.x0,y:e.y0})||jA(t,{coord:n,x:e.x1,y:e.y1})}function lD(t,e,i,n,o){var a,r=n.coordinateSystem,s=t.getItemModel(e),l=hl(s.get(i[0]),o.getWidth()),u=hl(s.get(i[1]),o.getHeight());if(isNaN(l)||isNaN(u)){if(n.getMarkerPosition)a=n.getMarkerPosition(t.getValues(i,e));else{var h=[f=t.get(i[0],e),p=t.get(i[1],e)];r.clampData&&r.clampData(h,h),a=r.dataToPoint(h,!0)}if("cartesian2d"===r.type){var c=r.getAxis("x"),d=r.getAxis("y"),f=t.get(i[0],e),p=t.get(i[1],e);aD(f)?a[0]=c.toGlobalCoord(c.getExtent()["x0"===i[0]?0:1]):aD(p)&&(a[1]=d.toGlobalCoord(d.getExtent()["y0"===i[1]?0:1]))}isNaN(l)||(a[0]=l),isNaN(u)||(a[1]=u)}else a=[l,u];return a}$A.extend({type:"markPoint",updateTransform:function(t,e,i){e.eachSeries((function(t){var e=t.markPointModel;e&&(JA(e.getData(),t,i),this.markerGroupMap.get(t.id).updateLayout(e))}),this)},renderSeries:function(t,e,i,n){var o=t.coordinateSystem,a=t.id,r=t.getData(),s=this.markerGroupMap,l=s.get(a)||s.set(a,new yg),u=function(t,e,i){var n;n=t?D(t&&t.dimensions,(function(t){return _({name:t},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})})):[{name:"value",type:"float"}];var o=new gf(n,i),a=D(i.get("data"),O(XA,e));return t&&(a=L(a,O(jA,t))),o.initData(a,null,t?qA:function(t){return t.value}),o}(o,t,e);e.setData(u),JA(e.getData(),t,n),u.each((function(t){var i=u.getItemModel(t),n=i.getShallow("symbol"),o=i.getShallow("symbolSize"),a=E(n),s=E(o);if(a||s){var l=e.getRawValue(t),h=e.getDataParams(t);a&&(n=n(l,h)),s&&(o=o(l,h))}u.setItemVisual(t,{symbol:n,symbolSize:o,color:i.get("itemStyle.color")||r.getVisual("color")})})),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl((function(t){t.traverse((function(t){t.dataModel=e}))})),l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}}),Vd((function(t){t.markPoint=t.markPoint||{}})),FA.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end"},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"}}),$A.extend({type:"markLine",updateTransform:function(t,e,i){e.eachSeries((function(t){var e=t.markLineModel;if(e){var n=e.getData(),o=e.__from,a=e.__to;o.each((function(e){nD(o,e,!0,t,i),nD(a,e,!1,t,i)})),n.each((function(t){n.setItemLayout(t,[o.getItemLayout(t),a.getItemLayout(t)])})),this.markerGroupMap.get(t.id).updateLayout()}}),this)},renderSeries:function(t,e,i,n){var o=t.coordinateSystem,a=t.id,r=t.getData(),s=this.markerGroupMap,l=s.get(a)||s.set(a,new g_);this.group.add(l.group);var u=function(t,e,i){var n;n=t?D(t&&t.dimensions,(function(t){return _({name:t},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})})):[{name:"value",type:"float"}];var o=new gf(n,i),a=new gf(n,i),r=new gf([],i),s=D(i.get("data"),O(QA,e,t,i));t&&(s=L(s,O(iD,t)));var l=t?qA:function(t){return t.value};return o.initData(D(s,(function(t){return t[0]})),null,l),a.initData(D(s,(function(t){return t[1]})),null,l),r.initData(D(s,(function(t){return t[2]}))),r.hasItemOption=!0,{from:o,to:a,line:r}}(o,t,e),h=u.from,c=u.to,d=u.line;e.__from=h,e.__to=c,e.setData(d);var f=e.get("symbol"),p=e.get("symbolSize");function g(e,i,o){var a=e.getItemModel(i);nD(e,i,o,t,n),e.setItemVisual(i,{symbolSize:a.get("symbolSize")||p[o?0:1],symbol:a.get("symbol",!0)||f[o?0:1],color:a.get("itemStyle.color")||r.getVisual("color")})}N(f)||(f=[f,f]),"number"==typeof p&&(p=[p,p]),u.from.each((function(t){g(h,t,!0),g(c,t,!1)})),d.each((function(t){var e=d.getItemModel(t).get("lineStyle.color");d.setItemVisual(t,{color:e||h.getItemVisual(t,"color")}),d.setItemLayout(t,[h.getItemLayout(t),c.getItemLayout(t)]),d.setItemVisual(t,{fromSymbolSize:h.getItemVisual(t,"symbolSize"),fromSymbol:h.getItemVisual(t,"symbol"),toSymbolSize:c.getItemVisual(t,"symbolSize"),toSymbol:c.getItemVisual(t,"symbol")})})),l.updateData(d),u.line.eachItemGraphicEl((function(t,i){t.traverse((function(t){t.dataModel=e}))})),l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}}),Vd((function(t){t.markLine=t.markLine||{}})),FA.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}}});var uD=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];$A.extend({type:"markArea",updateTransform:function(t,e,i){e.eachSeries((function(t){var e=t.markAreaModel;if(e){var n=e.getData();n.each((function(e){var o=D(uD,(function(o){return lD(n,e,o,t,i)}));n.setItemLayout(e,o),n.getItemGraphicEl(e).setShape("points",o)}))}}),this)},renderSeries:function(t,e,i,n){var o=t.coordinateSystem,a=t.id,r=t.getData(),s=this.markerGroupMap,l=s.get(a)||s.set(a,{group:new yi});this.group.add(l.group),l.__keep=!0;var u=function(t,e,i){var n,o;o=t?(n=D(t&&t.dimensions,(function(t){var i=e.getData();return _({name:t},i.getDimensionInfo(i.mapDimension(t))||{})})),new gf(D(["x0","y0","x1","y1"],(function(t,e){return{name:t,type:n[e%2].type}})),i)):new gf(n=[{name:"value",type:"float"}],i);var a=D(i.get("data"),O(oD,e,t,i));return t&&(a=L(a,O(sD,t))),o.initData(a,null,t?function(t,e,i,n){return t.coord[Math.floor(n/2)][n%2]}:function(t){return t.value}),o.hasItemOption=!0,o}(o,t,e);e.setData(u),u.each((function(e){u.setItemLayout(e,D(uD,(function(i){return lD(u,e,i,t,n)}))),u.setItemVisual(e,{color:r.getVisual("color")})})),u.diff(l.__data).add((function(t){var e=new Lr({shape:{points:u.getItemLayout(t)}});u.setItemGraphicEl(t,e),l.group.add(e)})).update((function(t,i){var n=l.__data.getItemGraphicEl(i);Gs(n,{shape:{points:u.getItemLayout(t)}},e,t),l.group.add(n),u.setItemGraphicEl(t,n)})).remove((function(t){var e=l.__data.getItemGraphicEl(t);l.group.remove(e)})).execute(),u.eachItemGraphicEl((function(t,i){var n=u.getItemModel(i),o=n.getModel("label"),a=n.getModel("emphasis.label"),r=u.getItemVisual(i,"color");t.useStyle(_(n.getModel("itemStyle").getItemStyle(),{fill:Fe(r,.4),stroke:r})),t.hoverStyle=n.getModel("emphasis.itemStyle").getItemStyle(),Ls(t.style,t.hoverStyle,o,a,{labelFetcher:e,labelDataIndex:i,defaultText:u.getName(i)||"",isRectText:!0,autoColor:r}),Ts(t,{}),t.dataModel=e})),l.__data=u,l.group.silent=e.get("silent")||t.get("silent")}}),Vd((function(t){t.markArea=t.markArea||{}}));var hD=nc.legend.selector,cD={all:{type:"all",title:m(hD.all)},inverse:{type:"inverse",title:m(hD.inverse)}},dD=Yd({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{},this._updateSelector(t)},mergeOption:function(t){dD.superCall(this,"mergeOption",t),this._updateSelector(t)},_updateSelector:function(t){var e=t.selector;!0===e&&(e=t.selector=["all","inverse"]),N(e)&&A(e,(function(t,i){R(t)&&(t={type:t}),e[i]=v(t,cD[t.type])}))},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,i=0;i<t.length;i++){var n=t[i].get("name");if(this.isSelected(n)){this.select(n),e=!0;break}}e||this.select(t[0].get("name"))}},_updateData:function(t){var e=[],i=[];t.eachRawSeries((function(n){var o;if(i.push(n.name),n.legendVisualProvider){var a=n.legendVisualProvider.getAllNames();t.isSeriesFiltered(n)||(i=i.concat(a)),a.length?e=e.concat(a):o=!0}else o=!0;o&&Do(n)&&e.push(n.name)})),this._availableNames=i;var n=D(this.get("data")||e,(function(t){return"string"!=typeof t&&"number"!=typeof t||(t={name:t}),new ol(t,this,this.ecModel)}),this);this._data=n},getData:function(){return this._data},select:function(t){var e=this.option.selected;"single"===this.get("selectedMode")&&A(this._data,(function(t){e[t.get("name")]=!1})),e[t]=!0},unSelect:function(t){"single"!==this.get("selectedMode")&&(this.option.selected[t]=!1)},toggleSelected:function(t){var e=this.option.selected;e.hasOwnProperty(t)||(e[t]=!0),this[e[t]?"unSelect":"select"](t)},allSelect:function(){var t=this.option.selected;A(this._data,(function(e){t[e.get("name",!0)]=!0}))},inverseSelect:function(){var t=this.option.selected;A(this._data,(function(e){var i=e.get("name",!0);t.hasOwnProperty(i)||(t[i]=!0),t[i]=!t[i]}))},isSelected:function(t){var e=this.option.selected;return!(e.hasOwnProperty(t)&&!e[t])&&0<=S(this._availableNames,t)},getOrient:function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},defaultOption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",itemStyle:{borderWidth:0},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:" sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}}});function fD(t,e,i){var n,o={},a="toggleSelected"===t;return i.eachComponent("legend",(function(i){a&&null!=n?i[n?"select":"unSelect"](e.name):"allSelect"===t||"inverseSelect"===t?i[t]():(i[t](e.name),n=i.isSelected(e.name)),A(i.getData(),(function(t){var e=t.get("name");if("\n"!==e&&""!==e){var n=i.isSelected(e);o[e]=o.hasOwnProperty(e)?o[e]&&n:n}}))})),"allSelect"===t||"inverseSelect"===t?{selected:o}:{name:e.name,selected:o}}Fd("legendToggleSelect","legendselectchanged",O(fD,"toggleSelected")),Fd("legendAllSelect","legendselectall",O(fD,"allSelect")),Fd("legendInverseSelect","legendinverseselect",O(fD,"inverseSelect")),Fd("legendSelect","legendselected",O(fD,"select")),Fd("legendUnSelect","legendunselected",O(fD,"unSelect"));var pD=O,gD=A,mD=yi,vD=jd({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new mD),this.group.add(this._selectorGroup=new mD),this._isFirstRender=!0},getContentGroup:function(){return this._contentGroup},getSelectorGroup:function(){return this._selectorGroup},render:function(t,e,i){var n=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var o=t.get("align"),a=t.get("orient");o&&"auto"!==o||(o="right"===t.get("left")&&"vertical"===a?"right":"left");var r=t.get("selector",!0),s=t.get("selectorPosition",!0);!r||s&&"auto"!==s||(s="horizontal"===a?"end":"start"),this.renderInner(o,t,e,i,r,a,s);var l=t.getBoxLayoutParams(),u={width:i.getWidth(),height:i.getHeight()},h=t.get("padding"),c=ql(l,u,h),d=this.layoutInner(t,o,c,n,r,s),f=ql(_({width:d.width,height:d.height},l),u,h);this.group.attr("position",[f.x-d.x,f.y-d.y]),this.group.add(this._backgroundEl=UI(d,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},renderInner:function(t,e,i,n,o,a,r){var s=this.getContentGroup(),l=Q(),u=e.get("selectedMode"),h=[];i.eachRawSeries((function(t){t.get("legendHoverLink")||h.push(t.id)})),gD(e.getData(),(function(o,a){var r=o.get("name");if(this.newlineDisabled||""!==r&&"\n"!==r){var c=i.getSeriesByName(r)[0];if(!l.get(r))if(c){var d=c.getData(),f=d.getVisual("color"),p=d.getVisual("borderColor");"function"==typeof f&&(f=f(c.getDataParams(0))),"function"==typeof p&&(p=p(c.getDataParams(0)));var g=d.getVisual("legendSymbol")||"roundRect",m=d.getVisual("symbol");this._createItem(r,a,o,e,g,m,t,f,p,u).on("click",pD(xD,r,null,n,h)).on("mouseover",pD(_D,c.name,null,n,h)).on("mouseout",pD(wD,c.name,null,n,h)),l.set(r,!0)}else i.eachRawSeries((function(i){if(!l.get(r)&&i.legendVisualProvider){var s=i.legendVisualProvider;if(!s.containName(r))return;var c=s.indexOfName(r),d=s.getItemVisual(c,"color"),f=s.getItemVisual(c,"borderColor");this._createItem(r,a,o,e,"roundRect",null,t,d,f,u).on("click",pD(xD,null,r,n,h)).on("mouseover",pD(_D,null,r,n,h)).on("mouseout",pD(wD,null,r,n,h)),l.set(r,!0)}}),this)}else s.add(new mD({newline:!0}))}),this),o&&this._createSelector(o,e,n,a,r)},_createSelector:function(t,e,i,n,o){var a=this.getSelectorGroup();gD(t,(function(t){!function(t){var n=t.type,o=new br({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:"all"===n?"legendAllSelect":"legendInverseSelect"})}});a.add(o);var r=e.getModel("selectorLabel"),s=e.getModel("emphasis.selectorLabel");Ls(o.style,o.hoverStyle={},r,s,{defaultText:t.title,isRectText:!1}),Ts(o)}(t)}))},_createItem:function(t,e,i,n,o,a,r,s,l,u){var h=n.get("itemWidth"),c=n.get("itemHeight"),d=n.get("inactiveColor"),f=n.get("inactiveBorderColor"),p=n.get("symbolKeepAspect"),g=n.getModel("itemStyle"),m=n.isSelected(t),v=new mD,y=i.getModel("textStyle"),_=i.get("icon"),w=i.getModel("tooltip"),b=w.parentModel,S=Fp(o=_||o,0,0,h,c,m?s:d,null==p||p);if(v.add(yD(S,o,g,l,f,m)),!_&&a&&(a!==o||"none"===a)){var M=.8*c;"none"===a&&(a="circle");var I=Fp(a,(h-M)/2,(c-M)/2,M,M,m?s:d,null==p||p);v.add(yD(I,a,g,l,f,m))}var T="left"===r?h+5:-5,A=r,D=n.get("formatter"),C=t;"string"==typeof D&&D?C=D.replace("{name}",null!=t?t:""):"function"==typeof D&&(C=D(t)),v.add(new br({style:Ps({},y,{text:C,x:T,y:c/2,textFill:m?y.getTextColor():d,textAlign:A,textVerticalAlign:"middle"})}));var L=new zr({shape:v.getBoundingRect(),invisible:!0,tooltip:w.get("show")?x({content:t,formatter:b.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:n.componentIndex,name:t,$vars:["name"]}},w.option):null});return v.add(L),v.eachChild((function(t){t.silent=!0})),L.silent=!u,this.getContentGroup().add(v),Ts(v),v.__legendDataIndex=e,v},layoutInner:function(t,e,i,n,o,a){var r=this.getContentGroup(),s=this.getSelectorGroup();jl(t.get("orient"),r,t.get("itemGap"),i.width,i.height);var l=r.getBoundingRect(),u=[-l.x,-l.y];if(o){jl("horizontal",s,t.get("selectorItemGap",!0));var h=s.getBoundingRect(),c=[-h.x,-h.y],d=t.get("selectorButtonGap",!0),f=t.getOrient().index,p=0===f?"width":"height",g=0===f?"height":"width",m=0===f?"y":"x";"end"===a?c[f]+=l[p]+d:u[f]+=h[p]+d,c[1-f]+=l[g]/2-h[g]/2,s.attr("position",c),r.attr("position",u);var v={x:0,y:0};return v[p]=l[p]+d+h[p],v[g]=Math.max(l[g],h[g]),v[m]=Math.min(0,h[m]+c[1-f]),v}return r.attr("position",u),this.group.getBoundingRect()},remove:function(){this.getContentGroup().removeAll(),this._isFirstRender=!0}});function yD(t,e,i,n,o,a){var r;return"line"!==e&&e.indexOf("empty")<0?(r=i.getItemStyle(),t.style.stroke=n,a||(r.stroke=o)):r=i.getItemStyle(["borderWidth","borderColor"]),t.setStyle(r)}function xD(t,e,i,n){wD(t,e,i,n),i.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),_D(t,e,i,n)}function _D(t,e,i,n){var o=i.getZr().storage.getDisplayList()[0];o&&o.useHoverLayer||i.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:n})}function wD(t,e,i,n){var o=i.getZr().storage.getDisplayList()[0];o&&o.useHoverLayer||i.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:n})}Gd(Jc.PROCESSOR.SERIES_FILTER,(function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries((function(t){for(var i=0;i<e.length;i++)if(!e[i].isSelected(t.name))return!1;return!0}))})),ou.registerSubTypeDefaulter("legend",(function(){return"plain"}));var bD=dD.extend({type:"legend.scroll",setScrollDataIndex:function(t){this.option.scrollDataIndex=t},defaultOption:{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800},init:function(t,e,i,n){var o=Jl(t);bD.superCall(this,"init",t,e,i,n),SD(this,t,o)},mergeOption:function(t,e){bD.superCall(this,"mergeOption",t,e),SD(this,this.option,t)}});function SD(t,e,i){var n=[1,1];n[t.getOrient().index]=0,$l(e,i,{type:"box",ignoreSize:n})}var MD=yi,ID=["width","height"],TD=["x","y"],AD=vD.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){AD.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new MD),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new MD)},resetInner:function(){AD.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(t,e,i,n,o,a,r){var s=this;AD.superCall(this,"renderInner",t,e,i,n,o,a,r);var l=this._controllerGroup,u=e.get("pageIconSize",!0);N(u)||(u=[u,u]),c("pagePrev",0);var h=e.getModel("pageTextStyle");function c(t,i){var o=t+"DataIndex",a=Ys(e.get("pageIcons",!0)[e.getOrient().name][i],{onclick:P(s._pageGo,s,o,e,n)},{x:-u[0]/2,y:-u[1]/2,width:u[0],height:u[1]});a.name=t,l.add(a)}l.add(new br({name:"pageText",style:{textFill:h.getTextColor(),font:h.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),c("pageNext",1)},layoutInner:function(t,e,i,n,o,a){var r=this.getSelectorGroup(),s=t.getOrient().index,l=ID[s],u=TD[s],h=ID[1-s],c=TD[1-s];o&&jl("horizontal",r,t.get("selectorItemGap",!0));var d=t.get("selectorButtonGap",!0),f=r.getBoundingRect(),p=[-f.x,-f.y],g=m(i);o&&(g[l]=i[l]-f[l]-d);var v=this._layoutContentAndController(t,n,g,s,l,h,c);if(o){if("end"===a)p[s]+=v[l]+d;else{var y=f[l]+d;p[s]-=y,v[u]-=y}v[l]+=f[l]+d,p[1-s]+=v[c]+v[h]/2-f[h]/2,v[h]=Math.max(v[h],f[h]),v[c]=Math.min(v[c],f[c]+p[1-s]),r.attr("position",p)}return v},_layoutContentAndController:function(t,e,i,n,o,a,r){var s=this.getContentGroup(),l=this._containerGroup,u=this._controllerGroup;jl(t.get("orient"),s,t.get("itemGap"),n?i.width:null,n?null:i.height),jl("horizontal",u,t.get("pageButtonItemGap",!0));var h=s.getBoundingRect(),c=u.getBoundingRect(),d=this._showController=h[o]>i[o],f=[-h.x,-h.y];e||(f[n]=s.position[n]);var p=[0,0],g=[-c.x,-c.y],m=H(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?g[n]+=i[o]-c[o]:p[n]+=c[o]+m),g[1-n]+=h[a]/2-c[a]/2,s.attr("position",f),l.attr("position",p),u.attr("position",g);var v={x:0,y:0};if(v[o]=d?i[o]:h[o],v[a]=Math.max(h[a],c[a]),v[r]=Math.min(0,c[r]+g[1-n]),l.__rectSize=i[o],d){var y={x:0,y:0};y[o]=Math.max(i[o]-c[o]-m,0),y[a]=v[a],l.setClipPath(new zr({shape:y})),l.__rectSize=y[o]}else u.eachChild((function(t){t.attr({invisible:!0,silent:!0})}));var x=this._getPageInfo(t);return null!=x.pageIndex&&Gs(s,{position:x.contentPosition},d&&t),this._updatePageInfoView(t,x),v},_pageGo:function(t,e,i){var n=this._getPageInfo(e)[t];null!=n&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:e.id})},_updatePageInfoView:function(t,e){var i=this._controllerGroup;A(["pagePrev","pageNext"],(function(n){var o=null!=e[n+"DataIndex"],a=i.childOfName(n);a&&(a.setStyle("fill",t.get(o?"pageIconColor":"pageIconInactiveColor",!0)),a.cursor=o?"pointer":"default")}));var n=i.childOfName("pageText"),o=t.get("pageFormatter"),a=e.pageIndex,r=null!=a?a+1:0,s=e.pageCount;n&&o&&n.setStyle("text",R(o)?o.replace("{current}",r).replace("{total}",s):o({current:r,total:s}))},_getPageInfo:function(t){var e=t.get("scrollDataIndex",!0),i=this.getContentGroup(),n=this._containerGroup.__rectSize,o=t.getOrient().index,a=ID[o],r=TD[o],s=this._findTargetItemIndex(e),l=i.children(),u=l[s],h=l.length,c=h?1:0,d={contentPosition:i.position.slice(),pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return d;var f=y(u);d.contentPosition[o]=-f.s;for(var p=s+1,g=f,m=f,v=null;p<=h;++p)(!(v=y(l[p]))&&m.e>g.s+n||v&&!x(v,g.s))&&(g=m.i>g.i?m:v)&&(null==d.pageNextDataIndex&&(d.pageNextDataIndex=g.i),++d.pageCount),m=v;for(p=s-1,g=f,m=f,v=null;-1<=p;--p)(v=y(l[p]))&&x(m,v.s)||!(g.i<m.i)||(m=g,null==d.pagePrevDataIndex&&(d.pagePrevDataIndex=g.i),++d.pageCount,++d.pageIndex),g=v;return d;function y(t){if(t){var e=t.getBoundingRect(),i=e[r]+t.position[o];return{s:i,e:i+e[a],i:t.__legendDataIndex}}}function x(t,e){return t.e>=e&&t.s<=e+n}},_findTargetItemIndex:function(t){var e,i,n=this.getContentGroup();return this._showController&&n.eachChild((function(n,o){var a=n.__legendDataIndex;null==i&&null!=a&&(i=o),a===t&&(e=o)})),null!=e?e:i}});Fd("legendScroll","legendscroll",(function(t,e){var i=t.scrollDataIndex;null!=i&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},(function(t){t.setScrollDataIndex(i)}))})),BT.extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#2f4554",width:.5,opacity:.3},areaStyle:{color:"rgba(47,69,84,0.3)",opacity:.3}},borderColor:"#ddd",fillerColor:"rgba(167,183,204,0.4)",handleIcon:"M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",handleSize:"100%",handleStyle:{color:"#a7b7cc"},labelPrecision:null,labelFormatter:null,showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#333"}}});var DD=zr,CD=ul,LD=dl,kD=P,PD=A,OD="horizontal",ND="vertical",ED=["line","bar","candlestick","scatter"],RD=FT.extend({type:"dataZoom.slider",init:function(t,e){this._displayables={},this.api=e},render:function(t,e,i,n){RD.superApply(this,"render",arguments),tc(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),!1!==this.dataZoomModel.get("show")?(n&&"dataZoom"===n.type&&n.from===this.uid||this._buildView(),this._updateView()):this.group.removeAll()},remove:function(){RD.superApply(this,"remove",arguments),ec(this,"_dispatchZoomAction")},dispose:function(){RD.superApply(this,"dispose",arguments),ec(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new yi;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},_resetLocation:function(){var t=this.dataZoomModel,e=this.api,i=this._findCoordRect(),n={width:e.getWidth(),height:e.getHeight()},o=this._orient===OD?{right:n.width-i.x-i.width,top:n.height-30-7,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},a=Jl(t.option);A(["right","top","width","height"],(function(t){"ph"===a[t]&&(a[t]=o[t])}));var r=ql(a,n,t.padding);this._location={x:r.x,y:r.y},this._size=[r.width,r.height],this._orient===ND&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,i=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),o=n&&n.get("inverse"),a=this._displayables.barGroup,r=(this._dataShadowInfo||{}).otherAxisInverse;a.attr(i!==OD||o?i===OD&&o?{scale:r?[-1,1]:[-1,-1]}:i!==ND||o?{scale:r?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:r?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:r?[1,1]:[1,-1]});var s=t.getBoundingRect([a]);t.attr("position",[e.x-s.x,e.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var t=this._size,e=this._displayables.barGroup;e.add(new DD({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:this.dataZoomModel.get("backgroundColor")},z2:-40})),e.add(new DD({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:"transparent"},z2:0,onclick:P(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(t){var e=this._size,i=t.series,n=i.getRawData(),o=i.getShadowDim?i.getShadowDim():t.otherDim;if(null!=o){var a=n.getDataExtent(o),r=.3*(a[1]-a[0]);a=[a[0]-r,a[1]+r];var s,l=[0,e[1]],u=[[e[0],0],[0,0]],h=[],c=e[0]/(n.count()-1),d=0,f=Math.round(n.count()/e[0]);n.each([o],(function(t,e){if(0<f&&e%f)d+=c;else{var i=null==t||isNaN(t)||""===t,n=i?0:CD(t,a,l,!0);i&&!s&&e?(u.push([u[u.length-1][0],0]),h.push([h[h.length-1][0],0])):!i&&s&&(u.push([d,0]),h.push([d,0])),u.push([d,n]),h.push([d,n]),d+=c,s=i}}));var p=this.dataZoomModel;this._displayables.barGroup.add(new Lr({shape:{points:u},style:_({fill:p.get("dataBackgroundColor")},p.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new kr({shape:{points:h},style:p.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var i,n=this.ecModel;return t.eachTargetAxis((function(o,a){A(t.getAxisProxy(o.name,a).getTargetSeriesModels(),(function(t){if(!(i||!0!==e&&S(ED,t.get("type"))<0)){var r,s=n.getComponent(o.axis,a).axis,l=function(t){return{x:"y",y:"x",radius:"angle",angle:"radius"}[t]}(o.name),u=t.coordinateSystem;null!=l&&u.getOtherAxis&&(r=u.getOtherAxis(s).inverse),l=t.getData().mapDimension(l),i={thisAxis:s,series:t,thisDim:o.name,otherDim:l,otherAxisInverse:r}}}),this)}),this),i}},_renderHandle:function(){var t=this._displayables,e=t.handles=[],i=t.handleLabels=[],n=this._displayables.barGroup,o=this._size,a=this.dataZoomModel;n.add(t.filler=new DD({draggable:!0,cursor:zD(this._orient),drift:kD(this._onDragMove,this,"all"),ondragstart:kD(this._showDataInfo,this,!0),ondragend:kD(this._onDragEnd,this),onmouseover:kD(this._showDataInfo,this,!0),onmouseout:kD(this._showDataInfo,this,!1),style:{fill:a.get("fillerColor"),textPosition:"inside"}})),n.add(new DD({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:o[0],height:o[1]},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),PD([0,1],(function(t){var o=Ys(a.get("handleIcon"),{cursor:zD(this._orient),draggable:!0,drift:kD(this._onDragMove,this,t),ondragend:kD(this._onDragEnd,this),onmouseover:kD(this._showDataInfo,this,!0),onmouseout:kD(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),r=o.getBoundingRect();this._handleHeight=hl(a.get("handleSize"),this._size[1]),this._handleWidth=r.width/r.height*this._handleHeight,o.setStyle(a.getModel("handleStyle").getItemStyle());var s=a.get("handleColor");null!=s&&(o.style.fill=s),n.add(e[t]=o);var l=a.textStyleModel;this.group.add(i[t]=new br({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:l.getTextColor(),textFont:l.getFont()},z2:10}))}),this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[CD(t[0],[0,100],e,!0),CD(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var i=this.dataZoomModel,n=this._handleEnds,o=this._getViewExtent(),a=i.findRepresentativeAxisProxy().getMinMaxSpan(),r=[0,100];Q_(e,n,o,i.get("zoomLock")?"all":t,null!=a.minSpan?CD(a.minSpan,r,o,!0):null,null!=a.maxSpan?CD(a.maxSpan,r,o,!0):null);var s=this._range,l=this._range=LD([CD(n[0],o,r,!0),CD(n[1],o,r,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},_updateView:function(t){var e=this._displayables,i=this._handleEnds,n=LD(i.slice()),o=this._size;PD([0,1],(function(t){var n=this._handleHeight;e.handles[t].attr({scale:[n/2,n/2],position:[i[t],o[1]/2-n/2]})}),this),e.filler.setShape({x:n[0],y:0,width:n[1]-n[0],height:o[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){var e=this.dataZoomModel,i=this._displayables,n=i.handleLabels,o=this._orient,a=["",""];if(e.get("showDetail")){var r=e.findRepresentativeAxisProxy();if(r){var s=r.getAxisModel().axis,l=this._range,u=t?r.calculateDataWindow({start:l[0],end:l[1]}).valueWindow:r.getDataValueWindow();a=[this._formatLabel(u[0],s),this._formatLabel(u[1],s)]}}var h=LD(this._handleEnds.slice());function c(t){var e=Ws(i.handles[t].parent,this.group),r=Zs(0===t?"right":"left",e),s=this._handleWidth/2+5,l=Hs([h[t]+(0===t?-s:s),this._size[1]/2],e);n[t].setStyle({x:l[0],y:l[1],textVerticalAlign:o===OD?"middle":r,textAlign:o===OD?r:"center",text:a[t]})}c.call(this,0),c.call(this,1)},_formatLabel:function(t,e){var i=this.dataZoomModel,n=i.get("labelFormatter"),o=i.get("labelPrecision");null!=o&&"auto"!==o||(o=e.getPixelPrecision());var a=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(o,20));return E(n)?n(t,a):R(n)?n.replace("{value}",a):a},_showDataInfo:function(t){var e=this._displayables.handleLabels;e[0].attr("invisible",!(t=this._dragging||t)),e[1].attr("invisible",!t)},_onDragMove:function(t,e,i,n){this._dragging=!0,Gt(n.event);var o=Hs([e,i],this._displayables.barGroup.getLocalTransform(),!0),a=this._updateInterval(t,o[0]),r=this.dataZoomModel.get("realtime");this._updateView(!r),a&&r&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),this.dataZoomModel.get("realtime")||this._dispatchZoomAction()},_onClickPanelClick:function(t){var e=this._size,i=this._displayables.barGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(i[0]<0||i[0]>e[0]||i[1]<0||i[1]>e[1])){var n=this._handleEnds,o=this._updateInterval("all",i[0]-(n[0]+n[1])/2);this._updateView(),o&&this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var t;if(PD(this.getTargetCoordInfo(),(function(e){if(!t&&e.length){var i=e[0].model.coordinateSystem;t=i.getRect&&i.getRect()}})),!t){var e=this.api.getWidth(),i=this.api.getHeight();t={x:.2*e,y:.2*i,width:.6*e,height:.6*i}}return t}});function zD(t){return"vertical"===t?"ns-resize":"ew-resize"}BT.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var BD="\0_ec_dataZoom_roams";function VD(t,e){var i=FD(t),n=e.dataZoomId,o=e.coordId;A(i,(function(t,i){var a=t.dataZoomInfos;a[n]&&S(e.allCoordIds,o)<0&&(delete a[n],t.count--)})),WD(i);var a=i[o];a||((a=i[o]={coordId:o,dataZoomInfos:{},count:0}).controller=function(t,e){var i=new jv(t.getZr());return A(["pan","zoom","scrollMove"],(function(t){i.on(t,(function(i){var n=[];A(e.dataZoomInfos,(function(o){if(i.isAvailableBehavior(o.dataZoomModel.option)){var a=(o.getRange||{})[t],r=a&&a(e.controller,i);!o.dataZoomModel.get("disabled",!0)&&r&&n.push({dataZoomId:o.dataZoomId,start:r[0],end:r[1]})}})),n.length&&e.dispatchAction(n)}))})),i}(t,a),a.dispatchAction=O(HD,t)),a.dataZoomInfos[n]||a.count++,a.dataZoomInfos[n]=e;var r=function(t){var e,i={type_true:2,type_move:1,type_false:0,type_undefined:-1},n=!0;return A(t,(function(t){var o=t.dataZoomModel,a=!o.get("disabled",!0)&&(!o.get("zoomLock",!0)||"move");i["type_"+e]<i["type_"+a]&&(e=a),n&=o.get("preventDefaultMouseMove",!0)})),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!n}}}(a.dataZoomInfos);a.controller.enable(r.controlType,r.opt),a.controller.setPointerChecker(e.containsPoint),tc(a,"dispatchAction",e.dataZoomModel.get("throttle",!0),"fixRate")}function GD(t){return t.type+"\0_"+t.id}function FD(t){var e=t.getZr();return e[BD]||(e[BD]={})}function WD(t){A(t,(function(e,i){e.count||(e.controller.dispose(),delete t[i])}))}function HD(t,e){t.dispatchAction({type:"dataZoom",batch:e})}var ZD=P,UD=FT.extend({type:"dataZoom.inside",init:function(t,e){},render:function(t,e,i,n){UD.superApply(this,"render",arguments),this._range=t.getPercentRange(),A(this.getTargetCoordInfo(),(function(e,n){var o=D(e,(function(t){return GD(t.model)}));A(e,(function(e){var a=e.model,r={};A(["pan","zoom","scrollMove"],(function(t){r[t]=ZD(XD[t],this,e,n)}),this),VD(i,{coordId:GD(a),allCoordIds:o,containsPoint:function(t,e,i){return a.coordinateSystem.containPoint([e,i])},dataZoomId:t.id,dataZoomModel:t,getRange:r})}),this)}),this)},dispose:function(){!function(t,e){var i=FD(t);A(i,(function(t){t.controller.dispose();var i=t.dataZoomInfos;i[e]&&(delete i[e],t.count--)})),WD(i)}(this.api,this.dataZoomModel.id),UD.superApply(this,"dispose",arguments),this._range=null}}),XD={zoom:function(t,e,i,n){var o=this._range,a=o.slice(),r=t.axisModels[0];if(r){var s=qD[e](null,[n.originX,n.originY],r,i,t),l=(0<s.signal?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/n.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return Q_(0,a,[0,100],0,h.minSpan,h.maxSpan),this._range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}},pan:YD((function(t,e,i,n,o,a){var r=qD[n]([a.oldX,a.oldY],[a.newX,a.newY],e,o,i);return r.signal*(t[1]-t[0])*r.pixel/r.pixelLength})),scrollMove:YD((function(t,e,i,n,o,a){return qD[n]([0,0],[a.scrollDelta,a.scrollDelta],e,o,i).signal*(t[1]-t[0])*a.scrollDelta}))};function YD(t){return function(e,i,n,o){var a=this._range,r=a.slice(),s=e.axisModels[0];if(s)return Q_(t(r,s,e,i,n,o),r,[0,100],"all"),this._range=r,a[0]!==r[0]||a[1]!==r[1]?r:void 0}}function jD(t){var e=t&&t.visualMap;N(e)||(e=e?[e]:[]),KD(e,(function(t){if(t){$D(t,"splitList")&&!$D(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var e=t.pieces;e&&N(e)&&KD(e,(function(t){z(t)&&($D(t,"start")&&!$D(t,"min")&&(t.min=t.start),$D(t,"end")&&!$D(t,"max")&&(t.max=t.end))}))}}))}var qD={grid:function(t,e,i,n,o){var a=i.axis,r={},s=o.model.coordinateSystem.getRect();return t=t||[0,0],"x"===a.dim?(r.pixel=e[0]-t[0],r.pixelLength=s.width,r.pixelStart=s.x,r.signal=a.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=s.height,r.pixelStart=s.y,r.signal=a.inverse?-1:1),r},polar:function(t,e,i,n,o){var a=i.axis,r={},s=o.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===i.mainType?(r.pixel=e[0]-t[0],r.pixelLength=l[1]-l[0],r.pixelStart=l[0],r.signal=a.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=u[1]-u[0],r.pixelStart=u[0],r.signal=a.inverse?-1:1),r},singleAxis:function(t,e,i,n,o){var a=i.axis,r=o.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===a.orient?(s.pixel=e[0]-t[0],s.pixelLength=r.width,s.pixelStart=r.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=r.height,s.pixelStart=r.y,s.signal=a.inverse?-1:1),s}},KD=A;function $D(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}ou.registerSubTypeDefaulter("visualMap",(function(t){return t.categories||(t.pieces?0<t.pieces.length:0<t.splitNumber)&&!t.calculable?"piecewise":"continuous"}));var JD=Jc.VISUAL.COMPONENT;function QD(t,e,i,n){for(var o=e.targetVisuals[n],a=yx.prepareVisualTypes(o),r={color:t.getData().getVisual("color")},s=0,l=a.length;s<l;s++){var u=a[s],h=o["opacity"===u?"__alphaForOpacity":u];h&&h.applyVisual(i,c,d)}return r.color;function c(t){return r[t]}function d(t,e){r[t]=e}}Zd(JD,{createOnAllSeries:!0,reset:function(t,e){var i=[];return e.eachComponent("visualMap",(function(e){var n=t.pipelineContext;!e.isTargetSeries(t)||n&&n.large||i.push(function(t,e,i,n){var o={};return A(t,(function(t){var i=yx.prepareVisualTypes(e[t]);o[t]=i})),{progress:function(t,a){function r(t){return a.getItemVisual(l,t)}function s(t,e){a.setItemVisual(l,t,e)}var l;for(null!=n&&(n=a.getDimension(n));null!=(l=t.next());){var u=a.getRawDataItem(l);if(!u||!1!==u.visualMap)for(var h=null!=n?a.get(n,l,!0):l,c=i(h),d=e[c],f=o[c],p=0,g=f.length;p<g;p++){var m=f[p];d[m]&&d[m].applyVisual(h,r,s)}}}}}(e.stateList,e.targetVisuals,P(e.getValueState,e),e.getDataDimension(t.getData())))})),i}}),Zd(JD,{createOnAllSeries:!0,reset:function(t,e){var i=t.getData(),n=[];e.eachComponent("visualMap",(function(e){if(e.isTargetSeries(t)){var o=e.getVisualMeta(P(QD,null,t,e))||{stops:[],outerColors:[]},a=e.getDataDimension(i),r=i.getDimensionInfo(a);null!=r&&(o.dimension=r.index,n.push(o))}})),t.getData().setVisual("visualMeta",n)}});var tC=function(t,e,i){var n=m((eC[t]||{})[e]);return i&&N(n)?n[n.length-1]:n},eC={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]}},iC=yx.mapVisual,nC=yx.eachVisual,oC=N,aC=A,rC=dl,sC=ul,lC=Yd({type:"visualMap",dependencies:["series"],stateList:["inRange","outOfRange"],replacableOptionKeys:["inRange","outOfRange","target","controller","color"],dataBound:[-1/0,1/0],layoutMode:{type:"box",ignoreSize:!0},defaultOption:{show:!0,zlevel:0,z:4,seriesIndex:"all",min:0,max:200,dimension:null,inRange:null,outOfRange:null,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,color:null,formatter:null,text:null,textStyle:{color:"#333"}},init:function(t,e,i){this.targetVisuals={},this.controllerVisuals={},this.mergeDefaultAndTheme(t,i)},optionUpdated:function(t,e){var i=this.option;o.canvasSupported||(i.realtime=!1),e||hA(i,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(t){var e=this.stateList;t=P(t,this),this.controllerVisuals=uA(this.option.controller,e,t),this.targetVisuals=uA(this.option.target,e,t)},getTargetSeriesIndices:function(){var t=this.option.seriesIndex,e=[];return null==t||"all"===t?this.ecModel.eachSeries((function(t,i){e.push(i)})):e=bo(t),e},eachTargetSeries:function(t,e){A(this.getTargetSeriesIndices(),(function(i){t.call(e,this.ecModel.getSeriesByIndex(i))}),this)},isTargetSeries:function(t){var e=!1;return this.eachTargetSeries((function(i){i===t&&(e=!0)})),e},formatValueText:function(t,e,i){var n,o,a=this.option,r=a.precision,s=this.dataBound,l=a.formatter;return i=i||["<",">"],N(t)&&(t=t.slice(),n=!0),o=e?t:n?[u(t[0]),u(t[1])]:u(t),R(l)?l.replace("{value}",n?o[0]:o).replace("{value2}",n?o[1]:o):E(l)?n?l(t[0],t[1]):l(t):n?t[0]===s[0]?i[0]+" "+o[1]:t[1]===s[1]?i[1]+" "+o[0]:o[0]+" - "+o[1]:o;function u(t){return t===s[0]?"min":t===s[1]?"max":(+t).toFixed(Math.min(r,20))}},resetExtent:function(){var t=this.option,e=rC([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension;if(null!=e||t.dimensions.length){if(null!=e)return t.getDimension(e);for(var i=t.dimensions,n=i.length-1;0<=n;n--){var o=i[n];if(!t.getDimensionInfo(o).isCalculationCoord)return o}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){var t=this.ecModel,e=this.option,i={inRange:e.inRange,outOfRange:e.outOfRange},n=e.target||(e.target={}),o=e.controller||(e.controller={});v(n,i),v(o,i);var a=this.isCategory();function r(i){oC(e.color)&&!i.inRange&&(i.inRange={color:e.color.slice().reverse()}),i.inRange=i.inRange||{color:t.get("gradientColor")},aC(this.stateList,(function(t){var e=i[t];if(R(e)){var n=tC(e,"active",a);n?(i[t]={},i[t][e]=n):delete i[t]}}),this)}r.call(this,n),r.call(this,o),(function(t,e,i){var n=t[e],o=t[i];n&&!o&&(o=t[i]={},aC(n,(function(t,e){if(yx.isValidType(e)){var i=tC(e,"inactive",a);null!=i&&(o[e]=i,"color"!==e||o.hasOwnProperty("opacity")||o.hasOwnProperty("colorAlpha")||(o.opacity=[0,0]))}})))}).call(this,n,"inRange","outOfRange"),(function(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,i=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,n=this.get("inactiveColor");aC(this.stateList,(function(o){var r=this.itemSize,s=t[o];null==(s=s||(t[o]={color:a?n:[n]})).symbol&&(s.symbol=e&&m(e)||(a?"roundRect":["roundRect"])),null==s.symbolSize&&(s.symbolSize=i&&m(i)||(a?r[0]:[r[0],r[0]])),s.symbol=iC(s.symbol,(function(t){return"none"===t||"square"===t?"roundRect":t}));var l=s.symbolSize;if(null!=l){var u=-1/0;nC(l,(function(t){u<t&&(u=t)})),s.symbolSize=iC(l,(function(t){return sC(t,[0,u],[0,r[0]],!0)}))}}),this)}).call(this,o)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:et,getValueState:et,getVisualMeta:et}),uC=[20,140],hC=lC.extend({type:"visualMap.continuous",defaultOption:{align:"auto",calculable:!1,range:null,realtime:!0,itemHeight:null,itemWidth:null,hoverLink:!0,hoverLinkDataSize:null,hoverLinkOnHandle:null},optionUpdated:function(t,e){hC.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual((function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()})),this._resetRange()},resetItemSize:function(){hC.superApply(this,"resetItemSize",arguments);var t=this.itemSize;"horizontal"===this._orient&&t.reverse(),null!=t[0]&&!isNaN(t[0])||(t[0]=uC[0]),null!=t[1]&&!isNaN(t[1])||(t[1]=uC[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):N(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},completeVisualOption:function(){lC.prototype.completeVisualOption.apply(this,arguments),A(this.stateList,(function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=0)}),this)},setSelected:function(t){this.option.range=t.slice(),this._resetRange()},getSelected:function(){var t=this.getExtent(),e=dl((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]<t[0]&&(e[0]=t[0]),e[1]<t[0]&&(e[1]=t[0]),e},getValueState:function(t){var e=this.option.range,i=this.getExtent();return(e[0]<=i[0]||e[0]<=t)&&(e[1]>=i[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries((function(i){var n=[],o=i.getData();o.each(this.getDataDimension(o),(function(e,i){t[0]<=e&&e<=t[1]&&n.push(i)}),this),e.push({seriesId:i.id,dataIndex:n})}),this),e},getVisualMeta:function(t){var e=cC(0,0,this.getExtent()),i=cC(0,0,this.option.range.slice()),n=[];function o(e,i){n.push({value:e,color:t(e,i)})}for(var a=0,r=0,s=i.length,l=e.length;r<l&&(!i.length||e[r]<=i[0]);r++)e[r]<i[a]&&o(e[r],"outOfRange");for(var u=1;a<s;a++,u=0)u&&n.length&&o(i[a],"outOfRange"),o(i[a],"inRange");for(u=1;r<l;r++)(!i.length||i[i.length-1]<e[r])&&(u&&(n.length&&o(n[n.length-1].value,"outOfRange"),u=0),o(e[r],"outOfRange"));var h=n.length;return{stops:n,outerColors:[h?n[0].color:"transparent",h?n[h-1].color:"transparent"]}}});function cC(t,e,i){if(i[0]===i[1])return i.slice();for(var n=(i[1]-i[0])/200,o=i[0],a=[],r=0;r<=200&&o<i[1];r++)a.push(o),o+=n;return a.push(i[1]),a}var dC=jd({type:"visualMap",autoPositionValues:{left:1,right:1,top:1,bottom:1},init:function(t,e){this.ecModel=t,this.api=e},render:function(t,e,i,n){!1!==(this.visualMapModel=t).get("show")?this.doRender.apply(this,arguments):this.group.removeAll()},renderBackground:function(t){var e=this.visualMapModel,i=Ll(e.get("padding")||0),n=t.getBoundingRect();t.add(new zr({z2:-1,silent:!0,shape:{x:n.x-i[3],y:n.y-i[0],width:n.width+i[3]+i[1],height:n.height+i[0]+i[2]},style:{fill:e.get("backgroundColor"),stroke:e.get("borderColor"),lineWidth:e.get("borderWidth")}}))},getControllerVisual:function(t,e,i){var n=(i=i||{}).forceState,o=this.visualMapModel,a={};if("symbol"===e&&(a.symbol=o.get("itemSymbol")),"color"===e){var r=o.get("contentColor");a.color=r}function s(t){return a[t]}function l(t,e){a[t]=e}var u=o.controllerVisuals[n||o.getValueState(t)];return A(yx.prepareVisualTypes(u),(function(n){var o=u[n];i.convertOpacityToAlpha&&"opacity"===n&&(n="colorAlpha",o=u.__alphaForOpacity),yx.dependsOn(n,e)&&o&&o.applyVisual(t,s,l)})),a[e]},positionGroup:function(t){var e=this.api;Kl(t,this.visualMapModel.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})},doRender:et});function fC(t,e,i){var n=t.option,o=n.align;if(null!=o&&"auto"!==o)return o;for(var a={width:e.getWidth(),height:e.getHeight()},r="horizontal"===n.orient?1:0,s=[["left","right","width"],["top","bottom","height"]],l=s[r],u=[0,null,10],h={},c=0;c<3;c++)h[s[1-r][c]]=u[c],h[l[c]]=2===c?i[0]:n[l[c]];var d=[["x","width",3],["y","height",0]][r],f=ql(h,a,n.padding);return l[(f.margin[d[2]]||0)+f[d[0]]+.5*f[d[1]]<.5*a[d[1]]?0:1]}function pC(t,e){return A(t||[],(function(t){null!=t.dataIndex&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")})),t}var gC=ul,mC=A,vC=Math.min,yC=Math.max,xC=dC.extend({type:"visualMap.continuous",init:function(){xC.superApply(this,"init",arguments),this._shapes={},this._dataInterval=[],this._handleEnds=[],this._hoverLinkDataIndices=[]},doRender:function(t,e,i,n){n&&"selectDataRange"===n.type&&n.from===this.uid||this._buildView()},_buildView:function(){this.group.removeAll();var t=this.visualMapModel,e=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(e);var i=t.get("text");this._renderEndsText(e,i,0),this._renderEndsText(e,i,1),this._updateView(!0),this.renderBackground(e),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(e)},_renderEndsText:function(t,e,i){if(e){var n=e[1-i];n=null!=n?n+"":"";var o=this.visualMapModel,a=o.get("textGap"),r=o.itemSize,s=this._shapes.barGroup,l=this._applyTransform([r[0]/2,0===i?-a:r[1]+a],s),u=this._applyTransform(0===i?"bottom":"top",s),h=this._orient,c=this.visualMapModel.textStyleModel;this.group.add(new br({style:{x:l[0],y:l[1],textVerticalAlign:"horizontal"===h?"middle":u,textAlign:"horizontal"===h?u:"center",text:n,textFont:c.getFont(),textFill:c.getTextColor()}}))}},_renderBar:function(t){var e=this.visualMapModel,i=this._shapes,n=e.itemSize,o=this._orient,a=this._useHandle,r=fC(e,this.api,n),s=i.barGroup=this._createBarGroup(r);s.add(i.outOfRange=_C()),s.add(i.inRange=_C(null,a?bC(this._orient):null,P(this._dragHandle,this,"all",!1),P(this._dragHandle,this,"all",!0)));var l=e.textStyleModel.getTextRect("\u56fd"),u=yC(l.width,l.height);a&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(s,0,n,u,o,r),this._createHandle(s,1,n,u,o,r)),this._createIndicator(s,n,u,o),t.add(s)},_createHandle:function(t,e,i,n,o){var a=P(this._dragHandle,this,e,!1),r=P(this._dragHandle,this,e,!0),s=_C(function(t,e){return 0===t?[[0,0],[e,0],[e,-e]]:[[0,0],[e,0],[e,e]]}(e,n),bC(this._orient),a,r);s.position[0]=i[0],t.add(s);var l=this.visualMapModel.textStyleModel,u=new br({draggable:!0,drift:a,onmousemove:function(t){Gt(t.event)},ondragend:r,style:{x:0,y:0,text:"",textFont:l.getFont(),textFill:l.getTextColor()}});this.group.add(u);var h=["horizontal"===o?n/2:1.5*n,"horizontal"===o?0===e?-1.5*n:1.5*n:0===e?-n/2:n/2],c=this._shapes;c.handleThumbs[e]=s,c.handleLabelPoints[e]=h,c.handleLabels[e]=u},_createIndicator:function(t,e,i,n){var o=_C([[0,0]],"move");o.position[0]=e[0],o.attr({invisible:!0,silent:!0}),t.add(o);var a=this.visualMapModel.textStyleModel,r=new br({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textFont:a.getFont(),textFill:a.getTextColor()}});this.group.add(r);var s=["horizontal"===n?i/2:9,0],l=this._shapes;l.indicator=o,l.indicatorLabel=r,l.indicatorLabelPoint=s},_dragHandle:function(t,e,i,n){if(this._useHandle){if(this._dragging=!e,!e){var o=this._applyTransform([i,n],this._shapes.barGroup,!0);this._updateInterval(t,o[1]),this._updateView()}e===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),e?this._hovering||this._clearHoverLinkToSeries():wC(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},_resetInterval:function(){var t=this.visualMapModel,e=this._dataInterval=t.getSelected(),i=t.getExtent(),n=[0,t.itemSize[1]];this._handleEnds=[gC(e[0],i,n,!0),gC(e[1],i,n,!0)]},_updateInterval:function(t,e){var i=this.visualMapModel,n=this._handleEnds,o=[0,i.itemSize[1]];Q_(e=e||0,n,o,t,0);var a=i.getExtent();this._dataInterval=[gC(n[0],o,a,!0),gC(n[1],o,a,!0)]},_updateView:function(t){var e=this.visualMapModel,i=e.getExtent(),n=this._shapes,o=[0,e.itemSize[1]],a=t?o:this._handleEnds,r=this._createBarVisual(this._dataInterval,i,a,"inRange"),s=this._createBarVisual(i,i,o,"outOfRange");n.inRange.setStyle({fill:r.barColor,opacity:r.opacity}).setShape("points",r.barPoints),n.outOfRange.setStyle({fill:s.barColor,opacity:s.opacity}).setShape("points",s.barPoints),this._updateHandle(a,r)},_createBarVisual:function(t,e,i,n){var o={forceState:n,convertOpacityToAlpha:!0},a=this._makeColorGradient(t,o),r=[this.getControllerVisual(t[0],"symbolSize",o),this.getControllerVisual(t[1],"symbolSize",o)],s=this._createBarPoints(i,r);return{barColor:new Xr(0,0,0,1,a),barPoints:s,handlesColor:[a[0].color,a[a.length-1].color]}},_makeColorGradient:function(t,e){var i=[],n=(t[1]-t[0])/100;i.push({color:this.getControllerVisual(t[0],"color",e),offset:0});for(var o=1;o<100;o++){var a=t[0]+n*o;if(a>t[1])break;i.push({color:this.getControllerVisual(a,"color",e),offset:o/100})}return i.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),i},_createBarPoints:function(t,e){var i=this.visualMapModel.itemSize;return[[i[0]-e[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,i=this.visualMapModel.get("inverse");return new yi("horizontal"!==e||i?"horizontal"===e&&i?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==e||i?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(t,e){if(this._useHandle){var i=this._shapes,n=this.visualMapModel,o=i.handleThumbs,a=i.handleLabels;mC([0,1],(function(r){var s=o[r];s.setStyle("fill",e.handlesColor[r]),s.position[1]=t[r];var l=Hs(i.handleLabelPoints[r],Ws(s,this.group));a[r].setStyle({x:l[0],y:l[1],text:n.formatValueText(this._dataInterval[r]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===r?"bottom":"top":"left",i.barGroup)})}),this)}},_showIndicator:function(t,e,i,n){var o=this.visualMapModel,a=o.getExtent(),r=o.itemSize,s=gC(t,a,[0,r[1]],!0),l=this._shapes,u=l.indicator;if(u){u.position[1]=s,u.attr("invisible",!1),u.setShape("points",function(t,e,i,n){return t?[[0,-vC(e,yC(i,0))],[6,0],[0,vC(e,yC(n-i,0))]]:[[0,0],[5,-5],[5,5]]}(!!i,n,s,r[1]));var h=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0});u.setStyle("fill",h);var c=Hs(l.indicatorLabelPoint,Ws(u,this.group)),d=l.indicatorLabel;d.attr("invisible",!1);var f=this._applyTransform("left",l.barGroup),p=this._orient;d.setStyle({text:(i||"")+o.formatValueText(e),textVerticalAlign:"horizontal"===p?f:"middle",textAlign:"horizontal"===p?"center":f,x:c[0],y:c[1]})}},_enableHoverLinkToSeries:function(){var t=this;this._shapes.barGroup.on("mousemove",(function(e){if(t._hovering=!0,!t._dragging){var i=t.visualMapModel.itemSize,n=t._applyTransform([e.offsetX,e.offsetY],t._shapes.barGroup,!0,!0);n[1]=vC(yC(0,n[1]),i[1]),t._doHoverLinkToSeries(n[1],0<=n[0]&&n[0]<=i[0])}})).on("mouseout",(function(){t._hovering=!1,t._dragging||t._clearHoverLinkToSeries()}))},_enableHoverLinkFromSeries:function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(t,e){var i=this.visualMapModel;if(i.option.hoverLink){var n=[0,i.itemSize[1]],o=i.getExtent();t=vC(yC(n[0],t),n[1]);var a=function(t,e,i){var n=6,o=t.get("hoverLinkDataSize");return o&&(n=gC(o,e,i,!0)/2),n}(i,o,n),r=[t-a,t+a],s=gC(t,n,o,!0),l=[gC(r[0],n,o,!0),gC(r[1],n,o,!0)];r[0]<n[0]&&(l[0]=-1/0),n[1]<r[1]&&(l[1]=1/0),e&&(l[0]===-1/0?this._showIndicator(s,l[1],"< ",a):l[1]===1/0?this._showIndicator(s,l[0],"> ",a):this._showIndicator(s,s,"\u2248 ",a));var u=this._hoverLinkDataIndices,h=[];(e||wC(i))&&(h=this._hoverLinkDataIndices=i.findTargetDataIndices(l));var c=function(t,e){var i={},n={};return o(t||[],i),o(e||[],n,i),[a(i),a(n)];function o(t,e,i){for(var n=0,o=t.length;n<o;n++)for(var a=t[n].seriesId,r=bo(t[n].dataIndex),s=i&&i[a],l=0,u=r.length;l<u;l++){var h=r[l];s&&s[h]?s[h]=null:(e[a]||(e[a]={}))[h]=1}}function a(t,e){var i=[];for(var n in t)if(t.hasOwnProperty(n)&&null!=t[n])if(e)i.push(+n);else{var o=a(t[n],!0);o.length&&i.push({seriesId:n,dataIndex:o})}return i}}(u,h);this._dispatchHighDown("downplay",pC(c[0],i)),this._dispatchHighDown("highlight",pC(c[1],i))}},_hoverLinkFromSeriesMouseOver:function(t){var e=t.target,i=this.visualMapModel;if(e&&null!=e.dataIndex){var n=this.ecModel.getSeriesByIndex(e.seriesIndex);if(i.isTargetSeries(n)){var o=n.getData(e.dataType),a=o.get(i.getDataDimension(o),e.dataIndex,!0);isNaN(a)||this._showIndicator(a,a)}}},_hideIndicator:function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0)},_clearHoverLinkToSeries:function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",pC(t,this.visualMapModel)),t.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},_applyTransform:function(t,e,i,n){var o=Ws(e,n?null:this.group);return $s[N(t)?"applyTransform":"transformDirection"](t,o,i)},_dispatchHighDown:function(t,e){e&&e.length&&this.api.dispatchAction({type:t,batch:e})},dispose:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()}});function _C(t,e,i,n){return new Lr({shape:{points:t},draggable:!!i,cursor:e,drift:i,onmousemove:function(t){Gt(t.event)},ondragend:n})}function wC(t){var e=t.get("hoverLinkOnHandle");return!!(null==e?t.get("realtime"):e)}function bC(t){return"vertical"===t?"ns-resize":"ew-resize"}Fd({type:"selectDataRange",event:"dataRangeSelected",update:"update"},(function(t,e){e.eachComponent({mainType:"visualMap",query:t},(function(e){e.setSelected(t.selected)}))})),Vd(jD);var SC=lC.extend({type:"visualMap.piecewise",defaultOption:{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieceList:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0,showLabel:null},optionUpdated:function(t,e){SC.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var i=this._mode=this._determineMode();MC[this._mode].call(this),this._resetSelected(t,e);var n=this.option.categories;this.resetVisual((function(t,e){"categories"===i?(t.mappingMethod="category",t.categories=m(n)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=D(this._pieceList,(function(t){return t=m(t),"inRange"!==e&&(t.visual=null),t})))}))},completeVisualOption:function(){var t=this.option,e={},i=yx.listVisualTypes(),n=this.isCategory();function o(t,e,i){return t&&t[e]&&(z(t[e])?t[e].hasOwnProperty(i):t[e]===i)}A(t.pieces,(function(t){A(i,(function(i){t.hasOwnProperty(i)&&(e[i]=1)}))})),A(e,(function(e,i){var a=0;A(this.stateList,(function(e){a|=o(t,e,i)||o(t.target,e,i)}),this),a||A(this.stateList,(function(e){(t[e]||(t[e]={}))[i]=tC(i,"inRange"===e?"active":"inactive",n)}))}),this),lC.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(t,e){var i=this.option,n=this._pieceList,o=(e?i:t).selected||{};if(i.selected=o,A(n,(function(t,e){var i=this.getSelectedMapKey(t);o.hasOwnProperty(i)||(o[i]=!0)}),this),"single"===i.selectedMode){var a=!1;A(n,(function(t,e){var i=this.getSelectedMapKey(t);o[i]&&(a?o[i]=!1:a=!0)}),this)}},getSelectedMapKey:function(t){return"categories"===this._mode?t.value+"":t.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var t=this.option;return t.pieces&&0<t.pieces.length?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(t){this.option.selected=m(t)},getValueState:function(t){var e=yx.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries((function(i){var n=[],o=i.getData();o.each(this.getDataDimension(o),(function(e,i){yx.findPieceIndex(e,this._pieceList)===t&&n.push(i)}),this),e.push({seriesId:i.id,dataIndex:n})}),this),e},getRepresentValue:function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var i=t.interval||[];e=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return e},getVisualMeta:function(t){if(!this.isCategory()){var e=[],i=[],n=this,o=this._pieceList.slice();if(o.length){var a=o[0].interval[0];a!==-1/0&&o.unshift({interval:[-1/0,a]}),(a=o[o.length-1].interval[1])!==1/0&&o.push({interval:[a,1/0]})}else o.push({interval:[-1/0,1/0]});var r=-1/0;return A(o,(function(t){var e=t.interval;e&&(e[0]>r&&s([r,e[0]],"outOfRange"),s(e.slice()),r=e[1])}),this),{stops:e,outerColors:i}}function s(o,a){var r=n.getRepresentValue({interval:o});a=a||n.getValueState(r);var s=t(r,a);o[0]===-1/0?i[0]=s:o[1]===1/0?i[1]=s:e.push({value:o[0],color:s},{value:o[1],color:s})}}}),MC={splitNumber:function(){var t=this.option,e=this._pieceList,i=Math.min(t.precision,20),n=this.getExtent(),o=t.splitNumber;o=Math.max(parseInt(o,10),1),t.splitNumber=o;for(var a=(n[1]-n[0])/o;+a.toFixed(i)!==a&&i<5;)i++;t.precision=i,a=+a.toFixed(i);var r=0;t.minOpen&&e.push({index:r++,interval:[-1/0,n[0]],close:[0,0]});for(var s=n[0],l=r+o;r<l;s+=a){var u=r===o-1?n[1]:s+a;e.push({index:r++,interval:[s,u],close:[1,1]})}t.maxOpen&&e.push({index:r++,interval:[n[1],1/0],close:[0,0]}),Il(e),A(e,(function(t){t.text=this.formatValueText(t.interval)}),this)},categories:function(){var t=this.option;A(t.categories,(function(t){this._pieceList.push({text:this.formatValueText(t,!0),value:t})}),this),IC(t,this._pieceList)},pieces:function(){var t=this.option,e=this._pieceList;A(t.pieces,(function(t,i){z(t)||(t={value:t});var n={text:"",index:i};if(null!=t.label&&(n.text=t.label),t.hasOwnProperty("value")){var o=n.value=t.value;n.interval=[o,o],n.close=[1,1]}else{for(var a=n.interval=[],r=n.close=[0,0],s=[1,0,1],l=[-1/0,1/0],u=[],h=0;h<2;h++){for(var c=[["gte","gt","min"],["lte","lt","max"]][h],d=0;d<3&&null==a[h];d++)a[h]=t[c[d]],r[h]=s[d],u[h]=2===d;null==a[h]&&(a[h]=l[h])}u[0]&&a[1]===1/0&&(r[0]=0),u[1]&&a[0]===-1/0&&(r[1]=0),a[0]===a[1]&&r[0]&&r[1]&&(n.value=a[0])}n.visual=yx.retrieveVisuals(t),e.push(n)}),this),IC(t,e),Il(e),A(e,(function(t){var e=t.close;t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,[["<","\u2264"][e[1]],[">","\u2265"][e[0]]])}),this)}};function IC(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}dC.extend({type:"visualMap.piecewise",doRender:function(){var t=this.group;t.removeAll();var e=this.visualMapModel,i=e.get("textGap"),n=e.textStyleModel,o=n.getFont(),a=n.getTextColor(),r=this._getItemAlign(),s=e.itemSize,l=this._getViewData(),u=l.endsText,h=W(e.get("showLabel",!0),!u);u&&this._renderEndsText(t,u[0],s,h,r),A(l.viewPieceList,(function(n){var l=n.piece,u=new yi;u.onclick=P(this._onItemClick,this,l),this._enableHoverLink(u,n.indexInModelPieceList);var c=e.getRepresentValue(l);if(this._createItemSymbol(u,c,[0,0,s[0],s[1]]),h){var d=this.visualMapModel.getValueState(c);u.add(new br({style:{x:"right"===r?-i:s[0]+i,y:s[1]/2,text:l.text,textVerticalAlign:"middle",textAlign:r,textFont:o,textFill:a,opacity:"outOfRange"===d?.5:1}}))}t.add(u)}),this),u&&this._renderEndsText(t,u[1],s,h,r),jl(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},_enableHoverLink:function(t,e){function i(t){var i=this.visualMapModel;i.option.hoverLink&&this.api.dispatchAction({type:t,batch:pC(i.findTargetDataIndices(e),i)})}t.on("mouseover",P(i,this,"highlight")).on("mouseout",P(i,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return fC(t,this.api,t.itemSize);var i=e.align;return i&&"auto"!==i||(i="left"),i},_renderEndsText:function(t,e,i,n,o){if(e){var a=new yi,r=this.visualMapModel.textStyleModel;a.add(new br({style:{x:n?"right"===o?i[0]:0:i[0]/2,y:i[1]/2,textVerticalAlign:"middle",textAlign:n?o:"center",text:e,textFont:r.getFont(),textFill:r.getTextColor()}})),t.add(a)}},_getViewData:function(){var t=this.visualMapModel,e=D(t.getPieceList(),(function(t,e){return{piece:t,indexInModelPieceList:e}})),i=t.get("text"),n=t.get("orient"),o=t.get("inverse");return("horizontal"===n?o:!o)?e.reverse():i=i&&i.slice().reverse(),{viewPieceList:e,endsText:i}},_createItemSymbol:function(t,e,i){t.add(Fp(this.getControllerVisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,i=e.option,n=m(i.selected),o=e.getSelectedMapKey(t);"single"===i.selectedMode?(n[o]=!0,A(n,(function(t,e){n[e]=e===o}))):n[o]=!n[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:n})}}),Vd(jD);var TC,AC="urn:schemas-microsoft-com:vml",DC="undefined"==typeof window?null:window,CC=!1,LC=DC&&DC.document;function kC(t){return TC(t)}if(LC&&!o.canvasSupported)try{LC.namespaces.zrvml||LC.namespaces.add("zrvml",AC),TC=function(t){return LC.createElement("<zrvml:"+t+' class="zrvml">')}}catch(t){TC=function(t){return LC.createElement("<"+t+' xmlns="'+AC+'" class="zrvml">')}}var PC=Va.CMD,OC=Math.round,NC=Math.sqrt,EC=Math.abs,RC=Math.cos,zC=Math.sin,BC=Math.max;if(!o.canvasSupported){var VC=",",GC="progid:DXImageTransform.Microsoft",FC=21600,WC=FC/2,HC=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=FC+","+FC,t.coordorigin="0,0"},ZC=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},UC=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},XC=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},YC=function(t,e,i){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+i},jC=kn,qC=function(t,e,i){var n=Ne(e);i=+i,isNaN(i)&&(i=1),n&&(t.color=ZC(n[0],n[1],n[2]),t.opacity=i*n[3])},KC=function(t,e,i,n){var o="fill"===e,a=t.getElementsByTagName(e)[0];null!=i[e]&&"none"!==i[e]&&(o||!o&&i.lineWidth)?(t[o?"filled":"stroked"]="true",i[e]instanceof Wr&&XC(t,a),a=a||kC(e),o?function(t,e,i){var n,o=e.fill;if(null!=o)if(o instanceof Wr){var a,r=0,s=[0,0],l=0,u=1,h=i.getBoundingRect(),c=h.width,d=h.height;if("linear"===o.type){a="gradient";var f=i.transform,p=[o.x*c,o.y*d],g=[o.x2*c,o.y2*d];f&&(_t(p,p,f),_t(g,g,f)),(r=180*Math.atan2(g[0]-p[0],g[1]-p[1])/Math.PI)<0&&(r+=360),r<1e-6&&(r=0)}else{a="gradientradial";var m=i.scale,v=c,y=d;s=[((p=[o.x*c,o.y*d])[0]-h.x)/v,(p[1]-h.y)/y],(f=i.transform)&&_t(p,p,f);var x=BC(v/=m[0]*FC,y/=m[1]*FC);u=2*o.r/x-(l=0/x)}var _=o.colorStops.slice();_.sort((function(t,e){return t.offset-e.offset}));for(var w=_.length,b=[],S=[],M=0;M<w;M++){var I=_[M],T=(n=Ne(I.color),[ZC(n[0],n[1],n[2]),n[3]]);S.push(I.offset*u+l+" "+T[0]),0!==M&&M!==w-1||b.push(T)}if(2<=w){var A=b[0][0],D=b[1][0],C=b[0][1]*e.opacity,L=b[1][1]*e.opacity;t.type=a,t.method="none",t.focus="100%",t.angle=r,t.color=A,t.color2=D,t.colors=S.join(","),t.opacity=L,t.opacity2=C}"radial"===a&&(t.focusposition=s.join(","))}else qC(t,o,e.opacity)}(a,i,n):function(t,e){e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),null==e.stroke||e.stroke instanceof Wr||qC(t,e.stroke,e.opacity)}(a,i),UC(t,a)):(t[o?"filled":"stroked"]="false",XC(t,a))},$C=[[],[],[]];ar.prototype.brushVML=function(t){var e=this.style,i=this._vmlEl;i||(i=kC("shape"),HC(i),this._vmlEl=i),KC(i,"fill",e,this),KC(i,"stroke",e,this);var n=this.transform,o=null!=n,a=i.getElementsByTagName("stroke")[0];if(a){var r=e.lineWidth;o&&!e.strokeNoScale&&(r*=NC(EC(n[0]*n[3]-n[1]*n[2]))),a.weight=r+"px"}var s=this.path||(this.path=new Va);this.__dirtyPath&&(s.beginPath(),s.subPixelOptimize=!1,this.buildPath(s,this.shape),s.toStatic(),this.__dirtyPath=!1),i.path=function(t,e){var i,n,o,a,r,s,l=PC.M,u=PC.C,h=PC.L,c=PC.A,d=PC.Q,f=[],p=t.data,g=t.len();for(a=0;a<g;){switch(n="",i=0,o=p[a++]){case l:n=" m ",i=1,r=p[a++],s=p[a++],$C[0][0]=r,$C[0][1]=s;break;case h:n=" l ",i=1,r=p[a++],s=p[a++],$C[0][0]=r,$C[0][1]=s;break;case d:case u:n=" c ",i=3;var m,v,y=p[a++],x=p[a++],_=p[a++],w=p[a++];o===d?(_=((m=_)+2*y)/3,w=((v=w)+2*x)/3,y=(r+2*y)/3,x=(s+2*x)/3):(m=p[a++],v=p[a++]),$C[0][0]=y,$C[0][1]=x,$C[1][0]=_,$C[1][1]=w,r=$C[2][0]=m,s=$C[2][1]=v;break;case c:var b=0,S=0,M=1,I=1,T=0;e&&(b=e[4],S=e[5],M=NC(e[0]*e[0]+e[1]*e[1]),I=NC(e[2]*e[2]+e[3]*e[3]),T=Math.atan2(-e[1]/I,e[0]/M));var A=p[a++],D=p[a++],C=p[a++],L=p[a++],k=p[a++]+T,P=p[a++]+k+T;a++;var O=p[a++],N=A+RC(k)*C,E=D+zC(k)*L,R=(y=A+RC(P)*C,x=D+zC(P)*L,O?" wa ":" at ");Math.abs(N-y)<1e-4&&(.01<Math.abs(P-k)?O&&(N+=.0125):Math.abs(E-D)<1e-4?O&&N<A||!O&&A<N?x-=.0125:x+=.0125:O&&E<D||!O&&D<E?y+=.0125:y-=.0125),f.push(R,OC(((A-C)*M+b)*FC-WC),VC,OC(((D-L)*I+S)*FC-WC),VC,OC(((A+C)*M+b)*FC-WC),VC,OC(((D+L)*I+S)*FC-WC),VC,OC((N*M+b)*FC-WC),VC,OC((E*I+S)*FC-WC),VC,OC((y*M+b)*FC-WC),VC,OC((x*I+S)*FC-WC)),r=y,s=x;break;case PC.R:var z=$C[0],B=$C[1];z[0]=p[a++],z[1]=p[a++],B[0]=z[0]+p[a++],B[1]=z[1]+p[a++],e&&(_t(z,z,e),_t(B,B,e)),z[0]=OC(z[0]*FC-WC),B[0]=OC(B[0]*FC-WC),z[1]=OC(z[1]*FC-WC),B[1]=OC(B[1]*FC-WC),f.push(" m ",z[0],VC,z[1]," l ",B[0],VC,z[1]," l ",B[0],VC,B[1]," l ",z[0],VC,B[1]);break;case PC.Z:f.push(" x ")}if(0<i){f.push(n);for(var V=0;V<i;V++){var G=$C[V];e&&_t(G,G,e),f.push(OC(G[0]*FC-WC),VC,OC(G[1]*FC-WC),V<i-1?VC:"")}}}return f.join("")}(s,this.transform),i.style.zIndex=YC(this.zlevel,this.z,this.z2),UC(t,i),null!=e.text?this.drawRectText(t,this.getBoundingRect()):this.removeRectText(t)},ar.prototype.onRemove=function(t){XC(t,this._vmlEl),this.removeRectText(t)},ar.prototype.onAdd=function(t){UC(t,this._vmlEl),this.appendRectText(t)},zn.prototype.brushVML=function(t){var e,i,n=this.style,o=n.image;if(function(t){return"object"==typeof t&&t.tagName&&"IMG"===t.tagName.toUpperCase()}(o)){var a=o.src;if(a===this._imageSrc)e=this._imageWidth,i=this._imageHeight;else{var r=o.runtimeStyle,s=r.width,l=r.height;r.width="auto",r.height="auto",e=o.width,i=o.height,r.width=s,r.height=l,this._imageSrc=a,this._imageWidth=e,this._imageHeight=i}o=a}else o===this._imageSrc&&(e=this._imageWidth,i=this._imageHeight);if(o){var u=n.x||0,h=n.y||0,c=n.width,d=n.height,f=n.sWidth,p=n.sHeight,g=n.sx||0,m=n.sy||0,v=f&&p,y=this._vmlEl;y||(y=LC.createElement("div"),HC(y),this._vmlEl=y);var x,_=y.style,w=!1,b=1,S=1;if(this.transform&&(b=NC((x=this.transform)[0]*x[0]+x[1]*x[1]),S=NC(x[2]*x[2]+x[3]*x[3]),w=x[1]||x[2]),w){var M=[u,h],I=[u+c,h],T=[u,h+d],A=[u+c,h+d];_t(M,M,x),_t(I,I,x),_t(T,T,x),_t(A,A,x);var D=BC(M[0],I[0],T[0],A[0]),C=BC(M[1],I[1],T[1],A[1]),L=[];L.push("M11=",x[0]/b,VC,"M12=",x[2]/S,VC,"M21=",x[1]/b,VC,"M22=",x[3]/S,VC,"Dx=",OC(u*b+x[4]),VC,"Dy=",OC(h*S+x[5])),_.padding="0 "+OC(D)+"px "+OC(C)+"px 0",_.filter=GC+".Matrix("+L.join("")+", SizingMethod=clip)"}else x&&(u=u*b+x[4],h=h*S+x[5]),_.filter="",_.left=OC(u)+"px",_.top=OC(h)+"px";var k=this._imageEl,P=this._cropEl;k||(k=LC.createElement("div"),this._imageEl=k);var O=k.style;if(v){if(e&&i)O.width=OC(b*e*c/f)+"px",O.height=OC(S*i*d/p)+"px";else{var N=new Image,E=this;N.onload=function(){N.onload=null,i=N.height,O.width=OC(b*(e=N.width)*c/f)+"px",O.height=OC(S*i*d/p)+"px",E._imageWidth=e,E._imageHeight=i,E._imageSrc=o},N.src=o}P||((P=LC.createElement("div")).style.overflow="hidden",this._cropEl=P);var R=P.style;R.width=OC((c+g*c/f)*b),R.height=OC((d+m*d/p)*S),R.filter=GC+".Matrix(Dx="+-g*c/f*b+",Dy="+-m*d/p*S+")",P.parentNode||y.appendChild(P),k.parentNode!==P&&P.appendChild(k)}else O.width=OC(b*c)+"px",O.height=OC(S*d)+"px",y.appendChild(k),P&&P.parentNode&&(y.removeChild(P),this._cropEl=null);var z="",B=n.opacity;B<1&&(z+=".Alpha(opacity="+OC(100*B)+") "),O.filter=z+=GC+".AlphaImageLoader(src="+o+", SizingMethod=scale)",y.style.zIndex=YC(this.zlevel,this.z,this.z2),UC(t,y),null!=n.text&&this.drawRectText(t,this.getBoundingRect())}},zn.prototype.onRemove=function(t){XC(t,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(t)},zn.prototype.onAdd=function(t){UC(t,this._vmlEl),this.appendRectText(t)};var JC,QC="normal",tL={},eL=0,iL=document.createElement("div");Ki.measureText=function(t,e){var i=LC;JC||((JC=i.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",LC.body.appendChild(JC));try{JC.style.font=e}catch(t){}return JC.innerHTML="",JC.appendChild(i.createTextNode(t)),{width:JC.offsetWidth}};for(var nL=new vi,oL=function(t,e,i,n){var o=this.style;this.__dirty&&xn(o);var a=o.text;if(null!=a&&(a+=""),a){if(o.rich){var r=un(a,o);a=[];for(var s=0;s<r.lines.length;s++){for(var l=r.lines[s].tokens,u=[],h=0;h<l.length;h++)u.push(l[h].text);a.push(u.join(""))}a=a.join("\n")}var c,d,f=o.textAlign,p=o.textVerticalAlign,g=function(t){var e=tL[t];if(!e){100<eL&&(eL=0,tL={});var i,n=iL.style;try{n.font=t,i=n.fontFamily.split(",")[0]}catch(t){}e={style:n.fontStyle||QC,variant:n.fontVariant||QC,weight:n.fontWeight||QC,size:0|parseFloat(n.fontSize||12),family:i||"Microsoft YaHei"},tL[t]=e,eL++}return e}(o.font),m=g.style+" "+g.variant+" "+g.weight+" "+g.size+'px "'+g.family+'"';i=i||Ji(a,m,f,p,o.textPadding,o.textLineHeight);var v=this.transform;if(v&&!n&&(nL.copy(e),nL.applyTransform(v),e=nL),n)c=e.x,d=e.y;else{var y=o.textPosition;if(y instanceof Array)c=e.x+jC(y[0],e.width),d=e.y+jC(y[1],e.height),f=f||"left";else{var x=this.calculateTextPosition?this.calculateTextPosition({},o,e):en({},o,e);c=x.x,d=x.y,f=f||x.textAlign,p=p||x.textVerticalAlign}}c=Qi(c,i.width,f),d=tn(d,i.height,p),d+=i.height/2;var _,w,b,S=kC,M=this._textVmlEl;M?w=(_=(b=M.firstChild).nextSibling).nextSibling:(M=S("line"),_=S("path"),w=S("textpath"),b=S("skew"),w.style["v-text-align"]="left",HC(M),_.textpathok=!0,w.on=!0,M.from="0 0",M.to="1000 0.05",UC(M,b),UC(M,_),UC(M,w),this._textVmlEl=M);var I=[c,d],T=M.style;v&&n?(_t(I,I,v),b.on=!0,b.matrix=v[0].toFixed(3)+VC+v[2].toFixed(3)+VC+v[1].toFixed(3)+VC+v[3].toFixed(3)+",0,0",b.offset=(OC(I[0])||0)+","+(OC(I[1])||0),b.origin="0 0",T.left="0px",T.top="0px"):(b.on=!1,T.left=OC(c)+"px",T.top=OC(d)+"px"),w.string=function(t){return String(t).replace(/&/g,"&amp;").replace(/"/g,"&quot;")}(a);try{w.style.font=m}catch(t){}KC(M,"fill",{fill:o.textFill,opacity:o.opacity},this),KC(M,"stroke",{stroke:o.textStroke,opacity:o.opacity,lineDash:o.lineDash||null},this),M.style.zIndex=YC(this.zlevel,this.z,this.z2),UC(t,M)}},aL=function(t){XC(t,this._textVmlEl),this._textVmlEl=null},rL=function(t){UC(t,this._textVmlEl)},sL=[Nn,Rn,zn,ar,br],lL=0;lL<sL.length;lL++){var uL=sL[lL].prototype;uL.drawRectText=oL,uL.removeRectText=aL,uL.appendRectText=rL}br.prototype.brushVML=function(t){var e=this.style;null!=e.text?this.drawRectText(t,{x:e.x||0,y:e.y||0,width:0,height:0},this.getBoundingRect(),!0):this.removeRectText(t)},br.prototype.onRemove=function(t){this.removeRectText(t)},br.prototype.onAdd=function(t){this.appendRectText(t)}}function hL(t){return parseInt(t,10)}function cL(t,e){!function(){if(!CC&&LC){CC=!0;var t=LC.styleSheets;t.length<31?LC.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}}(),this.root=t,this.storage=e;var i=document.createElement("div"),n=document.createElement("div");i.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",n.style.cssText="position:absolute;left:0;top:0;",t.appendChild(i),this._vmlRoot=n,this._vmlViewport=i,this.resize();var o=e.delFromStorage,a=e.addToStorage;e.delFromStorage=function(t){o.call(e,t),t&&t.onRemove&&t.onRemove(n)},e.addToStorage=function(t){t.onAdd&&t.onAdd(n),a.call(e,t)},this._firstPaint=!0}function dL(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}cL.prototype={constructor:cL,getType:function(){return"vml"},getViewportRoot:function(){return this._vmlViewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0,!0);this._paintList(t)},_paintList:function(t){for(var e=this._vmlRoot,i=0;i<t.length;i++){var n=t[i];n.invisible||n.ignore?(n.__alreadyNotVisible||n.onRemove(e),n.__alreadyNotVisible=!0):(n.__alreadyNotVisible&&n.onAdd(e),n.__alreadyNotVisible=!1,n.__dirty&&(n.beforeBrush&&n.beforeBrush(),(n.brushVML||n.brush).call(n,e),n.afterBrush&&n.afterBrush())),n.__dirty=!1}this._firstPaint&&(this._vmlViewport.appendChild(e),this._firstPaint=!1)},resize:function(t,e){if(t=null==t?this._getWidth():t,e=null==e?this._getHeight():e,this._width!==t||this._height!==e){this._width=t,this._height=e;var i=this._vmlViewport.style;i.width=t+"px",i.height=e+"px"}},dispose:function(){this.root.innerHTML="",this._vmlRoot=this._vmlViewport=this.storage=null},getWidth:function(){return this._width},getHeight:function(){return this._height},clear:function(){this._vmlViewport&&this.root.removeChild(this._vmlViewport)},_getWidth:function(){var t=this.root,e=t.currentStyle;return(t.clientWidth||hL(e.width))-hL(e.paddingLeft)-hL(e.paddingRight)|0},_getHeight:function(){var t=this.root,e=t.currentStyle;return(t.clientHeight||hL(e.height))-hL(e.paddingTop)-hL(e.paddingBottom)|0}},A(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],(function(t){cL.prototype[t]=function(){}})),go("vml",cL);var fL=Va.CMD,pL=Array.prototype.join,gL="none",mL=Math.round,vL=Math.sin,yL=Math.cos,xL=Math.PI,_L=2*Math.PI,wL=180/xL;function bL(t){return mL(1e4*t)/1e4}function SL(t){return t<1e-4&&-1e-4<t}function ML(t,e){e&&IL(t,"transform","matrix("+pL.call(e,",")+")")}function IL(t,e,i){i&&("linear"===i.type||"radial"===i.type)||t.setAttribute(e,i)}function TL(t,e,i,n){if(function(t,e){var i=e?t.textFill:t.fill;return null!=i&&i!==gL}(e,i)){var o=i?e.textFill:e.fill;IL(t,"fill",o="transparent"===o?gL:o),IL(t,"fill-opacity",null!=e.fillOpacity?e.fillOpacity*e.opacity:e.opacity)}else IL(t,"fill",gL);if(function(t,e){var i=e?t.textStroke:t.stroke;return null!=i&&i!==gL}(e,i)){var a=i?e.textStroke:e.stroke;IL(t,"stroke",a="transparent"===a?gL:a),IL(t,"stroke-width",(i?e.textStrokeWidth:e.lineWidth)/(!i&&e.strokeNoScale?n.getLineScale():1)),IL(t,"paint-order",i?"stroke":"fill"),IL(t,"stroke-opacity",null!=e.strokeOpacity?e.strokeOpacity:e.opacity),e.lineDash?(IL(t,"stroke-dasharray",e.lineDash.join(",")),IL(t,"stroke-dashoffset",mL(e.lineDashOffset||0))):IL(t,"stroke-dasharray",""),e.lineCap&&IL(t,"stroke-linecap",e.lineCap),e.lineJoin&&IL(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&IL(t,"stroke-miterlimit",e.miterLimit)}else IL(t,"stroke",gL)}var AL={brush:function(t){var e=t.style,i=t.__svgEl;i||(i=dL("path"),t.__svgEl=i),t.path||t.createPathProxy();var n=t.path;if(t.__dirtyPath){n.beginPath(),n.subPixelOptimize=!1,t.buildPath(n,t.shape),t.__dirtyPath=!1;var o=function(t){for(var e=[],i=t.data,n=t.len(),o=0;o<n;){var a="",r=0;switch(i[o++]){case fL.M:a="M",r=2;break;case fL.L:a="L",r=2;break;case fL.Q:a="Q",r=4;break;case fL.C:a="C",r=6;break;case fL.A:var s=i[o++],l=i[o++],u=i[o++],h=i[o++],c=i[o++],d=i[o++],f=i[o++],p=i[o++],g=Math.abs(d),m=SL(g-_L)||(p?_L<=d:_L<=-d),v=0<d?d%_L:d%_L+_L,y=!1;y=!!m||!SL(g)&&xL<=v==!!p;var x=bL(s+u*yL(c)),_=bL(l+h*vL(c));m&&(d=p?_L-1e-4:1e-4-_L,y=!0,9===o&&e.push("M",x,_));var w=bL(s+u*yL(c+d)),b=bL(l+h*vL(c+d));e.push("A",bL(u),bL(h),mL(f*wL),+y,+p,w,b);break;case fL.Z:a="Z";break;case fL.R:w=bL(i[o++]),b=bL(i[o++]);var S=bL(i[o++]),M=bL(i[o++]);e.push("M",w,b,"L",w+S,b,"L",w+S,b+M,"L",w,b+M,"L",w,b)}a&&e.push(a);for(var I=0;I<r;I++)e.push(bL(i[o++]))}return e.join(" ")}(n);o.indexOf("NaN")<0&&IL(i,"d",o)}TL(i,e,!1,t),ML(i,t.transform),null!=e.text?NL(t,t.getBoundingRect()):RL(t)}},DL={brush:function(t){var e=t.style,i=e.image;if(i instanceof HTMLImageElement&&(i=i.src),i){var n=e.x||0,o=e.y||0,a=e.width,r=e.height,s=t.__svgEl;s||(s=dL("image"),t.__svgEl=s),i!==t.__imageSrc&&(function(t,e,i){t.setAttributeNS("http://www.w3.org/1999/xlink","href",i)}(s,0,i),t.__imageSrc=i),IL(s,"width",a),IL(s,"height",r),IL(s,"x",n),IL(s,"y",o),ML(s,t.transform),null!=e.text?NL(t,t.getBoundingRect()):RL(t)}}},CL={},LL=new vi,kL={},PL=[],OL={left:"start",right:"end",center:"middle",middle:"middle"},NL=function(t,e){var i=t.style,n=t.transform,o=t instanceof br||i.transformText;t.__dirty&&xn(i);var a=i.text;if(null!=a&&(a+=""),On(a,i)){null==a&&(a=""),!o&&n&&(LL.copy(e),LL.applyTransform(n),e=LL);var r=t.__textSvgEl;r||(r=dL("text"),t.__textSvgEl=r);var s=r.style,l=i.font||qi,u=r.__computedFont;l!==r.__styleFont&&(s.font=r.__styleFont=l,u=r.__computedFont=s.font);var h=i.textPadding,c=t.__textCotentBlock;c&&!t.__dirtyText||(c=t.__textCotentBlock=ln(a,u,h,i.textLineHeight,i.truncate));var d=c.outerHeight,f=c.lineHeight;An(kL,t,i,e);var p=kL.baseX,g=kL.baseY,m=kL.textAlign||"left",v=kL.textVerticalAlign;!function(t,e,i,n,o,a,r){Qt(PL),e&&i&&te(PL,i);var s=n.textRotation;if(o&&s){var l=n.textOrigin;"center"===l?(a=o.width/2+o.x,r=o.height/2+o.y):l&&(a=l[0]+o.x,r=l[1]+o.y),PL[4]-=a,PL[5]-=r,ne(PL,PL,s),PL[4]+=a,PL[5]+=r}ML(t,PL)}(r,o,n,i,e,p,g);var y=p,x=tn(g,d,v);h&&(y=function(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}(p,m,h),x+=h[0]),x+=f/2,TL(r,i,!0,t);var _=c.canCacheByTextString,w=t.__tspanList||(t.__tspanList=[]),b=w.length;if(_&&t.__canCacheByTextString&&t.__text===a){if(t.__dirtyText&&b)for(var S=0;S<b;++S)EL(w[S],m,y,x+S*f)}else{t.__text=a,t.__canCacheByTextString=_;var M=c.lines,I=M.length;for(S=0;S<I;S++){var T=w[S],A=M[S];T?T.__zrText!==A&&(T.innerHTML="",T.appendChild(document.createTextNode(A))):(T=w[S]=dL("tspan"),r.appendChild(T),T.appendChild(document.createTextNode(A))),EL(T,m,y,x+S*f)}if(I<b){for(;S<b;S++)r.removeChild(w[S]);w.length=I}}}};function EL(t,e,i,n){IL(t,"dominant-baseline","middle"),IL(t,"text-anchor",OL[e]),IL(t,"x",i),IL(t,"y",n)}function RL(t){t&&t.__textSvgEl&&(t.__textSvgEl.parentNode&&t.__textSvgEl.parentNode.removeChild(t.__textSvgEl),t.__textSvgEl=null,t.__tspanList=[],t.__text=null)}function zL(){}function BL(t,e){for(var i=0,n=e.length,o=0,a=0;i<n;i++){var r=e[i];if(r.removed){for(s=[],l=a;l<a+r.count;l++)s.push(l);r.indices=s,a+=r.count}else{for(var s=[],l=o;l<o+r.count;l++)s.push(l);r.indices=s,o+=r.count,r.added||(a+=r.count)}}return e}CL.drawRectText=NL,CL.brush=function(t){null!=t.style.text?NL(t,!1):RL(t)},zL.prototype={diff:function(t,e,i){this.equals=i=i||function(t,e){return t===e};var n=this;t=t.slice();var o=(e=e.slice()).length,a=t.length,r=1,s=o+a,l=[{newPos:-1,components:[]}],u=this.extractCommon(l[0],e,t,0);if(l[0].newPos+1>=o&&a<=u+1){for(var h=[],c=0;c<e.length;c++)h.push(c);return[{indices:h,count:e.length}]}function d(){for(var i=-1*r;i<=r;i+=2){var s,u=l[i-1],h=l[i+1],c=(h?h.newPos:0)-i;u&&(l[i-1]=void 0);var d=u&&u.newPos+1<o,f=h&&0<=c&&c<a;if(d||f){if(!d||f&&u.newPos<h.newPos?(s={newPos:(p=h).newPos,components:p.components.slice(0)},n.pushComponent(s.components,void 0,!0)):((s=u).newPos++,n.pushComponent(s.components,!0,void 0)),c=n.extractCommon(s,e,t,i),s.newPos+1>=o&&a<=c+1)return BL(0,s.components);l[i]=s}else l[i]=void 0}var p;r++}for(;r<=s;){var f=d();if(f)return f}},pushComponent:function(t,e,i){var n=t[t.length-1];n&&n.added===e&&n.removed===i?t[t.length-1]={count:n.count+1,added:e,removed:i}:t.push({count:1,added:e,removed:i})},extractCommon:function(t,e,i,n){for(var o=e.length,a=i.length,r=t.newPos,s=r-n,l=0;r+1<o&&s+1<a&&this.equals(e[r+1],i[s+1]);)r++,s++,l++;return l&&t.components.push({count:l}),t.newPos=r,s},tokenize:function(t){return t.slice()},join:function(t){return t.slice()}};var VL=new zL;function GL(t,e,i,n,o){this._zrId=t,this._svgRoot=e,this._tagNames="string"==typeof i?[i]:i,this._markLabel=n,this._domName=o||"_dom",this.nextId=0}function FL(t,e){GL.call(this,t,e,["linearGradient","radialGradient"],"__gradient_in_use__")}function WL(t,e){GL.call(this,t,e,"clipPath","__clippath_in_use__")}function HL(t,e){GL.call(this,t,e,["filter"],"__filter_in_use__","_shadowDom")}function ZL(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY||t.textShadowBlur||t.textShadowOffsetX||t.textShadowOffsetY)}function UL(t){return parseInt(t,10)}function XL(t,e){return e&&t&&e.parentNode!==t}function YL(t,e,i){if(XL(t,e)&&i){var n=i.nextSibling;n?t.insertBefore(e,n):t.appendChild(e)}}function jL(t,e){if(XL(t,e)){var i=t.firstChild;i?t.insertBefore(e,i):t.appendChild(e)}}function qL(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)}function KL(t){return t.__textSvgEl}function $L(t){return t.__svgEl}function JL(t,e,i,n){this.root=t,this.storage=e,this._opts=i=x({},i||{});var o=dL("svg");o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("version","1.1"),o.setAttribute("baseProfile","full"),o.style.cssText="user-select:none;position:absolute;left:0;top:0;",this.gradientManager=new FL(n,o),this.clipPathManager=new WL(n,o),this.shadowManager=new HL(n,o);var a=document.createElement("div");a.style.cssText="overflow:hidden;position:relative",this._svgRoot=o,this._viewport=a,t.appendChild(a),a.appendChild(o),this.resize(i.width,i.height),this._visibleList=[]}GL.prototype.createElement=dL,GL.prototype.getDefs=function(t){var e=this._svgRoot,i=this._svgRoot.getElementsByTagName("defs");return 0===i.length?t?((i=e.insertBefore(this.createElement("defs"),e.firstChild)).contains||(i.contains=function(t){var e=i.children;if(!e)return!1;for(var n=e.length-1;0<=n;--n)if(e[n]===t)return!0;return!1}),i):null:i[0]},GL.prototype.update=function(t,e){if(t){var i=this.getDefs(!1);if(t[this._domName]&&i.contains(t[this._domName]))"function"==typeof e&&e(t);else{var n=this.add(t);n&&(t[this._domName]=n)}}},GL.prototype.addDom=function(t){this.getDefs(!0).appendChild(t)},GL.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},GL.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return A(this._tagNames,(function(i){var n=t.getElementsByTagName(i);e=e.concat([].slice.call(n))})),e},GL.prototype.markAllUnused=function(){var t=this.getDoms(),e=this;A(t,(function(t){t[e._markLabel]="0"}))},GL.prototype.markUsed=function(t){t&&(t[this._markLabel]="1")},GL.prototype.removeUnused=function(){var t=this.getDefs(!1);if(t){var e=this.getDoms(),i=this;A(e,(function(e){"1"!==e[i._markLabel]&&t.removeChild(e)}))}},GL.prototype.getSvgProxy=function(t){return t instanceof ar?AL:t instanceof zn?DL:t instanceof br?CL:AL},GL.prototype.getTextSvgElement=function(t){return t.__textSvgEl},GL.prototype.getSvgElement=function(t){return t.__svgEl},M(FL,GL),FL.prototype.addWithoutUpdate=function(t,e){if(e&&e.style){var i=this;A(["fill","stroke"],(function(n){if(e.style[n]&&("linear"===e.style[n].type||"radial"===e.style[n].type)){var o,a=e.style[n],r=i.getDefs(!0);a._dom?(o=a._dom,r.contains(a._dom)||i.addDom(o)):o=i.add(a),i.markUsed(e);var s=o.getAttribute("id");t.setAttribute(n,"url(#"+s+")")}}))}},FL.prototype.add=function(t){var e;if("linear"===t.type)e=this.createElement("linearGradient");else{if("radial"!==t.type)return null;e=this.createElement("radialGradient")}return t.id=t.id||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-gradient-"+t.id),this.updateDom(t,e),this.addDom(e),e},FL.prototype.update=function(t){var e=this;GL.prototype.update.call(this,t,(function(){var i=t.type,n=t._dom.tagName;"linear"===i&&"linearGradient"===n||"radial"===i&&"radialGradient"===n?e.updateDom(t,t._dom):(e.removeDom(t),e.add(t))}))},FL.prototype.updateDom=function(t,e){if("linear"===t.type)e.setAttribute("x1",t.x),e.setAttribute("y1",t.y),e.setAttribute("x2",t.x2),e.setAttribute("y2",t.y2);else{if("radial"!==t.type)return;e.setAttribute("cx",t.x),e.setAttribute("cy",t.y),e.setAttribute("r",t.r)}e.setAttribute("gradientUnits",t.global?"userSpaceOnUse":"objectBoundingBox"),e.innerHTML="";for(var i=t.colorStops,n=0,o=i.length;n<o;++n){var a=this.createElement("stop");a.setAttribute("offset",100*i[n].offset+"%");var r=i[n].color;if(r.indexOf(!1)){var s=Ne(r)[3],l=ze(r);a.setAttribute("stop-color","#"+l),a.setAttribute("stop-opacity",s)}else a.setAttribute("stop-color",i[n].color);e.appendChild(a)}t._dom=e},FL.prototype.markUsed=function(t){if(t.style){var e=t.style.fill;e&&e._dom&&GL.prototype.markUsed.call(this,e._dom),(e=t.style.stroke)&&e._dom&&GL.prototype.markUsed.call(this,e._dom)}},M(WL,GL),WL.prototype.update=function(t){var e=this.getSvgElement(t);e&&this.updateDom(e,t.__clipPaths,!1);var i=this.getTextSvgElement(t);i&&this.updateDom(i,t.__clipPaths,!0),this.markUsed(t)},WL.prototype.updateDom=function(t,e,i){if(e&&0<e.length){var n,o,a=this.getDefs(!0),r=e[0],s=i?"_textDom":"_dom";r[s]?(o=r[s].getAttribute("id"),a.contains(n=r[s])||a.appendChild(n)):(o="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(n=this.createElement("clipPath")).setAttribute("id",o),a.appendChild(n),r[s]=n);var l=this.getSvgProxy(r);if(r.transform&&r.parent.invTransform&&!i){var u=Array.prototype.slice.call(r.transform);ee(r.transform,r.parent.invTransform,r.transform),l.brush(r),r.transform=u}else l.brush(r);var h=this.getSvgElement(r);n.innerHTML="",n.appendChild(h.cloneNode()),t.setAttribute("clip-path","url(#"+o+")"),1<e.length&&this.updateDom(n,e.slice(1),i)}else t&&t.setAttribute("clip-path","none")},WL.prototype.markUsed=function(t){var e=this;t.__clipPaths&&A(t.__clipPaths,(function(t){t._dom&&GL.prototype.markUsed.call(e,t._dom),t._textDom&&GL.prototype.markUsed.call(e,t._textDom)}))},M(HL,GL),HL.prototype.addWithoutUpdate=function(t,e){if(e&&ZL(e.style)){var i;e._shadowDom?(i=e._shadowDom,this.getDefs(!0).contains(e._shadowDom)||this.addDom(i)):i=this.add(e),this.markUsed(e);var n=i.getAttribute("id");t.style.filter="url(#"+n+")"}},HL.prototype.add=function(t){var e=this.createElement("filter");return t._shadowDomId=t._shadowDomId||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-shadow-"+t._shadowDomId),this.updateDom(t,e),this.addDom(e),e},HL.prototype.update=function(t,e){if(ZL(e.style)){var i=this;GL.prototype.update.call(this,e,(function(){i.updateDom(e,e._shadowDom)}))}else this.remove(t,e)},HL.prototype.remove=function(t,e){null!=e._shadowDomId&&(this.removeDom(t),t.style.filter="")},HL.prototype.updateDom=function(t,e){var i=e.getElementsByTagName("feDropShadow");i=0===i.length?this.createElement("feDropShadow"):i[0];var n,o,a,r,s=t.style,l=t.scale&&t.scale[0]||1,u=t.scale&&t.scale[1]||1;if(s.shadowBlur||s.shadowOffsetX||s.shadowOffsetY)n=s.shadowOffsetX||0,o=s.shadowOffsetY||0,a=s.shadowBlur,r=s.shadowColor;else{if(!s.textShadowBlur)return void this.removeDom(e,s);n=s.textShadowOffsetX||0,o=s.textShadowOffsetY||0,a=s.textShadowBlur,r=s.textShadowColor}i.setAttribute("dx",n/l),i.setAttribute("dy",o/u),i.setAttribute("flood-color",r),i.setAttribute("stdDeviation",a/2/l+" "+a/2/u),e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width",Math.ceil(a/2*200)+"%"),e.setAttribute("height",Math.ceil(a/2*200)+"%"),e.appendChild(i),t._shadowDom=e},HL.prototype.markUsed=function(t){t._shadowDom&&GL.prototype.markUsed.call(this,t._shadowDom)},JL.prototype={constructor:JL,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},setBackgroundColor:function(t){this._viewport.style.background=t},_paintList:function(t){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var e,i,n=this._svgRoot,o=this._visibleList,a=t.length,r=[];for(e=0;e<a;e++){var s=t[e],l=(i=s)instanceof ar?AL:i instanceof zn?DL:i instanceof br?CL:AL,u=$L(s)||KL(s);s.invisible||(s.__dirty&&(l&&l.brush(s),this.clipPathManager.update(s),s.style&&(this.gradientManager.update(s.style.fill),this.gradientManager.update(s.style.stroke),this.shadowManager.update(u,s)),s.__dirty=!1),r.push(s))}var h,c=function(t,e,i){return VL.diff(t,e,void 0)}(o,r);for(e=0;e<c.length;e++)if((p=c[e]).removed)for(var d=0;d<p.count;d++){u=$L(s=o[p.indices[d]]);var f=KL(s);qL(n,u),qL(n,f)}for(e=0;e<c.length;e++){var p;if((p=c[e]).added)for(d=0;d<p.count;d++)u=$L(s=r[p.indices[d]]),f=KL(s),h?YL(n,u,h):jL(n,u),u?YL(n,f,u):h?YL(n,f,h):jL(n,f),YL(n,f,u),h=f||u||h,this.gradientManager.addWithoutUpdate(u||f,s),this.shadowManager.addWithoutUpdate(u||f,s),this.clipPathManager.markUsed(s);else if(!p.removed)for(d=0;d<p.count;d++)u=$L(s=r[p.indices[d]]),f=KL(s),u=$L(s),f=KL(s),this.gradientManager.markUsed(s),this.gradientManager.addWithoutUpdate(u||f,s),this.shadowManager.markUsed(s),this.shadowManager.addWithoutUpdate(u||f,s),this.clipPathManager.markUsed(s),f&&YL(n,f,u),h=u||f||h}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this.shadowManager.removeUnused(),this._visibleList=r},_getDefs:function(t){var e,i=this._svgRoot;return 0!==(e=this._svgRoot.getElementsByTagName("defs")).length?e[0]:t?((e=i.insertBefore(dL("defs"),i.firstChild)).contains||(e.contains=function(t){var i=e.children;if(!i)return!1;for(var n=i.length-1;0<=n;--n)if(i[n]===t)return!0;return!1}),e):null},resize:function(t,e){var i=this._viewport;i.style.display="none";var n=this._opts;if(null!=t&&(n.width=t),null!=e&&(n.height=e),t=this._getSize(0),e=this._getSize(1),i.style.display="",this._width!==t||this._height!==e){this._width=t,this._height=e;var o=i.style;o.width=t+"px",o.height=e+"px";var a=this._svgRoot;a.setAttribute("width",t),a.setAttribute("height",e)}},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,i=["width","height"][t],n=["clientWidth","clientHeight"][t],o=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var r=this.root,s=document.defaultView.getComputedStyle(r);return(r[n]||UL(s[i])||UL(r.style[i]))-(UL(s[o])||0)-(UL(s[a])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},pathToDataUrl:function(){return this.refresh(),"data:image/svg+xml;charset=UTF-8,"+this._svgRoot.outerHTML}},A(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],(function(t){JL.prototype[t]=function(){}})),go("svg",JL),t.version="4.6.0",t.dependencies={zrender:"4.2.0"},t.PRIORITY=Jc,t.init=function(t,e,i){var n=zd(t);if(n)return n;var o=new od(t,e,i);return o.id="ec_"+Pd++,Ld[o.id]=o,Eo(t,Nd,o.id),function(t){var e="__connectUpdateStatus";function i(t,i){for(var n=0;n<t.length;n++)t[n][e]=i}jc(Sd,(function(n,o){t._messageCenter.on(o,(function(n){if(kd[t.group]&&0!==t[e]){if(n&&n.escapeConnect)return;var o=t.makeActionFromEvent(n),a=[];jc(Ld,(function(e){e!==t&&e.group===t.group&&a.push(e)})),i(a,0),jc(a,(function(t){1!==t[e]&&t.dispatchAction(o)})),i(a,2)}}))}))}(o),o},t.connect=function(t){if(N(t)){var e=t;t=null,jc(e,(function(e){null!=e.group&&(t=e.group)})),t=t||"g_"+Od++,jc(e,(function(e){e.group=t}))}return kd[t]=!0,t},t.disConnect=Ed,t.disconnect=Rd,t.dispose=function(t){"string"==typeof t?t=Ld[t]:t instanceof od||(t=zd(t)),t instanceof od&&!t.isDisposed()&&t.dispose()},t.getInstanceByDom=zd,t.getInstanceById=function(t){return Ld[t]},t.registerTheme=Bd,t.registerPreprocessor=Vd,t.registerProcessor=Gd,t.registerPostUpdate=function(t){Td.push(t)},t.registerAction=Fd,t.registerCoordinateSystem=Wd,t.getCoordinateSystemDimensions=function(t){var e=Pu.get(t);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()},t.registerLayout=Hd,t.registerVisual=Zd,t.registerLoading=Xd,t.extendComponentModel=Yd,t.extendComponentView=jd,t.extendSeriesModel=qd,t.extendChartView=Kd,t.setCanvasCreator=function(t){g("createCanvas",t)},t.registerMap=function(t,e,i){!function(t,e,i){var n;A(n=N(e)?e:e.svg?[{type:"svg",source:e.svg,specialAreas:e.specialAreas}]:(e.geoJson&&!e.features&&(i=e.specialAreas,e=e.geoJson),[{type:"geoJSON",source:e,specialAreas:i}]),(function(t){var e=t.type;"geoJson"===e&&(e=t.type="geoJSON"),(0,Xc[e])(t)})),Zc.set(t,n)}(t,e,i)},t.getMap=function(t){var e=Uc(t);return e&&e[0]&&{geoJson:e[0].geoJSON,specialAreas:e[0].specialAreas}},t.dataTool={},t.zrender=vo,t.number=Al,t.format=Hl,t.throttle=Qh,t.helper=Wp,t.matrix=se,t.vector=St,t.color=He,t.parseGeoJSON=Yp,t.parseGeoJson=og,t.util=ag,t.graphic=rg,t.List=gf,t.Model=ol,t.Axis=ig,t.env=o}));