
/*
* 不要格式化代码，会让体积超过1MB
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements.  See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership.  The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License.  You may obtain a copy of the License at
*
*   http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied.  See the License for the
* specific language governing permissions and limitations
* under the License.
*/


!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).echarts={})}(this,function(t){"use strict";var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function l(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var h=function(){return(h=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function a(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var i=Array(t),o=0,e=0;e<n;e++)for(var r=arguments[e],a=0,s=r.length;a<s;a++,o++)i[o]=r[a];return i}var e=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.weChat=!1},w=new function(){this.browser=new e,this.node=!1,this.wxa=!1,this.worker=!1,this.canvasSupported=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(w.wxa=!0,w.canvasSupported=!0,w.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?(w.worker=!0,w.canvasSupported=!0):"undefined"==typeof navigator?(w.node=!0,w.canvasSupported=!0,w.svgSupported=!0):function(t,e){var n=e.browser,i=t.match(/Firefox\/([\d.]+)/),o=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),r=t.match(/Edge\/([\d.]+)/),t=/micromessenger/i.test(t);i&&(n.firefox=!0,n.version=i[1]);o&&(n.ie=!0,n.version=o[1]);r&&(n.edge=!0,n.version=r[1]);t&&(n.weChat=!0);e.canvasSupported=!!document.createElement("canvas").getContext,e.svgSupported="undefined"!=typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,e.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&11<=+n.version),e.domSupported="undefined"!=typeof document}(navigator.userAgent,w);var s={"[object Function]":!0,"[object RegExp]":!0,"[object Date]":!0,"[object Error]":!0,"[object CanvasGradient]":!0,"[object CanvasPattern]":!0,"[object Image]":!0,"[object Canvas]":!0},u={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0},c=Object.prototype.toString,n=Array.prototype,p=n.forEach,d=n.filter,o=n.slice,f=n.map,r=function(){}.constructor,g=r?r.prototype:null,y={};function m(t,e){y[t]=e}var v=2311;function x(){return v++}function _(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];"undefined"!=typeof console&&console.error.apply(t)}function C(t){if(null==t||"object"!=typeof t)return t;var e=t,n=c.call(t);if("[object Array]"===n){if(!lt(t)){e=[];for(var i=0,o=t.length;i<o;i++)e[i]=C(t[i])}}else if(u[n]){if(!lt(t)){var r=t.constructor;if(r.from)e=r.from(t);else{e=new r(t.length);for(i=0,o=t.length;i<o;i++)e[i]=C(t[i])}}}else if(!s[n]&&!lt(t)&&!j(t))for(var a in e={},t)t.hasOwnProperty(a)&&(e[a]=C(t[a]));return e}function b(t,e,n){if(!Y(e)||!Y(t))return n?C(e):t;for(var i in e){var o,r;e.hasOwnProperty(i)&&(o=t[i],!Y(r=e[i])||!Y(o)||F(r)||F(o)||j(r)||j(o)||U(r)||U(o)||lt(r)||lt(o)?!n&&i in t||(t[i]=C(e[i])):b(o,r,n))}return t}function S(t,e){for(var n=t[0],i=1,o=t.length;i<o;i++)n=b(n,t[i],e);return n}function O(t,e){if(Object.assign)Object.assign(t,e);else for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function A(t,e,n){for(var i=z(e),o=0;o<i.length;o++){var r=i[o];(n?null!=e[r]:null==t[r])&&(t[r]=e[r])}return t}var D=function(){return y.createCanvas()};function L(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n}return-1}function M(t,e){var n,i=t.prototype;function o(){}for(n in o.prototype=e.prototype,t.prototype=new o,i)i.hasOwnProperty(n)&&(t.prototype[n]=i[n]);(t.prototype.constructor=t).superClass=e}function I(t,e,n){if(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var i=Object.getOwnPropertyNames(e),o=0;o<i.length;o++){var r=i[o];"constructor"!==r&&(n?null!=e[r]:null==t[r])&&(t[r]=e[r])}else A(t,e,n)}function k(t){return!!t&&("string"!=typeof t&&"number"==typeof t.length)}function N(t,e,n){if(t&&e)if(t.forEach&&t.forEach===p)t.forEach(e,n);else if(t.length===+t.length)for(var i=0,o=t.length;i<o;i++)e.call(n,t[i],i,t);else for(var r in t)t.hasOwnProperty(r)&&e.call(n,t[r],r,t)}function P(t,e,n){if(!t)return[];if(!e)return nt(t);if(t.map&&t.map===f)return t.map(e,n);for(var i=[],o=0,r=t.length;o<r;o++)i.push(e.call(n,t[o],o,t));return i}function T(t,e,n,i){if(t&&e){for(var o=0,r=t.length;o<r;o++)n=e.call(i,n,t[o],o,t);return n}}function R(t,e,n){if(!t)return[];if(!e)return nt(t);if(t.filter&&t.filter===d)return t.filter(e,n);for(var i=[],o=0,r=t.length;o<r;o++)e.call(n,t[o],o,t)&&i.push(t[o]);return i}function E(t,e,n){if(t&&e)for(var i=0,o=t.length;i<o;i++)if(e.call(n,t[i],i,t))return t[i]}function z(t){if(!t)return[];if(Object.keys)return Object.keys(t);var e,n=[];for(e in t)t.hasOwnProperty(e)&&n.push(e);return n}y.createCanvas=function(){return document.createElement("canvas")};var B=g&&G(g.bind)?g.call.bind(g.bind):function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return function(){return t.apply(e,n.concat(o.call(arguments)))}};function V(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return function(){return t.apply(this,e.concat(o.call(arguments)))}}function F(t){return Array.isArray?Array.isArray(t):"[object Array]"===c.call(t)}function G(t){return"function"==typeof t}function H(t){return"string"==typeof t}function W(t){return"[object String]"===c.call(t)}function X(t){return"number"==typeof t}function Y(t){var e=typeof t;return"function"==e||!!t&&"object"==e}function U(t){return!!s[c.call(t)]}function Z(t){return!!u[c.call(t)]}function j(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function q(t){return null!=t.colorStops}function K(t){return null!=t.image}function $(t){return"[object RegExp]"===c.call(t)}function J(t){return t!=t}function Q(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=0,i=t.length;n<i;n++)if(null!=t[n])return t[n]}function tt(t,e){return null!=t?t:e}function et(t,e,n){return null!=t?t:null!=e?e:n}function nt(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return o.apply(t,e)}function it(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 ot(t,e){if(!t)throw new Error(e)}function rt(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var at="__ec_primitive__";function st(t){t[at]=!0}function lt(t){return t[at]}var ut=(ht.prototype.get=function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},ht.prototype.set=function(t,e){return this.data[t]=e},ht.prototype.each=function(t,e){for(var n in this.data)this.data.hasOwnProperty(n)&&t.call(e,this.data[n],n)},ht.prototype.keys=function(){return z(this.data)},ht.prototype.removeKey=function(t){delete this.data[t]},ht);function ht(t){this.data={};var n=F(t);this.data={};var i=this;function e(t,e){n?i.set(t,e):i.set(e,t)}t instanceof ht?t.each(e):t&&N(t,e)}function ct(t){return new ut(t)}function pt(t,e){for(var n=new t.constructor(t.length+e.length),i=0;i<t.length;i++)n[i]=t[i];for(var o=t.length,i=0;i<e.length;i++)n[i+o]=e[i];return n}function dt(t,e){var n=Object.create?Object.create(t):((n=function(){}).prototype=t,new n);return e&&O(n,e),n}function ft(t,e){return t.hasOwnProperty(e)}function gt(){}var yt=Object.freeze({__proto__:null,$override:m,guid:x,logError:_,clone:C,merge:b,mergeAll:S,extend:O,defaults:A,createCanvas:D,indexOf:L,inherits:M,mixin:I,isArrayLike:k,each:N,map:P,reduce:T,filter:R,find:E,keys:z,bind:B,curry:V,isArray:F,isFunction:G,isString:H,isStringSafe:W,isNumber:X,isObject:Y,isBuiltInObject:U,isTypedArray:Z,isDom:j,isGradientObject:q,isPatternObject:K,isRegExp:$,eqNaN:J,retrieve:Q,retrieve2:tt,retrieve3:et,slice:nt,normalizeCssArray:it,assert:ot,trim:rt,setAsPrimitive:st,isPrimitive:lt,HashMap:ut,createHashMap:ct,concatArray:pt,createObject:dt,hasOwn:ft,noop:gt});function mt(t,e){return null==t&&(t=0),null==e&&(e=0),[t,e]}function vt(t,e){return t[0]=e[0],t[1]=e[1],t}function xt(t){return[t[0],t[1]]}function _t(t,e,n){return t[0]=e,t[1]=n,t}function bt(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function wt(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t}function St(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function Mt(t){return Math.sqrt(It(t))}function It(t){return t[0]*t[0]+t[1]*t[1]}function Tt(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function Ct(t,e){var n=Mt(e);return 0===n?(t[0]=0,t[1]=0):(t[0]=e[0]/n,t[1]=e[1]/n),t}function Dt(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var At=Dt;function Lt(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var kt=Lt;function Pt(t,e,n,i){return t[0]=e[0]+i*(n[0]-e[0]),t[1]=e[1]+i*(n[1]-e[1]),t}function Ot(t,e,n){var i=e[0],e=e[1];return t[0]=n[0]*i+n[2]*e+n[4],t[1]=n[1]*i+n[3]*e+n[5],t}function Rt(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function Nt(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}var Et=Object.freeze({__proto__:null,create:mt,copy:vt,clone:xt,set:_t,add:bt,scaleAndAdd:wt,sub:St,len:Mt,length:Mt,lenSquare:It,lengthSquare:It,mul:function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t},div:function(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},scale:Tt,normalize:Ct,distance:Dt,dist:At,distanceSquare:Lt,distSquare:kt,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},lerp:Pt,applyTransform:Ot,min:Rt,max:Nt}),zt=function(t,e){this.target=t,this.topTarget=e&&e.topTarget},Bt=(Vt.prototype._dragStart=function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent;e&&((this._draggingTarget=e).dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.handler.dispatchToElement(new zt(e,t),"dragstart",t.event))},Vt.prototype._drag=function(t){var e,n,i,o,r=this._draggingTarget;r&&(i=t.offsetX,o=t.offsetY,e=i-this._x,n=o-this._y,this._x=i,this._y=o,r.drift(e,n,t),this.handler.dispatchToElement(new zt(r,t),"drag",t.event),i=this.handler.findHover(i,o,r).target,o=this._dropTarget,r!==(this._dropTarget=i)&&(o&&i!==o&&this.handler.dispatchToElement(new zt(o,t),"dragleave",t.event),i&&i!==o&&this.handler.dispatchToElement(new zt(i,t),"dragenter",t.event)))},Vt.prototype._dragEnd=function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.handler.dispatchToElement(new zt(e,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new zt(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},Vt);function Vt(t){(this.handler=t).on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}var Ft=(Gt.prototype.on=function(t,e,n,i){this._$handlers||(this._$handlers={});var o=this._$handlers;if("function"==typeof e&&(i=n,n=e,e=null),!n||!t)return this;var r=this._$eventProcessor;null!=e&&r&&r.normalizeQuery&&(e=r.normalizeQuery(e)),o[t]||(o[t]=[]);for(var a=0;a<o[t].length;a++)if(o[t][a].h===n)return this;r={h:n,query:e,ctx:i||this,callAtLast:n.zrEventfulCallAtLast},e=o[t].length-1,i=o[t][e];return i&&i.callAtLast?o[t].splice(e,0,r):o[t].push(r),this},Gt.prototype.isSilent=function(t){var e=this._$handlers;return!e||!e[t]||!e[t].length},Gt.prototype.off=function(t,e){var n=this._$handlers;if(!n)return this;if(!t)return this._$handlers={},this;if(e){if(n[t]){for(var i=[],o=0,r=n[t].length;o<r;o++)n[t][o].h!==e&&i.push(n[t][o]);n[t]=i}n[t]&&0===n[t].length&&delete n[t]}else delete n[t];return this},Gt.prototype.trigger=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[t],o=this._$eventProcessor;if(i)for(var r=e.length,a=i.length,s=0;s<a;s++){var l=i[s];if(!o||!o.filter||null==l.query||o.filter(t,l.query))switch(r){case 0:l.h.call(l.ctx);break;case 1:l.h.call(l.ctx,e[0]);break;case 2:l.h.call(l.ctx,e[0],e[1]);break;default:l.h.apply(l.ctx,e)}}return o&&o.afterTrigger&&o.afterTrigger(t),this},Gt.prototype.triggerWithContext=function(t){if(!this._$handlers)return this;var e=this._$handlers[t],n=this._$eventProcessor;if(e)for(var i=arguments,o=i.length,r=i[o-1],a=e.length,s=0;s<a;s++){var l=e[s];if(!n||!n.filter||null==l.query||n.filter(t,l.query))switch(o){case 0:l.h.call(r);break;case 1:l.h.call(r,i[0]);break;case 2:l.h.call(r,i[0],i[1]);break;default:l.h.apply(r,i.slice(1,o-1))}}return n&&n.afterTrigger&&n.afterTrigger(t),this},Gt);function Gt(t){t&&(this._$eventProcessor=t)}var Ht=Math.log(2);function Wt(t,e,n,i,o,r){var a=i+"-"+o,s=t.length;if(r.hasOwnProperty(a))return r[a];if(1===e){var l=Math.round(Math.log((1<<s)-1&~o)/Ht);return t[n][l]}for(var u=i|1<<n,h=n+1;i&1<<h;)h++;for(var c=0,p=0,d=0;p<s;p++){var f=1<<p;f&o||(c+=(d%2?-1:1)*t[n][p]*Wt(t,e-1,h,u,o|f,r),d++)}return r[a]=c}function Xt(t,e){var n=[[t[0],t[1],1,0,0,0,-e[0]*t[0],-e[0]*t[1]],[0,0,0,t[0],t[1],1,-e[1]*t[0],-e[1]*t[1]],[t[2],t[3],1,0,0,0,-e[2]*t[2],-e[2]*t[3]],[0,0,0,t[2],t[3],1,-e[3]*t[2],-e[3]*t[3]],[t[4],t[5],1,0,0,0,-e[4]*t[4],-e[4]*t[5]],[0,0,0,t[4],t[5],1,-e[5]*t[4],-e[5]*t[5]],[t[6],t[7],1,0,0,0,-e[6]*t[6],-e[6]*t[7]],[0,0,0,t[6],t[7],1,-e[7]*t[6],-e[7]*t[7]]],i={},o=Wt(n,8,0,0,0,i);if(0!==o){for(var r=[],a=0;a<8;a++)for(var s=0;s<8;s++)null==r[s]&&(r[s]=0),r[s]+=((a+s)%2?-1:1)*Wt(n,7,0===a?1:0,1<<a,1<<s,i)/o*e[a];return function(t,e,n){var i=e*r[6]+n*r[7]+1;t[0]=(e*r[0]+n*r[1]+r[2])/i,t[1]=(e*r[3]+n*r[4]+r[5])/i}}}var Yt="___zrEVENTSAVED",Ut=[];function Zt(t,e,n,i,o){if(e.getBoundingClientRect&&w.domSupported&&!jt(e)){var r=e[Yt]||(e[Yt]={}),o=function(t,e,n){for(var i=n?"invTrans":"trans",o=e[i],r=e.srcCoords,a=[],s=[],l=!0,u=0;u<4;u++){var h=t[u].getBoundingClientRect(),c=2*u,p=h.left,h=h.top;a.push(p,h),l=l&&r&&p===r[c]&&h===r[1+c],s.push(t[u].offsetLeft,t[u].offsetTop)}return l&&o?o:(e.srcCoords=a,e[i]=n?Xt(s,a):Xt(a,s))}(function(t,e){var n=e.markers;if(n)return n;n=e.markers=[];for(var i=["left","right"],o=["top","bottom"],r=0;r<4;r++){var a=document.createElement("div"),s=a.style,l=r%2,u=(r>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[l]+":0",o[u]+":0",i[1-l]+":auto",o[1-u]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}return n}(e,r),r,o);if(o)return o(t,n,i),!0}return!1}function jt(t){return"CANVAS"===t.nodeName.toUpperCase()}var qt="undefined"!=typeof window&&!!window.addEventListener,Kt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,$t=[];function Jt(t,e,n,i){return n=n||{},i||!w.canvasSupported?Qt(t,e,n):w.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):Qt(t,e,n),n}function Qt(t,e,n){if(w.domSupported&&t.getBoundingClientRect){var i=e.clientX,o=e.clientY;if(jt(t)){e=t.getBoundingClientRect();return n.zrX=i-e.left,void(n.zrY=o-e.top)}if(Zt($t,t,i,o))return n.zrX=$t[0],void(n.zrY=$t[1])}n.zrX=n.zrY=0}function te(t){return t||window.event}function ee(t,e,n){if(null!=(e=te(e)).zrX)return e;var i=e.type;i&&0<=i.indexOf("touch")?(i=("touchend"!==i?e.targetTouches:e.changedTouches)[0])&&Jt(t,i,e,n):(Jt(t,e,e,n),o=function(t){var e=t.wheelDelta;if(e)return e;var n=t.deltaX,t=t.deltaY;return null!=n&&null!=t?3*(0!==t?Math.abs(t):Math.abs(n))*(0<t||!(t<0)&&0<n?-1:1):e}(e),e.zrDelta=o?o/120:-(e.detail||0)/3);var o=e.button;return null==e.which&&void 0!==o&&Kt.test(e.type)&&(e.which=1&o?1:2&o?3:4&o?2:0),e}function ne(t,e,n,i){qt?t.addEventListener(e,n,i):t.attachEvent("on"+e,n)}var ie=qt?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};function oe(t){return 2===t.which||3===t.which}var re=(ae.prototype.recognize=function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},ae.prototype.clear=function(){return this._track.length=0,this},ae.prototype._doTrack=function(t,e,n){var i=t.touches;if(i){for(var o={points:[],touches:[],target:e,event:t},r=0,a=i.length;r<a;r++){var s=i[r],l=Jt(n,s,{});o.points.push([l.zrX,l.zrY]),o.touches.push(s)}this._track.push(o)}},ae.prototype._recognize=function(t){for(var e in le)if(le.hasOwnProperty(e)){var n=le[e](this._track,t);if(n)return n}},ae);function ae(){this._track=[]}function se(t){var e=t[1][0]-t[0][0],t=t[1][1]-t[0][1];return Math.sqrt(e*e+t*t)}var le={pinch:function(t,e){var n=t.length;if(n){var i=(t[n-1]||{}).points,n=(t[n-2]||{}).points||i;if(n&&1<n.length&&i&&1<i.length){n=se(i)/se(n);isFinite(n)||(n=1),e.pinchScale=n;i=[((i=i)[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return e.pinchX=i[0],e.pinchY=i[1],{type:"pinch",target:t[0].target,event:e}}}}},ue="silent";function he(){ie(this.event)}var ce,pe=(l(de,ce=Ft),de.prototype.dispose=function(){},de.prototype.setCursor=function(){},de);function de(){var t=null!==ce&&ce.apply(this,arguments)||this;return t.handler=null,t}var fe,ge=function(t,e){this.x=t,this.y=e},ye=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],me=(l(ve,fe=Ft),ve.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(N(ye,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},ve.prototype.mousemove=function(t){var e=t.zrX,n=t.zrY,i=xe(this,e,n),o=this._hovered,r=o.target;r&&!r.__zr&&(r=(o=this.findHover(o.x,o.y)).target);i=this._hovered=i?new ge(e,n):this.findHover(e,n),e=i.target,n=this.proxy;n.setCursor&&n.setCursor(e?e.cursor:"default"),r&&e!==r&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(i,"mousemove",t),e&&e!==r&&this.dispatchToElement(i,"mouseover",t)},ve.prototype.mouseout=function(t){var e=t.zrEventControl,n=t.zrIsToLocalDOM;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&(n||this.trigger("globalout",{type:"globalout",event:t}))},ve.prototype.resize=function(){this._hovered=new ge(0,0)},ve.prototype.dispatch=function(t,e){t=this[t];t&&t.call(this,e)},ve.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},ve.prototype.setCursorStyle=function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},ve.prototype.dispatchToElement=function(t,e,n){var i=(t=t||{}).target;if(!i||!i.silent){for(var o="on"+e,r={type:e,event:n=n,target:(t=t).target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:he};i&&(i[o]&&(r.cancelBubble=!!i[o].call(i,r)),i.trigger(e,r),i=i.__hostTarget||i.parent,!r.cancelBubble););r.cancelBubble||(this.trigger(e,r),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(t){"function"==typeof t[o]&&t[o].call(t,r),t.trigger&&t.trigger(e,r)}))}},ve.prototype.findHover=function(t,e,n){for(var i=this.storage.getDisplayList(),o=new ge(t,e),r=i.length-1;0<=r;r--){var a=void 0;if(i[r]!==n&&!i[r].ignore&&(a=function(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){for(var i=t,o=void 0,r=!1;i;){if(i.ignoreClip&&(r=!0),!r){var a=i.getClipPath();if(a&&!a.contain(e,n))return!1;i.silent&&(o=!0)}a=i.__hostTarget;i=a||i.parent}return!o||ue}return!1}(i[r],t,e))&&(o.topTarget||(o.topTarget=i[r]),a!==ue)){o.target=i[r];break}}return o},ve.prototype.processGesture=function(t,e){this._gestureMgr||(this._gestureMgr=new re);var n=this._gestureMgr;"start"===e&&n.clear();var i=n.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);"end"===e&&n.clear(),i&&(n=i.type,t.gestureEvent=n,(t=new ge).target=i.target,this.dispatchToElement(t,n,i.event))},ve);function ve(t,e,n,i){var o=fe.call(this)||this;return o._hovered=new ge(0,0),o.storage=t,o.painter=e,o.painterRoot=i,n=n||new pe,o.proxy=null,o.setHandlerProxy(n),o._draggingMgr=new Bt(o),o}function xe(t,e,n){t=t.painter;return e<0||e>t.getWidth()||n<0||n>t.getHeight()}function _e(){return[1,0,0,1,0,0]}function be(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function we(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 Se(t,e,n){var i=e[0]*n[0]+e[2]*n[1],o=e[1]*n[0]+e[3]*n[1],r=e[0]*n[2]+e[2]*n[3],a=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],e=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=i,t[1]=o,t[2]=r,t[3]=a,t[4]=s,t[5]=e,t}function Me(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function Ie(t,e,n){var i=e[0],o=e[2],r=e[4],a=e[1],s=e[3],l=e[5],e=Math.sin(n),n=Math.cos(n);return t[0]=i*n+a*e,t[1]=-i*e+a*n,t[2]=o*n+s*e,t[3]=-o*e+n*s,t[4]=n*r+e*l,t[5]=n*l-e*r,t}function Te(t,e,n){var i=n[0],n=n[1];return t[0]=e[0]*i,t[1]=e[1]*n,t[2]=e[2]*i,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*n,t}function Ce(t,e){var n=e[0],i=e[2],o=e[4],r=e[1],a=e[3],s=e[5],e=n*a-r*i;return e?(e=1/e,t[0]=a*e,t[1]=-r*e,t[2]=-i*e,t[3]=n*e,t[4]=(i*s-a*o)*e,t[5]=(r*o-n*s)*e,t):null}function De(t){var e=_e();return we(e,t),e}N(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(a){me.prototype[a]=function(t){var e,n,i=t.zrX,o=t.zrY,r=xe(this,i,o);if("mouseup"===a&&r||(n=(e=this.findHover(i,o)).target),"mousedown"===a)this._downEl=n,this._downPoint=[t.zrX,t.zrY],this._upEl=n;else if("mouseup"===a)this._upEl=n;else if("click"===a){if(this._downEl!==this._upEl||!this._downPoint||4<At(this._downPoint,[t.zrX,t.zrY]))return;this._downPoint=null}this.dispatchToElement(e,a,t)}});var Ae=Object.freeze({__proto__:null,create:_e,identity:be,copy:we,mul:Se,translate:Me,rotate:Ie,scale:Te,invert:Ce,clone:De}),Le=be;function ke(t){return 5e-5<t||t<-5e-5}var Pe=[],Oe=[],Re=_e(),Ne=Math.abs,Ee=(ze.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},ze.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},ze.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},ze.prototype.needLocalTransform=function(){return ke(this.rotation)||ke(this.x)||ke(this.y)||ke(this.scaleX-1)||ke(this.scaleY-1)},ze.prototype.updateTransform=function(){var t=this.parent,e=t&&t.transform,n=this.needLocalTransform(),i=this.transform;n||e?(i=i||_e(),n?this.getLocalTransform(i):Le(i),e&&(n?Se(i,t.transform,i):we(i,t.transform)),this.transform=i,this._resolveGlobalScaleRatio(i)):i&&Le(i)},ze.prototype._resolveGlobalScaleRatio=function(t){var e,n,i=this.globalScaleRatio;null!=i&&1!==i&&(this.getGlobalScale(Pe),e=((Pe[0]-(n=Pe[0]<0?-1:1))*i+n)/Pe[0]||0,n=((Pe[1]-(n=Pe[1]<0?-1:1))*i+n)/Pe[1]||0,t[0]*=e,t[1]*=e,t[2]*=n,t[3]*=n),this.invTransform=this.invTransform||_e(),Ce(this.invTransform,t)},ze.prototype.getLocalTransform=function(t){return ze.getLocalTransform(this,t)},ze.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},ze.prototype.setLocalTransform=function(t){var e,n;t&&(e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],ke(e-1)&&(e=Math.sqrt(e)),ke(n-1)&&(n=Math.sqrt(n)),t[0]<0&&(e=-e),t[3]<0&&(n=-n),this.rotation=Math.atan2(-t[1]/n,t[0]/e),e<0&&n<0&&(this.rotation+=Math.PI,e=-e,n=-n),this.x=t[4],this.y=t[5],this.scaleX=e,this.scaleY=n)},ze.prototype.decomposeTransform=function(){var t,e,n;this.transform&&(n=this.parent,t=this.transform,n&&n.transform&&(Se(Oe,n.invTransform,t),t=Oe),e=this.originX,n=this.originY,(e||n)&&(Re[4]=e,Re[5]=n,Se(Oe,t,Re),Oe[4]-=e,Oe[5]-=n,t=Oe),this.setLocalTransform(t))},ze.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1])):(t[0]=1,t[1]=1),t},ze.prototype.transformCoordToLocal=function(t,e){t=[t,e],e=this.invTransform;return e&&Ot(t,t,e),t},ze.prototype.transformCoordToGlobal=function(t,e){t=[t,e],e=this.transform;return e&&Ot(t,t,e),t},ze.prototype.getLineScale=function(){var t=this.transform;return t&&1e-10<Ne(t[0]-1)&&1e-10<Ne(t[3]-1)?Math.sqrt(Ne(t[0]*t[3]-t[2]*t[1])):1},ze.getLocalTransform=function(t,e){Le(e=e||[]);var n=t.originX||0,i=t.originY||0,o=t.scaleX,r=t.scaleY,a=t.rotation||0,s=t.x,t=t.y;return e[4]-=n,e[5]-=i,e[0]*=o,e[1]*=r,e[2]*=o,e[3]*=r,e[4]*=o,e[5]*=r,a&&Ie(e,e,a),e[4]+=n,e[5]+=i,e[4]+=s,e[5]+=t,e},ze.initDefaultProps=((nd=ze.prototype).x=0,nd.y=0,nd.scaleX=1,nd.scaleY=1,nd.originX=0,nd.originY=0,nd.rotation=0,void(nd.globalScaleRatio=1)),ze);function ze(){}var Be={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1;return 0===t?0:1===t?1:(e=!n||n<1?(n=1,.1):.4*Math.asin(1/n)/(2*Math.PI),-(n*Math.pow(2,10*--t)*Math.sin((t-e)*(2*Math.PI)/.4)))},elasticOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(e=!n||n<1?(n=1,.1):.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(e=!n||n<1?(n=1,.1):.4*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?n*Math.pow(2,10*--t)*Math.sin((t-e)*(2*Math.PI)/.4)*-.5:n*Math.pow(2,-10*--t)*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-Be.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*Be.bounceIn(2*t):.5*Be.bounceOut(2*t-1)+.5}},Ve=(Fe.prototype.step=function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),!this._paused){var n=(t-this._startTime-this._pausedTime)/this._life;n<0&&(n=0),n=Math.min(n,1);var i=this.easing,i="string"==typeof i?Be[i]:i,i="function"==typeof i?i(n):n;if(this.onframe&&this.onframe(i),1===n){if(!this.loop)return!0;this._restart(t),this.onrestart&&this.onrestart()}return!1}this._pausedTime+=e},Fe.prototype._restart=function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0},Fe.prototype.pause=function(){this._paused=!0},Fe.prototype.resume=function(){this._paused=!1},Fe);function Fe(t){this._initialized=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=null!=t.loop&&t.loop,this.gap=t.gap||0,this.easing=t.easing||"linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart}var Ge=function(t){this.value=t},He=(We.prototype.insert=function(t){t=new Ge(t);return this.insertEntry(t),t},We.prototype.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++},We.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},We.prototype.len=function(){return this._len},We.prototype.clear=function(){this.head=this.tail=null,this._len=0},We);function We(){this._len=0}var Xe=(Ye.prototype.put=function(t,e){var n,i,o=this._list,r=this._map,a=null;return null==r[t]&&(i=o.len(),n=this._lastRemovedEntry,i>=this._maxSize&&0<i&&(i=o.head,o.remove(i),delete r[i.key],a=i.value,this._lastRemovedEntry=i),n?n.value=e:n=new Ge(e),n.key=t,o.insertEntry(n),r[t]=n),a},Ye.prototype.get=function(t){var e=this._map[t],t=this._list;if(null!=e)return e!==t.tail&&(t.remove(e),t.insertEntry(e)),e.value},Ye.prototype.clear=function(){this._list.clear(),this._map={}},Ye.prototype.len=function(){return this._list.len()},Ye);function Ye(t){this._list=new He,this._maxSize=10,this._map={},this._maxSize=t}var Ue={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 Ze(t){return(t=Math.round(t))<0?0:255<t?255:t}function je(t){return t<0?0:1<t?1:t}function qe(t){return t.length&&"%"===t.charAt(t.length-1)?Ze(parseFloat(t)/100*255):Ze(parseInt(t,10))}function Ke(t){return t.length&&"%"===t.charAt(t.length-1)?je(parseFloat(t)/100):je(parseFloat(t))}function $e(t,e,n){return n<0?n+=1:1<n&&--n,6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function Je(t,e,n){return t+(e-t)*n}function Qe(t,e,n,i,o){return t[0]=e,t[1]=n,t[2]=i,t[3]=o,t}function tn(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var en=new Xe(20),nn=null;function on(t,e){nn&&tn(nn,e),nn=en.put(t,nn||e.slice())}function rn(t,e){if(t){e=e||[];var n=en.get(t);if(n)return tn(e,n);var i=(t+="").replace(/ /g,"").toLowerCase();if(i in Ue)return tn(e,Ue[i]),on(t,e),e;var o=i.length;if("#"===i.charAt(0))return 4===o||5===o?0<=(r=parseInt(i.slice(1,4),16))&&r<=4095?(Qe(e,(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,5===o?parseInt(i.slice(4),16)/15:1),on(t,e),e):void Qe(e,0,0,0,1):7===o||9===o?0<=(r=parseInt(i.slice(1,7),16))&&r<=16777215?(Qe(e,(16711680&r)>>16,(65280&r)>>8,255&r,9===o?parseInt(i.slice(7),16)/255:1),on(t,e),e):void Qe(e,0,0,0,1):void 0;var n=i.indexOf("("),r=i.indexOf(")");if(-1!==n&&r+1===o){o=i.substr(0,n),r=i.substr(n+1,r-(n+1)).split(","),n=1;switch(o){case"rgba":if(4!==r.length)return 3===r.length?Qe(e,+r[0],+r[1],+r[2],1):Qe(e,0,0,0,1);n=Ke(r.pop());case"rgb":return 3!==r.length?void Qe(e,0,0,0,1):(Qe(e,qe(r[0]),qe(r[1]),qe(r[2]),n),on(t,e),e);case"hsla":return 4!==r.length?void Qe(e,0,0,0,1):(r[3]=Ke(r[3]),an(r,e),on(t,e),e);case"hsl":return 3!==r.length?void Qe(e,0,0,0,1):(an(r,e),on(t,e),e);default:return}}Qe(e,0,0,0,1)}}function an(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=Ke(t[1]),o=Ke(t[2]),i=o<=.5?o*(i+1):o+i-o*i,o=2*o-i;return Qe(e=e||[],Ze(255*$e(o,i,n+1/3)),Ze(255*$e(o,i,n)),Ze(255*$e(o,i,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function sn(t,e){var n=rn(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,255<n[i]?n[i]=255:n[i]<0&&(n[i]=0);return dn(n,4===n.length?"rgba":"rgb")}}function ln(t){t=rn(t);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)}function un(t,e,n){if(e&&e.length&&0<=t&&t<=1){n=n||[];var i=t*(e.length-1),o=Math.floor(i),r=Math.ceil(i),t=e[o],r=e[r],o=i-o;return n[0]=Ze(Je(t[0],r[0],o)),n[1]=Ze(Je(t[1],r[1],o)),n[2]=Ze(Je(t[2],r[2],o)),n[3]=je(Je(t[3],r[3],o)),n}}function hn(t,e,n){if(e&&e.length&&0<=t&&t<=1){var i=t*(e.length-1),o=Math.floor(i),r=Math.ceil(i),a=rn(e[o]),t=rn(e[r]),e=i-o,e=dn([Ze(Je(a[0],t[0],e)),Ze(Je(a[1],t[1],e)),Ze(Je(a[2],t[2],e)),je(Je(a[3],t[3],e))],"rgba");return n?{color:e,leftIndex:o,rightIndex:r,value:i}:e}}function cn(t,e,n,i){var o=rn(t);if(t)return o=function(t){if(t){var e,n,i,o=t[0]/255,r=t[1]/255,a=t[2]/255,s=Math.min(o,r,a),l=Math.max(o,r,a),u=l-s,h=(l+s)/2;0==u?n=e=0:(n=h<.5?u/(l+s):u/(2-l-s),i=((l-o)/6+u/2)/u,s=((l-r)/6+u/2)/u,u=((l-a)/6+u/2)/u,o===l?e=u-s:r===l?e=1/3+i-u:a===l&&(e=2/3+s-i),e<0&&(e+=1),1<e&&--e);h=[360*e,n,h];return null!=t[3]&&h.push(t[3]),h}}(o),null!=e&&(o[0]=(e=e,(e=Math.round(e))<0?0:360<e?360:e)),null!=n&&(o[1]=Ke(n)),null!=i&&(o[2]=Ke(i)),dn(an(o),"rgba")}function pn(t,e){t=rn(t);if(t&&null!=e)return t[3]=je(e),dn(t,"rgba")}function dn(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}}function fn(t,e){t=rn(t);return t?(.299*t[0]+.587*t[1]+.114*t[2])*t[3]/255+(1-t[3])*e:0}var gn=Object.freeze({__proto__:null,parse:rn,lift:sn,toHex:ln,fastLerp:un,fastMapToColor:un,lerp:hn,mapToColor:hn,modifyHSL:cn,modifyAlpha:pn,stringify:dn,lum:fn,random:function(){return"rgb("+Math.round(255*Math.random())+","+Math.round(255*Math.random())+","+Math.round(255*Math.random())+")"}}),yn=Array.prototype.slice;function mn(t,e,n){return(e-t)*n+t}function vn(t,e,n,i){for(var o=e.length,r=0;r<o;r++)t[r]=mn(e[r],n[r],i)}function xn(t,e,n,i){for(var o=e.length,r=0;r<o;r++)t[r]=e[r]+n[r]*i;return t}function _n(t,e,n,i){for(var o=e.length,r=o&&e[0].length,a=0;a<o;a++){t[a]||(t[a]=[]);for(var s=0;s<r;s++)t[a][s]=e[a][s]+n[a][s]*i}return t}function bn(t,e){var n=t.length;if(n===e.length){for(var i=0;i<n;i++)if(t[i]!==e[i])return;return 1}}function wn(t,e,n,i,o,r,a){t=.5*(n-t),i=.5*(i-e);return(2*(e-n)+t+i)*a+(-3*(e-n)-2*t-i)*r+t*o+e}function Sn(t,e,n,i,o,r,a,s){for(var l=e.length,u=0;u<l;u++)t[u]=wn(e[u],n[u],i[u],o[u],r,a,s)}function Mn(t){if(k(t)){var e=t.length;if(k(t[0])){for(var n=[],i=0;i<e;i++)n.push(yn.call(t[i]));return n}return yn.call(t)}return t}function In(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}var Tn=[0,0,0,0],Cn=(Dn.prototype.isFinished=function(){return this._finished},Dn.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},Dn.prototype.needsAnimate=function(){return!this._isAllValueEqual&&2<=this.keyframes.length&&this.interpolable},Dn.prototype.getAdditiveTrack=function(){return this._additiveTrack},Dn.prototype.addKeyframe=function(t,e){t>=this.maxTime?this.maxTime=t:this._needsSort=!0;var n=this.keyframes,i=n.length;if(this.interpolable)if(k(e)){var o,r=k((r=e)&&r[0])?2:1;if(0<i&&this.arrDim!==r)return void(this.interpolable=!1);if(1==r&&"number"!=typeof e[0]||2==r&&"number"!=typeof e[0][0])return void(this.interpolable=!1);0<i&&(o=n[i-1],this._isAllValueEqual&&(1==r&&bn(e,o.value)||(this._isAllValueEqual=!1))),this.arrDim=r}else{if(0<this.arrDim)return void(this.interpolable=!1);if("string"==typeof e){r=rn(e);r?(e=r,this.isValueColor=!0):this.interpolable=!1}else if("number"!=typeof e)return void(this.interpolable=!1);this._isAllValueEqual&&0<i&&(o=n[i-1],(this.isValueColor&&!bn(o.value,e)||o.value!==e)&&(this._isAllValueEqual=!1))}e={time:t,value:e,percent:0};return this.keyframes.push(e),e},Dn.prototype.prepare=function(t){var e=this.keyframes;this._needsSort&&e.sort(function(t,e){return t.time-e.time});for(var n=this.arrDim,i=e.length,o=e[i-1],r=0;r<i;r++)e[r].percent=e[r].time/this.maxTime,0<n&&r!==i-1&&function(t,e,n){var i=t,o=e;if(i.push&&o.push){var e=i.length,r=o.length;if(e!==r)if(r<e)i.length=r;else for(var a=e;a<r;a++)i.push(1===n?o[a]:yn.call(o[a]));for(var s=i[0]&&i[0].length,a=0;a<i.length;a++)if(1===n)isNaN(i[a])&&(i[a]=o[a]);else for(var l=0;l<s;l++)isNaN(i[a][l])&&(i[a][l]=o[a][l])}}(e[r].value,o.value,n);if(t&&this.needsAnimate()&&t.needsAnimate()&&n===t.arrDim&&this.isValueColor===t.isValueColor&&!t._finished){this._additiveTrack=t;for(var a=e[0].value,r=0;r<i;r++)0===n?this.isValueColor?e[r].additiveValue=xn([],e[r].value,a,-1):e[r].additiveValue=e[r].value-a:1===n?e[r].additiveValue=xn([],e[r].value,a,-1):2===n&&(e[r].additiveValue=_n([],e[r].value,a,-1))}},Dn.prototype.step=function(t,e){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=null!=this._additiveTrack,i=n?"additiveValue":"value",o=this.keyframes,r=this.keyframes.length,a=this.propName,s=this.arrDim,l=this.isValueColor;if(e<0)u=0;else if(e<this._lastFramePercent){for(var u=Math.min(this._lastFrame+1,r-1);0<=u&&!(o[u].percent<=e);u--);u=Math.min(u,r-2)}else{for(u=this._lastFrame;u<r&&!(o[u].percent>e);u++);u=Math.min(u-1,r-2)}var h,c,p,d,f,g,y,m=o[u+1],v=o[u];v&&m&&(this._lastFrame=u,this._lastFramePercent=e,0!=(g=m.percent-v.percent)&&(h=(e-v.percent)/g,c=n?this._additiveValue:l?Tn:t[a],(0<s||l)&&!c&&(c=this._additiveValue=[]),this.useSpline?(p=o[u][i],d=o[0===u?u:u-1][i],f=o[r-2<u?r-1:u+1][i],g=o[r-3<u?r-1:u+2][i],0<s?(1===s?Sn:function(t,e,n,i,o,r,a,s){for(var l=e.length,u=e[0].length,h=0;h<l;h++){t[h]||(t[1]=[]);for(var c=0;c<u;c++)t[h][c]=wn(e[h][c],n[h][c],i[h][c],o[h][c],r,a,s)}})(c,d,p,f,g,h,h*h,h*h*h):l?(Sn(c,d,p,f,g,h,h*h,h*h*h),n||(t[a]=In(c))):(y=void 0,y=this.interpolable?wn(d,p,f,g,h,h*h,h*h*h):f,n?this._additiveValue=y:t[a]=y)):0<s?(1===s?vn:function(t,e,n,i){for(var o=e.length,r=o&&e[0].length,a=0;a<o;a++){t[a]||(t[a]=[]);for(var s=0;s<r;s++)t[a][s]=mn(e[a][s],n[a][s],i)}})(c,v[i],m[i],h):l?(vn(c,v[i],m[i],h),n||(t[a]=In(c))):(y=void 0,y=this.interpolable?mn(v[i],m[i],h):(v=v[i],i=m[i],.5<h?i:v),n?this._additiveValue=y:t[a]=y),n&&this._addToTarget(t)))}},Dn.prototype._addToTarget=function(t){var e=this.arrDim,n=this.propName,i=this._additiveValue;0===e?this.isValueColor?(rn(t[n],Tn),xn(Tn,Tn,i,1),t[n]=In(Tn)):t[n]=t[n]+i:1===e?xn(t[n],t[n],i,1):2===e&&_n(t[n],t[n],i,1)},Dn);function Dn(t){this.keyframes=[],this.maxTime=0,this.arrDim=0,this.interpolable=!0,this._needsSort=!1,this._isAllValueEqual=!0,this._lastFrame=0,this._lastFramePercent=0,this.propName=t}var An=(Ln.prototype.getTarget=function(){return this._target},Ln.prototype.changeTarget=function(t){this._target=t},Ln.prototype.when=function(t,e){return this.whenWithKeys(t,e,z(e))},Ln.prototype.whenWithKeys=function(t,e,n){for(var i=this._tracks,o=0;o<n.length;o++){var r=n[o],a=i[r];if(!a){a=i[r]=new Cn(r);var s,l=void 0,u=this._getAdditiveTrack(r);if(u?(l=(s=u.keyframes[u.keyframes.length-1])&&s.value,u.isValueColor&&l&&(l=In(l))):l=this._target[r],null==l)continue;0!==t&&a.addKeyframe(0,Mn(l)),this._trackKeys.push(r)}a.addKeyframe(t,Mn(e[r]))}return this._maxTime=Math.max(this._maxTime,t),this},Ln.prototype.pause=function(){this._clip.pause(),this._paused=!0},Ln.prototype.resume=function(){this._clip.resume(),this._paused=!1},Ln.prototype.isPaused=function(){return!!this._paused},Ln.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneList;if(t)for(var e=t.length,n=0;n<e;n++)t[n].call(this)},Ln.prototype._abortedCallback=function(){this._setTracksFinished();var t=this.animation,e=this._abortedList;if(t&&t.removeClip(this._clip),this._clip=null,e)for(var n=0;n<e.length;n++)e[n].call(this)},Ln.prototype._setTracksFinished=function(){for(var t=this._tracks,e=this._trackKeys,n=0;n<e.length;n++)t[e[n]].setFinished()},Ln.prototype._getAdditiveTrack=function(t){var e,n=this._additiveAnimators;if(n)for(var i=0;i<n.length;i++){var o=n[i].getTrack(t);o&&(e=o)}return e},Ln.prototype.start=function(t,e){if(!(0<this._started)){this._started=1;for(var r=this,a=[],n=0;n<this._trackKeys.length;n++){var i=this._trackKeys[n],o=this._tracks[i],s=this._getAdditiveTrack(i),i=o.keyframes;o.prepare(s),o.needsAnimate()?a.push(o):o.interpolable||(i=i[i.length-1])&&(r._target[o.propName]=i.value)}return a.length||e?(e=new Ve({life:this._maxTime,loop:this._loop,delay:this._delay,onframe:function(t){r._started=2;var e=r._additiveAnimators;if(e){for(var n=!1,i=0;i<e.length;i++)if(e[i]._clip){n=!0;break}n||(r._additiveAnimators=null)}for(i=0;i<a.length;i++)a[i].step(r._target,t);var o=r._onframeList;if(o)for(i=0;i<o.length;i++)o[i](r._target,t)},ondestroy:function(){r._doneCallback()}}),this._clip=e,this.animation&&this.animation.addClip(e),t&&"spline"!==t&&(e.easing=t)):this._doneCallback(),this}},Ln.prototype.stop=function(t){var e;this._clip&&(e=this._clip,t&&e.onframe(1),this._abortedCallback())},Ln.prototype.delay=function(t){return this._delay=t,this},Ln.prototype.during=function(t){return t&&(this._onframeList||(this._onframeList=[]),this._onframeList.push(t)),this},Ln.prototype.done=function(t){return t&&(this._doneList||(this._doneList=[]),this._doneList.push(t)),this},Ln.prototype.aborted=function(t){return t&&(this._abortedList||(this._abortedList=[]),this._abortedList.push(t)),this},Ln.prototype.getClip=function(){return this._clip},Ln.prototype.getTrack=function(t){return this._tracks[t]},Ln.prototype.stopTracks=function(t,e){if(!t.length||!this._clip)return!0;for(var n=this._tracks,i=this._trackKeys,o=0;o<t.length;o++){var r=n[t[o]];r&&(e?r.step(this._target,1):1===this._started&&r.step(this._target,0),r.setFinished())}for(var a=!0,o=0;o<i.length;o++)if(!n[i[o]].isFinished()){a=!1;break}return a&&this._abortedCallback(),a},Ln.prototype.saveFinalToTarget=function(t,e){if(t){e=e||this._trackKeys;for(var n=0;n<e.length;n++){var i,o=e[n],r=this._tracks[o];r&&!r.isFinished()&&((i=(i=r.keyframes)[i.length-1])&&(i=Mn(i.value),r.isValueColor&&(i=In(i)),t[o]=i))}}},Ln.prototype.__changeFinalValue=function(t,e){e=e||z(t);for(var n=0;n<e.length;n++){var i,o=e[n],r=this._tracks[o];r&&(1<(i=r.keyframes).length&&(i=i.pop(),r.addKeyframe(i.time,t[o]),r.prepare(r.getAdditiveTrack())))}},Ln);function Ln(t,e,n){this._tracks={},this._trackKeys=[],this._delay=0,this._maxTime=0,this._paused=!1,this._started=0,this._clip=null,this._target=t,(this._loop=e)?_("Can' use additive animation on looped animation."):this._additiveAnimators=n}var kn=(Pn.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},Pn.prototype.clone=function(){return new Pn(this.x,this.y)},Pn.prototype.set=function(t,e){return this.x=t,this.y=e,this},Pn.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},Pn.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},Pn.prototype.scale=function(t){this.x*=t,this.y*=t},Pn.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},Pn.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},Pn.prototype.dot=function(t){return this.x*t.x+this.y*t.y},Pn.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},Pn.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},Pn.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},Pn.prototype.distance=function(t){var e=this.x-t.x,t=this.y-t.y;return Math.sqrt(e*e+t*t)},Pn.prototype.distanceSquare=function(t){var e=this.x-t.x,t=this.y-t.y;return e*e+t*t},Pn.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},Pn.prototype.transform=function(t){if(t){var e=this.x,n=this.y;return this.x=t[0]*e+t[2]*n+t[4],this.y=t[1]*e+t[3]*n+t[5],this}},Pn.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},Pn.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},Pn.set=function(t,e,n){t.x=e,t.y=n},Pn.copy=function(t,e){t.x=e.x,t.y=e.y},Pn.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},Pn.lenSquare=function(t){return t.x*t.x+t.y*t.y},Pn.dot=function(t,e){return t.x*e.x+t.y*e.y},Pn.add=function(t,e,n){t.x=e.x+n.x,t.y=e.y+n.y},Pn.sub=function(t,e,n){t.x=e.x-n.x,t.y=e.y-n.y},Pn.scale=function(t,e,n){t.x=e.x*n,t.y=e.y*n},Pn.scaleAndAdd=function(t,e,n,i){t.x=e.x+n.x*i,t.y=e.y+n.y*i},Pn.lerp=function(t,e,n,i){var o=1-i;t.x=o*e.x+i*n.x,t.y=o*e.y+i*n.y},Pn);function Pn(t,e){this.x=t||0,this.y=e||0}var On=Math.min,Rn=Math.max,Nn=new kn,En=new kn,zn=new kn,Bn=new kn,Vn=new kn,Fn=new kn,Gn=(Hn.prototype.union=function(t){var e=On(t.x,this.x),n=On(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Rn(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=Rn(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=e,this.y=n},Hn.prototype.applyTransform=function(t){Hn.applyTransform(this,this,t)},Hn.prototype.calculateTransform=function(t){var e=t.width/this.width,n=t.height/this.height,i=_e();return Me(i,i,[-this.x,-this.y]),Te(i,i,[e,n]),Me(i,i,[t.x,t.y]),i},Hn.prototype.intersect=function(t,e){if(!t)return!1;t instanceof Hn||(t=Hn.create(t));var n,i,o,r,a,s,l,u=this.x,h=this.x+this.width,c=this.y,p=this.y+this.height,d=t.x,f=t.x+t.width,g=t.y,y=t.y+t.height,m=!(h<d||f<u||p<g||y<c);return e&&(n=1/0,i=0,o=Math.abs(h-d),r=Math.abs(f-u),a=Math.abs(p-g),s=Math.abs(y-c),l=Math.min(o,r),t=Math.min(a,s),h<d||f<u?i<l&&(i=l,o<r?kn.set(Fn,-o,0):kn.set(Fn,r,0)):l<n&&(n=l,o<r?kn.set(Vn,o,0):kn.set(Vn,-r,0)),p<g||y<c?i<t&&(i=t,a<s?kn.set(Fn,0,-a):kn.set(Fn,0,s)):l<n&&(n=l,a<s?kn.set(Vn,0,a):kn.set(Vn,0,-s))),e&&kn.copy(e,m?Vn:Fn),m},Hn.prototype.contain=function(t,e){return t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height},Hn.prototype.clone=function(){return new Hn(this.x,this.y,this.width,this.height)},Hn.prototype.copy=function(t){Hn.copy(this,t)},Hn.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},Hn.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Hn.prototype.isZero=function(){return 0===this.width||0===this.height},Hn.create=function(t){return new Hn(t.x,t.y,t.width,t.height)},Hn.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},Hn.applyTransform=function(t,e,n){if(n){if(n[1]<1e-5&&-1e-5<n[1]&&n[2]<1e-5&&-1e-5<n[2]){var i=n[0],o=n[3],r=n[4],a=n[5];return t.x=e.x*i+r,t.y=e.y*o+a,t.width=e.width*i,t.height=e.height*o,t.width<0&&(t.x+=t.width,t.width=-t.width),void(t.height<0&&(t.y+=t.height,t.height=-t.height))}Nn.x=zn.x=e.x,Nn.y=Bn.y=e.y,En.x=Bn.x=e.x+e.width,En.y=zn.y=e.y+e.height,Nn.transform(n),Bn.transform(n),En.transform(n),zn.transform(n),t.x=On(Nn.x,En.x,zn.x,Bn.x),t.y=On(Nn.y,En.y,zn.y,Bn.y);o=Rn(Nn.x,En.x,zn.x,Bn.x),n=Rn(Nn.y,En.y,zn.y,Bn.y);t.width=o-t.x,t.height=n-t.y}else t!==e&&Hn.copy(t,e)},Hn);function Hn(t,e,n,i){n<0&&isFinite(n)&&(t+=n,n=-n),i<0&&isFinite(i)&&(e+=i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}var Wn,Xn,Yn={},Un="12px sans-serif";var Zn={measureText:function(t,e){return Wn=Wn||D().getContext("2d"),Xn!==e&&(Xn=Wn.font=e||Un),Wn.measureText(t)}};function jn(t,e){var n=Yn[e=e||Un],i=(n=n||(Yn[e]=new Xe(500))).get(t);return null==i&&(i=Zn.measureText(t,e).width,n.put(t,i)),i}function qn(t,e,n,i){t=jn(t,e),e=Qn(e),n=$n(0,t,n),i=Jn(0,e,i);return new Gn(n,i,t,e)}function Kn(t,e,n,i){var o=((t||"")+"").split("\n");if(1===o.length)return qn(o[0],e,n,i);for(var r=new Gn(0,0,0,0),a=0;a<o.length;a++){var s=qn(o[a],e,n,i);0===a?r.copy(s):r.union(s)}return r}function $n(t,e,n){return"right"===n?t-=e:"center"===n&&(t-=e/2),t}function Jn(t,e,n){return"middle"===n?t-=e/2:"bottom"===n&&(t-=e),t}function Qn(t){return jn("国",t)}function ti(t,e){return"string"==typeof t?0<=t.lastIndexOf("%")?parseFloat(t)/100*e:parseFloat(t):t}function ei(t,e,n){var i=e.position||"inside",o=null!=e.distance?e.distance:5,r=n.height,a=n.width,s=r/2,l=n.x,u=n.y,h="left",e="top";if(i instanceof Array)l+=ti(i[0],n.width),u+=ti(i[1],n.height),e=h=null;else switch(i){case"left":l-=o,u+=s,h="right",e="middle";break;case"right":l+=o+a,u+=s,e="middle";break;case"top":l+=a/2,u-=o,h="center",e="bottom";break;case"bottom":l+=a/2,u+=r+o,h="center";break;case"inside":l+=a/2,u+=s,h="center",e="middle";break;case"insideLeft":l+=o,u+=s,e="middle";break;case"insideRight":l+=a-o,u+=s,h="right",e="middle";break;case"insideTop":l+=a/2,u+=o,h="center";break;case"insideBottom":l+=a/2,u+=r-o,h="center",e="bottom";break;case"insideTopLeft":l+=o,u+=o;break;case"insideTopRight":l+=a-o,u+=o,h="right";break;case"insideBottomLeft":l+=o,u+=r-o,e="bottom";break;case"insideBottomRight":l+=a-o,u+=r-o,h="right",e="bottom"}return(t=t||{}).x=l,t.y=u,t.align=h,t.verticalAlign=e,t}var ni=1;"undefined"!=typeof window&&(ni=Math.max(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var ii=ni,oi="#333",ri="#ccc",ai="__zr_normal__",si=["x","y","scaleX","scaleY","originX","originY","rotation","ignore"],li={x:!0,y:!0,scaleX:!0,scaleY:!0,originX:!0,originY:!0,rotation:!0,ignore:!1},ui={},hi=new Gn(0,0,0,0),ci=(pi.prototype._init=function(t){this.attr(t)},pi.prototype.drift=function(t,e,n){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;(i=i||(this.transform=[1,0,0,1,0,0]))[4]+=t,i[5]+=e,this.decomposeTransform(),this.markRedraw()},pi.prototype.beforeUpdate=function(){},pi.prototype.afterUpdate=function(){},pi.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},pi.prototype.updateInnerText=function(t){var e,n,i,o,r,a,s,l,u,h,c=this._textContent;!c||c.ignore&&!t||(this.textConfig||(this.textConfig={}),a=(e=this.textConfig).local,i=n=void 0,o=!1,(u=c.attachedTransform).parent=a?this:null,l=!1,u.x=c.x,u.y=c.y,u.originX=c.originX,u.originY=c.originY,u.rotation=c.rotation,u.scaleX=c.scaleX,u.scaleY=c.scaleY,null!=e.position&&(s=hi,e.layoutRect?s.copy(e.layoutRect):s.copy(this.getBoundingRect()),a||s.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(ui,e,s):ei(ui,e,s),u.x=ui.x,u.y=ui.y,n=ui.align,i=ui.verticalAlign,(r=e.origin)&&null!=e.rotation&&(h=t=void 0,h="center"===r?(t=.5*s.width,.5*s.height):(t=ti(r[0],s.width),ti(r[1],s.height)),l=!0,u.originX=-u.x+t+(a?0:s.x),u.originY=-u.y+h+(a?0:s.y))),null!=e.rotation&&(u.rotation=e.rotation),(h=e.offset)&&(u.x+=h[0],u.y+=h[1],l||(u.originX=-h[0],u.originY=-h[1])),a=null==e.inside?"string"==typeof e.position&&0<=e.position.indexOf("inside"):e.inside,s=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),h=u=l=void 0,a&&this.canBeInsideText()?(l=e.insideFill,u=e.insideStroke,null!=l&&"auto"!==l||(l=this.getInsideTextFill()),null!=u&&"auto"!==u||(u=this.getInsideTextStroke(l),h=!0)):(l=e.outsideFill,u=e.outsideStroke,null!=l&&"auto"!==l||(l=this.getOutsideFill()),null!=u&&"auto"!==u||(u=this.getOutsideStroke(l),h=!0)),(l=l||"#000")===s.fill&&u===s.stroke&&h===s.autoStroke&&n===s.align&&i===s.verticalAlign||(o=!0,s.fill=l,s.stroke=u,s.autoStroke=h,s.align=n,s.verticalAlign=i,c.setDefaultTextStyle(s)),o&&c.dirtyStyle(),c.markRedraw())},pi.prototype.canBeInsideText=function(){return!0},pi.prototype.getInsideTextFill=function(){return"#fff"},pi.prototype.getInsideTextStroke=function(t){return"#000"},pi.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?ri:oi},pi.prototype.getOutsideStroke=function(t){for(var e=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof e&&rn(e),i=(n=n||[255,255,255,1])[3],o=this.__zr.isDarkMode(),r=0;r<3;r++)n[r]=n[r]*i+(o?0:255)*(1-i);return n[3]=1,dn(n,"rgba")},pi.prototype.traverse=function(t,e){},pi.prototype.attrKV=function(t,e){"textConfig"===t?this.setTextConfig(e):"textContent"===t?this.setTextContent(e):"clipPath"===t?this.setClipPath(e):"extra"===t?(this.extra=this.extra||{},O(this.extra,e)):this[t]=e},pi.prototype.hide=function(){this.ignore=!0,this.markRedraw()},pi.prototype.show=function(){this.ignore=!1,this.markRedraw()},pi.prototype.attr=function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(Y(t))for(var n=z(t),i=0;i<n.length;i++){var o=n[i];this.attrKV(o,t[o])}return this.markRedraw(),this},pi.prototype.saveCurrentToNormalState=function(t){this._innerSaveToNormal(t);for(var e=this._normalState,n=0;n<this.animators.length;n++){var i=this.animators[n],o=i.__fromStateTransition;o&&o!==ai||(o=(o=i.targetName)?e[o]:e,i.saveFinalToTarget(o))}},pi.prototype._innerSaveToNormal=function(t){var e=(e=this._normalState)||(this._normalState={});t.textConfig&&!e.textConfig&&(e.textConfig=this.textConfig),this._savePrimaryToNormal(t,e,si)},pi.prototype._savePrimaryToNormal=function(t,e,n){for(var i=0;i<n.length;i++){var o=n[i];null==t[o]||o in e||(e[o]=this[o])}},pi.prototype.hasState=function(){return 0<this.currentStates.length},pi.prototype.getState=function(t){return this.states[t]},pi.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},pi.prototype.clearStates=function(t){this.useState(ai,!1,t)},pi.prototype.useState=function(t,e,n){var i=t===ai;if(this.hasState()||!i){var o,r=this.currentStates,a=this.stateTransition;if(!(0<=L(r,t))||!e&&1!==r.length){if(this.stateProxy&&!i&&(o=this.stateProxy(t)),(o=o||this.states&&this.states[t])||i){i||this.saveCurrentToNormalState(o);r=!(!o||!o.hoverLayer);return r&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,o,this._normalState,e,!n&&!this.__inHover&&a&&0<a.duration,a),this._textContent&&this._textContent.useState(t,e),this._textGuide&&this._textGuide.useState(t,e),i?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!r&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~pi.REDARAW_BIT),o}_("State "+t+" not exists.")}}},pi.prototype.useStates=function(t,e){if(t.length){var n=[],i=this.currentStates,o=t.length,r=o===i.length;if(r)for(var a=0;a<o;a++)if(t[a]!==i[a]){r=!1;break}if(!r){for(a=0;a<o;a++){var s=t[a],l=void 0;this.stateProxy&&(l=this.stateProxy(s,t)),(l=l||this.states[s])&&n.push(l)}var u=!(!n[o-1]||!n[o-1].hoverLayer);u&&this._toggleHoverLayerFlag(!0);var h=this._mergeStates(n),c=this.stateTransition;this.saveCurrentToNormalState(h),this._applyStateObj(t.join(","),h,this._normalState,!1,!e&&!this.__inHover&&c&&0<c.duration,c),this._textContent&&this._textContent.useStates(t),this._textGuide&&this._textGuide.useStates(t),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!u&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~pi.REDARAW_BIT)}}else this.clearStates()},pi.prototype._updateAnimationTargets=function(){for(var t=0;t<this.animators.length;t++){var e=this.animators[t];e.targetName&&e.changeTarget(this[e.targetName])}},pi.prototype.removeState=function(t){var e=L(this.currentStates,t);0<=e&&((t=this.currentStates.slice()).splice(e,1),this.useStates(t))},pi.prototype.replaceState=function(t,e,n){var i=this.currentStates.slice(),o=L(i,t),t=0<=L(i,e);0<=o?t?i.splice(o,1):i[o]=e:n&&!t&&i.push(e),this.useStates(i)},pi.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},pi.prototype._mergeStates=function(t){for(var e,n={},i=0;i<t.length;i++){var o=t[i];O(n,o),o.textConfig&&O(e=e||{},o.textConfig)}return e&&(n.textConfig=e),n},pi.prototype._applyStateObj=function(t,e,n,i,o,r){var a=!(e&&i);e&&e.textConfig?(this.textConfig=O({},(i?this:n).textConfig),O(this.textConfig,e.textConfig)):a&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},l=!1,u=0;u<si.length;u++){var h=si[u],c=o&&li[h];e&&null!=e[h]?c?(l=!0,s[h]=e[h]):this[h]=e[h]:a&&null!=n[h]&&(c?(l=!0,s[h]=n[h]):this[h]=n[h])}if(!o)for(u=0;u<this.animators.length;u++){var p=this.animators[u],d=p.targetName;p.__changeFinalValue(d?(e||n)[d]:e||n)}l&&this._transitionState(t,s,r)},pi.prototype._attachComponent=function(t){if(t.__zr&&!t.__hostTarget)throw new Error("Text element has been added to zrender.");if(t===this)throw new Error("Recursive component attachment.");var e=this.__zr;e&&t.addSelfToZr(e),t.__zr=e,t.__hostTarget=this},pi.prototype._detachComponent=function(t){t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__hostTarget=null},pi.prototype.getClipPath=function(){return this._clipPath},pi.prototype.setClipPath=function(t){this._clipPath&&this._clipPath!==t&&this.removeClipPath(),this._attachComponent(t),this._clipPath=t,this.markRedraw()},pi.prototype.removeClipPath=function(){var t=this._clipPath;t&&(this._detachComponent(t),this._clipPath=null,this.markRedraw())},pi.prototype.getTextContent=function(){return this._textContent},pi.prototype.setTextContent=function(t){var e=this._textContent;if(e!==t){if(e&&e!==t&&this.removeTextContent(),t.__zr&&!t.__hostTarget)throw new Error("Text element has been added to zrender.");t.attachedTransform=new Ee,this._attachComponent(t),this._textContent=t,this.markRedraw()}},pi.prototype.setTextConfig=function(t){this.textConfig||(this.textConfig={}),O(this.textConfig,t),this.markRedraw()},pi.prototype.removeTextContent=function(){var t=this._textContent;t&&(t.attachedTransform=null,this._detachComponent(t),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},pi.prototype.getTextGuideLine=function(){return this._textGuide},pi.prototype.setTextGuideLine=function(t){this._textGuide&&this._textGuide!==t&&this.removeTextGuideLine(),this._attachComponent(t),this._textGuide=t,this.markRedraw()},pi.prototype.removeTextGuideLine=function(){var t=this._textGuide;t&&(this._detachComponent(t),this._textGuide=null,this.markRedraw())},pi.prototype.markRedraw=function(){this.__dirty|=pi.REDARAW_BIT;var t=this.__zr;t&&(this.__inHover?t.refreshHover():t.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},pi.prototype.dirty=function(){this.markRedraw()},pi.prototype._toggleHoverLayerFlag=function(t){this.__inHover=t;var e=this._textContent,n=this._textGuide;e&&(e.__inHover=t),n&&(n.__inHover=t)},pi.prototype.addSelfToZr=function(t){this.__zr=t;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.addAnimator(e[n]);this._clipPath&&this._clipPath.addSelfToZr(t),this._textContent&&this._textContent.addSelfToZr(t),this._textGuide&&this._textGuide.addSelfToZr(t)},pi.prototype.removeSelfFromZr=function(t){this.__zr=null;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.removeAnimator(e[n]);this._clipPath&&this._clipPath.removeSelfFromZr(t),this._textContent&&this._textContent.removeSelfFromZr(t),this._textGuide&&this._textGuide.removeSelfFromZr(t)},pi.prototype.animate=function(t,e){var n=t?this[t]:this;if(n){e=new An(n,e);return this.addAnimator(e,t),e}_('Property "'+t+'" is not existed in element '+this.id)},pi.prototype.addAnimator=function(n,t){var e=this.__zr,i=this;n.during(function(){i.updateDuringAnimation(t)}).done(function(){var t=i.animators,e=L(t,n);0<=e&&t.splice(e,1)}),this.animators.push(n),e&&e.animation.addAnimator(n),e&&e.wakeUp()},pi.prototype.updateDuringAnimation=function(t){this.markRedraw()},pi.prototype.stopAnimation=function(t,e){for(var n=this.animators,i=n.length,o=[],r=0;r<i;r++){var a=n[r];t&&t!==a.scope?o.push(a):a.stop(e)}return this.animators=o,this},pi.prototype.animateTo=function(t,e,n){di(this,t,e,n)},pi.prototype.animateFrom=function(t,e,n){di(this,t,e,n,!0)},pi.prototype._transitionState=function(t,e,n,i){for(var o=di(this,e,n,i),r=0;r<o.length;r++)o[r].__fromStateTransition=t},pi.prototype.getBoundingRect=function(){return null},pi.prototype.getPaintRect=function(){return null},pi.REDARAW_BIT=1,pi.initDefaultProps=function(){var t=pi.prototype;t.type="element",t.name="",t.ignore=!1,t.silent=!1,t.isGroup=!1,t.draggable=!1,t.dragging=!1,t.ignoreClip=!1,t.__inHover=!1,t.__dirty=pi.REDARAW_BIT;var i={};function a(t,e,n){i[t+e+n]||(console.warn("DEPRECATED: '"+t+"' has been deprecated. use '"+e+"', '"+n+"' instead"),i[t+e+n]=!0)}function e(e,n,i,o){function r(e,t){Object.defineProperty(t,0,{get:function(){return e[i]},set:function(t){e[i]=t}}),Object.defineProperty(t,1,{get:function(){return e[o]},set:function(t){e[o]=t}})}Object.defineProperty(t,e,{get:function(){var t;return a(e,i,o),this[n]||(t=this[n]=[],r(this,t)),this[n]},set:function(t){a(e,i,o),this[i]=t[0],this[o]=t[1],this[n]=t,r(this,t)}})}Object.defineProperty&&(!w.browser.ie||8<w.browser.version)&&(e("position","_legacyPos","x","y"),e("scale","_legacyScale","scaleX","scaleY"),e("origin","_legacyOrigin","originX","originY"))}(),pi);function pi(t){this.id=v++,this.animators=[],this.currentStates=[],this.states={},this._init(t)}function di(t,e,n,i,o){var r=[];!function t(e,n,i,o,r,a,s,l){var u=[];var h=[];var c=z(o);var p=r.duration;var d=r.delay;var f=r.additive;var g=r.setToFinal;var y=!Y(a);for(var m=0;m<c.length;m++){var v=c[m];null!=i[v]&&null!=o[v]&&(y||a[v])?Y(o[v])&&!k(o[v])?n?l||(i[v]=o[v],e.updateDuringAnimation(n)):t(e,v,i[v],o[v],r,a&&a[v],s,l):(u.push(v),h.push(v)):l||(i[v]=o[v],e.updateDuringAnimation(n),h.push(v))}var x=u.length;if(0<x||r.force&&!s.length){for(var _=e.animators,b=[],w=0;w<_.length;w++)_[w].targetName===n&&b.push(_[w]);if(!f&&b.length)for(var w=0;w<b.length;w++){var S=b[w].stopTracks(h);S&&(S=L(_,b[w]),_.splice(S,1))}var M=void 0,I=void 0,T=void 0;if(l){I={},g&&(M={});for(var w=0;w<x;w++){var v=u[w];I[v]=i[v],g?M[v]=o[v]:i[v]=o[v]}}else if(g){T={};for(var w=0;w<x;w++){var v=u[w];T[v]=Mn(i[v]),gi(i,o,v)}}var f=new An(i,!1,f?b:null);f.targetName=n,r.scope&&(f.scope=r.scope),g&&M&&f.whenWithKeys(0,M,u),T&&f.whenWithKeys(0,T,u),f.whenWithKeys(null==p?500:p,l?I:o,u).delay(d||0),e.addAnimator(f,n),s.push(f)}}(t,"",t,e,n=n||{},i,r,o);function a(){u=!0,--l<=0&&(u?h&&h():c&&c())}function s(){--l<=0&&(u?h&&h():c&&c())}var l=r.length,u=!1,h=n.done,c=n.aborted;l||h&&h(),0<r.length&&n.during&&r[0].during(function(t,e){n.during(e)});for(var p=0;p<r.length;p++){var d=r[p];d.done(a),d.aborted(s),d.start(n.easing,n.force)}return r}function fi(t,e,n){for(var i=0;i<n;i++)t[i]=e[i]}function gi(t,e,n){if(k(e[n]))if(k(t[n])||(t[n]=[]),Z(e[n])){var i=e[n].length;t[n].length!==i&&(t[n]=new e[n].constructor(i),fi(t[n],e[n],i))}else{var o=e[n],r=t[n],a=o.length;if(k(o[0]))for(var s=o[0].length,l=0;l<a;l++)r[l]?fi(r[l],o[l],s):r[l]=Array.prototype.slice.call(o[l]);else fi(r,o,a);r.length=o.length}else t[n]=e[n]}I(ci,Ft),I(ci,Ee);var yi=32,mi=7;function vi(t,e,n,i){var o=e+1;if(o===n)return 1;if(i(t[o++],t[e])<0){for(;o<n&&i(t[o],t[o-1])<0;)o++;!function(t,e,n){n--;for(;e<n;){var i=t[e];t[e++]=t[n],t[n--]=i}}(t,e,o)}else for(;o<n&&0<=i(t[o],t[o-1]);)o++;return o-e}function xi(t,e,n,i,o){for(i===e&&i++;i<n;i++){for(var r,a=t[i],s=e,l=i;s<l;)o(a,t[r=s+l>>>1])<0?l=r:s=1+r;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;0<u;)t[s+u]=t[s+u-1],u--}t[s]=a}}function _i(t,e,n,i,o,r){var a=0,s=0,l=1;if(0<r(t,e[n+o])){for(s=i-o;l<s&&0<r(t,e[n+o+l]);)(l=1+((a=l)<<1))<=0&&(l=s);s<l&&(l=s),a+=o,l+=o}else{for(s=o+1;l<s&&r(t,e[n+o-l])<=0;)(l=1+((a=l)<<1))<=0&&(l=s);s<l&&(l=s);i=a,a=o-l,l=o-i}for(a++;a<l;){var u=a+(l-a>>>1);0<r(t,e[n+u])?a=u+1:l=u}return l}function bi(t,e,n,i,o,r){var a=0,s=0,l=1;if(r(t,e[n+o])<0){for(s=o+1;l<s&&r(t,e[n+o-l])<0;)(l=1+((a=l)<<1))<=0&&(l=s);s<l&&(l=s);var u=a,a=o-l,l=o-u}else{for(s=i-o;l<s&&0<=r(t,e[n+o+l]);)(l=1+((a=l)<<1))<=0&&(l=s);s<l&&(l=s),a+=o,l+=o}for(a++;a<l;){var h=a+(l-a>>>1);r(t,e[n+h])<0?l=h:a=h+1}return l}function wi(f,g){var r,a,y=mi,s=0,m=(f.length,[]);function e(t){var e=r[t],n=a[t],i=r[t+1],o=a[t+1];a[t]=n+o,t===s-3&&(r[t+1]=r[t+2],a[t+1]=a[t+2]),s--;t=bi(f[i],f,e,n,0,g);e+=t,0!=(n-=t)&&0!==(o=_i(f[e+n-1],f,i,o,o-1,g))&&(n<=o?function(t,e,n,i){var o=0;for(o=0;o<e;o++)m[o]=f[t+o];var r=0,a=n,s=t;if(f[s++]=f[a++],0==--i){for(o=0;o<e;o++)f[s+o]=m[r+o];return}if(1===e){for(o=0;o<i;o++)f[s+o]=f[a+o];return f[s+i]=m[r]}var l,u,h,c=y;for(;;){u=l=0,h=!1;do{if(g(f[a],m[r])<0){if(f[s++]=f[a++],u++,(l=0)==--i){h=!0;break}}else if(f[s++]=m[r++],l++,u=0,1==--e){h=!0;break}}while((l|u)<c);if(h)break;do{if(0!==(l=bi(f[a],m,r,e,0,g))){for(o=0;o<l;o++)f[s+o]=m[r+o];if(s+=l,r+=l,(e-=l)<=1){h=!0;break}}if(f[s++]=f[a++],0==--i){h=!0;break}if(0!==(u=_i(m[r],f,a,i,0,g))){for(o=0;o<u;o++)f[s+o]=f[a+o];if(s+=u,a+=u,0===(i-=u)){h=!0;break}}if(f[s++]=m[r++],1==--e){h=!0;break}}while(c--,mi<=l||mi<=u);if(h)break;c<0&&(c=0),c+=2}if((y=c)<1&&(y=1),1===e){for(o=0;o<i;o++)f[s+o]=f[a+o];f[s+i]=m[r]}else{if(0===e)throw new Error;for(o=0;o<e;o++)f[s+o]=m[r+o]}}:function(t,e,n,i){var o=0;for(o=0;o<i;o++)m[o]=f[n+o];var r=t+e-1,a=i-1,s=n+i-1,l=0,u=0;if(f[s--]=f[r--],0==--e){for(l=s-(i-1),o=0;o<i;o++)f[l+o]=m[o];return}if(1===i){for(u=(s-=e)+1,l=(r-=e)+1,o=e-1;0<=o;o--)f[u+o]=f[l+o];return f[s]=m[a]}var h=y;for(;;){var c=0,p=0,d=!1;do{if(g(m[a],f[r])<0){if(f[s--]=f[r--],c++,(p=0)==--e){d=!0;break}}else if(f[s--]=m[a--],p++,c=0,1==--i){d=!0;break}}while((c|p)<h);if(d)break;do{if(0!==(c=e-bi(m[a],f,t,e,e-1,g))){for(e-=c,u=(s-=c)+1,l=(r-=c)+1,o=c-1;0<=o;o--)f[u+o]=f[l+o];if(0===e){d=!0;break}}if(f[s--]=m[a--],1==--i){d=!0;break}if(0!==(p=i-_i(f[r],m,0,i,i-1,g))){for(i-=p,u=(s-=p)+1,l=(a-=p)+1,o=0;o<p;o++)f[u+o]=m[l+o];if(i<=1){d=!0;break}}if(f[s--]=f[r--],0==--e){d=!0;break}}while(h--,mi<=c||mi<=p);if(d)break;h<0&&(h=0),h+=2}(y=h)<1&&(y=1);if(1===i){for(u=(s-=e)+1,l=(r-=e)+1,o=e-1;0<=o;o--)f[u+o]=f[l+o];f[s]=m[a]}else{if(0===i)throw new Error;for(l=s-(i-1),o=0;o<i;o++)f[l+o]=m[o]}})(e,n,i,o)}return r=[],a=[],{mergeRuns:function(){for(;1<s;){var t=s-2;if(1<=t&&a[t-1]<=a[t]+a[t+1]||2<=t&&a[t-2]<=a[t]+a[t-1])a[t-1]<a[t+1]&&t--;else if(a[t]>a[t+1])break;e(t)}},forceMergeRuns:function(){for(;1<s;){var t=s-2;0<t&&a[t-1]<a[t+1]&&t--,e(t)}},pushRun:function(t,e){r[s]=t,a[s]=e,s+=1}}}function Si(t,e,n,i){n=n||0;var o=(i=i||t.length)-n;if(!(o<2)){var r=0;if(o<yi)xi(t,n,i,n+(r=vi(t,n,i,e)),e);else{var a,s=wi(t,e),l=function(t){for(var e=0;yi<=t;)e|=1&t,t>>=1;return t+e}(o);do{}while((r=vi(t,n,i,e))<l&&(l<(a=o)&&(a=l),xi(t,n,n+a,n+r,e),r=a),s.pushRun(n,r),s.mergeRuns(),n+=r,0!==(o-=r));s.forceMergeRuns()}}}var Mi=!1;function Ii(){Mi||(Mi=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Ti(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var Ci=(Di.prototype.traverse=function(t,e){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(t,e)},Di.prototype.getDisplayList=function(t,e){e=e||!1;var n=this._displayList;return!t&&n.length||this.updateDisplayList(e),n},Di.prototype.updateDisplayList=function(t){this._displayListLen=0;for(var e=this._roots,n=this._displayList,i=0,o=e.length;i<o;i++)this._updateAndAddDisplayable(e[i],null,t);n.length=this._displayListLen,w.canvasSupported&&Si(n,Ti)},Di.prototype._updateAndAddDisplayable=function(t,e,n){if(!t.ignore||n){t.beforeUpdate(),t.update(),t.afterUpdate();var i=t.getClipPath();if(t.ignoreClip)e=null;else if(i){e=e?e.slice():[];for(var o=i,r=t;o;)o.parent=r,o.updateTransform(),e.push(o),o=(r=o).getClipPath()}if(t.childrenRef){for(var a=t.childrenRef(),s=0;s<a.length;s++){var l=a[s];t.__dirty&&(l.__dirty|=ci.REDARAW_BIT),this._updateAndAddDisplayable(l,e,n)}t.__dirty=0}else{var u=t;e&&e.length?u.__clipPaths=e:u.__clipPaths&&0<u.__clipPaths.length&&(u.__clipPaths=[]),isNaN(u.z)&&(Ii(),u.z=0),isNaN(u.z2)&&(Ii(),u.z2=0),isNaN(u.zlevel)&&(Ii(),u.zlevel=0),this._displayList[this._displayListLen++]=u}u=t.getDecalElement&&t.getDecalElement();u&&this._updateAndAddDisplayable(u,e,n);u=t.getTextGuideLine();u&&this._updateAndAddDisplayable(u,e,n);u=t.getTextContent();u&&this._updateAndAddDisplayable(u,e,n)}},Di.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},Di.prototype.delRoot=function(t){if(t instanceof Array)for(var e=0,n=t.length;e<n;e++)this.delRoot(t[e]);else{var i=L(this._roots,t);0<=i&&this._roots.splice(i,1)}},Di.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},Di.prototype.getRoots=function(){return this._roots},Di.prototype.dispose=function(){this._displayList=null,this._roots=null},Di);function Di(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Ti}var Ai,Li="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)},ki=(l(Pi,Ai=Ft),Pi.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._clipsHead?((this._clipsTail.next=t).prev=this._clipsTail,t.next=null,this._clipsTail=t):this._clipsHead=this._clipsTail=t,t.animation=this},Pi.prototype.addAnimator=function(t){t.animation=this;t=t.getClip();t&&this.addClip(t)},Pi.prototype.removeClip=function(t){var e,n;t.animation&&(e=t.prev,n=t.next,e?e.next=n:this._clipsHead=n,n?n.prev=e:this._clipsTail=e,t.next=t.prev=t.animation=null)},Pi.prototype.removeAnimator=function(t){var e=t.getClip();e&&this.removeClip(e),t.animation=null},Pi.prototype.update=function(t){for(var e=(new Date).getTime()-this._pausedTime,n=e-this._time,i=this._clipsHead;i;)var o=i.next,i=(i.step(e,n)&&(i.ondestroy&&i.ondestroy(),this.removeClip(i)),o);this._time=e,t||(this.onframe(n),this.trigger("frame",n),this.stage.update&&this.stage.update())},Pi.prototype._startLoop=function(){var e=this;this._running=!0,Li(function t(){e._running&&(Li(t),e._paused||e.update())})},Pi.prototype.start=function(){this._running||(this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop())},Pi.prototype.stop=function(){this._running=!1},Pi.prototype.pause=function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},Pi.prototype.resume=function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},Pi.prototype.clear=function(){for(var t=this._clipsHead;t;){var e=t.next;t.prev=t.next=t.animation=null,t=e}this._clipsHead=this._clipsTail=null},Pi.prototype.isFinished=function(){return null==this._clipsHead},Pi.prototype.animate=function(t,e){e=e||{},this.start();e=new An(t,e.loop);return this.addAnimator(e),e},Pi);function Pi(t){var e=Ai.call(this)||this;return e._running=!1,e._time=0,e._pausedTime=0,e._pauseStart=0,e._paused=!1,t=t||{},e.stage=t.stage||{},e.onframe=t.onframe||function(){},e}var Oi,Ri=w.domSupported,Ni=(Oi={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:zm=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:P(zm,function(t){var e=t.replace("mouse","pointer");return Oi.hasOwnProperty(e)?e:t})}),Ei=["mousemove","mouseup"],zi=["pointermove","pointerup"],Bi=!1;function Vi(t){t=t.pointerType;return"pen"===t||"touch"===t}function Fi(t){t&&(t.zrByTouch=!0)}function Gi(t,e){for(var n=e,i=!1;n&&9!==n.nodeType&&!(i=n.domBelongToZr||n!==e&&n===t.painterRoot);)n=n.parentNode;return i}var Hi=function(t,e){this.stopPropagation=gt,this.stopImmediatePropagation=gt,this.preventDefault=gt,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY},Wi={mousedown:function(t){t=ee(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=ee(this.dom,t);var e=this.__mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=ee(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){var e;t.target===this.dom&&(t=ee(this.dom,t),this.__pointerCapturing&&(t.zrEventControl="no_globalout"),e=t.toElement||t.relatedTarget,t.zrIsToLocalDOM=Gi(this,e),this.trigger("mouseout",t))},wheel:function(t){Bi=!0,t=ee(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){Bi||(t=ee(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){Fi(t=ee(this.dom,t)),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),Wi.mousemove.call(this,t),Wi.mousedown.call(this,t)},touchmove:function(t){Fi(t=ee(this.dom,t)),this.handler.processGesture(t,"change"),Wi.mousemove.call(this,t)},touchend:function(t){Fi(t=ee(this.dom,t)),this.handler.processGesture(t,"end"),Wi.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<300&&Wi.click.call(this,t)},pointerdown:function(t){Wi.mousedown.call(this,t)},pointermove:function(t){Vi(t)||Wi.mousemove.call(this,t)},pointerup:function(t){Wi.mouseup.call(this,t)},pointerout:function(t){Vi(t)||Wi.mouseout.call(this,t)}};N(["click","dblclick","contextmenu"],function(e){Wi[e]=function(t){t=ee(this.dom,t),this.trigger(e,t)}});var Xi={pointermove:function(t){Vi(t)||Xi.mousemove.call(this,t)},pointerup:function(t){Xi.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function Yi(i,o){var r=o.domHandlers;w.pointerEventsSupported?N(Ni.pointer,function(e){Zi(o,e,function(t){r[e].call(i,t)})}):(w.touchEventsSupported&&N(Ni.touch,function(n){Zi(o,n,function(t){var e;r[n].call(i,t),(e=o).touching=!0,null!=e.touchTimer&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)})}),N(Ni.mouse,function(e){Zi(o,e,function(t){t=te(t),o.touching||r[e].call(i,t)})}))}function Ui(o,r){function t(i){Zi(r,i,function(t){var e,n;t=te(t),Gi(o,t.target)||(n=t,t=ee((e=o).dom,new Hi(e,n),!0),r.domHandlers[i].call(o,t))},{capture:!0})}w.pointerEventsSupported?N(zi,t):w.touchEventsSupported||N(Ei,t)}function Zi(t,e,n,i){t.mounted[e]=n,t.listenerOpts[e]=i,ne(t.domTarget,e,n,i)}function ji(t){var e,n,i,o,r,a=t.mounted;for(e in a)a.hasOwnProperty(e)&&(n=t.domTarget,o=a[i=e],r=t.listenerOpts[e],qt?n.removeEventListener(i,o,r):n.detachEvent("on"+i,o));t.mounted={}}var qi,Ki=function(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e},$i=(l(Ji,qi=Ft),Ji.prototype.dispose=function(){ji(this._localHandlerScope),Ri&&ji(this._globalHandlerScope)},Ji.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},Ji.prototype.__togglePointerCapture=function(t){var e;this.__mayPointerCapture=null,Ri&&+this.__pointerCapturing^+t&&(this.__pointerCapturing=t,e=this._globalHandlerScope,t?Ui(this,e):ji(e))},Ji);function Ji(t,e){var n=qi.call(this)||this;return n.__pointerCapturing=!1,n.dom=t,n.painterRoot=e,n._localHandlerScope=new Ki(t,Wi),Ri&&(n._globalHandlerScope=new Ki(document,Xi)),Yi(n,n._localHandlerScope),n}var Qi="__zr_style_"+Math.round(10*Math.random()),to={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},eo={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};to[Qi]=!0;var no,io=["z","z2","invisible"],oo=(l(ro,no=ci),ro.prototype._init=function(t){for(var e=z(t),n=0;n<e.length;n++){var i=e[n];"style"===i?this.useStyle(t[i]):no.prototype.attrKV.call(this,i,t[i])}this.style||this.useStyle({})},ro.prototype.beforeBrush=function(){},ro.prototype.afterBrush=function(){},ro.prototype.innerBeforeBrush=function(){},ro.prototype.innerAfterBrush=function(){},ro.prototype.shouldBePainted=function(t,e,n,i){var o=this.transform;if(this.ignore||this.invisible||0===this.style.opacity||this.culling&&function(t,e,n){ao.copy(t.getBoundingRect()),t.transform&&ao.applyTransform(t.transform);return so.width=e,so.height=n,!ao.intersect(so)}(this,t,e)||o&&!o[0]&&!o[3])return!1;if(n&&this.__clipPaths)for(var r=0;r<this.__clipPaths.length;++r)if(this.__clipPaths[r].isZeroArea())return!1;if(i&&this.parent)for(var a=this.parent;a;){if(a.ignore)return!1;a=a.parent}return!0},ro.prototype.contain=function(t,e){return this.rectContain(t,e)},ro.prototype.traverse=function(t,e){t.call(e,this)},ro.prototype.rectContain=function(t,e){e=this.transformCoordToLocal(t,e);return this.getBoundingRect().contain(e[0],e[1])},ro.prototype.getPaintRect=function(){var t,e,n,i,o,r=this._paintRect;return this._paintRect&&!this.__dirty||(t=this.transform,e=this.getBoundingRect(),o=(i=this.style).shadowBlur||0,n=i.shadowOffsetX||0,i=i.shadowOffsetY||0,r=this._paintRect||(this._paintRect=new Gn(0,0,0,0)),t?Gn.applyTransform(r,e,t):r.copy(e),(o||n||i)&&(r.width+=2*o+Math.abs(n),r.height+=2*o+Math.abs(i),r.x=Math.min(r.x,r.x+n-o),r.y=Math.min(r.y,r.y+i-o)),o=this.dirtyRectTolerance,r.isZero()||(r.x=Math.floor(r.x-o),r.y=Math.floor(r.y-o),r.width=Math.ceil(r.width+1+2*o),r.height=Math.ceil(r.height+1+2*o))),r},ro.prototype.setPrevPaintRect=function(t){t?(this._prevPaintRect=this._prevPaintRect||new Gn(0,0,0,0),this._prevPaintRect.copy(t)):this._prevPaintRect=null},ro.prototype.getPrevPaintRect=function(){return this._prevPaintRect},ro.prototype.animateStyle=function(t){return this.animate("style",t)},ro.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():this.markRedraw()},ro.prototype.attrKV=function(t,e){"style"!==t?no.prototype.attrKV.call(this,t,e):this.style?this.setStyle(e):this.useStyle(e)},ro.prototype.setStyle=function(t,e){return"string"==typeof t?this.style[t]=e:O(this.style,t),this.dirtyStyle(),this},ro.prototype.dirtyStyle=function(){this.markRedraw(),this.__dirty|=ro.STYLE_CHANGED_BIT,this._rect&&(this._rect=null)},ro.prototype.dirty=function(){this.dirtyStyle()},ro.prototype.styleChanged=function(){return!!(this.__dirty&ro.STYLE_CHANGED_BIT)},ro.prototype.styleUpdated=function(){this.__dirty&=~ro.STYLE_CHANGED_BIT},ro.prototype.createStyle=function(t){return dt(to,t)},ro.prototype.useStyle=function(t){t[Qi]||(t=this.createStyle(t)),this.__inHover?this.__hoverStyle=t:this.style=t,this.dirtyStyle()},ro.prototype.isStyleObject=function(t){return t[Qi]},ro.prototype._innerSaveToNormal=function(t){no.prototype._innerSaveToNormal.call(this,t);var e=this._normalState;t.style&&!e.style&&(e.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,e,io)},ro.prototype._applyStateObj=function(t,e,n,i,o,r){no.prototype._applyStateObj.call(this,t,e,n,i,o,r);var a,s=!(e&&i);if(e&&e.style?o?i?a=e.style:(a=this._mergeStyle(this.createStyle(),n.style),this._mergeStyle(a,e.style)):(a=this._mergeStyle(this.createStyle(),(i?this:n).style),this._mergeStyle(a,e.style)):s&&(a=n.style),a)if(o){var l=this.style;if(this.style=this.createStyle(s?{}:l),s)for(var u=z(l),h=0;h<u.length;h++){(p=u[h])in a&&(a[p]=a[p],this.style[p]=l[p])}for(var c=z(a),h=0;h<c.length;h++){var p=c[h];this.style[p]=this.style[p]}this._transitionState(t,{style:a},r,this.getAnimationStyleProps())}else this.useStyle(a);for(h=0;h<io.length;h++){p=io[h];e&&null!=e[p]?this[p]=e[p]:s&&null!=n[p]&&(this[p]=n[p])}},ro.prototype._mergeStates=function(t){for(var e,n=no.prototype._mergeStates.call(this,t),i=0;i<t.length;i++){var o=t[i];o.style&&(e=e||{},this._mergeStyle(e,o.style))}return e&&(n.style=e),n},ro.prototype._mergeStyle=function(t,e){return O(t,e),t},ro.prototype.getAnimationStyleProps=function(){return eo},ro.STYLE_CHANGED_BIT=2,ro.initDefaultProps=((af=ro.prototype).type="displayable",af.invisible=!1,af.z=0,af.z2=0,af.zlevel=0,af.culling=!1,af.cursor="pointer",af.rectHover=!1,af.incremental=!1,af._rect=null,af.dirtyRectTolerance=0,void(af.__dirty=ci.REDARAW_BIT|ro.STYLE_CHANGED_BIT)),ro);function ro(t){return no.call(this,t)||this}var ao=new Gn(0,0,0,0),so=new Gn(0,0,0,0);var lo=Math.pow,uo=Math.sqrt,ho=1e-8,co=1e-4,po=uo(3),fo=1/3,go=mt(),yo=mt(),mo=mt();function vo(t){return-ho<t&&t<ho}function xo(t){return ho<t||t<-ho}function _o(t,e,n,i,o){var r=1-o;return r*r*(r*t+3*o*e)+o*o*(o*i+3*r*n)}function bo(t,e,n,i,o){var r=1-o;return 3*(((e-t)*r+2*(n-e)*o)*r+(i-n)*o*o)}function wo(t,e,n,i,o,r){var a,s,l,u=i+3*(e-n)-t,h=3*(n-2*e+t),i=3*(e-t),n=t-o,e=h*h-3*u*i,t=h*i-9*u*n,o=i*i-3*h*n,n=0;return vo(e)&&vo(t)?vo(h)?r[0]=0:0<=(s=-i/h)&&s<=1&&(r[n++]=s):vo(i=t*t-4*e*o)?(l=-(o=t/e)/2,0<=(s=-h/u+o)&&s<=1&&(r[n++]=s),0<=l&&l<=1&&(r[n++]=l)):0<i?(a=e*h+1.5*u*(-t-(i=uo(i))),0<=(s=(-h-((i=(i=e*h+1.5*u*(-t+i))<0?-lo(-i,fo):lo(i,fo))+(a=a<0?-lo(-a,fo):lo(a,fo))))/(3*u))&&s<=1&&(r[n++]=s)):(a=(2*e*h-3*u*t)/(2*uo(e*e*e)),t=Math.acos(a)/3,s=(-h-2*(a=uo(e))*(e=Math.cos(t)))/(3*u),l=(-h+a*(e+po*Math.sin(t)))/(3*u),u=(-h+a*(e-po*Math.sin(t)))/(3*u),0<=s&&s<=1&&(r[n++]=s),0<=l&&l<=1&&(r[n++]=l),0<=u&&u<=1&&(r[n++]=u)),n}function So(t,e,n,i,o){var r,a=6*n-12*e+6*t,i=9*e+3*i-3*t-9*n,n=3*e-3*t,e=0;return vo(i)?xo(a)&&0<=(r=-n/a)&&r<=1&&(o[e++]=r):vo(t=a*a-4*i*n)?o[0]=-a/(2*i):0<t&&(t=(-a-(n=uo(t)))/(2*i),0<=(r=(-a+n)/(2*i))&&r<=1&&(o[e++]=r),0<=t&&t<=1&&(o[e++]=t)),e}function Mo(t,e,n,i,o,r){var a=(e-t)*o+t,s=(n-e)*o+e,e=(i-n)*o+n,n=(s-a)*o+a,s=(e-s)*o+s,o=(s-n)*o+n;r[0]=t,r[1]=a,r[2]=n,r[3]=o,r[4]=o,r[5]=s,r[6]=e,r[7]=i}function Io(t,e,n,i,o,r,a,s,l,u,h){var c,p,d,f,g=.005,y=1/0;go[0]=l,go[1]=u;for(var m=0;m<1;m+=.05)yo[0]=_o(t,n,o,a,m),yo[1]=_o(e,i,r,s,m),(d=kt(go,yo))<y&&(c=m,y=d);y=1/0;for(var v=0;v<32&&!(g<co);v++)f=c-g,p=c+g,yo[0]=_o(t,n,o,a,f),yo[1]=_o(e,i,r,s,f),d=kt(yo,go),0<=f&&d<y?(c=f,y=d):(mo[0]=_o(t,n,o,a,p),mo[1]=_o(e,i,r,s,p),f=kt(mo,go),p<=1&&f<y?(c=p,y=f):g*=.5);return h&&(h[0]=_o(t,n,o,a,c),h[1]=_o(e,i,r,s,c)),uo(y)}function To(t,e,n,i){var o=1-i;return o*(o*t+2*i*e)+i*i*n}function Co(t,e,n,i){return 2*((1-i)*(e-t)+i*(n-e))}function Do(t,e,n){n=t+n-2*e;return 0==n?.5:(t-e)/n}function Ao(t,e,n,i,o){var r=(e-t)*i+t,e=(n-e)*i+e,i=(e-r)*i+r;o[0]=t,o[1]=r,o[2]=i,o[3]=i,o[4]=e,o[5]=n}function Lo(t,e,n,i,o,r,a,s,l){var u,h=.005,c=1/0;go[0]=a,go[1]=s;for(var p=0;p<1;p+=.05){yo[0]=To(t,n,o,p),yo[1]=To(e,i,r,p),(y=kt(go,yo))<c&&(u=p,c=y)}c=1/0;for(var d=0;d<32&&!(h<co);d++){var f=u-h,g=u+h;yo[0]=To(t,n,o,f),yo[1]=To(e,i,r,f);var y=kt(yo,go);0<=f&&y<c?(u=f,c=y):(mo[0]=To(t,n,o,g),mo[1]=To(e,i,r,g),f=kt(mo,go),g<=1&&f<c?(u=g,c=f):h*=.5)}return l&&(l[0]=To(t,n,o,u),l[1]=To(e,i,r,u)),uo(c)}var ko=Math.min,Po=Math.max,Oo=Math.sin,Ro=Math.cos,No=2*Math.PI,Eo=mt(),zo=mt(),Bo=mt();function Vo(t,e,n){if(0!==t.length){for(var i=t[0],o=i[0],r=i[0],a=i[1],s=i[1],l=1;l<t.length;l++)i=t[l],o=ko(o,i[0]),r=Po(r,i[0]),a=ko(a,i[1]),s=Po(s,i[1]);e[0]=o,e[1]=a,n[0]=r,n[1]=s}}function Fo(t,e,n,i,o,r){o[0]=ko(t,n),o[1]=ko(e,i),r[0]=Po(t,n),r[1]=Po(e,i)}var Go=[],Ho=[];var Wo={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Xo=[],Yo=[],Uo=[],Zo=[],jo=[],qo=[],Ko=Math.min,$o=Math.max,Jo=Math.cos,Qo=Math.sin,tr=Math.sqrt,er=Math.abs,nr=Math.PI,ir=2*nr,or="undefined"!=typeof Float32Array,rr=[];function ar(t){return Math.round(t/nr*1e8)/1e8%2*nr}function sr(t,e){var n=ar(t[0]);n<0&&(n+=ir);var i=n-t[0],o=t[1];o+=i,!e&&ir<=o-n?o=n+ir:e&&ir<=n-o?o=n-ir:!e&&o<n?o=n+(ir-ar(n-o)):e&&n<o&&(o=n-(ir-ar(o-n))),t[0]=n,t[1]=o}var lr=(ur.prototype.increaseVersion=function(){this._version++},ur.prototype.getVersion=function(){return this._version},ur.prototype.setScale=function(t,e,n){0<(n=n||0)&&(this._ux=er(n/ii/t)||0,this._uy=er(n/ii/e)||0)},ur.prototype.setDPR=function(t){this.dpr=t},ur.prototype.setContext=function(t){this._ctx=t},ur.prototype.getContext=function(){return this._ctx},ur.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},ur.prototype.reset=function(){this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},ur.prototype.moveTo=function(t,e){return this.addData(Wo.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},ur.prototype.lineTo=function(t,e){var n=er(t-this._xi)>this._ux||er(e-this._yi)>this._uy||this._len<5;return this.addData(Wo.L,t,e),this._ctx&&n&&(this._needsDash?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),n&&(this._xi=t,this._yi=e),this},ur.prototype.bezierCurveTo=function(t,e,n,i,o,r){return this.addData(Wo.C,t,e,n,i,o,r),this._ctx&&(this._needsDash?this._dashedBezierTo(t,e,n,i,o,r):this._ctx.bezierCurveTo(t,e,n,i,o,r)),this._xi=o,this._yi=r,this},ur.prototype.quadraticCurveTo=function(t,e,n,i){return this.addData(Wo.Q,t,e,n,i),this._ctx&&(this._needsDash?this._dashedQuadraticTo(t,e,n,i):this._ctx.quadraticCurveTo(t,e,n,i)),this._xi=n,this._yi=i,this},ur.prototype.arc=function(t,e,n,i,o,r){rr[0]=i,rr[1]=o,sr(rr,r),i=rr[0];var a=(o=rr[1])-i;return this.addData(Wo.A,t,e,n,n,i,a,0,r?0:1),this._ctx&&this._ctx.arc(t,e,n,i,o,r),this._xi=Jo(o)*n+t,this._yi=Qo(o)*n+e,this},ur.prototype.arcTo=function(t,e,n,i,o){return this._ctx&&this._ctx.arcTo(t,e,n,i,o),this},ur.prototype.rect=function(t,e,n,i){return this._ctx&&this._ctx.rect(t,e,n,i),this.addData(Wo.R,t,e,n,i),this},ur.prototype.closePath=function(){this.addData(Wo.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&(this._needsDash&&this._dashedLineTo(e,n),t.closePath()),this._xi=e,this._yi=n,this},ur.prototype.fill=function(t){t&&t.fill(),this.toStatic()},ur.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},ur.prototype.setLineDash=function(t){if(t instanceof Array){this._lineDash=t;for(var e=this._dashIdx=0,n=0;n<t.length;n++)e+=t[n];this._dashSum=e,this._needsDash=!0}else this._lineDash=null,this._needsDash=!1;return this},ur.prototype.setLineDashOffset=function(t){return this._dashOffset=t,this},ur.prototype.len=function(){return this._len},ur.prototype.setData=function(t){var e=t.length;this.data&&this.data.length===e||!or||(this.data=new Float32Array(e));for(var n=0;n<e;n++)this.data[n]=t[n];this._len=e},ur.prototype.appendPath=function(t){t instanceof Array||(t=[t]);for(var e=t.length,n=0,i=this._len,o=0;o<e;o++)n+=t[o].len();or&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+n));for(o=0;o<e;o++)for(var r=t[o].data,a=0;a<r.length;a++)this.data[i++]=r[a];this._len=i},ur.prototype.addData=function(t,e,n,i,o,r,a,s,l){if(this._saveData){var u=this.data;this._len+arguments.length>u.length&&(this._expandData(),u=this.data);for(var h=0;h<arguments.length;h++)u[this._len++]=arguments[h]}},ur.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},ur.prototype._dashedLineTo=function(t,e){var n,i,o=this._dashSum,r=this._lineDash,a=this._ctx,s=this._dashOffset,l=this._xi,u=this._yi,h=t-l,c=e-u,p=tr(h*h+c*c),d=l,f=u,g=r.length;for(s<0&&(s=o+s),d-=(s%=o)*(h/=p),f-=s*(c/=p);0<h&&d<=t||h<0&&t<=d||0===h&&(0<c&&f<=e||c<0&&e<=f);)d+=h*(n=r[i=this._dashIdx]),f+=c*n,this._dashIdx=(i+1)%g,0<h&&d<l||h<0&&l<d||0<c&&f<u||c<0&&u<f||a[i%2?"moveTo":"lineTo"]((0<=h?Ko:$o)(d,t),(0<=c?Ko:$o)(f,e));h=d-t,c=f-e,this._dashOffset=-tr(h*h+c*c)},ur.prototype._dashedBezierTo=function(t,e,n,i,o,r){var a,s,l,u,h,c=this._ctx,p=this._dashSum,d=this._dashOffset,f=this._lineDash,g=this._xi,y=this._yi,m=0,v=this._dashIdx,x=f.length,_=0;for(d<0&&(d=p+d),d%=p,a=0;a<1;a+=.1)s=_o(g,t,n,o,a+.1)-_o(g,t,n,o,a),l=_o(y,e,i,r,a+.1)-_o(y,e,i,r,a),m+=tr(s*s+l*l);for(;v<x&&!(d<(_+=f[v]));v++);for(a=(_-d)/m;a<=1;)u=_o(g,t,n,o,a),h=_o(y,e,i,r,a),v%2?c.moveTo(u,h):c.lineTo(u,h),a+=f[v]/m,v=(v+1)%x;v%2!=0&&c.lineTo(o,r),s=o-u,l=r-h,this._dashOffset=-tr(s*s+l*l)},ur.prototype._dashedQuadraticTo=function(t,e,n,i){var o=n,r=i;n=(n+2*t)/3,i=(i+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,n,i,o,r)},ur.prototype.toStatic=function(){var t;!this._saveData||(t=this.data)instanceof Array&&(t.length=this._len,or&&11<this._len&&(this.data=new Float32Array(t)))},ur.prototype.getBoundingRect=function(){Uo[0]=Uo[1]=jo[0]=jo[1]=Number.MAX_VALUE,Zo[0]=Zo[1]=qo[0]=qo[1]=-Number.MAX_VALUE;for(var t,e,n,i=this.data,o=0,r=0,a=0,s=0,l=0;l<this._len;){var u=i[l++],h=1===l;switch(h&&(a=o=i[l],s=r=i[l+1]),u){case Wo.M:o=a=i[l++],r=s=i[l++],jo[0]=a,jo[1]=s,qo[0]=a,qo[1]=s;break;case Wo.L:Fo(o,r,i[l],i[l+1],jo,qo),o=i[l++],r=i[l++];break;case Wo.C:!function(t,e,n,i,o,r,a,s,l,u){var h=So,c=_o,p=h(t,n,o,a,Go);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var d=0;d<p;d++){var f=c(t,n,o,a,Go[d]);l[0]=ko(f,l[0]),u[0]=Po(f,u[0])}for(p=h(e,i,r,s,Ho),d=0;d<p;d++){var g=c(e,i,r,s,Ho[d]);l[1]=ko(g,l[1]),u[1]=Po(g,u[1])}l[0]=ko(t,l[0]),u[0]=Po(t,u[0]),l[0]=ko(a,l[0]),u[0]=Po(a,u[0]),l[1]=ko(e,l[1]),u[1]=Po(e,u[1]),l[1]=ko(s,l[1]),u[1]=Po(s,u[1])}(o,r,i[l++],i[l++],i[l++],i[l++],i[l],i[l+1],jo,qo),o=i[l++],r=i[l++];break;case Wo.Q:c=o,g=r,t=i[l++],e=i[l++],p=i[l],y=i[l+1],n=jo,f=qo,m=d=m=d=u=void 0,u=To,d=Po(ko((m=Do)(c,t,p),1),0),m=Po(ko(m(g,e,y),1),0),d=u(c,t,p,d),m=u(g,e,y,m),n[0]=ko(c,p,d),n[1]=ko(g,y,m),f[0]=Po(c,p,d),f[1]=Po(g,y,m),o=i[l++],r=i[l++];break;case Wo.A:var c=i[l++],p=i[l++],d=i[l++],f=i[l++],g=i[l++],y=i[l++]+g;l+=1;var m=!i[l++];h&&(a=Jo(g)*d+c,s=Qo(g)*f+p),function(t,e,n,i,o,r,a,s,l){var u=Rt,h=Nt,c=Math.abs(o-r);if(c%No<1e-4&&1e-4<c)return s[0]=t-n,s[1]=e-i,l[0]=t+n,l[1]=e+i;Eo[0]=Ro(o)*n+t,Eo[1]=Oo(o)*i+e,zo[0]=Ro(r)*n+t,zo[1]=Oo(r)*i+e,u(s,Eo,zo),h(l,Eo,zo),(o%=No)<0&&(o+=No),(r%=No)<0&&(r+=No),r<o&&!a?r+=No:o<r&&a&&(o+=No),a&&(a=r,r=o,o=a);for(var p=0;p<r;p+=Math.PI/2)o<p&&(Bo[0]=Ro(p)*n+t,Bo[1]=Oo(p)*i+e,u(s,Bo,s),h(l,Bo,l))}(c,p,d,f,g,y,m,jo,qo),o=Jo(y)*d+c,r=Qo(y)*f+p;break;case Wo.R:Fo(a=o=i[l++],s=r=i[l++],a+i[l++],s+i[l++],jo,qo);break;case Wo.Z:o=a,r=s}Rt(Uo,Uo,jo),Nt(Zo,Zo,qo)}return 0===l&&(Uo[0]=Uo[1]=Zo[0]=Zo[1]=0),new Gn(Uo[0],Uo[1],Zo[0]-Uo[0],Zo[1]-Uo[1])},ur.prototype._calculateLength=function(){var t=this.data,e=this._len,n=this._ux,i=this._uy,o=0,r=0,a=0,s=0;this._pathSegLen||(this._pathSegLen=[]);for(var l=this._pathSegLen,u=0,h=0,c=0;c<e;){var p=t[c++],d=1===c;d&&(a=o=t[c],s=r=t[c+1]);var f=-1;switch(p){case Wo.M:o=a=t[c++],r=s=t[c++];break;case Wo.L:var g=t[c++],y=(x=t[c++])-r;(er(T=g-o)>n||er(y)>i||c===e-1)&&(f=Math.sqrt(T*T+y*y),o=g,r=x);break;case Wo.C:var m=t[c++],v=t[c++],g=t[c++],x=t[c++],_=t[c++],b=t[c++],f=function(t,e,n,i,o,r,a,s,l){for(var u=t,h=e,c=0,p=1/l,d=1;d<=l;d++){var f=d*p,g=_o(t,n,o,a,f),y=_o(e,i,r,s,f),m=g-u,f=y-h;c+=Math.sqrt(m*m+f*f),u=g,h=y}return c}(o,r,m,v,g,x,_,b,10),o=_,r=b;break;case Wo.Q:f=function(t,e,n,i,o,r,a){for(var s=t,l=e,u=0,h=1/a,c=1;c<=a;c++){var p=c*h,d=To(t,n,o,p),f=To(e,i,r,p),g=d-s,p=f-l;u+=Math.sqrt(g*g+p*p),s=d,l=f}return u}(o,r,m=t[c++],v=t[c++],g=t[c++],x=t[c++],10),o=g,r=x;break;case Wo.A:var w=t[c++],S=t[c++],M=t[c++],I=t[c++],p=t[c++],_=t[c++],b=_+p;c+=1;t[c++];d&&(a=Jo(p)*M+w,s=Qo(p)*I+S),f=$o(M,I)*Ko(ir,Math.abs(_)),o=Jo(b)*M+w,r=Qo(b)*I+S;break;case Wo.R:a=o=t[c++],s=r=t[c++];f=2*t[c++]+2*t[c++];break;case Wo.Z:var T=a-o,y=s-r;f=Math.sqrt(T*T+y*y),o=a,r=s}0<=f&&(u+=l[h++]=f)}return this._pathLen=u},ur.prototype.rebuildPath=function(t,e){var n,i,o,r,a,s,l,u,h=this.data,c=this._ux,p=this._uy,d=this._len,f=e<1,g=0,y=0;if(!f||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,u=e*this._pathLen))t:for(var m=0;m<d;){var v=h[m++],x=1===m;switch(x&&(n=o=h[m],i=r=h[m+1]),v){case Wo.M:n=o=h[m++],i=r=h[m++],t.moveTo(o,r);break;case Wo.L:if(a=h[m++],s=h[m++],er(a-o)>c||er(s-r)>p||m===d-1){if(f){if(u<g+(E=l[y++])){var _=(u-g)/E;t.lineTo(o*(1-_)+a*_,r*(1-_)+s*_);break t}g+=E}t.lineTo(a,s),o=a,r=s}break;case Wo.C:var b=h[m++],w=h[m++],S=h[m++],M=h[m++],I=h[m++],T=h[m++];if(f){if(u<g+(E=l[y++])){Mo(o,b,S,I,_=(u-g)/E,Xo),Mo(r,w,M,T,_,Yo),t.bezierCurveTo(Xo[1],Yo[1],Xo[2],Yo[2],Xo[3],Yo[3]);break t}g+=E}t.bezierCurveTo(b,w,S,M,I,T),o=I,r=T;break;case Wo.Q:b=h[m++],w=h[m++],S=h[m++],M=h[m++];if(f){if(u<g+(E=l[y++])){Ao(o,b,S,_=(u-g)/E,Xo),Ao(r,w,M,_,Yo),t.quadraticCurveTo(Xo[1],Yo[1],Xo[2],Yo[2]);break t}g+=E}t.quadraticCurveTo(b,w,S,M),o=S,r=M;break;case Wo.A:var C=h[m++],D=h[m++],A=h[m++],L=h[m++],k=h[m++],P=h[m++],O=h[m++],R=!h[m++],v=L<A?A:L,I=.001<er(A-L),N=k+P,T=!1;if(f&&(u<g+(E=l[y++])&&(N=k+P*(u-g)/E,T=!0),g+=E),I&&t.ellipse?t.ellipse(C,D,A,L,O,k,N,R):t.arc(C,D,v,k,N,R),T)break t;x&&(n=Jo(k)*A+C,i=Qo(k)*L+D),o=Jo(N)*A+C,r=Qo(N)*L+D;break;case Wo.R:n=o=h[m],i=r=h[m+1],a=h[m++],s=h[m++];var E,N=h[m++],L=h[m++];if(f){if(u<g+(E=l[y++])){D=u-g;t.moveTo(a,s),t.lineTo(a+Ko(D,N),s),0<(D-=N)&&t.lineTo(a+N,s+Ko(D,L)),0<(D-=L)&&t.lineTo(a+$o(N-D,0),s+L),0<(D-=N)&&t.lineTo(a,s+$o(L-D,0));break t}g+=E}t.rect(a,s,N,L);break;case Wo.Z:if(f){if(u<g+(E=l[y++])){_=(u-g)/E;t.lineTo(o*(1-_)+n*_,r*(1-_)+i*_);break t}g+=E}t.closePath(),o=n,r=i}}},ur.CMD=Wo,ur.initDefaultProps=((sf=ur.prototype)._saveData=!0,sf._needsDash=!1,sf._dashOffset=0,sf._dashIdx=0,sf._dashSum=0,sf._ux=0,void(sf._uy=0)),ur);function ur(t){this.dpr=1,this._version=0,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,t&&(this._saveData=!1),this._saveData&&(this.data=[])}function hr(t,e,n,i,o,r,a){if(0!==o){var s=o,o=0;if(!(e+s<a&&i+s<a||a<e-s&&a<i-s||t+s<r&&n+s<r||r<t-s&&r<n-s)){if(t===n)return Math.abs(r-t)<=s/2;n=(o=(e-i)/(t-n))*r-a+(t*i-n*e)/(t-n);return n*n/(o*o+1)<=s/2*s/2}}}function cr(t,e,n,i,o,r,a,s,l){if(0!==a){a=a;return e+a<l&&i+a<l&&r+a<l||l<e-a&&l<i-a&&l<r-a||t+a<s&&n+a<s&&o+a<s||s<t-a&&s<n-a&&s<o-a?void 0:Lo(t,e,n,i,o,r,s,l,null)<=a/2}}var pr=2*Math.PI;function dr(t){return(t%=pr)<0&&(t+=pr),t}var fr=2*Math.PI;function gr(t,e,n,i,o,r){if(e<r&&i<r||r<e&&r<i)return 0;if(i===e)return 0;var a=(r-e)/(i-e),r=i<e?1:-1;1!=a&&0!=a||(r=i<e?.5:-.5);t=a*(n-t)+t;return t===o?1/0:o<t?r:0}var yr=lr.CMD,mr=2*Math.PI,vr=1e-4;var xr=[-1,-1,-1],_r=[-1,-1];function br(t,e,n,i,o,r,a,s,l,u){if(e<u&&i<u&&r<u&&s<u||u<e&&u<i&&u<r&&u<s)return 0;var h=wo(e,i,r,s,u,xr);if(0===h)return 0;for(var c,p=0,d=-1,f=void 0,g=void 0,y=0;y<h;y++){var m=xr[y],v=0===m||1===m?.5:1;_o(t,n,o,a,m)<l||(d<0&&(d=So(e,i,r,s,_r),_r[1]<_r[0]&&1<d&&(c=void 0,c=_r[0],_r[0]=_r[1],_r[1]=c),f=_o(e,i,r,s,_r[0]),1<d&&(g=_o(e,i,r,s,_r[1]))),2===d?m<_r[0]?p+=f<e?v:-v:m<_r[1]?p+=g<f?v:-v:p+=s<g?v:-v:m<_r[0]?p+=f<e?v:-v:p+=s<f?v:-v)}return p}function wr(t,e,n,i,o,r,a,s){if(e<s&&i<s&&r<s||s<e&&s<i&&s<r)return 0;var l,u,h,c,p,d,f=(c=xr,d=(l=e)-2*(u=i)+(h=r),h=2*(u-l),u=l-(s=s),l=0,vo(d)?xo(h)&&0<=(p=-u/h)&&p<=1&&(c[l++]=p):vo(s=h*h-4*d*u)?0<=(p=-h/(2*d))&&p<=1&&(c[l++]=p):0<s&&(s=(-h-(u=uo(s)))/(2*d),0<=(p=(-h+u)/(2*d))&&p<=1&&(c[l++]=p),0<=s&&s<=1&&(c[l++]=s)),l);if(0===f)return 0;var g=Do(e,i,r);if(0<=g&&g<=1){for(var y=0,m=To(e,i,r,g),v=0;v<f;v++){var x=0===xr[v]||1===xr[v]?.5:1;To(t,n,o,xr[v])<a||(xr[v]<g?y+=m<e?x:-x:y+=r<m?x:-x)}return y}x=0===xr[0]||1===xr[0]?.5:1;return To(t,n,o,xr[0])<a?0:r<e?x:-x}function Sr(t,e,n,i,o){for(var r,a=t.data,s=t.len(),l=0,u=0,h=0,c=0,p=0,d=0;d<s;){var f=a[d++],g=1===d;switch(f===yr.M&&1<d&&(n||(l+=gr(u,h,c,p,i,o))),g&&(c=u=a[d],p=h=a[d+1]),f){case yr.M:u=c=a[d++],h=p=a[d++];break;case yr.L:if(n){if(hr(u,h,a[d],a[d+1],e,i,o))return!0}else l+=gr(u,h,a[d],a[d+1],i,o)||0;u=a[d++],h=a[d++];break;case yr.C:if(n){if(function(t,e,n,i,o,r,a,s,l,u,h){if(0!==l){l=l;return e+l<h&&i+l<h&&r+l<h&&s+l<h||h<e-l&&h<i-l&&h<r-l&&h<s-l||t+l<u&&n+l<u&&o+l<u&&a+l<u||u<t-l&&u<n-l&&u<o-l&&u<a-l?void 0:Io(t,e,n,i,o,r,a,s,u,h,null)<=l/2}}(u,h,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],e,i,o))return!0}else l+=br(u,h,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],i,o)||0;u=a[d++],h=a[d++];break;case yr.Q:if(n){if(cr(u,h,a[d++],a[d++],a[d],a[d+1],e,i,o))return!0}else l+=wr(u,h,a[d++],a[d++],a[d],a[d+1],i,o)||0;u=a[d++],h=a[d++];break;case yr.A:var y=a[d++],m=a[d++],v=a[d++],x=a[d++],_=a[d++],b=a[d++];d+=1;var f=!!(1-a[d++]),w=Math.cos(_)*v+y,S=Math.sin(_)*x+m;g?(c=w,p=S):l+=gr(u,h,w,S,i,o);g=(i-y)*x/v+y;if(n){if(function(t,e,n,i,o,r,a,s,l){if(0!==a){a=a;s-=t,l-=e;e=Math.sqrt(s*s+l*l);if(!(n<e-a||e+a<n)){if(Math.abs(i-o)%fr<1e-4)return 1;(o=r?(r=i,i=dr(o),dr(r)):(i=dr(i),dr(o)))<i&&(o+=fr);s=Math.atan2(l,s);return s<0&&(s+=fr),i<=s&&s<=o||i<=s+fr&&s+fr<=o}}}(y,m,x,_,_+b,f,e,g,o))return!0}else l+=function(t,e,n,i,o,r,a,s){if(n<(s-=e)||s<-n)return 0;if(n=Math.sqrt(n*n-s*s),xr[0]=-n,xr[1]=n,(n=Math.abs(i-o))<1e-4)return 0;if(mr-1e-4<=n){o=mr;var l=r?1:-1;return a>=xr[i=0]+t&&a<=xr[1]+t?l:0}o<i&&(n=i,i=o,o=n),i<0&&(i+=mr,o+=mr);for(var u=0,h=0;h<2;h++){var c=xr[h];a<c+t&&(l=r?1:-1,(c=Math.atan2(s,c))<0&&(c=mr+c),(i<=c&&c<=o||i<=c+mr&&c+mr<=o)&&(c>Math.PI/2&&c<1.5*Math.PI&&(l=-l),u+=l))}return u}(y,m,x,_,_+b,f,g,o);u=Math.cos(_+b)*v+y,h=Math.sin(_+b)*x+m;break;case yr.R:c=u=a[d++],p=h=a[d++];if(w=c+a[d++],S=p+a[d++],n){if(hr(c,p,w,p,e,i,o)||hr(w,p,w,S,e,i,o)||hr(w,S,c,S,e,i,o)||hr(c,S,c,p,e,i,o))return!0}else l+=gr(w,p,w,S,i,o),l+=gr(c,S,c,p,i,o);break;case yr.Z:if(n){if(hr(u,h,c,p,e,i,o))return!0}else l+=gr(u,h,c,p,i,o);u=c,h=p}}return n||(r=h,t=p,Math.abs(r-t)<vr)||(l+=gr(u,h,c,p,i,o)||0),0!==l}var Mr,Ir=A({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},to),Tr={style:A({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},eo.style)},Cr=["x","y","rotation","scaleX","scaleY","originX","originY","invisible","culling","z","z2","zlevel","parent"],Dr=(l(Ar,Mr=oo),Ar.prototype.update=function(){var e=this;Mr.prototype.update.call(this);var t=this.style;if(t.decal){var n=this._decalEl=this._decalEl||new Ar;n.buildPath===Ar.prototype.buildPath&&(n.buildPath=function(t){e.buildPath(t,e.shape)}),n.silent=!0;var i,o=n.style;for(i in t)o[i]!==t[i]&&(o[i]=t[i]);o.fill=t.fill?t.decal:null,o.decal=null,o.shadowColor=null,t.strokeFirst&&(o.stroke=null);for(var r=0;r<Cr.length;++r)n[Cr[r]]=this[Cr[r]];n.__dirty|=ci.REDARAW_BIT}else this._decalEl&&(this._decalEl=null)},Ar.prototype.getDecalElement=function(){return this._decalEl},Ar.prototype._init=function(t){var e=z(t);this.shape=this.getDefaultShape();var n=this.getDefaultStyle();n&&this.useStyle(n);for(var i=0;i<e.length;i++){var o=e[i],r=t[o];"style"===o?this.style?O(this.style,r):this.useStyle(r):"shape"===o?O(this.shape,r):Mr.prototype.attrKV.call(this,o,r)}this.style||this.useStyle({})},Ar.prototype.getDefaultStyle=function(){return null},Ar.prototype.getDefaultShape=function(){return{}},Ar.prototype.canBeInsideText=function(){return this.hasFill()},Ar.prototype.getInsideTextFill=function(){var t=this.style.fill;if("none"!==t){if(H(t)){var e=fn(t,0);return.5<e?oi:.2<e?"#eee":ri}if(t)return ri}return oi},Ar.prototype.getInsideTextStroke=function(t){var e=this.style.fill;if(H(e)){var n=this.__zr;if(!(!n||!n.isDarkMode())==fn(t,0)<.4)return e}},Ar.prototype.buildPath=function(t,e,n){},Ar.prototype.pathUpdated=function(){this.__dirty&=~Ar.SHAPE_CHANGED_BIT},Ar.prototype.createPathProxy=function(){this.path=new lr(!1)},Ar.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return!(null==e||"none"===e||!(0<t.lineWidth))},Ar.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},Ar.prototype.getBoundingRect=function(){var t=this._rect,e=this.style,n=!t;if(n&&(o=!1,this.path||(o=!0,this.createPathProxy()),i=this.path,(o||this.__dirty&Ar.SHAPE_CHANGED_BIT)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),t=i.getBoundingRect()),this._rect=t,this.hasStroke()&&this.path&&0<this.path.len()){var i,o=this._rectWithStroke||(this._rectWithStroke=t.clone());return(this.__dirty||n)&&(o.copy(t),i=e.strokeNoScale?this.getLineScale():1,n=e.lineWidth,this.hasFill()||(e=this.strokeContainThreshold,n=Math.max(n,null==e?4:e)),1e-10<i&&(o.width+=n/i,o.height+=n/i,o.x-=n/i/2,o.y-=n/i/2)),o}return t},Ar.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),o=this.style;if(t=n[0],e=n[1],i.contain(t,e)){n=this.path;if(this.hasStroke()){i=o.lineWidth,o=o.strokeNoScale?this.getLineScale():1;if(1e-10<o&&(this.hasFill()||(i=Math.max(i,this.strokeContainThreshold)),Sr(n,i/o,!0,t,e)))return!0}if(this.hasFill())return Sr(n,0,!1,t,e)}return!1},Ar.prototype.dirtyShape=function(){this.__dirty|=Ar.SHAPE_CHANGED_BIT,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},Ar.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},Ar.prototype.animateShape=function(t){return this.animate("shape",t)},Ar.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},Ar.prototype.attrKV=function(t,e){"shape"===t?this.setShape(e):Mr.prototype.attrKV.call(this,t,e)},Ar.prototype.setShape=function(t,e){var n=(n=this.shape)||(this.shape={});return"string"==typeof t?n[t]=e:O(n,t),this.dirtyShape(),this},Ar.prototype.shapeChanged=function(){return!!(this.__dirty&Ar.SHAPE_CHANGED_BIT)},Ar.prototype.createStyle=function(t){return dt(Ir,t)},Ar.prototype._innerSaveToNormal=function(t){Mr.prototype._innerSaveToNormal.call(this,t);var e=this._normalState;t.shape&&!e.shape&&(e.shape=O({},this.shape))},Ar.prototype._applyStateObj=function(t,e,n,i,o,r){Mr.prototype._applyStateObj.call(this,t,e,n,i,o,r);var a,s=!(e&&i);if(e&&e.shape?o?i?a=e.shape:(a=O({},n.shape),O(a,e.shape)):(a=O({},(i?this:n).shape),O(a,e.shape)):s&&(a=n.shape),a)if(o){this.shape=O({},this.shape);for(var l={},u=z(a),h=0;h<u.length;h++){var c=u[h];"object"==typeof a[c]?this.shape[c]=a[c]:l[c]=a[c]}this._transitionState(t,{shape:l},r)}else this.shape=a,this.dirtyShape()},Ar.prototype._mergeStates=function(t){for(var e,n=Mr.prototype._mergeStates.call(this,t),i=0;i<t.length;i++){var o=t[i];o.shape&&(e=e||{},this._mergeStyle(e,o.shape))}return e&&(n.shape=e),n},Ar.prototype.getAnimationStyleProps=function(){return Tr},Ar.prototype.isZeroArea=function(){return!1},Ar.extend=function(n){var i,t,e=(l(o,i=Ar),o.prototype.getDefaultStyle=function(){return C(n.style)},o.prototype.getDefaultShape=function(){return C(n.shape)},o);function o(t){var e=i.call(this,t)||this;return n.init&&n.init.call(e,t),e}for(t in n)"function"==typeof n[t]&&(e.prototype[t]=n[t]);return e},Ar.SHAPE_CHANGED_BIT=4,Ar.initDefaultProps=((vm=Ar.prototype).type="path",vm.strokeContainThreshold=5,vm.segmentIgnoreThreshold=0,vm.subPixelOptimize=!1,vm.autoBatch=!1,void(vm.__dirty=ci.REDARAW_BIT|oo.STYLE_CHANGED_BIT|Ar.SHAPE_CHANGED_BIT)),Ar);function Ar(t){return Mr.call(this,t)||this}var Lr=lr.CMD,kr=[[],[],[]],Pr=Math.sqrt,Or=Math.atan2;var Rr=Math.sqrt,Nr=Math.sin,Er=Math.cos,zr=Math.PI;function Br(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Vr(t,e){return(t[0]*e[0]+t[1]*e[1])/(Br(t)*Br(e))}function Fr(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Vr(t,e))}function Gr(t,e,n,i,o,r,a,s,l,u,h){var c=l*(zr/180),p=Er(c)*(t-n)/2+Nr(c)*(e-i)/2,d=-1*Nr(c)*(t-n)/2+Er(c)*(e-i)/2,l=p*p/(a*a)+d*d/(s*s);1<l&&(a*=Rr(l),s*=Rr(l));l=(o===r?-1:1)*Rr((a*a*(s*s)-a*a*(d*d)-s*s*(p*p))/(a*a*(d*d)+s*s*(p*p)))||0,o=l*a*d/s,l=l*-s*p/a,t=(t+n)/2+Er(c)*o-Nr(c)*l,n=(e+i)/2+Nr(c)*o+Er(c)*l,e=Fr([1,0],[(p-o)/a,(d-l)/s]),i=[(p-o)/a,(d-l)/s],d=[(-1*p-o)/a,(-1*d-l)/s],l=Fr(i,d);Vr(i,d)<=-1&&(l=zr),1<=Vr(i,d)&&(l=0),l<0&&(d=Math.round(l/zr*1e6)/1e6,l=2*zr+d%2*zr),h.addData(u,t,n,a,s,e,l,c,r)}var Hr=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Wr=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;var Xr,Yr=(l(Ur,Xr=Dr),Ur.prototype.applyTransform=function(t){},Ur);function Ur(){return null!==Xr&&Xr.apply(this,arguments)||this}function Zr(t){return null!=t.setData}function jr(t,e){var n=function(t){if(!t)return new lr;for(var e,n=0,i=0,o=n,r=i,a=new lr,s=lr.CMD,l=t.match(Hr),u=0;u<l.length;u++){for(var h=l[u],c=h.charAt(0),p=void 0,d=h.match(Wr)||[],f=d.length,g=0;g<f;g++)d[g]=parseFloat(d[g]);for(var y=0;y<f;){var m=void 0,v=void 0,x=void 0,_=void 0,b=void 0,w=void 0,S=void 0,M=n,I=i,T=void 0,C=void 0;switch(c){case"l":n+=d[y++],i+=d[y++],p=s.L,a.addData(p,n,i);break;case"L":n=d[y++],i=d[y++],p=s.L,a.addData(p,n,i);break;case"m":n+=d[y++],i+=d[y++],p=s.M,a.addData(p,n,i),o=n,r=i,c="l";break;case"M":n=d[y++],i=d[y++],p=s.M,a.addData(p,n,i),o=n,r=i,c="L";break;case"h":n+=d[y++],p=s.L,a.addData(p,n,i);break;case"H":n=d[y++],p=s.L,a.addData(p,n,i);break;case"v":i+=d[y++],p=s.L,a.addData(p,n,i);break;case"V":i=d[y++],p=s.L,a.addData(p,n,i);break;case"C":p=s.C,a.addData(p,d[y++],d[y++],d[y++],d[y++],d[y++],d[y++]),n=d[y-2],i=d[y-1];break;case"c":p=s.C,a.addData(p,d[y++]+n,d[y++]+i,d[y++]+n,d[y++]+i,d[y++]+n,d[y++]+i),n+=d[y-2],i+=d[y-1];break;case"S":m=n,v=i,T=a.len(),C=a.data,e===s.C&&(m+=n-C[T-4],v+=i-C[T-3]),p=s.C,M=d[y++],I=d[y++],n=d[y++],i=d[y++],a.addData(p,m,v,M,I,n,i);break;case"s":m=n,v=i,T=a.len(),C=a.data,e===s.C&&(m+=n-C[T-4],v+=i-C[T-3]),p=s.C,M=n+d[y++],I=i+d[y++],n+=d[y++],i+=d[y++],a.addData(p,m,v,M,I,n,i);break;case"Q":M=d[y++],I=d[y++],n=d[y++],i=d[y++],p=s.Q,a.addData(p,M,I,n,i);break;case"q":M=d[y++]+n,I=d[y++]+i,n+=d[y++],i+=d[y++],p=s.Q,a.addData(p,M,I,n,i);break;case"T":m=n,v=i,T=a.len(),C=a.data,e===s.Q&&(m+=n-C[T-4],v+=i-C[T-3]),n=d[y++],i=d[y++],p=s.Q,a.addData(p,m,v,n,i);break;case"t":m=n,v=i,T=a.len(),C=a.data,e===s.Q&&(m+=n-C[T-4],v+=i-C[T-3]),n+=d[y++],i+=d[y++],p=s.Q,a.addData(p,m,v,n,i);break;case"A":x=d[y++],_=d[y++],b=d[y++],w=d[y++],S=d[y++],Gr(M=n,I=i,n=d[y++],i=d[y++],w,S,x,_,b,p=s.A,a);break;case"a":x=d[y++],_=d[y++],b=d[y++],w=d[y++],S=d[y++],Gr(M=n,I=i,n+=d[y++],i+=d[y++],w,S,x,_,b,p=s.A,a)}}"z"!==c&&"Z"!==c||(p=s.Z,a.addData(p),n=o,i=r),e=p}return a.toStatic(),a}(t),e=O({},e);return e.buildPath=function(t){var e;Zr(t)?(t.setData(n.data),(e=t.getContext())&&t.rebuildPath(e,1)):(e=t,n.rebuildPath(e,1))},e.applyTransform=function(t){!function(t,e){for(var n,i,o,r=t.data,a=t.len(),s=Lr.M,l=Lr.C,u=Lr.L,h=Lr.R,c=Lr.A,p=Lr.Q,d=0,f=0;d<a;){switch(x=r[d++],f=d,n=0,x){case s:case u:n=1;break;case l:n=3;break;case p:n=2;break;case c:var g=e[4],y=e[5],m=Pr(e[0]*e[0]+e[1]*e[1]),v=Pr(e[2]*e[2]+e[3]*e[3]),x=Or(-e[1]/v,e[0]/m);r[d]*=m,r[d++]+=g,r[d]*=v,r[d++]+=y,r[d++]*=m,r[d++]*=v,r[d++]+=x,r[d++]+=x,f=d+=2;break;case h:o[0]=r[d++],o[1]=r[d++],Ot(o,o,e),r[f++]=o[0],r[f++]=o[1],o[0]+=r[d++],o[1]+=r[d++],Ot(o,o,e),r[f++]=o[0],r[f++]=o[1]}for(i=0;i<n;i++){var _=kr[i];_[0]=r[d++],_[1]=r[d++],Ot(_,_,e),r[f++]=_[0],r[f++]=_[1]}}t.increaseVersion()}(n,t),this.dirtyShape()},e}function qr(t,e){return new Yr(jr(t,e))}var Kr,$r=(l(Jr,Kr=ci),Jr.prototype.childrenRef=function(){return this._children},Jr.prototype.children=function(){return this._children.slice()},Jr.prototype.childAt=function(t){return this._children[t]},Jr.prototype.childOfName=function(t){for(var e=this._children,n=0;n<e.length;n++)if(e[n].name===t)return e[n]},Jr.prototype.childCount=function(){return this._children.length},Jr.prototype.add=function(t){if(t&&(t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),t.__hostTarget))throw"This elemenet has been used as an attachment";return this},Jr.prototype.addBefore=function(t,e){var n;return t&&t!==this&&t.parent!==this&&e&&e.parent===this&&(0<=(e=(n=this._children).indexOf(e))&&(n.splice(e,0,t),this._doAdd(t))),this},Jr.prototype.replaceAt=function(t,e){var n=this._children,i=n[e];return t&&t!==this&&t.parent!==this&&t!==i&&(n[e]=t,i.parent=null,(e=this.__zr)&&i.removeSelfFromZr(e),this._doAdd(t)),this},Jr.prototype._doAdd=function(t){t.parent&&t.parent.remove(t);var e=(t.parent=this).__zr;e&&e!==t.__zr&&t.addSelfToZr(e),e&&e.refresh()},Jr.prototype.remove=function(t){var e=this.__zr,n=this._children,i=L(n,t);return i<0||(n.splice(i,1),t.parent=null,e&&t.removeSelfFromZr(e),e&&e.refresh()),this},Jr.prototype.removeAll=function(){for(var t=this._children,e=this.__zr,n=0;n<t.length;n++){var i=t[n];e&&i.removeSelfFromZr(e),i.parent=null}return t.length=0,this},Jr.prototype.eachChild=function(t,e){for(var n=this._children,i=0;i<n.length;i++){var o=n[i];t.call(e,o,i)}return this},Jr.prototype.traverse=function(t,e){for(var n=0;n<this._children.length;n++){var i=this._children[n],o=t.call(e,i);i.isGroup&&!o&&i.traverse(t,e)}return this},Jr.prototype.addSelfToZr=function(t){Kr.prototype.addSelfToZr.call(this,t);for(var e=0;e<this._children.length;e++){this._children[e].addSelfToZr(t)}},Jr.prototype.removeSelfFromZr=function(t){Kr.prototype.removeSelfFromZr.call(this,t);for(var e=0;e<this._children.length;e++){this._children[e].removeSelfFromZr(t)}},Jr.prototype.getBoundingRect=function(t){for(var e=new Gn(0,0,0,0),n=t||this._children,i=[],o=null,r=0;r<n.length;r++){var a,s=n[r];s.ignore||s.invisible||(a=s.getBoundingRect(),(s=s.getLocalTransform(i))?(Gn.applyTransform(e,a,s),(o=o||e.clone()).union(e)):(o=o||a.clone()).union(a))}return o||e},Jr);function Jr(t){var e=Kr.call(this)||this;return e.isGroup=!0,e._children=[],e.attr(t),e}$r.prototype.type="group";var Qr=A({x:0,y:0},to),ta={style:A({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},eo.style)};var ea,na=(l(ia,ea=oo),ia.prototype.createStyle=function(t){return dt(Qr,t)},ia.prototype._getSize=function(t){var e=this.style,n=e[t];if(null!=n)return n;n=(i=e.image)&&"string"!=typeof i&&i.width&&i.height?e.image:this.__image;if(!n)return 0;var i="width"===t?"height":"width",e=e[i];return null==e?n[t]:n[t]/n[i]*e},ia.prototype.getWidth=function(){return this._getSize("width")},ia.prototype.getHeight=function(){return this._getSize("height")},ia.prototype.getAnimationStyleProps=function(){return ta},ia.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new Gn(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},ia);function ia(){return null!==ea&&ea.apply(this,arguments)||this}na.prototype.type="image";var oa,ra=function(){this.cx=0,this.cy=0,this.r=0},aa=(l(sa,oa=Dr),sa.prototype.getDefaultShape=function(){return new ra},sa.prototype.buildPath=function(t,e,n){n&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI)},sa);function sa(t){return oa.call(this,t)||this}aa.prototype.type="circle";var la=Math.round;function ua(t,e,n){if(e){var i=e.x1,o=e.x2,r=e.y1,e=e.y2;t.x1=i,t.x2=o,t.y1=r,t.y2=e;n=n&&n.lineWidth;return n?(la(2*i)===la(2*o)&&(t.x1=t.x2=ca(i,n,!0)),la(2*r)===la(2*e)&&(t.y1=t.y2=ca(r,n,!0)),t):t}}function ha(t,e,n){if(e){var i=e.x,o=e.y,r=e.width,e=e.height;t.x=i,t.y=o,t.width=r,t.height=e;n=n&&n.lineWidth;return n?(t.x=ca(i,n,!0),t.y=ca(o,n,!0),t.width=Math.max(ca(i+r,n,!1)-t.x,0===r?0:1),t.height=Math.max(ca(o+e,n,!1)-t.y,0===e?0:1),t):t}}function ca(t,e,n){if(!e)return t;t=la(2*t);return(t+la(e))%2==0?t/2:(t+(n?1:-1))/2}var pa,da=function(){this.x=0,this.y=0,this.width=0,this.height=0},fa={},ga=(l(ya,pa=Dr),ya.prototype.getDefaultShape=function(){return new da},ya.prototype.buildPath=function(t,e){var n,i,o,r,a,s,l,u,h,c,p,d,f,g;this.subPixelOptimize?(n=(g=ha(fa,e,this.style)).x,i=g.y,o=g.width,r=g.height,g.r=e.r,e=g):(n=e.x,i=e.y,o=e.width,r=e.height),e.r?(a=t,d=(s=e).x,f=s.y,g=s.width,e=s.height,s=s.r,g<0&&(d+=g,g=-g),e<0&&(f+=e,e=-e),"number"==typeof s?l=u=h=c=s:s instanceof Array?1===s.length?l=u=h=c=s[0]:2===s.length?(l=h=s[0],u=c=s[1]):3===s.length?(l=s[0],u=c=s[1],h=s[2]):(l=s[0],u=s[1],h=s[2],c=s[3]):l=u=h=c=0,g<l+u&&(l*=g/(p=l+u),u*=g/p),g<h+c&&(h*=g/(p=h+c),c*=g/p),e<u+h&&(u*=e/(p=u+h),h*=e/p),e<l+c&&(l*=e/(p=l+c),c*=e/p),a.moveTo(d+l,f),a.lineTo(d+g-u,f),0!==u&&a.arc(d+g-u,f+u,u,-Math.PI/2,0),a.lineTo(d+g,f+e-h),0!==h&&a.arc(d+g-h,f+e-h,h,0,Math.PI/2),a.lineTo(d+c,f+e),0!==c&&a.arc(d+c,f+e-c,c,Math.PI/2,Math.PI),a.lineTo(d,f+l),0!==l&&a.arc(d+l,f+l,l,Math.PI,1.5*Math.PI)):t.rect(n,i,o,r)},ya.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},ya);function ya(t){return pa.call(this,t)||this}ga.prototype.type="rect";var ma,va=function(){this.cx=0,this.cy=0,this.rx=0,this.ry=0},xa=(l(_a,ma=Dr),_a.prototype.getDefaultShape=function(){return new va},_a.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,o=e.rx,r=e.ry,a=.5522848*o,e=.5522848*r;t.moveTo(n-o,i),t.bezierCurveTo(n-o,i-e,n-a,i-r,n,i-r),t.bezierCurveTo(n+a,i-r,n+o,i-e,n+o,i),t.bezierCurveTo(n+o,i+e,n+a,i+r,n,i+r),t.bezierCurveTo(n-a,i+r,n-o,i+e,n-o,i),t.closePath()},_a);function _a(t){return ma.call(this,t)||this}xa.prototype.type="ellipse";var ba,wa={},Sa=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1},Ma=(l(Ia,ba=Dr),Ia.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},Ia.prototype.getDefaultShape=function(){return new Sa},Ia.prototype.buildPath=function(t,e){var n,i,o,r;r=this.subPixelOptimize?(n=(r=ua(wa,e,this.style)).x1,i=r.y1,o=r.x2,r.y2):(n=e.x1,i=e.y1,o=e.x2,e.y2);e=e.percent;0!==e&&(t.moveTo(n,i),e<1&&(o=n*(1-e)+o*e,r=i*(1-e)+r*e),t.lineTo(o,r))},Ia.prototype.pointAt=function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]},Ia);function Ia(t){return ba.call(this,t)||this}function Ta(t,e,n,i,o,r,a){t=.5*(n-t),i=.5*(i-e);return(2*(e-n)+t+i)*a+(-3*(e-n)-2*t-i)*r+t*o+e}function Ca(t,e,n){var i=e.smooth,o=e.points;if(o&&2<=o.length){if(i&&"spline"!==i){var r=function(t,e,n,i){var o,r,a,s,l=[],u=[],h=[],c=[];if(i){a=[1/0,1/0],s=[-1/0,-1/0];for(var p=0,d=t.length;p<d;p++)Rt(a,a,t[p]),Nt(s,s,t[p]);Rt(a,a,i[0]),Nt(s,s,i[1])}for(p=0,d=t.length;p<d;p++){var f=t[p];if(n)o=t[p?p-1:d-1],r=t[(p+1)%d];else{if(0===p||p===d-1){l.push(xt(t[p]));continue}o=t[p-1],r=t[p+1]}St(u,r,o),Tt(u,u,e);var g=Dt(f,o),y=Dt(f,r),m=g+y;0!==m&&(g/=m,y/=m),Tt(h,u,-g),Tt(c,u,y);y=bt([],f,h),f=bt([],f,c);i&&(Nt(y,y,a),Rt(y,y,s),Nt(f,f,a),Rt(f,f,s)),l.push(y),l.push(f)}return n&&l.push(l.shift()),l}(o,i,n,e.smoothConstraint);t.moveTo(o[0][0],o[0][1]);for(var a=o.length,s=0;s<(n?a:a-1);s++){var l=r[2*s],u=r[2*s+1],h=o[(s+1)%a];t.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{"spline"===i&&(o=function(t,e){for(var n=t.length,i=[],o=0,r=1;r<n;r++)o+=Dt(t[r-1],t[r]);for(var a=(a=o/2)<n?n:a,r=0;r<a;r++){var s=r/(a-1)*(e?n:n-1),l=Math.floor(s),u=s-l,h=void 0,c=t[l%n],p=void 0,d=void 0,d=e?(h=t[(l-1+n)%n],p=t[(l+1)%n],t[(l+2)%n]):(h=t[0===l?l:l-1],p=t[n-2<l?n-1:l+1],t[n-3<l?n-1:l+2]),s=u*u,l=u*s;i.push([Ta(h[0],c[0],p[0],d[0],u,s,l),Ta(h[1],c[1],p[1],d[1],u,s,l)])}return i}(o,n)),t.moveTo(o[0][0],o[0][1]);for(var s=1,c=o.length;s<c;s++)t.lineTo(o[s][0],o[s][1])}n&&t.closePath()}}Ma.prototype.type="line";var Da,Aa=function(){this.points=null,this.smooth=0,this.smoothConstraint=null},La=(l(ka,Da=Dr),ka.prototype.getDefaultShape=function(){return new Aa},ka.prototype.buildPath=function(t,e){Ca(t,e,!0)},ka);function ka(t){return Da.call(this,t)||this}La.prototype.type="polygon";var Pa,Oa=function(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null},Ra=(l(Na,Pa=Dr),Na.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},Na.prototype.getDefaultShape=function(){return new Oa},Na.prototype.buildPath=function(t,e){Ca(t,e,!1)},Na);function Na(t){return Pa.call(this,t)||this}Ra.prototype.type="polyline";var Ea=(za.prototype.addColorStop=function(t,e){this.colorStops.push({offset:t,color:e})},za);function za(t){this.colorStops=t||[]}var Ba,Va=(l(Fa,Ba=Ea),Fa);function Fa(t,e,n,i,o,r){o=Ba.call(this,o)||this;return o.x=null==t?0:t,o.y=null==e?0:e,o.x2=null==n?1:n,o.y2=null==i?0:i,o.type="linear",o.global=r||!1,o}var Ga,Ha=A({strokeFirst:!0,font:Un,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},Ir),Wa=(l(Xa,Ga=oo),Xa.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return null!=e&&"none"!==e&&0<t.lineWidth},Xa.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},Xa.prototype.createStyle=function(t){return dt(Ha,t)},Xa.prototype.setBoundingRect=function(t){this._rect=t},Xa.prototype.getBoundingRect=function(){var t,e=this.style;return this._rect||(null!=(t=e.text)?t+="":t="",(t=Kn(t,e.font,e.textAlign,e.textBaseline)).x+=e.x||0,t.y+=e.y||0,this.hasStroke()&&(e=e.lineWidth,t.x-=e/2,t.y-=e/2,t.width+=e,t.height+=e),this._rect=t),this._rect},Xa.initDefaultProps=void(Xa.prototype.dirtyRectTolerance=10),Xa);function Xa(){return null!==Ga&&Ga.apply(this,arguments)||this}Wa.prototype.type="tspan";var Ya,Ua=/[\s,]+/;function Za(t){H(t)&&(t=(new DOMParser).parseFromString(t,"text/xml"));var e=t;for(9===e.nodeType&&(e=e.firstChild);"svg"!==e.nodeName.toLowerCase()||1!==e.nodeType;)e=e.nextSibling;return e}var ja=(qa.prototype.parse=function(t,e){e=e||{};var n=Za(t);if(!n)throw new Error("Illegal svg");var i=new $r;this._root=i;var o=n.getAttribute("viewBox")||"",r=parseFloat(n.getAttribute("width")||e.width),t=parseFloat(n.getAttribute("height")||e.height);isNaN(r)&&(r=null),isNaN(t)&&(t=null),ts(n,i,null,!0);for(var a,s,l,u=n.firstChild;u;)this._parseNode(u,i),u=u.nextSibling;return!o||4<=(s=rt(o).split(Ua)).length&&(a={x:parseFloat(s[0]||0),y:parseFloat(s[1]||0),width:parseFloat(s[2]),height:parseFloat(s[3])}),a&&null!=r&&null!=t&&(l=rs(a,r,t),e.ignoreViewBox||(s=i,(i=new $r).add(s),s.scaleX=s.scaleY=l.scale,s.x=l.x,s.y=l.y)),e.ignoreRootClip||null==r||null==t||i.setClipPath(new ga({shape:{x:0,y:0,width:r,height:t}})),{root:i,width:r,height:t,viewBoxRect:a,viewBoxTransform:l}},qa.prototype._parseNode=function(t,e){var n,i,o,r,a=t.nodeName.toLowerCase();if("defs"===a?this._isDefine=!0:"text"===a&&(this._isText=!0),this._isDefine?(r=Ka[a])&&(i=r.call(this,t),(o=t.getAttribute("id"))&&(this._defs[o]=i)):(r=Ya[a])&&(n=r.call(this,t,e),e.add(n)),n)for(var s=t.firstChild;s;)1===s.nodeType&&this._parseNode(s,n),3===s.nodeType&&this._isText&&this._parseText(s,n),s=s.nextSibling;"defs"===a?this._isDefine=!1:"text"===a&&(this._isText=!1)},qa.prototype._parseText=function(t,e){1===t.nodeType&&(n=t.getAttribute("dx")||0,i=t.getAttribute("dy")||0,this._textX+=parseFloat(n),this._textY+=parseFloat(i));var n=new Wa({style:{text:t.textContent},x:this._textX||0,y:this._textY||0});$a(e,n),ts(t,n,this._defs);var i=n.style,t=i.fontSize;t&&t<9&&(i.fontSize=9,n.scaleX*=t/9,n.scaleY*=t/9);t=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=t;t=n.getBoundingRect();return this._textX+=t.width,e.add(n),n},qa.internalField=void(Ya={g:function(t,e){var n=new $r;return $a(e,n),ts(t,n,this._defs),n},rect:function(t,e){var n=new ga;return $a(e,n),ts(t,n,this._defs),n.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),n},circle:function(t,e){var n=new aa;return $a(e,n),ts(t,n,this._defs),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),n},line:function(t,e){var n=new Ma;return $a(e,n),ts(t,n,this._defs),n.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),n},ellipse:function(t,e){var n=new xa;return $a(e,n),ts(t,n,this._defs),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),n},polygon:function(t,e){var n=t.getAttribute("points");n&&(i=Ja(n));var i=new La({shape:{points:i||[]}});return $a(e,i),ts(t,i,this._defs),i},polyline:function(t,e){var n=new Dr;$a(e,n),ts(t,n,this._defs);var i,t=t.getAttribute("points");return t&&(i=Ja(t)),new Ra({shape:{points:i||[]}})},image:function(t,e){var n=new na;return $a(e,n),ts(t,n,this._defs),n.setStyle({image:t.getAttribute("xlink:href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),n},text:function(t,e){var n=t.getAttribute("x")||"0",i=t.getAttribute("y")||"0",o=t.getAttribute("dx")||"0",r=t.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(o),this._textY=parseFloat(i)+parseFloat(r);r=new $r;return $a(e,r),ts(t,r,this._defs),r},tspan:function(t,e){var n=t.getAttribute("x"),i=t.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i));var o=t.getAttribute("dx")||0,n=t.getAttribute("dy")||0,i=new $r;return $a(e,i),ts(t,i,this._defs),this._textX+=o,this._textY+=n,i},path:function(t,e){var n=qr(t.getAttribute("d")||"");return $a(e,n),ts(t,n,this._defs),n}}),qa);function qa(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}var Ka={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||"0",10),n=parseInt(t.getAttribute("y1")||"0",10),i=parseInt(t.getAttribute("x2")||"10",10),o=parseInt(t.getAttribute("y2")||"0",10),o=new Va(e,n,i,o);return function(t,e){var n=t.firstChild;for(;n;){var i,o;1===n.nodeType&&(o=n.getAttribute("offset"),i=void 0,i=0<o.indexOf("%")?parseInt(o,10)/100:o?parseFloat(o):0,o=n.getAttribute("stop-color")||"#000000",e.colorStops.push({offset:i,color:o})),n=n.nextSibling}}(t,o),o}};function $a(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),A(e.__inheritedStyle,t.__inheritedStyle))}function Ja(t){for(var e=rt(t).split(Ua),n=[],i=0;i<e.length;i+=2){var o=parseFloat(e[i]),r=parseFloat(e[i+1]);n.push([o,r])}return n}var Qa={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 ts(t,e,n,i){var o,r=e,a=r.__inheritedStyle||{};if(1===t.nodeType&&(function(t,e){t=t.getAttribute("transform");if(t){t=t.replace(/,/g," ");var i=[],n=null;t.replace(is,function(t,e,n){return i.push(e,n),""});for(var o=i.length-1;0<o;o-=2){var r=i[o],a=i[o-1],s=void 0;switch(n=n||_e(),a){case"translate":s=rt(r).split(Ua),Me(n,n,[parseFloat(s[0]),parseFloat(s[1]||"0")]);break;case"scale":s=rt(r).split(Ua),Te(n,n,[parseFloat(s[0]),parseFloat(s[1]||s[0])]);break;case"rotate":s=rt(r).split(Ua),Ie(n,n,parseFloat(s[0]));break;case"skew":s=rt(r).split(Ua),console.warn("Skew transform is not supported yet");break;case"matrix":s=rt(r).split(Ua),n[0]=parseFloat(s[0]),n[1]=parseFloat(s[1]),n[2]=parseFloat(s[2]),n[3]=parseFloat(s[3]),n[4]=parseFloat(s[4]),n[5]=parseFloat(s[5])}}e.setLocalTransform(n)}}(t,e),O(a,function(t){var e=t.getAttribute("style"),n={};if(!e)return n;var i,o,r={};os.lastIndex=0;for(;null!=(i=os.exec(e));)r[i[1]]=i[2];for(o in Qa)Qa.hasOwnProperty(o)&&null!=r[o]&&(n[Qa[o]]=r[o]);return n}(t)),!i))for(var s in Qa){!Qa.hasOwnProperty(s)||null!=(o=t.getAttribute(s))&&(a[Qa[s]]=o)}r.style=r.style||{},null!=a.fill&&(r.style.fill=ns(a.fill,n)),null!=a.stroke&&(r.style.stroke=ns(a.stroke,n)),N(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(t){null!=a[t]&&(r.style[t]=parseFloat(a[t]))}),a.textBaseline&&"auto"!==a.textBaseline||(a.textBaseline="alphabetic"),"alphabetic"===a.textBaseline&&(a.textBaseline="bottom"),"start"===a.textAlign&&(a.textAlign="left"),"end"===a.textAlign&&(a.textAlign="right"),N(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],function(t){null!=a[t]&&(r.style[t]=a[t])}),a.lineDash&&(r.style.lineDash=P(rt(a.lineDash).split(Ua),function(t){return parseFloat(t)})),r.__inheritedStyle=a}var es=/url\(\s*#(.*?)\)/;function ns(t,e){var n=e&&t&&t.match(es);return n?e[rt(n[1])]:t}var is=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;var os=/([^\s:;]+)\s*:\s*([^:;]+)/g;function rs(t,e,n){var i=e/t.width,o=n/t.height,o=Math.min(i,o);return{scale:o,x:-(t.x+t.width/2)*o+e/2,y:-(t.y+t.height/2)*o+n/2}}var as=Math.PI,ss=2*as,ls=Math.sin,us=Math.cos,hs=Math.acos,cs=Math.atan2,ps=Math.abs,ds=Math.sqrt,fs=Math.max,gs=Math.min,ys=1e-4;function ms(t,e,n,i,o,r,a){var s=t-n,l=e-i,u=(a?r:-r)/ds(s*s+l*l),h=u*l,c=-u*s,p=t+h,d=e+c,a=n+h,l=i+c,u=(p+a)/2,s=(d+l)/2,t=a-p,e=l-d,n=t*t+e*e,i=o-r,r=p*l-a*d,p=(e<0?-1:1)*ds(fs(0,i*i*n-r*r)),l=(r*e-t*p)/n,a=(-r*t-e*p)/n,d=(r*e+t*p)/n,e=(-r*t+e*p)/n,p=l-u,n=a-s,u=d-u,s=e-s;return u*u+s*s<p*p+n*n&&(l=d,a=e),{cx:l,cy:a,x01:-h,y01:-c,x11:l*(o/i-1),y11:a*(o/i-1)}}function vs(t,e){var n,i,o,r,a,s,l,u,h,c,p,d,f,g,y,m,v,x,_,b,w,S,M,I=fs(e.r,0),T=fs(e.r0||0,0),C=0<I;(C||0<T)&&(C||(I=T,T=0),I<T&&(w=I,I=T,T=w),n=!!e.clockwise,sr(m=[i=e.startAngle,o=e.endAngle],!n),r=ps(m[0]-m[1]),a=e.cx,s=e.cy,f=e.cornerRadius||0,y=e.innerCornerRadius||0,ys<I?ss-ys<r?(t.moveTo(a+I*us(i),s+I*ls(i)),t.arc(a,s,I,i,o,!n),ys<T&&(t.moveTo(a+T*us(o),s+T*ls(o)),t.arc(a,s,T,o,i,n))):(g=ps(I-T)/2,l=gs(g,f),v=u=gs(g,y),x=l,h=I*us(i),c=I*ls(i),p=T*us(o),d=T*ls(o),w=C=b=_=void 0,(ys<l||ys<u)&&(_=I*us(o),b=I*ls(o),C=T*us(i),w=T*ls(i),r<as&&((m=function(t,e,n,i,o,r,a,s){var l=n-t,n=i-e,i=a-o;if(!((s=(a=s-r)*l-i*n)*s<ys))return[t+(s=(i*(e-r)-a*(t-o))/s)*l,e+s*n]}(h,c,C,w,_,b,p,d))&&(e=h-m[0],f=c-m[1],g=_-m[0],y=b-m[1],y=1/ls(hs((e*g+f*y)/(ds(e*e+f*f)*ds(g*g+y*y)))/2),m=ds(m[0]*m[0]+m[1]*m[1]),v=gs(u,(T-m)/(y-1)),x=gs(l,(I-m)/(1+y))))),ys<r?ys<x?(S=ms(C,w,h,c,I,x,n),M=ms(_,b,p,d,I,x,n),t.moveTo(a+S.cx+S.x01,s+S.cy+S.y01),x<l?t.arc(a+S.cx,s+S.cy,x,cs(S.y01,S.x01),cs(M.y01,M.x01),!n):(t.arc(a+S.cx,s+S.cy,x,cs(S.y01,S.x01),cs(S.y11,S.x11),!n),t.arc(a,s,I,cs(S.cy+S.y11,S.cx+S.x11),cs(M.cy+M.y11,M.cx+M.x11),!n),t.arc(a+M.cx,s+M.cy,x,cs(M.y11,M.x11),cs(M.y01,M.x01),!n))):(t.moveTo(a+h,s+c),t.arc(a,s,I,i,o,!n)):t.moveTo(a+h,s+c),ys<T&&ys<r?ys<v?(S=ms(p,d,_,b,T,-v,n),M=ms(h,c,C,w,T,-v,n),t.lineTo(a+S.cx+S.x01,s+S.cy+S.y01),v<u?t.arc(a+S.cx,s+S.cy,v,cs(S.y01,S.x01),cs(M.y01,M.x01),!n):(t.arc(a+S.cx,s+S.cy,v,cs(S.y01,S.x01),cs(S.y11,S.x11),!n),t.arc(a,s,T,cs(S.cy+S.y11,S.cx+S.x11),cs(M.cy+M.y11,M.cx+M.x11),n),t.arc(a+M.cx,s+M.cy,v,cs(M.y11,M.x11),cs(M.y01,M.x01),!n))):(t.lineTo(a+p,s+d),t.arc(a,s,T,o,i,n)):t.lineTo(a+p,s+d)):t.moveTo(a,s),t.closePath())}var xs,_s=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0,this.innerCornerRadius=0},bs=(l(ws,xs=Dr),ws.prototype.getDefaultShape=function(){return new _s},ws.prototype.buildPath=function(t,e){vs(t,e)},ws.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},ws);function ws(t){return xs.call(this,t)||this}bs.prototype.type="sector";var Ss=lr.CMD,Ms=2*Math.PI,Is=["x","y"],Ts=["width","height"],Cs=[];function Ds(t,e){return Math.abs(t-e)<1e-5}function As(t){var o,e=t.data,n=t.len(),i=[],r=0,a=0,s=0,l=0;function u(t,e){o&&2<o.length&&i.push(o),o=[t,e]}function h(t,e,n,i){Ds(t,n)&&Ds(e,i)||o.push(t,e,n,i,n,i)}for(var c,p,d,f,g,y,m,v,x,_,b,w,S=0;S<n;){var M=e[S++],I=1===S;switch(I&&(s=r=e[S],l=a=e[S+1],M!==Ss.L&&M!==Ss.C&&M!==Ss.Q||(o=[s,l])),M){case Ss.M:r=s=e[S++],a=l=e[S++],u(s,l);break;case Ss.L:h(r,a,O=e[S++],R=e[S++]),r=O,a=R;break;case Ss.C:o.push(e[S++],e[S++],e[S++],e[S++],r=e[S++],a=e[S++]);break;case Ss.Q:O=e[S++],R=e[S++],M=e[S++],L=e[S++],o.push(r+2/3*(O-r),a+2/3*(R-a),M+2/3*(O-M),L+2/3*(R-L),M,L),r=M,a=L;break;case Ss.A:var T=e[S++],C=e[S++],D=e[S++],A=e[S++],L=e[S++],k=e[S++]+L;S+=1;var P=!e[S++],O=Math.cos(L)*D+T,R=Math.sin(L)*A+C;I?u(s=O,l=R):h(r,a,O,R),r=Math.cos(k)*D+T,a=Math.sin(k)*A+C;for(var N=(P?-1:1)*Math.PI/2,E=L;P?k<E:E<k;E+=N){var z=P?Math.max(E+N,k):Math.min(E+N,k);c=E,p=z,d=T,f=C,g=D,y=A,x=m=w=b=_=x=v=m=void 0,m=Math.abs(p-c),v=4*Math.tan(m/4)/3,x=p<c?-1:1,_=Math.cos(c),b=Math.sin(c),w=Math.cos(p),m=Math.sin(p),c=_*g+d,p=b*y+f,d=w*g+d,f=m*y+f,g=g*v*x,x*=y*v,o.push(c-g*b,p+x*_,d+g*m,f-x*w,d,f)}break;case Ss.R:s=r=e[S++],l=a=e[S++],O=s+e[S++],R=l+e[S++],u(O,l),h(O,l,O,R),h(O,R,s,R),h(s,R,s,l),h(s,l,O,l);break;case Ss.Z:o&&h(r,a,s,l),r=s,a=l}}return o&&2<o.length&&i.push(o),i}function Ls(t,e){for(var n=t.length,i=t[n-2],o=t[n-1],r=[],a=0;a<e.length;)r[a++]=i,r[a++]=o;return r}function ks(t,e){for(var n,i,o=[],r=[],a=0;a<Math.max(t.length,e.length);a++){var s=t[a],l=e[a],u=void 0,h=void 0;s?l?(n=u=(i=function(t,e){var n=t.length,i=e.length;if(n===i)return[t,e];for(var o=n<i?t:e,r=Math.min(n,i),i=Math.abs(i-n)/6,n=(r-2)/6,a=Math.ceil(i/n)+1,s=[o[0],o[1]],l=i,u=[],h=[],c=2;c<r;){var p=o[c-2],d=o[c-1],f=o[c++],g=o[c++],y=o[c++],m=o[c++],v=o[c++],x=o[c++];if(l<=0)s.push(f,g,y,m,v,x);else{for(var _=Math.min(l,a-1)+1,b=1;b<=_;b++){var w=b/_;Mo(p,f,y,v,w,u),Mo(d,g,m,x,w,h),p=u[3],d=h[3],s.push(u[1],h[1],u[2],h[2],p,d),f=u[5],g=h[5],y=u[6],m=h[6]}l-=_-1}}return o===t?[s,e]:[t,s]}(s,l))[0],i=h=i[1]):(h=Ls(i||s,s),u=s):(u=Ls(n||l,l),h=l),o.push(u),r.push(h)}return[o,r]}function Ps(t){for(var e=0,n=0,i=0,o=t.length,r=0,a=o-2;r<o;a=r,r+=2){var s=t[a],l=t[a+1],u=t[r],h=t[r+1],c=s*h-u*l;e+=c,n+=(s+u)*c,i+=(l+h)*c}return 0===e?[t[0]||0,t[1]||0]:[n/e/3,i/e/3,e]}function Os(t,e,n,i){for(var o,r=[],a=0;a<t.length;a++){var s=t[a],l=e[a],u=Ps(s),h=Ps(l);null==o&&(o=u[2]<0!=h[2]<0);var c=[],p=[],d=0,f=1/0,g=[],y=s.length;o&&(s=function(t){for(var e=[],n=t.length,i=0;i<n;i+=2)e[i]=t[n-i-2],e[i+1]=t[n-i-1];return e}(s));for(var m=6*function(t,e,n,i){for(var o=(t.length-2)/6,r=1/0,a=0,s=t.length,l=s-2,u=0;u<o;u++){for(var h=6*u,c=0,p=0;p<s;p+=2){var d=0===p?h:(h+p-2)%l+2,f=t[d]-n[0],d=t[1+d]-n[1],f=e[p]-i[0]-f,d=e[p+1]-i[1]-d;c+=f*f+d*d}c<r&&(r=c,a=u)}return a}(s,l,u,h),v=y-2,x=0;x<v;x+=2){var _=(m+x)%v+2;c[x+2]=s[_]-u[0],c[x+3]=s[1+_]-u[1]}if(c[0]=s[m]-u[0],c[1]=s[1+m]-u[1],0<n)for(var b=i/n,w=-i/2;w<=i/2;w+=b){for(var S=Math.sin(w),M=Math.cos(w),I=0,x=0;x<s.length;x+=2){var T=c[x],C=c[x+1],D=l[x]-h[0],A=l[x+1]-h[1],L=D*M-A*S,A=D*S+A*M,T=(g[x]=L)-T,C=(g[x+1]=A)-C;I+=T*T+C*C}if(I<f){f=I,d=w;for(var k=0;k<g.length;k++)p[k]=g[k]}}else for(var P=0;P<y;P+=2)p[P]=l[P]-h[0],p[P+1]=l[P+1]-h[1];r.push({from:c,to:p,fromCp:u,toCp:h,rotation:-d})}return r}function Rs(t,e,n){var i;if(!t||!e)return e;t.path||t.createPathProxy(),(i=t.path).beginPath(),t.buildPath(i,t.shape),e.path||e.createPathProxy(),(t=e.path)===i&&(t=new lr(!1)),t.beginPath(),zs(e)?e.__oldBuildPath(t,e.shape):e.buildPath(t,e.shape);t=ks(As(i),As(t)),t=Os(t[0],t[1],10,Math.PI);!function(t,e,n){if(zs(t))return Es(t,e,n);t.__oldBuildPath=t.buildPath,t.buildPath=Ns,Es(t,e,n)}(e,t,0);var o=n&&n.done,r=n&&n.aborted,a=n&&n.during;return e.animateTo({__morphT:1},A({during:function(t){e.dirtyShape(),a&&a(t)},done:function(){var t;zs(t=e)&&(t.buildPath=t.__oldBuildPath,t.__oldBuildPath=t.__morphingData=null),e.createPathProxy(),e.dirtyShape(),o&&o()},aborted:function(){r&&r()}},n)),e}function Ns(t){for(var e=this.__morphingData,n=this.__morphT,i=1-n,o=[],r=0;r<e.length;r++){var a=e[r],s=a.from,l=a.to,u=a.rotation*n,h=a.fromCp,a=a.toCp,c=Math.sin(u),p=Math.cos(u);Pt(o,h,a,n);for(var d=0;d<s.length;d+=2){var f=s[d],g=s[d+1],f=f*i+l[d]*n,g=g*i+l[d+1]*n;Cs[d]=f*p-g*c+o[0],Cs[d+1]=f*c+g*p+o[1]}for(d=0;d<s.length;)0===d&&t.moveTo(Cs[d++],Cs[d++]),t.bezierCurveTo(Cs[d++],Cs[d++],Cs[d++],Cs[d++],Cs[d++],Cs[d++])}}function Es(t,e,n){t.__morphingData=e,t.__morphT=n}function zs(t){return null!=t.__oldBuildPath}function Bs(t){return!!t.__combiningSubList}function Vs(t,e,n,i){for(var o=[],r=0,a=0;a<t.length;a++){var s=t[a];if(Bs(s)){for(var l=s.__combiningSubList,u=0;u<l.length;u++)o.push(l[u]);r+=l.length}else o.push(s),r++}if(r){var h=n?n.dividingMethod:null,c=Ys(e,r,h);ot(c.length===r);for(var p=n&&n.done,d=n&&n.aborted,f=n&&n.during,g=0,y=!1,m=A({during:function(t){f&&f(t)},done:function(){++g===c.length&&(function(t){if(!Bs(t))return;Fs(t,null),t.addSelfToZr=t.__oldAddSelfToZr,t.removeSelfFromZr=t.__oldRemoveSelfFromZr,t.buildPath=t.__oldBuildPath,t.childrenRef=t.__combiningSubList=t.__oldAddSelfToZr=t.__oldRemoveSelfFromZr=t.__oldBuildPath=null}(e),p&&p())},aborted:function(){y||(y=!0,d&&d())}},n),a=0;a<r;a++){var v=o[a],x=c[a];i&&i(e,x,!0),Rs(v,x,m)}return function(t,e){if(Bs(t))return Fs(t,e);var n=t;Fs(n,e),n.__oldAddSelfToZr=t.addSelfToZr,n.__oldRemoveSelfFromZr=t.removeSelfFromZr,n.addSelfToZr=Gs,n.removeSelfFromZr=Ws,n.__oldBuildPath=n.buildPath,n.buildPath=gt,n.childrenRef=Xs}(e,c),{fromIndividuals:o,toIndividuals:c,count:r}}}function Fs(t,e){if(t.__combiningSubList!==e){if(Hs(t,"removeSelfFromZr"),t.__combiningSubList=e)for(var n=0;n<e.length;n++)e[n].parent=t;Hs(t,"addSelfToZr")}}function Gs(t){this.__oldAddSelfToZr(t),Hs(this,"addSelfToZr")}function Hs(t,e){var n=t.__combiningSubList,i=t.__zr;if(n&&i)for(var o=0;o<n.length;o++){n[o][e](i)}}function Ws(t){this.__oldRemoveSelfFromZr(t);for(var e=this.__combiningSubList,n=0;n<e.length;n++){e[n].removeSelfFromZr(t)}}function Xs(){return this.__combiningSubList}function Ys(t,e,n){return("duplicate"===n?Us:function(t,e){var n=[];if(e<=0)return n;if(1===e)return Us(t,e);if(t instanceof ga)for(var i=(c=t.shape).height>c.width?1:0,o=Ts[i],r=Is[i],a=c[o]/e,s=c[r],l=0;l<e;l++,s+=a){var u={x:c.x,y:c.y,width:c.width,height:c.height};u[r]=s,u[o]=l<e-1?a:c[r]+c[o]-s;var h=new ga({shape:u});n.push(h)}else{if(!(t instanceof bs))return Us(t,e);for(var c,p=(c=t.shape).clockwise,t=c.startAngle,d=c.endAngle,f=(function(t,e,n){return e+Ms*Math[n?"ceil":"floor"]((t-e)/Ms)}(t,c.endAngle,p)-t)/e,g=t,l=0;l<e;l++,g+=f){h=new bs({shape:{cx:c.cx,cy:c.cy,r:c.r,r0:c.r0,clockwise:p,startAngle:g,endAngle:l===e-1?d:g+f}});n.push(h)}}return n})(t,e)}function Us(t,e){var n=[];if(e<=0)return n;for(var i=t.constructor,o=0;o<e;o++){var r=new i({shape:C(t.shape)});n.push(r)}return n}var Zs,js=(l(qs,Zs=Dr),qs.prototype._updatePathDirty=function(){for(var t=this.shape.paths,e=this.shapeChanged(),n=0;n<t.length;n++)e=e||t[n].shapeChanged();e&&this.dirtyShape()},qs.prototype.beforeBrush=function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),n=0;n<t.length;n++)t[n].path||t[n].createPathProxy(),t[n].path.setScale(e[0],e[1],t[n].segmentIgnoreThreshold)},qs.prototype.buildPath=function(t,e){for(var n=e.paths||[],i=0;i<n.length;i++)n[i].buildPath(t,n[i].shape,!0)},qs.prototype.afterBrush=function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].pathUpdated()},qs.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),Dr.prototype.getBoundingRect.call(this)},qs);function qs(){var t=null!==Zs&&Zs.apply(this,arguments)||this;return t.type="compound",t}var Ks,$s=[],Js=(l(Qs,Ks=oo),Qs.prototype.traverse=function(t,e){t.call(e,this)},Qs.prototype.useStyle=function(){this.style={}},Qs.prototype.getCursor=function(){return this._cursor},Qs.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},Qs.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},Qs.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},Qs.prototype.addDisplayable=function(t,e){(e?this._temporaryDisplayables:this._displayables).push(t),this.markRedraw()},Qs.prototype.addDisplayables=function(t,e){e=e||!1;for(var n=0;n<t.length;n++)this.addDisplayable(t[n],e)},Qs.prototype.getDisplayables=function(){return this._displayables},Qs.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},Qs.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])},Qs.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(var e,t=0;t<this._temporaryDisplayables.length;t++){(e=this._temporaryDisplayables[t]).parent=this,e.update(),e.parent=null}},Qs.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new Gn(1/0,1/0,-1/0,-1/0),e=0;e<this._displayables.length;e++){var n=this._displayables[e],i=n.getBoundingRect().clone();n.needLocalTransform()&&i.applyTransform(n.getLocalTransform($s)),t.union(i)}this._rect=t}return this._rect},Qs.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e);if(this.getBoundingRect().contain(n[0],n[1]))for(var i=0;i<this._displayables.length;i++){if(this._displayables[i].contain(t,e))return!0}return!1},Qs);function Qs(){var t=null!==Ks&&Ks.apply(this,arguments)||this;return t.notClear=!0,t.incremental=!0,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}var tl=new Xe(50);function el(t,e,n,i,o){if(t){if("string"!=typeof t)return t;if(e&&e.__zrImageSrc===t||!n)return e;var r=tl.get(t),o={hostEl:n,cb:i,cbPayload:o};return r?il(e=r.image)||r.pending.push(o):((e=new Image).onload=e.onerror=nl,tl.put(t,e.__cachedImgObj={image:e,pending:[o]}),e.src=e.__zrImageSrc=t),e}return e}function nl(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var n=t.pending[e],i=n.cb;i&&i(this,n.cbPayload),n.hostEl.dirty()}t.pending.length=0}function il(t){return t&&t.width&&t.height}var ol=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function rl(t,e,n,i,o){if(!e)return"";var r=(t+"").split("\n");o=al(e,n,i,o);for(var a=0,s=r.length;a<s;a++)r[a]=sl(r[a],o);return r.join("\n")}function al(t,e,n,i){var o=O({},i=i||{});o.font=e,n=tt(n,"..."),o.maxIterations=tt(i.maxIterations,2);var r=o.minChar=tt(i.minChar,0);o.cnCharWidth=jn("国",e);var a=o.ascCharWidth=jn("a",e);o.placeholder=tt(i.placeholder,"");for(var s=t=Math.max(0,t-1),l=0;l<r&&a<=s;l++)s-=a;e=jn(n,e);return s<e&&(n="",e=0),s=t-e,o.ellipsis=n,o.ellipsisWidth=e,o.contentWidth=s,o.containerWidth=t,o}function sl(t,e){var n=e.containerWidth,i=e.font,o=e.contentWidth;if(!n)return"";if((s=jn(t,i))<=n)return t;for(var r=0;;r++){if(s<=o||r>=e.maxIterations){t+=e.ellipsis;break}var a=0===r?function(t,e,n,i){for(var o=0,r=0,a=t.length;r<a&&o<e;r++){var s=t.charCodeAt(r);o+=0<=s&&s<=127?n:i}return r}(t,o,e.ascCharWidth,e.cnCharWidth):0<s?Math.floor(t.length*o/s):0,s=jn(t=t.substr(0,a),i)}return""===t&&(t=e.placeholder),t}var ll=function(){},ul=function(t){this.tokens=[],t&&(this.tokens=t)},hl=function(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[]};function cl(t,e){var n=new hl;if(null!=t&&(t+=""),!t)return n;for(var i,o=e.width,r=e.height,a=e.overflow,s="break"!==a&&"breakAll"!==a||null==o?null:{width:o,accumWidth:0,breakAll:"breakAll"===a},l=ol.lastIndex=0;null!=(i=ol.exec(t));){var u=i.index;l<u&&pl(n,t.substring(l,u),e,s),pl(n,i[2],e,s,i[1]),l=ol.lastIndex}l<t.length&&pl(n,t.substring(l,t.length),e,s);var h=[],c=0,p=0,d=e.padding,f="truncate"===a,g="truncate"===e.lineOverflow;function y(t,e,n){t.width=e,t.lineHeight=n,c+=n,p=Math.max(p,e)}t:for(var m=0;m<n.lines.length;m++){for(var v=n.lines[m],x=0,_=0,b=0;b<v.tokens.length;b++){var w=(A=v.tokens[b]).styleName&&e.rich[A.styleName]||{},S=A.textPadding=w.padding,M=S?S[1]+S[3]:0,I=A.font=w.font||e.font;A.contentHeight=Qn(I);var T=tt(w.height,A.contentHeight);if(A.innerHeight=T,S&&(T+=S[0]+S[2]),A.height=T,A.lineHeight=et(w.lineHeight,e.lineHeight,T),A.align=w&&w.align||e.align,A.verticalAlign=w&&w.verticalAlign||"middle",g&&null!=r&&c+A.lineHeight>r){0<b?(v.tokens=v.tokens.slice(0,b),y(v,_,x),n.lines=n.lines.slice(0,m+1)):n.lines=n.lines.slice(0,m);break t}var C,D=w.width,S=null==D||"auto"===D;"string"==typeof D&&"%"===D.charAt(D.length-1)?(A.percentWidth=D,h.push(A),A.contentWidth=jn(A.text,I)):(!S||(C=(D=w.backgroundColor)&&D.image)&&il(C="string"!=typeof(D=C)?D:(D=tl.get(D))&&D.image)&&(A.width=Math.max(A.width,C.width*T/C.height)),null!=(C=f&&null!=o?o-_:null)&&C<A.width?!S||C<M?(A.text="",A.width=A.contentWidth=0):(A.text=rl(A.text,C-M,I,e.ellipsis,{minChar:e.truncateMinChar}),A.width=A.contentWidth=jn(A.text,I)):A.contentWidth=jn(A.text,I)),A.width+=M,_+=A.width,w&&(x=Math.max(x,A.lineHeight))}y(v,_,x)}n.outerWidth=n.width=tt(o,p),n.outerHeight=n.height=tt(r,c),n.contentHeight=c,n.contentWidth=p,d&&(n.outerWidth+=d[1]+d[3],n.outerHeight+=d[0]+d[2]);for(m=0;m<h.length;m++){var A,L=(A=h[m]).percentWidth;A.width=parseInt(L,10)/100*n.width}return n}function pl(t,e,n,i,o){var r,a,s,l=""===e,u=o&&n.rich[o]||{},h=t.lines,c=u.font||n.font,p=!1;i?(n=(n=u.padding)?n[1]+n[3]:0,null!=u.width&&"auto"!==u.width?(s=function(t,e){if("string"!=typeof t)return t;if(0<=t.lastIndexOf("%"))return parseFloat(t)/100*e;return parseFloat(t)}(u.width,i.width)+n,0<h.length&&s+i.accumWidth>i.width&&(r=e.split("\n"),p=!0),i.accumWidth=s):(s=fl(e,c,i.width,i.breakAll,i.accumWidth),i.accumWidth=s.accumWidth+n,a=s.linesWidths,r=s.lines)):r=e.split("\n");for(var d=0;d<r.length;d++){var f,g,y=r[d],m=new ll;m.styleName=o,m.text=y,m.isLineHolder=!y&&!l,m.width="number"==typeof u.width?u.width:a?a[d]:jn(y,c),d||p?h.push(new ul([m])):1===(g=(f=(h[h.length-1]||(h[0]=new ul)).tokens).length)&&f[0].isLineHolder?f[0]=m:!y&&g&&!l||f.push(m)}}var dl=T(",&?/;] ".split(""),function(t,e){return t[e]=!0,t},{});function fl(t,e,n,i,o){for(var r,a=[],s=[],l="",u="",h=0,c=0,p=0;p<t.length;p++){var d,f,g=t.charAt(p);"\n"!==g?(d=jn(g,e),f=!i&&(r=void 0,!(!(33<=(r=(r=f=g).charCodeAt(0))&&r<=255)||!!dl[f])),(a.length?n<c+d:n<o+c+d)?c?(l||u)&&(c=f?(l||(l=u,u="",c=h=0),a.push(l),s.push(c-h),u+=g,l="",h+=d):(u&&(l+=u,c+=h,u="",h=0),a.push(l),s.push(c),l=g,d)):f?(a.push(u),s.push(h),u=g,h=d):(a.push(g),s.push(d)):(c+=d,f?(u+=g,h+=d):(u&&(l+=u,u="",h=0),l+=g))):(u&&(l+=u,c+=h),a.push(l),s.push(c),u=l="",c=h=0)}return a.length||l||(l=t,u="",h=0),u&&(l+=u),l&&(a.push(l),s.push(c)),1===a.length&&(c+=o),{accumWidth:c,lines:a,linesWidths:s}}var gl,yl={fill:"#000"},ml={style:A({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},eo.style)},vl=(l(xl,gl=oo),xl.prototype.childrenRef=function(){return this._children},xl.prototype.update=function(){this.styleChanged()&&this._updateSubTexts();for(var t=0;t<this._children.length;t++){var e=this._children[t];e.zlevel=this.zlevel,e.z=this.z,e.z2=this.z2,e.culling=this.culling,e.cursor=this.cursor,e.invisible=this.invisible}var n=this.attachedTransform;n?(n.updateTransform(),(n=n.transform)?(this.transform=this.transform||[],we(this.transform,n)):this.transform=null):gl.prototype.update.call(this)},xl.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),this.attachedTransform?this.attachedTransform.getComputedTransform():gl.prototype.getComputedTransform.call(this)},xl.prototype._updateSubTexts=function(){var t;this._childCursor=0,wl(t=this.style),N(t.rich,wl),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},xl.prototype.addSelfToZr=function(t){gl.prototype.addSelfToZr.call(this,t);for(var e=0;e<this._children.length;e++)this._children[e].__zr=t},xl.prototype.removeSelfFromZr=function(t){gl.prototype.removeSelfFromZr.call(this,t);for(var e=0;e<this._children.length;e++)this._children[e].__zr=null},xl.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var t=new Gn(0,0,0,0),e=this._children,n=[],i=null,o=0;o<e.length;o++){var r=e[o],a=r.getBoundingRect(),r=r.getLocalTransform(n);r?(t.copy(a),t.applyTransform(r),(i=i||t.clone()).union(t)):(i=i||a.clone()).union(a)}this._rect=i||t}return this._rect},xl.prototype.setDefaultTextStyle=function(t){this._defaultStyle=t||yl},xl.prototype.setTextContent=function(t){throw new Error("Can't attach text on another text")},xl.prototype._mergeStyle=function(t,e){if(!e)return t;var n=e.rich,i=t.rich||n&&{};return O(t,e),n&&i?(this._mergeRich(i,n),t.rich=i):i&&(t.rich=i),t},xl.prototype._mergeRich=function(t,e){for(var n=z(e),i=0;i<n.length;i++){var o=n[i];t[o]=t[o]||{},O(t[o],e[o])}},xl.prototype.getAnimationStyleProps=function(){return ml},xl.prototype._getOrCreateChild=function(t){var e=this._children[this._childCursor];return e&&e instanceof t||(e=new t),(this._children[this._childCursor++]=e).__zr=this.__zr,e.parent=this,e},xl.prototype._updatePlainTexts=function(){var t,e,n=this.style,i=n.font||Un,o=n.padding,r=function(t,e){null!=t&&(t+="");var n,i=e.overflow,o=e.padding,r=e.font,a="truncate"===i,s=Qn(r),l=tt(e.lineHeight,s),u="truncate"===e.lineOverflow,h=e.width,c=(n=null!=h&&"break"===i||"breakAll"===i?t?fl(t,e.font,h,"breakAll"===i,0).lines:[]:t?t.split("\n"):[]).length*l;(i=tt(e.height,c))<c&&u&&(p=Math.floor(i/l),n=n.slice(0,p));var u=i,p=h;if(o&&(u+=o[0]+o[2],null!=p&&(p+=o[1]+o[3])),t&&a&&null!=p)for(var d=al(h,r,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),f=0;f<n.length;f++)n[f]=sl(n[f],d);if(null==h){for(var g=0,f=0;f<n.length;f++)g=Math.max(jn(n[f],r),g);h=g}return{lines:n,height:i,outerHeight:u,lineHeight:l,calculatedLineHeight:s,contentHeight:c,width:h}}(Il(n),n),a=Tl(n),s=!!n.backgroundColor,l=r.outerHeight,u=r.lines,h=r.lineHeight,c=this._defaultStyle,p=n.x||0,d=n.y||0,f=n.align||c.align||"left",g=n.verticalAlign||c.verticalAlign||"top",y=p,m=Jn(d,r.contentHeight,g);(a||o)&&(t=r.width,o&&(t+=o[1]+o[3]),e=$n(p,t,f),d=Jn(d,l,g),a&&this._renderBackground(n,n,e,d,t,l)),m+=h/2,o&&(y=Ml(p,f,o),"top"===g?m+=o[0]:"bottom"===g&&(m-=o[2]));for(var v=0,g=!1,x=(null==(o="fill"in n?n.fill:(g=!0,c.fill))||"none"===o?null:o.image||o.colorStops?"#000":o),_=(Sl("stroke"in n?n.stroke:s||c.autoStroke&&!g?null:(v=2,c.stroke))),b=0<n.textShadowBlur,w=null!=n.width&&("truncate"===n.overflow||"break"===n.overflow||"breakAll"===n.overflow),S=r.calculatedLineHeight,M=0;M<u.length;M++){var I=this._getOrCreateChild(Wa),T=I.createStyle();I.useStyle(T),T.text=u[M],T.x=y,T.y=m,f&&(T.textAlign=f),T.textBaseline="middle",T.opacity=n.opacity,T.strokeFirst=!0,b&&(T.shadowBlur=n.textShadowBlur||0,T.shadowColor=n.textShadowColor||"transparent",T.shadowOffsetX=n.textShadowOffsetX||0,T.shadowOffsetY=n.textShadowOffsetY||0),_&&(T.stroke=_,T.lineWidth=n.lineWidth||v,T.lineDash=n.lineDash,T.lineDashOffset=n.lineDashOffset||0),x&&(T.fill=x),T.font=i,m+=h,w&&I.setBoundingRect(new Gn($n(T.x,n.width,T.textAlign),Jn(T.y,S,T.textBaseline),n.width,S))}},xl.prototype._updateRichTexts=function(){var t=this.style,e=cl(Il(t),t),n=e.width,i=e.outerWidth,o=e.outerHeight,r=t.padding,a=t.x||0,s=t.y||0,l=this._defaultStyle,u=t.align||l.align,l=t.verticalAlign||l.verticalAlign,u=$n(a,i,u),l=Jn(s,o,l),h=u,c=l;r&&(h+=r[3],c+=r[0]);var p=h+n;Tl(t)&&this._renderBackground(t,t,u,l,i,o);for(var d=!!t.backgroundColor,f=0;f<e.lines.length;f++){for(var g=e.lines[f],y=g.tokens,m=y.length,v=g.lineHeight,x=g.width,_=0,b=h,w=p,S=m-1,M=void 0;_<m&&(!(M=y[_]).align||"left"===M.align);)this._placeToken(M,t,v,c,b,"left",d),x-=M.width,b+=M.width,_++;for(;0<=S&&"right"===(M=y[S]).align;)this._placeToken(M,t,v,c,w,"right",d),x-=M.width,w-=M.width,S--;for(b+=(n-(b-h)-(p-w)-x)/2;_<=S;)M=y[_],this._placeToken(M,t,v,c,b+M.width/2,"center",d),b+=M.width,_++;c+=v}},xl.prototype._placeToken=function(t,e,n,i,o,r,a){var s=e.rich[t.styleName]||{};s.text=t.text;var l=t.verticalAlign,u=i+n/2;"top"===l?u=i+t.height/2:"bottom"===l&&(u=i+n-t.height/2),!t.isLineHolder&&Tl(s)&&this._renderBackground(s,e,"right"===r?o-t.width:"center"===r?o-t.width/2:o,u-t.height/2,t.width,t.height);var h=!!s.backgroundColor,c=t.textPadding;c&&(o=Ml(o,r,c),u-=t.height/2-c[0]-t.innerHeight/2);var p=this._getOrCreateChild(Wa),d=p.createStyle();p.useStyle(d);l=this._defaultStyle,i=!1,n=0,c=Sl("fill"in s?s.fill:"fill"in e?e.fill:(i=!0,l.fill)),i=Sl("stroke"in s?s.stroke:"stroke"in e?e.stroke:h||a||l.autoStroke&&!i?null:(n=2,l.stroke)),l=0<s.textShadowBlur||0<e.textShadowBlur;d.text=t.text,d.x=o,d.y=u,l&&(d.shadowBlur=s.textShadowBlur||e.textShadowBlur||0,d.shadowColor=s.textShadowColor||e.textShadowColor||"transparent",d.shadowOffsetX=s.textShadowOffsetX||e.textShadowOffsetX||0,d.shadowOffsetY=s.textShadowOffsetY||e.textShadowOffsetY||0),d.textAlign=r,d.textBaseline="middle",d.font=t.font||Un,d.opacity=et(s.opacity,e.opacity,1),i&&(d.lineWidth=et(s.lineWidth,e.lineWidth,n),d.lineDash=tt(s.lineDash,e.lineDash),d.lineDashOffset=e.lineDashOffset||0,d.stroke=i),c&&(d.fill=c);c=t.contentWidth,t=t.contentHeight;p.setBoundingRect(new Gn($n(d.x,c,d.textAlign),Jn(d.y,t,d.textBaseline),c,t))},xl.prototype._renderBackground=function(t,e,n,i,o,r){var a,s,l,u=t.backgroundColor,h=t.borderWidth,c=t.borderColor,p=H(u),d=t.borderRadius,f=this;(p||h&&c)&&((a=this._getOrCreateChild(ga)).useStyle(a.createStyle()),a.style.fill=null,(s=a.shape).x=n,s.y=i,s.width=o,s.height=r,s.r=d,a.dirtyShape()),p?((l=a.style).fill=u||null,l.fillOpacity=tt(t.fillOpacity,1)):u&&u.image&&((g=this._getOrCreateChild(na)).onload=function(){f.dirtyStyle()},(p=g.style).image=u.image,p.x=n,p.y=i,p.width=o,p.height=r),h&&c&&((l=a.style).lineWidth=h,l.stroke=c,l.strokeOpacity=tt(t.strokeOpacity,1),l.lineDash=t.borderDash,l.lineDashOffset=t.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(l.strokeFirst=!0,l.lineWidth*=2));var g=(a||g).style;g.shadowBlur=t.shadowBlur||0,g.shadowColor=t.shadowColor||"transparent",g.shadowOffsetX=t.shadowOffsetX||0,g.shadowOffsetY=t.shadowOffsetY||0,g.opacity=et(t.opacity,e.opacity,1)},xl.makeFont=function(t){var e,n="";return(t.fontSize||t.fontFamily||t.fontWeight)&&(e="",e="string"!=typeof t.fontSize||-1===t.fontSize.indexOf("px")&&-1===t.fontSize.indexOf("rem")&&-1===t.fontSize.indexOf("em")?isNaN(+t.fontSize)?"12px":t.fontSize+"px":t.fontSize,n=[t.fontStyle,t.fontWeight,e,t.fontFamily||"sans-serif"].join(" ")),n&&rt(n)||t.textFont||t.font},xl);function xl(t){var e=gl.call(this)||this;return e.type="text",e._children=[],e._defaultStyle=yl,e.attr(t),e}var _l={left:!0,right:1,center:1},bl={top:1,bottom:1,middle:1};function wl(t){var e;t&&(t.font=vl.makeFont(t),"middle"===(e=t.align)&&(e="center"),t.align=null==e||_l[e]?e:"left","center"===(e=t.verticalAlign)&&(e="middle"),t.verticalAlign=null==e||bl[e]?e:"top",t.padding&&(t.padding=it(t.padding)))}function Sl(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function Ml(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}function Il(t){t=t.text;return null!=t&&(t+=""),t}function Tl(t){return!!(t.backgroundColor||t.borderWidth&&t.borderColor)}var Cl,Dl=function(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},Al=(l(Ll,Cl=Dr),Ll.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},Ll.prototype.getDefaultShape=function(){return new Dl},Ll.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,o=Math.max(e.r,0),r=e.startAngle,a=e.endAngle,s=e.clockwise,l=Math.cos(r),e=Math.sin(r);t.moveTo(l*o+n,e*o+i),t.arc(n,i,o,r,a,!s)},Ll);function Ll(t){return Cl.call(this,t)||this}Al.prototype.type="arc";var kl=[],Pl=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1};function Ol(t,e,n){var i=t.cpx2,o=t.cpy2;return null===i||null===o?[(n?bo:_o)(t.x1,t.cpx1,t.cpx2,t.x2,e),(n?bo:_o)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(n?Co:To)(t.x1,t.cpx1,t.x2,e),(n?Co:To)(t.y1,t.cpy1,t.y2,e)]}var Rl,Nl=(l(El,Rl=Dr),El.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},El.prototype.getDefaultShape=function(){return new Pl},El.prototype.buildPath=function(t,e){var n=e.x1,i=e.y1,o=e.x2,r=e.y2,a=e.cpx1,s=e.cpy1,l=e.cpx2,u=e.cpy2,e=e.percent;0!==e&&(t.moveTo(n,i),null==l||null==u?(e<1&&(Ao(n,a,o,e,kl),a=kl[1],o=kl[2],Ao(i,s,r,e,kl),s=kl[1],r=kl[2]),t.quadraticCurveTo(a,s,o,r)):(e<1&&(Mo(n,a,l,o,e,kl),a=kl[1],l=kl[2],o=kl[3],Mo(i,s,u,r,e,kl),s=kl[1],u=kl[2],r=kl[3]),t.bezierCurveTo(a,s,l,u,o,r)))},El.prototype.pointAt=function(t){return Ol(this.shape,t,!1)},El.prototype.tangentAt=function(t){t=Ol(this.shape,t,!0);return Ct(t,t)},El);function El(t){return Rl.call(this,t)||this}Nl.prototype.type="bezier-curve";var zl,Bl=function(){this.cx=0,this.cy=0,this.width=0,this.height=0};function Vl(t){return zl.call(this,t)||this}(l(Vl,zl=Dr),Vl.prototype.getDefaultShape=function(){return new Bl},Vl.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,o=e.width,e=e.height;t.moveTo(n,i+o),t.bezierCurveTo(n+o,i+o,n+3*o/2,i-o/3,n,i-e),t.bezierCurveTo(n-3*o/2,i-o/3,n-o,i+o,n,i+o),t.closePath()},Vl).prototype.type="droplet";var Fl,Gl=function(){this.cx=0,this.cy=0,this.width=0,this.height=0};function Hl(t){return Fl.call(this,t)||this}(l(Hl,Fl=Dr),Hl.prototype.getDefaultShape=function(){return new Gl},Hl.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,o=e.width,e=e.height;t.moveTo(n,i),t.bezierCurveTo(n+o/2,i-2*e/3,n+2*o,i+e/3,n,i+e),t.bezierCurveTo(n-2*o,i+e/3,n-o/2,i-2*e/3,n,i)},Hl).prototype.type="heart";var Wl,Xl=Math.PI,Yl=Math.sin,Ul=Math.cos,Zl=function(){this.x=0,this.y=0,this.r=0,this.n=0};function jl(t){return Wl.call(this,t)||this}(l(jl,Wl=Dr),jl.prototype.getDefaultShape=function(){return new Zl},jl.prototype.buildPath=function(t,e){var n=e.n;if(n&&!(n<2)){var i=e.x,o=e.y,r=e.r,a=2*Xl/n,s=-Xl/2;t.moveTo(i+r*Ul(s),o+r*Yl(s));for(var l=0,u=n-1;l<u;l++)s+=a,t.lineTo(i+r*Ul(s),o+r*Yl(s));t.closePath()}},jl).prototype.type="isogon";var ql,Kl=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},$l=(l(Jl,ql=Dr),Jl.prototype.getDefaultShape=function(){return new Kl},Jl.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,o=2*Math.PI;t.moveTo(n+e.r,i),t.arc(n,i,e.r,0,o,!1),t.moveTo(n+e.r0,i),t.arc(n,i,e.r0,0,o,!0)},Jl);function Jl(t){return ql.call(this,t)||this}$l.prototype.type="ring";var Ql,tu=Math.sin,eu=Math.cos,nu=Math.PI/180,iu=function(){this.cx=0,this.cy=0,this.r=[],this.k=0,this.n=1};function ou(t){return Ql.call(this,t)||this}(l(ou,Ql=Dr),ou.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},ou.prototype.getDefaultShape=function(){return new iu},ou.prototype.buildPath=function(t,e){var n,i,o,r=e.r,a=e.k,s=e.n,l=e.cx,u=e.cy;t.moveTo(l,u);for(var h=0,c=r.length;h<c;h++){o=r[h];for(var p=0;p<=360*s;p++)n=o*tu(a/s*p%360*nu)*eu(p*nu)+l,i=o*tu(a/s*p%360*nu)*tu(p*nu)+u,t.lineTo(n,i)}},ou).prototype.type="rose";var ru,au=Math.PI,su=Math.cos,lu=Math.sin,uu=function(){this.cx=0,this.cy=0,this.n=3,this.r=0};function hu(t){return ru.call(this,t)||this}(l(hu,ru=Dr),hu.prototype.getDefaultShape=function(){return new uu},hu.prototype.buildPath=function(t,e){var n=e.n;if(n&&!(n<2)){var i=e.cx,o=e.cy,r=e.r,a=e.r0;null==a&&(a=4<n?r*su(2*au/n)/su(au/n):r/3);var s=au/n,l=-au/2,u=i+r*su(l),e=o+r*lu(l);l+=s,t.moveTo(u,e);for(var h,c=0,p=2*n-1;c<p;c++)h=c%2==0?a:r,t.lineTo(i+h*su(l),o+h*lu(l)),l+=s;t.closePath()}},hu).prototype.type="star";var cu,pu=Math.cos,du=Math.sin,fu=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0,this.d=0,this.location="out"};function gu(t){return cu.call(this,t)||this}(l(gu,cu=Dr),gu.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},gu.prototype.getDefaultShape=function(){return new fu},gu.prototype.buildPath=function(t,e){var n,i=e.r,o=e.r0,r=e.d,a=e.cx,s=e.cy,l="out"===e.location?1:-1;if(!(e.location&&i<=o)){var u,h=0,c=1,p=(i+l*o)*pu(0)-l*r*pu(0)+a,e=(i+l*o)*du(0)-r*du(0)+s;for(t.moveTo(p,e);o*++h%(i+l*o)!=0;);for(;u=Math.PI/180*c,n=(i+l*o)*pu(u)-l*r*pu((i/o+l)*u)+a,u=(i+l*o)*du(u)-r*du((i/o+l)*u)+s,t.lineTo(n,u),++c<=o*h/(i+l*o)*360;);}},gu).prototype.type="trochoid";var yu,mu=(l(vu,yu=Ea),vu);function vu(t,e,n,i,o){i=yu.call(this,i)||this;return i.x=null==t?.5:t,i.y=null==e?.5:e,i.r=null==n?.5:n,i.type="radial",i.global=o||!1,i}var xu=[0,0],_u=[0,0],bu=new kn,wu=new kn,Su=(Mu.prototype.fromBoundingRect=function(t,e){var n=this._corners,i=this._axes,o=t.x,r=t.y,a=o+t.width,t=r+t.height;if(n[0].set(o,r),n[1].set(a,r),n[2].set(a,t),n[3].set(o,t),e)for(var s=0;s<4;s++)n[s].transform(e);kn.sub(i[0],n[1],n[0]),kn.sub(i[1],n[3],n[0]),i[0].normalize(),i[1].normalize();for(s=0;s<2;s++)this._origin[s]=i[s].dot(n[0])},Mu.prototype.intersect=function(t,e){var n=!0,i=!e;return bu.set(1/0,1/0),wu.set(0,0),!this._intersectCheckOneSide(this,t,bu,wu,i,1)&&(n=!1,i)||!this._intersectCheckOneSide(t,this,bu,wu,i,-1)&&(n=!1,i)||i||kn.copy(e,n?bu:wu),n},Mu.prototype._intersectCheckOneSide=function(t,e,n,i,o,r){for(var a=!0,s=0;s<2;s++){var l=this._axes[s];if(this._getProjMinMaxOnAxis(s,t._corners,xu),this._getProjMinMaxOnAxis(s,e._corners,_u),xu[1]<_u[0]||_u[1]<xu[0]){if(a=!1,o)return a;var u=Math.abs(_u[0]-xu[1]),h=Math.abs(xu[0]-_u[1]);Math.min(u,h)>i.len()&&(u<h?kn.scale(i,l,-u*r):kn.scale(i,l,h*r))}else{n&&(u=Math.abs(_u[0]-xu[1]),h=Math.abs(xu[0]-_u[1]),Math.min(u,h)<n.len()&&(u<h?kn.scale(n,l,u*r):kn.scale(n,l,-h*r)))}}return a},Mu.prototype._getProjMinMaxOnAxis=function(t,e,n){for(var i=this._axes[t],o=this._origin,r=e[0].dot(i)+o[t],a=r,s=r,l=1;l<e.length;l++)var u=e[l].dot(i)+o[t],a=Math.min(u,a),s=Math.max(u,s);n[0]=a,n[1]=s},Mu);function Mu(t,e){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new kn;for(n=0;n<2;n++)this._axes[n]=new kn;t&&this.fromBoundingRect(t,e)}var Iu=!w.canvasSupported,Tu={},Cu={};var Du=(Au.prototype.add=function(t){t&&(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},Au.prototype.remove=function(t){t&&(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},Au.prototype.configLayer=function(t,e){this.painter.configLayer&&this.painter.configLayer(t,e),this.refresh()},Au.prototype.setBackgroundColor=function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=function(t){if(!t)return!1;if("string"==typeof t)return fn(t,1)<.4;if(t.colorStops){for(var e=t.colorStops,n=0,i=e.length,o=0;o<i;o++)n+=fn(e[o].color,1);return(n/=i)<.4}return!1}(t)},Au.prototype.getBackgroundColor=function(){return this._backgroundColor},Au.prototype.setDarkMode=function(t){this._darkMode=t},Au.prototype.isDarkMode=function(){return this._darkMode},Au.prototype.refreshImmediately=function(t){t||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},Au.prototype.refresh=function(){this._needsRefresh=!0,this.animation.start()},Au.prototype.flush=function(){this._flush(!1)},Au.prototype._flush=function(t){var e,n=(new Date).getTime();this._needsRefresh&&(e=!0,this.refreshImmediately(t)),this._needsRefreshHover&&(e=!0,this.refreshHoverImmediately());t=(new Date).getTime();e?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:t-n})):0<this._sleepAfterStill&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},Au.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},Au.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},Au.prototype.addHover=function(t){},Au.prototype.removeHover=function(t){},Au.prototype.clearHover=function(){},Au.prototype.refreshHover=function(){this._needsRefreshHover=!0},Au.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},Au.prototype.resize=function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},Au.prototype.clearAnimation=function(){this.animation.clear()},Au.prototype.getWidth=function(){return this.painter.getWidth()},Au.prototype.getHeight=function(){return this.painter.getHeight()},Au.prototype.pathToImage=function(t,e){if(this.painter.pathToImage)return this.painter.pathToImage(t,e)},Au.prototype.setCursorStyle=function(t){this.handler.setCursorStyle(t)},Au.prototype.findHover=function(t,e){return this.handler.findHover(t,e)},Au.prototype.on=function(t,e,n){return this.handler.on(t,e,n),this},Au.prototype.off=function(t,e){this.handler.off(t,e)},Au.prototype.trigger=function(t,e){this.handler.trigger(t,e)},Au.prototype.clear=function(){for(var t=this.storage.getRoots(),e=0;e<t.length;e++)t[e]instanceof $r&&t[e].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()},Au.prototype.dispose=function(){var t;this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,t=this.id,delete Cu[t]},Au);function Au(t,e,n){var i=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=e,this.id=t;var o=new Ci,r=n.renderer;if(Iu){if(!Tu.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");r="vml"}else r=r||"canvas";if(!Tu[r])throw new Error("Renderer '"+r+"' is not imported. Please import it first.");n.useDirtyRect=null!=n.useDirtyRect&&n.useDirtyRect;n=new Tu[r](e,o,n,t);this.storage=o,this.painter=n;t=w.node||w.worker?null:new $i(n.getViewportRoot(),n.root);this.handler=new me(o,n,t,n.root),this.animation=new ki({stage:{update:function(){return i._flush(!0)}}}),this.animation.start()}function Lu(t,e){e=new Du(v++,t,e);return Cu[e.id]=e}function ku(t,e){Tu[t]=e}var Pu=Object.freeze({__proto__:null,init:Lu,dispose:function(t){t.dispose()},disposeAll:function(){for(var t in Cu)Cu.hasOwnProperty(t)&&Cu[t].dispose();Cu={}},getInstance:function(t){return Cu[t]},registerPainter:ku,version:"5.0.0"}),Ou=1e-4;function Ru(t,e,n,i){var o=e[1]-e[0],r=n[1]-n[0];if(0==o)return 0==r?n[0]:(n[0]+n[1])/2;if(i)if(0<o){if(t<=e[0])return n[0];if(t>=e[1])return n[1]}else{if(t>=e[0])return n[0];if(t<=e[1])return n[1]}else{if(t===e[0])return n[0];if(t===e[1])return n[1]}return(t-e[0])/o*r+n[0]}function Nu(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?t.replace(/^\s+|\s+$/g,"").match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t}function Eu(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function zu(t){return t.sort(function(t,e){return t-e}),t}function Bu(t){if(t=+t,isNaN(t))return 0;for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}function Vu(t){var e=t.toString(),t=e.indexOf("e");if(0<t){var n=+e.slice(t+1);return n<0?-n:0}n=e.indexOf(".");return n<0?0:e.length-1-n}function Fu(t,e){var n=Math.log,i=Math.LN10,t=Math.floor(n(t[1]-t[0])/i),i=Math.round(n(Math.abs(e[1]-e[0]))/i),i=Math.min(Math.max(-t+i,0),20);return isFinite(i)?i:20}function Gu(t,e,n){if(!t[e])return 0;var i=T(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===i)return 0;for(var o=Math.pow(10,n),t=P(t,function(t){return(isNaN(t)?0:t)/i*o*100}),r=100*o,a=P(t,function(t){return Math.floor(t)}),s=T(a,function(t,e){return t+e},0),l=P(t,function(t,e){return t-a[e]});s<r;){for(var u=Number.NEGATIVE_INFINITY,h=null,c=0,p=l.length;c<p;++c)l[c]>u&&(u=l[c],h=c);++a[h],l[h]=0,++s}return a[e]/o}var Hu=9007199254740991;function Wu(t){var e=2*Math.PI;return(t%e+e)%e}function Xu(t){return-Ou<t&&t<Ou}var Yu=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function Uu(t){if(t instanceof Date)return t;if("string"!=typeof t)return null==t?new Date(NaN):new Date(Math.round(t));var e=Yu.exec(t);if(!e)return new Date(NaN);if(e[8]){t=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(t-=+e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,t,+(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 Zu(t){return Math.pow(10,ju(t))}function ju(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 qu(t,e){var n=ju(t),i=Math.pow(10,n),o=t/i,o=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;return t=o*i,-20<=n?+t.toFixed(n<0?-n:0):t}function Ku(t,e){var n=(t.length-1)*e+1,i=Math.floor(n),e=+t[i-1],n=n-i;return n?e+n*(t[i]-e):e}function $u(t){t.sort(function(t,e){return function t(e,n,i){return e.interval[i]<n.interval[i]||e.interval[i]===n.interval[i]&&(e.close[i]-n.close[i]==(i?-1:1)||!i&&t(e,n,1))}(t,e,0)?-1:1});for(var e=-1/0,n=1,i=0;i<t.length;){for(var o=t[i].interval,r=t[i].close,a=0;a<2;a++)o[a]<=e&&(o[a]=e,r[a]=a?1:1-n),e=o[a],n=r[a];o[0]===o[1]&&r[0]*r[1]!=1?t.splice(i,1):i++}return t}function Ju(t){var e=parseFloat(t);return e==t&&(0!==e||"string"!=typeof t||t.indexOf("x")<=0)?e:NaN}function Qu(t){return!isNaN(Ju(t))}function th(){return Math.round(9*Math.random())}function eh(t,e){return 0===e?t:eh(e,t%e)}function nh(t,e){return null==t?e:null==e?t:t*e/eh(t,e)}var ih=Object.freeze({__proto__:null,linearMap:Ru,parsePercent:Nu,round:Eu,asc:zu,getPrecision:Bu,getPrecisionSafe:Vu,getPixelPrecision:Fu,getPercentWithPrecision:Gu,MAX_SAFE_INTEGER:Hu,remRadian:Wu,isRadianAroundZero:Xu,parseDate:Uu,quantity:Zu,quantityExponent:ju,nice:qu,quantile:Ku,reformIntervals:$u,numericToNumber:Ju,isNumeric:Qu,getRandomIdBase:th,getGreatestCommonDividor:eh,getLeastCommonMultiple:nh});function oh(){0}function rh(t){throw new Error(t)}var ah="series\0",sh="\0_ec_\0";function lh(t){return t instanceof Array?t:null==t?[]:[t]}function uh(t,e,n){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var i=0,o=n.length;i<o;i++){var r=n[i];!t.emphasis[e].hasOwnProperty(r)&&t[e].hasOwnProperty(r)&&(t.emphasis[e][r]=t[e][r])}}}var hh=["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 ch(t){return!Y(t)||F(t)||t instanceof Date?t:t.value}function ph(t,n,e){var i="normalMerge"===e,o="replaceMerge"===e,r="replaceAll"===e;t=t||[],n=(n||[]).slice();var a=ct();N(n,function(t,e){Y(t)||(n[e]=null)});var s,l,u,h,c,p,d,f,g,y,e=function(t,e,n){var i=[];if("replaceAll"===n)return i;for(var o=0;o<t.length;o++){var r=t[o];r&&null!=r.id&&e.set(r.id,o),i.push({existing:"replaceMerge"===n||mh(r)?null:r,newOption:null,keyInfo:null,brandNew:null})}return i}(t,a,e);return(i||o)&&(s=e,l=t,u=a,N(h=n,function(t,e){var n,i,o;t&&null!=t.id&&(n=fh(t.id),null!=(i=u.get(n))&&(ot(!(o=s[i]).newOption,'Duplicated option on id "'+n+'".'),o.newOption=t,o.existing=l[i],h[e]=null))})),i&&(c=e,N(p=n,function(t,e){if(t&&null!=t.name)for(var n=0;n<c.length;n++){var i=c[n].existing;if(!c[n].newOption&&i&&(null==i.id||null==t.id)&&!mh(t)&&!mh(i)&&dh("name",i,t))return c[n].newOption=t,void(p[e]=null)}})),i||o?(f=e,g=o,N(n,function(t){if(t){for(var e,n=0;(e=f[n])&&(e.newOption||mh(e.existing)||e.existing&&null!=t.id&&!dh("id",t,e.existing));)n++;e?(e.newOption=t,e.brandNew=g):f.push({newOption:t,brandNew:g,existing:null,keyInfo:null}),n++}})):r&&(d=e,N(n,function(t){d.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})),r=e,y=ct(),N(r,function(t){var e=t.existing;e&&y.set(e.id,t)}),N(r,function(t){var e=t.newOption;ot(!e||null==e.id||!y.get(e.id)||y.get(e.id)===t,"id duplicates: "+(e&&e.id)),e&&null!=e.id&&y.set(e.id,t),t.keyInfo||(t.keyInfo={})}),N(r,function(t,e){var n=t.existing,i=t.newOption,o=t.keyInfo;if(Y(i)){if(o.name=null!=i.name?fh(i.name):n?n.name:ah+e,n)o.id=fh(n.id);else if(null!=i.id)o.id=fh(i.id);else for(var r=0;o.id="\0"+o.name+"\0"+r++,y.get(o.id););y.set(o.id,t)}}),e}function dh(t,e,n){e=gh(e[t],null),t=gh(n[t],null);return null!=e&&null!=t&&e===t}function fh(t){return gh(t,"")}function gh(t,e){if(null==t)return e;var n=typeof t;return"string"==n?t:"number"==n||W(t)?t+"":e}function yh(t){t=t.name;return!(!t||!t.indexOf(ah))}function mh(t){return t&&null!=t.id&&0===fh(t.id).indexOf(sh)}function vh(t,o,r){N(t,function(t){var e,n,i=t.newOption;Y(i)&&(t.keyInfo.mainType=o,t.keyInfo.subType=(e=o,n=i,i=t.existing,t=r,n.type||(i?i.subType:t.determineSubType(e,n))))})}function xh(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?F(t.dataIndex)?P(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?F(t.name)?P(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}function _h(){var e="__ec_inner_"+bh++;return function(t){return t[e]||(t[e]={})}}var bh=th();function wh(n,t,o){var e,t=H(t)?((e={})[t+"Index"]=0,e):t,r=ct(),a={},s=!1;N(t,function(t,e){var n,i;"dataIndex"!==e&&"dataIndexInside"!==e?(n=(i=e.match(/^(\w+)(Index|Id|Name)$/)||[])[1],i=(i[2]||"").toLowerCase(),!n||!i||o&&o.includeMainTypes&&L(o.includeMainTypes,n)<0||(s=s||!!n,(r.get(n)||r.set(n,{}))[i]=t)):a[e]=t});var i=o?o.defaultMainType:null;return!s&&i&&r.set(i,{}),r.each(function(t,e){t=Ih(n,e,t,{useDefault:i===e,enableAll:!o||null==o.enableAll||o.enableAll,enableNone:!o||null==o.enableNone||o.enableNone});a[e+"Models"]=t.models,a[e+"Model"]=t.models[0]}),a}var Sh={useDefault:!0,enableAll:!1,enableNone:!1},Mh={useDefault:!1,enableAll:!0,enableNone:!0};function Ih(t,e,n,i){i=i||Sh;var o=n.index,r=n.id,a=n.name,n={models:null,specified:null!=o||null!=r||null!=a};if(n.specified)return"none"===o||!1===o?(ot(i.enableNone,'`"none"` or `false` is not a valid value on index option.'),n.models=[]):("all"===o&&(ot(i.enableAll,'`"all"` is not a valid value on index option.'),o=r=a=null),n.models=t.queryComponents({mainType:e,index:o,id:r,name:a})),n;a=void 0;return n.models=i.useDefault&&(a=t.getComponent(e))?[a]:[],n}function Th(t,e,n){t.setAttribute?t.setAttribute(e,n):t[e]=n}function Ch(t,n){var i=ct(),o=[];return N(t,function(t){var e=n(t);(i.get(e)||(o.push(e),i.set(e,[]))).push(t)}),{keys:o,buckets:i}}function Dh(t,e,n,i,o){var r=null==e||"auto"===e;if(null==i)return i;if("number"==typeof i)return Eu(l=mn(n||0,i,o),r?Math.max(Vu(n||0),Vu(i)):e);if("string"==typeof i)return o<1?n:i;for(var a,s,l,u=[],h=n||[],c=i,p=Math.max(h.length,c.length),d=0;d<p;++d){"ordinal"===t.getDimensionInfo(d).type?u[d]=(o<1?h:c)[d]:(a=h&&h[d]?h[d]:0,s=c[d],l=null==h?i[d]:mn(a,s,o),u[d]=Eu(l,r?Math.max(Vu(a),Vu(s)):e))}return u}var Ah=".",Lh="___EC__COMPONENT__CONTAINER___",kh="___EC__EXTENDED_CLASS___";function Ph(t){var e={main:"",sub:""};return t&&(t=t.split(Ah),e.main=t[0]||"",e.sub=t[1]||""),e}function Oh(t){(t.$constructor=t).extend=function(i){var o=this;function r(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(i.$constructor)i.$constructor.apply(this,arguments);else{if("function"==typeof(t=o)&&/^class\s/.test(Function.prototype.toString.call(t)))return dt(r.prototype,new(o.bind.apply(o,a([void 0],e))));o.apply(this,arguments)}}return r[kh]=!0,O(r.prototype,i),r.extend=this.extend,r.superCall=Eh,r.superApply=zh,M(r,this),r.superClass=o,r}}function Rh(t,e){t.extend=e.extend}var Nh=Math.round(10*Math.random());function Eh(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return this.superClass.prototype[e].apply(t,n)}function zh(t,e,n){return this.superClass.prototype[e].apply(t,n)}function Bh(e,t){t=t||{};var n,o={};e.registerClass=function(t){var e,n=t.type||t.prototype.type;return n&&(ot(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e=n),'componentType "'+e+'" illegal'),(n=Ph(t.prototype.type=n)).sub?n.sub!==Lh&&(function(t){var e=o[t.main];e&&e[Lh]||((e=o[t.main]={})[Lh]=!0);return e}(n)[n.sub]=t):o[n.main]=t),t},e.getClass=function(t,e,n){var i=o[t];if(i&&i[Lh]&&(i=e?i[e]:null),n&&!i)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return i},e.getClassesByMainType=function(t){var t=Ph(t),n=[],t=o[t.main];return t&&t[Lh]?N(t,function(t,e){e!==Lh&&n.push(t)}):n.push(t),n},e.hasClass=function(t){t=Ph(t);return!!o[t.main]},e.getAllClassMainTypes=function(){var n=[];return N(o,function(t,e){n.push(e)}),n},e.hasSubTypes=function(t){t=Ph(t),t=o[t.main];return t&&t[Lh]},!t.registerWhenExtend||(n=e.extend)&&(e.extend=function(t){t=n.call(this,t);return e.registerClass(t)})}function Vh(a,s){for(var t=0;t<a.length;t++)a[t][1]||(a[t][1]=a[t][0]);return s=s||!1,function(t,e,n){for(var i={},o=0;o<a.length;o++){var r=a[o][1];e&&0<=L(e,r)||n&&L(n,r)<0||null!=(r=t.getShallow(r,s))&&(i[a[o][0]]=r)}return i}}var Fh=Vh([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Gh=(Hh.prototype.getAreaStyle=function(t,e){return Fh(this,t,e)},Hh);function Hh(){}var Wh=_h(),Xh=1,Yh={},Uh=_h(),Zh=0,jh=1,qh=2,Kh=["emphasis","blur","select"],$h=["normal","emphasis","blur","select"],Jh=10,Qh=9,tc="highlight",ec="downplay",nc="select",ic="unselect",oc="toggleSelect";function rc(t){return null!=t&&"none"!==t}var ac=new Xe(100);function sc(t){if("string"!=typeof t)return t;var e=ac.get(t);return e||(e=sn(t,-.1),ac.put(t,e)),e}function lc(t,e,n){t.onHoverStateChange&&(t.hoverState||0)!==n&&t.onHoverStateChange(e),t.hoverState=n}function uc(t){lc(t,"emphasis",qh)}function hc(t){t.hoverState===qh&&lc(t,"normal",Zh)}function cc(t){lc(t,"blur",jh)}function pc(t){t.hoverState===jh&&lc(t,"normal",Zh)}function dc(t){t.selected=!0}function fc(t){t.selected=!1}function gc(t,e,n){e(t,n)}function yc(t,e,n){gc(t,e,n),t.isGroup&&t.traverse(function(t){gc(t,e,n)})}function mc(t,e){switch(e){case"emphasis":t.hoverState=qh;break;case"normal":t.hoverState=Zh;break;case"blur":t.hoverState=jh;break;case"select":t.selected=!0}}function vc(t,e,n){var i=0<=L(t.currentStates,e),o=t.style.opacity,t=i?null:function(t,e,n,i){for(var o=t.style,r={},a=0;a<e.length;a++){var s=e[a],l=o[s];r[s]=null==l?i&&i[s]:l}for(a=0;a<t.animators.length;a++){var u=t.animators[a];u.__fromStateTransition&&u.__fromStateTransition.indexOf(n)<0&&"style"===u.targetName&&u.saveFinalToTarget(r,e)}return r}(t,["opacity"],e,{opacity:1}),e=(n=n||{}).style||{};return null==e.opacity&&(n=O({},n),e=O({opacity:i?o:.1*t.opacity},e),n.style=e),n}function xc(t,e){var n,i,o,r,a,s=this.states[t];if(this.style){if("emphasis"===t)return n=this,o=s,r=(i=e)&&0<=L(i,"select"),a=!1,n instanceof Dr&&(e=Uh(n),i=r&&e.selectFill||e.normalFill,r=r&&e.selectStroke||e.normalStroke,(rc(i)||rc(r))&&(!rc((e=(o=o||{}).style||{}).fill)&&rc(i)?(a=!0,o=O({},o),(e=O({},e)).fill=sc(i)):!rc(e.stroke)&&rc(r)&&(a||(o=O({},o),e=O({},e)),e.stroke=sc(r)),o.style=e)),o&&null==o.z2&&(a||(o=O({},o)),a=n.z2EmphasisLift,o.z2=n.z2+(null!=a?a:Jh)),o;if("blur"===t)return vc(this,t,s);if("select"===t)return a=this,(o=s)&&null==o.z2&&(o=O({},o),t=a.z2SelectLift,o.z2=a.z2+(null!=t?t:Qh)),o}return s}function _c(t){t.stateProxy=xc;var e=t.getTextContent(),t=t.getTextGuideLine();e&&(e.stateProxy=xc),t&&(t.stateProxy=xc)}function bc(t,e){t.__highByOuter|=1<<(e||0),yc(t,uc)}function wc(t,e){(t.__highByOuter&=~(1<<(e||0)))||yc(t,hc)}function Sc(t){yc(t,cc)}function Mc(t){yc(t,pc)}function Ic(t){yc(t,dc)}function Tc(t){yc(t,fc)}function Cc(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function Dc(t,r,a,s,e){var n,l,u,h,i=s.getModel();function c(t,e){for(var n=0;n<e.length;n++){var i=t.getItemGraphicEl(e[n]);i&&Mc(i)}}a=a||"coordinateSystem",e?null!=t&&r&&"none"!==r&&(l=i.getSeriesByIndex(t),(u=l.coordinateSystem)&&u.master&&(u=u.master),h=[],i.eachSeries(function(t){var e=l===t,n=t.coordinateSystem;if(n&&n.master&&(n=n.master),!("series"===a&&!e||"coordinateSystem"===a&&!(n&&u?n===u:e)||"series"===r&&e)){if(s.getViewOfSeriesModel(t).group.traverse(function(t){cc(t)}),k(r))c(t.getData(),r);else if(Y(r))for(var i=z(r),o=0;o<i.length;o++)c(t.getData(i[o]),r[i[o]]);h.push(t)}}),i.eachComponent(function(t,e){"series"===t||(e=s.getViewOfComponentModel(e))&&e.blurSeries&&e.blurSeries(h,i)})):(n=s).getModel().eachComponent(function(t,e){("series"===t?n.getViewOfSeriesModel(e):n.getViewOfComponentModel(e)).group.traverse(function(t){pc(t)})})}function Ac(i){N(i.getAllData(),function(t){var e=t.data,n=t.type;e.eachItemGraphicEl(function(t,e){(i.isSelected(e,n)?Ic:Tc)(t)})})}function Lc(t,e,n){Nc(t,!0),yc(t,_c),kc(t,e,n)}function kc(t,e,n){t=Wh(t);null!=e?(t.focus=e,t.blurScope=n):t.focus&&(t.focus=null)}var Pc=["emphasis","blur","select"],Oc={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Rc(t,e,n,i){n=n||"itemStyle";for(var o=0;o<Pc.length;o++){var r=Pc[o],a=e.getModel([r,n]);t.ensureState(r).style=i?i(a):a[Oc[n]]()}}function Nc(t,e){var n=!1===e,e=t;t.highDownSilentOnTouch&&(e.__highDownSilentOnTouch=t.highDownSilentOnTouch),n&&!e.__highDownDispatcher||(e.__highByOuter=e.__highByOuter||0,e.__highDownDispatcher=!n)}function Ec(t){return!(!t||!t.__highDownDispatcher)}function zc(t){t=t.type;return t===nc||t===ic||t===oc}function Bc(t){t=t.type;return t===tc||t===ec}var Vc=Math.max,Fc=Math.min,Gc={};var Hc=function(t,e){var n,i=jr(t,e);function o(t){t=n.call(this,t)||this;return t.applyTransform=i.applyTransform,t.buildPath=i.buildPath,t}return l(o,n=Yr),o};function Wc(t,e){Gc[t]=e}function Xc(t){if(Gc.hasOwnProperty(t))return Gc[t]}function Yc(t,e,n,i){e=qr(t,e);return n&&("center"===i&&(n=Zc(n,e.getBoundingRect())),qc(e,n)),e}function Uc(t,e,n){var i=new na({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){"center"===n&&(t={width:t.width,height:t.height},i.setStyle(Zc(e,t)))}});return i}function Zc(t,e){var n=e.width/e.height,e=t.height*n,n=e<=t.width?t.height:(e=t.width)/n;return{x:t.x+t.width/2-e/2,y:t.y+t.height/2-n/2,width:e,height:n}}var jc=function(t,e){for(var n=[],i=t.length,o=0;o<i;o++){var r=t[o];r.path||r.createPathProxy(),r.shapeChanged()&&r.buildPath(r.path,r.shape,!0),n.push(r.path)}return(e=new Dr(e)).createPathProxy(),e.buildPath=function(t){var e;Zr(t)&&(t.appendPath(n),(e=t.getContext())&&t.rebuildPath(e,1))},e};function qc(t,e){t.applyTransform&&(e=t.getBoundingRect().calculateTransform(e),t.applyTransform(e))}var Kc=ca;function $c(t,e,n,i,o,r,a){var s,l=!1;"function"==typeof o?(a=r,r=o,o=null):Y(o)&&(r=o.cb,a=o.during,l=o.isFrom,s=o.removeOpt,o=o.dataIndex);var u,h="update"===t,c="remove"===t;i&&i.ecModel&&(u=(d=i.ecModel.getUpdatePayload())&&d.animation);var p,d,f=i&&i.isAnimationEnabled();c||e.stopAnimation("remove"),f?(f=d=p=void 0,"function"==typeof(f=u?(p=u.duration||0,d=u.easing||"cubicOut",u.delay||0):c?(p=tt((s=s||{}).duration,200),d=tt(s.easing,"cubicOut"),0):(p=i.getShallow(h?"animationDurationUpdate":"animationDuration"),d=i.getShallow(h?"animationEasingUpdate":"animationEasing"),i.getShallow(h?"animationDelayUpdate":"animationDelay")))&&(f=f(o,i.getAnimationDelayParams?i.getAnimationDelayParams(e,o):null)),"function"==typeof p&&(p=p(o)),0<p?l?e.animateFrom(n,{duration:p,delay:f||0,easing:d,done:r,force:!!r||!!a,scope:t,during:a}):e.animateTo(n,{duration:p,delay:f||0,easing:d,done:r,force:!!r||!!a,setToFinal:!0,scope:t,during:a}):(e.stopAnimation(),l||e.attr(n),r&&r())):(e.stopAnimation(),l||e.attr(n),a&&a(1),r&&r())}function Jc(t,e,n,i,o,r){$c("update",t,e,n,i,o,r)}function Qc(t,e,n,i,o,r){$c("init",t,e,n,i,o,r)}function tp(t,e,n,i,o,r){ip(t)||$c("remove",t,e,n,i,o,r)}function ep(t,e,n,i){t.removeTextContent(),t.removeTextGuideLine(),tp(t,{style:{opacity:0}},e,n,i)}function np(t,e,n){function i(){t.parent&&t.parent.remove(t)}t.isGroup?t.traverse(function(t){t.isGroup||ep(t,e,n,i)}):ep(t,e,n,i)}function ip(t){if(!t.__zr)return!0;for(var e=0;e<t.animators.length;e++){if("remove"===t.animators[e].scope)return!0}return!1}function op(t,e){for(var n=be([]);t&&t!==e;)Se(n,t.getLocalTransform(),n),t=t.parent;return n}function rp(t,e,n){return e&&!k(e)&&(e=Ee.getLocalTransform(e)),n&&(e=Ce([],e)),Ot([],t,e)}function ap(t,e,n){var i=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]),o=rp(o=["left"===t?-i:"right"===t?i:0,"top"===t?-o:"bottom"===t?o:0],e,n);return Math.abs(o[0])>Math.abs(o[1])?0<o[0]?"right":"left":0<o[1]?"bottom":"top"}function sp(t){return!t.isGroup}function lp(t,e,i){var o,n;function r(t){var e={x:t.x,y:t.y,rotation:t.rotation};return null!=t.shape&&(e.shape=O({},t.shape)),e}t&&e&&(n={},t.traverse(function(t){sp(t)&&t.anid&&(n[t.anid]=t)}),o=n,e.traverse(function(t){var e,n;sp(t)&&t.anid&&((e=o[t.anid])&&(n=r(t),t.attr(r(e)),Jc(t,n,i,Wh(t).dataIndex)))}))}function up(t,n){return P(t,function(t){var e=t[0],e=Vc(e,n.x);e=Fc(e,n.x+n.width);t=t[1],t=Vc(t,n.y);return[e,t=Fc(t,n.y+n.height)]})}function hp(t,e,n){var i=O({rectHover:!0},e),e=i.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(e.image=t.slice(8),A(e,n),new na(i)):Yc(t.replace("path://",""),i,n,"center")}function cp(t,e,n,i,o){for(var r=0,a=o[o.length-1];r<o.length;r++){var s=o[r];if(pp(t,e,n,i,s[0],s[1],a[0],a[1]))return!0;a=s}}function pp(t,e,n,i,o,r,a,s){var l=n-t,u=i-e,n=a-o,i=s-r,a=n*u-l*i;if((s=a)<=1e-6&&-1e-6<=s)return!1;o=t-o,r=e-r,l=(o*u-l*r)/a;if(l<0||1<l)return!1;a=(o*i-n*r)/a;return!(a<0||1<a)}Wc("circle",aa),Wc("ellipse",xa),Wc("sector",bs),Wc("ring",$l),Wc("polygon",La),Wc("polyline",Ra),Wc("rect",ga),Wc("line",Ma),Wc("bezierCurve",Nl),Wc("arc",Al);var dp=Object.freeze({__proto__:null,extendShape:function(t){return Dr.extend(t)},extendPath:function(t,e){return Hc(t,e)},registerShape:Wc,getShapeClass:Xc,makePath:Yc,makeImage:Uc,mergePath:jc,resizePath:qc,subPixelOptimizeLine:function(t){return ua(t.shape,t.shape,t.style),t},subPixelOptimizeRect:function(t){return ha(t.shape,t.shape,t.style),t},subPixelOptimize:Kc,updateProps:Jc,initProps:Qc,removeElement:tp,removeElementWithFadeOut:np,isElementRemoved:ip,getTransform:op,applyTransform:rp,transformDirection:ap,groupTransition:lp,clipPointsByRect:up,clipRectByRect:function(t,e){var n=Vc(t.x,e.x),i=Fc(t.x+t.width,e.x+e.width),o=Vc(t.y,e.y),e=Fc(t.y+t.height,e.y+e.height);if(n<=i&&o<=e)return{x:n,y:o,width:i-n,height:e-o}},createIcon:hp,linePolygonIntersect:cp,lineLineIntersect:pp,Group:$r,Image:na,Text:vl,Circle:aa,Ellipse:xa,Sector:bs,Ring:$l,Polygon:La,Polyline:Ra,Rect:ga,Line:Ma,BezierCurve:Nl,Arc:Al,IncrementalDisplayable:Js,CompoundPath:js,LinearGradient:Va,RadialGradient:mu,BoundingRect:Gn,OrientedBoundingRect:Su,Point:kn,Path:Dr}),fp={};function gp(t,e){for(var n=0;n<Kh.length;n++){var i=Kh[n],o=e[i],i=t.ensureState(i);i.style=i.style||{},i.style.text=o}var r=t.currentStates.slice();t.clearStates(!0),t.setStyle({text:e.normal}),t.useStates(r,!0)}function yp(t,e,n){var i,o=t.labelFetcher,r=t.labelDataIndex,a=t.labelDimIndex,s=e.normal;o&&(i=o.getFormattedLabel(r,"normal",null,a,s&&s.get("formatter"),null!=n?{value:n}:null)),null==i&&(i=G(t.defaultText)?t.defaultText(r,t,n):t.defaultText);for(var l={normal:i},u=0;u<Kh.length;u++){var h=Kh[u],c=e[h];l[h]=tt(o?o.getFormattedLabel(r,h,null,a,c&&c.get("formatter")):null,i)}return l}function mp(t,e,n,i){n=n||fp;for(var o=t instanceof vl,r=!1,a=0;a<$h.length;a++){if((p=e[$h[a]])&&p.getShallow("show")){r=!0;break}}var s=o?t:t.getTextContent();if(r){o||(s||(s=new vl,t.setTextContent(s)),t.stateProxy&&(s.stateProxy=t.stateProxy));var l=yp(n,e),u=e.normal,h=!!u.getShallow("show"),c=xp(u,i&&i.normal,n,!1,!o);c.text=l.normal,o||t.setTextConfig(_p(u,n,!1));for(a=0;a<Kh.length;a++){var p,d,f,g=Kh[a];(p=e[g])&&(d=s.ensureState(g),(f=!!tt(p.getShallow("show"),h))!=h&&(d.ignore=!f),d.style=xp(p,i&&i[g],n,!0,!o),d.style.text=l[g],o||(t.ensureState(g).textConfig=_p(p,n,!0)))}s.silent=!!u.getShallow("silent"),null!=s.style.x&&(c.x=s.style.x),null!=s.style.y&&(c.y=s.style.y),s.ignore=!h,s.useStyle(c),s.dirty(),n.enableTextSetter&&(Tp(s).setLabelText=function(t){t=yp(n,e,t);gp(s,t)})}else s&&(s.ignore=!0);t.dirty()}function vp(t,e){e=e||"label";for(var n={normal:t.getModel(e)},i=0;i<Kh.length;i++){var o=Kh[i];n[o]=t.getModel([o,e])}return n}function xp(t,e,n,i,o){var r={};return function(t,e,n,i,o){n=n||fp;var r,a=e.ecModel,s=a&&a.option.textStyle,l=function(t){var e;for(;t&&t!==t.ecModel;){var n=(t.option||fp).rich;if(n){e=e||{};for(var i=z(n),o=0;o<i.length;o++){var r=i[o];e[r]=1}}t=t.parentModel}return e}(e);if(l)for(var u in r={},l){var h;l.hasOwnProperty(u)&&(h=e.getModel(["rich",u]),Mp(r[u]={},h,s,n,i,o,!1,!0))}r&&(t.rich=r);a=e.get("overflow");a&&(t.overflow=a);a=e.get("minMargin");null!=a&&(t.margin=a);Mp(t,e,s,n,i,o,!0,!1)}(r,t,n,i,o),e&&O(r,e),r}function _p(t,e,n){e=e||{};var i={},o=t.getShallow("rotate"),r=tt(t.getShallow("distance"),n?null:5),a=t.getShallow("offset"),n=t.getShallow("position")||(n?null:"inside");return"outside"===n&&(n=e.defaultOutsidePosition||"top"),null!=n&&(i.position=n),null!=a&&(i.offset=a),null!=o&&(o*=Math.PI/180,i.rotation=o),null!=r&&(i.distance=r),i.outsideFill="inherit"===t.get("color")?e.inheritColor||null:"auto",i}var bp=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],wp=["align","lineHeight","width","height","tag","verticalAlign"],Sp=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function Mp(t,e,n,i,o,r,a,s){n=!o&&n||fp;var l=i&&i.inheritColor,u=e.getShallow("color"),h=e.getShallow("textBorderColor"),c=tt(e.getShallow("opacity"),n.opacity);"inherit"!==u&&"auto"!==u||(u=l||null),"inherit"!==h&&"auto"!==h||(h=l||null),r||(u=u||n.color,h=h||n.textBorderColor),null!=u&&(t.fill=u),null!=h&&(t.stroke=h);h=tt(e.getShallow("textBorderWidth"),n.textBorderWidth);null!=h&&(t.lineWidth=h);h=tt(e.getShallow("textBorderType"),n.textBorderType);null!=h&&(t.lineDash=h);h=tt(e.getShallow("textBorderDashOffset"),n.textBorderDashOffset);null!=h&&(t.lineDashOffset=h),o||null!=c||s||(c=i&&i.defaultOpacity),null!=c&&(t.opacity=c),o||r||null==t.fill&&i.inheritColor&&(t.fill=i.inheritColor);for(var p=0;p<bp.length;p++){var d=bp[p];null!=(f=tt(e.getShallow(d),n[d]))&&(t[d]=f)}for(p=0;p<wp.length;p++){d=wp[p];null!=(f=e.getShallow(d))&&(t[d]=f)}if(null!=t.verticalAlign||null!=(r=e.getShallow("baseline"))&&(t.verticalAlign=r),!a||!i.disableBox){for(p=0;p<Sp.length;p++){var f,d=Sp[p];null!=(f=e.getShallow(d))&&(t[d]=f)}i=e.getShallow("borderType");null!=i&&(t.borderDash=i),"auto"!==t.backgroundColor&&"inherit"!==t.backgroundColor||!l||(t.backgroundColor=l),"auto"!==t.borderColor&&"inherit"!==t.borderColor||!l||(t.borderColor=l)}}function Ip(t,e){e=e&&e.getModel("textStyle");return rt([t.fontStyle||e&&e.getShallow("fontStyle")||"",t.fontWeight||e&&e.getShallow("fontWeight")||"",(t.fontSize||e&&e.getShallow("fontSize")||12)+"px",t.fontFamily||e&&e.getShallow("fontFamily")||"sans-serif"].join(" "))}var Tp=_h();function Cp(t,e,n,i){t&&((t=Tp(t)).prevValue=t.value,t.value=n,n=e.normal,t.valueAnimation=n.get("valueAnimation"),t.valueAnimation&&(t.precision=n.get("precision"),t.defaultInterpolatedText=i,t.statesModels=e))}function Dp(e,n,i,t){var o,r,a,s=Tp(e);s.valueAnimation&&(o=s.defaultInterpolatedText,r=s.prevValue,a=s.value,(null==r?Qc:Jc)(e,{},t,n,null,function(t){t=Dh(i,s.precision,r,a,t),t=yp({labelDataIndex:n,defaultText:o?o(t):t+""},s.statesModels,t),gp(e,t)}))}var Ap=["textStyle","color"],Lp=new vl,kp=(Pp.prototype.getTextColor=function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(Ap):null)},Pp.prototype.getFont=function(){return Ip({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},Pp.prototype.getTextRect=function(t){return Lp.useStyle({text:t,fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily"),verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline"),padding:this.getShallow("padding"),lineHeight:this.getShallow("lineHeight"),rich:this.getShallow("rich")}),Lp.update(),Lp.getBoundingRect()},Pp);function Pp(){}var Op=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],Rp=Vh(Op),n=(Np.prototype.getLineStyle=function(t){return Rp(this,t)},Np);function Np(){}var r=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],Ep=Vh(r),g=(zp.prototype.getItemStyle=function(t,e){return Ep(this,t,e)},zp);function zp(){}var Bp,Vp,Fp=(Gp.prototype.init=function(t,e,n){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o]},Gp.prototype.mergeOption=function(t,e){b(this.option,t,!0)},Gp.prototype.get=function(t,e){return null==t?this.option:this._doGet(this.parsePath(t),!e&&this.parentModel)},Gp.prototype.getShallow=function(t,e){var n=this.option,n=null==n?n:n[t];return null!=n||e||(e=this.parentModel)&&(n=e.getShallow(t)),n},Gp.prototype.getModel=function(t,e){var n=null!=t,t=n?this.parsePath(t):null;return new Gp(n?this._doGet(t):this.option,e=e||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(t)),this.ecModel)},Gp.prototype.isEmpty=function(){return null==this.option},Gp.prototype.restoreData=function(){},Gp.prototype.clone=function(){return new this.constructor(C(this.option))},Gp.prototype.parsePath=function(t){return"string"==typeof t?t.split("."):t},Gp.prototype.resolveParentPath=function(t){return t},Gp.prototype.isAnimationEnabled=function(){if(!w.node&&this.option)return null!=this.option.animation?!!this.option.animation:this.parentModel?this.parentModel.isAnimationEnabled():void 0},Gp.prototype._doGet=function(t,e){var n=this.option;if(!t)return n;for(var i=0;i<t.length&&(!t[i]||null!=(n=n&&"object"==typeof n?n[t[i]]:null));i++);return null==n&&e&&(n=e._doGet(this.resolveParentPath(t),e.parentModel)),n},Gp);function Gp(t,e,n){this.parentModel=e,this.ecModel=n,this.option=t}Oh(Fp),Bp=Fp,Vp=["__\0is_clz",Nh++].join("_"),Bp.prototype[Vp]=!0,Bp.isInstance=function(t){return!(!t||!t[Vp])},I(Fp,n),I(Fp,g),I(Fp,Gh),I(Fp,kp);var Hp=Math.round(10*Math.random());function Wp(t){return[t||"",Hp++].join("_")}function Xp(t,e){return b(b({},t,!0),e,!0)}var Yp="ZH",Up="EN",Zp=Up,jp={},qp={},Kp=w.domSupported&&-1<(document.documentElement.lang||navigator.language||navigator.browserLanguage).toUpperCase().indexOf(Yp)?Yp:Zp;function $p(t,e){t=t.toUpperCase(),qp[t]=new Fp(e),jp[t]=e}$p(Up,{time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Guage",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}}),$p(Yp,{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表，"},series:{single:{prefix:"",withName:"图表类型是{seriesType}，表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType}，",withoutName:"第{seriesId}个系列是一个{seriesType}，",separator:{middle:"；",end:"。"}}},data:{allData:"其数据是——",partialData:"其中，前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:"，",end:""}}}});var Jp=1e3,Qp=60*Jp,td=60*Qp,ed=24*td,nd=365*ed,id={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{hh}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {hh}:{mm}:{ss} {SSS}"},ni="{yyyy}-{MM}-{dd}",od={year:"{yyyy}",month:"{yyyy}:{MM}",day:ni,hour:ni+" "+id.hour,minute:ni+" "+id.minute,second:ni+" "+id.second,millisecond:id.none},rd=["year","month","day","hour","minute","second","millisecond"],ad=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function sd(t,e){return"0000".substr(0,e-(t+="").length)+t}function ld(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function ud(t,e,n,i){var o=Uu(t),r=o[pd(n)](),a=o[dd(n)]()+1,s=Math.floor((a-1)/4)+1,l=o[fd(n)](),u=o["get"+(n?"UTC":"")+"Day"](),h=o[gd(n)](),c=(h-1)%12+1,p=o[yd(n)](),d=o[md(n)](),f=o[vd(n)](),t=(i instanceof Fp?i:qp[i||Kp]||qp[Zp]).getModel("time"),o=t.get("month"),n=t.get("monthAbbr"),i=t.get("dayOfWeek"),t=t.get("dayOfWeekAbbr");return(e||"").replace(/{yyyy}/g,r+"").replace(/{yy}/g,r%100+"").replace(/{Q}/g,s+"").replace(/{MMMM}/g,o[a-1]).replace(/{MMM}/g,n[a-1]).replace(/{MM}/g,sd(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,sd(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,i[u]).replace(/{ee}/g,t[u]).replace(/{e}/g,u+"").replace(/{HH}/g,sd(h,2)).replace(/{H}/g,h+"").replace(/{hh}/g,sd(c+"",2)).replace(/{h}/g,c+"").replace(/{mm}/g,sd(p,2)).replace(/{m}/g,p+"").replace(/{ss}/g,sd(d,2)).replace(/{s}/g,d+"").replace(/{SSS}/g,sd(f,3)).replace(/{S}/g,f+"")}function hd(t,e){var n=Uu(t),i=n[dd(e)]()+1,o=n[fd(e)](),r=n[gd(e)](),a=n[yd(e)](),t=n[md(e)](),e=0===n[vd(e)](),t=e&&0===t,a=t&&0===a,r=a&&0===r,o=r&&1===o;return o&&1===i?"year":o?"month":r?"day":a?"hour":t?"minute":e?"second":"millisecond"}function cd(t,e,n){var i="number"==typeof t?Uu(t):t;switch(e=e||hd(t,n)){case"year":return i[pd(n)]();case"half-year":return 6<=i[dd(n)]()?1:0;case"quarter":return Math.floor((i[dd(n)]()+1)/4);case"month":return i[dd(n)]();case"day":return i[fd(n)]();case"half-day":return i[gd(n)]()/24;case"hour":return i[gd(n)]();case"minute":return i[yd(n)]();case"second":return i[md(n)]();case"millisecond":return i[vd(n)]()}}function pd(t){return t?"getUTCFullYear":"getFullYear"}function dd(t){return t?"getUTCMonth":"getMonth"}function fd(t){return t?"getUTCDate":"getDate"}function gd(t){return t?"getUTCHours":"getHours"}function yd(t){return t?"getUTCMinutes":"getMinutes"}function md(t){return t?"getUTCSeconds":"getSeconds"}function vd(t){return t?"getUTCSeconds":"getSeconds"}function xd(t){return t?"setUTCMonth":"setMonth"}function _d(t){return t?"setUTCDate":"setDate"}function bd(t){return t?"setUTCHours":"setHours"}function wd(t){return t?"setUTCMinutes":"setMinutes"}function Sd(t){return t?"setUTCSeconds":"setSeconds"}function Md(t){return t?"setUTCSeconds":"setSeconds"}function Id(t){if(!Qu(t))return H(t)?t:"-";t=(t+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(1<t.length?"."+t[1]:"")}function Td(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 Cd=it,Dd=/([&<>"'])/g,Ad={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Ld(t){return null==t?"":(t+"").replace(Dd,function(t,e){return Ad[e]})}function kd(t,e,n){function i(t){return t&&rt(t)?t:"-"}function o(t){return null!=t&&!isNaN(t)&&isFinite(t)}var r="time"===e,a=t instanceof Date;if(r||a){r=r?Uu(t):t;if(!isNaN(+r))return ud(r,"yyyy-MM-dd hh:mm:ss",n);if(a)return"-"}if("ordinal"===e)return W(t)?i(t):X(t)&&o(t)?t+"":"-";e=Ju(t);return o(e)?Id(e):W(t)?i(t):"-"}function Pd(t,e){return"{"+t+(null==e?"":e)+"}"}var Od=["a","b","c","d","e","f","g"];function Rd(t,e,n){F(e)||(e=[e]);var i=e.length;if(!i)return"";for(var o=e[0].$vars||[],r=0;r<o.length;r++){var a=Od[r];t=t.replace(Pd(a),Pd(a,0))}for(var s=0;s<i;s++)for(var l=0;l<o.length;l++){var u=e[s][o[l]];t=t.replace(Pd(Od[l],s),n?Ld(u):u)}return t}function Nd(n,t,i){return N(t,function(t,e){n=n.replace("{"+e+"}",i?Ld(t):t)}),n}function Ed(t,e){var n=H(t)?{color:t,extraCssText:e}:t||{},i=n.color,o=n.type;e=n.extraCssText;t=n.renderMode||"html";return i?"html"===t?"subItem"===o?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Ld(i)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+Ld(i)+";"+(e||"")+'"></span>':{renderMode:t,content:"{"+(n.markerId||"markerX")+"|}  ",style:"subItem"===o?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}:""}function zd(t,e){return e=e||"transparent",H(t)?t:Y(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function Bd(t,e){var n;"_blank"===e||"blank"===e?((n=window.open()).opener=null,n.location.href=t):window.open(t,e)}var Vd=Object.freeze({__proto__:null,addCommas:Id,toCamelCase:Td,normalizeCssArray:Cd,encodeHTML:Ld,makeValueReadable:kd,formatTpl:Rd,formatTplSimple:Nd,getTooltipMarker:Ed,formatTime:function(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var i=Uu(e),o=i["get"+(l=n?"UTC":"")+"FullYear"](),r=i["get"+l+"Month"]()+1,a=i["get"+l+"Date"](),s=i["get"+l+"Hours"](),e=i["get"+l+"Minutes"](),n=i["get"+l+"Seconds"](),l=i["get"+l+"Milliseconds"]();return t=t.replace("MM",sd(r,2)).replace("M",r).replace("yyyy",o).replace("yy",o%100+"").replace("dd",sd(a,2)).replace("d",a).replace("hh",sd(s,2)).replace("h",s).replace("mm",sd(e,2)).replace("m",e).replace("ss",sd(n,2)).replace("s",n).replace("SSS",sd(l,3))},capitalFirst:function(t){return t&&t.charAt(0).toUpperCase()+t.substr(1)},convertToColorString:zd,windowOpen:Bd,truncateText:rl,getTextRect:function(t,e,n,i,o,r,a,s){return oh(),new vl({style:{text:t,font:e,align:n,verticalAlign:i,padding:o,rich:r,overflow:a?"truncate":null,lineHeight:s}}).getBoundingRect()}}),Fd=N,Gd=["left","right","top","bottom","width","height"],Hd=[["width","left","right"],["height","top","bottom"]];function Wd(a,s,l,u,h){var c=0,p=0;null==u&&(u=1/0),null==h&&(h=1/0);var d=0;s.eachChild(function(t,e){var n,i,o=t.getBoundingRect(),r=s.childAt(e+1),e=r&&r.getBoundingRect();d="horizontal"===a?(r=o.width+(e?-e.x+o.x:0),u<(n=c+r)||t.newline?(c=0,n=r,p+=d+l,o.height):Math.max(d,o.height)):(e=o.height+(e?-e.y+o.y:0),h<(i=p+e)||t.newline?(c+=d+l,p=0,i=e,o.width):Math.max(d,o.width)),t.newline||(t.x=c,t.y=p,t.markRedraw(),"horizontal"===a?c=n+l:p=i+l)})}var Xd=Wd;V(Wd,"vertical"),V(Wd,"horizontal");function Yd(t,e,n){n=Cd(n||0);var i=e.width,o=e.height,r=Nu(t.left,i),a=Nu(t.top,o),s=Nu(t.right,i),l=Nu(t.bottom,o),u=Nu(t.width,i),h=Nu(t.height,o),c=n[2]+n[0],p=n[1]+n[3],e=t.aspect;switch(isNaN(u)&&(u=i-s-p-r),isNaN(h)&&(h=o-l-c-a),null!=e&&(isNaN(u)&&isNaN(h)&&(i/o<e?u=.8*i:h=.8*o),isNaN(u)&&(u=e*h),isNaN(h)&&(h=u/e)),isNaN(r)&&(r=i-s-u-p),isNaN(a)&&(a=o-l-h-c),t.left||t.right){case"center":r=i/2-u/2-n[3];break;case"right":r=i-u-p}switch(t.top||t.bottom){case"middle":case"center":a=o/2-h/2-n[0];break;case"bottom":a=o-h-c}r=r||0,a=a||0,isNaN(u)&&(u=i-p-r-(s||0)),isNaN(h)&&(h=o-c-a-(l||0));h=new Gn(r+n[3],a+n[0],u,h);return h.margin=n,h}function Ud(t,e,n,i,o){var r,a=!o||!o.hv||o.hv[0],s=!o||!o.hv||o.hv[1],l=o&&o.boundingMode||"all";(a||s)&&("raw"===l?r="group"===t.type?new Gn(0,0,+e.width||0,+e.height||0):t.getBoundingRect():(r=t.getBoundingRect(),t.needLocalTransform()&&(o=t.getLocalTransform(),(r=r.clone()).applyTransform(o))),i=Yd(A({width:r.width,height:r.height},e),n,i),a=a?i.x-r.x:0,r=s?i.y-r.y:0,"raw"===l?(t.x=a,t.y=r):(t.x+=a,t.y+=r),t.markRedraw())}function Zd(t){t=t.layoutMode||t.constructor.layoutMode;return Y(t)?t:t?{type:t}:null}function jd(l,u,t){var h=t&&t.ignoreSize;F(h)||(h=[h,h]);var e=n(Hd[0],0),t=n(Hd[1],1);function n(t,e){var n={},i=0,o={},r=0;if(Fd(t,function(t){o[t]=l[t]}),Fd(t,function(t){c(u,t)&&(n[t]=o[t]=u[t]),p(n,t)&&i++,p(o,t)&&r++}),h[e])return p(u,t[1])?o[t[2]]=null:p(u,t[2])&&(o[t[1]]=null),o;if(2!==r&&i){if(2<=i)return n;for(var a=0;a<t.length;a++){var s=t[a];if(!c(n,s)&&c(l,s)){n[s]=l[s];break}}return n}return o}function c(t,e){return t.hasOwnProperty(e)}function p(t,e){return null!=t[e]&&"auto"!==t[e]}function i(t,e,n){Fd(t,function(t){e[t]=n[t]})}i(Hd[0],l,e),i(Hd[1],l,t)}function qd(t){return Kd({},t)}function Kd(e,n){return n&&e&&Fd(Gd,function(t){n.hasOwnProperty(t)&&(e[t]=n[t])}),e}var $d,Jd,Qd,tf,ef=_h(),nf=(l(of,$d=Fp),of.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n)},of.prototype.mergeDefaultAndTheme=function(t,e){var n=Zd(this),i=n?qd(t):{};b(t,e.getTheme().get(this.mainType)),b(t,this.getDefaultOption()),n&&jd(t,i,n)},of.prototype.mergeOption=function(t,e){b(this.option,t,!0);var n=Zd(this);n&&jd(this.option,t,n)},of.prototype.optionUpdated=function(t,e){},of.prototype.getDefaultOption=function(){var t=this.constructor;if(!(e=t)||!e[kh])return t.defaultOption;var e=ef(this);if(!e.defaultOption){for(var n=[],i=t;i;){var o=i.prototype.defaultOption;o&&n.push(o),i=i.superClass}for(var r={},a=n.length-1;0<=a;a--)r=b(r,n[a],!0);e.defaultOption=r}return e.defaultOption},of.prototype.getReferringComponents=function(t,e){var n=t+"Index",i=t+"Id";return Ih(this.ecModel,t,{index:this.get(n,!0),id:this.get(i,!0)},e)},of.prototype.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")}},of.protoInitialize=((zm=of.prototype).type="component",zm.id="",zm.name="",zm.mainType="",zm.subType="",void(zm.componentIndex=0)),of);function of(t,e,n){n=$d.call(this,t,e,n)||this;return n.uid=Wp("ec_cpt_model"),n}function rf(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}Rh(nf,Fp),Bh(nf,{registerWhenExtend:!0}),Qd={},(Jd=nf).registerSubTypeDefaulter=function(t,e){t=Ph(t);Qd[t.main]=e},Jd.determineSubType=function(t,e){var n,i=e.type;return i||(n=Ph(t).main,Jd.hasSubTypes(t)&&Qd[n]&&(i=Qd[n](e))),i},tf=function(t){var e=[];N(nf.getClassesByMainType(t),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=P(e,function(t){return Ph(t).main}),"dataset"!==t&&L(e,"dataset")<=0&&e.unshift("dataset");return e},nf.topologicalTravel=function(t,e,n,i){if(t.length){var r,a,s,e=(a={},s=[],N(r=e,function(n){var e,i,o=rf(a,n),t=o.originalDeps=tf(n),t=(e=r,i=[],N(t,function(t){0<=L(e,t)&&i.push(t)}),i);o.entryCount=t.length,0===o.entryCount&&s.push(n),N(t,function(t){L(o.predecessor,t)<0&&o.predecessor.push(t);var e=rf(a,t);L(e.successor,t)<0&&e.successor.push(n)})}),{graph:a,noEntryList:s}),o=e.graph,l=e.noEntryList,u={};for(N(t,function(t){u[t]=!0});l.length;){var h=l.pop(),c=o[h],p=!!u[h];p&&(n.call(i,h,c.originalDeps.slice()),delete u[h]),N(c.successor,p?f:d)}N(u,function(){var t="";throw new Error(t)})}function d(t){o[t].entryCount--,0===o[t].entryCount&&l.push(t)}function f(t){u[t]=!0,d(t)}};var af="";"undefined"!=typeof navigator&&(af=navigator.platform||"");var sf="rgba(0, 0, 0, 0.2)",lf={darkMode:"auto",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:sf,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:sf,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:sf,dashArrayX:[1,0],dashArrayY:[4,3],dashLineOffset:0,rotation:-Math.PI/4},{color:sf,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:sf,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:sf,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:af.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},uf=ct(["tooltip","label","itemName","itemId","seriesName"]),hf="original",cf="arrayRows",pf="objectRows",df="keyedColumns",ff="typedArray",gf="unknown",yf="column",mf="row",vf={Must:1,Might:2,Not:3},xf=_h();function _f(t,e){var n=t?t.metaRawOption:null;return{seriesLayoutBy:tt(e.seriesLayoutBy,n?n.seriesLayoutBy:null),sourceHeader:tt(e.sourceHeader,t?t.startIndex:null),dimensions:tt(e.dimensions,t?t.dimensionsDefine:null)}}function bf(n,t,e){var o={},i=Sf(t);if(!i||!n)return o;var r,a,s=[],l=[],t=t.ecModel,t=xf(t).datasetMap,e=i.uid+"_"+e.seriesLayoutBy;N(n=n.slice(),function(t,e){t=Y(t)?t:n[e]={name:t};"ordinal"===t.type&&null==r&&(r=e,a=c(t)),o[t.name]=[]});var u=t.get(e)||t.set(e,{categoryWayDim:a,valueWayDim:0});function h(t,e,n){for(var i=0;i<n;i++)t.push(e+i)}function c(t){t=t.dimsDef;return t?t.length:1}return N(n,function(t,e){var n,i=t.name,t=c(t);null==r?(n=u.valueWayDim,h(o[i],n,t),h(l,n,t),u.valueWayDim+=t):r===e?(h(o[i],0,t),h(s,0,t)):(n=u.categoryWayDim,h(o[i],n,t),h(l,n,t),u.categoryWayDim+=t)}),s.length&&(o.itemName=s),l.length&&(o.seriesName=l),o}function wf(t,l,u){var e={};if(!Sf(t))return e;var h,c=l.sourceFormat,p=l.dimensionsDefine;c!==pf&&c!==df||N(p,function(t,e){"name"===(Y(t)?t.name:t)&&(h=e)});t=function(){for(var t={},e={},n=[],i=0,o=Math.min(5,u);i<o;i++){var r=Mf(l.data,c,l.seriesLayoutBy,p,l.startIndex,i);n.push(r);var a=r===vf.Not;if(a&&null==t.v&&i!==h&&(t.v=i),null!=t.n&&t.n!==t.v&&(a||n[t.n]!==vf.Not)||(t.n=i),s(t)&&n[t.n]!==vf.Not)return t;a||(r===vf.Might&&null==e.v&&i!==h&&(e.v=i),null!=e.n&&e.n!==e.v||(e.n=i))}function s(t){return null!=t.v&&null!=t.n}return s(t)?t:s(e)?e:null}();return t&&(e.value=[t.v],t=null!=h?h:t.n,e.itemName=[t],e.seriesName=[t]),e}function Sf(t){if(!t.get("data",!0))return Ih(t.ecModel,"dataset",{index:t.get("datasetIndex",!0),id:t.get("datasetId",!0)},Sh).models[0]}function Mf(t,e,n,i,o,r){var a,s,l;if(Z(t))return vf.Not;if(i&&(Y(i=i[r])?(s=i.name,l=i.type):H(i)&&(s=i)),null!=l)return"ordinal"===l?vf.Must:vf.Not;if(e===cf){var u=t;if(n===mf){for(var h=u[r],c=0;c<(h||[]).length&&c<5;c++)if(null!=(a=m(h[o+c])))return a}else for(c=0;c<u.length&&c<5;c++){var p=u[o+c];if(p&&null!=(a=m(p[r])))return a}}else if(e===pf){var d=t;if(!s)return vf.Not;for(c=0;c<d.length&&c<5;c++){if((g=d[c])&&null!=(a=m(g[s])))return a}}else if(e===df){if(!s)return vf.Not;if(!(h=t[s])||Z(h))return vf.Not;for(c=0;c<h.length&&c<5;c++)if(null!=(a=m(h[c])))return a}else if(e===hf)for(var f=t,c=0;c<f.length&&c<5;c++){var g,y=ch(g=f[c]);if(!F(y))return vf.Not;if(null!=(a=m(y[r])))return a}function m(t){var e=H(t);return null!=t&&isFinite(t)&&""!==t?e?vf.Might:vf.Not:e&&"-"!==t?vf.Must:void 0}return vf.Not}var If=ct();var Tf,Cf,Df,Af=_h(),Lf=_h(),kf=(Pf.prototype.getColorFromPalette=function(t,e,n){var i=lh(this.get("color",!0)),o=this.get("colorLayer",!0);return Rf(this,Af,i,o,t,e,n)},Pf.prototype.clearColorPalette=function(){var t,e;(e=Af)(t=this).paletteIdx=0,e(t).paletteNameMap={}},Pf);function Pf(){}function Of(t,e,n,i){var o=lh(t.get(["aria","decal","decals"]));return Rf(t,Lf,o,null,e,n,i)}function Rf(t,e,n,i,o,r,a){e=e(r=r||t),t=e.paletteIdx||0,r=e.paletteNameMap=e.paletteNameMap||{};if(r.hasOwnProperty(o))return r[o];a=null!=a&&i?function(t,e){for(var n=t.length,i=0;i<n;i++)if(t[i].length>e)return t[i];return t[n-1]}(i,a):n;if((a=a||n)&&a.length){n=a[t];return o&&(r[o]=n),e.paletteIdx=(t+1)%a.length,n}}var Nf,Ef="\0_ec_inner",zf=(l(Bf,Nf=Fp),Bf.prototype.init=function(t,e,n,i,o,r){i=i||{},this.option=null,this._theme=new Fp(i),this._locale=new Fp(o),this._optionManager=r},Bf.prototype.setOption=function(t,e,n){ot(!(Ef in t),"please use chart.getOption()");e=Gf(e);this._optionManager.setOption(t,n,e),this._resetOption(null,e)},Bf.prototype.resetOption=function(t,e){return this._resetOption(t,Gf(e))},Bf.prototype._resetOption=function(t,e){var n,i=!1,o=this._optionManager;return t&&"recreate"!==t||(n=o.mountOption("recreate"===t),this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(n,e)):Df(this,n),i=!0),"timeline"!==t&&"media"!==t||this.restoreData(),t&&"recreate"!==t&&"timeline"!==t||(n=o.getTimelineOption(this))&&(i=!0,this._mergeOption(n,e)),t&&"recreate"!==t&&"media"!==t||(o=o.getMediaOption(this)).length&&N(o,function(t){i=!0,this._mergeOption(t,e)},this),i},Bf.prototype.mergeOption=function(t){this._mergeOption(t,null)},Bf.prototype._mergeOption=function(i,t){var o=this.option,u=this._componentsMap,h=this._componentsCount,n=[],r=ct(),c=t&&t.replaceMergeMainTypeMap;xf(this).datasetMap=ct(),N(i,function(t,e){null!=t&&(nf.hasClass(e)?e&&(n.push(e),r.set(e,!0)):o[e]=null==o[e]?C(t):b(o[e],t,!0))}),c&&c.each(function(t,e){nf.hasClass(e)&&!r.get(e)&&(n.push(e),r.set(e,!0))}),nf.topologicalTravel(n,nf.getAllClassMainTypes(),function(r){var t=function(t,e,n){return(e=If.get(e))&&(t=e(t))?n.concat(t):n}(this,r,lh(i[r])),e=u.get(r),n=e?c&&c.get(r)?"replaceMerge":"normalMerge":"replaceAll",n=ph(e,t,n);vh(n,r,nf),o[r]=null,u.set(r,null),h.set(r,0);var a=[],s=[],l=0;N(n,function(t,e){var n,i=t.existing,o=t.newOption;o?(n=nf.getClass(r,t.keyInfo.subType,!0),i&&i.constructor===n?(i.name=t.keyInfo.name,i.mergeOption(o,this),i.optionUpdated(o,!1)):(e=O({componentIndex:e},t.keyInfo),O(i=new n(o,this,this,e),e),t.brandNew&&(i.__requireNewView=!0),i.init(o,this,this),i.optionUpdated(null,!0))):i&&(i.mergeOption({},this),i.optionUpdated({},!1)),i?(a.push(i.option),s.push(i),l++):(a.push(void 0),s.push(void 0))},this),o[r]=a,u.set(r,s),h.set(r,l),"series"===r&&Tf(this)},this),this._seriesIndices||Tf(this)},Bf.prototype.getOption=function(){var a=C(this.option);return N(a,function(t,e){if(nf.hasClass(e)){for(var n=lh(t),i=n.length,o=!1,r=i-1;0<=r;r--)n[r]&&!mh(n[r])?o=!0:(n[r]=null,o||i--);n.length=i,a[e]=n}}),delete a[Ef],a},Bf.prototype.getTheme=function(){return this._theme},Bf.prototype.getLocaleModel=function(){return this._locale},Bf.prototype.getLocale=function(t){return this.getLocaleModel().get(t)},Bf.prototype.setUpdatePayload=function(t){this._payload=t},Bf.prototype.getUpdatePayload=function(){return this._payload},Bf.prototype.getComponent=function(t,e){var n=this._componentsMap.get(t);if(n){t=n[e||0];if(t)return t;if(null==e)for(var i=0;i<n.length;i++)if(n[i])return n[i]}},Bf.prototype.queryComponents=function(t){var e=t.mainType;if(!e)return[];var n,i=t.index,o=t.id,r=t.name,a=this._componentsMap.get(e);return a&&a.length?(null!=i?(n=[],N(lh(i),function(t){a[t]&&n.push(a[t])})):n=null!=o?Vf("id",o,a):null!=r?Vf("name",r,a):R(a,function(t){return!!t}),Ff(n,t)):[]},Bf.prototype.findComponents=function(t){var e,n,i,o,r,a=t.query,s=t.mainType,l=(n=s+"Index",i=s+"Id",o=s+"Name",!(e=a)||null==e[n]&&null==e[i]&&null==e[o]?null:{mainType:s,index:e[n],id:e[i],name:e[o]}),l=l?this.queryComponents(l):R(this._componentsMap.get(s),function(t){return!!t});return r=Ff(l,t),t.filter?R(r,t.filter):r},Bf.prototype.eachComponent=function(t,e,n){var i=this._componentsMap;if(G(t)){var o=e,r=t;i.each(function(t,e){for(var n=0;t&&n<t.length;n++){var i=t[n];i&&r.call(o,e,i,i.componentIndex)}})}else for(var a=H(t)?i.get(t):Y(t)?this.findComponents(t):null,s=0;a&&s<a.length;s++){var l=a[s];l&&e.call(n,l,l.componentIndex)}},Bf.prototype.getSeriesByName=function(t){var e=gh(t,null);return R(this._componentsMap.get("series"),function(t){return!!t&&null!=e&&t.name===e})},Bf.prototype.getSeriesByIndex=function(t){return this._componentsMap.get("series")[t]},Bf.prototype.getSeriesByType=function(e){return R(this._componentsMap.get("series"),function(t){return!!t&&t.subType===e})},Bf.prototype.getSeries=function(){return R(this._componentsMap.get("series").slice(),function(t){return!!t})},Bf.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},Bf.prototype.eachSeries=function(n,i){Cf(this),N(this._seriesIndices,function(t){var e=this._componentsMap.get("series")[t];n.call(i,e,t)},this)},Bf.prototype.eachRawSeries=function(e,n){N(this._componentsMap.get("series"),function(t){t&&e.call(n,t,t.componentIndex)})},Bf.prototype.eachSeriesByType=function(n,i,o){Cf(this),N(this._seriesIndices,function(t){var e=this._componentsMap.get("series")[t];e.subType===n&&i.call(o,e,t)},this)},Bf.prototype.eachRawSeriesByType=function(t,e,n){return N(this.getSeriesByType(t),e,n)},Bf.prototype.isSeriesFiltered=function(t){return Cf(this),null==this._seriesIndicesMap.get(t.componentIndex)},Bf.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},Bf.prototype.filterSeries=function(n,i){Cf(this);var o=[];N(this._seriesIndices,function(t){var e=this._componentsMap.get("series")[t];n.call(i,e,t)&&o.push(t)},this),this._seriesIndices=o,this._seriesIndicesMap=ct(o)},Bf.prototype.restoreData=function(n){Tf(this);var t=this._componentsMap,i=[];t.each(function(t,e){nf.hasClass(e)&&i.push(e)}),nf.topologicalTravel(i,nf.getAllClassMainTypes(),function(e){N(t.get(e),function(t){!t||"series"===e&&function(t,e){if(e){var n=e.seriesIndex,i=e.seriesId,e=e.seriesName;return null!=n&&t.componentIndex!==n||null!=i&&t.id!==i||null!=e&&t.name!==e}}(t,n)||t.restoreData()})})},Bf.internalField=(Tf=function(t){var e=t._seriesIndices=[];N(t._componentsMap.get("series"),function(t){t&&e.push(t.componentIndex)}),t._seriesIndicesMap=ct(e)},Cf=function(t){0},void(Df=function(t,e){t.option={},t.option[Ef]=1,t._componentsMap=ct({series:[]}),t._componentsCount=ct();var n,i,o=e.aria;Y(o)&&null==o.enabled&&(o.enabled=!0),n=e,o=t._theme.option,i=n.color&&!n.colorLayer,N(o,function(t,e){"colorLayer"===e&&i||nf.hasClass(e)||("object"==typeof t?n[e]=n[e]?b(n[e],t,!1):C(t):null==n[e]&&(n[e]=t))}),b(e,lf,!1),t._mergeOption(e,null)})),Bf);function Bf(){return null!==Nf&&Nf.apply(this,arguments)||this}function Vf(e,t,n){if(F(t)){var i=ct();return N(t,function(t){null!=t&&null!=gh(t,null)&&i.set(t,!0)}),R(n,function(t){return t&&i.get(t[e])})}var o=gh(t,null);return R(n,function(t){return t&&null!=o&&t[e]===o})}function Ff(t,e){return e.hasOwnProperty("subType")?R(t,function(t){return t&&t.subType===e.subType}):t}function Gf(t){var e=ct();return t&&N(lh(t.replaceMerge),function(t){e.set(t,!0)}),{replaceMergeMainTypeMap:e}}I(zf,kf);function Hf(e){N(Wf,function(t){this[t]=B(e[t],e)},this)}var Wf=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],Xf={},Yf=(Uf.prototype.create=function(n,i){var o=[];N(Xf,function(t,e){t=t.create(n,i);o=o.concat(t||[])}),this._coordinateSystems=o},Uf.prototype.update=function(e,n){N(this._coordinateSystems,function(t){t.update&&t.update(e,n)})},Uf.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},Uf.register=function(t,e){Xf[t]=e},Uf.get=function(t){return Xf[t]},Uf);function Uf(){this._coordinateSystems=[]}var Zf=/^(min|max)?(.+)$/,jf=(qf.prototype.setOption=function(t,e,n){t&&(N(lh(t.series),function(t){t&&t.data&&Z(t.data)&&st(t.data)}),N(lh(t.dataset),function(t){t&&t.source&&Z(t.source)&&st(t.source)})),t=C(t);var i=this._optionBackup,e=function(t,n,i){var e,o,r=[],a=t.baseOption,s=t.timeline,l=t.options,u=t.media,h=!!t.media,c=!!(l||s||a&&a.timeline);a?(o=a).timeline||(o.timeline=s):((c||h)&&(t.options=t.media=null),o=t);h&&F(u)&&N(u,function(t){t&&t.option&&(t.query?r.push(t):e=e||t)});function p(e){N(n,function(t){t(e,i)})}return p(o),N(l,p),N(r,function(t){return p(t.option)}),{baseOption:o,timelineOptions:l||[],mediaDefault:e,mediaList:r}}(t,e,!i);this._newBaseOption=e.baseOption,i?(e.timelineOptions.length&&(i.timelineOptions=e.timelineOptions),e.mediaList.length&&(i.mediaList=e.mediaList),e.mediaDefault&&(i.mediaDefault=e.mediaDefault)):this._optionBackup=e},qf.prototype.mountOption=function(t){var e=this._optionBackup;return this._timelineOptions=e.timelineOptions,this._mediaList=e.mediaList,this._mediaDefault=e.mediaDefault,this._currentMediaIndices=[],C(t?e.baseOption:this._newBaseOption)},qf.prototype.getTimelineOption=function(t){var e,n=this._timelineOptions;return!n.length||(t=t.getComponent("timeline"))&&(e=C(n[t.getCurrentIndex()])),e},qf.prototype.getMediaOption=function(t){var e=this._api.getWidth(),n=this._api.getHeight(),i=this._mediaList,o=this._mediaDefault,r=[],a=[];if(!i.length&&!o)return a;for(var s,l,u=0,h=i.length;u<h;u++)!function(t,e,n){var i={width:e,height:n,aspectratio:e/n},o=!0;return N(t,function(t,e){var n=e.match(Zf);n&&n[1]&&n[2]&&(e=n[1],n=n[2].toLowerCase(),n=i[n],t=t,("min"===(e=e)?t<=n:"max"===e?n<=t:n===t)||(o=!1))}),o}(i[u].query,e,n)||r.push(u);return!r.length&&o&&(r=[-1]),r.length&&(s=r,l=this._currentMediaIndices,s.join(",")!==l.join(","))&&(a=P(r,function(t){return C((-1===t?o:i[t]).option)})),this._currentMediaIndices=r,a},qf);function qf(t){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=t}var Kf=N,$f=Y,Jf=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Qf(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=Jf.length;n<i;n++){var o=Jf[n],r=e.normal,a=e.emphasis;r&&r[o]&&(t[o]=t[o]||{},t[o].normal?b(t[o].normal,r[o]):t[o].normal=r[o],r[o]=null),a&&a[o]&&(t[o]=t[o]||{},t[o].emphasis?b(t[o].emphasis,a[o]):t[o].emphasis=a[o],a[o]=null)}}function tg(t,e,n){var i,o;t&&t[e]&&(t[e].normal||t[e].emphasis)&&(i=t[e].normal,o=t[e].emphasis,i&&(n?(t[e].normal=t[e].emphasis=null,A(t[e],i)):t[e]=i),o&&(t.emphasis=t.emphasis||{},(t.emphasis[e]=o).focus&&(t.emphasis.focus=o.focus),o.blurScope&&(t.emphasis.blurScope=o.blurScope)))}function eg(t){tg(t,"itemStyle"),tg(t,"lineStyle"),tg(t,"areaStyle"),tg(t,"label"),tg(t,"labelLine"),tg(t,"upperLabel"),tg(t,"edgeLabel")}function ng(t,e){var n=$f(t)&&t[e],i=$f(n)&&n.textStyle;if(i){0;for(var o=0,r=hh.length;o<r;o++){var a=hh[o];i.hasOwnProperty(a)&&(n[a]=i[a])}}}function ig(t){t&&(eg(t),ng(t,"label"),t.emphasis&&ng(t.emphasis,"label"))}function og(t){return F(t)?t:t?[t]:[]}function rg(t){return(F(t)?t[0]:t)||{}}function ag(e,t){Kf(og(e.series),function(t){$f(t)&&function(t){if($f(t)){Qf(t),eg(t),ng(t,"label"),ng(t,"upperLabel"),ng(t,"edgeLabel"),t.emphasis&&(ng(t.emphasis,"label"),ng(t.emphasis,"upperLabel"),ng(t.emphasis,"edgeLabel"));var e=t.markPoint;e&&(Qf(e),ig(e));var n=t.markLine;n&&(Qf(n),ig(n));var i=t.markArea;i&&ig(i);var o=t.data;if("graph"===t.type){o=o||t.nodes;var r=t.links||t.edges;if(r&&!Z(r))for(var a=0;a<r.length;a++)ig(r[a]);N(t.categories,function(t){eg(t)})}if(o&&!Z(o))for(a=0;a<o.length;a++)ig(o[a]);if((e=t.markPoint)&&e.data)for(var s=e.data,a=0;a<s.length;a++)ig(s[a]);if((n=t.markLine)&&n.data)for(var l=n.data,a=0;a<l.length;a++)F(l[a])?(ig(l[a][0]),ig(l[a][1])):ig(l[a]);"gauge"===t.type?(ng(t,"axisLabel"),ng(t,"title"),ng(t,"detail")):"treemap"===t.type?(tg(t.breadcrumb,"itemStyle"),N(t.levels,function(t){eg(t)})):"tree"===t.type&&eg(t.leaves)}}(t)});var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),Kf(n,function(t){Kf(og(e[t]),function(t){t&&(ng(t,"axisLabel"),ng(t.axisPointer,"label"))})}),Kf(og(e.parallel),function(t){t=t&&t.parallelAxisDefault;ng(t,"axisLabel"),ng(t&&t.axisPointer,"label")}),Kf(og(e.calendar),function(t){tg(t,"itemStyle"),ng(t,"dayLabel"),ng(t,"monthLabel"),ng(t,"yearLabel")}),Kf(og(e.radar),function(t){ng(t,"name"),t.name&&null==t.axisName&&(t.axisName=t.name,delete t.name),null!=t.nameGap&&null==t.axisNameGap&&(t.axisNameGap=t.nameGap,delete t.nameGap)}),Kf(og(e.geo),function(t){$f(t)&&(ig(t),Kf(og(t.regions),function(t){ig(t)}))}),Kf(og(e.timeline),function(t){ig(t),tg(t,"label"),tg(t,"itemStyle"),tg(t,"controlStyle",!0);t=t.data;F(t)&&N(t,function(t){Y(t)&&(tg(t,"label"),tg(t,"itemStyle"))})}),Kf(og(e.toolbox),function(t){tg(t,"iconStyle"),Kf(t.feature,function(t){tg(t,"iconStyle")})}),ng(rg(e.axisPointer),"label"),ng(rg(e.tooltip).axisPointer,"label")}function sg(e){e&&N(lg,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var lg=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],ug=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],hg=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function cg(t){var e=t&&t.itemStyle;if(e)for(var n=0;n<hg.length;n++){var i=hg[n][1],o=hg[n][0];null!=e[i]&&(e[o]=e[i])}}function pg(t){t&&"edge"===t.alignTo&&null!=t.margin&&null==t.edgeDistance&&(t.edgeDistance=t.margin)}function dg(t){t&&t.downplay&&!t.blur&&(t.blur=t.downplay)}function fg(e,t){ag(e,t),e.series=lh(e.series),N(e.series,function(t){if(Y(t)){var e,n,i=t.type;if("line"===i)null!=t.clipOverflow&&(t.clip=t.clipOverflow);else if("pie"===i||"gauge"===i){if(null!=t.clockWise&&(t.clockwise=t.clockWise),pg(t.label),(e=t.data)&&!Z(e))for(var o=0;o<e.length;o++)pg(e[o]);null!=t.hoverOffset&&(t.emphasis=t.emphasis||{},(t.emphasis.scaleSize=null)&&(t.emphasis.scaleSize=t.hoverOffset))}else if("gauge"===i){var r=function(t,e){for(var n=e.split(","),i=t,o=0;o<n.length&&null!=(i=i&&i[n[o]]);o++);return i}(t,"pointer.color");null!=r&&function(t,e,n,i){for(var o,r=e.split(","),a=t,s=0;s<r.length-1;s++)null==a[o=r[s]]&&(a[o]={}),a=a[o];!i&&null!=a[r[s]]||(a[r[s]]=n)}(t,"itemStyle.color",r)}else if("bar"===i){if(cg(t),cg(t.backgroundStyle),cg(t.emphasis),(e=t.data)&&!Z(e))for(o=0;o<e.length;o++)"object"==typeof e[o]&&(cg(e[o]),cg(e[o]&&e[o].emphasis))}else{"sunburst"===i?((n=t.highlightPolicy)&&(t.emphasis=t.emphasis||{},t.emphasis.focus||(t.emphasis.focus=n)),dg(t),function t(e,n){if(e)for(var i=0;i<e.length;i++)n(e[i]),e[i]&&t(e[i].children,n)}(t.data,dg)):"graph"===i||"sankey"===i?(n=t)&&null!=n.focusNodeAdjacency&&(n.emphasis=n.emphasis||{},null==n.emphasis.focus&&(n.emphasis.focus="adjacency")):"map"===i&&(t.mapType&&!t.map&&(t.map=t.mapType),t.mapLocation&&A(t,t.mapLocation))}null!=t.hoverAnimation&&(t.emphasis=t.emphasis||{},t.emphasis&&null==t.emphasis.scale&&(t.emphasis.scale=t.hoverAnimation)),sg(t)}}),e.dataRange&&(e.visualMap=e.dataRange),N(ug,function(t){t=e[t];t&&(F(t)||(t=[t]),N(t,function(t){sg(t)}))})}function gg(g){N(g,function(u,h){var c=[],p=[NaN,NaN],t=[u.stackResultDimension,u.stackedOverDimension],d=u.data,f=u.isStackedByIndex,t=d.map(t,function(t,e,n){var i,o,r=d.get(u.stackedDimension,n);if(isNaN(r))return p;f?o=d.getRawIndex(n):i=d.get(u.stackedByDimension,n);for(var a=NaN,s=h-1;0<=s;s--){var l=g[s];if(f||(o=l.data.rawIndexOf(l.stackedByDimension,i)),0<=o){l=l.data.getByRawIndex(l.stackResultDimension,o);if(0<=r&&0<l||r<=0&&l<0){r+=l,a=l;break}}}return c[0]=r,c[1]=a,c});d.hostModel.setData(t),u.data=t})}var yg,mg,vg=function(t){this.data=t.data||(t.sourceFormat===df?{}:[]),this.sourceFormat=t.sourceFormat||gf,this.seriesLayoutBy=t.seriesLayoutBy||yf,this.startIndex=t.startIndex||0,this.dimensionsDefine=t.dimensionsDefine,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.encodeDefine=t.encodeDefine,this.metaRawOption=t.metaRawOption};function xg(t){return t instanceof vg}function _g(t,e,n,i){n=n||function(t){var e=gf;if(Z(t))e=ff;else if(F(t)){0===t.length&&(e=cf);for(var n=0,i=t.length;n<i;n++){var o=t[n];if(null!=o){if(F(o)){e=cf;break}if(Y(o)){e=pf;break}}}}else if(Y(t)){for(var r in t)if(ft(t,r)&&k(t[r])){e=df;break}}else if(null!=t)throw new Error("Invalid data");return e}(t);var o=e.seriesLayoutBy,r=function(t,e,n,i,o){var r,a;if(!t)return{dimensionsDefine:Sg(o),startIndex:a,dimensionsDetectedCount:r};{var s;e===cf?(s=t,"auto"===i||null==i?Mg(function(t){null!=t&&"-"!==t&&(H(t)?null==a&&(a=1):a=0)},n,s,10):a=X(i)?i:i?1:0,o||1!==a||(o=[],Mg(function(t,e){o[e]=null!=t?t+"":""},n,s,1/0)),r=o?o.length:n===mf?s.length:s[0]?s[0].length:null):e===pf?o=o||function(t){var e,n=0;for(;n<t.length&&!(e=t[n++]););if(e){var i=[];return N(e,function(t,e){i.push(e)}),i}}(t):e===df?o||(o=[],N(t,function(t,e){o.push(e)})):e===hf&&(t=ch(t[0]),r=F(t)&&t.length||1)}return{startIndex:a,dimensionsDefine:Sg(o),dimensionsDetectedCount:r}}(t,n,o,e.sourceHeader,e.dimensions);return new vg({data:t,sourceFormat:n,seriesLayoutBy:o,dimensionsDefine:r.dimensionsDefine,startIndex:r.startIndex,dimensionsDetectedCount:r.dimensionsDetectedCount,encodeDefine:wg(i),metaRawOption:C(e)})}function bg(t){return new vg({data:t,sourceFormat:Z(t)?ff:hf})}function wg(t){return t?ct(t):null}function Sg(t){if(t){var i=ct();return P(t,function(t,e){var n={name:(t=Y(t)?t:{name:t}).name,displayName:t.displayName,type:t.type};if(null==name)return n;n.name+="",null==n.displayName&&(n.displayName=n.name);t=i.get(n.name);return t?n.name+="-"+t.count++:i.set(n.name,{count:1}),n})}}function Mg(t,e,n,i){if(e===mf)for(var o=0;o<n.length&&o<i;o++)t(n[o]?n[o][0]:null,o);else for(var r=n[0]||[],o=0;o<r.length&&o<i;o++)t(r[o],o)}var Ig=(Tg.prototype.getSource=function(){return this._source},Tg.prototype.count=function(){return 0},Tg.prototype.getItem=function(t,e){},Tg.prototype.appendData=function(t){},Tg.prototype.clean=function(){},Tg.protoInitialize=((vm=Tg.prototype).pure=!1,void(vm.persistent=!0)),Tg.internalField=function(){var t;mg=function(t,e,n){var i=n.sourceFormat,o=n.seriesLayoutBy,r=n.startIndex,a=n.dimensionsDefine,n=yg[Og(i,o)];O(t,n),i===ff?(t.getItem=s,t.count=u,t.fillStorage=l):(n=Dg(i,o),t.getItem=B(n,null,e,r,a),o=Lg(i,o),t.count=B(o,null,e,r,a))};var s=function(t,e){t-=this._offset,e=e||[];for(var n=this._data,i=this._dimSize,o=i*t,r=0;r<i;r++)e[r]=n[o+r];return e},l=function(t,e,n,i){for(var o=this._data,r=this._dimSize,a=0;a<r;a++){for(var s=i[a],l=null==s[0]?1/0:s[0],u=null==s[1]?-1/0:s[1],h=e-t,c=n[a],p=0;p<h;p++){var d=o[(t+p)*r+a];(c[t+p]=d)<l&&(l=d),u<d&&(u=d)}s[0]=l,s[1]=u}},u=function(){return this._data?this._data.length/this._dimSize:0};function e(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}(t={})[cf+"_"+yf]={pure:!0,appendData:e},t[cf+"_"+mf]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[pf]={pure:!0,appendData:e},t[df]={pure:!0,appendData:function(t){var o=this._data;N(t,function(t,e){for(var n=o[e]||(o[e]=[]),i=0;i<(t||[]).length;i++)n.push(t[i])})}},t[hf]={appendData:e},t[ff]={persistent:!1,pure:!0,appendData:function(t){this._data=t},clean:function(){this._offset+=this.count(),this._data=null}},yg=t}(),Tg);function Tg(t,e){var n=xg(t)?t:bg(t);this._source=n;t=this._data=n.data;n.sourceFormat===ff&&(this._offset=0,this._dimSize=e,this._data=t),mg(this,t,n)}var Ea=function(t,e,n,i){return t[i]},Cg=((mu={})[cf+"_"+yf]=function(t,e,n,i){return t[i+e]},mu[cf+"_"+mf]=function(t,e,n,i){i+=e;for(var o=[],r=t,a=0;a<r.length;a++){var s=r[a];o.push(s?s[i]:null)}return o},mu[pf]=Ea,mu[df]=function(t,e,n,i){for(var o=[],r=0;r<n.length;r++){var a=n[r].name;0;a=t[a];o.push(a?a[i]:null)}return o},mu[hf]=Ea,mu);function Dg(t,e){e=Cg[Og(t,e)];return e}var n=function(t,e,n){return t.length},Ag=((g={})[cf+"_"+yf]=function(t,e,n){return Math.max(0,t.length-e)},g[cf+"_"+mf]=function(t,e,n){t=t[0];return t?Math.max(0,t.length-e):0},g[pf]=n,g[df]=function(t,e,n){n=n[0].name;n=t[n];return n?n.length:0},g[hf]=n,g);function Lg(t,e){e=Ag[Og(t,e)];return e}var Gh=function(t,e,n){return null!=e?t[e]:t},kg=((kp={})[cf]=Gh,kp[pf]=function(t,e,n){return null!=e?t[n]:t},kp[df]=Gh,kp[hf]=function(t,e,n){t=ch(t);return null!=e&&t instanceof Array?t[e]:t},kp[ff]=Gh,kp);function Pg(t){t=kg[t];return t}function Og(t,e){return t===cf?t+"_"+e:t}function Rg(t,e,n){if(t){var i=t.getRawDataItem(e);if(null!=i){var o,r,e=t.getProvider().getSource().sourceFormat,n=t.getDimensionInfo(n);return n&&(o=n.name,r=n.index),Pg(e)(i,r,o)}}}var Ng=/\{@(.+?)\}/g,ni=(Eg.prototype.getDataParams=function(t,e){var n=this.getData(e),i=this.getRawValue(t,e),o=n.getRawIndex(t),r=n.getName(t),a=n.getRawDataItem(t),s=n.getItemVisual(t,"style"),l=s&&s[n.getItemVisual(t,"drawType")||"fill"],u=s&&s.stroke,t=this.mainType,s="series"===t,n=n.userOutput;return{componentType:t,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:s?this.subType:null,seriesIndex:this.seriesIndex,seriesId:s?this.id:null,seriesName:s?this.name:null,name:r,dataIndex:o,data:a,dataType:e,value:i,color:l,borderColor:u,dimensionNames:n?n.dimensionNames:null,encode:n?n.encode:null,$vars:["seriesName","name","value"]}},Eg.prototype.getFormattedLabel=function(i,t,e,n,o,r){t=t||"normal";var a=this.getData(e),e=this.getDataParams(i,e);return r&&O(e,r),null!=n&&e.value instanceof Array&&(e.value=e.value[n]),"function"==typeof(o=o||a.getItemModel(i).get("normal"===t?["label","formatter"]:[t,"label","formatter"]))?(e.status=t,e.dimensionIndex=n,o(e)):"string"==typeof o?Rd(o,e).replace(Ng,function(t,e){var n=e.length;return"["===e.charAt(0)&&"]"===e.charAt(n-1)&&(e=+e.slice(1,n-1)),Rg(a,i,e)}):void 0},Eg.prototype.getRawValue=function(t,e){return Rg(this.getData(e),t)},Eg.prototype.formatTooltip=function(t,e,n){},Eg);function Eg(){}function zg(t){var e,n;return Y(t)?t.type&&(n=t):e=t,{markupText:e,markupFragment:n}}function Bg(t){return new Vg(t)}var Vg=(Fg.prototype.perform=function(t){var e,n=this._upstream,i=t&&t.skip;this._dirty&&n&&((r=this.context).data=r.outputData=n.context.outputData),this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!i&&(e=this._plan(this.context));var o=l(this._modBy),r=this._modDataCount||0,a=l(t&&t.modBy),s=t&&t.modDataCount||0;function l(t){return 1<=t||(t=1),t}o===a&&r===s||(e="reset"),!this._dirty&&"reset"!==e||(this._dirty=!1,d=this._doReset(i)),this._modBy=a,this._modDataCount=s;t=t&&t.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var u=this._dueIndex,h=Math.min(null!=t?this._dueIndex+t:1/0,this._dueEnd);if(!i&&(d||u<h)){var c=this._progress;if(F(c))for(var p=0;p<c.length;p++)this._doProgress(c[p],u,h,a,s);else this._doProgress(c,u,h,a,s)}this._dueIndex=h;var d=null!=this._settedOutputEnd?this._settedOutputEnd:h;0,this._outputDueEnd=d}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()},Fg.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},Fg.prototype._doProgress=function(t,e,n,i,o){Zg.reset(e,n,i,o),this._callingProgress=t,this._callingProgress({start:e,end:n,count:n-e,next:Zg.next},this.context)},Fg.prototype._doReset=function(t){var e;this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null,!t&&this._reset&&((n=this._reset(this.context))&&n.progress&&(e=n.forceFirstProgress,n=n.progress),F(n)&&!n.length&&(n=null)),this._progress=n,this._modBy=this._modDataCount=null;var n=this._downstream;return n&&n.dirty(),e},Fg.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},Fg.prototype.pipe=function(t){this._downstream===t&&!this._dirty||((this._downstream=t)._upstream=this,t.dirty())},Fg.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},Fg.prototype.getUpstream=function(){return this._upstream},Fg.prototype.getDownstream=function(){return this._downstream},Fg.prototype.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t},Fg);function Fg(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}var Gg,Hg,Wg,Xg,Yg,Ug,Zg=Ug={reset:function(t,e,n,i){Hg=t,Gg=e,Wg=n,Xg=i,Yg=Math.ceil(Xg/Wg),Ug.next=1<Wg&&0<Xg?qg:jg}};function jg(){return Hg<Gg?Hg++:null}function qg(){var t=Hg%Yg*Wg+Math.ceil(Hg/Yg),t=Gg<=Hg?null:t<Xg?t:Hg;return Hg++,t}function Kg(t,e){var n=e&&e.type;if("ordinal"!==n)return"time"===n&&"number"!=typeof t&&null!=t&&"-"!==t&&(t=+Uu(t)),null==t||""===t?NaN:+t;e=e&&e.ordinalMeta;return e?e.parseAndCollect(t):t}var $g=ct({number:function(t){return parseFloat(t)},time:function(t){return+Uu(t)},trim:function(t){return"string"==typeof t?rt(t):t}});function Jg(t){return $g.get(t)}var Qg={lt:function(t,e){return t<e},lte:function(t,e){return t<=e},gt:function(t,e){return e<t},gte:function(t,e){return e<=t}},ty=(ey.prototype.evaluate=function(t){return"number"==typeof t?this._opFn(t,this._rvalFloat):this._opFn(Ju(t),this._rvalFloat)},ey);function ey(t,e){"number"!=typeof e&&rh(""),this._opFn=Qg[t],this._rvalFloat=Ju(e)}var ny=(iy.prototype.evaluate=function(t,e){var n=typeof t,i=typeof e,o="number"==n?t:Ju(t),r="number"==i?e:Ju(e),a=isNaN(o),s=isNaN(r);return a&&(o=this._incomparable),s&&(r=this._incomparable),a&&s&&(i="string"==i,(n="string"==n)&&(o=i?t:0),i&&(r=n?e:0)),o<r?this._resultLT:r<o?-this._resultLT:0},iy);function iy(t,e){t="desc"===t;this._resultLT=t?1:-1,null==e&&(e=t?"min":"max"),this._incomparable="min"===e?-1/0:1/0}var oy=(ry.prototype.evaluate=function(t){var e,n=t===this._rval;return n||((e=typeof t)===this._rvalTypeof||"number"!=e&&"number"!==this._rvalTypeof||(n=Ju(t)===this._rvalFloat)),this._isEQ?n:!n},ry);function ry(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=Ju(e)}var ay=(sy.prototype.getRawData=function(){throw new Error("not supported")},sy.prototype.getRawDataItem=function(t){throw new Error("not supported")},sy.prototype.cloneRawData=function(){},sy.prototype.getDimensionInfo=function(t){},sy.prototype.cloneAllDimensionInfo=function(){},sy.prototype.count=function(){},sy.prototype.retrieveValue=function(t,e){},sy.prototype.retrieveValueFromItem=function(t,e){},sy.prototype.convertValue=Kg,sy);function sy(){}function ly(t){var e=t.sourceFormat,n=t.data;if(e===cf||e===pf||!n||F(n)&&!n.length)return t.data;t="";rh(t)}function uy(t){var e=t.sourceFormat,n=t.data;if(!n)return n;if(F(n)&&!n.length)return[];if(e===cf){for(var i=[],o=0,r=n.length;o<r;o++)i.push(n[o].slice());return i}if(e===pf){for(i=[],o=0,r=n.length;o<r;o++)i.push(O({},n[o]));return i}}function hy(t,e,n){if(null!=n)return"number"==typeof n||!isNaN(n)&&!ft(e,n)?t[n]:ft(e,n)?e[n]:void 0}function cy(t){return C(t)}var py=ct();function dy(t,e){var n=lh(t),i=n.length,t="";i||rh(t);for(var o=0,r=i;o<r;o++){e=function(t,i){var e="";i.length||rh(e);Y(t)||rh(e);var n=t.type,o=py.get(n);o||rh(e);e=P(i,function(t){return function(t,e){var n=new ay,i=t.data,o=n.sourceFormat=t.sourceFormat,r=t.startIndex,a=[],s={},l=t.dimensionsDefine;if(l)N(l,function(t,e){var n=t.name,e={index:e,name:n,displayName:t.displayName};a.push(e),null!=n&&(t="",ft(s,n)&&rh(t),s[n]=e)});else for(var u=0;u<t.dimensionsDetectedCount;u++)a.push({index:u});var h=Dg(o,yf);e.__isBuiltIn&&(n.getRawDataItem=function(t){return h(i,r,a,t)},n.getRawData=B(ly,null,t)),n.cloneRawData=B(uy,null,t),e=Lg(o,yf),n.count=B(e,null,i,r,a);var c=Pg(o);n.retrieveValue=function(t,e){t=h(i,r,a,t);return p(t,e)};var p=n.retrieveValueFromItem=function(t,e){if(null!=t){var n=a[e];return n?c(t,e,n.name):void 0}};return n.getDimensionInfo=B(hy,null,a,s),n.cloneAllDimensionInfo=B(cy,null,a),n}(t,o)}),t=lh(o.transform({upstream:e[0],upstreamList:e,config:C(t.config)}));{}return P(t,function(t){var e="";Y(t)||rh(e);var n=t.data;return null!=n?Y(n)||k(n)||rh(e):n=i[0].data,_g(n,_f(i[0],{seriesLayoutBy:yf,sourceHeader:0,dimensions:t.dimensions}),null,null)})}(n[o],e),o!==r-1&&(e.length=Math.max(e.length,1))}return e}var fy=(gy.prototype.dirty=function(){this._setLocalSource([],[])},gy.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,9e10<this._versionSignBase&&(this._versionSignBase=0)},gy.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},gy.prototype.prepareSource=function(){this._isDirty()&&this._createSource()},gy.prototype._createSource=function(){this._setLocalSource([],[]);var t,e,n,i,o,r=this._sourceHost,a=this._getUpstreamSourceManagers(),s=!!a.length;my(r)?(o=r,n=e=t=void 0,i=s?((i=a[0]).prepareSource(),t=(n=i.getSource()).data,e=n.sourceFormat,[i._getVersionSign()]):(e=Z(t=o.get("data",!0))?ff:hf,[]),o=[_g(t,_f(n,this._getSourceMetaRawOption()),e,o.get("encode",!0))]):(r=r,i=s?(o=(a=this._applyTransform(a)).sourceList,a.upstreamSignList):(o=[_g(r.get("source",!0),this._getSourceMetaRawOption(),null,null)],[])),this._setLocalSource(o,i)},gy.prototype._applyTransform=function(t){var e,n,i=this._sourceHost,o=i.get("transform",!0),r=i.get("fromTransformResult",!0);null!=r&&(e="",1!==t.length&&vy(e));var a=[],s=[];return N(t,function(t){t.prepareSource();var e=t.getSource(r||0),n="";null==r||e||vy(n),a.push(e),s.push(t._getVersionSign())}),o?n=dy(o,a,i.componentIndex):null!=r&&(n=[(i=a[0],new vg({data:i.data,sourceFormat:i.sourceFormat,seriesLayoutBy:i.seriesLayoutBy,dimensionsDefine:C(i.dimensionsDefine),startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,encodeDefine:wg(i.encodeDefine)}))]),{sourceList:n,upstreamSignList:s}},gy.prototype._isDirty=function(){if(!this._sourceList.length)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e<t.length;e++){var n=t[e];if(n._isDirty()||this._upstreamSignList[e]!==n._getVersionSign())return!0}},gy.prototype.getSource=function(t){return this._sourceList[t||0]},gy.prototype._getUpstreamSourceManagers=function(){var t=this._sourceHost;if(my(t)){var e=Sf(t);return e?[e.getSourceManager()]:[]}return P((t=t).get("transform",!0)||t.get("fromTransformResult",!0)?Ih(t.ecModel,"dataset",{index:t.get("fromDatasetIndex",!0),id:t.get("fromDatasetId",!0)},Sh).models:[],function(t){return t.getSourceManager()})},gy.prototype._getSourceMetaRawOption=function(){var t,e,n,i=this._sourceHost;return my(i)?(t=i.get("seriesLayoutBy",!0),e=i.get("sourceHeader",!0),n=i.get("dimensions",!0)):this._getUpstreamSourceManagers().length||(t=(i=i).get("seriesLayoutBy",!0),e=i.get("sourceHeader",!0),n=i.get("dimensions",!0)),{seriesLayoutBy:t,sourceHeader:e,dimensions:n}},gy);function gy(t){this._sourceList=[],this._upstreamSignList=[],this._versionSignBase=0,this._sourceHost=t}function yy(t){t.option.transform&&st(t.option.transform)}function my(t){return"series"===t.mainType}function vy(t){throw new Error(t)}var xy="font-size:12px;color:#6e7079",_y={fontSize:12,fill:"#6e7079"},by={fontSize:14,fill:"#464646",fontWeight:900},wy="line-height:1",Sy=[0,10,20,30],My=["","\n","\n\n","\n\n\n"];function Iy(t,e){return e.type=t,e}function Ty(t){return ft(Cy,t.type)&&Cy[t.type]}var Cy={section:{planLayout:function(t){var e=t.blocks.length,n=1<e||0<e&&!t.noHeader,i=0;N(t.blocks,function(t){Ty(t).planLayout(t);var e=t.__gapLevelBetweenSubBlocks;i<=e&&(i=e+(!n||e&&("section"!==t.type||t.noHeader)?0:1))}),t.__gapLevelBetweenSubBlocks=i},build:function(t,e,n){var i=e.noHeader,o=Ay(e),r=function(n,t,e){var i=[],o=t.blocks||[];ot(!o||F(o)),o=o||[];var r=n.orderMode;{var a,s;t.sortBlocks&&r&&(o=o.slice(),ft(a={valueAsc:"asc",valueDesc:"desc"},r)?(s=new ny(a[r],null),o.sort(function(t,e){return s.evaluate(t.sortParam,e.sortParam)})):"seriesDesc"===r&&o.reverse())}var l=Ay(t);return N(o,function(t,e){e=Ty(t).build(n,t,0<e?l.html:0);null!=e&&i.push(e)}),i.length?"richText"===n.renderMode?i.join(l.richText):Ly(i.join(""),e):void 0}(t,e,i?n:o.html);if(i)return r;e=kd(e.header,"ordinal",t.useUTC);return"richText"===t.renderMode?ky(t,e)+o.richText+r:Ly('<div style="'+xy+";"+wy+';">'+Ld(e)+"</div>"+r,n)}},nameValue:{planLayout:function(t){t.__gapLevelBetweenSubBlocks=0},build:function(t,e,n){var i=t.renderMode,o=e.noName,r=e.noValue,a=!e.markerType,s=e.name,l=e.value,u=t.useUTC;if(!o||!r){var h=a?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",i),c=o?"":kd(s,"ordinal",u),p=e.valueType,d=r?[]:F(l)?P(l,function(t,e){return kd(t,F(p)?p[e]:p,u)}):[kd(l,F(p)?p[0]:p,u)],f=!a||!o,s=!a&&o;return"richText"===i?(a?"":h)+(o?"":ky(t,c))+(r?"":(e=t,l=d,i=[by],t=(t=s)?10:20,f&&i.push({padding:[0,0,0,t],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(l.join("  "),i))):Ly((a?"":h)+(o?"":'<span style="'+xy+";"+(!a?"margin-left:2px":"")+'">'+Ld(c)+"</span>")+(r?"":function(t,e,n){n=n?"10px":"20px";return'<span style="'+(e?"float:right;margin-left:"+n:"")+';font-size:14px;color:#464646;font-weight:900">'+P(t,Ld).join("&nbsp;&nbsp;")+"</span>"}(d,f,s)),n)}}}};function Dy(t,e,n,i,o){if(t){var r=Ty(t);r.planLayout(t);e={useUTC:o,renderMode:n,orderMode:i,markupStyleCreator:e};return r.build(e,t,0)}}function Ay(t){t=t.__gapLevelBetweenSubBlocks;return{html:Sy[t],richText:My[t]}}function Ly(t,e){return'<div style="'+("margin: "+e+"px 0 0")+";"+wy+';">'+t+'<div style="clear:both"></div></div>'}function ky(t,e){return t.markupStyleCreator.wrapRichTextStyle(e,_y)}function Py(t,e){return zd(t.getData().getItemVisual(e,"style")[t.visualDrawType])}function Oy(t,e){t=t.get("padding");return null!=t?t:"richText"===e?[8,10]:10}var Ry=(Ny.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},Ny.prototype.makeTooltipMarker=function(t,e,n){var i="richText"===n?this._generateStyleName():null,n=Ed({color:e,type:t,renderMode:n,markerId:i});return H(n)?n:(this.richTextStyles[i]=n.style,n.content)},Ny.prototype.wrapRichTextStyle=function(t,e){var n={};F(e)?N(e,function(t){return O(n,t)}):O(n,e);e=this._generateStyleName();return this.richTextStyles[e]=n,"{"+e+"|"+t+"}"},Ny);function Ny(){this.richTextStyles={},this._nextStyleNameId=th()}function Ey(t){var e,n,i,o,r,a,s,l,u,h,c,p=t.series,d=t.dataIndex,f=t.multipleSeries,g=p.getData(),y=g.mapDimensionsAll("defaultedTooltip"),m=y.length,v=p.getRawValue(d),x=F(v),t=Py(p,d);function _(t,e){e=s.getDimensionInfo(e);e&&!1!==e.otherDims.tooltip&&(l?c.push(Iy("nameValue",{markerType:"subItem",markerColor:a,name:e.displayName,value:t,valueType:e.type})):(u.push(t),h.push(e.type)))}1<m||x&&!m?(e=(n=(i=v,o=d,r=y,a=t,s=p.getData(),l=T(i,function(t,e,n){n=s.getDimensionInfo(n);return t||n&&!1!==n.tooltip&&null!=n.displayName},!1),u=[],h=[],c=[],r.length?N(r,function(t){_(Rg(s,o,t),t)}):N(i,_),{inlineValues:u,inlineValueTypes:h,blocks:c})).inlineValueTypes,r=n.blocks,n=(i=n.inlineValues)[0]):m?(m=g.getDimensionInfo(y[0]),n=i=Rg(g,d,y[0]),e=m.type):n=i=x?v[0]:v;v=yh(p),p=v&&p.name||"",d=g.getName(d),d=f?p:d;return Iy("section",{header:p,noHeader:f||!v,sortParam:n,blocks:[Iy("nameValue",{markerType:"item",markerColor:t,name:d,noName:!rt(d),value:i,valueType:e})].concat(r||[])})}var zy=_h();function By(t,e){return t.getName(e)||t.getId(e)}var Vy,Fy=(l(Gy,Vy=nf),Gy.prototype.init=function(t,e,n){this.seriesIndex=this.componentIndex,this.dataTask=Bg({count:Wy,reset:Xy}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),(zy(this).sourceManager=new fy(this)).prepareSource();n=this.getInitialData(t,n);Uy(n,this),this.dataTask.context.data=n,zy(this).dataBeforeProcessed=n,Hy(this),this._initSelectedMapFromData(n)},Gy.prototype.mergeDefaultAndTheme=function(t,e){var n=Zd(this),i=n?qd(t):{},o=this.subType;nf.hasClass(o),b(t,e.getTheme().get(this.subType)),b(t,this.getDefaultOption()),uh(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&jd(t,i,n)},Gy.prototype.mergeOption=function(t,e){t=b(this.option,t,!0),this.fillDataTextStyle(t.data);var n=Zd(this);n&&jd(this.option,t,n);n=zy(this).sourceManager;n.dirty(),n.prepareSource();e=this.getInitialData(t,e);Uy(e,this),this.dataTask.dirty(),this.dataTask.context.data=e,zy(this).dataBeforeProcessed=e,Hy(this),this._initSelectedMapFromData(e)},Gy.prototype.fillDataTextStyle=function(t){if(t&&!Z(t))for(var e=["show"],n=0;n<t.length;n++)t[n]&&t[n].label&&uh(t[n],"label",e)},Gy.prototype.getInitialData=function(t,e){},Gy.prototype.appendData=function(t){this.getRawData().appendData(t.data)},Gy.prototype.getData=function(t){var e=jy(this);if(e){e=e.context.data;return null==t?e:e.getLinkedData(t)}return zy(this).data},Gy.prototype.getAllData=function(){var t=this.getData();return t&&t.getLinkedDataAll?t.getLinkedDataAll():[{data:t}]},Gy.prototype.setData=function(t){var e,n=jy(this);n&&((e=n.context).outputData=t,n!==this.dataTask&&(e.data=t)),zy(this).data=t},Gy.prototype.getSource=function(){return zy(this).sourceManager.getSource()},Gy.prototype.getRawData=function(){return zy(this).dataBeforeProcessed},Gy.prototype.getBaseAxis=function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},Gy.prototype.formatTooltip=function(t,e,n){return Ey({series:this,dataIndex:t,multipleSeries:e})},Gy.prototype.isAnimationEnabled=function(){if(w.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),!!t},Gy.prototype.restoreData=function(){this.dataTask.dirty()},Gy.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel;return kf.prototype.getColorFromPalette.call(this,t,e,n)||i.getColorFromPalette(t,e,n)},Gy.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},Gy.prototype.getProgressive=function(){return this.get("progressive")},Gy.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},Gy.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},Gy.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n)for(var i=this.getData(e),o=0;o<t.length;o++){var r=By(i,t[o]);n[r]=!1,this._selectedDataIndicesMap[r]=-1}},Gy.prototype.toggleSelect=function(t,e){for(var n=[],i=0;i<t.length;i++)n[0]=t[i],this.isSelected(t[i],e)?this.unselect(n,e):this.select(n,e)},Gy.prototype.getSelectedDataIndices=function(){for(var t=this._selectedDataIndicesMap,e=z(t),n=[],i=0;i<e.length;i++){var o=t[e[i]];0<=o&&n.push(o)}return n},Gy.prototype.isSelected=function(t,e){var n=this.option.selectedMap;return n&&n[By(this.getData(e),t)]||!1},Gy.prototype._innerSelect=function(t,e){var n,i=this.option.selectedMode,o=e.length;if(i&&o)if("multiple"===i)for(var r=this.option.selectedMap||(this.option.selectedMap={}),a=0;a<o;a++){var s,l=e[a];r[s=By(t,l)]=!0,this._selectedDataIndicesMap[s]=t.getRawIndex(l)}else"single"!==i&&!0!==i||(s=By(t,n=e[o-1]),this.option.selectedMap=((i={})[s]=!0,i),this._selectedDataIndicesMap=((i={})[s]=t.getRawIndex(n),i))},Gy.prototype._initSelectedMapFromData=function(n){var i;this.option.selectedMap||(i=[],n.hasItemOption&&n.each(function(t){var e=n.getRawDataItem(t);"object"==typeof e&&e.selected&&i.push(t)}),0<i.length&&this._innerSelect(n,i))},Gy.registerClass=function(t){return nf.registerClass(t)},Gy.protoInitialize=((zm=Gy.prototype).type="series.__base__",zm.seriesIndex=0,zm.useColorPaletteOnData=!1,zm.ignoreStyleOnData=!1,zm.hasSymbolVisual=!1,zm.defaultSymbol="circle",zm.visualStyleAccessPath="itemStyle",void(zm.visualDrawType="fill")),Gy);function Gy(){var t=null!==Vy&&Vy.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}function Hy(t){var e,n,i=t.name;yh(t)||(t.name=(t=(e=(t=t).getRawData()).mapDimensionsAll("seriesName"),n=[],N(t,function(t){t=e.getDimensionInfo(t);t.displayName&&n.push(t.displayName)}),n.join(" ")||i))}function Wy(t){return t.model.getRawData().count()}function Xy(t){t=t.model;return t.setData(t.getRawData().cloneShallow()),Yy}function Yy(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Uy(e,n){N(a(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(t){e.wrapMethod(t,V(Zy,n))})}function Zy(t,e){t=jy(t);return t&&t.setOutputEnd((e||this).count()),e}function jy(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){e=n.currentTask;return!e||(n=e.agentStubMap)&&(e=n.get(t.uid)),e}}I(Fy,ni),I(Fy,kf),Rh(Fy,nf);var qy=(Ky.prototype.init=function(t,e){},Ky.prototype.render=function(t,e,n,i){},Ky.prototype.dispose=function(t,e){},Ky.prototype.updateView=function(t,e,n,i){},Ky.prototype.updateLayout=function(t,e,n,i){},Ky.prototype.updateVisual=function(t,e,n,i){},Ky.prototype.blurSeries=function(t,e){},Ky);function Ky(){this.group=new $r,this.uid=Wp("viewComponent")}function $y(){var r=_h();return function(t){var e=r(t),n=t.pipelineContext,i=!!e.large,o=!!e.progressiveRender,t=e.large=!(!n||!n.large),n=e.progressiveRender=!(!n||!n.progressiveRender);return!(i==t&&o==n)&&"reset"}}Oh(qy),Bh(qy,{registerWhenExtend:!0});var Jy=_h(),Qy=$y(),tm=(em.prototype.init=function(t,e){},em.prototype.render=function(t,e,n,i){},em.prototype.highlight=function(t,e,n,i){im(t.getData(),i,"emphasis")},em.prototype.downplay=function(t,e,n,i){im(t.getData(),i,"normal")},em.prototype.remove=function(t,e){this.group.removeAll()},em.prototype.dispose=function(t,e){},em.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},em.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},em.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},em.markUpdateMethod=function(t,e){Jy(t).updateMethod=e},em.protoInitialize=void(em.prototype.type="chart"),em);function em(){this.group=new $r,this.uid=Wp("viewChart"),this.renderTask=Bg({plan:om,reset:rm}),this.renderTask.context={view:this}}function nm(t,e,n){t&&("emphasis"===e?bc:wc)(t,n)}function im(e,t,n){var i,o=xh(e,t),r=t&&null!=t.highlightKey?(i=t.highlightKey,null==(t=Yh[i])&&Xh<=32&&(t=Yh[i]=Xh++),t):null;null!=o?N(lh(o),function(t){nm(e.getItemGraphicEl(t),n,r)}):e.eachItemGraphicEl(function(t){nm(t,n,r)})}function om(t){return Qy(t.model)}function rm(t){var e=t.model,n=t.ecModel,i=t.api,o=t.payload,r=e.pipelineContext.progressiveRender,a=t.view,t=o&&Jy(o).updateMethod,t=r?"incrementalPrepareRender":t&&a[t]?t:"render";return"render"!==t&&a[t](e,n,i,o),am[t]}Oh(tm),Bh(tm,{registerWhenExtend:!0});var am={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)}}},sm="\0__throttleOriginMethod",lm="\0__throttleRate",um="\0__throttleType";function hm(t,o,r){var a,s,l,u,h,c=0,p=0,d=null;function f(){p=(new Date).getTime(),d=null,t.apply(l,u||[])}o=o||0;function e(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];a=(new Date).getTime(),l=this,u=t;var n=h||o,i=h||r;h=null,s=a-(i?c:p)-n,clearTimeout(d),i?d=setTimeout(f,n):0<=s?f():d=setTimeout(f,-s),c=a}return e.clear=function(){d&&(clearTimeout(d),d=null)},e.debounceNextCall=function(t){h=t},e}function cm(t,e,n,i){var o=t[e];if(o){var r=o[sm]||o,a=o[um];if(o[lm]!==n||a!==i){if(null==n||!i)return t[e]=r;(o=t[e]=hm(r,n,"debounce"===i))[sm]=r,o[um]=i,o[lm]=n}return o}}var pm=_h(),dm={itemStyle:Vh(r,!0),lineStyle:Vh(Op,!0)},fm={lineStyle:"stroke",itemStyle:"fill"};function gm(t,e){t=t.visualStyleMapper||dm[e];return t||(console.warn("Unkown style type '"+e+"'."),dm.itemStyle)}function ym(t,e){t=t.visualDrawType||fm[e];return t||(console.warn("Unkown style type '"+e+"'."),"fill")}var sf={createOnAllSeries:!0,performRawSeries:!0,reset:function(o,t){var e=o.getData(),n=o.visualStyleAccessPath||"itemStyle",i=o.getModel(n),r=gm(o,n)(i),i=i.getShallow("decal");i&&(e.setVisual("decal",i),i.dirty=!0);var a=ym(o,n),n=r[a],s=G(n)?n:null;if(r[a]&&!s||(r[a]=o.getColorFromPalette(o.name,null,t.getSeriesCount()),e.setVisual("colorFromPalette",!0)),e.setVisual("style",r),e.setVisual("drawType",a),!t.isSeriesFiltered(o)&&s)return e.setVisual("colorFromPalette",!1),{dataEach:function(t,e){var n=o.getDataParams(e),i=O({},r);i[a]=s(n),t.setItemVisual(e,"style",i)}}}},mm=new Fp,af={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.ignoreStyleOnData&&!e.isSeriesFiltered(t)){var e=t.getData(),i=t.visualStyleAccessPath||"itemStyle",o=gm(t,i),r=e.getVisual("drawType");return{dataEach:e.hasItemOption?function(t,e){var n=t.getRawDataItem(e);n&&n[i]&&(mm.option=n[i],n=o(mm),O(t.ensureUniqueItemVisual(e,"style"),n),mm.option.decal&&(t.setItemVisual(e,"decal",mm.option.decal),mm.option.decal.dirty=!0),r in n&&t.setItemVisual(e,"colorFromPalette",!1))}:null}}}},vm={performRawSeries:!0,overallReset:function(e){var n=ct();e.eachSeries(function(t){var e;t.useColorPaletteOnData&&((e=n.get(t.type))||(e={},n.set(t.type,e)),pm(t).scope=e)}),e.eachSeries(function(i){var o,r,a,s,t,l;i.useColorPaletteOnData&&!e.isSeriesFiltered(i)&&(o=i.getRawData(),r={},a=i.getData(),s=pm(i).scope,t=i.visualStyleAccessPath||"itemStyle",l=ym(i,t),a.each(function(t){var e=a.getRawIndex(t);r[e]=t}),o.each(function(t){var e,n=r[t];a.getItemVisual(n,"colorFromPalette")&&(e=a.ensureUniqueItemVisual(n,"style"),n=o.getName(t)||t+"",t=o.count(),e[l]=i.getColorFromPalette(n,s,t))}))})}},xm=Math.PI;var _m=(bm.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(t){t=t.overallTask;t&&t.dirty()})},bm.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,n=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex?n.step:null,i=i&&i.modDataCount;return{step:n,modBy:null!=i?Math.ceil(i/n):null,modDataCount:i}}},bm.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},bm.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),o=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,e=t.get("large")&&i>=t.get("largeThreshold"),i="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:o,modDataCount:i,large:e}},bm.prototype.restorePipelines=function(t){var i=this,o=i._pipelineMap=ct();t.eachSeries(function(t){var e=t.getProgressive(),n=t.uid;o.set(n,{id:n,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:e&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(e||700),count:0}),i._pipe(t,t.dataTask)})},bm.prototype.prepareStageTasks=function(){var i=this._stageTaskMap,o=this.api.getModel(),r=this.api;N(this._allHandlers,function(t){var e=i.get(t.uid)||i.set(t.uid,{}),n="";ot(!(t.reset&&t.overallReset),n),t.reset&&this._createSeriesStageTask(t,e,o,r),t.overallReset&&this._createOverallStageTask(t,e,o,r)},this)},bm.prototype.prepareView=function(t,e,n,i){var o=t.renderTask,r=o.context;r.model=e,r.ecModel=n,r.api=i,o.__block=!t.incrementalPrepareRender,this._pipe(e,o)},bm.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},bm.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},bm.prototype._performStageTasks=function(t,s,l,u){u=u||{};var h=!1,c=this;function p(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}N(t,function(i,t){var e,n,o,r,a;u.visualType&&u.visualType!==i.visualType||(e=(r=c._stageTaskMap.get(i.uid)).seriesTaskMap,(n=r.overallTask)?((r=n.agentStubMap).each(function(t){p(u,t)&&(t.dirty(),o=!0)}),o&&n.dirty(),c.updatePayload(n,l),a=c.getPerformArgs(n,u.block),r.each(function(t){t.perform(a)}),n.perform(a)&&(h=!0)):e&&e.each(function(t,e){p(u,t)&&t.dirty();var n=c.getPerformArgs(t,u.block);n.skip=!i.performRawSeries&&s.isSeriesFiltered(t.context.model),c.updatePayload(t,l),t.perform(n)&&(h=!0)}))}),this.unfinished=h||this.unfinished},bm.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e=t.dataTask.perform()||e}),this.unfinished=e||this.unfinished},bm.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}}while(e=e.getUpstream())})},bm.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},bm.prototype._createSeriesStageTask=function(n,t,i,o){var r=this,a=t.seriesTaskMap,s=t.seriesTaskMap=ct(),e=n.seriesType,t=n.getTargetSeries;function l(t){var e=t.uid,e=s.set(e,a&&a.get(e)||Bg({plan:Tm,reset:Cm,count:Lm}));e.context={model:t,ecModel:i,api:o,useClearVisual:n.isVisual&&!n.isLayout,plan:n.plan,reset:n.reset,scheduler:r},r._pipe(t,e)}n.createOnAllSeries?i.eachRawSeries(l):e?i.eachRawSeriesByType(e,l):t&&t(i,o).each(l)},bm.prototype._createOverallStageTask=function(t,e,n,i){var o=this,r=e.overallTask=e.overallTask||Bg({reset:wm});r.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:o};var a=r.agentStubMap,s=r.agentStubMap=ct(),l=t.seriesType,u=t.getTargetSeries,h=!0,c=!1,e="";function p(t){var e=t.uid,e=s.set(e,a&&a.get(e)||(c=!0,Bg({reset:Sm,onDirty:Im})));e.context={model:t,overallProgress:h},e.agent=r,e.__block=h,o._pipe(t,e)}ot(!t.createOnAllSeries,e),l?n.eachRawSeriesByType(l,p):u?u(n,i).each(p):(h=!1,N(n.getSeries(),p)),c&&r.dirty()},bm.prototype._pipe=function(t,e){t=t.uid,t=this._pipelineMap.get(t);t.head||(t.head=e),t.tail&&t.tail.pipe(e),(t.tail=e).__idxInPipeline=t.count++,e.__pipeline=t},bm.wrapStageHandler=function(t,e){return G(t)&&(t={overallReset:t,seriesType:function(t){km=null;try{t(Pm,Om)}catch(t){}return km}(t)}),t.uid=Wp("stageHandler"),e&&(t.visualType=e),t},bm);function bm(t,e,n,i){this._stageTaskMap=ct(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}function wm(t){t.overallReset(t.ecModel,t.api,t.payload)}function Sm(t){return t.overallProgress&&Mm}function Mm(){this.agent.dirty(),this.getDownstream().dirty()}function Im(){this.agent&&this.agent.dirty()}function Tm(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function Cm(t){t.useClearVisual&&t.data.clearAllVisual();t=t.resetDefines=lh(t.reset(t.model,t.ecModel,t.api,t.payload));return 1<t.length?P(t,function(t,e){return Am(e)}):Dm}var Dm=Am(0);function Am(r){return function(t,e){var n=e.data,i=e.resetDefines[r];if(i&&i.dataEach)for(var o=t.start;o<t.end;o++)i.dataEach(n,o);else i&&i.progress&&i.progress(t,n)}}function Lm(t){return t.data.count()}var km,Pm={},Om={};function Rm(t,e){for(var n in e.prototype)t[n]=gt}Rm(Pm,zf),Rm(Om,Hf),Pm.eachSeriesByType=Pm.eachRawSeriesByType=function(t){km=t},Pm.eachComponent=function(t){"series"===t.mainType&&t.subType&&(km=t.subType)};var Ea=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],mu={color:Ea,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],Ea]},Nm="#B9B8CE",n="#100C2A",g=function(){return{axisLine:{lineStyle:{color:Nm}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},Gh=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],kp={darkMode:!0,color:Gh,backgroundColor:n,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:Nm}},textStyle:{color:Nm},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:Nm}},dataZoom:{borderColor:"#71708A",textStyle:{color:Nm},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:Nm}},timeline:{lineStyle:{color:Nm},label:{color:Nm},controlStyle:{color:Nm,borderColor:Nm}},calendar:{itemStyle:{color:n},dayLabel:{color:Nm},monthLabel:{color:Nm},yearLabel:{color:Nm}},timeAxis:g(),logAxis:g(),valueAxis:g(),categoryAxis:g(),line:{symbol:"circle"},graph:{color:Gh},gauge:{title:{color:Nm},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:Nm},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}};kp.categoryAxis.splitLine.show=!1;var Em,zm=(l(Bm,Em=nf),Bm.prototype.init=function(t,e,n){Em.prototype.init.call(this,t,e,n),this._sourceManager=new fy(this),yy(this)},Bm.prototype.mergeOption=function(t,e){Em.prototype.mergeOption.call(this,t,e),yy(this)},Bm.prototype.optionUpdated=function(){this._sourceManager.dirty()},Bm.prototype.getSourceManager=function(){return this._sourceManager},Bm.type="dataset",Bm.defaultOption={seriesLayoutBy:yf},Bm);function Bm(){var t=null!==Em&&Em.apply(this,arguments)||this;return t.type="dataset",t}nf.registerClass(zm);var Vm,r=(l(Fm,Vm=qy),Fm.type="dataset",Fm);function Fm(){var t=null!==Vm&&Vm.apply(this,arguments)||this;return t.type="dataset",t}qy.registerClass(r);var Gm=ct(),Hm=function(t,e,n){var i,n=F(e)?e:e.svg?[{type:"svg",source:e.svg,specialAreas:e.specialAreas}]:((i=e.geoJson||e.geoJSON)&&!e.features&&(n=e.specialAreas,e=i),[{type:"geoJSON",source:e,specialAreas:n}]);return N(n,function(t){var e=t.type;"geoJson"===e&&(e=t.type="geoJSON");e=Xm[e];e(t)}),Gm.set(t,n)},Wm=function(t){return Gm.get(t)},Xm={geoJSON:function(t){var e=t.source;t.geoJSON=H(e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=Za(t.source)}},Ym=(Um.prototype.normalizeQuery=function(t){var e,a,s,l={},u={},h={};return H(t)?(e=Ph(t),l.mainType=e.main||null,l.subType=e.sub||null):(a=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1},N(t,function(t,e){for(var n=!1,i=0;i<a.length;i++){var o=a[i],r=e.lastIndexOf(o);0<r&&r===e.length-o.length&&("data"!==(r=e.slice(0,r))&&(l.mainType=r,l[o.toLowerCase()]=t,n=!0))}s.hasOwnProperty(e)&&(u[e]=t,n=!0),n||(h[e]=t)})),{cptQuery:l,dataQuery:u,otherQuery:h}},Um.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,o=n.packedEvent,r=n.model,a=n.view;if(!r||!a)return!0;var s=e.cptQuery,n=e.dataQuery;return l(s,r,"mainType")&&l(s,r,"subType")&&l(s,r,"index","componentIndex")&&l(s,r,"name")&&l(s,r,"id")&&l(n,o,"name")&&l(n,o,"dataIndex")&&l(n,o,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(t,e.otherQuery,i,o));function l(t,e,n,i){return null==t[n]||e[i||n]===t[n]}},Um.prototype.afterTrigger=function(){this.eventInfo=null},Um);function Um(){}Op={createOnAllSeries:!0,performRawSeries:!0,reset:function(o,t){var e=o.getData();if(o.legendSymbol&&e.setVisual("legendSymbol",o.legendSymbol),o.hasSymbolVisual){var r=o.get("symbol"),a=o.get("symbolSize"),n=o.get("symbolKeepAspect"),s=o.get("symbolRotate"),l=G(r),u=G(a),h=G(s),i=l||u||h,c=!l&&r?r:o.defaultSymbol,p=u?null:a,d=h?null:s;if(e.setVisual({legendSymbol:o.legendSymbol||c,symbol:c,symbolSize:p,symbolKeepAspect:n,symbolRotate:d}),!t.isSeriesFiltered(o))return{dataEach:i?function(t,e){var n=o.getRawValue(e),i=o.getDataParams(e);l&&t.setItemVisual(e,"symbol",r(n,i)),u&&t.setItemVisual(e,"symbolSize",a(n,i)),h&&t.setItemVisual(e,"symbolRotate",s(n,i))}:null}}}},Ea={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(t.hasSymbolVisual&&!e.isSeriesFiltered(t))return{dataEach:t.getData().hasItemOption?function(t,e){var n=(r=t.getItemModel(e)).getShallow("symbol",!0),i=r.getShallow("symbolSize",!0),o=r.getShallow("symbolRotate",!0),r=r.getShallow("symbolKeepAspect",!0);null!=n&&t.setItemVisual(e,"symbol",n),null!=i&&t.setItemVisual(e,"symbolSize",i),null!=o&&t.setItemVisual(e,"symbolRotate",o),null!=r&&t.setItemVisual(e,"symbolKeepAspect",r)}:null}}};function Zm(t,e,n){switch(n){case"color":return t.getItemVisual(e,"style")[t.getVisual("drawType")];case"opacity":return t.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getItemVisual(e,n);default:0}}function jm(t,e){switch(e){case"color":return t.getVisual("style")[t.getVisual("drawType")];case"opacity":return t.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getVisual(e);default:0}}function qm(t,e,n,i){switch(n){case"color":t.ensureUniqueItemVisual(e,"style")[t.getVisual("drawType")]=i,t.setItemVisual(e,"colorFromPalette",!1);break;case"opacity":t.ensureUniqueItemVisual(e,"style").opacity=i;break;case"symbol":case"symbolSize":case"liftZ":t.setItemVisual(e,n,i);break;default:0}}var Km=2*Math.PI,$m=lr.CMD,Jm=["top","right","bottom","left"];function Qm(t,e,n,i,o,r,a,s){var l=o-t,u=r-e,h=n-t,n=i-e,i=Math.sqrt(h*h+n*n),u=(l*(h/=i)+u*(n/=i))/i;s&&(u=Math.min(Math.max(u,0),1)),u*=i;h=a[0]=t+u*h,n=a[1]=e+u*n;return Math.sqrt((h-o)*(h-o)+(n-r)*(n-r))}function tv(t,e,n,i,o,r,a){n<0&&(t+=n,n=-n),i<0&&(e+=i,i=-i);n=t+n,i=e+i,n=a[0]=Math.min(Math.max(o,t),n),i=a[1]=Math.min(Math.max(r,e),i);return Math.sqrt((n-o)*(n-o)+(i-r)*(i-r))}var ev=[];function nv(t,e,n){for(var i=0,o=0,r=0,a=0,s=1/0,l=e.data,u=t.x,h=t.y,c=0;c<l.length;){var p=l[c++];1===c&&(r=i=l[c],a=o=l[c+1]);var d=s;switch(p){case $m.M:i=r=l[c++],o=a=l[c++];break;case $m.L:d=Qm(i,o,l[c],l[c+1],u,h,ev,!0),i=l[c++],o=l[c++];break;case $m.C:d=Io(i,o,l[c++],l[c++],l[c++],l[c++],l[c],l[c+1],u,h,ev),i=l[c++],o=l[c++];break;case $m.Q:d=Lo(i,o,l[c++],l[c++],l[c],l[c+1],u,h,ev),i=l[c++],o=l[c++];break;case $m.A:var f=l[c++],g=l[c++],y=l[c++],m=l[c++],v=l[c++],x=l[c++];c+=1;var _=!!(1-l[c++]),b=Math.cos(v)*y+f,p=Math.sin(v)*m+g;c<=1&&(r=b,a=p);d=function(t,e,n,i,o,r,a,s,l){a-=t,s-=e;var u=Math.sqrt(a*a+s*s),h=(a/=u)*n+t,c=(s/=u)*n+e;if(Math.abs(i-o)%Km<1e-4)return l[0]=h,l[1]=c,u-n;(o=r?(p=i,i=dr(o),dr(p)):(i=dr(i),dr(o)))<i&&(o+=Km);var p=Math.atan2(s,a);return p<0&&(p+=Km),i<=p&&p<=o||i<=p+Km&&p+Km<=o?(l[0]=h,l[1]=c,u-n):(u=n*Math.cos(i)+t,i=n*Math.sin(i)+e,t=n*Math.cos(o)+t,o=n*Math.sin(o)+e,(e=(u-a)*(u-a)+(i-s)*(i-s))<(s=(t-a)*(t-a)+(o-s)*(o-s))?(l[0]=u,l[1]=i,Math.sqrt(e)):(l[0]=t,l[1]=o,Math.sqrt(s)))}(f,g,m,v,v+x,_,(u-f)*m/y+f,h,ev),i=Math.cos(v+x)*y+f,o=Math.sin(v+x)*m+g;break;case $m.R:d=tv(r=i=l[c++],a=o=l[c++],l[c++],l[c++],u,h,ev);break;case $m.Z:d=Qm(i,o,r,a,u,h,ev,!0),i=r,o=a}d<s&&(s=d,n.set(ev[0],ev[1]))}return s}var iv=new kn,ov=new kn,rv=new kn,av=new kn,sv=new kn;function lv(t,e){if(t){var n=t.getTextGuideLine(),i=t.getTextContent();if(i&&n){var o=t.textGuideLineConfig||{},r=[[0,0],[0,0],[0,0]],a=o.candidates||Jm,s=i.getBoundingRect().clone();s.applyTransform(i.getComputedTransform());var l=1/0,u=o.anchor,h=t.getComputedTransform(),c=h&&Ce([],h),p=e.get("length2")||0;u&&rv.copy(u);for(var d,f=0;f<a.length;f++){!function(t,e,n,i,o){var r=n.width,a=n.height;switch(t){case"top":i.set(n.x+r/2,n.y-e),o.set(0,-1);break;case"bottom":i.set(n.x+r/2,n.y+a+e),o.set(0,1);break;case"left":i.set(n.x-e,n.y+a/2),o.set(-1,0);break;case"right":i.set(n.x+r+e,n.y+a/2),o.set(1,0)}}(a[f],0,s,iv,av),kn.scaleAndAdd(ov,iv,av,p),ov.transform(c);var g=t.getBoundingRect(),y=u?u.distance(ov):t instanceof Dr?nv(ov,t.path,rv):(y=ov,d=rv,y=tv((g=g).x,g.y,g.width,g.height,y.x,y.y,ev),d.set(ev[0],ev[1]),y);y<l&&(l=y,ov.transform(h),rv.transform(h),rv.toArray(r[0]),ov.toArray(r[1]),iv.toArray(r[2]))}cv(r,e.get("minTurnAngle")),n.setShape({points:r})}}}var uv=[],hv=new kn;function cv(t,e){var n,i;e<=180&&0<e&&(e=e/180*Math.PI,iv.fromArray(t[0]),ov.fromArray(t[1]),rv.fromArray(t[2]),kn.sub(av,iv,ov),kn.sub(sv,rv,ov),n=av.len(),i=sv.len(),n<.001||i<.001||(av.scale(1/n),sv.scale(1/i),i=av.dot(sv),Math.cos(e)<i&&(i=Qm(ov.x,ov.y,rv.x,rv.y,iv.x,iv.y,uv,!1),hv.fromArray(uv),hv.scaleAndAdd(sv,i/Math.tan(Math.PI-e)),e=rv.x!==ov.x?(hv.x-ov.x)/(rv.x-ov.x):(hv.y-ov.y)/(rv.y-ov.y),isNaN(e)||(e<0?kn.copy(hv,ov):1<e&&kn.copy(hv,rv),hv.toArray(t[1])))))}function pv(t,e,n,i){var o="normal"===n,n=o?t:t.ensureState(n);n.ignore=e;e=i.get("smooth");e&&!0===e&&(e=.3),n.shape=n.shape||{},0<e&&(n.shape.smooth=e);i=i.getModel("lineStyle").getLineStyle();o?t.useStyle(i):n.style=i}function dv(t,e){var n=e.smooth,i=e.points;if(i)if(t.moveTo(i[0][0],i[0][1]),0<n&&3<=i.length){var o=At(i[0],i[1]),e=At(i[1],i[2]);if(!o||!e)return t.lineTo(i[1][0],i[1][1]),void t.lineTo(i[2][0],i[2][1]);n=Math.min(o,e)*n,o=Pt([],i[1],i[0],n/o),n=Pt([],i[1],i[2],n/e),e=Pt([],o,n,.5);t.bezierCurveTo(o[0],o[1],o[0],o[1],e[0],e[1]),t.bezierCurveTo(n[0],n[1],n[0],n[1],i[2][0],i[2][1])}else for(var r=1;r<i.length;r++)t.lineTo(i[r][0],i[r][1])}function fv(t,e,n){var i=t.getTextGuideLine(),o=t.getTextContent();if(o){for(var r=e.normal,a=r.get("show"),s=o.ignore,l=0;l<$h.length;l++){var u,h=$h[l],c=e[h],p="normal"===h;c&&(u=c.get("show"),!(p?s:tt(o.states[h]&&o.states[h].ignore,s))&&tt(u,a)?(i||(i=new Ra,t.setTextGuideLine(i),p||!s&&a||pv(i,!0,"normal",e.normal),t.stateProxy&&(i.stateProxy=t.stateProxy)),pv(i,!1,h,c)):(p=p?i:i&&i.states.normal)&&(p.ignore=!0))}i&&(A(i.style,n),i.style.fill=null,r=r.get("showAbove"),(t.textGuideLineConfig=t.textGuideLineConfig||{}).showAbove=r||!1,i.buildPath=dv)}else i&&t.removeTextGuideLine()}function gv(t,e){e=e||"labelLine";for(var n={normal:t.getModel(e)},i=0;i<Kh.length;i++){var o=Kh[i];n[o]=t.getModel([o,e])}return n}function yv(s,l,u,t,e,n){var h=s.length;if(!(h<2)){s.sort(function(t,e){return t.rect[l]-e.rect[l]});for(var i=0,r=!1,o=0,a=0;a<h;a++){var c,p=s[a],d=p.rect;(c=d[l]-i)<0&&(d[l]-=c,p.label[l]-=c,r=!0),o+=Math.max(-c,0),i=d[l]+d[u]}0<o&&n&&_(-o/h,0,h);var f,g,y=s[0],m=s[h-1];return v(),f<0&&b(-f,.8),g<0&&b(g,.8),v(),x(f,g,1),x(g,f,-1),v(),f<0&&w(-f),g<0&&w(g),r}function v(){f=y.rect[l]-t,g=e-m.rect[l]-m.rect[u]}function x(t,e,n){t<0&&(0<(e=Math.min(e,-t))?(_(e*n,0,h),(e=e+t)<0&&b(-e*n,1)):b(-t*n,1))}function _(t,e,n){0!==t&&(r=!0);for(var i=e;i<n;i++){var o=s[i];o.rect[l]+=t,o.label[l]+=t}}function b(t,e){for(var n=[],i=0,o=1;o<h;o++){var r=s[o-1].rect,r=Math.max(s[o].rect[l]-r[l]-r[u],0);n.push(r),i+=r}if(i){var a=Math.min(Math.abs(t)/i,e);if(0<t)for(o=0;o<h-1;o++){_(n[o]*a,0,o+1)}else for(o=h-1;0<o;o--){_(-(n[o-1]*a),o,h)}}}function w(t){var e=t<0?-1:1;t=Math.abs(t);for(var n=Math.ceil(t/(h-1)),i=0;i<h-1;i++)if(0<e?_(n,0,i+1):_(-n,h-i-1,h),(t-=n)<=0)return}}function mv(t,e,n,i){return yv(t,"y","height",e,n,i)}function vv(t,e){var n=t.label,e=e&&e.getTextGuideLine();return{dataIndex:t.dataIndex,dataType:t.dataType,seriesIndex:t.seriesModel.seriesIndex,text:t.label.style.text,rect:t.hostRect,labelRect:t.rect,align:n.style.align,verticalAlign:n.style.verticalAlign,labelLinePoints:function(t){if(t){for(var e=[],n=0;n<t.length;n++)e.push(t[n].slice());return e}}(e&&e.shape.points)}}var xv=["align","verticalAlign","width","height","fontSize"],_v=new Ee,bv=_h(),wv=_h();function Sv(t,e,n){for(var i=0;i<n.length;i++){var o=n[i];null!=e[o]&&(t[o]=e[o])}}var Mv=["x","y","rotation"],Iv=(Tv.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},Tv.prototype._addLabel=function(t,e,n,i,o){var r=i.style,a=i.__hostTarget.textConfig||{},s=i.getComputedTransform(),l=i.getBoundingRect().plain();Gn.applyTransform(l,l,s),s?_v.setLocalTransform(s):(_v.x=_v.y=_v.rotation=_v.originX=_v.originY=0,_v.scaleX=_v.scaleY=1);var u,h=i.__hostTarget;h&&(u=h.getBoundingRect().plain(),s=h.getComputedTransform(),Gn.applyTransform(u,u,s));h=u&&h.getTextGuideLine();this._labelList.push({label:i,labelLine:h,seriesModel:n,dataIndex:t,dataType:e,layoutOption:o,computedLayoutOption:null,rect:l,hostRect:u,priority:u?u.width*u.height:0,defaultAttr:{ignore:i.ignore,labelGuideIgnore:h&&h.ignore,x:_v.x,y:_v.y,rotation:_v.rotation,style:{x:r.x,y:r.y,align:r.align,verticalAlign:r.verticalAlign,width:r.width,height:r.height,fontSize:r.fontSize},cursor:i.cursor,attachedPos:a.position,attachedRot:a.rotation}})},Tv.prototype.addLabelsOfSeries=function(t){var n=this;this._chartViewList.push(t);var i=t.__model,o=i.get("labelLayout");(G(o)||z(o).length)&&t.group.traverse(function(t){if(t.ignore)return!0;var e=t.getTextContent(),t=Wh(t);e&&!e.disableLabelLayout&&n._addLabel(t.dataIndex,t.dataType,i,e,o)})},Tv.prototype.updateLayoutConfig=function(t){var e=t.getWidth(),n=t.getHeight();for(var i=0;i<this._labelList.length;i++){var o=this._labelList[i],r=o.label,a=r.__hostTarget,s=o.defaultAttr,l=void 0;l=(l="function"==typeof o.layoutOption?o.layoutOption(vv(o,a)):o.layoutOption)||{},o.computedLayoutOption=l;var u=Math.PI/180;a&&a.setTextConfig({local:!1,position:null!=l.x||null!=l.y?null:s.attachedPos,rotation:null!=l.rotate?l.rotate*u:s.attachedRot,offset:[l.dx||0,l.dy||0]});var h,c=!1;null!=l.x?(r.x=Nu(l.x,e),r.setStyle("x",0),c=!0):(r.x=s.x,r.setStyle("x",s.style.x)),null!=l.y?(r.y=Nu(l.y,n),r.setStyle("y",0),c=!0):(r.y=s.y,r.setStyle("y",s.style.y)),!l.labelLinePoints||(h=a.getTextGuideLine())&&(h.setShape({points:l.labelLinePoints}),c=!1),bv(r).needsUpdateLabelLine=c,r.rotation=null!=l.rotate?l.rotate*u:s.rotation;for(var p=0;p<xv.length;p++){var d=xv[p];r.setStyle(d,(null!=l[d]?l:s.style)[d])}l.draggable?(r.draggable=!0,r.cursor="move",a&&(u=o.seriesModel,null!=o.dataIndex&&(u=o.seriesModel.getData(o.dataType).getItemModel(o.dataIndex)),r.on("drag",function(t,e){return function(){lv(t,e)}}(a,u.getModel("labelLine"))))):(r.off("drag"),r.cursor=s.cursor)}},Tv.prototype.layout=function(t){var e,n=t.getWidth(),i=t.getHeight(),o=function(t){for(var e=[],n=0;n<t.length;n++){var i,o,r,a,s,l,u=t[n];u.defaultAttr.ignore||(o=(i=u.label).getComputedTransform(),r=i.getBoundingRect(),a=!o||o[1]<1e-5&&o[2]<1e-5,l=i.style.margin||0,(s=r.clone()).applyTransform(o),s.x-=l/2,s.y-=l/2,s.width+=l,s.height+=l,l=a?new Su(r,o):null,e.push({label:i,labelLine:u.labelLine,rect:s,localRect:r,obb:l,priority:u.priority,defaultAttr:u.defaultAttr,layoutOption:u.computedLayoutOption,axisAligned:a,transform:o}))}return e}(this._labelList),r=R(o,function(t){return"shiftX"===t.layoutOption.moveOverlap}),t=R(o,function(t){return"shiftY"===t.layoutOption.moveOverlap});yv(r,"x","width",0,n,e),mv(t,0,i),function(t){var e=[];t.sort(function(t,e){return e.priority-t.priority});var n=new Gn(0,0,0,0);function i(t){var e;t.ignore||null==(e=t.ensureState("emphasis")).ignore&&(e.ignore=!1),t.ignore=!0}for(var o=0;o<t.length;o++){var r=t[o],a=r.axisAligned,s=r.localRect,l=r.transform,u=r.label,h=r.labelLine;n.copy(r.rect),n.width-=.1,n.height-=.1,n.x+=.05,n.y+=.05;for(var c=r.obb,p=!1,d=0;d<e.length;d++){var f=e[d];if(n.intersect(f.rect)){if(a&&f.axisAligned){p=!0;break}if(f.obb||(f.obb=new Su(f.localRect,f.transform)),(c=c||new Su(s,l)).intersect(f.obb)){p=!0;break}}}p?(i(u),h&&i(h)):(u.attr("ignore",r.defaultAttr.ignore),h&&h.attr("ignore",r.defaultAttr.labelGuideIgnore),e.push(r))}}(R(o,function(t){return t.layoutOption.hideOverlap}))},Tv.prototype.processLabelsOverall=function(){var a=this;N(this._chartViewList,function(t){var i=t.__model,o=t.ignoreLabelLineUpdate,r=i.isAnimationEnabled();t.group.traverse(function(t){if(t.ignore)return!0;var e=!o,n=t.getTextContent();!e&&n&&(e=bv(n).needsUpdateLabelLine),e&&a._updateLabelLine(t,i),r&&a._animateLabels(t,i)})})},Tv.prototype._updateLabelLine=function(t,e){var n=t.getTextContent(),i=Wh(t),o=i.dataIndex;n&&null!=o&&(e=(n=e.getData(i.dataType)).getItemModel(o),i={},o=n.getItemVisual(o,"style"),n=n.getVisual("drawType"),i.stroke=o[n],n=e.getModel("labelLine"),fv(t,gv(e),i),lv(t,n))},Tv.prototype._animateLabels=function(t,e){var n,i,o,r,a,s,l,u=t.getTextContent(),h=t.getTextGuideLine();!u||u.ignore||u.invisible||t.disableLabelAnimation||ip(t)||(s=(a=bv(u)).oldLayout,n=(l=Wh(t)).dataIndex,i={x:u.x,y:u.y,rotation:u.rotation},l=e.getData(l.dataType),s?(u.attr(s),(o=t.prevStates)&&(0<=L(o,"select")&&u.attr(a.oldLayoutSelect),0<=L(o,"emphasis")&&u.attr(a.oldLayoutEmphasis)),Jc(u,i,e,n)):(u.attr(i),Tp(u).valueAnimation||(o=tt(u.style.opacity,1),u.style.opacity=0,Qc(u,{style:{opacity:o}},e,n))),a.oldLayout=i,u.states.select&&(Sv(r=a.oldLayoutSelect={},i,Mv),Sv(r,u.states.select,Mv)),u.states.emphasis&&(Sv(r=a.oldLayoutEmphasis={},i,Mv),Sv(r,u.states.emphasis,Mv)),Dp(u,n,l,e)),!h||h.ignore||h.invisible||(s=(a=wv(h)).oldLayout,l={points:h.shape.points},s?(h.attr({shape:s}),Jc(h,{shape:l},e)):(h.setShape(l),h.style.strokePercent=0,Qc(h,{style:{strokePercent:1}},e)),a.oldLayout=l)},Tv);function Tv(){this._labelList=[],this._chartViewList=[]}function Cv(r,t){N([[r+"ToggleSelect","toggleSelect"],[r+"Select","select"],[r+"UnSelect","unselect"]],function(o){t(o[0],function(t,e,n){var i;t=O({},t),n.dispatchAction(O(t,{type:o[1],seriesIndex:(t=t,i=[],e.eachComponent({mainType:"series",subType:r,query:t},function(t){i.push(t.seriesIndex)}),i)}))})})}function Dv(t,e,a,n,s){var l=t+e;a.isSilent(l)||n.eachComponent({mainType:"series",subType:"pie"},function(t){for(var e,n,i=t.seriesIndex,o=s.selected,r=0;r<o.length;r++){o[r].seriesIndex===i&&(n=xh(e=t.getData(),s.fromActionPayload),a.trigger(l,{type:l,seriesId:t.id,name:F(n)?e.getName(n[0]):e.getName(n),selected:O({},t.option.selectedMap)}))}})}function Av(t,e,n){for(var i,o,r,a,s,l,u,h,c,p="radial"===e.type?(i=t,o=e,a=(r=n).width,s=r.height,l=Math.min(a,s),u=null==o.x?.5:o.x,h=null==o.y?.5:o.y,c=null==o.r?.5:o.r,o.global||(u=u*a+r.x,h=h*s+r.y,c*=l),i.createRadialGradient(u,h,0,u,h,c)):(l=t,i=n,h=null==(u=e).x?0:u.x,c=null==u.x2?1:u.x2,t=null==u.y?0:u.y,n=null==u.y2?0:u.y2,u.global||(h=h*i.width+i.x,c=c*i.width+i.x,t=t*i.height+i.y,n=n*i.height+i.y),h=isNaN(h)?0:h,c=isNaN(c)?1:c,t=isNaN(t)?0:t,n=isNaN(n)?0:n,l.createLinearGradient(h,t,c,n)),d=e.colorStops,f=0;f<d.length;f++)p.addColorStop(d[f].offset,d[f].color);return p}function Lv(t,e){if(t!==e&&(t||e)){if(!t||!e||t.length!==e.length)return 1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return 1}}function kv(t,e){return t&&"solid"!==t&&0<e?(e=e||1,"dashed"===t?[4*e,2*e]:"dotted"===t?[e]:X(t)?[t]:F(t)?t:null):null}var Pv=new lr(!0);function Ov(t){var e=t.stroke;return!(null==e||"none"===e||!(0<t.lineWidth))}function Rv(t){t=t.fill;return null!=t&&"none"!==t}function Nv(t,e){var n;null!=e.fillOpacity&&1!==e.fillOpacity?(n=t.globalAlpha,t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=n):t.fill()}function Ev(t,e){var n;null!=e.strokeOpacity&&1!==e.strokeOpacity?(n=t.globalAlpha,t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=n):t.stroke()}function zv(t,e,n){n=el(e.image,e.__image,n);if(il(n)){t=t.createPattern(n,e.repeat||"repeat");return"function"==typeof DOMMatrix&&((n=new DOMMatrix).rotateSelf(0,0,(e.rotation||0)/Math.PI*180),n.scaleSelf(e.scaleX||1,e.scaleY||1),n.translateSelf(e.x||0,e.y||0),t.setTransform(n)),t}}var Bv=["shadowBlur","shadowOffsetX","shadowOffsetY"],Vv=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function Fv(t,e,n,i,o){var r=!1;if(!i&&e===(n=n||{}))return!1;!i&&e.opacity===n.opacity||(r||(Zv(t,o),r=!0),t.globalAlpha=(null==e.opacity?to:e).opacity),!i&&e.blend===n.blend||(r||(Zv(t,o),r=!0),t.globalCompositeOperation=e.blend||to.blend);for(var a=0;a<Bv.length;a++){var s=Bv[a];!i&&e[s]===n[s]||(r||(Zv(t,o),r=!0),t[s]=t.dpr*(e[s]||0))}return!i&&e.shadowColor===n.shadowColor||(r||(Zv(t,o),r=!0),t.shadowColor=e.shadowColor||to.shadowColor),r}function Gv(t,e,n,i,o){var r=jv(e,o.inHover),a=i?null:n&&jv(n,o.inHover)||{};if(r!==a){var s=Fv(t,r,a,i,o);!i&&r.fill===a.fill||(s||(Zv(t,o),s=!0),t.fillStyle=r.fill),!i&&r.stroke===a.stroke||(s||(Zv(t,o),s=!0),t.strokeStyle=r.stroke),!i&&r.opacity===a.opacity||(s||(Zv(t,o),s=!0),t.globalAlpha=null==r.opacity?1:r.opacity),e.hasStroke()&&(e=r.lineWidth/(r.strokeNoScale&&e&&e.getLineScale?e.getLineScale():1),t.lineWidth!==e&&(s||(Zv(t,o),s=!0),t.lineWidth=e));for(var l=0;l<Vv.length;l++){var u=Vv[l],h=u[0];!i&&r[h]===a[h]||(s||(Zv(t,o),s=!0),t[h]=r[h]||u[1])}return s}}function Hv(t,e){var n=e.transform,e=t.dpr||1;n?t.setTransform(e*n[0],e*n[1],e*n[2],e*n[3],e*n[4],e*n[5]):t.setTransform(e,0,0,e,0,0)}var Wv=1,Xv=2,Yv=3,Uv=4;function Zv(t,e){e.batchFill&&t.fill(),e.batchStroke&&t.stroke(),e.batchFill="",e.batchStroke=""}function jv(t,e){return e&&t.__hoverStyle||t.style}function qv(t,e){Kv(t,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function Kv(t,e,n,i){var o=e.transform;if(!e.shouldBePainted(n.viewWidth,n.viewHeight,!1,!1))return e.__dirty&=~ci.REDARAW_BIT,void(e.__isRendered=!1);var r,a,s,l,u,h,c,p,d,f,g,y,m,v=e.__clipPaths,x=n.prevElClipPaths,_=!1,b=!1;x&&!Lv(v,x)||(x&&x.length&&(Zv(t,n),t.restore(),b=_=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),v&&v.length&&(Zv(t,n),t.save(),function(t,e,n){for(var i=!1,o=0;o<t.length;o++){var r=t[o],i=i||r.isZeroArea();Hv(e,r),e.beginPath(),r.buildPath(e,r.shape),e.clip()}n.allClipped=i}(v,t,n),_=!0),n.prevElClipPaths=v),n.allClipped?e.__isRendered=!1:(e.beforeBrush&&e.beforeBrush(),e.innerBeforeBrush(),(u=n.prevEl)||(b=_=!0),r=e instanceof Dr&&e.autoBatch&&(r=e.style,x=Rv(r),v=Ov(r),!(r.lineDash||!(+x^+v)||x&&"string"!=typeof r.fill||v&&"string"!=typeof r.stroke||r.strokePercent<1||r.strokeOpacity<1||r.fillOpacity<1)),_||(a=o,c=u.transform,a&&c?a[0]!==c[0]||a[1]!==c[1]||a[2]!==c[2]||a[3]!==c[3]||a[4]!==c[4]||a[5]!==c[5]:a||c)?(Zv(t,n),Hv(t,e)):r||Zv(t,n),a=jv(e,n.inHover),e instanceof Dr?(n.lastDrawType!==Wv&&(b=!0,n.lastDrawType=Wv),Gv(t,e,u,b,n),r&&(n.batchFill||n.batchStroke)||t.beginPath(),function(t,e,n,i){var o=Ov(n),r=Rv(n),a=n.strokePercent,s=a<1,l=!e.path;e.silent&&!s||!l||e.createPathProxy();var u,h,c,p,d,f,g,y=e.path||Pv;i||(u=n.fill,h=n.stroke,c=r&&!!u.colorStops,v=o&&!!h.colorStops,p=r&&!!u.image,_=o&&!!h.image,g=b=f=x=d=void 0,(c||v)&&(g=e.getBoundingRect()),c&&(d=e.__dirty?Av(t,u,g):e.__canvasFillGradient,e.__canvasFillGradient=d),v&&(x=e.__dirty?Av(t,h,g):e.__canvasStrokeGradient,e.__canvasStrokeGradient=x),p&&(f=e.__dirty||!e.__canvasFillPattern?zv(t,u,e):e.__canvasFillPattern,e.__canvasFillPattern=f),_&&(b=e.__dirty||!e.__canvasStrokePattern?zv(t,h,e):e.__canvasStrokePattern,e.__canvasStrokePattern=f),c?t.fillStyle=d:p&&(f?t.fillStyle=f:r=!1),v?t.strokeStyle=x:_&&(b?t.strokeStyle=b:o=!1));var m,v=n.lineDash&&0<n.lineWidth&&kv(n.lineDash,n.lineWidth),x=n.lineDashOffset,_=!!t.setLineDash,b=e.getGlobalScale();y.setScale(b[0],b[1],e.segmentIgnoreThreshold),!v||(m=n.strokeNoScale&&e.getLineScale?e.getLineScale():1)&&1!==m&&(v=P(v,function(t){return t/m}),x/=m),b=!0,(l||e.__dirty&Dr.SHAPE_CHANGED_BIT||v&&!_&&o)&&(y.setDPR(t.dpr),s?y.setContext(null):(y.setContext(t),b=!1),y.reset(),v&&!_&&(y.setLineDash(v),y.setLineDashOffset(x)),e.buildPath(y,e.shape,i),y.toStatic(),e.pathUpdated()),b&&y.rebuildPath(t,s?a:1),v&&_&&(t.setLineDash(v),t.lineDashOffset=x),i||(n.strokeFirst?(o&&Ev(t,n),r&&Nv(t,n)):(r&&Nv(t,n),o&&Ev(t,n))),v&&_&&t.setLineDash([])}(t,e,a,r),r&&(n.batchFill=a.fill||"",n.batchStroke=a.stroke||"")):e instanceof Wa?(n.lastDrawType!==Yv&&(b=!0,n.lastDrawType=Yv),Gv(t,e,u,b,n),h=t,c=e,null!=(m=(p=a).text)&&(m+=""),m&&(h.font=p.font||Un,h.textAlign=p.textAlign,h.textBaseline=p.textBaseline,d=void 0,h.setLineDash&&(f=p.lineDash&&0<p.lineWidth&&kv(p.lineDash,p.lineWidth),g=p.lineDashOffset,f&&((y=p.strokeNoScale&&c.getLineScale?c.getLineScale():1)&&1!==y&&(f=P(f,function(t){return t/y}),g/=y),h.setLineDash(f),h.lineDashOffset=g,d=!0)),p.strokeFirst?(Ov(p)&&h.strokeText(m,p.x,p.y),Rv(p)&&h.fillText(m,p.x,p.y)):(Rv(p)&&h.fillText(m,p.x,p.y),Ov(p)&&h.strokeText(m,p.x,p.y)),d&&h.setLineDash([]))):e instanceof na?(n.lastDrawType!==Xv&&(b=!0,n.lastDrawType=Xv),f=u,g=b,Fv(t,jv(e,(m=n).inHover),f&&jv(f,m.inHover),g,m),p=t,d=a,(u=(h=e).__image=el(d.image,h.__image,h,h.onload))&&il(u)&&(f=d.x||0,g=d.y||0,m=h.getWidth(),a=h.getHeight(),h=u.width/u.height,null==m&&null!=a?m=a*h:null==a&&null!=m?a=m/h:null==m&&null==a&&(m=u.width,a=u.height),d.sWidth&&d.sHeight?(s=d.sx||0,l=d.sy||0,p.drawImage(u,s,l,d.sWidth,d.sHeight,f,g,m,a)):d.sx&&d.sy?(h=m-(s=d.sx),d=a-(l=d.sy),p.drawImage(u,s,l,h,d,f,g,m,a)):p.drawImage(u,f,g,m,a))):e instanceof Js&&(n.lastDrawType!==Uv&&(b=!0,n.lastDrawType=Uv),function(t,e,n){var i=e.getDisplayables(),o=e.getTemporalDisplayables();t.save();var r,a,s={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover};for(r=e.getCursor(),a=i.length;r<a;r++){(h=i[r]).beforeBrush&&h.beforeBrush(),h.innerBeforeBrush(),Kv(t,h,s,r===a-1),h.innerAfterBrush(),h.afterBrush&&h.afterBrush(),s.prevEl=h}for(var l=0,u=o.length;l<u;l++){var h;(h=o[l]).beforeBrush&&h.beforeBrush(),h.innerBeforeBrush(),Kv(t,h,s,l===u-1),h.innerAfterBrush(),h.afterBrush&&h.afterBrush(),s.prevEl=h}e.clearTemporalDisplayables(),e.notClear=!0,t.restore()}(t,e,n)),r&&i&&Zv(t,n),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),(n.prevEl=e).__dirty=0,e.__isRendered=!0)}function $v(){return!1}function Jv(t,e,n){var i=D(),o=e.getWidth(),r=e.getHeight(),e=i.style;return e&&(e.position="absolute",e.left="0",e.top="0",e.width=o+"px",e.height=r+"px",i.setAttribute("data-zr-dom-id",t)),i.width=o*n,i.height=r*n,i}var Qv,tx=(l(ex,Qv=Ft),ex.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},ex.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},ex.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},ex.prototype.setUnpainted=function(){this.__firstTimePaint=!0},ex.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=Jv("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},ex.prototype.createRepaintRects=function(t,e,n,i){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var s=[],l=this.maxRepaintRectCount,u=!1,h=new Gn(0,0,0,0);function o(t){if(t.isFinite()&&!t.isZero())if(0===s.length){(e=new Gn(0,0,0,0)).copy(t),s.push(e)}else{for(var e,n=!1,i=0,o=0;o<s.length;++o){var r=s[o];if(r.intersect(t)){var a=new Gn(0,0,0,0);a.copy(r),a.union(t),s[o]=a,n=!0;break}u&&(h.copy(t),h.union(r),a=t.width*t.height,r=r.width*r.height,h.width*h.height-a-r<1/0&&(i=o))}u&&(s[i].union(t),n=!0),n||((e=new Gn(0,0,0,0)).copy(t),s.push(e)),u=u||s.length>=l}}for(var r,a=this.__startIndex;a<this.__endIndex;++a){(p=t[a])&&(f=p.shouldBePainted(n,i,!0,!0),(d=p.__isRendered&&(p.__dirty&ci.REDARAW_BIT||!f)?p.getPrevPaintRect():null)&&o(d),(r=f&&(p.__dirty&ci.REDARAW_BIT||!p.__isRendered)?p.getPaintRect():null)&&o(r))}for(var c,a=this.__prevStartIndex;a<this.__prevEndIndex;++a){var p,d,f=(p=e[a]).shouldBePainted(n,i,!0,!0);!p||f&&p.__zr||!p.__isRendered||(d=p.getPrevPaintRect())&&o(d)}do{c=!1;for(a=0;a<s.length;)if(s[a].isZero())s.splice(a,1);else{for(var g=a+1;g<s.length;)s[a].intersect(s[g])?(c=!0,s[a].union(s[g]),s.splice(g,1)):g++;a++}}while(c);return this._paintRects=s},ex.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},ex.prototype.resize=function(t,e){var n=this.dpr,i=this.dom,o=i.style,r=this.domBack;o&&(o.width=t+"px",o.height=e+"px"),i.width=t*n,i.height=e*n,r&&(r.width=t*n,r.height=e*n,1!==n&&this.ctxBack.scale(n,n))},ex.prototype.clear=function(t,r,e){var n=this.dom,a=this.ctx,i=n.width,o=n.height;r=r||this.clearColor;var s=this.motionBlur&&!t,l=this.lastFrameAlpha,u=this.dpr,h=this;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(n,0,0,i/u,o/u));var c=this.domBack;function p(t,e,n,i){var o;a.clearRect(t,e,n,i),r&&"transparent"!==r&&(o=void 0,q(r)?(o=r.__canvasGradient||Av(a,r,{x:0,y:0,width:n,height:i}),r.__canvasGradient=o):K(r)&&(o=zv(a,r,{dirty:function(){h.setUnpainted(),h.__painter.refresh()}})),a.save(),a.fillStyle=o||r,a.fillRect(t,e,n,i),a.restore()),s&&(a.save(),a.globalAlpha=l,a.drawImage(c,t,e,n,i),a.restore())}!e||s?p(0,0,i,o):e.length&&N(e,function(t){p(t.x*u,t.y*u,t.width*u,t.height*u)})},ex);function ex(t,e,n){var i,o=Qv.call(this)||this;o.motionBlur=!1,o.lastFrameAlpha=.7,o.dpr=1,o.virtual=!1,o.config={},o.incremental=!1,o.zlevel=0,o.maxRepaintRectCount=5,o.__dirty=!0,o.__firstTimePaint=!0,o.__used=!1,o.__drawIndex=0,o.__startIndex=0,o.__endIndex=0,o.__prevStartIndex=null,o.__prevEndIndex=null,n=n||ii,"string"==typeof t?i=Jv(t,e,n):Y(t)&&(t=(i=t).id),o.id=t;t=(o.dom=i).style;return t&&(i.onselectstart=$v,t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none",t.padding="0",t.margin="0",t.borderWidth="0"),o.domBack=null,o.ctxBack=null,o.painter=e,o.config=null,o.dpr=n,o}var nx=314159;function ix(t){return parseInt(t,10)}function ox(t,e,n,i){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var o=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=n=O({},n||{}),this.dpr=n.devicePixelRatio||ii,this._singleCanvas=o;var r=(this.root=t).style;r&&(r.webkitTapHighlightColor="transparent",r.webkitUserSelect="none",r.userSelect="none",r["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var a=this._zlevelList;this._prevDisplayList=[];var s,r=this._layers;o?(e=(s=t).width,o=s.height,null!=n.width&&(e=n.width),null!=n.height&&(o=n.height),this.dpr=n.devicePixelRatio||1,s.width=e*this.dpr,s.height=o*this.dpr,this._width=e,this._height=o,(s=new tx(s,this,this.dpr)).__builtin__=!0,s.initContext(),(r[nx]=s).zlevel=nx,a.push(nx),this._domRoot=t):(this._width=this._getSize(0),this._height=this._getSize(1),a=this._domRoot=(r=this._width,s=this._height,(a=document.createElement("div")).style.cssText=["position:relative","width:"+r+"px","height:"+s+"px","padding:0","margin:0","border-width:0"].join(";")+";",a),t.appendChild(a))}function rx(t,e,n){for(var i;t&&(!e(t)||(i=t,!n));)t=t.__hostTarget||t.parent;return i}ku("canvas",(ox.prototype.getType=function(){return"canvas"},ox.prototype.isSingleCanvas=function(){return this._singleCanvas},ox.prototype.getViewportRoot=function(){return this._domRoot},ox.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},ox.prototype.refresh=function(t){var e=this.storage.getDisplayList(!0),n=this._prevDisplayList,i=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,n,t,this._redrawId);for(var o=0;o<i.length;o++){var r=i[o],a=this._layers[r];!a.__builtin__&&a.refresh&&(r=0===o?this._backgroundColor:null,a.refresh(r))}return this._opts.useDirtyRect&&(this._prevDisplayList=e.slice()),this},ox.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},ox.prototype._paintHoverList=function(t){var e=t.length,n=this._hoverlayer;if(n&&n.clear(),e){for(var i,o={inHover:!0,viewWidth:this._width,viewHeight:this._height},r=0;r<e;r++){var a=t[r];a.__inHover&&(n=n||(this._hoverlayer=this.getLayer(1e5)),i||(i=n.ctx).save(),Kv(i,a,o,r===e-1))}i&&i.restore()}},ox.prototype.getHoverLayer=function(){return this.getLayer(1e5)},ox.prototype.paintOne=function(t,e){qv(t,e)},ox.prototype._paintList=function(t,e,n,i){var o,r,a;this._redrawId===i&&(n=n||!1,this._updateLayerStatus(t),o=(r=this._doPaintList(t,e,n)).finished,r=r.needsRefreshHover,this._needsManuallyCompositing&&this._compositeManually(),r&&this._paintHoverList(t),o?this.eachLayer(function(t){t.afterBrush&&t.afterBrush()}):(a=this,Li(function(){a._paintList(t,e,n,i)})))},ox.prototype._compositeManually=function(){var e=this.getLayer(nx).ctx,n=this._domRoot.width,i=this._domRoot.height;e.clearRect(0,0,n,i),this.eachBuiltinLayer(function(t){t.virtual&&e.drawImage(t.dom,0,0,n,i)})},ox.prototype._doPaintList=function(d,f,g){for(var y=this,m=[],v=this._opts.useDirtyRect,t=0;t<this._zlevelList.length;t++){var e=this._zlevelList[t],e=this._layers[e];e.__builtin__&&e!==this._hoverlayer&&(e.__dirty||g)&&m.push(e)}for(var x=!0,_=!1,b=this,n=0;n<m.length;n++)!function(t){var i=m[t],o=i.ctx,e=v&&i.createRepaintRects(d,f,b._width,b._height);o.save();var r,a=g?i.__startIndex:i.__drawIndex,s=!g&&i.incremental&&Date.now,l=s&&Date.now(),n=i.zlevel===b._zlevelList[0]?b._backgroundColor:null;i.__startIndex===i.__endIndex?i.clear(!1,n,e):a===i.__startIndex&&((t=d[a]).incremental&&t.notClear&&!g||i.clear(!1,n,e)),-1===a&&(console.error("For some unknown reason. drawIndex is -1"),a=i.__startIndex);function u(t){var e={inHover:!1,allClipped:!1,prevEl:null,viewWidth:y._width,viewHeight:y._height};for(r=a;r<i.__endIndex;r++){var n=d[r];if(n.__inHover&&(_=!0),y._doPaintEl(n,i,v,t,e,r===i.__endIndex-1),s)if(15<Date.now()-l)break}e.prevElClipPaths&&o.restore()}if(e)if(0===e.length)r=i.__endIndex;else for(var h=b.dpr,c=0;c<e.length;++c){var p=e[c];o.save(),o.beginPath(),o.rect(p.x*h,p.y*h,p.width*h,p.height*h),o.clip(),u(p),o.restore()}else o.save(),u(),o.restore();i.__drawIndex=r,i.__drawIndex<i.__endIndex&&(x=!1)}(n);return w.wxa&&N(this._layers,function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()}),{finished:x,needsRefreshHover:_}},ox.prototype._doPaintEl=function(t,e,n,i,o,r){e=e.ctx;n?(n=t.getPaintRect(),(!i||n&&n.intersect(i))&&(Kv(e,t,o,r),t.setPrevPaintRect(n))):Kv(e,t,o,r)},ox.prototype.getLayer=function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=nx);var n=this._layers[t];return n||((n=new tx("zr_"+t,this,this.dpr)).zlevel=t,n.__builtin__=!0,this._layerConfig[t]?b(n,this._layerConfig[t],!0):this._layerConfig[t-.01]&&b(n,this._layerConfig[t-.01],!0),e&&(n.virtual=e),this.insertLayer(t,n),n.initContext()),n},ox.prototype.insertLayer=function(t,e){var n,i=this._layers,o=this._zlevelList,r=o.length,a=this._domRoot,s=null,l=-1;if(i[t])_("ZLevel "+t+" has been used already");else if((n=e)&&(n.__builtin__||"function"==typeof n.resize&&"function"==typeof n.refresh)){if(0<r&&t>o[0]){for(l=0;l<r-1&&!(o[l]<t&&o[l+1]>t);l++);s=i[o[l]]}o.splice(l+1,0,t),(i[t]=e).virtual||(s?(s=s.dom).nextSibling?a.insertBefore(e.dom,s.nextSibling):a.appendChild(e.dom):a.firstChild?a.insertBefore(e.dom,a.firstChild):a.appendChild(e.dom)),e.__painter=this}else _("Layer of zlevel "+t+" is not valid")},ox.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;i<n.length;i++){var o=n[i];t.call(e,this._layers[o],o)}},ox.prototype.eachBuiltinLayer=function(t,e){for(var n=this._zlevelList,i=0;i<n.length;i++){var o=n[i],r=this._layers[o];r.__builtin__&&t.call(e,r,o)}},ox.prototype.eachOtherLayer=function(t,e){for(var n=this._zlevelList,i=0;i<n.length;i++){var o=n[i],r=this._layers[o];r.__builtin__||t.call(e,r,o)}},ox.prototype.getLayers=function(){return this._layers},ox.prototype._updateLayerStatus=function(t){function e(t){o&&(o.__endIndex!==t&&(o.__dirty=!0),o.__endIndex=t)}if(this.eachBuiltinLayer(function(t,e){t.__dirty=t.__used=!1}),this._singleCanvas)for(var n=1;n<t.length;n++){if((s=t[n]).zlevel!==t[n-1].zlevel||s.incremental){this._needsManuallyCompositing=!0;break}}for(var i,o=null,r=0,a=0;a<t.length;a++){var s,l=(s=t[a]).zlevel,u=void 0;i!==l&&(i=l,r=0),s.incremental?((u=this.getLayer(l+.001,this._needsManuallyCompositing)).incremental=!0,r=1):u=this.getLayer(l+(0<r?.01:0),this._needsManuallyCompositing),u.__builtin__||_("ZLevel "+l+" has been used by unkown layer "+u.id),u!==o&&(u.__used=!0,u.__startIndex!==a&&(u.__dirty=!0),u.__startIndex=a,u.incremental?u.__drawIndex=-1:u.__drawIndex=a,e(a),o=u),s.__dirty&ci.REDARAW_BIT&&!s.__inHover&&(u.__dirty=!0,u.incremental&&u.__drawIndex<0&&(u.__drawIndex=a))}e(a),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)})},ox.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},ox.prototype._clearLayer=function(t){t.clear()},ox.prototype.setBackgroundColor=function(t){this._backgroundColor=t,N(this._layers,function(t){t.setUnpainted()})},ox.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?b(n[t],e,!0):n[t]=e;for(var i=0;i<this._zlevelList.length;i++){var o=this._zlevelList[i];o!==t&&o!==t+.01||b(this._layers[o],n[t],!0)}}},ox.prototype.delLayer=function(t){var e=this._layers,n=this._zlevelList,i=e[t];i&&(i.dom.parentNode.removeChild(i.dom),delete e[t],n.splice(L(n,t),1))},ox.prototype.resize=function(t,e){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var i=this._opts;if(null!=t&&(i.width=t),null!=e&&(i.height=e),t=this._getSize(0),e=this._getSize(1),n.style.display="",this._width!==t||e!==this._height){for(var o in n.style.width=t+"px",n.style.height=e+"px",this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].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(nx).resize(t,e)}return this},ox.prototype.clearLayer=function(t){t=this._layers[t];t&&t.clear()},ox.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},ox.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[nx].dom;var e=new tx("image",this,t.pixelRatio||this.dpr),n=e.ctx;if(e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor),t.pixelRatio<=this.dpr){this.refresh();var i=e.dom.width,o=e.dom.height,r=e.ctx;this.eachLayer(function(t){t.__builtin__?r.drawImage(t.dom,0,0,i,o):t.renderToCanvas&&(e.ctx.save(),t.renderToCanvas(e.ctx),e.ctx.restore())})}else for(var a={inHover:!1,viewWidth:this._width,viewHeight:this._height},s=this.storage.getDisplayList(!0),l=0,u=s.length;l<u;l++){Kv(n,s[l],a,l===u-1)}return e.dom},ox.prototype.getWidth=function(){return this._width},ox.prototype.getHeight=function(){return this._height},ox.prototype._getSize=function(t){var e=this._opts,n=["width","height"][t],i=["clientWidth","clientHeight"][t],o=["paddingLeft","paddingTop"][t],r=["paddingRight","paddingBottom"][t];if(null!=e[n]&&"auto"!==e[n])return parseFloat(e[n]);t=this.root,e=document.defaultView.getComputedStyle(t);return(t[i]||ix(e[n])||ix(t.style[n]))-(ix(e[o])||0)-(ix(e[r])||0)|0},ox.prototype.pathToImage=function(t,e){e=e||this.dpr;var n=document.createElement("canvas"),i=n.getContext("2d"),o=t.getBoundingRect(),r=t.style,a=r.shadowBlur*e,s=r.shadowOffsetX*e,l=r.shadowOffsetY*e,u=t.hasStroke()?r.lineWidth:0,h=Math.max(u/2,a-s),r=Math.max(u/2,s+a),s=Math.max(u/2,a-l),a=Math.max(u/2,l+a),r=o.width+h+r,a=o.height+s+a;n.width=r*e,n.height=a*e,i.scale(e,e),i.clearRect(0,0,r,a),i.dpr=e;e={x:t.x,y:t.y,scaleX:t.scaleX,scaleY:t.scaleY,rotation:t.rotation,originX:t.originX,originY:t.originY};t.x=h-o.x,t.y=s-o.y,t.rotation=0,t.scaleX=1,t.scaleY=1,t.updateTransform(),t&&Kv(i,t,{inHover:!1,viewWidth:this._width,viewHeight:this._height},!0);n=new na({style:{x:0,y:0,image:n}});return O(t,e),n},ox));var ax=Math.round(9*Math.random()),n=(sx.prototype.get=function(t){return this._guard(t)[this._id]},sx.prototype.set=function(t,e){t=this._guard(t);return"function"==typeof Object.defineProperty?Object.defineProperty(t,this._id,{value:e,enumerable:!1,configurable:!0}):t[this._id]=e,this},sx.prototype.delete=function(t){return!!this.has(t)&&(delete this._guard(t)[this._id],!0)},sx.prototype.has=function(t){return!!this._guard(t)[this._id]},sx.prototype._guard=function(t){if(t!==Object(t))throw TypeError("Value of WeakMap is not a non-null object.");return t},sx);function sx(){this._id="__ec_inner_"+ax++}var g=Dr.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,o=e.width/2,e=e.height/2;t.moveTo(n,i-e),t.lineTo(n+o,i+e),t.lineTo(n-o,i+e),t.closePath()}}),Gh=Dr.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,o=e.width/2,e=e.height/2;t.moveTo(n,i-e),t.lineTo(n+o,i),t.lineTo(n,i+e),t.lineTo(n-o,i),t.closePath()}}),zm=Dr.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.x,i=e.y,o=e.width/5*3,r=Math.max(o,e.height),a=o/2,s=a*a/(r-a),l=i-r+a+s,u=Math.asin(s/a),h=Math.cos(u)*a,c=Math.sin(u),e=Math.cos(u),o=.6*a,r=.7*a;t.moveTo(n-h,l+s),t.arc(n,l,a,Math.PI-u,2*Math.PI+u),t.bezierCurveTo(n+h-c*o,l+s+e*o,n,i-r,n,i),t.bezierCurveTo(n,i-r,n-h+c*o,l+s+e*o,n-h,l+s),t.closePath()}}),r=Dr.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.height,i=e.width,o=e.x,e=e.y,i=i/3*2;t.moveTo(o,e),t.lineTo(o+i,e+n),t.lineTo(o,e+n/4*3),t.lineTo(o-i,e+n),t.lineTo(o,e),t.closePath()}}),lx={line:function(t,e,n,i,o){o.x=t,o.y=e+i/2-1,o.width=n,o.height=2},rect:function(t,e,n,i,o){o.x=t,o.y=e,o.width=n,o.height=i},roundRect:function(t,e,n,i,o){o.x=t,o.y=e,o.width=n,o.height=i,o.r=Math.min(n,i)/4},square:function(t,e,n,i,o){i=Math.min(n,i);o.x=t,o.y=e,o.width=i,o.height=i},circle:function(t,e,n,i,o){o.cx=t+n/2,o.cy=e+i/2,o.r=Math.min(n,i)/2},diamond:function(t,e,n,i,o){o.cx=t+n/2,o.cy=e+i/2,o.width=n,o.height=i},pin:function(t,e,n,i,o){o.x=t+n/2,o.y=e+i/2,o.width=n,o.height=i},arrow:function(t,e,n,i,o){o.x=t+n/2,o.y=e+i/2,o.width=n,o.height=i},triangle:function(t,e,n,i,o){o.cx=t+n/2,o.cy=e+i/2,o.width=n,o.height=i}},ux={};N({line:ga,rect:ga,roundRect:ga,square:ga,circle:aa,diamond:Gh,pin:zm,arrow:r,triangle:g},function(t,e){ux[e]=new t});var hx=Dr.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,n){var i=ei(t,e,n),t=this.shape;return t&&"pin"===t.symbolType&&"inside"===e.position&&(i.y=n.y+.4*n.height),i},buildPath:function(t,e,n){var i,o=e.symbolType;"none"!==o&&(i=(i=ux[o])||ux[o="rect"],lx[o](e.x,e.y,e.width,e.height,i.shape),i.buildPath(t,i.shape,n))}});function cx(t,e){var n;"image"!==this.type&&(n=this.style,this.__isEmptyBrush?(n.stroke=t,n.fill=e||"#fff",n.lineWidth=2):n.fill=t,this.markRedraw())}function px(t,e,n,i,o,r,a){var s=0===t.indexOf("empty");return s&&(t=t.substr(5,1).toLowerCase()+t.substr(6)),(o=0===t.indexOf("image://")?Uc(t.slice(8),new Gn(e,n,i,o),a?"center":"cover"):0===t.indexOf("path://")?Yc(t.slice(7),{},new Gn(e,n,i,o),a?"center":"cover"):new hx({shape:{symbolType:t,x:e,y:n,width:i,height:o}})).__isEmptyBrush=s,o.setColor=cx,r&&o.setColor(r),o}var dx=new n,fx=new Xe(100),gx=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","dashLineOffset","maxTileWidth","maxTileHeight"];function yx(t,e){if("none"===t)return null;var M=e.getDevicePixelRatio(),I=e.getZr(),T="svg"===I.painter.type;t.dirty&&dx.delete(t);e=dx.get(t);if(e)return e;var C=A(t,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,dashLineOffset:0,rotation:0,maxTileWidth:512,maxTileHeight:512});"none"===C.backgroundColor&&(C.backgroundColor=null);e={repeat:"repeat"};return function(t){for(var e,n=[M],i=!0,o=0;o<gx.length;++o){var r=C[gx[o]],a=typeof r;if(null!=r&&!F(r)&&"string"!=a&&"number"!=a&&"boolean"!=a){i=!1;break}n.push(r)}{var s;i&&(e=n.join(",")+(T?"-svg":""),(s=fx.get(e))&&(T?t.svgElement=s:t.image=s))}var y,m=function t(e){if(!e||0===e.length)return[[0,0]];if("number"==typeof e){var n=Math.ceil(e);return[[n,n]]}var i=!0;for(var o=0;o<e.length;++o)if("number"!=typeof e[o]){i=!1;break}if(i)return t([e]);var r=[];for(var o=0;o<e.length;++o){"number"==typeof e[o]?(n=Math.ceil(e[o]),r.push([n,n])):(n=P(e[o],function(t){return Math.ceil(t)})).length%2==1?r.push(n.concat(n)):r.push(n)}return r}(C.dashArrayX),v=function(t){if(!t||"object"==typeof t&&0===t.length)return[0,0];if("number"==typeof t){var e=Math.ceil(t);return[e,e]}e=P(t,function(t){return Math.ceil(t)});return t.length%2?e.concat(e):e}(C.dashArrayY),x=function t(e){if(!e||0===e.length)return[["rect"]];if("string"==typeof e)return[[e]];var n=!0;for(var i=0;i<e.length;++i)if("string"!=typeof e[i]){n=!1;break}if(n)return t([e]);var o=[];for(var i=0;i<e.length;++i)"string"==typeof e[i]?o.push([e[i]]):o.push(e[i]);return o}(C.symbol),l=function(t){return P(t,mx)}(m),_=mx(v),b=!T&&D(),w=T&&I.painter.createSVGElement("g"),S=function(){for(var t=1,e=0,n=l.length;e<n;++e)t=nh(t,l[e]);for(var i=1,e=0,n=x.length;e<n;++e)i=nh(i,x[e].length);t*=i;var o=_*l.length*x.length;{}return{width:Math.max(1,Math.min(t,C.maxTileWidth)),height:Math.max(1,Math.min(o,C.maxTileHeight))}}();b&&(b.width=S.width*M,b.height=S.height*M,y=b.getContext("2d"));(function(){y&&(y.clearRect(0,0,b.width,b.height),C.backgroundColor&&(y.fillStyle=C.backgroundColor,y.fillRect(0,0,b.width,b.height)));for(var t=0,e=0;e<v.length;++e)t+=v[e];if(t<=0)return;var n=-_,i=0,o=0,r=0;for(;n<S.height;){if(i%2==0){for(var a=o/2%x.length,s=0,l=0,u=0;s<2*S.width;){for(var h,c,p,d,f,g=0,e=0;e<m[r].length;++e)g+=m[r][e];if(g<=0)break;l%2==0&&(f=.5*(1-C.symbolSize),h=s+m[r][l]*f,c=n+v[i]*f,p=m[r][l]*C.symbolSize,d=v[i]*C.symbolSize,f=u/2%x[a].length,function(t,e,n,i,o){var r=T?1:M,r=px(o,t*r,e*r,n*r,i*r,C.color,C.symbolKeepAspect);T?w.appendChild(I.painter.paintOne(r)):qv(y,r)}(h,c,p,d,x[a][f])),s+=m[r][l],++u,++l===m[r].length&&(l=0)}++r===m.length&&(r=0)}n+=v[i],++o,++i===v.length&&(i=0)}})(),i&&fx.put(e,b||w);t.image=b,t.svgElement=w,t.svgWidth=S.width,t.svgHeight=S.height}(e),e.rotation=C.rotation,e.scaleX=e.scaleY=T?1:1/M,dx.set(t,e),t.dirty=!1,e}function mx(t){for(var e=0,n=0;n<t.length;++n)e+=t[n];return t.length%2==1?2*e:e}var vx=ot,xx=N,_x=G,bx=Y,r={PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:2e3,CHART:3e3,POST_CHART_LAYOUT:4600,COMPONENT:4e3,BRUSH:5e3,CHART_ITEM:4500,ARIA:6e3,DECAL:7e3}},Sx="__flagInMainProcess",Mx="__optionUpdated",Ix="__needsUpdateStatus",Tx=/^[a-zA-Z0-9_]+$/,Cx="__connectUpdateStatus";function Dx(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(!this.isDisposed())return Lx(this,n,t);u_(this.id)}}function Ax(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Lx(this,n,t)}}function Lx(t,e,n){return n[0]=n[0]&&n[0].toLowerCase(),Ft.prototype[e].apply(t,n)}var kx,Px=(l(Ox,kx=Ft),Ox);function Ox(){return null!==kx&&kx.apply(this,arguments)||this}var Rx,Nx,Ex,zx,Bx,Vx,Fx,Gx,Hx,Wx,Xx,Yx,Ux,Zx,jx,qx,Kx,$x,Jx,Qx,t_,g=Px.prototype;g.on=Ax("on"),g.off=Ax("off");var e_,n_=(l(i_,e_=Ft),i_.prototype._onframe=function(){if(!this._disposed){t_(this);var t=this._scheduler;if(this[Mx]){var e=this[Mx].silent;this[Sx]=!0,Rx(this),zx.update.call(this),this._zr.flush(),this[Sx]=!1,this[Mx]=!1,Gx.call(this,e),Hx.call(this,e)}else if(t.unfinished){var n=1,i=this._model,o=this._api;t.unfinished=!1;do{var r=+new Date}while(t.performSeriesTasks(i),t.performDataProcessorTasks(i),Vx(this,i),t.performVisualTasks(i),jx(this,this._model,o,"remain"),0<(n-=+new Date-r)&&t.unfinished);t.unfinished||this._zr.flush()}}},i_.prototype.getDom=function(){return this._dom},i_.prototype.getId=function(){return this.id},i_.prototype.getZr=function(){return this._zr},i_.prototype.setOption=function(t,e,n){var i,o,r,a,s;this._disposed?u_(this.id):(bx(e)&&(n=e.lazyUpdate,i=e.silent,o=e.replaceMerge,r=e.transition,e=e.notMerge),this[Sx]=!0,this._model&&!e||(a=new jf(this._api),s=this._theme,(e=this._model=new zf).scheduler=this._scheduler,e.init(null,null,null,s,this._locale,a)),this._model.setOption(t,{replaceMerge:o},d_),Jx(this,r),n?(this[Mx]={silent:i},this[Sx]=!1,this.getZr().wakeUp()):(Rx(this),zx.update.call(this),this._zr.flush(),this[Mx]=!1,this[Sx]=!1,Gx.call(this,i),Hx.call(this,i)))},i_.prototype.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},i_.prototype.getModel=function(){return this._model},i_.prototype.getOption=function(){return this._model&&this._model.getOption()},i_.prototype.getWidth=function(){return this._zr.getWidth()},i_.prototype.getHeight=function(){return this._zr.getHeight()},i_.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},i_.prototype.getRenderedCanvas=function(t){if(w.canvasSupported)return(t=O({},t||{})).pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(t)},i_.prototype.getSvgDataURL=function(){if(w.svgSupported){var t=this._zr;return N(t.storage.getDisplayList(),function(t){t.stopAnimation(null,!0)}),t.painter.toDataURL()}},i_.prototype.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,n=this._model,i=[],o=this;xx(e,function(t){n.eachComponent({mainType:t},function(t){t=o._componentsMap[t.__viewId];t.group.ignore||(i.push(t),t.group.ignore=!0)})});t="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return xx(i,function(t){t.group.ignore=!1}),t}u_(this.id)},i_.prototype.getConnectedDataURL=function(i){if(this._disposed)u_(this.id);else if(w.canvasSupported){var o="svg"===i.type,r=this.group,a=Math.min,s=Math.max;if(__[r]){var l=1/0,u=1/0,h=-1/0,c=-1/0,p=[],e=i&&i.pixelRatio||1;N(x_,function(t,e){var n;t.group===r&&(n=o?t.getZr().painter.getSvgDom().innerHTML:t.getRenderedCanvas(C(i)),t=t.getDom().getBoundingClientRect(),l=a(t.left,l),u=a(t.top,u),h=s(t.right,h),c=s(t.bottom,c),p.push({dom:n,left:t.left,top:t.top}))});var t=(h*=e)-(l*=e),n=(c*=e)-(u*=e),d=D(),f=Lu(d,{renderer:o?"svg":"canvas"});if(f.resize({width:t,height:n}),o){var g="";return xx(p,function(t){var e=t.left-l,n=t.top-u;g+='<g transform="translate('+e+","+n+')">'+t.dom+"</g>"}),f.painter.getSvgRoot().innerHTML=g,i.connectedBackgroundColor&&f.painter.setBackgroundColor(i.connectedBackgroundColor),f.refreshImmediately(),f.painter.toDataURL()}return i.connectedBackgroundColor&&f.add(new ga({shape:{x:0,y:0,width:t,height:n},style:{fill:i.connectedBackgroundColor}})),xx(p,function(t){t=new na({style:{x:t.left*e-l,y:t.top*e-u,image:t.dom}});f.add(t)}),f.refreshImmediately(),d.toDataURL("image/"+(i&&i.type||"png"))}return this.getDataURL(i)}},i_.prototype.convertToPixel=function(t,e){return Bx(this,"convertToPixel",t,e)},i_.prototype.convertFromPixel=function(t,e){return Bx(this,"convertFromPixel",t,e)},i_.prototype.containPixel=function(t,o){var r;if(!this._disposed)return N(wh(this._model,t),function(t,i){0<=i.indexOf("Models")&&N(t,function(t){var e,n=t.coordinateSystem;n&&n.containPoint?r=r||!!n.containPoint(o):"seriesModels"===i&&(e=this._chartsMap[t.__viewId])&&e.containPoint&&(r=r||e.containPoint(o,t))},this)},this),!!r;u_(this.id)},i_.prototype.getVisual=function(t,e){var n=wh(this._model,t,{defaultMainType:"series"}),t=n.seriesModel;t=t.getData(),n=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?t.indexOfRawIndex(n.dataIndex):null;return null!=n?Zm(t,n,e):jm(t,e)},i_.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},i_.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},i_.prototype._initEvents=function(){var t,e,n,s=this;xx(l_,function(a){function t(t){var n,e,i=s.getModel(),o=t.target,r="globalout"===a;r?n={}:o&&rx(o,function(t){var e=Wh(t);if(e&&null!=e.dataIndex){t=e.dataModel||i.getSeriesByIndex(e.seriesIndex);return n=t&&t.getDataParams(e.dataIndex,e.dataType)||{},1}return e.eventData&&(n=O({},e.eventData),1)},!0),n&&(e=n.componentType,r=n.componentIndex,"markLine"!==e&&"markPoint"!==e&&"markArea"!==e||(e="series",r=n.seriesIndex),r=(e=e&&null!=r&&i.getComponent(e,r))&&s["series"===e.mainType?"_chartsMap":"_componentsMap"][e.__viewId],n.event=t,n.type=a,s._$eventProcessor.eventInfo={targetEl:o,packedEvent:n,model:e,view:r},s.trigger(a,n))}t.zrEventfulCallAtLast=!0,s._zr.on(a,t,s)}),xx(c_,function(t,e){s._messageCenter.on(e,function(t){this.trigger(e,t)},s)}),xx(["selectchanged"],function(e){s._messageCenter.on(e,function(t){this.trigger(e,t)},s)}),t=this._messageCenter,n=(e=this)._model,t.on("selectchanged",function(t){t.isFromClick?(Dv("map","selectchanged",e,n,t),Dv("pie","selectchanged",e,n,t)):"select"===t.fromAction?(Dv("map","selected",e,n,t),Dv("pie","selected",e,n,t)):"unselect"===t.fromAction&&(Dv("map","unselected",e,n,t),Dv("pie","unselected",e,n,t))})},i_.prototype.isDisposed=function(){return this._disposed},i_.prototype.clear=function(){this._disposed?u_(this.id):this.setOption({series:[]},!0)},i_.prototype.dispose=function(){var e,n;this._disposed?u_(this.id):(this._disposed=!0,Th(this.getDom(),S_,""),e=this._api,n=this._model,xx(this._componentsViews,function(t){t.dispose(n,e)}),xx(this._chartsViews,function(t){t.dispose(n,e)}),this._zr.dispose(),delete x_[this.id])},i_.prototype.resize=function(t){var e;this._disposed?u_(this.id):(this._zr.resize(t),e=this._model,this._loadingFX&&this._loadingFX.resize(),e&&(e=e.resetOption("media"),t=t&&t.silent,this[Sx]=!0,e&&Rx(this),zx.update.call(this,{type:"resize",animation:{duration:0}}),this[Sx]=!1,Gx.call(this,t),Hx.call(this,t)))},i_.prototype.showLoading=function(t,e){this._disposed?u_(this.id):(bx(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),v_[t]&&(t=v_[t](this._api,e),e=this._zr,this._loadingFX=t,e.add(t)))},i_.prototype.hideLoading=function(){this._disposed?u_(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},i_.prototype.makeActionFromEvent=function(t){var e=O({},t);return e.type=c_[t.type],e},i_.prototype.dispatchAction=function(t,e){var n;this._disposed?u_(this.id):(bx(e)||(e={silent:!!e}),h_[t.type]&&this._model&&(this[Sx]?this._pendingActions.push(t):(n=e.silent,Fx.call(this,t,n),(e=e.flush)?this._zr.flush():!1!==e&&w.browser.weChat&&this._throttledZrFlush(),Gx.call(this,n),Hx.call(this,n))))},i_.prototype.updateLabelLayout=function(){var t=this._labelManager;t.updateLayoutConfig(this._api),t.layout(this._api),t.processLabelsOverall()},i_.prototype.appendData=function(t){var e;this._disposed?u_(this.id):(e=t.seriesIndex,this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp())},i_.internalField=(Rx=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),Nx(t,!0),Nx(t,!1),e.plan()},Nx=function(t,o){for(var r=t._model,a=t._scheduler,s=o?t._componentsViews:t._chartsViews,l=o?t._componentsMap:t._chartsMap,u=t._zr,h=t._api,e=0;e<s.length;e++)s[e].__alive=!1;function n(t){var e=t.__requireNewView;t.__requireNewView=!1;var n="_ec_"+t.id+"_"+t.type,i=!e&&l[n];i||(e=Ph(t.type),(i=new(o?qy.getClass(e.main,e.sub):tm.getClass(e.sub))).init(r,h),l[n]=i,s.push(i),u.add(i.group)),t.__viewId=i.__id=n,i.__alive=!0,i.__model=t,i.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},o||a.prepareView(i,t,r,h)}o?r.eachComponent(function(t,e){"series"!==t&&n(e)}):r.eachSeries(n);for(e=0;e<s.length;){var i=s[e];i.__alive?e++:(o||i.renderTask.dispose(),u.remove(i.group),i.dispose(r,h),s.splice(e,1),l[i.__id]===i&&delete l[i.__id],i.__id=i.group.__ecComponentInfo=null)}},Ex=function(r,e,a,s,t){var n,l,i=r._model;function u(t){t&&t.__alive&&t[e]&&t[e](t.__model,i,r._api,a)}i.setUpdatePayload(a),s?((n={})[s+"Id"]=a[s+"Id"],n[s+"Index"]=a[s+"Index"],n[s+"Name"]=a[s+"Name"],n={mainType:s,query:n},t&&(n.subType=t),null!=(t=a.excludeSeriesId)&&(l=ct(),xx(lh(t),function(t){t=gh(t,null);null!=t&&l.set(t,!0)})),i&&i.eachComponent(n,function(t){var e,n,i,o;l&&null!=l.get(t.id)||(Bc(a)&&!a.notBlur?t instanceof Fy&&function(t,e,n){if(Bc(e)){var i,o=e.type===tc,r=t.seriesIndex,a=t.getData(e.dataType),e=(F(e=xh(a,e))?e[0]:e)||0,s=a.getItemGraphicEl(e);if(!s)for(var l=a.count(),u=0;!s&&u<l;)s=a.getItemGraphicEl(u++);s?Dc(r,(i=Wh(s)).focus,i.blurScope,n,o):(i=t.get(["emphasis","focus"]),t=t.get(["emphasis","blurScope"]),null!=i&&Dc(r,i,t,n,o))}}(t,a,r._api):zc(a)&&t instanceof Fy&&(e=t,n=a,r._api,zc(n)&&(i=n.dataType,F(o=xh(e.getData(i),n))||(o=[o]),e[n.type===oc?"toggleSelect":n.type===nc?"select":"unselect"](o,i)),Ac(t),Qx(r)),u(r["series"===s?"_chartsMap":"_componentsMap"][t.__viewId]))},r)):xx([].concat(r._componentsViews).concat(r._chartsViews),u)},zx={prepareAndUpdate:function(t){Rx(this),zx.update.call(this,t)},update:function(t){var e=this._model,n=this._api,i=this._zr,o=this._coordSysMgr,r=this._scheduler;e&&(e.setUpdatePayload(t),r.restoreData(e,t),r.performSeriesTasks(e),o.create(e,n),r.performDataProcessorTasks(e,t),Vx(this,e),o.update(e,n),Yx(e),r.performVisualTasks(e,t),Ux(this,e,n,t),r=e.get("backgroundColor")||"transparent",t=e.get("darkMode"),w.canvasSupported?(i.setBackgroundColor(r),null!=t&&"auto"!==t&&i.setDarkMode(t)):(r=dn(t=rn(r),"rgb"),0===t[3]&&(r="transparent")),qx(e,n))},updateTransform:function(n){var i,o,r=this,a=this._model,s=this._api;a&&(a.setUpdatePayload(n),i=[],a.eachComponent(function(t,e){"series"===t||(t=r.getViewOfComponentModel(e))&&t.__alive&&(!t.updateTransform||(e=t.updateTransform(e,a,s,n))&&e.update)&&i.push(t)}),o=ct(),a.eachSeries(function(t){var e=r._chartsMap[t.__viewId];(!e.updateTransform||(e=e.updateTransform(t,a,s,n))&&e.update)&&o.set(t.uid,1)}),Yx(a),this._scheduler.performVisualTasks(a,n,{setDirty:!0,dirtyMap:o}),jx(this,a,s,n,o),qx(a,this._api))},updateView:function(t){var e=this._model;e&&(e.setUpdatePayload(t),tm.markUpdateMethod(t,"updateView"),Yx(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),Ux(this,this._model,this._api,t),qx(e,this._api))},updateVisual:function(n){var i=this,o=this._model;o&&(o.setUpdatePayload(n),o.eachSeries(function(t){t.getData().clearAllVisual()}),tm.markUpdateMethod(n,"updateVisual"),Yx(o),this._scheduler.performVisualTasks(o,n,{visualType:"visual",setDirty:!0}),o.eachComponent(function(t,e){"series"===t||(t=i.getViewOfComponentModel(e))&&t.__alive&&t.updateVisual(e,o,i._api,n)}),o.eachSeries(function(t){i._chartsMap[t.__viewId].updateVisual(t,o,i._api,n)}),qx(o,this._api))},updateLayout:function(t){zx.update.call(this,t)}},Bx=function(t,e,n,i){if(t._disposed)u_(t.id);else{for(var o,r=t._model,a=t._coordSysMgr.getCoordinateSystems(),s=wh(r,n),l=0;l<a.length;l++){var u=a[l];if(u[e]&&null!=(o=u[e](r,s,i)))return o}0}},Vx=function(t,e){var n=t._chartsMap,i=t._scheduler;e.eachSeries(function(t){i.updateStreamModes(t,n[t.__viewId])})},Fx=function(e,t){var n=this,i=this.getModel(),o=e.type,r=e.escapeConnect,a=h_[o],s=a.actionInfo,l=(s.update||"update").split(":"),u=l.pop(),h=null!=l[0]&&Ph(l[0]);this[Sx]=!0;var c=[e],p=!1;e.batch&&(p=!0,c=P(e.batch,function(t){return(t=A(O({},t),e)).batch=null,t}));var d,f,g=[],l=zc(e),y=Bc(e)||l;xx(c,function(t){(d=(d=a.action(t,n._model,n._api))||O({},t)).type=s.event||d.type,g.push(d),y?(Ex(n,u,t,"series"),Qx(n)):h&&Ex(n,u,t,h.main,h.sub)}),"none"===u||y||h||(this[Mx]?(Rx(this),zx.update.call(this,e),this[Mx]=!1):zx[u].call(this,e)),d=p?{type:s.event||o,escapeConnect:r,batch:g}:g[0],this[Sx]=!1,t||((t=this._messageCenter).trigger(d.type,d),l&&(i={type:"selectchanged",escapeConnect:r,selected:(f=[],i.eachSeries(function(n){N(n.getAllData(),function(t){t.data;var e=t.type,t=n.getSelectedDataIndices();0<t.length&&(t={dataIndex:t,seriesIndex:n.seriesIndex},null!=e&&(t.dataType=e),f.push(t))})}),f),isFromClick:e.isFromClick||!1,fromAction:e.type,fromActionPayload:e},t.trigger(i.type,i)))},Gx=function(t){for(var e=this._pendingActions;e.length;){var n=e.shift();Fx.call(this,n,t)}},Hx=function(t){t||this.trigger("updated")},Wx=function(e,n){e.on("rendered",function(t){n.trigger("rendered",t),!e.animation.isFinished()||n[Mx]||n._scheduler.unfinished||n._pendingActions.length||n.trigger("finished")})},Xx=function(t,i){t.on("mouseover",function(t){var e,n=rx(t.target,Ec);n&&(Dc((e=Wh(n)).seriesIndex,e.focus,e.blurScope,i._api,!0),Cc(n=n,t)||n.__highByOuter||yc(n,uc),Qx(i))}).on("mouseout",function(t){var e,n=rx(t.target,Ec);n&&(Dc((e=Wh(n)).seriesIndex,e.focus,e.blurScope,i._api,!1),Cc(n=n,t)||n.__highByOuter||yc(n,hc),Qx(i))}).on("click",function(t){var e=rx(t.target,function(t){return null!=Wh(t).dataIndex},!0);e&&(t=e.selected?"unselect":"select",e=Wh(e),i._api.dispatchAction({type:t,dataType:e.dataType,dataIndexInside:e.dataIndex,seriesIndex:e.seriesIndex,isFromClick:!0}))})},Yx=function(t){t.clearColorPalette(),t.eachSeries(function(t){t.clearColorPalette()})},Ux=function(t,e,n,i){Zx(t,e,n,i),xx(t._chartsViews,function(t){t.__alive=!1}),jx(t,e,n,i),xx(t._chartsViews,function(t){t.__alive||t.remove(e,n)})},Zx=function(t,n,i,o,e){xx(e||t._componentsViews,function(t){var e=t.__model;a_(0,t),t.render(e,n,i,o),r_(e,t),s_(e,t)})},jx=function(i,t,e,o,r){var a=i._scheduler,s=i._labelManager;s.clearLabels();var n,l,u=!1;t.eachSeries(function(t){var e=i._chartsMap[t.__viewId];e.__alive=!0;var n=e.renderTask;a.updatePayload(n,o),a_(0,e),r&&r.get(t.uid)&&n.dirty(),n.perform(a.getPerformArgs(n))&&(u=!0),t.__transientTransitionOpt=null,e.group.silent=!!t.get("silent"),function(t,e){var n=t.get("blendMode")||null;0;e.group.traverse(function(t){t.isGroup||(t.style.blend=n),t.eachPendingDisplayable&&t.eachPendingDisplayable(function(t){t.style.blend=n})})}(t,e),Ac(t),s.addLabelsOfSeries(e)}),a.unfinished=u||a.unfinished,s.updateLayoutConfig(e),s.layout(e),s.processLabelsOverall(),t.eachSeries(function(t){var e=i._chartsMap[t.__viewId];r_(t,e),s_(t,e)}),e=t,t=(n=i)._zr.storage,l=0,t.traverse(function(t){t.isGroup||l++}),l>e.get("hoverLayerThreshold")&&!w.node&&!w.worker&&e.eachSeries(function(t){t.preventUsingHoverLayer||(t=n._chartsMap[t.__viewId]).__alive&&t.group.traverse(function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)})})},qx=function(e,n){xx(g_,function(t){t(e,n)})},Qx=function(t){t[Ix]=!0,t.getZr().wakeUp()},t_=function(t){t[Ix]&&(t.getZr().storage.traverse(function(t){ip(t)||o_(t)}),t[Ix]=!1)},Kx=function(n){return l(t,e=Hf),t.prototype.getCoordinateSystems=function(){return n._coordSysMgr.getCoordinateSystems()},t.prototype.getComponentByElement=function(t){for(;t;){var e=t.__ecComponentInfo;if(null!=e)return n._model.getComponent(e.mainType,e.index);t=t.parent}},t.prototype.enterEmphasis=function(t,e){bc(t,e),Qx(n)},t.prototype.leaveEmphasis=function(t,e){wc(t,e),Qx(n)},t.prototype.enterBlur=function(t){Sc(t),Qx(n)},t.prototype.leaveBlur=function(t){Mc(t),Qx(n)},t.prototype.enterSelect=function(t){Ic(t),Qx(n)},t.prototype.leaveSelect=function(t){Tc(t),Qx(n)},t.prototype.getModel=function(){return n.getModel()},t.prototype.getViewOfComponentModel=function(t){return n.getViewOfComponentModel(t)},t.prototype.getViewOfSeriesModel=function(t){return n.getViewOfSeriesModel(t)},new t(n);function t(){return null!==e&&e.apply(this,arguments)||this}var e},$x=function(i){function o(t,e){for(var n=0;n<t.length;n++){t[n][Cx]=e}}xx(c_,function(t,e){i._messageCenter.on(e,function(t){var e,n;__[i.group]&&0!==i[Cx]&&(t&&t.escapeConnect||(e=i.makeActionFromEvent(t),n=[],xx(x_,function(t){t!==i&&t.group===i.group&&n.push(t)}),o(n,0),xx(n,function(t){1!==t[Cx]&&t.dispatchAction(e)}),o(n,2)))})})},void(Jx=function(t,e){var a=t._model;N(lh(e),function(t){var e,n=t.from,i=t.to;null==i&&rh(e);var o={includeMainTypes:["series"],enableAll:!1,enableNone:!1},r=n?wh(a,n,o):null,o=wh(a,i,o).seriesModel;null==o&&(e=""),r&&r.seriesModel!==o&&(e=""),null!=e&&rh(e),o.__transientTransitionOpt={from:n?n.dimension:null,to:i.dimension,dividingMethod:t.dividingMethod}})})),i_);function i_(t,e,n){var i=e_.call(this,new Ym)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],n=n||{},"string"==typeof e&&(e=m_[e]),i._dom=t;"undefined"==typeof window&&global;var o="canvas",r=!1,r=i._zr=Lu(t,{renderer:n.renderer||o,devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height,useDirtyRect:null==n.useDirtyRect?r:n.useDirtyRect});i._throttledZrFlush=hm(B(r.flush,r),17),(e=C(e))&&fg(e,!0),i._theme=e,i._locale=function(t){if(H(t)){var e=jp[t.toUpperCase()]||{};return t===Yp||t===Up?C(e):b(C(e),C(jp[Zp]),!1)}return b(C(t),C(jp[Zp]),!1)}(n.locale||Kp),i._coordSysMgr=new Yf;n=i._api=Kx(i);function a(t,e){return t.__prio-e.__prio}return Si(y_,a),Si(p_,a),i._scheduler=new _m(i,n,p_,y_),i._messageCenter=new Px,i._labelManager=new Iv,i._initEvents(),i.resize=B(i.resize,i),r.animation.on("frame",i._onframe,i),Wx(r,i),Xx(r,i),st(i),i}function o_(t){for(var e=[],n=t.currentStates,i=0;i<n.length;i++){var o=n[i];"emphasis"!==o&&"blur"!==o&&"select"!==o&&e.push(o)}t.selected&&t.states.select&&e.push("select"),t.hoverState===qh&&t.states.emphasis?e.push("emphasis"):t.hoverState===jh&&t.states.blur&&e.push("blur"),t.useStates(e)}function r_(t,e){var i,o;t.preventAutoZ||(i=t.get("z"),o=t.get("zlevel"),e.group.traverse(function(t){var e,n;t.isGroup||(null!=i&&(t.z=i),null!=o&&(t.zlevel=o),n=t.getTextContent(),e=t.getTextGuideLine(),n&&(n.z=t.z,n.zlevel=t.zlevel,n.z2=t.z2+2),e&&(n=t.textGuideLineConfig&&t.textGuideLineConfig.showAbove,e.z=t.z,e.zlevel=t.zlevel,e.z2=t.z2+(n?1:-1)))}))}function a_(t,e){e.group.traverse(function(t){var e,n;ip(t)||(e=t.getTextContent(),n=t.getTextGuideLine(),t.stateTransition&&(t.stateTransition=null),e&&e.stateTransition&&(e.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),t.hasState()?(t.prevStates=t.currentStates,t.clearStates()):t.prevStates&&(t.prevStates=null))})}function s_(t,e){var n=t.getModel("stateAnimation"),o=t.isAnimationEnabled(),t=n.get("duration"),r=0<t?{duration:t,delay:n.get("delay"),easing:n.get("easing")}:null;e.group.traverse(function(t){var e,n,i;t.states&&t.states.emphasis&&(ip(t)||(t instanceof Dr&&((i=Uh(n=t)).normalFill=n.style.fill,i.normalStroke=n.style.stroke,n=n.states.select||{},i.selectFill=n.style&&n.style.fill||null,i.selectStroke=n.style&&n.style.stroke||null),!t.__dirty||(e=t.prevStates)&&t.useStates(e),o&&(t.stateTransition=r,n=t.getTextContent(),e=t.getTextGuideLine(),n&&(n.stateTransition=r),e&&(e.stateTransition=r)),t.__dirty&&o_(t)))})}n=n_.prototype;n.on=Dx("on"),n.off=Dx("off"),n.one=function(i,o,t){var r=this;oh(),this.on.call(this,i,function t(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];o&&o.apply&&o.apply(this,e),r.off(i,t)},t)};var l_=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function u_(){0}var h_={},c_={},p_=[],d_=[],f_=[],g_=[],y_=[],m_={},v_={},x_={},__={},b_=+new Date,w_=+new Date,S_="_echarts_instance_";function M_(t){__[t]=!1}g=M_;function I_(t){return x_[e=S_,(t=t).getAttribute?t.getAttribute(e):t[e]];var e}function T_(t,e){m_[t]=e}function C_(t){d_.push(t)}function D_(t,e){O_(p_,t,e,2e3)}function A_(t,e,n){"function"==typeof e&&(n=e,e="");var i=bx(t)?t.type:[t,t={event:e}][0];t.event=(t.event||i).toLowerCase(),e=t.event,vx(Tx.test(i)&&Tx.test(e)),h_[i]||(h_[i]={action:n,actionInfo:t}),c_[e]=i}function L_(t,e){Yf.register(t,e)}function k_(t,e){O_(y_,t,e,1e3,"layout")}function P_(t,e){O_(y_,t,e,3e3,"visual")}function O_(t,e,n,i,o){(_x(e)||bx(e))&&(n=e,e=i);o=_m.wrapStageHandler(n,o);o.__prio=e,o.__raw=n,t.push(o)}function R_(t,e){v_[t]=e}function N_(t){return qy.extend(t)}n=function(t){var e=(t=C(t)).type,n="";e||rh(n);var i=e.split(":");2!==i.length&&rh(n),n=!1,"echarts"===i[0]&&(e=i[1],n=!0),t.__isBuiltIn=n,py.set(e,t)};P_(2e3,sf),P_(4500,af),P_(4500,vm),P_(2e3,Op),P_(4500,Ea),P_(7e3,function(e,i){e.eachRawSeries(function(t){var n;e.isSeriesFiltered(t)||((n=t.getData()).hasItemVisual()&&n.each(function(t){var e=n.getItemVisual(t,"decal");e&&(n.ensureUniqueItemVisual(t,"style").decal=yx(e,i))}),(t=n.getVisual("decal"))&&(n.getVisual("style").decal=yx(t,i)))})}),C_(fg),D_(900,function(t){var i=ct();t.eachSeries(function(t){var e,n=t.get("stack");n&&(e=i.get(n)||i.set(n,[]),(t={stackResultDimension:(n=t.getData()).getCalculationInfo("stackResultDimension"),stackedOverDimension:n.getCalculationInfo("stackedOverDimension"),stackedDimension:n.getCalculationInfo("stackedDimension"),stackedByDimension:n.getCalculationInfo("stackedByDimension"),isStackedByIndex:n.getCalculationInfo("isStackedByIndex"),data:n,seriesModel:t}).stackedDimension&&(t.isStackedByIndex||t.stackedByDimension)&&(e.length&&n.setCalculationInfo("stackedOnSeries",e[e.length-1].seriesModel),e.push(t)))}),i.each(gg)}),R_("default",function(i,o){A(o=o||{},{text:"loading",textColor:"#000",fontSize:"12px",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var t=new $r,r=new ga({style:{fill:o.maskColor},zlevel:o.zlevel,z:1e4});t.add(r);var a,s=o.fontSize+" sans-serif",l=new ga({style:{fill:"none"},textContent:new vl({style:{text:o.text,fill:o.textColor,font:s}}),textConfig:{position:"right",distance:10},zlevel:o.zlevel,z:10001});return t.add(l),o.showSpinner&&((a=new Al({shape:{startAngle:-xm/2,endAngle:-xm/2+.1,r:o.spinnerRadius},style:{stroke:o.color,lineCap:"round",lineWidth:o.lineWidth},zlevel:o.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*xm/2}).start("circularInOut"),a.animateShape(!0).when(1e3,{startAngle:3*xm/2}).delay(300).start("circularInOut"),t.add(a)),t.resize=function(){var t=jn(o.text,s),e=o.showSpinner?o.spinnerRadius:0,n=(i.getWidth()-2*e-(o.showSpinner&&t?10:0)-t)/2-(o.showSpinner?0:t/2),t=i.getHeight()/2;o.showSpinner&&a.setShape({cx:n,cy:t}),l.setShape({x:n-e,y:t-e,width:2*e,height:2*e}),r.setShape({x:0,y:0,width:i.getWidth(),height:i.getHeight()})},t.resize(),t}),A_({type:tc,event:tc,update:tc},gt),A_({type:ec,event:ec,update:ec},gt),A_({type:nc,event:nc,update:nc},gt),A_({type:ic,event:ic,update:ic},gt),A_({type:oc,event:oc,update:oc},gt),T_("light",mu),T_("dark",kp);function E_(t){return null==t?0:t.length||1}function z_(t){return t}var B_=(V_.prototype.add=function(t){return this._add=t,this},V_.prototype.update=function(t){return this._update=t,this},V_.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},V_.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},V_.prototype.remove=function(t){return this._remove=t,this},V_.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},V_.prototype._executeOneToOne=function(){var t=this._old,e=this._new,n={},i=new Array(t.length),o=new Array(e.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(e,n,o,"_newKeyGetter");for(var r=0;r<t.length;r++){var a,s=i[r],l=n[s],u=E_(l);1<u?(a=l.shift(),1===l.length&&(n[s]=l[0]),this._update&&this._update(a,r)):1===u?(n[s]=null,this._update&&this._update(l,r)):this._remove&&this._remove(r)}this._performRestAdd(o,n)},V_.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},i={},o=[],r=[];this._initIndexMap(t,n,o,"_oldKeyGetter"),this._initIndexMap(e,i,r,"_newKeyGetter");for(var a=0;a<o.length;a++){var s=o[a],l=n[s],u=i[s],h=E_(l),c=E_(u);if(1<h&&1===c)this._updateManyToOne&&this._updateManyToOne(u,l),i[s]=null;else if(1===h&&1<c)this._updateOneToMany&&this._updateOneToMany(u,l),i[s]=null;else if(1===h&&1===c)this._update&&this._update(u,l),i[s]=null;else if(1<h)for(var p=0;p<h;p++)this._remove&&this._remove(l[p]);else this._remove&&this._remove(l)}this._performRestAdd(r,i)},V_.prototype._performRestAdd=function(t,e){for(var n=0;n<t.length;n++){var i=t[n],o=e[i],r=E_(o);if(1<r)for(var a=0;a<r;a++)this._add&&this._add(o[a]);else 1===r&&this._add&&this._add(o);e[i]=null}},V_.prototype._initIndexMap=function(t,e,n,i){for(var o=this._diffModeMultiple,r=0;r<t.length;r++){var a,s,l="_ec_"+this[i](t[r],r);o||(n[r]=l),e&&(0===(s=E_(a=e[l]))?(e[l]=r,o&&n.push(l)):1===s?e[l]=[a,r]:a.push(r))}},V_);function V_(t,e,n,i,o,r){this._old=t,this._new=e,this._oldKeyGetter=n||z_,this._newKeyGetter=i||z_,this.context=o,this._diffModeMultiple="multiple"===r}function F_(r){var t={},a=t.encode={},s=ct(),l=[],u=[],h=t.userOutput={dimensionNames:r.dimensions.slice(),encode:{}};N(r.dimensions,function(t){var e,n,i=r.getDimensionInfo(t),o=i.coordDim;o&&(e=i.coordDimIndex,G_(a,o)[e]=t,i.isExtraCoord||(s.set(o,1),"ordinal"===(n=i.type)||"time"===n||(l[0]=t),G_(h.encode,o)[e]=i.index),i.defaultTooltip&&u.push(t)),uf.each(function(t,e){var n=G_(a,e),e=i.otherDims[e];null!=e&&!1!==e&&(n[e]=i.name)})});var i=[],o={};s.each(function(t,e){var n=a[e];o[e]=n[0],i=i.concat(n)}),t.dataDimsOnCoord=i,t.encodeFirstDimNotExtra=o;var e=a.label;e&&e.length&&(l=e.slice());e=a.tooltip;return e&&e.length?u=e.slice():u.length||(u=l.slice()),a.defaultedLabel=l,a.defaultedTooltip=u,t}function G_(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}function H_(t){return"category"===t?"ordinal":"time"===t?"time":"float"}var W_,X_,Y_,U_,Z_,j_,q_,K_,$_,J_,Q_,tb,eb,nb,ib=function(t){this.otherDims={},null!=t&&O(this,t)},ob=Math.floor,rb=Y,ab=P,sf="undefined",sb={float:typeof Float64Array==sf?Array:Float64Array,int:typeof Int32Array==sf?Array:Int32Array,ordinal:Array,number:Array,time:Array},lb=typeof Uint32Array==sf?Array:Uint32Array,ub=typeof Int32Array==sf?Array:Int32Array,hb=typeof Uint16Array==sf?Array:Uint16Array,cb=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx","_nameRepeatCount"],pb=["_extent","_approximateExtent","_rawExtent"],db=(fb.prototype.getDimension=function(t){return"number"!=typeof t&&(isNaN(t)||this._dimensionInfos.hasOwnProperty(t))||(t=this.dimensions[t]),t},fb.prototype.getDimensionInfo=function(t){return this._dimensionInfos[this.getDimension(t)]},fb.prototype.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},fb.prototype.mapDimension=function(t,e){var n=this._dimensionsSummary;if(null==e)return n.encodeFirstDimNotExtra[t];t=n.encode[t];return t?t[e]:null},fb.prototype.mapDimensionsAll=function(t){return(this._dimensionsSummary.encode[t]||[]).slice()},fb.prototype.initData=function(t,e,n){var i=xg(t)||k(t),i=i?new Ig(t,this.dimensions.length):t;t=(this._rawData=i).getSource().sourceFormat;this._storage={},this._indices=null,this._dontMakeIdFromName=null!=this._idDimIdx||t===ff||!!i.fillStorage,this._nameList=(e||[]).slice(),this._idList=[],this._nameRepeatCount={},n||(this.hasItemOption=!1),this.defaultDimValueGetter=W_[t],this._dimValueGetter=n=n||this.defaultDimValueGetter,this._dimValueGetterArrayRows=W_.arrayRows,this._rawExtent={},this._initDataFromProvider(0,i.count()),i.pure&&(this.hasItemOption=!1)},fb.prototype.getProvider=function(){return this._rawData},fb.prototype.appendData=function(t){var e=this._rawData,n=this.count();e.appendData(t);t=e.count();e.persistent||(t+=n),this._initDataFromProvider(n,t,!0)},fb.prototype.appendValues=function(t,e){for(var n=this._storage,i=this.dimensions,o=i.length,r=this._rawExtent,a=this.count(),s=a+Math.max(t.length,e?e.length:0),l=0;l<o;l++){var u=i[l];r[u]||(r[u]=tb()),U_(n,this._dimensionInfos[u],s,!0)}for(var h=ab(i,function(t){return r[t]}),c=this._storageArr=ab(i,function(t){return n[t]}),p=[],d=a;d<s;d++){for(var f=d-a,g=0;g<o;g++){var u=i[g],y=this._dimValueGetterArrayRows(t[f]||p,u,f,g);c[g][d]=y;var m=h[g];y<m[0]&&(m[0]=y),y>m[1]&&(m[1]=y)}e&&(this._nameList[d]=e[f],this._dontMakeIdFromName||$_(this,d))}this._rawCount=this._count=s,this._extent={},X_(this)},fb.prototype._initDataFromProvider=function(t,e,n){if(!(e<=t)){for(var i=this._rawData,o=this._storage,r=this.dimensions,a=r.length,s=this._dimensionInfos,l=this._nameList,u=this._idList,h=this._rawExtent,c=i.getSource().sourceFormat===hf,p=0;p<a;p++){var d=r[p];h[d]||(h[d]=tb()),U_(o,s[d],e,n)}var f=this._storageArr=ab(r,function(t){return o[t]}),g=ab(r,function(t){return h[t]});if(i.fillStorage)i.fillStorage(t,e,f,g);else for(var y=[],m=t;m<e;m++){y=i.getItem(m,y);for(var v,x=0;x<a;x++){var d=r[x],_=f[x],b=this._dimValueGetter(y,d,m,x);_[m]=b;_=g[x];b<_[0]&&(_[0]=b),b>_[1]&&(_[1]=b)}c&&!i.pure&&y&&(v=y.name,null==l[m]&&null!=v&&(l[m]=gh(v,null)),v=y.id,null==u[m]&&null!=v&&(u[m]=gh(v,null))),this._dontMakeIdFromName||$_(this,m)}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent={},X_(this)}},fb.prototype.count=function(){return this._count},fb.prototype.getIndices=function(){var t=this._indices;if(t){var e=t.constructor,n=this._count;if(e===Array){o=new e(n);for(var i=0;i<n;i++)o[i]=t[i]}else o=new e(t.buffer,0,n)}else for(var o=new(e=Y_(this))(this.count()),i=0;i<o.length;i++)o[i]=i;return o},fb.prototype.getByDimIdx=function(t,e){if(!(0<=e&&e<this._count))return NaN;t=this._storageArr[t];return t?t[this.getRawIndex(e)]:NaN},fb.prototype.get=function(t,e){if(!(0<=e&&e<this._count))return NaN;t=this._storage[t];return t?t[this.getRawIndex(e)]:NaN},fb.prototype.getByRawIndex=function(t,e){if(!(0<=e&&e<this._rawCount))return NaN;t=this._storage[t];return t?t[e]:NaN},fb.prototype.getValues=function(t,e){var n=[];F(t)||(e=t,t=this.dimensions);for(var i=0,o=t.length;i<o;i++)n.push(this.get(t[i],e));return n},fb.prototype.hasValue=function(t){for(var e=this._dimensionsSummary.dataDimsOnCoord,n=0,i=e.length;n<i;n++)if(isNaN(this.get(e[n],t)))return!1;return!0},fb.prototype.getDataExtent=function(t){t=this.getDimension(t);var e=this._storage[t],n=tb();if(!e)return n;var i,o=this.count();if(!this._indices)return this._rawExtent[t].slice();if(i=this._extent[t])return i.slice();for(var r=(i=n)[0],a=i[1],s=0;s<o;s++){var l=e[this.getRawIndex(s)];l<r&&(r=l),a<l&&(a=l)}return i=[r,a],this._extent[t]=i},fb.prototype.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},fb.prototype.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},fb.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},fb.prototype.setCalculationInfo=function(t,e){rb(t)?O(this._calculationInfo,t):this._calculationInfo[t]=e},fb.prototype.getSum=function(t){var e=0;if(this._storage[t])for(var n=0,i=this.count();n<i;n++){var o=this.get(t,n);isNaN(o)||(e+=o)}return e},fb.prototype.getMedian=function(t){var e=[];this.each(t,function(t){isNaN(t)||e.push(t)});var n=e.sort(function(t,e){return t-e}),t=this.count();return 0===t?0:t%2==1?n[(t-1)/2]:(n[t/2]+n[t/2-1])/2},fb.prototype.rawIndexOf=function(t,e){t=t&&this._invertedIndicesMap[t];e=t[e];return null==e||isNaN(e)?-1:e},fb.prototype.indexOfName=function(t){for(var e=0,n=this.count();e<n;e++)if(this.getName(e)===t)return e;return-1},fb.prototype.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&n<this._count&&n===t)return t;for(var i=0,o=this._count-1;i<=o;){var r=(i+o)/2|0;if(e[r]<t)i=1+r;else{if(!(e[r]>t))return r;o=r-1}}return-1},fb.prototype.indicesOfNearest=function(t,e,n){var i=this._storage[t],o=[];if(!i)return o;null==n&&(n=1/0);for(var r=1/0,a=-1,s=0,l=0,u=this.count();l<u;l++){var h=e-i[this.getRawIndex(l)],c=Math.abs(h);c<=n&&((c<r||c===r&&0<=h&&a<0)&&(r=c,a=h,s=0),h===a&&(o[s++]=l))}return o.length=s,o},fb.prototype.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],n=0;n<this.dimensions.length;n++){var i=this.dimensions[n];e.push(this.get(i,t))}return e},fb.prototype.getName=function(t){var e=this.getRawIndex(t),t=this._nameList[e];return null==t&&null!=this._nameDimIdx&&(t=K_(this,this._nameDimIdx,this._nameOrdinalMeta,e)),null==t&&(t=""),t},fb.prototype.getId=function(t){return q_(this,this.getRawIndex(t))},fb.prototype.each=function(t,e,n,i){var o=this;if(this._count){"function"==typeof t&&(i=n,n=e,e=t,t=[]);var r=n||i||this,t=ab(J_(t),this.getDimension,this);0;for(var a=t.length,s=ab(t,function(t){return o._dimensionInfos[t].index}),l=this._storageArr,u=0,h=this.count();u<h;u++){var c=this.getRawIndex(u);switch(a){case 0:e.call(r,u);break;case 1:e.call(r,l[s[0]][c],u);break;case 2:e.call(r,l[s[0]][c],l[s[1]][c],u);break;default:for(var p=0,d=[];p<a;p++)d[p]=l[s[p]][c];d[p]=u,e.apply(r,d)}}}},fb.prototype.filterSelf=function(t,e,n,i){var o=this;if(this._count){"function"==typeof t&&(i=n,n=e,e=t,t=[]);var r=n||i||this,t=ab(J_(t),this.getDimension,this);0;for(var a=this.count(),s=new(Y_(this))(a),l=[],u=t.length,h=0,c=ab(t,function(t){return o._dimensionInfos[t].index}),p=c[0],d=this._storageArr,f=0;f<a;f++){var g=void 0,y=this.getRawIndex(f);if(0===u)g=e.call(r,f);else if(1===u)var m=d[p][y],g=e.call(r,m,f);else{for(var v=0;v<u;v++)l[v]=d[c[v]][y];l[v]=f,g=e.apply(r,l)}g&&(s[h++]=y)}return h<a&&(this._indices=s),this._count=h,this._extent={},this.getRawIndex=this._indices?j_:Z_,this}},fb.prototype.selectRange=function(t){var e=this,n=this._count;if(n){var i,o=[];for(i in t)t.hasOwnProperty(i)&&o.push(i);0;var r=o.length;if(r){var a=this.count(),s=new(Y_(this))(a),l=0,u=o[0],h=ab(o,function(t){return e._dimensionInfos[t].index}),c=t[u][0],p=t[u][1],d=this._storageArr,u=!1;if(!this._indices){var f=0;if(1===r){for(var g=d[h[0]],y=0;y<n;y++){(c<=(_=g[y])&&_<=p||isNaN(_))&&(s[l++]=f),f++}u=!0}else if(2===r){for(var g=d[h[0]],m=d[h[1]],v=t[o[1]][0],x=t[o[1]][1],y=0;y<n;y++){var _=g[y],b=m[y];(c<=_&&_<=p||isNaN(_))&&(v<=b&&b<=x||isNaN(b))&&(s[l++]=f),f++}u=!0}}if(!u)if(1===r)for(y=0;y<a;y++){var w=this.getRawIndex(y);(c<=(_=d[h[0]][w])&&_<=p||isNaN(_))&&(s[l++]=w)}else for(y=0;y<a;y++){for(var S=!0,w=this.getRawIndex(y),M=0;M<r;M++){var I=o[M];((_=d[h[M]][w])<t[I][0]||_>t[I][1])&&(S=!1)}S&&(s[l++]=this.getRawIndex(y))}return l<a&&(this._indices=s),this._count=l,this._extent={},this.getRawIndex=this._indices?j_:Z_,this}}},fb.prototype.mapArray=function(t,e,n,i){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this;var o=[];return this.each(t,function(){o.push(e&&e.apply(this,arguments))},n),o},fb.prototype.map=function(t,e,n,i){var o=n||i||this,r=ab(J_(t),this.getDimension,this);var t=Q_(this,r),a=t._storage;t._indices=this._indices,t.getRawIndex=t._indices?j_:Z_;for(var s=[],l=r.length,u=this.count(),h=[],c=t._rawExtent,p=0;p<u;p++){for(var d=0;d<l;d++)h[d]=this.get(r[d],p);h[l]=p;var f=e&&e.apply(o,h);if(null!=f){"object"!=typeof f&&(s[0]=f,f=s);for(var g=this.getRawIndex(p),y=0;y<f.length;y++){var m=r[y],v=f[y],x=c[m],m=a[m];m&&(m[g]=v),v<x[0]&&(x[0]=v),v>x[1]&&(x[1]=v)}}}return t},fb.prototype.downSample=function(t,e,n,i){for(var o=Q_(this,[t]),r=o._storage,a=[],s=ob(1/e),l=r[t],u=this.count(),h=o._rawExtent[t],c=new(Y_(this))(u),p=0,d=0;d<u;d+=s){u-d<s&&(s=u-d,a.length=s);for(var f=0;f<s;f++){var g=this.getRawIndex(d+f);a[f]=l[g]}var y=n(a),m=this.getRawIndex(Math.min(d+i(a,y)||0,u-1));(l[m]=y)<h[0]&&(h[0]=y),y>h[1]&&(h[1]=y),c[p++]=m}return o._count=p,o._indices=c,o.getRawIndex=j_,o},fb.prototype.lttbDownSample=function(t,e){var n,i=Q_(this,[]),o=i._storage[t],r=this.count(),a=new(Y_(this))(r),s=0,l=ob(1/e),u=this.getRawIndex(0);a[s++]=u;for(var h=1;h<r-1;h+=l){for(var c=Math.min(h+l,r-1),p=Math.min(h+2*l,r),d=(p+c)/2,f=0,g=c;g<p;g++){var y=o[w=this.getRawIndex(g)];isNaN(y)||(f+=y)}f/=p-c;for(var c=h,m=Math.min(h+l,r),v=h-1,x=o[u],_=-1,b=c,g=c;g<m;g++){var w,y=o[w=this.getRawIndex(g)];isNaN(y)||_<(n=Math.abs((v-d)*(y-x)-(v-g)*(f-x)))&&(_=n,b=w)}u=a[s++]=b}return a[s++]=this.getRawIndex(r-1),i._count=s,i._indices=a,i.getRawIndex=j_,i},fb.prototype.getItemModel=function(t){var e=this.hostModel,t=this.getRawDataItem(t);return new Fp(t,e,e&&e.ecModel)},fb.prototype.diff=function(e){var n=this;return new B_(e?e.getIndices():[],this.getIndices(),function(t){return q_(e,t)},function(t){return q_(n,t)})},fb.prototype.getVisual=function(t){var e=this._visual;return e&&e[t]},fb.prototype.setVisual=function(t,e){this._visual=this._visual||{},rb(t)?O(this._visual,t):this._visual[t]=e},fb.prototype.getItemVisual=function(t,e){t=this._itemVisuals[t],t=t&&t[e];return null==t?this.getVisual(e):t},fb.prototype.hasItemVisual=function(){return 0<this._itemVisuals.length},fb.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,i=n[t],t=(i=i||(n[t]={}))[e];return null==t&&(F(t=this.getVisual(e))?t=t.slice():rb(t)&&(t=O({},t)),i[e]=t),t},fb.prototype.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,rb(e)?O(i,e):i[e]=n},fb.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},fb.prototype.setLayout=function(t,e){if(rb(t))for(var n in t)t.hasOwnProperty(n)&&this.setLayout(n,t[n]);else this._layout[t]=e},fb.prototype.getLayout=function(t){return this._layout[t]},fb.prototype.getItemLayout=function(t){return this._itemLayouts[t]},fb.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?O(this._itemLayouts[t]||{},e):e},fb.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},fb.prototype.setItemGraphicEl=function(t,e){var n,i=this.hostModel;e&&((n=Wh(e)).dataIndex=t,n.dataType=this.dataType,n.seriesIndex=i&&i.seriesIndex,"group"===e.type&&e.traverse(eb,e)),this._graphicEls[t]=e},fb.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},fb.prototype.eachItemGraphicEl=function(n,i){N(this._graphicEls,function(t,e){t&&n&&n.call(i,t,e)})},fb.prototype.cloneShallow=function(t){if((t=t||new fb(ab(this.dimensions,this.getDimensionInfo,this),this.hostModel))._storage=this._storage,t._storageArr=this._storageArr,nb(t,this),this._indices){var e=this._indices.constructor;if(e===Array){var n=this._indices.length;t._indices=new e(n);for(var i=0;i<n;i++)t._indices[i]=this._indices[i]}else t._indices=new e(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?j_:Z_,t},fb.prototype.wrapMethod=function(t,e){var n=this[t];"function"==typeof n&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(nt(arguments)))})},fb.internalField=(W_={arrayRows:gb,objectRows:function(t,e,n,i){return Kg(t[e],this._dimensionInfos[e])},keyedColumns:gb,original:function(t,e,n,i){var o=t&&(null==t.value?t:t.value);return this._rawData.pure||(!Y(t=t)||t instanceof Array)||(this.hasItemOption=!0),Kg(o instanceof Array?o[i]:o,this._dimensionInfos[e])},typedArray:function(t,e,n,i){return t[i]}},X_=function(o){var r=o._invertedIndicesMap;N(r,function(t,e){var n=o._dimensionInfos[e].ordinalMeta;if(n){t=r[e]=new ub(n.categories.length);for(var i=0;i<t.length;i++)t[i]=-1;for(i=0;i<o._count;i++)t[o.get(e,i)]=i}})},K_=function(t,e,n,i){var o,e=t._storageArr[e];return e&&(o=e[i],n&&n.categories.length&&(o=n.categories[o])),gh(o,null)},Y_=function(t){return 65535<t._rawCount?lb:hb},U_=function(t,e,n,i){var o=sb[e.type],e=e.name;if(i){var r=t[e],a=r&&r.length;if(a!==n){for(var s=new o(n),l=0;l<a;l++)s[l]=r[l];t[e]=s}}else t[e]=new o(n)},Z_=function(t){return t},j_=function(t){return t<this._count&&0<=t?this._indices[t]:-1},q_=function(t,e){var n=t._idList[e];return null==n&&null!=t._idDimIdx&&(n=K_(t,t._idDimIdx,t._idOrdinalMeta,e)),null==n&&(n="e\0\0"+e),n},J_=function(t){return F(t)||(t=null!=t?[t]:[]),t},Q_=function(t,e){var n=t.dimensions,i=new fb(ab(n,t.getDimensionInfo,t),t.hostModel);nb(i,t);for(var o,r,a=i._storage={},s=t._storage,l=i._storageArr=[],u=0;u<n.length;u++){var h=n[u];s[h]&&(0<=L(e,h)?(a[h]=(o=s[h],r=void 0,(r=o.constructor)===Array?o.slice():new r(o)),i._rawExtent[h]=tb(),i._extent[h]=null):a[h]=s[h],l.push(a[h]))}return i},tb=function(){return[1/0,-1/0]},eb=function(t){var e=Wh(t),t=Wh(this);e.seriesIndex=t.seriesIndex,e.dataIndex=t.dataIndex,e.dataType=t.dataType},nb=function(e,n){N(cb.concat(n.__wrappedMethods||[]),function(t){n.hasOwnProperty(t)&&(e[t]=n[t])}),e.__wrappedMethods=n.__wrappedMethods,N(pb,function(t){e[t]=C(n[t])}),e._calculationInfo=O({},n._calculationInfo)},void($_=function(t,e){var n=t._nameList,i=t._idList,o=t._nameDimIdx,r=t._idDimIdx,a=n[e],s=i[e];null==a&&null!=o&&(n[e]=a=K_(t,o,t._nameOrdinalMeta,e)),null==s&&null!=r&&(i[e]=s=K_(t,r,t._idOrdinalMeta,e)),null==s&&null!=a&&(s=a,1<(a=(t=t._nameRepeatCount)[a]=(t[a]||0)+1)&&(s+="__ec__"+a),i[e]=s)})),fb);function fb(t,e){this.type="list",this._count=0,this._rawCount=0,this._storage={},this._storageArr=[],this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._rawExtent={},this._extent={},this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!0,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"],this.getRawIndex=Z_,t=t||["x","y"];for(var n={},i=[],o={},r=0;r<t.length;r++){var a=t[r],s=H(a)?new ib({name:a}):a instanceof ib?a:new ib(a),l=s.name;s.type=s.type||"float",s.coordDim||(s.coordDim=l,s.coordDimIndex=0);a=s.otherDims=s.otherDims||{};i.push(l),(n[l]=s).index=r,s.createInvertedIndices&&(o[l]=[]),0===a.itemName&&(this._nameDimIdx=r,this._nameOrdinalMeta=s.ordinalMeta),0===a.itemId&&(this._idDimIdx=r,this._idOrdinalMeta=s.ordinalMeta)}this.dimensions=i,this._dimensionInfos=n,this.hostModel=e,this._dimensionsSummary=F_(this),this._invertedIndicesMap=o,this.userOutput=this._dimensionsSummary.userOutput}function gb(t,e,n,i){return Kg(t[i],this._dimensionInfos[e])}function yb(t,e,n){xg(e)||(e=bg(e)),n=n||{},t=(t||[]).slice();for(var i,o,r,a,s=(n.dimsDef||[]).slice(),l=ct(),u=ct(),h=[],c=(i=e,y=t,o=s,r=n.dimCount,a=Math.max(i.dimensionsDetectedCount||1,y.length,o.length,r||0),N(y,function(t){var e;Y(t)&&(e=t.dimsDef)&&(a=Math.max(a,e.length))}),a),p=0;p<c;p++){var d=s[p],f=s[p]=O({},Y(d)?d:{name:d}),d=f.name,g=h[p]=new ib;null!=d&&null==l.get(d)&&(g.name=g.displayName=d,l.set(d,p)),null!=f.type&&(g.type=f.type),null!=f.displayName&&(g.displayName=f.displayName)}var y=n.encodeDef;!y&&n.encodeDefaulter&&(y=n.encodeDefaulter(e,c));var m=ct(y);m.each(function(t,n){var i,t=lh(t).slice();1===t.length&&!H(t[0])&&t[0]<0?m.set(n,!1):(i=m.set(n,[]),N(t,function(t,e){t=H(t)?l.get(t):t;null!=t&&t<c&&(i[e]=t,x(h[t],n,e))}))});var v=0;function x(t,e,n){null!=uf.get(e)?t.otherDims[e]=n:(t.coordDim=e,t.coordDimIndex=n,u.set(e,!0))}N(t,function(t){var n,i,o,r;H(t)?(n=t,r={}):(n=(r=t).name,t=r.ordinalMeta,r.ordinalMeta=null,(r=C(r)).ordinalMeta=t,i=r.dimsDef,o=r.otherDims,r.name=r.coordDim=r.coordDimIndex=r.dimsDef=r.otherDims=null);var e=m.get(n);if(!1!==e){if(!(e=lh(e)).length)for(var a=0;a<(i&&i.length||1);a++){for(;v<h.length&&null!=h[v].coordDim;)v++;v<h.length&&e.push(v++)}N(e,function(t,e){t=h[t];x(A(t,r),n,e),null==t.name&&i&&(Y(e=i[e])||(e={name:e}),t.name=t.displayName=e.name,t.defaultTooltip=e.defaultTooltip),o&&A(t.otherDims,o)})}});for(var _,b,w=n.generateCoord,S=null!=(M=n.generateCoordCount),M=w?M||1:0,I=w||"value",T=0;T<c;T++){null==(g=h[T]=h[T]||new ib).coordDim&&(g.coordDim=mb(I,u,S),g.coordDimIndex=0,(!w||M<=0)&&(g.isExtraCoord=!0),M--),null==g.name&&(g.name=mb(g.coordDim,l,!1)),null==g.type&&(b=T,Mf((_=e).data,_.sourceFormat,_.seriesLayoutBy,_.dimensionsDefine,_.startIndex,b)===vf.Must||g.isExtraCoord&&(null!=g.otherDims.itemName||null!=g.otherDims.seriesName))&&(g.type="ordinal")}return h}function mb(t,e,n){if(n||null!=e.get(t)){for(var i=0;null!=e.get(t+i);)i++;t+=i}return e.set(t,!0),t}function vb(t,e){return yb((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})}var xb=function(t){this.coordSysDims=[],this.axisMap=ct(),this.categoryAxisMap=ct(),this.coordSysName=t};var _b={cartesian2d:function(t,e,n,i){var o=t.getReferringComponents("xAxis",Sh).models[0],t=t.getReferringComponents("yAxis",Sh).models[0];e.coordSysDims=["x","y"],n.set("x",o),n.set("y",t),bb(o)&&(i.set("x",o),e.firstCategoryDimIndex=0),bb(t)&&(i.set("y",t),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,n,i){t=t.getReferringComponents("singleAxis",Sh).models[0];e.coordSysDims=["single"],n.set("single",t),bb(t)&&(i.set("single",t),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var o=t.getReferringComponents("polar",Sh).models[0],t=o.findAxisModel("radiusAxis"),o=o.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",t),n.set("angle",o),bb(t)&&(i.set("radius",t),e.firstCategoryDimIndex=0),bb(o)&&(i.set("angle",o),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e,n,i){e.coordSysDims=["lng","lat"]},parallel:function(t,i,o,r){var a=t.ecModel,t=a.getComponent("parallel",t.get("parallelIndex")),s=i.coordSysDims=t.dimensions.slice();N(t.parallelAxisIndex,function(t,e){var n=a.getComponent("parallelAxis",t),t=s[e];o.set(t,n),bb(n)&&(r.set(t,n),null==i.firstCategoryDimIndex&&(i.firstCategoryDimIndex=e))})}};function bb(t){return"category"===t.get("type")}function wb(t,n,e){var i,o,r,a,s,l,u=(e=e||{}).byIndex,h=e.stackedCoordDimension,c=!(!t||!t.get("stack"));return N(n,function(t,e){H(t)&&(n[e]=t={name:t}),c&&!t.isExtraCoord&&(u||i||!t.ordinalMeta||(i=t),o||"ordinal"===t.type||"time"===t.type||h&&h!==t.coordDim||(o=t))}),!o||u||i||(u=!0),o&&(r="__\0ecstackresult",a="__\0ecstackedover",i&&(i.createInvertedIndices=!0),s=o.coordDim,t=o.type,l=0,N(n,function(t){t.coordDim===s&&l++}),n.push({name:r,coordDim:s,coordDimIndex:l,type:t,isExtraCoord:!0,isCalculationCoord:!0}),l++,n.push({name:a,coordDim:a,coordDimIndex:l,type:t,isExtraCoord:!0,isCalculationCoord:!0})),{stackedDimension:o&&o.name,stackedByDimension:i&&i.name,isStackedByIndex:u,stackedOverDimension:a,stackResultDimension:r}}function Sb(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function Mb(t,e){return Sb(t,e)?t.getCalculationInfo("stackResultDimension"):e}function Ib(t,e,n){n=n||{},xg(t)||(t=bg(t));var i=e.get("coordinateSystem"),i=Yf.get(i),o=function(t){var e=t.get("coordinateSystem"),n=new xb(e);if(e=_b[e])return e(t,n,n.axisMap,n.categoryAxisMap),n}(e);o&&o.coordSysDims&&(s=P(o.coordSysDims,function(t){var e={name:t},t=o.axisMap.get(t);return t&&(t=t.get("type"),e.type=H_(t)),e})),s=s||(i&&(i.getDimensionsInfo?i.getDimensionsInfo():i.dimensions.slice())||["x","y"]);var r,a,i=n.useEncodeDefaulter,i=vb(t,{coordDimensions:s,generateCoord:n.generateCoord,encodeDefaulter:G(i)?i:i?V(bf,s,e):null});o&&N(i,function(t,e){var n=t.coordDim,n=o.categoryAxisMap.get(n);n&&(null==r&&(r=e),t.ordinalMeta=n.getOrdinalMeta()),null!=t.otherDims.itemName&&(a=!0)}),a||null==r||(i[r].otherDims.itemName=0);var s=wb(e,i),e=new db(i,e);e.setCalculationInfo(s);s=null!=r&&function(t){if(t.sourceFormat===hf){t=function(t){var e=0;for(;e<t.length&&null==t[e];)e++;return t[e]}(t.data||[]);return null!=t&&!F(ch(t))}}(t)?function(t,e,n,i){return i===r?n:this.defaultDimValueGetter(t,e,n,i)}:null;return e.hasItemOption=!1,e.initData(t,null,s),e}var Tb=(Cb.prototype.getSetting=function(t){return this._setting[t]},Cb.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},Cb.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},Cb.prototype.getExtent=function(){return this._extent.slice()},Cb.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},Cb.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},Cb.prototype.isBlank=function(){return this._isBlank},Cb.prototype.setBlank=function(t){this._isBlank=t},Cb);function Cb(t){this._setting=t||{},this._extent=[1/0,-1/0]}Bh(Tb,{registerWhenExtend:!0});var Db=(Ab.createByAxisModel=function(t){var e=t.option,t=e.data,t=t&&P(t,Lb);return new Ab({categories:t,needCollect:!t,deduplication:!1!==e.dedplication})},Ab.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},Ab.prototype.parseAndCollect=function(t){var e=this._needCollect;if("string"!=typeof t&&!e)return t;if(e&&!this._deduplication)return n=this.categories.length,this.categories[n]=t,n;var n,i=this._getOrCreateMap();return null==(n=i.get(t))&&(e?(n=this.categories.length,this.categories[n]=t,i.set(t,n)):n=NaN),n},Ab.prototype._getOrCreateMap=function(){return this._map||(this._map=ct(this.categories))},Ab);function Ab(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication}function Lb(t){return Y(t)&&null!=t.value?t.value:t+""}var kb=Eu;function Pb(t,e,n,i){var o={},r=t[1]-t[0],e=o.interval=qu(r/e,!0);null!=n&&e<n&&(e=o.interval=n),null!=i&&i<e&&(e=o.interval=i);i=o.intervalPrecision=Ob(e),i=o.niceTickExtent=[kb(Math.ceil(t[0]/e)*e,i),kb(Math.floor(t[1]/e)*e,i)];return i=i,t=t,isFinite(i[0])||(i[0]=t[0]),isFinite(i[1])||(i[1]=t[1]),Rb(i,0,t),Rb(i,1,t),i[0]>i[1]&&(i[0]=i[1]),o}function Ob(t){return Vu(t)+2}function Rb(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function Nb(t,e){return t>=e[0]&&t<=e[1]}function Eb(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function zb(t,e){return t*(e[1]-e[0])+e[0]}var Bb,Vb=(l(Fb,Bb=Tb),Fb.prototype.parse=function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},Fb.prototype.contain=function(t){return Nb(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},Fb.prototype.normalize=function(t){return Eb(t=this.getCategoryIndex(this.parse(t)),this._extent)},Fb.prototype.scale=function(t){return t=this.getCategoryIndex(t),Math.round(zb(t,this._extent))},Fb.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:this.getCategoryIndex(n)}),n++;return t},Fb.prototype.getMinorTicks=function(t){},Fb.prototype.setCategorySortInfo=function(t){this._categorySortInfo=t},Fb.prototype.getCategorySortInfo=function(){return this._categorySortInfo},Fb.prototype.getCategoryIndex=function(t){return this._categorySortInfo.length?this._categorySortInfo[t].beforeSortIndex:t},Fb.prototype.getRawIndex=function(t){return this._categorySortInfo.length?this._categorySortInfo[t].ordinalNumber:t},Fb.prototype.getLabel=function(t){if(!this.isBlank()){t=this.getRawIndex(t.value),t=this._ordinalMeta.categories[t];return null==t?"":t+""}},Fb.prototype.count=function(){return this._extent[1]-this._extent[0]+1},Fb.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},Fb.prototype.isInExtentRange=function(t){return t=this.getCategoryIndex(t),this._extent[0]<=t&&this._extent[1]>=t},Fb.prototype.getOrdinalMeta=function(){return this._ordinalMeta},Fb.prototype.niceTicks=function(){},Fb.prototype.niceExtent=function(){},Fb.type="ordinal",Fb);function Fb(t){var e=Bb.call(this,t)||this;e.type="ordinal";t=e.getSetting("ordinalMeta");return F(t=t||new Db({}))&&(t=new Db({categories:P(t,function(t){return Y(t)?t.value:t})})),e._ordinalMeta=t,e._categorySortInfo=[],e._extent=e.getSetting("extent")||[0,t.categories.length-1],e}Tb.registerClass(Vb);var Gb,Hb=Eu,Wb=(l(Xb,Gb=Tb),Xb.prototype.parse=function(t){return t},Xb.prototype.contain=function(t){return Nb(t,this._extent)},Xb.prototype.normalize=function(t){return Eb(t,this._extent)},Xb.prototype.scale=function(t){return zb(t,this._extent)},Xb.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},Xb.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},Xb.prototype.getInterval=function(){return this._interval},Xb.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Ob(t)},Xb.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=this._niceExtent,o=this._intervalPrecision,r=[];if(!e)return r;n[0]<i[0]&&(t?r.push({value:Hb(i[0]-e,o)}):r.push({value:n[0]}));for(var a=i[0];a<=i[1]&&(r.push({value:a}),(a=Hb(a+e,o))!==r[r.length-1].value);)if(1e4<r.length)return[];var s=r.length?r[r.length-1].value:i[1];return n[1]>s&&(t?r.push({value:Hb(s+e,o)}):r.push({value:n[1]})),r},Xb.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),o=1;o<e.length;o++){for(var r=e[o],a=e[o-1],s=0,l=[],u=(r.value-a.value)/t;s<t-1;){var h=Hb(a.value+(s+1)*u);h>i[0]&&h<i[1]&&l.push(h),s++}n.push(l)}return n},Xb.prototype.getLabel=function(t,e){if(null==t)return"";e=e&&e.precision;return null==e?e=Vu(t.value)||0:"auto"===e&&(e=this._intervalPrecision),Id(Hb(t.value,e,!0))},Xb.prototype.niceTicks=function(t,e,n){t=t||5;var i=this._extent,o=i[1]-i[0];isFinite(o)&&(o<0&&i.reverse(),n=Pb(i,t,e,n),this._intervalPrecision=n.intervalPrecision,this._interval=n.interval,this._niceExtent=n.niceTickExtent)},Xb.prototype.niceExtent=function(t){var e=this._extent;e[0]===e[1]&&(0!==e[0]?(n=e[0],t.fixMax||(e[1]+=n/2),e[0]-=n/2):e[1]=1);var n=e[1]-e[0];isFinite(n)||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);n=this._interval;t.fixMin||(e[0]=Hb(Math.floor(e[0]/n)*n)),t.fixMax||(e[1]=Hb(Math.ceil(e[1]/n)*n))},Xb.type="interval",Xb);function Xb(){var t=null!==Gb&&Gb.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}Tb.registerClass(Wb);var Yb="__ec_stack_",Ub="undefined"!=typeof Float32Array?Float32Array:Array;function Zb(t){return t.get("stack")||Yb+t.seriesIndex}function jb(t){return t.dim+t.index}function qb(t,e){var n=[];return e.eachSeriesByType(t,function(t){tw(t)&&!ew(t)&&n.push(t)}),n}function Kb(t){var l=function(t){var l={};N(t,function(t){var e=t.coordinateSystem.getBaseAxis();if("time"===e.type||"value"===e.type)for(var n=t.getData(),i=e.dim+"_"+e.index,o=n.mapDimension(e.dim),r=0,a=n.count();r<a;++r){var s=n.get(o,r);l[i]?l[i].push(s):l[i]=[s]}});var e,n={};for(e in l)if(l.hasOwnProperty(e)){var i=l[e];if(i){i.sort(function(t,e){return t-e});for(var o=null,r=1;r<i.length;++r){var a=i[r]-i[r-1];0<a&&(o=null===o?a:Math.min(o,a))}n[e]=o}}return n}(t),u=[];return N(t,function(t){var e,n=t.coordinateSystem.getBaseAxis(),i=n.getExtent();e="category"===n.type?n.getBandWidth():"value"===n.type||"time"===n.type?(o=n.dim+"_"+n.index,r=l[o],a=Math.abs(i[1]-i[0]),e=n.scale.getExtent(),o=Math.abs(e[1]-e[0]),r?a/o*r:a):(s=t.getData(),Math.abs(i[1]-i[0])/s.count());var o=Nu(t.get("barWidth"),e),r=Nu(t.get("barMaxWidth"),e),a=Nu(t.get("barMinWidth")||1,e),i=t.get("barGap"),s=t.get("barCategoryGap");u.push({bandWidth:e,barWidth:o,barMaxWidth:r,barMinWidth:a,barGap:i,barCategoryGap:s,axisKey:jb(n),stackId:Zb(t)})}),$b(u)}function $b(t){var a={};N(t,function(t,e){var n=t.axisKey,i=t.bandWidth,o=a[n]||{bandWidth:i,remainedWidth:i,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},r=o.stacks;a[n]=o;i=t.stackId;r[i]||o.autoWidthCount++,r[i]=r[i]||{width:0,maxWidth:0};n=t.barWidth;n&&!r[i].width&&(r[i].width=n,n=Math.min(o.remainedWidth,n),o.remainedWidth-=n);n=t.barMaxWidth;n&&(r[i].maxWidth=n);n=t.barMinWidth;n&&(r[i].minWidth=n);n=t.barGap;null!=n&&(o.gap=n);t=t.barCategoryGap;null!=t&&(o.categoryGap=t)});var d={};return N(a,function(t,n){d[n]={};var e,i=t.stacks,o=t.bandWidth,r=t.categoryGap;null==r&&(e=z(i).length,r=Math.max(35-4*e,15)+"%");var r=Nu(r,o),a=Nu(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,u=(s-r)/(l+(l-1)*a),u=Math.max(u,0);N(i,function(t){var e,n=t.maxWidth,i=t.minWidth;t.width?(e=t.width,n&&(e=Math.min(e,n)),i&&(e=Math.max(e,i)),t.width=e,s-=e+a*e,l--):(e=u,n&&n<e&&(e=Math.min(n,s)),i&&e<i&&(e=i),e!==u&&(t.width=e,s-=e+a*e,l--))}),u=(s-r)/(l+(l-1)*a),u=Math.max(u,0);var h,c=0;N(i,function(t,e){t.width||(t.width=u),c+=(h=t).width*(1+a)}),h&&(c-=h.width*a);var p=-c/2;N(i,function(t,e){d[n][e]=d[n][e]||{bandWidth:o,offset:p,width:t.width},p+=t.width*(1+a)})}),d}function Jb(t,e,n){if(t&&e){e=t[jb(e)];return null!=e&&null!=n?e[Zb(n)]:e}}function Qb(t,e){var e=qb(t,e),T=Kb(e),C={};N(e,function(t){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),o=Zb(t),r=T[jb(i)][o],a=r.offset,s=r.width,l=n.getOtherAxis(i),u=t.get("barMinHeight")||0;C[o]=C[o]||[],e.setLayout({bandWidth:r.bandWidth,offset:a,size:s});for(var h=e.mapDimension(l.dim),c=e.mapDimension(i.dim),p=Sb(e,h),d=l.isHorizontal(),f=nw(0,l),g=0,y=e.count();g<y;g++){var m=e.get(h,g),v=e.get(c,g),x=0<=m?"p":"n",_=f;p&&(C[o][v]||(C[o][v]={p:f,n:f}),_=C[o][v][x]);var b,w=void 0,S=void 0,M=void 0,I=void 0;d?(w=_,S=(b=n.dataToPoint([m,v]))[1]+a,M=b[0]-f,I=s,Math.abs(M)<u&&(M=(M<0?-1:1)*u),isNaN(M)||p&&(C[o][v][x]+=M)):(w=(b=n.dataToPoint([v,m]))[0]+a,S=_,M=s,I=b[1]-f,Math.abs(I)<u&&(I=(I<=0?-1:1)*u),isNaN(I)||p&&(C[o][v][x]+=I)),e.setItemLayout(g,{x:w,y:S,width:M,height:I})}})}af={seriesType:"bar",plan:$y(),reset:function(t){if(tw(t)&&ew(t)){var e=t.getData(),c=t.coordinateSystem,p=c.master.getRect(),n=c.getBaseAxis(),d=c.getOtherAxis(n),f=e.mapDimension(d.dim),g=e.mapDimension(n.dim),y=d.isHorizontal(),m=y?0:1,v=Jb(Kb([t]),n,t).width;return.5<v||(v=.5),{progress:function(t,e){for(var n,i=t.count,o=new Ub(2*i),r=new Ub(2*i),a=new Ub(i),s=[],l=[],u=0,h=0;null!=(n=t.next());)l[m]=e.get(f,n),l[1-m]=e.get(g,n),s=c.dataToPoint(l,null,s),r[u]=y?p.x+p.width:s[0],o[u++]=s[0],r[u]=y?s[1]:p.y+p.height,o[u++]=s[1],a[h++]=n;e.setLayout({largePoints:o,largeDataIndices:a,largeBackgroundPoints:r,barWidth:v,valueAxisStart:nw(0,d),backgroundStart:y?p.x:p.y,valueAxisHorizontal:y})}}}}};function tw(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function ew(t){return t.pipelineContext&&t.pipelineContext.large}function nw(t,e){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}var iw,ow=(l(rw,iw=Wb),rw.prototype.getLabel=function(t){var e=this.getSetting("useUTC");return ud(t.value,od[function(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}(ld(this._minLevelUnit))]||od.second,e,this.getSetting("locale"))},rw.prototype.getFormattedLabel=function(t,e,n){var i=this.getSetting("useUTC");return function(t,e,n,i,o){var r=null;if("string"==typeof n)r=n;else if("function"==typeof n)r=n(t.value,e,{level:t.level});else{var a=O({},id);if(0<t.level)for(var s=0;s<rd.length;++s)a[rd[s]]="{primary|"+a[rd[s]]+"}";var l=n?!1===n.inherit?n:A(n,a):a,u=hd(t.value,o);if(l[u])r=l[u];else if(l.inherit){for(s=ad.indexOf(u)-1;0<=s;--s)if(l[u]){r=l[u];break}r=r||a.none}F(r)&&(n=null==t.level?0:0<=t.level?t.level:r.length+t.level,r=r[n=Math.min(n,r.length-1)])}return ud(new Date(t.value),r,o,i)}(t,e,n,this.getSetting("locale"),i)},rw.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=[];if(!e)return i;i.push({value:n[0],level:0});e=this.getSetting("useUTC"),e=function(t,d,f,g){var e=ad,n=0;function i(t,e,n){var i=[],o=!e.length;if(!function(t,e,n,i){function o(t){return cd(c,t,i)===cd(p,t,i)}function r(){return o("year")}function a(){return r()&&o("month")}function s(){return a()&&o("day")}function l(){return s()&&o("hour")}function u(){return l()&&o("minute")}function h(){return u()&&o("second")}var c=Uu(e),p=Uu(n);switch(t){case"year":return r();case"month":return a();case"day":return s();case"hour":return l();case"minute":return u();case"second":return h();case"millisecond":return h()&&o("millisecond")}}(ld(t),g[0],g[1],f)){o&&(e=[{value:function(t,e,n){t=new Date(t);switch(ld(e)){case"year":case"month":t[xd(n)](0);case"day":t[_d(n)](1);case"hour":t[bd(n)](0);case"minute":t[wd(n)](0);case"second":t[Sd(n)](0),t[Md(n)](0)}return t.getTime()}(new Date(g[0]),t,f)},{value:g[1]}]);for(var r,a,s=0;s<e.length-1;s++){var l=e[s].value,u=e[s+1].value;if(l!==u){var h=void 0,c=void 0,p=void 0;switch(t){case"year":h=Math.max(1,Math.round(d/ed/365)),c=pd(f),p=f?"setUTCFullYear":"setFullYear";break;case"half-year":case"quarter":case"month":a=d,h=6<(a/=30*ed)?6:3<a?3:2<a?2:1,c=dd(f),p=xd(f);break;case"week":case"half-week":case"day":r=d,h=16<(r/=ed)?16:7.5<r?7:3.5<r?4:1.5<r?2:1,c=fd(f),p=_d(f),0;break;case"half-day":case"quarter-day":case"hour":r=d,h=12<(r/=td)?12:6<r?6:3.5<r?4:2<r?2:1,c=gd(f),p=bd(f);break;case"minute":h=sw(d,!0),c=yd(f),p=wd(f);break;case"second":h=sw(d,!1),c=md(f),p=Sd(f);break;case"millisecond":h=qu(d,!0),c=vd(f),p=Md(f)}!function(t,e,n,i,o,r){for(var a=new Date(e),s=e,l=a[i]();s<n&&s<=g[1];)r.push({value:s}),l+=t,a[o](l),s=a.getTime();r.push({value:s,notAdd:!0})}(h,l,u,c,p,i),"year"===t&&1<n.length&&0===s&&n.unshift({value:n[0].value-h})}}for(s=0;s<i.length;s++)n.push(i[s]);return 1}}for(var o=[],r=[],a=0,s=0,l=0;l<e.length&&n++<1e4;++l){var u=ld(e[l]);if(function(t){return t===ld(t)}(e[l])){i(e[l],o[o.length-1]||[],r);var h=e[l+1]?ld(e[l+1]):null;if(u!==h){if(r.length){s=a,r.sort(function(t,e){return t.value-e.value});for(var c=[],p=0;p<r.length;++p){var y=r[p].value;0!==p&&r[p-1].value===y||(c.push(r[p]),y>=g[0]&&y<=g[1]&&a++)}h=(g[1]-g[0])/d;if(1.5*h<a&&h/1.5<s)break;if(o.push(c),h<a||t===e[l])break}r=[]}}}0;for(var m=R(P(o,function(t){return R(t,function(t){return t.value>=g[0]&&t.value<=g[1]&&!t.notAdd})}),function(t){return 0<t.length}),v=[],x=m.length-1,l=0;l<m.length;++l)for(var _=m[l],b=0;b<_.length;++b)v.push({value:_[b].value,level:x-l});v.sort(function(t,e){return t.value-e.value});for(var w=[],l=0;l<v.length;++l)0!==l&&v[l].value===v[l-1].value||w.push(v[l]);return w}(this._minLevelUnit,this._approxInterval,e,n);return(i=i.concat(e)).push({value:n[1],level:0}),i},rw.prototype.niceExtent=function(t){var e,n=this._extent;n[0]===n[1]&&(n[0]-=ed,n[1]+=ed),n[1]===-1/0&&n[0]===1/0&&(e=new Date,n[1]=+new Date(e.getFullYear(),e.getMonth(),e.getDate()),n[0]=n[1]-ed),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval)},rw.prototype.niceTicks=function(t,e,n){t=t||10;var i=this._extent,i=i[1]-i[0];this._approxInterval=i/t,null!=e&&this._approxInterval<e&&(this._approxInterval=e),null!=n&&this._approxInterval>n&&(this._approxInterval=n);n=aw.length,n=Math.min(function(t,e,n,i){for(;n<i;){var o=n+i>>>1;t[o][1]<e?n=1+o:i=o}return n}(aw,this._approxInterval,0,n),n-1);this._interval=aw[n][1],this._minLevelUnit=aw[Math.max(n-1,0)][0]},rw.prototype.parse=function(t){return"number"==typeof t?t:+Uu(t)},rw.prototype.contain=function(t){return Nb(this.parse(t),this._extent)},rw.prototype.normalize=function(t){return Eb(this.parse(t),this._extent)},rw.prototype.scale=function(t){return zb(t,this._extent)},rw.type="time",rw);function rw(t){t=iw.call(this,t)||this;return t.type="time",t}var aw=[["second",Jp],["minute",Qp],["hour",td],["quarter-day",6*td],["half-day",12*td],["day",1.2*ed],["half-week",3.5*ed],["week",7*ed],["month",31*ed],["quarter",95*ed],["half-year",nd/2],["year",nd]];function sw(t,e){return 30<(t/=e?Qp:Jp)?30:20<t?20:15<t?15:10<t?10:5<t?5:2<t?2:1}Tb.registerClass(ow);var lw,uw=Tb.prototype,hw=Wb.prototype,cw=Vu,pw=Eu,dw=Math.floor,fw=Math.ceil,gw=Math.pow,yw=Math.log,mw=(l(vw,lw=Tb),vw.prototype.getTicks=function(t){var e=this._originalScale,n=this._extent,i=e.getExtent();return P(hw.getTicks.call(this,t),function(t){var e=t.value,t=Eu(gw(this.base,e)),t=e===n[0]&&this._fixMin?xw(t,i[0]):t;return{value:t=e===n[1]&&this._fixMax?xw(t,i[1]):t}},this)},vw.prototype.setExtent=function(t,e){var n=this.base;t=yw(t)/yw(n),e=yw(e)/yw(n),hw.setExtent.call(this,t,e)},vw.prototype.getExtent=function(){var t=this.base,e=uw.getExtent.call(this);e[0]=gw(t,e[0]),e[1]=gw(t,e[1]);t=this._originalScale.getExtent();return this._fixMin&&(e[0]=xw(e[0],t[0])),this._fixMax&&(e[1]=xw(e[1],t[1])),e},vw.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=yw(t[0])/yw(e),t[1]=yw(t[1])/yw(e),uw.unionExtent.call(this,t)},vw.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},vw.prototype.niceTicks=function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(n==1/0||n<=0)){var i=Zu(n);for(t/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&0<Math.abs(i);)i*=10;e=[Eu(fw(e[0]/i)*i),Eu(dw(e[1]/i)*i)];this._interval=i,this._niceExtent=e}},vw.prototype.niceExtent=function(t){hw.niceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},vw.prototype.parse=function(t){return t},vw.prototype.contain=function(t){return Nb(t=yw(t)/yw(this.base),this._extent)},vw.prototype.normalize=function(t){return Eb(t=yw(t)/yw(this.base),this._extent)},vw.prototype.scale=function(t){return t=zb(t,this._extent),gw(this.base,t)},vw.type="log",vw);function vw(){var t=null!==lw&&lw.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new Wb,t._interval=0,t}vm=mw.prototype;function xw(t,e){return pw(t,cw(e))}vm.getMinorTicks=hw.getMinorTicks,vm.getLabel=hw.getLabel,Tb.registerClass(mw);var _w=(bw.prototype._prepareParams=function(t,e,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var i=this._isOrdinal="ordinal"===t.type;this._needCrossZero=e.getNeedCrossZero&&e.getNeedCrossZero();var o=this._modelMinRaw=e.get("min",!0);G(o)?this._modelMinNum=Iw(t,o({min:n[0],max:n[1]})):"dataMin"!==o&&(this._modelMinNum=Iw(t,o));o=this._modelMaxRaw=e.get("max",!0);G(o)?this._modelMaxNum=Iw(t,o({min:n[0],max:n[1]})):"dataMax"!==o&&(this._modelMaxNum=Iw(t,o)),i?this._axisDataLen=e.getCategories().length:"boolean"==typeof(e=F(e=e.get("boundaryGap"))?e:[e||0,e||0])[0]||"boolean"==typeof e[1]?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[ti(e[0],1),ti(e[1],1)]},bw.prototype.calculate=function(){var t=this._isOrdinal,e=this._dataMin,n=this._dataMax,i=this._axisDataLen,o=this._boundaryGapInner,r=t?null:n-e||Math.abs(e),a="dataMin"===this._modelMinRaw?e:this._modelMinNum,s="dataMax"===this._modelMaxRaw?n:this._modelMaxNum,l=null!=a,u=null!=s;null==a&&(a=t?i?0:NaN:e-o[0]*r),null==s&&(s=t?i?i-1:NaN:n+o[1]*r),null!=a&&isFinite(a)||(a=NaN),null!=s&&isFinite(s)||(s=NaN),s<a&&(s=a=NaN);r=J(a)||J(s)||t&&!i;this._needCrossZero&&(0<a&&0<s&&!l&&(a=0),a<0&&s<0&&!u&&(s=0));t=this._determinedMin,i=this._determinedMax;return null!=t&&(a=t,l=!0),null!=i&&(s=i,u=!0),{min:a,max:s,minFixed:l,maxFixed:u,isBlank:r}},bw.prototype.modifyDataMinMax=function(t,e){this[Sw[t]]=e},bw.prototype.setDeterminedMinMax=function(t,e){t=ww[t];this[t]=e},bw.prototype.freeze=function(){this.frozen=!0},bw);function bw(t,e,n){this._prepareParams(t,e,n)}var ww={min:"_determinedMin",max:"_determinedMax"},Sw={min:"_dataMin",max:"_dataMax"};function Mw(t,e,n){var i=t.rawExtentInfo;return i||(i=new _w(t,e,n),t.rawExtentInfo=i)}function Iw(t,e){return null==e?null:J(e)?NaN:t.parse(e)}function Tw(t,e){var n=t.type,i=Mw(t,e,t.getExtent()).calculate();t.setBlank(i.isBlank);var o,r=i.min,a=i.max,t=e.ecModel;return t&&"time"===n&&(t=qb("bar",t),o=!1,N(t,function(t){o=o||t.getBaseAxis()===e.axis}),o&&(t=Kb(t),r=(t=function(t,e,n,i){var o=n.axis.getExtent(),o=o[1]-o[0],i=Jb(i,n.axis);if(void 0===i)return{min:t,max:e};var r=1/0;N(i,function(t){r=Math.min(t.offset,r)});var a=-1/0;N(i,function(t){a=Math.max(t.offset+t.width,a)}),r=Math.abs(r),a=Math.abs(a);n=r+a,i=e-t,i=i/(1-(r+a)/o)-i;return{min:t-=r/n*i,max:e+=a/n*i}}(r,a,e,t)).min,a=t.max)),{extent:[r,a],fixMin:i.minFixed,fixMax:i.maxFixed}}function Cw(t,e){var n=Tw(t,e),i=n.extent,o=e.get("splitNumber");t instanceof mw&&(t.base=e.get("logBase"));var r=t.type;t.setExtent(i[0],i[1]),t.niceExtent({splitNumber:o,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:"interval"===r||"time"===r?e.get("minInterval"):null,maxInterval:"interval"===r||"time"===r?e.get("maxInterval"):null});e=e.get("interval");null!=e&&t.setInterval&&t.setInterval(e)}function Dw(t,e){if(e=e||t.get("type"))switch(e){case"category":return new Vb({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new ow({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(Tb.getClass(e)||Wb)}}function Aw(n){var i,e,o,t=n.getLabelModel().get("formatter"),r="category"===n.type?n.scale.getExtent()[0]:null;return"time"===n.scale.type?(o=t,function(t,e){return n.scale.getFormattedLabel(t,e,o)}):"string"==typeof t?(e=t,function(t){t=n.scale.getLabel(t);return e.replace("{value}",null!=t?t:"")}):"function"==typeof t?(i=t,function(t,e){return null!=r&&(e=t.value-r),i(Lw(n,t),e,null!=t.level?{level:t.level}:null)}):function(t){return n.scale.getLabel(t)}}function Lw(t,e){return"category"===t.type?t.scale.getLabel(e):e.value}function kw(t){var e=t.model,n=t.scale;if(e.get(["axisLabel","show"])&&!n.isBlank()){var i,o,r=n.getExtent(),a=n instanceof Vb?n.count():(i=n.getTicks()).length,s=t.getLabelModel(),l=Aw(t),u=1;40<a&&(u=Math.ceil(a/40));for(var h,c,p=0;p<a;p+=u){var d=l(i?i[p]:{value:r[0]+p},p),f=s.getTextRect(d),g=(h=f,c=s.get("rotate")||0,g=f=d=g=void 0,g=c*Math.PI/180,d=h.width,f=h.height,c=d*Math.abs(Math.cos(g))+Math.abs(f*Math.sin(g)),g=d*Math.abs(Math.sin(g))+Math.abs(f*Math.cos(g)),new Gn(h.x,h.y,c,g));o?o.union(g):o=g}return o}}function Pw(t){t=t.get("interval");return null==t?"auto":t}function Ow(t){return"category"===t.type&&0===Pw(t.getLabelModel())}function Rw(e,t){var n={};return N(e.mapDimensionsAll(t),function(t){n[Mb(e,t)]=!0}),z(n)}function Nw(e,n,t){n&&N(Rw(n,t),function(t){t=n.getApproximateExtent(t);t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])})}var Ew=(zw.prototype.getNeedCrossZero=function(){return!this.option.scale},zw.prototype.getCoordSysModel=function(){},zw);function zw(){}Op={isDimensionStacked:Sb,enableDataStack:wb,getStackedDimension:Mb};var Ea=Object.freeze({__proto__:null,createList:function(t){return Ib(t.getSource(),t)},getLayoutRect:Yd,dataStack:Op,createScale:function(t,e){var n=e;return e instanceof Fp||(n=new Fp(e)),(e=Dw(n)).setExtent(t[0],t[1]),Cw(e,n),e},mixinAxisModelCommonMethods:function(t){I(t,Ew)},getECData:Wh,createDimensions:vb,createSymbol:px}),Bw=1e-8;function Vw(t,e){return Math.abs(t-e)<Bw}function Fw(t,e,n){var i=0,o=t[0];if(!o)return!1;for(var r=1;r<t.length;r++){var a=t[r];i+=gr(o[0],o[1],a[0],a[1],e,n),o=a}var s=t[0];return Vw(o[0],s[0])&&Vw(o[1],s[1])||(i+=gr(o[0],o[1],s[0],s[1],e,n)),0!==i}var Gw=(Hw.prototype.getBoundingRect=function(){var t=this._rect;if(t)return t;for(var t=Number.MAX_VALUE,e=[t,t],n=[-t,-t],i=[],o=[],r=this.geometries,a=0;a<r.length;a++){"polygon"===r[a].type&&(Vo(r[a].exterior,i,o),Rt(e,e,i),Nt(n,n,o))}return 0===a&&(e[0]=e[1]=n[0]=n[1]=0),this._rect=new Gn(e[0],e[1],n[0]-e[0],n[1]-e[1])},Hw.prototype.contain=function(t){var e=this.getBoundingRect(),n=this.geometries;if(!e.contain(t[0],t[1]))return!1;t:for(var i=0,o=n.length;i<o;i++)if("polygon"===n[i].type){var r=n[i].exterior,a=n[i].interiors;if(Fw(r,t[0],t[1])){for(var s=0;s<(a?a.length:0);s++)if(Fw(a[s],t[0],t[1]))continue t;return!0}}return!1},Hw.prototype.transformTo=function(t,e,n,i){var o=this.getBoundingRect(),r=o.width/o.height;n?i=i||n/r:n=r*i;for(var i=new Gn(t,e,n,i),a=o.calculateTransform(i),s=this.geometries,l=0;l<s.length;l++)if("polygon"===s[l].type){for(var u=s[l].exterior,h=s[l].interiors,c=0;c<u.length;c++)Ot(u[c],u[c],a);for(var p=0;p<(h?h.length:0);p++)for(c=0;c<h[p].length;c++)Ot(h[p][c],h[p][c],a)}(o=this._rect).copy(i),this.center=[o.x+o.width/2,o.y+o.height/2]},Hw.prototype.cloneShallow=function(t){null==t&&(t=this.name);t=new Hw(t,this.geometries,this.center);return t._rect=this._rect,t.transformTo=null,t},Hw);function Hw(t,e,n){this.name=t,this.geometries=e,n=n?[n[0],n[1]]:[(e=this.getBoundingRect()).x+e.width/2,e.y+e.height/2],this.center=n}function Ww(t,e,n){for(var i=[],o=e[0],r=e[1],a=0;a<t.length;a+=2){var s=(s=t.charCodeAt(a)-64)>>1^-(1&s),l=(l=t.charCodeAt(a+1)-64)>>1^-(1&l),o=s+=o,r=l+=r;i.push([s/n,l/n])}return i}function Xw(t,o){return P(R((t=function(t){if(!t.UTF8Encoding)return t;var e=(t=t).UTF8Scale;null==e&&(e=1024);for(var n=t.features,i=0;i<n.length;i++){var o=n[i].geometry;if("Polygon"===o.type)for(var r=o.coordinates,a=0;a<r.length;a++)r[a]=Ww(r[a],o.encodeOffsets[a],e);else if("MultiPolygon"===o.type)for(r=o.coordinates,a=0;a<r.length;a++)for(var s=r[a],l=0;l<s.length;l++)s[l]=Ww(s[l],o.encodeOffsets[a][l],e)}return t.UTF8Encoding=!1,t}(t)).features,function(t){return t.geometry&&t.properties&&0<t.geometry.coordinates.length}),function(t){var e=t.properties,t=t.geometry,n=[];"Polygon"===t.type&&(i=t.coordinates,n.push({type:"polygon",exterior:i[0],interiors:i.slice(1)})),"MultiPolygon"===t.type&&N(i=t.coordinates,function(t){t[0]&&n.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var i=new Gw(e[o||"name"],n,e.cp);return i.properties=e,i})}var Yw=_h();function Uw(t){return"category"===t.type?(o=(e=t).getLabelModel(),r=jw(e,o),!o.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:r.labelCategoryInterval}:r):(t=(n=t).scale.getTicks(),i=Aw(n),{labels:P(t,function(t,e){return{formattedLabel:i(t,e),rawLabel:n.scale.getLabel(t),tickValue:t.value}})});var n,i,e,o,r}function Zw(t,e){return"category"===t.type?function(t,e){var n,i,o=qw(t,"ticks"),r=Pw(e),a=Kw(o,r);if(a)return a;e.get("show")&&!t.scale.isBlank()||(n=[]);{n=G(r)?Qw(t,r,!0):"auto"===r?(e=jw(t,t.getLabelModel()),i=e.labelCategoryInterval,P(e.labels,function(t){return t.tickValue})):Jw(t,i=r,!0)}return $w(o,r,{ticks:n,tickCategoryInterval:i})}(t,e):{ticks:P(t.scale.getTicks(),function(t){return t.value})}}function jw(t,e){var n,i=qw(t,"labels"),o=Pw(e),e=Kw(i,o);return e||$w(i,o,{labels:G(o)?Qw(t,o):Jw(t,n="auto"===o?null!=(t=Yw(n=t).autoInterval)?t:Yw(n).autoInterval=n.calculateCategoryInterval():o),labelCategoryInterval:n})}function qw(t,e){return Yw(t)[e]||(Yw(t)[e]=[])}function Kw(t,e){for(var n=0;n<t.length;n++)if(t[n].key===e)return t[n].value}function $w(t,e,n){return t.push({key:e,value:n}),n}function Jw(t,e,n){var i=Aw(t),o=t.scale,r=o.getExtent(),a=t.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=r[0],e=o.count();0!==u&&1<l&&2<e/l&&(u=Math.round(Math.ceil(u/l)*l));e=Ow(t),t=a.get("showMinLabel")||e,e=a.get("showMaxLabel")||e;t&&u!==r[0]&&c(r[0]);for(var h=u;h<=r[1];h+=l)c(h);function c(t){var e={value:t};s.push(n?t:{formattedLabel:i(e),rawLabel:o.getLabel(e),tickValue:t})}return e&&h-l!==r[1]&&c(r[1]),s}function Qw(t,i,o){var r=t.scale,a=Aw(t),s=[];return N(r.getTicks(),function(t){var e=r.getLabel(t),n=t.value;i(t.value,e)&&s.push(o?n:{formattedLabel:a(t),rawLabel:e,tickValue:n})}),s}var tS=[0,1],mu=(eS.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),e=Math.max(e[0],e[1]);return n<=t&&t<=e},eS.prototype.containData=function(t){return this.scale.contain(t)},eS.prototype.getExtent=function(){return this._extent.slice()},eS.prototype.getPixelPrecision=function(t){return Fu(t||this.scale.getExtent(),this._extent)},eS.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},eS.prototype.dataToCoord=function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&nS(n=n.slice(),i.count()),Ru(t,tS,n,e)},eS.prototype.coordToData=function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&nS(n=n.slice(),i.count());e=Ru(t,n,tS,e);return this.scale.scale(e)},eS.prototype.pointToData=function(t,e){},eS.prototype.getTicksCoords=function(t){var e=(t=t||{}).tickModel||this.getTickModel(),n=P(Zw(this,e).ticks,function(t){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawIndex(t):t),tickValue:t}},this);return function(t,e,n,i){var o=e.length;if(!t.onBand||n||!o)return;var r,a=t.getExtent();{var s;1===o?(e[0].coord=a[0],r=e[1]={coord:a[0]}):(n=e[o-1].tickValue-e[0].tickValue,s=(e[o-1].coord-e[0].coord)/n,N(e,function(t){t.coord-=s/2}),t=t.scale.getExtent(),t=1+t[1]-e[o-1].tickValue,r={coord:e[o-1].coord+s*t},e.push(r))}var l=a[0]>a[1];u(e[0].coord,a[0])&&(i?e[0].coord=a[0]:e.shift());i&&u(a[0],e[0].coord)&&e.unshift({coord:a[0]});u(a[1],r.coord)&&(i?r.coord=a[1]:e.pop());i&&u(r.coord,a[1])&&e.push({coord:a[1]});function u(t,e){return t=Eu(t),e=Eu(e),l?e<t:t<e}}(this,n,e.get("alignWithLabel"),t.clamp),n},eS.prototype.getMinorTicksCoords=function(){if("ordinal"===this.scale.type)return[];var t=this.model.getModel("minorTick").get("splitNumber");return 0<t&&t<100||(t=5),P(this.scale.getMinorTicks(t),function(t){return P(t,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this)},this)},eS.prototype.getViewLabels=function(){return Uw(this).labels},eS.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},eS.prototype.getTickModel=function(){return this.model.getModel("axisTick")},eS.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),e=e[1]-e[0]+(this.onBand?1:0);0===e&&(e=1);t=Math.abs(t[1]-t[0]);return Math.abs(t)/e},eS.prototype.calculateCategoryInterval=function(){return function(t){var e=(u=(l=t).getLabelModel(),{axisRotate:l.getRotate?l.getRotate():l.isHorizontal&&!l.isHorizontal()?90:0,labelRotate:u.get("rotate")||0,font:u.getFont()}),n=Aw(t),i=(e.axisRotate-e.labelRotate)/180*Math.PI,o=(h=t.scale).getExtent(),r=h.count();if(o[1]-o[0]<1)return 0;var a=1;40<r&&(a=Math.max(1,Math.floor(r/40)));for(var s=o[0],l=t.dataToCoord(s+1)-t.dataToCoord(s),u=Math.abs(l*Math.cos(i)),h=Math.abs(l*Math.sin(i)),c=0,p=0;s<=o[1];s+=a)var d=Kn(n({value:s}),e.font,"center","top"),f=1.3*d.width,d=1.3*d.height,c=Math.max(c,f,7),p=Math.max(p,d,7);return l=c/u,i=p/h,isNaN(l)&&(l=1/0),isNaN(i)&&(i=1/0),u=Math.max(0,Math.floor(Math.min(l,i))),h=Yw(t.model),l=t.getExtent(),i=h.lastAutoInterval,t=h.lastTickCount,null!=i&&null!=t&&Math.abs(i-u)<=1&&Math.abs(t-r)<=1&&u<i&&h.axisExtent0===l[0]&&h.axisExtent1===l[1]?u=i:(h.lastTickCount=r,h.lastAutoInterval=u,h.axisExtent0=l[0],h.axisExtent1=l[1]),u}(this)},eS);function eS(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}function nS(t,e){e=(t[1]-t[0])/e/2;t[0]+=e,t[1]-=e}var kp=Xw,iS={};N(["linearMap","round","asc","getPrecision","getPrecisionSafe","getPixelPrecision","getPercentWithPrecision","MAX_SAFE_INTEGER","remRadian","isRadianAroundZero","parseDate","quantity","quantityExponent","nice","quantile","reformIntervals","isNumeric","numericToNumber"],function(t){iS[t]=ih[t]});var oS={};N(["addCommas","toCamelCase","normalizeCssArray","encodeHTML","formatTpl","getTooltipMarker","formatTime","capitalFirst","truncateText","getTextRect"],function(t){oS[t]=Vd[t]});var sf={parse:Uu,format:ud},rS={};N(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){rS[t]=yt[t]});var aS={};N(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","registerShape","getShapeClass","Group","Image","Text","Circle","Ellipse","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],function(t){aS[t]=dp[t]});var sS={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},lS=(uS.prototype.evaluate=function(t){var e=typeof t;return"string"==e?this._condVal.test(t):"number"==e&&this._condVal.test(t+"")},uS);function uS(t){null==(this._condVal=H(t)?new RegExp(t):$(t)?t:null)&&rh("")}var hS=(cS.prototype.evaluate=function(){return this.value},cS);function cS(){}var pS=(dS.prototype.evaluate=function(){for(var t=this.children,e=0;e<t.length;e++)if(!t[e].evaluate())return!1;return!0},dS);function dS(){}var fS=(gS.prototype.evaluate=function(){for(var t=this.children,e=0;e<t.length;e++)if(t[e].evaluate())return!0;return!1},gS);function gS(){}var yS=(mS.prototype.evaluate=function(){return!this.child.evaluate()},mS);function mS(){}var vS=(xS.prototype.evaluate=function(){for(var t=!!this.valueParser,e=(0,this.getValue)(this.valueGetterParam),n=t?this.valueParser(e):null,i=0;i<this.subCondList.length;i++)if(!this.subCondList[i].evaluate(t?n:e))return!1;return!0},xS);function xS(){}function _S(t,e){if(!0===t||!1===t){var n=new hS;return n.value=t,n}n="";return wS(t)||rh(n),t.and?bS("and",t,e):t.or?bS("or",t,e):(t.not?function(t,e){var n=t.not,i="";0;wS(n)||rh(i);t=new yS;t.child=_S(n,e),t.child||rh(i);return t}:function(t,e){for(var n="",i=e.prepareGetValue(t),o=[],r=z(t),a=t.parser,s=a?Jg(a):null,l=0;l<r.length;l++){var u,h=r[l];"parser"===h||e.valueGetterAttrMap.get(h)||(u=ft(sS,h)?sS[h]:h,h=t[h],h=s?s(h):h,(h=function(t,e){return"eq"===t||"ne"===t?new oy("eq"===t,e):ft(Qg,t)?new ty(t,e):null}(u,h)||"reg"===u&&new lS(h))||rh(n),o.push(h))}o.length||rh(n);a=new vS;return a.valueGetterParam=i,a.valueParser=s,a.getValue=e.getValue,a.subCondList=o,a})(t,e)}function bS(t,e,n){var i=e[t],e="";F(i)||rh(e),i.length||rh(e);t=new("and"===t?pS:fS);return t.children=P(i,function(t){return _S(t,n)}),t.children.length||rh(e),t}function wS(t){return Y(t)&&!k(t)}var SS=(MS.prototype.evaluate=function(){return this._cond.evaluate()},MS);function MS(t,e){this._cond=_S(t,e)}nd={type:"echarts:sort",transform:function(t){var a=t.upstream,t=t.config,r="",t=lh(t);t.length||rh(r);var s=[];N(t,function(t){var e=t.dimension,n=t.order,i=t.parser,o=t.incomparable;null==e&&rh(r),"asc"!==n&&"desc"!==n&&rh(r),o&&"min"!==o&&"max"!==o&&rh(""),"asc"!==n&&"desc"!==n&&rh("");t=a.getDimensionInfo(e);t||rh(r);e=i?Jg(i):null;i&&!e&&rh(r),s.push({dimIdx:t.index,parser:e,comparator:new ny(n,o)})});t=a.sourceFormat;t!==cf&&t!==pf&&rh(r);for(var e=[],n=0,i=a.count();n<i;n++)e.push(a.getRawDataItem(n));return e.sort(function(t,e){for(var n=0;n<s.length;n++){var i=s[n],o=a.retrieveValueFromItem(t,i.dimIdx),r=a.retrieveValueFromItem(e,i.dimIdx);i.parser&&(o=i.parser(o),r=i.parser(r));r=i.comparator.evaluate(o,r);if(0!==r)return r}return 0}),{data:e}}};n({type:"echarts:filter",transform:function(t){for(var e,n,i=t.upstream,o=(n=t.config,t={valueGetterAttrMap:ct({dimension:!0}),prepareGetValue:function(t){var e="",n=t.dimension;ft(t,"dimension")||rh(e);n=i.getDimensionInfo(n);return n||rh(e),{dimIdx:n.index}},getValue:function(t){return i.retrieveValueFromItem(e,t.dimIdx)}},new SS(n,t)),r=[],a=0,s=i.count();a<s;a++)e=i.getRawDataItem(a),o.evaluate()&&r.push(e);return{data:r}}}),n(nd);var IS,vm=(l(TS,IS=Fy),TS.prototype.getInitialData=function(t){return Ib(this.getSource(),this,{useEncodeDefaulter:!0})},TS.type="series.line",TS.dependencies=["grid","polar"],TS.defaultOption={zlevel:0,z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0,lineStyle:{width:"bolder"}},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0},TS);function TS(){var t=null!==IS&&IS.apply(this,arguments)||this;return t.type=TS.type,t.hasSymbolVisual=!0,t.legendSymbol="line",t}function CS(t,e){var n=t.mapDimensionsAll("defaultedLabel"),i=n.length;if(1===i)return Rg(t,e,n[0]);if(i){for(var o=[],r=0;r<n.length;r++)o.push(Rg(t,e,n[r]));return o.join(" ")}}function DS(t,e){var n=t.mapDimensionsAll("defaultedLabel");if(!F(e))return e+"";for(var i=[],o=0;o<n.length;o++){var r=t.getDimensionInfo(n[o]);r&&i.push(e[r.index])}return i.join(" ")}Fy.registerClass(vm);var AS,LS=(l(kS,AS=$r),kS.prototype._createSymbol=function(t,e,n,i,o){this.removeAll();o=px(t,-1,-1,2,2,null,o);o.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),o.drift=PS,this._symbolType=t,this.add(o)},kS.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},kS.prototype.getSymbolPath=function(){return this.childAt(0)},kS.prototype.highlight=function(){bc(this.childAt(0))},kS.prototype.downplay=function(){wc(this.childAt(0))},kS.prototype.setZ=function(t,e){var n=this.childAt(0);n.zlevel=t,n.z=e},kS.prototype.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":e.cursor},kS.prototype.updateData=function(t,e,n,i){this.silent=!1;var o,r,a,s=t.getItemVisual(e,"symbol")||"circle",l=t.hostModel,u=kS.getSymbolSize(t,e),h=s!==this._symbolType,c=i&&i.disableAnimation;h?(o=t.getItemVisual(e,"symbolKeepAspect"),this._createSymbol(s,t,e,u,o)):((r=this.childAt(0)).silent=!1,a={scaleX:u[0]/2,scaleY:u[1]/2},c?r.attr(a):Jc(r,a,l,e)),this._updateCommon(t,e,u,n,i),h&&(r=this.childAt(0),c||(a={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:r.style.opacity}},r.scaleX=r.scaleY=0,r.style.opacity=0,Qc(r,a,l,e))),c&&this.childAt(0).stopAnimation("remove"),this._seriesModel=l},kS.prototype._updateCommon=function(e,t,n,i,o){var r,a,s,l,u,h,c=this.childAt(0),p=e.hostModel;i&&(r=i.emphasisItemStyle,s=i.blurItemStyle,a=i.selectItemStyle,l=i.focus,u=i.blurScope,f=i.symbolOffset,h=i.labelStatesModels,v=i.hoverScale,g=i.cursorStyle),i&&!e.hasItemOption||(r=(i=(d=i&&i.itemModel?i.itemModel:e.getItemModel(t)).getModel("emphasis")).getModel("itemStyle").getItemStyle(),a=d.getModel(["select","itemStyle"]).getItemStyle(),s=d.getModel(["blur","itemStyle"]).getItemStyle(),l=i.get("focus"),u=i.get("blurScope"),f=d.getShallow("symbolOffset"),h=vp(d),v=i.getShallow("scale"),g=d.getShallow("cursor"));var d=e.getItemVisual(t,"symbolRotate");c.attr("rotation",(d||0)*Math.PI/180||0),f&&(c.x=Nu(f[0],n[0]),c.y=Nu(f[1],n[1])),g&&c.attr("cursor",g);var d=e.getItemVisual(t,"style"),f=d.fill;c instanceof na?(y=c.style,c.useStyle(O({image:y.image,x:y.x,y:y.y,width:y.width,height:y.height},d))):(c.__isEmptyBrush?c.useStyle(O({},d)):c.useStyle(d),c.style.decal=null,c.setColor(f,o&&o.symbolInnerColor),c.style.strokeNoScale=!0);var g=e.getItemVisual(t,"liftZ"),y=this._z2;null!=g?null==y&&(this._z2=c.z2,c.z2+=g):null!=y&&(c.z2=y,this._z2=null);var m=o&&o.useNameLabel;mp(c,h,{labelFetcher:p,labelDataIndex:t,defaultText:function(t){return m?e.getName(t):CS(e,t)},inheritColor:f,defaultOpacity:d.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var v,n=c.ensureState("emphasis");n.style=r,c.ensureState("select").style=a,c.ensureState("blur").style=s,v&&(v=Math.max(1.1,3/this._sizeY),n.scaleX=this._sizeX*v,n.scaleY=this._sizeY*v),this.setSymbolScale(1),Lc(this,l,u)},kS.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},kS.prototype.fadeOut=function(t,e){var n=this.childAt(0),i=this._seriesModel,o=Wh(this).dataIndex,r=e&&e.animation;this.silent=n.silent=!0,e&&e.fadeLabel?(e=n.getTextContent())&&tp(e,{style:{opacity:0}},i,{dataIndex:o,removeOpt:r,cb:function(){n.removeTextContent()}}):n.removeTextContent(),tp(n,{style:{opacity:0},scaleX:0,scaleY:0},i,{dataIndex:o,cb:t,removeOpt:r})},kS.getSymbolSize=function(t,e){e=t.getItemVisual(e,"symbolSize");return e instanceof Array?e.slice():[+e,+e]},kS);function kS(t,e,n,i){var o=AS.call(this)||this;return o.updateData(t,e,n,i),o}function PS(t,e){this.parent.drift(t,e)}function OS(t,e,n,i){return e&&!isNaN(e[0])&&!isNaN(e[1])&&(!i.isIgnore||!i.isIgnore(n))&&(!i.clipShape||i.clipShape.contain(e[0],e[1]))&&"none"!==t.getItemVisual(n,"symbol")}function RS(t){return null==t||Y(t)||(t={isIgnore:t}),t||{}}function NS(t){var e=t.hostModel,t=e.getModel("emphasis");return{emphasisItemStyle:t.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:t.get("focus"),blurScope:t.get("blurScope"),symbolRotate:e.get("symbolRotate"),symbolOffset:e.get("symbolOffset"),hoverScale:t.get("scale"),labelStatesModels:vp(e),cursorStyle:e.get("cursor")}}var ES=(zS.prototype.updateData=function(o,r){r=RS(r);var a=this.group,s=o.hostModel,l=this._data,u=this._SymbolCtor,h=r.disableAnimation,c=NS(o),p={disableAnimation:h},d=r.getSymbolPoint||function(t){return o.getItemLayout(t)};l||a.removeAll(),o.diff(l).add(function(t){var e,n=d(t);OS(o,n,t,r)&&((e=new u(o,t,c,p)).setPosition(n),o.setItemGraphicEl(t,e),a.add(e))}).update(function(t,e){var n=l.getItemGraphicEl(e),i=d(t);OS(o,i,t,r)?(n?(n.updateData(o,t,c,p),e={x:i[0],y:i[1]},h?n.attr(e):Jc(n,e,s)):(n=new u(o,t)).setPosition(i),a.add(n),o.setItemGraphicEl(t,n)):a.remove(n)}).remove(function(t){var e=l.getItemGraphicEl(t);e&&e.fadeOut(function(){a.remove(e)})}).execute(),this._getSymbolPoint=d,this._data=o},zS.prototype.isPersistent=function(){return!0},zS.prototype.updateLayout=function(){var n=this,t=this._data;t&&t.eachItemGraphicEl(function(t,e){e=n._getSymbolPoint(e);t.setPosition(e),t.markRedraw()})},zS.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=NS(t),this._data=null,this.group.removeAll()},zS.prototype.incrementalUpdate=function(t,e,n){function i(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}n=RS(n);for(var o=t.start;o<t.end;o++){var r,a=e.getItemLayout(o);OS(e,a,o,n)&&((r=new this._SymbolCtor(e,o,this._seriesScope)).traverse(i),r.setPosition(a),this.group.add(r),e.setItemGraphicEl(o,r))}},zS.prototype.remove=function(t){var e=this.group,n=this._data;n&&t?n.eachItemGraphicEl(function(t){t.fadeOut(function(){e.remove(t)})}):e.removeAll()},zS);function zS(t){this.group=new $r,this._SymbolCtor=t||LS}function BS(t,e,n){var i=t.getBaseAxis(),o=t.getOtherAxis(i),r=function(t,e){var n=0,t=t.scale.getExtent();"start"===e?n=t[0]:"end"===e?n=t[1]:0<t[0]?n=t[0]:t[1]<0&&(n=t[1]);return n}(o,n),a=i.dim,s=o.dim,l=e.mapDimension(s),u=e.mapDimension(a),n="x"===s||"radius"===s?1:0,i=P(t.dimensions,function(t){return e.mapDimension(t)}),o=!1,t=e.getCalculationInfo("stackResultDimension");return Sb(e,i[0])&&(o=!0,i[0]=t),Sb(e,i[1])&&(o=!0,i[1]=t),{dataDimsForPoint:i,valueStart:r,valueAxisDim:s,baseAxisDim:a,stacked:!!o,valueDim:l,baseDim:u,baseDataOffset:n,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function VS(t,e,n,i){var o=NaN;t.stacked&&(o=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(o)&&(o=t.valueStart);var r=t.baseDataOffset,a=[];return a[r]=n.get(t.baseDim,i),a[1-r]=o,e.dataToPoint(a)}var FS="undefined"!=typeof Float32Array,GS=FS?Float32Array:Array;function HS(t){return F(t)?FS?new Float32Array(t):t:new GS(t)}var WS=Math.min,XS=Math.max;function YS(t,e){return isNaN(t)||isNaN(e)}function US(t,e,n,i,o,r,a,s,l){for(var u,h,c,p,d,f,g=n,y=0;y<i;y++){var m=e[2*g],v=e[2*g+1];if(o<=g||g<0)break;if(YS(m,v)){if(l){g+=r;continue}break}if(g===n)t[0<r?"moveTo":"lineTo"](m,v),c=m,p=v;else{var x=m-u,_=v-h;if(x*x+_*_<.5){g+=r;continue}if(0<a){var b=g+r,w=e[2*b],S=e[2*b+1],M=y+1;if(l)for(;YS(w,S)&&M<i;)M++,w=e[2*(b+=r)],S=e[2*b+1];var I,T,C,D,A,L,k,P=void 0,O=void 0;i<=M||YS(w,S)?(d=m,f=v):(T=w-u,C=S-h,D=m-u,A=w-m,L=v-h,k=S-v,_=x=void 0,O="x"===s?(x=Math.abs(D),_=Math.abs(A),d=m-x*a,P=m+x*a,f=v):"y"===s?(x=Math.abs(L),_=Math.abs(k),f=v-x*a,P=d=m,v+x*a):(x=Math.sqrt(D*D+L*L),d=m-T*a*(1-(I=(_=Math.sqrt(A*A+k*k))/(_+x))),f=v-C*a*(1-I),O=v+C*a*I,P=WS(P=m+T*a*I,XS(w,m)),O=WS(O,XS(S,v)),P=XS(P,WS(w,m)),f=v-((O=XS(O,WS(S,v)))-v)*x/_,d=WS(d=m-(P-m)*x/_,XS(u,m)),f=WS(f,XS(h,v)),P=m+(m-(d=XS(d,WS(u,m))))*_/x,v+(v-(f=XS(f,WS(h,v))))*_/x)),t.bezierCurveTo(c,p,d,f,m,v),c=P,p=O}else t.lineTo(m,v)}u=m,h=v,g+=r}return y}var ZS,jS=function(){this.smooth=0,this.smoothConstraint=!0},qS=(l(KS,ZS=Dr),KS.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},KS.prototype.getDefaultShape=function(){return new jS},KS.prototype.buildPath=function(t,e){var n=e.points,i=0,o=n.length/2;if(e.connectNulls){for(;0<o&&YS(n[2*o-2],n[2*o-1]);o--);for(;i<o&&YS(n[2*i],n[2*i+1]);i++);}for(;i<o;)i+=US(t,n,i,o,o,1,e.smooth,e.smoothMonotone,e.connectNulls)+1},KS.prototype.getPointOn=function(t,e){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n,i,o=this.path.data,r=lr.CMD,a="x"===e,s=[],l=0;l<o.length;){var u,h,c,p,d,f=void 0,g=void 0;switch(o[l++]){case r.M:n=o[l++],i=o[l++];break;case r.L:if(f=o[l++],g=o[l++],(d=a?(t-n)/(f-n):(t-i)/(g-i))<=1&&0<=d){var y=a?(g-i)*d+i:(f-n)*d+n;return a?[t,y]:[y,t]}n=f,i=g;break;case r.C:f=o[l++],g=o[l++],u=o[l++],h=o[l++],c=o[l++],p=o[l++];var m=a?wo(n,f,u,c,t,s):wo(i,g,h,p,t,s);if(0<m)for(var v=0;v<m;v++){var x=s[v];if(x<=1&&0<=x){y=a?_o(i,g,h,p,x):_o(n,f,u,c,x);return a?[t,y]:[y,t]}}n=c,i=p}}},KS);function KS(t){t=ZS.call(this,t)||this;return t.type="ec-polyline",t}var $S,JS=(l(QS,$S=jS),QS);function QS(){return null!==$S&&$S.apply(this,arguments)||this}var tM,eM=(l(nM,tM=Dr),nM.prototype.getDefaultShape=function(){return new JS},nM.prototype.buildPath=function(t,e){var n=e.points,i=e.stackedOnPoints,o=0,r=n.length/2,a=e.smoothMonotone;if(e.connectNulls){for(;0<r&&YS(n[2*r-2],n[2*r-1]);r--);for(;o<r&&YS(n[2*o],n[2*o+1]);o++);}for(;o<r;){var s=US(t,n,o,r,r,1,e.smooth,a,e.connectNulls);US(t,i,o+s-1,s,r,-1,e.stackedOnSmooth,a,e.connectNulls),o+=s+1,t.closePath()}},nM);function nM(t){t=tM.call(this,t)||this;return t.type="ec-polygon",t}function iM(t,e,n,i,o){var r=t.getArea(),a=r.x,s=r.y,l=r.width,u=r.height,r=n.get(["lineStyle","width"])||2;a-=r/2,s-=r/2,l+=r,u+=r,a=Math.floor(a),l=Math.round(l);var h=new ga({shape:{x:a,y:s,width:l,height:u}});return e&&(t=(e=t.getBaseAxis()).isHorizontal(),e=e.inverse,t?(e&&(h.shape.x+=l),h.shape.width=0):(e||(h.shape.y+=u),h.shape.height=0),Qc(h,{shape:{width:l,height:u,x:a,y:s}},n,null,i,"function"==typeof o?function(t){o(t,h)}:null)),h}function oM(t,e,n){var i=t.getArea(),o=Eu(i.r0,1),r=Eu(i.r,1),a=new bs({shape:{cx:Eu(t.cx,1),cy:Eu(t.cy,1),r0:o,r:r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}});return e&&("angle"===t.getBaseAxis().dim?a.shape.endAngle=i.startAngle:a.shape.r=o,Qc(a,{shape:{endAngle:i.endAngle,r:r}},n)),a}function rM(t,e,n,i,o){return t?"polar"===t.type?oM(t,e,n):"cartesian2d"===t.type?iM(t,e,n,i,o):null:null}function aM(t,e){return t.type===e}function sM(t,e){if(t.length===e.length){for(var n=0;n<t.length;n++)if(t[n]!==e[n])return;return 1}}function lM(t){for(var e=1/0,n=1/0,i=-1/0,o=-1/0,r=0;r<t.length;){var a=t[r++],s=t[r++];isNaN(a)||(e=Math.min(a,e),i=Math.max(a,i)),isNaN(s)||(n=Math.min(s,n),o=Math.max(s,o))}return[[e,n],[i,o]]}function uM(t,e){var n=lM(t),i=n[0],t=n[1],n=lM(e),e=n[0],n=n[1];return Math.max(Math.abs(i[0]-e[0]),Math.abs(i[1]-e[1]),Math.abs(t[0]-n[0]),Math.abs(t[1]-n[1]))}function hM(t){return"number"==typeof t?t:t?.5:0}function cM(t,e,n){for(var e=e.getBaseAxis(),i="x"===e.dim||"radius"===e.dim?0:1,o=[],r=0,a=[],s=[],l=[];r<t.length-2;r+=2)switch(l[0]=t[r+2],l[1]=t[r+3],s[0]=t[r],s[1]=t[r+1],o.push(s[0],s[1]),n){case"end":a[i]=l[i],a[1-i]=s[1-i],o.push(a[0],a[1]);break;case"middle":var u=(s[i]+l[i])/2,h=[];a[i]=h[i]=u,a[1-i]=s[1-i],h[1-i]=l[1-i],o.push(a[0],a[1]),o.push(h[0],h[1]);break;default:a[i]=s[i],a[1-i]=l[1-i],o.push(a[0],a[1])}return o.push(t[r++],t[r++]),o}function pM(t,e,n){var i=t.get("showAllSymbol"),t="auto"===i;if(!i||t){n=n.getAxesByScale("ordinal")[0];if(n&&(!t||!function(t,e){var n=t.getExtent(),i=Math.abs(n[1]-n[0])/t.scale.count();isNaN(i)&&(i=0);for(var o=e.count(),r=Math.max(1,Math.round(o/5)),a=0;a<o;a+=r)if(1.5*LS.getSymbolSize(e,a)[t.isHorizontal()?1:0]>i)return!1;return!0}(n,e))){var o=e.mapDimension(n.dim),r={};return N(n.getViewLabels(),function(t){r[t.tickValue]=1}),function(t){return!r.hasOwnProperty(e.get(o,t))}}}}function dM(t){for(var e,n,i=t.length/2;0<i&&(e=t[2*i-2],n=t[2*i-1],isNaN(e)||isNaN(n));i--);return i-1}function fM(t,e){return[t[2*e],t[2*e+1]]}function gM(n,i,e,t){if(aM(i,"cartesian2d")){var o,r=t.getModel("endLabel"),a=r.get("show"),s=r.get("valueAnimation"),l=t.getData(),u={lastFrameIndex:0},h=a?function(t,e){n._endLabelOnDuring(t,e,l,u,s,r,i)}:null,c=i.getBaseAxis().isHorizontal(),p=iM(i,e,t,function(){var t=n._endLabel;t&&e&&null!=u.originalX&&t.attr({x:u.originalX,y:u.originalY})},h);return t.get("clip",!0)||(o=p.shape,a=Math.max(o.width,o.height),c?(o.y-=a,o.height+=2*a):(o.x-=a,o.width+=2*a)),h&&h(1,p),p}return oM(i,e,t)}var yM,Op=(l(mM,yM=tm),mM.prototype.init=function(){var t=new $r,e=new ES;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},mM.prototype.render=function(t,e,n){var i=this,o=t.coordinateSystem,r=this.group,a=t.getData(),s=t.getModel("lineStyle"),l=t.getModel("areaStyle"),u=a.getLayout("points")||[],h="polar"===o.type,c=this._coordSys,p=this._symbolDraw,d=this._polyline,f=this._polygon,g=this._lineGroup,y=t.get("animation"),m=!l.isEmpty(),v=l.get("origin"),x=BS(o,a,v),_=m&&function(t,e,n){if(!n.valueDim)return[];for(var i=e.count(),o=HS(2*i),r=0;r<i;r++){var a=VS(n,t,e,r);o[2*r]=a[0],o[2*r+1]=a[1]}return o}(o,a,x),b=t.get("showSymbol"),w=b&&!h&&pM(t,a,o),S=this._data;S&&S.eachItemGraphicEl(function(t,e){t.__temp&&(r.remove(t),S.setItemGraphicEl(e,null))}),b||p.remove(),r.add(g);x=!h&&t.get("step");o&&o.getArea&&t.get("clip",!0)&&(null!=(M=o.getArea()).width?(M.x-=.1,M.y-=.1,M.width+=.2,M.height+=.2):M.r0&&(M.r0-=.5,M.r+=.5)),this._clipShapeForSymbol=M,d&&c.type===o.type&&x===this._step?(m&&!f?f=this._newPolygon(u,_):f&&!m&&(g.remove(f),f=this._polygon=null),h||this._initOrUpdateEndLabel(t,o),g.setClipPath(gM(this,o,!1,t)),b&&p.updateData(a,{isIgnore:w,clipShape:M,disableAnimation:!0,getSymbolPoint:function(t){return[u[2*t],u[2*t+1]]}}),sM(this._stackedOnPoints,_)&&sM(this._points,u)||(y?this._doUpdateAnimation(a,_,o,n,x,v):(x&&(u=cM(u,o,x),_=_&&cM(_,o,x)),d.setShape({points:u}),f&&f.setShape({points:u,stackedOnPoints:_})))):(b&&p.updateData(a,{isIgnore:w,clipShape:M,disableAnimation:!0,getSymbolPoint:function(t){return[u[2*t],u[2*t+1]]}}),y&&this._initSymbolLabelAnimation(a,o,M),x&&(u=cM(u,o,x),_=_&&cM(_,o,x)),d=this._newPolyline(u),m&&(f=this._newPolygon(u,_)),h||this._initOrUpdateEndLabel(t,o),g.setClipPath(gM(this,o,!0,t)));var w=function(t,e){var n=t.getVisual("visualMeta");if(n&&n.length&&t.count()&&"cartesian2d"===e.type){for(var i,o=n.length-1;0<=o;o--){var r,a=n[o].dimension,a=t.dimensions[a],a=t.getDimensionInfo(a);if("x"===(r=a&&a.coordDim)||"y"===r){i=n[o];break}}if(i){var s=e.getAxis(r),l=P(i.stops,function(t){return{offset:0,coord:s.toGlobalCoord(s.dataToCoord(t.value)),color:t.color}}),u=l.length,h=i.outerColors.slice();u&&l[0].coord>l[u-1].coord&&(l.reverse(),h.reverse());var c=l[0].coord-10,e=l[u-1].coord+10,p=e-c;if(p<.001)return"transparent";N(l,function(t){t.offset=(t.coord-c)/p}),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"});l=new Va(0,0,0,0,l,!0);return l[r]=c,l[r+"2"]=e,l}}}(a,o)||a.getVisual("style")[a.getVisual("drawType")],y=t.get(["emphasis","focus"]),M=t.get(["emphasis","blurScope"]);d.useStyle(A(s.getLineStyle(),{fill:"none",stroke:w,lineJoin:"bevel"})),Rc(d,t,"lineStyle"),0<d.style.lineWidth&&"bolder"===t.get(["emphasis","lineStyle","width"])&&(d.getState("emphasis").style.lineWidth=d.style.lineWidth+1),Wh(d).seriesIndex=t.seriesIndex,Lc(d,y,M);m=hM(t.get("smooth")),h=t.get("smoothMonotone"),g=t.get("connectNulls");d.setShape({smooth:m,smoothMonotone:h,connectNulls:g}),f&&(s=a.getCalculationInfo("stackedOnSeries"),d=0,f.useStyle(A(l.getAreaStyle(),{fill:w,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),s&&(d=hM(s.get("smooth"))),f.setShape({smooth:m,stackedOnSmooth:d,smoothMonotone:h,connectNulls:g}),Rc(f,t,"areaStyle"),Wh(f).seriesIndex=t.seriesIndex,Lc(f,y,M));function I(t){i._changePolyState(t)}a.eachItemGraphicEl(function(t){t&&(t.onHoverStateChange=I)}),this._polyline.onHoverStateChange=I,this._data=a,this._coordSys=o,this._stackedOnPoints=_,this._points=u,this._step=x,this._valueOrigin=v},mM.prototype.dispose=function(){},mM.prototype.highlight=function(t,e,n,i){var o=t.getData(),r=xh(o,i);if(this._changePolyState("emphasis"),!(r instanceof Array)&&null!=r&&0<=r){var a=o.getLayout("points"),s=o.getItemGraphicEl(r);if(!s){var l=a[2*r],a=a[2*r+1];if(isNaN(l)||isNaN(a))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,a))return;(s=new LS(o,r)).x=l,s.y=a,s.setZ(t.get("zlevel"),t.get("z")),s.__temp=!0,o.setItemGraphicEl(r,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else tm.prototype.highlight.call(this,t,e,n,i)},mM.prototype.downplay=function(t,e,n,i){var o,r=t.getData(),a=xh(r,i);this._changePolyState("normal"),null!=a&&0<=a?(o=r.getItemGraphicEl(a))&&(o.__temp?(r.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay()):tm.prototype.downplay.call(this,t,e,n,i)},mM.prototype._changePolyState=function(t){var e=this._polygon;mc(this._polyline,t),e&&mc(e,t)},mM.prototype._newPolyline=function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new qS({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(e),this._polyline=e},mM.prototype._newPolygon=function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new eM({shape:{points:t,stackedOnPoints:e},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n},mM.prototype._initSymbolLabelAnimation=function(t,l,u){var h,c,e=l.getBaseAxis(),p=e.inverse;"cartesian2d"===l.type?(h=e.isHorizontal(),c=!1):"polar"===l.type&&(h="angle"===e.dim,c=!0);var e=t.hostModel,d=e.get("animationDuration");"function"==typeof d&&(d=d(null));var f=e.get("animationDelay")||0,g="function"==typeof f?f(null):f;t.eachItemGraphicEl(function(t,e){var n,i,o,r,a,s=t;s&&(i=[t.x,t.y],o=a=r=void 0,o=c?(n=u,i=l.pointToCoord(i),h?(r=n.startAngle,a=n.endAngle,-i[1]/180*Math.PI):(r=n.r0,a=n.r,i[0])):h?(r=u.x,a=u.x+u.width,t.x):(r=u.y+u.height,a=u.y,t.y),a=a===r?0:(o-r)/(a-r),p&&(a=1-a),r="function"==typeof f?f(e):d*a+g,a=(e=s.getSymbolPath()).getTextContent(),s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,delay:r}),a&&a.animateFrom({style:{opacity:0}},{duration:300,delay:r}),e.disableLabelAnimation=!0)})},mM.prototype._initOrUpdateEndLabel=function(t,e){var i,n,o,r=t.getModel("endLabel");r.get("show")?(i=t.getData(),o=this._polyline,(n=this._endLabel)||((n=this._endLabel=new vl({z2:200})).ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0),0<=(o=dM(i.getLayout("points")))&&mp(n,vp(t,"endLabel"),{labelFetcher:t,labelDataIndex:o,defaultText:function(t,e,n){return n?DS(i,n):CS(i,t)},enableTextSetter:!0},(t=r,e=(r=(o=e).getBaseAxis()).isHorizontal(),o=r.inverse,r=e?o?"right":"left":"center",o=e?"middle":o?"top":"bottom",{normal:{align:t.get("align")||r,verticalAlign:t.get("verticalAlign")||o,padding:t.get("distance")||0}}))):this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},mM.prototype._endLabelOnDuring=function(t,e,n,i,o,r,a){var s,l,u,h,c,p,d,f,g=this._endLabel,y=this._polyline;g&&(t<1&&null==i.originalX&&(i.originalX=g.x,i.originalY=g.y),s=n.getLayout("points"),u=(l=n.hostModel).get("connectNulls"),h=r.get("precision"),p=(d=a.getBaseAxis()).isHorizontal(),c=d.inverse,r=e.shape,a=void 0,1<=(p=(r=(c=function(t,e,n){for(var i,o,r=t.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u<r;u++)if(o=t[2*u+a],!isNaN(o)&&!isNaN(t[2*u+1-a]))if(0!==u){if(i<=e&&e<=o||e<=i&&o<=e){l=u;break}s=u,i=o}else i=o;return{range:[s,l],t:(e-i)/(o-i)}}(s,d=c?p?r.x:r.y+r.height:p?r.x+r.width:r.y,e=p?"x":"y")).range)[1]-r[0])?(1<p&&!u?(f=fM(s,r[0]),g.attr({x:f[0],y:f[1]}),o&&(a=l.getRawValue(r[0]))):((f=y.getPointOn(d,e))&&g.attr({x:f[0],y:f[1]}),d=l.getRawValue(r[0]),e=l.getRawValue(r[1]),o&&(a=Dh(n,h,d,e,c.t))),i.lastFrameIndex=r[0]):(f=fM(s,r=1===t||0<i.lastFrameIndex?r[0]:0),o&&(a=l.getRawValue(r)),g.attr({x:f[0],y:f[1]})),o&&Tp(g).setLabelText(a))},mM.prototype._doUpdateAnimation=function(t,e,n,i,o,r){var a=this._polyline,s=this._polygon,l=t.hostModel,u=function(t,e,n,i,o,r,a,s){for(var l,u,h=(l=t,u=[],e.diff(l).add(function(t){u.push({cmd:"+",idx:t})}).update(function(t,e){u.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){u.push({cmd:"-",idx:t})}).execute(),u),c=[],p=[],d=[],f=[],g=[],y=[],m=[],v=BS(o,e,a),x=BS(r,t,s),_=t.getLayout("points")||[],b=e.getLayout("points")||[],w=0;w<h.length;w++){var S=h[w],M=!0,I=void 0,T=void 0;switch(S.cmd){case"=":I=2*S.idx,T=2*S.idx1;var C=_[I],D=_[I+1],A=b[T],L=b[T+1];(isNaN(C)||isNaN(D))&&(C=A,D=L),c.push(C,D),p.push(A,L),d.push(n[I],n[I+1]),f.push(i[T],i[T+1]),m.push(e.getRawIndex(S.idx1));break;case"+":var k=S.idx,P=v.dataDimsForPoint,P=o.dataToPoint([e.get(P[0],k),e.get(P[1],k)]),T=2*k;c.push(P[0],P[1]),p.push(b[T],b[T+1]);P=VS(v,o,e,k);d.push(P[0],P[1]),f.push(i[T],i[T+1]),m.push(e.getRawIndex(k));break;case"-":P=S.idx,T=t.getRawIndex(P),k=x.dataDimsForPoint,I=2*P;T!==P?(k=r.dataToPoint([t.get(k[0],P),t.get(k[1],P)]),P=VS(x,r,t,P),c.push(_[I],_[I+1]),p.push(k[0],k[1]),d.push(n[I],n[I+1]),f.push(P[0],P[1]),m.push(T)):M=!1}M&&(g.push(S),y.push(y.length))}y.sort(function(t,e){return m[t]-m[e]});for(var O=HS(s=c.length),R=HS(s),N=HS(s),E=HS(s),z=[],w=0;w<y.length;w++){var B=y[w],V=2*w,F=2*B;O[V]=c[F],O[1+V]=c[1+F],R[V]=p[F],R[1+V]=p[1+F],N[V]=d[F],N[1+V]=d[1+F],E[V]=f[F],E[1+V]=f[1+F],z[w]=g[B]}return{current:O,next:R,stackedOnCurrent:N,stackedOnNext:E,status:z}}(this._data,t,this._stackedOnPoints,e,this._coordSys,n,this._valueOrigin,r),h=u.current,c=u.stackedOnCurrent,e=u.next,r=u.stackedOnNext;if(o&&(h=cM(u.current,n,o),c=cM(u.stackedOnCurrent,n,o),e=cM(u.next,n,o),r=cM(u.stackedOnNext,n,o)),3e3<uM(h,e)||s&&3e3<uM(c,r))return a.setShape({points:e}),void(s&&s.setShape({points:e,stackedOnPoints:r}));a.shape.__points=u.current,a.shape.points=h;e={shape:{points:e}};u.current!==h&&(e.shape.__points=u.next),a.stopAnimation(),Jc(a,e,l),s&&(s.setShape({points:h,stackedOnPoints:c}),s.stopAnimation(),Jc(s,{shape:{stackedOnPoints:r}},l),a.shape.points!==s.shape.points&&(s.shape.points=a.shape.points));for(var p,d=[],f=u.status,g=0;g<f.length;g++){"="!==f[g].cmd||(p=t.getItemGraphicEl(f[g].idx1))&&d.push({el:p,ptIdx:g})}a.animators&&a.animators.length&&a.animators[0].during(function(){s&&s.dirtyShape();for(var t=a.shape.__points,e=0;e<d.length;e++){var n=d[e].el,i=2*d[e].ptIdx;n.x=t[i],n.y=t[1+i],n.markRedraw()}})},mM.prototype.remove=function(t){var n=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl(function(t,e){t.__temp&&(n.remove(t),i.setItemGraphicEl(e,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},mM.type="line",mM);function mM(){return null!==yM&&yM.apply(this,arguments)||this}function vM(t,i){return{seriesType:t,plan:$y(),reset:function(t){var e=t.getData(),h=t.coordinateSystem,n=t.pipelineContext,c=i||n.large;if(h){var t=P(h.dimensions,function(t){return e.mapDimension(t)}).slice(0,2),p=t.length,n=e.getCalculationInfo("stackResultDimension");Sb(e,t[0])&&(t[0]=n),Sb(e,t[1])&&(t[1]=n);var n=e.getDimensionInfo(t[0]),t=e.getDimensionInfo(t[1]),d=n&&n.index,f=t&&t.index;return p&&{progress:function(t,e){for(var n=t.end-t.start,i=c&&HS(n*p),o=[],r=[],a=t.start,s=0;a<t.end;a++){var l,u=void 0;u=1===p?(l=e.getByDimIdx(d,a),h.dataToPoint(l,null,r)):(o[0]=e.getByDimIdx(d,a),o[1]=e.getByDimIdx(f,a),h.dataToPoint(o,null,r)),c?(i[s++]=u[0],i[s++]=u[1]):e.setItemLayout(a,u.slice())}c&&e.setLayout("points",i)}}}}}}tm.registerClass(Op);function xM(t){return Math.round(t.length/2)}var _M={average:function(t){for(var e=0,n=0,i=0;i<t.length;i++)isNaN(t[i])||(e+=t[i],n++);return 0===n?NaN:e/n},sum:function(t){for(var e=0,n=0;n<t.length;n++)e+=t[n]||0;return e},max:function(t){for(var e=-1/0,n=0;n<t.length;n++)t[n]>e&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n<t.length;n++)t[n]<e&&(e=t[n]);return isFinite(e)?e:NaN},nearest:function(t){return t[0]}};function bM(t){return{seriesType:t,reset:function(t,e,n){var i,o=t.getData(),r=t.get("sampling"),a=t.coordinateSystem,s=o.count();10<s&&"cartesian2d"===a.type&&r&&(i=a.getBaseAxis(),a=a.getOtherAxis(i),i=i.getExtent(),n=n.getDevicePixelRatio(),n=Math.abs(i[1]-i[0])*(n||1),1<(s=Math.round(s/n))&&("lttb"===r&&t.setData(o.lttbDownSample(o.mapDimension(a.dim),1/s)),n=void 0,"string"==typeof r?n=_M[r]:"function"==typeof r&&(n=r),n&&t.setData(o.downSample(o.mapDimension(a.dim),1/s,n,xM))))}}}var nd={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},vm=b({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},nd),Op=b({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},nd),wM={category:vm,value:Op,time:b({scale:!0,splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Op),log:A({scale:!0,logBase:10},Op)},SM={value:1,category:1,time:1,log:1};function MM(r,a,s){N(SM,function(t,o){var i,e=b(b({},wM[o],!0),s,!0),e=(l(n,i=a),n.prototype.mergeDefaultAndTheme=function(t,e){var n=Zd(this),i=n?qd(t):{};b(t,e.getTheme().get(o+"Axis")),b(t,this.getDefaultOption()),t.type=IM(t),n&&jd(t,i,n)},n.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=Db.createByAxisModel(this))},n.prototype.getCategories=function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.type=r+"Axis."+o,n.defaultOption=e,n);function n(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=i.apply(this,t)||this;return n.type=r+"Axis."+o,n}nf.registerClass(e)}),nf.registerSubTypeDefaulter(r+"Axis",IM)}function IM(t){return t.type||(t.data?"category":"value")}var TM,nd=(l(CM,TM=nf),CM.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Sh).models[0]},CM.type="cartesian2dAxis",CM);function CM(){return null!==TM&&TM.apply(this,arguments)||this}I(nd,Ew);vm={offset:0,categorySortInfo:[]};MM("x",nd,vm),MM("y",nd,vm);var DM=Math.PI,AM=(LM.prototype.hasBuilder=function(t){return!!kM[t]},LM.prototype.add=function(t){kM[t](this.opt,this.axisModel,this.group,this._transformGroup)},LM.prototype.getGroup=function(){return this.group},LM.innerTextLayout=function(t,e,n){var i,t=Wu(e-t),n=Xu(t)?(i=0<n?"top":"bottom","center"):Xu(t-DM)?(i=0<n?"bottom":"top","center"):(i="middle",0<t&&t<DM?0<n?"right":"left":0<n?"left":"right");return{rotation:t,textAlign:n,textVerticalAlign:i}},LM.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},LM.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},LM);function LM(t,e){this.group=new $r,this.opt=e,this.axisModel=t,A(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});e=new $r({x:e.position[0],y:e.position[1],rotation:e.rotation});e.updateTransform(),this._transformGroup=e}var kM={axisLine:function(i,t,o,e){var r,a,s,l,u,n=t.get(["axisLine","show"]);"auto"===n&&i.handleAutoShown&&(n=i.handleAutoShown("axisLine")),n&&(n=t.axis.getExtent(),e=e.transform,r=[n[0],0],n=[n[1],0],e&&(Ot(r,r,e),Ot(n,n,e)),a=O({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),(e=new Ma({subPixelOptimize:!0,shape:{x1:r[0],y1:r[1],x2:n[0],y2:n[1]},style:a,strokeContainThreshold:i.strokeContainThreshold||5,silent:!0,z2:1})).anid="line",o.add(e),s=t.get(["axisLine","symbol"]),e=t.get(["axisLine","symbolSize"]),"number"==typeof(t=t.get(["axisLine","symbolOffset"])||0)&&(t=[t,t]),null!=s&&("string"==typeof s&&(s=[s,s]),"string"!=typeof e&&"number"!=typeof e||(e=[e,e]),l=e[0],u=e[1],N([{rotate:i.rotation+Math.PI/2,offset:t[0],r:0},{rotate:i.rotation-Math.PI/2,offset:t[1],r:Math.sqrt((r[0]-n[0])*(r[0]-n[0])+(r[1]-n[1])*(r[1]-n[1]))}],function(t,e){var n;"none"!==s[e]&&null!=s[e]&&(n=px(s[e],-l/2,-u/2,l,u,a.stroke,!0),e=t.r+t.offset,n.attr({rotation:t.rotate,x:r[0]+e*Math.cos(i.rotation),y:r[1]-e*Math.sin(i.rotation),silent:!0,z2:11}),o.add(n))})))},axisTickLabel:function(t,e,n,i){var o=function(t,e,n,i){var o=n.axis,r=n.getModel("axisTick"),a=r.get("show");"auto"===a&&i.handleAutoShown&&(a=i.handleAutoShown("axisTick"));if(!a||o.scale.isBlank())return;for(var a=r.getModel("lineStyle"),r=i.tickDirection*r.get("length"),s=NM(o.getTicksCoords(),e.transform,r,A(a.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),l=0;l<s.length;l++)t.add(s[l]);return s}(n,i,e,t);!function(t,e,n){if(Ow(t.axis))return;var i=t.get(["axisLabel","showMinLabel"]),o=t.get(["axisLabel","showMaxLabel"]);n=n||[];var r=(e=e||[])[0],a=e[1],s=e[e.length-1],l=e[e.length-2],u=n[0],t=n[1],e=n[n.length-1],n=n[n.length-2];!1===i?(PM(r),PM(u)):OM(r,a)&&(i?(PM(a),PM(t)):(PM(r),PM(u)));!1===o?(PM(s),PM(e)):OM(l,s)&&(o?(PM(l),PM(n)):(PM(s),PM(e)))}(e,function(s,l,u,h){var c=u.axis;if(!Q(h.axisLabelShow,u.get(["axisLabel","show"]))||c.scale.isBlank())return;var p=u.getModel("axisLabel"),d=p.get("margin"),t=c.getViewLabels(),e=(Q(h.labelRotate,p.get("rotate"))||0)*DM/180,f=AM.innerTextLayout(h.rotation,e,h.labelDirection),g=u.getCategories&&u.getCategories(!0),y=[],m=AM.isLabelSilent(u),v=u.get("triggerEvent");return N(t,function(t,e){var n="ordinal"===c.scale.type?c.scale.getRawIndex(t.tickValue):t.tickValue,i=t.formattedLabel,o=t.rawLabel,r=p;g&&g[n]&&(Y(a=g[n])&&a.textStyle&&(r=new Fp(a.textStyle,p,u.ecModel)));var t=r.getTextColor()||u.get(["axisLine","lineStyle","color"]),a=c.dataToCoord(n),t=new vl({x:a,y:h.labelOffset+h.labelDirection*d,rotation:f.rotation,silent:m,z2:10,style:xp(r,{text:i,align:r.getShallow("align",!0)||f.textAlign,verticalAlign:r.getShallow("verticalAlign",!0)||r.getShallow("baseline",!0)||f.textVerticalAlign,fill:"function"==typeof t?t("category"===c.type?o:"value"===c.type?n+"":n,e):t})});t.anid="label_"+n,v&&((n=AM.makeAxisEventDataBase(u)).targetType="axisLabel",n.value=o,Wh(t).eventData=n),l.add(t),t.updateTransform(),y.push(t),s.add(t),t.decomposeTransform()}),y}(n,i,e,t),o),function(t,e,n,i){var o=n.axis,r=n.getModel("minorTick");if(!r.get("show")||o.scale.isBlank())return;var a=o.getMinorTicksCoords();if(!a.length)return;for(var o=r.getModel("lineStyle"),s=i*r.get("length"),l=A(o.getLineStyle(),A(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),u=0;u<a.length;u++)for(var h=NM(a[u],e.transform,s,l,"minorticks_"+u),c=0;c<h.length;c++)t.add(h[c])}(n,i,e,t.tickDirection)},axisName:function(t,e,n,i){var o,r,a,s,l,u,h,c,p=Q(t.axisName,e.get("name"));p&&(u=e.get("nameLocation"),a=t.nameDirection,o=e.getModel("nameTextStyle"),s=e.get("nameGap")||0,r=(l=e.axis.getExtent())[0]>l[1]?-1:1,r=["start"===u?l[0]-r*s:"end"===u?l[1]+r*s:(l[0]+l[1])/2,RM(u)?t.labelOffset+a*s:0],null!=(s=e.get("nameRotate"))&&(s=s*DM/180),RM(u)?c=AM.innerTextLayout(t.rotation,null!=s?s:t.rotation,a):(c=function(t,e,n,i){var o,t=Wu(n-t),i=i[0]>i[1],i="start"===e&&!i||"start"!==e&&i;i=Xu(t-DM/2)?(o=i?"bottom":"top","center"):Xu(t-1.5*DM)?(o=i?"top":"bottom","center"):(o="middle",t<1.5*DM&&DM/2<t?i?"left":"right":i?"right":"left");return{rotation:t,textAlign:i,textVerticalAlign:o}}(t.rotation,u,s||0,l),null!=(h=t.axisNameAvailableWidth)&&(h=Math.abs(h/Math.sin(c.rotation)),isFinite(h)||(h=null))),a=o.getFont(),s=(u=e.get("nameTruncate",!0)||{}).ellipsis,l=Q(t.nameTruncateMaxWidth,u.maxWidth,h),t=e.get("tooltip",!0),(h={componentType:u=e.mainType,name:p,$vars:["name"]})[u+"Index"]=e.componentIndex,(c=new vl({x:r[0],y:r[1],rotation:c.rotation,silent:AM.isLabelSilent(e),style:xp(o,{text:p,font:a,overflow:"truncate",width:l,ellipsis:s,fill:o.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:o.get("align")||c.textAlign,verticalAlign:o.get("verticalAlign")||c.textVerticalAlign}),z2:1})).tooltip=t&&t.show?O({content:p,formatter:function(){return p},formatterParams:h},t):null,c.__fullText=p,c.anid="name",e.get("triggerEvent")&&((e=AM.makeAxisEventDataBase(e)).targetType="axisName",e.name=p,Wh(c).eventData=e),i.add(c),c.updateTransform(),n.add(c),c.decomposeTransform())}};function PM(t){t&&(t.ignore=!0)}function OM(t,e){var n=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(n&&i){var o=be([]);return Ie(o,o,-t.rotation),n.applyTransform(Se([],o,t.getLocalTransform())),i.applyTransform(Se([],o,e.getLocalTransform())),n.intersect(i)}}function RM(t){return"middle"===t||"center"===t}function NM(t,e,n,i,o){for(var r=[],a=[],s=[],l=0;l<t.length;l++){var u=t[l].coord;a[0]=u,s[a[1]=0]=u,s[1]=n,e&&(Ot(a,a,e),Ot(s,s,e));u=new Ma({subPixelOptimize:!0,shape:{x1:a[0],y1:a[1],x2:s[0],y2:s[1]},style:i,z2:2,autoBatch:!0,silent:!0});u.anid=o+"_"+t[l].tickValue,r.push(u)}return r}function EM(t,e){var u,h,o,c,p,d,r,n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return u=n,e=e,o=(h=t).getComponent("tooltip"),c=h.getComponent("axisPointer"),p=c.get("link",!0)||[],d=[],N(e.getCoordinateSystems(),function(a){var s,l,t,e,n;function i(t,e,n){var i,o=n.model.getModel("axisPointer",c),r=o.get("show");r&&("auto"!==r||t||VM(o))&&(null==e&&(e=o.get("triggerTooltip")),i=(o=t?function(t,e,n,i,o,r){var a=e.getModel("axisPointer"),s={};N(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(t){s[t]=C(a.get(t))}),s.snap="category"!==t.type&&!!r,"cross"===a.get("type")&&(s.type="line");e=s.label||(s.label={});{null==e.show&&(e.show=!1),"cross"===o&&(o=a.get(["label","show"]),e.show=null==o||o,r||(r=s.lineStyle=a.get("crossStyle"))&&A(e,r.textStyle))}return t.model.getModel("axisPointer",new Fp(s,n,i))}(n,l,c,h,t,e):o).get("snap"),r=FM(n.model),t=e||i||"category"===n.type,o=u.axesInfo[r]={key:r,axis:n,coordSys:a,axisPointerModel:o,triggerTooltip:e,involveSeries:t,snap:i,useHandle:VM(o),seriesModels:[],linkGroup:null},s[r]=o,u.seriesInvolved=u.seriesInvolved||t,null!=(t=function(t,e){for(var n=e.model,i=e.dim,o=0;o<t.length;o++){var r=t[o]||{};if(zM(r[i+"AxisId"],n.id)||zM(r[i+"AxisIndex"],n.componentIndex)||zM(r[i+"AxisName"],n.name))return o}}(p,n))&&((n=d[t]||(d[t]={axesInfo:{}})).axesInfo[r]=o,n.mapper=p[t].mapper,o.linkGroup=n))}a.axisPointerEnabled&&(n=FM(a.model),s=u.coordSysAxesInfo[n]={},l=(u.coordSysMap[n]=a).model.getModel("tooltip",o),N(a.getAxes(),V(i,!1,null)),a.getTooltipAxes&&o&&l.get("show")&&(t="axis"===l.get("trigger"),e="cross"===l.get(["axisPointer","type"]),n=a.getTooltipAxes(l.get(["axisPointer","axis"])),(t||e)&&N(n.baseAxes,V(i,!e||"cross",t)),e&&N(n.otherAxes,V(i,"cross",!1))))}),n.seriesInvolved&&(r=n,t.eachSeries(function(n){var i=n.coordinateSystem,t=n.get(["tooltip","trigger"],!0),e=n.get(["tooltip","show"],!0);i&&"none"!==t&&!1!==t&&"item"!==t&&!1!==e&&!1!==n.get(["axisPointer","show"],!0)&&N(r.coordSysAxesInfo[FM(i.model)],function(t){var e=t.axis;i.getAxis(e.dim)===e&&(t.seriesModels.push(n),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=n.getData().count())})})),n}function zM(t,e){return"all"===t||F(t)&&0<=L(t,e)||t===e}function BM(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[FM(t)]}function VM(t){return!!t.get(["handle","show"])}function FM(t){return t.type+"||"+t.id}var GM,HM={},Op=(l(WM,GM=qy),WM.prototype.render=function(t,e,n,i){var o,r,a,s,l,u;!this.axisPointerClass||(u=BM(o=t))&&(s=u.axisPointerModel,l=u.axis.scale,r=s.option,a=s.get("status"),null!=(o=s.get("value"))&&(o=l.parse(o)),s=VM(s),null==a&&(r.status=s?"show":"hide"),(l=l.getExtent().slice())[0]>l[1]&&l.reverse(),(null==o||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),r.value=o,s&&(r.status=u.axis.scale.isBlank()?"hide":"show")),GM.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,n,!0)},WM.prototype.updateAxisPointer=function(t,e,n,i){this._doUpdateAxisPointerClass(t,n,!1)},WM.prototype.remove=function(t,e){var n=this._axisPointer;n&&n.remove(e)},WM.prototype.dispose=function(t,e){this._disposeAxisPointer(e),GM.prototype.dispose.apply(this,arguments)},WM.prototype._doUpdateAxisPointerClass=function(t,e,n){var i,o=WM.getAxisPointerClass(this.axisPointerClass);o&&((i=(i=BM(i=t))&&i.axisPointerModel)?(this._axisPointer||(this._axisPointer=new o)).render(t,i,e,n):this._disposeAxisPointer(e))},WM.prototype._disposeAxisPointer=function(t){this._axisPointer&&this._axisPointer.dispose(t),this._axisPointer=null},WM.registerAxisPointerClass=function(t,e){HM[t]=e},WM.getAxisPointerClass=function(t){return t&&HM[t]},WM.type="axis",WM);function WM(){var t=null!==GM&&GM.apply(this,arguments)||this;return t.type=WM.type,t}function XM(t,e,n){n=n||{};var i=t.coordinateSystem,o=e.axis,r={},a=o.getAxesOnZeroOf()[0],s=o.position,l=a?"onZero":s,u=o.dim,h=i.getRect(),t=[h.x,h.x+h.width,h.y,h.y+h.height],o={left:0,right:1,top:0,bottom:1,onZero:2},i=e.get("offset")||0,h="x"===u?[t[2]-i,t[3]+i]:[t[0]-i,t[1]+i];a&&(i=a.toGlobalCoord(a.dataToCoord(0)),h[o.onZero]=Math.max(Math.min(i,h[1]),h[0])),r.position=["y"===u?h[o[l]]:t[0],"x"===u?h[o[l]]:t[3]],r.rotation=Math.PI/2*("x"===u?0:1);r.labelDirection=r.tickDirection=r.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],r.labelOffset=a?h[o[s]]-h[o.onZero]:0,e.get(["axisTick","inside"])&&(r.tickDirection=-r.tickDirection),Q(n.labelInside,e.get(["axisLabel","inside"]))&&(r.labelDirection=-r.labelDirection);e=e.get(["axisLabel","rotate"]);return r.labelRotate="top"===l?-e:e,r.z2=1,r}function YM(t){return"cartesian2d"===t.get("coordinateSystem")}function UM(i){var o={xAxisModel:null,yAxisModel:null};return N(o,function(t,e){var n=e.replace(/Model$/,""),n=i.getReferringComponents(n,Sh).models[0];o[e]=n}),o}var ZM=_h();function jM(t,e,n,i){var o=n.axis;if(!o.scale.isBlank()){var r=n.getModel("splitArea"),n=r.getModel("areaStyle"),a=n.get("color"),s=i.coordinateSystem.getRect(),l=o.getTicksCoords({tickModel:r,clamp:!0});if(l.length){var u=a.length,h=ZM(t).splitAreaColors,c=ct(),p=0;if(h)for(var d=0;d<l.length;d++){var f=h.get(l[d].tickValue);if(null!=f){p=(f+(u-1)*d)%u;break}}for(var g=o.toGlobalCoord(l[0].coord),y=n.getAreaStyle(),a=F(a)?a:[a],d=1;d<l.length;d++){var m=o.toGlobalCoord(l[d].coord),v=void 0,x=void 0,_=void 0,b=void 0,g=o.isHorizontal()?(v=g,x=s.y,_=m-v,b=s.height,v+_):(v=s.x,x=g,_=s.width,x+(b=m-x)),m=l[d-1].tickValue;null!=m&&c.set(m,p),e.add(new ga({anid:null!=m?"area_"+m:null,shape:{x:v,y:x,width:_,height:b},style:A({fill:a[p]},y),autoBatch:!0,silent:!0})),p=(p+1)%u}ZM(t).splitAreaColors=c}}}function qM(t){ZM(t).splitAreaColors=null}var KM,$M=["axisLine","axisTickLabel","axisName"],JM=["splitArea","splitLine","minorSplitLine"],nd=(l(QM,KM=Op),QM.prototype.render=function(o,t,e,n){this.group.removeAll();var r,i,a=this._axisGroup;this._axisGroup=new $r,this.group.add(this._axisGroup),o.get("show")&&(i=XM(r=o.getCoordSysModel(),o),i=new AM(o,O({handleAutoShown:function(t){for(var e=r.coordinateSystem.getCartesians(),n=0;n<e.length;n++){var i=e[n].getOtherAxis(o.axis).type;if("value"===i||"log"===i)return!0}return!1}},i)),N($M,i.add,i),this._axisGroup.add(i.getGroup()),N(JM,function(t){o.get([t,"show"])&&eI[t](this,this._axisGroup,o,r)},this),lp(a,this._axisGroup,o),KM.prototype.render.call(this,o,t,e,n))},QM.prototype.remove=function(){qM(this)},QM.type="cartesianAxis",QM);function QM(){var t=null!==KM&&KM.apply(this,arguments)||this;return t.type=QM.type,t.axisPointerClass="CartesianAxisPointer",t}var tI,eI={splitLine:function(t,e,n,i){var o=n.axis;if(!o.scale.isBlank())for(var r=n.getModel("splitLine"),n=r.getModel("lineStyle"),a=F(a=n.get("color"))?a:[a],s=i.coordinateSystem.getRect(),l=o.isHorizontal(),u=0,h=o.getTicksCoords({tickModel:r}),c=[],p=[],d=n.getLineStyle(),f=0;f<h.length;f++){var g=o.toGlobalCoord(h[f].coord);l?(c[0]=g,c[1]=s.y,p[0]=g,p[1]=s.y+s.height):(c[0]=s.x,c[1]=g,p[0]=s.x+s.width,p[1]=g);var y=u++%a.length,g=h[f].tickValue;e.add(new Ma({anid:null!=g?"line_"+h[f].tickValue:null,subPixelOptimize:!0,autoBatch:!0,shape:{x1:c[0],y1:c[1],x2:p[0],y2:p[1]},style:A({stroke:a[y]},d),silent:!0}))}},minorSplitLine:function(t,e,n,i){var o=n.axis,n=n.getModel("minorSplitLine").getModel("lineStyle"),r=i.coordinateSystem.getRect(),a=o.isHorizontal(),s=o.getMinorTicksCoords();if(s.length)for(var l=[],u=[],h=n.getLineStyle(),c=0;c<s.length;c++)for(var p=0;p<s[c].length;p++){var d=o.toGlobalCoord(s[c][p].coord);a?(l[0]=d,l[1]=r.y,u[0]=d,u[1]=r.y+r.height):(l[0]=r.x,l[1]=d,u[0]=r.x+r.width,u[1]=d),e.add(new Ma({anid:"minor_line_"+s[c][p].tickValue,subPixelOptimize:!0,autoBatch:!0,shape:{x1:l[0],y1:l[1],x2:u[0],y2:u[1]},style:h,silent:!0}))}},splitArea:function(t,e,n,i){jM(t,e,n,i)}},nI=(l(iI,tI=nd),iI.type="xAxis",iI);function iI(){var t=null!==tI&&tI.apply(this,arguments)||this;return t.type=iI.type,t}var oI,vm=(l(rI,oI=nd),rI.type="yAxis",rI);function rI(){var t=null!==oI&&oI.apply(this,arguments)||this;return t.type=nI.type,t}function aI(t,e){return t.get(e.uid)||t.set(e.uid,{condExtent:sI()})}function sI(){return[1/0,-1/0]}function lI(t,e){e<t[0]&&(t[0]=e),e>t[1]&&(t[1]=e)}qy.registerClass(nI),qy.registerClass(vm),D_(r.PROCESSOR.FILTER+10,{getTargetSeries:function(t){var e=ct();return t.eachSeries(function(t){YM(t)&&e.set(t.uid,t)}),e},overallReset:function(t,e){var l,u,T,n=[],i=ct();l=i,u=n,t.eachSeries(function(t){var e,n,i,o,r,a,s;YM(t)&&(e=(s=UM(t)).xAxisModel,n=s.yAxisModel,i=e.axis,o=n.axis,r=i.scale.rawExtentInfo,a=o.scale.rawExtentInfo,s=t.getData(),r&&r.frozen||a&&a.frozen||(u.push({seriesModel:t,xAxisModel:e,yAxisModel:n}),Nw(aI(l,e).condExtent,s,i.dim),Nw(aI(l,n).condExtent,s,o.dim)))}),T=i,N(n,function(t){var e=t.xAxisModel,n=t.yAxisModel,i=e.axis,o=n.axis,r=aI(T,e),a=aI(T,n);r.rawExtentInfo=Mw(i.scale,e,r.condExtent),a.rawExtentInfo=Mw(o.scale,n,a.condExtent),r.rawExtentResult=r.rawExtentInfo.calculate(),a.rawExtentResult=a.rawExtentInfo.calculate();var s,l,u=t.seriesModel.getData(),h={},c={};function p(e,t){var n=t.condExtent,t=t.rawExtentResult;"category"===e.type&&(n[0]<t.min||t.max<n[1])&&N(Rw(u,e.dim),function(t){ft(h,t)||(h[t]=!0,s=e)})}function d(t,e){var n=e.rawExtentResult;"category"===t.type||n.minFixed&&n.maxFixed||N(Rw(u,t.dim),function(t){ft(h,t)||ft(c,t)||(c[t]=!0,l=e)})}p(i,r),p(o,a),d(i,r),d(o,a);var f=z(h),g=z(c),y=P(g,sI),m=f.length,v=g.length;if(m&&v){var x=1===m?f[0]:null,_=1===v?g[0]:null,b=u.count();if(x&&_)for(var w=0;w<b;w++){var S=u.get(x,w);s.scale.isInExtentRange(S)&&lI(y[0],u.get(_,w))}else for(w=0;w<b;w++)for(var M=0;M<m;M++){S=u.get(f[M],w);if(s.scale.isInExtentRange(S)){for(var I=0;I<v;I++)lI(y[I],u.get(g[I],w));break}}N(y,function(t,e){e=g[e];u.setApproximateExtent(t,e);e=l.tarExtent=l.tarExtent||sI();lI(e,t[0]),lI(e,t[1])})}}),i.each(function(t){var e,n=t.tarExtent;n&&(e=t.rawExtentResult,t=t.rawExtentInfo,!e.minFixed&&n[0]>e.min&&t.modifyDataMinMax("min",n[0]),!e.maxFixed&&n[1]<e.max&&t.modifyDataMinMax("max",n[1]))})}});var uI,nd=(l(hI,uI=nf),hI.type="grid",hI.dependencies=["xAxis","yAxis"],hI.layoutMode="box",hI.defaultOption={show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},hI);function hI(){return null!==uI&&uI.apply(this,arguments)||this}var cI,vm=(l(pI,cI=qy),pI.prototype.render=function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new ga({shape:t.coordinateSystem.getRect(),style:A({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))},pI.type="grid",pI);function pI(){var t=null!==cI&&cI.apply(this,arguments)||this;return t.type="grid",t}qy.registerClass(vm),nf.registerClass(nd),C_(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})}),k_(vM("line",!0)),D_(r.PROCESSOR.STATISTIC,bM("line"));dI.prototype.getAxis=function(t){return this._axes[t]},dI.prototype.getAxes=function(){return P(this._dimList,function(t){return this._axes[t]},this)},dI.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),R(this.getAxes(),function(t){return t.scale.type===e})},dI.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},vm=dI;function dI(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}var fI=["x","y"];function gI(t){return"interval"===t.type||"time"===t.type}var yI,mI=(l(vI,yI=vm),vI.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t,e,n,i,o=this.getAxis("x").scale,r=this.getAxis("y").scale;gI(o)&&gI(r)&&(n=o.getExtent(),i=r.getExtent(),t=this.dataToPoint([n[0],i[0]]),e=this.dataToPoint([n[1],i[1]]),o=n[1]-n[0],r=i[1]-i[0],o&&r&&(o=(e[0]-t[0])/o,r=(e[1]-t[1])/r,n=t[0]-n[0]*o,i=t[1]-i[0]*r,i=this._transform=[o,0,0,r,n,i],this._invTransform=Ce([],i)))},vI.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},vI.prototype.containPoint=function(t){var e=this.getAxis("x"),n=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},vI.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},vI.prototype.dataToPoint=function(t,e,n){n=n||[];var i=t[0],o=t[1];if(this._transform&&null!=i&&isFinite(i)&&null!=o&&isFinite(o))return Ot(n,t,this._transform);var r=this.getAxis("x"),t=this.getAxis("y");return n[0]=r.toGlobalCoord(r.dataToCoord(i)),n[1]=t.toGlobalCoord(t.dataToCoord(o)),n},vI.prototype.clampData=function(t,e){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,o=n.getExtent(),r=i.getExtent(),n=n.parse(t[0]),t=i.parse(t[1]);return(e=e||[])[0]=Math.min(Math.max(Math.min(o[0],o[1]),n),Math.max(o[0],o[1])),e[1]=Math.min(Math.max(Math.min(r[0],r[1]),t),Math.max(r[0],r[1])),e},vI.prototype.pointToData=function(t,e){if(e=e||[],this._invTransform)return Ot(e,t,this._invTransform);var n=this.getAxis("x"),i=this.getAxis("y");return e[0]=n.coordToData(n.toLocalCoord(t[0])),e[1]=i.coordToData(i.toLocalCoord(t[1])),e},vI.prototype.getOtherAxis=function(t){return this.getAxis("x"===t.dim?"y":"x")},vI.prototype.getArea=function(){var t=this.getAxis("x").getGlobalExtent(),e=this.getAxis("y").getGlobalExtent(),n=Math.min(t[0],t[1]),i=Math.min(e[0],e[1]),t=Math.max(t[0],t[1])-n,e=Math.max(e[0],e[1])-i;return new Gn(n,i,t,e)},vI);function vI(){var t=null!==yI&&yI.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=fI,t}var xI,_I=(l(bI,xI=mu),bI.prototype.isHorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},bI.prototype.getGlobalExtent=function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},bI.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},bI.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setCategorySortInfo(t)},bI);function bI(t,e,n,i,o){n=xI.call(this,t,e,n)||this;return n.index=0,n.type=i||"value",n.position=o||"bottom",n}wI.prototype.getRect=function(){return this._rect},wI.prototype.update=function(t,e){var n=this._axesMap;this._updateScale(t,this.model),N(n.x,function(t){Cw(t.scale,t.model)}),N(n.y,function(t){Cw(t.scale,t.model)});var i={};N(n.x,function(t){MI(n,"y",t,i)}),N(n.y,function(t){MI(n,"x",t,i)}),this.resize(this.model,e)},wI.prototype.resize=function(t,e,n){var i=t.getBoxLayoutParams(),t=!n&&t.get("containLabel"),a=Yd(i,{width:e.getWidth(),height:e.getHeight()});this._rect=a;var o=this._axesList;function r(){N(o,function(t){var e,n,i=t.isHorizontal(),o=i?[0,a.width]:[0,a.height],r=t.inverse?1:0;t.setExtent(o[r],o[1-r]),t=t,e=i?a.x:a.y,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}})}r(),t&&(N(o,function(t){var e,n,i;t.model.get(["axisLabel","inside"])||(e=kw(t))&&(n=t.isHorizontal()?"height":"width",i=t.model.get(["axisLabel","margin"]),a[n]-=e[n]+i,"top"===t.position?a.y+=e.height+i:"left"===t.position&&(a.x+=e.width+i))}),r()),N(this._coordsList,function(t){t.calcAffineTransform()})},wI.prototype.getAxis=function(t,e){t=this._axesMap[t];if(null!=t)return t[e||0]},wI.prototype.getAxes=function(){return this._axesList.slice()},wI.prototype.getCartesian=function(t,e){if(null!=t&&null!=e){var n="x"+t+"y"+e;return this._coordsMap[n]}Y(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,o=this._coordsList;i<o.length;i++)if(o[i].getAxis("x").index===t||o[i].getAxis("y").index===e)return o[i]},wI.prototype.getCartesians=function(){return this._coordsList.slice()},wI.prototype.convertToPixel=function(t,e,n){e=this._findConvertTarget(e);return e.cartesian?e.cartesian.dataToPoint(n):e.axis?e.axis.toGlobalCoord(e.axis.dataToCoord(n)):null},wI.prototype.convertFromPixel=function(t,e,n){e=this._findConvertTarget(e);return e.cartesian?e.cartesian.pointToData(n):e.axis?e.axis.coordToData(e.axis.toLocalCoord(n)):null},wI.prototype._findConvertTarget=function(t){var e,n,i=t.seriesModel,o=t.xAxisModel||i&&i.getReferringComponents("xAxis",Sh).models[0],r=t.yAxisModel||i&&i.getReferringComponents("yAxis",Sh).models[0],a=t.gridModel,t=this._coordsList;return i?L(t,e=i.coordinateSystem)<0&&(e=null):o&&r?e=this.getCartesian(o.componentIndex,r.componentIndex):o?n=this.getAxis("x",o.componentIndex):r?n=this.getAxis("y",r.componentIndex):a&&a.coordinateSystem===this&&(e=this._coordsList[0]),{cartesian:e,axis:n}},wI.prototype.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},wI.prototype._initCartesian=function(r,t,e){var a=this,s=this,l={left:!1,right:!1,top:!1,bottom:!1},u={x:{},y:{}},h={x:0,y:0};if(t.eachComponent("xAxis",n("x"),this),t.eachComponent("yAxis",n("y"),this),!h.x||!h.y)return this._axesMap={},void(this._axesList=[]);function n(o){return function(t,e){var n,i;SI(t,r)&&(i=t.get("position"),"x"===o?"top"!==i&&"bottom"!==i&&(i=l.bottom?"top":"bottom"):"left"!==i&&"right"!==i&&(i=l.left?"right":"left"),l[i]=!0,i="category"===(n=new _I(o,Dw(t),[0,0],t.get("type"),i)).type,n.onBand=i&&t.get("boundaryGap"),n.inverse=t.get("inverse"),(t.axis=n).model=t,n.grid=s,n.index=e,s._axesList.push(n),u[o][e]=n,h[o]++)}}N((this._axesMap=u).x,function(i,o){N(u.y,function(t,e){var n="x"+o+"y"+e,e=new mI(n);e.master=a,e.model=r,a._coordsMap[n]=e,a._coordsList.push(e),e.addAxis(i),e.addAxis(t)})})},wI.prototype._updateScale=function(t,i){function o(e,n){N(Rw(e,n.dim),function(t){n.scale.unionExtentFromData(e,t)})}N(this._axesList,function(t){var e;t.scale.setExtent(1/0,-1/0),"category"===t.type&&(e=t.model.get("categorySortInfo"),t.scale.setCategorySortInfo(e))}),t.eachSeries(function(t){var e,n;YM(t)&&(n=(e=UM(t)).xAxisModel,e=e.yAxisModel,SI(n,i)&&SI(e,i)&&(n=this.getCartesian(n.componentIndex,e.componentIndex),e=t.getData(),t=n.getAxis("x"),n=n.getAxis("y"),"list"===e.type&&(o(e,t),o(e,n))))},this)},wI.prototype.getTooltipAxes=function(n){var i=[],o=[];return N(this.getCartesians(),function(t){var e=null!=n&&"auto"!==n?t.getAxis(n):t.getBaseAxis(),t=t.getOtherAxis(e);L(i,e)<0&&i.push(e),L(o,t)<0&&o.push(t)}),{baseAxes:i,otherAxes:o}},wI.create=function(i,o){var r=[];return i.eachComponent("grid",function(t,e){var n=new wI(t,i,o);n.name="grid_"+e,n.resize(t,o,!0),t.coordinateSystem=n,r.push(n)}),i.eachSeries(function(t){var e,n,i;YM(t)&&(e=(i=UM(t)).xAxisModel,n=i.yAxisModel,i=e.getCoordSysModel().coordinateSystem,t.coordinateSystem=i.getCartesian(e.componentIndex,n.componentIndex))}),r},wI.dimensions=fI,nd=wI;function wI(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=fI,this._initCartesian(t,e,n),this.model=t}function SI(t,e){return t.getCoordSysModel()===e}function MI(t,e,n,i){n.getAxesOnZeroOf=function(){return o?[o]:[]};var o,r=t[e],e=n.model,n=e.get(["axisLine","onZero"]),e=e.get(["axisLine","onZeroAxisIndex"]);if(n){if(null!=e)II(r[e])&&(o=r[e]);else for(var a in r)if(r.hasOwnProperty(a)&&II(r[a])&&!i[s(r[a])]){o=r[a];break}o&&(i[s(o)]=!0)}function s(t){return t.dim+"_"+t.index}}function II(t){return t&&"category"!==t.type&&"time"!==t.type&&(e=(t=(e=t).scale.getExtent())[0],t=t[1],!(0<e&&0<t||e<0&&t<0));var e}Yf.register("cartesian2d",nd);var TI,vm=(l(CI,TI=Fy),CI.prototype.getInitialData=function(t,e){return Ib(this.getSource(),this,{useEncodeDefaulter:!0})},CI.prototype.getMarkerPosition=function(t){var e=this.coordinateSystem;if(e){var n=e.dataToPoint(e.clampData(t)),i=this.getData(),t=i.getLayout("offset"),i=i.getLayout("size");return n[e.getBaseAxis().isHorizontal()?0:1]+=t+i/2,n}return[NaN,NaN]},CI.type="series.__base_bar__",CI.defaultOption={zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},CI);function CI(){var t=null!==TI&&TI.apply(this,arguments)||this;return t.type=CI.type,t}Fy.registerClass(vm);var DI,nd=(l(AI,DI=vm),AI.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},AI.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return t<e&&(t=e),t},AI.prototype.brushSelector=function(t,e,n){return n.rect(e.getItemLayout(t))},AI.type="series.bar",AI.dependencies=["grid","polar"],AI.defaultOption=Xp(vm.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),AI);function AI(){var t=null!==DI&&DI.apply(this,arguments)||this;return t.type=AI.type,t}Fy.registerClass(nd);var LI,kI=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},PI=(l(OI,LI=Dr),OI.prototype.getDefaultShape=function(){return new kI},OI.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,o=Math.max(e.r0||0,0),r=Math.max(e.r,0),a=.5*(r-o),s=o+a,l=e.startAngle,u=e.endAngle,h=e.clockwise,c=Math.cos(l),p=Math.sin(l),d=Math.cos(u),e=Math.sin(u);(h?u-l<2*Math.PI:l-u<2*Math.PI)&&(t.moveTo(c*o+n,p*o+i),t.arc(c*s+n,p*s+i,a,-Math.PI+l,l,!h)),t.arc(n,i,r,l,u,!h),t.moveTo(d*r+n,e*r+i),t.arc(d*s+n,e*s+i,a,u-2*Math.PI,u-Math.PI,!h),0!==o&&(t.arc(n,i,o,u,l,h),t.moveTo(c*o+n,e*o+i)),t.closePath()},OI);function OI(t){t=LI.call(this,t)||this;return t.type="sausage",t}var RI=["itemStyle","borderWidth"],NI=["itemStyle","borderRadius"],EI=[0,0],zI=Math.max,BI=Math.min;var VI,nd=(l(FI,VI=tm),FI.prototype.render=function(t,e,n,i){this._model=t,this.removeOnRenderedListener(n),this._updateDrawMode(t);var o=t.get("coordinateSystem");"cartesian2d"!==o&&"polar"!==o||(this._isLargeDraw?this._renderLarge(t,e,n):this._renderNormal(t,e,n,i))},FI.prototype.incrementalPrepareRender=function(t){this._clear(),this._updateDrawMode(t),this._updateLargeClip(t)},FI.prototype.incrementalRender=function(t,e){this._incrementalRenderLarge(t,e)},FI.prototype._updateDrawMode=function(t){t=t.pipelineContext.large;null!=this._isLargeDraw&&t===this._isLargeDraw||(this._isLargeDraw=t,this._clear())},FI.prototype._renderNormal=function(a,t,e,n){var s,i=this,l=this.group,u=a.getData(),h=this._data,c=a.coordinateSystem,p=c.getBaseAxis();"cartesian2d"===c.type?s=p.isHorizontal():"polar"===c.type&&(s="angle"===p.dim);var d=a.isAnimationEnabled()?a:null,f=p.model,g=a.get("realtimeSort");if(g&&u.count()){if(this._isFirstFrame)return this._initSort(u,s,p,e),void(this._isFirstFrame=!1);this._onRendered=function(){i._updateSort(u,function(t){t=u.getItemGraphicEl(t);if(t){t=t.shape;return(s?t.y+t.height:t.x+t.width)||0}return 0},p,e)},e.getZr().on("rendered",this._onRendered)}var o,r,y,m=a.get("clip",!0)||g,v=(r=u,y=(o=c).getArea&&o.getArea(),aM(o,"cartesian2d")&&("category"===(o=o.getBaseAxis()).type&&o.onBand||(r=r.getLayout("bandWidth"),o.isHorizontal()?(y.x-=r,y.width+=2*r):(y.y-=r,y.height+=2*r))),y);l.removeClipPath();var x=a.get("roundCap",!0),_=a.get("showBackground",!0),b=a.getModel("backgroundStyle"),w=b.get("borderRadius")||0,S=[],M=this._backgroundEls,I=n&&n.isInitSort,T=n&&"changeAxisOrder"===n.type;function C(t){var e,n,i=XI[c.type](u,t),i=(e=s,n=i,new("polar"===(i=c).type?bs:ga)({shape:JI(e,n,i),silent:!0,z2:0}));return i.useStyle(b.getItemStyle()),"cartesian2d"===c.type&&i.setShape("r",w),S[t]=i}u.diff(h).add(function(t){var e,n,i=u.getItemModel(t),o=XI[c.type](u,t,i);_&&C(t),u.hasValue(t)&&(e=!1,m&&(e=GI[c.type](v,o)),YI(n=HI[c.type](a,u,t,o,s,d,p.model,!1,x),u,t,i,o,a,s,"polar"===c.type),I?n.attr({shape:o}):g?WI(a,f,d,n,o,t,s,!1,!1):Qc(n,{shape:o},a,t),u.setItemGraphicEl(t,n),l.add(n),n.ignore=e)}).update(function(t,e){var n,i=u.getItemModel(t),o=XI[c.type](u,t,i);_&&(n=void 0,0===M.length?n=C(e):((n=M[e]).useStyle(b.getItemStyle()),"cartesian2d"===c.type&&n.setShape("r",w),S[t]=n),r=XI[c.type](u,t),Jc(n,{shape:JI(s,r,c)},d,t));var r=h.getItemGraphicEl(e);if(!u.hasValue(t))return l.remove(r),void(r=null);e=!1;m&&(e=GI[c.type](v,o))&&l.remove(r),r=r||HI[c.type](a,u,t,o,s,d,p.model,!!r,x),T||YI(r,u,t,i,o,a,s,"polar"===c.type),I?r.attr({shape:o}):g?WI(a,f,d,r,o,t,s,!0,T):Jc(r,{shape:o},a,t,null),u.setItemGraphicEl(t,r),r.ignore=e,l.add(r)}).remove(function(t){var e=h.getItemGraphicEl(t);e&&np(e,a,t)}).execute();var D=this._backgroundGroup||(this._backgroundGroup=new $r);D.removeAll();for(var A=0;A<S.length;++A)D.add(S[A]);l.add(D),this._backgroundEls=S,this._data=u},FI.prototype._renderLarge=function(t,e,n){this._clear(),KI(t,this.group),this._updateLargeClip(t)},FI.prototype._incrementalRenderLarge=function(t,e){this._removeBackground(),KI(e,this.group,!0)},FI.prototype._updateLargeClip=function(t){t=t.get("clip",!0)?rM(t.coordinateSystem,!1,t):null;t?this.group.setClipPath(t):this.group.removeClipPath()},FI.prototype._dataSort=function(t,e){var n=[];t.each(function(t){n.push({mappedValue:e(t),ordinalNumber:t,beforeSortIndex:null})}),n.sort(function(t,e){return e.mappedValue-t.mappedValue});for(var i=0;i<n.length;++i)n[n[i].ordinalNumber].beforeSortIndex=i;return P(n,function(t){return{ordinalNumber:t.ordinalNumber,beforeSortIndex:t.beforeSortIndex}})},FI.prototype._isDataOrderChanged=function(t,e,n){if((n?n.length:0)!==t.count())return!0;for(var i=Number.MAX_VALUE,o=0;o<n.length;++o){var r=e(n[o].ordinalNumber);if(i<r)return!0;i=r}return!1},FI.prototype._updateSort=function(t,e,n,i){var o=n.scale.getCategorySortInfo();if(this._isDataOrderChanged(t,e,o))for(var r=this._dataSort(t,e),a=n.scale.getExtent(),s=a[0];s<a[1];++s)if(!o[s]||o[s].ordinalNumber!==r[s].ordinalNumber){this.removeOnRenderedListener(i);var l={type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:r};i.dispatchAction(l);break}},FI.prototype._initSort=function(e,n,t,i){t={type:"changeAxisOrder",componentType:t.dim+"Axis",isInitSort:!0,axisId:t.index,sortInfo:this._dataSort(e,function(t){return parseFloat(e.get(n?"y":"x",t))||0})};i.dispatchAction(t)},FI.prototype.remove=function(t,e){this._clear(this._model),this.removeOnRenderedListener(e)},FI.prototype.dispose=function(t,e){this.removeOnRenderedListener(e)},FI.prototype.removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},FI.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){np(t,e,Wh(t).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},FI.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},FI.type="bar",FI);function FI(){var t=VI.call(this)||this;return t.type=FI.type,t._isFirstFrame=!0,t}var GI={cartesian2d:function(t,e){var n=e.width<0?-1:1,i=e.height<0?-1:1;n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height);var o=zI(e.x,t.x),r=BI(e.x+e.width,t.x+t.width),a=zI(e.y,t.y),t=BI(e.y+e.height,t.y+t.height);e.x=o,e.y=a,e.width=r-o,e.height=t-a;a=e.width<0||e.height<0;return n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),a},polar:function(t,e){var n=e.r0<=e.r?1:-1;n<0&&(i=e.r,e.r=e.r0,e.r0=i);var i,o=BI(e.r,t.r),t=zI(e.r0,t.r0),t=(e.r=o)-(e.r0=t)<0;return n<0&&(i=e.r,e.r=e.r0,e.r0=i),t}},HI={cartesian2d:function(t,e,n,i,o,r,a,s,l){i=new ga({shape:O({},i),z2:1});return i.__dataIndex=n,i.name="item",r&&(i.shape[o?"height":"width"]=0),i},polar:function(t,e,n,i,o,r,a,s,l){var u=i.startAngle<i.endAngle,h=new(!o&&l?PI:bs)({shape:A({clockwise:u},i),z2:1});return h.name="item",r&&(l=o?"r":"endAngle",u={},h.shape[l]=o?0:i.startAngle,u[l]=i[l],(s?Jc:Qc)(h,{shape:u},r)),h}};function WI(t,e,n,i,o,r,a,s,l){var u;(n||e)&&(n=u=void 0,u=a?(n={x:o.x,width:o.width},{y:o.y,height:o.height}):(n={y:o.y,height:o.height},{x:o.x,width:o.width}),l||(s?Jc:Qc)(i,{shape:u},t,r,null),(s?Jc:Qc)(i,{shape:n},e,r))}var XI={cartesian2d:function(t,e,n){var i,e=t.getItemLayout(e),i=n?(r=e,i=(o=n).get(RI)||0,o=isNaN(r.width)?Number.MAX_VALUE:Math.abs(r.width),r=isNaN(r.height)?Number.MAX_VALUE:Math.abs(r.height),Math.min(i,o,r)):0,o=0<e.width?1:-1,r=0<e.height?1:-1;return{x:e.x+o*i/2,y:e.y+r*i/2,width:e.width-o*i,height:e.height-r*i}},polar:function(t,e,n){e=t.getItemLayout(e);return{cx:e.cx,cy:e.cy,r0:e.r0,r:e.r,startAngle:e.startAngle,endAngle:e.endAngle}}};function YI(t,e,n,i,o,r,a,s){var l=e.getItemVisual(n,"style");s||t.setShape("r",i.get(NI)||0),t.useStyle(l);var u=i.getShallow("cursor");u&&t.attr("cursor",u),s||(s=a?0<o.height?"bottom":"top":0<o.width?"left":"right",mp(t,a=vp(i),{labelFetcher:r,labelDataIndex:n,defaultText:CS(r.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:s}),Cp(t.getTextContent(),a,r.getRawValue(n),function(t){return DS(e,t)}));n=i.getModel(["emphasis"]);Lc(t,n.get("focus"),n.get("blurScope")),Rc(t,i),null!=(o=o).startAngle&&null!=o.endAngle&&o.startAngle===o.endAngle&&(t.style.fill="none",t.style.stroke="none",N(t.states,function(t){t.style&&(t.style.fill=t.style.stroke="none")}))}var UI,ZI=function(){},jI=(l(qI,UI=Dr),qI.prototype.getDefaultShape=function(){return new ZI},qI.prototype.buildPath=function(t,e){for(var n=e.points,i=this.__startPoint,o=this.__baseDimIdx,r=0;r<n.length;r+=2)i[o]=n[r+o],t.moveTo(i[0],i[1]),t.lineTo(n[r],n[r+1])},qI);function qI(t){t=UI.call(this,t)||this;return t.type="largeBar",t}function KI(t,e,n){var i=t.getData(),o=[],r=i.getLayout("valueAxisHorizontal")?1:0;o[1-r]=i.getLayout("valueAxisStart");var a,s,l,u,h=i.getLayout("largeDataIndices"),c=i.getLayout("barWidth"),p=t.getModel("backgroundStyle");t.get("showBackground",!0)&&(u=i.getLayout("largeBackgroundPoints"),(l=[])[1-r]=i.getLayout("backgroundStart"),(a=new jI({shape:{points:u},incremental:!!n,silent:!0,z2:0})).__startPoint=l,a.__baseDimIdx=r,a.__largeDataIndices=h,a.__barWidth=c,s=a,u=i,p=(l=p).get("borderColor")||l.get("color"),l=l.getItemStyle(),s.useStyle(l),s.style.fill=null,s.style.stroke=p,s.style.lineWidth=u.getLayout("barWidth"),e.add(a));n=new jI({shape:{points:i.getLayout("largePoints")},incremental:!!n});n.__startPoint=o,n.__baseDimIdx=r,n.__largeDataIndices=h,n.__barWidth=c,e.add(n),c=n,i=(e=i).getVisual("style"),c.useStyle(O({},i)),c.style.fill=null,c.style.stroke=i.fill,c.style.lineWidth=e.getLayout("barWidth"),Wh(n).seriesIndex=t.seriesIndex,t.get("silent")||(n.on("mousedown",$I),n.on("mousemove",$I))}var $I=hm(function(t){t=function(t,e,n){var i=t.__baseDimIdx,o=1-i,r=t.shape.points,a=t.__largeDataIndices,s=Math.abs(t.__barWidth/2),l=t.__startPoint[o];EI[0]=e,EI[1]=n;for(var n=EI[i],u=EI[1-i],h=n-s,c=n+s,p=0,d=r.length/2;p<d;p++){var f=2*p,g=r[f+i],f=r[f+o];if(h<=g&&g<=c&&(l<=f?l<=u&&u<=f:f<=u&&u<=l))return a[p]}return-1}(this,t.offsetX,t.offsetY);Wh(this).dataIndex=0<=t?t:null},30,!1);function JI(t,e,n){if(aM(n,"cartesian2d")){var i=e,o=n.getArea();return{x:(t?i:o).x,y:(t?o:i).y,width:(t?i:o).width,height:(t?o:i).height}}return{cx:(o=n.getArea()).cx,cy:o.cy,r0:(t?o:e).r0,r:(t?o:e).r,startAngle:t?e.startAngle:0,endAngle:t?e.endAngle:2*Math.PI}}function QI(t,e,n){e=F(e)?{coordDimensions:e}:O({},e);var i=t.getSource(),e=vb(i,e),t=new db(e,t);return t.initData(i,n),t}tm.registerClass(nd),A_({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var n=e.componentType||"series";t.eachComponent({mainType:n,query:e},function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)})}),k_(r.VISUAL.LAYOUT,V(Qb,"bar")),k_(r.VISUAL.PROGRESSIVE_LAYOUT,af),P_({seriesType:"bar",reset:function(t){t.getData().setVisual("legendSymbol","roundRect")}}),D_(r.PROCESSOR.STATISTIC,bM("bar"));var tT=(eT.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},eT.prototype.containName=function(t){return 0<=this._getRawData().indexOfName(t)},eT.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},eT.prototype.getItemVisual=function(t,e){return this._getDataWithEncodedVisual().getItemVisual(t,e)},eT);function eT(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}var nT,nd=(l(iT,nT=Fy),iT.prototype.init=function(t){nT.prototype.init.apply(this,arguments),this.legendVisualProvider=new tT(B(this.getData,this),B(this.getRawData,this)),this._defaultLabelLine(t)},iT.prototype.mergeOption=function(){nT.prototype.mergeOption.apply(this,arguments)},iT.prototype.getInitialData=function(){return QI(this,{coordDimensions:["value"],encodeDefaulter:V(wf,this)})},iT.prototype.getDataParams=function(t){var e=this.getData(),n=nT.prototype.getDataParams.call(this,t),i=[];return e.each(e.mapDimension("value"),function(t){i.push(t)}),n.percent=Gu(i,t,e.hostModel.get("percentPrecision")),n.$vars.push("percent"),n},iT.prototype._defaultLabelLine=function(t){uh(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},iT.type="series.pie",iT.defaultOption={zlevel:0,z:2,legendHoverLink:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},iT);function iT(){var t=null!==nT&&nT.apply(this,arguments)||this;return t.useColorPaletteOnData=!0,t}Fy.registerClass(nd);var oT=Math.PI/180;function rT(t,u,h,c,p,e,n,i,o,r){if(!(t.length<2)){for(var a,s=t.length,l=0;l<s;l++){"outer"===t[l].position&&"labelLine"===t[l].labelAlignTo&&(a=t[l].label.x-r,t[l].linePoints[1][0]+=a,t[l].label.x=r)}mv(t,o,o+n)&&function(t){for(var e,n,i,o,r,a={list:[],maxY:0},s={list:[],maxY:0},l=0;l<t.length;l++){"none"===t[l].labelAlignTo&&(n=(e=t[l]).label.y>h?s:a,(i=Math.abs(e.label.y-h))>n.maxY&&(r=(o=e.label.x-u-e.len2*p)<(r=c+e.len)?Math.sqrt(i*i/(1-o*o/r/r)):r,n.rB=r,n.maxY=i),n.list.push(e))}d(a),d(s)}(t)}function d(t){for(var e=t.rB,n=e*e,i=0;i<t.list.length;i++){var o=t.list[i],r=Math.abs(o.label.y-h),a=c+o.len,a=a*a,a=Math.sqrt((1-Math.abs(r*r/n))*a);o.label.x=u+(a+o.len2)*p}}}function aT(t){return"center"===t.position}function sT(t){var I,T,C=t.getData(),D=[],A=!1,L=(t.get("minShowLabelAngle")||0)*oT,e=C.getLayout("viewRect"),k=C.getLayout("r"),P=e.width,O=e.x,n=e.y,e=e.height;function R(t){t.ignore=!0}C.each(function(t){var e,n,i,o,r,a,s,l,u,h,c=C.getItemGraphicEl(t),p=c.shape,d=c.getTextContent(),f=c.getTextGuideLine(),g=C.getItemModel(t),y=g.getModel("label"),m=y.get("position")||g.get(["emphasis","label","position"]),v=y.get("distanceToLabelLine"),x=y.get("alignTo"),_=Nu(y.get("edgeDistance"),P),b=y.get("bleedMargin"),w=g.getModel("labelLine"),S=Nu(S=w.get("length"),P),M=Nu(M=w.get("length2"),P);if(Math.abs(p.endAngle-p.startAngle)<L)return N(d.states,R),void(d.ignore=!0);!function(t){if(!t.ignore)return 1;for(var e in t.states)if(!1===t.states[e].ignore)return 1}(d)||(h=(p.startAngle+p.endAngle)/2,e=Math.cos(h),n=Math.sin(h),I=p.cx,T=p.cy,i="inside"===m||"inner"===m,l="center"===m?(r=p.cx,a=p.cy,"center"):(r=(o=(i?(p.r+p.r0)/2*e:p.r*e)+I)+3*e,a=(t=(i?(p.r+p.r0)/2*n:p.r*n)+T)+3*n,i||(g=o+e*(S+k-p.r),l=t+n*(S+k-p.r),s=g+(e<0?-1:1)*M,r="edge"===x?e<0?O+_:O+P-_:s+(e<0?-v:v),s=[[o,t],[g,a=l],[s,l]]),i?"center":"edge"===x?0<e?"right":"left":0<e?"left":"right"),h="number"==typeof(y=y.get("rotate"))?y*(Math.PI/180):y?e<0?-h+Math.PI:-h:0,A=!!h,d.x=r,d.y=a,d.rotation=h,d.setStyle({verticalAlign:"middle"}),i?(d.setStyle({align:l}),(u=d.states.select)&&(u.x+=d.x,u.y+=d.y)):((h=d.getBoundingRect().clone()).applyTransform(d.getComputedTransform()),u=(d.style.margin||0)+2.1,h.y-=u/2,h.height+=u,D.push({label:d,labelLine:f,position:m,len:S,len2:M,minTurnAngle:w.get("minTurnAngle"),maxSurfaceAngle:w.get("maxSurfaceAngle"),surfaceNormal:new kn(e,n),linePoints:s,textAlign:l,labelDistance:v,labelAlignTo:x,edgeDistance:_,bleedMargin:b,rect:h})),c.setTextConfig({inside:i}))}),!A&&t.get("avoidLabelOverlap")&&function(t,e,n,i,o,r,a,s){for(var l=[],u=[],h=Number.MAX_VALUE,c=-Number.MAX_VALUE,p=0;p<t.length;p++){var d=t[p].label;aT(t[p])||(d.x<e?(h=Math.min(h,d.x),l.push(t[p])):(c=Math.max(c,d.x),u.push(t[p])))}for(rT(u,e,n,i,1,0,r,0,s,c),rT(l,e,n,i,-1,0,r,0,s,h),p=0;p<t.length;p++){var f,g,y,m,v=t[p],d=v.label;aT(v)||(f=v.linePoints)&&(g="edge"===v.labelAlignTo,y=v.rect.width,m=void 0,(m=g?d.x<e?f[2][0]-v.labelDistance-a-v.edgeDistance:a+o-v.edgeDistance-f[2][0]-v.labelDistance:d.x<e?d.x-a-v.bleedMargin:a+o-d.x-v.bleedMargin)<v.rect.width&&(v.label.style.width=m,"edge"===v.labelAlignTo&&(y=m)),m=f[1][0]-f[2][0],g?d.x<e?f[2][0]=a+v.edgeDistance+y+v.labelDistance:f[2][0]=a+o-v.edgeDistance-y-v.labelDistance:(d.x<e?f[2][0]=d.x+v.labelDistance:f[2][0]=d.x-v.labelDistance,f[1][0]=f[2][0]+m),f[1][1]=f[2][1]=d.y)}}(D,I,T,k,P,e,O,n);for(var i=0;i<D.length;i++){var o,r=D[i],a=r.label,s=r.labelLine,l=isNaN(a.x)||isNaN(a.y);a&&(a.setStyle({align:r.textAlign}),l&&(N(a.states,R),a.ignore=!0),(o=a.states.select)&&(o.x+=a.x,o.y+=a.y)),s&&(o=r.linePoints,l||!o?(N(s.states,R),s.ignore=!0):(cv(o,r.minTurnAngle),function(t,e,n){if(n<=180&&0<n){n=n/180*Math.PI,iv.fromArray(t[0]),ov.fromArray(t[1]),rv.fromArray(t[2]),kn.sub(av,ov,iv),kn.sub(sv,rv,ov);var i=av.len(),o=sv.len();if(!(i<.001||o<.001))if(av.scale(1/i),sv.scale(1/o),av.dot(e)<Math.cos(n)){i=Qm(ov.x,ov.y,rv.x,rv.y,iv.x,iv.y,uv,!1);hv.fromArray(uv);o=Math.PI/2,n=o+Math.acos(sv.dot(e))-n;if(o<=n)kn.copy(hv,rv);else{hv.scaleAndAdd(sv,i/Math.tan(Math.PI/2-n));n=rv.x!==ov.x?(hv.x-ov.x)/(rv.x-ov.x):(hv.y-ov.y)/(rv.y-ov.y);if(isNaN(n))return;n<0?kn.copy(hv,ov):1<n&&kn.copy(hv,rv)}hv.toArray(t[1])}}}(o,r.surfaceNormal,r.maxSurfaceAngle),s.setShape({points:o}),a.__hostTarget.textGuideLineConfig={anchor:new kn(o[0][0],o[0][1])}))}}function lT(t,e){t=t.get("borderRadius");return null==t?null:(F(t)||(t=[t,t]),{innerCornerRadius:ti(t[0],e.r0),cornerRadius:ti(t[1],e.r)})}var uT,hT=(l(cT,uT=bs),cT.prototype.updateData=function(t,e,n,i){var o=this,r=t.hostModel,a=t.getItemModel(e),s=a.getModel("emphasis"),l=t.getItemLayout(e),u=O(lT(a.getModel("itemStyle"),l)||{},l);i?(o.setShape(u),"scale"===r.getShallow("animationType")?(o.shape.r=l.r0,Qc(o,{shape:{r:l.r}},r,e)):null!=n?(o.setShape({startAngle:n,endAngle:n}),Qc(o,{shape:{startAngle:l.startAngle,endAngle:l.endAngle}},r,e)):(o.shape.endAngle=l.startAngle,Jc(o,{shape:{endAngle:l.endAngle}},r,e))):Jc(o,{shape:u},r,e),o.useStyle(t.getItemVisual(e,"style")),Rc(o,a);i=(l.startAngle+l.endAngle)/2,n=r.get("selectedOffset"),u=Math.cos(i)*n,i=Math.sin(i)*n,n=a.getShallow("cursor");n&&o.attr("cursor",n),this._updateLabel(r,t,e),o.ensureState("emphasis").shape=h({r:l.r+(s.get("scale")&&s.get("scaleSize")||0)},lT(s.getModel("itemStyle"),l)),O(o.ensureState("select"),{x:u,y:i,shape:lT(a.getModel(["select","itemStyle"]),l)}),O(o.ensureState("blur"),{shape:lT(a.getModel(["blur","itemStyle"]),l)});l=o.getTextGuideLine(),o=o.getTextContent();O(l.ensureState("select"),{x:u,y:i}),O(o.ensureState("select"),{x:u,y:i}),Lc(this,s.get("focus"),s.get("blurScope"))},cT.prototype._updateLabel=function(t,e,n){var i=e.getItemModel(n),o=i.getModel("labelLine"),r=e.getItemVisual(n,"style"),a=r&&r.fill,r=r&&r.opacity;mp(this,vp(i),{labelFetcher:e.hostModel,labelDataIndex:n,inheritColor:a,defaultOpacity:r,defaultText:t.getFormattedLabel(n,"normal")||e.getName(n)});n=this.getTextContent();this.setTextConfig({position:null,rotation:null}),n.attr({z2:10}),fv(this,gv(i),{stroke:a,opacity:et(o.get(["lineStyle","opacity"]),r,1)})},cT);function cT(t,e,n){var i=uT.call(this)||this;i.z2=2;var o=new Ra,r=new vl;return i.setTextGuideLine(o),i.setTextContent(r),i.updateData(t,e,n,!0),i}var pT,af=(l(dT,pT=tm),dT.prototype.init=function(){var t=new $r;this._sectorGroup=t},dT.prototype.render=function(e,t,n,i){var o,r=e.getData(),a=this._data,s=this.group;if(!a&&0<r.count()){for(var l=r.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u<r.count();++u)l=r.getItemLayout(u);l&&(o=l.startAngle)}r.diff(a).add(function(t){var e=new hT(r,t,o);r.setItemGraphicEl(t,e),s.add(e)}).update(function(t,e){e=a.getItemGraphicEl(e);e.updateData(r,t,o),e.off("click"),s.add(e),r.setItemGraphicEl(t,e)}).remove(function(t){np(a.getItemGraphicEl(t),e,t)}).execute(),sT(e),"expansion"!==e.get("animationTypeUpdate")&&(this._data=r)},dT.prototype.dispose=function(){},dT.prototype.containPoint=function(t,e){var n=e.getData().getItemLayout(0);if(n){e=t[0]-n.cx,t=t[1]-n.cy,t=Math.sqrt(e*e+t*t);return t<=n.r&&t>=n.r0}},dT.type="pie",dT);function dT(){var t=null!==pT&&pT.apply(this,arguments)||this;return t.ignoreLabelLineUpdate=!0,t}tm.registerClass(af);var fT=2*Math.PI,gT=Math.PI/180;function yT(t){return{seriesType:t,reset:function(t,e){var i,o=e.findComponents({mainType:"legend"});o&&o.length&&(i=t.getData()).filterSelf(function(t){for(var e=i.getName(t),n=0;n<o.length;n++)if(!o[n].isSelected(e))return!1;return!0})}}}Cv("pie",A_),k_(V(function(t,e,C){e.eachSeriesByType(t,function(t){var o=t.getData(),e=o.mapDimension("value"),n=(l=C,Yd(t.getBoxLayoutParams(),{width:l.getWidth(),height:l.getHeight()})),i=t.get("center"),r=t.get("radius");F(r)||(r=[0,r]),F(i)||(i=[i,i]);var a=Nu(n.width,C.getWidth()),s=Nu(n.height,C.getHeight()),l=Math.min(a,s),u=Nu(i[0],a)+n.x,h=Nu(i[1],s)+n.y,c=Nu(r[0],l/2),p=Nu(r[1],l/2),d=-t.get("startAngle")*gT,f=t.get("minAngle")*gT,g=0;o.each(e,function(t){isNaN(t)||g++});var y=o.getSum(e),m=Math.PI/(y||g)*2,v=t.get("clockwise"),x=t.get("roseType"),_=t.get("stillShowZeroSum"),b=o.getDataExtent(e);b[0]=0;var w,S=fT,M=0,I=d,T=v?1:-1;o.setLayout({viewRect:n,r:p}),o.each(e,function(t,e){var n,i;isNaN(t)?o.setItemLayout(e,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:v,cx:u,cy:h,r0:c,r:x?NaN:p}):((n="area"!==x?0===y&&_?m:t*m:fT/g)<f?S-=n=f:M+=t,i=I+T*n,o.setItemLayout(e,{angle:n,startAngle:I,endAngle:i,clockwise:v,cx:u,cy:h,r0:c,r:x?Ru(t,b,[c,p]):p}),I=i)}),S<fT&&g&&(S<=.001?(w=fT/g,o.each(e,function(t,e){isNaN(t)||((t=o.getItemLayout(e)).angle=w,t.startAngle=d+T*e*w,t.endAngle=d+T*(e+1)*w)})):(m=S/M,I=d,o.each(e,function(t,e){isNaN(t)||(t=(e=o.getItemLayout(e)).angle===f?f:t*m,e.startAngle=I,e.endAngle=I+T*t,I+=T*t)})))})},"pie")),D_(yT("pie"));var mT,nd=(l(vT,mT=Fy),vT.prototype.getInitialData=function(t,e){return Ib(this.getSource(),this,{useEncodeDefaulter:!0})},vT.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},vT.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},vT.prototype.brushSelector=function(t,e,n){return n.point(e.getItemLayout(t))},vT.type="series.scatter",vT.dependencies=["grid","polar","geo","singleAxis","calendar"],vT.defaultOption={coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}}},vT);function vT(){var t=null!==mT&&mT.apply(this,arguments)||this;return t.type=vT.type,t.hasSymbolVisual=!0,t}Fy.registerClass(nd);var xT,_T=function(){},bT=(l(wT,xT=Dr),wT.prototype.getDefaultShape=function(){return new _T},wT.prototype.buildPath=function(t,e){var n=e.points,i=e.size,o=this.symbolProxy,r=o.shape,e=t.getContext?t.getContext():t;if(e&&i[0]<4)this._ctx=e;else{this._ctx=null;for(var a=0;a<n.length;){var s=n[a++],l=n[a++];isNaN(s)||isNaN(l)||this.softClipShape&&!this.softClipShape.contain(s,l)||(r.x=s-i[0]/2,r.y=l-i[1]/2,r.width=i[0],r.height=i[1],o.buildPath(t,r,!0))}}},wT.prototype.afterBrush=function(){var t=this.shape,e=t.points,n=t.size,i=this._ctx;if(i)for(var o=0;o<e.length;){var r=e[o++],a=e[o++];isNaN(r)||isNaN(a)||this.softClipShape&&!this.softClipShape.contain(r,a)||i.fillRect(r-n[0]/2,a-n[1]/2,n[0],n[1])}},wT.prototype.findDataIndex=function(t,e){for(var n=this.shape,i=n.points,n=n.size,o=Math.max(n[0],4),r=Math.max(n[1],4),a=i.length/2-1;0<=a;a--){var s=2*a,l=i[s]-o/2,s=i[1+s]-r/2;if(l<=t&&s<=e&&t<=l+o&&e<=s+r)return a}return-1},wT);function wT(t){return xT.call(this,t)||this}var ST=(MT.prototype.isPersistent=function(){return!this._incremental},MT.prototype.updateData=function(t,e){this.group.removeAll();var n=new bT({rectHover:!0,cursor:"default"});n.setShape({points:t.getLayout("points")}),this._setCommon(n,t,!1,e),this.group.add(n),this._incremental=null},MT.prototype.updateLayout=function(t){var i;this._incremental||(i=t.getLayout("points"),this.group.eachChild(function(t){var e,n;null!=t.startIndex&&(e=2*(t.endIndex-t.startIndex),n=4*t.startIndex*2,i=new Float32Array(i.buffer,n,e)),t.setShape("points",i)}))},MT.prototype.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),2e6<t.count()?(this._incremental||(this._incremental=new Js({silent:!0})),this.group.add(this._incremental)):this._incremental=null},MT.prototype.incrementalUpdate=function(t,e,n){var i;this._incremental?(i=new bT,this._incremental.addDisplayable(i,!0)):((i=new bT({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end})).incremental=!0,this.group.add(i)),i.setShape({points:e.getLayout("points")}),this._setCommon(i,e,!!this._incremental,n)},MT.prototype._setCommon=function(e,t,n,i){var o=t.hostModel;i=i||{};var r=t.getVisual("symbolSize");e.setShape("size",r instanceof Array?r:[r,r]),e.softClipShape=i.clipShape||null,e.symbolProxy=px(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;i=e.shape.size[0]<4;e.useStyle(o.getModel("itemStyle").getItemStyle(i?["color","shadowBlur","shadowColor"]:["color"]));var a,t=t.getVisual("style"),t=t&&t.fill;t&&e.setColor(t),n||((a=Wh(e)).seriesIndex=o.seriesIndex,e.on("mousemove",function(t){a.dataIndex=null;t=e.findDataIndex(t.offsetX,t.offsetY);0<=t&&(a.dataIndex=t+(e.startIndex||0))}))},MT.prototype.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},MT.prototype._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},MT);function MT(){this.group=new $r}var IT,af=(l(TT,IT=tm),TT.prototype.render=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},TT.prototype.incrementalPrepareRender=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).incrementalPrepareUpdate(i),this._finished=!1},TT.prototype.incrementalRender=function(t,e,n){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},TT.prototype.updateTransform=function(t,e,n){var i=t.getData();if(this.group.dirty(),!this._finished||1e4<i.count()||!this._symbolDraw.isPersistent())return{update:!0};n=vM("").reset(t,e,n);n.progress&&n.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},TT.prototype._getClipShape=function(t){var e=t.coordinateSystem,e=e&&e.getArea&&e.getArea();return t.get("clip",!0)?e:null},TT.prototype._updateSymbolDraw=function(t,e){var n=this._symbolDraw,e=e.pipelineContext.large;return n&&e===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=new(e?ST:ES),this._isLargeDraw=e,this.group.removeAll()),this.group.add(n.group),n},TT.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},TT.prototype.dispose=function(){},TT.type="scatter",TT);function TT(){var t=null!==IT&&IT.apply(this,arguments)||this;return t.type=TT.type,t}tm.registerClass(af),k_(vM("scatter"));var CT,DT=(l(AT,CT=mu),AT);function AT(t,e,n){n=CT.call(this,t,e,n)||this;return n.type="value",n.angle=0,n.name="",n}LT.prototype.getIndicatorAxes=function(){return this._indicatorAxes},LT.prototype.dataToPoint=function(t,e){var n=this._indicatorAxes[e];return this.coordToPoint(n.dataToCoord(t),e)},LT.prototype.coordToPoint=function(t,e){e=this._indicatorAxes[e].angle;return[this.cx+t*Math.cos(e),this.cy-t*Math.sin(e)]},LT.prototype.pointToData=function(t){var e=t[0]-this.cx,n=t[1]-this.cy,t=Math.sqrt(e*e+n*n);e/=t,n/=t;for(var i,o=Math.atan2(-n,e),r=1/0,a=-1,s=0;s<this._indicatorAxes.length;s++){var l=this._indicatorAxes[s],u=Math.abs(o-l.angle);u<r&&(i=l,a=s,r=u)}return[a,+(i&&i.coordToData(t))]},LT.prototype.resize=function(t,e){var n=t.get("center"),i=e.getWidth(),o=e.getHeight(),e=Math.min(i,o)/2;this.cx=Nu(n[0],i),this.cy=Nu(n[1],o),this.startAngle=t.get("startAngle")*Math.PI/180;t=t.get("radius");"string"!=typeof t&&"number"!=typeof t||(t=[0,t]),this.r0=Nu(t[0],e),this.r=Nu(t[1],e),N(this._indicatorAxes,function(t,e){t.setExtent(this.r0,this.r);e=this.startAngle+e*Math.PI*2/this._indicatorAxes.length,e=Math.atan2(Math.sin(e),Math.cos(e));t.angle=e},this)},LT.prototype.update=function(i,t){var o=this._indicatorAxes,r=this._model;N(o,function(t){t.scale.setExtent(1/0,-1/0)}),i.eachSeriesByType("radar",function(t,e){var n;"radar"===t.get("coordinateSystem")&&i.getComponent("radar",t.get("radarIndex"))===r&&(n=t.getData(),N(o,function(t){t.scale.unionExtentFromData(n,n.mapDimension(t.dim))}))},this);var h=r.get("splitNumber");function c(t){var e=Math.pow(10,Math.floor(Math.log(t)/Math.LN10)),t=t/e;return 2===t?t=5:t*=2,t*e}N(o,function(t,e){var n=Tw(t.scale,t.model).extent;Cw(t.scale,t.model);var i=t.model,o=t.scale,r=Iw(o,i.get("min",!0)),a=Iw(o,i.get("max",!0)),s=o.getInterval();if(null!=r&&null!=a)o.setExtent(+r,+a),o.setInterval((a-r)/h);else if(null!=r)for(var l=void 0;l=r+s*h,o.setExtent(+r,l),o.setInterval(s),s=c(s),l<n[1]&&isFinite(l)&&isFinite(n[1]););else if(null!=a)for(var u=void 0;u=a-s*h,o.setExtent(u,+a),o.setInterval(s),s=c(s),u>n[0]&&isFinite(u)&&isFinite(n[0]););else{i=o.getTicks().length-1;h<i&&(s=c(s));u=Eu((l=Math.ceil(n[1]/s)*s)-s*h);o.setExtent(u,l),o.setInterval(s)}})},LT.prototype.convertToPixel=function(t,e,n){return console.warn("Not implemented."),null},LT.prototype.convertFromPixel=function(t,e,n){return console.warn("Not implemented."),null},LT.prototype.containPoint=function(t){return console.warn("Not implemented."),!1},LT.create=function(t,n){var i=[];return t.eachComponent("radar",function(t){var e=new LT(t,0,n);i.push(e),t.coordinateSystem=e}),t.eachSeriesByType("radar",function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("radarIndex")||0])}),i},LT.dimensions=[],nd=LT;function LT(t,e,n){this.dimensions=[],this._model=t,this._indicatorAxes=P(t.getIndicatorModels(),function(t,e){var n="indicator_"+e,e=new DT(n,new Wb);return e.name=t.get("name"),(e.model=t).axis=e,this.dimensions.push(n),e},this),this.resize(t,n)}Yf.register("radar",nd);af=wM.value;function kT(t,e){return A({show:e},t)}var PT,nd=(l(OT,PT=nf),OT.prototype.optionUpdated=function(){var n=this.get("boundaryGap"),i=this.get("splitNumber"),o=this.get("scale"),r=this.get("axisLine"),a=this.get("axisTick"),s=this.get("axisLabel"),l=this.get("axisName"),u=this.get(["axisName","show"]),h=this.get(["axisName","formatter"]),c=this.get("axisNameGap"),p=this.get("triggerEvent"),t=P(this.get("indicator")||[],function(t){null!=t.max&&0<t.max&&!t.min?t.min=0:null!=t.min&&t.min<0&&!t.max&&(t.max=0);var e=l;null!=t.color&&(e=A({color:t.color},l));t=b(C(t),{boundaryGap:n,splitNumber:i,scale:o,axisLine:r,axisTick:a,axisLabel:s,name:t.text,nameLocation:"end",nameGap:c,nameTextStyle:e,triggerEvent:p},!1);u||(t.name=""),"string"==typeof h?(e=t.name,t.name=h.replace("{value}",null!=e?e:"")):"function"==typeof h&&(t.name=h(t.name,t));t=new Fp(t,null,this.ecModel);return I(t,Ew.prototype),t.mainType="radar",t.componentIndex=this.componentIndex,t},this);this._indicatorModels=t},OT.prototype.getIndicatorModels=function(){return this._indicatorModels},OT.type="radar",OT.defaultOption={zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:b({lineStyle:{color:"#bbb"}},af.axisLine),axisLabel:kT(af.axisLabel,!1),axisTick:kT(af.axisTick,!1),splitLine:kT(af.splitLine,!0),splitArea:kT(af.splitArea,!0),indicator:[]},OT);function OT(){var t=null!==PT&&PT.apply(this,arguments)||this;return t.type=OT.type,t}nf.registerClass(nd);var RT,NT=["axisLine","axisTickLabel","axisName"],af=(l(ET,RT=qy),ET.prototype.render=function(t,e,n){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},ET.prototype._buildAxes=function(t){var e=t.coordinateSystem;N(P(e.getIndicatorAxes(),function(t){return new AM(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}),function(t){N(NT,t.add,t),this.group.add(t.getGroup())},this)},ET.prototype._buildSplitLineAndArea=function(t){var n=t.coordinateSystem,e=n.getIndicatorAxes();if(e.length){var i=t.get("shape"),o=t.getModel("splitLine"),r=t.getModel("splitArea"),a=o.getModel("lineStyle"),t=r.getModel("areaStyle"),s=o.get("show"),l=r.get("show"),o=a.get("color"),r=t.get("color"),u=F(o)?o:[o],h=F(r)?r:[r],c=[],p=[];if("circle"===i)for(var d=e[0].getTicksCoords(),f=n.cx,g=n.cy,y=0;y<d.length;y++){s&&c[M(c,u,y)].push(new aa({shape:{cx:f,cy:g,r:d[y].coord}})),l&&y<d.length-1&&p[M(p,h,y)].push(new $l({shape:{cx:f,cy:g,r0:d[y].coord,r:d[y+1].coord}}))}else for(var m,v=P(e,function(t,e){t=t.getTicksCoords();return m=null==m?t.length-1:Math.min(t.length-1,m),P(t,function(t){return n.coordToPoint(t.coord,e)})}),x=[],y=0;y<=m;y++){for(var _=[],b=0;b<e.length;b++)_.push(v[b][y]);_[0]&&_.push(_[0].slice()),s&&c[M(c,u,y)].push(new Ra({shape:{points:_}})),l&&x&&p[M(p,h,y-1)].push(new La({shape:{points:_.concat(x)}})),x=_.slice().reverse()}var w=a.getLineStyle(),S=t.getAreaStyle();N(p,function(t,e){this.group.add(jc(t,{style:A({stroke:"none",fill:h[e%h.length]},S),silent:!0}))},this),N(c,function(t,e){this.group.add(jc(t,{style:A({fill:"none",stroke:u[e%u.length]},w),silent:!0}))},this)}function M(t,e,n){e=n%e.length;return t[e]=t[e]||[],e}},ET.type="radar",ET);function ET(){var t=null!==RT&&RT.apply(this,arguments)||this;return t.type=ET.type,t}qy.registerClass(af);var zT,nd=(l(BT,zT=Fy),BT.prototype.init=function(t){zT.prototype.init.apply(this,arguments),this.legendVisualProvider=new tT(B(this.getData,this),B(this.getRawData,this))},BT.prototype.getInitialData=function(t,e){return QI(this,{generateCoord:"indicator_",generateCoordCount:1/0})},BT.prototype.formatTooltip=function(n,t,e){var i=this.getData(),o=this.coordinateSystem.getIndicatorAxes(),r=this.getData().getName(n),r=""===r?this.name:r,a=Py(this,n);return Iy("section",{header:r,sortBlocks:!0,blocks:P(o,function(t){var e=i.get(i.mapDimension(t.dim),n);return Iy("nameValue",{markerType:"subItem",markerColor:a,name:t.name,value:e,sortParam:e})})})},BT.prototype.getTooltipPosition=function(t){if(null!=t)for(var e=this.getData(),n=this.coordinateSystem,i=e.getValues(P(n.dimensions,function(t){return e.mapDimension(t)}),t),o=0,r=i.length;o<r;o++)if(!isNaN(i[o])){var a=n.getIndicatorAxes();return n.coordToPoint(a[o].dataToCoord(i[o]),o)}},BT.type="series.radar",BT.dependencies=["radar"],BT.defaultOption={zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4},BT);function BT(){var t=null!==zT&&zT.apply(this,arguments)||this;return t.type=BT.type,t.useColorPaletteOnData=!0,t.hasSymbolVisual=!0,t}Fy.registerClass(nd);var VT,af=(l(FT,VT=tm),FT.prototype.render=function(l,t,e){var n=l.coordinateSystem,h=this.group,c=l.getData(),a=this._data;function u(t,e){var n=t.getItemVisual(e,"symbol")||"circle";if("none"!==n){var i,i=(F(i=t.getItemVisual(e,"symbolSize"))||(i=[+i,+i]),i),n=px(n,-1,-1,2,2),e=t.getItemVisual(e,"symbolRotate")||0;return n.attr({style:{strokeNoScale:!0},z2:100,scaleX:i[0]/2,scaleY:i[1]/2,rotation:e*Math.PI/180||0}),n}}function s(t,e,n,i,o,r){n.removeAll();for(var a=0;a<e.length-1;a++){var s=u(i,o);s&&(t[s.__dimIdx=a]?(s.setPosition(t[a]),dp[r?"initProps":"updateProps"](s,{x:e[a][0],y:e[a][1]},l,o)):s.setPosition(e[a]),n.add(s))}}function p(t){return P(t,function(t){return[n.cx,n.cy]})}c.diff(a).add(function(t){var e,n,i,o,r=c.getItemLayout(t);r&&(e=new La,n=new Ra,o={shape:{points:r}},e.shape.points=p(r),n.shape.points=p(r),Qc(e,o,l,t),Qc(n,o,l,t),i=new $r,o=new $r,i.add(n),i.add(e),i.add(o),s(n.shape.points,r,o,c,t,!0),c.setItemGraphicEl(t,i))}).update(function(t,e){var n=a.getItemGraphicEl(e),i=n.childAt(0),o=n.childAt(1),r=n.childAt(2),e={shape:{points:c.getItemLayout(t)}};e.shape.points&&(s(i.shape.points,e.shape.points,r,c,t,!1),Jc(i,e,l),Jc(o,e,l),c.setItemGraphicEl(t,n))}).remove(function(t){h.remove(a.getItemGraphicEl(t))}).execute(),c.eachItemGraphicEl(function(t,n){var i=c.getItemModel(n),e=t.childAt(0),o=t.childAt(1),r=t.childAt(2),a=c.getItemVisual(n,"style"),s=a.fill;h.add(t),e.useStyle(A(i.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:s})),Rc(e,i,"lineStyle"),Rc(o,i,"areaStyle");var e=i.getModel("areaStyle"),l=e.isEmpty()&&e.parentModel.isEmpty();o.ignore=l,N(["emphasis","select","blur"],function(t){var e=i.getModel([t,"areaStyle"]),e=e.isEmpty()&&e.parentModel.isEmpty();o.ensureState(t).ignore=e&&l}),o.useStyle(A(e.getAreaStyle(),{fill:s,opacity:.7,decal:a.decal}));var e=i.getModel("emphasis"),u=e.getModel("itemStyle").getItemStyle();r.eachChild(function(t){t instanceof na?(e=t.style,t.useStyle(O({image:e.image,x:e.x,y:e.y,width:e.width,height:e.height},a))):(t.useStyle(a),t.setColor(s)),t.ensureState("emphasis").style=C(u);var e=c.get(c.dimensions[t.__dimIdx],n);null!=e&&!isNaN(e)||(e=""),mp(t,vp(i),{labelFetcher:c.hostModel,labelDataIndex:n,labelDimIndex:t.__dimIdx,defaultText:e,inheritColor:s,defaultOpacity:a.opacity})}),Lc(t,e.get("focus"),e.get("blurScope"))}),this._data=c},FT.prototype.remove=function(){this.group.removeAll(),this._data=null},FT.type="radar",FT);function FT(){var t=null!==VT&&VT.apply(this,arguments)||this;return t.type=FT.type,t}function GT(t){return!isNaN(t[0])&&!isNaN(t[1])}function HT(t){return[t.cx,t.cy]}tm.registerClass(af),k_(function(t){t.eachSeriesByType("radar",function(t){var e,i=t.getData(),o=[],r=t.coordinateSystem;r&&(N(e=r.getIndicatorAxes(),function(t,n){i.each(i.mapDimension(e[n].dim),function(t,e){o[e]=o[e]||[];t=r.dataToPoint(t,n);o[e][n]=GT(t)?t:HT(r)})}),i.each(function(t){var e=E(o[t],GT)||HT(r);o[t].push(e.slice()),i.setItemLayout(t,o[t])}))})}),D_(yT("radar")),C_(function(n){var i,t=n.polar;t&&(F(t)||(t=[t]),i=[],N(t,function(t,e){t.indicator?(t.type&&!t.shape&&(t.shape=t.type),n.radar=n.radar||[],F(n.radar)||(n.radar=[n.radar]),n.radar.push(t)):i.push(t)}),n.polar=i),N(n.series,function(t){t&&"radar"===t.type&&t.polarIndex&&(t.radarIndex=t.polarIndex)})});for(var WT=[126,25],XT=[[[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]]],YT=0;YT<XT.length;YT++)for(var UT=0;UT<XT[YT].length;UT++)XT[YT][UT][0]/=10.5,XT[YT][UT][1]/=-14,XT[YT][UT][0]+=WT[0],XT[YT][UT][1]+=WT[1];var ZT={"南海诸岛":[32,80],"广东":[0,-10],"香港":[10,5],"澳门":[-10,10],"天津":[5,5]};var jT={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]};var qT=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];var KT=_h();var $T=_h();function JT(t,e){var n,i,o,r=t.svgXML;try{ot(null!=(a=(n=r&&(i=r,o={ignoreViewBox:!0,ignoreRootClip:!0},(new ja).parse(i,o))||{}).root))}catch(t){throw new Error("Invalid svg format\n"+t.message)}var a,s=n.width,l=n.height,t=n.viewBoxRect;return e||(e=null==s||null==l?a.getBoundingRect():new Gn(0,0,0,0),null!=s&&(e.width=s),null!=l&&(e.height=l)),t&&(l=rs(t,e.width,e.height),t=a,(a=new $r).add(t),t.scaleX=t.scaleY=l.scale,t.x=l.x,t.y=l.y),a.setClipPath(new ga({shape:e.plain()})),{root:a,boundingRect:e}}var QT={geoJSON:{load:function(o,t,e){var n=KT(t).parsed;if(n)return n;var i,r=t.specialAreas||{},a=t.geoJSON;try{i=a?Xw(a,e):[]}catch(t){throw new Error("Invalid geoJson format\n"+t.message)}return n=i,"china"===o&&n.push(new Gw("南海诸岛",P(XT,function(t){return{type:"polygon",exterior:t}}),WT)),N(i,function(t){var e,n,i=t.name;e=t,"china"!==(n=o)||(n=ZT[e.name])&&((e=e.center)[0]+=n[0]/10.5,e[1]+=-n[1]/14),e=t,"world"!==(n=o)||(n=jT[e.name])&&((e=e.center)[0]=n[0],e[1]=n[1]),n=t,"china"===o&&"台湾"===n.name&&n.geometries.push({type:"polygon",exterior:qT[0]});i=r[i];i&&t.transformTo(i.left,i.top,i.width,i.height)}),KT(t).parsed={regions:i,boundingRect:function(t){for(var e,n=0;n<t.length;n++){var i=t[n].getBoundingRect();(e=e||i.clone()).union(i)}return e}(i)}}},svg:{load:function(t,e){var n=$T(e).originRoot;if(n)return{root:n,boundingRect:$T(e).boundingRect};n=JT(e);return $T(e).originRoot=n.root,$T(e).boundingRect=n.boundingRect,n},makeGraphic:function(t,e,n){var i=$T(e),o=i.rootMap||(i.rootMap=ct());if(s=o.get(n))return s;var r=i.originRoot,a=i.boundingRect,s=i.originRootHostKey?JT(e,a).root:(i.originRootHostKey=n,r);return o.set(n,s)},removeGraphic:function(t,e,n){var i=$T(e),e=i.rootMap;e&&e.removeKey(n),n===i.originRootHostKey&&(i.originRootHostKey=null)}}},tC=function(e,n,i){var o,r=[],a=ct(),s=ct();return N(iC(e),function(t){t=QT[t.type].load(e,t,i);N(t.regions,function(t){var e=t.name;n&&n.hasOwnProperty(e)&&(t=t.cloneShallow(e=n[e])),r.push(t),a.set(e,t),s.set(e,t.center)});t=t.boundingRect;t&&(o?o.union(t):o=t.clone())}),{regions:r,regionsMap:a,nameCoordMap:s,boundingRect:o||new Gn(0,0,0,0)}},eC=function(n,i){var t=iC(n),o=[];return N(t,function(t){var e=QT[t.type].makeGraphic;e&&o.push(e(n,t,i))}),o},nC=function(n,i){N(iC(n),function(t){var e=QT[t.type].makeGraphic;e&&e(n,t,i)})};function iC(t){t=Wm(t)||[];return t}var oC,nd=(l(rC,oC=Fy),rC.prototype.getInitialData=function(t){for(var e=QI(this,{coordDimensions:["value"],encodeDefaulter:V(wf,this)}),n=ct(),i=[],o=0,r=e.count();o<r;o++){var a=e.getName(o);n.set(a,!0)}return N(tC(this.getMapType(),this.option.nameMap,this.option.nameProperty).regions,function(t){t=t.name;n.get(t)||i.push(t)}),e.appendValues([],i),e},rC.prototype.getHostGeoModel=function(){var t=this.option.geoIndex;return null!=t?this.ecModel.getComponent("geo",t):null},rC.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},rC.prototype.getRawValue=function(t){var e=this.getData();return e.get(e.mapDimension("value"),t)},rC.prototype.getRegionModel=function(t){var e=this.getData();return e.getItemModel(e.indexOfName(t))},rC.prototype.formatTooltip=function(t,e,n){for(var i=this.getData(),o=this.getRawValue(t),r=i.getName(t),a=this.seriesGroup,s=[],l=0;l<a.length;l++){var u=a[l].originalData.indexOfName(r),h=i.mapDimension("value");isNaN(a[l].originalData.get(h,u))||s.push(a[l].name)}return Iy("section",{header:s.join(", "),noHeader:!s.length,blocks:[Iy("nameValue",{name:r,value:o})]})},rC.prototype.setZoom=function(t){this.option.zoom=t},rC.prototype.setCenter=function(t){this.option.center=t},rC.type="series.map",rC.dependencies=["geo"],rC.layoutMode="box",rC.defaultOption={zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},rC);function rC(){var t=null!==oC&&oC.apply(this,arguments)||this;return t.type=rC.type,t.needsDrawMap=!1,t.seriesGroup=[],t.getTooltipPosition=function(t){if(null!=t){var e=this.getData().getName(t),t=this.coordinateSystem,e=t.getRegion(e);return e&&t.dataToPoint(e.center)}},t}Fy.registerClass(nd);var aC="\0_ec_interaction_mutex";function sC(t,e){return lC(t)[e]}function lC(t){return t[aC]||(t[aC]={})}A_({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){});var uC,hC=(l(cC,uC=Ft),cC.prototype.isDragging=function(){return this._dragging},cC.prototype.isPinching=function(){return this._pinching},cC.prototype.setPointerChecker=function(t){this.pointerChecker=t},cC.prototype.dispose=function(){this.disable()},cC.prototype._mousedownHandler=function(t){var e,n;oe(t)||t.target&&t.target.draggable||(e=t.offsetX,n=t.offsetY,this.pointerChecker&&this.pointerChecker(t,e,n)&&(this._x=e,this._y=n,this._dragging=!0))},cC.prototype._mousemoveHandler=function(t){var e,n,i,o,r,a;this._dragging&&fC("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!sC(this._zr,"globalPan")&&(e=t.offsetX,n=t.offsetY,r=e-(i=this._x),a=n-(o=this._y),this._x=e,this._y=n,this._opt.preventDefaultMouseMove&&ie(t.event),dC(this,"pan","moveOnMouseMove",t,{dx:r,dy:a,oldX:i,oldY:o,newX:e,newY:n,isAvailableBehavior:null}))},cC.prototype._mouseupHandler=function(t){oe(t)||(this._dragging=!1)},cC.prototype._mousewheelHandler=function(t){var e=fC("zoomOnMouseWheel",t,this._opt),n=fC("moveOnMouseWheel",t,this._opt),i=t.wheelDelta,o=Math.abs(i),r=t.offsetX,a=t.offsetY;0!==i&&(e||n)&&(e&&(o=3<o?1.4:1<o?1.2:1.1,pC(this,"zoom","zoomOnMouseWheel",t,{scale:0<i?o:1/o,originX:r,originY:a,isAvailableBehavior:null})),n&&pC(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(0<i?1:-1)*(3<(i=Math.abs(i))?.4:1<i?.15:.05),originX:r,originY:a,isAvailableBehavior:null}))},cC.prototype._pinchHandler=function(t){sC(this._zr,"globalPan")||pC(this,"zoom",null,t,{scale:1<t.pinchScale?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})},cC);function cC(n){var t=uC.call(this)||this;t._zr=n;var i=B(t._mousedownHandler,t),o=B(t._mousemoveHandler,t),r=B(t._mouseupHandler,t),a=B(t._mousewheelHandler,t),s=B(t._pinchHandler,t);return t.enable=function(t,e){this.disable(),this._opt=A(C(e)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(n.on("mousedown",i),n.on("mousemove",o),n.on("mouseup",r)),!0!==t&&"scale"!==t&&"zoom"!==t||(n.on("mousewheel",a),n.on("pinch",s))},t.disable=function(){n.off("mousedown",i),n.off("mousemove",o),n.off("mouseup",r),n.off("mousewheel",a),n.off("pinch",s)},t}function pC(t,e,n,i,o){t.pointerChecker&&t.pointerChecker(i,o.originX,o.originY)&&(ie(i.event),dC(t,e,n,i,o))}function dC(t,e,n,i,o){o.isAvailableBehavior=B(fC,null,n,i),t.trigger(e,o)}function fC(t,e,n){n=n[t];return!t||n&&(!H(n)||e.event[n+"Key"])}function gC(t,e,n){t=t.target;t.x+=e,t.y+=n,t.dirty()}function yC(t,e,n,i){var o=t.target,r=t.zoomLimit,a=t.zoom=t.zoom||1;a*=e,r&&(s=r.min||0,r=r.max||1/0,a=Math.max(Math.min(r,a),s));var s=a/t.zoom;t.zoom=a,o.x-=(n-o.x)*(s-1),o.y-=(i-o.y)*(s-1),o.scaleX*=s,o.scaleY*=s,o.dirty()}var mC={axisPointer:1,tooltip:1,brush:1};function vC(t,e,n){e=e.getComponentByElement(t.topTarget),t=e&&e.coordinateSystem;return e&&e!==n&&!mC.hasOwnProperty(e.mainType)&&t&&t.model!==n}function xC(t){var e=t.getItemStyle(),t=t.get("areaColor");return null!=t&&(e.fill=t),e}var _C=(bC.prototype.draw=function(_,t,b,e,n){var w="geo"===_.mainType,S=_.getData&&_.getData();w&&t.eachComponent({mainType:"series",subType:"map"},function(t){S||t.getHostGeoModel()!==_||(S=t.getData())});var i=_.coordinateSystem;this._updateBackground(i);var o,M,I,T=this._regionsGroup,C=this.group,D=i.getTransformInfo(),A=!T.childAt(0)||n;A?(C.transform=D.roamTransform,C.decomposeTransform(),C.dirty()):((o=new Ee).transform=D.roamTransform,o.decomposeTransform(),n={scaleX:o.scaleX,scaleY:o.scaleY,x:o.x,y:o.y},M=o.scaleX,I=o.scaleY,Jc(C,n,_)),T.removeAll();var L=ct(),k=S&&S.getVisual("visualMeta")&&0<S.getVisual("visualMeta").length;N(i.regions,function(t){var e=L.get(t.name)||L.set(t.name,new $r),a=new js({segmentIgnoreThreshold:1,shape:{paths:[]}});e.add(a);var n=_.getRegionModel(t.name)||_,i=n.getModel("itemStyle"),o=n.getModel("emphasis"),r=o.getModel("itemStyle"),s=n.getModel(["blur","itemStyle"]),l=n.getModel(["select","itemStyle"]),u=xC(i),h=xC(r),i=xC(s),r=xC(l);S&&(x=S.indexOfName(t.name),s=S.getItemVisual(x,"style"),l=S.getItemVisual(x,"decal"),k&&s.fill&&(u.fill=s.fill),l&&(u.decal=yx(l,b)));function c(t){return[t[0]*p+f,t[1]*d+g]}var p=D.rawScaleX,d=D.rawScaleY,f=D.rawX,g=D.rawY;N(t.geometries,function(t){if("polygon"===t.type){for(var e=[],n=0;n<t.exterior.length;++n)e.push(c(t.exterior[n]));a.shape.paths.push(new La({segmentIgnoreThreshold:1,shape:{points:e}}));for(n=0;n<(t.interiors?t.interiors.length:0);++n){for(var i=t.interiors[n],o=[],r=0;r<i.length;++r)o.push(c(i[r]));a.shape.paths.push(new La({segmentIgnoreThreshold:1,shape:{points:o}}))}}}),a.setStyle(u),a.style.strokeNoScale=!0,a.culling=!0,a.ensureState("emphasis").style=h,a.ensureState("blur").style=i,a.ensureState("select").style=r;for(var y=!1,m=0;m<$h.length;m++){var v=$h[m];if(n.get("normal"===v?["label","show"]:[v,"label","show"])){y=!0;break}}var x,h=S&&isNaN(S.get(S.mapDimension("value"),x)),i=S&&S.getItemLayout(x);(w||h&&y||i&&i.showLabel)&&(r=w?t.name:x,h=!S||0<=x?_:void 0,i=c(t.center),mp(i=new vl({x:i[0],y:i[1],scaleX:1/C.scaleX,scaleY:1/C.scaleY,z2:10,silent:!0}),vp(n),{labelFetcher:h,labelDataIndex:r,defaultText:t.name},{normal:{align:"center",verticalAlign:"middle"}}),a.setTextContent(i),a.setTextConfig({local:!0}),a.disableLabelAnimation=!0,A||Jc(i,{scaleX:1/M,scaleY:1/I},_)),S?S.setItemGraphicEl(x,e):(x=_.getRegionModel(t.name),Wh(a).eventData={componentType:"geo",componentIndex:_.componentIndex,geoIndex:_.componentIndex,name:t.name,region:x&&x.option||{}}),(e.__regions||(e.__regions=[])).push(t),e.highDownSilentOnTouch=!!_.get("selectedMode"),Lc(e,o.get("focus"),o.get("blurScope")),T.add(e)}),this._updateController(_,t,b),this._updateMapSelectHandler(_,T,b,e)},bC.prototype.remove=function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&nC(this._mapName,this.uid),this._mapName=null,this._controllerHost=null},bC.prototype._updateBackground=function(t){t=t.map;this._mapName!==t&&N(eC(t,this.uid),function(t){this._backgroundGroup.add(t)},this),this._mapName=t},bC.prototype._updateController=function(i,t,o){var r=i.coordinateSystem,e=this._controller,n=this._controllerHost;n.zoomLimit=i.get("scaleLimit"),n.zoom=r.getZoom(),e.enable(i.get("roam")||!1);var a=i.mainType;function s(){var t={type:"geoRoam",componentType:a};return t[a+"Id"]=i.id,t}e.off("pan").on("pan",function(t){this._mouseDownFlag=!1,gC(n,t.dx,t.dy),o.dispatchAction(O(s(),{dx:t.dx,dy:t.dy}))},this),e.off("zoom").on("zoom",function(t){this._mouseDownFlag=!1,yC(n,t.scale,t.originX,t.originY),o.dispatchAction(O(s(),{zoom:t.scale,originX:t.originX,originY:t.originY}));var e=this.group;this._regionsGroup.traverse(function(t){t=t.getTextContent();t&&(t.scaleX=1/e.scaleX,t.scaleY=1/e.scaleY,t.markRedraw())})},this),e.setPointerChecker(function(t,e,n){return r.getViewRectAfterRoam().contain(e,n)&&!vC(t,o,i)})},bC.prototype._updateMapSelectHandler=function(t,e,n,i){var o=this;e.off("mousedown"),t.get("selectedMode")&&(e.on("mousedown",function(){o._mouseDownFlag=!0}),e.on("click",function(t){o._mouseDownFlag&&(o._mouseDownFlag=!1)}))},bC);function bC(t){var e=new $r;this.uid=Wp("ec_map_draw"),this._controller=new hC(t.getZr()),this._controllerHost={target:e},(this.group=e).add(this._regionsGroup=new $r),e.add(this._backgroundGroup=new $r)}var wC,af=(l(SC,wC=tm),SC.prototype.render=function(t,e,n,i){var o,r;i&&"mapToggleSelect"===i.type&&i.from===this.uid||((o=this.group).removeAll(),t.getHostGeoModel()||(i&&"geoRoam"===i.type&&"series"===i.componentType&&i.seriesId===t.id?(r=this._mapDraw)&&o.add(r.group):t.needsDrawMap?(r=this._mapDraw||new _C(n),o.add(r.group),r.draw(t,e,n,this,i),this._mapDraw=r):(this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null),t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,n)))},SC.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},SC.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},SC.prototype._renderSymbols=function(r,t,e){var a=r.originalData,s=this.group;a.each(a.mapDimension("value"),function(t,e){var n,i,o;isNaN(t)||(o=a.getItemLayout(e))&&o.point&&(t=o.point,o=o.offset,n=new aa({style:{fill:r.getData().getVisual("style").fill},shape:{cx:t[0]+9*o,cy:t[1],r:3},silent:!0,z2:8+(o?0:Jh+1)}),o||(t=r.mainSeries.getData(),o=a.getName(e),i=t.indexOfName(o),e=(o=a.getItemModel(e)).getModel("label"),t=t.getItemGraphicEl(i),mp(n,vp(o),{labelFetcher:{getFormattedLabel:function(t,e){return r.getFormattedLabel(i,e)}}}),n.disableLabelAnimation=!0,e.get("position")||n.setTextConfig({position:"bottom"}),t.onHoverStateChange=function(t){n.useState(t)}),s.add(n))})},SC.type="map",SC);function SC(){var t=null!==wC&&wC.apply(this,arguments)||this;return t.type=SC.type,t}function MC(t,e,n){var i,o=t.getZoom(),r=t.getCenter(),a=e.zoom,r=t.dataToPoint(r);return null!=e.dx&&null!=e.dy&&(r[0]-=e.dx,r[1]-=e.dy,t.setCenter(t.pointToData(r))),null!=a&&(n&&(i=n.min||0,n=n.max||1/0,a=Math.max(Math.min(o*a,n),i)/o),t.scaleX*=a,t.scaleY*=a,i=(e.originX-t.x)*(a-1),e=(e.originY-t.y)*(a-1),t.x-=i,t.y-=e,t.updateTransform(),t.setCenter(t.pointToData(r)),t.setZoom(a*o)),{center:t.getCenter(),zoom:t.getZoom()}}tm.registerClass(af),A_({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(i,t){var o=i.componentType||"series";t.eachComponent({mainType:o,query:i},function(t){var e,n=t.coordinateSystem;"geo"===n.type&&(e=MC(n,i,t.get("scaleLimit")),t.setCenter&&t.setCenter(e.center),t.setZoom&&t.setZoom(e.zoom),"series"===o&&N(t.seriesGroup,function(t){t.setCenter(e.center),t.setZoom(e.zoom)}))})});var IC,TC=Ot,CC=(l(DC,IC=Ee),DC.prototype.setBoundingRect=function(t,e,n,i){return this._rect=new Gn(t,e,n,i),this._rect},DC.prototype.getBoundingRect=function(){return this._rect},DC.prototype.setViewRect=function(t,e,n,i){this.transformTo(t,e,n,i),this._viewRect=new Gn(t,e,n,i)},DC.prototype.transformTo=function(t,e,n,i){var o=this.getBoundingRect(),r=this._rawTransformable;r.transform=o.calculateTransform(new Gn(t,e,n,i)),r.decomposeTransform(),this._updateTransform()},DC.prototype.setCenter=function(t){t&&(this._center=t,this._updateCenterAndZoom())},DC.prototype.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()},DC.prototype.getDefaultCenter=function(){var t=this.getBoundingRect();return[t.x+t.width/2,t.y+t.height/2]},DC.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},DC.prototype.getZoom=function(){return this._zoom||1},DC.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},DC.prototype._updateCenterAndZoom=function(){var t=this._rawTransformable.getLocalTransform(),e=this._roamTransformable,n=this.getDefaultCenter(),i=this.getCenter(),o=this.getZoom(),i=Ot([],i,t),n=Ot([],n,t);e.originX=i[0],e.originY=i[1],e.x=n[0]-i[0],e.y=n[1]-i[1],e.scaleX=e.scaleY=o,this._updateTransform()},DC.prototype._updateTransform=function(){var t=this._roamTransformable,e=this._rawTransformable;(e.parent=t).updateTransform(),e.updateTransform(),we(this.transform||(this.transform=[]),e.transform||_e()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],Ce(this.invTransform,this.transform),this.decomposeTransform()},DC.prototype.getTransformInfo=function(){var t=this._roamTransformable.transform,e=this._rawTransformable;return{roamTransform:t?nt(t):_e(),rawScaleX:e.scaleX,rawScaleY:e.scaleY,rawX:e.x,rawY:e.y}},DC.prototype.getViewRect=function(){return this._viewRect},DC.prototype.getViewRectAfterRoam=function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},DC.prototype.dataToPoint=function(t,e,n){e=e?this._rawTransform:this.transform;return n=n||[],e?TC(n,t,e):vt(n,t)},DC.prototype.pointToData=function(t){var e=this.invTransform;return e?TC([],t,e):[t[0],t[1]]},DC.prototype.convertToPixel=function(t,e,n){e=AC(e);return e===this?e.dataToPoint(n):null},DC.prototype.convertFromPixel=function(t,e,n){e=AC(e);return e===this?e.pointToData(n):null},DC.prototype.containPoint=function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])},DC.dimensions=["x","y"],DC);function DC(t){var e=IC.call(this)||this;return e.type="view",e.dimensions=["x","y"],e._roamTransformable=new Ee,e._rawTransformable=new Ee,e.name=t,e}function AC(t){t=t.seriesModel;return t?t.coordinateSystem:null}var LC,kC=(l(PC,LC=CC),PC.prototype.containCoord=function(t){for(var e=this.regions,n=0;n<e.length;n++)if(e[n].contain(t))return!0;return!1},PC.prototype.transformTo=function(t,e,n,i){var o=this.getBoundingRect(),r=this._invertLongitute,o=o.clone();r&&(o.y=-o.y-o.height);var a=this._rawTransformable;a.transform=o.calculateTransform(new Gn(t,e,n,i)),a.decomposeTransform(),r&&(a.scaleY=-a.scaleY),a.updateTransform(),this._updateTransform()},PC.prototype.getRegion=function(t){return this._regionsMap.get(t)},PC.prototype.getRegionByCoord=function(t){for(var e=this.regions,n=0;n<e.length;n++)if(e[n].contain(t))return e[n]},PC.prototype.addGeoCoord=function(t,e){this._nameCoordMap.set(t,e)},PC.prototype.getGeoCoord=function(t){return this._nameCoordMap.get(t)},PC.prototype.getBoundingRect=function(){return this._rect},PC.prototype.dataToPoint=function(t,e,n){if("string"==typeof t&&(t=this.getGeoCoord(t)),t)return CC.prototype.dataToPoint.call(this,t,e,n)},PC.prototype.convertToPixel=function(t,e,n){e=OC(e);return e===this?e.dataToPoint(n):null},PC.prototype.convertFromPixel=function(t,e,n){e=OC(e);return e===this?e.pointToData(n):null},PC);function PC(t,e,n,i){t=LC.call(this,t)||this;t.dimensions=["lng","lat"],t.type="geo",t.map=e;n=tC(e,n);return t._nameCoordMap=n.nameCoordMap,t._regionsMap=n.regionsMap,t._invertLongitute=null==i||i,t.regions=n.regions,t._rect=n.boundingRect,t}function OC(t){var e=t.geoModel,t=t.seriesModel;return e?e.coordinateSystem:t?t.coordinateSystem||(t.getReferringComponents("geo",Sh).models[0]||{}).coordinateSystem:null}function RC(t,e){var n=t.get("boundingCoords");null!=n&&(u=n[0],l=n[1],isNaN(u[0])||isNaN(u[1])||isNaN(l[0])||isNaN(l[1])||this.setBoundingRect(u[0],u[1],l[0]-u[0],l[1]-u[1]));var i,o,r,a=this.getBoundingRect(),s=t.get("layoutCenter"),n=t.get("layoutSize"),l=e.getWidth(),u=e.getHeight(),e=a.width/a.height*this.aspectScale,a=!1;s&&n&&(r=[Nu(s[0],l),Nu(s[1],u)],i=Nu(n,Math.min(l,u)),isNaN(r[0])||isNaN(r[1])||isNaN(i)||(a=!0)),a?(o={},1<e?(o.width=i,o.height=i/e):(o.height=i,o.width=i*e),o.y=r[1]-o.height/2,o.x=r[0]-o.width/2):((r=t.getBoxLayoutParams()).aspect=e,o=Yd(r,{width:l,height:u})),this.setViewRect(o.x,o.y,o.width,o.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function NC(){this.dimensions=kC.prototype.dimensions}I(kC,CC);var EC=new(NC.prototype.create=function(t,a){var s=[];t.eachComponent("geo",function(t,e){var n=t.get("map"),i=t.get("aspectScale"),o=!0,r=Wm(n);r&&r[0]&&"svg"===r[0].type?(null==i&&(i=1),o=!1):null==i&&(i=.75);o=new kC(n+e,n,t.get("nameMap"),o);o.aspectScale=i,o.zoomLimit=t.get("scaleLimit"),s.push(o),(t.coordinateSystem=o).model=t,o.resize=RC,o.resize(t,a)}),t.eachSeries(function(t){var e;"geo"===t.get("coordinateSystem")&&(e=t.get("geoIndex")||0,t.coordinateSystem=s[e])});var n={};return t.eachSeriesByType("map",function(t){var e;t.getHostGeoModel()||(e=t.getMapType(),n[e]=n[e]||[],n[e].push(t))}),N(n,function(t,e){var n=P(t,function(t){return t.get("nameMap")}),i=new kC(e,e,S(n));i.zoomLimit=Q.apply(null,P(t,function(t){return t.get("scaleLimit")})),s.push(i),i.resize=RC,i.aspectScale=t[0].get("aspectScale"),i.resize(t[0],a),N(t,function(t){var n;t.coordinateSystem=i,n=i,N(t.get("geoCoord"),function(t,e){n.addGeoCoord(e,t)})})}),s},NC.prototype.getFilledRegions=function(t,e,n){for(var i=(t||[]).slice(),o=ct(),r=0;r<i.length;r++)o.set(i[r].name,i[r]);return N(tC(e,n).regions,function(t){t=t.name;o.get(t)||i.push({name:t})}),i},NC);L_("geo",EC),k_(function(n){var o={};n.eachSeriesByType("map",function(t){var a,i,e=t.getMapType();t.getHostGeoModel()||o[e]||(a={},N(t.seriesGroup,function(t){var o=t.coordinateSystem,r=t.originalData;t.get("showLegendSymbol")&&n.getComponent("legend")&&r.each(r.mapDimension("value"),function(t,e){var n=r.getName(e),i=o.getRegion(n);i&&!isNaN(t)&&(t=a[n]||0,i=o.dataToPoint(i.center),a[n]=t+1,r.setItemLayout(e,{point:i,offset:t}))})}),(i=t.getData()).each(function(t){var e=i.getName(t),n=i.getItemLayout(t)||{};n.showLabel=!a[e],i.setItemLayout(t,n)}),o[e]=!0)})}),D_(r.PROCESSOR.STATISTIC,function(t){var n={};t.eachSeriesByType("map",function(t){var e=t.getHostGeoModel(),e=e?"o"+e.id:"i"+t.getMapType();(n[e]=n[e]||[]).push(t)}),N(n,function(t,e){for(var l,u,h,n=(l=P(t,function(t){return t.getData()}),u=t[0].get("mapValueCalculation"),h={},N(l,function(n){n.each(n.mapDimension("value"),function(t,e){e="ec-"+n.getName(e);h[e]=h[e]||[],isNaN(t)||h[e].push(t)})}),l[0].map(l[0].mapDimension("value"),function(t,e){for(var n="ec-"+l[0].getName(e),i=0,o=1/0,r=-1/0,a=h[n].length,s=0;s<a;s++)o=Math.min(o,h[n][s]),r=Math.max(r,h[n][s]),i+=h[n][s];return e="min"===u?o:"max"===u?r:"average"===u?i/a:i,0===a?NaN:e})),i=0;i<t.length;i++)t[i].originalData=t[i].getData();for(i=0;i<t.length;i++)(t[i].seriesGroup=t)[i].needsDrawMap=0===i&&!t[i].getHostGeoModel(),t[i].setData(n.cloneShallow()),t[i].mainSeries=t[0]})}),Cv("map",A_);var zC=_h();function BC(n){var i=n.mainData,t=n.datas;t||(t={main:i},n.datasAttr={main:"data"}),n.datas=n.mainData=null,XC(i,t,n),N(t,function(e){N(i.TRANSFERABLE_METHODS,function(t){e.wrapMethod(t,V(VC,n))})}),i.wrapMethod("cloneShallow",V(GC,n)),N(i.CHANGABLE_METHODS,function(t){i.wrapMethod(t,V(FC,n))}),ot(t[i.dataType]===i)}function VC(t,e){var n;return zC(n=this).mainData===n?XC((n=O({},zC(this).datas))[this.dataType]=e,n,t):YC(e,this.dataType,zC(this).mainData,t),e}function FC(t,e){return t.struct&&t.struct.update(),e}function GC(n,i){return N(zC(i).datas,function(t,e){t!==i&&YC(t.cloneShallow(),e,i,n)}),i}function HC(t){var e=zC(this).mainData;return null==t||null==e?e:zC(e).datas[t]}function WC(){var e=zC(this).mainData;return null==e?[{data:e}]:P(z(zC(e).datas),function(t){return{type:t,data:zC(e).datas[t]}})}function XC(n,t,i){zC(n).datas={},N(t,function(t,e){YC(t,e,n,i)})}function YC(t,e,n,i){zC(n).datas[e]=t,zC(t).mainData=n,t.dataType=e,i.struct&&(t[i.structAttr]=i.struct,i.struct[i.datasAttr[e]]=t),t.getLinkedData=HC,t.getLinkedDataAll=WC}var UC=(ZC.prototype.isRemoved=function(){return this.dataIndex<0},ZC.prototype.eachNode=function(t,e,n){"function"==typeof t&&(n=e,e=t,t=null),H(t=t||{})&&(t={order:t});var i,o=t.order||"preorder",r=this[t.attr||"children"];"preorder"===o&&(i=e.call(n,this));for(var a=0;!i&&a<r.length;a++)r[a].eachNode(t,e,n);"postorder"===o&&e.call(n,this)},ZC.prototype.updateDepthAndHeight=function(t){var e=0;this.depth=t;for(var n=0;n<this.children.length;n++){var i=this.children[n];i.updateDepthAndHeight(t+1),i.height>e&&(e=i.height)}this.height=e+1},ZC.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,n=this.children,i=n.length;e<i;e++){var o=n[e].getNodeById(t);if(o)return o}},ZC.prototype.contains=function(t){if(t===this)return!0;for(var e=0,n=this.children,i=n.length;e<i;e++){var o=n[e].contains(t);if(o)return o}},ZC.prototype.getAncestors=function(t){for(var e=[],n=t?this:this.parentNode;n;)e.push(n),n=n.parentNode;return e.reverse(),e},ZC.prototype.getAncestorsIndices=function(){for(var t=[],e=this;e;)t.push(e.dataIndex),e=e.parentNode;return t.reverse(),t},ZC.prototype.getDescendantIndices=function(){var e=[];return this.eachNode(function(t){e.push(t.dataIndex)}),e},ZC.prototype.getValue=function(t){var e=this.hostTree.data;return e.get(e.getDimension(t||"value"),this.dataIndex)},ZC.prototype.setLayout=function(t,e){0<=this.dataIndex&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},ZC.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},ZC.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(t)},ZC.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},ZC.prototype.setVisual=function(t,e){0<=this.dataIndex&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},ZC.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},ZC.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},ZC.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},ZC.prototype.isAncestorOf=function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},ZC.prototype.isDescendantOf=function(t){return t!==this&&t.isAncestorOf(this)},ZC);function ZC(t,e){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=t||"",this.hostTree=e}var jC=(qC.prototype.eachNode=function(t,e,n){this.root.eachNode(t,e,n)},qC.prototype.getNodeByDataIndex=function(t){t=this.data.getRawIndex(t);return this._nodes[t]},qC.prototype.getNodeById=function(t){return this.root.getNodeById(t)},qC.prototype.update=function(){for(var t=this.data,e=this._nodes,n=0,i=e.length;n<i;n++)e[n].dataIndex=-1;for(n=0,i=t.count();n<i;n++)e[t.getRawIndex(n)].dataIndex=n},qC.prototype.clearLayouts=function(){this.data.clearItemLayouts()},qC.createTree=function(t,e,n){var s=new qC(e),l=[],u=1;!function t(e,n){var i=e.value;u=Math.max(u,F(i)?i.length:1);l.push(e);var o=new UC(gh(e.name,""),s);n?KC(o,n):s.root=o;s._nodes.push(o);var r=e.children;if(r)for(var a=0;a<r.length;a++)t(r[a],o)}(t),s.root.updateDepthAndHeight(0);t=vb(l,{coordDimensions:["value"],dimensionsCount:u}),e=new db(t,e);return e.initData(l),n&&n(e),BC({mainData:e,struct:s,structAttr:"tree"}),s.update(),s},qC);function qC(t){this.type="tree",this._nodes=[],this.hostModel=t}function KC(t,e){var n=e.children;t.parentNode!==e&&(n.push(t),t.parentNode=e)}var $C,nd=(l(JC,$C=Fy),JC.prototype.getInitialData=function(t){var e={name:t.name,children:t.data},n=t.leaves||{},i=new Fp(n,this,this.ecModel),o=jC.createTree(e,this,function(t){t.wrapMethod("getItemModel",function(t,e){e=o.getNodeByDataIndex(e);return e.children.length&&e.isExpand||(t.parentModel=i),t})});var r=0;o.eachNode("preorder",function(t){t.depth>r&&(r=t.depth)});var a=t.expandAndCollapse&&0<=t.initialTreeDepth?t.initialTreeDepth:r;return o.root.eachNode("preorder",function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=a}),o.data},JC.prototype.getOrient=function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},JC.prototype.setZoom=function(t){this.option.zoom=t},JC.prototype.setCenter=function(t){this.option.center=t},JC.prototype.formatTooltip=function(t,e,n){for(var i=this.getData().tree,o=i.root.children[0],r=i.getNodeByDataIndex(t),t=r.getValue(),a=r.name;r&&r!==o;)a=r.parentNode.name+"."+a,r=r.parentNode;return Iy("nameValue",{name:a,value:t,noValue:isNaN(t)||null==t})},JC.type="series.tree",JC.layoutMode="box",JC.defaultOption={zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},JC);function JC(){var t=null!==$C&&$C.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}function QC(t,e){var n=t.isExpand?t.children:[],i=t.parentNode.children,o=t.hierNode.i?i[t.hierNode.i-1]:null;n.length?(function(t){var e=t.children,n=e.length,i=0,o=0;for(;0<=--n;){var r=e[n];r.hierNode.prelim+=i,r.hierNode.modifier+=i,o+=r.hierNode.change,i+=r.hierNode.shift+o}}(t),n=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2,o?(t.hierNode.prelim=o.hierNode.prelim+e(t,o),t.hierNode.modifier=t.hierNode.prelim-n):t.hierNode.prelim=n):o&&(t.hierNode.prelim=o.hierNode.prelim+e(t,o)),t.parentNode.hierNode.defaultAncestor=function(t,e,n,i){if(e){for(var o=t,r=t,a=r.parentNode.children[0],s=e,l=o.hierNode.modifier,u=r.hierNode.modifier,h=a.hierNode.modifier,c=s.hierNode.modifier;s=iD(s),r=oD(r),s&&r;){o=iD(o),a=oD(a),o.hierNode.ancestor=t;var p=s.hierNode.prelim+c-r.hierNode.prelim-u+i(s,r);0<p&&(function(t,e,n){var i=n/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=i,e.hierNode.shift+=n,e.hierNode.modifier+=n,e.hierNode.prelim+=n,t.hierNode.change+=i}(function(t,e,n){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:n}(s,t,n),t,p),u+=p,l+=p),c+=s.hierNode.modifier,u+=r.hierNode.modifier,l+=o.hierNode.modifier,h+=a.hierNode.modifier}s&&!iD(o)&&(o.hierNode.thread=s,o.hierNode.modifier+=c-l),r&&!oD(a)&&(a.hierNode.thread=r,a.hierNode.modifier+=u-h,n=t)}return n}(t,o,t.parentNode.hierNode.defaultAncestor||i[0],e)}function tD(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function eD(t){return arguments.length?t:rD}function nD(t,e){return t-=Math.PI/2,{x:e*Math.cos(t),y:e*Math.sin(t)}}function iD(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function oD(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function rD(t,e){return t.parentNode===e.parentNode?1:2}Fy.registerClass(nd);var aD,sD=function(){this.parentPoint=[],this.childPoints=[]},lD=(l(uD,aD=Dr),uD.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},uD.prototype.getDefaultShape=function(){return new sD},uD.prototype.buildPath=function(t,e){var n=e.childPoints,i=n.length,o=e.parentPoint,r=n[0],a=n[i-1];if(1===i)return t.moveTo(o[0],o[1]),void t.lineTo(r[0],r[1]);var s=e.orient,l="TB"===s||"BT"===s?0:1,s=1-l,e=Nu(e.forkPosition,1),u=[];u[l]=o[l],u[s]=o[s]+(a[s]-o[s])*e,t.moveTo(o[0],o[1]),t.lineTo(u[0],u[1]),t.moveTo(r[0],r[1]),u[l]=r[l],t.lineTo(u[0],u[1]),u[l]=a[l],t.lineTo(u[0],u[1]),t.lineTo(a[0],a[1]);for(var h=1;h<i-1;h++){var c=n[h];t.moveTo(c[0],c[1]),u[l]=c[l],t.lineTo(u[0],u[1])}},uD);function uD(t){return aD.call(this,t)||this}var hD,af=(l(cD,hD=tm),cD.prototype.init=function(t,e){this._controller=new hC(e.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},cD.prototype.render=function(i,t,n){var o=i.getData(),e=i.layoutInfo,r=this._mainGroup;"radial"===i.get("layout")?(r.x=e.x+e.width/2,r.y=e.y+e.height/2):(r.x=e.x,r.y=e.y),this._updateViewCoordSys(i),this._updateController(i,t,n);var a=this._data;o.diff(a).add(function(t){pD(o,t)&&dD(o,t,null,r,i)}).update(function(t,e){var n=a.getItemGraphicEl(e);pD(o,t)?dD(o,t,n,r,i):n&&fD(a,e,n,r,i)}).remove(function(t){var e=a.getItemGraphicEl(t);e&&fD(a,t,e,r,i)}).execute(),this._nodeScaleRatio=i.get("nodeScaleRatio"),this._updateNodeAndLinkScale(i),!0===i.get("expandAndCollapse")&&o.eachItemGraphicEl(function(t,e){t.off("click").on("click",function(){n.dispatchAction({type:"treeExpandAndCollapse",seriesId:i.id,dataIndex:e})})}),this._data=o},cD.prototype._updateViewCoordSys=function(t){var e=t.getData(),n=[];e.each(function(t){t=e.getItemLayout(t);!t||isNaN(t.x)||isNaN(t.y)||n.push([+t.x,+t.y])});var i=[],o=[];Vo(n,i,o);var r=this._min,a=this._max;o[0]-i[0]==0&&(i[0]=r?r[0]:i[0]-1,o[0]=a?a[0]:o[0]+1),o[1]-i[1]==0&&(i[1]=r?r[1]:i[1]-1,o[1]=a?a[1]:o[1]+1);a=t.coordinateSystem=new CC;a.zoomLimit=t.get("scaleLimit"),a.setBoundingRect(i[0],i[1],o[0]-i[0],o[1]-i[1]),a.setCenter(t.get("center")),a.setZoom(t.get("zoom")),this.group.attr({x:a.x,y:a.y,scaleX:a.scaleX,scaleY:a.scaleY}),this._min=i,this._max=o},cD.prototype._updateController=function(o,t,r){var e=this,n=this._controller,i=this._controllerHost,a=this.group;n.setPointerChecker(function(t,e,n){var i=a.getBoundingRect();return i.applyTransform(a.transform),i.contain(e,n)&&!vC(t,r,o)}),n.enable(o.get("roam")),i.zoomLimit=o.get("scaleLimit"),i.zoom=o.coordinateSystem.getZoom(),n.off("pan").off("zoom").on("pan",function(t){gC(i,t.dx,t.dy),r.dispatchAction({seriesId:o.id,type:"treeRoam",dx:t.dx,dy:t.dy})}).on("zoom",function(t){yC(i,t.scale,t.originX,t.originY),r.dispatchAction({seriesId:o.id,type:"treeRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),e._updateNodeAndLinkScale(o),r.updateLabelLayout()})},cD.prototype._updateNodeAndLinkScale=function(t){var e=t.getData(),n=this._getNodeGlobalScale(t);e.eachItemGraphicEl(function(t,e){t.setSymbolScale(n)})},cD.prototype._getNodeGlobalScale=function(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var n=this._nodeScaleRatio,t=e.scaleX||1;return((e.getZoom()-1)*n+1)/t},cD.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},cD.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},cD.type="tree",cD);function cD(){var t=null!==hD&&hD.apply(this,arguments)||this;return t.type=cD.type,t._mainGroup=new $r,t}function pD(t,e){e=t.getItemLayout(e);return e&&!isNaN(e.x)&&!isNaN(e.y)}function dD(n,t,i,e,o){var r=!i,a=n.tree.getNodeByDataIndex(t),s=a.getModel(),l=a.getVisual("style").fill,u=!1===a.isExpand&&0!==a.children.length?l:"#fff",h=n.tree.root,c=a.parentNode!==h&&a.parentNode||a,p=n.getItemGraphicEl(c.dataIndex),d=c.getLayout(),f=p?{x:p.__oldX,y:p.__oldY,rawX:p.__radialOldRawX,rawY:p.__radialOldRawY}:d,g=a.getLayout();r?((i=new LS(n,t,null,{symbolInnerColor:u,useNameLabel:!0})).x=f.x,i.y=f.y):i.updateData(n,t,null,{symbolInnerColor:u,useNameLabel:!0}),i.__radialOldRawX=i.__radialRawX,i.__radialOldRawY=i.__radialRawY,i.__radialRawX=g.rawX,i.__radialRawY=g.rawY,e.add(i),n.setItemGraphicEl(t,i),i.__oldX=i.x,i.__oldY=i.y,Jc(i,{x:g.x,y:g.y},o);var y,m,l=i.getSymbolPath();"radial"===o.get("layout")&&(p=(c=h.children[0]).getLayout(),r=c.children.length,t=u=void 0,g.x===p.x&&!0===a.isExpand?(m=(c.children[0].getLayout().x+c.children[r-1].getLayout().x)/2,y=(c.children[0].getLayout().y+c.children[r-1].getLayout().y)/2,(u=Math.atan2(y-p.y,m-p.x))<0&&(u=2*Math.PI+u),(t=m<p.x)&&(u-=Math.PI)):((u=Math.atan2(g.y-p.y,g.x-p.x))<0&&(u=2*Math.PI+u),0===a.children.length||0!==a.children.length&&!1===a.isExpand?(t=g.x<p.x)&&(u-=Math.PI):(t=g.x>p.x)||(u-=Math.PI)),r=t?"left":"right",p=(m=(y=s.getModel("label")).get("rotate"))*(Math.PI/180),(t=l.getTextContent())&&(l.setTextConfig({position:y.get("position")||r,rotation:null==m?-u:p,origin:"center"}),t.setStyle("verticalAlign","middle")));s=s.get(["emphasis","focus"]),s="ancestor"===s?a.getAncestorsIndices():"descendant"===s?a.getDescendantIndices():null;s&&(Wh(i).focus=s),function(t,e,n,i,o,r,a,s){var l=e.getModel(),u=t.get("edgeShape"),h=t.get("layout"),c=t.getOrient(),p=t.get(["lineStyle","curveness"]),d=t.get("edgeForkPosition"),f=l.getModel("lineStyle").getLineStyle(),g=i.__edge;if("curve"===u)e.parentNode&&e.parentNode!==n&&Jc(g=g||(i.__edge=new Nl({shape:gD(h,c,p,o,o)})),{shape:gD(h,c,p,r,a)},t);else if("polyline"===u)if("orthogonal"===h){if(e!==n&&e.children&&0!==e.children.length&&!0===e.isExpand){for(var y=e.children,m=[],v=0;v<y.length;v++){var x=y[v].getLayout();m.push([x.x,x.y])}Jc(g=g||(i.__edge=new lD({shape:{parentPoint:[a.x,a.y],childPoints:[[a.x,a.y]],orient:c,forkPosition:d}})),{shape:{parentPoint:[a.x,a.y],childPoints:m}},t)}}else 0;g&&(g.useStyle(A({strokeNoScale:!0,fill:null},f)),Rc(g,l,"lineStyle"),_c(g),s.add(g))}(o,a,h,i,f,d,g,e),i.__edge&&(i.onHoverStateChange=function(t){var e;"blur"!==t&&((e=a.parentNode&&n.getItemGraphicEl(a.parentNode.dataIndex))&&e.hoverState===jh||mc(i.__edge,t))})}function fD(t,e,n,i,o){for(var r,a=t.tree.getNodeByDataIndex(e),s=t.tree.root,l=a.parentNode!==s&&a.parentNode||a;null==(r=l.getLayout());)l=l.parentNode!==s&&l.parentNode||l;var u={duration:o.get("animationDurationUpdate"),easing:o.get("animationEasingUpdate")};tp(n,{x:r.x+1,y:r.y+1},o,{cb:function(){i.remove(n),t.setItemGraphicEl(e,null)},removeOpt:u}),n.fadeOut(null,{fadeLabel:!0,animation:u});var h=t.getItemGraphicEl(l.dataIndex).__edge,c=n.__edge||(!1===l.isExpand||1===l.children.length?h:void 0),p=o.get("edgeShape"),d=o.get("layout"),a=o.get("orient"),h=o.get(["lineStyle","curveness"]);c&&("curve"===p?tp(c,{shape:gD(d,a,h,r,r),style:{opacity:0}},o,{cb:function(){i.remove(c)},removeOpt:u}):"polyline"===p&&"orthogonal"===o.get("layout")&&tp(c,{shape:{parentPoint:[r.x,r.y],childPoints:[[r.x,r.y]]},style:{opacity:0}},o,{cb:function(){i.remove(c)},removeOpt:u}))}function gD(t,e,n,i,o){var r,a,s,l,u,h;if("radial"!==t)return c=i.x,h=i.y,u=o.x,p=o.y,"LR"!==e&&"RL"!==e||(r=c+(u-c)*n,a=h,s=u+(c-u)*n,l=p),"TB"!==e&&"BT"!==e||(r=c,a=h+(p-h)*n,s=u,l=p+(h-p)*n),{x1:c,y1:h,x2:u,y2:p,cpx1:r,cpy1:a,cpx2:s,cpy2:l};c=i.rawX,h=i.rawY,u=o.rawX,p=o.rawY;var o=nD(c,h),c=nD(c,h+(p-h)*n),n=nD(u,p+(h-p)*n),p=nD(u,p);return{x1:o.x||0,y1:o.y||0,x2:p.x||0,y2:p.y||0,cpx1:c.x||0,cpy1:c.y||0,cpx2:n.x||0,cpy2:n.y||0}}function yD(t,e){for(var n,i=[t];n=i.pop();)if(e(n),n.isExpand){var o=n.children;if(o.length)for(var r=o.length-1;0<=r;r--)i.push(o[r])}}function mD(t,e,n){if(t&&0<=L(e,t.type)){e=n.getData().tree.root,n=t.targetNode;if("string"==typeof n&&(n=e.getNodeById(n)),n&&e.contains(n))return{node:n};t=t.targetNodeId;return null!=t&&(n=e.getNodeById(t))?{node:n}:void 0}}function vD(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function xD(t,e){return 0<=L(vD(t),e)}function _D(t,e){for(var n=[];t;){var i=t.dataIndex;n.push({name:t.name,dataIndex:i,value:e.getRawValue(i)}),t=t.parentNode}return n.reverse(),n}function bD(i){var t=i.getData().tree,o={};t.eachNode(function(t){for(var e=t;e&&1<e.depth;)e=e.parentNode;var n=Of(i.ecModel,e.name||e.dataIndex+"",o);t.setVisual("decal",n)})}tm.registerClass(af),A_({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(n,t){t.eachComponent({mainType:"series",subType:"tree",query:n},function(t){var e=n.dataIndex,e=t.getData().tree.getNodeByDataIndex(e);e.isExpand=!e.isExpand})}),A_({type:"treeRoam",event:"treeRoam",update:"none"},function(n,t){t.eachComponent({mainType:"series",subType:"tree",query:n},function(t){var e=MC(t.coordinateSystem,n);t.setCenter&&t.setCenter(e.center),t.setZoom&&t.setZoom(e.zoom)})}),k_(function(t,e){t.eachSeriesByType("tree",function(t){!function(t,e){var n=function(t,e){return Yd(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=n;var i=t.get("layout"),o=0,r=0,a=null;a="radial"===i?(o=2*Math.PI,r=Math.min(n.height,n.width)/2,eD(function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth})):(o=n.width,r=n.height,eD());e=t.getData().tree.root,n=e.children[0];{var s,l,u,h,c,p,d,f,g;n&&(function(t){t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var e,n,i=[t];e=i.pop();)if(n=e.children,e.isExpand&&n.length)for(var o=n.length-1;0<=o;o--){var r=n[o];r.hierNode={defaultAncestor:null,ancestor:r,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},i.push(r)}}(e),function(t,e,n){for(var i,o=[t],r=[];i=o.pop();)if(r.push(i),i.isExpand){var a=i.children;if(a.length)for(var s=0;s<a.length;s++)o.push(a[s])}for(;i=r.pop();)e(i,n)}(n,QC,a),e.hierNode.modifier=-n.hierNode.prelim,yD(n,tD),yD(u=l=s=n,function(t){var e=t.getLayout().x;e<s.getLayout().x&&(s=t),e>l.getLayout().x&&(l=t),t.depth>u.depth&&(u=t)}),a=s===l?1:a(s,l)/2,h=a-s.getLayout().x,f=d=p=c=0,"radial"===i?(c=o/(l.getLayout().x+a+h),p=r/(u.depth-1||1),yD(n,function(t){d=(t.getLayout().x+h)*c,f=(t.depth-1)*p;var e=nD(d,f);t.setLayout({x:e.x,y:e.y,rawX:d,rawY:f},!0)})):"RL"===(g=t.getOrient())||"LR"===g?(p=r/(l.getLayout().x+a+h),c=o/(u.depth-1||1),yD(n,function(t){f=(t.getLayout().x+h)*p,d="LR"===g?(t.depth-1)*c:o-(t.depth-1)*c,t.setLayout({x:d,y:f},!0)})):"TB"!==g&&"BT"!==g||(c=o/(l.getLayout().x+a+h),p=r/(u.depth-1||1),yD(n,function(t){d=(t.getLayout().x+h)*c,f="TB"===g?(t.depth-1)*p:r-(t.depth-1)*p,t.setLayout({x:d,y:f},!0)})))}}(t,e)})}),P_(function(t){t.eachSeriesByType("tree",function(t){var n=t.getData();n.tree.eachNode(function(t){var e=t.getModel().getModel("itemStyle").getItemStyle();O(n.ensureUniqueItemVisual(t.dataIndex,"style"),e)})})});var wD,nd=(l(SD,wD=Fy),SD.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};!function e(t){var n=0;N(t.children,function(t){e(t);var t=t.value;F(t)&&(t=t[0]),n+=t});var i=t.value;F(i)&&(i=i[0]);null!=i&&!isNaN(i)||(i=n);i<0&&(i=0);F(t.value)?t.value[0]=i:t.value=i}(n);var i=t.levels||[],o=this.designatedVisualItemStyle={},r=new Fp({itemStyle:o},this,e),a=P((i=t.levels=function(t,e){var i,o,n=lh(e.get("color")),r=lh(e.get("decals"));if(!n)return;N(t=t||[],function(t){var e=new Fp(t),n=e.get("color"),t=e.get("decal");(e.get(["itemStyle","color"])||n&&"none"!==n)&&(i=!0),(e.get(["itemStyle","decal"])||t&&"none"!==t)&&(o=!0)});e=t[0]||(t[0]={});i||(e.color=n.slice());!o&&r&&(e.decal=r.slice());return t}(i,e))||[],function(t){return new Fp(t,r,e)},this),s=jC.createTree(n,this,function(t){t.wrapMethod("getItemModel",function(t,e){e=s.getNodeByDataIndex(e),e=a[e.depth];return t.parentModel=e||r,t})});return s.data},SD.prototype.optionUpdated=function(){this.resetViewRoot()},SD.prototype.formatTooltip=function(t,e,n){var i=this.getData(),o=this.getRawValue(t);return Iy("nameValue",{name:i.getName(t),value:o})},SD.prototype.getDataParams=function(t){var e=wD.prototype.getDataParams.apply(this,arguments),t=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=_D(t,this),e},SD.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},O(this.layoutInfo,t)},SD.prototype.mapIdToIndex=function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=ct(),this._idIndexMapCount=0);var n=e.get(t);return null==n&&e.set(t,n=this._idIndexMapCount++),n},SD.prototype.getViewRoot=function(){return this._viewRoot},SD.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},SD.prototype.enableAriaDecal=function(){bD(this)},SD.type="series.treemap",SD.layoutMode="box",SD.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},SD);function SD(){var t=null!==wD&&wD.apply(this,arguments)||this;return t.type=SD.type,t.preventUsingHoverLayer=!0,t}Fy.registerClass(nd);var MD=5,ID=(TD.prototype.render=function(t,e,n,i){var o,r,a=t.getModel("breadcrumb"),s=this.group;s.removeAll(),a.get("show")&&n&&(r=(o=a.getModel("itemStyle")).getModel("textStyle"),a={pos:{left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]},this._prepare(n,a,r),this._renderContent(t,a,o,r,i),Ud(s,a.pos,a.box))},TD.prototype._prepare=function(t,e,n){for(var i=t;i;i=i.parentNode){var o=gh(i.getModel().get("name"),""),r=n.getTextRect(o),r=Math.max(r.width+16,e.emptyItemWidth);e.totalWidth+=r+8,e.renderList.push({node:i,text:o,width:r})}},TD.prototype._renderContent=function(t,e,n,i,o){for(var r,a,s,l,u,h,c,p,d,f,g,y,m,v=0,x=e.emptyItemWidth,_=t.get(["breadcrumb","height"]),b=(r=e.pos,a=e.box,l=a.width,u=a.height,h=Nu(r.left,l),c=Nu(r.top,u),p=Nu(r.right,l),a=Nu(r.bottom,u),(isNaN(h)||isNaN(parseFloat(r.left)))&&(h=0),(isNaN(p)||isNaN(parseFloat(r.right)))&&(p=l),(isNaN(c)||isNaN(parseFloat(r.top)))&&(c=0),(isNaN(a)||isNaN(parseFloat(r.bottom)))&&(a=u),s=Cd(s||0),{width:Math.max(p-h-s[1]-s[3],0),height:Math.max(a-c-s[0]-s[2],0)}),w=e.totalWidth,S=e.renderList,M=S.length-1;0<=M;M--){var I=S[M],T=I.node,C=I.width,D=I.text;b.width<w&&(w-=C-x,C=x,D=null);I=new La({shape:{points:(d=v,f=0,g=C,y=_,m=M===S.length-1,I=void 0,I=[[m?d:d-MD,f],[d+g,f],[d+g,f+y],[m?d:d-MD,f+y]],0===M||I.splice(2,0,[d+g+MD,f+y/2]),m||I.push([d,f+y/2]),I)},style:A(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new vl({style:{text:D,fill:i.getTextColor(),font:i.getFont()}}),textConfig:{position:"inside"},z:10,onclick:V(o,T)});I.disableLabelAnimation=!0,this.group.add(I),D=t,T=T,Wh(I).eventData={componentType:"series",componentSubType:"treemap",componentIndex:D.componentIndex,seriesIndex:D.componentIndex,seriesName:D.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:T&&T.dataIndex,name:T&&T.name},treePathInfo:T&&_D(T,D)},v+=C+8}},TD.prototype.remove=function(){this.group.removeAll()},TD);function TD(t){this.group=new $r,t.add(this.group)}var CD=(DD.prototype.add=function(t,e,n,i,o){return!this._elExistsMap[t.id]&&(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:n,delay:i,easing:o}),!0)},DD.prototype.finished=function(t){return this._finishedCallback=t,this},DD.prototype.start=function(){for(var t=this,e=this._storage.length,n=function(){--e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},i=0,o=this._storage.length;i<o;i++){var r=this._storage[i];r.el.animateTo(r.target,{duration:r.duration,delay:r.delay,easing:r.easing,setToFinal:!0,done:n,aborted:n})}return this},DD);function DD(){this._storage=[],this._elExistsMap={}}var AD,LD=$r,kD=ga,PD="label",OD="upperLabel",RD=10,ND=1,ED=2,zD=Vh([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),BD=function(t){t=zD(t);return t.stroke=t.fill=t.lineWidth=null,t},VD=_h(),af=(l(FD,AD=tm),FD.prototype.render=function(t,e,n,i){var o,r,a,s;L(e.findComponents({mainType:"series",subType:"treemap",query:i}),t)<0||(this.seriesModel=t,this.api=n,this.ecModel=e,o=mD(i,["treemapZoomToNode","treemapRootToNode"],t),r=i&&i.type,s=t.layoutInfo,a=!this._oldTree,e=this._storage,e="treemapRootToNode"===r&&o&&e?{rootNodeGroup:e.nodeGroup[o.node.getRawIndex()],direction:i.direction}:null,i=this._giveContainerGroup(s),s=this._doRender(i,t,e),a||r&&"treemapZoomToNode"!==r&&"treemapRootToNode"!==r?s.renderFinally():this._doAnimation(i,s,t,e),this._resetController(n),this._renderBreadcrumb(t,n,o))},FD.prototype._giveContainerGroup=function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new LD,this._initEvents(e),this.group.add(e)),e.x=t.x,e.y=t.y,e},FD.prototype._doRender=function(t,o,r){var e=o.getData().tree,n=this._oldTree,a=GD(),s=GD(),l=this._storage,u=[];function h(t,e,n,i){return function(p,a,s,l,u,e,d,t,n,i){if(!d)return;var f=d.getLayout(),o=p.getData(),g=d.getModel();if(o.setItemGraphicEl(d.dataIndex,null),!f||!f.isInView)return;var h=f.width,c=f.height,y=f.borderWidth,m=f.invisible,v=d.getRawIndex(),x=t&&t.getRawIndex(),r=d.viewChildren,_=f.upperHeight,b=r&&r.length,w=g.getModel("itemStyle"),S=g.getModel(["emphasis","itemStyle"]),M=g.getModel(["blur","itemStyle"]),I=g.getModel(["select","itemStyle"]),T=w.get("borderRadius")||0,C=P("nodeGroup",LD);if(!C)return;if(n.add(C),C.x=f.x||0,C.y=f.y||0,C.markRedraw(),VD(C).nodeWidth=h,VD(C).nodeHeight=c,f.isAboveViewRoot)return C;var D=P("background",kD,i,ND);D&&function(t,e,n){var i=Wh(e);{var o,r,a,s,l;i.dataIndex=d.dataIndex,i.seriesIndex=p.seriesIndex,e.setShape({x:0,y:0,width:h,height:c,r:T}),m?A(e):(e.invisible=!1,o=d.getVisual("style"),l=o.stroke,(r=BD(w)).fill=l,(a=zD(S)).fill=S.get("borderColor"),(s=zD(M)).fill=M.get("borderColor"),(i=zD(I)).fill=I.get("borderColor"),n?L(e,l,l=h-2*y,0,o.opacity,{x:y,y:0,width:l,height:_}):e.removeTextContent(),e.setStyle(r),e.ensureState("emphasis").style=a,e.ensureState("blur").style=s,e.ensureState("select").style=i,_c(e))}t.add(e)}(C,D,b&&f.upperLabelHeight);t=g.get(["emphasis","focus"]),r=g.get(["emphasis","blurScope"]),n="ancestor"===t?d.getAncestorsIndices():"descendant"===t?d.getDescendantIndices():null;{b?(Ec(C)&&Nc(C,!1),D&&(Nc(D,!0),o.setItemGraphicEl(d.dataIndex,D),kc(D,n||t,r))):((i=P("content",kD,i,ED))&&function(t,e){var n=Wh(e);n.dataIndex=d.dataIndex,n.seriesIndex=p.seriesIndex;var i=Math.max(h-2*y,0),o=Math.max(c-2*y,0);{var r,a,s,l;e.culling=!0,e.setShape({x:y,y:y,width:i,height:o,r:T}),m?A(e):(e.invisible=!1,r=d.getVisual("style"),a=r.fill,(s=BD(w)).fill=a,s.decal=r.decal,l=zD(S),n=zD(M),o=zD(I),L(e,a,i,r.opacity),e.setStyle(s),e.ensureState("emphasis").style=l,e.ensureState("blur").style=n,e.ensureState("select").style=o,_c(e))}t.add(e)}(C,i),D&&Ec(D)&&Nc(D,!1),Nc(C,!0),o.setItemGraphicEl(d.dataIndex,C),kc(C,n||t,r))}return C;function A(t){t.invisible||e.push(t)}function L(n,t,e,i,o,r){var a,s=g.getModel(r?OD:PD),l=Q(p.getFormattedLabel(d.dataIndex,"normal",null,null,s.get("formatter")),gh(g.get("name"),null));!r&&f.isLeafRoot&&(l=(a=p.get("drillDownIcon",!0))?a+" "+l:l);s=s.getShallow("show");mp(n,vp(g,r?OD:PD),{defaultText:s?l:null,inheritColor:t,defaultOpacity:e,labelFetcher:p,labelDataIndex:d.dataIndex});var u=n.getTextContent(),h=u.style,c=it(h.padding||0);r&&(n.setTextConfig({layoutRect:r}),u.disableLabelLayout=!0),u.beforeUpdate=function(){var t=Math.max((r||n.shape).width-c[1]-c[3],0),e=Math.max((r||n.shape).height-c[0]-c[2],0);h.width===t&&h.height===e||u.setStyle({width:t,height:e})},h.truncateMinChar=2,h.lineOverflow="truncate",k(h,r,f);e=u.getState("emphasis");k(e?e.style:null,r,f)}function k(t,e,n){var i=t?t.text:null;!e&&n.isLeafRoot&&null!=i&&(n=p.get("drillDownIcon",!0),t.text=n?n+" "+i:i)}function P(t,e,n,i){var o=null!=x&&s[t][x],r=u[t];return o?(s[t][x]=null,function(t,e){t=t[v]={};e instanceof LD?(t.oldX=e.x,t.oldY=e.y):t.oldShape=O({},e.shape)}(r,o)):m||((o=new e)instanceof oo&&(o.z=function(t,e){e=t*RD+e;return(e-1)/e}(n,i)),function(t,e){var n=t[v]={},i=d.parentNode,o=e instanceof $r;{!i||l&&"drillDown"!==l.direction||(e=t=0,i=u.background[i.getRawIndex()],!l&&i&&i.oldShape&&(t=i.oldShape.width,e=i.oldShape.height),o?(n.oldX=0,n.oldY=e):n.oldShape={x:t,y:e,width:0,height:0})}n.fadein=!o}(r,o)),a[t][v]=o}}(o,s,l,r,a,u,t,e,n,i)}!function i(o,r,a,s,l){s?N(r=o,function(t,e){t.isRemoved()||n(e,e)}):new B_(r,o,t,t).add(n).update(n).remove(V(n,null)).execute();function t(t){return t.getId()}function n(t,e){var n=null!=t?o[t]:null,t=null!=e?r[e]:null,e=h(n,t,a,l);e&&i(n&&n.viewChildren||[],t&&t.viewChildren||[],e,s,l+1)}}(e.root?[e.root]:[],n&&n.root?[n.root]:[],t,e===n||!n,0);var i,c,p=(c=GD(),(i=l)&&N(i,function(t,e){var n=c[e];N(t,function(t){t&&(n.push(t),VD(t).willDelete=!0)})}),c);return this._oldTree=e,this._storage=s,{lastsForAnimation:a,willDeleteEls:p,renderFinally:function(){N(p,function(t){N(t,function(t){t.parent&&t.parent.remove(t)})}),N(u,function(t){t.invisible=!0,t.dirty()})}}},FD.prototype._doAnimation=function(t,o,e,a){var n,s,l,u;e.get("animation")&&(n=e.get("animationDurationUpdate"),e=e.get("animationEasing"),s=(G(n)?0:n)||0,l=(G(e)?null:e)||"cubicOut",u=new CD,N(o.willDeleteEls,function(t,r){N(t,function(t,e){var n,i,o;t.invisible||(i=t.parent,n=VD(i),(o=a&&"drillDown"===a.direction?i===a.rootNodeGroup?{shape:{x:0,y:0,width:n.nodeWidth,height:n.nodeHeight},style:{opacity:0}}:{style:{opacity:0}}:(o=i=0,n.willDelete||(i=n.nodeWidth/2,o=n.nodeHeight/2),"nodeGroup"===r?{x:i,y:o,style:{opacity:0}}:{shape:{x:i,y:o,width:0,height:0},style:{opacity:0}}))&&u.add(t,o,s,0,l))})}),N(this._storage,function(t,i){N(t,function(t,e){var n=o.lastsForAnimation[i][e],e={};n&&(t instanceof $r?null!=n.oldX&&(e.x=t.x,e.y=t.y,t.x=n.oldX,t.y=n.oldY):(n.oldShape&&(e.shape=O({},t.shape),t.setShape(n.oldShape)),n.fadein?(t.setStyle("opacity",0),e.style={opacity:1}):1!==t.style.opacity&&(e.style={opacity:1})),u.add(t,e,s,0,l))})},this),this._state="animating",u.finished(B(function(){this._state="ready",o.renderFinally()},this)).start())},FD.prototype._resetController=function(t){var e=this._controller;e||((e=this._controller=new hC(t.getZr())).enable(this.seriesModel.get("roam")),e.on("pan",B(this._onPan,this)),e.on("zoom",B(this._onZoom,this)));var i=new Gn(0,0,t.getWidth(),t.getHeight());e.setPointerChecker(function(t,e,n){return i.contain(e,n)})},FD.prototype._clearController=function(){var t=this._controller;t&&(t.dispose(),t=null)},FD.prototype._onPan=function(t){var e;"animating"!==this._state&&(3<Math.abs(t.dx)||3<Math.abs(t.dy))&&(!(e=this.seriesModel.getData().tree.root)||(e=e.getLayout())&&this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:e.x+t.dx,y:e.y+t.dy,width:e.width,height:e.height}}))},FD.prototype._onZoom=function(t){var e,n,i,o=t.originX,r=t.originY;"animating"!==this._state&&(!(i=this.seriesModel.getData().tree.root)||(n=i.getLayout())&&(e=new Gn(n.x,n.y,n.width,n.height),Me(i=_e(),i,[-(o-=(n=this.seriesModel.layoutInfo).x),-(r-=n.y)]),Te(i,i,[t.scale,t.scale]),Me(i,i,[o,r]),e.applyTransform(i),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:e.x,y:e.y,width:e.width,height:e.height}})))},FD.prototype._initEvents=function(t){var i=this;t.on("click",function(t){var e,n;"ready"===i._state&&(!(n=i.seriesModel.get("nodeClick",!0))||(e=i.findTarget(t.offsetX,t.offsetY))&&((t=e.node).getLayout().isLeafRoot?i._rootToNode(e):"zoomToNode"===n?i._zoomToNode(e):"link"===n&&(t=(n=t.hostTree.data.getItemModel(t.dataIndex)).get("link",!0),n=n.get("target",!0)||"blank",t&&Bd(t,n))))},this)},FD.prototype._renderBreadcrumb=function(e,t,n){var i=this;n=n||((n=null!=e.get("leafDepth",!0)?{node:e.getViewRoot()}:this.findTarget(t.getWidth()/2,t.getHeight()/2))||{node:e.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new ID(this.group))).render(e,t,n.node,function(t){"animating"!==i._state&&(xD(e.getViewRoot(),t)?i._rootToNode({node:t}):i._zoomToNode({node:t}))})},FD.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=GD(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},FD.prototype.dispose=function(){this._clearController()},FD.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},FD.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},FD.prototype.findTarget=function(i,o){var r;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},function(t){var e=this._storage.background[t.getRawIndex()];if(e){var n=e.transformCoordToLocal(i,o),e=e.shape;if(!(e.x<=n[0]&&n[0]<=e.x+e.width&&e.y<=n[1]&&n[1]<=e.y+e.height))return!1;r={node:t,offsetX:n[0],offsetY:n[1]}}},this),r},FD.type="treemap",FD);function FD(){var t=null!==AD&&AD.apply(this,arguments)||this;return t.type=FD.type,t._state="ready",t._storage=GD(),t}function GD(){return{nodeGroup:[],background:[],content:[]}}tm.registerClass(af);for(var HD=function(){},WD=["treemapZoomToNode","treemapRender","treemapMove"],XD=0;XD<WD.length;XD++)A_({type:WD[XD],update:"updateView"},HD);A_({type:"treemapRootToNode",update:"updateView"},function(o,t){t.eachComponent({mainType:"series",subType:"treemap",query:o},function(t,e){var n=mD(o,["treemapZoomToNode","treemapRootToNode"],t);{var i;n&&((i=t.getViewRoot())&&(o.direction=xD(i,n.node)?"rollUp":"drillDown"),t.resetViewRoot(n.node))}})});var YD=N,UD=Y,ZD=-1,jD=(qD.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},qD.prototype.getNormalizer=function(){return B(this._normalizeData,this)},qD.listVisualTypes=function(){return z(qD.visualHandlers)},qD.isValidType=function(t){return qD.visualHandlers.hasOwnProperty(t)},qD.eachVisual=function(t,e,n){Y(t)?N(t,e,n):e.call(n,t)},qD.mapVisual=function(t,n,i){var o,r=F(t)?[]:Y(t)?{}:(o=!0,null);return qD.eachVisual(t,function(t,e){t=n.call(i,t,e);o?r=t:r[e]=t}),r},qD.retrieveVisuals=function(n){var i,o={};return n&&YD(qD.visualHandlers,function(t,e){n.hasOwnProperty(e)&&(o[e]=n[e],i=!0)}),i?o:null},qD.prepareVisualTypes=function(t){if(F(t))t=t.slice();else{if(!UD(t))return[];var n=[];YD(t,function(t,e){n.push(e)}),t=n}return t.sort(function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1}),t},qD.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},qD.findPieceIndex=function(n,t,e){for(var i,o=1/0,r=0,a=t.length;r<a;r++){var s=t[r].value;if(null!=s){if(s===n||"string"==typeof s&&s===n+"")return r;e&&h(s,r)}}for(r=0,a=t.length;r<a;r++){var l=t[r],u=l.interval,l=l.close;if(u){if(u[0]===-1/0){if(aA(l[1],n,u[1]))return r}else if(u[1]===1/0){if(aA(l[0],u[0],n))return r}else if(aA(l[0],u[0],n)&&aA(l[1],n,u[1]))return r;e&&h(u[0],r),e&&h(u[1],r)}}if(e)return n===1/0?t.length-1:n===-1/0?0:i;function h(t,e){t=Math.abs(t-n);t<o&&(o=t,i=e)}},qD.visualHandlers={color:{applyVisual:QD("color"),getColorMapper:function(){var o=this.option;return B("category"===o.mappingMethod?function(t,e){return e||(t=this._normalizeData(t)),tA.call(this,t)}:function(t,e,n){var i=!!n;return e||(t=this._normalizeData(t)),n=un(t,o.parsedVisual,n),i?n:dn(n,"rgba")},this)},_normalizedToVisual:{linear:function(t){return dn(un(t,this.option.parsedVisual),"rgba")},category:tA,piecewise:function(t,e){e=iA.call(this,e);return null==e&&(e=dn(un(t,this.option.parsedVisual),"rgba")),e},fixed:eA}},colorHue:$D(function(t,e){return cn(t,e)}),colorSaturation:$D(function(t,e){return cn(t,null,e)}),colorLightness:$D(function(t,e){return cn(t,null,null,e)}),colorAlpha:$D(pn),decal:{applyVisual:QD("decal"),_normalizedToVisual:{linear:null,category:tA,piecewise:null,fixed:null}},opacity:{applyVisual:QD("opacity"),_normalizedToVisual:nA([0,1])},liftZ:{applyVisual:QD("liftZ"),_normalizedToVisual:{linear:eA,category:eA,piecewise:eA,fixed:eA}},symbol:{applyVisual:function(t,e,n){n("symbol",this.mapValueToVisual(t))},_normalizedToVisual:{linear:JD,category:tA,piecewise:function(t,e){e=iA.call(this,e);return null==e&&(e=JD.call(this,t)),e},fixed:eA}},symbolSize:{applyVisual:QD("symbolSize"),_normalizedToVisual:nA([0,1])}},qD);function qD(t){var e=t.mappingMethod,n=t.type,t=this.option=C(t);this.type=n,this.mappingMethod=e,this._normalizeData=rA[e];var i,n=qD.visualHandlers[n];this.applyVisual=n.applyVisual,this.getColorMapper=n.getColorMapper,this._normalizedToVisual=n._normalizedToVisual[e],"piecewise"===e?(KD(t),n=(i=t).pieceList,i.hasSpecialVisual=!1,N(n,function(t,e){t.originIndex=e,null!=t.visual&&(i.hasSpecialVisual=!0)})):"category"===e?t.categories?function(t){var e=t.categories,n=t.categoryMap={},i=t.visual;{var o;YD(e,function(t,e){n[t]=e}),F(i)||(o=[],Y(i)?YD(i,function(t,e){e=n[e];o[null!=e?e:ZD]=t}):o[ZD]=i,i=oA(t,o))}for(var r=e.length-1;0<=r;r--)null==i[r]&&(delete n[e[r]],e.pop())}(t):KD(t,!0):(ot("linear"!==e||t.dataExtent),KD(t))}function KD(t,e){var n=t.visual,i=[];Y(n)?YD(n,function(t){i.push(t)}):null!=n&&i.push(n);e||1!==i.length||{color:1,symbol:1}.hasOwnProperty(t.type)||(i[1]=i[0]),oA(t,i)}function $D(i){return{applyVisual:function(t,e,n){t=this.mapValueToVisual(t);n("color",i(e("color"),t))},_normalizedToVisual:nA([0,1])}}function JD(t){var e=this.option.visual;return e[Math.round(Ru(t,[0,1],[0,e.length-1],!0))]||{}}function QD(i){return function(t,e,n){n(i,this.mapValueToVisual(t))}}function tA(t){var e=this.option.visual;return e[this.option.loop&&t!==ZD?t%e.length:t]}function eA(){return this.option.visual[0]}function nA(n){return{linear:function(t){return Ru(t,n,this.option.visual,!0)},category:tA,piecewise:function(t,e){e=iA.call(this,e);return null==e&&(e=Ru(t,n,this.option.visual,!0)),e},fixed:eA}}function iA(t){var e=this.option,n=e.pieceList;if(e.hasSpecialVisual){n=n[jD.findPieceIndex(t,n)];if(n&&n.visual)return n.visual[this.type]}}function oA(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=P(e,function(t){return rn(t)})),e}var rA={linear:function(t){return Ru(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,t=jD.findPieceIndex(t,e,!0);if(null!=t)return Ru(t,[0,e.length-1],[0,1],!0)},category:function(t){t=this.option.categories?this.option.categoryMap[t]:t;return null==t?ZD:t},fixed:gt};function aA(t,e,n){return t?e<=n:e<n}var sA="itemStyle",lA=_h(),nd={seriesType:"treemap",reset:function(t){var e=t.getData().tree.root;e.isRemoved()||!function n(t,e,i,o){var r=t.getModel();var a=t.getLayout();var s=t.hostTree.data;if(!a||a.invisible||!a.isInView)return;var l=r.getModel(sA);var u=uA(l,e,o);var h=s.ensureUniqueItemVisual(t.dataIndex,"style");var c=l.get("borderColor");e=l.get("borderColorSaturation");var p;null!=e&&(p=hA(u),s=e,c=null!=(e=p)?cn(e,null,null,s):null);h.stroke=c;var c=t.viewChildren;{var d;c&&c.length?(d=pA(0,r,a,0,u,c),N(c,function(t,e){(t.depth>=i.length||t===i[t.depth])&&(e=fA(r,u,t,e,d,o),n(t,e,i,o))})):(p=hA(u),h.fill=p)}}(e,{},t.getViewRoot().getAncestors(),t)}};function uA(n,i,t){var o=O({},i),r=t.designatedVisualItemStyle;return N(["color","colorAlpha","colorSaturation"],function(t){r[t]=i[t];var e=n.get(t);(r[t]=null)!=e&&(o[t]=e)}),o}function hA(t){var e=cA(t,"color");if(e){var n=cA(t,"colorAlpha"),t=cA(t,"colorSaturation");return t&&(e=cn(e,null,null,t)),n&&(e=pn(e,n)),e}}function cA(t,e){e=t[e];if(null!=e&&"none"!==e)return e}function pA(t,e,n,i,o,r){if(r&&r.length){var a=dA(e,"color")||null!=o.color&&"none"!==o.color&&(dA(e,"colorAlpha")||dA(e,"colorSaturation"));if(a){r=e.get("visualMin"),o=e.get("visualMax"),n=n.dataExtent.slice();null!=r&&r<n[0]&&(n[0]=r),null!=o&&o>n[1]&&(n[1]=o);e=e.get("colorMappingBy"),a={type:a.name,dataExtent:n,visual:a.range};"color"!==a.type||"index"!==e&&"id"!==e?a.mappingMethod="linear":(a.mappingMethod="category",a.loop=!0);a=new jD(a);return lA(a).drColorMappingBy=e,a}}}function dA(t,e){t=t.get(e);return F(t)&&t.length?{name:e,range:t}:null}function fA(t,e,n,i,o,r){var a,s=O({},e);return o&&(t="index"===(e="color"===(a=o.type)&&lA(o).drColorMappingBy)?i:"id"===e?r.mapIdToIndex(n.getId()):n.getValue(t.get("visualDimension")),s[a]=o.mapValueToVisual(t)),s}var gA=Math.max,yA=Math.min,mA=Q,vA=N,xA=["itemStyle","borderWidth"],_A=["itemStyle","gapWidth"],bA=["upperLabel","show"],wA=["upperLabel","height"],af={seriesType:"treemap",reset:function(t,e,n,i){var o,r=n.getWidth(),a=n.getHeight(),s=t.option,l=Yd(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),u=s.size||[],h=Nu(mA(l.width,u[0]),r),c=Nu(mA(l.height,u[1]),a),n=i&&i.type,u=mD(i,["treemapZoomToNode","treemapRootToNode"],t),i="treemapRender"===n||"treemapMove"===n?i.rootRect:null,p=t.getViewRoot(),d=vD(p);"treemapMove"!==n&&(c="treemapZoomToNode"===n?function(t,e,n,i,o){var r,a=(e||{}).node,s=[i,o];if(!a||a===n)return s;var n=i*o,l=n*t.option.zoomToNodeRatio;for(;r=a.parentNode;){for(var u=0,h=r.children,c=0,p=h.length;c<p;c++)u+=h[c].getValue();var d=a.getValue();if(0===d)return s;l*=u/d;var f=r.getModel(),d=f.get(xA),f=Math.max(d,TA(f));l+=4*d*d+(3*d+f)*Math.pow(l,.5),Hu<l&&(l=Hu),a=r}l<n&&(l=n);n=Math.pow(l/n,.5);return[i*n,o*n]}(t,u,p,h,c):i?[i.width,i.height]:[h,c],(f=s.sort)&&"asc"!==f&&"desc"!==f&&(f="desc"),f={squareRatio:s.squareRatio,sort:f,leafDepth:s.leafDepth},p.hostTree.clearLayouts(),o={x:0,y:0,width:c[0],height:c[1],area:c[0]*c[1]},p.setLayout(o),function t(e,n,i,o){var r;var a;if(e.isRemoved())return;var s=e.getLayout();r=s.width;a=s.height;var l=e.getModel();var u=l.get(xA);var h=l.get(_A)/2;var c=TA(l);var p=Math.max(u,c);var d=u-h;var s=p-h;e.setLayout({borderWidth:u,upperHeight:p,upperLabelHeight:c},!0);r=gA(r-2*d,0);a=gA(a-d-s,0);var c=r*a;var f=SA(e,l,c,n,i,o);if(!f.length)return;var g={x:d,y:s,width:r,height:a};var y=yA(r,a);var m=1/0;var v=[];v.area=0;for(var x=0,_=f.length;x<_;){var b=f[x];v.push(b),v.area+=b.getLayout().area;var b=MA(v,y,n.squareRatio);m=b<=m?(x++,b):(v.area-=v.pop().getLayout().area,IA(v,y,g,h,!1),y=yA(g.width,g.height),1/(v.length=v.area=0))}v.length&&IA(v,y,g,h,!0);{i||null!=(l=l.get("childrenVisibleMin"))&&c<l&&(i=!0)}for(var x=0,_=f.length;x<_;x++)t(f[x],n,i,o+1)}(p,f,!1,0),o=p.getLayout(),vA(d,function(t,e){e=(d[e+1]||p).getValue();t.setLayout(O({dataExtent:[e,e],borderWidth:0,upperHeight:0},o))}));var f=t.getData().tree.root;f.setLayout(function(t,e,n){if(e)return{x:e.x,y:e.y};var i={x:0,y:0};if(!n)return i;e=n.node,n=e.getLayout();if(!n)return i;var o=[n.width/2,n.height/2],r=e;for(;r;){var a=r.getLayout();o[0]+=a.x,o[1]+=a.y,r=r.parentNode}return{x:t.width/2-o[0],y:t.height/2-o[1]}}(l,i,u),!0),t.setLayoutInfo(l),function e(t,n,i,o,r){var a=t.getLayout();var s=i[r];var l=s&&s===t;if(s&&!l||r===i.length&&t!==o)return;t.setLayout({isInView:!0,invisible:!l&&!n.intersect(a),isAboveViewRoot:l},!0);var u=new Gn(n.x-a.x,n.y-a.y,n.width,n.height);vA(t.viewChildren||[],function(t){e(t,u,i,o,r+1)})}(f,new Gn(-l.x,-l.y,r,a),d,p,0)}};function SA(t,e,n,i,o,r){var a=t.children||[],s=i.sort;"asc"!==s&&"desc"!==s&&(s=null);var l,r=null!=i.leafDepth&&i.leafDepth<=r;if(o&&!r)return t.viewChildren=[];a=R(a,function(t){return!t.isRemoved()}),o=a,(l=s)&&o.sort(function(t,e){var n="asc"===l?t.getValue()-e.getValue():e.getValue()-t.getValue();return 0==n?"asc"===l?t.dataIndex-e.dataIndex:e.dataIndex-t.dataIndex:n});var u=function(t,e,n){for(var i=0,o=0,r=e.length;o<r;o++)i+=e[o].getValue();var a,s=t.get("visualDimension");e&&e.length?"value"===s&&n?(a=[e[e.length-1].getValue(),e[0].getValue()],"asc"===n&&a.reverse()):(a=[1/0,-1/0],vA(e,function(t){t=t.getValue(s);t<a[0]&&(a[0]=t),t>a[1]&&(a[1]=t)})):a=[NaN,NaN];return{sum:i,dataExtent:a}}(e,a,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=function(t,e,n,i,o){if(!i)return n;for(var r=t.get("visibleMin"),a=o.length,s=a,l=a-1;0<=l;l--){var u=o["asc"===i?a-l-1:l].getValue();u/n*e<r&&(s=l,n-=u)}return"asc"===i?o.splice(0,a-s):o.splice(s,a-s),n}(e,n,u.sum,s,a),0===u.sum)return t.viewChildren=[];for(var h=0,c=a.length;h<c;h++){var p=a[h].getValue()/u.sum*n;a[h].setLayout({area:p})}return r&&(a.length&&t.setLayout({isLeafRoot:!0},!0),a.length=0),t.viewChildren=a,t.setLayout({dataExtent:u.dataExtent},!0),a}function MA(t,e,n){for(var i,o=0,r=1/0,a=0,s=t.length;a<s;a++)(i=t[a].getLayout().area)&&(i<r&&(r=i),o<i&&(o=i));var l=t.area*t.area,n=e*e*n;return l?gA(n*o/l,l/(n*r)):1/0}function IA(t,e,n,i,o){var r=e===n.width?0:1,a=1-r,s=["x","y"],l=["width","height"],u=n[s[r]],h=e?t.area/e:0;(o||h>n[l[a]])&&(h=n[l[a]]);for(var c=0,p=t.length;c<p;c++){var d=t[c],f={},g=h?d.getLayout().area/h:0,y=f[l[a]]=gA(h-2*i,0),m=n[s[r]]+n[l[r]]-u,m=c===p-1||m<g?m:g,g=f[l[r]]=gA(m-2*i,0);f[s[a]]=n[s[a]]+yA(i,y/2),f[s[r]]=u+yA(i,g/2),u+=m,d.setLayout(f,!0)}n[s[a]]+=h,n[l[a]]-=h}function TA(t){return t.get(bA)?t.get(wA):0}function CA(t){return"_EC_"+t}P_(nd),k_(af);var DA=(AA.prototype.isDirected=function(){return this._directed},AA.prototype.addNode=function(t,e){t=null==t?""+e:""+t;var n=this._nodesMap;if(!n[CA(t)]){e=new LA(t,e);return(e.hostGraph=this).nodes.push(e),n[CA(t)]=e}},AA.prototype.getNodeByIndex=function(t){t=this.data.getRawIndex(t);return this.nodes[t]},AA.prototype.getNodeById=function(t){return this._nodesMap[CA(t)]},AA.prototype.addEdge=function(t,e,n){var i=this._nodesMap,o=this._edgesMap;if("number"==typeof t&&(t=this.nodes[t]),"number"==typeof e&&(e=this.nodes[e]),t instanceof LA||(t=i[CA(t)]),e instanceof LA||(e=i[CA(e)]),t&&e){i=t.id+"-"+e.id,n=new PA(t,e,n);return(n.hostGraph=this)._directed&&(t.outEdges.push(n),e.inEdges.push(n)),t.edges.push(n),t!==e&&e.edges.push(n),this.edges.push(n),o[i]=n}},AA.prototype.getEdgeByIndex=function(t){t=this.edgeData.getRawIndex(t);return this.edges[t]},AA.prototype.getEdge=function(t,e){t instanceof LA&&(t=t.id),e instanceof LA&&(e=e.id);var n=this._edgesMap;return this._directed?n[t+"-"+e]:n[t+"-"+e]||n[e+"-"+t]},AA.prototype.eachNode=function(t,e){for(var n=this.nodes,i=n.length,o=0;o<i;o++)0<=n[o].dataIndex&&t.call(e,n[o],o)},AA.prototype.eachEdge=function(t,e){for(var n=this.edges,i=n.length,o=0;o<i;o++)0<=n[o].dataIndex&&0<=n[o].node1.dataIndex&&0<=n[o].node2.dataIndex&&t.call(e,n[o],o)},AA.prototype.breadthFirstTraverse=function(t,e,n,i){if(e instanceof LA||(e=this._nodesMap[CA(e)]),e){for(var o="out"===n?"outEdges":"in"===n?"inEdges":"edges",r=0;r<this.nodes.length;r++)this.nodes[r].__visited=!1;if(!t.call(i,e,null))for(var a=[e];a.length;)for(var s=a.shift(),l=s[o],r=0;r<l.length;r++){var u=l[r],u=u.node1===s?u.node2:u.node1;if(!u.__visited){if(t.call(i,u,s))return;a.push(u),u.__visited=!0}}}},AA.prototype.update=function(){for(var t=this.data,e=this.edgeData,n=this.nodes,i=this.edges,o=0,r=n.length;o<r;o++)n[o].dataIndex=-1;for(o=0,r=t.count();o<r;o++)n[t.getRawIndex(o)].dataIndex=o;e.filterSelf(function(t){t=i[e.getRawIndex(t)];return 0<=t.node1.dataIndex&&0<=t.node2.dataIndex});for(o=0,r=i.length;o<r;o++)i[o].dataIndex=-1;for(o=0,r=e.count();o<r;o++)i[e.getRawIndex(o)].dataIndex=o},AA.prototype.clone=function(){for(var t=new AA(this._directed),e=this.nodes,n=this.edges,i=0;i<e.length;i++)t.addNode(e[i].id,e[i].dataIndex);for(i=0;i<n.length;i++){var o=n[i];t.addEdge(o.node1.id,o.node2.id,o.dataIndex)}return t},AA);function AA(t){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=t||!1}var LA=(kA.prototype.degree=function(){return this.edges.length},kA.prototype.inDegree=function(){return this.inEdges.length},kA.prototype.outDegree=function(){return this.outEdges.length},kA.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(t)},kA.prototype.getAdjacentDataIndices=function(){for(var t={edge:[],node:[]},e=0;e<this.edges.length;e++){var n=this.edges[e];n.dataIndex<0||(t.edge.push(n.dataIndex),t.node.push(n.node1.dataIndex,n.node2.dataIndex))}return t},kA);function kA(t,e){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=null==t?"":t,this.dataIndex=null==e?-1:e}var PA=(OA.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(t)},OA.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},OA);function OA(t,e,n){this.dataIndex=-1,this.node1=t,this.node2=e,this.dataIndex=null==n?-1:n}function RA(n,i){return{getValue:function(t){var e=this[n][i];return e.get(e.getDimension(t||"value"),this.dataIndex)},setVisual:function(t,e){0<=this.dataIndex&&this[n][i].setItemVisual(this.dataIndex,t,e)},getVisual:function(t){return this[n][i].getItemVisual(this.dataIndex,t)},setLayout:function(t,e){0<=this.dataIndex&&this[n][i].setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this[n][i].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[n][i].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[n][i].getRawIndex(this.dataIndex)}}}function NA(t,e,n,i,o){for(var r=new DA(i),a=0;a<t.length;a++)r.addNode(Q(t[a].id,t[a].name,a),a);for(var s=[],l=[],u=0,a=0;a<e.length;a++){var h=e[a],c=h.source,p=h.target;r.addEdge(c,p,u)&&(l.push(h),s.push(Q(gh(h.id,null),c+" > "+p)),u++)}var d,i=n.get("coordinateSystem");"cartesian2d"===i||"polar"===i?d=Ib(t,n):(L(i=(i=Yf.get(i))&&i.dimensions||[],"value")<0&&i.concat(["value"]),i=vb(t,{coordDimensions:i}),(d=new db(i,n)).initData(t));n=new db(["value"],n);return n.initData(l,s),o&&o(d,n),BC({mainData:d,struct:r,structAttr:"graph",datas:{node:d,edge:n},datasAttr:{node:"data",edge:"edgeData"}}),r.update(),r}I(LA,RA("hostGraph","data")),I(PA,RA("hostGraph","edgeData"));var EA="--\x3e",zA=function(t){return t.get("autoCurveness")||null},BA=function(t,e){var n=zA(t),i=20,o=[];if("number"==typeof n)i=n;else if(F(n))return void(t.__curvenessList=n);i<e&&(i=e);for(var r=i%2?i+2:i+3,o=[],a=0;a<r;a++)o.push((a%2?a+1:a)/10*(a%2?-1:1));t.__curvenessList=o},VA=function(t,e,n){t=[t.id,t.dataIndex].join("."),e=[e.id,e.dataIndex].join(".");return[n.uid,t,e].join(EA)},FA=function(t){t=t.split(EA);return[t[0],t[2],t[1]].join(EA)},GA=function(t,e){t=VA(t.node1,t.node2,e);return e.__edgeMap[t]},HA=function(t,e){return WA(VA(t.node1,t.node2,e),e)+WA(VA(t.node2,t.node1,e),e)},WA=function(t,e){e=e.__edgeMap;return e[t]?e[t].length:0};function XA(t,e,n,i){var o=zA(e),r=F(o);if(!o)return null;var a=GA(t,e);if(!a)return null;for(var s=-1,l=0;l<a.length;l++)if(a[l]===n){s=l;break}var u=HA(t,e);BA(e,u),t.lineStyle=t.lineStyle||{};var h=VA(t.node1,t.node2,e),t=e.__curvenessList,u=r||u%2?0:1;if(a.isForward)return t[u+s];h=FA(h),h=WA(h,e),e=t[s+h+u];return i?!r||o&&0===o[0]?(h+u)%2?e:-e:((h%2?0:1)+u)%2?e:-e:t[s+h+u]}var YA,nd=(l(UA,YA=Fy),UA.prototype.init=function(t){YA.prototype.init.apply(this,arguments);var e=this;function n(){return e._categoriesData}this.legendVisualProvider=new tT(n,n),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},UA.prototype.mergeOption=function(t){YA.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},UA.prototype.mergeDefaultAndTheme=function(t){YA.prototype.mergeDefaultAndTheme.apply(this,arguments),uh(t,"edgeLabel",["show"])},UA.prototype.getInitialData=function(t,e){var n=t.edges||t.links||[],i=t.data||t.nodes||[],r=this;if(i&&n){zA(t=this)&&(t.__curvenessList=[],t.__edgeMap={},BA(t));n=NA(i,n,this,!0,function(t,e){t.wrapMethod("getItemModel",function(t){var e=r._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t});var n=Fp.prototype.getModel;function i(t,e){e=n.call(this,t,e);return e.resolveParentPath=o,e}function o(t){if(!t||"label"!==t[0]&&"label"!==t[1])return t;var e=t.slice();return"label"===t[0]?e[0]="edgeLabel":"label"===t[1]&&(e[1]="edgeLabel"),e}e.wrapMethod("getItemModel",function(t){return t.resolveParentPath=o,t.getModel=i,t})});return N(n.edges,function(t){var e,n,i;e=t.node1,n=t.node2,i=this,t=t.dataIndex,zA(i)&&(e=VA(e,n,i),i=(n=i.__edgeMap)[FA(e)],n[e]&&!i?n[e].isForward=!0:i&&n[e]&&(i.isForward=!0,n[e].isForward=!1),n[e]=n[e]||[],n[e].push(t))},this),n.data}},UA.prototype.getGraph=function(){return this.getData().graph},UA.prototype.getEdgeData=function(){return this.getGraph().edgeData},UA.prototype.getCategoriesData=function(){return this._categoriesData},UA.prototype.formatTooltip=function(t,e,n){if("edge"!==n)return Ey({series:this,dataIndex:t,multipleSeries:e});var i=this.getData(),e=this.getDataParams(t,n),n=i.graph.getEdgeByIndex(t),t=i.getName(n.node1.dataIndex),i=i.getName(n.node2.dataIndex),n=[];return null!=t&&n.push(t),null!=i&&n.push(i),Iy("nameValue",{name:n.join(" > "),value:e.value,noValue:null==e.value})},UA.prototype._updateCategoriesData=function(){var t=P(this.option.categories||[],function(t){return null!=t.value?t:O({value:0},t)}),e=new db(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray(function(t){return e.getItemModel(t)})},UA.prototype.setZoom=function(t){this.option.zoom=t},UA.prototype.setCenter=function(t){this.option.center=t},UA.prototype.isAnimationEnabled=function(){return YA.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&this.get(["force","layoutAnimation"]))},UA.type="series.graph",UA.defaultOption={zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!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",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},UA);function UA(){var t=null!==YA&&YA.apply(this,arguments)||this;return t.type=UA.type,t.hasSymbolVisual=!0,t}Fy.registerClass(nd);var ZA,jA=Ma.prototype,qA=Nl.prototype,KA=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1};l($A,ZA=KA);function $A(){return null!==ZA&&ZA.apply(this,arguments)||this}function JA(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}var QA,tL=(l(eL,QA=Dr),eL.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},eL.prototype.getDefaultShape=function(){return new KA},eL.prototype.buildPath=function(t,e){(JA(e)?jA:qA).buildPath.call(this,t,e)},eL.prototype.pointAt=function(t){return(JA(this.shape)?jA:qA).pointAt.call(this,t)},eL.prototype.tangentAt=function(t){var e=this.shape,t=JA(e)?[e.x2-e.x1,e.y2-e.y1]:qA.tangentAt.call(this,t);return Ct(t,t)},eL);function eL(t){t=QA.call(this,t)||this;return t.type="ec-line",t}var nL=["fromSymbol","toSymbol"];function iL(t){return"_"+t+"Type"}function oL(t,e,n){var i=e.getItemVisual(n,t);if(i&&"none"!==i){var o=e.getItemVisual(n,t+"Size"),n=e.getItemVisual(n,t+"Rotate"),o=F(o)?o:[o,o],o=px(i,-o[0]/2,-o[1]/2,o[0],o[1]);return o.__specifiedRotation=null==n||isNaN(n)?void 0:+n*Math.PI/180||0,o.name=t,o}}function rL(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;e=e[2];e?(t.cpx1=e[0],t.cpy1=e[1]):(t.cpx1=NaN,t.cpy1=NaN)}var aL,sL=(l(lL,aL=$r),lL.prototype._createLine=function(n,i,t){var e,o=n.hostModel,r=n.getItemLayout(i),r=(e=r,rL((r=new tL({name:"line",subPixelOptimize:!0})).shape,e),r);r.shape.percent=0,Qc(r,{shape:{percent:1}},o,i),this.add(r),N(nL,function(t){var e=oL(t,n,i);this.add(e),this[iL(t)]=n.getItemVisual(i,t)},this),this._updateCommonStl(n,i,t)},lL.prototype.updateData=function(i,o,t){var e=i.hostModel,n=this.childOfName("line"),r=i.getItemLayout(o),a={shape:{}};rL(a.shape,r),Jc(n,a,e,o),N(nL,function(t){var e=i.getItemVisual(o,t),n=iL(t);this[n]!==e&&(this.remove(this.childOfName(t)),t=oL(t,i,o),this.add(t)),this[n]=e},this),this._updateCommonStl(i,o,t)},lL.prototype.getLinePath=function(){return this.childAt(0)},lL.prototype._updateCommonStl=function(n,t,e){var i=n.hostModel,r=this.childOfName("line"),o=e&&e.emphasisLineStyle,a=e&&e.blurLineStyle,s=e&&e.selectLineStyle,l=e&&e.labelStatesModels;e&&!n.hasItemOption||(o=(e=n.getItemModel(t)).getModel(["emphasis","lineStyle"]).getLineStyle(),a=e.getModel(["blur","lineStyle"]).getLineStyle(),s=e.getModel(["select","lineStyle"]).getLineStyle(),l=vp(e));var u=n.getItemVisual(t,"style"),h=u.stroke;r.useStyle(u),r.style.fill=null,r.style.strokeNoScale=!0,r.ensureState("emphasis").style=o,r.ensureState("blur").style=a,r.ensureState("select").style=s,N(nL,function(t){var e=this.childOfName(t);if(e){e.setColor(h),e.style.opacity=u.opacity;for(var n=0;n<Kh.length;n++){var i=Kh[n],o=r.getState(i);o&&(o=o.style||{},i=(i=e.ensureState(i)).style||(i.style={}),null!=o.stroke&&(i[e.__isEmptyBrush?"stroke":"fill"]=o.stroke),null!=o.opacity&&(i.opacity=o.opacity))}e.markRedraw()}},this);s=i.getRawValue(t);mp(this,l,{labelDataIndex:t,labelFetcher:{getFormattedLabel:function(t,e){return i.getFormattedLabel(t,e,n.dataType)}},inheritColor:h||"#000",defaultOpacity:u.opacity,defaultText:(null==s?n.getName(t):isFinite(s)?Eu(s):s)+""});s=this.getTextContent();s&&(l=l.normal,s.__align=s.style.align,s.__verticalAlign=s.style.verticalAlign,s.__position=l.get("position")||"middle",F(l=l.get("distance"))||(l=[l,l]),s.__labelDistance=l),this.setTextConfig({position:null,local:!0,inside:!1}),Lc(this)},lL.prototype.highlight=function(){bc(this)},lL.prototype.downplay=function(){wc(this)},lL.prototype.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},lL.prototype.setLinePoints=function(t){var e=this.childOfName("line");rL(e.shape,t),e.dirty()},lL.prototype.beforeUpdate=function(){var t=this.childOfName("fromSymbol"),e=this.childOfName("toSymbol"),n=this.getTextContent();if(t||e||n&&!n.ignore){for(var i=1,o=this.parent;o;)o.scaleX&&(i/=o.scaleX),o=o.parent;var r=this.childOfName("line");if(this.__dirty||r.__dirty){var a=r.shape.percent,s=r.pointAt(0),l=r.pointAt(a),u=St([],l,s);if(Ct(u,u),t&&(t.setPosition(s),g(t,0),t.scaleX=t.scaleY=i*a,t.markRedraw()),e&&(e.setPosition(l),g(e,1),e.scaleX=e.scaleY=i*a,e.markRedraw()),n&&!n.ignore){n.x=n.y=0;var h=void(n.originX=n.originY=0),c=void 0,p=n.__labelDistance,d=p[0]*i,t=p[1]*i,e=a/2,p=r.tangentAt(e),a=[p[1],-p[0]],e=r.pointAt(e);0<a[1]&&(a[0]=-a[0],a[1]=-a[1]);a=p[0]<0?-1:1;"start"!==n.__position&&"end"!==n.__position&&(f=-Math.atan2(p[1],p[0]),l[0]<s[0]&&(f=Math.PI+f),n.rotation=f);var f=void 0;switch(n.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":f=-t,c="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":f=t,c="top";break;default:f=0,c="middle"}switch(n.__position){case"end":n.x=u[0]*d+l[0],n.y=u[1]*t+l[1],h=.8<u[0]?"left":u[0]<-.8?"right":"center",c=.8<u[1]?"top":u[1]<-.8?"bottom":"middle";break;case"start":n.x=-u[0]*d+s[0],n.y=-u[1]*t+s[1],h=.8<u[0]?"right":u[0]<-.8?"left":"center",c=.8<u[1]?"bottom":u[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":n.x=d*a+s[0],n.y=s[1]+f,h=p[0]<0?"right":"left",n.originX=-d*a,n.originY=-f;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":n.x=e[0],n.y=e[1]+f,h="center",n.originY=-f;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":n.x=-d*a+l[0],n.y=l[1]+f,h=0<=p[0]?"right":"left",n.originX=d*a,n.originY=-f}n.scaleX=n.scaleY=i,n.setStyle({verticalAlign:n.__verticalAlign||c,align:n.__align||h})}}}function g(t,e){var n,i=t.__specifiedRotation;null==i?(n=r.tangentAt(e),t.attr("rotation",(1===e?-1:1)*Math.PI/2-Math.atan2(n[1],n[0]))):t.attr("rotation",i)}},lL);function lL(t,e,n){var i=aL.call(this)||this;return i._createLine(t,e,n),i}var uL=(hL.prototype.isPersistent=function(){return!0},hL.prototype.updateData=function(n){var i=this,e=this.group,o=this._lineData;this._lineData=n,o||e.removeAll();var r=cL(n);n.diff(o).add(function(t){i._doAdd(n,t,r)}).update(function(t,e){i._doUpdate(o,n,e,t,r)}).remove(function(t){e.remove(o.getItemGraphicEl(t))}).execute()},hL.prototype.updateLayout=function(){var n=this._lineData;n&&n.eachItemGraphicEl(function(t,e){t.updateLayout(n,e)},this)},hL.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=cL(t),this._lineData=null,this.group.removeAll()},hL.prototype.incrementalUpdate=function(t,e){function n(t){var e;t.isGroup||(e=t).animators&&0<e.animators.length||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}for(var i,o=t.start;o<t.end;o++){dL(e.getItemLayout(o))&&((i=new this._LineCtor(e,o,this._seriesScope)).traverse(n),this.group.add(i),e.setItemGraphicEl(o,i))}},hL.prototype.remove=function(){this.group.removeAll()},hL.prototype._doAdd=function(t,e,n){dL(t.getItemLayout(e))&&(n=new this._LineCtor(t,e,n),t.setItemGraphicEl(e,n),this.group.add(n))},hL.prototype._doUpdate=function(t,e,n,i,o){n=t.getItemGraphicEl(n);dL(e.getItemLayout(i))?(n?n.updateData(e,i,o):n=new this._LineCtor(e,i,o),e.setItemGraphicEl(i,n),this.group.add(n)):this.group.remove(n)},hL);function hL(t){this.group=new $r,this._LineCtor=t||sL}function cL(t){t=t.hostModel;return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:t.getModel(["emphasis","lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),labelStatesModels:vp(t)}}function pL(t){return isNaN(t[0])||isNaN(t[1])}function dL(t){return!pL(t[0])&&!pL(t[1])}function fL(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var n=t.option.nodeScaleRatio,t=e.scaleX;return((e.getZoom()-1)*n+1)/t}function gL(t){t=t.getVisual("symbolSize");return t instanceof Array&&(t=(t[0]+t[1])/2),+t}var yL=[],mL=[],vL=[],xL=To,_L=kt,bL=Math.abs;function wL(t,e,n){for(var i,o=t[0],r=t[1],a=t[2],s=1/0,l=n*n,u=.1,h=.1;h<=.9;h+=.1){yL[0]=xL(o[0],r[0],a[0],h),yL[1]=xL(o[1],r[1],a[1],h),(d=bL(_L(yL,e)-l))<s&&(s=d,i=h)}for(var c=0;c<32;c++){var p=i+u;mL[0]=xL(o[0],r[0],a[0],i),mL[1]=xL(o[1],r[1],a[1],i),vL[0]=xL(o[0],r[0],a[0],p),vL[1]=xL(o[1],r[1],a[1],p);var d=_L(mL,e)-l;if(bL(d)<.01)break;p=_L(vL,e)-l;u/=2,d<0?0<=p?i+=u:i-=u:0<=p?i-=u:i+=u}return i}function SL(t,l){var u=[],h=Ao,c=[[],[],[]],p=[[],[]],d=[];l/=2,t.eachEdge(function(t,e){var n=t.getLayout(),i=t.getVisual("fromSymbol"),o=t.getVisual("toSymbol");n.__original||(n.__original=[xt(n[0]),xt(n[1])],n[2]&&n.__original.push(xt(n[2])));var r,a,s=n.__original;null!=n[2]?(vt(c[0],s[0]),vt(c[1],s[2]),vt(c[2],s[1]),i&&"none"!==i&&(a=gL(t.node1),r=wL(c,s[0],a*l),h(c[0][0],c[1][0],c[2][0],r,u),c[0][0]=u[3],c[1][0]=u[4],h(c[0][1],c[1][1],c[2][1],r,u),c[0][1]=u[3],c[1][1]=u[4]),o&&"none"!==o&&(a=gL(t.node2),r=wL(c,s[1],a*l),h(c[0][0],c[1][0],c[2][0],r,u),c[1][0]=u[1],c[2][0]=u[2],h(c[0][1],c[1][1],c[2][1],r,u),c[1][1]=u[1],c[2][1]=u[2]),vt(n[0],c[0]),vt(n[1],c[2]),vt(n[2],c[1])):(vt(p[0],s[0]),vt(p[1],s[1]),St(d,p[1],p[0]),Ct(d,d),i&&"none"!==i&&(a=gL(t.node1),wt(p[0],p[0],d,a*l)),o&&"none"!==o&&(a=gL(t.node2),wt(p[1],p[1],d,-a*l)),vt(n[0],p[0]),vt(n[1],p[1]))})}function ML(t){return"view"===t.type}var IL,af=(l(TL,IL=tm),TL.prototype.init=function(t,e){var n=new ES,i=new uL,o=this.group;this._controller=new hC(e.getZr()),this._controllerHost={target:o},o.add(n.group),o.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},TL.prototype.render=function(t,e,n){var r=this,i=t.coordinateSystem;this._model=t;var o=this._symbolDraw,a=this._lineDraw,s=this.group;ML(i)&&(i={x:i.x,y:i.y,scaleX:i.scaleX,scaleY:i.scaleY},this._firstRender?s.attr(i):Jc(s,i,t)),SL(t.getGraph(),fL(t));var l=t.getData();o.updateData(l);o=t.getEdgeData();a.updateData(o),this._updateNodeAndLinkScale(),this._updateController(t,e,n),clearTimeout(this._layoutTimeout);var u=t.forceLayout,h=t.get(["force","layoutAnimation"]);u&&this._startForceLayoutIteration(u,h),l.graph.eachNode(function(t){var e=t.dataIndex,n=t.getGraphicEl(),i=t.getModel();n.off("drag").off("dragend");var o=i.get("draggable");o&&n.on("drag",function(){u&&(u.warmUp(),r._layouting||r._startForceLayoutIteration(u,h),u.setFixed(e),l.setItemLayout(e,[n.x,n.y]))}).on("dragend",function(){u&&u.setUnfixed(e)}),n.setDraggable(o&&!!u),"adjacency"===i.get(["emphasis","focus"])&&(Wh(n).focus=t.getAdjacentDataIndices())}),l.graph.eachEdge(function(t){var e=t.getGraphicEl();"adjacency"===t.getModel().get(["emphasis","focus"])&&(Wh(e).focus={edge:[t.dataIndex],node:[t.node1.dataIndex,t.node2.dataIndex]})});var c="circular"===t.get("layout")&&t.get(["circular","rotateLabel"]),p=l.getLayout("cx"),d=l.getLayout("cy");l.eachItemGraphicEl(function(t,e){var n=l.getItemModel(e).get(["label","rotate"])||0,i=t.getSymbolPath();c?(t=l.getItemLayout(e),(e=Math.atan2(t[1]-d,t[0]-p))<0&&(e=2*Math.PI+e),(t=t[0]<p)&&(e-=Math.PI),t=t?"left":"right",i.setTextConfig({rotation:-e,position:t,origin:"center"}),O((e=i.ensureState("emphasis")).textConfig||(e.textConfig={}),{position:t})):i.setTextConfig({rotation:n*=Math.PI/180})}),this._firstRender=!1},TL.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},TL.prototype._startForceLayoutIteration=function(t,n){var i=this;!function e(){t.step(function(t){i.updateLayout(i._model),(i._layouting=!t)&&(n?i._layoutTimeout=setTimeout(e,16):e())})}()},TL.prototype._updateController=function(o,t,r){var e=this,n=this._controller,i=this._controllerHost,a=this.group;n.setPointerChecker(function(t,e,n){var i=a.getBoundingRect();return i.applyTransform(a.transform),i.contain(e,n)&&!vC(t,r,o)}),ML(o.coordinateSystem)?(n.enable(o.get("roam")),i.zoomLimit=o.get("scaleLimit"),i.zoom=o.coordinateSystem.getZoom(),n.off("pan").off("zoom").on("pan",function(t){gC(i,t.dx,t.dy),r.dispatchAction({seriesId:o.id,type:"graphRoam",dx:t.dx,dy:t.dy})}).on("zoom",function(t){yC(i,t.scale,t.originX,t.originY),r.dispatchAction({seriesId:o.id,type:"graphRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),e._updateNodeAndLinkScale(),SL(o.getGraph(),fL(o)),e._lineDraw.updateLayout(),r.updateLabelLayout()})):n.disable()},TL.prototype._updateNodeAndLinkScale=function(){var t=this._model,e=t.getData(),n=fL(t);e.eachItemGraphicEl(function(t,e){t.setSymbolScale(n)})},TL.prototype.updateLayout=function(t){SL(t.getGraph(),fL(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},TL.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},TL.type="graph",TL);function TL(){var t=null!==IL&&IL.apply(this,arguments)||this;return t.type=TL.type,t}tm.registerClass(af),A_({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},function(){}),A_({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},function(){});function CL(t){return t instanceof Array||(t=[t,t]),t}function DL(t){var e=t.coordinateSystem;e&&"view"!==e.type||((e=t.getGraph()).eachNode(function(t){var e=t.getModel();t.setLayout([+e.get("x"),+e.get("y")])}),AL(e,t))}function AL(t,r){t.eachEdge(function(t,e){var n=et(t.getModel().get(["lineStyle","curveness"]),-XA(t,r,e,!0),0),i=xt(t.node1.getLayout()),o=xt(t.node2.getLayout()),e=[i,o];+n&&e.push([(i[0]+o[0])/2-(i[1]-o[1])*n,(i[1]+o[1])/2-(o[0]-i[0])*n]),t.setLayout(e)})}A_({type:"graphRoam",event:"graphRoam",update:"none"},function(n,t){t.eachComponent({mainType:"series",query:n},function(t){var e=MC(t.coordinateSystem,n);t.setCenter&&t.setCenter(e.center),t.setZoom&&t.setZoom(e.zoom)})});var LL=Math.PI,kL=[];function PL(s,t){var e,n,l,u,i,o=s.coordinateSystem;o&&"view"!==o.type||(i=o.getBoundingRect(),n=(e=s.getData()).graph,l=i.width/2+i.x,u=i.height/2+i.y,o=Math.min(i.width,i.height)/2,i=e.count(),e.setLayout({cx:l,cy:u}),i&&(OL[t](s,n,e,o,l,u,i),n.eachEdge(function(t,e){var n,i=et(t.getModel().get(["lineStyle","curveness"]),XA(t,s,e),0),o=xt(t.node1.getLayout()),r=xt(t.node2.getLayout()),a=(o[0]+r[0])/2,e=(o[1]+r[1])/2;+i&&(n=[l*(i*=3)+a*(1-i),u*i+e*(1-i)]),t.setLayout([o,r,n])})))}var OL={value:function(t,e,n,i,o,r,a){var s=0,l=n.getSum("value"),u=2*Math.PI/(l||a);e.eachNode(function(t){var e=t.getValue("value"),e=u*(l?e:1)/2;s+=e,t.setLayout([i*Math.cos(s)+o,i*Math.sin(s)+r]),s+=e})},symbolSize:function(t,e,n,i,o,r,a){var s=0;kL.length=a;var l=fL(t);e.eachNode(function(t){var e=gL(t);isNaN(e)&&(e=2),e<0&&(e=0),e*=l;e=Math.asin(e/2/i);isNaN(e)&&(e=LL/2),kL[t.dataIndex]=e,s+=2*e});var u=(2*LL-s)/a/2,h=0;e.eachNode(function(t){var e=u+kL[t.dataIndex];h+=e,t.setLayout([i*Math.cos(h)+o,i*Math.sin(h)+r]),h+=e})}};var RL=wt;D_(function(t){var r=t.findComponents({mainType:"legend"});r&&r.length&&t.eachSeriesByType("graph",function(t){var e=t.getCategoriesData(),i=t.getGraph().data,o=e.mapArray(e.getName);i.filterSelf(function(t){var e=i.getItemModel(t).getShallow("category");if(null!=e){"number"==typeof e&&(e=o[e]);for(var n=0;n<r.length;n++)if(!r[n].isSelected(e))return!1}return!0})})}),P_(function(t){var h={};t.eachSeriesByType("graph",function(s){var l=s.getCategoriesData(),r=s.getData(),u={};l.each(function(t){var e=l.getName(t);u["ec-"+e]=t;var n=l.getItemModel(t),i=n.getModel("itemStyle").getItemStyle();i.fill||(i.fill=s.getColorFromPalette(e,h)),l.setItemVisual(t,"style",i);for(var o=["symbol","symbolSize","symbolKeepAspect"],r=0;r<o.length;r++){var a=n.getShallow(o[r],!0);null!=a&&l.setItemVisual(t,o[r],a)}}),l.count()&&r.each(function(t){var e=r.getItemModel(t).getShallow("category");if(null!=e){"string"==typeof e&&(e=u["ec-"+e]);var n=l.getItemVisual(e,"style");O(r.ensureUniqueItemVisual(t,"style"),n);for(var i=["symbol","symbolSize","symbolKeepAspect"],o=0;o<i.length;o++)r.setItemVisual(t,i[o],l.getItemVisual(e,i[o]))}})})}),P_(function(t){t.eachSeriesByType("graph",function(t){var a=t.getGraph(),s=t.getEdgeData(),e=CL(t.get("edgeSymbol")),n=CL(t.get("edgeSymbolSize"));s.setVisual("fromSymbol",e&&e[0]),s.setVisual("toSymbol",e&&e[1]),s.setVisual("fromSymbolSize",n&&n[0]),s.setVisual("toSymbolSize",n&&n[1]),s.setVisual("style",t.getModel("lineStyle").getLineStyle()),s.each(function(t){var e=s.getItemModel(t),n=a.getEdgeByIndex(t),i=CL(e.getShallow("symbol",!0)),o=CL(e.getShallow("symbolSize",!0)),e=e.getModel("lineStyle").getLineStyle(),t=s.ensureUniqueItemVisual(t,"style");switch(O(t,e),t.stroke){case"source":var r=n.node1.getVisual("style");t.stroke=r&&r.fill;break;case"target":r=n.node2.getVisual("style");t.stroke=r&&r.fill}i[0]&&n.setVisual("fromSymbol",i[0]),i[1]&&n.setVisual("toSymbol",i[1]),o[0]&&n.setVisual("fromSymbolSize",o[0]),o[1]&&n.setVisual("toSymbolSize",o[1])})})}),k_(function(t,e){t.eachSeriesByType("graph",function(t){var e=t.get("layout"),n=t.coordinateSystem;if(n&&"view"!==n.type){var i=t.getData(),o=[];N(n.dimensions,function(t){o=o.concat(i.mapDimensionsAll(t))});for(var r=0;r<i.count();r++){for(var a=[],s=!1,l=0;l<o.length;l++){var u=i.get(o[l],r);isNaN(u)||(s=!0),a.push(u)}s?i.setItemLayout(r,n.dataToPoint(a)):i.setItemLayout(r,[NaN,NaN])}AL(i.graph,t)}else e&&"none"!==e||DL(t)})}),k_(r.VISUAL.POST_CHART_LAYOUT,function(t){t.eachSeriesByType("graph",function(t){"circular"===t.get("layout")&&PL(t,"symbolSize")})}),k_(function(t){t.eachSeriesByType("graph",function(o){var h,c,p,i,r,t,e,a,s,l,n,u,d=o.coordinateSystem;d&&"view"!==d.type||("force"===o.get("layout")?(h=o.preservedPoints||{},c=o.getGraph(),p=c.data,n=c.edgeData,e=(u=o.getModel("force")).get("initLayout"),o.preservedPoints?p.each(function(t){var e=p.getId(t);p.setItemLayout(t,h[e]||[NaN,NaN])}):e&&"none"!==e?"circular"===e&&PL(o,"value"):DL(o),i=p.getDataExtent("value"),r=n.getDataExtent("value"),t=u.get("repulsion"),e=u.get("edgeLength"),a=F(t)?t:[t,t],s=[(s=F(e)?e:[e,e])[1],s[0]],l=p.mapArray("value",function(t,e){var n=p.getItemLayout(e),t=Ru(t,i,a);return isNaN(t)&&(t=(a[0]+a[1])/2),{w:t,rep:t,fixed:p.getItemModel(e).get("fixed"),p:!n||isNaN(n[0])||isNaN(n[1])?null:n}}),n=n.mapArray("value",function(t,e){var n=c.getEdgeByIndex(e),i=Ru(t,r,s);isNaN(i)&&(i=(s[0]+s[1])/2);t=n.getModel(),e=et(n.getModel().get(["lineStyle","curveness"]),-XA(n,o,e,!0),0);return{n1:l[n.node1.dataIndex],n2:l[n.node2.dataIndex],d:i,curveness:e,ignoreForceLayout:t.get("ignoreForceLayout")}}),d=d.getBoundingRect(),(u=function(t,e,n){for(var d=t,f=e,i=(e=n.rect).width,o=e.height,g=[e.x+i/2,e.y+o/2],y=null==n.gravity?.1:n.gravity,r=0;r<d.length;r++){var a=d[r];a.p||(a.p=mt(i*(Math.random()-.5)+g[0],o*(Math.random()-.5)+g[1])),a.pp=xt(a.p),a.edges=null}var m,v,s=null==n.friction?.6:n.friction,x=s;return{warmUp:function(){x=.8*s},setFixed:function(t){d[t].fixed=!0},setUnfixed:function(t){d[t].fixed=!1},beforeStep:function(t){m=t},afterStep:function(t){v=t},step:function(t){m&&m(d,f);for(var e=[],n=d.length,i=0;i<f.length;i++){var o=f[i];o.ignoreForceLayout||(s=o.n1,St(e,(r=o.n2).p,s.p),a=Mt(e)-o.d,o=r.w/(s.w+r.w),isNaN(o)&&(o=0),Ct(e,e),s.fixed||RL(s.p,s.p,e,o*a*x),r.fixed||RL(r.p,r.p,e,-(1-o)*a*x))}for(i=0;i<n;i++){(h=d[i]).fixed||(St(e,g,h.p),RL(h.p,h.p,e,y*x))}for(i=0;i<n;i++)for(var r,a,s=d[i],l=i+1;l<n;l++){St(e,(r=d[l]).p,s.p),0===(a=Mt(e))&&(_t(e,Math.random()-.5,Math.random()-.5),a=1);var u=(s.rep+r.rep)/a/a;s.fixed||RL(s.pp,s.pp,e,u),r.fixed||RL(r.pp,r.pp,e,-u)}for(var h,c=[],i=0;i<n;i++){(h=d[i]).fixed||(St(c,h.p,h.pp),RL(h.p,h.p,c,x),vt(h.pp,h.p))}var p=(x*=.992)<.01;v&&v(d,f,p),t&&t(p)}}}(l,n,{rect:d,gravity:u.get("gravity"),friction:u.get("friction")})).beforeStep(function(t,e){for(var n=0,i=t.length;n<i;n++)t[n].fixed&&vt(t[n].p,c.getNodeByIndex(n).getLayout())}),u.afterStep(function(t,e,n){for(var i=0,o=t.length;i<o;i++)t[i].fixed||c.getNodeByIndex(i).setLayout(t[i].p),h[p.getId(i)]=t[i].p;for(i=0,o=e.length;i<o;i++){var r=e[i],a=c.getEdgeByIndex(i),s=r.n1.p,l=r.n2.p,u=a.getLayout();(u=u?u.slice():[])[0]=u[0]||[],u[1]=u[1]||[],vt(u[0],s),vt(u[1],l),+r.curveness&&(u[2]=[(s[0]+l[0])/2-(s[1]-l[1])*r.curveness,(s[1]+l[1])/2-(l[0]-s[0])*r.curveness]),a.setLayout(u)}}),o.forceLayout=u,o.preservedPoints=h,u.step()):o.forceLayout=null)})}),L_("graphView",{dimensions:CC.dimensions,create:function(t,u){var h=[];return t.eachSeriesByType("graph",function(t){var e,n,i,o,r,a,s,l=t.get("coordinateSystem");l&&"view"!==l||(n=[],r=[],Vo((e=t.getData()).mapArray(function(t){t=e.getItemModel(t);return[+t.get("x"),+t.get("y")]}),n,r),r[0]-n[0]==0&&(r[0]+=1,--n[0]),r[1]-n[1]==0&&(r[1]+=1,--n[1]),o=(r[0]-n[0])/(r[1]-n[1]),a=u,s=o,i=Yd(O(t.getBoxLayoutParams(),{aspect:s}),{width:a.getWidth(),height:a.getHeight()}),isNaN(o)&&(n=[i.x,i.y],r=[i.x+i.width,i.y+i.height]),l=r[0]-n[0],s=r[1]-n[1],a=i.width,o=i.height,(r=t.coordinateSystem=new CC).zoomLimit=t.get("scaleLimit"),r.setBoundingRect(n[0],n[1],l,s),r.setViewRect(i.x,i.y,a,o),r.setCenter(t.get("center")),r.setZoom(t.get("zoom")),h.push(r))}),h}});var NL,nd=(l(EL,NL=Fy),EL.prototype.getInitialData=function(t,e){return QI(this,["value"])},EL.type="series.gauge",EL.defaultOption={zlevel:0,z:2,center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12},pointer:{icon:null,offsetCenter:[0,0],show:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},EL);function EL(){var t=null!==NL&&NL.apply(this,arguments)||this;return t.type=EL.type,t.visualStyleAccessPath="itemStyle",t.useColorPaletteOnData=!0,t}Fy.registerClass(nd);var zL,BL=function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0},VL=(l(FL,zL=Dr),FL.prototype.getDefaultShape=function(){return new BL},FL.prototype.buildPath=function(t,e){var n=Math.cos,i=Math.sin,o=e.r,r=e.width,a=e.angle,s=e.x-n(a)*r*(o/3<=r?1:2),l=e.y-i(a)*r*(o/3<=r?1:2),a=e.angle-Math.PI/2;t.moveTo(s,l),t.lineTo(e.x+n(a)*r,e.y+i(a)*r),t.lineTo(e.x+n(e.angle)*o,e.y+i(e.angle)*o),t.lineTo(e.x-n(a)*r,e.y-i(a)*r),t.lineTo(s,l)},FL);function FL(t){t=zL.call(this,t)||this;return t.type="pointer",t}function GL(t,e){var n=null==t?"":t+"";return e&&("string"==typeof e?n=e.replace("{value}",n):"function"==typeof e&&(n=e(t))),n}var HL,WL=2*Math.PI,af=(l(XL,HL=tm),XL.prototype.render=function(t,e,n){this.group.removeAll();var i,o,r,a,s,l=t.get(["axisLine","lineStyle","color"]),s=(o=n,r=(i=t).get("center"),a=o.getWidth(),s=o.getHeight(),s=Math.min(a,s),{cx:Nu(r[0],o.getWidth()),cy:Nu(r[1],o.getHeight()),r:Nu(i.get("radius"),s/2)});this._renderMain(t,e,n,l,s),this._data=t.getData()},XL.prototype.dispose=function(){},XL.prototype._renderMain=function(t,e,n,i,o){for(var r=this.group,a=t.get("clockwise"),s=-t.get("startAngle")/180*Math.PI,l=-t.get("endAngle")/180*Math.PI,u=t.getModel("axisLine"),h=u.get("roundCap")?PI:bs,c=u.get("show"),p=u.getModel("lineStyle"),d=p.get("width"),f=(l-s)%WL||l===s?(l-s)%WL:WL,g=s,y=0;c&&y<i.length;y++){var m=new h({shape:{startAngle:g,endAngle:l=s+f*Math.min(Math.max(i[y][0],0),1),cx:o.cx,cy:o.cy,clockwise:a,r0:o.r-d,r:o.r},silent:!0});m.setStyle({fill:i[y][1]}),m.setStyle(p.getLineStyle(["color","width"])),r.add(m),g=l}function v(t){if(t<=0)return i[0][1];for(var e=0;e<i.length;e++)if(i[e][0]>=t&&(0===e?0:i[e-1][0])<t)return i[e][1];return i[e-1][1]}a||(u=s,s=l,l=u),this._renderTicks(t,e,n,v,o,s,l,a,d),this._renderTitleAndDetail(t,e,n,v,o),this._renderAnchor(t,o),this._renderPointer(t,e,n,v,o,s,l,a,d)},XL.prototype._renderTicks=function(t,e,n,i,o,r,a,s,l){for(var u=this.group,h=o.cx,c=o.cy,p=o.r,d=+t.get("min"),f=+t.get("max"),g=t.getModel("splitLine"),y=t.getModel("axisTick"),m=t.getModel("axisLabel"),v=t.get("splitNumber"),x=y.get("splitNumber"),_=Nu(g.get("length"),p),b=Nu(y.get("length"),p),w=r,S=(a-r)/v,M=S/x,I=g.getModel("lineStyle").getLineStyle(),T=y.getModel("lineStyle").getLineStyle(),C=g.get("distance"),D=0;D<=v;D++){var A,L,k,P=Math.cos(w),O=Math.sin(w);if(g.get("show")&&(L=new Ma({shape:{x1:P*(p-(k=C?C+l:l))+h,y1:O*(p-k)+c,x2:P*(p-_-k)+h,y2:O*(p-_-k)+c},style:I,silent:!0}),"auto"===I.stroke&&L.setStyle({stroke:i(D/v)}),u.add(L)),m.get("show")&&(k=m.get("distance")+C,A=GL(Eu(D/v*(f-d)+d),m.get("formatter")),L=i(D/v),u.add(new vl({style:xp(m,{text:A,x:P*(p-_-k)+h,y:O*(p-_-k)+c,verticalAlign:O<-.8?"top":.8<O?"bottom":"middle",align:P<-.4?"left":.4<P?"right":"center"},{inheritColor:L}),silent:!0}))),y.get("show")&&D!==v){k=(k=y.get("distance"))?k+l:l;for(var R=0;R<=x;R++){P=Math.cos(w),O=Math.sin(w);var N=new Ma({shape:{x1:P*(p-k)+h,y1:O*(p-k)+c,x2:P*(p-b-k)+h,y2:O*(p-b-k)+c},silent:!0,style:T});"auto"===T.stroke&&N.setStyle({stroke:i((D+R/x)/v)}),u.add(N),w+=M}w-=M}else w+=S}},XL.prototype._renderPointer=function(s,t,e,o,l,a,n,u,h){var r=this.group,c=this._data,p=this._progressEls,d=[],f=s.get(["pointer","show"]),g=s.getModel("progress"),y=g.get("show"),m=s.getData(),v=m.mapDimension("value"),i=+s.get("min"),x=+s.get("max"),_=[i,x],b=[a,n];function w(t,e){var n=m.getItemModel(t).getModel("pointer"),i=Nu(n.get("width"),l.r),o=Nu(n.get("length"),l.r),r=s.get(["pointer","icon"]),a=n.get("offsetCenter"),t=n.get("keepAspect"),n=r?px(r,Nu(a[0],l.r)-i/2,Nu(a[1],l.r)-o,i,o,null,t):new VL({shape:{angle:-Math.PI/2,width:Nu(n.get("width"),l.r),r:Nu(n.get("length"),l.r)}});return n.rotation=-(e+Math.PI/2),n.x=l.cx,n.y=l.cy,n}function S(t,e){var n=g.get("roundCap")?PI:bs,i=g.get("overlap"),o=i?g.get("width"):h/m.count(),r=i?l.r-o:l.r-(t+1)*o,o=i?l.r:l.r-t*o,o=new n({shape:{startAngle:a,endAngle:e,cx:l.cx,cy:l.cy,clockwise:u,r0:r,r:o}});return i&&(o.z2=x-m.get(v,t)%x),o}(y||f)&&(m.diff(c).add(function(t){var e,n;f&&(Qc(n=w(t,a),{rotation:-(Ru(m.get(v,t),_,b,!0)+Math.PI/2)},s),r.add(n),m.setItemGraphicEl(t,n)),y&&(e=S(t,a),n=g.get("clip"),Qc(e,{shape:{endAngle:Ru(m.get(v,t),_,b,n)}},s),r.add(e),d[t]=e)}).update(function(t,e){var n,i;f&&((i=w(t,n=(i=c.getItemGraphicEl(e))?i.rotation:a)).rotation=n,Jc(i,{rotation:-(Ru(m.get(v,t),_,b,!0)+Math.PI/2)},s),r.add(i),m.setItemGraphicEl(t,i)),y&&(e=S(t,(i=p[e])?i.shape.endAngle:a),i=g.get("clip"),Jc(e,{shape:{endAngle:Ru(m.get(v,t),_,b,i)}},s),r.add(e),d[t]=e)}).execute(),m.each(function(t){var e,n=m.getItemModel(t),i=n.getModel("emphasis");f&&((e=m.getItemGraphicEl(t)).useStyle(m.getItemVisual(t,"style")),e.setStyle(n.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===e.style.fill&&e.setStyle("fill",o(Ru(m.get(v,t),_,[0,1],!0))),e.z2EmphasisLift=0,Rc(e,n),Lc(e,i.get("focus"),i.get("blurScope"))),y&&((e=d[t]).useStyle(m.getItemVisual(t,"style")),e.setStyle(n.getModel(["progress","itemStyle"]).getItemStyle()),e.z2EmphasisLift=0,Rc(e,n),Lc(e,i.get("focus"),i.get("blurScope")))}),this._progressEls=d)},XL.prototype._renderAnchor=function(t,e){var n,i,o,r=t.getModel("anchor");r.get("show")&&(n=r.get("size"),i=r.get("icon"),o=r.get("offsetCenter"),t=r.get("keepAspect"),(t=px(i,e.cx-n/2+Nu(o[0],e.r),e.cy-n/2+Nu(o[1],e.r),n,n,null,t)).z2=r.get("showAbove")?1:0,t.setStyle(r.getModel("itemStyle").getItemStyle()),this.group.add(t))},XL.prototype._renderTitleAndDetail=function(c,t,e,p,d){var n=this,f=c.getData(),g=f.mapDimension("value"),y=+c.get("min"),m=+c.get("max"),v=new $r,x=[],_=[],b=c.isAnimationEnabled();f.diff(this._data).add(function(t){x[t]=new vl({silent:!0}),_[t]=new vl({silent:!0})}).update(function(t,e){x[t]=n._titleEls[e],_[t]=n._detailEls[e]}).execute(),f.each(function(t){var e=f.getItemModel(t),n=f.get(g,t),i=new $r,o=p(Ru(n,[y,m],[0,1],!0)),r=e.getModel("title");r.get("show")&&(h=r.get("offsetCenter"),s=d.cx+Nu(h[0],d.r),a=d.cy+Nu(h[1],d.r),(l=x[t]).attr({style:xp(r,{x:s,y:a,text:f.getName(t),align:"center",verticalAlign:"middle"},{inheritColor:o})}),Cp(l,{normal:r},c.getRawValue(t),function(){return f.getName(t)}),b&&Dp(l,t,f,c),i.add(l));var a,s,l,u,h=e.getModel("detail");h.get("show")&&(s=h.get("offsetCenter"),a=d.cx+Nu(s[0],d.r),r=d.cy+Nu(s[1],d.r),e=Nu(h.get("width"),d.r),s=Nu(h.get("height"),d.r),o=c.get(["progress","show"])?f.getItemVisual(t,"style").fill:o,l=_[t],u=h.get("formatter"),l.attr({style:xp(h,{x:a,y:r,text:GL(n,u),width:isNaN(e)?null:e,height:isNaN(s)?null:s,align:"center",verticalAlign:"middle"},{inheritColor:o})}),Cp(l,{normal:h},c.getRawValue(t),function(t){return GL(t,u)}),b&&Dp(l,t,f,c),i.add(l)),v.add(i)}),this.group.add(v),this._titleEls=x,this._detailEls=_},XL.type="gauge",XL);function XL(){var t=null!==HL&&HL.apply(this,arguments)||this;return t.type=XL.type,t}tm.registerClass(af);var YL,nd=(l(UL,YL=Fy),UL.prototype.init=function(t){YL.prototype.init.apply(this,arguments),this.legendVisualProvider=new tT(B(this.getData,this),B(this.getRawData,this)),this._defaultLabelLine(t)},UL.prototype.getInitialData=function(t,e){return QI(this,{coordDimensions:["value"],encodeDefaulter:V(wf,this)})},UL.prototype._defaultLabelLine=function(t){uh(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},UL.prototype.getDataParams=function(t){var e=this.getData(),n=YL.prototype.getDataParams.call(this,t),i=e.mapDimension("value"),o=e.getSum(i);return n.percent=o?+(e.get(i,t)/o*100).toFixed(2):0,n.$vars.push("percent"),n},UL.type="series.funnel",UL.defaultOption={zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},UL);function UL(){var t=null!==YL&&YL.apply(this,arguments)||this;return t.type=UL.type,t.useColorPaletteOnData=!0,t}nf.registerClass(nd);var ZL,jL=["itemStyle","opacity"],qL=(l(KL,ZL=La),KL.prototype.updateData=function(t,e,n){var i=t.hostModel,o=t.getItemModel(e),r=t.getItemLayout(e),a=o.getModel("emphasis"),s=null==(s=o.get(jL))?1:s;this.useStyle(t.getItemVisual(e,"style")),this.style.lineJoin="round",n?(this.setShape({points:r.points}),this.style.opacity=0,Qc(this,{style:{opacity:s}},i,e)):Jc(this,{style:{opacity:s},shape:{points:r.points}},i,e),Rc(this,o),this._updateLabel(t,e),Lc(this,a.get("focus"),a.get("blurScope"))},KL.prototype._updateLabel=function(t,e){var n=this.getTextGuideLine(),i=this.getTextContent(),o=t.hostModel,r=t.getItemModel(e),a=t.getItemLayout(e).label,s=t.getItemVisual(e,"style"),l=s.fill;mp(i,vp(r),{labelFetcher:t.hostModel,labelDataIndex:e,defaultOpacity:s.opacity,defaultText:t.getName(e)},{normal:{align:a.textAlign,verticalAlign:a.verticalAlign}}),this.setTextConfig({local:!0,inside:!!a.inside,insideStroke:l,outsideFill:l});t=a.linePoints;n.setShape({points:t}),this.textGuideLineConfig={anchor:t?new kn(t[0][0],t[0][1]):null},Jc(i,{style:{x:a.x,y:a.y}},o,e),i.attr({rotation:a.rotation,originX:a.x,originY:a.y,z2:10}),fv(this,gv(r),{stroke:l})},KL);function KL(t,e){var n=ZL.call(this)||this,i=n,o=new Ra,r=new vl;return i.setTextContent(r),n.setTextGuideLine(o),n.updateData(t,e,!0),n}var $L,af=(l(JL,$L=tm),JL.prototype.render=function(e,t,n){var i=e.getData(),o=this._data,r=this.group;i.diff(o).add(function(t){var e=new qL(i,t);i.setItemGraphicEl(t,e),r.add(e)}).update(function(t,e){e=o.getItemGraphicEl(e);e.updateData(i,t),r.add(e),i.setItemGraphicEl(t,e)}).remove(function(t){np(o.getItemGraphicEl(t),e,t)}).execute(),this._data=i},JL.prototype.remove=function(){this.group.removeAll(),this._data=null},JL.prototype.dispose=function(){},JL.type="funnel",JL);function JL(){var t=null!==$L&&$L.apply(this,arguments)||this;return t.type=JL.type,t.ignoreLabelLineUpdate=!0,t}tm.registerClass(af),k_(function(t,C){t.eachSeriesByType("funnel",function(t){var r=t.getData(),a=r.mapDimension("value"),e=t.get("sort"),n=(n=C,Yd(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})),s=t.get("orient"),l=n.width,u=n.height,i=function(t,e){for(var n=t.mapDimension("value"),i=t.mapArray(n,function(t){return t}),o=[],r="ascending"===e,a=0,s=t.count();a<s;a++)o[a]=a;return"function"==typeof e?o.sort(e):"none"!==e&&o.sort(function(t,e){return r?i[t]-i[e]:i[e]-i[t]}),o}(r,e),h=n.x,c=n.y,p="horizontal"===s?[Nu(t.get("minSize"),u),Nu(t.get("maxSize"),u)]:[Nu(t.get("minSize"),l),Nu(t.get("maxSize"),l)],n=r.getDataExtent(a),d=t.get("min"),f=t.get("max");null==d&&(d=Math.min(n[0],0)),null==f&&(f=n[1]);function o(t,e){if("horizontal"===s){var n=Ru(r.get(a,t)||0,[d,f],p,!0),i=void 0;switch(g){case"top":i=c;break;case"center":i=c+(u-n)/2;break;case"bottom":i=c+(u-n)}return[[e,i],[e,i+n]]}var o,t=Ru(r.get(a,t)||0,[d,f],p,!0);switch(g){case"left":o=h;break;case"center":o=h+(l-t)/2;break;case"right":o=h+l-t}return[[o,e],[o+t,e]]}var g=t.get("funnelAlign"),y=t.get("gap"),m=(("horizontal"===s?l:u)-y*(r.count()-1))/r.count();"ascending"===e&&(m=-m,y=-y,"horizontal"===s?h+=l:c+=u,i=i.reverse());for(var v,x,_=0;_<i.length;_++){var b,w,S,M=i[_],I=i[_+1],T=r.getItemModel(M);"horizontal"===s?(null==(b=T.get(["itemStyle","width"]))?b=m:(b=Nu(b,l),"ascending"===e&&(b=-b)),w=o(M,h),S=o(I,h+b),h+=b+y):(null==(T=T.get(["itemStyle","height"]))?T=m:(T=Nu(T,u),"ascending"===e&&(T=-T)),w=o(M,c),S=o(I,c+T),c+=T+y),r.setItemLayout(M,{points:w.concat(S.slice().reverse())})}x=(v=r).hostModel.get("orient"),v.each(function(t){var e,n,i,o,r=v.getItemModel(t),a=r.getModel("label").get("position"),s=r.getModel("labelLine"),l=v.getItemLayout(t),u=l.points,h="inner"===a||"inside"===a||"center"===a||"insideLeft"===a||"insideRight"===a,c=h?(e="insideLeft"===a?(n=(u[0][0]+u[3][0])/2+5,i=(u[0][1]+u[3][1])/2,"left"):"insideRight"===a?(n=(u[1][0]+u[2][0])/2-5,i=(u[1][1]+u[2][1])/2,"right"):(n=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,i=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,"center"),[[n,i],[n,i]]):(c=t=r=o=void 0,s=s.get("length"),e="left"===a?(o=(u[3][0]+u[0][0])/2,r=(u[3][1]+u[0][1])/2,n=(t=o-s)-5,"right"):"right"===a?(o=(u[1][0]+u[2][0])/2,r=(u[1][1]+u[2][1])/2,n=(t=o+s)+5,"left"):"top"===a?(o=(u[3][0]+u[0][0])/2,i=(c=(r=(u[3][1]+u[0][1])/2)-s)-5,"center"):"bottom"===a?(o=(u[1][0]+u[2][0])/2,i=(c=(r=(u[1][1]+u[2][1])/2)+s)+5,"center"):"rightTop"===a?(o=("horizontal"===x?u[3]:u[1])[0],r=("horizontal"===x?u[3]:u[1])[1],"horizontal"===x?(i=(c=r-s)-5,"center"):(n=(t=o+s)+5,"top")):"rightBottom"===a?(o=u[2][0],r=u[2][1],"horizontal"===x?(i=(c=r+s)+5,"center"):(n=(t=o+s)+5,"bottom")):"leftTop"===a?(o=u[0][0],r=("horizontal"===x?u[0]:u[1])[1],"horizontal"===x?(i=(c=r-s)-5,"center"):(n=(t=o-s)-5,"right")):"leftBottom"===a?(o=("horizontal"===x?u[1]:u[3])[0],r=("horizontal"===x?u[1]:u[2])[1],"horizontal"===x?(i=(c=r+s)+5,"center"):(n=(t=o-s)-5,"right")):(o=(u[1][0]+u[2][0])/2,r=(u[1][1]+u[2][1])/2,"horizontal"===x?(i=(c=r+s)+5,"center"):(n=(t=o+s)+5,"left")),"horizontal"===x?n=t=o:i=c=r,[[o,r],[t,c]]);l.label={linePoints:c,x:n,y:i,verticalAlign:"middle",textAlign:e,inside:h}})})}),D_(yT("funnel"));var QL,tk=(l(ek,QL=mu),ek.prototype.isHorizontal=function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")},ek);function ek(t,e,n,i,o){n=QL.call(this,t,e,n)||this;return n.type=i||"value",n.axisIndex=o,n}function nk(t,e,n,i,o,r){t=t||0;var a=n[1]-n[0];null!=o&&(o=ok(o,[0,a])),null!=r&&(r=Math.max(r,null!=o?o:0)),"all"===i&&(s=ok(s=Math.abs(e[1]-e[0]),[0,a]),o=r=ok(s,[o,r]),i=0),e[0]=ok(e[0],n),e[1]=ok(e[1],n);var s=ik(e,i);e[i]+=t;t=o||0,n=n.slice();return s.sign<0?n[0]+=t:n[1]-=t,e[i]=ok(e[i],n),n=ik(e,i),null!=o&&(n.sign!==s.sign||n.span<o)&&(e[1-i]=e[i]+s.sign*o),n=ik(e,i),null!=r&&n.span>r&&(e[1-i]=e[i]+n.sign*r),e}function ik(t,e){t=t[e]-t[1-e];return{span:Math.abs(t),sign:0<t||!(t<0)&&e?-1:1}}function ok(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}var rk=N,ak=Math.min,sk=Math.max,lk=Math.floor,uk=Math.ceil,hk=Eu,ck=Math.PI,pk=(dk.prototype._init=function(t,i,e){var n=t.dimensions,o=t.parallelAxisIndex;rk(n,function(t,e){var n=o[e],e=i.getComponent("parallelAxis",n),t=this._axesMap.set(t,new tk(t,Dw(e),[0,0],e.get("type"),n)),n="category"===t.type;t.onBand=n&&e.get("boundaryGap"),t.inverse=e.get("inverse"),(e.axis=t).model=e,t.coordinateSystem=e.coordinateSystem=this},this)},dk.prototype.update=function(t,e){this._updateAxesFromSeries(this._model,t)},dk.prototype.containPoint=function(t){var e=this._makeLayoutInfo(),n=e.axisBase,i=e.layoutBase,o=e.pixelDimIndex,r=t[1-o],o=t[o];return n<=r&&r<=n+e.axisLength&&i<=o&&o<=i+e.layoutLength},dk.prototype.getModel=function(){return this._model},dk.prototype._updateAxesFromSeries=function(e,i){i.eachSeries(function(t){var n;e.contains(t,i)&&(n=t.getData(),rk(this.dimensions,function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(n,n.mapDimension(t)),Cw(e.scale,e.model)},this))},this)},dk.prototype.resize=function(t,e){this._rect=Yd(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},dk.prototype.getRect=function(){return this._rect},dk.prototype._makeLayoutInfo=function(){var t=this._model,e=this._rect,n=["x","y"],i=["width","height"],o=t.get("layout"),r="horizontal"===o?0:1,a=e[i[r]],s=[0,a],l=this.dimensions.length,u=fk(t.get("axisExpandWidth"),s),h=fk(t.get("axisExpandCount")||0,[0,l]),c=t.get("axisExpandable")&&3<l&&h<l&&1<h&&0<u&&0<a,p=t.get("axisExpandWindow");p?(d=fk(p[1]-p[0],s),p[1]=p[0]+d):(d=fk(u*(h-1),s),(p=[u*(t.get("axisExpandCenter")||lk(l/2))-d/2])[1]=p[0]+d);t=(a-d)/(l-h);t<3&&(t=0);var d=[lk(hk(p[0]/u,1))+1,uk(hk(p[1]/u,1))-1],h=t/u*p[0];return{layout:o,pixelDimIndex:r,layoutBase:e[n[r]],layoutLength:a,axisBase:e[n[1-r]],axisLength:e[i[1-r]],axisExpandable:c,axisExpandWidth:u,axisCollapseWidth:t,axisExpandWindow:p,axisCount:l,winInnerIndices:d,axisExpandWindow0Pos:h}},dk.prototype._layoutAxes=function(){var r=this._rect,t=this._axesMap,e=this.dimensions,a=this._makeLayoutInfo(),s=a.layout;t.each(function(t){var e=[0,a.axisLength],n=t.inverse?1:0;t.setExtent(e[n],e[1-n])}),rk(e,function(t,e){var n=(a.axisExpandable?function(t,e){var n,i,o=e.layoutLength,r=e.axisExpandWidth,a=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,u=s,h=!1;t<l[0]?(n=t*s,i=s):t<=l[1]?(n=e.axisExpandWindow0Pos+t*r-e.axisExpandWindow[0],u=r,h=!0):(n=o-(a-1-t)*s,i=s);return{position:n,axisNameAvailableWidth:u,axisLabelShow:h,nameTruncateMaxWidth:i}}:function(t,e){e=e.layoutLength/(e.axisCount-1);return{position:e*t,axisNameAvailableWidth:e,axisLabelShow:!0}})(e,a),i={horizontal:{x:n.position,y:a.axisLength},vertical:{x:0,y:n.position}},o={horizontal:ck/2,vertical:0},e=[i[s].x+r.x,i[s].y+r.y],i=o[s],o=_e();Ie(o,o,i),Me(o,o,e),this._axesLayout[t]={position:e,rotation:i,transform:o,axisNameAvailableWidth:n.axisNameAvailableWidth,axisLabelShow:n.axisLabelShow,nameTruncateMaxWidth:n.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},dk.prototype.getAxis=function(t){return this._axesMap.get(t)},dk.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},dk.prototype.eachActiveState=function(e,t,n,i){null==n&&(n=0),null==i&&(i=e.count());var o=this._axesMap,r=this.dimensions,a=[],s=[];N(r,function(t){a.push(e.mapDimension(t)),s.push(o.get(t).model)});for(var l=this.hasAxisBrushed(),u=n;u<i;u++){var h=void 0;if(l){h="active";for(var c=e.getValues(a,u),p=0,d=r.length;p<d;p++){if("inactive"===s[p].getActiveState(c[p])){h="inactive";break}}}else h="normal";t(h,u)}},dk.prototype.hasAxisBrushed=function(){for(var t=this.dimensions,e=this._axesMap,n=!1,i=0,o=t.length;i<o;i++)"normal"!==e.get(t[i]).model.getActiveState()&&(n=!0);return n},dk.prototype.axisCoordToPoint=function(t,e){return rp([t,0],this._axesLayout[e].transform)},dk.prototype.getAxisLayout=function(t){return C(this._axesLayout[t])},dk.prototype.getSlidedAxisExpandWindow=function(t){var e=this._makeLayoutInfo(),n=e.pixelDimIndex,i=e.axisExpandWindow.slice(),o=i[1]-i[0],r=[0,e.axisExpandWidth*(e.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:i};var a,s=t[n]-e.layoutBase-e.axisExpandWindow0Pos,l="slide",u=e.axisCollapseWidth,t=this._model.get("axisExpandSlideTriggerArea"),n=null!=t[0];return u?(n&&u&&s<o*t[0]?(l="jump",a=s-o*t[2]):n&&u&&s>o*(1-t[0])?(l="jump",a=s-o*(1-t[2])):0<=(a=s-o*t[1])&&(a=s-o*(1-t[1]))<=0&&(a=0),(a*=e.axisExpandWidth/u)?nk(a,i,r,"all"):l="none"):(a=i[1]-i[0],(i=[sk(0,r[1]*s/a-a/2)])[1]=ak(r[1],i[0]+a),i[0]=i[1]-a),{axisExpandWindow:i,behavior:l}},dk);function dk(t,e,n){this.type="parallel",this._axesMap=ct(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,n)}function fk(t,e){return ak(sk(t,e[0]),e[1])}Yf.register("parallel",{create:function(i,o){var r=[];return i.eachComponent("parallel",function(t,e){var n=new pk(t,i,o);n.name="parallel_"+e,n.resize(t,o),(t.coordinateSystem=n).model=t,r.push(n)}),i.eachSeries(function(t){var e;"parallel"===t.get("coordinateSystem")&&(e=t.getReferringComponents("parallel",Sh).models[0],t.coordinateSystem=e.coordinateSystem)}),r}});var gk,nd=(l(yk,gk=nf),yk.prototype.getAreaSelectStyle=function(){return Vh([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},yk.prototype.setActiveIntervals=function(t){var e=this.activeIntervals=C(t);if(e)for(var n=e.length-1;0<=n;n--)zu(e[n])},yk.prototype.getActiveState=function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(+t))return"inactive";if(1===e.length){var n=e[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var i=0,o=e.length;i<o;i++)if(e[i][0]<=t&&t<=e[i][1])return"active";return"inactive"},yk);function yk(){var t=null!==gk&&gk.apply(this,arguments)||this;return t.type=yk.type,t.activeIntervals=[],t}nf.registerClass(nd),I(nd,Ew),MM("parallel",nd,{type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10});var mk,af=(l(vk,mk=nf),vk.prototype.init=function(){mk.prototype.init.apply(this,arguments),this.mergeOption({})},vk.prototype.mergeOption=function(t){var e=this.option;t&&b(e,t,!0),this._initDimensions()},vk.prototype.contains=function(t,e){t=t.get("parallelIndex");return null!=t&&e.getComponent("parallel",t)===this},vk.prototype.setAxisExpand=function(e){N(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(t){e.hasOwnProperty(t)&&(this.option[t]=e[t])},this)},vk.prototype._initDimensions=function(){var e=this.dimensions=[],n=this.parallelAxisIndex=[];N(R(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(t){return(t.get("parallelIndex")||0)===this.componentIndex},this),function(t){e.push("dim"+t.get("dim")),n.push(t.componentIndex)})},vk.type="parallel",vk.dependencies=["parallelAxis"],vk.layoutMode="box",vk.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},vk);function vk(){var t=null!==mk&&mk.apply(this,arguments)||this;return t.type=vk.type,t}nf.registerClass(af);A_({type:"axisAreaSelect",event:"axisAreaSelected"},function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(t){t.axis.model.setActiveIntervals(e.intervals)})}),A_("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(t){t.setAxisExpand(e)})});var xk,_k=!0,bk=Math.min,wk=Math.max,Sk=Math.pow,Mk=1e4,Ik=6,Tk=6,Ck="globalPan",Dk={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},Ak={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},Lk={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},kk=0,Pk=(l(Ok,xk=Ft),Ok.prototype.enableBrush=function(t){return this._brushType&&this._doDisableBrush(),t.brushType&&this._doEnableBrush(t),this},Ok.prototype._doEnableBrush=function(t){var e,n,i,o=this._zr;this._enableGlobalPan||(e=o,n=Ck,i=this._uid,lC(e)[n]=i),N(this._handlers,function(t,e){o.on(e,t)}),this._brushType=t.brushType,this._brushOption=b(C(Lk),t,!0)},Ok.prototype._doDisableBrush=function(){var t,e,n,i=this._zr;t=i,e=Ck,n=this._uid,(t=lC(t))[e]===n&&(t[e]=null),N(this._handlers,function(t,e){i.off(e,t)}),this._brushType=this._brushOption=null},Ok.prototype.setPanels=function(t){var e;return t&&t.length?(e=this._panels={},N(t,function(t){e[t.panelId]=C(t)})):this._panels=null,this},Ok.prototype.mount=function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({x:t.x||0,y:t.y||0,rotation:t.rotation||0,scaleX:t.scaleX||1,scaleY:t.scaleY||1}),this._transform=e.getLocalTransform(),this},Ok.prototype.updateCovers=function(i){i=P(i,function(t){return b(C(Lk),t,!0)});var n="\0-brush-index-",o=this._covers,r=this._covers=[],a=this,s=this._creatingCover;return new B_(o,i,function(t,e){return l(t.__brushOption,e)},l).add(t).update(t).remove(function(t){o[t]!==s&&a.group.remove(o[t])}).execute(),this;function l(t,e){return(null!=t.id?t.id:n+e)+"-"+t.brushType}function t(t,e){var n=i[t];null!=e&&o[e]===s?r[t]=o[e]:(n=r[t]=null!=e?(o[e].__brushOption=n,o[e]):Nk(a,Rk(a,n)),Bk(a,n))}},Ok.prototype.unmount=function(){return this.enableBrush(!1),Hk(this),this._zr.remove(this.group),this},Ok.prototype.dispose=function(){this.unmount(),this.off()},Ok);function Ok(t){var e=xk.call(this)||this;return e._track=[],e._covers=[],e._handlers={},e._zr=t,e.group=new $r,e._uid="brushController_"+kk++,N(sP,function(t,e){this._handlers[e]=B(t,this)},e),e}function Rk(t,e){var n=uP[e.brushType].createCover(t,e);return n.__brushOption=e,zk(n,e),t.group.add(n),n}function Nk(t,e){var n=Vk(e);return n.endCreating&&(n.endCreating(t,e),zk(e,e.__brushOption)),e}function Ek(t,e){var n=e.__brushOption;Vk(e).updateCoverShape(t,e,n.range,n)}function zk(t,e){var n=e.z;null==n&&(n=Mk),t.traverse(function(t){t.z=n,t.z2=n})}function Bk(t,e){Vk(e).updateCommon(t,e),Ek(t,e)}function Vk(t){return uP[t.__brushOption.brushType]}function Fk(t,e,n){var i,o=t._panels;if(!o)return _k;var r=t._transform;return N(o,function(t){t.isTargetByCursor(e,n,r)&&(i=t)}),i}function Gk(t,e){t=t._panels;if(!t)return _k;e=e.__brushOption.panelId;return null!=e?t[e]:_k}function Hk(e){var t=e._covers,n=t.length;return N(t,function(t){e.group.remove(t)},e),t.length=0,n}function Wk(t,e){var n=P(t._covers,function(t){var e=t.__brushOption,t=C(e.range);return{brushType:e.brushType,panelId:e.panelId,range:t}});t.trigger("brush",{areas:n,isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function Xk(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function Yk(e,n,t,i){var o=new $r;return o.add(new ga({name:"main",style:qk(t),silent:!0,draggable:!0,cursor:"move",drift:V(Jk,e,n,o,["n","s","w","e"]),ondragend:V(Wk,n,{isEnd:!0})})),N(i,function(t){o.add(new ga({name:t.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:V(Jk,e,n,o,t),ondragend:V(Wk,n,{isEnd:!0})}))}),o}function Uk(t,e,n,i){var o=i.brushStyle.lineWidth||0,r=wk(o,Tk),a=n[0][0],s=n[1][0],l=a-o/2,u=s-o/2,h=n[0][1],c=n[1][1],p=h-r+o/2,d=c-r+o/2,n=h-a,h=c-s,c=n+o,o=h+o;jk(t,e,"main",a,s,n,h),i.transformable&&(jk(t,e,"w",l,u,r,o),jk(t,e,"e",p,u,r,o),jk(t,e,"n",l,u,c,r),jk(t,e,"s",l,d,c,r),jk(t,e,"nw",l,u,r,r),jk(t,e,"ne",p,u,r,r),jk(t,e,"sw",l,d,r,r),jk(t,e,"se",p,d,r,r))}function Zk(n,i){var t=i.__brushOption,o=t.transformable,e=i.childAt(0);e.useStyle(qk(t)),e.attr({silent:!o,cursor:o?"move":"default"}),N([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(t){var e=i.childOfName(t.join("")),t=1===t.length?$k(n,t[0]):function(t,e){e=[$k(t,e[0]),$k(t,e[1])];return"e"!==e[0]&&"w"!==e[0]||e.reverse(),e.join("")}(n,t);e&&e.attr({silent:!o,invisible:!o,cursor:o?Ak[t]+"-resize":null})})}function jk(t,e,n,i,o,r,a){n=e.childOfName(n);n&&n.setShape((i=eP(t,e,[[i,o],[i+r,o+a]]),r=bk(i[0][0],i[1][0]),o=bk(i[0][1],i[1][1]),a=wk(i[0][0],i[1][0]),i=wk(i[0][1],i[1][1]),{x:r,y:o,width:a-r,height:i-o}))}function qk(t){return A({strokeNoScale:!0},t.brushStyle)}function Kk(t,e,n,i){var o=[bk(t,n),bk(e,i)],i=[wk(t,n),wk(e,i)];return[[o[0],i[0]],[o[1],i[1]]]}function $k(t,e){return{left:"w",right:"e",top:"n",bottom:"s"}[ap({w:"left",e:"right",n:"top",s:"bottom"}[e],op(t.group))]}function Jk(t,e,n,i,o,r){var a=n.__brushOption,s=t.toRectRange(a.range),l=tP(e,o,r);N(i,function(t){t=Dk[t];s[t[0]][t[1]]+=l[t[0]]}),a.range=t.fromRectRange(Kk(s[0][0],s[1][0],s[0][1],s[1][1])),Bk(e,n),Wk(e,{isEnd:!1})}function Qk(t,e,n,i){var o=e.__brushOption.range,r=tP(t,n,i);N(o,function(t){t[0]+=r[0],t[1]+=r[1]}),Bk(t,e),Wk(t,{isEnd:!1})}function tP(t,e,n){t=t.group,n=t.transformCoordToLocal(e,n),t=t.transformCoordToLocal(0,0);return[n[0]-t[0],n[1]-t[1]]}function eP(t,e,n){e=Gk(t,e);return e&&e!==_k?e.clipPath(n,t._transform):C(n)}function nP(t,e,n){if(t._brushType&&!function(t,e,n){t=t._zr;return e<0||e>t.getWidth()||n<0||n>t.getHeight()}(t,e.offsetX,e.offsetY)){var i=t._zr,o=t._covers,r=Fk(t,e,n);if(!t._dragging)for(var a=0;a<o.length;a++){var s=o[a].__brushOption;if(r&&(r===_k||s.panelId===r.panelId)&&uP[s.brushType].contain(o[a],n[0],n[1]))return}r&&i.setCursorStyle("crosshair")}}function iP(t){t=t.event;t.preventDefault&&t.preventDefault()}function oP(t,e,n){return t.childOfName("main").contain(e,n)}function rP(t,e,n,i){var o,r,a=t._creatingCover,s=t._creatingPanel,l=t._brushOption;return t._track.push(n.slice()),function(t){if((n=t._track).length){var e=n[n.length-1],t=n[0],n=e[0]-t[0],t=e[1]-t[1],t=Sk(n*n+t*t,.5);return Ik<t}}(t)||a?(s&&!a&&("single"===l.brushMode&&Hk(t),(o=C(l)).brushType=aP(o.brushType,s),o.panelId=s===_k?null:s.panelId,a=t._creatingCover=Rk(t,o),t._covers.push(a)),a&&(r=uP[aP(t._brushType,s)],a.__brushOption.range=r.getCreatingRange(eP(t,a,t._track)),i&&(Nk(t,a),r.updateCommon(t,a)),Ek(t,a),r={isEnd:i})):i&&"single"===l.brushMode&&l.removeOnClick&&Fk(t,e,n)&&Hk(t)&&(r={isEnd:i,removeOnClick:!0}),r}function aP(t,e){return"auto"===t?e.defaultBrushType:t}var sP={mousedown:function(t){var e;this._dragging?lP(this,t):t.target&&t.target.draggable||(iP(t),e=this.group.transformCoordToLocal(t.offsetX,t.offsetY),this._creatingCover=null,(this._creatingPanel=Fk(this,t,e))&&(this._dragging=!0,this._track=[e.slice()]))},mousemove:function(t){var e=t.offsetX,n=t.offsetY,n=this.group.transformCoordToLocal(e,n);nP(this,t,n),this._dragging&&(iP(t),(n=rP(this,t,n,!1))&&Wk(this,n))},mouseup:function(t){lP(this,t)}};function lP(t,e){var n,i;t._dragging&&(iP(e),n=e.offsetX,i=e.offsetY,i=t.group.transformCoordToLocal(n,i),i=rP(t,e,i,!0),t._dragging=!1,t._track=[],t._creatingCover=null,i&&Wk(t,i))}var uP={lineX:hP(0),lineY:hP(1),rect:{createCover:function(t,e){function n(t){return t}return Yk({toRectRange:n,fromRectRange:n},t,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(t){t=Xk(t);return Kk(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(t,e,n,i){Uk(t,e,n,i)},updateCommon:Zk,contain:oP},polygon:{createCover:function(t,e){var n=new $r;return n.add(new Ra({name:"main",style:qk(e),silent:!0})),n},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new La({name:"main",draggable:!0,drift:V(Qk,t,e),ondragend:V(Wk,t,{isEnd:!0})}))},updateCoverShape:function(t,e,n,i){e.childAt(0).setShape({points:eP(t,e,n)})},updateCommon:Zk,contain:oP}};function hP(a){return{createCover:function(t,e){return Yk({toRectRange:function(t){t=[t,[0,100]];return a&&t.reverse(),t},fromRectRange:function(t){return t[a]}},t,e,[[["w"],["e"]],[["n"],["s"]]][a])},getCreatingRange:function(t){t=Xk(t);return[bk(t[0][a],t[1][a]),wk(t[0][a],t[1][a])]},updateCoverShape:function(t,e,n,i){var o=Gk(t,e),r=[n,o!==_k&&o.getLinearBrushOtherExtent?o.getLinearBrushOtherExtent(a):[0,[(r=t._zr).getWidth(),r.getHeight()][1-a]]];a&&r.reverse(),Uk(t,e,r,i)},updateCommon:Zk,contain:oP}}function cP(e){return e=fP(e),function(t){return up(t,e)}}function pP(n,i){return n=fP(n),function(t){var e=null!=i?i:t,t=e?n.width:n.height,e=e?n.x:n.y;return[e,e+(t||0)]}}function dP(t,n,i){var o=fP(t);return function(t,e){return o.contain(e[0],e[1])&&!vC(t,n,i)}}function fP(t){return Gn.create(t)}var gP,yP=["axisLine","axisTickLabel","axisName"],nd=(l(mP,gP=qy),mP.prototype.init=function(t,e){gP.prototype.init.apply(this,arguments),(this._brushController=new Pk(e.getZr())).on("brush",B(this._onBrush,this))},mP.prototype.render=function(t,e,n,i){var o,r,a,s;a=t,r=e,(s=i)&&"axisAreaSelect"===s.type&&r.findComponents({mainType:"parallelAxis",query:s})[0]===a||(this.axisModel=t,this.api=n,this.group.removeAll(),o=this._axisGroup,this._axisGroup=new $r,this.group.add(this._axisGroup),t.get("show")&&(i=t,s=(r=e.getComponent("parallel",i.get("parallelIndex"))).coordinateSystem,e=(a=t.getAreaSelectStyle()).width,i=t.axis.dim,s=O({strokeContainThreshold:e},s.getAxisLayout(i)),i=new AM(t,s),N(yP,i.add,i),this._axisGroup.add(i.getGroup()),this._refreshBrushController(s,a,t,r,e,n),lp(o,this._axisGroup,t)))},mP.prototype._refreshBrushController=function(t,e,n,i,o,r){var a,s=n.axis.getExtent(),l=s[1]-s[0],u=Math.min(30,.1*Math.abs(l)),o=Gn.create({x:s[0],y:-o/2,width:l,height:o});o.x-=u,o.width+=2*u,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:cP(o),isTargetByCursor:dP(o,r,i),getLinearBrushOtherExtent:pP(o,0)}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:!0}).updateCovers((a=(n=n).axis,P(n.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[a.dataToCoord(t[0],!0),a.dataToCoord(t[1],!0)]}})))},mP.prototype._onBrush=function(t){var e=t.areas,n=this.axisModel,i=n.axis,e=P(e,function(t){return[i.coordToData(t.range[0],!0),i.coordToData(t.range[1],!0)]});!n.option.realtime!==t.isEnd&&!t.removeOnClick||this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:e})},mP.prototype.dispose=function(){this._brushController.dispose()},mP.type="parallelAxis",mP);function mP(){var t=null!==gP&&gP.apply(this,arguments)||this;return t.type=mP.type,t}qy.registerClass(nd);var vP,af=(l(xP,vP=qy),xP.prototype.render=function(t,e,n){this._model=t,this._api=n,this._handlers||(this._handlers={},N(_P,function(t,e){n.getZr().on(e,this._handlers[e]=B(t,this))},this)),cm(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},xP.prototype.dispose=function(t,n){N(this._handlers,function(t,e){n.getZr().off(e,t)}),this._handlers=null},xP.prototype._throttledDispatchExpand=function(t){this._dispatchExpand(t)},xP.prototype._dispatchExpand=function(t){t&&this._api.dispatchAction(O({type:"parallelAxisExpand"},t))},xP.type="parallel",xP);function xP(){var t=null!==vP&&vP.apply(this,arguments)||this;return t.type=xP.type,t}qy.registerClass(af);var _P={mousedown:function(t){bP(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(bP(this,"click")&&e){var n=[t.offsetX,t.offsetY];if(5<Math.pow(e[0]-n[0],2)+Math.pow(e[1]-n[1],2))return;t=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==t.behavior&&this._dispatchExpand({axisExpandWindow:t.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){var e,n;!this._mouseDownPoint&&bP(this,"mousemove")&&("jump"===(t=(n=(e=this._model).coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY])).behavior)&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===t?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===t?null:{duration:0}}))}};function bP(t,e){t=t._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}C_(function(t){var n;!function(t){if(t.parallel)return;var e=!1;N(t.series,function(t){t&&"parallel"===t.type&&(e=!0)}),e&&(t.parallel=[{}])}(t),N(lh((n=t).parallelAxis),function(t){var e;Y(t)&&(e=t.parallelIndex||0,(e=lh(n.parallel)[e])&&e.parallelAxisDefault&&b(t,e.parallelAxisDefault,!1))})});var wP,nd=(l(SP,wP=Fy),SP.prototype.getInitialData=function(t,e){return Ib(this.getSource(),this,{useEncodeDefaulter:B(MP,null,this)})},SP.prototype.getRawIndicesByActiveState=function(n){var t=this.coordinateSystem,i=this.getData(),o=[];return t.eachActiveState(i,function(t,e){n===t&&o.push(i.getRawIndex(e))}),o},SP.type="series.parallel",SP.dependencies=["parallel"],SP.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"},SP);function SP(){var t=null!==wP&&wP.apply(this,arguments)||this;return t.type=SP.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}function MP(t){t=t.ecModel.getComponent("parallel",t.get("parallelIndex"));if(t){var n={};return N(t.dimensions,function(t){var e=+t.replace("dim","");n[t]=e}),n}}Fy.registerClass(nd);var IP,af=(l(TP,IP=tm),TP.prototype.init=function(){this.group.add(this._dataGroup)},TP.prototype.render=function(i,t,e,n){var o,r,a,s,l,u=this._dataGroup,h=i.getData(),c=this._data,p=i.coordinateSystem,d=p.dimensions,f=AP(i);h.diff(c).add(function(t){LP(DP(h,u,t,d,p),h,t,f)}).update(function(t,e){var n=c.getItemGraphicEl(e),e=CP(h,t,d,p);h.setItemGraphicEl(t,n),Jc(n,{shape:{points:e}},i,t),LP(n,h,t,f)}).remove(function(t){t=c.getItemGraphicEl(t);u.remove(t)}).execute(),this._initialized||(this._initialized=!0,r=i,a=function(){setTimeout(function(){u.removeClipPath()})},s=(o=p).model,l=o.getRect(),o=new ga({shape:{x:l.x,y:l.y,width:l.width,height:l.height}}),s="horizontal"===s.get("layout")?"width":"height",o.setShape(s,0),Qc(o,{shape:{width:l.width,height:l.height}},r,a),o=o,u.setClipPath(o)),this._data=h},TP.prototype.incrementalPrepareRender=function(t,e,n){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},TP.prototype.incrementalRender=function(t,e,n){for(var i=e.getData(),o=e.coordinateSystem,r=o.dimensions,a=AP(e),s=t.start;s<t.end;s++){var l=DP(i,this._dataGroup,s,r,o);l.incremental=!0,LP(l,i,s,a)}},TP.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},TP.type="parallel",TP);function TP(){var t=null!==IP&&IP.apply(this,arguments)||this;return t.type=TP.type,t._dataGroup=new $r,t._initialized=!1,t}function CP(t,e,n,i){for(var o,r=[],a=0;a<n.length;a++){var s=n[a],l=t.get(t.mapDimension(s),e);o=l,("category"===i.getAxis(s).type?null==o:null==o||isNaN(o))||r.push(i.dataToPoint(l,s))}return r}function DP(t,e,n,i,o){o=CP(t,n,i,o),o=new Ra({shape:{points:o},z2:10});return e.add(o),t.setItemGraphicEl(n,o),o}function AP(t){t=t.get("smooth",!0);return!0===t&&(t=.3),J(t=Ju(t))&&(t=0),{smooth:t}}function LP(t,e,n,i){t.useStyle(e.getItemVisual(n,"style")),t.style.fill=null,t.setShape("smooth",i.smooth);e=e.getItemModel(n),n=e.getModel("emphasis");Rc(t,e,"lineStyle"),Lc(t,n.get("focus"),n.get("blurScope"))}tm.registerClass(af);var kP=["lineStyle","opacity"],nd={seriesType:"parallel",reset:function(t,e){var n=t.coordinateSystem,o={normal:t.get(["lineStyle","opacity"]),active:t.get("activeOpacity"),inactive:t.get("inactiveOpacity")};return{progress:function(t,i){n.eachActiveState(i,function(t,e){var n=o[t];"normal"!==t||!i.hasItemOption||null!=(t=i.getItemModel(e).get(kP,!0))&&(n=t),i.ensureUniqueItemVisual(e,"style").opacity=n},t.start,t.end)}}}};P_(r.VISUAL.BRUSH,nd);var PP,af=(l(OP,PP=Fy),OP.prototype.getInitialData=function(t,e){var n=t.edges||t.links,i=t.data||t.nodes,o=t.levels;this.levelModels=[];for(var r=this.levelModels,a=0;a<o.length;a++)null!=o[a].depth&&0<=o[a].depth&&(r[o[a].depth]=new Fp(o[a],this,e));if(i&&n)return NA(i,n,this,!0,function(t,e){t.wrapMethod("getItemModel",function(t,e){var n=t.parentModel,e=n.getData().getItemLayout(e);return e&&(e=e.depth,(e=n.levelModels[e])&&(t.parentModel=e)),t}),e.wrapMethod("getItemModel",function(t,e){var n=t.parentModel,e=n.getGraph().getEdgeByIndex(e).node1.getLayout();return e&&(e=e.depth,(e=n.levelModels[e])&&(t.parentModel=e)),t})}).data},OP.prototype.setNodePosition=function(t,e){t=this.option.data[t];t.localX=e[0],t.localY=e[1]},OP.prototype.getGraph=function(){return this.getData().graph},OP.prototype.getEdgeData=function(){return this.getGraph().edgeData},OP.prototype.formatTooltip=function(t,e,n){function i(t){return isNaN(t)||null==t}if("edge"===n){var o=this.getDataParams(t,n),r=o.data,o=o.value;return Iy("nameValue",{name:r.source+" -- "+r.target,value:o,noValue:i(o)})}o=this.getGraph().getNodeByIndex(t).getLayout().value;return Iy("nameValue",{name:this.getDataParams(t,n).data.name,value:o,noValue:i(o)})},OP.prototype.optionUpdated=function(){var t=this.option;!0===t.focusNodeAdjacency&&(t.focusNodeAdjacency="allEdges")},OP.prototype.getDataParams=function(t,e){var n=PP.prototype.getDataParams.call(this,t,e);return null==n.value&&"node"===e&&(t=this.getGraph().getNodeByIndex(t).getLayout().value,n.value=t),n},OP.type="series.sankey",OP.defaultOption={zlevel:0,z:2,coordinateSystem:"view",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",fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},OP);function OP(){var t=null!==PP&&PP.apply(this,arguments)||this;return t.type=OP.type,t}Fy.registerClass(af);var RP,NP=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0},EP=(l(zP,RP=Dr),zP.prototype.getDefaultShape=function(){return new NP},zP.prototype.buildPath=function(t,e){var n=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+n,e.y2),t.bezierCurveTo(e.cpx2+n,e.cpy2,e.cpx1+n,e.cpy1,e.x1+n,e.y1)):(t.lineTo(e.x2,e.y2+n),t.bezierCurveTo(e.cpx2,e.cpy2+n,e.cpx1,e.cpy1+n,e.x1,e.y1+n)),t.closePath()},zP.prototype.highlight=function(){bc(this)},zP.prototype.downplay=function(){wc(this)},zP);function zP(t){return RP.call(this,t)||this}var BP,nd=(l(VP,BP=tm),VP.prototype.render=function(_,t,i){var e,n,o=this,r=_.getGraph(),b=this.group,a=_.layoutInfo,w=a.width,S=a.height,s=_.getData(),M=_.getData("edge"),I=_.get("orient");this._model=_,b.removeAll(),b.x=a.x,b.y=a.y,r.eachEdge(function(t){var e=new EP,n=Wh(e);n.dataIndex=t.dataIndex,n.seriesIndex=_.seriesIndex,n.dataType="edge";var i,o,r,a,s,l,u,h=t.getModel(),c=h.getModel("lineStyle"),p=c.get("curveness"),d=t.node1.getLayout(),f=t.node1.getModel(),g=f.get("localX"),y=f.get("localY"),m=t.node2.getLayout(),v=t.node2.getModel(),n=v.get("localX"),f=v.get("localY"),v=t.getLayout();switch(e.shape.extent=Math.max(1,v.dy),v="vertical"===(e.shape.orient=I)?(i=(null!=g?g*w:d.x)+v.sy,o=(null!=y?y*S:d.y)+d.dy,r=(null!=n?n*w:m.x)+v.ty,s=i,l=o*(1-p)+(a=null!=f?f*S:m.y)*p,u=r,o*p+a*(1-p)):(i=(null!=g?g*w:d.x)+d.dx,o=(null!=y?y*S:d.y)+v.sy,s=i*(1-p)+(r=null!=n?n*w:m.x)*p,l=o,u=i*p+r*(1-p),a=(null!=f?f*S:m.y)+v.ty),e.setShape({x1:i,y1:o,x2:r,y2:a,cpx1:s,cpy1:l,cpx2:u,cpy2:v}),e.useStyle(c.getItemStyle()),e.style.fill){case"source":e.style.fill=t.node1.getVisual("color"),e.style.decal=t.node1.getVisual("style").decal;break;case"target":e.style.fill=t.node2.getVisual("color"),e.style.decal=t.node2.getVisual("style").decal;break;case"gradient":var c=t.node1.getVisual("color"),x=t.node2.getVisual("color");"string"==typeof c&&"string"==typeof x&&(e.style.fill=new Va(0,0,1,0,[{color:c,offset:0},{color:x,offset:1}]))}x=h.getModel("emphasis");Rc(e,h,"lineStyle",function(t){return t.getItemStyle()}),b.add(e),M.setItemGraphicEl(t.dataIndex,e);h=x.get("focus");Lc(e,"adjacency"===h?t.getAdjacentDataIndices():h,x.get("blurScope")),Wh(e).dataType="edge"}),r.eachNode(function(t){var e=t.getLayout(),n=t.getModel(),i=n.get("localX"),o=n.get("localY"),r=n.getModel("emphasis"),e=new ga({shape:{x:null!=i?i*w:e.x,y:null!=o?o*S:e.y,width:e.dx,height:e.dy},style:n.getModel("itemStyle").getItemStyle()});mp(e,vp(n),{labelFetcher:_,labelDataIndex:t.dataIndex,defaultText:t.id}),e.disableLabelAnimation=!0,e.setStyle("fill",t.getVisual("color")),e.setStyle("decal",t.getVisual("style").decal),Rc(e,n),b.add(e),s.setItemGraphicEl(t.dataIndex,e),Wh(e).dataType="node";n=r.get("focus");Lc(e,"adjacency"===n?t.getAdjacentDataIndices():n,r.get("blurScope"))}),s.eachItemGraphicEl(function(t,n){s.getItemModel(n).get("draggable")&&(t.drift=function(t,e){o._focusAdjacencyDisabled=!0,this.shape.x+=t,this.shape.y+=e,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:_.id,dataIndex:s.getRawIndex(n),localX:this.shape.x/w,localY:this.shape.y/S})},t.ondragend=function(){o._focusAdjacencyDisabled=!1},t.draggable=!0,t.cursor="move")}),!this._data&&_.isAnimationEnabled()&&b.setClipPath((e=b.getBoundingRect(),n=_,a=function(){b.removeClipPath()},Qc(r=new ga({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}}),{shape:{width:e.width+20}},n,a),r)),this._data=_.getData()},VP.prototype.dispose=function(){},VP.type="sankey",VP);function VP(){var t=null!==BP&&BP.apply(this,arguments)||this;return t.type=VP.type,t._focusAdjacencyDisabled=!1,t}function FP(t){t=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=t.depth&&0<=t.depth}function GP(t,l,u,h,c){var p="vertical"===c?"x":"y";N(t,function(t){var e,n;t.sort(function(t,e){return t.getLayout()[p]-e.getLayout()[p]});for(var i,o=0,r=t.length,a="vertical"===c?"dx":"dy",s=0;s<r;s++)0<(i=o-(n=t[s]).getLayout()[p])&&(e=n.getLayout()[p]+i,"vertical"===c?n.setLayout({x:e},!0):n.setLayout({y:e},!0)),o=n.getLayout()[p]+n.getLayout()[a]+l;if(0<(i=o-l-("vertical"===c?h:u))){e=n.getLayout()[p]-i,"vertical"===c?n.setLayout({x:e},!0):n.setLayout({y:e},!0),o=e;for(s=r-2;0<=s;--s)0<(i=(n=t[s]).getLayout()[p]+n.getLayout()[a]+l-o)&&(e=n.getLayout()[p]-i,"vertical"===c?n.setLayout({x:e},!0):n.setLayout({y:e},!0)),o=n.getLayout()[p]}})}function HP(t,e){return UP(t.node2,e)*t.getValue()}function WP(t,e){return UP(t.node2,e)}function XP(t,e){return UP(t.node1,e)*t.getValue()}function YP(t,e){return UP(t.node1,e)}function UP(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function ZP(t){return t.getValue()}function jP(t,e,n){for(var i=0,o=t.length,r=-1;++r<o;){var a=+e(t[r],n);isNaN(a)||(i+=a)}return i}tm.registerClass(nd),A_({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(t){t.setNodePosition(e.dataIndex,[e.localX,e.localY])})}),k_(function(t,u){t.eachSeriesByType("sankey",function(t){var e=t.get("nodeWidth"),n=t.get("nodeGap"),i=(l=u,Yd(t.getBoxLayoutParams(),{width:l.getWidth(),height:l.getHeight()})),o=(t.layoutInfo=i).width,r=i.height,a=t.getGraph(),s=a.nodes,l=a.edges;N(s,function(t){var e=jP(t.outEdges,ZP),n=jP(t.inEdges,ZP),i=t.getValue()||0,i=Math.max(e,n,i);t.setLayout({value:i},!0)});i=0!==R(s,function(t){return 0===t.getLayout().value}).length?0:t.get("layoutIterations"),a=t.get("orient"),t=t.get("nodeAlign");n=n,i=i,function(t,e,n,i,o,r,a){for(var s=[],l=[],u=[],h=[],c=0,p=0;p<e.length;p++)s[p]=1;for(p=0;p<t.length;p++)l[p]=t[p].inEdges.length,0===l[p]&&u.push(t[p]);var d=-1;for(;u.length;){for(var f=0;f<u.length;f++){var g=u[f],y=g.hostGraph.data.getRawDataItem(g.dataIndex),m=null!=y.depth&&0<=y.depth;m&&y.depth>d&&(d=y.depth),g.setLayout({depth:m?y.depth:c},!0),"vertical"===r?g.setLayout({dy:n},!0):g.setLayout({dx:n},!0);for(var v=0;v<g.outEdges.length;v++){var x=g.outEdges[v],_=e.indexOf(x);s[_]=0;_=x.node2,x=t.indexOf(_);0==--l[x]&&h.indexOf(_)<0&&h.push(_)}}++c,u=h,h=[]}for(p=0;p<s.length;p++)if(1===s[p])throw new Error("Sankey is a DAG, the original data has cycle!");var b=c-1<d?d:c-1;a&&"left"!==a&&function(t,e,n){if("right"===e){for(var i=[],o=t,r=0;o.length;){for(var a=0;a<o.length;a++){var s=o[a];s.setLayout({skNodeHeight:r},!0);for(var l=0;l<s.inEdges.length;l++){var u=s.inEdges[l];i.indexOf(u.node1)<0&&i.push(u.node1)}}o=i,i=[],++r}N(t,function(t){FP(t)||t.setLayout({depth:Math.max(0,n-t.getLayout().skNodeHeight)},!0)})}else"justify"===e&&function(t,e){N(t,function(t){FP(t)||t.outEdges.length||t.setLayout({depth:e},!0)})}(t,n)}(t,a,b);!function(t,n,i){N(t,function(t){var e=t.getLayout().depth*n;"vertical"===i?t.setLayout({y:e},!0):t.setLayout({x:e},!0)})}(t,"vertical"===r?(o-n)/b:(i-n)/b,r)}(s=s,l=l,e,o=o,r=r,a=a,t),function(t,e,n,i,o,r,a){var s=function(t,e){var n=[],i="vertical"===e?"y":"x",o=Ch(t,function(t){return t.getLayout()[i]});return o.keys.sort(function(t,e){return t-e}),N(o.keys,function(t){n.push(o.buckets.get(t))}),n}(t,a);(function(t,e,i,o,r,a){var s=1/0;N(t,function(t){var e=t.length,n=0;N(t,function(t){n+=t.getLayout().value});e="vertical"===a?(o-(e-1)*r)/n:(i-(e-1)*r)/n;e<s&&(s=e)}),N(t,function(t){N(t,function(t,e){var n=t.getLayout().value*s;"vertical"===a?(t.setLayout({x:e},!0),t.setLayout({dx:n},!0)):(t.setLayout({y:e},!0),t.setLayout({dy:n},!0))})}),N(e,function(t){var e=+t.getValue()*s;t.setLayout({dy:e},!0)})})(s,e,n,i,o,a),GP(s,o,n,i,a);for(var l=1;0<r;r--)(function(t,i,o){N(t.slice().reverse(),function(t){N(t,function(t){var e,n;t.outEdges.length&&(n=jP(t.outEdges,HP,o)/jP(t.outEdges,ZP),isNaN(n)&&(n=(e=t.outEdges.length)?jP(t.outEdges,WP,o)/e:0),"vertical"===o?(e=t.getLayout().x+(n-UP(t,o))*i,t.setLayout({x:e},!0)):(n=t.getLayout().y+(n-UP(t,o))*i,t.setLayout({y:n},!0)))})})})(s,l*=.99,a),GP(s,o,n,i,a),function(t,i,o){N(t,function(t){N(t,function(t){var e,n;t.inEdges.length&&(n=jP(t.inEdges,XP,o)/jP(t.inEdges,ZP),isNaN(n)&&(n=(e=t.inEdges.length)?jP(t.inEdges,YP,o)/e:0),"vertical"===o?(e=t.getLayout().x+(n-UP(t,o))*i,t.setLayout({x:e},!0)):(n=t.getLayout().y+(n-UP(t,o))*i,t.setLayout({y:n},!0)))})})}(s,l,a),GP(s,o,n,i,a)}(s,l,r,o,n,i,a),function(t,e){var n="vertical"===e?"x":"y";N(t,function(t){t.outEdges.sort(function(t,e){return t.node2.getLayout()[n]-e.node2.getLayout()[n]}),t.inEdges.sort(function(t,e){return t.node1.getLayout()[n]-e.node1.getLayout()[n]})}),N(t,function(t){var e=0,n=0;N(t.outEdges,function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy}),N(t.inEdges,function(t){t.setLayout({ty:n},!0),n+=t.getLayout().dy})})}(s,a)})}),P_(function(t){t.eachSeriesByType("sankey",function(i){var o,r,t=i.getGraph().nodes;t.length&&(o=1/0,r=-1/0,N(t,function(t){t=t.getLayout().value;t<o&&(o=t),r<t&&(r=t)}),N(t,function(t){var e=new jD({type:"color",mappingMethod:"linear",dataExtent:[o,r],visual:i.get("color")}).mapValueToVisual(t.getLayout().value),n=t.getModel().get(["itemStyle","color"]);null!=n?(t.setVisual("color",n),t.setVisual("style",{fill:n})):(t.setVisual("color",e),t.setVisual("style",{fill:e}))}))})});qP.prototype.getInitialData=function(t,e){var n,i,o=e.getComponent("xAxis",this.get("xAxisIndex")),r=e.getComponent("yAxis",this.get("yAxisIndex")),a=o.get("type"),s=r.get("type");"category"===a?(t.layout="horizontal",n=o.getOrdinalMeta(),i=!0):"category"===s?(t.layout="vertical",n=r.getOrdinalMeta(),i=!0):t.layout=t.layout||"horizontal";var l,e=["x","y"],a="horizontal"===t.layout?0:1,s=this._baseAxisDim=e[a],e=e[1-a],o=[o,r],r=o[a].get("type"),o=o[1-a].get("type"),a=t.data;a&&i&&(l=[],N(a,function(t,e){var n;F(t)?(n=t.slice(),t.unshift(e)):F(t.value)?(n=t.value.slice(),t.value.unshift(e)):n=t,l.push(n)}),t.data=l);t=this.defaultValueDimensions,o=[{name:s,type:H_(r),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:e,type:H_(o),dimsDef:t.slice()}];return QI(this,{coordDimensions:o,dimensionsCount:t.length+1,encodeDefaulter:V(bf,o,this)})},qP.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},af=qP;function qP(){}var KP,nd=(l($P,KP=Fy),$P.type="series.boxplot",$P.dependencies=["xAxis","yAxis","grid"],$P.defaultOption={zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},$P);function $P(){var t=null!==KP&&KP.apply(this,arguments)||this;return t.type=$P.type,t.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],t.visualDrawType="stroke",t}I(nd,af,!0),Fy.registerClass(nd);var JP,nd=(l(QP,JP=tm),QP.prototype.render=function(t,e,n){var i=t.getData(),o=this.group,r=this._data;this._data||o.removeAll();var a="horizontal"===t.get("layout")?1:0;i.diff(r).add(function(t){var e;i.hasValue(t)&&(e=oO(i.getItemLayout(t),i,t,a,!0),i.setItemGraphicEl(t,e),o.add(e))}).update(function(t,e){var n=r.getItemGraphicEl(e);i.hasValue(t)?(e=i.getItemLayout(t),n?rO(e,n,i,t):n=oO(e,i,t,a),o.add(n),i.setItemGraphicEl(t,n)):o.remove(n)}).remove(function(t){t=r.getItemGraphicEl(t);t&&o.remove(t)}).execute(),this._data=i},QP.prototype.remove=function(t){var e=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(t){t&&e.remove(t)})},QP.type="boxplot",QP);function QP(){var t=null!==JP&&JP.apply(this,arguments)||this;return t.type=QP.type,t}var tO,eO=function(){},nO=(l(iO,tO=Dr),iO.prototype.getDefaultShape=function(){return new eO},iO.prototype.buildPath=function(t,e){var n=e.points,i=0;for(t.moveTo(n[i][0],n[i][1]),i++;i<4;i++)t.lineTo(n[i][0],n[i][1]);for(t.closePath();i<n.length;i++)t.moveTo(n[i][0],n[i][1]),i++,t.lineTo(n[i][0],n[i][1])},iO);function iO(t){t=tO.call(this,t)||this;return t.type="boxplotBoxPath",t}function oO(t,e,n,i,o){var r,a,s=t.ends,s=new nO({shape:{points:o?(r=i,a=t,P(s,function(t){return(t=t.slice())[r]=a.initBaseline,t})):s}});return rO(t,s,e,n,o),s}function rO(t,e,n,i,o){var r=n.hostModel;(0,dp[o?"initProps":"updateProps"])(e,{shape:{points:t.ends}},r,i),e.useStyle(n.getItemVisual(i,"style")),e.style.strokeNoScale=!0,e.z2=100;i=n.getItemModel(i);Rc(e,i),Lc(e,i.get(["emphasis","focus"]),i.get(["emphasis","blurScope"]))}tm.registerClass(nd);var aO=N;nd={type:"echarts:boxplot",transform:function(t){var e=t.upstream;e.sourceFormat!==cf&&rh("");t=function(t,e){for(var n=[],i=[],o=(e=e||{}).boundIQR,r="none"===o||0===o,a=0;a<t.length;a++){var s=zu(t[a].slice()),l=Ku(s,.25),u=Ku(s,.5),h=Ku(s,.75),c=s[0],p=s[s.length-1],d=(null==o?1.5:o)*(h-l),f=r?c:Math.max(c,l-d),g=r?p:Math.min(p,h+d),d=e.itemNameFormatter,y=G(d)?d({value:a}):H(d)?d.replace("{value}",a+""):a+"";n.push([y,f,l,u,h,g]);for(var m=0;m<s.length;m++){var v=s[m];(v<f||g<v)&&(v=[y,v],i.push(v))}}return{boxData:n,outliers:i}}(e.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:t.boxData},{data:t.outliers}]}};P_(function(t,e){t.eachRawSeriesByType("boxplot",function(t){t.getData().setVisual("legendSymbol","roundRect")})}),k_(function(t){var i,o,t=(i=[],o=[],t.eachSeriesByType("boxplot",function(t){var e=t.getBaseAxis(),n=L(o,e);n<0&&(n=o.length,o[n]=e,i[n]={axis:e,seriesModels:[]}),i[n].seriesModels.push(t)}),i);aO(t,function(n){var t=n.seriesModels;t.length&&(function(t){var e,n=t.axis,i=t.seriesModels,o=i.length,r=t.boxWidthList=[],a=t.boxOffsetList=[],s=[];{var l;"category"===n.type?e=n.getBandWidth():(l=0,aO(i,function(t){l=Math.max(l,t.getData().count())}),u=n.getExtent(),Math.abs(u[1]-u[0]))}aO(i,function(t){t=t.get("boxWidth");F(t)||(t=[t,t]),s.push([Nu(t[0],e)||0,Nu(t[1],e)||0])});var u=.8*e-2,h=u/o*.3,c=(u-h*(o-1))/o,p=c/2-u/2;aO(i,function(t,e){a.push(p),p+=h+c,r.push(Math.min(Math.max(c,s[e][0]),s[e][1]))})}(n),aO(t,function(t,e){!function(t,o,e){var r=t.coordinateSystem,a=t.getData(),s=e/2,l="horizontal"===t.get("layout")?0:1,u=1-l,t=["x","y"],n=a.mapDimension(t[l]),i=a.mapDimensionsAll(t[u]);if(null==n||i.length<5)return;for(var h=0;h<a.count();h++){var c=a.get(n,h),p=m(c,i[2],h),d=m(c,i[0],h),f=m(c,i[1],h),g=m(c,i[3],h),y=m(c,i[4],h),c=[];v(c,f,!1),v(c,g,!0),c.push(d,f,y,g),x(c,d),x(c,y),x(c,p),a.setItemLayout(h,{initBaseline:p[u],ends:c})}function m(t,e,n){var i,e=a.get(e,n),n=[];return n[l]=t,n[u]=e,isNaN(t)||isNaN(e)?i=[NaN,NaN]:(i=r.dataToPoint(n))[l]+=o,i}function v(t,e,n){var i=e.slice(),e=e.slice();i[l]+=s,e[l]-=s,n?t.push(i,e):t.push(e,i)}function x(t,e){var n=e.slice(),e=e.slice();n[l]-=s,e[l]+=s,t.push(n,e)}}(t,n.boxOffsetList[e],n.boxWidthList[e])}))})}),n(nd);var sO,nd=(l(lO,sO=Fy),lO.prototype.getShadowDim=function(){return"open"},lO.prototype.brushSelector=function(t,e,n){t=e.getItemLayout(t);return t&&n.rect(t.brushRect)},lO.type="series.candlestick",lO.dependencies=["xAxis","yAxis","grid"],lO.defaultOption={zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#c23531",color0:"#314656",borderWidth:1,borderColor:"#c23531",borderColor0:"#314656"},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},lO);function lO(){var t=null!==sO&&sO.apply(this,arguments)||this;return t.type=lO.type,t.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],t}I(nd,af,!0),Fy.registerClass(nd);var uO,hO=["color","borderColor"],af=(l(cO,uO=tm),cO.prototype.render=function(t,e,n){this.group.removeClipPath(),this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},cO.prototype.incrementalPrepareRender=function(t,e,n){this._clear(),this._updateDrawMode(t)},cO.prototype.incrementalRender=function(t,e,n,i){this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(t,e)},cO.prototype._updateDrawMode=function(t){t=t.pipelineContext.large;null!=this._isLargeDraw&&t===this._isLargeDraw||(this._isLargeDraw=t,this._clear())},cO.prototype._renderNormal=function(i){var o=i.getData(),r=this._data,a=this.group,s=o.getLayout("isSimpleBox"),l=i.get("clip",!0),t=i.coordinateSystem,u=t.getArea&&t.getArea();this._data||a.removeAll(),o.diff(r).add(function(t){var e,n;o.hasValue(t)&&(e=o.getItemLayout(t),l&&mO(u,e)||(Qc(n=yO(e,0,!0),{shape:{points:e.ends}},i,t),vO(n,o,t,s),a.add(n),o.setItemGraphicEl(t,n)))}).update(function(t,e){var n=r.getItemGraphicEl(e);o.hasValue(t)?(e=o.getItemLayout(t),l&&mO(u,e)?a.remove(n):(n?Jc(n,{shape:{points:e.ends}},i,t):n=yO(e),vO(n,o,t,s),a.add(n),o.setItemGraphicEl(t,n))):a.remove(n)}).remove(function(t){t=r.getItemGraphicEl(t);t&&a.remove(t)}).execute(),this._data=o},cO.prototype._renderLarge=function(t){this._clear(),SO(t,this.group);t=t.get("clip",!0)?rM(t.coordinateSystem,!1,t):null;t?this.group.setClipPath(t):this.group.removeClipPath()},cO.prototype._incrementalRenderNormal=function(t,e){for(var n,i=e.getData(),o=i.getLayout("isSimpleBox");null!=(n=t.next());){var r=yO(i.getItemLayout(n));vO(r,i,n,o),r.incremental=!0,this.group.add(r)}},cO.prototype._incrementalRenderLarge=function(t,e){SO(e,this.group,!0)},cO.prototype.remove=function(t){this._clear()},cO.prototype._clear=function(){this.group.removeAll(),this._data=null},cO.type="candlestick",cO);function cO(){var t=null!==uO&&uO.apply(this,arguments)||this;return t.type=cO.type,t}tm.registerClass(af);var pO,dO=function(){},fO=(l(gO,pO=Dr),gO.prototype.getDefaultShape=function(){return new dO},gO.prototype.buildPath=function(t,e){e=e.points;this.__simpleBox?(t.moveTo(e[4][0],e[4][1]),t.lineTo(e[6][0],e[6][1])):(t.moveTo(e[0][0],e[0][1]),t.lineTo(e[1][0],e[1][1]),t.lineTo(e[2][0],e[2][1]),t.lineTo(e[3][0],e[3][1]),t.closePath(),t.moveTo(e[4][0],e[4][1]),t.lineTo(e[5][0],e[5][1]),t.moveTo(e[6][0],e[6][1]),t.lineTo(e[7][0],e[7][1]))},gO);function gO(t){t=pO.call(this,t)||this;return t.type="normalCandlestickBox",t}function yO(t,e,n){var i,o=t.ends;return new fO({shape:{points:n?(i=t,P(o,function(t){return(t=t.slice())[1]=i.initBaseline,t})):o},z2:100})}function mO(t,e){for(var n=!0,i=0;i<e.ends.length;i++)if(t.contain(e.ends[i][0],e.ends[i][1])){n=!1;break}return n}function vO(t,e,n,i){var o=e.getItemModel(n);t.useStyle(e.getItemVisual(n,"style")),t.style.strokeNoScale=!0,t.__simpleBox=i,Rc(t,o)}var xO,_O=function(){},bO=(l(wO,xO=Dr),wO.prototype.getDefaultShape=function(){return new _O},wO.prototype.buildPath=function(t,e){for(var n,i=e.points,o=0;o<i.length;){this.__sign===i[o++]?(n=i[o++],t.moveTo(n,i[o++]),t.lineTo(n,i[o++])):o+=3}},wO);function wO(t){t=xO.call(this,t)||this;return t.type="largeCandlestickBox",t}function SO(t,e,n){var i=t.getData().getLayout("largePoints"),o=new bO({shape:{points:i},__sign:1});e.add(o);i=new bO({shape:{points:i},__sign:-1});e.add(i),MO(1,o,t),MO(-1,i,t),n&&(o.incremental=!0,i.incremental=!0)}function MO(t,e,n){t=n.get(["itemStyle",0<t?"borderColor":"borderColor0"])||n.get(["itemStyle",0<t?"color":"color0"]),n=n.getModel("itemStyle").getItemStyle(hO);e.useStyle(n),e.style.fill=null,e.style.stroke=t}var IO=["itemStyle","borderColor"],TO=["itemStyle","borderColor0"],CO=["itemStyle","color"],DO=["itemStyle","color0"],nd={seriesType:"candlestick",plan:$y(),performRawSeries:!0,reset:function(t,e){if(t.getData().setVisual("legendSymbol","roundRect"),!e.isSeriesFiltered(t))return!t.pipelineContext.large&&{progress:function(t,e){for(var n,i;null!=(n=t.next());){var o=e.getItemModel(n),r=e.getItemLayout(n).sign,a=o.getItemStyle();a.fill=(i=r,o.get(0<i?CO:DO)),a.stroke=(r=r,o.get(0<r?IO:TO)||a.fill),O(e.ensureUniqueItemVisual(n,"style"),a)}}}}},AO="undefined"!=typeof Float32Array?Float32Array:Array,af={seriesType:"candlestick",plan:$y(),reset:function(t){var e,n,i,y=t.coordinateSystem,o=t.getData(),m=(r=o,n="category"===(n=(e=t).getBaseAxis()).type?n.getBandWidth():(i=n.getExtent(),Math.abs(i[1]-i[0])/r.count()),i=Nu(tt(e.get("barMaxWidth"),n),n),r=Nu(tt(e.get("barMinWidth"),1),n),null!=(e=e.get("barWidth"))?Nu(e,n):Math.max(Math.min(n/2,i),r)),r=["x","y"],v=o.mapDimension(r[0]),r=o.mapDimensionsAll(r[1]),x=r[0],_=r[1],b=r[2],w=r[3];if(o.setLayout({candleWidth:m,isSimpleBox:m<=1.3}),!(null==v||r.length<4))return{progress:t.pipelineContext.large?function(t,e){var n,i=new AO(4*t.count),o=0,r=[],a=[];for(;null!=(n=t.next());){var s=e.get(v,n),l=e.get(x,n),u=e.get(_,n),h=e.get(b,n),c=e.get(w,n);isNaN(s)||isNaN(h)||isNaN(c)?(i[o++]=NaN,o+=3):(i[o++]=LO(e,n,l,u,_),r[0]=s,r[1]=h,h=y.dataToPoint(r,null,a),i[o++]=h?h[0]:NaN,i[o++]=h?h[1]:NaN,r[1]=c,h=y.dataToPoint(r,null,a),i[o++]=h?h[1]:NaN)}e.setLayout("largePoints",i)}:function(t,e){var n;for(;null!=(n=t.next());){var i=e.get(v,n),o=e.get(x,n),r=e.get(_,n),a=e.get(b,n),s=e.get(w,n),l=Math.min(o,r),u=Math.max(o,r),h=d(l,i),c=d(u,i),p=d(a,i),l=d(s,i),u=[];f(u,c,0),f(u,h,1),u.push(g(l),g(c),g(p),g(h)),e.setItemLayout(n,{sign:LO(e,n,o,r,_),initBaseline:(r<o?c:h)[1],ends:u,brushRect:function(t,e,n){t=d(t,n),n=d(e,n);return t[0]-=m/2,n[0]-=m/2,{x:t[0],y:t[1],width:m,height:n[1]-t[1]}}(a,s,i)})}function d(t,e){var n=[];return n[0]=e,n[1]=t,isNaN(e)||isNaN(t)?[NaN,NaN]:y.dataToPoint(n)}function f(t,e,n){var i=e.slice(),e=e.slice();i[0]=Kc(i[0]+m/2,1,!1),e[0]=Kc(e[0]-m/2,1,!0),n?t.push(i,e):t.push(e,i)}function g(t){return t[0]=Kc(t[0],1),t}}}}};function LO(t,e,n,i,o){i=!(i<n)&&(n<i||!(0<e)||t.get(o,e-1)<=i)?1:-1;return i}C_(function(t){t&&F(t.series)&&N(t.series,function(t){Y(t)&&"k"===t.type&&(t.type="candlestick")})}),P_(nd),k_(af);var kO,nd=(l(PO,kO=Fy),PO.prototype.getInitialData=function(t,e){return Ib(this.getSource(),this,{useEncodeDefaulter:!0})},PO.prototype.brushSelector=function(t,e,n){return n.point(e.getItemLayout(t))},PO.type="series.effectScatter",PO.dependencies=["grid","polar"],PO.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},PO);function PO(){var t=null!==kO&&kO.apply(this,arguments)||this;return t.type=PO.type,t.hasSymbolVisual=!0,t}Fy.registerClass(nd);function OO(t,e){var n=e.rippleEffectColor||e.color;t.eachChild(function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?n:null,fill:"fill"===e.brushType?n:null}})})}var RO,NO=(l(EO,RO=$r),EO.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},EO.prototype.startEffectAnimation=function(t){for(var e=t.symbolType,n=t.color,i=this.childAt(1),o=0;o<3;o++){var r=px(e,-1,-1,2,2,n);r.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var a=-o/3*t.period+t.effectOffset;r.animate("",!0).when(t.period,{scale:[t.rippleScale/2,t.rippleScale/2]}).delay(a).start(),r.animateStyle(!0).when(t.period,{opacity:0}).delay(a).start(),i.add(r)}OO(i,t)},EO.prototype.updateEffectAnimation=function(t){for(var e=this._effectCfg,n=this.childAt(1),i=["symbolType","period","rippleScale"],o=0;o<i.length;o++){var r=i[o];if(e[r]!==t[r])return this.stopEffectAnimation(),void this.startEffectAnimation(t)}OO(n,t)},EO.prototype.highlight=function(){bc(this)},EO.prototype.downplay=function(){wc(this)},EO.prototype.updateData=function(t,e){var n=this,i=t.hostModel;this.childAt(0).updateData(t,e);var o=this.childAt(1),r=t.getItemModel(e),a=t.getItemVisual(e,"symbol"),s=(F(l=t.getItemVisual(e,"symbolSize"))||(l=[+l,+l]),l),l=t.getItemVisual(e,"style"),u=l&&l.fill;o.setScale(s),o.traverse(function(t){t.setStyle("fill",u)});l=r.getShallow("symbolOffset");l&&(o.x=Nu(l[0],s[0]),o.y=Nu(l[1],s[1]));s=t.getItemVisual(e,"symbolRotate");o.rotation=(s||0)*Math.PI/180||0;var h={};h.showEffectOn=i.get("showEffectOn"),h.rippleScale=r.get(["rippleEffect","scale"]),h.brushType=r.get(["rippleEffect","brushType"]),h.period=1e3*r.get(["rippleEffect","period"]),h.effectOffset=e/t.count(),h.z=i.getShallow("z")||0,h.zlevel=i.getShallow("zlevel")||0,h.symbolType=a,h.color=u,h.rippleEffectColor=r.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):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(t){"emphasis"===t?"render"!==h.showEffectOn&&n.startEffectAnimation(h):"normal"===t&&"render"!==h.showEffectOn&&n.stopEffectAnimation()}),this._effectCfg=h,Lc(this)},EO.prototype.fadeOut=function(t){this.off("mouseover").off("mouseout"),t&&t()},EO);function EO(t,e){var n=RO.call(this)||this,i=new LS(t,e),o=new $r;return n.add(i),n.add(o),n.updateData(t,e),n}M(NO,$r);var zO,af=(l(BO,zO=tm),BO.prototype.init=function(){this._symbolDraw=new ES(NO)},BO.prototype.render=function(t,e,n){var i=t.getData(),t=this._symbolDraw;t.updateData(i),this.group.add(t.group)},BO.prototype.updateTransform=function(t,e,n){var i=t.getData();this.group.dirty();n=vM("").reset(t,e,n);n.progress&&n.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout()},BO.prototype._updateGroupTransform=function(t){t=t.coordinateSystem;t&&t.getRoamTransform&&(this.group.transform=De(t.getRoamTransform()),this.group.decomposeTransform())},BO.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0)},BO.type="effectScatter",BO);function BO(){var t=null!==zO&&zO.apply(this,arguments)||this;return t.type=BO.type,t}tm.registerClass(af),k_(vM("effectScatter"));var VO="undefined"==typeof Uint32Array?Array:Uint32Array,FO="undefined"==typeof Float64Array?Array:Float64Array;function GO(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=P(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),S([e,t[0],t[1]])}))}var HO,nd=(l(WO,HO=Fy),WO.prototype.init=function(t){t.data=t.data||[],GO(t);var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count)),HO.prototype.init.apply(this,arguments)},WO.prototype.mergeOption=function(t){var e;GO(t),t.data&&(e=this._processFlatCoordsArray(t.data),this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count))),HO.prototype.mergeOption.apply(this,arguments)},WO.prototype.appendData=function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=pt(this._flatCoords,e.flatCoords),this._flatCoordsOffset=pt(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},WO.prototype._getCoordsFromItemModel=function(t){t=this.getData().getItemModel(t),t=t.option instanceof Array?t.option:t.getShallow("coords");return t},WO.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},WO.prototype.getLineCoords=function(t,e){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[2*t],i=this._flatCoordsOffset[2*t+1],o=0;o<i;o++)e[o]=e[o]||[],e[o][0]=this._flatCoords[n+2*o],e[o][1]=this._flatCoords[n+2*o+1];return i}for(var r=this._getCoordsFromItemModel(t),o=0;o<r.length;o++)e[o]=e[o]||[],e[o][0]=r[o][0],e[o][1]=r[o][1];return r.length},WO.prototype._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 n=t.length,i=new VO(n),o=new FO(n),r=0,a=0,s=0,l=0;l<n;){s++;var u=t[l++];i[a++]=r+e,i[a++]=u;for(var h=0;h<u;h++){var c=t[l++],p=t[l++];o[r++]=c,o[r++]=p}}return{flatCoordsOffset:new Uint32Array(i.buffer,0,a),flatCoords:o,count:s}},WO.prototype.getInitialData=function(t,e){var o=new db(["value"],this);return o.hasItemOption=!1,o.initData(t.data,[],function(t,e,n,i){if(t instanceof Array)return NaN;o.hasItemOption=!0;t=t.value;return null!=t?t instanceof Array?t[i]:t:void 0}),o},WO.prototype.formatTooltip=function(t,e,n){var i=this.getData().getItemModel(t),o=i.get("name");if(o)return o;t=i.get("fromName"),o=i.get("toName"),i=[];return null!=t&&i.push(t),null!=o&&i.push(o),Iy("nameValue",{name:i.join(" > ")})},WO.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},WO.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},WO.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},WO.type="series.lines",WO.dependencies=["grid","polar","geo","calendar"],WO.defaultOption={coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},WO);function WO(){var t=null!==HO&&HO.apply(this,arguments)||this;return t.type=WO.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}Fy.registerClass(nd);var XO,YO=(l(UO,XO=$r),UO.prototype.createLine=function(t,e,n){return new sL(t,e,n)},UO.prototype._updateEffectSymbol=function(t,e){var n=t.getItemModel(e).getModel("effect"),i=n.get("symbolSize"),o=n.get("symbol");F(i)||(i=[i,i]);var r=t.getItemVisual(e,"style"),a=n.get("color")||r&&r.stroke,r=this.childAt(1);this._symbolType!==o&&(this.remove(r),(r=px(o,-.5,-.5,1,1,a)).z2=100,r.culling=!0,this.add(r)),r&&(r.setStyle("shadowColor",a),r.setStyle(n.getItemStyle(["color"])),r.scaleX=i[0],r.scaleY=i[1],r.setColor(a),this._symbolType=o,this._symbolScale=i,this._updateEffectAnimation(t,n,e))},UO.prototype._updateEffectAnimation=function(e,t,n){var i,o,r,a,s,l=this.childAt(1);l&&(i=this,o=e.getItemLayout(n),r=1e3*t.get("period"),a=t.get("loop"),s=t.get("constantSpeed"),t=Q(t.get("delay"),function(t){return t/e.count()*r/3}),l.ignore=!0,this._updateAnimationPoints(l,o),0<s&&(r=this._getLineLength(l)/s*1e3),r===this._period&&a===this._loop||(l.stopAnimation(),0<r&&(s=void 0,s="function"==typeof t?t(n):t,0<l.__t&&(s=-r*l.__t),l.__t=0,s=l.animate("",a).when(r,{__t:1}).delay(s).during(function(){i._updateSymbolPosition(l)}),a||s.done(function(){i.remove(l)}),s.start())),this._period=r,this._loop=a)},UO.prototype._getLineLength=function(t){return At(t.__p1,t.__cp1)+At(t.__cp1,t.__p2)},UO.prototype._updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},UO.prototype.updateData=function(t,e,n){this.childAt(0).updateData(t,e,n),this._updateEffectSymbol(t,e)},UO.prototype._updateSymbolPosition=function(t){var e=t.__p1,n=t.__p2,i=t.__cp1,o=t.__t,r=[t.x,t.y],a=r.slice(),s=To,l=Co;r[0]=s(e[0],i[0],n[0],o),r[1]=s(e[1],i[1],n[1],o);s=l(e[0],i[0],n[0],o),n=l(e[1],i[1],n[1],o);t.rotation=-Math.atan2(n,s)-Math.PI/2,"line"!==this._symbolType&&"rect"!==this._symbolType&&"roundRect"!==this._symbolType||(void 0!==t.__lastT&&t.__lastT<t.__t?(t.scaleY=1.05*At(a,r),1===o&&(r[0]=a[0]+(r[0]-a[0])/2,r[1]=a[1]+(r[1]-a[1])/2)):1===t.__lastT?t.scaleY=2*At(e,r):t.scaleY=this._symbolScale[1]),t.__lastT=t.__t,t.ignore=!1,t.x=r[0],t.y=r[1]},UO.prototype.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var n=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,n,e)},UO);function UO(t,e,n){var i=XO.call(this)||this;return i.add(i.createLine(t,e,n)),i._updateEffectSymbol(t,e),i}var ZO,jO=(l(qO,ZO=$r),qO.prototype._createPolyline=function(t,e,n){var i=t.getItemLayout(e),i=new Ra({shape:{points:i}});this.add(i),this._updateCommonStl(t,e,n)},qO.prototype.updateData=function(t,e,n){var i=t.hostModel;Jc(this.childAt(0),{shape:{points:t.getItemLayout(e)}},i,e),this._updateCommonStl(t,e,n)},qO.prototype._updateCommonStl=function(t,e,n){var i=this.childAt(0),o=t.getItemModel(e),r=n&&n.emphasisLineStyle;n&&!t.hasItemOption||(r=o.getModel(["emphasis","lineStyle"]).getLineStyle()),i.useStyle(t.getItemVisual(e,"style")),i.style.fill=null,i.style.strokeNoScale=!0,i.ensureState("emphasis").style=r,Lc(this)},qO.prototype.updateLayout=function(t,e){this.childAt(0).setShape("points",t.getItemLayout(e))},qO);function qO(t,e,n){var i=ZO.call(this)||this;return i._createPolyline(t,e,n),i}var KO,$O=(l(JO,KO=YO),JO.prototype.createLine=function(t,e,n){return new jO(t,e,n)},JO.prototype._updateAnimationPoints=function(t,e){this._points=e;for(var n=[0],i=0,o=1;o<e.length;o++){var r=e[o-1],a=e[o];i+=At(r,a),n.push(i)}if(0!==i){for(o=0;o<n.length;o++)n[o]/=i;this._offsets=n,this._length=i}else this._length=0},JO.prototype._getLineLength=function(){return this._length},JO.prototype._updateSymbolPosition=function(t){var e=t.__t,n=this._points,i=this._offsets,o=n.length;if(i){var r=this._lastFrame;if(e<this._lastFramePercent){for(var a=Math.min(r+1,o-1);0<=a&&!(i[a]<=e);a--);a=Math.min(a,o-2)}else{for(a=r;a<o&&!(i[a]>e);a++);a=Math.min(a-1,o-2)}var s=(e-i[a])/(i[a+1]-i[a]),r=n[a],n=n[a+1];t.x=r[0]*(1-s)+s*n[0],t.y=r[1]*(1-s)+s*n[1];s=n[0]-r[0],r=n[1]-r[1];t.rotation=-Math.atan2(r,s)-Math.PI/2,this._lastFrame=a,this._lastFramePercent=e,t.ignore=!1}},JO);function JO(){var t=null!==KO&&KO.apply(this,arguments)||this;return t._lastFrame=0,t._lastFramePercent=0,t}var QO,tR=function(){this.polyline=!1,this.curveness=0,this.segs=[]},eR=(l(nR,QO=Dr),nR.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},nR.prototype.getDefaultShape=function(){return new tR},nR.prototype.buildPath=function(t,e){var n=e.segs,i=e.curveness;if(e.polyline)for(var o=0;o<n.length;){var r=n[o++];if(0<r){t.moveTo(n[o++],n[o++]);for(var a=1;a<r;a++)t.lineTo(n[o++],n[o++])}}else for(o=0;o<n.length;){var s,l=n[o++],u=n[o++],h=n[o++],c=n[o++];t.moveTo(l,u),0<i?(s=(l+h)/2-(u-c)*i,l=(u+c)/2-(h-l)*i,t.quadraticCurveTo(s,l,h,c)):t.lineTo(h,c)}},nR.prototype.findDataIndex=function(t,e){var n=this.shape,i=n.segs,o=n.curveness,r=this.style.lineWidth;if(n.polyline)for(var a=0,s=0;s<i.length;){var l=i[s++];if(0<l)for(var u=i[s++],h=i[s++],c=1;c<l;c++){if(hr(u,h,p=i[s++],d=i[s++],r,t,e))return a}a++}else for(a=0,s=0;s<i.length;){var u=i[s++],h=i[s++],p=i[s++],d=i[s++];if(0<o){if(cr(u,h,(u+p)/2-(h-d)*o,(h+d)/2-(p-u)*o,p,d,r,t,e))return a}else if(hr(u,h,p,d,r,t,e))return a;a++}return-1},nR);function nR(t){return QO.call(this,t)||this}var iR=(oR.prototype.isPersistent=function(){return!this._incremental},oR.prototype.updateData=function(t){this.group.removeAll();var e=new eR({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},oR.prototype.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),5e5<t.count()?(this._incremental||(this._incremental=new Js({silent:!0})),this.group.add(this._incremental)):this._incremental=null},oR.prototype.incrementalUpdate=function(t,e){var n=new eR;n.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(n,e,!!this._incremental),this._incremental?this._incremental.addDisplayable(n,!0):(n.rectHover=!0,n.cursor="default",n.__startIndex=t.start,this.group.add(n))},oR.prototype.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},oR.prototype._setCommon=function(e,t,n){var i=t.hostModel;e.setShape({polyline:i.get("polyline"),curveness:i.get(["lineStyle","curveness"])}),e.useStyle(i.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0;var o,t=t.getVisual("style");t&&t.stroke&&e.setStyle("stroke",t.stroke),e.setStyle("fill",null),n||((o=Wh(e)).seriesIndex=i.seriesIndex,e.on("mousemove",function(t){o.dataIndex=null;t=e.findDataIndex(t.offsetX,t.offsetY);0<t&&(o.dataIndex=t+e.__startIndex)}))},oR.prototype._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},oR);function oR(){this.group=new $r}var rR,aR={seriesType:"lines",plan:$y(),reset:function(f){var g=f.coordinateSystem,y=f.get("polyline"),m=f.pipelineContext.large;return{progress:function(t,e){var n=[];if(m){var i=void 0,o=t.end-t.start;if(y){for(var r=0,a=t.start;a<t.end;a++)r+=f.getLineCoordsCount(a);i=new Float32Array(o+2*r)}else i=new Float32Array(4*o);for(var s=0,l=[],a=t.start;a<t.end;a++){var u=f.getLineCoords(a,n);y&&(i[s++]=u);for(var h=0;h<u;h++)l=g.dataToPoint(n[h],!1,l),i[s++]=l[0],i[s++]=l[1]}e.setLayout("linesPoints",i)}else for(a=t.start;a<t.end;a++){var c=e.getItemModel(a),u=f.getLineCoords(a,n),p=[];if(y)for(var d=0;d<u;d++)p.push(g.dataToPoint(n[d]));else{p[0]=g.dataToPoint(n[0]),p[1]=g.dataToPoint(n[1]);c=c.get(["lineStyle","curveness"]);+c&&(p[2]=[(p[0][0]+p[1][0])/2-(p[0][1]-p[1][1])*c,(p[0][1]+p[1][1])/2-(p[1][0]-p[0][0])*c])}e.setItemLayout(a,p)}}}}},af=(l(sR,rR=tm),sR.prototype.render=function(t,e,n){var i=t.getData(),o=this._updateLineDraw(i,t),r=t.get("zlevel"),a=t.get(["effect","trailLength"]),s=n.getZr(),n="svg"===s.painter.getType();n||s.painter.getLayer(r).clear(!0),null==this._lastZlevel||n||s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&a&&(n||s.configLayer(r,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(a/10+.9,1),0)})),o.updateData(i);t=t.get("clip",!0)&&rM(t.coordinateSystem,!1,t);t?this.group.setClipPath(t):this.group.removeClipPath(),this._lastZlevel=r,this._finished=!0},sR.prototype.incrementalPrepareRender=function(t,e,n){var i=t.getData();this._updateLineDraw(i,t).incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},sR.prototype.incrementalRender=function(t,e,n){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},sR.prototype.updateTransform=function(t,e,n){var i=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};e=aR.reset(t,e,n);e.progress&&e.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},sR.prototype._updateLineDraw=function(t,e){var n=this._lineDraw,i=this._showEffect(e),o=!!e.get("polyline"),e=e.pipelineContext.large;return n&&i===this._hasEffet&&o===this._isPolyline&&e===this._isLargeDraw||(n&&n.remove(),n=this._lineDraw=e?new iR:new uL(o?i?$O:jO:i?YO:sL),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=e,this.group.removeAll()),this.group.add(n.group),n},sR.prototype._showEffect=function(t){return!!t.get(["effect","show"])},sR.prototype._clearLayer=function(t){t=t.getZr();"svg"===t.painter.getType()||null==this._lastZlevel||t.painter.getLayer(this._lastZlevel).clear(!0)},sR.prototype.remove=function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},sR.type="lines",sR);function sR(){var t=null!==rR&&rR.apply(this,arguments)||this;return t.type=sR.type,t}function lR(t){return t instanceof Array||(t=[t,t]),t}tm.registerClass(af);nd={seriesType:"lines",reset:function(t){var e=lR(t.get("symbol")),n=lR(t.get("symbolSize")),t=t.getData();return t.setVisual("fromSymbol",e&&e[0]),t.setVisual("toSymbol",e&&e[1]),t.setVisual("fromSymbolSize",n&&n[0]),t.setVisual("toSymbolSize",n&&n[1]),{dataEach:t.hasItemOption?function(t,e){var n=lR((i=t.getItemModel(e)).getShallow("symbol",!0)),i=lR(i.getShallow("symbolSize",!0));n[0]&&t.setItemVisual(e,"fromSymbol",n[0]),n[1]&&t.setItemVisual(e,"toSymbol",n[1]),i[0]&&t.setItemVisual(e,"fromSymbolSize",i[0]),i[1]&&t.setItemVisual(e,"toSymbolSize",i[1])}:null}}};k_(aR),P_(nd);var uR,af=(l(hR,uR=Fy),hR.prototype.getInitialData=function(t,e){return Ib(this.getSource(),this,{generateCoord:"value"})},hR.prototype.preventIncremental=function(){var t=Yf.get(this.get("coordinateSystem"));if(t&&t.dimensions)return"lng"===t.dimensions[0]&&"lat"===t.dimensions[1]},hR.type="series.heatmap",hR.defaultOption={coordinateSystem:"cartesian2d",zlevel:0,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},hR);function hR(){var t=null!==uR&&uR.apply(this,arguments)||this;return t.type=hR.type,t}Fy.registerClass(af);var cR=(pR.prototype.update=function(t,e,n,i,o,r){var a=this._getBrush(),s=this._getGradient(o,"inRange"),l=this._getGradient(o,"outOfRange"),u=this.pointSize+this.blurSize,o=this.canvas,h=o.getContext("2d"),c=t.length;o.width=e,o.height=n;for(var p=0;p<c;++p){var d=t[p],f=d[0],g=d[1],y=i(d[2]);h.globalAlpha=y,h.drawImage(a,f-u,g-u)}if(!o.width||!o.height)return o;for(var n=h.getImageData(0,0,o.width,o.height),m=n.data,v=0,x=m.length,_=this.minOpacity,b=this.maxOpacity-_;v<x;){var w,y=m[v+3]/256,S=4*Math.floor(255*y);0<y?(w=r(y)?s:l,0<y&&(y=y*b+_),m[v++]=w[S],m[v++]=w[1+S],m[v++]=w[2+S],m[v++]=w[3+S]*y*256):v+=4}return h.putImageData(n,0,0),o},pR.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=D()),e=this.pointSize+this.blurSize,n=2*e;t.width=n,t.height=n;var i=t.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-e,e,this.pointSize,0,2*Math.PI,!0),i.closePath(),i.fill(),t},pR.prototype._getGradient=function(t,e){for(var n=this._gradientPixels,i=n[e]||(n[e]=new Uint8ClampedArray(1024)),o=[0,0,0,0],r=0,a=0;a<256;a++)t[e](a/255,!0,o),i[r++]=o[0],i[r++]=o[1],i[r++]=o[2],i[r++]=o[3];return i},pR);function pR(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=D();this.canvas=t}var dR,nd=(l(fR,dR=tm),fR.prototype.render=function(n,t,e){var i;t.eachComponent("visualMap",function(e){e.eachTargetSeries(function(t){t===n&&(i=e)})}),this.group.removeAll(),this._incrementalDisplayable=null;var o=n.coordinateSystem;"cartesian2d"===o.type||"calendar"===o.type?this._renderOnCartesianAndCalendar(n,e,0,n.getData().count()):"lng"===(t=(t=o).dimensions)[0]&&"lat"===t[1]&&this._renderOnGeo(o,n,i,e)},fR.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll()},fR.prototype.incrementalRender=function(t,e,n,i){e.coordinateSystem&&this._renderOnCartesianAndCalendar(e,i,t.start,t.end,!0)},fR.prototype._renderOnCartesianAndCalendar=function(t,e,n,i,o){var r,a,s,l,u,h,c=t.coordinateSystem;aM(c,"cartesian2d")&&(u=c.getAxis("x"),h=c.getAxis("y"),r=u.getBandWidth(),a=h.getBandWidth(),s=u.scale.getExtent(),l=h.scale.getExtent());for(var p=this.group,d=t.getData(),f=t.getModel(["emphasis","itemStyle"]).getItemStyle(),g=t.getModel(["blur","itemStyle"]).getItemStyle(),y=t.getModel(["select","itemStyle"]).getItemStyle(),m=vp(t),v=t.get(["emphasis","focus"]),x=t.get(["emphasis","blurScope"]),_=aM(c,"cartesian2d")?[d.mapDimension("x"),d.mapDimension("y"),d.mapDimension("value")]:[d.mapDimension("time"),d.mapDimension("value")],b=n;b<i;b++){var w=void 0,S=d.getItemVisual(b,"style");if(aM(c,"cartesian2d")){var M=d.get(_[0],b),I=d.get(_[1],b);if(isNaN(d.get(_[2],b))||M<s[0]||M>s[1]||I<l[0]||I>l[1])continue;I=c.dataToPoint([M,I]),w=new ga({shape:{x:Math.floor(Math.round(I[0])-r/2),y:Math.floor(Math.round(I[1])-a/2),width:Math.ceil(r),height:Math.ceil(a)},style:S})}else{if(isNaN(d.get(_[1],b)))continue;w=new ga({z2:1,shape:c.dataToRect([d.get(_[0],b)]).contentShape,style:S})}I=d.getItemModel(b);d.hasItemOption&&(f=(T=I.getModel("emphasis")).getModel("itemStyle").getItemStyle(),g=I.getModel(["blur","itemStyle"]).getItemStyle(),y=I.getModel(["select","itemStyle"]).getItemStyle(),v=T.get("focus"),x=T.get("blurScope"),m=vp(I));var T=t.getRawValue(b),I="-";T&&null!=T[2]&&(I=T[2]+""),mp(w,m,{labelFetcher:t,labelDataIndex:b,defaultOpacity:S.opacity,defaultText:I}),w.ensureState("emphasis").style=f,w.ensureState("blur").style=g,w.ensureState("select").style=y,Lc(w,v,x),(w.incremental=o)&&(w.states.emphasis.hoverLayer=!0),p.add(w),d.setItemGraphicEl(b,w)}},fR.prototype._renderOnGeo=function(i,t,e,n){var o=e.targetVisuals.inRange,r=e.targetVisuals.outOfRange,a=t.getData(),s=this._hmLayer||this._hmLayer||new cR;s.blurSize=t.get("blurSize"),s.pointSize=t.get("pointSize"),s.minOpacity=t.get("minOpacity"),s.maxOpacity=t.get("maxOpacity");var l=i.getViewRect().clone(),u=i.getRoamTransform();l.applyTransform(u);var h,c,p,d,f,g,y,m=Math.max(l.x,0),v=Math.max(l.y,0),x=Math.min(l.width+l.x,n.getWidth()),t=Math.min(l.height+l.y,n.getHeight()),u=x-m,l=t-v,n=[a.mapDimension("lng"),a.mapDimension("lat"),a.mapDimension("value")],x=a.mapArray(n,function(t,e,n){e=i.dataToPoint([t,e]);return e[0]-=m,e[1]-=v,e.push(n),e}),t=e.getExtent(),e="visualMap.continuous"===e.type?(a=t,y=e.option.range,n=a[1]-a[0],y=[(y[0]-a[0])/n,(y[1]-a[0])/n],function(t){return t>=y[0]&&t<=y[1]}):(h=t,c=e.getPieceList(),p=e.option.selected,d=h[1]-h[0],f=(c=P(c,function(t){return{interval:[(t.interval[0]-h[0])/d,(t.interval[1]-h[0])/d]}})).length,g=0,function(t){for(var e,n=g;n<f;n++){if((e=c[n].interval)[0]<=t&&t<=e[1]){g=n;break}}if(n===f)for(n=g-1;0<=n;n--){if((e=c[n].interval)[0]<=t&&t<=e[1]){g=n;break}}return 0<=n&&n<f&&p[n]});s.update(x,u,l,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:r.color.getColorMapper()},e);s=new na({style:{width:u,height:l,x:m,y:v,image:s.canvas},silent:!0});this.group.add(s)},fR.type="heatmap",fR);function fR(){var t=null!==dR&&dR.apply(this,arguments)||this;return t.type=fR.type,t}tm.registerClass(nd);var gR,af=(l(yR,gR=vm),yR.prototype.getInitialData=function(t){return t.stack=null,gR.prototype.getInitialData.apply(this,arguments)},yR.type="series.pictorialBar",yR.dependencies=["grid"],yR.defaultOption=Xp(vm.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),yR);function yR(){var t=null!==gR&&gR.apply(this,arguments)||this;return t.type=yR.type,t.hasSymbolVisual=!0,t.defaultSymbol="roundRect",t}Fy.registerClass(af);var mR,vR=["itemStyle","borderWidth"],xR=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],_R=new aa,nd=(l(bR,mR=tm),bR.prototype.render=function(t,e,n){var o=this.group,r=t.getData(),a=this._data,i=t.coordinateSystem,s=i.getBaseAxis().isHorizontal(),l=i.master.getRect(),u={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:t,coordSys:i,coordSysExtent:[[l.x,l.x+l.width],[l.y,l.y+l.height]],isHorizontal:s,valueDim:xR[+s],categoryDim:xR[1-+s]};return r.diff(a).add(function(t){var e,n;r.hasValue(t)&&(n=AR(r,t),e=wR(r,t,n,u),n=PR(r,u,e),r.setItemGraphicEl(t,n),o.add(n),zR(n,u,e))}).update(function(t,e){var n,i=a.getItemGraphicEl(e);r.hasValue(t)?(n=AR(r,t),e=wR(r,t,n,u),n=RR(r,e),i&&n!==i.__pictorialShapeStr&&(o.remove(i),r.setItemGraphicEl(t,null),i=null),i?function(t,e,n){var i=n.animationModel,o=n.dataIndex;Jc(t.__pictorialBundle,{x:n.bundlePosition[0],y:n.bundlePosition[1]},i,o),(n.symbolRepeat?IR:TR)(t,e,n,!0);CR(t,n,!0),DR(t,e,n,!0)}(i,u,e):i=PR(r,u,e,!0),r.setItemGraphicEl(t,i),i.__pictorialSymbolMeta=e,o.add(i),zR(i,u,e)):o.remove(i)}).remove(function(t){var e=a.getItemGraphicEl(t);e&&OR(a,t,e.__pictorialSymbolMeta.animationModel,e)}).execute(),this._data=r,this.group},bR.prototype.remove=function(e,t){var n=this.group,i=this._data;e.get("animation")?i&&i.eachItemGraphicEl(function(t){OR(i,Wh(t).dataIndex,e,t)}):n.removeAll()},bR.type="pictorialBar",bR);function bR(){var t=null!==mR&&mR.apply(this,arguments)||this;return t.type=bR.type,t}function wR(t,e,n,i){var o=t.getItemLayout(e),r=n.get("symbolRepeat"),a=n.get("symbolClip"),s=n.get("symbolPosition")||"start",l=(n.get("symbolRotate")||0)*Math.PI/180||0,u=n.get("symbolPatternSize")||2,h=n.isAnimationEnabled(),h={dataIndex:e,layout:o,itemModel:n,symbolType:t.getItemVisual(e,"symbol")||"circle",style:t.getItemVisual(e,"style"),symbolClip:a,symbolRepeat:r,symbolRepeatDirection:n.get("symbolRepeatDirection"),symbolPatternSize:u,rotation:l,animationModel:h?n:null,hoverScale:h&&n.get(["emphasis","scale"]),z2:n.getShallow("z",!0)||0};!function(t,e,n,i,o){var r=i.valueDim,a=t.get("symbolBoundingData"),s=i.coordSys.getOtherAxis(i.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-(n[r.wh]<=0);{l=F(a)?((t=[SR(s,a[0])-l,SR(s,a[1])-l])[1]<t[0]&&t.reverse(),t[u]):null!=a?SR(s,a)-l:e?i.coordSysExtent[r.index][u]-l:n[r.wh]}o.boundingLength=l,e&&(o.repeatCutLength=n[r.wh]);o.pxSign=0<l?1:l<0?-1:0}(n,r,o,i,h),function(t,e,n,i,o,r,a,s,l){var u=s.valueDim,h=s.categoryDim,n=Math.abs(n[h.wh]),e=t.getItemVisual(e,"symbolSize");e=F(e)?e.slice():null==e?["100%","100%"]:[e,e];e[h.index]=Nu(e[h.index],n),e[u.index]=Nu(e[u.index],i?n:Math.abs(o)),l.symbolSize=e,(l.symbolScale=[e[0]/a,e[1]/a])[u.index]*=(s.isHorizontal?-1:1)*r}(t,e,o,r,h.boundingLength,h.pxSign,u,i,h),function(t,e,n,i,o){t=t.get(vR)||0;t&&(_R.attr({scaleX:e[0],scaleY:e[1],rotation:n}),_R.updateTransform(),t/=_R.getLineScale(),t*=e[i.valueDim.index]);o.valueLineWidth=t}(n,h.symbolScale,l,i,h);u=h.symbolSize,l=n.get("symbolOffset");return F(l)&&(l=[Nu(l[0],u[0]),Nu(l[1],u[1])]),function(t,e,n,i,o,r,a,s,l,u,h){var c=u.categoryDim,p=u.valueDim,d=h.pxSign,f=Math.max(e[p.index]+a,0),g=f;{var y,m,v;i&&(y=Math.abs(s),v=Q(t.get("symbolMargin"),"15%")+"",m=!1,v.lastIndexOf("!")===v.length-1&&(m=!0,v=v.slice(0,v.length-1)),x=Nu(v,e[p.index]),a=Math.max(f+2*x,0),t=m?0:2*x,v=Qu(i),e=v?i:BR((y+t)/a),a=f+2*(x=(y-e*f)/2/(m?e:e-1)),t=m?0:2*x,v||"fixed"===i||(e=l?BR((Math.abs(l)+t)/a):0),g=e*a-t,h.repeatTimes=e,h.symbolMargin=x)}var x=d*(g/2),g=h.pathPosition=[];g[c.index]=n[c.wh]/2,g[p.index]="start"===r?x:"end"===r?s-x:s/2,o&&(g[0]+=o[0],g[1]+=o[1]);o=h.bundlePosition=[];o[c.index]=n[c.xy],o[p.index]=n[p.xy];o=h.barRectShape=O({},n);o[p.wh]=d*Math.max(Math.abs(n[p.wh]),Math.abs(g[p.index]+x)),o[c.wh]=n[c.wh];h=h.clipShape={};h[c.xy]=-n[c.xy],h[c.wh]=u.ecSize[c.wh],h[p.xy]=0,h[p.wh]=n[p.wh]}(n,u,o,r,l,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,i,h),h}function SR(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function MR(t){var e=t.symbolPatternSize,e=px(t.symbolType,-e/2,-e/2,e,e);return e.attr({culling:!0}),"image"!==e.type&&e.setStyle({strokeNoScale:!0}),e}function IR(t,e,o,n){var i=t.__pictorialBundle,r=o.symbolSize,a=o.valueLineWidth,s=o.pathPosition,l=e.valueDim,u=o.repeatTimes||0,h=0,c=r[e.valueDim.index]+a+2*o.symbolMargin;for(NR(t,function(t){t.__pictorialAnimationIndex=h,t.__pictorialRepeatTimes=u,h<u?ER(t,null,f(h),o,n):ER(t,null,{scaleX:0,scaleY:0},o,n,function(){i.remove(t)}),h++});h<u;h++){var p=MR(o);p.__pictorialAnimationIndex=h,p.__pictorialRepeatTimes=u,i.add(p);var d=f(h);ER(p,{x:d.x,y:d.y,scaleX:0,scaleY:0},{scaleX:d.scaleX,scaleY:d.scaleY,rotation:d.rotation},o,n)}function f(t){var e=s.slice(),n=o.pxSign,i=t;return("start"===o.symbolRepeatDirection?0<n:n<0)&&(i=u-1-t),e[l.index]=c*(i-u/2+.5)+s[l.index],{x:e[0],y:e[1],scaleX:o.symbolScale[0],scaleY:o.symbolScale[1],rotation:o.rotation}}}function TR(t,e,n,i){var o=t.__pictorialBundle,r=t.__pictorialMainPath;r?ER(r,null,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation},n,i):(r=t.__pictorialMainPath=MR(n),o.add(r),ER(r,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:0,scaleY:0,rotation:n.rotation},{scaleX:n.symbolScale[0],scaleY:n.symbolScale[1]},n,i))}function CR(t,e,n){var i=O({},e.barRectShape),o=t.__pictorialBarRect;o?ER(o,null,{shape:i},e,n):(o=t.__pictorialBarRect=new ga({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),t.add(o))}function DR(t,e,n,i){var o,r,a,s;n.symbolClip&&(o=t.__pictorialClipPath,r=O({},n.clipShape),a=e.valueDim,s=n.animationModel,e=n.dataIndex,o?Jc(o,{shape:r},s,e):(r[a.wh]=0,o=new ga({shape:r}),t.__pictorialBundle.setClipPath(o),t.__pictorialClipPath=o,(t={})[a.wh]=n.clipShape[a.wh],dp[i?"updateProps":"initProps"](o,{shape:t},s,e)))}function AR(t,e){e=t.getItemModel(e);return e.getAnimationDelayParams=LR,e.isAnimationEnabled=kR,e}function LR(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function kR(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function PR(t,e,n,i){var o=new $r,r=new $r;return o.add(r),(o.__pictorialBundle=r).x=n.bundlePosition[0],r.y=n.bundlePosition[1],n.symbolRepeat?IR(o,e,n):TR(o,0,n),CR(o,n,i),DR(o,e,n,i),o.__pictorialShapeStr=RR(t,n),o.__pictorialSymbolMeta=n,o}function OR(t,e,n,i){var o=i.__pictorialBarRect;o&&o.removeTextContent();var r=[];NR(i,function(t){r.push(t)}),i.__pictorialMainPath&&r.push(i.__pictorialMainPath),i.__pictorialClipPath&&(n=null),N(r,function(t){tp(t,{scaleX:0,scaleY:0},n,e,function(){i.parent&&i.parent.remove(i)})}),t.setItemGraphicEl(e,null)}function RR(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function NR(e,n,i){N(e.__pictorialBundle.children(),function(t){t!==e.__pictorialBarRect&&n.call(i,t)})}function ER(t,e,n,i,o,r){e&&t.attr(e),i.symbolClip&&!o?n&&t.attr(n):n&&dp[o?"updateProps":"initProps"](t,n,i.animationModel,i.dataIndex,r)}function zR(t,e,n){var i=n.dataIndex,o=n.itemModel,r=o.getModel("emphasis"),a=r.getModel("itemStyle").getItemStyle(),s=o.getModel(["blur","itemStyle"]).getItemStyle(),l=o.getModel(["select","itemStyle"]).getItemStyle(),u=o.getShallow("cursor"),h=r.get("focus"),c=r.get("blurScope"),p=r.get("scale");NR(t,function(t){t instanceof na?(e=t.style,t.useStyle(O({image:e.image,x:e.x,y:e.y,width:e.width,height:e.height},n.style))):t.useStyle(n.style);var e=t.ensureState("emphasis");e.style=a,p&&(e.scaleX=1.1*t.scaleX,e.scaleY=1.1*t.scaleY),t.ensureState("blur").style=s,t.ensureState("select").style=l,u&&(t.cursor=u),t.z2=n.z2});r=e.valueDim.posDesc[+(0<n.boundingLength)];mp(t.__pictorialBarRect,vp(o),{labelFetcher:e.seriesModel,labelDataIndex:i,defaultText:CS(e.seriesModel.getData(),i),inheritColor:n.style.fill,defaultOpacity:n.style.opacity,defaultOutsidePosition:r}),Lc(t,h,c)}function BR(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}tm.registerClass(nd),k_(V(Qb,"pictorialBar"));var VR,FR=(l(GR,VR=mu),GR.prototype.isHorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},GR.prototype.pointToData=function(t,e){return this.coordinateSystem.pointToData(t)[0]},GR);function GR(t,e,n,i,o){n=VR.call(this,t,e,n)||this;return n.type=i||"value",n.position=o||"bottom",n}var HR=(WR.prototype._init=function(t,e,n){var i=this.dimension,o=new FR(i,Dw(t),[0,0],t.get("type"),t.get("position")),i="category"===o.type;o.onBand=i&&t.get("boundaryGap"),o.inverse=t.get("inverse"),o.orient=t.get("orient"),(t.axis=o).model=t,(o.coordinateSystem=this)._axis=o},WR.prototype.update=function(t,e){t.eachSeries(function(t){var e;t.coordinateSystem===this&&(N((e=t.getData()).mapDimensionsAll(this.dimension),function(t){this._axis.scale.unionExtentFromData(e,t)},this),Cw(this._axis.scale,this._axis.model))},this)},WR.prototype.resize=function(t,e){this._rect=Yd({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()},WR.prototype.getRect=function(){return this._rect},WR.prototype._adjustAxis=function(){var t=this._rect,e=this._axis,n=e.isHorizontal(),i=n?[0,t.width]:[0,t.height],o=e.reverse?1:0;e.setExtent(i[o],i[1-o]),this._updateAxisTransform(e,n?t.x:t.y)},WR.prototype._updateAxisTransform=function(t,e){var n=t.getExtent(),i=n[0]+n[1],n=t.isHorizontal();t.toGlobalCoord=n?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord=n?function(t){return t-e}:function(t){return i-t+e}},WR.prototype.getAxis=function(){return this._axis},WR.prototype.getBaseAxis=function(){return this._axis},WR.prototype.getAxes=function(){return[this._axis]},WR.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},WR.prototype.containPoint=function(t){var e=this.getRect(),n=this.getAxis();return"horizontal"===n.orient?n.contain(n.toLocalCoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},WR.prototype.pointToData=function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},WR.prototype.dataToPoint=function(t){var e=this.getAxis(),n=this.getRect(),i=[],o="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),i[o]=e.toGlobalCoord(e.dataToCoord(+t)),i[1-o]=0==o?n.y+n.height/2:n.x+n.width/2,i},WR.prototype.convertToPixel=function(t,e,n){return XR(e)===this?this.dataToPoint(n):null},WR.prototype.convertFromPixel=function(t,e,n){return XR(e)===this?this.pointToData(n):null},WR);function WR(t,e,n){this.type="single",this.dimension="single",this.dimensions=["single"],this.axisPointerEnabled=!0,this.model=t,this._init(t,e,n)}function XR(t){var e=t.seriesModel,t=t.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function YR(t,e){e=e||{};var n=t.coordinateSystem,i=t.axis,o={},r=i.position,a=i.orient,i=n.getRect(),n=[i.x,i.x+i.width,i.y,i.y+i.height],i={horizontal:{top:n[2],bottom:n[3]},vertical:{left:n[0],right:n[1]}};o.position=["vertical"===a?i.vertical[r]:n[0],"horizontal"===a?i.horizontal[r]:n[3]];o.rotation=Math.PI/2*{horizontal:0,vertical:1}[a];o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,right:1,left:-1}[r],t.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),Q(e.labelInside,t.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);e=e.rotate;return null==e&&(e=t.get(["axisLabel","rotate"])),o.labelRotation="top"===r?-e:e,o.z2=1,o}Yf.register("single",{create:function(i,o){var r=[];return i.eachComponent("singleAxis",function(t,e){var n=new HR(t,i,o);n.name="single_"+e,n.resize(t,o),t.coordinateSystem=n,r.push(n)}),i.eachSeries(function(t){var e;"singleAxis"===t.get("coordinateSystem")&&(e=t.getReferringComponents("singleAxis",Sh).models[0],t.coordinateSystem=e&&e.coordinateSystem)}),r},dimensions:HR.prototype.dimensions});var UR,ZR=["axisLine","axisTickLabel","axisName"],jR=["splitArea","splitLine"],vm=(l(qR,UR=Op),qR.prototype.render=function(e,t,n,i){var o=this.group;o.removeAll();var r=this._axisGroup;this._axisGroup=new $r;var a=YR(e),a=new AM(e,a);N(ZR,a.add,a),o.add(this._axisGroup),o.add(a.getGroup()),N(jR,function(t){e.get([t,"show"])&&KR[t](this,this.group,this._axisGroup,e)},this),lp(r,this._axisGroup,e),UR.prototype.render.call(this,e,t,n,i)},qR.prototype.remove=function(){qM(this)},qR.type="singleAxis",qR);function qR(){var t=null!==UR&&UR.apply(this,arguments)||this;return t.type=qR.type,t.axisPointerClass="SingleAxisPointer",t}var KR={splitLine:function(t,e,n,i){var o=i.axis;if(!o.scale.isBlank()){for(var r=i.getModel("splitLine"),a=r.getModel("lineStyle"),s=(s=a.get("color"))instanceof Array?s:[s],l=i.coordinateSystem.getRect(),u=o.isHorizontal(),h=[],c=0,p=o.getTicksCoords({tickModel:r}),d=[],f=[],g=0;g<p.length;++g){var y=o.toGlobalCoord(p[g].coord);u?(d[0]=y,d[1]=l.y,f[0]=y,f[1]=l.y+l.height):(d[0]=l.x,d[1]=y,f[0]=l.x+l.width,f[1]=y);y=c++%s.length;h[y]=h[y]||[],h[y].push(new Ma({subPixelOptimize:!0,shape:{x1:d[0],y1:d[1],x2:f[0],y2:f[1]},silent:!0}))}for(var m=a.getLineStyle(["color"]),g=0;g<h.length;++g)e.add(jc(h[g],{style:A({stroke:s[g%s.length]},m),silent:!0}))}},splitArea:function(t,e,n,i){jM(t,n,i,i)}};qy.registerClass(vm);var $R,af=(l(JR,$R=nf),JR.prototype.getCoordSysModel=function(){return this},JR.type="singleAxis",JR.layoutMode="box",JR.defaultOption={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}}},JR);function JR(){var t=null!==$R&&$R.apply(this,arguments)||this;return t.type=JR.type,t}function QR(t,e){var n=[],i=t.seriesIndex;if(null==i||!(a=e.getSeriesByIndex(i)))return{point:[]};var o=a.getData(),r=xh(o,t);if(null==r||r<0||F(r))return{point:[]};var a,s=o.getItemGraphicEl(r),e=a.coordinateSystem;return a.getTooltipPosition?n=a.getTooltipPosition(r)||[]:e&&e.dataToPoint?n=t.isStacked?(i=e.getBaseAxis(),a=e.getOtherAxis(i).dim,t=i.dim,i="x"===a||"radius"===a?1:0,a=o.mapDimension(t),(t=[])[i]=o.get(a,r),t[1-i]=o.get(o.getCalculationInfo("stackResultDimension"),r),e.dataToPoint(t)||[]):e.dataToPoint(o.getValues(P(e.dimensions,function(t){return o.mapDimension(t)}),r))||[]:s&&((r=s.getBoundingRect().clone()).applyTransform(s.transform),n=[r.x+r.width/2,r.y+r.height/2]),{point:n,el:s}}nf.registerClass(af),I(af,Ew.prototype),MM("single",af,af.defaultOption);var tN=_h();function eN(t,e,n,i,o){var r,a,s,l,u,h,c,p,d,f,g=t.axis;!g.scale.isBlank()&&g.containData(e)&&(t.involveSeries?(f=(r=(a=e,s=(d=t).axis,l=s.dim,u=a,h=[],c=Number.MAX_VALUE,p=-1,N(d.seriesModels,function(e,t){var n=e.getData().mapDimensionsAll(l);if(e.getAxisTooltipData)var i=e.getAxisTooltipData(n,a,s),o=i.dataIndices,r=i.nestestValue;else{if(!(o=e.getData().indicesOfNearest(n[0],a,"category"===s.type?.5:null)).length)return;r=e.getData().get(n[0],o[0])}null!=r&&isFinite(r)&&(i=a-r,(n=Math.abs(i))<=c&&((n<c||0<=i&&p<0)&&(c=n,p=i,u=r,h.length=0),N(o,function(t){h.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})})))}),{payloadBatch:h,snapToValue:u})).snapToValue,(d=r.payloadBatch)[0]&&null==o.seriesIndex&&O(o,d[0]),!i&&t.snap&&g.containData(f)&&null!=f&&(e=f),n.showPointer(t,e,d),n.showTooltip(t,r,f)):n.showPointer(t,e))}function nN(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function iN(t,e,n,i){var o,r=n.payloadBatch,a=e.axis,s=a.model,l=e.axisPointerModel;e.triggerTooltip&&r.length&&(n=FM(o=e.coordSys.model),(e=t.map[n])||(e=t.map[n]={coordSysId:o.id,coordSysIndex:o.componentIndex,coordSysType:o.type,coordSysMainType:o.mainType,dataByAxis:[]},t.list.push(e)),e.dataByAxis.push({axisDim:a.dim,axisIndex:s.componentIndex,axisType:s.type,axisId:s.id,value:i,valueLabelOpt:{precision:l.get(["label","precision"]),formatter:l.get(["label","formatter"])},seriesDataIndices:r.slice()}))}function oN(t){var e=t.axis.model,n={},t=n.axisDim=t.axis.dim;return n.axisIndex=n[t+"AxisIndex"]=e.componentIndex,n.axisName=n[t+"AxisName"]=e.name,n.axisId=n[t+"AxisId"]=e.id,n}function rN(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}var aN=_h(),sN=N;function lN(t,e,n){var i;w.node||(i=e.getZr(),aN(i).records||(aN(i).records={}),function(s,l){if(aN(s).initialized)return;function t(t,a){s.on(t,function(e){var n,i,o,r=(n=l,{dispatchAction:o=function(t){var e=i[t.type];e?e.push(t):(t.dispatchAction=o,n.dispatchAction(t))},pendings:i={showTip:[],hideTip:[]}});sN(aN(s).records,function(t){t&&a(t,e,r.dispatchAction)}),function(t,e){var n,i=t.showTip.length,o=t.hideTip.length;i?n=t.showTip[i-1]:o&&(n=t.hideTip[o-1]);n&&(n.dispatchAction=null,e.dispatchAction(n))}(r.pendings,l)})}aN(s).initialized=!0,t("click",V(hN,"click")),t("mousemove",V(hN,"mousemove")),t("globalout",uN)}(i,e),(aN(i).records[t]||(aN(i).records[t]={})).handler=n)}function uN(t,e,n){t.handler("leave",null,n)}function hN(t,e,n,i){e.handler(t,n,i)}function cN(t,e){w.node||(e=e.getZr(),(aN(e).records||{})[t]&&(aN(e).records[t]=null))}var pN,nd=(l(dN,pN=qy),dN.prototype.render=function(t,e,n){var e=e.getComponent("tooltip"),i=t.get("triggerOn")||e&&e.get("triggerOn")||"mousemove|click";lN("axisPointer",n,function(t,e,n){"none"!==i&&("leave"===t||0<=i.indexOf(t))&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},dN.prototype.remove=function(t,e){cN("axisPointer",e)},dN.prototype.dispose=function(t,e){cN("axisPointer",e)},dN.type="axisPointer",dN);function dN(){var t=null!==pN&&pN.apply(this,arguments)||this;return t.type=dN.type,t}qy.registerClass(nd);var fN=_h(),gN=C,yN=B,vm=(mN.prototype.render=function(t,e,n,i){var o=e.get("value"),r=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,i||this._lastValue!==o||this._lastStatus!==r){this._lastValue=o,this._lastStatus=r;var a=this._group,i=this._handle;if(!r||"hide"===r)return a&&a.hide(),void(i&&i.hide());a&&a.show(),i&&i.show();r={};this.makeElOption(r,o,t,e,n);i=r.graphicKey;i!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=i;i=this._moveAnimation=this.determineAnimation(t,e);a?(i=V(vN,e,i),this.updatePointerEl(a,r,i),this.updateLabelEl(a,r,i,e)):(a=this._group=new $r,this.createPointerEl(a,r,t,e),this.createLabelEl(a,r,t,e),n.getZr().add(a)),bN(a,e,!0),this._renderHandle(o)}},mN.prototype.remove=function(t){this.clear(t)},mN.prototype.dispose=function(t){this.clear(t)},mN.prototype.determineAnimation=function(t,e){var n=e.get("animation"),i=t.axis,o="category"===i.type,e=e.get("snap");if(!e&&!o)return!1;if("auto"!==n&&null!=n)return!0===n;n=this.animationThreshold;if(o&&i.getBandWidth()>n)return!0;if(e){t=BM(t).seriesDataCount,i=i.getExtent();return Math.abs(i[0]-i[1])/t>n}return!1},mN.prototype.makeElOption=function(t,e,n,i,o){},mN.prototype.createPointerEl=function(t,e,n,i){var o=e.pointer;o&&(e=fN(t).pointerEl=new dp[o.type](gN(e.pointer)),t.add(e))},mN.prototype.createLabelEl=function(t,e,n,i){e.label&&(e=fN(t).labelEl=new vl(gN(e.label)),t.add(e),xN(e,i))},mN.prototype.updatePointerEl=function(t,e,n){t=fN(t).pointerEl;t&&e.pointer&&(t.setStyle(e.pointer.style),n(t,{shape:e.pointer.shape}))},mN.prototype.updateLabelEl=function(t,e,n,i){t=fN(t).labelEl;t&&(t.setStyle(e.label.style),n(t,{x:e.label.x,y:e.label.y}),xN(t,i))},mN.prototype._renderHandle=function(t){if(!this._dragging&&this.updateHandleTransform){var e,n=this._axisPointerModel,i=this._api.getZr(),o=this._handle,r=n.getModel("handle"),a=n.get("status");if(!r.get("show")||!a||"hide"===a)return o&&i.remove(o),void(this._handle=null);this._handle||(e=!0,o=this._handle=hp(r.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){ie(t.event)},onmousedown:yN(this._onHandleDragMove,this,0,0),drift:yN(this._onHandleDragMove,this),ondragend:yN(this._onHandleDragEnd,this)}),i.add(o)),bN(o,n,!1),o.setStyle(r.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));n=r.get("size");F(n)||(n=[n,n]),o.scaleX=n[0]/2,o.scaleY=n[1]/2,cm(this,"_doDispatchAxisPointer",r.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},mN.prototype._moveHandleToValue=function(t,e){vN(this._axisPointerModel,!e&&this._moveAnimation,this._handle,_N(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},mN.prototype._onHandleDragMove=function(t,e){var n=this._handle;n&&(this._dragging=!0,e=this.updateHandleTransform(_N(n),[t,e],this._axisModel,this._axisPointerModel),this._payloadInfo=e,n.stopAnimation(),n.attr(_N(e)),fN(n).lastProp=null,this._doDispatchAxisPointer())},mN.prototype._doDispatchAxisPointer=function(){var t,e;this._handle&&(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}]}))},mN.prototype._onHandleDragEnd=function(){var t;this._dragging=!1,this._handle&&(t=this._axisPointerModel.get("value"),this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"}))},mN.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,t=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),t&&e.remove(t),this._group=null,this._handle=null,this._payloadInfo=null)},mN.prototype.doClear=function(){},mN.prototype.buildLabel=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}},mN);function mN(){this._dragging=!1,this.animationThreshold=15}function vN(t,e,n,i){!function n(i,t){{if(Y(i)&&Y(t)){var o=!0;return N(t,function(t,e){o=o&&n(i[e],t)}),!!o}return i===t}}(fN(n).lastProp,i)&&(fN(n).lastProp=i,e?Jc(n,i,t):(n.stopAnimation(),n.attr(i)))}function xN(t,e){t[e.get(["label","show"])?"show":"hide"]()}function _N(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function bN(t,e,n){var i=e.get("z"),o=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=o&&(t.zlevel=o),t.silent=n)})}function wN(t){var e,n=t.get("type"),t=t.getModel(n+"Style");return"line"===n?(e=t.getLineStyle()).fill=null:"shadow"===n&&((e=t.getAreaStyle()).stroke=null),e}function SN(t,e,n,i,o){var r=MN(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),a=n.getModel("label"),s=Cd(a.get("padding")||0),l=a.getFont(),u=Kn(r,l),h=o.position,c=u.width+s[1]+s[3],n=u.height+s[0]+s[2],u=o.align;"right"===u&&(h[0]-=c),"center"===u&&(h[0]-=c/2);u=o.verticalAlign;"bottom"===u&&(h[1]-=n),"middle"===u&&(h[1]-=n/2),o=h,u=c,c=n,i=(n=i).getWidth(),n=n.getHeight(),o[0]=Math.min(o[0]+u,i)-u,o[1]=Math.min(o[1]+c,n)-c,o[0]=Math.max(o[0],0),o[1]=Math.max(o[1],0);o=a.get("backgroundColor");o&&"auto"!==o||(o=e.get(["axisLine","lineStyle","color"])),t.label={x:h[0],y:h[1],style:xp(a,{text:r,font:l,fill:a.getTextColor(),padding:s,backgroundColor:o}),z2:10}}function MN(t,e,n,i,o){t=e.scale.parse(t);var r,a=e.scale.getLabel({value:t},{precision:o.precision}),o=o.formatter;return o&&(r={value:Lw(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]},N(i,function(t){var e=n.getSeriesByIndex(t.seriesIndex),t=t.dataIndexInside,t=e&&e.getDataParams(t);t&&r.seriesData.push(t)}),H(o)?a=o.replace("{value}",a):G(o)&&(a=o(r))),a}function IN(t,e,n){var i=_e();return Ie(i,i,n.rotation),Me(i,i,n.position),rp([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function TN(t,e,n,i,o,r){var a=AM.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=o.get(["label","margin"]),SN(e,i,o,r,{position:IN(i.axis,t,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function CN(t,e,n){return{x1:t[n=n||0],y1:t[1-n],x2:e[n],y2:e[1-n]}}function DN(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}function AN(t,e,n,i,o,r){return{cx:t,cy:e,r0:n,r:i,startAngle:o,endAngle:r,clockwise:!0}}var LN,af=(l(kN,LN=vm),kN.prototype.makeElOption=function(t,e,n,i,o){var r,a=n.axis,s=a.grid,l=i.get("type"),u=PN(s,a).getOtherAxis(a).getGlobalExtent(),h=a.toGlobalCoord(a.dataToCoord(e,!0));l&&"none"!==l&&(r=wN(i),(u=ON[l](a,h,u)).style=r,t.graphicKey=u.type,t.pointer=u),TN(e,t,XM(s.model,n),n,i,o)},kN.prototype.getHandleTransform=function(t,e,n){var i=XM(e.axis.grid.model,e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);t=IN(e.axis,t,i);return{x:t[0],y:t[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},kN.prototype.updateHandleTransform=function(t,e,n,i){var o=n.axis,r=o.grid,a=o.getGlobalExtent(!0),n=PN(r,o).getOtherAxis(o).getGlobalExtent(),r="x"===o.dim?0:1,o=[t.x,t.y];o[r]+=e[r],o[r]=Math.min(a[1],o[r]),o[r]=Math.max(a[0],o[r]);n=(n[1]+n[0])/2,n=[n,n];n[r]=o[r];return{x:o[0],y:o[1],rotation:t.rotation,cursorPoint:n,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][r]}},kN);function kN(){return null!==LN&&LN.apply(this,arguments)||this}function PN(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var ON={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:CN([e,n[0]],[e,n[1]],RN(t))}},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),o=n[1]-n[0];return{type:"Rect",shape:DN([e-i/2,n[0]],[i,o],RN(t))}}};function RN(t){return"x"===t.dim?0:1}Op.registerAxisPointerClass("CartesianAxisPointer",af);var NN,nd=(l(EN,NN=nf),EN.type="axisPointer",EN.defaultOption={show:"auto",zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},EN);function EN(){var t=null!==NN&&NN.apply(this,arguments)||this;return t.type=EN.type,t}nf.registerClass(nd),C_(function(t){var e;t&&(t.axisPointer&&0!==t.axisPointer.length||(t.axisPointer={}),(e=t.axisPointer.link)&&!F(e)&&(t.axisPointer.link=[e]))}),D_(r.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=EM(t,e)}),A_({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},function(t,e,n){var i=t.currTrigger,r=[t.x,t.y],o=t,a=t.dispatchAction||B(n.dispatchAction,n),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){rN(r)&&(r=QR({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=rN(r),u=o.axesInfo,h=s.axesInfo,c="leave"===i||rN(r),p={},d={},o={list:[],map:{}},f={showPointer:V(nN,d),showTooltip:V(iN,o)};N(s.coordSysMap,function(t,e){var o=l||t.containPoint(r);N(s.coordSysAxesInfo[e],function(t,e){var n=t.axis,i=function(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}(u,t);c||!o||u&&!i||(null!=(i=i&&i.value)||l||(i=n.pointToData(r)),null!=i&&eN(t,i,f,!1,p))})});var g,y,m={};return N(h,function(n,t){var i=n.linkGroup;i&&!d[t]&&N(i.axesInfo,function(t,e){e=d[e];t!==n&&e&&(e=e.value,i.mapper&&(e=n.axis.scale.parse(i.mapper(e,oN(t),oN(n)))),m[n.key]=e)})}),N(m,function(t,e){eN(h[e],t,f,!0,p)}),g=d,i=h,y=p.axesInfo=[],N(i,function(t,e){var n=t.axisPointerModel.option,e=g[e];e?(t.useHandle||(n.status="show"),n.value=e.value,n.seriesDataIndices=(e.payloadBatch||[]).slice()):t.useHandle||(n.status="hide"),"show"===n.status&&y.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:n.value})}),function(t,e,n,i){if(rN(e)||!t.list.length)return i({type:"hideTip"});var o=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:o.dataIndexInside,dataIndex:o.dataIndex,seriesIndex:o.seriesIndex,dataByCoordSys:t.list})}(o,r,t,a),function(t,e){var n=e.getZr(),i="axisPointerLastHighlights",o=tN(n)[i]||{},r=tN(n)[i]={};N(t,function(t,e){t=t.axisPointerModel.option;"show"===t.status&&N(t.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;r[e]=t})});var a=[],s=[];N(o,function(t,e){r[e]||s.push(t)}),N(r,function(t,e){o[e]||a.push(t)}),s.length&&e.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:s}),a.length&&e.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:a})}(h,n),p}});var zN,BN=["x","y"],VN=["width","height"],af=(l(FN,zN=vm),FN.prototype.makeElOption=function(t,e,n,i,o){var r=n.axis,a=r.coordinateSystem,s=WN(a,1-HN(r)),l=a.dataToPoint(e)[0],u=i.get("type");u&&"none"!==u&&(a=wN(i),(s=GN[u](r,l,s)).style=a,t.graphicKey=s.type,t.pointer=s),TN(e,t,YR(n),n,i,o)},FN.prototype.getHandleTransform=function(t,e,n){var i=YR(e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);t=IN(e.axis,t,i);return{x:t[0],y:t[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},FN.prototype.updateHandleTransform=function(t,e,n,i){var o=n.axis,r=o.coordinateSystem,a=HN(o),n=WN(r,a),o=[t.x,t.y];o[a]+=e[a],o[a]=Math.min(n[1],o[a]),o[a]=Math.max(n[0],o[a]);r=WN(r,1-a),r=(r[1]+r[0])/2,r=[r,r];return r[a]=o[a],{x:o[0],y:o[1],rotation:t.rotation,cursorPoint:r,tooltipOption:{verticalAlign:"middle"}}},FN);function FN(){return null!==zN&&zN.apply(this,arguments)||this}var GN={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:CN([e,n[0]],[e,n[1]],HN(t))}},shadow:function(t,e,n){var i=t.getBandWidth(),o=n[1]-n[0];return{type:"Rect",shape:DN([e-i/2,n[0]],[i,o],HN(t))}}};function HN(t){return t.isHorizontal()?0:1}function WN(t,e){t=t.getRect();return[t[BN[e]],t[BN[e]]+t[VN[e]]]}Op.registerAxisPointerClass("SingleAxisPointer",af),N_({type:"single"});var XN,nd=(l(YN,XN=Fy),YN.prototype.init=function(t){XN.prototype.init.apply(this,arguments),this.legendVisualProvider=new tT(B(this.getData,this),B(this.getRawData,this))},YN.prototype.fixData=function(t){var e=t.length,n={},i=Ch(t,function(t){return n.hasOwnProperty(t[0]+"")||(n[t[0]+""]=-1),t[2]}),o=[];i.buckets.each(function(t,e){o.push({name:e,dataList:t})});for(var r=o.length,a=0;a<r;++a){for(var s=o[a].name,l=0;l<o[a].dataList.length;++l){var u=o[a].dataList[l][0]+"";n[u]=a}for(u in n)n.hasOwnProperty(u)&&n[u]!==a&&(n[u]=a,t[e]=[u,0,s],e++)}return t},YN.prototype.getInitialData=function(t,e){for(var n=this.getReferringComponents("singleAxis",Sh).models[0].get("type"),t=R(t.data,function(t){return void 0!==t[2]}),i=this.fixData(t||[]),o=[],r=this.nameMap=ct(),a=0,s=0;s<i.length;++s)o.push(i[s][2]),r.get(i[s][2])||(r.set(i[s][2],a),a++);n=vb(i,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:H_(n)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}),n=new db(n,this);return n.initData(i),n},YN.prototype.getLayerSeries=function(){for(var n=this.getData(),t=n.count(),e=[],i=0;i<t;++i)e[i]=i;var o=n.mapDimension("single"),r=Ch(e,function(t){return n.get("name",t)}),a=[];return r.buckets.each(function(t,e){t.sort(function(t,e){return n.get(o,t)-n.get(o,e)}),a.push({name:e,indices:t})}),a},YN.prototype.getAxisTooltipData=function(t,e,n){F(t)||(t=t?[t]:[]);for(var i,o=this.getData(),r=this.getLayerSeries(),a=[],s=r.length,l=0;l<s;++l){for(var u=Number.MAX_VALUE,h=-1,c=r[l].indices.length,p=0;p<c;++p){var d=o.get(t[0],r[l].indices[p]),f=Math.abs(d-e);f<=u&&(i=d,u=f,h=r[l].indices[p])}a.push(h)}return{dataIndices:a,nestestValue:i}},YN.prototype.formatTooltip=function(t,e,n){var i=this.getData();return Iy("nameValue",{name:i.getName(t),value:i.get(i.mapDimension("value"),t)})},YN.type="series.themeRiver",YN.dependencies=["singleAxis"],YN.defaultOption={zlevel:0,z:2,coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",fontSize:11},emphasis:{label:{show:!0}}},YN);function YN(){var t=null!==XN&&XN.apply(this,arguments)||this;return t.type=YN.type,t.useColorPaletteOnData=!0,t}Fy.registerClass(nd);var UN,af=(l(ZN,UN=tm),ZN.prototype.render=function(_,t,e){var b=_.getData(),w=this,S=this.group,M=_.getLayerSeries(),n=b.getLayout("layoutInfo"),i=n.rect,n=n.boundaryGap;function o(t){return t.name}S.x=0,S.y=i.y+n[0];var n=new B_(this._layersSeries||[],M,o,o),I=[];function r(t,e,n){var i=w._layers;if("remove"!==t){for(var o,r=[],a=[],s=M[e].indices,l=0;l<s.length;l++){var u=b.getItemLayout(s[l]),h=u.x,c=u.y0,u=u.y;r.push(h,c),a.push(h,c+u),o=b.getItemVisual(s[l],"style")}var p,d,f,g,y=b.getItemLayout(s[0]),m=_.getModel("label").get("margin"),v=_.getModel("emphasis");"add"===t?(x=I[e]=new $r,p=new eM({shape:{points:r,stackedOnPoints:a,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),x.add(p),S.add(x),_.isAnimationEnabled()&&p.setClipPath((d=p.getBoundingRect(),f=_,g=function(){p.removeClipPath()},Qc(t=new ga({shape:{x:d.x-10,y:d.y-10,width:0,height:d.height+20}}),{shape:{x:d.x-50,width:d.width+100,height:d.height+20}},f,g),t))):(x=i[n],p=x.childAt(0),S.add(x),I[e]=x,Jc(p,{shape:{points:r,stackedOnPoints:a}},_)),mp(p,vp(_),{labelDataIndex:s[l-1],defaultText:b.getName(s[l-1]),inheritColor:o.fill},{normal:{verticalAlign:"middle"}}),p.setTextConfig({position:null,local:!0});var x=p.getTextContent();x&&(x.x=y.x-m,x.y=y.y0+y.y/2),p.useStyle(o),b.setItemGraphicEl(e,p),Rc(p,_),Lc(p,v.get("focus"),v.get("blurScope"))}else S.remove(i[e])}n.add(B(r,this,"add")).update(B(r,this,"update")).remove(B(r,this,"remove")).execute(),this._layersSeries=M,this._layers=I},ZN.type="themeRiver",ZN);function ZN(){var t=null!==UN&&UN.apply(this,arguments)||this;return t.type=ZN.type,t._layers=[],t}function jN(n,t,e){if(n.count())for(var i,o=t.coordinateSystem,r=t.getLayerSeries(),a=n.mapDimension("single"),s=n.mapDimension("value"),l=P(r,function(t){return P(t.indices,function(t){var e=o.dataToPoint(n.get(a,t));return e[1]=n.get(s,t),e})}),t=function(t){for(var e=t.length,n=t[0].length,i=[],o=[],r=0,a=0;a<n;++a){for(var s=0,l=0;l<e;++l)s+=t[l][a][1];r<s&&(r=s),i.push(s)}for(var u=0;u<n;++u)o[u]=(r-i[u])/2;for(var h=r=0;h<n;++h){var c=i[h]+o[h];r<c&&(r=c)}return{y0:o,max:r}}(l),u=t.y0,h=e/t.max,c=r.length,p=r[0].indices.length,d=0;d<p;++d){i=u[d]*h,n.setItemLayout(r[0].indices[d],{layerIndex:0,x:l[0][d][0],y0:i,y:l[0][d][1]*h});for(var f=1;f<c;++f)i+=l[f-1][d][1]*h,n.setItemLayout(r[f].indices[d],{layerIndex:f,x:l[f][d][0],y0:i,y:l[f][d][1]*h})}}tm.registerClass(af),k_(function(t,e){t.eachSeriesByType("themeRiver",function(t){var e=t.getData(),n=t.coordinateSystem,i={},o=n.getRect();i.rect=o;var r=t.get("boundaryGap"),n=n.getAxis();i.boundaryGap=r,"horizontal"===n.orient?(r[0]=Nu(r[0],o.height),r[1]=Nu(r[1],o.height),jN(e,t,o.height-r[0]-r[1])):(r[0]=Nu(r[0],o.width),r[1]=Nu(r[1],o.width),jN(e,t,o.width-r[0]-r[1])),e.setLayout("layoutInfo",i)})}),D_(yT("themeRiver"));var qN,nd=(l(KN,qN=Fy),KN.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};!function e(t){var n=0;N(t.children,function(t){e(t);var t=t.value;F(t)&&(t=t[0]),n+=t});var i=t.value;F(i)&&(i=i[0]);null!=i&&!isNaN(i)||(i=n);i<0&&(i=0);F(t.value)?t.value[0]=i:t.value=i}(n);var i=P(t.levels||[],function(t){return new Fp(t,this,e)},this),o=jC.createTree(n,this,function(t){t.wrapMethod("getItemModel",function(t,e){e=o.getNodeByDataIndex(e),e=i[e.depth];return e&&(t.parentModel=e),t})});return o.data},KN.prototype.optionUpdated=function(){this.resetViewRoot()},KN.prototype.getDataParams=function(t){var e=qN.prototype.getDataParams.apply(this,arguments),t=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=_D(t,this),e},KN.prototype.getViewRoot=function(){return this._viewRoot},KN.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},KN.prototype.enableAriaDecal=function(){bD(this)},KN.type="series.sunburst",KN.defaultOption={zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],levels:[],sort:"desc"},KN);function KN(){var t=null!==qN&&qN.apply(this,arguments)||this;return t.type=KN.type,t.ignoreStyleOnData=!0,t}Fy.registerClass(nd);var $N,JN=(l(QN,$N=bs),QN.prototype.updateData=function(t,e,n,i,o){(this.node=e).piece=this,n=n||this._seriesModel,i=i||this._ecModel;var r=this;Wh(r).dataIndex=e.dataIndex;var a=e.getModel(),s=a.getModel("emphasis"),l=e.getLayout(),u=O({},l);u.label=null;var h=e.getVisual("style");h.lineJoin="bevel";var c=e.getVisual("decal");c&&(h.decal=yx(c,o));o=lT(a.getModel("itemStyle"),u);O(u,o),N(Kh,function(t){var e=r.ensureState(t),t=a.getModel([t,"itemStyle"]);e.style=t.getItemStyle();t=lT(t,u);t&&(e.shape=t)}),t?(r.setShape(u),r.shape.r=l.r0,Jc(r,{shape:{r:l.r}},n,e.dataIndex)):Jc(r,{shape:u},n),r.useStyle(h),this._updateLabel(n);h=a.getShallow("cursor");h&&r.attr("cursor",h),this._seriesModel=n||this._seriesModel,this._ecModel=i||this._ecModel;i=s.get("focus");Lc(this,("ancestor"===i?e.getAncestorsIndices():"descendant"===i?e.getDescendantIndices():null)||i,s.get("blurScope"))},QN.prototype._updateLabel=function(a){var s=this,l=this.node.getModel(),n=l.getModel("label"),u=this.node.getLayout(),t=u.endAngle-u.startAngle,h=(u.startAngle+u.endAngle)/2,c=Math.cos(h),p=Math.sin(h),d=this,f=d.getTextContent(),g=this.node.dataIndex,e=n.get("minAngle")/180*Math.PI,e=n.get("show")&&!(null!=e&&Math.abs(t)<e);function y(t,e){t=t.get(e);return null==t?n.get(e):t}f.ignore=!e,N($h,function(t){var e="normal"===t?l.getModel("label"):l.getModel([t,"label"]),n="normal"===t,i=n?f:f.ensureState(t),o=a.getFormattedLabel(g,t);n&&(o=o||s.node.name),i.style=xp(e,{},null,"normal"!==t,!0),o&&(i.style.text=o);o=e.get("show");null==o||n||(i.ignore=!o);o=y(e,"position"),n=n?d:d.states[t],t=n.style.fill;n.textConfig={outsideFill:"inherit"===e.get("color")?t:null,inside:"outside"!==o};n=y(e,"distance")||0,t=y(e,"align");"outside"===o?(r=u.r+n,t=h>Math.PI/2?"right":"left"):t&&"center"!==t?"left"===t?(r=u.r0+n,h>Math.PI/2&&(t="right")):"right"===t&&(r=u.r-n,h>Math.PI/2&&(t="left")):(r=(u.r+u.r0)/2,t="center"),i.style.align=t,i.style.verticalAlign=y(e,"verticalAlign")||"middle",i.x=r*c+u.cx,i.y=r*p+u.cy;var r=y(e,"rotate"),e=0;"radial"===r?(e=-h)<-Math.PI/2&&(e+=Math.PI):"tangential"===r?(e=Math.PI/2-h)>Math.PI/2?e-=Math.PI:e<-Math.PI/2&&(e+=Math.PI):"number"==typeof r&&(e=r*Math.PI/180),i.rotation=e}),f.dirtyStyle()},QN);function QN(t,e,n,i){var o=$N.call(this)||this;o.z2=2,o.textConfig={inside:!0},Wh(o).seriesIndex=e.seriesIndex;var r=new vl({z2:4,silent:t.getModel().get(["label","silent"])});return o.setTextContent(r),o.updateData(!0,t,e,n,i),o}var tE="sunburstRootToNode";A_({type:tE,update:"updateView"},function(o,t){t.eachComponent({mainType:"series",subType:"sunburst",query:o},function(t,e){var n=mD(o,[tE],t);{var i;n&&((i=t.getViewRoot())&&(o.direction=xD(i,n.node)?"rollUp":"drillDown"),t.resetViewRoot(n.node))}})});var eE="sunburstHighlight";A_({type:eE,update:"none"},function(e,t,n){e=O({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},function(t){t=mD(e,[eE],t);t&&(e.dataIndex=t.node.dataIndex)}),n.dispatchAction(O(e,{type:"highlight"}))});A_({type:"sunburstUnhighlight",update:"updateView"},function(t,e,n){t=O({},t),n.dispatchAction(O(t,{type:"downplay"}))});var nE,af=(l(iE,nE=tm),iE.prototype.render=function(o,r,a,t){var e=this;this.seriesModel=o,this.api=a,this.ecModel=r;var s=o.getData(),l=s.tree.root,n=o.getViewRoot(),u=this.group,h=o.get("renderLabelForZeroData"),i=[];n.eachNode(function(t){i.push(t)});var c,p,d=this._oldChildren||[];!function(n,i){if(0===n.length&&0===i.length)return;function t(t){return t.getId()}function e(t,e){!function(t,e){h||!t||t.getValue()||(t=null);{t!==l&&e!==l&&(e&&e.piece?t?(e.piece.updateData(!1,t,o,r,a),s.setItemGraphicEl(t.dataIndex,e.piece)):function(t){if(!t)return;t.piece&&(u.remove(t.piece),t.piece=null)}(e):t&&(e=new JN(t,o,r,a),u.add(e),s.setItemGraphicEl(t.dataIndex,e)))}}(null==t?null:n[t],null==e?null:i[e])}new B_(i,n,t,t).add(e).update(e).remove(V(e,null)).execute()}(i,d),c=l,0<(p=n).depth?(e.virtualPiece?e.virtualPiece.updateData(!1,c,o,r,a):(e.virtualPiece=new JN(c,o,r,a),u.add(e.virtualPiece)),p.piece.off("click"),e.virtualPiece.on("click",function(t){e._rootToNode(p.parentNode)})):e.virtualPiece&&(u.remove(e.virtualPiece),e.virtualPiece=null),this._initEvents(),this._oldChildren=i},iE.prototype._initEvents=function(){var o=this;this.group.off("click"),this.group.on("click",function(n){var i=!1;o.seriesModel.getViewRoot().eachNode(function(t){var e;!i&&t.piece&&t.piece===n.target&&("rootToNode"===(e=t.getModel().get("nodeClick"))?o._rootToNode(t):"link"!==e||(t=(e=t.getModel()).get("link"))&&Bd(t,e.get("target",!0)||"_blank"),i=!0)})})},iE.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:tE,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},iE.prototype.containPoint=function(t,e){var n=e.getData().getItemLayout(0);if(n){e=t[0]-n.cx,t=t[1]-n.cy,t=Math.sqrt(e*e+t*t);return t<=n.r&&t>=n.r0}},iE.type="sunburst",iE);function iE(){var t=null!==nE&&nE.apply(this,arguments)||this;return t.type=iE.type,t}tm.registerClass(af);var oE=Math.PI/180;function rE(e,n){if("function"==typeof n){var t=P(e,function(t,e){var n=t.getValue();return{params:{depth:t.depth,height:t.height,dataIndex:t.dataIndex,getValue:function(){return n}},index:e}});return t.sort(function(t,e){return n(t.params,e.params)}),P(t,function(t){return e[t.index]})}var i="asc"===n;return e.sort(function(t,e){var n=(t.getValue()-e.getValue())*(i?1:-1);return 0==n?(t.dataIndex-e.dataIndex)*(i?-1:1):n})}function aE(i,o){return o=o||[0,0],P(["x","y"],function(t,e){var n=this.getAxis(t),t=o[e],e=i[e]/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(t-e)-n.dataToCoord(t+e))},this)}function sE(r,a){return a=a||[0,0],P([0,1],function(t){var e=a[t],n=r[t]/2,i=[],o=[];return i[t]=e-n,o[t]=e+n,i[1-t]=o[1-t]=a[1-t],Math.abs(this.dataToPoint(i)[t]-this.dataToPoint(o)[t])},this)}function lE(t,e){var n=this.getAxis(),e=e instanceof Array?e[0]:e,t=(t instanceof Array?t[0]:t)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(e-t)-n.dataToCoord(e+t))}function uE(o,r){return r=r||[0,0],P(["Radius","Angle"],function(t,e){var n=this["get"+t+"Axis"](),i=r[e],e=o[e]/2,e="category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(i-e)-n.dataToCoord(i+e));return"Angle"===t&&(e=e*Math.PI/180),e},this)}k_(V(function(t,e,a){e.eachSeriesByType(t,function(t){var e=t.get("center"),n=t.get("radius");F(n)||(n=[0,n]),F(e)||(e=[e,e]);var i=a.getWidth(),o=a.getHeight(),l=Math.min(i,o),u=Nu(e[0],i),h=Nu(e[1],o),c=Nu(n[0],l/2),i=Nu(n[1],l/2),e=-t.get("startAngle")*oE,p=t.get("minAngle")*oE,d=t.getData().tree.root,o=t.getViewRoot(),f=o.depth,n=t.get("sort");null!=n&&!function e(t,n){var i=t.children||[];t.children=rE(i,n);i.length&&N(t.children,function(t){e(t,n)})}(o,n);var r=0;N(o.children,function(t){isNaN(t.getValue())||r++});var g=o.getValue(),y=Math.PI/(g||r)*2,m=0<o.depth,n=o.height-(m?-1:1),v=(i-c)/(n||1),x=t.get("clockwise"),_=t.get("stillShowZeroSum"),b=x?1:-1,w=function(t,e){if(t){var n,i,o,r,a,s=e;return t!==d&&(o=t.getValue(),(n=0===g&&_?y:o*y)<p&&(n=p),s=e+b*n,r=t.depth-f-(m?-1:1),i=c+v*r,o=c+v*(1+r),null!=(r=t.getModel()).get("r0")&&(i=Nu(r.get("r0"),l/2)),null!=r.get("r")&&(o=Nu(r.get("r"),l/2)),t.setLayout({angle:n,startAngle:e,endAngle:s,clockwise:x,cx:u,cy:h,r0:i,r:o})),t.children&&t.children.length&&(a=0,N(t.children,function(t){a+=w(t,e+a)})),s-e}};m&&(n=c+v,t=2*Math.PI,d.setLayout({angle:t,startAngle:e,endAngle:e+t,clockwise:x,cx:u,cy:h,r0:c,r:n})),w(o,e)})},"sunburst")),D_(V(yT,"sunburst")),P_(function(t){var r={};t.eachSeriesByType("sunburst",function(n){var i=n.getData(),o=i.tree;o.eachNode(function(t){var e=t.getModel().getModel("itemStyle").getItemStyle();e.fill||(e.fill=function(t,e,n){for(var i=t;i&&1<i.depth;)i=i.parentNode;return e=e.getColorFromPalette(i.name||i.dataIndex+"",r),1<t.depth&&"string"==typeof e&&(e=sn(e,(t.depth-1)/(n-1)*.5)),e}(t,n,o.root.height)),O(i.ensureUniqueItemVisual(t.dataIndex,"style"),e)})})});function hE(t,e,n,i){return t&&(t.legacy||!1!==t.legacy&&!n&&!i&&"tspan"!==e&&("text"===e||ft(t,"text")))}function cE(t,e,n){var i,o,r,a=t;return"text"===e?r=a:(r={},ft(a,"text")&&(r.text=a.text),ft(a,"rich")&&(r.rich=a.rich),ft(a,"textFill")&&(r.fill=a.textFill),ft(a,"textStroke")&&(r.stroke=a.textStroke),o={type:"text",style:r,silent:!0},i={},e=ft(a,"textPosition"),n?i.position=e?a.textPosition:"inside":e&&(i.position=a.textPosition),ft(a,"textPosition")&&(i.position=a.textPosition),ft(a,"textOffset")&&(i.offset=a.textOffset),ft(a,"textRotation")&&(i.rotation=a.textRotation),ft(a,"textDistance")&&(i.distance=a.textDistance)),pE(r,t),N(r.rich,function(t){pE(t,t)}),{textConfig:i,textContent:o}}function pE(t,e){e&&(e.font=e.textFont||e.font,ft(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),ft(e,"textAlign")&&(t.align=e.textAlign),ft(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),ft(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),ft(e,"textWidth")&&(t.width=e.textWidth),ft(e,"textHeight")&&(t.height=e.textHeight),ft(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),ft(e,"textPadding")&&(t.padding=e.textPadding),ft(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),ft(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),ft(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),ft(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),ft(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),ft(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),ft(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}function dE(t,e,n){var i=t;i.textPosition=i.textPosition||n.position||"inside",null!=n.offset&&(i.textOffset=n.offset),null!=n.rotation&&(i.textRotation=n.rotation),null!=n.distance&&(i.textDistance=n.distance);var o=0<=i.textPosition.indexOf("inside"),r=t.fill||"#000";fE(i,e);t=null==i.textFill;return o?t&&(i.textFill=n.insideFill||"#fff",!i.textStroke&&n.insideStroke&&(i.textStroke=n.insideStroke),i.textStroke||(i.textStroke=r),null==i.textStrokeWidth&&(i.textStrokeWidth=2)):(t&&(i.textFill=n.outsideFill||r),!i.textStroke&&n.outsideStroke&&(i.textStroke=n.outsideStroke)),i.text=e.text,i.rich=e.rich,N(e.rich,function(t){fE(t,t)}),i}function fE(t,e){e&&(ft(e,"fill")&&(t.textFill=e.fill),ft(e,"stroke")&&(t.textStroke=e.fill),ft(e,"lineWidth")&&(t.textStrokeWidth=e.lineWidth),ft(e,"font")&&(t.font=e.font),ft(e,"fontStyle")&&(t.fontStyle=e.fontStyle),ft(e,"fontWeight")&&(t.fontWeight=e.fontWeight),ft(e,"fontSize")&&(t.fontSize=e.fontSize),ft(e,"fontFamily")&&(t.fontFamily=e.fontFamily),ft(e,"align")&&(t.textAlign=e.align),ft(e,"verticalAlign")&&(t.textVerticalAlign=e.verticalAlign),ft(e,"lineHeight")&&(t.textLineHeight=e.lineHeight),ft(e,"width")&&(t.textWidth=e.width),ft(e,"height")&&(t.textHeight=e.height),ft(e,"backgroundColor")&&(t.textBackgroundColor=e.backgroundColor),ft(e,"padding")&&(t.textPadding=e.padding),ft(e,"borderColor")&&(t.textBorderColor=e.borderColor),ft(e,"borderWidth")&&(t.textBorderWidth=e.borderWidth),ft(e,"borderRadius")&&(t.textBorderRadius=e.borderRadius),ft(e,"shadowColor")&&(t.textBoxShadowColor=e.shadowColor),ft(e,"shadowBlur")&&(t.textBoxShadowBlur=e.shadowBlur),ft(e,"shadowOffsetX")&&(t.textBoxShadowOffsetX=e.shadowOffsetX),ft(e,"shadowOffsetY")&&(t.textBoxShadowOffsetY=e.shadowOffsetY),ft(e,"textShadowColor")&&(t.textShadowColor=e.textShadowColor),ft(e,"textShadowBlur")&&(t.textShadowBlur=e.textShadowBlur),ft(e,"textShadowOffsetX")&&(t.textShadowOffsetX=e.textShadowOffsetX),ft(e,"textShadowOffsetY")&&(t.textShadowOffsetY=e.textShadowOffsetY))}var gE,yE=_h(),nd={x:1,y:1,scaleX:1,scaleY:1,originX:1,originY:1,rotation:1},mE=(z(nd).join(", "),{color:"fill",borderColor:"stroke"}),vE={symbol:1,symbolSize:1,symbolKeepAspect:1,legendSymbol:1,visualMeta:1,liftZ:1,decal:1},xE="emphasis",_E="normal",af="blur",nd="select",bE=[_E,xE,af,nd],wE={normal:["itemStyle"],emphasis:[xE,"itemStyle"],blur:[af,"itemStyle"],select:[nd,"itemStyle"]},SE={normal:["label"],emphasis:[xE,"label"],blur:[af,"label"],select:[nd,"label"]},ME="e\0\0",IE={normal:{},emphasis:{},blur:{},select:{}},TE={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},CE=new Ee,DE={cartesian2d:function(e){var t=e.master.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:B(aE,e)}}},geo:function(e){var t=e.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:e.getZoom()},api:{coord:function(t){return e.dataToPoint(t)},size:B(sE,e)}}},singleAxis:function(e){var t=e.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:B(lE,e)}}},polar:function(i){var o=i.getRadiusAxis(),r=i.getAngleAxis(),t=o.getExtent();return t[0]>t[1]&&t.reverse(),{coordSys:{type:"polar",cx:i.cx,cy:i.cy,r:t[1],r0:t[0]},api:{coord:function(t){var e=o.dataToRadius(t[0]),n=r.dataToAngle(t[1]),t=i.coordToPoint([e,n]);return t.push(e,n*Math.PI/180),t},size:B(uE,i)}}},calendar:function(n){var t=n.getRect(),e=n.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:n.getCellWidth(),cellHeight:n.getCellHeight(),rangeInfo:{start:e.start,end:e.end,weeks:e.weeks,dayCount:e.allDay}},api:{coord:function(t,e){return n.dataToPoint(t,e)}}}}},af=(l(AE,gE=Fy),AE.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},AE.prototype.getInitialData=function(t,e){return Ib(this.getSource(),this)},AE.prototype.getDataParams=function(t,e,n){e=gE.prototype.getDataParams.call(this,t,e);return n&&(e.info=yE(n).info),e},AE.type="series.custom",AE.dependencies=["grid","polar","geo","singleAxis","calendar"],AE.defaultOption={coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,clip:!1},AE);function AE(){var t=null!==gE&&gE.apply(this,arguments)||this;return t.type=AE.type,t}nf.registerClass(af);var LE,nd=(l(kE,LE=tm),kE.prototype.render=function(o,t,r,a){var s,l=this._data,u=o.getData(),h=this.group,c=KE(o,u,t,r),t=o.__transientTransitionOpt;!t||null!=t.from&&null!=t.to?(s=new hz(o,t),e=t?"multiple":"oneToOne",new B_(l?l.getIndices():[],u.getIndices(),PE(l,e,t&&t.from),PE(u,e,t&&t.to),null,e).add(function(t){$E(r,null,t,c(t,a),o,h,u,null)}).remove(function(t){az(l.getItemGraphicEl(t),o,h)}).update(function(t,e){s.reset("oneToOne");e=l.getItemGraphicEl(e);s.findAndAddFrom(e),s.hasFrom()&&(uz(e,h),e=null),$E(r,e,t,c(t,a),o,h,u,s),s.applyMorphing()}).updateManyToOne(function(t,e){s.reset("manyToOne");for(var n=0;n<e.length;n++){var i=l.getItemGraphicEl(e[n]);s.findAndAddFrom(i),uz(i,h)}$E(r,null,t,c(t,a),o,h,u,s),s.applyMorphing()}).updateOneToMany(function(t,e){s.reset("oneToMany");var n=t.length,e=l.getItemGraphicEl(e);s.findAndAddFrom(e),uz(e,h);for(var i=0;i<n;i++)$E(r,null,t[i],c(t[i],a),o,h,u,s);s.applyMorphing()}).execute()):(l&&l.each(function(t){az(l.getItemGraphicEl(t),o,h)}),u.each(function(t){$E(r,null,t,c(t,a),o,h,u,null)}));var e=o.get("clip",!0)?rM(o.coordinateSystem,!1,o):null;e?h.setClipPath(e):h.removeClipPath(),this._data=u},kE.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll(),this._data=null},kE.prototype.incrementalRender=function(t,e,n,i,o){var r=e.getData(),a=KE(e,r,n,i);function s(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}for(var l=t.start;l<t.end;l++){$E(null,null,l,a(l,o),e,this.group,r,null).traverse(s)}},kE.prototype.filterForExposedEvent=function(t,e,n,i){var o=e.element;if(null==o||n.name===o)return!0;for(;(n=n.__hostTarget||n.parent)&&n!==this.group;)if(n.name===o)return!0;return!1},kE.type="custom",kE);function kE(){var t=null!==LE&&LE.apply(this,arguments)||this;return t.type=kE.type,t}function PE(n,t,e){if(n){if("oneToOne"===t)return function(t,e){return n.getId(e)};var i=n.getDimension(e),e=n.getDimensionInfo(i);e||rh("");var o=e.ordinalMeta;return function(t,e){e=n.get(i,e);return o&&(e=o.categories[e]),null==e||J(e)?t+"":"_ec_"+e}}}function OE(t){var e=t.type;if("path"===e){var n=t.shape,i=null!=n.width&&null!=n.height?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,o=sz(n),n=Yc(o,null,i,n.layout||"center");yE(n).customPathData=o}else if("image"===e)n=new na({}),yE(n).customImagePath=t.style.image;else if("text"===e)n=new vl({});else if("group"===e)n=new $r;else{if("compoundPath"===e)throw new Error('"compoundPath" is not supported yet.');o=Xc(e);o||rh(""),n=new o}return yE(n).customGraphicType=e,n.name=t.name,n.z2EmphasisLift=1,n.z2SelectLift=1,n}function RE(t,e,n,i,o,r,a,s,l,u){var h,c,p={},d={},f=e.isGroup?null:e;n||zE("shape",e,null,o,p,l),BE("shape",o,d),n||zE("extra",e,null,o,p,l),BE("extra",o,d),n||VE(e,null,o,p,l),ZE(h=o,c=d,"position"),ZE(h,c,"scale"),ZE(h,c,"origin"),jE(h,c,"x"),jE(h,c,"y"),jE(h,c,"scaleX"),jE(h,c,"scaleY"),jE(h,c,"originX"),jE(h,c,"originY"),jE(h,c,"rotation");var g,a=a&&a.normal.cfg;return a&&e.setTextConfig(a),"text"===e.type&&r&&(ft(g=r,"textFill")&&(g.fill=g.textFill),ft(g,"textStroke")&&(g.stroke=g.textStroke)),r&&(a=void 0,g=lz(e)?r.decal:null,t&&g&&(g.dirty=!0,a=yx(g,t)),r.__decalPattern=a),n||FE(e,null,o,r,p,l),f&&ft(o,"invisible")&&(f.invisible=o.invisible),n||(NE(e,d,r),EE(e,i,o,s,p,l)),ft(o,"silent")&&(e.silent=o.silent),ft(o,"ignore")&&(e.ignore=o.ignore),u||ft(o,"info")&&(yE(e).info=o.info),r?e.dirty():e.markRedraw(),n?d:null}function NE(t,e,n){var i=t.isGroup?null:t;if(i&&n){var o=n.__decalPattern,r=void 0;o&&(r=n.decal,n.decal=o),i.useStyle(n),o&&(n.decal=r);for(var a=i.animators,s=0;s<a.length;s++){var l=a[s];"style"===l.targetName&&l.changeTarget(i.style)}}e&&t.attr(e)}function EE(t,e,n,i,o,r){o&&(n=n.during,(r?Qc:Jc)(t,o,i,{dataIndex:e,isFrom:!0,during:(yE(t).userDuring=n)?B(XE,{el:t,userDuring:n}):null}))}function zE(t,e,n,i,o,r){var a=i[t];if(a){var s,l,u,h=e[t],c=a.enterFrom;if(r&&c){s=s||(o[t]={});for(var p=z(c),d=0;d<p.length;d++){s[v=p[d]]=c[v]}}if(!r&&h&&(null==n||"shape"!==t))if(a.transition){s=s||(o[t]={});for(var f=lh(a.transition),d=0;d<f.length;d++){var g=h[v=f[d]];0,s[v]=g}}else if(0<=L(i.transition,t)){s=s||(o[t]={});for(var y=z(h),d=0;d<y.length;d++){g=h[v=y[d]];l=a[v],u=g,(k(l)?l!==u:null!=l&&isFinite(l))&&(s[v]=g)}}var m=a.leaveTo;if(m)for(var v,e=GE(e),x=e[t]||(e[t]={}),_=z(m),d=0;d<_.length;d++){x[v=_[d]]=m[v]}}}function BE(t,e,n){var i=e[t];if(i)for(var o=n[t]={},r=z(i),a=0;a<r.length;a++){var s=r[a];o[s]=Mn(i[s])}}function VE(t,e,n,i,o){var r=n.enterFrom;if(o&&r)for(var a=z(r),s=0;s<a.length;s++){0,i[c=a[s]]=r[c]}if(!o)if(e){e=function(t,e){if(!t||t===e||t.parent===e.parent)return t;var n=CE.transform||(CE.transform=be([])),i=t.getComputedTransform();i?we(n,i):be(n);e=e.parent;e&&e.getComputedTransform();return CE.originX=t.originX,CE.originY=t.originY,CE.parent=e,CE.decomposeTransform(),CE}(e,t);qE(i,"x",e),qE(i,"y",e),qE(i,"scaleX",e),qE(i,"scaleY",e),qE(i,"originX",e),qE(i,"originY",e),qE(i,"rotation",e)}else if(n.transition)for(var l,u=lh(n.transition),s=0;s<u.length;s++){"style"!==(c=u[s])&&"shape"!==c&&"extra"!==c&&(l=t[c],i[c]=l)}else qE(i,"x",t),qE(i,"y",t);var h=n.leaveTo;if(h)for(var c,p=GE(t),d=z(h),s=0;s<d.length;s++){0,p[c=d[s]]=h[c]}}function FE(t,e,n,i,o,r){if(i){var a=(e||t).style,s=i.enterFrom;if(r&&s)for(var l=z(s),u=u||(o.style={}),h=0;h<l.length;h++){u[y=l[h]]=s[y]}if(!r&&a)if(i.transition){var c=lh(i.transition);u=u||(o.style={});for(h=0;h<c.length;h++){var p=a[y=c[h]];u[y]=p}}else if(t.getAnimationStyleProps&&0<=L(n.transition,"style")){var n=t.getAnimationStyleProps(),d=n?n.style:null;if(d){u=u||(o.style={});for(var f=z(i),h=0;h<f.length;h++){d[y=f[h]]&&(p=a[y],u[y]=p)}}}var g=i.leaveTo;if(g)for(var y,m=z(g),t=GE(t),v=t.style||(t.style={}),h=0;h<m.length;h++){v[y=m[h]]=g[y]}}}function GE(t){t=yE(t);return t.leaveToProps||(t.leaveToProps={})}tm.registerClass(nd);var HE={},WE={setTransform:function(t,e){return HE.el[t]=e,this},getTransform:function(t){return HE.el[t]},setShape:function(t,e){return(HE.el.shape||(HE.el.shape={}))[t]=e,HE.isShapeDirty=!0,this},getShape:function(t){var e=HE.el.shape;if(e)return e[t]},setStyle:function(t,e){var n=HE.el.style;return n&&(n[t]=e,HE.isStyleDirty=!0),this},getStyle:function(t){var e=HE.el.style;if(e)return e[t]},setExtra:function(t,e){return(HE.el.extra||(HE.el.extra={}))[t]=e,this},getExtra:function(t){var e=HE.el.extra;if(e)return e[t]}};function XE(){var t,e=this.el;e&&(yE(e).userDuring===(t=this.userDuring)?(HE.el=e,HE.isShapeDirty=!1,HE.isStyleDirty=!1,t(WE),HE.isShapeDirty&&e.dirtyShape&&e.dirtyShape(),HE.isStyleDirty&&e.dirtyStyle&&e.dirtyStyle()):this.el=this.userDuring=null)}function YE(t,e,n,i,o){var r=e.isGroup?null:e,e=o&&o[t].cfg;r&&(o=r.ensureState(t),!1===i?(t=r.getState(t))&&(t.style=null):o.style=i||null,e&&(o.textConfig=e),_c(r))}function UE(t,e,n){if(!t.isGroup){var i=t,t=n.currentZ,n=n.currentZLevel;i.z=t,i.zlevel=n;n=e.z2;null!=n&&(i.z2=n||0);for(var o,r,a,s,l=0;l<bE.length;l++)o=i,r=e,a=bE[l],s=void 0,null!=(r=(r=(s=a===_E)?r:ez(r,a))?r.z2:null)&&((s?o:o.ensureState(a)).z2=r||0)}}function ZE(t,e,n,i){t=t[n],n=TE[n];t&&(i?(e[n[0]]=i[n[0]],e[n[1]]=i[n[1]]):(e[n[0]]=t[0],e[n[1]]=t[1]))}function jE(t,e,n,i){null!=t[n]&&(e[n]=(i||t)[n])}function qE(t,e,n){n&&(t[e]=n[e])}function KE(a,s,e,t){var n=a.get("renderItem"),i=a.coordinateSystem,o={};i&&(o=i.prepareCustoms?i.prepareCustoms(i):DE[i.type](i));for(var r,l,u,h,c=A({getWidth:t.getWidth,getHeight:t.getHeight,getZr:t.getZr,getDevicePixelRatio:t.getDevicePixelRatio,value:function(t,e){return null==e&&(e=u),s.get(s.getDimension(t||0),e)},style:function(t,e){0;null==e&&(e=u);var n=s.getItemVisual(e,"style"),i=n&&n.fill,o=n&&n.opacity,r=_(e,_E).getItemStyle();null!=i&&(r.fill=i),null!=o&&(r.opacity=o);n={inheritColor:H(i)?i:"#000"},o=b(e,_E),i=xp(o,null,n,!1,!0);i.text=o.getShallow("show")?tt(a.getFormattedLabel(e,_E),CS(s,e)):null;n=_p(o,n,!1);return S(t,r),r=dE(r,i,n),t&&w(r,t),r.legacy=!0,r},ordinalRawValue:function(t,e){null==e&&(e=u);t=s.getDimensionInfo(t||0);if(!t)return;e=s.get(t.name,e),t=t&&t.ordinalMeta;return t?t.categories[e]:e},styleEmphasis:function(t,e){0;null==e&&(e=u);var n=_(e,xE).getItemStyle(),i=b(e,xE),o=xp(i,null,null,!0,!0);o.text=i.getShallow("show")?et(a.getFormattedLabel(e,xE),a.getFormattedLabel(e,_E),CS(s,e)):null;i=_p(i,null,!0);return S(t,n),n=dE(n,o,i),t&&w(n,t),n.legacy=!0,n},visual:function(t,e){if(null==e&&(e=u),ft(mE,t)){var n=s.getItemVisual(e,"style");return n?n[mE[t]]:null}if(ft(vE,t))return s.getItemVisual(e,t)},barLayout:function(t){if("cartesian2d"===i.type){return function(t){var e=[],n=t.axis;if("category"===n.type){for(var i=n.getBandWidth(),o=0;o<t.count;o++)e.push(A({bandWidth:i,axisKey:"axis0",stackId:Yb+o},t));for(var r=$b(e),a=[],o=0;o<t.count;o++){var s=r.axis0[Yb+o];s.offsetCenter=s.offset+s.width/2,a.push(s)}return a}}(A({axis:i.getBaseAxis()},t))}},currentSeriesIndices:function(){return e.getCurrentSeriesIndices()},font:function(t){return Ip(t,e)}},o.api||{}),p={context:{},seriesId:a.id,seriesName:a.name,seriesIndex:a.seriesIndex,coordSys:o.coordSys,dataInsideLength:s.count(),encode:(r=a.getData(),l={},N(r.dimensions,function(t,e){var n=r.getDimensionInfo(t);n.isExtraCoord||(t=n.coordDim,(l[t]=l[t]||[])[n.coordDimIndex]=e)}),l)},d={},f={},g={},y={},m=0;m<bE.length;m++){var v=bE[m];g[v]=a.getModel(wE[v]),y[v]=a.getModel(SE[v])}function x(t){return t===u?h=h||s.getItemModel(t):s.getItemModel(t)}function _(t,e){return s.hasItemOption?t===u?d[e]||(d[e]=x(t).getModel(wE[e])):x(t).getModel(wE[e]):g[e]}function b(t,e){return s.hasItemOption?t===u?f[e]||(f[e]=x(t).getModel(SE[e])):x(t).getModel(SE[e]):y[e]}return function(t,e){return u=t,h=null,d={},f={},n&&n(A({dataIndexInside:t,dataIndex:s.getRawIndex(t),actionType:e?e.type:null},p),c)};function w(t,e){for(var n in e)ft(e,n)&&(t[n]=e[n])}function S(t,e){t&&(t.textFill&&(e.textFill=t.textFill),t.textPosition&&(e.textPosition=t.textPosition))}}function $E(t,e,n,i,o,r,a,s){if(i)return(e=JE(t,e,n,i,o,r,0,s))&&a.setItemGraphicEl(n,e),Lc(e,i.focus,i.blurScope),e;uz(e,r)}function JE(t,e,n,i,o,r,a,s){var l=-1;e&&QE(e,i)&&(l=r.childrenRef().indexOf(e),e=null);var u=!e;e?e.clearStates():e=OE(i);var h=(yE(e).canMorph=i.morph&&lz(e))&&s&&s.hasFrom(),u=u&&!h;IE.normal.cfg=IE.normal.conOpt=IE.emphasis.cfg=IE.emphasis.conOpt=IE.blur.cfg=IE.blur.conOpt=IE.select.cfg=IE.select.conOpt=null,IE.isLegacy=!1,function(t,e,n,i,o,r){if(t.isGroup)return;tz(n,null,r),tz(n,xE,r);var a=r.normal.conOpt,s=r.emphasis.conOpt,l=r.blur.conOpt,n=r.select.conOpt;if(null!=a||null!=s||null!=n||null!=l){var u=t.getTextContent();if(!1===a)u&&t.removeTextContent();else{a=r.normal.conOpt=a||{type:"text"},u?u.clearStates():(u=OE(a),t.setTextContent(u));t=a&&a.style;RE(null,u,null,e,a,t,null,i,o,!0);for(var h=0;h<bE.length;h++){var c,p=bE[h];p!==_E&&(c=r[p].conOpt,YE(p,u,0,nz(a,c,p),null))}t?u.dirty():u.markRedraw()}}}(e,n,i,o,u,IE),function(t,e,n,i,o){var r=n.clipPath;{!1===r?t&&t.getClipPath()&&t.removeClipPath():r&&((n=t.getClipPath())&&QE(n,r)&&(n=null),n||(n=OE(r),t.setClipPath(n)),RE(null,n,null,e,r,null,null,i,o,!1))}}(e,n,i,o,u);u=RE(t,e,h,n,i,i.style,IE,o,u,!1);h&&s.addTo(e,i,n,u);for(var c=0;c<bE.length;c++){var p=bE[c];p!==_E&&YE(p,e,0,nz(i,ez(i,p),p),IE)}return UE(e,i,o),"group"===i.type&&function(t,e,n,i,o,r){var a=i.children,s=a?a.length:0,l=i.$mergeChildren,i="byName"===l||i.diffChildrenByName,l=!1===l;if(!s&&!i&&!l)return;if(i)return function(t){new B_(t.oldChildren,t.newChildren,iz,iz,t).add(oz).update(oz).remove(rz).execute()}({api:t,oldChildren:e.children()||[],newChildren:a||[],dataIndex:n,seriesModel:o,group:e,morphPreparation:r});l&&e.removeAll();for(var u=0;u<s;u++)a[u]&&JE(t,e.childAt(u),n,a[u],o,e,0,r);for(var h=e.childCount()-1;u<=h;h--)az(e.childAt(h),o,e)}(t,e,n,i,o,s),0<=l?r.replaceAt(e,l):r.add(e),e}function QE(t,e){var n=yE(t),i=e.type,o=e.shape,t=e.style;return null!=i&&i!==n.customGraphicType||"path"===i&&((e=o)&&(ft(e,"pathData")||ft(e,"d")))&&sz(o)!==n.customPathData||"image"===i&&ft(t,"image")&&t.image!==n.customImagePath}function tz(t,e,n){var i,o=e?ez(t,e):t,r=e?nz(t,o,xE):t.style,a=t.type,o=o?o.textConfig:null,t=t.textContent,t=t?e?ez(t,e):t:null;r&&(n.isLegacy||hE(r,a,!!o,!!t))&&(n.isLegacy=!0,i=cE(r,a,!e),!o&&i.textConfig&&(o=i.textConfig),!t&&i.textContent&&(t=i.textContent)),!e&&t&&((i=t).type||(i.type="text"));n=e?n[e]:n.normal;n.cfg=o,n.conOpt=t}function ez(t,e){return e?t?t[e]:null:t}function nz(t,e,n){e=e&&e.style;return null==e&&n===xE&&t&&(e=t.styleEmphasis),e}function iz(t,e){t=t&&t.name;return null!=t?t:ME+e}function oz(t,e){var n=this.context,t=null!=t?n.newChildren[t]:null,e=null!=e?n.oldChildren[e]:null;JE(n.api,e,n.dataIndex,t,n.seriesModel,n.group,0,n.morphPreparation)}function rz(t){var e=this.context;az(e.oldChildren[t],e.seriesModel,e.group)}function az(t,e,n){var i;t&&((i=yE(t).leaveToProps)?Jc(t,i,e,{cb:function(){n.remove(t)}}):n.remove(t))}function sz(t){return t&&(t.pathData||t.d)}function lz(t){return t&&t instanceof Dr}function uz(t,e){t&&e.remove(t)}var hz=(cz.prototype.hasFrom=function(){return!!this._fromList.length},cz.prototype.findAndAddFrom=function(t){if(t&&(yE(t).canMorph&&this._fromList.push(t),t.isGroup))for(var e=t.childrenRef(),n=0;n<e.length;n++)this.findAndAddFrom(e[n])},cz.prototype.addTo=function(t,e,n,i){t&&(this._toList.push(t),this._toElOptionList.push(e),this._toDataIndices.push(n),this._allPropsFinalList.push(i))},cz.prototype.applyMorphing=function(){var t=this._type,e=this._fromList,n=this._toList.length,i=e.length;if(i&&n)if("oneToOne"===t)for(var o=0;o<n;o++)this._oneToOneForSingleTo(o,o);else if("manyToOne"===t)for(var r=Math.max(1,Math.floor(i/n)),o=0,a=0;o<n;o++,a+=r){var s=n<=o+1?i-a:r;this._manyToOneForSingleTo(o,i<=a?null:a,s)}else if("oneToMany"===t)for(var l=Math.max(1,Math.floor(n/i)),u=0,h=0;u<n;u+=l,h++){var c=n<=u+l?n-u:l;this._oneToManyForSingleFrom(u,c,i<=h?null:h)}},cz.prototype._oneToOneForSingleTo=function(t,e){var n,i=this._toList[t],o=this._toElOptionList[t],r=this._toDataIndices[t],a=this._allPropsFinalList[t],s=this._fromList[e],l=this._getOrCreateMorphConfig(r),u=l.duration;s&&Bs(s)?(NE(i,a,o.style),u&&(e=Vs([s],i,l,pz),this._processResultIndividuals(e,t,null))):(zE("shape",i,n=u&&s&&(s!==i||(zs(n=s)||Bs(n)))?s:null,o,s={},!1),zE("extra",i,n,o,s,!1),VE(i,n,o,s,!1),FE(i,n,o,o.style,s,!1),NE(i,a,o.style),n&&Rs(n,i,l),EE(i,r,o,this._seriesModel,s,!1))},cz.prototype._manyToOneForSingleTo=function(t,e,n){var i=this._toList[t],o=this._toElOptionList[t];NE(i,this._allPropsFinalList[t],o.style);o=this._getOrCreateMorphConfig(this._toDataIndices[t]);if(o.duration&&null!=e){for(var r=[],a=e;a<n;a++)r.push(this._fromList[a]);o=Vs(r,i,o,pz);this._processResultIndividuals(o,t,null)}},cz.prototype._oneToManyForSingleFrom=function(t,e,n){for(var i=null==n?null:this._fromList[n],o=this._toList,r=[],a=t;a<e;a++){var s=o[a];NE(s,this._allPropsFinalList[a],this._toElOptionList[a].style),r.push(s)}n=this._getOrCreateMorphConfig(this._toDataIndices[t]);n.duration&&i&&(n=function(t,e,n,i){var o,r,a=e.length,s=n?n.dividingMethod:null,l=!1;Bs(t)&&(r=t.__combiningSubList).length===a?o=r:(o=Ys(t,a,s),l=!0),ot(o.length===a);for(var u=0;u<a;u++)l&&i&&i(t,o[u],!1),Rs(o[u],e[u],n);return{fromIndividuals:o,toIndividuals:e,count:a}}(i,r,n,pz),this._processResultIndividuals(n,t,e))},cz.prototype._processResultIndividuals=function(t,e,n){for(var i=null!=n,o=0;o<t.count;o++){var r=t.fromIndividuals[o],a=t.toIndividuals[o],s=e+(i?o:0),l=this._toElOptionList[s],u=this._toDataIndices[s],s={};VE(a,r,l,s,!1),FE(a,r,l,l.style,s,!1),EE(a,u,l,this._seriesModel,s,!1)}},cz.prototype._getOrCreateMorphConfig=function(t){var e,n=this._morphConfigList,i=n[t];if(i)return i;var o,r,a,s,l=this._seriesModel,u=this._transOpt;return l.isAnimationEnabled()&&(r=void 0,l&&l.ecModel&&(r=(o=l.ecModel.getUpdatePayload())&&o.animation),r?(s=r.duration||0,e=r.easing||"cubicOut",a=r.delay||0):(e=l.get("animationEasingUpdate"),a=G(r=l.get("animationDelayUpdate"))?r(t):r,s=G(l=l.get("animationDurationUpdate"))?l(t):l)),i={duration:s||0,delay:a,easing:e,dividingMethod:u?u.dividingMethod:null},n[t]=i},cz.prototype.reset=function(t){this._type=t,this._fromList.length=this._toList.length=this._toElOptionList.length=this._allPropsFinalList.length=this._toDataIndices.length=0},cz);function cz(t,e){this._fromList=[],this._toList=[],this._toElOptionList=[],this._allPropsFinalList=[],this._toDataIndices=[],this._morphConfigList=[],this._seriesModel=t,this._transOpt=e}function pz(t,e,n){e.style=n?C(t.style):t.style,e.zlevel=t.zlevel,e.z=t.z,e.z2=t.z2}function dz(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function fz(t,e){return e.dim+t.model.componentIndex}var gz,af=(l(yz,gz=nf),yz.prototype.findAxisModel=function(t){var e;return this.ecModel.eachComponent(t,function(t){t.getCoordSysModel()===this&&(e=t)},this),e},yz.type="polar",yz.dependencies=["radiusAxis","angleAxis"],yz.defaultOption={zlevel:0,z:0,center:["50%","50%"],radius:"80%"},yz);function yz(){var t=null!==gz&&gz.apply(this,arguments)||this;return t.type=yz.type,t}nf.registerClass(af);var mz,nd=(l(vz,mz=nf),vz.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Sh).models[0]},vz.type="polarAxis",vz);function vz(){return null!==mz&&mz.apply(this,arguments)||this}I(nd,Ew);var xz,af=(l(_z,xz=nd),_z.type="angleAxis",_z);function _z(){var t=null!==xz&&xz.apply(this,arguments)||this;return t.type=_z.type,t}var bz,nd=(l(wz,bz=nd),wz.type="radiusAxis",wz);function wz(){var t=null!==bz&&bz.apply(this,arguments)||this;return t.type=wz.type,t}MM("angle",af,{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}}),MM("radius",nd,{splitNumber:5});var Sz,Mz=(l(Iz,Sz=mu),Iz.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},Iz);function Iz(t,e){return Sz.call(this,"radius",t,e)||this}Mz.prototype.dataToRadius=mu.prototype.dataToCoord,Mz.prototype.radiusToData=mu.prototype.coordToData;var Tz,Cz=_h(),Dz=(l(Az,Tz=mu),Az.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},Az.prototype.calculateCategoryInterval=function(){var t=this.getLabelModel(),e=this.scale,n=e.getExtent(),i=e.count();if(n[1]-n[0]<1)return 0;var o=n[0],e=this.dataToCoord(o+1)-this.dataToCoord(o),n=Math.abs(e),e=Kn(null==o?"":o+"",t.getFont(),"center","top"),o=Math.max(e.height,7)/n;isNaN(o)&&(o=1/0);t=Math.max(0,Math.floor(o)),e=Cz(this.model),n=e.lastAutoInterval,o=e.lastTickCount;return null!=n&&null!=o&&Math.abs(n-t)<=1&&Math.abs(o-i)<=1&&t<n?t=n:(e.lastTickCount=i,e.lastAutoInterval=t),t},Az);function Az(t,e){return Tz.call(this,"angle",t,e||[0,360])||this}Dz.prototype.dataToAngle=mu.prototype.dataToCoord,Dz.prototype.angleToData=mu.prototype.coordToData;var Lz=(kz.prototype.containPoint=function(t){t=this.pointToCoord(t);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},kz.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},kz.prototype.getAxis=function(t){return this["_"+t+"Axis"]},kz.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},kz.prototype.getAxesByScale=function(t){var e=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===t&&e.push(n),i.scale.type===t&&e.push(i),e},kz.prototype.getAngleAxis=function(){return this._angleAxis},kz.prototype.getRadiusAxis=function(){return this._radiusAxis},kz.prototype.getOtherAxis=function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},kz.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},kz.prototype.getTooltipAxes=function(t){t=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},kz.prototype.dataToPoint=function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},kz.prototype.pointToData=function(t,e){t=this.pointToCoord(t);return[this._radiusAxis.radiusToData(t[0],e),this._angleAxis.angleToData(t[1],e)]},kz.prototype.pointToCoord=function(t){var e=t[0]-this.cx,n=t[1]-this.cy,i=this.getAngleAxis(),t=i.getExtent(),o=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);i.inverse?o=r-360:r=o+360;i=Math.sqrt(e*e+n*n);e/=i,n/=i;for(var a=Math.atan2(-n,e)/Math.PI*180,s=a<o?1:-1;a<o||r<a;)a+=360*s;return[i,a]},kz.prototype.coordToPoint=function(t){var e=t[0],t=t[1]/180*Math.PI;return[Math.cos(t)*e+this.cx,-Math.sin(t)*e+this.cy]},kz.prototype.getArea=function(){var t=this.getAngleAxis(),e=this.getRadiusAxis().getExtent().slice();e[0]>e[1]&&e.reverse();var n=t.getExtent(),i=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:t.inverse,contain:function(t,e){var n=t-this.cx,t=e-this.cy,e=n*n+t*t,n=this.r,t=this.r0;return e<=n*n&&t*t<=e}}},kz.prototype.convertToPixel=function(t,e,n){return Pz(e)===this?this.dataToPoint(n):null},kz.prototype.convertFromPixel=function(t,e,n){return Pz(e)===this?this.pointToData(n):null},kz);function kz(t){this.dimensions=["radius","angle"],this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new Mz,this._angleAxis=new Dz,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}function Pz(t){var e=t.seriesModel,t=t.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function Oz(t,e){var n,i=this,o=i.getAngleAxis(),r=i.getRadiusAxis();o.scale.setExtent(1/0,-1/0),r.scale.setExtent(1/0,-1/0),t.eachSeries(function(t){var e;t.coordinateSystem===i&&(N(Rw(e=t.getData(),"radius"),function(t){r.scale.unionExtentFromData(e,t)}),N(Rw(e,"angle"),function(t){o.scale.unionExtentFromData(e,t)}))}),Cw(o.scale,o.model),Cw(r.scale,r.model),"category"!==o.type||o.onBand||(n=o.getExtent(),t=360/o.scale.count(),o.inverse?n[1]+=t:n[1]-=t,o.setExtent(n[0],n[1]))}function Rz(t,e){var n;t.type=e.get("type"),t.scale=Dw(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),"angleAxis"===e.mainType&&(t.inverse=t.inverse!==e.get("clockwise"),n=e.get("startAngle"),t.setExtent(n,n+(t.inverse?-360:360))),(e.axis=t).model=e}nd={dimensions:Lz.prototype.dimensions,create:function(t,s){var l=[];return t.eachComponent("polar",function(t,e){var n=new Lz(e+"");n.update=Oz;var i=n.getRadiusAxis(),o=n.getAngleAxis(),r=t.findAxisModel("radiusAxis"),a=t.findAxisModel("angleAxis");Rz(i,r),Rz(o,a),e=n,i=s,o=(r=t).get("center"),a=i.getWidth(),i=i.getHeight(),e.cx=Nu(o[0],a),e.cy=Nu(o[1],i),e=e.getRadiusAxis(),i=Math.min(a,i)/2,null==(r=r.get("radius"))?r=[0,"100%"]:F(r)||(r=[0,r]),i=[Nu(r[0],i),Nu(r[1],i)],e.inverse?e.setExtent(i[1],i[0]):e.setExtent(i[0],i[1]),l.push(n),(t.coordinateSystem=n).model=t}),t.eachSeries(function(t){var e;"polar"===t.get("coordinateSystem")&&(e=t.getReferringComponents("polar",Sh).models[0],t.coordinateSystem=e.coordinateSystem)}),l}};Yf.register("polar",nd);var Nz=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Ez(t,e,n){e[1]>e[0]&&(e=e.slice().reverse());var i=t.coordToPoint([e[0],n]),n=t.coordToPoint([e[1],n]);return{x1:i[0],y1:i[1],x2:n[0],y2:n[1]}}function zz(t){return t.getRadiusAxis().inverse?0:1}function Bz(t){var e=t[0],n=t[t.length-1];e&&n&&Math.abs(Math.abs(e.coord-n.coord)-360)<1e-4&&t.pop()}var Vz,nd=(l(Fz,Vz=Op),Fz.prototype.render=function(e,t){var n,i,o,r,a,s;this.group.removeAll(),e.get("show")&&(n=e.axis,i=n.polar,o=i.getRadiusAxis().getExtent(),r=n.getTicksCoords(),a=n.getMinorTicksCoords(),Bz(s=P(n.getViewLabels(),function(t){return(t=C(t)).coord=n.dataToCoord(t.tickValue),t})),Bz(r),N(Nz,function(t){!e.get([t,"show"])||n.scale.isBlank()&&"axisLine"!==t||Gz[t](this.group,e,i,r,a,o,s)},this))},Fz.type="angleAxis",Fz);function Fz(){var t=null!==Vz&&Vz.apply(this,arguments)||this;return t.type=Fz.type,t.axisPointerClass="PolarAxisPointer",t}var Gz={axisLine:function(t,e,n,i,o,r){var a=e.getModel(["axisLine","lineStyle"]),s=zz(n),e=s?0:1,a=0===r[e]?new aa({shape:{cx:n.cx,cy:n.cy,r:r[s]},style:a.getLineStyle(),z2:1,silent:!0}):new $l({shape:{cx:n.cx,cy:n.cy,r:r[s],r0:r[e]},style:a.getLineStyle(),z2:1,silent:!0});a.style.fill=null,t.add(a)},axisTick:function(t,e,n,i,o,r){var a=e.getModel("axisTick"),s=(a.get("inside")?-1:1)*a.get("length"),l=r[zz(n)],i=P(i,function(t){return new Ma({shape:Ez(n,[l,l+s],t.coord)})});t.add(jc(i,{style:A(a.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,n,i,o,r){if(o.length){for(var a=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(a.get("inside")?-1:1)*s.get("length"),u=r[zz(n)],h=[],c=0;c<o.length;c++)for(var p=0;p<o[c].length;p++)h.push(new Ma({shape:Ez(n,[u,u+l],o[c][p].coord)}));t.add(jc(h,{style:A(s.getModel("lineStyle").getLineStyle(),A(a.getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(l,u,h,t,e,c,n){var p=u.getCategories(!0),d=u.getModel("axisLabel"),f=d.get("margin"),g=u.get("triggerEvent");N(n,function(t,e){var n=d,i=t.tickValue,o=c[zz(h)],r=h.coordToPoint([o+f,t.coord]),a=h.cx,s=h.cy,a=Math.abs(r[0]-a)/o<.3?"center":r[0]>a?"left":"right",s=Math.abs(r[1]-s)/o<.3?"middle":r[1]>s?"top":"bottom";p&&p[i]&&(Y(i=p[i])&&i.textStyle&&(n=new Fp(i.textStyle,d,d.ecModel)));a=new vl({silent:AM.isLabelSilent(u),style:xp(n,{x:r[0],y:r[1],fill:n.getTextColor()||u.get(["axisLine","lineStyle","color"]),text:t.formattedLabel,align:a,verticalAlign:s})});l.add(a),g&&((s=AM.makeAxisEventDataBase(u)).targetType="axisLabel",s.value=t.rawLabel,Wh(a).eventData=s)},this)},splitLine:function(t,e,n,i,o,r){for(var a=e.getModel("splitLine").getModel("lineStyle"),s=0,l=(l=a.get("color"))instanceof Array?l:[l],u=[],h=0;h<i.length;h++){var c=s++%l.length;u[c]=u[c]||[],u[c].push(new Ma({shape:Ez(n,r,i[h].coord)}))}for(h=0;h<u.length;h++)t.add(jc(u[h],{style:A({stroke:l[h%l.length]},a.getLineStyle()),silent:!0,z:e.get("z")}))},minorSplitLine:function(t,e,n,i,o,r){if(o.length){for(var a=e.getModel("minorSplitLine").getModel("lineStyle"),s=[],l=0;l<o.length;l++)for(var u=0;u<o[l].length;u++)s.push(new Ma({shape:Ez(n,r,o[l][u].coord)}));t.add(jc(s,{style:a.getLineStyle(),silent:!0,z:e.get("z")}))}},splitArea:function(t,e,n,i,o,r){if(i.length){for(var a=e.getModel("splitArea").getModel("areaStyle"),s=0,l=(l=a.get("color"))instanceof Array?l:[l],u=[],h=Math.PI/180,c=-i[0].coord*h,p=Math.min(r[0],r[1]),d=Math.max(r[0],r[1]),f=e.get("clockwise"),g=1,y=i.length;g<=y;g++){var m=(g===y?i[0]:i[g]).coord,v=s++%l.length;u[v]=u[v]||[],u[v].push(new bs({shape:{cx:n.cx,cy:n.cy,r0:p,r:d,startAngle:c,endAngle:-m*h,clockwise:f},silent:!0})),c=-m*h}for(g=0;g<u.length;g++)t.add(jc(u[g],{style:A({fill:l[g%l.length]},a.getAreaStyle()),silent:!0}))}}};qy.registerClass(nd);var Hz,Wz=["axisLine","axisTickLabel","axisName"],Xz=["splitLine","splitArea","minorSplitLine"],nd=(l(Yz,Hz=Op),Yz.prototype.render=function(e,t){var n,i,o,r,a,s,l,u,h,c,p;this.group.removeAll(),e.get("show")&&(n=this._axisGroup,i=this._axisGroup=new $r,this.group.add(i),o=e.axis,h=(r=o.polar).getAngleAxis(),a=o.getTicksCoords(),s=o.getMinorTicksCoords(),l=h.getExtent()[0],u=o.getExtent(),p=e,c=l,p={position:[(h=r).cx,h.cy],rotation:c/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:p.getModel("axisLabel").get("rotate"),z2:1},p=new AM(e,p),N(Wz,p.add,p),i.add(p.getGroup()),lp(n,i,e),N(Xz,function(t){e.get([t,"show"])&&!o.scale.isBlank()&&Uz[t](this.group,e,r,l,u,a,s)},this))},Yz.type="radiusAxis",Yz);function Yz(){var t=null!==Hz&&Hz.apply(this,arguments)||this;return t.type=Yz.type,t.axisPointerClass="PolarAxisPointer",t}var Uz={splitLine:function(t,e,n,i,o,r){for(var a=e.getModel("splitLine").getModel("lineStyle"),s=0,l=(l=a.get("color"))instanceof Array?l:[l],u=[],h=0;h<r.length;h++){var c=s++%l.length;u[c]=u[c]||[],u[c].push(new aa({shape:{cx:n.cx,cy:n.cy,r:r[h].coord}}))}for(h=0;h<u.length;h++)t.add(jc(u[h],{style:A({stroke:l[h%l.length],fill:null},a.getLineStyle()),silent:!0}))},minorSplitLine:function(t,e,n,i,o,r,a){if(a.length){for(var e=e.getModel("minorSplitLine").getModel("lineStyle"),s=[],l=0;l<a.length;l++)for(var u=0;u<a[l].length;u++)s.push(new aa({shape:{cx:n.cx,cy:n.cy,r:a[l][u].coord}}));t.add(jc(s,{style:A({fill:null},e.getLineStyle()),silent:!0}))}},splitArea:function(t,e,n,i,o,r){if(r.length){for(var a=e.getModel("splitArea").getModel("areaStyle"),s=0,l=(l=a.get("color"))instanceof Array?l:[l],u=[],h=r[0].coord,c=1;c<r.length;c++){var p=s++%l.length;u[p]=u[p]||[],u[p].push(new bs({shape:{cx:n.cx,cy:n.cy,r0:h,r:r[c].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),h=r[c].coord}for(c=0;c<u.length;c++)t.add(jc(u[c],{style:A({fill:l[c%l.length]},a.getAreaStyle()),silent:!0}))}}};Op.registerClass(nd);var Zz,nd=(l(jz,Zz=vm),jz.prototype.makeElOption=function(t,e,n,i,o){var r=n.axis;"angle"===r.dim&&(this.animationThreshold=Math.PI/18);var a,s=r.polar,l=s.getOtherAxis(r).getExtent(),u=r.dataToCoord(e),h=i.get("type");h&&"none"!==h&&(a=wN(i),(c=qz[h](r,s,u,l)).style=a,t.graphicKey=c.type,t.pointer=c);var c=i.get(["label","margin"]);SN(t,n,i,o,function(t,e,n,i){var o=e.axis,r=o.dataToCoord(t),a=n.getAngleAxis().getExtent()[0];a=a/180*Math.PI;var s,t=n.getRadiusAxis().getExtent();{var l,u;u="radius"===o.dim?(Ie(l=_e(),l,a),Me(l,l,[n.cx,n.cy]),s=rp([r,-i],l),l=e.getModel("axisLabel").get("rotate")||0,a=AM.innerTextLayout(a,l*Math.PI/180,-1),l=a.textAlign,a.textVerticalAlign):(t=t[1],s=n.coordToPoint([t+i,r]),r=n.cx,u=n.cy,l=Math.abs(s[0]-r)/t<.3?"center":s[0]>r?"left":"right",Math.abs(s[1]-u)/t<.3?"middle":s[1]>u?"top":"bottom")}return{position:s,align:l,verticalAlign:u}}(e,n,s,c))},jz);function jz(){return null!==Zz&&Zz.apply(this,arguments)||this}var qz={line:function(t,e,n,i){return"angle"===t.dim?{type:"Line",shape:CN(e.coordToPoint([i[0],n]),e.coordToPoint([i[1],n]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:n}}},shadow:function(t,e,n,i){var o=Math.max(1,t.getBandWidth()),r=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:AN(e.cx,e.cy,i[0],i[1],(-n-o/2)*r,(o/2-n)*r)}:{type:"Sector",shape:AN(e.cx,e.cy,n-o/2,n+o/2,0,2*Math.PI)}}};Op.registerAxisPointerClass("PolarAxisPointer",nd),k_(V(function(t,e,n){var L={},k=function(t){var l={};N(t,function(t,e){var n=t.getData(),i=t.coordinateSystem,o=i.getBaseAxis(),r=fz(i,o),a=o.getExtent(),s="category"===o.type?o.getBandWidth():Math.abs(a[1]-a[0])/n.count(),i=l[r]||{bandWidth:s,remainedWidth:s,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},o=i.stacks;l[r]=i;a=dz(t);o[a]||i.autoWidthCount++,o[a]=o[a]||{width:0,maxWidth:0};n=Nu(t.get("barWidth"),s),r=Nu(t.get("barMaxWidth"),s),s=t.get("barGap"),t=t.get("barCategoryGap");n&&!o[a].width&&(n=Math.min(i.remainedWidth,n),o[a].width=n,i.remainedWidth-=n),r&&(o[a].maxWidth=r),null!=s&&(i.gap=s),null!=t&&(i.categoryGap=t)});var c={};return N(l,function(t,n){c[n]={};var e=t.stacks,i=t.bandWidth,i=Nu(t.categoryGap,i),o=Nu(t.gap,1),r=t.remainedWidth,a=t.autoWidthCount,s=(r-i)/(a+(a-1)*o),s=Math.max(s,0);N(e,function(t,e){var n=t.maxWidth;n&&n<s&&(n=Math.min(n,r),t.width&&(n=Math.min(n,t.width)),r-=n,t.width=n,a--)}),s=(r-i)/(a+(a-1)*o),s=Math.max(s,0);var l,u=0;N(e,function(t,e){t.width||(t.width=s),u+=(l=t).width*(1+o)}),l&&(u-=l.width*o);var h=-u/2;N(e,function(t,e){c[n][e]=c[n][e]||{offset:h,width:t.width},h+=t.width*(1+o)})}),c}(R(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(),n=t.coordinateSystem,i=n.getBaseAxis(),o=fz(n,i),r=dz(t),o=k[o][r],a=o.offset,s=o.width,l=n.getOtherAxis(i),u=t.coordinateSystem.cx,h=t.coordinateSystem.cy,c=t.get("barMinHeight")||0,p=t.get("barMinAngle")||0;L[r]=L[r]||[];for(var d=e.mapDimension(l.dim),f=e.mapDimension(i.dim),g=Sb(e,d),y="radius"!==i.dim||!t.get("roundCap",!0),m=l.dataToCoord(0),v=0,x=e.count();v<x;v++){var _=e.get(d,v),b=e.get(f,v),w=0<=_?"p":"n",S=m;g&&(L[r][b]||(L[r][b]={p:m,n:m}),S=L[r][b][w]);var M,I,T=void 0,C=void 0,D=void 0,A=void 0;"radius"===l.dim?(M=l.dataToCoord(_)-m,I=i.dataToCoord(b),Math.abs(M)<c&&(M=(M<0?-1:1)*c),C=(T=S)+M,A=(D=I-a)-s,g&&(L[r][b][w]=C)):(I=l.dataToCoord(_,y)-m,_=i.dataToCoord(b),Math.abs(I)<p&&(I=(I<0?-1:1)*p),C=(T=_+a)+s,A=(D=S)+I,g&&(L[r][b][w]=A)),e.setItemLayout(v,{cx:u,cy:h,r0:T,r:C,startAngle:-D*Math.PI/180,endAngle:-A*Math.PI/180})}}})},"bar")),N_({type:"polar"});var Kz,vm=(l($z,Kz=qy),$z.prototype.init=function(t,e){var n=new _C(e);this._mapDraw=n,this.group.add(n.group),this._api=e},$z.prototype.render=function(t,e,n,i){var o=this._mapDraw;t.get("show")?o.draw(t,e,n,this,i):this._mapDraw.group.removeAll(),o.group.on("click",this._handleRegionClick,this),o.group.silent=t.get("silent"),this._model=t,this.updateSelectStatus(t,e,n)},$z.prototype._handleRegionClick=function(t){for(var e,n=t.target;null==(e=Wh(n).eventData);)n=n.__hostTarget||n.parent;e&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:e.name})},$z.prototype.updateSelectStatus=function(t,e,n){var i=this;this._mapDraw.group.traverse(function(t){var e=Wh(t).eventData;if(e)return i._model.isSelected(e.name)?n.enterSelect(t):n.leaveSelect(t),!0})},$z.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},$z.type="geo",$z);function $z(){var t=null!==Kz&&Kz.apply(this,arguments)||this;return t.type=$z.type,t}qy.registerClass(vm);var Jz,Op=(l(Qz,Jz=nf),Qz.prototype.init=function(t,e,n){Jz.prototype.init.call(this,t,e,n),uh(t,"label",["show"])},Qz.prototype.optionUpdated=function(){var t=this.option,i=this;t.regions=EC.getFilledRegions(t.regions,t.map,t.nameMap);var o={};this._optionModelMap=T(t.regions||[],function(t,e){var n=e.name;return n&&(t.set(n,new Fp(e,i)),e.selected&&(o[n]=!0)),t},ct()),t.selectedMap||(t.selectedMap=o)},Qz.prototype.getRegionModel=function(t){return this._optionModelMap.get(t)||new Fp(null,this,this.ecModel)},Qz.prototype.getFormattedLabel=function(t,e){var n=this.getRegionModel(t),i="normal"===e?n.get(["label","formatter"]):n.get(["emphasis","label","formatter"]),n={name:t};return"function"==typeof i?(n.status=e,i(n)):"string"==typeof i?i.replace("{a}",null!=t?t:""):void 0},Qz.prototype.setZoom=function(t){this.option.zoom=t},Qz.prototype.setCenter=function(t){this.option.center=t},Qz.prototype.select=function(t){var e=this.option,n=e.selectedMode;n&&("multiple"!==n&&(e.selectedMap=null),(e.selectedMap||(e.selectedMap={}))[t]=!0)},Qz.prototype.unSelect=function(t){var e=this.option.selectedMap;e&&(e[t]=!1)},Qz.prototype.toggleSelected=function(t){this[this.isSelected(t)?"unSelect":"select"](t)},Qz.prototype.isSelected=function(t){var e=this.option.selectedMap;return!(!e||!e[t])},Qz.prototype._initSelectedMapFromData=function(){},Qz.type="geo",Qz.layoutMode="box",Qz.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)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},Qz);function Qz(){var t=null!==Jz&&Jz.apply(this,arguments)||this;return t.type=Qz.type,t}function tB(i,t){t.update="geo:updateSelectStatus",A_(t,function(t,e){var n={};return e.eachComponent({mainType:"geo",query:t},function(e){e[i](t.name),N(e.coordinateSystem.regions,function(t){n[t.name]=e.isSelected(t.name)||!1})}),{selected:n,name:t.name}})}nf.registerClass(Op),tB("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),tB("select",{type:"geoSelect",event:"geoselected"}),tB("unSelect",{type:"geoUnSelect",event:"geounselected"});eB.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},eB.prototype.getRangeInfo=function(){return this._rangeInfo},eB.prototype.getModel=function(){return this._model},eB.prototype.getRect=function(){return this._rect},eB.prototype.getCellWidth=function(){return this._sw},eB.prototype.getCellHeight=function(){return this._sh},eB.prototype.getOrient=function(){return this._orient},eB.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},eB.prototype.getDateInfo=function(t){var e=(t=Uu(t)).getFullYear(),n=t.getMonth()+1,i=n<10?"0"+n:""+n,o=t.getDate(),n=o<10?"0"+o:""+o,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}},eB.prototype.getNextNDay=function(t,e){return 0===(e=e||0)||(t=new Date(this.getDateInfo(t).time)).setDate(t.getDate()+e),this.getDateInfo(t)},eB.prototype.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 n=this._rangeInfo.weeks||1,i=["width","height"],o=this._model.getCellSize().slice(),r=this._model.getBoxLayoutParams(),a="horizontal"===this._orient?[n,7]:[7,n];N([0,1],function(t){l(o,t)&&(r[i[t]]=o[t]*a[t])});var e={width:e.getWidth(),height:e.getHeight()},s=this._rect=Yd(r,e);function l(t,e){return null!=t[e]&&"auto"!==t[e]}N([0,1],function(t){l(o,t)||(o[t]=s[i[t]]/a[t])}),this._sw=o[0],this._sh=o[1]},eB.prototype.dataToPoint=function(t,e){F(t)&&(t=t[0]),null==e&&(e=!0);var n=this.getDateInfo(t),i=this._rangeInfo,t=n.formatedDate;if(e&&!(n.time>=i.start.time&&n.time<i.end.time+864e5))return[NaN,NaN];n=n.day,t=this._getRangeInfo([i.start.time,t]).nthWeek;return"vertical"===this._orient?[this._rect.x+n*this._sw+this._sw/2,this._rect.y+t*this._sh+this._sh/2]:[this._rect.x+t*this._sw+this._sw/2,this._rect.y+n*this._sh+this._sh/2]},eB.prototype.pointToData=function(t){t=this.pointToDate(t);return t&&t.time},eB.prototype.dataToRect=function(t,e){e=this.dataToPoint(t,e);return{contentShape:{x:e[0]-(this._sw-this._lineWidth)/2,y:e[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:e,tl:[e[0]-this._sw/2,e[1]-this._sh/2],tr:[e[0]+this._sw/2,e[1]-this._sh/2],br:[e[0]+this._sw/2,e[1]+this._sh/2],bl:[e[0]-this._sw/2,e[1]+this._sh/2]}},eB.prototype.pointToDate=function(t){var e=Math.floor((t[0]-this._rect.x)/this._sw)+1,n=Math.floor((t[1]-this._rect.y)/this._sh)+1,t=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(n,e-1,t):this._getDateByWeeksAndDay(e,n-1,t)},eB.prototype.convertToPixel=function(t,e,n){e=nB(e);return e===this?e.dataToPoint(n):null},eB.prototype.convertFromPixel=function(t,e,n){e=nB(e);return e===this?e.pointToData(n):null},eB.prototype.containPoint=function(t){return console.warn("Not implemented."),!1},eB.prototype._initRangeOption=function(){var t,e,n,i,o=this._model.get("range");if(F(o)&&1===o.length&&(o=o[0]),F(o)?i=o:(t=o.toString(),/^\d{4}$/.test(t)&&(i=[t+"-01-01",t+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(t)&&((n=(e=this.getDateInfo(t)).date).setMonth(n.getMonth()+1),n=this.getNextNDay(n,-1),i=[e.formatedDate,n.formatedDate]),/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(t)&&(i=[t,t])),!i)return o;o=this._getRangeInfo(i);return o.start.time>o.end.time&&i.reverse(),i},eB.prototype._getRangeInfo=function(t){var e,n=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];n[0].time>n[1].time&&(e=!0,n.reverse());var i=Math.floor(n[1].time/864e5)-Math.floor(n[0].time/864e5)+1,o=new Date(n[0].time),r=o.getDate(),a=n[1].date.getDate();o.setDate(r+i-1);var s=o.getDate();if(s!==a)for(var l=0<o.getTime()-n[1].time?1:-1;(s=o.getDate())!==a&&0<(o.getTime()-n[1].time)*l;)i-=l,o.setDate(s-l);t=Math.floor((i+n[0].day+6)/7),r=e?1-t:t-1;return e&&n.reverse(),{range:[n[0].formatedDate,n[1].formatedDate],start:n[0],end:n[1],allDay:i,weeks:t,nthWeek:r,fweek:n[0].day,lweek:n[1].day}},eB.prototype._getDateByWeeksAndDay=function(t,e,n){n=this._getRangeInfo(n);if(t>n.weeks||0===t&&e<n.fweek||t===n.weeks&&e>n.lweek)return null;t=7*(t-1)-n.fweek+e,e=new Date(n.start.time);return e.setDate(+n.start.d+t),this.getDateInfo(e)},eB.create=function(t,e){var n=[];return t.eachComponent("calendar",function(t){var e=new eB(t);n.push(e),t.coordinateSystem=e}),t.eachSeries(function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=n[t.get("calendarIndex")||0])}),n},eB.dimensions=["time","value"],nd=eB;function eB(t,e,n){this.type="calendar",this.dimensions=eB.dimensions,this.getDimensionsInfo=eB.getDimensionsInfo,this._model=t}function nB(t){var e=t.calendarModel,t=t.seriesModel;return e?e.coordinateSystem:t?t.coordinateSystem:null}Yf.register("calendar",nd);var iB,vm=(l(oB,iB=nf),oB.prototype.init=function(t,e,n){var i=qd(t);iB.prototype.init.apply(this,arguments),rB(t,i)},oB.prototype.mergeOption=function(t){iB.prototype.mergeOption.apply(this,arguments),rB(this.option,t)},oB.prototype.getCellSize=function(){return this.option.cellSize},oB.type="calendar",oB.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}},oB);function oB(){var t=null!==iB&&iB.apply(this,arguments)||this;return t.type=oB.type,t}function rB(t,i){var e=t.cellSize,o=F(e)?e:t.cellSize=[e,e];1===o.length&&(o[1]=o[0]);e=P([0,1],function(t){var e,n;return(null!=(e=i)[Hd[n=t][0]]||null!=e[Hd[n][1]]&&null!=e[Hd[n][2]])&&(o[t]="auto"),null!=o[t]&&"auto"!==o[t]});jd(t,i,{type:"box",ignoreSize:e})}nf.registerClass(vm);var aB,sB={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},lB={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]},Op=(l(uB,aB=qy),uB.prototype.render=function(t,e,n){var i=this.group;i.removeAll();var o=t.coordinateSystem,r=o.getRangeInfo(),o=o.getOrient();this._renderDayRect(t,r,i),this._renderLines(t,r,o,i),this._renderYearText(t,r,o,i),this._renderMonthText(t,o,i),this._renderWeekText(t,r,o,i)},uB.prototype._renderDayRect=function(t,e,n){for(var i=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),r=i.getCellWidth(),a=i.getCellHeight(),s=e.start.time;s<=e.end.time;s=i.getNextNDay(s,1).time){var l=i.dataToRect([s],!1).tl,l=new ga({shape:{x:l[0],y:l[1],width:r,height:a},cursor:"default",style:o});n.add(l)}},uB.prototype._renderLines=function(e,t,n,i){var o=this,r=e.coordinateSystem,a=e.getModel(["splitLine","lineStyle"]).getLineStyle(),s=e.get(["splitLine","show"]),l=a.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=t.start,h=0;u.time<=t.end.time;h++){p(u.formatedDate),0===h&&(u=r.getDateInfo(t.start.y+"-"+t.start.m));var c=u.date;c.setMonth(c.getMonth()+1),u=r.getDateInfo(c)}function p(t){o._firstDayOfMonth.push(r.getDateInfo(t)),o._firstDayPoints.push(r.dataToRect([t],!1).tl);t=o._getLinePointsOfOneWeek(e,t,n);o._tlpoints.push(t[0]),o._blpoints.push(t[t.length-1]),s&&o._drawSplitline(t,a,i)}p(r.getNextNDay(t.end.time,1).formatedDate),s&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,l,n),a,i),s&&this._drawSplitline(o._getEdgesPoints(o._blpoints,l,n),a,i)},uB.prototype._getEdgesPoints=function(t,e,n){t=[t[0].slice(),t[t.length-1].slice()],n="horizontal"===n?0:1;return t[0][n]=t[0][n]-e/2,t[1][n]=t[1][n]+e/2,t},uB.prototype._drawSplitline=function(t,e,n){e=new Ra({z2:20,shape:{points:t},style:e});n.add(e)},uB.prototype._getLinePointsOfOneWeek=function(t,e,n){for(var i=t.coordinateSystem,o=i.getDateInfo(e),r=[],a=0;a<7;a++){var s=i.getNextNDay(o.time,a),l=i.dataToRect([s.time],!1);r[2*s.day]=l.tl,r[2*s.day+1]=l["horizontal"===n?"bl":"tr"]}return r},uB.prototype._formatterLabel=function(t,e){return"string"==typeof t&&t?Nd(t,e):"function"==typeof t?t(e):e.nameMap},uB.prototype._yearTextPositionControl=function(t,e,n,i,o){var r=e[0],a=e[1],e=["center","bottom"];"bottom"===i?(a+=o,e=["center","top"]):"left"===i?r-=o:"right"===i?(r+=o,e=["center","top"]):a-=o;o=0;return"left"!==i&&"right"!==i||(o=Math.PI/2),{rotation:o,x:r,y:a,style:{align:e[0],verticalAlign:e[1]}}},uB.prototype._renderYearText=function(t,e,n,i){var o,r,a,s,l,u=t.getModel("yearLabel");u.get("show")&&(o=u.get("margin"),r=(r=u.get("position"))||("horizontal"!==n?"top":"left"),a=((s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]])[0][0]+s[1][0])/2,l=(s[0][1]+s[1][1])/2,s={top:[a,s[t="horizontal"===n?0:1][1]],bottom:[a,s[1-t][1]],left:[s[1-t][0],l],right:[s[t][0],l]},t=e.start.y,+e.end.y>+e.start.y&&(t=t+"-"+e.end.y),l=u.get("formatter"),t={start:e.start.y,end:e.end.y,nameMap:t},t=this._formatterLabel(l,t),(t=new vl({z2:30,style:xp(u,{text:t})})).attr(this._yearTextPositionControl(t,s[r],n,r,o)),i.add(t))},uB.prototype._monthTextPositionControl=function(t,e,n,i,o){var r="left",a="top",s=t[0],t=t[1];return"horizontal"===n?(t+=o,e&&(r="center"),"start"===i&&(a="bottom")):(s+=o,e&&(a="middle"),"start"===i&&(r="right")),{x:s,y:t,align:r,verticalAlign:a}},uB.prototype._renderMonthText=function(t,e,n){var i=t.getModel("monthLabel");if(i.get("show")){var o=i.get("nameMap"),r=i.get("margin"),a=i.get("position"),t=i.get("align"),s=[this._tlpoints,this._blpoints];H(o)&&(o=sB[o.toUpperCase()]||[]);for(var l="start"===a?0:1,u="horizontal"===e?0:1,r="start"===a?-r:r,h="center"===t,c=0;c<s[l].length-1;c++){var p=s[l][c].slice(),d=this._firstDayOfMonth[c];h&&(g=this._firstDayPoints[c],p[u]=(g[u]+s[0][c+1][u])/2);var f=i.get("formatter"),g=o[+d.m-1],g={yyyy:d.y,yy:(d.y+"").slice(2),MM:d.m,M:+d.m,nameMap:g},g=this._formatterLabel(f,g),p=new vl({z2:30,style:O(xp(i,{text:g}),this._monthTextPositionControl(p,h,e,a,r))});n.add(p)}}},uB.prototype._weekTextPositionControl=function(t,e,n,i,o){var r="center",a="middle",s=t[0],t=t[1],n="start"===n;return"horizontal"===e?(s=s+i+(n?1:-1)*o[0]/2,r=n?"right":"left"):(t=t+i+(n?1:-1)*o[1]/2,a=n?"bottom":"top"),{x:s,y:t,align:r,verticalAlign:a}},uB.prototype._renderWeekText=function(t,e,n,i){var o=t.getModel("dayLabel");if(o.get("show")){var r=t.coordinateSystem,a=o.get("position"),s=o.get("nameMap"),l=o.get("margin"),u=r.getFirstDayOfWeek();H(s)&&(s=lB[s.toUpperCase()]||[]);var h=r.getNextNDay(e.end.time,7-e.lweek).time,c=[r.getCellWidth(),r.getCellHeight()],l=Nu(l,c["horizontal"===n?0:1]);"start"===a&&(h=r.getNextNDay(e.start.time,-(7+e.fweek)).time,l=-l);for(var p=0;p<7;p++){var d=r.getNextNDay(h,p),f=r.dataToRect([d.time],!1).center,d=Math.abs((p+u)%7),f=new vl({z2:30,style:O(xp(o,{text:s[d]}),this._weekTextPositionControl(f,n,a,l,c))});i.add(f)}}},uB.type="calendar",uB);function uB(){var t=null!==aB&&aB.apply(this,arguments)||this;return t.type=uB.type,t}qy.registerClass(Op);var hB=_h(),cB={path:null,compoundPath:null,group:$r,image:na,text:vl};C_(function(t){var e=t.graphic;F(e)?e[0]&&e[0].elements?t.graphic=[t.graphic[0]]:t.graphic=[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])});var pB,nd=(l(dB,pB=nf),dB.prototype.mergeOption=function(t,e){var n=this.option.elements;this.option.elements=null,pB.prototype.mergeOption.call(this,t,e),this.option.elements=n},dB.prototype.optionUpdated=function(t,e){var n=this.option,t=(e?n:t).elements,i=n.elements=e?[]:n.elements,n=[];this._flatten(t,n,null);var n=ph(i,n,"normalMerge"),o=this._elOptionsToUpdate=[];N(n,function(t,e){var n=t.newOption;n&&(o.push(n),function(t,e){var n=t.existing;{e.id=t.keyInfo.id,!e.type&&n&&(e.type=n.type),null==e.parentId&&((t=e.parentOption)?e.parentId=t.id:n&&(e.parentId=n.parentId))}e.parentOption=null}(t,n),function(t,e,n){var i=O({},n),o=t[e],r=n.$action||"merge";{"merge"===r?o?(b(o,i,!0),jd(o,i,{ignoreSize:!0}),Kd(n,o)):t[e]=i:"replace"===r?t[e]=i:"remove"===r&&o&&(t[e]=null)}}(i,e,n),function(t,e){if(!t)return;{t.hv=e.hv=[vB(e,["left","right"]),vB(e,["top","bottom"])],"group"===t.type&&(e=e,null==(t=t).width&&(t.width=e.width=0),null==t.height&&(t.height=e.height=0))}}(i[e],n))},this);for(var r=i.length-1;0<=r;r--)null==i[r]?i.splice(r,1):delete i[r].$action},dB.prototype._flatten=function(t,n,i){N(t,function(t){var e;t&&(i&&(t.parentOption=i),n.push(t),e=t.children,"group"===t.type&&e&&this._flatten(e,n,t),delete t.children)},this)},dB.prototype.useElOptionsToUpdate=function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t},dB.type="graphic",dB.defaultOption={elements:[]},dB);function dB(){var t=null!==pB&&pB.apply(this,arguments)||this;return t.type=dB.type,t}nf.registerClass(nd);var fB,vm=(l(gB,fB=qy),gB.prototype.init=function(){this._elMap=ct()},gB.prototype.render=function(t,e,n){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,n)},gB.prototype._updateElements=function(h){var c,p,t=h.useElOptionsToUpdate();t&&(c=this._elMap,p=this.group,N(t,function(t){var e=gh(t.id,null),n=null!=e?c.get(e):null,i=gh(t.parentId,null),o=null!=i?c.get(i):p,r=t.type,a=t.style;"text"===r&&a&&t.hv&&t.hv[1]&&(a.textVerticalAlign=a.textBaseline=a.verticalAlign=a.align=null);var s=t.textContent,i=t.textConfig;a&&hE(a,r,!!i,!!s)&&(u=cE(a,r,!0),!i&&u.textConfig&&(i=t.textConfig=u.textConfig),!s&&u.textContent&&(s=u.textContent));var l,i=(l=O({},l=t),N(["id","parentId","$action","hv","bounding","textContent"].concat(Gd),function(t){delete l[t]}),l);var u=t.$action||"merge";"merge"===u?n?n.attr(i):yB(e,o,i,c):"replace"===u?(mB(n,c),yB(e,o,i,c)):"remove"===u&&mB(n,c);n=c.get(e);n&&s&&("merge"===u?(e=n.getTextContent())?e.attr(s):n.setTextContent(new vl(s)):"replace"===u&&n.setTextContent(new vl(s))),n&&((s=hB(n)).__ecGraphicWidthOption=t.width,s.__ecGraphicHeightOption=t.height,function(t,e,n){var i=Wh(t).eventData;t.silent||t.ignore||i||(i=Wh(t).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name});i&&(i.info=n.info)}(n,h,t))}))},gB.prototype._relocate=function(t,e){for(var n,i,o=t.option.elements,r=this.group,a=this._elMap,s=e.getWidth(),l=e.getHeight(),u=0;u<o.length;u++){(p=null!=(c=gh((h=o[u]).id,null))?a.get(c):null)&&p.isGroup&&(n=(d=p.parent)===r,i=hB(p),f=hB(d),i.__ecGraphicWidth=Nu(i.__ecGraphicWidthOption,n?s:f.__ecGraphicWidth)||0,i.__ecGraphicHeight=Nu(i.__ecGraphicHeightOption,n?l:f.__ecGraphicHeight)||0)}for(var h,c,p,d,f,u=o.length-1;0<=u;u--){(p=null!=(c=gh((h=o[u]).id,null))?a.get(c):null)&&(d=p.parent,f=hB(d),Ud(p,h,d===r?{width:s,height:l}:{width:f.__ecGraphicWidth,height:f.__ecGraphicHeight},null,{hv:h.hv,boundingMode:h.bounding}))}},gB.prototype._clear=function(){var e=this._elMap;e.each(function(t){mB(t,e)}),this._elMap=ct()},gB.prototype.dispose=function(){this._clear()},gB.type="graphic",gB);function gB(){var t=null!==fB&&fB.apply(this,arguments)||this;return t.type=gB.type,t}function yB(t,e,n,i){var o=n.type;o=ft(cB,o)?cB[o]:Xc(o);n=new o(n);e.add(n),i.set(t,n),hB(n).__ecGraphicId=t}function mB(t,e){var n=t&&t.parent;n&&("group"===t.type&&t.traverse(function(t){mB(t,e)}),e.removeKey(hB(t).__ecGraphicId),n.remove(t))}function vB(e,t){var n;return N(t,function(t){null!=e[t]&&"auto"!==e[t]&&(n=!0)}),n}qy.registerClass(vm);function xB(){}var _B={};function bB(t,e){_B[t]=e}function wB(t){return _B[t]}var SB,Op=(l(MB,SB=nf),MB.prototype.optionUpdated=function(){SB.prototype.optionUpdated.apply(this,arguments);var n=this.ecModel;N(this.option.feature,function(t,e){e=wB(e);e&&(e.getDefaultOption&&(e.defaultOption=e.getDefaultOption(n)),b(t,e.defaultOption))})},MB.type="toolbox",MB.layoutMode={type:"box",ignoreSize:!0},MB.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}},MB);function MB(){var t=null!==SB&&SB.apply(this,arguments)||this;return t.type=MB.type,t}function IB(t,e){var n=Cd(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),t=new ga({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1})}nf.registerClass(Op);var TB,nd=(l(CB,TB=qy),CB.prototype.render=function(h,c,p,r){var d,a,s,l,t,e,n,i,o,u,f=this.group;function g(t,e){var n,i=l[t],o=l[e],t=a[i],e=new Fp(t,h,h.ecModel);if(r&&null!=r.newTitle&&r.featureName===i&&(t.title=r.newTitle),i&&!o){if(0===i.indexOf("my"))n={onclick:e.option.onclick,featureName:i};else{t=wB(i);if(!t)return;n=new t}s[i]=n}else if(!(n=s[o]))return;if(n.uid=Wp("toolbox-feature"),n.model=e,n.ecModel=c,n.api=p,n instanceof xB){if(!i&&o)return void(n.dispose&&n.dispose(c,p));if(!e.get("show")||n.unusable)return void(n.remove&&n.remove(c,p))}!function(o,r,t){var e,a,s=o.getModel("iconStyle"),l=o.getModel(["emphasis","iconStyle"]),n=r instanceof xB&&r.getIcons?r.getIcons():o.get("icon"),i=o.get("title")||{};"string"==typeof n?(e={})[t]=n:e=n;"string"==typeof i?(a={})[t]=i:a=i;var u=o.iconPaths={};N(e,function(t,e){var n=hp(t,{},{x:-d/2,y:-d/2,width:d,height:d});n.setStyle(s.getItemStyle()),n.ensureState("emphasis").style=l.getItemStyle();var i=new vl({style:{text:a[e],align:l.get("textAlign"),borderRadius:l.get("textBorderRadius"),padding:l.get("textPadding"),fill:null},ignore:!0});n.setTextContent(i);t=h.getModel("tooltip");t&&t.get("show")&&(n.tooltip=O({content:a[e],formatter:t.get("formatter",!0)||function(){return a[e]},formatterParams:{componentType:"toolbox",name:e,title:a[e],$vars:["name","title"]},position:t.get("position",!0)||"bottom"},t.option)),n.__title=a[e],n.on("mouseover",function(){var t=l.getItemStyle(),e="vertical"===h.get("orient")?null==h.get("right")?"right":"left":null==h.get("bottom")?"bottom":"top";i.setStyle({fill:l.get("textFill")||t.fill||t.stroke||"#000",backgroundColor:l.get("textBackgroundColor")}),n.setTextConfig({position:l.get("textPosition")||e}),i.ignore=!h.get("showTitle"),bc(this)}).on("mouseout",function(){"emphasis"!==o.get(["iconStatus",e])&&wc(this),i.hide()}),("emphasis"===o.get(["iconStatus",e])?bc:wc)(n),f.add(n),n.on("click",B(r.onclick,r,c,p,e)),u[e]=n})}(e,n,i),e.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&("emphasis"===e?bc:wc)(i[t])},n instanceof xB&&n.render&&n.render(e,c,p,r)}f.removeAll(),h.get("show")&&(d=+h.get("itemSize"),a=h.get("feature")||{},s=this._features||(this._features={}),l=[],N(a,function(t,e){l.push(e)}),new B_(this._featureNames||[],l).add(g).update(g).remove(V(g,null)).execute(),this._featureNames=l,t=f,n=p,i=(e=h).getBoxLayoutParams(),o=e.get("padding"),u={width:n.getWidth(),height:n.getHeight()},n=Yd(i,u,o),Xd(e.get("orient"),t,e.get("itemGap"),n.width,n.height),Ud(t,i,u,o),f.add(IB(f.getBoundingRect(),h)),f.eachChild(function(t){var e=t.__title,n=t.ensureState("emphasis"),i=n.textConfig||(n.textConfig={}),o=t.getTextContent(),r=o&&o.states.emphasis;r&&!G(r)&&e&&(n=r.style||(r.style={}),o=Kn(e,vl.makeFont(n)),r=t.x+f.x,e=!1,t.y+f.y+d+o.height>p.getHeight()&&(i.position="top",e=!0),e=e?-5-o.height:d+8,r+o.width/2>p.getWidth()?(i.position=["100%",e],n.align="right"):r-o.width/2<0&&(i.position=[0,e],n.align="left"))}))},CB.prototype.updateView=function(t,e,n,i){N(this._features,function(t){t instanceof xB&&t.updateView&&t.updateView(t.model,e,n,i)})},CB.prototype.remove=function(e,n){N(this._features,function(t){t instanceof xB&&t.remove&&t.remove(e,n)}),this.group.removeAll()},CB.prototype.dispose=function(e,n){N(this._features,function(t){t instanceof xB&&t.dispose&&t.dispose(e,n)})},CB.type="toolbox",CB);function CB(){return null!==TB&&TB.apply(this,arguments)||this}qy.registerClass(nd);var DB,vm=(l(AB,DB=xB),AB.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",o="svg"===e.getZr().painter.getType()?"svg":n.get("type",!0)||"png",e=e.getConnectedDataURL({type:o,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")});if("function"!=typeof MouseEvent||w.browser.ie||w.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var r=atob(e.split(",")[1]),a=r.length,s=new Uint8Array(a);a--;)s[a]=r.charCodeAt(a);t=new Blob([s]);window.navigator.msSaveOrOpenBlob(t,i+"."+o)}else{var l=n.get("lang"),l='<body style="margin:0;"><img src="'+e+'" style="max-width:100%;" title="'+(l&&l[0]||"")+'" /></body>';window.open().document.write(l)}else{l=document.createElement("a");l.download=i+"."+o,l.target="_blank",l.href=e;e=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});l.dispatchEvent(e)}},AB.getDefaultOption=function(t){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocale(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:t.getLocale(["toolbox","saveAsImage","lang"])}},AB);function AB(){return null!==DB&&DB.apply(this,arguments)||this}vm.prototype.unusable=!w.canvasSupported,bB("saveAsImage",vm);var LB,kB="__ec_magicType_stack__",PB=[["line","bar"],["stack"]],Op=(l(OB,LB=xB),OB.prototype.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return N(t.get("type"),function(t){e[t]&&(n[t]=e[t])}),n},OB.getDefaultOption=function(t){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocale(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},OB.prototype.onclick=function(t,e,a){var s,n,l=this.model,i=l.get(["seriesIndex",a]);RB[a]&&(s={series:[]},N(PB,function(t){0<=L(t,a)&&N(t,function(t){l.setIconStatus(t,"normal")})}),l.setIconStatus(a,"emphasis"),t.eachComponent({mainType:"series",query:null==i?null:{seriesIndex:i}},function(t){var e=t.subType,n=t.id,n=RB[a](e,n,t,l);n&&(A(n,t.option),s.series.push(n));n=t.coordinateSystem;if(n&&"cartesian2d"===n.type&&("line"===a||"bar"===a)){n=n.getAxesByScale("ordinal")[0];if(n){var i=n.dim+"Axis",o=t.getReferringComponents(i,Sh).models[0].componentIndex;s[i]=s[i]||[];for(var r=0;r<=o;r++)s[i][o]=s[i][o]||{};s[i][o].boundaryGap="bar"===a}}}),"stack"===a&&(n=b({stack:l.option.title.tiled,tiled:l.option.title.stack},l.option.title)),e.dispatchAction({type:"changeMagicType",currentType:a,newOption:s,newTitle:n,featureName:"magicType"}))},OB);function OB(){return null!==LB&&LB.apply(this,arguments)||this}var RB={line:function(t,e,n,i){if("bar"===t)return b({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(t,e,n,i){if("line"===t)return b({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(t,e,n,i){n=n.get("stack")===kB;if("line"===t||"bar"===t)return i.setIconStatus("stack",n?"normal":"emphasis"),b({id:e,stack:n?"":kB},i.get(["option","stack"])||{},!0)}};A_({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),bB("magicType",Op);var NB=new Array(60).join("-"),EB="\t";function zB(t){var o,r,a,h,t=(o={},r=[],a=[],t.eachRawSeries(function(t){var e,n,i=t.coordinateSystem;i&&("cartesian2d"===i.type||"polar"===i.type)&&"category"===(e=i.getBaseAxis()).type?(n=e.dim+"_"+e.index,o[n]||(o[n]={categoryAxis:e,valueAxis:i.getOtherAxis(e),series:[]},a.push({axisDim:e.dim,axisIndex:e.index})),o[n].series.push(t)):r.push(t)}),{seriesGroupByCategoryAxis:o,other:r,meta:a});return{value:R([(h=[],N(t.seriesGroupByCategoryAxis,function(t,e){var n=t.categoryAxis,i=t.valueAxis.dim,o=[" "].concat(P(t.series,function(t){return t.name})),r=[n.model.getCategories()];N(t.series,function(t){var e=t.getRawData();r.push(t.getRawData().mapArray(e.mapDimension(i),function(t){return t}))});for(var a=[o.join(EB)],s=0;s<r[0].length;s++){for(var l=[],u=0;u<r.length;u++)l.push(r[u][s]);a.push(l.join(EB))}h.push(a.join("\n"))}),h.join("\n\n"+NB+"\n\n")),P(t.other,function(t){var i=t.getRawData(),o=[t.name],r=[];return i.each(i.dimensions,function(){for(var t=arguments.length,e=arguments[t-1],e=i.getName(e),n=0;n<t-1;n++)r[n]=arguments[n];o.push((e?e+EB:"")+r.join(EB))}),o.join("\n")}).join("\n\n"+NB+"\n\n")],function(t){return!!t.replace(/[\n\t\s]/g,"")}).join("\n\n"+NB+"\n\n"),meta:t.meta}}function BB(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var VB,FB=new RegExp("["+EB+"]+","g");function GB(t,o){var t=t.split(new RegExp("\n*"+NB+"\n*","g")),r={series:[]};return N(t,function(t,e){var n,i;0<=(i=t).slice(0,i.indexOf("\n")).indexOf(EB)?(n=function(t){for(var e=t.split(/\n+/g),n=[],i=P(BB(e.shift()).split(FB),function(t){return{name:t,data:[]}}),o=0;o<e.length;o++){var r=BB(e[o]).split(FB);n.push(r.shift());for(var a=0;a<r.length;a++)i[a]&&(i[a].data[o]=r[a])}return{series:i,categories:n}}(t),e=(i=o[e]).axisDim+"Axis",i&&(r[e]=r[e]||[],r[e][i.axisIndex]={data:n.categories},r.series=r.series.concat(n.series))):(n=function(t){for(var e=t.split(/\n+/g),t=BB(e.shift()),n=[],i=0;i<e.length;i++){var o=BB(e[i]);if(o){for(var r,a=o.split(FB),s=void 0,o=!1,s=isNaN(a[0])?(o=!0,r=a[0],a=a.slice(1),n[i]={name:r,value:[]},n[i].value):n[i]=[],l=0;l<a.length;l++)s.push(+a[l]);1===s.length&&(o?n[i].value=s[0]:n[i]=s[0])}}return{name:t,data:n}}(t),r.series.push(n))}),r}function HB(){return null!==VB&&VB.apply(this,arguments)||this}bB("dataView",(l(HB,VB=xB),HB.prototype.onclick=function(t,e){var n=e.getDom(),i=this.model;this._dom&&n.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",o.style.backgroundColor=i.get("backgroundColor")||"#fff";var r=document.createElement("h4"),a=i.get("lang")||[];r.innerHTML=a[0]||i.get("title"),r.style.cssText="margin: 10px 20px;",r.style.color=i.get("textColor");var s=document.createElement("div"),l=document.createElement("textarea");s.style.cssText="display:block;width:100%;overflow:auto;";var u=i.get("optionToContent"),h=i.get("contentToOption"),c=zB(t);"function"==typeof u?"string"==typeof(f=u(e.getOption()))?s.innerHTML=f:j(f)&&s.appendChild(f):(s.appendChild(l),l.readOnly=i.get("readOnly"),l.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",l.style.color=i.get("textColor"),l.style.borderColor=i.get("textareaBorderColor"),l.style.backgroundColor=i.get("textareaColor"),l.value=c.value);var p=c.meta,d=document.createElement("div");d.style.cssText="position:absolute;bottom:0;left:0;right:0;";var t="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",f=document.createElement("div"),c=document.createElement("div");t+=";background-color:"+i.get("buttonColor"),t+=";color:"+i.get("buttonTextColor");var g=this;function y(){n.removeChild(o),g._dom=null}ne(f,"click",y),ne(c,"click",function(){if(null==h&&null!=u||null!=h&&null==u)y();else{var t;try{t="function"==typeof h?h(s,e.getOption()):GB(l.value,p)}catch(t){throw y(),new Error("Data view format error "+t)}t&&e.dispatchAction({type:"changeDataView",newOption:t}),y()}}),f.innerHTML=a[1],c.innerHTML=a[2],c.style.cssText=t,f.style.cssText=t,i.get("readOnly")||d.appendChild(c),d.appendChild(f),o.appendChild(r),o.appendChild(s),o.appendChild(d),s.style.height=n.clientHeight-80+"px",n.appendChild(o),this._dom=o},HB.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},HB.prototype.dispose=function(t,e){this.remove(t,e)},HB.getDefaultOption=function(t){return{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:t.getLocale(["toolbox","dataView","title"]),lang:t.getLocale(["toolbox","dataView","lang"]),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"}},HB)),A_({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,o){var r=[];N(t.newOption.series,function(t){var e,i,n=o.getSeriesByName(t.name)[0];n?(e=n.get("data"),r.push({name:t.name,data:(n=t.data,i=e,P(n,function(t,e){var n=i&&i[e];if(!Y(n)||F(n))return t;Y(t)&&!F(t)||(t={value:t});e=null!=n.name&&null==t.name;return t=A(t,n),e&&delete t.name,t}))})):r.push(O({type:"scatter"},t))}),o.mergeOption(A({series:r},t.newOption))});var WB=["dataToPoint","pointToData"],XB=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],YB=(UB.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,function(t,e,n){(t.coordRanges||(t.coordRanges=[])).push(e),t.coordRange||(t.coordRange=e,e=JB[t.brushType](0,n,e),t.__rangeOffset={offset:tV[t.brushType](e.values,t.range,[1,1]),xyMinMax:e.xyMinMax})}),t},UB.prototype.matchOutputRanges=function(t,i,o){N(t,function(n){var t=this.findTargetInfo(n,i);t&&!0!==t&&N(t.coordSyses,function(t){var e=JB[n.brushType](1,t,n.range);o(n,e.values,t,i)})},this)},UB.prototype.setInputRanges=function(t,i){N(t,function(t){var e,n=this.findTargetInfo(t,i);t.range=t.range||[],n&&!0!==n&&(t.panelId=n.panelId,e=JB[t.brushType](0,n.coordSys,t.coordRange),n=t.__rangeOffset,t.range=n?tV[t.brushType](e.values,n.offset,function(t,e){t=nV(t),e=nV(e),e=[t[0]/e[0],t[1]/e[1]];return isNaN(e[0])&&(e[0]=1),isNaN(e[1])&&(e[1]=1),e}(e.xyMinMax,n.xyMinMax)):e.values)},this)},UB.prototype.makePanelOpts=function(n,i){return P(this._targetInfoList,function(t){var e=t.getPanelRect();return{panelId:t.panelId,defaultBrushType:i?i(t):null,clipPath:cP(e),isTargetByCursor:dP(e,n,t.coordSysModel),getLinearBrushOtherExtent:pP(e)}})},UB.prototype.controlSeries=function(t,e,n){n=this.findTargetInfo(t,n);return!0===n||n&&0<=L(n.coordSyses,e.coordinateSystem)},UB.prototype.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=jB(e,t),o=0;o<n.length;o++){var r=n[o],a=t.panelId;if(a){if(r.panelId===a)return r}else for(var s=0;s<KB.length;s++)if(KB[s](i,r))return r}return!0},UB);function UB(t,e,n){var i=this;this._targetInfoList=[];var o=jB(e,t);N(qB,function(t,e){n&&n.include&&!(0<=L(n.include,e))||t(o,i._targetInfoList)})}function ZB(t){return t[0]>t[1]&&t.reverse(),t}function jB(t,e){return wh(t,e,{includeMainTypes:XB})}var qB={grid:function(t,i){var o=t.xAxisModels,r=t.yAxisModels,t=t.gridModels,e=ct(),a={},s={};(o||r||t)&&(N(o,function(t){t=t.axis.grid.model;e.set(t.id,t),a[t.id]=!0}),N(r,function(t){t=t.axis.grid.model;e.set(t.id,t),s[t.id]=!0}),N(t,function(t){e.set(t.id,t),a[t.id]=!0,s[t.id]=!0}),e.each(function(t){var e=t.coordinateSystem,n=[];N(e.getCartesians(),function(t,e){(0<=L(o,t.getAxis("x").model)||0<=L(r,t.getAxis("y").model))&&n.push(t)}),i.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:n[0],coordSyses:n,getPanelRect:$B.grid,xAxisDeclared:a[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,n){N(t.geoModels,function(t){var e=t.coordinateSystem;n.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:e,coordSyses:[e],getPanelRect:$B.geo})})}},KB=[function(t,e){var n=t.xAxisModel,i=t.yAxisModel,t=t.gridModel;return!t&&n&&(t=n.axis.grid.model),!t&&i&&(t=i.axis.grid.model),t&&t===e.gridModel},function(t,e){t=t.geoModel;return t&&t===e.geoModel}],$B={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(op(t)),e}},JB={lineX:V(QB,0),lineY:V(QB,1),rect:function(t,e,n){var i=e[WB[t]]([n[0][0],n[1][0]]),n=e[WB[t]]([n[0][1],n[1][1]]),n=[ZB([i[0],n[0]]),ZB([i[1],n[1]])];return{values:n,xyMinMax:n}},polygon:function(e,n,t){var i=[[1/0,-1/0],[1/0,-1/0]];return{values:P(t,function(t){t=n[WB[e]](t);return i[0][0]=Math.min(i[0][0],t[0]),i[1][0]=Math.min(i[1][0],t[1]),i[0][1]=Math.max(i[0][1],t[0]),i[1][1]=Math.max(i[1][1],t[1]),t}),xyMinMax:i}}};function QB(t,e,n,i){var o=n.getAxis(["x","y"][t]),r=ZB(P([0,1],function(t){return e?o.coordToData(o.toLocalCoord(i[t])):o.toGlobalCoord(o.dataToCoord(i[t]))})),n=[];return n[t]=r,n[1-t]=[NaN,NaN],{values:r,xyMinMax:n}}var tV={lineX:V(eV,0),lineY:V(eV,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,n,i){return P(t,function(t,e){return[t[0]-i[0]*n[e][0],t[1]-i[1]*n[e][1]]})}};function eV(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function nV(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var iV=N,oV=_h();function rV(t){t=oV(t);return t.snapshots||(t.snapshots=[{}]),t.snapshots}nf.registerSubTypeDefaulter("dataZoom",function(){return"slider"});var aV=["x","y","radius","angle","single"],sV=["cartesian2d","polar","singleAxis"];function lV(t){return t+"Axis"}function uV(t,e){var i,o=ct(),n=[],r=ct();for(t.eachComponent({mainType:"dataZoom",query:e},function(t){r.get(t.uid)||s(t)});i=!1,t.eachComponent("dataZoom",a),i;);function a(t){var n;!r.get(t.uid)&&(n=!1,t.eachTargetAxis(function(t,e){t=o.get(t);t&&t[e]&&(n=!0)}),n)&&(s(t),i=!0)}function s(t){r.set(t.uid,!0),n.push(t),t.eachTargetAxis(function(t,e){(o.get(t)||o.set(t,[]))[e]=!0})}return n}function hV(t){var o=t.ecModel,r={infoList:[],infoMap:ct()};return t.eachTargetAxis(function(t,e){var n,i=o.getComponent(lV(t),e);!i||(n=i.getCoordSysModel())&&(t=n.uid,(e=r.infoMap.get(t))||(e={model:n,axisModels:[]},r.infoList.push(e),r.infoMap.set(t,e)),e.axisModels.push(i))}),r}var cV=(pV.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},pV);function pV(){this.indexList=[],this.indexMap=[]}var dV,nd=(l(fV,dV=nf),fV.prototype.init=function(t,e,n){var i=gV(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this._doInit(i)},fV.prototype.mergeOption=function(t){var e=gV(t);b(this.option,t,!0),b(this.settledOption,e,!0),this._doInit(e)},fV.prototype._doInit=function(t){var n=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var i=this.settledOption;N([["start","startValue"],["end","endValue"]],function(t,e){"value"===this._rangePropMode[e]&&(n[t[0]]=i[t[0]]=null)},this),this._resetTarget()},fV.prototype._resetTarget=function(){var t=this.get("orient",!0),e=this._targetAxisInfoMap=ct();this._fillSpecifiedTargetAxis(e)?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(e,this._orient)),this._noTarget=!0,e.each(function(t){t.indexList.length&&(this._noTarget=!1)},this)},fV.prototype._fillSpecifiedTargetAxis=function(i){var o=!1;return N(aV,function(t){var e,n=this.getReferringComponents(lV(t),Mh);n.specified&&(o=!0,e=new cV,N(n.models,function(t){e.add(t.componentIndex)}),i.set(t,e))},this),o},fV.prototype._fillAutoTargetAxisByOrient=function(r,e){var t,i=this.ecModel,a=!0;function n(t,e){var n,i,o=t[0];o&&((n=new cV).add(o.componentIndex),r.set(e,n),a=!1,"x"!==e&&"y"!==e||(i=o.getReferringComponents("grid",Sh).models[0])&&N(t,function(t){o.componentIndex!==t.componentIndex&&i===t.getReferringComponents("grid",Sh).models[0]&&n.add(t.componentIndex)}))}a&&(t="vertical"===e?"y":"x",n(i.findComponents({mainType:t+"Axis"}),t)),a&&n(i.findComponents({mainType:"singleAxis",filter:function(t){return t.get("orient",!0)===e}}),"single"),a&&N(aV,function(t){var e,n;!a||(e=i.findComponents({mainType:lV(t),filter:function(t){return"category"===t.get("type",!0)}}))[0]&&((n=new cV).add(e[0].componentIndex),r.set(t,n),a=!1)},this)},fV.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(t){e=e||t},this),"y"===e?"vertical":"horizontal"},fV.prototype._setDefaultThrottle=function(t){t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle&&(t=this.ecModel.option,this.option.throttle=t.animation&&0<t.animationDurationUpdate?100:20)},fV.prototype._updateRangeUse=function(i){var o=this._rangePropMode,r=this.get("rangeMode");N([["start","startValue"],["end","endValue"]],function(t,e){var n=null!=i[t[0]],t=null!=i[t[1]];n&&!t?o[e]="percent":!n&&t?o[e]="value":r?o[e]=r[e]:n&&(o[e]="percent")})},fV.prototype.noTarget=function(){return this._noTarget},fV.prototype.getFirstTargetAxisModel=function(){var n;return this.eachTargetAxis(function(t,e){null==n&&(n=this.ecModel.getComponent(lV(t),e))},this),n},fV.prototype.eachTargetAxis=function(n,i){this._targetAxisInfoMap.each(function(t,e){N(t.indexList,function(t){n.call(i,e,t)})})},fV.prototype.getAxisProxy=function(t,e){e=this.getAxisModel(t,e);if(e)return e.__dzAxisProxy},fV.prototype.getAxisModel=function(t,e){var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[e])return this.ecModel.getComponent(lV(t),e)},fV.prototype.setRawRange=function(e){var n=this.option,i=this.settledOption;N([["start","startValue"],["end","endValue"]],function(t){null==e[t[0]]&&null==e[t[1]]||(n[t[0]]=i[t[0]]=e[t[0]],n[t[1]]=i[t[1]]=e[t[1]])},this),this._updateRangeUse(e)},fV.prototype.setCalculatedRange=function(e){var n=this.option;N(["start","startValue","end","endValue"],function(t){n[t]=e[t]})},fV.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},fV.prototype.getValueRange=function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();e=this.findRepresentativeAxisProxy();return e?e.getDataValueWindow():void 0},fV.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var e,n=this._targetAxisInfoMap.keys(),i=0;i<n.length;i++)for(var o=n[i],r=this._targetAxisInfoMap.get(o),a=0;a<r.indexList.length;a++){var s=this.getAxisProxy(o,r.indexList[a]);if(s.hostedBy(this))return s;e=e||s}return e},fV.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},fV.prototype.getOrient=function(){return this._orient},fV.type="dataZoom",fV.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],fV.defaultOption={zlevel:0,z:4,filterMode:"filter",start:0,end:100},fV);function fV(){var t=null!==dV&&dV.apply(this,arguments)||this;return t.type=fV.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=["percent","percent"],t}function gV(e){var n={};return N(["start","end","startValue","endValue","throttle"],function(t){e.hasOwnProperty(t)&&(n[t]=e[t])}),n}var yV,vm=(l(mV,yV=qy),mV.prototype.render=function(t,e,n,i){this.dataZoomModel=t,this.ecModel=e,this.api=n},mV.type="dataZoom",mV);function mV(){var t=null!==yV&&yV.apply(this,arguments)||this;return t.type=mV.type,t}qy.registerClass(vm);var vV,Op=(l(xV,vV=nd),xV.type="dataZoom.select",xV);function xV(){var t=null!==vV&&vV.apply(this,arguments)||this;return t.type=xV.type,t}nf.registerClass(Op);var _V,Op=(l(bV,_V=vm),bV.type="dataZoom.select",bV);function bV(){var t=null!==_V&&_V.apply(this,arguments)||this;return t.type=bV.type,t}qy.registerClass(Op);var wV=N,SV=zu,MV=(IV.prototype.hostedBy=function(t){return this._dataZoomModel===t},IV.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},IV.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},IV.prototype.getTargetSeriesModels=function(){var n=[];return this.ecModel.eachSeries(function(t){var e;e=(e=t).get("coordinateSystem"),0<=L(sV,e)&&(e=lV(this._dimName),(e=t.getReferringComponents(e,Sh).models[0])&&this._axisIndex===e.componentIndex&&n.push(t))},this),n},IV.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},IV.prototype.getMinMaxSpan=function(){return C(this._minMaxSpan)},IV.prototype.calculateDataWindow=function(i){var o,r=this._dataExtent,s=this.getAxisModel().axis.scale,a=this._dataZoomModel.getRangePropMode(),l=[0,100],u=[],h=[];wV(["start","end"],function(t,e){var n=i[t],t=i[t+"Value"];"percent"===a[e]?(null==n&&(n=l[e]),t=s.parse(Ru(n,l,r))):(o=!0,n=Ru(t=null==t?r[e]:s.parse(t),r,l)),h[e]=t,u[e]=n}),SV(h),SV(u);var c=this._minMaxSpan;function t(t,e,n,i,o){var r=o?"Span":"ValueSpan";nk(0,t,n,"all",c["min"+r],c["max"+r]);for(var a=0;a<2;a++)e[a]=Ru(t[a],n,i,!0),o&&(e[a]=s.parse(e[a]))}return o?t(h,u,r,l,!1):t(u,h,l,r,!0),{valueWindow:h,percentWindow:u}},IV.prototype.reset=function(t){var e;t===this._dataZoomModel&&(e=this.getTargetSeriesModels(),this._dataExtent=function(t,e,n){var i=[1/0,-1/0];wV(n,function(t){Nw(i,t.getData(),e)});t=t.getAxisModel(),t=Mw(t.axis.scale,t,i).calculate();return[t.min,t.max]}(this,this._dimName,e),this._updateMinMaxSpan(),t=this.calculateDataWindow(t.settledOption),this._valueWindow=t.valueWindow,this._percentWindow=t.percentWindow,this._setAxisModel())},IV.prototype.filterData=function(t,e){var i,n,o,h;t===this._dataZoomModel&&(i=this._dimName,n=this.getTargetSeriesModels(),o=t.get("filterMode"),h=this._valueWindow,"none"!==o&&wV(n,function(n){var l=n.getData(),u=l.mapDimensionsAll(i);u.length&&("weakFilter"===o?l.filterSelf(function(t){for(var e,n,i,o=0;o<u.length;o++){var r=l.get(u[o],t),a=!isNaN(r),s=r<h[0],r=r>h[1];if(a&&!s&&!r)return!0;a&&(i=!0),s&&(e=!0),r&&(n=!0)}return i&&e&&n}):wV(u,function(t){var e;"empty"===o?n.setData(l=l.map(t,function(t){return(e=t)>=h[0]&&e<=h[1]?t:NaN;var e})):((e={})[t]=h,l.selectRange(e))}),wV(u,function(t){l.setApproximateExtent(h,t)}))}))},IV.prototype._updateMinMaxSpan=function(){var i=this._minMaxSpan={},o=this._dataZoomModel,r=this._dataExtent;wV(["min","max"],function(t){var e=o.get(t+"Span"),n=o.get(t+"ValueSpan");null!=n&&(n=this.getAxisModel().axis.scale.parse(n)),null!=n?e=Ru(r[0]+n,r,[0,100],!0):null!=e&&(n=Ru(e,[0,100],r,!0)-r[0]),i[t+"Span"]=e,i[t+"ValueSpan"]=n},this)},IV.prototype._setAxisModel=function(){var t,e=this.getAxisModel(),n=this._percentWindow,i=this._valueWindow;n&&(t=Fu(i,[0,500]),t=Math.min(t,20),e=e.axis.scale.rawExtentInfo,0!==n[0]&&e.setDeterminedMinMax("min",+i[0].toFixed(t)),100!==n[1]&&e.setDeterminedMinMax("max",+i[1].toFixed(t)),e.freeze())},IV);function IV(t,e,n,i){this._dimName=t,this._axisIndex=e,this.ecModel=i,this._dataZoomModel=n}D_(r.PROCESSOR.FILTER,{getTargetSeries:function(r){function t(o){r.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(t,e){var n=r.getComponent(lV(t),e);o(t,e,n,i)})})}t(function(t,e,n,i){n.__dzAxisProxy=null});var o=[];t(function(t,e,n,i){n.__dzAxisProxy||(n.__dzAxisProxy=new MV(t,e,i,r),o.push(n.__dzAxisProxy))});var e=ct();return N(o,function(t){N(t.getTargetSeriesModels(),function(t){e.set(t.uid,t)})}),e},overallReset:function(t,i){t.eachComponent("dataZoom",function(n){n.eachTargetAxis(function(t,e){n.getAxisProxy(t,e).reset(n)}),n.eachTargetAxis(function(t,e){n.getAxisProxy(t,e).filterData(n,i)})}),t.eachComponent("dataZoom",function(t){var e,n=t.findRepresentativeAxisProxy();n&&(e=n.getDataPercentWindow(),n=n.getDataValueWindow(),t.setCalculatedRange({start:e[0],end:e[1],startValue:n[0],endValue:n[1]}))})}}),A_("dataZoom",function(e,t){N(uV(t,e),function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})});var TV,CV=N,DV=sh+"toolbox-dataZoom_",Op=(l(AV,TV=xB),AV.prototype.render=function(t,e,n,i){this.brushController||(this.brushController=new Pk(n.getZr()),this.brushController.on("brush",B(this._onBrush,this)).mount()),function(t,e,n,i,o){var r=n.isZoomActive;i&&"takeGlobalCursor"===i.type&&(r="dataZoomSelect"===i.key&&i.dataZoomSelectActive);n.isZoomActive=r,t.setIconStatus("zoom",r?"emphasis":"normal");o=new YB(RV(t),e,{include:["grid"]}).makePanelOpts(o,function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"});n.brushController.setPanels(o).enableBrush(!(!r||!o.length)&&{brushType:"auto",brushStyle:t.getModel("brushStyle").getItemStyle()})}(t,e,this,i,n),e=e,t.setIconStatus("back",1<function(t){return rV(t).length}(e)?"emphasis":"normal")},AV.prototype.onclick=function(t,e,n){OV[n].call(this)},AV.prototype.remove=function(t,e){this.brushController.unmount()},AV.prototype.dispose=function(t,e){this.brushController.dispose()},AV.prototype._onBrush=function(t){var s,l,o,r,e=t.areas;function i(t,e,n){var i,o,r,a=e.getAxis(t),e=a.model,t=(i=t,o=e,l.eachComponent({mainType:"dataZoom",subType:"select"},function(t){t.getAxisModel(i,o.componentIndex)&&(r=t)}),r),e=t.findRepresentativeAxisProxy(e).getMinMaxSpan();null==e.minValueSpan&&null==e.maxValueSpan||(n=nk(0,n.slice(),a.scale.getExtent(),0,e.minValueSpan,e.maxValueSpan)),t&&(s[t.id]={dataZoomId:t.id,startValue:n[0],endValue:n[1]})}t.isEnd&&e.length&&(s={},l=this.ecModel,this.brushController.updateCovers([]),new YB(RV(this.model),l,{include:["grid"]}).matchOutputRanges(e,l,function(t,e,n){"cartesian2d"===n.type&&("rect"===(t=t.brushType)?(i("x",n,e[0]),i("y",n,e[1])):i({lineX:"x",lineY:"y"}[t],n,e))}),e=s,r=rV(o=l),iV(e,function(t,e){for(var n,i=r.length-1;0<=i;i--){if(r[i][e])break}i<0&&((n=o.queryComponents({mainType:"dataZoom",subType:"select",id:e})[0])&&(n=n.getPercentRange(),r[0][e]={dataZoomId:e,start:n[0],end:n[1]}))}),r.push(e),this._dispatchZoomAction(s))},AV.prototype._dispatchZoomAction=function(t){var n=[];CV(t,function(t,e){n.push(C(t))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},AV.getDefaultOption=function(t){return{show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocale(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},AV);function AV(){return null!==TV&&TV.apply(this,arguments)||this}var LV,kV,PV,OV={zoom:function(){var t=!this.isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(function(t){var i=rV(t),t=i[i.length-1];1<i.length&&i.pop();var o={};return iV(t,function(t,e){for(var n=i.length-1;0<=n;n--)if(t=i[n][e]){o[e]=t;break}}),o}(this.ecModel))}};function RV(t){t={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return null==t.xAxisIndex&&null==t.xAxisId&&(t.xAxisIndex="all"),null==t.yAxisIndex&&null==t.yAxisId&&(t.yAxisIndex="all"),t}function NV(){return null!==PV&&PV.apply(this,arguments)||this}bB("dataZoom",Op),LV="dataZoom",kV=function(t){var e=t.getComponent("toolbox",0);if(e){var i=e.getModel(["feature","dataZoom"]),o=[],t=wh(t,RV(i));return CV(t.xAxisModels,function(t){return n(t,"xAxis","xAxisIndex")}),CV(t.yAxisModels,function(t){return n(t,"yAxis","yAxisIndex")}),o}function n(t,e,n){t=t.componentIndex,e={type:"select",$fromToolbox:!0,filterMode:i.get("filterMode",!0)||"filter",id:DV+e+t};e[n]=t,o.push(e)}},ot(null==If.get(LV)&&kV),If.set(LV,kV),bB("restore",(l(NV,PV=xB),NV.prototype.onclick=function(t,e){oV(t).snapshots=null,e.dispatchAction({type:"restore",from:this.uid})},NV.getDefaultOption=function(t){return{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:t.getLocale(["toolbox","restore","title"])}},NV)),A_({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var EV,Op=(l(zV,EV=nf),zV.type="tooltip",zV.dependencies=["axisPointer"],zV.defaultOption={zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderColor:"#333",borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},zV);function zV(){var t=null!==EV&&EV.apply(this,arguments)||this;return t.type=zV.type,t}function BV(t){var e=t.get("confine");return null!=e?e:"richText"===t.get("renderMode")}nf.registerClass(Op);var VV=["-ms-","-moz-","-o-","-webkit-",""];function FV(i,t,e){var n,o=[],r=i.get("transitionDuration"),a=i.get("backgroundColor"),s=i.get("shadowBlur"),l=i.get("shadowColor"),u=i.get("shadowOffsetX"),h=i.get("shadowOffsetY"),c=i.getModel("textStyle"),p=Oy(i,"html"),l=u+"px "+h+"px "+s+"px "+l;return o.push("box-shadow:"+l),t&&r&&o.push((n="opacity "+(t=r)/2+"s "+(r="cubic-bezier(0.23, 1, 0.32, 1)")+",visibility "+t/2+"s "+r,e||(n+=",left "+t+"s "+r+",top "+t+"s "+r),P(VV,function(t){return t+"transition:"+n}).join(";"))),a&&(w.canvasSupported?o.push("background-Color:"+a):(o.push("background-Color:#"+ln(a)),o.push("filter:alpha(opacity=70)"))),N(["width","color","radius"],function(t){var e="border-"+t,n=Td(e),n=i.get(n);null!=n&&o.push(e+":"+n+("color"===t?"":"px"))}),o.push(function(n){var i=[],t=n.get("fontSize");(r=n.getTextColor())&&i.push("color:"+r),i.push("font:"+n.getFont()),t&&i.push("line-height:"+Math.round(3*t/2)+"px");var e=n.get("textShadowColor"),o=n.get("textShadowBlur")||0,r=n.get("textShadowOffsetX")||0,t=n.get("textShadowOffsetY")||0;return e&&o&&i.push("text-shadow:"+r+"px "+t+"px "+o+"px "+e),N(["decoration","align"],function(t){var e=n.get(t);e&&i.push("text-"+t+":"+e)}),i.join(";")}(c)),null!=p&&o.push("padding:"+Cd(p).join("px ")+"px"),o.join(";")+";"}function GV(t,e,n,i,o){var r,a,s=e&&e.painter;n?(a=s&&s.getViewportRoot())&&(r=t,n=a,a=document.body,Zt(Ut,n,i,o,!0)&&Zt(r,a,Ut[0],Ut[1])):(t[0]=i,t[1]=o,(s=s&&s.getViewportRootOffset())&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)),t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var HV=(WV.prototype.update=function(t){var e=this._container,n=e.currentStyle||document.defaultView.getComputedStyle(e),e=e.style;"absolute"!==e.position&&"absolute"!==n.position&&(e.position="relative"),t.get("alwaysShowContent")&&this._moveIfResized(),this.el.className=t.get("className")||""},WV.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=this._styleCoord,o=n.offsetHeight/2;e=zd(e),n.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+FV(t,!this._firstShow,this._longHide)+";left:"+i[0]+"px;top:"+(i[1]-o)+"px;border-color: "+e+";"+(t.get("extraCssText")||""),n.style.display=n.innerHTML?"block":"none",n.style.pointerEvents=this._enterable?"auto":"none",this._show=!0,this._firstShow=!1,this._longHide=!1},WV.prototype.setContent=function(t,e,n,i,o){if(null!=t){var r=this.el;if(H(o)&&"item"===n.get("trigger")&&!BV(n)&&(t+=function(t,e,n){if(!H(n)||"inside"===n)return"";e=zd(e);var n=i="left"===(i=n)?"right":"right"===i?"left":"top"===i?"bottom":"top",i="",o="",o=-1<L(["left","right"],n)?(i=n+":-6px;top:50%;","translateY(-50%) rotate("+("left"==n?-225:-45)+"deg)"):(i=n+":-6px;left:50%;","translateX(-50%) rotate("+("top"==n?225:45)+"deg)");return'<div style="'+["position:absolute;width:10px;height:10px;",""+i+(o=P(VV,function(t){return t+"transform:"+o}).join(";"))+";","border-bottom: "+e+" solid 1px;","border-right: "+e+" solid 1px;","background-color: "+t+";","box-shadow: 8px 8px 16px -3px #000;"].join("")+'"></div>'}(n.get("backgroundColor"),i,o)),H(t))r.innerHTML=t;else if(t){r.innerHTML="",F(t)||(t=[t]);for(var a=0;a<t.length;a++)j(t[a])&&t[a].parentNode!==r&&r.appendChild(t[a])}}},WV.prototype.setEnterable=function(t){this._enterable=t},WV.prototype.getSize=function(){var t=this.el;return[t.clientWidth,t.clientHeight]},WV.prototype.moveTo=function(t,e){var n=this._styleCoord;GV(n,this._zr,this._appendToBody,t,e),null!=n[0]&&null!=n[1]&&((e=this.el.style).left=n[0].toFixed(0)+"px",e.top=n[1].toFixed(0)+"px")},WV.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},WV.prototype.hide=function(){var t=this;this.el.style.visibility="hidden",this.el.style.opacity="0",this._show=!1,this._longHideTimeout=setTimeout(function(){return t._longHide=!0},500)},WV.prototype.hideLater=function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(B(this.hide,this),t)):this.hide())},WV.prototype.isShow=function(){return this._show},WV.prototype.dispose=function(){this.el.parentNode.removeChild(this.el)},WV.prototype.getOuterSize=function(){var t,e=this.el.clientWidth,n=this.el.clientHeight;return document.defaultView&&document.defaultView.getComputedStyle&&((t=document.defaultView.getComputedStyle(this.el))&&(e+=parseInt(t.borderLeftWidth,10)+parseInt(t.borderRightWidth,10),n+=parseInt(t.borderTopWidth,10)+parseInt(t.borderBottomWidth,10))),{width:e,height:n}},WV);function WV(t,e,n){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._firstShow=!0,this._longHide=!0,w.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var o=this._zr=e.getZr(),n=this._appendToBody=n&&n.appendToBody;GV(this._styleCoord,o,n,e.getWidth()/2,e.getHeight()/2),(n?document.body:t).appendChild(i),this._container=t;var r=this;i.onmouseenter=function(){r._enterable&&(clearTimeout(r._hideTimeout),r._show=!0),r._inContent=!0},i.onmousemove=function(t){var e;t=t||window.event,r._enterable||(e=o.handler,ee(o.painter.getViewportRoot(),t,!0),e.dispatch("mousemove",t))},i.onmouseleave=function(){r._inContent=!1,r._enterable&&r._show&&r.hideLater(r._hideDelay)}}var XV=(YV.prototype.update=function(t){t.get("alwaysShowContent")&&this._moveIfResized()},YV.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},YV.prototype.setContent=function(t,e,n,i,o){Y(t)&&rh(""),this.el&&this._zr.remove(this.el);var r=n.getModel("textStyle");this.el=new vl({style:{rich:e.richTextStyles,text:t,lineHeight:22,backgroundColor:n.get("backgroundColor"),borderRadius:n.get("borderRadius"),borderWidth:1,borderColor:i,shadowColor:n.get("shadowColor"),shadowBlur:n.get("shadowBlur"),shadowOffsetX:n.get("shadowOffsetX"),shadowOffsetY:n.get("shadowOffsetY"),textShadowColor:r.get("textShadowColor"),textShadowBlur:r.get("textShadowBlur")||0,textShadowOffsetX:r.get("textShadowOffsetX")||0,textShadowOffsetY:r.get("textShadowOffsetY")||0,fill:n.get(["textStyle","color"]),padding:Oy(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),this._zr.add(this.el);var a=this;this.el.on("mouseover",function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0}),this.el.on("mouseout",function(){a._enterable&&a._show&&a.hideLater(a._hideDelay),a._inContent=!1})},YV.prototype.setEnterable=function(t){this._enterable=t},YV.prototype.getSize=function(){var t=this.el,e=this.el.getBoundingRect(),t=ZV(t.style);return[e.width+t.left+t.right,e.height+t.top+t.bottom]},YV.prototype.moveTo=function(t,e){var n,i,o=this.el;o&&(jV(n=this._styleCoord,this._zr,t,e),t=n[0],e=n[1],n=UV((i=o.style).borderWidth||0),i=ZV(i),o.x=t+n+i.left,o.y=e+n+i.top,o.markRedraw())},YV.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},YV.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},YV.prototype.hideLater=function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(B(this.hide,this),t)):this.hide())},YV.prototype.isShow=function(){return this._show},YV.prototype.getOuterSize=function(){var t=this.getSize();return{width:t[0],height:t[1]}},YV.prototype.dispose=function(){this._zr.remove(this.el)},YV);function YV(t){this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._zr=t.getZr(),jV(this._styleCoord,this._zr,t.getWidth()/2,t.getHeight()/2)}function UV(t){return Math.max(0,t)}function ZV(t){var e=UV(t.shadowBlur||0),n=UV(t.shadowOffsetX||0),t=UV(t.shadowOffsetY||0);return{left:UV(e-n),right:UV(e+n),top:UV(e-t),bottom:UV(e+t)}}function jV(t,e,n,i){t[0]=n,t[1]=i,t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var qV,KV=B,$V=N,JV=Nu,QV=new ga({shape:{x:-1,y:-1,width:2,height:2}}),Op=(l(tF,qV=qy),tF.prototype.init=function(t,e){var n;w.node||(t=(n=t.getComponent("tooltip")).get("renderMode"),this._renderMode="auto"===(t=t)?w.domSupported?"html":"richText":t||"html",this._tooltipContent="richText"===this._renderMode?new XV(e):new HV(e.getDom(),e,{appendToBody:n.get("appendToBody",!0)}))},tF.prototype.render=function(t,e,n){w.node||(this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=n,this._alwaysShowContent=t.get("alwaysShowContent"),(n=this._tooltipContent).update(t),n.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow())},tF.prototype._initGlobalListener=function(){var i=this._tooltipModel.get("triggerOn");lN("itemTooltip",this._api,KV(function(t,e,n){"none"!==i&&(0<=i.indexOf(t)?this._tryShow(e,n):"leave"===t&&this._hide(n))},this))},tF.prototype._keepShow=function(){var t,e=this._tooltipModel,n=this._ecModel,i=this._api;null!=this._lastX&&null!=this._lastY&&"none"!==e.get("triggerOn")&&(t=this,clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){i.isDisposed()||t.manuallyShowTip(e,n,i,{x:t._lastX,y:t._lastY,dataByCoordSys:t._lastDataByCoordSys})}))},tF.prototype.manuallyShowTip=function(t,e,n,i){var o,r,a;i.from===this.uid||w.node||(o=nF(i,n),this._ticket="",a=i.dataByCoordSys,i.tooltip&&null!=i.x&&null!=i.y?((r=QV).x=i.x,r.y=i.y,r.update(),r.tooltip=i.tooltip,this._tryShow({offsetX:i.x,offsetY:i.y,target:r},o)):a?this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:a,tooltipOption:i.tooltipOption},o):null!=i.seriesIndex?this._manuallyAxisShowTip(t,e,n,i)||(t=(a=QR(i,e)).point[0],e=a.point[1],null!=t&&null!=e&&this._tryShow({offsetX:t,offsetY:e,position:i.position,target:a.el},o)):null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},o)))},tF.prototype.manuallyHideTip=function(t,e,n,i){var o=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(nF(i,n))},tF.prototype._manuallyAxisShowTip=function(t,e,n,i){var o=i.seriesIndex,r=i.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=o&&null!=r&&null!=a){e=e.getSeriesByIndex(o);if(e)if("axis"===eF([e.getData().getItemModel(r),e,(e.coordinateSystem||{}).model,t]).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:r,position:i.position}),!0}},tF.prototype._tryShow=function(t,e){var n,i=t.target;this._tooltipModel&&(this._lastX=t.offsetX,this._lastY=t.offsetY,(n=t.dataByCoordSys)&&n.length?this._showAxisTooltip(n,t):i&&rx(i,function(t){return null!=Wh(t).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)))},tF.prototype._showOrMove=function(t,e){t=t.get("showDelay");e=B(e,this),clearTimeout(this._showTimout),0<t?this._showTimout=setTimeout(e,t):e()},tF.prototype._showAxisTooltip=function(t,e){var l=this._ecModel,n=this._tooltipModel,i=[e.offsetX,e.offsetY],o=eF([e.tooltipOption,n]),u=this._renderMode,h=[],c=Iy("section",{blocks:[],noHeader:!0}),p=[],d=new Ry;$V(t,function(t){$V(t.dataByAxis,function(i){var o,r,a=l.getComponent(i.axisDim+"Axis",i.axisIndex),s=i.value;a&&null!=s&&(o=MN(s,a.axis,l,i.seriesDataIndices,i.valueLabelOpt),r=Iy("section",{header:o,noHeader:!rt(o),sortBlocks:!0,blocks:[]}),c.blocks.push(r),N(i.seriesDataIndices,function(t){var e=l.getSeriesByIndex(t.seriesIndex),n=t.dataIndexInside,t=e.getDataParams(n);t.axisDim=i.axisDim,t.axisIndex=i.axisIndex,t.axisType=i.axisType,t.axisId=i.axisId,t.axisValue=Lw(a.axis,{value:s}),t.axisValueLabel=o,t.marker=d.makeTooltipMarker("item",zd(t.color),u);n=zg(e.formatTooltip(n,!0,null));n.markupFragment&&r.blocks.push(n.markupFragment),n.markupText&&p.push(n.markupText),h.push(t)}))})}),c.blocks.reverse(),p.reverse();var r=e.position,e=o.get("order"),e=Dy(c,d,u,e,l.get("useUTC"));e&&p.unshift(e);var e="richText"===u?"\n\n":"<br/>",a=p.join(e);this._showOrMove(o,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(o,r,i[0],i[1],this._tooltipContent,h):this._showTooltipContent(o,a,h,Math.random()+"",i[0],i[1],r,null,d)})},tF.prototype._showSeriesItemTooltip=function(t,e,n){var i,o,r,a,s=rx(e,function(t){return null!=Wh(t).dataIndex}),l=this._ecModel,u=Wh(s),h=u.seriesIndex,c=l.getSeriesByIndex(h),p=u.dataModel||c,d=u.dataIndex,e=u.dataType,s=p.getData(e),u=this._renderMode,f=eF([s.getItemModel(d),p,c&&(c.coordinateSystem||{}).model,this._tooltipModel]),c=f.get("trigger");null!=c&&"item"!==c||(i=p.getDataParams(d,e),o=new Ry,i.marker=o.makeTooltipMarker("item",zd(i.color),u),c=zg(p.formatTooltip(d,!1,e)),e=f.get("order"),r=c.markupFragment?Dy(c.markupFragment,o,u,e,l.get("useUTC")):c.markupText,a="item_"+p.name+"_"+d,this._showOrMove(f,function(){this._showTooltipContent(f,r,i,a,t.offsetX,t.offsetY,t.position,t.target,o)}),n({type:"showTip",dataIndexInside:d,dataIndex:s.getRawIndex(d),seriesIndex:h,from:this.uid}))},tF.prototype._showComponentItemTooltip=function(t,e,n){var i=e.tooltip;H(i)&&(i={content:i,formatter:i});var o=new Fp(i,this._tooltipModel,this._ecModel),r=o.get("content"),a=Math.random()+"",s=new Ry;this._showOrMove(o,function(){this._showTooltipContent(o,r,o.get("formatterParams")||{},a,t.offsetX,t.offsetY,t.position,e,s)}),n({type:"showTip",from:this.uid})},tF.prototype._showTooltipContent=function(n,t,i,e,o,r,a,s,l){var u,h,c,p,d;this._ticket="",n.get("showContent")&&n.get("show")&&(u=this._tooltipContent,h=n.get("formatter"),a=a||n.get("position"),p=t,c=this._getNearestPoint([o,r],i,n.get("trigger")),h&&H(h)?(d=n.ecModel.get("useUTC"),p=h,(t=F(i)?i[0]:i)&&t.axisType&&0<=t.axisType.indexOf("time")&&(p=ud(t.axisValue,p,d)),p=Rd(p,i,!0)):G(h)&&(d=KV(function(t,e){t===this._ticket&&(u.setContent(e,l,n,c.color,a),this._updatePosition(n,a,o,r,u,i,s))},this),this._ticket=e,p=h(i,e,d)),u.setContent(p,l,n,c.color,a),u.show(n,c.color),this._updatePosition(n,a,o,r,u,i,s))},tF.prototype._getNearestPoint=function(t,e,n){return"axis"===n||F(e)?{color:"html"===this._renderMode?"#fff":"none"}:F(e)?void 0:{color:e.color||e.borderColor}},tF.prototype._updatePosition=function(t,e,n,i,o,r,a){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u,h=o.getSize(),c=t.get("align"),p=t.get("verticalAlign"),d=a&&a.getBoundingRect().clone();a&&d.applyTransform(a.transform),G(e)&&(e=e([n,i],r,o.el,d,{viewSize:[s,l],contentSize:h.slice()})),F(e)?(n=JV(e[0],s),i=JV(e[1],l)):Y(e)?((r=e).width=h[0],r.height=h[1],n=(r=Yd(r,{width:s,height:l})).x,i=r.y,p=c=null):i=(n=(u=H(e)&&a?function(t,e,n){var i=n[0],o=n[1],r=0,a=0,s=e.width,n=e.height;switch(t){case"inside":r=e.x+s/2-i/2,a=e.y+n/2-o/2;break;case"top":r=e.x+s/2-i/2,a=e.y-o-10;break;case"bottom":r=e.x+s/2-i/2,a=e.y+n+10;break;case"left":r=e.x-i-10-5,a=e.y+n/2-o/2;break;case"right":r=e.x+s+10+5,a=e.y+n/2-o/2}return[r,a]}(e,d,h):function(t,e,n,i,o,r,a){var s=n.getOuterSize(),n=s.width,s=s.height;null!=r&&(i<t+n+r+2?t-=n+r:t+=r);null!=a&&(o<e+s+a?e-=s+a:e+=a);return[t,e]}(n,i,o,s,l,c?null:20,p?null:20))[0],u[1]),c&&(n-=iF(c)?h[0]/2:"right"===c?h[0]:0),p&&(i-=iF(p)?h[1]/2:"bottom"===p?h[1]:0),BV(t)&&(n=(u=(c=n,p=i,h=s,t=l,s=(l=(s=o).getOuterSize()).width,l=l.height,c=Math.min(c+s,h)-s,p=Math.min(p+l,t)-l,c=Math.max(c,0),p=Math.max(p,0),[c,p]))[0],i=u[1]),o.moveTo(n,i)},tF.prototype._updateContentNotChangedOnAxis=function(n){var t=this._lastDataByCoordSys,r=!!t&&t.length===n.length;return r&&$V(t,function(t,e){var t=t.dataByAxis||[],o=(n[e]||{}).dataByAxis||[];(r=r&&t.length===o.length)&&$V(t,function(t,e){var n=o[e]||{},e=t.seriesDataIndices||[],i=n.seriesDataIndices||[];(r=r&&t.value===n.value&&t.axisType===n.axisType&&t.axisId===n.axisId&&e.length===i.length)&&$V(e,function(t,e){e=i[e];r=r&&t.seriesIndex===e.seriesIndex&&t.dataIndex===e.dataIndex})})}),this._lastDataByCoordSys=n,!!r},tF.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},tF.prototype.dispose=function(t,e){w.node||(this._tooltipContent.dispose(),cN("itemTooltip",e))},tF.type="tooltip",tF);function tF(){var t=null!==qV&&qV.apply(this,arguments)||this;return t.type=tF.type,t}function eF(t){for(var e=t.pop();t.length;){var n=t.pop();n&&(n instanceof Fp&&(n=n.get("tooltip",!0)),H(n)&&(n={formatter:n}),e=new Fp(n,e,e.ecModel))}return e}function nF(t,e){return t.dispatchAction||B(e.dispatchAction,e)}function iF(t){return"center"===t||"middle"===t}qy.registerClass(Op),A_({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),A_({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){});var oF=["rect","polygon","keep","clear"];var rF=N;function aF(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return 1}function sF(e,t,o){var r={};return rF(t,function(n){var i=r[n]=(t.prototype.__hidden=t.prototype,new t);function t(){}rF(e[n],function(t,e){jD.isValidType(e)&&(t={type:e,visual:t},o&&o(t,n),i[e]=new jD(t),"opacity"===e&&((t=C(t)).type="colorAlpha",i.__hidden.__alphaForOpacity=new jD(t)))})}),r}function lF(e,n,t){var i;N(t,function(t){n.hasOwnProperty(t)&&aF(n[t])&&(i=!0)}),i&&N(t,function(t){n.hasOwnProperty(t)&&aF(n[t])?e[t]=C(n[t]):delete e[t]})}var uF={lineX:hF(0),lineY:hF(1),rect:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])},rect:function(t,e,n){return t&&n.boundingRect.intersect(t)}},polygon:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])&&Fw(n.range,t[0],t[1])},rect:function(t,e,n){var i=n.range;if(!t||i.length<=1)return!1;var o=t.x,r=t.y,a=t.width,s=t.height,n=i[0];return!!(Fw(i,o,r)||Fw(i,o+a,r)||Fw(i,o,r+s)||Fw(i,o+a,r+s)||Gn.create(t).contain(n[0],n[1])||cp(o,r,o+a,r,i)||cp(o,r,o,r+s,i)||cp(o+a,r,o+a,r+s,i)||cp(o,r+s,o+a,r+s,i))||void 0}}};function hF(i){var o=["x","y"],r=["width","height"];return{point:function(t,e,n){if(t){n=n.range;return cF(t[i],n)}},rect:function(t,e,n){if(t){n=n.range,t=[t[o[i]],t[o[i]]+t[r[i]]];return t[1]<t[0]&&t.reverse(),cF(t[0],n)||cF(t[1],n)||cF(n[0],t)||cF(n[1],t)}}}}function cF(t,e){return e[0]<=t&&t<=e[1]}var pF=["inBrush","outOfBrush"],dF="__ecBrushSelect",fF="__ecInBrushSelectEvent";function gF(e){e.eachComponent({mainType:"brush"},function(t){(t.brushTargetManager=new YB(t.option,e)).setInputRanges(t.areas,e)})}function yF(t,e){var n;t.isDisposed()||((n=t.getZr())[fF]=!0,t.dispatchAction({type:"brushSelect",batch:e}),n[fF]=!1)}function mF(t,e,n,i){for(var o=0,r=e.length;o<r;o++){var a=e[o];if(t.brushSelector(i,n,a.selectors,a))return 1}}P_(r.VISUAL.BRUSH,function(l,t,e){var o,r,u=[];l.eachComponent({mainType:"brush"},function(t){e&&"takeGlobalCursor"===e.type&&t.setBrushOption("brush"===e.key?e.brushOption:{brushType:!1})}),gF(l),l.eachComponent({mainType:"brush"},function(a,t){var y={brushId:a.id,brushIndex:t,brushName:a.name,areas:C(a.areas),selected:[]};u.push(y);var e=a.option,n=e.brushLink,i=[],m=[],v=[],x=!1;t||(o=e.throttleType,r=e.throttleDelay);var s=P(a.areas,function(t){var e,n,i,o=vF[t.brushType],t=A({boundingRect:o?o(t):void 0},t);return t.selectors=(n=(e=t).brushType,i={point:function(t){return uF[n].point(t,i,e)},rect:function(t){return uF[n].rect(t,i,e)}}),t}),_=sF(a.option,pF,function(t){t.mappingMethod="fixed"});function b(t){return"all"===n||i[t]}function w(t){return!!t.length}F(n)&&N(n,function(t){i[t]=1}),l.eachSeries(function(t,e){var n,i,o,r=v[e]=[];"parallel"===t.subType?(i=e,o=(n=t).coordinateSystem,x=x||o.hasAxisBrushed(),b(i)&&o.eachActiveState(n.getData(),function(t,e){"active"===t&&(m[e]=1)})):function(e,t,n){if(!e.brushSelector||function(t,e){t=t.option.seriesIndex;return null!=t&&"all"!==t&&(F(t)?L(t,e)<0:e!==t)}(a,t))return;{var i;N(s,function(t){a.brushTargetManager.controlSeries(t,e,l)&&n.push(t),x=x||w(n)}),b(t)&&w(n)&&(i=e.getData()).each(function(t){mF(e,n,i,t)&&(m[t]=1)})}}(t,e,r)}),l.eachSeries(function(e,t){var n={seriesId:e.id,seriesIndex:t,seriesName:e.name,dataIndex:[]};y.selected.push(n);var s,l,u,h,c,p,d,i=v[t],o=e.getData(),r=b(t)?function(t){return m[t]?(n.dataIndex.push(o.getRawIndex(t)),"inBrush"):"outOfBrush"}:function(t){return mF(e,i,o,t)?(n.dataIndex.push(o.getRawIndex(t)),"inBrush"):"outOfBrush"};function f(t){return Zm(l,p,t)}function g(t,e){qm(l,p,t,e)}function a(t,e){p=null==c?t:e;e=l.getRawDataItem(p);if(!e||!1!==e.visualMap)for(var e=u.call(h,t),n=s[e],i=d[e],o=0,r=i.length;o<r;o++){var a=i[o];n[a]&&n[a].applyVisual(t,f,g)}}(b(t)?x:w(i))&&(s=_,l=o,u=r,d={},N(pF,function(t){var e=jD.prepareVisualTypes(s[t]);d[t]=e}),null==c?l.each(a):l.each([c],a))})}),function(t,e,n,i,o){if(!o)return;o=t.getZr();if(o[fF])return;o[dF]||(o[dF]=yF);cm(o,dF,n,e)(t,i)}(t,o,r,u,e)});var vF={rect:function(t){return xF(t.range)},polygon:function(t){for(var e,n=t.range,i=0,o=n.length;i<o;i++){e=e||[[1/0,-1/0],[1/0,-1/0]];var r=n[i];r[0]<e[0][0]&&(e[0][0]=r[0]),r[0]>e[0][1]&&(e[0][1]=r[0]),r[1]<e[1][0]&&(e[1][0]=r[1]),r[1]>e[1][1]&&(e[1][1]=r[1])}return e&&xF(e)}};function xF(t){return new Gn(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var _F,Op=(l(bF,_F=nf),bF.prototype.optionUpdated=function(t,e){var n=this.option;e||lF(n,t,["inBrush","outOfBrush"]);t=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:"#ddd"},t.hasOwnProperty("liftZ")||(t.liftZ=5)},bF.prototype.setAreas=function(t){t&&(this.areas=P(t,function(t){return wF(this.option,t)},this))},bF.prototype.setBrushOption=function(t){this.brushOption=wF(this.option,t),this.brushType=this.brushOption.brushType},bF.type="brush",bF.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],bF.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},bF);function bF(){var t=null!==_F&&_F.apply(this,arguments)||this;return t.type=bF.type,t.areas=[],t.brushOption={},t}function wF(t,e){return b({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new Fp(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}nf.registerClass(Op);var SF,Op=(l(MF,SF=qy),MF.prototype.init=function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new Pk(e.getZr())).on("brush",B(this._onBrush,this)).mount()},MF.prototype.render=function(t,e,n,i){this.model=t,this._updateController(t,e,n,i)},MF.prototype.updateTransform=function(t,e,n,i){gF(e),this._updateController(t,e,n,i)},MF.prototype.updateVisual=function(t,e,n,i){this.updateTransform(t,e,n,i)},MF.prototype.updateView=function(t,e,n,i){this._updateController(t,e,n,i)},MF.prototype._updateController=function(t,e,n,i){i&&i.$from===t.id||this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},MF.prototype.dispose=function(){this._brushController.dispose()},MF.prototype._onBrush=function(t){var e=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);t.isEnd&&!t.removeOnClick||this.api.dispatchAction({type:"brush",brushId:e,areas:C(n),$from:e}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:e,areas:C(n),$from:e})},MF.type="brush",MF);function MF(){var t=null!==SF&&SF.apply(this,arguments)||this;return t.type=MF.type,t}qy.registerClass(Op),A_({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(t){t.setAreas(e.areas)})}),A_({type:"brushSelect",event:"brushSelected",update:"none"},function(){}),A_({type:"brushEnd",event:"brushEnd",update:"none"},function(){});var IF,TF=["rect","polygon","lineX","lineY","keep","clear"];function CF(){return null!==IF&&IF.apply(this,arguments)||this}bB("brush",(l(CF,IF=xB),CF.prototype.render=function(e,t,n){var i,o,r;t.eachComponent({mainType:"brush"},function(t){i=t.brushType,o=t.brushOption.brushMode||"single",r=r||!!t.areas.length}),this._brushType=i,this._brushMode=o,N(e.get("type",!0),function(t){e.setIconStatus(t,("keep"===t?"multiple"===o:"clear"===t?r:t===i)?"emphasis":"normal")})},CF.prototype.updateView=function(t,e,n){this.render(t,e,n)},CF.prototype.getIcons=function(){var t=this.model,e=t.get("icon",!0),n={};return N(t.get("type",!0),function(t){e[t]&&(n[t]=e[t])}),n},CF.prototype.onclick=function(t,e,n){var i=this._brushType,o=this._brushMode;"clear"===n?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?i:i!==n&&n,brushMode:"keep"===n?"multiple"===o?"single":"multiple":o}})},CF.getDefaultOption=function(t){return{show:!0,type:TF.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocale(["toolbox","brush","title"])}},CF)),C_(function(t,e){var n,i,o,r=lh(t?t.brush:[]);r.length&&(n=[],N(r,function(t){t=t.hasOwnProperty("toolbox")?t.toolbox:[];t instanceof Array&&(n=n.concat(t))}),F(r=t&&t.toolbox)&&(r=r[0]),r||(r={feature:{}},t.toolbox=[r]),(r=(r=(r=r.feature||(r.feature={})).brush||(r.brush={})).type||(r.type=[])).push.apply(r,n),o={},N(i=r,function(t){o[t]=1}),i.length=0,N(o,function(t,e){i.push(e)}),e&&!r.length&&r.push.apply(r,oF))});var DF,Op=(l(AF,DF=nf),AF.type="title",AF.defaultOption={zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},AF);function AF(){var t=null!==DF&&DF.apply(this,arguments)||this;return t.type=AF.type,t.layoutMode={type:"box",ignoreSize:!0},t}nf.registerClass(Op);var LF,Op=(l(kF,LF=qy),kF.prototype.render=function(t,e,n){var i,o,r,a,s,l,u,h,c;this.group.removeAll(),t.get("show")&&(i=this.group,h=t.getModel("textStyle"),a=t.getModel("subtextStyle"),o=t.get("textAlign"),c=tt(t.get("textBaseline"),t.get("textVerticalAlign")),u=(r=new vl({style:xp(h,{text:t.get("text"),fill:h.getTextColor()},{disableBox:!0}),z2:10})).getBoundingRect(),h=t.get("subtext"),a=new vl({style:xp(a,{text:h,fill:a.getTextColor(),y:u.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),s=t.get("link"),l=t.get("sublink"),u=t.get("triggerEvent",!0),r.silent=!s&&!u,a.silent=!l&&!u,s&&r.on("click",function(){Bd(s,"_"+t.get("target"))}),l&&a.on("click",function(){Bd(l,"_"+t.get("subtarget"))}),Wh(r).eventData=Wh(a).eventData=u?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(r),h&&i.add(a),u=i.getBoundingRect(),(h=t.getBoxLayoutParams()).width=u.width,h.height=u.height,n=Yd(h,{width:n.getWidth(),height:n.getHeight()},t.get("padding")),o||("middle"===(o=t.get("left")||t.get("right"))&&(o="center"),"right"===o?n.x+=n.width:"center"===o&&(n.x+=n.width/2)),c||("center"===(c=t.get("top")||t.get("bottom"))&&(c="middle"),"bottom"===c?n.y+=n.height:"middle"===c&&(n.y+=n.height/2),c=c||"top"),i.x=n.x,i.y=n.y,i.markRedraw(),c={align:o,verticalAlign:c},r.setStyle(c),a.setStyle(c),u=i.getBoundingRect(),c=n.margin,(n=t.getItemStyle(["color","opacity"])).fill=t.get("backgroundColor"),n=new ga({shape:{x:u.x-c[3],y:u.y-c[0],width:u.width+c[1]+c[3],height:u.height+c[0]+c[2],r:t.get("borderRadius")},style:n,subPixelOptimize:!0,silent:!0}),i.add(n))},kF.type="title",kF);function kF(){var t=null!==LF&&LF.apply(this,arguments)||this;return t.type=kF.type,t}function PF(t){var e=t.itemStyle||(t.itemStyle={}),e=e.emphasis||(e.emphasis={}),t=t.label||t.label||{},n=t.normal||(t.normal={}),i={normal:1,emphasis:1};N(t,function(t,e){i[e]||OF(n,e)||(n[e]=t)}),e.label&&!OF(t,"emphasis")&&(t.emphasis=e.label,delete e.label)}function OF(t,e){return t.hasOwnProperty(e)}qy.registerClass(Op),nf.registerSubTypeDefaulter("timeline",function(){return"slider"}),A_({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e){var n=e.getComponent("timeline");return n&&null!=t.currentIndex&&(n.setCurrentIndex(t.currentIndex),!n.get("loop",!0)&&n.isIndexMax()&&n.setPlayState(!1)),e.resetOption("timeline",{replaceMerge:n.get("replaceMerge",!0)}),A({currentIndex:n.option.currentIndex},t)}),A_({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){e=e.getComponent("timeline");e&&null!=t.playState&&e.setPlayState(t.playState)});var RF,Op=(l(NF,RF=nf),NF.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),this._initData()},NF.prototype.mergeOption=function(t){RF.prototype.mergeOption.apply(this,arguments),this._initData()},NF.prototype.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},NF.prototype.getCurrentIndex=function(){return this.option.currentIndex},NF.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},NF.prototype.setPlayState=function(t){this.option.autoPlay=!!t},NF.prototype.getPlayState=function(){return!!this.option.autoPlay},NF.prototype._initData=function(){var o,t=this.option,e=t.data||[],t=t.axisType,r=this._names=[];"category"===t?(o=[],N(e,function(t,e){var n,i=gh(ch(t),"");Y(t)?(n=C(t)).value=e:n=e,o.push(n),r.push(i)})):o=e;t={category:"ordinal",time:"time",value:"number"}[t]||"number";(this._data=new db([{name:"value",type:t}],this)).initData(o,r)},NF.prototype.getData=function(){return this._data},NF.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},NF.type="timeline",NF.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:[]},NF);function NF(){var t=null!==RF&&RF.apply(this,arguments)||this;return t.type=NF.type,t.layoutMode="box",t}nf.registerClass(Op);var EF,Op=(l(zF,EF=Op),zF.type="timeline.slider",zF.defaultOption=Xp(Op.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),zF);function zF(){var t=null!==EF&&EF.apply(this,arguments)||this;return t.type=zF.type,t}I(Op,ni.prototype),nf.registerClass(Op);var BF,Op=(l(VF,BF=qy),VF.type="timeline",VF);function VF(){var t=null!==BF&&BF.apply(this,arguments)||this;return t.type=VF.type,t}var FF,GF=(l(HF,FF=mu),HF.prototype.getLabelModel=function(){return this.model.getModel("label")},HF.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")},HF);function HF(t,e,n,i){n=FF.call(this,t,e,n)||this;return n.type=i||"value",n}var WF,XF=Math.PI,YF=_h(),Op=(l(UF,WF=Op),UF.prototype.init=function(t,e){this.api=e},UF.prototype.render=function(e,t,n){var i,o,r;this.model=e,this.api=n,this.ecModel=t,this.group.removeAll(),e.get("show",!0)&&(i=this._layout(e,n),o=this._createGroup("_mainGroup"),n=this._createGroup("_labelGroup"),r=this._axis=this._createAxis(i,e),e.formatTooltip=function(t){return Iy("nameValue",{noName:!0,value:r.scale.getLabel({value:t})})},N(["AxisLine","AxisTick","Control","CurrentPointer"],function(t){this["_render"+t](i,o,r,e)},this),this._renderAxisLabel(i,n,r,e),this._position(i,e)),this._doPlayStop(),this._updateTicksStatus()},UF.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},UF.prototype.dispose=function(){this._clearTimer()},UF.prototype._layout=function(t,e){var n,i,o,r=t.get(["label","position"]),a=t.get("orient"),s=(x=e,Yd((_=t).getBoxLayoutParams(),{width:x.getWidth(),height:x.getHeight()},_.get("padding"))),l=null==r||"auto"===r?"horizontal"===a?s.y+s.height/2<e.getHeight()/2?"-":"+":s.x+s.width/2<e.getWidth()/2?"+":"-":H(r)?{horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[a][r]:r,u={horizontal:"center",vertical:0<=l||"+"===l?"left":"right"},h={horizontal:0<=l||"+"===l?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:XF/2},p="vertical"===a?s.height:s.width,d=t.getModel("controlStyle"),f=d.get("show",!0),g=f?d.get("itemSize"):0,y=f?d.get("itemGap"):0,m=g+y,v=(v=t.get(["label","rotate"])||0)*XF/180,x=d.get("position",!0),_=f&&d.get("showPlayBtn",!0),e=f&&d.get("showPrevBtn",!0),r=f&&d.get("showNextBtn",!0),f=0,d=p;"left"===x||"bottom"===x?(_&&(n=[0,0],f+=m),e&&(i=[f,0],f+=m)):(_&&(n=[d-g,0],d-=m),e&&(i=[0,0],f+=m)),r&&(o=[d-g,0],d-=m);d=[f,d];return t.get("inverse")&&d.reverse(),{viewRect:s,mainLength:p,orient:a,rotation:c[a],labelRotation:v,labelPosOpt:l,labelAlign:t.get(["label","align"])||u[a],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||h[a],playPosition:n,prevBtnPosition:i,nextBtnPosition:o,axisExtent:d,controlSize:g,controlGap:y}},UF.prototype._position=function(t,e){var n=this._mainGroup,i=this._labelGroup,o=t.viewRect;"vertical"===t.orient&&(Me(u=_e(),u,[-(s=o.x),-(l=o.y+o.height)]),Ie(u,u,-XF/2),Me(u,u,[s,l]),(o=o.clone()).applyTransform(u));var r=p(o),a=p(n.getBoundingRect()),s=p(i.getBoundingRect()),l=[n.x,n.y],u=[i.x,i.y];u[0]=l[0]=r[0][0];var h,o=t.labelPosOpt;function c(t){t.originX=r[0][0]-t.x,t.originY=r[1][0]-t.y}function p(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function d(t,e,n,i,o){t[i]+=n[i][o]-e[i][o]}null==o||H(o)?(d(l,a,r,1,h="+"===o?0:1),d(u,s,r,1,1-h)):(d(l,a,r,1,h=0<=o?0:1),u[1]=l[1]+o),n.setPosition(l),i.setPosition(u),n.rotation=i.rotation=t.rotation,c(n),c(i)},UF.prototype._createAxis=function(t,e){var n=e.getData(),i=e.get("axisType"),o=function(t,e){if(e=e||t.get("type"))switch(e){case"category":return new Vb({ordinalMeta:t.getCategories(),extent:[1/0,-1/0]});case"time":return new ow({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new Wb}}(e,i);o.getTicks=function(){return n.mapArray(["value"],function(t){return{value:t}})};var r=n.getDataExtent("value");o.setExtent(r[0],r[1]),o.niceTicks();i=new GF("value",o,t.axisExtent,i);return i.model=e,i},UF.prototype._createGroup=function(t){t=this[t]=new $r;return this.group.add(t),t},UF.prototype._renderAxisLine=function(t,e,n,i){var o=n.getExtent();i.get(["lineStyle","show"])&&(n=new Ma({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:O({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}),e.add(n),i=this._progressLine=new Ma({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:A({lineCap:"round",lineWidth:n.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1}),e.add(i))},UF.prototype._renderAxisTick=function(t,a,s,l){var u=this,h=l.getData(),e=s.scale.getTicks();this._tickSymbols=[],N(e,function(t){var e=s.dataToCoord(t.value),n=h.getItemModel(t.value),i=n.getModel("itemStyle"),o=n.getModel(["emphasis","itemStyle"]),r=n.getModel(["progress","itemStyle"]),e={x:e,y:0,onclick:B(u._changeTimeline,u,t.value)},e=ZF(n,i,a,e);e.ensureState("emphasis").style=o.getItemStyle(),e.ensureState("progress").style=r.getItemStyle(),Lc(e);r=Wh(e);n.get("tooltip")?(r.dataIndex=t.value,r.dataModel=l):r.dataIndex=r.dataModel=null,u._tickSymbols.push(e)})},UF.prototype._renderAxisLabel=function(a,s,l,t){var u,h=this;l.getLabelModel().get("show")&&(u=t.getData(),t=l.getViewLabels(),this._tickLabels=[],N(t,function(t){var e=t.tickValue,n=u.getItemModel(e),i=n.getModel("label"),o=n.getModel(["emphasis","label"]),r=n.getModel(["progress","label"]),n=l.dataToCoord(t.tickValue),t=new vl({x:n,y:0,rotation:a.labelRotation-a.rotation,onclick:B(h._changeTimeline,h,e),silent:!1,style:xp(i,{text:t.formattedLabel,align:a.labelAlign,verticalAlign:a.labelBaseline})});t.ensureState("emphasis").style=xp(o),t.ensureState("progress").style=xp(r),s.add(t),Lc(t),YF(t).dataIndex=e,h._tickLabels.push(t)}))},UF.prototype._renderControl=function(t,r,e,a){var s=t.controlSize,l=t.rotation,u=a.getModel("controlStyle").getItemStyle(),h=a.getModel(["emphasis","controlStyle"]).getItemStyle(),n=a.getPlayState(),i=a.get("inverse",!0);function o(t,e,n,i){var o;t&&(o=ti(tt(a.get(["controlStyle",e+"BtnSize"]),s),s),(n=function(t,e,n,i){var o=i.style,n=hp(t.get(["controlStyle",e]),i||{},new Gn(n[0],n[1],n[2],n[3]));o&&n.setStyle(o);return n}(a,e+"Icon",[0,-o/2,o,o],{position:t,origin:[s/2,0],rotation:i?-l:0,rectHover:!0,style:u,onclick:n})).ensureState("emphasis").style=h,r.add(n),Lc(n))}o(t.nextBtnPosition,"next",B(this._changeTimeline,this,i?"-":"+")),o(t.prevBtnPosition,"prev",B(this._changeTimeline,this,i?"+":"-")),o(t.playPosition,n?"stop":"play",B(this._handlePlayClick,this,!n),!0)},UF.prototype._renderCurrentPointer=function(t,e,n,i){var o=i.getData(),r=i.getCurrentIndex(),a=o.getItemModel(r).getModel("checkpointStyle"),s=this,o={onCreate:function(t){t.draggable=!0,t.drift=B(s._handlePointerDrag,s),t.ondragend=B(s._handlePointerDragend,s),jF(t,s._progressLine,r,n,i,!0)},onUpdate:function(t){jF(t,s._progressLine,r,n,i)}};this._currentPointer=ZF(a,a,this._mainGroup,{},this._currentPointer,o)},UF.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},UF.prototype._handlePointerDrag=function(t,e,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},UF.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},UF.prototype._pointerChangeTimeline=function(t,e){var n=this._toAxisCoord(t)[0],t=zu(this._axis.getExtent().slice());n>t[1]&&(n=t[1]),n<t[0]&&(n=t[0]),this._currentPointer.x=n,this._currentPointer.markRedraw(),this._progressLine.shape.x2=n,this._progressLine.dirty();t=this._findNearestTick(n),n=this.model;(e||t!==n.getCurrentIndex()&&n.get("realtime"))&&this._changeTimeline(t)},UF.prototype._doPlayStop=function(){var e=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var t=e.model;e._changeTimeline(t.getCurrentIndex()+(t.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},UF.prototype._toAxisCoord=function(t){return rp(t,this._mainGroup.getLocalTransform(),!0)},UF.prototype._findNearestTick=function(n){var i,t=this.model.getData(),o=1/0,r=this._axis;return t.each(["value"],function(t,e){t=r.dataToCoord(t),t=Math.abs(t-n);t<o&&(o=t,i=e)}),i},UF.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},UF.prototype._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})},UF.prototype._updateTicksStatus=function(){var t=this.model.getCurrentIndex(),e=this._tickSymbols,n=this._tickLabels;if(e)for(var i=0;i<e.length;i++)e&&e[i]&&e[i].toggleState("progress",i<t);if(n)for(i=0;i<n.length;i++)n&&n[i]&&n[i].toggleState("progress",YF(n[i]).dataIndex<=t)},UF.type="timeline.slider",UF);function UF(){var t=null!==WF&&WF.apply(this,arguments)||this;return t.type=UF.type,t}function ZF(t,e,n,i,o,r){var a=e.get("color");o?(o.setColor(a),n.add(o),r&&r.onUpdate(o)):((o=px(t.get("symbol"),-1,-1,2,2,a)).setStyle("strokeNoScale",!0),n.add(o),r&&r.onCreate(o));r=e.getItemStyle(["color"]);o.setStyle(r),i=b({rectHover:!0,z2:100},i,!0);e=(e=t.get("symbolSize"))instanceof Array?e.slice():[+e,+e];i.scaleX=e[0]/2,i.scaleY=e[1]/2;r=t.get("symbolOffset");r&&(i.x=i.x||0,i.y=i.y||0,i.x+=Nu(r[0],e[0]),i.y+=Nu(r[1],e[1]));t=t.get("symbolRotate");return i.rotation=(t||0)*Math.PI/180||0,o.attr(i),o.updateTransform(),o}function jF(t,e,n,i,o,r){var a;t.dragging||(a=o.getModel("checkpointStyle"),n=i.dataToCoord(o.getData().get("value",n)),r||!a.get("animation",!0)?(t.attr({x:n,y:0}),e&&e.attr({shape:{x2:n}})):(a={duration:a.get("animationDuration",!0),easing:a.get("animationEasing",!0)},t.stopAnimation(null,!0),t.animateTo({x:n,y:0},a),e&&e.animateTo({shape:{x2:n}},a)))}function qF(t){uh(t,"label",["show"])}qy.registerClass(Op),C_(function(t){F(t=t&&t.timeline)||(t=t?[t]:[]),N(t,function(t){t&&function(t){var e=t.type,n={number:"value",time:"time"};n[e]&&(t.axisType=n[e],delete t.type);{PF(t),OF(t,"controlPosition")&&(OF(e=t.controlStyle||(t.controlStyle={}),"position")||(e.position=t.controlPosition),"none"!==e.position||OF(e,"show")||(e.show=!1,delete e.position),delete t.controlPosition)}N(t.data||[],function(t){Y(t)&&!F(t)&&(!OF(t,"value")&&OF(t,"name")&&(t.value=t.name),PF(t))})}(t)})});var KF,$F=_h(),JF=(l(QF,KF=nf),QF.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),this._mergeOption(t,n,!1,!0)},QF.prototype.isAnimationEnabled=function(){if(w.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},QF.prototype.mergeOption=function(t,e){this._mergeOption(t,e,!1,!1)},QF.prototype._mergeOption=function(t,i,e,o){var r=this.mainType;e||i.eachSeries(function(t){var e=t.get(this.mainType,!0),n=$F(t)[r];e&&e.data?(n?n._mergeOption(e,i,!0):(o&&qF(e),N(e.data,function(t){t instanceof Array?(qF(t[0]),qF(t[1])):qF(t)}),O(n=this.createMarkerModelFromSeries(e,this,i),{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),n.__hostSeries=t),$F(t)[r]=n):$F(t)[r]=null},this)},QF.prototype.formatTooltip=function(t,e,n){var i=this.getData(),o=this.getRawValue(t),t=i.getName(t);return Iy("section",{header:this.name,blocks:[Iy("nameValue",{name:t,value:o,noName:!t,noValue:null==o})]})},QF.prototype.getData=function(){return this._data},QF.prototype.setData=function(t){this._data=t},QF.getMarkerModelFromSeries=function(t,e){return $F(t)[e]},QF.type="marker",QF.dependencies=["series","grid","polar","geo"],QF);function QF(){var t=null!==KF&&KF.apply(this,arguments)||this;return t.type=QF.type,t.createdBySelf=!1,t}I(JF,ni.prototype);var tG,Op=(l(eG,tG=JF),eG.prototype.createMarkerModelFromSeries=function(t,e,n){return new eG(t,e,n)},eG.type="markPoint",eG.defaultOption={zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},eG);function eG(){var t=null!==tG&&tG.apply(this,arguments)||this;return t.type=eG.type,t}function nG(t,e,n,i,o,r){var a=[],s=Sb(e,i)?e.getCalculationInfo("stackResultDimension"):i,t=lG(e,s,t),t=e.indicesOfNearest(s,t)[0];a[o]=e.get(n,t),a[r]=e.get(s,t);s=e.get(i,t),t=Bu(e.get(i,t));return 0<=(t=Math.min(t,20))&&(a[r]=+a[r].toFixed(t)),[a,s]}nf.registerClass(Op);var iG={min:V(nG,"min"),max:V(nG,"max"),average:V(nG,"average"),median:V(nG,"median")};function oG(t,e){var n=t.getData(),i=t.coordinateSystem;if(e&&(r=e,isNaN(parseFloat(r.x))||isNaN(parseFloat(r.y)))&&!F(e.coord)&&i){var o=i.dimensions,r=rG(e,n,i,t);if((e=C(e)).type&&iG[e.type]&&r.baseAxis&&r.valueAxis){i=L(o,r.baseAxis.dim),t=L(o,r.valueAxis.dim),t=iG[e.type](n,r.baseDataDim,r.valueDataDim,i,t);e.coord=t[0],e.value=t[1]}else{for(var a=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],s=0;s<2;s++)iG[a[s]]&&(a[s]=lG(n,n.mapDimension(o[s]),a[s]));e.coord=a}}return e}function rG(t,e,n,i){var o={};return null!=t.valueIndex||null!=t.valueDim?(o.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,o.valueAxis=n.getAxis(function(t,e){var n=t.getData(),i=n.dimensions;e=n.getDimension(e);for(var o=0;o<i.length;o++){var r=n.getDimensionInfo(i[o]);if(r.name===e)return r.coordDim}}(i,o.valueDataDim)),o.baseAxis=n.getOtherAxis(o.valueAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim)):(o.baseAxis=i.getBaseAxis(),o.valueAxis=n.getOtherAxis(o.baseAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim),o.valueDataDim=e.mapDimension(o.valueAxis.dim)),o}function aG(t,e){return!(t&&t.containData&&e.coord&&(n=e,isNaN(parseFloat(n.x))&&isNaN(parseFloat(n.y))))||t.containData(e.coord);var n}function sG(t,e,n,i){return i<2?t.coord&&t.coord[i]:t.value}function lG(t,e,n){if("average"!==n)return"median"===n?t.getMedian(e):t.getDataExtent(e)["max"===n?1:0];var i=0,o=0;return t.each(e,function(t,e){isNaN(t)||(i+=t,o++)}),i/o}var uG,hG=_h(),ni=(l(cG,uG=qy),cG.prototype.init=function(){this.markerGroupMap=ct()},cG.prototype.render=function(t,n,i){var o=this,e=this.markerGroupMap;e.each(function(t){hG(t).keep=!1}),n.eachSeries(function(t){var e=JF.getMarkerModelFromSeries(t,o.type);e&&o.renderSeries(t,e,n,i)}),e.each(function(t){hG(t).keep||o.group.remove(t.group)})},cG.prototype.markKeep=function(t){hG(t).keep=!0},cG.prototype.blurSeries=function(t){var e=this;N(t,function(t){t=JF.getMarkerModelFromSeries(t,e.type);t&&t.getData().eachItemGraphicEl(function(t){t&&Sc(t)})})},cG.type="marker",cG);function cG(){var t=null!==uG&&uG.apply(this,arguments)||this;return t.type=cG.type,t}function pG(a,s,l){var u=s.coordinateSystem;a.each(function(t){var e,n,i=a.getItemModel(t),o=Nu(i.get("x"),l.getWidth()),r=Nu(i.get("y"),l.getHeight());isNaN(o)||isNaN(r)?s.getMarkerPosition?n=s.getMarkerPosition(a.getValues(a.dimensions,t)):u&&(e=a.get(u.dimensions[0],t),i=a.get(u.dimensions[1],t),n=u.dataToPoint([e,i])):n=[o,r],isNaN(o)||(n[0]=o),isNaN(r)||(n[1]=r),a.setItemLayout(t,n)})}var dG,Op=(l(fG,dG=ni),fG.prototype.updateTransform=function(t,e,n){e.eachSeries(function(t){var e=JF.getMarkerModelFromSeries(t,"markPoint");e&&(pG(e.getData(),t,n),this.markerGroupMap.get(t.id).updateLayout())},this)},fG.prototype.renderSeries=function(t,s,e,n){var i=t.coordinateSystem,o=t.id,l=t.getData(),r=this.markerGroupMap,o=r.get(o)||r.set(o,new ES),u=function(t,e,n){i=t?P(t&&t.dimensions,function(t){return A({name:t},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})}):[{name:"value",type:"float"}];var i=new db(i,n),n=P(n.get("data"),V(oG,e));t&&(n=R(n,V(aG,t)));return i.initData(n,null,t?sG:function(t){return t.value}),i}(i,t,s);s.setData(u),pG(s.getData(),t,n),u.each(function(t){var e,n=u.getItemModel(t),i=n.getShallow("symbol"),o=n.getShallow("symbolSize"),r=n.getShallow("symbolRotate");(G(i)||G(o)||G(r))&&(e=s.getRawValue(t),a=s.getDataParams(t),G(i)&&(i=i(e,a)),G(o)&&(o=o(e,a)),G(r)&&(r=r(e,a)));var a=n.getModel("itemStyle").getItemStyle(),n=jm(l,"color");a.fill||(a.fill=n),u.setItemVisual(t,{symbol:i,symbolSize:o,symbolRotate:r,style:a})}),o.updateData(u),this.group.add(o.group),u.eachItemGraphicEl(function(t){t.traverse(function(t){Wh(t).dataModel=s})}),this.markKeep(o),o.group.silent=s.get("silent")||t.get("silent")},fG.type="markPoint",fG);function fG(){var t=null!==dG&&dG.apply(this,arguments)||this;return t.type=fG.type,t}qy.registerClass(Op),C_(function(t){t.markPoint=t.markPoint||{}});var gG,Op=(l(yG,gG=JF),yG.prototype.createMarkerModelFromSeries=function(t,e,n){return new yG(t,e,n)},yG.type="markLine",yG.defaultOption={zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},yG);function yG(){var t=null!==gG&&gG.apply(this,arguments)||this;return t.type=yG.type,t}nf.registerClass(Op);function mG(t,e,n,i){var o,r,a,s=t.getData(),l=[oG(t,(l=F(i)?i:"min"===(o=i.type)||"max"===o||"average"===o||"median"===o||null!=i.xAxis||null!=i.yAxis?(l=r=void 0,l=null!=i.yAxis||null!=i.xAxis?(r=e.getAxis(null!=i.yAxis?"y":"x"),Q(i.yAxis,i.xAxis)):(r=(a=rG(i,s,e,t)).valueAxis,lG(s,Mb(s,a.valueDataDim),o)),s=1-(e="x"===r.dim?0:1),a={coord:[]},(r=C(i)).type=null,r.coord=[],r.coord[s]=-1/0,a.coord[s]=1/0,0<=(n=n.get("precision"))&&"number"==typeof l&&(l=+l.toFixed(Math.min(n,20))),r.coord[e]=a.coord[e]=l,[r,a,{type:o,valueIndex:i.valueIndex,value:l}]):[])[0]),oG(t,l[1]),O({},l[2])];return l[2].type=l[2].type||null,b(l[2],l[0]),b(l[2],l[1]),l}var vG=_h();function xG(t){return!isNaN(t)&&!isFinite(t)}function _G(t,e,n,i){var o=1-t,r=i.dimensions[t];return xG(e[o])&&xG(n[o])&&e[t]===n[t]&&i.getAxis(r).containData(e[t])}function bG(t,e){if("cartesian2d"===t.type){var n=e[0].coord,i=e[1].coord;if(n&&i&&(_G(1,n,i,t)||_G(0,n,i,t)))return!0}return aG(t,e[0])&&aG(t,e[1])}function wG(t,e,n,i,o){var r,a,s,l,u=i.coordinateSystem,h=t.getItemModel(e),c=Nu(h.get("x"),o.getWidth()),o=Nu(h.get("y"),o.getHeight());isNaN(c)||isNaN(o)?(r=i.getMarkerPosition?i.getMarkerPosition(t.getValues(t.dimensions,e)):(l=u.dimensions,a=t.get(l[0],e),s=t.get(l[1],e),u.dataToPoint([a,s])),aM(u,"cartesian2d")&&(a=u.getAxis("x"),s=u.getAxis("y"),l=u.dimensions,xG(t.get(l[0],e))?r[0]=a.toGlobalCoord(a.getExtent()[n?0:1]):xG(t.get(l[1],e))&&(r[1]=s.toGlobalCoord(s.getExtent()[n?0:1]))),isNaN(c)||(r[0]=c),isNaN(o)||(r[1]=o)):r=[c,o],t.setItemLayout(e,r)}var SG,Op=(l(MG,SG=ni),MG.prototype.updateTransform=function(t,e,r){e.eachSeries(function(e){var n,i,o,t=JF.getMarkerModelFromSeries(e,"markLine");t&&(n=t.getData(),i=vG(t).from,o=vG(t).to,i.each(function(t){wG(i,t,!0,e,r),wG(o,t,!1,e,r)}),n.each(function(t){n.setItemLayout(t,[i.getItemLayout(t),o.getItemLayout(t)])}),this.markerGroupMap.get(e.id).updateLayout())},this)},MG.prototype.renderSeries=function(r,n,t,a){var e=r.coordinateSystem,i=r.id,s=r.getData(),o=this.markerGroupMap,i=o.get(i)||o.set(i,new uL);this.group.add(i.group);var e=function(t,e,n){r=t?P(t&&t.dimensions,function(t){return A({name:t},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})}):[{name:"value",type:"float"}];var i=new db(r,n),o=new db(r,n),r=new db([],n),n=P(n.get("data"),V(mG,e,t,n));t&&(n=R(n,V(bG,t)));t=t?sG:function(t){return t.value};return i.initData(P(n,function(t){return t[0]}),null,t),o.initData(P(n,function(t){return t[1]}),null,t),r.initData(P(n,function(t){return t[2]})),r.hasItemOption=!0,{from:i,to:o,line:r}}(e,r,n),l=e.from,u=e.to,h=e.line;vG(n).from=l,vG(n).to=u,n.setData(h);var c=n.get("symbol"),p=n.get("symbolSize");function d(t,e,n){var i=t.getItemModel(e);wG(t,e,n,r,a);var o=i.getModel("itemStyle").getItemStyle();null==o.fill&&(o.fill=jm(s,"color")),t.setItemVisual(e,{symbolRotate:i.get("symbolRotate"),symbolSize:i.get("symbolSize")||p[n?0:1],symbol:i.get("symbol",!0)||c[n?0:1],style:o})}F(c)||(c=[c,c]),F(p)||(p=[p,p]),e.from.each(function(t){d(l,t,!0),d(u,t,!1)}),h.each(function(t){var e=h.getItemModel(t).getModel("lineStyle").getLineStyle();h.setItemLayout(t,[l.getItemLayout(t),u.getItemLayout(t)]),null==e.stroke&&(e.stroke=l.getItemVisual(t,"style").fill),h.setItemVisual(t,{fromSymbolRotate:l.getItemVisual(t,"symbolRotate"),fromSymbolSize:l.getItemVisual(t,"symbolSize"),fromSymbol:l.getItemVisual(t,"symbol"),toSymbolRotate:u.getItemVisual(t,"symbolRotate"),toSymbolSize:u.getItemVisual(t,"symbolSize"),toSymbol:u.getItemVisual(t,"symbol"),style:e})}),i.updateData(h),e.line.eachItemGraphicEl(function(t,e){t.traverse(function(t){Wh(t).dataModel=n})}),this.markKeep(i),i.group.silent=n.get("silent")||r.get("silent")},MG.type="markLine",MG);function MG(){var t=null!==SG&&SG.apply(this,arguments)||this;return t.type=MG.type,t}qy.registerClass(Op),C_(function(t){t.markLine=t.markLine||{}});var IG,Op=(l(TG,IG=JF),TG.prototype.createMarkerModelFromSeries=function(t,e,n){return new TG(t,e,n)},TG.type="markArea",TG.defaultOption={zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},TG);function TG(){var t=null!==IG&&IG.apply(this,arguments)||this;return t.type=TG.type,t}nf.registerClass(Op);function CG(t,e,n,i){var o=oG(t,i[0]),r=oG(t,i[1]),t=o.coord,i=r.coord;return t[0]=Q(t[0],-1/0),t[1]=Q(t[1],-1/0),i[0]=Q(i[0],1/0),i[1]=Q(i[1],1/0),(i=S([{},o,r])).coord=[o.coord,r.coord],i.x0=o.x,i.y0=o.y,i.x1=r.x,i.y1=r.y,i}var DG=_h();function AG(t){return!isNaN(t)&&!isFinite(t)}function LG(t,e,n){t=1-t;return AG(e[t])&&AG(n[t])}function kG(t,e){var n=e.coord[0],i=e.coord[1];return!!(aM(t,"cartesian2d")&&n&&i&&(LG(1,n,i)||LG(0,n,i)))||(aG(t,{coord:n,x:e.x0,y:e.y0})||aG(t,{coord:i,x:e.x1,y:e.y1}))}function PG(t,e,n,i,o){var r,a,s,l,u=i.coordinateSystem,h=t.getItemModel(e),c=Nu(h.get(n[0]),o.getWidth()),o=Nu(h.get(n[1]),o.getHeight());return isNaN(c)||isNaN(o)?(l=i.getMarkerPosition?i.getMarkerPosition(t.getValues(n,e)):(r=[a=t.get(n[0],e),s=t.get(n[1],e)],u.clampData&&u.clampData(r,r),u.dataToPoint(r,!0)),aM(u,"cartesian2d")&&(r=u.getAxis("x"),u=u.getAxis("y"),a=t.get(n[0],e),s=t.get(n[1],e),AG(a)?l[0]=r.toGlobalCoord(r.getExtent()["x0"===n[0]?0:1]):AG(s)&&(l[1]=u.toGlobalCoord(u.getExtent()["y0"===n[1]?0:1]))),isNaN(c)||(l[0]=c),isNaN(o)||(l[1]=o)):l=[c,o],l}var OG,RG=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],Op=(l(NG,OG=ni),NG.prototype.updateTransform=function(t,e,o){e.eachSeries(function(n){var i,t=JF.getMarkerModelFromSeries(n,"markArea");t&&(i=t.getData()).each(function(e){var t=P(RG,function(t){return PG(i,e,t,n,o)});i.setItemLayout(e,t),i.getItemGraphicEl(e).setShape("points",t)})},this)},NG.prototype.renderSeries=function(o,r,t,a){var s=o.coordinateSystem,e=o.id,l=o.getData(),n=this.markerGroupMap,i=n.get(e)||n.set(e,{group:new $r});this.group.add(i.group),this.markKeep(i);var u=function(t,n,e){var i,o;o=t?(i=P(t&&t.dimensions,function(t){var e=n.getData();return A({name:t},e.getDimensionInfo(e.mapDimension(t))||{})}),new db(P(["x0","y0","x1","y1"],function(t,e){return{name:t,type:i[e%2].type}}),e)):new db(i=[{name:"value",type:"float"}],e);e=P(e.get("data"),V(CG,n,t,e));t&&(e=R(e,V(kG,t)));t=t?function(t,e,n,i){return t.coord[Math.floor(i/2)][i%2]}:function(t){return t.value};return o.initData(e,null,t),o.hasItemOption=!0,o}(s,o,r);r.setData(u),u.each(function(n){var t=P(RG,function(t){return PG(u,n,t,o,a)}),i=!0;N(RG,function(t){var e;i&&(e=u.get(t[0],n),t=u.get(t[1],n),(AG(e)||s.getAxis("x").containData(e))&&(AG(t)||s.getAxis("y").containData(t))&&(i=!1))}),u.setItemLayout(n,{points:t,allClipped:i});var e=u.getItemModel(n).getModel("itemStyle").getItemStyle(),t=jm(l,"color");e.fill||(e.fill=t,"string"==typeof e.fill&&(e.fill=pn(e.fill,.4))),e.stroke||(e.stroke=t),u.setItemVisual(n,"style",e)}),u.diff(DG(i).data).add(function(t){var e=u.getItemLayout(t);e.allClipped||(e=new La({shape:{points:e.points}}),u.setItemGraphicEl(t,e),i.group.add(e))}).update(function(t,e){var n=DG(i).data.getItemGraphicEl(e),e=u.getItemLayout(t);e.allClipped?n&&i.group.remove(n):(n?Jc(n,{shape:{points:e.points}},r,t):n=new La({shape:{points:e.points}}),u.setItemGraphicEl(t,n),i.group.add(n))}).remove(function(t){t=DG(i).data.getItemGraphicEl(t);i.group.remove(t)}).execute(),u.eachItemGraphicEl(function(t,e){var n=u.getItemModel(e),i=u.getItemVisual(e,"style");t.useStyle(u.getItemVisual(e,"style")),mp(t,vp(n),{labelFetcher:r,labelDataIndex:e,defaultText:u.getName(e)||"",inheritColor:"string"==typeof i.fill?pn(i.fill,1):"#000"}),Rc(t,n),Lc(t),Wh(t).dataModel=r}),DG(i).data=u,i.group.silent=r.get("silent")||o.get("silent")},NG.type="markArea",NG);function NG(){var t=null!==OG&&OG.apply(this,arguments)||this;return t.type=NG.type,t}qy.registerClass(Op),C_(function(t){t.markArea=t.markArea||{}});var EG,ni=(l(zG,EG=nf),zG.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),t.selected=t.selected||{},this._updateSelector(t)},zG.prototype.mergeOption=function(t,e){EG.prototype.mergeOption.call(this,t,e),this._updateSelector(t)},zG.prototype._updateSelector=function(t){var n=t.selector,i=this.ecModel;!0===n&&(n=t.selector=["all","inverse"]),F(n)&&N(n,function(t,e){H(t)&&(t={type:t}),n[e]=b(t,(e=i,"all"===(t=t.type)?{type:"all",title:e.getLocale(["legend","selector","all"])}:"inverse"===t?{type:"inverse",title:e.getLocale(["legend","selector","inverse"])}:void 0))})},zG.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,n=0;n<t.length;n++){var i=t[n].get("name");if(this.isSelected(i)){this.select(i),e=!0;break}}e||this.select(t[0].get("name"))}},zG.prototype._updateData=function(i){var o=[],r=[];i.eachRawSeries(function(t){var e,n=t.name;r.push(n),t.legendVisualProvider?(n=t.legendVisualProvider.getAllNames(),i.isSeriesFiltered(t)||(r=r.concat(n)),n.length?o=o.concat(n):e=!0):e=!0,e&&yh(t)&&o.push(t.name)}),this._availableNames=r;var t=P(this.get("data")||o,function(t){return"string"!=typeof t&&"number"!=typeof t||(t={name:t}),new Fp(t,this,this.ecModel)},this);this._data=t},zG.prototype.getData=function(){return this._data},zG.prototype.select=function(t){var e=this.option.selected;"single"===this.get("selectedMode")&&N(this._data,function(t){e[t.get("name")]=!1}),e[t]=!0},zG.prototype.unSelect=function(t){"single"!==this.get("selectedMode")&&(this.option.selected[t]=!1)},zG.prototype.toggleSelected=function(t){var e=this.option.selected;e.hasOwnProperty(t)||(e[t]=!0),this[e[t]?"unSelect":"select"](t)},zG.prototype.allSelect=function(){var t=this._data,e=this.option.selected;N(t,function(t){e[t.get("name",!0)]=!0})},zG.prototype.inverseSelect=function(){var t=this._data,e=this.option.selected;N(t,function(t){t=t.get("name",!0);e.hasOwnProperty(t)||(e[t]=!0),e[t]=!e[t]})},zG.prototype.isSelected=function(t){var e=this.option.selected;return!(e.hasOwnProperty(t)&&!e[t])&&0<=L(this._availableNames,t)},zG.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},zG.type="legend.plain",zG.dependencies=["series"],zG.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}},zG);function zG(){var t=null!==EG&&EG.apply(this,arguments)||this;return t.type=zG.type,t.layoutMode={type:"box",ignoreSize:!0},t}function BG(t,e,n){var i,o={},r="toggleSelected"===t;return n.eachComponent("legend",function(n){r&&null!=i?n[i?"select":"unSelect"](e.name):"allSelect"===t||"inverseSelect"===t?n[t]():(n[t](e.name),i=n.isSelected(e.name)),N(n.getData(),function(t){var e=t.get("name");"\n"!==e&&""!==e&&(t=n.isSelected(e),o.hasOwnProperty(e)?o[e]=o[e]&&t:o[e]=t)})}),"allSelect"===t||"inverseSelect"===t?{selected:o}:{name:e.name,selected:o}}nf.registerClass(ni),A_("legendToggleSelect","legendselectchanged",V(BG,"toggleSelected")),A_("legendAllSelect","legendselectall",V(BG,"allSelect")),A_("legendInverseSelect","legendinverseselect",V(BG,"inverseSelect")),A_("legendSelect","legendselected",V(BG,"select")),A_("legendUnSelect","legendunselected",V(BG,"unSelect"));var VG,FG=V,GG=N,HG=$r,Op=(l(WG,VG=qy),WG.prototype.init=function(){this.group.add(this._contentGroup=new HG),this.group.add(this._selectorGroup=new HG),this._isFirstRender=!0},WG.prototype.getContentGroup=function(){return this._contentGroup},WG.prototype.getSelectorGroup=function(){return this._selectorGroup},WG.prototype.render=function(t,e,n){var i,o,r,a,s,l=this._isFirstRender;this._isFirstRender=!1,this.resetInner(),t.get("show",!0)&&(i=t.get("align"),s=t.get("orient"),i&&"auto"!==i||(i="right"===t.get("left")&&"vertical"===s?"right":"left"),o=t.get("selector",!0),a=t.get("selectorPosition",!0),!o||a&&"auto"!==a||(a="horizontal"===s?"end":"start"),this.renderInner(i,t,e,n,o,s,a),n=Yd(r=t.getBoxLayoutParams(),e={width:n.getWidth(),height:n.getHeight()},s=t.get("padding")),s=Yd(A({width:(a=this.layoutInner(t,i,n,l,o,a)).width,height:a.height},r),e,s),this.group.x=s.x-a.x,this.group.y=s.y-a.y,this.group.markRedraw(),this.group.add(this._backgroundEl=IB(a,t)))},WG.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},WG.prototype.renderInner=function(u,h,c,p,t,e,n){var d=this.getContentGroup(),f=ct(),g=h.get("selectedMode"),y=[];c.eachRawSeries(function(t){t.get("legendHoverLink")||y.push(t.id)}),GG(h.getData(),function(o,r){var a=o.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var t=new HG;return t.newline=!0,void d.add(t)}var e,n,i,s,l=c.getSeriesByName(a)[0];f.get(a)||(l?(e=(i=(s=l.getData()).getVisual("style"))[s.getVisual("drawType")]||i.fill,n=i.stroke,t=i.decal,i=s.getVisual("legendSymbol")||"roundRect",s=s.getVisual("symbol"),this._createItem(a,r,o,h,i,s,u,e,n,t,g).on("click",FG(YG,a,null,p,y)).on("mouseover",FG(ZG,l.name,null,p,y)).on("mouseout",FG(jG,l.name,null,p,y)),f.set(a,!0)):c.eachRawSeries(function(t){var e,n,i;f.get(a)||!t.legendVisualProvider||(e=t.legendVisualProvider).containName(a)&&(n=e.indexOfName(a),t=(i=e.getItemVisual(n,"style")).stroke,e=i.decal,n=i.fill,(i=rn(i.fill))&&0===i[3]&&(i[3]=.2,n=dn(i,"rgba")),this._createItem(a,r,o,h,"roundRect",null,u,n,t,e,g).on("click",FG(YG,null,a,p,y)).on("mouseover",FG(ZG,null,a,p,y)).on("mouseout",FG(jG,null,a,p,y)),f.set(a,!0))},this))},this),t&&this._createSelector(t,h,p,e,n)},WG.prototype._createSelector=function(t,i,o,e,n){var r=this.getSelectorGroup();GG(t,function(t){var e=t.type,n=new vl({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){o.dispatchAction({type:"all"===e?"legendAllSelect":"legendInverseSelect"})}});r.add(n),mp(n,{normal:i.getModel("selectorLabel"),emphasis:i.getModel(["emphasis","selectorLabel"])},{defaultText:t.title}),Lc(n)})},WG.prototype._createItem=function(t,e,n,i,o,r,a,s,l,u,h){var c=i.get("itemWidth"),p=i.get("itemHeight"),d=i.get("inactiveColor"),f=i.get("inactiveBorderColor"),g=i.get("symbolKeepAspect"),y=i.getModel("itemStyle"),m=i.isSelected(t),v=new HG,x=n.getModel("textStyle"),_=n.get("icon"),b=n.getModel("tooltip"),w=b.parentModel,n=px(o=_||o,0,0,c,p,m?s:d,null==g||g);v.add(XG(n,o,y,l,f,u,m)),_||!r||r===o&&"none"!==r||("none"===r&&(r="circle"),g=px(r,(c-(o=.8*p))/2,(p-o)/2,o,o,m?s:d,null==g||g),v.add(XG(g,r,y,l,f,u,m)));f="left"===a?c+5:-5,u=a,c=i.get("formatter"),a=t;"string"==typeof c&&c?a=c.replace("{name}",null!=t?t:""):"function"==typeof c&&(a=c(t)),v.add(new vl({style:xp(x,{text:a,x:f,y:p/2,fill:m?x.getTextColor():d,align:u,verticalAlign:"middle"})}));u=new ga({shape:v.getBoundingRect(),invisible:!0});return b.get("show")&&(i={componentType:"legend",legendIndex:i.componentIndex,name:t,$vars:["name"]},u.tooltip=O({content:t,formatter:w.get("formatter",!0)||function(t){return t.name},formatterParams:i},b.option)),v.add(u),v.eachChild(function(t){t.silent=!0}),u.silent=!h,this.getContentGroup().add(v),Lc(v),v.__legendDataIndex=e,v},WG.prototype.layoutInner=function(t,e,n,i,o,r){var a=this.getContentGroup(),s=this.getSelectorGroup();Xd(t.get("orient"),a,t.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),o){Xd("horizontal",s,t.get("selectorItemGap",!0));var h=s.getBoundingRect(),c=[-h.x,-h.y],p=t.get("selectorButtonGap",!0),d=t.getOrient().index,n=0===d?"width":"height",o=0===d?"height":"width",t=0===d?"y":"x";"end"===r?c[d]+=l[n]+p:u[d]+=h[n]+p,c[1-d]+=l[o]/2-h[o]/2,s.x=c[0],s.y=c[1],a.x=u[0],a.y=u[1];s={x:0,y:0};return s[n]=l[n]+p+h[n],s[o]=Math.max(l[o],h[o]),s[t]=Math.min(0,h[t]+c[1-d]),s}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},WG.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},WG.type="legend.plain",WG);function WG(){var t=null!==VG&&VG.apply(this,arguments)||this;return t.type=WG.type,t.newlineDisabled=!1,t}function XG(t,e,n,i,o,r,a){var s;return"line"!==e&&e.indexOf("empty")<0?(s=n.getItemStyle(),t.style.stroke=i,t.style.decal=r,a||(s.stroke=o)):s=n.getItemStyle(["borderWidth","borderColor"]),t.setStyle(s),t}function YG(t,e,n,i){jG(t,e,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),ZG(t,e,n,i)}function UG(t){for(var e,n=t.getZr().storage.getDisplayList(),i=0,o=n.length;i<o&&!(e=n[i].states.emphasis);)i++;return e&&e.hoverLayer}function ZG(t,e,n,i){UG(n)||n.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:i})}function jG(t,e,n,i){UG(n)||n.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:i})}qy.registerClass(Op),D_(r.PROCESSOR.SERIES_FILTER,function(t){var n=t.findComponents({mainType:"legend"});n&&n.length&&t.filterSeries(function(t){for(var e=0;e<n.length;e++)if(!n[e].isSelected(t.name))return!1;return!0})}),nf.registerSubTypeDefaulter("legend",function(){return"plain"});var qG,ni=(l(KG,qG=ni),KG.prototype.setScrollDataIndex=function(t){this.option.scrollDataIndex=t},KG.prototype.init=function(t,e,n){var i=qd(t);qG.prototype.init.call(this,t,e,n),$G(this,t,i)},KG.prototype.mergeOption=function(t,e){qG.prototype.mergeOption.call(this,t,e),$G(this,this.option,t)},KG.type="legend.scroll",KG.defaultOption=Xp(ni.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}),KG);function KG(){var t=null!==qG&&qG.apply(this,arguments)||this;return t.type=KG.type,t}function $G(t,e,n){var i=[1,1];i[t.getOrient().index]=0,jd(e,n,{type:"box",ignoreSize:!!i})}nf.registerClass(ni);var JG,QG=$r,tH=["width","height"],eH=["x","y"],Op=(l(nH,JG=Op),nH.prototype.init=function(){JG.prototype.init.call(this),this.group.add(this._containerGroup=new QG),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new QG)},nH.prototype.resetInner=function(){JG.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},nH.prototype.renderInner=function(t,i,e,o,n,r,a){var s=this;JG.prototype.renderInner.call(this,t,i,e,o,n,r,a);var l=this._controllerGroup,a=i.get("pageIconSize",!0),u=F(a)?a:[a,a];h("pagePrev",0);a=i.getModel("pageTextStyle");function h(t,e){var n=t+"DataIndex",n=hp(i.get("pageIcons",!0)[i.getOrient().name][e],{onclick:B(s._pageGo,s,n,i,o)},{x:-u[0]/2,y:-u[1]/2,width:u[0],height:u[1]});n.name=t,l.add(n)}l.add(new vl({name:"pageText",style:{text:"xx/xx",fill:a.getTextColor(),font:a.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),h("pageNext",1)},nH.prototype.layoutInner=function(t,e,n,i,o,r){var a=this.getSelectorGroup(),s=t.getOrient().index,l=tH[s],u=eH[s],h=tH[1-s],c=eH[1-s];o&&Xd("horizontal",a,t.get("selectorItemGap",!0));var p=t.get("selectorButtonGap",!0),d=a.getBoundingRect(),f=[-d.x,-d.y],g=C(n);o&&(g[l]=n[l]-d[l]-p);g=this._layoutContentAndController(t,i,g,s,l,h,c,u);return o&&("end"===r?f[s]+=g[l]+p:(r=d[l]+p,f[s]-=r,g[u]-=r),g[l]+=d[l]+p,f[1-s]+=g[c]+g[h]/2-d[h]/2,g[h]=Math.max(g[h],d[h]),g[c]=Math.min(g[c],d[c]+f[1-s]),a.x=f[0],a.y=f[1],a.markRedraw()),g},nH.prototype._layoutContentAndController=function(t,e,n,i,o,r,a,s){var l=this.getContentGroup(),u=this._containerGroup,h=this._controllerGroup;Xd(t.get("orient"),l,t.get("itemGap"),i?n.width:null,i?null:n.height),Xd("horizontal",h,t.get("pageButtonItemGap",!0));var c=l.getBoundingRect(),p=h.getBoundingRect(),d=this._showController=c[o]>n[o],f=[-c.x,-c.y];e||(f[i]=l[s]);var g=[0,0],e=[-p.x,-p.y],s=tt(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?e[i]+=n[o]-p[o]:g[i]+=p[o]+s),e[1-i]+=c[r]/2-p[r]/2,l.setPosition(f),u.setPosition(g),h.setPosition(e);g={x:0,y:0};g[o]=(d?n:c)[o],g[r]=Math.max(c[r],p[r]),g[a]=Math.min(0,p[a]+e[1-i]),u.__rectSize=n[o],d?((i={x:0,y:0})[o]=Math.max(n[o]-p[o]-s,0),i[r]=g[r],u.setClipPath(new ga({shape:i})),u.__rectSize=i[o]):h.eachChild(function(t){t.attr({invisible:!0,silent:!0})});h=this._getPageInfo(t);return null!=h.pageIndex&&Jc(l,{x:h.contentPosition[0],y:h.contentPosition[1]},d?t:null),this._updatePageInfoView(t,h),g},nH.prototype._pageGo=function(t,e,n){t=this._getPageInfo(e)[t];null!=t&&n.dispatchAction({type:"legendScroll",scrollDataIndex:t,legendId:e.id})},nH.prototype._updatePageInfoView=function(n,i){var o=this._controllerGroup;N(["pagePrev","pageNext"],function(t){var e=null!=i[t+"DataIndex"],t=o.childOfName(t);t&&(t.setStyle("fill",e?n.get("pageIconColor",!0):n.get("pageIconInactiveColor",!0)),t.cursor=e?"pointer":"default")});var t=o.childOfName("pageText"),e=n.get("pageFormatter"),r=i.pageIndex,a=null!=r?r+1:0,r=i.pageCount;t&&e&&t.setStyle("text",H(e)?e.replace("{current}",null==a?"":a+"").replace("{total}",null==r?"":r+""):e({current:a,total:r}))},nH.prototype._getPageInfo=function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,o=t.getOrient().index,r=tH[o],a=eH[o],s=this._findTargetItemIndex(e),l=n.children(),t=l[s],u=l.length,e=u?1:0,h={contentPosition:[n.x,n.y],pageCount:e,pageIndex:e-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!t)return h;t=g(t);h.contentPosition[o]=-t.s;for(var c=s+1,p=t,d=t,f=null;c<=u;++c)(!(f=g(l[c]))&&d.e>p.s+i||f&&!y(f,p.s))&&(p=d.i>p.i?d:f)&&(null==h.pageNextDataIndex&&(h.pageNextDataIndex=p.i),++h.pageCount),d=f;for(c=s-1,p=t,d=t,f=null;-1<=c;--c)(f=g(l[c]))&&y(d,f.s)||!(p.i<d.i)||(d=p,null==h.pagePrevDataIndex&&(h.pagePrevDataIndex=p.i),++h.pageCount,++h.pageIndex),p=f;return h;function g(t){if(t){var e=t.getBoundingRect(),n=e[a]+t[a];return{s:n,e:n+e[r],i:t.__legendDataIndex}}}function y(t,e){return t.e>=e&&t.s<=e+i}},nH.prototype._findTargetItemIndex=function(n){return this._showController?(this.getContentGroup().eachChild(function(t,e){t=t.__legendDataIndex;null==o&&null!=t&&(o=e),t===n&&(i=e)}),null!=i?i:o):0;var i,o},nH.type="legend.scroll",nH);function nH(){var t=null!==JG&&JG.apply(this,arguments)||this;return t.type=nH.type,t.newlineDisabled=!0,t._currentIndex=0,t}qy.registerClass(Op),A_("legendScroll","legendscroll",function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(n)})});var iH,Op=(l(oH,iH=nd),oH.type="dataZoom.slider",oH.layoutMode="box",oH.defaultOption=Xp(nd.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),oH);function oH(){var t=null!==iH&&iH.apply(this,arguments)||this;return t.type=oH.type,t}nf.registerClass(Op);var rH,aH=ga,sH="horizontal",lH="vertical",uH=["line","bar","candlestick","scatter"],hH={easing:"cubicOut",duration:100},Op=(l(cH,rH=vm),cH.prototype.init=function(t,e){this.api=e,this._onBrush=B(this._onBrush,this),this._onBrushEnd=B(this._onBrushEnd,this)},cH.prototype.render=function(t,e,n,i){if(rH.prototype.render.apply(this,arguments),cm(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),!1!==t.get("show")){if(t.noTarget())return this._clear(),void this.group.removeAll();i&&"dataZoom"===i.type&&i.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},cH.prototype.dispose=function(){this._clear(),rH.prototype.dispose.apply(this,arguments)},cH.prototype._clear=function(){var t,e;(n=(t=this)[e="_dispatchZoomAction"])&&n[sm]&&(t[e]=n[sm]);var n=this.api.getZr();n.off("mousemove",this._onBrush),n.off("mouseup",this._onBrushEnd)},cH.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var e=this._displayables.sliderGroup=new $r;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},cH.prototype._resetLocation=function(){var t=this.dataZoomModel,e=this.api,n=t.get("brushSelect")?7:0,i=this._findCoordRect(),e={width:e.getWidth(),height:e.getHeight()},o=this._orient===sH?{right:e.width-i.x-i.width,top:e.height-30-7-n,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},r=qd(t.option);N(["right","top","width","height"],function(t){"ph"===r[t]&&(r[t]=o[t])});e=Yd(r,e);this._location={x:e.x,y:e.y},this._size=[e.width,e.height],this._orient===lH&&this._size.reverse()},cH.prototype._positionGroup=function(){var t=this.group,e=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),r=this._displayables.sliderGroup,i=(this._dataShadowInfo||{}).otherAxisInverse;r.attr(n!==sH||o?n===sH&&o?{scaleY:i?1:-1,scaleX:-1}:n!==lH||o?{scaleY:i?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:i?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:i?1:-1,scaleX:1});r=t.getBoundingRect([r]);t.x=e.x-r.x,t.y=e.y-r.y,t.markRedraw()},cH.prototype._getViewExtent=function(){return[0,this._size[0]]},cH.prototype._renderBackground=function(){var t=this.dataZoomModel,e=this._size,n=this._displayables.sliderGroup,i=t.get("brushSelect");n.add(new aH({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40}));t=new aH({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:B(this._onClickPanel,this)}),e=this.api.getZr();i?(t.on("mousedown",this._onBrushStart,this),t.cursor="crosshair",e.on("mousemove",this._onBrush),e.on("mouseup",this._onBrushEnd)):(e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)),n.add(t)},cH.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],t){var e=this._size,n=t.series,i=n.getRawData(),n=n.getShadowDim?n.getShadowDim():t.otherDim;if(null!=n){var o,t=.3*((r=i.getDataExtent(n))[1]-r[0]),r=[r[0]-t,r[1]+t],a=[0,e[1]],t=[0,e[0]],s=[[e[0],0],[0,0]],l=[],u=t[1]/(i.count()-1),h=0,c=Math.round(i.count()/e[0]);i.each([n],function(t,e){var n;0<c&&e%c?h+=u:(t=(n=null==t||isNaN(t)||""===t)?0:Ru(t,r,a,!0),n&&!o&&e?(s.push([s[s.length-1][0],0]),l.push([l[l.length-1][0],0])):!n&&o&&(s.push([h,0]),l.push([h,0])),s.push([h,t]),l.push([h,t]),h+=u,o=n)});for(var p,d,f,g=this.dataZoomModel,y=0;y<3;y++){var m=(p=1===y,d=f=d=void 0,d=g.getModel(p?"selectedDataBackground":"dataBackground"),f=new $r,p=new La({shape:{points:s},segmentIgnoreThreshold:1,style:d.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),d=new Ra({shape:{points:l},segmentIgnoreThreshold:1,style:d.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19}),f.add(p),f.add(d),f);this._displayables.sliderGroup.add(m),this._displayables.dataShadowSegs.push(m)}}}},cH.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,s=t.get("showDataShadow");if(!1!==s){var l,u=this.ecModel;return t.eachTargetAxis(function(r,a){N(t.getAxisProxy(r,a).getTargetSeriesModels(),function(t){var e,n,i,o;l||!0!==s&&L(uH,t.get("type"))<0||(e=u.getComponent(lV(r),a).axis,n={x:"y",y:"x",radius:"angle",angle:"radius"}[r],o=t.coordinateSystem,null!=n&&o.getOtherAxis&&(i=o.getOtherAxis(e).inverse),n=t.getData().mapDimension(n),l={thisAxis:e,series:t,thisDim:r,otherDim:n,otherAxisInverse:i})},this)},this),l}},cH.prototype._renderHandle=function(){var o=this.group,t=this._displayables,r=t.handles=[null,null],a=t.handleLabels=[null,null],s=this._displayables.sliderGroup,e=this._size,l=this.dataZoomModel,n=this.api,i=l.get("borderRadius")||0,u=l.get("brushSelect"),h=t.filler=new aH({silent:u,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});s.add(h),s.add(new aH({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:e[0],height:e[1],r:i},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),N([0,1],function(t){var e=l.get("handleIcon");!ux[e]&&e.indexOf("path://")<0&&(e="path://"+e);var n=px(e,-1,0,2,2,null,!0);n.attr({cursor:pH(this._orient),draggable:!0,drift:B(this._onDragMove,this,t),ondragend:B(this._onDragEnd,this),onmouseover:B(this._showDataInfo,this,!0),onmouseout:B(this._showDataInfo,this,!1),z2:5});var i=n.getBoundingRect(),e=l.get("handleSize");this._handleHeight=Nu(e,this._size[1]),this._handleWidth=i.width/i.height*this._handleHeight,n.setStyle(l.getModel("handleStyle").getItemStyle()),n.style.strokeNoScale=!0,n.rectHover=!0,n.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),Lc(n);i=l.get("handleColor");null!=i&&(n.style.fill=i),s.add(r[t]=n);n=l.getModel("textStyle");o.add(a[t]=new vl({silent:!0,invisible:!0,style:{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:n.getTextColor(),font:n.getFont()},z2:10}))},this);var c,p=h;u&&(i=Nu(l.get("moveHandleSize"),e[1]),c=t.moveHandle=new ga({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:e[1]-.5,height:i}}),h=.8*i,(u=t.moveHandleIcon=px(l.get("moveHandleIcon"),-h/2,-h/2,h,h,"#fff",!0)).silent=!0,u.y=e[1]+i/2-.5,c.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle(),h=Math.min(e[1]/2,Math.max(i,10)),(p=t.moveZone=new ga({invisible:!0,shape:{y:e[1]-h,height:i+h}})).on("mouseover",function(){n.enterEmphasis(c)}).on("mouseout",function(){n.leaveEmphasis(c)}),s.add(c),s.add(u),s.add(p)),p.attr({draggable:!0,cursor:pH(this._orient),drift:B(this._onDragMove,this,"all"),ondragstart:B(this._showDataInfo,this,!0),ondragend:B(this._onDragEnd,this),onmouseover:B(this._showDataInfo,this,!0),onmouseout:B(this._showDataInfo,this,!1)})},cH.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[Ru(t[0],[0,100],e,!0),Ru(t[1],[0,100],e,!0)]},cH.prototype._updateInterval=function(t,e){var n=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),r=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];nk(e,i,o,n.get("zoomLock")?"all":t,null!=r.minSpan?Ru(r.minSpan,a,o,!0):null,null!=r.maxSpan?Ru(r.maxSpan,a,o,!0):null);r=this._range,a=this._range=zu([Ru(i[0],o,a,!0),Ru(i[1],o,a,!0)]);return!r||r[0]!==a[0]||r[1]!==a[1]},cH.prototype._updateView=function(t){var i=this._displayables,o=this._handleEnds,e=zu(o.slice()),r=this._size;N([0,1],function(t){var e=i.handles[t],n=this._handleHeight;e.attr({scaleX:n/2,scaleY:n/2,x:o[t]+(t?-1:1),y:r[1]/2-n/2})},this),i.filler.setShape({x:e[0],y:0,width:e[1]-e[0],height:r[1]});var n={x:e[0],width:e[1]-e[0]};i.moveHandle&&(i.moveHandle.setShape(n),i.moveZone.setShape(n),i.moveZone.getBoundingRect(),i.moveHandleIcon&&i.moveHandleIcon.attr("x",n.x+n.width/2));for(var a=i.dataShadowSegs,s=[0,e[0],e[1],r[0]],l=0;l<a.length;l++){var u=a[l],h=u.getClipPath();h||(h=new ga,u.setClipPath(h)),h.setShape({x:s[l],y:0,width:s[l+1]-s[l],height:r[1]})}this._updateDataInfo(t)},cH.prototype._updateDataInfo=function(t){var e,n,i=this.dataZoomModel,o=this._displayables,r=o.handleLabels,a=this._orient,s=["",""];!i.get("showDetail")||(n=i.findRepresentativeAxisProxy())&&(e=n.getAxisModel().axis,i=this._range,n=t?n.calculateDataWindow({start:i[0],end:i[1]}).valueWindow:n.getDataValueWindow(),s=[this._formatLabel(n[0],e),this._formatLabel(n[1],e)]);var l=zu(this._handleEnds.slice());function u(t){var e=op(o.handles[t].parent,this.group),n=ap(0===t?"right":"left",e),i=this._handleWidth/2+5,e=rp([l[t]+(0===t?-i:i),this._size[1]/2],e);r[t].setStyle({x:e[0],y:e[1],verticalAlign:a===sH?"middle":n,align:a===sH?n:"center",text:s[t]})}u.call(this,0),u.call(this,1)},cH.prototype._formatLabel=function(t,e){var n=this.dataZoomModel,i=n.get("labelFormatter"),n=n.get("labelPrecision");null!=n&&"auto"!==n||(n=e.getPixelPrecision());n=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel({value:Math.round(t)}):t.toFixed(Math.min(n,20));return G(i)?i(t,n):H(i)?i.replace("{value}",n):n},cH.prototype._showDataInfo=function(t){t=this._dragging||t;var e=this._displayables,n=e.handleLabels;n[0].attr("invisible",!t),n[1].attr("invisible",!t),e.moveHandle&&this.api[t?"enterEmphasis":"leaveEmphasis"](e.moveHandle,1)},cH.prototype._onDragMove=function(t,e,n,i){this._dragging=!0,ie(i.event);n=rp([e,n],this._displayables.sliderGroup.getLocalTransform(),!0),t=this._updateInterval(t,n[0]),n=this.dataZoomModel.get("realtime");this._updateView(!n),t&&n&&this._dispatchZoomAction(!0)},cH.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1),this.dataZoomModel.get("realtime")||this._dispatchZoomAction(!1)},cH.prototype._onClickPanel=function(t){var e=this._size,t=this._displayables.sliderGroup.transformCoordToLocal(t.offsetX,t.offsetY);t[0]<0||t[0]>e[0]||t[1]<0||t[1]>e[1]||(e=((e=this._handleEnds)[0]+e[1])/2,e=this._updateInterval("all",t[0]-e),this._updateView(),e&&this._dispatchZoomAction(!1))},cH.prototype._onBrushStart=function(t){var e=t.offsetX,t=t.offsetY;this._brushStart=new kn(e,t),this._brushing=!0,this._brushStartTime=+new Date},cH.prototype._onBrushEnd=function(t){var e,n,i;this._brushing&&(i=this._displayables.brushRect,this._brushing=!1,i&&(i.attr("ignore",!0),e=i.shape,+new Date-this._brushStartTime<200&&Math.abs(e.width)<5||(n=this._getViewExtent(),i=[0,100],this._range=zu([Ru(e.x,n,i,!0),Ru(e.x+e.width,n,i,!0)]),this._handleEnds=[e.x,e.x+e.width],this._updateView(),this._dispatchZoomAction(!1))))},cH.prototype._onBrush=function(t){this._brushing&&(ie(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},cH.prototype._updateBrushRect=function(t,e){var n=this._displayables,i=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new aH({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);i=this._brushStart,n=this._displayables.sliderGroup,e=n.transformCoordToLocal(t,e),n=n.transformCoordToLocal(i.x,i.y),i=this._size;e[0]=Math.max(Math.min(i[0],e[0]),0),o.setShape({x:n[0],y:0,width:e[0]-n[0],height:i[1]})},cH.prototype._dispatchZoomAction=function(t){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?hH:null,start:e[0],end:e[1]})},cH.prototype._findCoordRect=function(){var t,e,n=hV(this.dataZoomModel).infoList;return!t&&n.length&&(t=(e=n[0].model.coordinateSystem).getRect&&e.getRect()),t||(t={x:.2*(n=this.api.getWidth()),y:.2*(e=this.api.getHeight()),width:.6*n,height:.6*e}),t},cH.type="dataZoom.slider",cH);function cH(){var t=null!==rH&&rH.apply(this,arguments)||this;return t.type=cH.type,t._displayables={},t}function pH(t){return"vertical"===t?"ns-resize":"ew-resize"}qy.registerClass(Op);var dH,Op=(l(fH,dH=nd),fH.type="dataZoom.inside",fH.defaultOption=Xp(nd.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),fH);function fH(){var t=null!==dH&&dH.apply(this,arguments)||this;return t.type=fH.type,t}nf.registerClass(Op);var gH=_h();function yH(t,e){e&&(t.removeKey(e.model.uid),(e=e.controller)&&e.dispose())}function mH(t,e){t.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function vH(t,e,n,i){return t.coordinateSystem.containPoint([n,i])}D_(r.PROCESSOR.FILTER,function(t,a){var e=gH(a),l=e.coordSysRecordMap||(e.coordSysRecordMap=ct());l.each(function(t){t.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(o){N(hV(o).infoList,function(t){var e,r,n,i=t.model.uid,e=l.get(i)||l.set(i,(e=a,i=t.model,r={model:i,containsPoint:V(vH,i),dispatchAction:V(mH,e),dataZoomInfoMap:null,controller:null},n=r.controller=new hC(e.getZr()),N(["pan","zoom","scrollMove"],function(o){n.on(o,function(n){var i=[];r.dataZoomInfoMap.each(function(t){var e;n.isAvailableBehavior(t.model.option)&&(e=(e=(t.getRange||{})[o])&&e(t.dzReferCoordSysInfo,r.model.mainType,r.controller,n),!t.model.get("disabled",!0)&&e&&i.push({dataZoomId:t.model.id,start:e[0],end:e[1]}))}),i.length&&r.dispatchAction(i)})}),r));(e.dataZoomInfoMap||(e.dataZoomInfoMap=ct())).set(o.uid,{dzReferCoordSysInfo:t,model:o,getRange:null})})}),l.each(function(t){var e,n,i,o,r,a=t.controller,s=t.dataZoomInfoMap;!s||null!=(n=s.keys()[0])&&(e=s.get(n)),e?(o={type_true:2,type_move:1,type_false:0,type_undefined:-1},r=!0,s.each(function(t){var e=t.model,t=!e.get("disabled",!0)&&(!e.get("zoomLock",!0)||"move");o["type_"+i]<o["type_"+t]&&(i=t),r=r&&e.get("preventDefaultMouseMove",!0)}),s={controlType:i,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!r}},a.enable(s.controlType,s.opt),a.setPointerChecker(t.containsPoint),cm(t,"dispatchAction",e.model.get("throttle",!0),"fixRate")):yH(l,t)})});var xH,nd=(l(_H,xH=vm),_H.prototype.render=function(t,e,n){var i,o;xH.prototype.render.apply(this,arguments),t.noTarget()?this._clear():(this.range=t.getPercentRange(),n=n,i=t,o={pan:B(bH.pan,this),zoom:B(bH.zoom,this),scrollMove:B(bH.scrollMove,this)},gH(n).coordSysRecordMap.each(function(t){t=t.dataZoomInfoMap.get(i.uid);t&&(t.getRange=o)}))},_H.prototype.dispose=function(){this._clear(),xH.prototype.dispose.apply(this,arguments)},_H.prototype._clear=function(){!function(t,e){for(var n=gH(t).coordSysRecordMap,i=n.keys(),o=0;o<i.length;o++){var r=i[o],a=n.get(r),s=a.dataZoomInfoMap;s&&(r=e.uid,s.get(r)&&(s.removeKey(r),s.keys().length||yH(n,a)))}}(this.api,this.dataZoomModel),this.range=null},_H.type="dataZoom.inside",_H);function _H(){var t=null!==xH&&xH.apply(this,arguments)||this;return t.type="dataZoom.inside",t}var bH={zoom:function(t,e,n,i){var o=this.range,r=o.slice(),a=t.axisModels[0];if(a){t=SH[e](null,[i.originX,i.originY],a,n,t),t=(0<t.signal?t.pixelStart+t.pixelLength-t.pixel:t.pixel-t.pixelStart)/t.pixelLength*(r[1]-r[0])+r[0],i=Math.max(1/i.scale,0);r[0]=(r[0]-t)*i+t,r[1]=(r[1]-t)*i+t;t=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return nk(0,r,[0,100],0,t.minSpan,t.maxSpan),this.range=r,o[0]!==r[0]||o[1]!==r[1]?r:void 0}},pan:wH(function(t,e,n,i,o,r){n=SH[i]([r.oldX,r.oldY],[r.newX,r.newY],e,o,n);return n.signal*(t[1]-t[0])*n.pixel/n.pixelLength}),scrollMove:wH(function(t,e,n,i,o,r){return SH[i]([0,0],[r.scrollDelta,r.scrollDelta],e,o,n).signal*(t[1]-t[0])*r.scrollDelta})};function wH(s){return function(t,e,n,i){var o=this.range,r=o.slice(),a=t.axisModels[0];if(a)return nk(s(r,a,t,e,n,i),r,[0,100],"all"),this.range=r,o[0]!==r[0]||o[1]!==r[1]?r:void 0}}var SH={grid:function(t,e,n,i,o){var r=n.axis,n={},o=o.model.coordinateSystem.getRect();return t=t||[0,0],"x"===r.dim?(n.pixel=e[0]-t[0],n.pixelLength=o.width,n.pixelStart=o.x,n.signal=r.inverse?1:-1):(n.pixel=e[1]-t[1],n.pixelLength=o.height,n.pixelStart=o.y,n.signal=r.inverse?-1:1),n},polar:function(t,e,n,i,o){var r=n.axis,a={},s=o.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),o=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===n.mainType?(a.pixel=e[0]-t[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=r.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=o[1]-o[0],a.pixelStart=o[0],a.signal=r.inverse?-1:1),a},singleAxis:function(t,e,n,i,o){var r=n.axis,n=o.model.coordinateSystem.getRect(),o={};return t=t||[0,0],"horizontal"===r.orient?(o.pixel=e[0]-t[0],o.pixelLength=n.width,o.pixelStart=n.x,o.signal=r.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=n.height,o.pixelStart=n.y,o.signal=r.inverse?-1:1),o}};qy.registerClass(nd);var MH=N;function IH(t){t=t&&t.visualMap;F(t)||(t=t?[t]:[]),MH(t,function(t){t&&(TH(t,"splitList")&&!TH(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList),(t=t.pieces)&&F(t)&&MH(t,function(t){Y(t)&&(TH(t,"start")&&!TH(t,"min")&&(t.min=t.start),TH(t,"end")&&!TH(t,"max")&&(t.max=t.end))}))})}function TH(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}nf.registerSubTypeDefaulter("visualMap",function(t){return t.categories||(t.pieces?0<t.pieces.length:0<t.splitNumber)&&!t.calculable?"piecewise":"continuous"});Op=r.VISUAL.COMPONENT;function CH(t,e,n,i){for(var o=e.targetVisuals[i],r=jD.prepareVisualTypes(o),a={color:jm(t.getData(),"color")},s=0,l=r.length;s<l;s++){var u=r[s],u=o["opacity"===u?"__alphaForOpacity":u];u&&u.applyVisual(n,h,c)}return a.color;function h(t){return a[t]}function c(t,e){a[t]=e}}P_(Op,{createOnAllSeries:!0,reset:function(n,t){var i=[];return t.eachComponent("visualMap",function(t){var d,f,g,y,e=n.pipelineContext;!t.isTargetSeries(n)||e&&e.large||i.push((e=t.stateList,d=t.targetVisuals,f=B(t.getValueState,t),g=t.getDataDimension(n.getData()),y={},N(e,function(t){var e=jD.prepareVisualTypes(d[t]);y[t]=e}),{progress:function(t,n){var e,i;function o(t){return Zm(n,i,t)}function r(t,e){qm(n,i,t,e)}for(null!=g&&(e=n.getDimension(g));null!=(i=t.next());){var a=n.getRawDataItem(i);if(!a||!1!==a.visualMap)for(var s=null!=g?n.get(e,i):i,a=f(s),l=d[a],u=y[a],h=0,c=u.length;h<c;h++){var p=u[h];l[p]&&l[p].applyVisual(s,o,r)}}}}))}),i}}),P_(Op,{createOnAllSeries:!0,reset:function(n,t){var i=n.getData(),o=[];t.eachComponent("visualMap",function(t){var e;t.isTargetSeries(n)&&(e=t.getVisualMeta(B(CH,null,n,t))||{stops:[],outerColors:[]},t=t.getDataDimension(i),null!=(t=i.getDimensionInfo(t))&&(e.dimension=t.index,o.push(e)))}),n.getData().setVisual("visualMeta",o)}});var DH,AH=function(t,e,n){e=C((LH[t]||{})[e]);return n&&F(e)?e[e.length-1]:e},LH={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]}},kH=jD.mapVisual,PH=jD.eachVisual,OH=F,RH=N,NH=zu,EH=Ru,vm=(l(zH,DH=nf),zH.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n)},zH.prototype.optionUpdated=function(t,e){var n=this.option;w.canvasSupported||(n.realtime=!1),e||lF(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},zH.prototype.resetVisual=function(t){var e=this.stateList;t=B(t,this),this.controllerVisuals=sF(this.option.controller,e,t),this.targetVisuals=sF(this.option.target,e,t)},zH.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,n=[];return null==t||"all"===t?this.ecModel.eachSeries(function(t,e){n.push(e)}):n=lh(t),n},zH.prototype.eachTargetSeries=function(e,n){N(this.getTargetSeriesIndices(),function(t){t=this.ecModel.getSeriesByIndex(t);t&&e.call(n,t)},this)},zH.prototype.isTargetSeries=function(e){var n=!1;return this.eachTargetSeries(function(t){t===e&&(n=!0)}),n},zH.prototype.formatValueText=function(t,e,n){var i,o=this.option,r=o.precision,a=this.dataBound,o=o.formatter;n=n||["<",">"],F(t)&&(t=t.slice(),i=!0);e=e?t:i?[s(t[0]),s(t[1])]:s(t);return H(o)?o.replace("{value}",i?e[0]:e).replace("{value2}",i?e[1]:e):G(o)?i?o(t[0],t[1]):o(t):i?t[0]===a[0]?n[0]+" "+e[1]:t[1]===a[1]?n[1]+" "+e[0]:e[0]+" - "+e[1]:e;function s(t){return t===a[0]?"min":t===a[1]?"max":(+t).toFixed(Math.min(r,20))}},zH.prototype.resetExtent=function(){var t=this.option,t=NH([t.min,t.max]);this._dataExtent=t},zH.prototype.getDataDimension=function(t){var e=this.option.dimension,n=t.dimensions;if(null!=e||n.length){if(null!=e)return t.getDimension(e);for(var i=t.dimensions,o=i.length-1;0<=o;o--){var r=i[o];if(!t.getDimensionInfo(r).isCalculationCoord)return r}}},zH.prototype.getExtent=function(){return this._dataExtent.slice()},zH.prototype.completeVisualOption=function(){var e=this.ecModel,n=this.option,t={inRange:n.inRange,outOfRange:n.outOfRange},i=n.target||(n.target={}),o=n.controller||(n.controller={});b(i,t),b(o,t);var l=this.isCategory();function r(t){OH(n.color)&&!t.inRange&&(t.inRange={color:n.color.slice().reverse()}),t.inRange=t.inRange||{color:e.get("gradientColor")}}r.call(this,i),r.call(this,o),function(t,e,n){var e=t[e],i=t[n];e&&!i&&(i=t[n]={},RH(e,function(t,e){var n;!jD.isValidType(e)||null!=(n=AH(e,"inactive",l))&&(i[e]=n,"color"!==e||i.hasOwnProperty("opacity")||i.hasOwnProperty("colorAlpha")||(i.opacity=[0,0]))}))}.call(this,i,"inRange","outOfRange"),function(o){var r=(o.inRange||{}).symbol||(o.outOfRange||{}).symbol,a=(o.inRange||{}).symbolSize||(o.outOfRange||{}).symbolSize,s=this.get("inactiveColor");RH(this.stateList,function(t){var e=this.itemSize,n=o[t];null==(n=n||(o[t]={color:l?s:[s]})).symbol&&(n.symbol=r&&C(r)||(l?"roundRect":["roundRect"])),null==n.symbolSize&&(n.symbolSize=a&&C(a)||(l?e[0]:[e[0],e[0]])),n.symbol=kH(n.symbol,function(t){return"none"===t||"square"===t?"roundRect":t});var i,t=n.symbolSize;null!=t&&(i=-1/0,PH(t,function(t){i<t&&(i=t)}),n.symbolSize=kH(t,function(t){return EH(t,[0,i],[0,e[0]],!0)}))},this)}.call(this,o)},zH.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},zH.prototype.isCategory=function(){return!!this.option.categories},zH.prototype.setSelected=function(t){},zH.prototype.getSelected=function(){return null},zH.prototype.getValueState=function(t){return null},zH.prototype.getVisualMeta=function(t){return null},zH.type="visualMap",zH.dependencies=["series"],zH.defaultOption={show:!0,zlevel:0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},zH);function zH(){var t=null!==DH&&DH.apply(this,arguments)||this;return t.type=zH.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-1/0,1/0],t.targetVisuals={},t.controllerVisuals={},t}var BH,VH=[20,140],nd=(l(FH,BH=vm),FH.prototype.optionUpdated=function(t,e){BH.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()}),this._resetRange()},FH.prototype.resetItemSize=function(){BH.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;null!=t[0]&&!isNaN(t[0])||(t[0]=VH[0]),null!=t[1]&&!isNaN(t[1])||(t[1]=VH[1])},FH.prototype._resetRange=function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):F(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},FH.prototype.completeVisualOption=function(){BH.prototype.completeVisualOption.apply(this,arguments),N(this.stateList,function(t){t=this.option.controller[t].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},FH.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},FH.prototype.getSelected=function(){var t=this.getExtent(),e=zu((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},FH.prototype.getValueState=function(t){var e=this.option.range,n=this.getExtent();return(e[0]<=n[0]||e[0]<=t)&&(e[1]>=n[1]||t<=e[1])?"inRange":"outOfRange"},FH.prototype.findTargetDataIndices=function(i){var o=[];return this.eachTargetSeries(function(t){var n=[],e=t.getData();e.each(this.getDataDimension(e),function(t,e){i[0]<=t&&t<=i[1]&&n.push(e)},this),o.push({seriesId:t.id,dataIndex:n})},this),o},FH.prototype.getVisualMeta=function(n){var t=GH(0,0,this.getExtent()),e=GH(0,0,this.option.range.slice()),i=[];function o(t,e){i.push({value:t,color:n(t,e)})}for(var r=0,a=0,s=e.length,l=t.length;a<l&&(!e.length||t[a]<=e[0]);a++)t[a]<e[r]&&o(t[a],"outOfRange");for(var u=1;r<s;r++,u=0)u&&i.length&&o(e[r],"outOfRange"),o(e[r],"inRange");for(u=1;a<l;a++)(!e.length||e[e.length-1]<t[a])&&(u&&(i.length&&o(i[i.length-1].value,"outOfRange"),u=0),o(t[a],"outOfRange"));var h=i.length;return{stops:i,outerColors:[h?i[0].color:"transparent",h?i[h-1].color:"transparent"]}},FH.type="visualMap.continuous",FH.defaultOption=Xp(vm.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),FH);function FH(){var t=null!==BH&&BH.apply(this,arguments)||this;return t.type=FH.type,t}function GH(t,e,n){if(n[0]===n[1])return n.slice();for(var i=(n[1]-n[0])/200,o=n[0],r=[],a=0;a<=200&&o<n[1];a++)r.push(o),o+=i;return r.push(n[1]),r}nf.registerClass(nd);var HH,Op=(l(WH,HH=qy),WH.prototype.init=function(t,e){this.ecModel=t,this.api=e},WH.prototype.render=function(t,e,n,i){!1!==(this.visualMapModel=t).get("show")?this.doRender(t,e,n,i):this.group.removeAll()},WH.prototype.renderBackground=function(t){var e=this.visualMapModel,n=Cd(e.get("padding")||0),i=t.getBoundingRect();t.add(new ga({z2:-1,silent:!0,shape:{x:i.x-n[3],y:i.y-n[0],width:i.width+n[3]+n[1],height:i.height+n[0]+n[2]},style:{fill:e.get("backgroundColor"),stroke:e.get("borderColor"),lineWidth:e.get("borderWidth")}}))},WH.prototype.getControllerVisual=function(n,i,o){var t,e=(o=o||{}).forceState,r=this.visualMapModel,a={};function s(t){return a[t]}function l(t,e){a[t]=e}"symbol"===i&&(a.symbol=r.get("itemSymbol")),"color"===i&&(t=r.get("contentColor"),a.color=t);var u=r.controllerVisuals[e||r.getValueState(n)];return N(jD.prepareVisualTypes(u),function(t){var e=u[t];o.convertOpacityToAlpha&&"opacity"===t&&(t="colorAlpha",e=u.__alphaForOpacity),jD.dependsOn(t,i)&&e&&e.applyVisual(n,s,l)}),a[i]},WH.prototype.positionGroup=function(t){var e=this.visualMapModel,n=this.api;Ud(t,e.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})},WH.prototype.doRender=function(t,e,n,i){},WH.type="visualMap",WH);function WH(){var t=null!==HH&&HH.apply(this,arguments)||this;return t.type=WH.type,t.autoPositionValues={left:1,right:1,top:1,bottom:1},t}qy.registerClass(Op);var XH=[["left","right","width"],["top","bottom","height"]];function YH(t,e,n){var i=t.option,o=i.align;if(null!=o&&"auto"!==o)return o;for(var t={width:e.getWidth(),height:e.getHeight()},r="horizontal"===i.orient?1:0,a=XH[r],s=[0,null,10],l={},u=0;u<3;u++)l[XH[1-r][u]]=s[u],l[a[u]]=2===u?n[0]:i[a[u]];o=[["x","width",3],["y","height",0]][r],e=Yd(l,t,i.padding);return a[(e.margin[o[2]]||0)+e[o[0]]+.5*e[o[1]]<.5*t[o[1]]?0:1]}function UH(t,e){return N(t||[],function(t){null!=t.dataIndex&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),t}var ZH,jH=Ru,qH=N,KH=Math.min,$H=Math.max,nd=(l(JH,ZH=Op),JH.prototype.doRender=function(t,e,n,i){this._api=n,i&&"selectDataRange"===i.type&&i.from===this.uid||this._buildView()},JH.prototype._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);t=t.get("text");this._renderEndsText(e,t,0),this._renderEndsText(e,t,1),this._updateView(!0),this.renderBackground(e),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(e)},JH.prototype._renderEndsText=function(t,e,n){var i,o,r;e&&(i=null!=(i=e[1-n])?i+"":"",o=(r=this.visualMapModel).get("textGap"),e=r.itemSize,r=this._shapes.mainGroup,e=this._applyTransform([e[0]/2,0===n?-o:e[1]+o],r),o=this._applyTransform(0===n?"bottom":"top",r),n=this._orient,r=this.visualMapModel.textStyleModel,this.group.add(new vl({style:{x:e[0],y:e[1],verticalAlign:"horizontal"===n?"middle":o,align:"horizontal"===n?o:"center",text:i,font:r.getFont(),fill:r.getTextColor()}})))},JH.prototype._renderBar=function(t){var e=this.visualMapModel,n=this._shapes,i=e.itemSize,o=this._orient,r=this._useHandle,a=YH(e,this.api,i),s=n.mainGroup=this._createBarGroup(a),a=new $r;s.add(a),a.add(n.outOfRange=QH()),a.add(n.inRange=QH(null,r?eW(this._orient):null,B(this._dragHandle,this,"all",!1),B(this._dragHandle,this,"all",!0))),a.setClipPath(new ga({shape:{x:0,y:0,width:i[0],height:i[1],r:3}}));a=e.textStyleModel.getTextRect("国"),a=$H(a.width,a.height);r&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(e,s,0,i,a,o),this._createHandle(e,s,1,i,a,o)),this._createIndicator(e,s,i,a,o),t.add(s)},JH.prototype._createHandle=function(t,e,n,i,o,r){var a=B(this._dragHandle,this,n,!1),s=B(this._dragHandle,this,n,!0),l=ti(t.get("handleSize"),i[0]),u=px(t.get("handleIcon"),-l/2,-l/2,l,l,null,!0),h=eW(this._orient);u.attr({cursor:h,draggable:!0,drift:a,ondragend:s,onmousemove:function(t){ie(t.event)}}),u.x=i[0]/2,u.useStyle(t.getModel("handleStyle").getItemStyle()),u.setStyle({strokeNoScale:!0,strokeFirst:!0}),u.style.lineWidth*=2,u.ensureState("emphasis").style=t.getModel(["emphasis","handleStyle"]).getItemStyle(),Nc(u,!0),e.add(u);e=this.visualMapModel.textStyleModel,s=new vl({cursor:h,draggable:!0,drift:a,onmousemove:function(t){ie(t.event)},ondragend:s,style:{x:0,y:0,text:"",font:e.getFont(),fill:e.getTextColor()}});s.ensureState("blur").style={opacity:.1},s.stateTransition={duration:200},this.group.add(s);e=[l,0],l=this._shapes;l.handleThumbs[n]=u,l.handleLabelPoints[n]=e,l.handleLabels[n]=s},JH.prototype._createIndicator=function(t,e,n,i,o){var r=ti(t.get("indicatorSize"),n[0]),a=px(t.get("indicatorIcon"),-r/2,-r/2,r,r,null,!0);a.attr({cursor:"move",invisible:!0,silent:!0,x:n[0]/2});r=t.getModel("indicatorStyle").getItemStyle();a instanceof na?(t=a.style,a.useStyle(O({image:t.image,x:t.x,y:t.y,width:t.width,height:t.height},r))):a.useStyle(r),e.add(a);e=this.visualMapModel.textStyleModel,e=new vl({silent:!0,invisible:!0,style:{x:0,y:0,text:"",font:e.getFont(),fill:e.getTextColor()}});this.group.add(e);i=[("horizontal"===o?i/2:6)+n[0]/2,0],n=this._shapes;n.indicator=a,n.indicatorLabel=e,n.indicatorLabelPoint=i,this._firstShowIndicator=!0},JH.prototype._dragHandle=function(t,e,n,i){this._useHandle&&(this._dragging=!e,e||(i=this._applyTransform([n,i],this._shapes.mainGroup,!0),this._updateInterval(t,i[1]),this._hideIndicator(),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():tW(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1))},JH.prototype._resetInterval=function(){var t=this.visualMapModel,e=this._dataInterval=t.getSelected(),n=t.getExtent(),t=[0,t.itemSize[1]];this._handleEnds=[jH(e[0],n,t,!0),jH(e[1],n,t,!0)]},JH.prototype._updateInterval=function(t,e){e=e||0;var n=this.visualMapModel,i=this._handleEnds,o=[0,n.itemSize[1]];nk(e,i,o,t,0);n=n.getExtent();this._dataInterval=[jH(i[0],o,n,!0),jH(i[1],o,n,!0)]},JH.prototype._updateView=function(t){var e=this.visualMapModel,n=e.getExtent(),i=this._shapes,o=[0,e.itemSize[1]],e=t?o:this._handleEnds,t=this._createBarVisual(this._dataInterval,n,e,"inRange"),o=this._createBarVisual(n,n,o,"outOfRange");i.inRange.setStyle({fill:t.barColor}).setShape("points",t.barPoints),i.outOfRange.setStyle({fill:o.barColor}).setShape("points",o.barPoints),this._updateHandle(e,t)},JH.prototype._createBarVisual=function(t,e,n,i){var o={forceState:i,convertOpacityToAlpha:!0},i=this._makeColorGradient(t,o),o=[this.getControllerVisual(t[0],"symbolSize",o),this.getControllerVisual(t[1],"symbolSize",o)],o=this._createBarPoints(n,o);return{barColor:new Va(0,0,0,1,i),barPoints:o,handlesColor:[i[0].color,i[i.length-1].color]}},JH.prototype._makeColorGradient=function(t,e){var n=[],i=(t[1]-t[0])/100;n.push({color:this.getControllerVisual(t[0],"color",e),offset:0});for(var o=1;o<100;o++){var r=t[0]+i*o;if(r>t[1])break;n.push({color:this.getControllerVisual(r,"color",e),offset:o/100})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},JH.prototype._createBarPoints=function(t,e){var n=this.visualMapModel.itemSize;return[[n[0]-e[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-e[1],t[1]]]},JH.prototype._createBarGroup=function(t){var e=this._orient,n=this.visualMapModel.get("inverse");return new $r("horizontal"!==e||n?"horizontal"===e&&n?{scaleX:"bottom"===t?-1:1,rotation:-Math.PI/2}:"vertical"!==e||n?{scaleX:"left"===t?1:-1}:{scaleX:"left"===t?1:-1,scaleY:-1}:{scaleX:"bottom"===t?1:-1,rotation:Math.PI/2})},JH.prototype._updateHandle=function(i,o){var r,a,s,l,u,h;this._useHandle&&(r=this._shapes,a=this.visualMapModel,s=r.handleThumbs,l=r.handleLabels,u=a.itemSize,h=a.getExtent(),qH([0,1],function(t){var e=s[t];e.setStyle("fill",o.handlesColor[t]),e.y=i[t];var n=jH(i[t],[0,u[1]],h,!0),n=this.getControllerVisual(n,"symbolSize");e.scaleX=e.scaleY=n/u[0],e.x=u[0]-n/2;e=rp(r.handleLabelPoints[t],op(e,this.group));l[t].setStyle({x:e[0],y:e[1],text:a.formatValueText(this._dataInterval[t]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",r.mainGroup):"center"})},this))},JH.prototype._showIndicator=function(t,e,n,i){var o=this.visualMapModel,r=o.getExtent(),a=o.itemSize,s=[0,a[1]],l=this._shapes,u=l.indicator;if(u){u.attr("invisible",!1);var h=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0}),c=this.getControllerVisual(t,"symbolSize"),p=jH(t,r,s,!0),t=a[0]-c/2,r={x:u.x,y:u.y};u.y=p,u.x=t;s=rp(l.indicatorLabelPoint,op(u,this.group)),a=l.indicatorLabel;a.attr("invisible",!1);c=this._applyTransform("left",l.mainGroup),l="horizontal"===this._orient;a.setStyle({text:(n||"")+o.formatValueText(e),verticalAlign:l?c:"middle",align:l?"center":c});h={x:t,y:p,style:{fill:h}},s={style:{x:s[0],y:s[1]}};o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator?(o={duration:100,easing:"cubicInOut",additive:!0},u.x=r.x,u.y=r.y,u.animateTo(h,o),a.animateTo(s,o)):(u.attr(h),a.attr(s)),this._firstShowIndicator=!1;var d=this._shapes.handleLabels;if(d)for(var f=0;f<d.length;f++)this._api.enterBlur(d[f])}},JH.prototype._enableHoverLinkToSeries=function(){var n=this;this._shapes.mainGroup.on("mousemove",function(t){var e;n._hovering=!0,n._dragging||(e=n.visualMapModel.itemSize,(t=n._applyTransform([t.offsetX,t.offsetY],n._shapes.mainGroup,!0,!0))[1]=KH($H(0,t[1]),e[1]),n._doHoverLinkToSeries(t[1],0<=t[0]&&t[0]<=e[0]))}).on("mouseout",function(){n._hovering=!1,n._dragging||n._clearHoverLinkToSeries()})},JH.prototype._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()},JH.prototype._doHoverLinkToSeries=function(t,e){var n,i,o,r=this.visualMapModel,a=r.itemSize;function s(t,e,n){for(var i=0,o=t.length;i<o;i++){var r=gh(t[i].seriesId,null);if(null==r)return;for(var a=lh(t[i].dataIndex),s=n&&n[r],l=0,u=a.length;l<u;l++){var h=a[l];s&&s[h]?s[h]=null:(e[r]||(e[r]={}))[h]=1}}}function l(t,e){var n,i,o=[];for(n in t){t.hasOwnProperty(n)&&null!=t[n]&&(e?o.push(+n):(i=l(t[n],!0)).length&&o.push({seriesId:n,dataIndex:i}))}return o}r.option.hoverLink&&(n=[0,a[1]],i=r.getExtent(),a=[(t=KH($H(n[0],t),n[1]))-(o=function(t,e,n){var i=6,t=t.get("hoverLinkDataSize");t&&(i=jH(t,e,n,!0)/2);return i}(r,i,n)),t+o],t=jH(t,n,i,!0),i=[jH(a[0],n,i,!0),jH(a[1],n,i,!0)],a[0]<n[0]&&(i[0]=-1/0),n[1]<a[1]&&(i[1]=1/0),e&&(i[0]===-1/0?this._showIndicator(t,i[1],"< ",o):i[1]===1/0?this._showIndicator(t,i[0],"> ",o):this._showIndicator(t,t,"≈ ",o)),t=this._hoverLinkDataIndices,o=[],(e||tW(r))&&(o=this._hoverLinkDataIndices=r.findTargetDataIndices(i)),i=o,o={},s(t||[],t={}),s(i||[],o,t),o=[l(t),l(o)],this._dispatchHighDown("downplay",UH(o[0],r)),this._dispatchHighDown("highlight",UH(o[1],r)))},JH.prototype._hoverLinkFromSeriesMouseOver=function(t){var e=t.target,n=this.visualMapModel;e&&null!=Wh(e).dataIndex&&(t=Wh(e),e=this.ecModel.getSeriesByIndex(t.seriesIndex),n.isTargetSeries(e)&&(t=(e=e.getData(t.dataType)).get(n.getDataDimension(e),t.dataIndex),isNaN(t)||this._showIndicator(t,t)))},JH.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var e=this._shapes.handleLabels;if(e)for(var n=0;n<e.length;n++)this._api.leaveBlur(e[n])},JH.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",UH(t,this.visualMapModel)),t.length=0},JH.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},JH.prototype._applyTransform=function(t,e,n,i){i=op(e,i?null:this.group);return(F(t)?rp:ap)(t,i,n)},JH.prototype._dispatchHighDown=function(t,e){e&&e.length&&this.api.dispatchAction({type:t,batch:e})},JH.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},JH.prototype.remove=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},JH.type="visualMap.continuous",JH);function JH(){var t=null!==ZH&&ZH.apply(this,arguments)||this;return t.type=JH.type,t._shapes={},t._dataInterval=[],t._handleEnds=[],t._hoverLinkDataIndices=[],t}function QH(t,e,n,i){return new La({shape:{points:t},draggable:!!n,cursor:e,drift:n,onmousemove:function(t){ie(t.event)},ondragend:i})}function tW(t){var e=t.get("hoverLinkOnHandle");return null==e?t.get("realtime"):e}function eW(t){return"vertical"===t?"ns-resize":"ew-resize"}qy.registerClass(nd);A_({type:"selectDataRange",event:"dataRangeSelected",update:"update"},function(e,t){t.eachComponent({mainType:"visualMap",query:e},function(t){t.setSelected(e.selected)})}),C_(IH);var nW,vm=(l(iW,nW=vm),iW.prototype.optionUpdated=function(t,e){nW.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var n=this._mode=this._determineMode();this._pieceList=[],oW[this._mode].call(this,this._pieceList),this._resetSelected(t,e);var i=this.option.categories;this.resetVisual(function(t,e){"categories"===n?(t.mappingMethod="category",t.categories=C(i)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=P(this._pieceList,function(t){return t=C(t),"inRange"!==e&&(t.visual=null),t}))})},iW.prototype.completeVisualOption=function(){var i=this.option,n={},t=jD.listVisualTypes(),o=this.isCategory();function r(t,e,n){return t&&t[e]&&t[e].hasOwnProperty(n)}N(i.pieces,function(e){N(t,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),N(n,function(t,e){var n=!1;N(this.stateList,function(t){n=n||r(i,t,e)||r(i.target,t,e)},this),n||N(this.stateList,function(t){(i[t]||(i[t]={}))[e]=AH(e,"inRange"===t?"active":"inactive",o)})},this),nW.prototype.completeVisualOption.apply(this,arguments)},iW.prototype._resetSelected=function(t,e){var n,i=this.option,o=this._pieceList,r=(e?i:t).selected||{};i.selected=r,N(o,function(t,e){t=this.getSelectedMapKey(t);r.hasOwnProperty(t)||(r[t]=!0)},this),"single"===i.selectedMode&&(n=!1,N(o,function(t,e){t=this.getSelectedMapKey(t);r[t]&&(n?r[t]=!1:n=!0)},this))},iW.prototype.getSelectedMapKey=function(t){return"categories"===this._mode?t.value+"":t.index+""},iW.prototype.getPieceList=function(){return this._pieceList},iW.prototype._determineMode=function(){var t=this.option;return t.pieces&&0<t.pieces.length?"pieces":this.option.categories?"categories":"splitNumber"},iW.prototype.setSelected=function(t){this.option.selected=C(t)},iW.prototype.getValueState=function(t){t=jD.findPieceIndex(t,this._pieceList);return null!=t&&this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?"inRange":"outOfRange"},iW.prototype.findTargetDataIndices=function(i){var o=[],r=this._pieceList;return this.eachTargetSeries(function(t){var n=[],e=t.getData();e.each(this.getDataDimension(e),function(t,e){jD.findPieceIndex(t,r)===i&&n.push(e)},this),o.push({seriesId:t.id,dataIndex:n})},this),o},iW.prototype.getRepresentValue=function(t){return this.isCategory()||null!=t.value?t.value:(t=t.interval||[])[0]===-1/0&&t[1]===1/0?0:(t[0]+t[1])/2},iW.prototype.getVisualMeta=function(i){if(!this.isCategory()){var t,o=[],r=["",""],a=this,e=this._pieceList.slice();e.length?((t=e[0].interval[0])!==-1/0&&e.unshift({interval:[-1/0,t]}),(t=e[e.length-1].interval[1])!==1/0&&e.push({interval:[t,1/0]})):e.push({interval:[-1/0,1/0]});var n=-1/0;return N(e,function(t){t=t.interval;t&&(t[0]>n&&s([n,t[0]],"outOfRange"),s(t.slice()),n=t[1])},this),{stops:o,outerColors:r}}function s(t,e){var n=a.getRepresentValue({interval:t});e=e||a.getValueState(n);e=i(n,e);t[0]===-1/0?r[0]=e:t[1]===1/0?r[1]=e:o.push({value:t[0],color:e},{value:t[1],color:e})}},iW.type="visualMap.piecewise",iW.defaultOption=Xp(vm.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),iW);function iW(){var t=null!==nW&&nW.apply(this,arguments)||this;return t.type=iW.type,t._pieceList=[],t}var oW={splitNumber:function(t){var e=this.option,n=Math.min(e.precision,20),i=this.getExtent(),o=e.splitNumber,o=Math.max(parseInt(o,10),1);e.splitNumber=o;for(var r=(i[1]-i[0])/o;+r.toFixed(n)!==r&&n<5;)n++;e.precision=n,r=+r.toFixed(n),e.minOpen&&t.push({interval:[-1/0,i[0]],close:[0,0]});for(var a=0,s=i[0];a<o;s+=r,a++){var l=a===o-1?i[1]:s+r;t.push({interval:[s,l],close:[1,1]})}e.maxOpen&&t.push({interval:[i[1],1/0],close:[0,0]}),$u(t),N(t,function(t,e){t.index=e,t.text=this.formatValueText(t.interval)},this)},categories:function(e){var t=this.option;N(t.categories,function(t){e.push({text:this.formatValueText(t,!0),value:t})},this),rW(t,e)},pieces:function(c){var t=this.option;N(t.pieces,function(t,e){Y(t)||(t={value:t});var n={text:"",index:e};if(null!=t.label&&(n.text=t.label),t.hasOwnProperty("value")){e=n.value=t.value;n.interval=[e,e],n.close=[1,1]}else{for(var i=n.interval=[],o=n.close=[0,0],r=[1,0,1],a=[-1/0,1/0],s=[],l=0;l<2;l++){for(var u=[["gte","gt","min"],["lte","lt","max"]][l],h=0;h<3&&null==i[l];h++)i[l]=t[u[h]],o[l]=r[h],s[l]=2===h;null==i[l]&&(i[l]=a[l])}s[0]&&i[1]===1/0&&(o[0]=0),s[1]&&i[0]===-1/0&&(o[1]=0),i[0]===i[1]&&o[0]&&o[1]&&(n.value=i[0])}n.visual=jD.retrieveVisuals(t),c.push(n)},this),rW(t,c),$u(c),N(c,function(t){var e=t.close,e=[["<","≤"][e[1]],[">","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,e)},this)}};function rW(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}nf.registerClass(vm);var aW,Op=(l(sW,aW=Op),sW.prototype.doRender=function(){var i=this.group;i.removeAll();var o=this.visualMapModel,r=o.get("textGap"),t=o.textStyleModel,a=t.getFont(),s=t.getTextColor(),l=this._getItemAlign(),u=o.itemSize,e=this._getViewData(),t=e.endsText,h=Q(o.get("showLabel",!0),!t);t&&this._renderEndsText(i,t[0],u,h,l),N(e.viewPieceList,function(t){var e=t.piece,n=new $r;n.onclick=B(this._onItemClick,this,e),this._enableHoverLink(n,t.indexInModelPieceList);t=o.getRepresentValue(e);this._createItemSymbol(n,t,[0,0,u[0],u[1]]),h&&(t=this.visualMapModel.getValueState(t),n.add(new vl({style:{x:"right"===l?-r:u[0]+r,y:u[1]/2,text:e.text,verticalAlign:"middle",align:l,font:a,fill:s,opacity:"outOfRange"===t?.5:1}}))),i.add(n)},this),t&&this._renderEndsText(i,t[1],u,h,l),Xd(o.get("orient"),i,o.get("itemGap")),this.renderBackground(i),this.positionGroup(i)},sW.prototype._enableHoverLink=function(t,n){var i=this;t.on("mouseover",function(){return e("highlight")}).on("mouseout",function(){return e("downplay")});var e=function(t){var e=i.visualMapModel;e.option.hoverLink&&i.api.dispatchAction({type:t,batch:UH(e.findTargetDataIndices(n),e)})}},sW.prototype._getItemAlign=function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return YH(t,this.api,t.itemSize);e=e.align;return e&&"auto"!==e||(e="left"),e},sW.prototype._renderEndsText=function(t,e,n,i,o){var r,a;e&&(r=new $r,a=this.visualMapModel.textStyleModel,r.add(new vl({style:{x:i?"right"===o?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?o:"center",text:e,font:a.getFont(),fill:a.getTextColor()}})),t.add(r))},sW.prototype._getViewData=function(){var t=this.visualMapModel,e=P(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),n=t.get("text"),i=t.get("orient"),t=t.get("inverse");return("horizontal"===i?t:!t)?e.reverse():n=n&&n.slice().reverse(),{viewPieceList:e,endsText:n}},sW.prototype._createItemSymbol=function(t,e,n){t.add(px(this.getControllerVisual(e,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(e,"color")))},sW.prototype._onItemClick=function(t){var e=this.visualMapModel,n=e.option,i=C(n.selected),o=e.getSelectedMapKey(t);"single"===n.selectedMode?(i[o]=!0,N(i,function(t,e){i[e]=e===o})):i[o]=!i[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:i})},sW.type="visualMap.piecewise",sW);function sW(){var t=null!==aW&&aW.apply(this,arguments)||this;return t.type=sW.type,t}qy.registerClass(Op),C_(IH);var lW={label:{enabled:!0},decal:{show:!1}},uW=_h(),hW={};Op=r.VISUAL.ARIA;function cW(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}C_(function(t){var e;t&&t.aria&&(null!=(e=t.aria).show&&(e.enabled=e.show),e.label=e.label||{},N(["description","general","series","data"],function(t){null!=e[t]&&(e.label[t]=e[t])}))}),P_(Op,function(f,o){var t,r=f.getModel("aria");function g(t,e){if("string"!=typeof t)return t;var n=t;return N(e,function(t,e){n=n.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),n}r.get("enabled")&&(b((t=C(lW)).label,f.getLocaleModel().get("aria"),!1),b(r.option,t,!1),function(){{var n;r.getModel("decal").get("show")&&(n=ct(),f.eachSeries(function(t){var e;t.useColorPaletteOnData&&((e=n.get(t.type))||(e={},n.set(t.type,e)),uW(t).scope=e)}),f.eachRawSeries(function(i){var o,r,a,s,l,t,e;function u(t,e){e=t?O(O({},e),t):e;return e.dirty=!0,e}f.isSeriesFiltered(i)||("function"!=typeof i.enableAriaDecal?(o=i.getData(),i.useColorPaletteOnData?(r=i.getRawData(),a={},s=uW(i).scope,o.each(function(t){var e=o.getRawIndex(t);a[e]=t}),l=r.count(),r.each(function(t){var e=a[t],n=r.getName(t)||t+"",t=Of(i.ecModel,n,s,l),n=o.getItemVisual(e,"decal");o.setItemVisual(e,"decal",u(n,t))})):(t=Of(i.ecModel,i.name,hW,f.getSeriesCount()),e=o.getVisual("decal"),o.setVisual("decal",u(e,t)))):i.enableAriaDecal())}))}}(),function(){var t=f.getLocaleModel().get("aria"),u=r.getModel("label");if(u.option=A(u.option,t),!u.get("enabled"))return;var e=o.getZr().dom;if(u.get("description"))return e.setAttribute("aria-label",u.get("description"));var h=f.getSeriesCount(),c=u.get(["data","maxCount"])||10,n=u.get(["series","maxCount"])||10,p=Math.min(h,n);{var d,i;h<1||(i=function(){var t=f.get("title");t&&t.length&&(t=t[0]);return t&&t.text}(),t=i?g(u.get(["general","withTitle"]),{title:i}):u.get(["general","withoutTitle"]),d=[],n=1<h?u.get(["series","multiple","prefix"]):u.get(["series","single","prefix"]),t+=g(n,{seriesCount:h}),f.eachSeries(function(t,e){if(e<p){var n=void 0,e=t.get("name")?"withName":"withoutName";n=g(n=1<h?u.get(["series","multiple",e]):u.get(["series","single",e]),{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:(e=t.subType,f.getLocaleModel().get(["series","typeNames"])[e]||"自定义图")});var i=t.getData();i.count()>c?n+=g(u.get(["data","partialData"]),{displayCnt:c}):n+=u.get(["data","allData"]);for(var o,r,a,s=[],l=0;l<i.count();l++){l<c&&(o=i.getName(l),r=Rg(i,l),a=u.get(["data",o?"withName":"withoutName"]),s.push(g(a,{name:o,value:r})))}e=u.get(["data","separator","middle"]),t=u.get(["data","separator","end"]);n+=s.join(e)+t,d.push(n)}}),i=u.getModel(["series","multiple","separator"]),n=i.get("middle"),i=i.get("end"),t+=d.join(n)+i,e.setAttribute("aria-label",t))}}())});var pW="none",dW=Math.round,fW=Math.sin,gW=Math.cos,yW=Math.PI,mW=2*Math.PI,vW=180/yW;function xW(t){return dW(1e3*t)/1e3}function _W(t){return dW(1e4*t)/1e4}function bW(t){return t<1e-4&&-1e-4<t}function wW(t,e){e&&SW(t,"transform","matrix("+xW(e[0])+","+xW(e[1])+","+xW(e[2])+","+xW(e[3])+","+_W(e[4])+","+_W(e[5])+")")}function SW(t,e,n){n&&("linear"===n.type||"radial"===n.type)||t.setAttribute(e,n)}function MW(t,e,n){var i,o,r,a=null==e.opacity?1:e.opacity;null!=(i=(i=e).fill)&&i!==pW?(SW(t,"fill",r="transparent"===(r=e.fill)?pW:r),SW(t,"fill-opacity",(null!=e.fillOpacity?e.fillOpacity*a:a)+"")):SW(t,"fill",pW),null!=(r=(r=e).stroke)&&r!==pW?(SW(t,"stroke",r="transparent"===(r=e.stroke)?pW:r),r=e.lineWidth,SW(t,"stroke-width",((o=e.strokeNoScale?n.getLineScale():1)?r/o:0)+""),SW(t,"paint-order",e.strokeFirst?"stroke":"fill"),SW(t,"stroke-opacity",(null!=e.strokeOpacity?e.strokeOpacity*a:a)+""),(a=e.lineDash&&0<r&&kv(e.lineDash,r))?(r=e.lineDashOffset,o&&1!==o&&(a=P(a,function(t){return t/o}),r=r&&dW(r/=o)),SW(t,"stroke-dasharray",a.join(",")),SW(t,"stroke-dashoffset",(r||0)+"")):SW(t,"stroke-dasharray",""),e.lineCap&&SW(t,"stroke-linecap",e.lineCap),e.lineJoin&&SW(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&SW(t,"stroke-miterlimit",e.miterLimit+"")):SW(t,"stroke",pW)}var IW=(TW.prototype.reset=function(){this._d=[],this._str=""},TW.prototype.moveTo=function(t,e){this._add("M",t,e)},TW.prototype.lineTo=function(t,e){this._add("L",t,e)},TW.prototype.bezierCurveTo=function(t,e,n,i,o,r){this._add("C",t,e,n,i,o,r)},TW.prototype.quadraticCurveTo=function(t,e,n,i){this._add("Q",t,e,n,i)},TW.prototype.arc=function(t,e,n,i,o,r){this.ellipse(t,e,n,n,0,i,o,r)},TW.prototype.ellipse=function(t,e,n,i,o,r,a,s){var l=0===this._d.length,u=a-r,h=!s,c=Math.abs(u),p=bW(c-mW)||(h?mW<=u:mW<=-u),a=!1,a=!!p||!bW(c)&&yW<=(0<u?u%mW:u%mW+mW)==!!h,s=_W(t+n*gW(r)),c=_W(e+i*fW(r));p&&(u=h?mW-1e-4:1e-4-mW,a=!0,l&&this._d.push("M",s,c));t=_W(t+n*gW(r+u)),u=_W(e+i*fW(r+u));if(isNaN(s)||isNaN(c)||isNaN(n)||isNaN(i)||isNaN(o)||isNaN(vW)||isNaN(t)||isNaN(u))return"";this._d.push("A",_W(n),_W(i),dW(o*vW),+a,+h,t,u)},TW.prototype.rect=function(t,e,n,i){this._add("M",t,e),this._add("L",t+n,e),this._add("L",t+n,e+i),this._add("L",t,e+i),this._add("L",t,e)},TW.prototype.closePath=function(){0<this._d.length&&this._add("Z")},TW.prototype._add=function(t,e,n,i,o,r,a,s,l){this._d.push(t);for(var u=1;u<arguments.length;u++){var h=arguments[u];if(isNaN(h))return void(this._invalid=!0);this._d.push(_W(h))}},TW.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(" "),this._d=[]},TW.prototype.getStr=function(){return this._str},TW);function TW(){}var CW={brush:function(t){var e=t.style,n=t.__svgEl;n||(n=cW("path"),t.__svgEl=n),t.path||t.createPathProxy();var i=t.path;t.shapeChanged()&&(i.beginPath(),t.buildPath(i,t.shape),t.pathUpdated());var o=i.getVersion(),r=t,a=r.__svgPathBuilder;(r.__svgPathVersion!==o||!a||t.style.strokePercent<1)&&((a=a||(r.__svgPathBuilder=new IW)).reset(),i.rebuildPath(a,t.style.strokePercent),a.generateStr(),r.__svgPathVersion=o),SW(n,"d",a.getStr()),MW(n,e,t),wW(n,t.transform)}},DW={brush:function(t){var e,n,i,o,r,a,s=t.style,l=s.image;l instanceof HTMLImageElement&&(l=l.src),l&&(e=s.x||0,n=s.y||0,i=s.width,o=s.height,(r=t.__svgEl)||(r=cW("image"),t.__svgEl=r),l!==t.__imageSrc&&(a="href",s=l,r.setAttributeNS("http://www.w3.org/1999/xlink",a,s),t.__imageSrc=l),SW(r,"width",i+""),SW(r,"height",o+""),SW(r,"x",e+""),SW(r,"y",n+""),wW(r,t.transform))}},AW={left:"start",right:"end",center:"middle",middle:"middle"};var LW={brush:function(t){var e,n,i,o=t.style,r=o.text;null!=r&&(r+=""),!r||isNaN(o.x)||isNaN(o.y)||((e=t.__svgEl)||(e=cW("text"),i="xml:space",n="preserve",e.setAttributeNS("http://www.w3.org/XML/1998/namespace",i,n),t.__svgEl=e),i=o.font||Un,e.style.font=i,e.textContent=r,MW(e,o,t),wW(e,t.transform),n=o.x||0,r=o.y||0,t=Qn(i),"top"===(i=o.textBaseline)?r+=t/2:"bottom"===i&&(r-=t/2),r=r,o=AW[o.textAlign]||o.textAlign,SW(e,"dominant-baseline","central"),SW(e,"text-anchor",o),SW(e,"x",n+""),SW(e,"y",r+""))}};function kW(s,l,u){u=u||function(t,e){return t===e},s=s.slice();var h=(l=l.slice()).length,c=s.length,p=1,t=h+c,d=[{newPos:-1,components:[]}],e=PW(d[0],l,s,0,u);if(d[0].newPos+1>=h&&c<=e+1){for(var n=[],i=0;i<l.length;i++)n.push(i);return[{indices:n,count:l.length,added:!1,removed:!1}]}for(;p<=t;){var o=function(){for(var t=-1*p;t<=p;t+=2){var e,n=d[t-1],i=d[t+1],o=(i?i.newPos:0)-t;n&&(d[t-1]=void 0);var r=n&&n.newPos+1<h,a=i&&0<=o&&o<c;if(r||a){if(!r||a&&n.newPos<i.newPos?OW((e={newPos:(e=i).newPos,components:e.components.slice(0)}).components,!1,!0):((e=n).newPos++,OW(e.components,!0,!1)),o=PW(e,l,s,t,u),e.newPos+1>=h&&c<=o+1)return function(t){for(var e=0,n=t.length,i=0,o=0;e<n;e++){var r=t[e];if(r.removed){for(s=o;s<o+r.count;s++)r.indices.push(s);o+=r.count}else{for(var a=[],s=i;s<i+r.count;s++)a.push(s);r.indices=a,i+=r.count,r.added||(o+=r.count)}}return t}(e.components);d[t]=e}else d[t]=void 0}p++}();if(o)return o}}function PW(t,e,n,i,o){for(var r=e.length,a=n.length,s=t.newPos,l=s-i,u=0;s+1<r&&l+1<a&&o(e[s+1],n[l+1]);)s++,l++,u++;return u&&t.components.push({count:u,added:!1,removed:!1,indices:[]}),t.newPos=s,l}function OW(t,e,n){var i=t[t.length-1];i&&i.added===e&&i.removed===n?t[t.length-1]={count:i.count+1,added:e,removed:n,indices:[]}:t.push({count:1,added:e,removed:n,indices:[]})}RW.prototype.getDefs=function(t){var e=this._svgRoot,n=this._svgRoot.getElementsByTagName("defs");if(0!==n.length)return n[0];if(t){var i=e.insertBefore(this.createElement("defs"),e.firstChild);return i.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}return null},RW.prototype.doUpdate=function(t,e){var n;t&&(n=this.getDefs(!1),t[this._domName]&&n.contains(t[this._domName])?"function"==typeof e&&e(t):(e=this.add(t))&&(t[this._domName]=e))},RW.prototype.add=function(t){return null},RW.prototype.addDom=function(t){var e=this.getDefs(!0);t.parentNode!==e&&e.appendChild(t)},RW.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},RW.prototype.getDoms=function(){var i=this.getDefs(!1);if(!i)return[];var o=[];return N(this._tagNames,function(t){for(var e=i.getElementsByTagName(t),n=0;n<e.length;n++)o.push(e[n])}),o},RW.prototype.markAllUnused=function(){var t=this.getDoms(),e=this;N(t,function(t){t[e._markLabel]="0"})},RW.prototype.markDomUsed=function(t){t&&(t[this._markLabel]="1")},RW.prototype.markDomUnused=function(t){t&&(t[this._markLabel]="0")},RW.prototype.isDomUnused=function(t){return t&&"1"!==t[this._markLabel]},RW.prototype.removeUnused=function(){var e=this,n=this.getDefs(!1);n&&N(this.getDoms(),function(t){e.isDomUnused(t)&&n.removeChild(t)})},RW.prototype.getSvgProxy=function(t){return t instanceof Dr?CW:t instanceof na?DW:t instanceof Wa?LW:CW},RW.prototype.getSvgElement=function(t){return t.__svgEl},Op=RW;function RW(t,e,n,i,o){this.nextId=0,this._domName="_dom",this.createElement=cW,this._zrId=t,this._svgRoot=e,this._tagNames="string"==typeof n?[n]:n,this._markLabel=i,o&&(this._domName=o)}function NW(t){return"linear"===t.type}function EW(t){return"radial"===t.type}var zW,BW=(l(VW,zW=Op),VW.prototype.addWithoutUpdate=function(o,r){var a;r&&r.style&&(a=this,N(["fill","stroke"],function(t){var e,n,i=r.style[t];!i||"linear"!==i.type&&"radial"!==i.type||(e=i,n=a.getDefs(!0),i=void 0,e.__dom?(i=e.__dom,n.contains(e.__dom)||a.addDom(i)):i=a.add(e),a.markUsed(r),i=i.getAttribute("id"),o.setAttribute(t,"url(#"+i+")"))}))},VW.prototype.add=function(t){var e;if(NW(t))e=this.createElement("linearGradient");else{if(!EW(t))return _("Illegal gradient type."),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},VW.prototype.update=function(n){var i=this;this.doUpdate(n,function(){var t,e=n.__dom;e&&(t=e.tagName,"linear"===(e=n.type)&&"linearGradient"===t||"radial"===e&&"radialGradient"===t?i.updateDom(n,n.__dom):(i.removeDom(n),i.add(n)))})},VW.prototype.updateDom=function(t,e){if(NW(t))e.setAttribute("x1",t.x+""),e.setAttribute("y1",t.y+""),e.setAttribute("x2",t.x2+""),e.setAttribute("y2",t.y2+"");else{if(!EW(t))return void _("Illegal gradient type.");e.setAttribute("cx",t.x+""),e.setAttribute("cy",t.y+""),e.setAttribute("r",t.r+"")}t.global?e.setAttribute("gradientUnits","userSpaceOnUse"):e.setAttribute("gradientUnits","objectBoundingBox"),e.innerHTML="";for(var n=t.colorStops,i=0,o=n.length;i<o;++i){var r=this.createElement("stop");r.setAttribute("offset",100*n[i].offset+"%");var a,s=n[i].color;-1<s.indexOf("rgba")?(a=rn(s)[3],s=ln(s),r.setAttribute("stop-color","#"+s),r.setAttribute("stop-opacity",a+"")):r.setAttribute("stop-color",n[i].color),e.appendChild(r)}t.__dom=e},VW.prototype.markUsed=function(t){var e;t.style&&((e=t.style.fill)&&e.__dom&&zW.prototype.markDomUsed.call(this,e.__dom),(e=t.style.stroke)&&e.__dom&&zW.prototype.markDomUsed.call(this,e.__dom))},VW);function VW(t,e){return zW.call(this,t,e,["linearGradient","radialGradient"],"__gradient_in_use__")||this}function FW(t){return t&&(t.image||t.svgElement)}var GW,HW=new WeakMap,WW=(l(XW,GW=Op),XW.prototype.addWithoutUpdate=function(o,r){var a;r&&r.style&&(a=this,N(["fill","stroke"],function(t){var e,n,i=r.style[t];FW(i)&&(e=a.getDefs(!0),(n=HW.get(i))?e.contains(n)||a.addDom(n):n=a.add(i),a.markUsed(r),n=n.getAttribute("id"),o.setAttribute(t,"url(#"+n+")"))}))},XW.prototype.add=function(t){if(FW(t)){var e=this.createElement("pattern");return t.id=null==t.id?this.nextId++:t.id,e.setAttribute("id","zr"+this._zrId+"-pattern-"+t.id),e.setAttribute("x","0"),e.setAttribute("y","0"),e.setAttribute("patternUnits","userSpaceOnUse"),this.updateDom(t,e),this.addDom(e),e}},XW.prototype.update=function(e){var n;FW(e)&&(n=this).doUpdate(e,function(){var t=HW.get(e);n.updateDom(e,t)})},XW.prototype.updateDom=function(t,e){var n=t.svgElement;if(n instanceof SVGElement)n.parentNode!==e&&(e.innerHTML="",e.appendChild(n),e.setAttribute("width",t.svgWidth+""),e.setAttribute("height",t.svgHeight+""));else{var i=void 0,n=e.getElementsByTagName("image");if(n.length){if(!t.image)return void e.removeChild(n[0]);i=n[0]}else t.image&&(i=this.createElement("image"));i&&(n=void 0,"string"==typeof t.image?n=t.image:t.image instanceof HTMLImageElement?n=t.image.src:t.image instanceof HTMLCanvasElement&&(n=t.image.toDataURL()),n&&(i.setAttribute("href",n),i.setAttribute("x","0"),i.setAttribute("y","0"),(n=el(n,i,{dirty:function(){}},function(t){e.setAttribute("width",t.width+""),e.setAttribute("height",t.height+"")}))&&n.width&&n.height&&(e.setAttribute("width",n.width+""),e.setAttribute("height",n.height+"")),e.appendChild(i)))}i="translate("+(t.x||0)+", "+(t.y||0)+") rotate("+(t.rotation||0)/Math.PI*180+") scale("+(t.scaleX||1)+", "+(t.scaleY||1)+")";e.setAttribute("patternTransform",i),HW.set(t,e)},XW.prototype.markUsed=function(t){t.style&&(FW(t.style.fill)&&GW.prototype.markDomUsed.call(this,HW.get(t.style.fill)),FW(t.style.stroke)&&GW.prototype.markDomUsed.call(this,HW.get(t.style.fill)))},XW);function XW(t,e){return GW.call(this,t,e,["pattern"],"__pattern_in_use__")||this}function YW(t){t=t.__clipPaths;return t&&0<t.length}var UW,ZW=(l(jW,UW=Op),jW.prototype.markAllUnused=function(){for(var t in UW.prototype.markAllUnused.call(this),this._refGroups)this.markDomUnused(this._refGroups[t]);this._keyDuplicateCount={}},jW.prototype._getClipPathGroup=function(t,e){if(YW(t)){var n=t.__clipPaths,i=this._keyDuplicateCount,t=function(t){var e=[];if(t)for(var n=0;n<t.length;n++){var i=t[n];e.push(i.id)}return e.join(",")}(n);return Lv(n,e&&e.__clipPaths)&&(i[t]=i[t]||0,i[t]&&(t+="-"+i[t]),i[t]++),this._refGroups[t]||(this._refGroups[t]=this.createElement("g"))}},jW.prototype.update=function(t,e){e=this._getClipPathGroup(t,e);return e&&(this.markDomUsed(e),this.updateDom(e,t.__clipPaths)),e},jW.prototype.updateDom=function(t,e){var n,i,o,r;e&&0<e.length?(n=this.getDefs(!0),o=i=void 0,(r=e[0])._dom?(o=r._dom.getAttribute("id"),i=r._dom,n.contains(i)||n.appendChild(i)):(o="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(i=this.createElement("clipPath")).setAttribute("id",o),n.appendChild(i),r._dom=i),this.getSvgProxy(r).brush(r),r=this.getSvgElement(r),i.innerHTML="",i.appendChild(r),t.setAttribute("clip-path","url(#"+o+")"),1<e.length&&this.updateDom(i,e.slice(1))):t&&t.setAttribute("clip-path","none")},jW.prototype.markUsed=function(t){var e=this;t.__clipPaths&&N(t.__clipPaths,function(t){t._dom&&UW.prototype.markDomUsed.call(e,t._dom)})},jW.prototype.removeUnused=function(){UW.prototype.removeUnused.call(this);var t,e={};for(t in this._refGroups){var n=this._refGroups[t];this.isDomUnused(n)?n.parentNode&&n.parentNode.removeChild(n):e[t]=n}this._refGroups=e},jW);function jW(t,e){e=UW.call(this,t,e,"clipPath","__clippath_in_use__")||this;return e._refGroups={},e._keyDuplicateCount={},e}var qW,KW=(l($W,qW=Op),$W.prototype._getFromPool=function(){var t,e=this._shadowDomPool.pop();return e||((e=this.createElement("filter")).setAttribute("id","zr"+this._zrId+"-shadow-"+this.nextId++),t=this.createElement("feDropShadow"),e.appendChild(t),this.addDom(e)),e},$W.prototype.update=function(t,e){var n,i=e.style;(n=i)&&(n.shadowBlur||n.shadowOffsetX||n.shadowOffsetY)?(n=(i=e).style,i=i.getGlobalScale(),n=[n.shadowColor,(n.shadowBlur||0).toFixed(2),(n.shadowOffsetX||0).toFixed(2),(n.shadowOffsetY||0).toFixed(2),i[0],i[1]].join(","),(i=e._shadowDom=this._shadowDomMap[n])||(i=this._getFromPool(),this._shadowDomMap[n]=i),this.updateDom(t,e,i)):this.remove(t,e)},$W.prototype.remove=function(t,e){null!=e._shadowDom&&(e._shadowDom=null,t.style.filter="")},$W.prototype.updateDom=function(t,e,n){var i,o,r=n.children[0],a=e.style,s=e.getGlobalScale(),l=s[0],u=s[1];l&&u&&(i=a.shadowOffsetX||0,o=a.shadowOffsetY||0,s=a.shadowBlur,a=a.shadowColor,r.setAttribute("dx",i/l+""),r.setAttribute("dy",o/u+""),r.setAttribute("flood-color",a),u=s/2/l+" "+s/2/u,r.setAttribute("stdDeviation",u),n.setAttribute("x","-100%"),n.setAttribute("y","-100%"),n.setAttribute("width","300%"),n.setAttribute("height","300%"),n=(e._shadowDom=n).getAttribute("id"),t.style.filter="url(#"+n+")")},$W.prototype.removeUnused=function(){if(this.getDefs(!1)){var t,e=this._shadowDomPool;for(t in this._shadowDomMap){var n=this._shadowDomMap[t];e.push(n)}this._shadowDomMap={}}},$W);function $W(t,e){e=qW.call(this,t,e,["filter"],"__filter_in_use__","_shadowDom")||this;return e._shadowDomMap={},e._shadowDomPool=[],e}function JW(t){return parseInt(t,10)}function QW(t){return t instanceof Dr?CW:t instanceof na?DW:t instanceof Wa?LW:CW}function tX(t,e){return e&&t&&e.parentNode!==t}function eX(t,e,n){tX(t,e)&&n&&((n=n.nextSibling)?t.insertBefore(e,n):t.appendChild(e))}function nX(t,e){var n;tX(t,e)&&((n=t.firstChild)?t.insertBefore(e,n):t.appendChild(e))}function iX(t){return t.__svgEl}function oX(t,e,n,i){this.type="svg",this.refreshHover=rX("refreshHover"),this.pathToImage=rX("pathToImage"),this.configLayer=rX("configLayer"),this.root=t,this.storage=e,this._opts=n=O({},n||{});var o=cW("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;";var r=cW("g");o.appendChild(r);e=cW("g");o.appendChild(e),this._gradientManager=new BW(i,e),this._patternManager=new WW(i,e),this._clipPathManager=new ZW(i,e),this._shadowManager=new KW(i,e);i=document.createElement("div");i.style.cssText="overflow:hidden;position:relative",this._svgDom=o,this._svgRoot=e,this._backgroundRoot=r,this._viewport=i,t.appendChild(i),i.appendChild(o),this.resize(n.width,n.height),this._visibleList=[]}function rX(t){return function(){_('In SVG mode painter not support method "'+t+'"')}}ku("svg",(oX.prototype.getType=function(){return"svg"},oX.prototype.getViewportRoot=function(){return this._viewport},oX.prototype.getSvgDom=function(){return this._svgDom},oX.prototype.getSvgRoot=function(){return this._svgRoot},oX.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},oX.prototype.refresh=function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},oX.prototype.setBackgroundColor=function(t){this._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var e=cW("rect");e.setAttribute("width",this.getWidth()),e.setAttribute("height",this.getHeight()),e.setAttribute("x",0),e.setAttribute("y",0),e.setAttribute("id",0),e.style.fill=t,this._backgroundRoot.appendChild(e),this._backgroundNode=e},oX.prototype.createSVGElement=cW,oX.prototype.paintOne=function(t){var e=QW(t);return e&&e.brush(t),iX(t)},oX.prototype._paintList=function(t){var e=this._gradientManager,n=this._patternManager,i=this._clipPathManager,o=this._shadowManager;e.markAllUnused(),n.markAllUnused(),i.markAllUnused(),o.markAllUnused();for(var r=this._svgRoot,a=this._visibleList,s=t.length,l=[],u=0;u<s;u++){var h=QW(b=t[u]),c=iX(b);b.invisible||(!b.__dirty&&c||(h&&h.brush(b),(c=iX(b))&&b.style&&(e.update(b.style.fill),e.update(b.style.stroke),n.update(b.style.fill),n.update(b.style.stroke),o.update(c,b)),b.__dirty=0),c&&l.push(b))}for(var p,d,f,g,y,m,v=kW(a,l),u=0;u<v.length;u++){if((_=v[u]).removed)for(var x=0;x<_.count;x++){c=iX(b=a[_.indices[x]]);YW(b)?(g=c)&&g.parentNode&&g.parentNode.removeChild(g):(f=r,(g=c)&&f&&g.parentNode===f&&f.removeChild(g))}}for(u=0;u<v.length;u++){var _;(_=v[u]).added;if(!_.removed)for(x=0;x<_.count;x++){var b=l[_.indices[x]],w=i.update(b,y);w!==m&&(p=d,w&&(p?eX(r,w,p):nX(r,w),d=w,p=null),m=w);c=iX(b);p?eX(m||r,c,p):nX(m||r,c),p=c||p,m||(d=p),e.markUsed(b),e.addWithoutUpdate(c,b),n.markUsed(b),n.addWithoutUpdate(c,b),i.markUsed(b),y=b}}e.removeUnused(),n.removeUnused(),i.removeUnused(),o.removeUnused(),this._visibleList=l},oX.prototype._getDefs=function(t){var e=this._svgDom,n=e.getElementsByTagName("defs");if(0!==n.length)return n[0];if(t){var i=e.insertBefore(cW("defs"),e.firstChild);return i.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}return null},oX.prototype.resize=function(t,e){var n=this._viewport;n.style.display="none";var i=this._opts;null!=t&&(i.width=t),null!=e&&(i.height=e),t=this._getSize(0),e=this._getSize(1),n.style.display="",this._width===t&&this._height===e||(this._width=t,this._height=e,(n=n.style).width=t+"px",n.height=e+"px",(n=this._svgDom).setAttribute("width",t+""),n.setAttribute("height",e+"")),this._backgroundNode&&(this._backgroundNode.setAttribute("width",t),this._backgroundNode.setAttribute("height",e))},oX.prototype.getWidth=function(){return this._width},oX.prototype.getHeight=function(){return this._height},oX.prototype._getSize=function(t){var e=this._opts,n=["width","height"][t],i=["clientWidth","clientHeight"][t],o=["paddingLeft","paddingTop"][t],r=["paddingRight","paddingBottom"][t];if(null!=e[n]&&"auto"!==e[n])return parseFloat(e[n]);t=this.root,e=document.defaultView.getComputedStyle(t);return(t[i]||JW(e[n])||JW(t.style[n]))-(JW(e[o])||0)-(JW(e[r])||0)|0},oX.prototype.dispose=function(){this.root.innerHTML="",this._svgRoot=this._backgroundRoot=this._svgDom=this._backgroundNode=this._viewport=this.storage=null},oX.prototype.clear=function(){var t=this._viewport;t&&t.parentNode&&t.parentNode.removeChild(t)},oX.prototype.toDataURL=function(){return this.refresh(),"data:image/svg+xml;charset=UTF-8,"+encodeURIComponent(this._svgDom.outerHTML.replace(/></g,">\n\r<"))},oX)),t.Axis=mu,t.List=db,t.Model=Fp,t.PRIORITY=r,t.color=gn,t.connect=function(e){var t;return F(e)&&(t=e,e=null,xx(t,function(t){null!=t.group&&(e=t.group)}),e=e||"g_"+w_++,xx(t,function(t){t.group=e})),__[e]=!0,e},t.dataTool={},t.dependencies={zrender:"5.0.0"},t.disConnect=M_,t.disconnect=g,t.dispose=function(t){"string"==typeof t?t=x_[t]:t instanceof n_||(t=I_(t)),t instanceof n_&&!t.isDisposed()&&t.dispose()},t.env=w,t.extendChartView=function(t){return tm.extend(t)},t.extendComponentModel=function(t){return nf.extend(t)},t.extendComponentView=N_,t.extendSeriesModel=function(t){return Fy.extend(t)},t.format=oS,t.getCoordinateSystemDimensions=function(t){if(t=Yf.get(t))return t.getDimensionsInfo?t.getDimensionsInfo():t.dimensions.slice()},t.getInstanceByDom=I_,t.getInstanceById=function(t){return x_[t]},t.getMap=function(t){return(t=Wm(t))&&t[0]&&{geoJson:t[0].geoJSON,specialAreas:t[0].specialAreas}},t.graphic=aS,t.helper=Ea,t.init=function(t,e,n){var i=I_(t);if(i)return i;var o=new n_(t,e,n);return o.id="ec_"+b_++,x_[o.id]=o,Th(t,S_,o.id),$x(o),xx(f_,function(t){t(o)}),o},t.innerDrawElementOnCanvas=qv,t.matrix=Ae,t.number=iS,t.parseGeoJSON=Xw,t.parseGeoJson=kp,t.registerAction=A_,t.registerCoordinateSystem=L_,t.registerLayout=k_,t.registerLoading=R_,t.registerLocale=$p,t.registerMap=function(t,e,n){Hm(t,e,n)},t.registerPostInit=function(t){t&&f_.push(t)},t.registerPostUpdate=function(t){t&&g_.push(t)},t.registerPreprocessor=C_,t.registerProcessor=D_,t.registerTheme=T_,t.registerTransform=n,t.registerVisual=P_,t.setCanvasCreator=function(t){m("createCanvas",t)},t.throttle=hm,t.time=sf,t.util=rS,t.vector=Et,t.version="5.0.0",t.zrender=Pu,Object.defineProperty(t,"__esModule",{value:!0})});