define(["gpui-style-inject","react","mobx"],(function(t,e,n){"use strict";function i(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}function r(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var a=i(t),o=i(e),s=r(e);
/*! *****************************************************************************
    Copyright (c) Microsoft Corporation.

    Permission to use, copy, modify, and/or distribute this software for any
    purpose with or without fee is hereby granted.

    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
    REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
    AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
    INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    PERFORMANCE OF THIS SOFTWARE.
    ***************************************************************************** */
function l(t,e,n,i){var r,a=arguments.length,o=a<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(o=(a<3?r(o):a>3?r(e,n,o):r(e,n))||o);return a>3&&o&&Object.defineProperty(e,n,o),o}a.default("html, body, #root {\n  width: 100%;\n  height: 100%;\n  margin: 0;\n  padding: 0;\n  overflow: hidden; }\n\n.g__index {\n  position: relative;\n  box-sizing: border-box;\n  width: 100%;\n  height: 100%; }\n");var u="index-module_main__zrzdk",h="index-module_chart__nsvSG";if(a.default(".index-module_main__zrzdk {\n  position: relative;\n  width: 100%;\n  height: 100%; }\n  .index-module_main__zrzdk .index-module_chart__nsvSG {\n    width: 100%;\n    height: 100%; }\n"),!e.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!n.spy)throw new Error("mobx-react-lite requires mobx at least version 4 to be available");function c(){return c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},c.apply(this,arguments)}function d(){var t=e.useState(0)[1];return e.useCallback((function(){t((function(t){return t+1}))}),[])}function f(t){return n.getDependencyTree(t)}var p,g=1e4,m=1e4,v=new Set;function y(){void 0===p&&(p=setTimeout(_,m))}function _(){p=void 0;var t=Date.now();v.forEach((function(e){var n=e.current;n&&t>=n.cleanAt&&(n.reaction.dispose(),e.current=null,v.delete(e))})),v.size>0&&y()}var x={};function w(t){return"observer"+t}function b(t,e,i){void 0===e&&(e="observed"),void 0===i&&(i=x);var r,a=(i.useForceUpdate||d)(),s=o.default.useRef(null);if(!s.current){var l=new n.Reaction(w(e),(function(){u.mounted?a():(l.dispose(),s.current=null)})),u=function(t){return{cleanAt:Date.now()+g,reaction:t}}(l);s.current=u,r=s,v.add(r),y()}var h,c,p=s.current.reaction;if(o.default.useDebugValue(p,f),o.default.useEffect((function(){var t;return t=s,v.delete(t),s.current?s.current.mounted=!0:(s.current={reaction:new n.Reaction(w(e),(function(){a()})),cleanAt:1/0},a()),function(){s.current.reaction.dispose(),s.current=null}}),[]),p.track((function(){try{h=t()}catch(t){c=t}})),c)throw c;return h}function S(t,n){var i,r=c({forwardRef:!1},n),a=t.displayName||t.name,o=function(e,n){return b((function(){return t(e,n)}),a)};return o.displayName=a,i=r.forwardRef?e.memo(e.forwardRef(o)):e.memo(o),function(t,e){Object.keys(t).forEach((function(n){M[n]||Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}(t,i),i.displayName=a,i}var M={$$typeof:!0,render:!0,compare:!0,type:!0};function T(t){var e=t.children,n=t.render,i=e||n;return"function"!=typeof i?null:b(i)}function I(t,e,n,i,r){var a="children"===e?"render":"children",o="function"==typeof t[e],s="function"==typeof t[a];return o&&s?new Error("MobX Observer: Do not use children and render in the same time in`"+n):o||s?null:new Error("Invalid prop `"+r+"` of type `"+typeof t[e]+"` supplied to `"+n+"`, expected `function`.")}T.propTypes={children:I,render:I},T.displayName="Observer";var C=0;var D={};function k(t){return D[t]||(D[t]=function(t){if("function"==typeof Symbol)return Symbol(t);var e="__$mobx-react "+t+" ("+C+")";return C++,e}(t)),D[t]}function A(t,e){if(O(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(var r=0;r<n.length;r++)if(!Object.hasOwnProperty.call(e,n[r])||!O(t[n[r]],e[n[r]]))return!1;return!0}function O(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function L(t,e,n){Object.hasOwnProperty.call(t,e)?t[e]=n:Object.defineProperty(t,e,{enumerable:!1,configurable:!0,writable:!0,value:n})}var P=k("patchMixins"),R=k("patchedDefinition");function E(t,e){for(var n=this,i=arguments.length,r=new Array(i>2?i-2:0),a=2;a<i;a++)r[a-2]=arguments[a];e.locks++;try{var o;return null!=t&&(o=t.apply(this,r)),o}finally{e.locks--,0===e.locks&&e.methods.forEach((function(t){t.apply(n,r)}))}}function N(t,e){return function(){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];E.call.apply(E,[this,t,e].concat(i))}}function z(t,e,n){var i=function(t,e){var n=t[P]=t[P]||{},i=n[e]=n[e]||{};return i.locks=i.locks||0,i.methods=i.methods||[],i}(t,e);i.methods.indexOf(n)<0&&i.methods.push(n);var r=Object.getOwnPropertyDescriptor(t,e);if(!r||!r[R]){var a=t[e],o=B(t,e,r?r.enumerable:void 0,i,a);Object.defineProperty(t,e,o)}}function B(t,e,n,i,r){var a,o=N(r,i);return(a={})[R]=!0,a.get=function(){return o},a.set=function(r){if(this===t)o=N(r,i);else{var a=B(this,e,n,i,r);Object.defineProperty(this,e,a)}},a.configurable=!0,a.enumerable=n,a}var F=n.$mobx||"$mobx",V=k("isUnmounted"),H=k("skipRender"),W=k("isForcingUpdate");function G(t){var n=t.prototype;if(n.componentWillReact)throw new Error("The componentWillReact life-cycle event is no longer supported");if(t.__proto__!==e.PureComponent)if(n.shouldComponentUpdate){if(n.shouldComponentUpdate!==j)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}else n.shouldComponentUpdate=j;Y(n,"props"),Y(n,"state");var i=n.render;return n.render=function(){return U.call(this,i)},z(n,"componentWillUnmount",(function(){this.render[F]&&this.render[F].dispose(),this[V]=!0})),t}function U(t){var i=this;L(this,H,!1),L(this,W,!1);var r,a=(r=this).displayName||r.name||r.constructor&&(r.constructor.displayName||r.constructor.name)||"<component>",o=t.bind(this),s=!1,l=new n.Reaction(a+".render()",(function(){if(!s&&(s=!0,!0!==i[V])){var t=!0;try{L(i,W,!0),i[H]||e.Component.prototype.forceUpdate.call(i),t=!1}finally{L(i,W,!1),t&&l.dispose()}}}));function u(){s=!1;var t=void 0,e=void 0;if(l.track((function(){try{e=n._allowStateChanges(!1,o)}catch(e){t=e}})),t)throw t;return e}return l.reactComponent=this,u[F]=l,this.render=u,u.call(this)}function j(t,e){return this.state!==e||!A(this.props,t)}function Y(t,e){var i=k("reactProp_"+e+"_valueHolder"),r=k("reactProp_"+e+"_atomHolder");function a(){return this[r]||L(this,r,n.createAtom("reactive "+e)),this[r]}Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get:function(){var t=!1;return n._allowStateReadsStart&&n._allowStateReadsEnd&&(t=n._allowStateReadsStart(!0)),a.call(this).reportObserved(),n._allowStateReadsStart&&n._allowStateReadsEnd&&n._allowStateReadsEnd(t),this[i]},set:function(t){this[W]||A(this[i],t)?L(this,i,t):(L(this,i,t),L(this,H,!0),a.call(this).reportChanged(),L(this,H,!1))}})}var q="function"==typeof Symbol&&Symbol.for,X=q?Symbol.for("react.forward_ref"):"function"==typeof e.forwardRef&&e.forwardRef((function(t){return null})).$$typeof,Z=q?Symbol.for("react.memo"):"function"==typeof e.memo&&e.memo((function(t){return null})).$$typeof;if(!e.Component)throw new Error("mobx-react requires React to be available");if(!n.observable)throw new Error("mobx-react requires mobx to be available");var $="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};"undefined"!=typeof window||void 0!==$&&$.__DEV__;var K=2311;var Q=function(){return K++};var J="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:function(t){var e={},n={},i=t.match(/Firefox\/([\d.]+)/),r=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),a=t.match(/Edge\/([\d.]+)/),o=/micromessenger/i.test(t);i&&(n.firefox=!0,n.version=i[1]);r&&(n.ie=!0,n.version=r[1]);a&&(n.edge=!0,n.version=a[1]);o&&(n.weChat=!0);return{browser:n,os:e,node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!n.ie&&!n.edge,pointerEventsSupported:"onpointerdown"in window&&(n.edge||n.ie&&n.version>=11),domSupported:"undefined"!=typeof document}}(navigator.userAgent),tt={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},et={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},nt=Object.prototype.toString,it=Array.prototype,rt=it.forEach,at=it.filter,ot=it.slice,st=it.map,lt=it.reduce,ut={};function ht(t){if(null==t||"object"!=typeof t)return t;var e=t,n=nt.call(t);if("[object Array]"===n){if(!bt(t)){e=[];for(var i=0,r=t.length;i<r;i++)e[i]=ht(t[i])}}else if(et[n]){if(!bt(t)){var a=t.constructor;if(t.constructor.from)e=a.from(t);else{e=new a(t.length);for(i=0,r=t.length;i<r;i++)e[i]=ht(t[i])}}}else if(!tt[n]&&!bt(t)&&!xt(t))for(var o in e={},t)t.hasOwnProperty(o)&&(e[o]=ht(t[o]));return e}function ct(t,e,n){if(!yt(e)||!yt(t))return n?ht(e):t;for(var i in e)if(e.hasOwnProperty(i)){var r=t[i],a=e[i];!yt(a)||!yt(r)||vt(a)||vt(r)||xt(a)||xt(r)||_t(a)||_t(r)||bt(a)||bt(r)?!n&&i in t||(t[i]=ht(e[i])):ct(r,a,n)}return t}function dt(t,e,n){for(var i in e)e.hasOwnProperty(i)&&(n?null!=e[i]:null==t[i])&&(t[i]=e[i]);return t}var ft,pt=function(){return ut.createCanvas()};function gt(t,e,n){if(t&&e)if(t.forEach&&t.forEach===rt)t.forEach(e,n);else if(t.length===+t.length)for(var i=0,r=t.length;i<r;i++)e.call(n,t[i],i,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(n,t[a],a,t)}function mt(t,e){var n=ot.call(arguments,2);return function(){return t.apply(e,n.concat(ot.call(arguments)))}}function vt(t){return"[object Array]"===nt.call(t)}function yt(t){var e=typeof t;return"function"===e||!!t&&"object"===e}function _t(t){return!!tt[nt.call(t)]}function xt(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}ut.createCanvas=function(){return document.createElement("canvas")};var wt="__ec_primitive__";function bt(t){return t[wt]}function St(t){var e=vt(t);this.data={};var n=this;function i(t,i){e?n.set(t,i):n.set(i,t)}t instanceof St?t.each(i):t&&gt(t,i)}St.prototype={constructor:St,get:function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},set:function(t,e){return this.data[t]=e},each:function(t,e){for(var n in void 0!==e&&(t=mt(t,e)),this.data)this.data.hasOwnProperty(n)&&t(this.data[n],n)},removeKey:function(t){delete this.data[t]}};var Mt=function(t,e){"createCanvas"===t&&(ft=null),ut[t]=e},Tt=function(t,e){for(var n=t[0],i=1,r=t.length;i<r;i++)n=ct(n,t[i],e);return n},It=function(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},Ct=function(t,e){var n=t.prototype;function i(){}for(var r in i.prototype=e.prototype,t.prototype=new i,n)n.hasOwnProperty(r)&&(t.prototype[r]=n[r]);t.prototype.constructor=t,t.superClass=e},Dt=function(t){if(t)return"string"!=typeof t&&"number"==typeof t.length},kt=function(t,e,n){if(t&&e){if(t.map&&t.map===st)return t.map(e,n);for(var i=[],r=0,a=t.length;r<a;r++)i.push(e.call(n,t[r],r,t));return i}},At=function(t,e,n,i){if(t&&e){if(t.reduce&&t.reduce===lt)return t.reduce(e,n,i);for(var r=0,a=t.length;r<a;r++)n=e.call(i,n,t[r],r,t);return n}},Ot=function(t,e,n){if(t&&e){if(t.filter&&t.filter===at)return t.filter(e,n);for(var i=[],r=0,a=t.length;r<a;r++)e.call(n,t[r],r,t)&&i.push(t[r]);return i}},Lt=function(t,e,n){if(t&&e)for(var i=0,r=t.length;i<r;i++)if(e.call(n,t[i],i,t))return t[i]},Pt=function(t){var e=ot.call(arguments,1);return function(){return t.apply(this,e.concat(ot.call(arguments)))}},Rt=function(t){for(var e=0,n=arguments.length;e<n;e++)if(null!=arguments[e])return arguments[e]},Et=function(){return Function.call.apply(ot,arguments)},Nt=function(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},zt=function(t,e){for(var n=new t.constructor(t.length+e.length),i=0;i<t.length;i++)n[i]=t[i];var r=t.length;for(i=0;i<e.length;i++)n[i+r]=e[i];return n},Bt={$override:Mt,clone:ht,merge:ct,mergeAll:Tt,extend:function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},defaults:dt,createCanvas:pt,getContext:function(){return ft||(ft=pt().getContext("2d")),ft},indexOf:It,inherits:Ct,mixin:function(t,e,n){dt(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,n)},isArrayLike:Dt,each:gt,map:kt,reduce:At,filter:Ot,find:Lt,bind:mt,curry:Pt,isArray:vt,isFunction:function(t){return"function"==typeof t},isString:function(t){return"[object String]"===nt.call(t)},isObject:yt,isBuiltInObject:_t,isTypedArray:function(t){return!!et[nt.call(t)]},isDom:xt,eqNaN:function(t){return t!=t},retrieve:Rt,retrieve2:function(t,e){return null!=t?t:e},retrieve3:function(t,e,n){return null!=t?t:null!=e?e:n},slice:Et,normalizeCssArray:Nt,assert:function(t,e){if(!t)throw new Error(e)},trim:function(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},setAsPrimitive:function(t){t[wt]=!0},isPrimitive:bt,createHashMap:function(t){return new St(t)},concatArray:zt,noop:function(){}},Ft="undefined"==typeof Float32Array?Array:Float32Array;function Vt(t){return Math.sqrt(Ht(t))}function Ht(t){return t[0]*t[0]+t[1]*t[1]}function Wt(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function Gt(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var Ut=function(t,e){var n=new Ft(2);return null==t&&(t=0),null==e&&(e=0),n[0]=t,n[1]=e,n},jt=function(t,e){return t[0]=e[0],t[1]=e[1],t},Yt=function(t){var e=new Ft(2);return e[0]=t[0],e[1]=t[1],e},qt=function(t,e,n){return t[0]=e,t[1]=n,t},Xt=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t},Zt=function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t},$t=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t},Kt=function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t},Qt=function(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t},Jt=function(t,e){return t[0]*e[0]+t[1]*e[1]},te=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t},ee=function(t,e){var n=Vt(e);return 0===n?(t[0]=0,t[1]=0):(t[0]=e[0]/n,t[1]=e[1]/n),t},ne=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},ie=function(t,e,n,i){return t[0]=e[0]+i*(n[0]-e[0]),t[1]=e[1]+i*(n[1]-e[1]),t},re=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r+n[4],t[1]=n[1]*i+n[3]*r+n[5],t},ae=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t},oe=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t},se={create:Ut,copy:jt,clone:Yt,set:qt,add:Xt,scaleAndAdd:Zt,sub:$t,len:Vt,length:Vt,lenSquare:Ht,lengthSquare:Ht,mul:Kt,div:Qt,dot:Jt,scale:te,normalize:ee,distance:Wt,dist:Wt,distanceSquare:Gt,distSquare:Gt,negate:ne,lerp:ie,applyTransform:re,min:ae,max:oe};function le(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}function ue(t,e){return{target:t,topTarget:e&&e.topTarget}}le.prototype={constructor:le,_dragStart:function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent;e&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(ue(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var n=t.offsetX,i=t.offsetY,r=n-this._x,a=i-this._y;this._x=n,this._y=i,e.drift(r,a,t),this.dispatchToElement(ue(e,t),"drag",t.event);var o=this.findHover(n,i,e).target,s=this._dropTarget;this._dropTarget=o,e!==o&&(s&&o!==s&&this.dispatchToElement(ue(s,t),"dragleave",t.event),o&&o!==s&&this.dispatchToElement(ue(o,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(ue(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(ue(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};var he=le,ce=Array.prototype.slice,de=function(t){this._$handlers={},this._$eventProcessor=t};function fe(t,e,n,i,r,a){var o=t._$handlers;if("function"==typeof n&&(r=i,i=n,n=null),!i||!e)return t;n=function(t,e){var n=t._$eventProcessor;return null!=e&&n&&n.normalizeQuery&&(e=n.normalizeQuery(e)),e}(t,n),o[e]||(o[e]=[]);for(var s=0;s<o[e].length;s++)if(o[e][s].h===i)return t;var l={h:i,one:a,query:n,ctx:r||t,callAtLast:i.zrEventfulCallAtLast},u=o[e].length-1,h=o[e][u];return h&&h.callAtLast?o[e].splice(u,0,l):o[e].push(l),t}de.prototype={constructor:de,one:function(t,e,n,i){return fe(this,t,e,n,i,!0)},on:function(t,e,n,i){return fe(this,t,e,n,i,!1)},isSilent:function(t){var e=this._$handlers;return!e[t]||!e[t].length},off:function(t,e){var n=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(n[t]){for(var i=[],r=0,a=n[t].length;r<a;r++)n[t][r].h!==e&&i.push(n[t][r]);n[t]=i}n[t]&&0===n[t].length&&delete n[t]}else delete n[t];return this},trigger:function(t){var e=this._$handlers[t],n=this._$eventProcessor;if(e){var i=arguments,r=i.length;r>3&&(i=ce.call(i,1));for(var a=e.length,o=0;o<a;){var s=e[o];if(n&&n.filter&&null!=s.query&&!n.filter(t,s.query))o++;else{switch(r){case 1:s.h.call(s.ctx);break;case 2:s.h.call(s.ctx,i[1]);break;case 3:s.h.call(s.ctx,i[1],i[2]);break;default:s.h.apply(s.ctx,i)}s.one?(e.splice(o,1),a--):o++}}}return n&&n.afterTrigger&&n.afterTrigger(t),this},triggerWithContext:function(t){var e=this._$handlers[t],n=this._$eventProcessor;if(e){var i=arguments,r=i.length;r>4&&(i=ce.call(i,1,i.length-1));for(var a=i[i.length-1],o=e.length,s=0;s<o;){var l=e[s];if(n&&n.filter&&null!=l.query&&!n.filter(t,l.query))s++;else{switch(r){case 1:l.h.call(a);break;case 2:l.h.call(a,i[1]);break;case 3:l.h.call(a,i[1],i[2]);break;default:l.h.apply(a,i)}l.one?(e.splice(s,1),o--):s++}}}return n&&n.afterTrigger&&n.afterTrigger(t),this}};var pe=de,ge=Math.log(2);function me(t,e,n,i,r,a){var o=i+"-"+r,s=t.length;if(a.hasOwnProperty(o))return a[o];if(1===e){var l=Math.round(Math.log((1<<s)-1&~r)/ge);return t[n][l]}for(var u=i|1<<n,h=n+1;i&1<<h;)h++;for(var c=0,d=0,f=0;d<s;d++){var p=1<<d;p&r||(c+=(f%2?-1:1)*t[n][d]*me(t,e-1,h,u,r|p,a),f++)}return a[o]=c,c}var ve=function(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={},r=me(n,8,0,0,0,i);if(0!==r){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)null==a[s]&&(a[s]=0),a[s]+=((o+s)%2?-1:1)*me(n,7,0===o?1:0,1<<o,1<<s,i)/r*e[o];return function(t,e,n){var i=e*a[6]+n*a[7]+1;t[0]=(e*a[0]+n*a[1]+a[2])/i,t[1]=(e*a[3]+n*a[4]+a[5])/i}}},ye={buildTransformer:ve}.buildTransformer,_e="___zrEVENTSAVED",xe=[];function we(t,e,n,i,r){if(e.getBoundingClientRect&&J.domSupported&&!be(e)){var a=e[_e]||(e[_e]={}),o=function(t,e){var n=e.markers;if(n)return n;n=e.markers=[];for(var i=["left","right"],r=["top","bottom"],a=0;a<4;a++){var o=document.createElement("div"),s=a%2,l=(a>>1)%2;o.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[s]+":0",r[l]+":0",i[1-s]+":auto",r[1-l]+":auto",""].join("!important;"),t.appendChild(o),n.push(o)}return n}(e,a),s=function(t,e,n){for(var i=n?"invTrans":"trans",r=e[i],a=e.srcCoords,o=!0,s=[],l=[],u=0;u<4;u++){var h=t[u].getBoundingClientRect(),c=2*u,d=h.left,f=h.top;s.push(d,f),o=o&&a&&d===a[c]&&f===a[c+1],l.push(t[u].offsetLeft,t[u].offsetTop)}return o&&r?r:(e.srcCoords=s,e[i]=n?ye(l,s):ye(s,l))}(o,a,r);if(s)return s(t,n,i),!0}return!1}function be(t){return"CANVAS"===t.nodeName.toUpperCase()}var Se=function(t,e,n,i,r){return we(xe,e,i,r,!0)&&we(t,n,xe[0],xe[1])},Me={transformLocalCoord:Se,transformCoordWithViewport:we,isCanvasEl:be},Te=pe,Ie=Me.isCanvasEl,Ce=Me.transformCoordWithViewport,De="undefined"!=typeof window&&!!window.addEventListener,ke=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ae=[];function Oe(t,e,n,i){return n=n||{},i||!J.canvasSupported?Le(t,e,n):J.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):Le(t,e,n),n}function Le(t,e,n){if(J.domSupported&&t.getBoundingClientRect){var i=e.clientX,r=e.clientY;if(Ie(t)){var a=t.getBoundingClientRect();return n.zrX=i-a.left,void(n.zrY=r-a.top)}if(Ce(Ae,t,i,r))return n.zrX=Ae[0],void(n.zrY=Ae[1])}n.zrX=n.zrY=0}function Pe(t){return t||window.event}var Re={Dispatcher:Te,clientToLocal:Oe,getNativeEvent:Pe,normalizeEvent:function(t,e,n){if(null!=(e=Pe(e)).zrX)return e;var i=e.type;if(i&&i.indexOf("touch")>=0){var r="touchend"!==i?e.targetTouches[0]:e.changedTouches[0];r&&Oe(t,r,e,n)}else Oe(t,e,e,n),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var a=e.button;return null==e.which&&void 0!==a&&ke.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e},addEventListener:function(t,e,n,i){De?t.addEventListener(e,n,i):t.attachEvent("on"+e,n)},removeEventListener:function(t,e,n,i){De?t.removeEventListener(e,n,i):t.detachEvent("on"+e,n)},stop:De?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0},isMiddleOrRightButtonOnMouseUpDown:function(t){return 2===t.which||3===t.which},notLeftMouse:function(t){return t.which>1}},Ee=function(){this._track=[]};function Ne(t){var e=t[1][0]-t[0][0],n=t[1][1]-t[0][1];return Math.sqrt(e*e+n*n)}Ee.prototype={constructor:Ee,recognize:function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,n){var i=t.touches;if(i){for(var r={points:[],touches:[],target:e,event:t},a=0,o=i.length;a<o;a++){var s=i[a],l=Re.clientToLocal(n,s,{});r.points.push([l.zrX,l.zrY]),r.touches.push(s)}this._track.push(r)}},_recognize:function(t){for(var e in ze)if(ze.hasOwnProperty(e)){var n=ze[e](this._track,t);if(n)return n}}};var ze={pinch:function(t,e){var n=t.length;if(n){var i,r=(t[n-1]||{}).points,a=(t[n-2]||{}).points||r;if(a&&a.length>1&&r&&r.length>1){var o=Ne(r)/Ne(a);!isFinite(o)&&(o=1),e.pinchScale=o;var s=[((i=r)[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}},Be=Ee,Fe="silent";function Ve(){Re.stop(this.event)}function He(){}He.prototype.dispose=function(){};var We=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Ge=function(t,e,n,i){pe.call(this),this.storage=t,this.painter=e,this.painterRoot=i,n=n||new He,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,he.call(this),this.setHandlerProxy(n)};function Ue(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){for(var i,r=t;r;){if(r.clipPath&&!r.clipPath.contain(e,n))return!1;r.silent&&(i=!0),r=r.parent}return!i||Fe}return!1}function je(t,e,n){var i=t.painter;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}Ge.prototype={constructor:Ge,setHandlerProxy:function(t){this.proxy&&this.proxy.dispose(),t&&(Bt.each(We,(function(e){t.on&&t.on(e,this[e],this)}),this),t.handler=this),this.proxy=t},mousemove:function(t){var e=t.zrX,n=t.zrY,i=je(this,e,n),r=this._hovered,a=r.target;a&&!a.__zr&&(a=(r=this.findHover(r.x,r.y)).target);var o=this._hovered=i?{x:e,y:n}:this.findHover(e,n),s=o.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),a&&s!==a&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(o,"mousemove",t),s&&s!==a&&this.dispatchToElement(o,"mouseover",t)},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})},resize:function(t){this._hovered={}},dispatch:function(t,e){var n=this[t];n&&n.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,n){var i=(t=t||{}).target;if(!i||!i.silent){for(var r="on"+e,a=function(t,e,n){return{type:t,event:n,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:Ve}}(e,t,n);i&&(i[r]&&(a.cancelBubble=i[r].call(i,a)),i.trigger(e,a),i=i.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(e,a),this.painter&&this.painter.eachOtherLayer((function(t){"function"==typeof t[r]&&t[r].call(t,a),t.trigger&&t.trigger(e,a)})))}},findHover:function(t,e,n){for(var i=this.storage.getDisplayList(),r={x:t,y:e},a=i.length-1;a>=0;a--){var o;if(i[a]!==n&&!i[a].ignore&&(o=Ue(i[a],t,e))&&(!r.topTarget&&(r.topTarget=i[a]),o!==Fe)){r.target=i[a];break}}return r},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new Be);var n=this._gestureMgr;"start"===e&&n.clear();var i=n.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&n.clear(),i){var r=i.type;t.gestureEvent=r,this.dispatchToElement({target:i.target},r,i.event)}}},Bt.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){Ge.prototype[t]=function(e){var n,i,r=e.zrX,a=e.zrY,o=je(this,r,a);if("mouseup"===t&&o||(i=(n=this.findHover(r,a)).target),"mousedown"===t)this._downEl=i,this._downPoint=[e.zrX,e.zrY],this._upEl=i;else if("mouseup"===t)this._upEl=i;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||se.dist(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}})),Bt.mixin(Ge,pe),Bt.mixin(Ge,he);var Ye=Ge,qe="undefined"==typeof Float32Array?Array:Float32Array;function Xe(){var t=new qe(6);return Ze(t),t}function Ze(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function $e(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}var Ke=function(t,e,n){var i=e[0]*n[0]+e[2]*n[1],r=e[1]*n[0]+e[3]*n[1],a=e[0]*n[2]+e[2]*n[3],o=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],l=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=i,t[1]=r,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t},Qe=function(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},Je=function(t,e,n){var i=e[0],r=e[2],a=e[4],o=e[1],s=e[3],l=e[5],u=Math.sin(n),h=Math.cos(n);return t[0]=i*h+o*u,t[1]=-i*u+o*h,t[2]=r*h+s*u,t[3]=-r*u+h*s,t[4]=h*a+u*l,t[5]=h*l-u*a,t},tn=function(t,e,n){var i=n[0],r=n[1];return t[0]=e[0]*i,t[1]=e[1]*r,t[2]=e[2]*i,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*r,t},en=function(t,e){var n=e[0],i=e[2],r=e[4],a=e[1],o=e[3],s=e[5],l=n*o-a*i;return l?(l=1/l,t[0]=o*l,t[1]=-a*l,t[2]=-i*l,t[3]=n*l,t[4]=(i*s-o*r)*l,t[5]=(a*r-n*s)*l,t):null},nn={create:Xe,identity:Ze,copy:$e,mul:Ke,translate:Qe,rotate:Je,scale:tn,invert:en,clone:function(t){var e=Xe();return $e(e,t),e}},rn=nn.identity,an=5e-5;function on(t){return t>an||t<-5e-5}var sn=function(t){(t=t||{}).position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},ln=sn.prototype;ln.transform=null,ln.needLocalTransform=function(){return on(this.rotation)||on(this.position[0])||on(this.position[1])||on(this.scale[0]-1)||on(this.scale[1]-1)};var un=[];ln.updateTransform=function(){var t=this.parent,e=t&&t.transform,n=this.needLocalTransform(),i=this.transform;if(n||e){i=i||nn.create(),n?this.getLocalTransform(i):rn(i),e&&(n?nn.mul(i,t.transform,i):nn.copy(i,t.transform)),this.transform=i;var r=this.globalScaleRatio;if(null!=r&&1!==r){this.getGlobalScale(un);var a=un[0]<0?-1:1,o=un[1]<0?-1:1,s=((un[0]-a)*r+a)/un[0]||0,l=((un[1]-o)*r+o)/un[1]||0;i[0]*=s,i[1]*=s,i[2]*=l,i[3]*=l}this.invTransform=this.invTransform||nn.create(),nn.invert(this.invTransform,i)}else i&&rn(i)},ln.getLocalTransform=function(t){return sn.getLocalTransform(this,t)},ln.setTransform=function(t){var e=this.transform,n=t.dpr||1;e?t.setTransform(n*e[0],n*e[1],n*e[2],n*e[3],n*e[4],n*e[5]):t.setTransform(n,0,0,n,0,0)},ln.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var hn=[],cn=nn.create();ln.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=this.position,r=this.scale;on(e-1)&&(e=Math.sqrt(e)),on(n-1)&&(n=Math.sqrt(n)),t[0]<0&&(e=-e),t[3]<0&&(n=-n),i[0]=t[4],i[1]=t[5],r[0]=e,r[1]=n,this.rotation=Math.atan2(-t[1]/n,t[0]/e)}},ln.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(nn.mul(hn,t.invTransform,e),e=hn);var n=this.origin;n&&(n[0]||n[1])&&(cn[4]=n[0],cn[5]=n[1],nn.mul(hn,e,cn),hn[4]-=n[0],hn[5]-=n[1],e=hn),this.setLocalTransform(e)}},ln.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},ln.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&se.applyTransform(n,n,i),n},ln.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&se.applyTransform(n,n,i),n},sn.getLocalTransform=function(t,e){rn(e=e||[]);var n=t.origin,i=t.scale||[1,1],r=t.rotation||0,a=t.position||[0,0];return n&&(e[4]-=n[0],e[5]-=n[1]),nn.scale(e,e,i),r&&nn.rotate(e,e,r),n&&(e[4]+=n[0],e[5]+=n[1]),e[4]+=a[0],e[5]+=a[1],e};var dn=sn,fn={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=i*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-fn.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*fn.bounceIn(2*t):.5*fn.bounceOut(2*t-1)+.5}},pn=fn;function gn(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null!=t.loop&&t.loop,this.gap=t.gap||0,this.easing=t.easing||"Linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart,this._pausedTime=0,this._paused=!1}gn.prototype={constructor:gn,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)this._pausedTime+=e;else{var n=(t-this._startTime-this._pausedTime)/this._life;if(!(n<0)){n=Math.min(n,1);var i=this.easing,r="string"==typeof i?pn[i]:i,a="function"==typeof r?r(n):n;return this.fire("frame",a),1===n?this.loop?(this.restart(t),"restart"):(this._needsRemove=!0,"destroy"):null}}},restart:function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(t,e){this[t="on"+t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var mn=gn,vn=function(){this.head=null,this.tail=null,this._len=0},yn=vn.prototype;yn.insert=function(t){var e=new _n(t);return this.insertEntry(e),e},yn.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},yn.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--},yn.len=function(){return this._len},yn.clear=function(){this.head=this.tail=null,this._len=0};var _n=function(t){this.value=t,this.next,this.prev},xn=function(t){this._list=new vn,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},wn=xn.prototype;wn.put=function(t,e){var n=this._list,i=this._map,r=null;if(null==i[t]){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=n.head;n.remove(s),delete i[s.key],r=s.value,this._lastRemovedEntry=s}o?o.value=e:o=new _n(e),o.key=t,n.insertEntry(o),i[t]=o}return r},wn.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},wn.clear=function(){this._list.clear(),this._map={}};var bn=xn,Sn={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 Mn(t){return(t=Math.round(t))<0?0:t>255?255:t}function Tn(t){return t<0?0:t>1?1:t}function In(t){return t.length&&"%"===t.charAt(t.length-1)?Mn(parseFloat(t)/100*255):Mn(parseInt(t,10))}function Cn(t){return t.length&&"%"===t.charAt(t.length-1)?Tn(parseFloat(t)/100):Tn(parseFloat(t))}function Dn(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function kn(t,e,n){return t+(e-t)*n}function An(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function On(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var Ln=new bn(20),Pn=null;function Rn(t,e){Pn&&On(Pn,e),Pn=Ln.put(t,Pn||e.slice())}function En(t,e){if(t){e=e||[];var n=Ln.get(t);if(n)return On(e,n);var i,r=(t+="").replace(/ /g,"").toLowerCase();if(r in Sn)return On(e,Sn[r]),Rn(t,e),e;if("#"===r.charAt(0))return 4===r.length?(i=parseInt(r.substr(1),16))>=0&&i<=4095?(An(e,(3840&i)>>4|(3840&i)>>8,240&i|(240&i)>>4,15&i|(15&i)<<4,1),Rn(t,e),e):void An(e,0,0,0,1):7===r.length?(i=parseInt(r.substr(1),16))>=0&&i<=16777215?(An(e,(16711680&i)>>16,(65280&i)>>8,255&i,1),Rn(t,e),e):void An(e,0,0,0,1):void 0;var a=r.indexOf("("),o=r.indexOf(")");if(-1!==a&&o+1===r.length){var s=r.substr(0,a),l=r.substr(a+1,o-(a+1)).split(","),u=1;switch(s){case"rgba":if(4!==l.length)return void An(e,0,0,0,1);u=Cn(l.pop());case"rgb":return 3!==l.length?void An(e,0,0,0,1):(An(e,In(l[0]),In(l[1]),In(l[2]),u),Rn(t,e),e);case"hsla":return 4!==l.length?void An(e,0,0,0,1):(l[3]=Cn(l[3]),Nn(l,e),Rn(t,e),e);case"hsl":return 3!==l.length?void An(e,0,0,0,1):(Nn(l,e),Rn(t,e),e);default:return}}An(e,0,0,0,1)}}function Nn(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=Cn(t[1]),r=Cn(t[2]),a=r<=.5?r*(i+1):r+i-r*i,o=2*r-a;return An(e=e||[],Mn(255*Dn(o,a,n+1/3)),Mn(255*Dn(o,a,n)),Mn(255*Dn(o,a,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function zn(t,e,n){if(e&&e.length&&t>=0&&t<=1){n=n||[];var i=t*(e.length-1),r=Math.floor(i),a=Math.ceil(i),o=e[r],s=e[a],l=i-r;return n[0]=Mn(kn(o[0],s[0],l)),n[1]=Mn(kn(o[1],s[1],l)),n[2]=Mn(kn(o[2],s[2],l)),n[3]=Tn(kn(o[3],s[3],l)),n}}function Bn(t,e,n){if(e&&e.length&&t>=0&&t<=1){var i=t*(e.length-1),r=Math.floor(i),a=Math.ceil(i),o=En(e[r]),s=En(e[a]),l=i-r,u=Fn([Mn(kn(o[0],s[0],l)),Mn(kn(o[1],s[1],l)),Mn(kn(o[2],s[2],l)),Tn(kn(o[3],s[3],l))],"rgba");return n?{color:u,leftIndex:r,rightIndex:a,value:i}:u}}function Fn(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+")"}}var Vn=function(t,e){var n=En(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,n[i]>255?n[i]=255:t[i]<0&&(n[i]=0);return Fn(n,4===n.length?"rgba":"rgb")}},Hn=function(t){var e=En(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)},Wn=function(t,e,n,i){if(t=En(t))return t=function(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,a=t[2]/255,o=Math.min(i,r,a),s=Math.max(i,r,a),l=s-o,u=(s+o)/2;if(0===l)e=0,n=0;else{n=u<.5?l/(s+o):l/(2-s-o);var h=((s-i)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-a)/6+l/2)/l;i===s?e=d-c:r===s?e=1/3+h-d:a===s&&(e=2/3+c-h),e<0&&(e+=1),e>1&&(e-=1)}var f=[360*e,n,u];return null!=t[3]&&f.push(t[3]),f}}(t),null!=e&&(t[0]=function(t){return(t=Math.round(t))<0?0:t>360?360:t}(e)),null!=n&&(t[1]=Cn(n)),null!=i&&(t[2]=Cn(i)),Fn(Nn(t),"rgba")},Gn=function(t,e){if((t=En(t))&&null!=e)return t[3]=Tn(e),Fn(t,"rgba")},Un={parse:En,lift:Vn,toHex:Hn,fastLerp:zn,fastMapToColor:zn,lerp:Bn,mapToColor:Bn,modifyHSL:Wn,modifyAlpha:Gn,stringify:Fn},jn=Bt.isArrayLike,Yn=Array.prototype.slice;function qn(t,e){return t[e]}function Xn(t,e,n){t[e]=n}function Zn(t,e,n){return(e-t)*n+t}function $n(t,e,n){return n>.5?e:t}function Kn(t,e,n,i,r){var a=t.length;if(1===r)for(var o=0;o<a;o++)i[o]=Zn(t[o],e[o],n);else{var s=a&&t[0].length;for(o=0;o<a;o++)for(var l=0;l<s;l++)i[o][l]=Zn(t[o][l],e[o][l],n)}}function Qn(t,e,n){var i=t.length,r=e.length;if(i!==r)if(i>r)t.length=r;else for(var a=i;a<r;a++)t.push(1===n?e[a]:Yn.call(e[a]));var o=t[0]&&t[0].length;for(a=0;a<t.length;a++)if(1===n)isNaN(t[a])&&(t[a]=e[a]);else for(var s=0;s<o;s++)isNaN(t[a][s])&&(t[a][s]=e[a][s])}function Jn(t,e,n){if(t===e)return!0;var i=t.length;if(i!==e.length)return!1;if(1===n){for(var r=0;r<i;r++)if(t[r]!==e[r])return!1}else{var a=t[0].length;for(r=0;r<i;r++)for(var o=0;o<a;o++)if(t[r][o]!==e[r][o])return!1}return!0}function ti(t,e,n,i,r,a,o,s,l){var u=t.length;if(1===l)for(var h=0;h<u;h++)s[h]=ei(t[h],e[h],n[h],i[h],r,a,o);else{var c=t[0].length;for(h=0;h<u;h++)for(var d=0;d<c;d++)s[h][d]=ei(t[h][d],e[h][d],n[h][d],i[h][d],r,a,o)}}function ei(t,e,n,i,r,a,o){var s=.5*(n-t),l=.5*(i-e);return(2*(e-n)+s+l)*o+(-3*(e-n)-2*s-l)*a+s*r+e}function ni(t){if(jn(t)){var e=t.length;if(jn(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 ii(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function ri(t,e,n,i,r,a){var o=t._getter,s=t._setter,l="spline"===e,u=i.length;if(u){var h,c=i[0].value,d=jn(c),f=!1,p=!1,g=d?function(t){var e=t[t.length-1].value;return jn(e&&e[0])?2:1}(i):0;i.sort((function(t,e){return t.time-e.time})),h=i[u-1].time;for(var m=[],v=[],y=i[0].value,_=!0,x=0;x<u;x++){m.push(i[x].time/h);var w=i[x].value;if(d&&Jn(w,y,g)||!d&&w===y||(_=!1),y=w,"string"==typeof w){var b=Un.parse(w);b?(w=b,f=!0):p=!0}v.push(w)}if(a||!_){var S=v[u-1];for(x=0;x<u-1;x++)d?Qn(v[x],S,g):!isNaN(v[x])||isNaN(S)||p||f||(v[x]=S);d&&Qn(o(t._target,r),S,g);var M,T,I,C,D,k=0,A=0;if(f)var O=[0,0,0,0];var L=new mn({target:t._target,life:h,loop:t._loop,delay:t._delay,onframe:function(t,e){var n;if(e<0)n=0;else if(e<A){for(n=Math.min(k+1,u-1);n>=0&&!(m[n]<=e);n--);n=Math.min(n,u-2)}else{for(n=k;n<u&&!(m[n]>e);n++);n=Math.min(n-1,u-2)}k=n,A=e;var i=m[n+1]-m[n];if(0!==i)if(M=(e-m[n])/i,l)if(I=v[n],T=v[0===n?n:n-1],C=v[n>u-2?u-1:n+1],D=v[n>u-3?u-1:n+2],d)ti(T,I,C,D,M,M*M,M*M*M,o(t,r),g);else{if(f)a=ti(T,I,C,D,M,M*M,M*M*M,O,1),a=ii(O);else{if(p)return $n(I,C,M);a=ei(T,I,C,D,M,M*M,M*M*M)}s(t,r,a)}else if(d)Kn(v[n],v[n+1],M,o(t,r),g);else{var a;if(f)Kn(v[n],v[n+1],M,O,1),a=ii(O);else{if(p)return $n(v[n],v[n+1],M);a=Zn(v[n],v[n+1],M)}s(t,r,a)}},ondestroy:n});return e&&"spline"!==e&&(L.easing=e),L}}}var ai=function(t,e,n,i){this._tracks={},this._target=t,this._loop=e||!1,this._getter=n||qn,this._setter=i||Xn,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};ai.prototype={when:function(t,e){var n=this._tracks;for(var i in e)if(e.hasOwnProperty(i)){if(!n[i]){n[i]=[];var r=this._getter(this._target,i);if(null==r)continue;0!==t&&n[i].push({time:0,value:ni(r)})}n[i].push({time:t,value:e[i]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].pause();this._paused=!0},resume:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var t=this._doneList,e=t.length,n=0;n<e;n++)t[n].call(this)},start:function(t,e){var n,i=this,r=0,a=function(){--r||i._doneCallback()};for(var o in this._tracks)if(this._tracks.hasOwnProperty(o)){var s=ri(this,t,a,this._tracks[o],o,e);s&&(this._clipList.push(s),r++,this.animation&&this.animation.addClip(s),n=s)}if(n){var l=n.onframe;n.onframe=function(t,e){l(t,e);for(var n=0;n<i._onframeList.length;n++)i._onframeList[n](t,e)}}return r||this._doneCallback(),this},stop:function(t){for(var e=this._clipList,n=this.animation,i=0;i<e.length;i++){var r=e[i];t&&r.onframe(this._target,1),n&&n.removeClip(r)}e.length=0},delay:function(t){return this._delay=t,this},done:function(t){return t&&this._doneList.push(t),this},getClips:function(){return this._clipList}};var oi=ai,si=1;"undefined"!=typeof window&&(si=Math.max(window.devicePixelRatio||1,1));var li={debugMode:0,devicePixelRatio:si},ui=function(){},hi=Bt.isString,ci=Bt.isFunction,di=Bt.isObject,fi=Bt.isArrayLike,pi=Bt.indexOf,gi=function(){this.animators=[]};function mi(t,e,n,i,r,a,o,s){hi(i)?(a=r,r=i,i=0):ci(r)?(a=r,r="linear",i=0):ci(i)?(a=i,i=0):ci(n)?(a=n,n=500):n||(n=500),t.stopAnimation(),vi(t,"",t,e,n,i,s);var l=t.animators.slice(),u=l.length;function h(){--u||a&&a()}u||a&&a();for(var c=0;c<l.length;c++)l[c].done(h).start(r,o)}function vi(t,e,n,i,r,a,o){var s={},l=0;for(var u in i)i.hasOwnProperty(u)&&(null!=n[u]?di(i[u])&&!fi(i[u])?vi(t,e?e+"."+u:u,n[u],i[u],r,a,o):(o?(s[u]=n[u],yi(t,e,u,i[u])):s[u]=i[u],l++):null==i[u]||o||yi(t,e,u,i[u]));l>0&&t.animate(e,!1).when(null==r?500:r,s).delay(a||0)}function yi(t,e,n,i){if(e){var r={};r[e]={},r[e][n]=i,t.attr(r)}else t.attr(n,i)}gi.prototype={constructor:gi,animate:function(t,e){var n,i=!1,r=this,a=this.__zr;if(t){var o=t.split("."),s=r;i="shape"===o[0];for(var l=0,u=o.length;l<u;l++)s&&(s=s[o[l]]);s&&(n=s)}else n=r;if(n){var h=r.animators,c=new oi(n,e);return c.during((function(t){r.dirty(i)})).done((function(){h.splice(pi(h,c),1)})),h.push(c),a&&a.animation.addAnimator(c),c}ui('Property "'+t+'" is not existed in element '+r.id)},stopAnimation:function(t){for(var e=this.animators,n=e.length,i=0;i<n;i++)e[i].stop(t);return e.length=0,this},animateTo:function(t,e,n,i,r,a){mi(this,t,e,n,i,r,a)},animateFrom:function(t,e,n,i,r,a){mi(this,t,e,n,i,r,a,!0)}};var _i=gi,xi=function(t){dn.call(this,t),pe.call(this,t),_i.call(this,t),this.id=t.id||Q()};xi.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=t,n[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(t,e){},attrKV:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var n=this[t];n||(n=this[t]=[]),n[0]=e[0],n[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(Bt.isObject(t))for(var n in t)t.hasOwnProperty(n)&&this.attrKV(n,t[n]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),this.clipPath=t,t.__zr=e,t.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.addAnimator(e[n]);this.clipPath&&this.clipPath.addSelfToZr(t)},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)}},Bt.mixin(xi,_i),Bt.mixin(xi,dn),Bt.mixin(xi,pe);var wi,bi,Si,Mi,Ti=xi,Ii=se.applyTransform,Ci=Math.min,Di=Math.max;function ki(t,e,n,i){n<0&&(t+=n,n=-n),i<0&&(e+=i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}ki.prototype={constructor:ki,union:function(t){var e=Ci(t.x,this.x),n=Ci(t.y,this.y);this.width=Di(t.x+t.width,this.x+this.width)-e,this.height=Di(t.y+t.height,this.y+this.height)-n,this.x=e,this.y=n},applyTransform:(wi=[],bi=[],Si=[],Mi=[],function(t){if(t){wi[0]=Si[0]=this.x,wi[1]=Mi[1]=this.y,bi[0]=Mi[0]=this.x+this.width,bi[1]=Si[1]=this.y+this.height,Ii(wi,wi,t),Ii(bi,bi,t),Ii(Si,Si,t),Ii(Mi,Mi,t),this.x=Ci(wi[0],bi[0],Si[0],Mi[0]),this.y=Ci(wi[1],bi[1],Si[1],Mi[1]);var e=Di(wi[0],bi[0],Si[0],Mi[0]),n=Di(wi[1],bi[1],Si[1],Mi[1]);this.width=e-this.x,this.height=n-this.y}}),calculateTransform:function(t){var e=this,n=t.width/e.width,i=t.height/e.height,r=nn.create();return nn.translate(r,r,[-e.x,-e.y]),nn.scale(r,r,[n,i]),nn.translate(r,r,[t.x,t.y]),r},intersect:function(t){if(!t)return!1;t instanceof ki||(t=ki.create(t));var e=this,n=e.x,i=e.x+e.width,r=e.y,a=e.y+e.height,o=t.x,s=t.x+t.width,l=t.y,u=t.y+t.height;return!(i<o||s<n||a<l||u<r)},contain:function(t,e){var n=this;return t>=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},clone:function(){return new ki(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},ki.create=function(t){return new ki(t.x,t.y,t.width,t.height)};var Ai=ki,Oi=function(t){for(var e in t=t||{},Ti.call(this,t),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};Oi.prototype={constructor:Oi,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,n=0;n<e.length;n++)if(e[n].name===t)return e[n]},childCount:function(){return this._children.length},add:function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},addBefore:function(t,e){if(t&&t!==this&&t.parent!==this&&e&&e.parent===this){var n=this._children,i=n.indexOf(e);i>=0&&(n.splice(i,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,n=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof Oi&&t.addChildrenToStorage(e)),n&&n.refresh()},remove:function(t){var e=this.__zr,n=this.__storage,i=this._children,r=Bt.indexOf(i,t);return r<0||(i.splice(r,1),t.parent=null,n&&(n.delFromStorage(t),t instanceof Oi&&t.delChildrenFromStorage(n)),e&&e.refresh()),this},removeAll:function(){var t,e,n=this._children,i=this.__storage;for(e=0;e<n.length;e++)t=n[e],i&&(i.delFromStorage(t),t instanceof Oi&&t.delChildrenFromStorage(i)),t.parent=null;return n.length=0,this},eachChild:function(t,e){for(var n=this._children,i=0;i<n.length;i++){var r=n[i];t.call(e,r,i)}return this},traverse:function(t,e){for(var n=0;n<this._children.length;n++){var i=this._children[n];t.call(e,i),"group"===i.type&&i.traverse(t,e)}return this},addChildrenToStorage:function(t){for(var e=0;e<this._children.length;e++){var n=this._children[e];t.addToStorage(n),n instanceof Oi&&n.addChildrenToStorage(t)}},delChildrenFromStorage:function(t){for(var e=0;e<this._children.length;e++){var n=this._children[e];t.delFromStorage(n),n instanceof Oi&&n.delChildrenFromStorage(t)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(t){for(var e=null,n=new Ai(0,0,0,0),i=t||this._children,r=[],a=0;a<i.length;a++){var o=i[a];if(!o.ignore&&!o.invisible){var s=o.getBoundingRect(),l=o.getLocalTransform(r);l?(n.copy(s),n.applyTransform(l),(e=e||n.clone()).union(n)):(e=e||s.clone()).union(s)}}return e||n}},Bt.inherits(Oi,Ti);var Li=Oi,Pi=32,Ri=7;function Ei(t,e,n,i){var r=e+1;if(r===n)return 1;if(i(t[r++],t[e])<0){for(;r<n&&i(t[r],t[r-1])<0;)r++;!function(t,e,n){n--;for(;e<n;){var i=t[e];t[e++]=t[n],t[n--]=i}}(t,e,r)}else for(;r<n&&i(t[r],t[r-1])>=0;)r++;return r-e}function Ni(t,e,n,i,r){for(i===e&&i++;i<n;i++){for(var a,o=t[i],s=e,l=i;s<l;)r(o,t[a=s+l>>>1])<0?l=a:s=a+1;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=o}}function zi(t,e,n,i,r,a){var o=0,s=0,l=1;if(a(t,e[n+r])>0){for(s=i-r;l<s&&a(t,e[n+r+l])>0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=r,l+=r}else{for(s=r+1;l<s&&a(t,e[n+r-l])<=0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=o;o=r-l,l=r-u}for(o++;o<l;){var h=o+(l-o>>>1);a(t,e[n+h])>0?o=h+1:l=h}return l}function Bi(t,e,n,i,r,a){var o=0,s=0,l=1;if(a(t,e[n+r])<0){for(s=r+1;l<s&&a(t,e[n+r-l])<0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=o;o=r-l,l=r-u}else{for(s=i-r;l<s&&a(t,e[n+r+l])>=0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=r,l+=r}for(o++;o<l;){var h=o+(l-o>>>1);a(t,e[n+h])<0?l=h:o=h+1}return l}function Fi(t,e){var n,i,r=Ri,a=0;t.length;var o=[];function s(s){var l=n[s],u=i[s],h=n[s+1],c=i[s+1];i[s]=u+c,s===a-3&&(n[s+1]=n[s+2],i[s+1]=i[s+2]),a--;var d=Bi(t[h],t,l,u,0,e);l+=d,0!==(u-=d)&&0!==(c=zi(t[l+u-1],t,h,c,c-1,e))&&(u<=c?function(n,i,a,s){var l=0;for(l=0;l<i;l++)o[l]=t[n+l];var u=0,h=a,c=n;if(t[c++]=t[h++],0==--s){for(l=0;l<i;l++)t[c+l]=o[u+l];return}if(1===i){for(l=0;l<s;l++)t[c+l]=t[h+l];return void(t[c+s]=o[u])}var d,f,p,g=r;for(;;){d=0,f=0,p=!1;do{if(e(t[h],o[u])<0){if(t[c++]=t[h++],f++,d=0,0==--s){p=!0;break}}else if(t[c++]=o[u++],d++,f=0,1==--i){p=!0;break}}while((d|f)<g);if(p)break;do{if(0!==(d=Bi(t[h],o,u,i,0,e))){for(l=0;l<d;l++)t[c+l]=o[u+l];if(c+=d,u+=d,(i-=d)<=1){p=!0;break}}if(t[c++]=t[h++],0==--s){p=!0;break}if(0!==(f=zi(o[u],t,h,s,0,e))){for(l=0;l<f;l++)t[c+l]=t[h+l];if(c+=f,h+=f,0===(s-=f)){p=!0;break}}if(t[c++]=o[u++],1==--i){p=!0;break}g--}while(d>=Ri||f>=Ri);if(p)break;g<0&&(g=0),g+=2}if((r=g)<1&&(r=1),1===i){for(l=0;l<s;l++)t[c+l]=t[h+l];t[c+s]=o[u]}else{if(0===i)throw new Error;for(l=0;l<i;l++)t[c+l]=o[u+l]}}(l,u,h,c):function(n,i,a,s){var l=0;for(l=0;l<s;l++)o[l]=t[a+l];var u=n+i-1,h=s-1,c=a+s-1,d=0,f=0;if(t[c--]=t[u--],0==--i){for(d=c-(s-1),l=0;l<s;l++)t[d+l]=o[l];return}if(1===s){for(f=(c-=i)+1,d=(u-=i)+1,l=i-1;l>=0;l--)t[f+l]=t[d+l];return void(t[c]=o[h])}var p=r;for(;;){var g=0,m=0,v=!1;do{if(e(o[h],t[u])<0){if(t[c--]=t[u--],g++,m=0,0==--i){v=!0;break}}else if(t[c--]=o[h--],m++,g=0,1==--s){v=!0;break}}while((g|m)<p);if(v)break;do{if(0!==(g=i-Bi(o[h],t,n,i,i-1,e))){for(i-=g,f=(c-=g)+1,d=(u-=g)+1,l=g-1;l>=0;l--)t[f+l]=t[d+l];if(0===i){v=!0;break}}if(t[c--]=o[h--],1==--s){v=!0;break}if(0!==(m=s-zi(t[u],o,0,s,s-1,e))){for(s-=m,f=(c-=m)+1,d=(h-=m)+1,l=0;l<m;l++)t[f+l]=o[d+l];if(s<=1){v=!0;break}}if(t[c--]=t[u--],0==--i){v=!0;break}p--}while(g>=Ri||m>=Ri);if(v)break;p<0&&(p=0),p+=2}(r=p)<1&&(r=1);if(1===s){for(f=(c-=i)+1,d=(u-=i)+1,l=i-1;l>=0;l--)t[f+l]=t[d+l];t[c]=o[h]}else{if(0===s)throw new Error;for(d=c-(s-1),l=0;l<s;l++)t[d+l]=o[l]}}(l,u,h,c))}n=[],i=[],this.mergeRuns=function(){for(;a>1;){var t=a-2;if(t>=1&&i[t-1]<=i[t]+i[t+1]||t>=2&&i[t-2]<=i[t]+i[t-1])i[t-1]<i[t+1]&&t--;else if(i[t]>i[t+1])break;s(t)}},this.forceMergeRuns=function(){for(;a>1;){var t=a-2;t>0&&i[t-1]<i[t+1]&&t--,s(t)}},this.pushRun=function(t,e){n[a]=t,i[a]=e,a+=1}}var Vi=function(t,e,n,i){n||(n=0),i||(i=t.length);var r=i-n;if(!(r<2)){var a=0;if(r<Pi)Ni(t,n,i,n+(a=Ei(t,n,i,e)),e);else{var o=new Fi(t,e),s=function(t){for(var e=0;t>=Pi;)e|=1&t,t>>=1;return t+e}(r);do{if((a=Ei(t,n,i,e))<s){var l=r;l>s&&(l=s),Ni(t,n,n+l,n+a,e),a=l}o.pushRun(n,a),o.mergeRuns(),r-=a,n+=a}while(0!==r);o.forceMergeRuns()}}};function Hi(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var Wi=function(){this._roots=[],this._displayList=[],this._displayListLen=0};Wi.prototype={constructor:Wi,traverse:function(t,e){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(t,e)},getDisplayList:function(t,e){return e=e||!1,t&&this.updateDisplayList(e),this._displayList},updateDisplayList:function(t){this._displayListLen=0;for(var e=this._roots,n=this._displayList,i=0,r=e.length;i<r;i++)this._updateAndAddDisplayable(e[i],null,t);n.length=this._displayListLen,J.canvasSupported&&Vi(n,Hi)},_updateAndAddDisplayable:function(t,e,n){if(!t.ignore||n){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var i=t.clipPath;if(i){e=e?e.slice():[];for(var r=i,a=t;r;)r.parent=a,r.updateTransform(),e.push(r),a=r,r=r.clipPath}if(t.isGroup){for(var o=t._children,s=0;s<o.length;s++){var l=o[s];t.__dirty&&(l.__dirty=!0),this._updateAndAddDisplayable(l,e,n)}t.__dirty=!1}else t.__clipPaths=e,this._displayList[this._displayListLen++]=t}},addRoot:function(t){t.__storage!==this&&(t instanceof Li&&t.addChildrenToStorage(this),this.addToStorage(t),this._roots.push(t))},delRoot:function(t){if(null==t){for(var e=0;e<this._roots.length;e++){var n=this._roots[e];n instanceof Li&&n.delChildrenFromStorage(this)}return this._roots=[],this._displayList=[],void(this._displayListLen=0)}if(t instanceof Array){e=0;for(var i=t.length;e<i;e++)this.delRoot(t[e])}else{var r=Bt.indexOf(this._roots,t);r>=0&&(this.delFromStorage(t),this._roots.splice(r,1),t instanceof Li&&t.delChildrenFromStorage(this))}},addToStorage:function(t){return t&&(t.__storage=this,t.dirty(!1)),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:Hi};var Gi=Wi,Ui={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1};var ji=function(t,e,n){return Ui.hasOwnProperty(e)?n*t.dpr:n},Yi={ContextCachedBy:{NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},WILL_BE_RESTORED:9},qi=Yi.ContextCachedBy,Xi=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],Zi=function(t){this.extendFrom(t,!1)};function $i(t,e,n){var i=null==e.x?0:e.x,r=null==e.x2?1:e.x2,a=null==e.y?0:e.y,o=null==e.y2?0:e.y2;return e.global||(i=i*n.width+n.x,r=r*n.width+n.x,a=a*n.height+n.y,o=o*n.height+n.y),i=isNaN(i)?0:i,r=isNaN(r)?1:r,a=isNaN(a)?0:a,o=isNaN(o)?0:o,t.createLinearGradient(i,a,r,o)}function Ki(t,e,n){var i=n.width,r=n.height,a=Math.min(i,r),o=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;return e.global||(o=o*i+n.x,s=s*r+n.y,l*=a),t.createRadialGradient(o,s,0,o,s,l)}Zi.prototype={constructor:Zi,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,n){var i=this,r=n&&n.style,a=!r||t.__attrCachedBy!==qi.STYLE_BIND;t.__attrCachedBy=qi.STYLE_BIND;for(var o=0;o<Xi.length;o++){var s=Xi[o],l=s[0];(a||i[l]!==r[l])&&(t[l]=ji(t,l,i[l]||s[1]))}if((a||i.fill!==r.fill)&&(t.fillStyle=i.fill),(a||i.stroke!==r.stroke)&&(t.strokeStyle=i.stroke),(a||i.opacity!==r.opacity)&&(t.globalAlpha=null==i.opacity?1:i.opacity),(a||i.blend!==r.blend)&&(t.globalCompositeOperation=i.blend||"source-over"),this.hasStroke()){var u=i.lineWidth;t.lineWidth=u/(this.strokeNoScale&&e&&e.getLineScale?e.getLineScale():1)}},hasFill:function(){var t=this.fill;return null!=t&&"none"!==t},hasStroke:function(){var t=this.stroke;return null!=t&&"none"!==t&&this.lineWidth>0},extendFrom:function(t,e){if(t)for(var n in t)!t.hasOwnProperty(n)||!0!==e&&(!1===e?this.hasOwnProperty(n):null==t[n])||(this[n]=t[n])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,n){for(var i=("radial"===e.type?Ki:$i)(t,e,n),r=e.colorStops,a=0;a<r.length;a++)i.addColorStop(r[a].offset,r[a].color);return i}};for(var Qi=Zi.prototype,Ji=0;Ji<Xi.length;Ji++){var tr=Xi[Ji];tr[0]in Qi||(Qi[tr[0]]=tr[1])}Zi.getGradient=Qi.getGradient;var er=Zi,nr=function(t,e){this.image=t,this.repeat=e,this.type="pattern"};nr.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")};var ir=nr,rr=li.devicePixelRatio;function ar(){return!1}function or(t,e,n){var i=Bt.createCanvas(),r=e.getWidth(),a=e.getHeight(),o=i.style;return o&&(o.position="absolute",o.left=0,o.top=0,o.width=r+"px",o.height=a+"px",i.setAttribute("data-zr-dom-id",t)),i.width=r*n,i.height=a*n,i}var sr=function(t,e,n){var i;n=n||rr,"string"==typeof t?i=or(t,e,n):Bt.isObject(t)&&(t=(i=t).id),this.id=t,this.dom=i;var r=i.style;r&&(i.onselectstart=ar,r["-webkit-user-select"]="none",r["user-select"]="none",r["-webkit-touch-callout"]="none",r["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",r.padding=0,r.margin=0,r["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=e,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=n};sr.prototype={constructor:sr,__dirty:!0,__used:!1,__drawIndex:0,__startIndex:0,__endIndex:0,incremental:!1,getElementCount:function(){return this.__endIndex-this.__startIndex},initContext:function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},createBackBuffer:function(){var t=this.dpr;this.domBack=or("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},resize:function(t,e){var n=this.dpr,i=this.dom,r=i.style,a=this.domBack;r&&(r.width=t+"px",r.height=e+"px"),i.width=t*n,i.height=e*n,a&&(a.width=t*n,a.height=e*n,1!==n&&this.ctxBack.scale(n,n))},clear:function(t,e){var n,i=this.dom,r=this.ctx,a=i.width,o=i.height,s=(e=e||this.clearColor,this.motionBlur&&!t),l=this.lastFrameAlpha,u=this.dpr;(s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(i,0,0,a/u,o/u)),r.clearRect(0,0,a,o),e&&"transparent"!==e)&&(e.colorStops?(n=e.__canvasGradient||er.getGradient(r,e,{x:0,y:0,width:a,height:o}),e.__canvasGradient=n):e.image&&(n=ir.prototype.getCanvasPattern.call(e,r)),r.save(),r.fillStyle=n||e,r.fillRect(0,0,a,o),r.restore());if(s){var h=this.domBack;r.save(),r.globalAlpha=l,r.drawImage(h,0,0,a,o),r.restore()}}};var lr=sr,ur="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)},hr=new bn(50);function cr(){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 dr(t){return t&&t.width&&t.height}var fr=function(t,e,n,i,r){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!n)return e;var a=hr.get(t),o={hostEl:n,cb:i,cbPayload:r};return a?!dr(e=a.image)&&a.pending.push(o):((e=new Image).onload=e.onerror=cr,hr.put(t,e.__cachedImgObj={image:e,pending:[o]}),e.src=e.__zrImageSrc=t),e}return t}return e},pr={findExistImage:function(t){if("string"==typeof t){var e=hr.get(t);return e&&e.image}return t},createOrUpdateImage:fr,isImageReady:dr},gr=Bt.getContext,mr=Bt.extend,vr=Bt.retrieve2,yr=Bt.retrieve3,_r=Bt.trim,xr={},wr=0,br=5e3,Sr=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,Mr="12px sans-serif",Tr={};function Ir(t,e){var n=t+":"+(e=e||Mr);if(xr[n])return xr[n];for(var i=(t+"").split("\n"),r=0,a=0,o=i.length;a<o;a++)r=Math.max(Er(i[a],e).width,r);return wr>br&&(wr=0,xr={}),wr++,xr[n]=r,r}function Cr(t,e,n){return"right"===n?t-=e:"center"===n&&(t-=e/2),t}function Dr(t,e,n){return"middle"===n?t-=e/2:"bottom"===n&&(t-=e),t}function kr(t,e,n){var i=e.textPosition,r=e.textDistance,a=n.x,o=n.y;r=r||0;var s=n.height,l=n.width,u=s/2,h="left",c="top";switch(i){case"left":a-=r,o+=u,h="right",c="middle";break;case"right":a+=r+l,o+=u,c="middle";break;case"top":a+=l/2,o-=r,h="center",c="bottom";break;case"bottom":a+=l/2,o+=s+r,h="center";break;case"inside":a+=l/2,o+=u,h="center",c="middle";break;case"insideLeft":a+=r,o+=u,c="middle";break;case"insideRight":a+=l-r,o+=u,h="right",c="middle";break;case"insideTop":a+=l/2,o+=r,h="center";break;case"insideBottom":a+=l/2,o+=s-r,h="center",c="bottom";break;case"insideTopLeft":a+=r,o+=r;break;case"insideTopRight":a+=l-r,o+=r,h="right";break;case"insideBottomLeft":a+=r,o+=s-r,c="bottom";break;case"insideBottomRight":a+=l-r,o+=s-r,h="right",c="bottom"}return(t=t||{}).x=a,t.y=o,t.textAlign=h,t.textVerticalAlign=c,t}function Ar(t,e,n,i,r){if(!e)return"";var a=(t+"").split("\n");r=Or(e,n,i,r);for(var o=0,s=a.length;o<s;o++)a[o]=Lr(a[o],r);return a.join("\n")}function Or(t,e,n,i){(i=mr({},i)).font=e;n=vr(n,"...");i.maxIterations=vr(i.maxIterations,2);var r=i.minChar=vr(i.minChar,0);i.cnCharWidth=Ir("国",e);var a=i.ascCharWidth=Ir("a",e);i.placeholder=vr(i.placeholder,"");for(var o=t=Math.max(0,t-1),s=0;s<r&&o>=a;s++)o-=a;var l=Ir(n,e);return l>o&&(n="",l=0),o=t-l,i.ellipsis=n,i.ellipsisWidth=l,i.contentWidth=o,i.containerWidth=t,i}function Lr(t,e){var n=e.containerWidth,i=e.font,r=e.contentWidth;if(!n)return"";var a=Ir(t,i);if(a<=n)return t;for(var o=0;;o++){if(a<=r||o>=e.maxIterations){t+=e.ellipsis;break}var s=0===o?Pr(t,r,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*r/a):0;a=Ir(t=t.substr(0,s),i)}return""===t&&(t=e.placeholder),t}function Pr(t,e,n,i){for(var r=0,a=0,o=t.length;a<o&&r<e;a++){var s=t.charCodeAt(a);r+=0<=s&&s<=127?n:i}return a}function Rr(t){return Ir("国",t)}function Er(t,e){return Tr.measureText(t,e)}function Nr(t,e,n,i,r){null!=t&&(t+="");var a=vr(i,Rr(e)),o=t?t.split("\n"):[],s=o.length*a,l=s,u=!0;if(n&&(l+=n[0]+n[2]),t&&r){u=!1;var h=r.outerHeight,c=r.outerWidth;if(null!=h&&l>h)t="",o=[];else if(null!=c)for(var d=Or(c-(n?n[1]+n[3]:0),e,r.ellipsis,{minChar:r.minChar,placeholder:r.placeholder}),f=0,p=o.length;f<p;f++)o[f]=Lr(o[f],d)}return{lines:o,height:s,outerHeight:l,lineHeight:a,canCacheByTextString:u}}function zr(t,e){var n={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return n;for(var i,r=Sr.lastIndex=0;null!=(i=Sr.exec(t));){var a=i.index;a>r&&Br(n,t.substring(r,a)),Br(n,i[2],i[1]),r=Sr.lastIndex}r<t.length&&Br(n,t.substring(r,t.length));var o=n.lines,s=0,l=0,u=[],h=e.textPadding,c=e.truncate,d=c&&c.outerWidth,f=c&&c.outerHeight;h&&(null!=d&&(d-=h[1]+h[3]),null!=f&&(f-=h[0]+h[2]));for(var p=0;p<o.length;p++){for(var g=o[p],m=0,v=0,y=0;y<g.tokens.length;y++){var _=(k=g.tokens[y]).styleName&&e.rich[k.styleName]||{},x=k.textPadding=_.textPadding,w=k.font=_.font||e.font,b=k.textHeight=vr(_.textHeight,Rr(w));if(x&&(b+=x[0]+x[2]),k.height=b,k.lineHeight=yr(_.textLineHeight,e.textLineHeight,b),k.textAlign=_&&_.textAlign||e.textAlign,k.textVerticalAlign=_&&_.textVerticalAlign||"middle",null!=f&&s+k.lineHeight>f)return{lines:[],width:0,height:0};k.textWidth=Ir(k.text,w);var S=_.textWidth,M=null==S||"auto"===S;if("string"==typeof S&&"%"===S.charAt(S.length-1))k.percentWidth=S,u.push(k),S=0;else{if(M){S=k.textWidth;var T=_.textBackgroundColor,I=T&&T.image;I&&(I=pr.findExistImage(I),pr.isImageReady(I)&&(S=Math.max(S,I.width*b/I.height)))}var C=x?x[1]+x[3]:0;S+=C;var D=null!=d?d-v:null;null!=D&&D<S&&(!M||D<C?(k.text="",k.textWidth=S=0):(k.text=Ar(k.text,D-C,w,c.ellipsis,{minChar:c.minChar}),k.textWidth=Ir(k.text,w),S=k.textWidth+C))}v+=k.width=S,_&&(m=Math.max(m,k.lineHeight))}g.width=v,g.lineHeight=m,s+=m,l=Math.max(l,v)}n.outerWidth=n.width=vr(e.textWidth,l),n.outerHeight=n.height=vr(e.textHeight,s),h&&(n.outerWidth+=h[1]+h[3],n.outerHeight+=h[0]+h[2]);for(p=0;p<u.length;p++){var k,A=(k=u[p]).percentWidth;k.width=parseInt(A,10)/100*l}return n}function Br(t,e,n){for(var i=""===e,r=e.split("\n"),a=t.lines,o=0;o<r.length;o++){var s=r[o],l={styleName:n,text:s,isLineHolder:!s&&!i};if(o)a.push({tokens:[l]});else{var u=(a[a.length-1]||(a[0]={tokens:[]})).tokens,h=u.length;1===h&&u[0].isLineHolder?u[0]=l:(s||!h||i)&&u.push(l)}}}Tr.measureText=function(t,e){var n=gr();return n.font=e||Mr,n.measureText(t)};var Fr=function(t,e){Tr[t]=e},Vr=function(t,e,n,i,r,a,o,s){return o?function(t,e,n,i,r,a,o,s){var l=zr(t,{rich:o,truncate:s,font:e,textAlign:n,textPadding:r,textLineHeight:a}),u=l.outerWidth,h=l.outerHeight,c=Cr(0,u,n),d=Dr(0,h,i);return new Ai(c,d,u,h)}(t,e,n,i,r,a,o,s):function(t,e,n,i,r,a,o){var s=Nr(t,e,r,a,o),l=Ir(t,e);r&&(l+=r[1]+r[3]);var u=s.outerHeight,h=Cr(0,l,n),c=Dr(0,u,i),d=new Ai(h,c,l,u);return d.lineHeight=s.lineHeight,d}(t,e,n,i,r,a,s)},Hr=function(t,e,n){return kr({},{textPosition:t,textDistance:n},e)},Wr=function(t){var e=(t.fontSize||t.fontFamily)&&[t.fontStyle,t.fontWeight,(t.fontSize||12)+"px",t.fontFamily||"sans-serif"].join(" ");return e&&_r(e)||t.textFont||t.font},Gr={DEFAULT_FONT:Mr,$override:Fr,getWidth:Ir,getBoundingRect:Vr,adjustTextX:Cr,adjustTextY:Dr,calculateTextPosition:kr,adjustTextPositionOnRect:Hr,truncateText:Ar,getLineHeight:Rr,measureText:Er,parsePlainText:Nr,parseRichText:zr,makeFont:Wr};var Ur={buildPath:function(t,e){var n,i,r,a,o,s=e.x,l=e.y,u=e.width,h=e.height,c=e.r;u<0&&(s+=u,u=-u),h<0&&(l+=h,h=-h),"number"==typeof c?n=i=r=a=c:c instanceof Array?1===c.length?n=i=r=a=c[0]:2===c.length?(n=r=c[0],i=a=c[1]):3===c.length?(n=c[0],i=a=c[1],r=c[2]):(n=c[0],i=c[1],r=c[2],a=c[3]):n=i=r=a=0,n+i>u&&(n*=u/(o=n+i),i*=u/o),r+a>u&&(r*=u/(o=r+a),a*=u/o),i+r>h&&(i*=h/(o=i+r),r*=h/o),n+a>h&&(n*=h/(o=n+a),a*=h/o),t.moveTo(s+n,l),t.lineTo(s+u-i,l),0!==i&&t.arc(s+u-i,l+i,i,-Math.PI/2,0),t.lineTo(s+u,l+h-r),0!==r&&t.arc(s+u-r,l+h-r,r,0,Math.PI/2),t.lineTo(s+a,l+h),0!==a&&t.arc(s+a,l+h-a,a,Math.PI/2,Math.PI),t.lineTo(s,l+n),0!==n&&t.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}},jr=Bt.retrieve2,Yr=Bt.retrieve3,qr=Bt.each,Xr=Bt.normalizeCssArray,Zr=Bt.isString,$r=Bt.isObject,Kr=Yi.ContextCachedBy,Qr=Yi.WILL_BE_RESTORED,Jr=Gr.DEFAULT_FONT,ta={left:1,right:1,center:1},ea={top:1,bottom:1,middle:1},na=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],ia={},ra={};function aa(t){if(t){t.font=Gr.makeFont(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||ta[e]?e:"left";var n=t.textVerticalAlign||t.textBaseline;"center"===n&&(n="middle"),t.textVerticalAlign=null==n||ea[n]?n:"top",t.textPadding&&(t.textPadding=Xr(t.textPadding))}}function oa(t,e,n,i,r){if(n&&e.textRotation){var a=e.textOrigin;"center"===a?(i=n.width/2+n.x,r=n.height/2+n.y):a&&(i=a[0]+n.x,r=a[1]+n.y),t.translate(i,r),t.rotate(-e.textRotation),t.translate(-i,-r)}}function sa(t,e,n,i,r,a,o,s){var l=i.rich[n.styleName]||{};l.text=n.text;var u=n.textVerticalAlign,h=a+r/2;"top"===u?h=a+n.height/2:"bottom"===u&&(h=a+r-n.height/2),!n.isLineHolder&&la(l)&&ua(t,e,l,"right"===s?o-n.width:"center"===s?o-n.width/2:o,h-n.height/2,n.width,n.height);var c=n.textPadding;c&&(o=ma(o,s,c),h-=n.height/2-c[2]-n.textHeight/2),da(e,"shadowBlur",Yr(l.textShadowBlur,i.textShadowBlur,0)),da(e,"shadowColor",l.textShadowColor||i.textShadowColor||"transparent"),da(e,"shadowOffsetX",Yr(l.textShadowOffsetX,i.textShadowOffsetX,0)),da(e,"shadowOffsetY",Yr(l.textShadowOffsetY,i.textShadowOffsetY,0)),da(e,"textAlign",s),da(e,"textBaseline","middle"),da(e,"font",n.font||Jr);var d=fa(l.textStroke||i.textStroke,p),f=pa(l.textFill||i.textFill),p=jr(l.textStrokeWidth,i.textStrokeWidth);d&&(da(e,"lineWidth",p),da(e,"strokeStyle",d),e.strokeText(n.text,o,h)),f&&(da(e,"fillStyle",f),e.fillText(n.text,o,h))}function la(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function ua(t,e,n,i,r,a,o){var s=n.textBackgroundColor,l=n.textBorderWidth,u=n.textBorderColor,h=Zr(s);if(da(e,"shadowBlur",n.textBoxShadowBlur||0),da(e,"shadowColor",n.textBoxShadowColor||"transparent"),da(e,"shadowOffsetX",n.textBoxShadowOffsetX||0),da(e,"shadowOffsetY",n.textBoxShadowOffsetY||0),h||l&&u){e.beginPath();var c=n.textBorderRadius;c?Ur.buildPath(e,{x:i,y:r,width:a,height:o,r:c}):e.rect(i,r,a,o),e.closePath()}if(h)if(da(e,"fillStyle",s),null!=n.fillOpacity){var d=e.globalAlpha;e.globalAlpha=n.fillOpacity*n.opacity,e.fill(),e.globalAlpha=d}else e.fill();else if($r(s)){var f=s.image;(f=pr.createOrUpdateImage(f,null,t,ha,s))&&pr.isImageReady(f)&&e.drawImage(f,i,r,a,o)}if(l&&u)if(da(e,"lineWidth",l),da(e,"strokeStyle",u),null!=n.strokeOpacity){d=e.globalAlpha;e.globalAlpha=n.strokeOpacity*n.opacity,e.stroke(),e.globalAlpha=d}else e.stroke()}function ha(t,e){e.image=t}function ca(t,e,n,i){var r=n.x||0,a=n.y||0,o=n.textAlign,s=n.textVerticalAlign;if(i){var l=n.textPosition;if(l instanceof Array)r=i.x+ga(l[0],i.width),a=i.y+ga(l[1],i.height);else{var u=e&&e.calculateTextPosition?e.calculateTextPosition(ia,n,i):Gr.calculateTextPosition(ia,n,i);r=u.x,a=u.y,o=o||u.textAlign,s=s||u.textVerticalAlign}var h=n.textOffset;h&&(r+=h[0],a+=h[1])}return(t=t||{}).baseX=r,t.baseY=a,t.textAlign=o,t.textVerticalAlign=s,t}function da(t,e,n){return t[e]=ji(t,e,n),t[e]}function fa(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function pa(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function ga(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function ma(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}var va=function(t){return aa(t),qr(t.rich,aa),t},ya=function(t,e,n,i,r,a){i.rich?function(t,e,n,i,r,a){a!==Qr&&(e.__attrCachedBy=Kr.NONE);var o=t.__textCotentBlock;o&&!t.__dirtyText||(o=t.__textCotentBlock=Gr.parseRichText(n,i));!function(t,e,n,i,r){var a=n.width,o=n.outerWidth,s=n.outerHeight,l=i.textPadding,u=ca(ra,t,i,r),h=u.baseX,c=u.baseY,d=u.textAlign,f=u.textVerticalAlign;oa(e,i,r,h,c);var p=Gr.adjustTextX(h,o,d),g=Gr.adjustTextY(c,s,f),m=p,v=g;l&&(m+=l[3],v+=l[0]);var y=m+a;la(i)&&ua(t,e,i,p,g,o,s);for(var _=0;_<n.lines.length;_++){for(var x,w=n.lines[_],b=w.tokens,S=b.length,M=w.lineHeight,T=w.width,I=0,C=m,D=y,k=S-1;I<S&&(!(x=b[I]).textAlign||"left"===x.textAlign);)sa(t,e,x,i,M,v,C,"left"),T-=x.width,C+=x.width,I++;for(;k>=0&&"right"===(x=b[k]).textAlign;)sa(t,e,x,i,M,v,D,"right"),T-=x.width,D-=x.width,k--;for(C+=(a-(C-m)-(y-D)-T)/2;I<=k;)sa(t,e,x=b[I],i,M,v,C+x.width/2,"center"),C+=x.width,I++;v+=M}}(t,e,o,i,r)}(t,e,n,i,r,a):function(t,e,n,i,r,a){var o,s=la(i),l=!1,u=e.__attrCachedBy===Kr.PLAIN_TEXT;a!==Qr?(a&&(o=a.style,l=!s&&u&&o),e.__attrCachedBy=s?Kr.NONE:Kr.PLAIN_TEXT):u&&(e.__attrCachedBy=Kr.NONE);var h=i.font||Jr;l&&h===(o.font||Jr)||(e.font=h);var c=t.__computedFont;t.__styleFont!==h&&(t.__styleFont=h,c=t.__computedFont=e.font);var d=i.textPadding,f=i.textLineHeight,p=t.__textCotentBlock;p&&!t.__dirtyText||(p=t.__textCotentBlock=Gr.parsePlainText(n,c,d,f,i.truncate));var g=p.outerHeight,m=p.lines,v=p.lineHeight,y=ca(ra,t,i,r),_=y.baseX,x=y.baseY,w=y.textAlign||"left",b=y.textVerticalAlign;oa(e,i,r,_,x);var S=Gr.adjustTextY(x,g,b),M=_,T=S;if(s||d){var I=Gr.getWidth(n,c);d&&(I+=d[1]+d[3]);var C=Gr.adjustTextX(_,I,w);s&&ua(t,e,i,C,S,I,g),d&&(M=ma(_,w,d),T+=d[0])}e.textAlign=w,e.textBaseline="middle",e.globalAlpha=i.opacity||1;for(var D=0;D<na.length;D++){var k=na[D],A=k[0],O=k[1],L=i[A];l&&L===o[A]||(e[O]=ji(e,O,L||k[2]))}T+=v/2;var P=i.textStrokeWidth,R=l?o.textStrokeWidth:null,E=!l||P!==R,N=!l||E||i.textStroke!==o.textStroke,z=fa(i.textStroke,P),B=pa(i.textFill);z&&(E&&(e.lineWidth=P),N&&(e.strokeStyle=z));B&&(l&&i.textFill===o.textFill||(e.fillStyle=B));if(1===m.length)z&&e.strokeText(m[0],M,T),B&&e.fillText(m[0],M,T);else for(D=0;D<m.length;D++)z&&e.strokeText(m[D],M,T),B&&e.fillText(m[D],M,T),T+=v}(t,e,n,i,r,a)},_a=function(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)},xa={normalizeTextStyle:va,renderText:ya,getBoxPosition:ca,getStroke:fa,getFill:pa,parsePercent:ga,needDrawText:_a},wa=Yi.WILL_BE_RESTORED,ba=new Ai,Sa=function(){};Sa.prototype={constructor:Sa,drawRectText:function(t,e){var n=this.style;e=n.textRect||e,this.__dirty&&xa.normalizeTextStyle(n,!0);var i=n.text;if(null!=i&&(i+=""),xa.needDrawText(i,n)){t.save();var r=this.transform;n.transformText?this.setTransform(t):r&&(ba.copy(e),ba.applyTransform(r),e=ba),xa.renderText(this,t,i,n,e,wa),t.restore()}}};var Ma=Sa;function Ta(t){for(var e in t=t||{},Ti.call(this,t),t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new er(t.style),this._rect=null,this.__clipPaths=null}Ta.prototype={constructor:Ta,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,globalScaleRatio:1,beforeBrush:function(t){},afterBrush:function(t){},brush:function(t,e){},getBoundingRect:function(){},contain:function(t,e){return this.rectContain(t,e)},traverse:function(t,e){t.call(e,this)},rectContain:function(t,e){var n=this.transformCoordToLocal(t,e);return this.getBoundingRect().contain(n[0],n[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){"style"!==t?Ti.prototype.attrKV.call(this,t,e):this.style.set(e)},setStyle:function(t,e){return this.style.set(t,e),this.dirty(!1),this},useStyle:function(t){return this.style=new er(t),this.dirty(!1),this},calculateTextPosition:null},Bt.inherits(Ta,Ti),Bt.mixin(Ta,Ma);var Ia=Ta;function Ca(t){Ia.call(this,t)}Ca.prototype={constructor:Ca,type:"image",brush:function(t,e){var n=this.style,i=n.image;n.bind(t,this,e);var r=this._image=pr.createOrUpdateImage(i,this._image,this,this.onload);if(r&&pr.isImageReady(r)){var a=n.x||0,o=n.y||0,s=n.width,l=n.height,u=r.width/r.height;if(null==s&&null!=l?s=l*u:null==l&&null!=s?l=s/u:null==s&&null==l&&(s=r.width,l=r.height),this.setTransform(t),n.sWidth&&n.sHeight){var h=n.sx||0,c=n.sy||0;t.drawImage(r,h,c,n.sWidth,n.sHeight,a,o,s,l)}else if(n.sx&&n.sy){var d=s-(h=n.sx),f=l-(c=n.sy);t.drawImage(r,h,c,d,f,a,o,s,l)}else t.drawImage(r,a,o,s,l);null!=n.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))}},getBoundingRect:function(){var t=this.style;return this._rect||(this._rect=new Ai(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},Bt.inherits(Ca,Ia);var Da=Ca,ka=li.devicePixelRatio,Aa=1e5,Oa=314159,La=.01;function Pa(t){return parseInt(t,10)}var Ra=new Ai(0,0,0,0),Ea=new Ai(0,0,0,0);var Na=function(t,e,n){this.type="canvas";var i=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=n=Bt.extend({},n||{}),this.dpr=n.devicePixelRatio||ka,this._singleCanvas=i,this.root=t;var r=t.style;r&&(r["-webkit-tap-highlight-color"]="transparent",r["-webkit-user-select"]=r["user-select"]=r["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var a=this._zlevelList=[],o=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,i){var s=t.width,l=t.height;null!=n.width&&(s=n.width),null!=n.height&&(l=n.height),this.dpr=n.devicePixelRatio||1,t.width=s*this.dpr,t.height=l*this.dpr,this._width=s,this._height=l;var u=new lr(t,this,this.dpr);u.__builtin__=!0,u.initContext(),o[314159]=u,u.zlevel=Oa,a.push(Oa),this._domRoot=t}else{this._width=this._getSize(0),this._height=this._getSize(1);var h=this._domRoot=function(t,e){var n=document.createElement("div");return n.style.cssText=["position:relative","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",n}(this._width,this._height);t.appendChild(h)}this._hoverlayer=null,this._hoverElements=[]};Na.prototype={constructor:Na,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(t){var e=this.storage.getDisplayList(!0),n=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,t,this._redrawId);for(var i=0;i<n.length;i++){var r=n[i],a=this._layers[r];if(!a.__builtin__&&a.refresh){var o=0===i?this._backgroundColor:null;a.refresh(o)}}return this.refreshHover(),this},addHover:function(t,e){if(!t.__hoverMir){var n=new t.constructor({style:t.style,shape:t.shape,z:t.z,z2:t.z2,silent:t.silent});return n.__from=t,t.__hoverMir=n,e&&n.setStyle(e),this._hoverElements.push(n),n}},removeHover:function(t){var e=t.__hoverMir,n=this._hoverElements,i=Bt.indexOf(n,e);i>=0&&n.splice(i,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,n=0;n<e.length;n++){var i=e[n].__from;i&&(i.__hoverMir=null)}e.length=0},refreshHover:function(){var t=this._hoverElements,e=t.length,n=this._hoverlayer;if(n&&n.clear(),e){Vi(t,this.storage.displayableSortFunc),n||(n=this._hoverlayer=this.getLayer(Aa));var i={};n.ctx.save();for(var r=0;r<e;){var a=t[r],o=a.__from;o&&o.__zr?(r++,o.invisible||(a.transform=o.transform,a.invTransform=o.invTransform,a.__clipPaths=o.__clipPaths,this._doPaintEl(a,n,!0,i))):(t.splice(r,1),o.__hoverMir=null,e--)}n.ctx.restore()}},getHoverLayer:function(){return this.getLayer(Aa)},_paintList:function(t,e,n){if(this._redrawId===n){e=e||!1,this._updateLayerStatus(t);var i=this._doPaintList(t,e);if(this._needsManuallyCompositing&&this._compositeManually(),!i){var r=this;ur((function(){r._paintList(t,e,n)}))}}},_compositeManually:function(){var t=this.getLayer(Oa).ctx,e=this._domRoot.width,n=this._domRoot.height;t.clearRect(0,0,e,n),this.eachBuiltinLayer((function(i){i.virtual&&t.drawImage(i.dom,0,0,e,n)}))},_doPaintList:function(t,e){for(var n=[],i=0;i<this._zlevelList.length;i++){var r=this._zlevelList[i];(s=this._layers[r]).__builtin__&&s!==this._hoverlayer&&(s.__dirty||e)&&n.push(s)}for(var a=!0,o=0;o<n.length;o++){var s,l=(s=n[o]).ctx,u={};l.save();var h=e?s.__startIndex:s.__drawIndex,c=!e&&s.incremental&&Date.now,d=c&&Date.now(),f=s.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(s.__startIndex===s.__endIndex)s.clear(!1,f);else if(h===s.__startIndex){var p=t[h];p.incremental&&p.notClear&&!e||s.clear(!1,f)}-1===h&&(console.error("For some unknown reason. drawIndex is -1"),h=s.__startIndex);for(var g=h;g<s.__endIndex;g++){var m=t[g];if(this._doPaintEl(m,s,e,u),m.__dirty=m.__dirtyText=!1,c)if(Date.now()-d>15)break}s.__drawIndex=g,s.__drawIndex<s.__endIndex&&(a=!1),u.prevElClipPaths&&l.restore(),l.restore()}return J.wxa&&Bt.each(this._layers,(function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()})),a},_doPaintEl:function(t,e,n,i){var r=e.ctx,a=t.transform;if((e.__dirty||n)&&!t.invisible&&0!==t.style.opacity&&(!a||a[0]||a[3])&&(!t.culling||!function(t,e,n){return Ra.copy(t.getBoundingRect()),t.transform&&Ra.applyTransform(t.transform),Ea.width=e,Ea.height=n,!Ra.intersect(Ea)}(t,this._width,this._height))){var o=t.__clipPaths,s=i.prevElClipPaths;s&&!function(t,e){if(t===e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!0;return!1}(o,s)||(s&&(r.restore(),i.prevElClipPaths=null,i.prevEl=null),o&&(r.save(),function(t,e){for(var n=0;n<t.length;n++){var i=t[n];i.setTransform(e),e.beginPath(),i.buildPath(e,i.shape),e.clip(),i.restoreTransform(e)}}(o,r),i.prevElClipPaths=o)),t.beforeBrush&&t.beforeBrush(r),t.brush(r,i.prevEl||null),i.prevEl=t,t.afterBrush&&t.afterBrush(r)}},getLayer:function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=Oa);var n=this._layers[t];return n||((n=new lr("zr_"+t,this,this.dpr)).zlevel=t,n.__builtin__=!0,this._layerConfig[t]?Bt.merge(n,this._layerConfig[t],!0):this._layerConfig[t-La]&&Bt.merge(n,this._layerConfig[t-La],!0),e&&(n.virtual=e),this.insertLayer(t,n),n.initContext()),n},insertLayer:function(t,e){var n=this._layers,i=this._zlevelList,r=i.length,a=null,o=-1,s=this._domRoot;if(!n[t]&&function(t){return!!t&&(!!t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh)}(e)){if(r>0&&t>i[0]){for(o=0;o<r-1&&!(i[o]<t&&i[o+1]>t);o++);a=n[i[o]]}if(i.splice(o+1,0,t),n[t]=e,!e.virtual)if(a){var l=a.dom;l.nextSibling?s.insertBefore(e.dom,l.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}},eachLayer:function(t,e){var n,i,r=this._zlevelList;for(i=0;i<r.length;i++)n=r[i],t.call(e,this._layers[n],n)},eachBuiltinLayer:function(t,e){var n,i,r,a=this._zlevelList;for(r=0;r<a.length;r++)i=a[r],(n=this._layers[i]).__builtin__&&t.call(e,n,i)},eachOtherLayer:function(t,e){var n,i,r,a=this._zlevelList;for(r=0;r<a.length;r++)i=a[r],(n=this._layers[i]).__builtin__||t.call(e,n,i)},getLayers:function(){return this._layers},_updateLayerStatus:function(t){function e(t){r&&(r.__endIndex!==t&&(r.__dirty=!0),r.__endIndex=t)}if(this.eachBuiltinLayer((function(t,e){t.__dirty=t.__used=!1})),this._singleCanvas)for(var n=1;n<t.length;n++){if((o=t[n]).zlevel!==t[n-1].zlevel||o.incremental){this._needsManuallyCompositing=!0;break}}var i,r=null,a=0;for(n=0;n<t.length;n++){var o,s,l=(o=t[n]).zlevel;i!==l&&(i=l,a=0),o.incremental?((s=this.getLayer(l+.001,this._needsManuallyCompositing)).incremental=!0,a=1):s=this.getLayer(l+(a>0?La:0),this._needsManuallyCompositing),s.__builtin__||ui("ZLevel "+l+" has been used by unkown layer "+s.id),s!==r&&(s.__used=!0,s.__startIndex!==n&&(s.__dirty=!0),s.__startIndex=n,s.incremental?s.__drawIndex=-1:s.__drawIndex=n,e(n),r=s),o.__dirty&&(s.__dirty=!0,s.incremental&&s.__drawIndex<0&&(s.__drawIndex=n))}e(n),this.eachBuiltinLayer((function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)}))},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},setBackgroundColor:function(t){this._backgroundColor=t},configLayer:function(t,e){if(e){var n=this._layerConfig;n[t]?Bt.merge(n[t],e,!0):n[t]=e;for(var i=0;i<this._zlevelList.length;i++){var r=this._zlevelList[i];if(r===t||r===t+La){var a=this._layers[r];Bt.merge(a,n[t],!0)}}}},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(Bt.indexOf(n,t),1))},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 r in n.style.width=t+"px",n.style.height=e+"px",this._layers)this._layers.hasOwnProperty(r)&&this._layers[r].resize(t,e);Bt.each(this._progressiveLayers,(function(n){n.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(Oa).resize(t,e)}return this},clearLayer:function(t){var e=this._layers[t];e&&e.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[314159].dom;var e=new lr("image",this,t.pixelRatio||this.dpr);if(e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor),t.pixelRatio<=this.dpr){this.refresh();var n=e.dom.width,i=e.dom.height,r=e.ctx;this.eachLayer((function(t){t.__builtin__?r.drawImage(t.dom,0,0,n,i):t.renderToCanvas&&(e.ctx.save(),t.renderToCanvas(e.ctx),e.ctx.restore())}))}else for(var a={},o=this.storage.getDisplayList(!0),s=0;s<o.length;s++){var l=o[s];this._doPaintEl(l,e,!0,a)}return e.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,n=["width","height"][t],i=["clientWidth","clientHeight"][t],r=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[n]&&"auto"!==e[n])return parseFloat(e[n]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[i]||Pa(s[n])||Pa(o.style[n]))-(Pa(s[r])||0)-(Pa(s[a])||0)|0},pathToImage:function(t,e){e=e||this.dpr;var n=document.createElement("canvas"),i=n.getContext("2d"),r=t.getBoundingRect(),a=t.style,o=a.shadowBlur*e,s=a.shadowOffsetX*e,l=a.shadowOffsetY*e,u=a.hasStroke()?a.lineWidth:0,h=Math.max(u/2,-s+o),c=Math.max(u/2,s+o),d=Math.max(u/2,-l+o),f=Math.max(u/2,l+o),p=r.width+h+c,g=r.height+d+f;n.width=p*e,n.height=g*e,i.scale(e,e),i.clearRect(0,0,p,g),i.dpr=e;var m={position:t.position,rotation:t.rotation,scale:t.scale};t.position=[h-r.x,d-r.y],t.rotation=0,t.scale=[1,1],t.updateTransform(),t&&t.brush(i);var v=new Da({style:{x:0,y:0,image:n}});return null!=m.position&&(v.position=t.position=m.position),null!=m.rotation&&(v.rotation=t.rotation=m.rotation),null!=m.scale&&(v.scale=t.scale=m.scale),v}};var za=Na,Ba=Re.Dispatcher,Fa=function(t){t=t||{},this.stage=t.stage||{},this.onframe=t.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,Ba.call(this)};Fa.prototype={constructor:Fa,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),n=0;n<e.length;n++)this.addClip(e[n])},removeClip:function(t){var e=Bt.indexOf(this._clips,t);e>=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),n=0;n<e.length;n++)this.removeClip(e[n]);t.animation=null},_update:function(){for(var t=(new Date).getTime()-this._pausedTime,e=t-this._time,n=this._clips,i=n.length,r=[],a=[],o=0;o<i;o++){var s=n[o],l=s.step(t,e);l&&(r.push(l),a.push(s))}for(o=0;o<i;)n[o]._needsRemove?(n[o]=n[i-1],n.pop(),i--):o++;i=r.length;for(o=0;o<i;o++)a[o].fire(r[o]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){var t=this;this._running=!0,ur((function e(){t._running&&(ur(e),!t._paused&&t._update())}))},start:function(){this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},clear:function(){this._clips=[]},isFinished:function(){return!this._clips.length},animate:function(t,e){var n=new oi(t,(e=e||{}).loop,e.getter,e.setter);return this.addAnimator(n),n}},Bt.mixin(Fa,Ba);var Va,Ha,Wa=Fa,Ga=Re.addEventListener,Ua=Re.removeEventListener,ja=Re.normalizeEvent,Ya=Re.getNativeEvent,qa=J.domSupported,Xa=(Ha={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:Va=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:Bt.map(Va,(function(t){var e=t.replace("mouse","pointer");return Ha.hasOwnProperty(e)?e:t}))}),Za={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]};function $a(t){return"mousewheel"===t&&J.browser.firefox?"DOMMouseScroll":t}function Ka(t){var e=t.pointerType;return"pen"===e||"touch"===e}function Qa(t){t&&(t.zrByTouch=!0)}function Ja(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}function to(t,e){this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}var eo=to.prototype;eo.stopPropagation=eo.stopImmediatePropagation=eo.preventDefault=Bt.noop;var no={mousedown:function(t){t=ja(this.dom,t),this._mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=ja(this.dom,t);var e=this._mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||lo(this,!0),this.trigger("mousemove",t)},mouseup:function(t){t=ja(this.dom,t),lo(this,!1),this.trigger("mouseup",t)},mouseout:function(t){t=ja(this.dom,t),this._pointerCapturing&&(t.zrEventControl="no_globalout");var e=t.toElement||t.relatedTarget;t.zrIsToLocalDOM=Ja(this,e),this.trigger("mouseout",t)},touchstart:function(t){Qa(t=ja(this.dom,t)),this._lastTouchMoment=new Date,this.handler.processGesture(t,"start"),no.mousemove.call(this,t),no.mousedown.call(this,t)},touchmove:function(t){Qa(t=ja(this.dom,t)),this.handler.processGesture(t,"change"),no.mousemove.call(this,t)},touchend:function(t){Qa(t=ja(this.dom,t)),this.handler.processGesture(t,"end"),no.mouseup.call(this,t),+new Date-this._lastTouchMoment<300&&no.click.call(this,t)},pointerdown:function(t){no.mousedown.call(this,t)},pointermove:function(t){Ka(t)||no.mousemove.call(this,t)},pointerup:function(t){no.mouseup.call(this,t)},pointerout:function(t){Ka(t)||no.mouseout.call(this,t)}};Bt.each(["click","mousewheel","dblclick","contextmenu"],(function(t){no[t]=function(e){e=ja(this.dom,e),this.trigger(t,e)}}));var io={pointermove:function(t){Ka(t)||io.mousemove.call(this,t)},pointerup:function(t){io.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this._pointerCapturing;lo(this,!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function ro(t,e){var n=e.domHandlers;J.pointerEventsSupported?Bt.each(Xa.pointer,(function(i){oo(e,i,(function(e){n[i].call(t,e)}))})):(J.touchEventsSupported&&Bt.each(Xa.touch,(function(i){oo(e,i,(function(r){n[i].call(t,r),function(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout((function(){t.touching=!1,t.touchTimer=null}),700)}(e)}))})),Bt.each(Xa.mouse,(function(i){oo(e,i,(function(r){r=Ya(r),e.touching||n[i].call(t,r)}))})))}function ao(t,e){function n(n){oo(e,n,(function(i){i=Ya(i),Ja(t,i.target)||(i=function(t,e){return ja(t.dom,new to(t,e),!0)}(t,i),e.domHandlers[n].call(t,i))}),{capture:!0})}J.pointerEventsSupported?Bt.each(Za.pointer,n):J.touchEventsSupported||Bt.each(Za.mouse,n)}function oo(t,e,n,i){t.mounted[e]=n,t.listenerOpts[e]=i,Ga(t.domTarget,$a(e),n,i)}function so(t){var e=t.mounted;for(var n in e)e.hasOwnProperty(n)&&Ua(t.domTarget,$a(n),e[n],t.listenerOpts[n]);t.mounted={}}function lo(t,e){if(t._mayPointerCapture=null,qa&&t._pointerCapturing^e){t._pointerCapturing=e;var n=t._globalHandlerScope;e?ao(t,n):so(n)}}function uo(t,e){this.domTarget=t,this.domHandlers=e,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function ho(t,e){pe.call(this),this.dom=t,this.painterRoot=e,this._localHandlerScope=new uo(t,no),qa&&(this._globalHandlerScope=new uo(document,io)),this._pointerCapturing=!1,this._mayPointerCapture=null,ro(this,this._localHandlerScope)}var co=ho.prototype;co.dispose=function(){so(this._localHandlerScope),qa&&so(this._globalHandlerScope)},co.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},Bt.mixin(ho,pe);var fo=ho,po=!J.canvasSupported,go={canvas:za},mo={};var vo=function(t,e,n){n=n||{},this.dom=e,this.id=t;var i=this,r=new Gi,a=n.renderer;if(po){if(!go.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");a="vml"}else a&&go[a]||(a="canvas");var o=new go[a](e,r,n,t);this.storage=r,this.painter=o;var s=J.node||J.worker?null:new fo(o.getViewportRoot(),o.root);this.handler=new Ye(r,o,s,o.root),this.animation=new Wa({stage:{update:Bt.bind(this.flush,this)}}),this.animation.start(),this._needsRefresh;var l=r.delFromStorage,u=r.addToStorage;r.delFromStorage=function(t){l.call(r,t),t&&t.removeSelfFromZr(i)},r.addToStorage=function(t){u.call(r,t),t.addSelfToZr(i)}};vo.prototype={constructor:vo,getId:function(){return this.id},add:function(t){this.storage.addRoot(t),this._needsRefresh=!0},remove:function(t){this.storage.delRoot(t),this._needsRefresh=!0},configLayer:function(t,e){this.painter.configLayer&&this.painter.configLayer(t,e),this._needsRefresh=!0},setBackgroundColor:function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh(),this._needsRefresh=this._needsRefreshHover=!1},refresh:function(){this._needsRefresh=!0},flush:function(){var t;this._needsRefresh&&(t=!0,this.refreshImmediately()),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately()),t&&this.trigger("rendered")},addHover:function(t,e){if(this.painter.addHover){var n=this.painter.addHover(t,e);return this.refreshHover(),n}},removeHover:function(t){this.painter.removeHover&&(this.painter.removeHover(t),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},resize:function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(t,e){return this.painter.pathToImage(t,e)},setCursorStyle:function(t){this.handler.setCursorStyle(t)},findHover:function(t,e){return this.handler.findHover(t,e)},on:function(t,e,n){this.handler.on(t,e,n)},off:function(t,e){this.handler.off(t,e)},trigger:function(t,e){this.handler.trigger(t,e)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){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 mo[t]}};var yo=function(t,e){var n=new vo(Q(),t,e);return mo[n.id]=n,n},_o={version:"4.3.1",init:yo,dispose:function(t){if(t)t.dispose();else{for(var e in mo)mo.hasOwnProperty(e)&&mo[e].dispose();mo={}}return this},getInstance:function(t){return mo[t]},registerPainter:function(t,e){go[t]=e}},xo=Bt.each,wo=Bt.isObject,bo=Bt.isArray,So="series\0";function Mo(t){return t instanceof Array?t:null==t?[]:[t]}function To(t){return wo(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}var Io=0;function Co(t,e){return t&&t.hasOwnProperty(e)}var Do=function(t,e,n){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var i=0,r=n.length;i<r;i++){var a=n[i];!t.emphasis[e].hasOwnProperty(a)&&t[e].hasOwnProperty(a)&&(t.emphasis[e][a]=t[e][a])}}},ko=function(t,e){e=(e||[]).slice();var n=Bt.map(t||[],(function(t,e){return{exist:t}}));return xo(e,(function(t,i){if(wo(t)){for(var r=0;r<n.length;r++)if(!n[r].option&&null!=t.id&&n[r].exist.id===t.id+"")return n[r].option=t,void(e[i]=null);for(r=0;r<n.length;r++){var a=n[r].exist;if(!(n[r].option||null!=a.id&&null!=t.id||null==t.name||To(t)||To(a)||a.name!==t.name+""))return n[r].option=t,void(e[i]=null)}}})),xo(e,(function(t,e){if(wo(t)){for(var i=0;i<n.length;i++){var r=n[i].exist;if(!n[i].option&&!To(r)&&null==t.id){n[i].option=t;break}}i>=n.length&&n.push({option:t})}})),n},Ao=function(t,e){var n={},i={};return r(t||[],n),r(e||[],i,n),[a(n),a(i)];function r(t,e,n){for(var i=0,r=t.length;i<r;i++)for(var a=t[i].seriesId,o=Mo(t[i].dataIndex),s=n&&n[a],l=0,u=o.length;l<u;l++){var h=o[l];s&&s[h]?s[h]=null:(e[a]||(e[a]={}))[h]=1}}function a(t,e){var n=[];for(var i in t)if(t.hasOwnProperty(i)&&null!=t[i])if(e)n.push(+i);else{var r=a(t[i],!0);r.length&&n.push({seriesId:i,dataIndex:r})}return n}},Oo=function(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?Bt.isArray(e.dataIndex)?Bt.map(e.dataIndex,(function(e){return t.indexOfRawIndex(e)})):t.indexOfRawIndex(e.dataIndex):null!=e.name?Bt.isArray(e.name)?Bt.map(e.name,(function(e){return t.indexOfName(e)})):t.indexOfName(e.name):void 0},Lo=function(t,e,n){t.setAttribute?t.setAttribute(e,n):t[e]=n},Po=function(t,e){return t.getAttribute?t.getAttribute(e):t[e]},Ro={normalizeToArray:Mo,defaultEmphasis:Do,TEXT_STYLE_OPTIONS:["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"],getDataItemValue:function(t){return!wo(t)||bo(t)||t instanceof Date?t:t.value},isDataItemOption:function(t){return wo(t)&&!(t instanceof Array)},mappingToExists:ko,makeIdAndName:function(t){var e=Bt.createHashMap();xo(t,(function(t,n){var i=t.exist;i&&e.set(i.id,t)})),xo(t,(function(t,n){var i=t.option;Bt.assert(!i||null==i.id||!e.get(i.id)||e.get(i.id)===t,"id duplicates: "+(i&&i.id)),i&&null!=i.id&&e.set(i.id,t),!t.keyInfo&&(t.keyInfo={})})),xo(t,(function(t,n){var i=t.exist,r=t.option,a=t.keyInfo;if(wo(r)){if(a.name=null!=r.name?r.name+"":i?i.name:So+n,i)a.id=i.id;else if(null!=r.id)a.id=r.id+"";else{var o=0;do{a.id="\0"+a.name+"\0"+o++}while(e.get(a.id))}e.set(a.id,t)}}))},isNameSpecified:function(t){var e=t.name;return!(!e||!e.indexOf(So))},isIdInner:To,compressBatches:Ao,queryDataIndex:Oo,makeInner:function(){var t="__\0ec_inner_"+Io+++"_"+Math.random().toFixed(5);return function(e){return e[t]||(e[t]={})}},parseFinder:function(t,e,n){if(Bt.isString(e)){var i={};i[e+"Index"]=0,e=i}var r=n&&n.defaultMainType;!r||Co(e,r+"Index")||Co(e,r+"Id")||Co(e,r+"Name")||(e[r+"Index"]=0);var a={};return xo(e,(function(i,r){i=e[r];if("dataIndex"!==r&&"dataIndexInside"!==r){var o=r.match(/^(\w+)(Index|Id|Name)$/)||[],s=o[1],l=(o[2]||"").toLowerCase();if(!(!s||!l||null==i||"index"===l&&"none"===i||n&&n.includeMainTypes&&Bt.indexOf(n.includeMainTypes,s)<0)){var u={mainType:s};"index"===l&&"all"===i||(u[l]=i);var h=t.queryComponents(u);a[s+"Models"]=h,a[s+"Model"]=h[0]}}else a[r]=i})),a},setAttribute:Lo,getAttribute:Po,getTooltipRenderMode:function(t){return"auto"===t?J.domSupported?"html":"richText":t||"html"},groupData:function(t,e){var n=Bt.createHashMap(),i=[];return Bt.each(t,(function(t){var r=e(t);(n.get(r)||(i.push(r),n.set(r,[]))).push(t)})),{keys:i,buckets:n}}},Eo=".",No="___EC__COMPONENT__CONTAINER___";function zo(t){var e={main:"",sub:""};return t&&(t=t.split(Eo),e.main=t[0]||"",e.sub=t[1]||""),e}var Bo=0;function Fo(t,e){var n=Bt.slice(arguments,2);return this.superClass.prototype[e].apply(t,n)}function Vo(t,e,n){return this.superClass.prototype[e].apply(t,n)}var Ho=function(t,e){t.$constructor=t,t.extend=function(t){var e=this,n=function(){t.$constructor?t.$constructor.apply(this,arguments):e.apply(this,arguments)};return Bt.extend(n.prototype,t),n.extend=this.extend,n.superCall=Fo,n.superApply=Vo,Bt.inherits(n,this),n.superClass=e,n}},Wo=function(t,e){e=e||{};var n={};if(t.registerClass=function(t,e){if(e)if(function(t){Bt.assert(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}(e),(e=zo(e)).sub){if(e.sub!==No){var i=function(t){var e=n[t.main];e&&e[No]||((e=n[t.main]={})[No]=!0);return e}(e);i[e.sub]=t}}else n[e.main]=t;return t},t.getClass=function(t,e,i){var r=n[t];if(r&&r[No]&&(r=e?r[e]:null),i&&!r)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return r},t.getClassesByMainType=function(t){t=zo(t);var e=[],i=n[t.main];return i&&i[No]?Bt.each(i,(function(t,n){n!==No&&e.push(t)})):e.push(i),e},t.hasClass=function(t){return t=zo(t),!!n[t.main]},t.getAllClassMainTypes=function(){var t=[];return Bt.each(n,(function(e,n){t.push(n)})),t},t.hasSubTypes=function(t){t=zo(t);var e=n[t.main];return e&&e[No]},t.parseClassType=zo,e.registerWhenExtend){var i=t.extend;i&&(t.extend=function(e){var n=i.call(this,e);return t.registerClass(n,e.type)})}return t},Go={parseClassType:zo,enableClassExtend:Ho,enableClassCheck:function(t){var e=["__\0is_clz",Bo++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}},enableClassManagement:Wo,setReadOnly:function(t,e){}};var Uo=function(t){for(var e=0;e<t.length;e++)t[e][1]||(t[e][1]=t[e][0]);return function(e,n,i){for(var r={},a=0;a<t.length;a++){var o=t[a][1];if(!(n&&Bt.indexOf(n,o)>=0||i&&Bt.indexOf(i,o)<0)){var s=e.getShallow(o);null!=s&&(r[t[a][0]]=s)}}return r}},jo=Uo([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Yo={getLineStyle:function(t){var e=jo(this,t);return e.lineDash=this.getLineDash(e.lineWidth),e},getLineDash:function(t){null==t&&(t=1);var e=this.get("type"),n=Math.max(t,2),i=4*t;return"solid"!==e&&null!=e&&("dashed"===e?[i,i]:[n,n])}},qo=Yo,Xo=Uo([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Zo={getAreaStyle:function(t,e){return Xo(this,t,e)}},$o=se.create,Ko=se.distSquare,Qo=Math.pow,Jo=Math.sqrt,ts=1e-8,es=1e-4,ns=Jo(3),is=1/3,rs=$o(),as=$o(),os=$o();function ss(t){return t>-ts&&t<ts}function ls(t){return t>ts||t<-ts}function us(t,e,n,i,r){var a=1-r;return a*a*(a*t+3*r*e)+r*r*(r*i+3*a*n)}function hs(t,e,n,i){var r=1-i;return r*(r*t+2*i*e)+i*i*n}var cs=function(t,e,n,i,r,a){var o=i+3*(e-n)-t,s=3*(n-2*e+t),l=3*(e-t),u=t-r,h=s*s-3*o*l,c=s*l-9*o*u,d=l*l-3*s*u,f=0;if(ss(h)&&ss(c)){if(ss(s))a[0]=0;else(M=-l/s)>=0&&M<=1&&(a[f++]=M)}else{var p=c*c-4*h*d;if(ss(p)){var g=c/h,m=-g/2;(M=-s/o+g)>=0&&M<=1&&(a[f++]=M),m>=0&&m<=1&&(a[f++]=m)}else if(p>0){var v=Jo(p),y=h*s+1.5*o*(-c+v),_=h*s+1.5*o*(-c-v);(M=(-s-((y=y<0?-Qo(-y,is):Qo(y,is))+(_=_<0?-Qo(-_,is):Qo(_,is))))/(3*o))>=0&&M<=1&&(a[f++]=M)}else{var x=(2*h*s-3*o*c)/(2*Jo(h*h*h)),w=Math.acos(x)/3,b=Jo(h),S=Math.cos(w),M=(-s-2*b*S)/(3*o),T=(m=(-s+b*(S+ns*Math.sin(w)))/(3*o),(-s+b*(S-ns*Math.sin(w)))/(3*o));M>=0&&M<=1&&(a[f++]=M),m>=0&&m<=1&&(a[f++]=m),T>=0&&T<=1&&(a[f++]=T)}}return f},ds=function(t,e,n,i,r){var a=6*n-12*e+6*t,o=9*e+3*i-3*t-9*n,s=3*e-3*t,l=0;if(ss(o)){if(ls(a))(h=-s/a)>=0&&h<=1&&(r[l++]=h)}else{var u=a*a-4*o*s;if(ss(u))r[0]=-a/(2*o);else if(u>0){var h,c=Jo(u),d=(-a-c)/(2*o);(h=(-a+c)/(2*o))>=0&&h<=1&&(r[l++]=h),d>=0&&d<=1&&(r[l++]=d)}}return l},fs=function(t,e,n,i,r,a){var o=(e-t)*r+t,s=(n-e)*r+e,l=(i-n)*r+n,u=(s-o)*r+o,h=(l-s)*r+s,c=(h-u)*r+u;a[0]=t,a[1]=o,a[2]=u,a[3]=c,a[4]=c,a[5]=h,a[6]=l,a[7]=i},ps=function(t,e,n,i,r,a,o,s,l,u,h){var c,d,f,p,g,m=.005,v=1/0;rs[0]=l,rs[1]=u;for(var y=0;y<1;y+=.05)as[0]=us(t,n,r,o,y),as[1]=us(e,i,a,s,y),(p=Ko(rs,as))<v&&(c=y,v=p);v=1/0;for(var _=0;_<32&&!(m<es);_++)d=c-m,f=c+m,as[0]=us(t,n,r,o,d),as[1]=us(e,i,a,s,d),p=Ko(as,rs),d>=0&&p<v?(c=d,v=p):(os[0]=us(t,n,r,o,f),os[1]=us(e,i,a,s,f),g=Ko(os,rs),f<=1&&g<v?(c=f,v=g):m*=.5);return h&&(h[0]=us(t,n,r,o,c),h[1]=us(e,i,a,s,c)),Jo(v)},gs=function(t,e,n,i,r){var a=t-2*e+n,o=2*(e-t),s=t-i,l=0;if(ss(a)){if(ls(o))(h=-s/o)>=0&&h<=1&&(r[l++]=h)}else{var u=o*o-4*a*s;if(ss(u))(h=-o/(2*a))>=0&&h<=1&&(r[l++]=h);else if(u>0){var h,c=Jo(u),d=(-o-c)/(2*a);(h=(-o+c)/(2*a))>=0&&h<=1&&(r[l++]=h),d>=0&&d<=1&&(r[l++]=d)}}return l},ms=function(t,e,n,i,r){var a=(e-t)*i+t,o=(n-e)*i+e,s=(o-a)*i+a;r[0]=t,r[1]=a,r[2]=s,r[3]=s,r[4]=o,r[5]=n},vs=function(t,e,n,i,r,a,o,s,l){var u,h=.005,c=1/0;rs[0]=o,rs[1]=s;for(var d=0;d<1;d+=.05){as[0]=hs(t,n,r,d),as[1]=hs(e,i,a,d),(m=Ko(rs,as))<c&&(u=d,c=m)}c=1/0;for(var f=0;f<32&&!(h<es);f++){var p=u-h,g=u+h;as[0]=hs(t,n,r,p),as[1]=hs(e,i,a,p);var m=Ko(as,rs);if(p>=0&&m<c)u=p,c=m;else{os[0]=hs(t,n,r,g),os[1]=hs(e,i,a,g);var v=Ko(os,rs);g<=1&&v<c?(u=g,c=v):h*=.5}}return l&&(l[0]=hs(t,n,r,u),l[1]=hs(e,i,a,u)),Jo(c)},ys={cubicAt:us,cubicDerivativeAt:function(t,e,n,i,r){var a=1-r;return 3*(((e-t)*a+2*(n-e)*r)*a+(i-n)*r*r)},cubicRootAt:cs,cubicExtrema:ds,cubicSubdivide:fs,cubicProjectPoint:ps,quadraticAt:hs,quadraticDerivativeAt:function(t,e,n,i){return 2*((1-i)*(e-t)+i*(n-e))},quadraticRootAt:gs,quadraticExtremum:function(t,e,n){var i=t+n-2*e;return 0===i?.5:(t-e)/i},quadraticSubdivide:ms,quadraticProjectPoint:vs},_s=Math.min,xs=Math.max,ws=Math.sin,bs=Math.cos,Ss=2*Math.PI,Ms=se.create(),Ts=se.create(),Is=se.create();var Cs=[],Ds=[];var ks=function(t,e,n){if(0!==t.length){var i,r=t[0],a=r[0],o=r[0],s=r[1],l=r[1];for(i=1;i<t.length;i++)r=t[i],a=_s(a,r[0]),o=xs(o,r[0]),s=_s(s,r[1]),l=xs(l,r[1]);e[0]=a,e[1]=s,n[0]=o,n[1]=l}},As=function(t,e,n,i,r,a){r[0]=_s(t,n),r[1]=_s(e,i),a[0]=xs(t,n),a[1]=xs(e,i)},Os=function(t,e,n,i,r,a,o,s,l,u){var h,c=ys.cubicExtrema,d=ys.cubicAt,f=c(t,n,r,o,Cs);for(l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0,h=0;h<f;h++){var p=d(t,n,r,o,Cs[h]);l[0]=_s(p,l[0]),u[0]=xs(p,u[0])}for(f=c(e,i,a,s,Ds),h=0;h<f;h++){var g=d(e,i,a,s,Ds[h]);l[1]=_s(g,l[1]),u[1]=xs(g,u[1])}l[0]=_s(t,l[0]),u[0]=xs(t,u[0]),l[0]=_s(o,l[0]),u[0]=xs(o,u[0]),l[1]=_s(e,l[1]),u[1]=xs(e,u[1]),l[1]=_s(s,l[1]),u[1]=xs(s,u[1])},Ls=function(t,e,n,i,r,a,o,s){var l=ys.quadraticExtremum,u=ys.quadraticAt,h=xs(_s(l(t,n,r),1),0),c=xs(_s(l(e,i,a),1),0),d=u(t,n,r,h),f=u(e,i,a,c);o[0]=_s(t,r,d),o[1]=_s(e,a,f),s[0]=xs(t,r,d),s[1]=xs(e,a,f)},Ps=function(t,e,n,i,r,a,o,s,l){var u=se.min,h=se.max,c=Math.abs(r-a);if(c%Ss<1e-4&&c>1e-4)return s[0]=t-n,s[1]=e-i,l[0]=t+n,void(l[1]=e+i);if(Ms[0]=bs(r)*n+t,Ms[1]=ws(r)*i+e,Ts[0]=bs(a)*n+t,Ts[1]=ws(a)*i+e,u(s,Ms,Ts),h(l,Ms,Ts),(r%=Ss)<0&&(r+=Ss),(a%=Ss)<0&&(a+=Ss),r>a&&!o?a+=Ss:r<a&&o&&(r+=Ss),o){var d=a;a=r,r=d}for(var f=0;f<a;f+=Math.PI/2)f>r&&(Is[0]=bs(f)*n+t,Is[1]=ws(f)*i+e,u(s,Is,s),h(l,Is,l))},Rs={fromPoints:ks,fromLine:As,fromCubic:Os,fromQuadratic:Ls,fromArc:Ps},Es=li.devicePixelRatio,Ns={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},zs=[],Bs=[],Fs=[],Vs=[],Hs=Math.min,Ws=Math.max,Gs=Math.cos,Us=Math.sin,js=Math.sqrt,Ys=Math.abs,qs="undefined"!=typeof Float32Array,Xs=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};Xs.prototype={constructor:Xs,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e,n){n=n||0,this._ux=Ys(n/Es/t)||0,this._uy=Ys(n/Es/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return this._ctx=t,t&&t.beginPath(),t&&(this.dpr=t.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(t,e){return this.addData(Ns.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var n=Ys(t-this._xi)>this._ux||Ys(e-this._yi)>this._uy||this._len<5;return this.addData(Ns.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},bezierCurveTo:function(t,e,n,i,r,a){return this.addData(Ns.C,t,e,n,i,r,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,n,i,r,a):this._ctx.bezierCurveTo(t,e,n,i,r,a)),this._xi=r,this._yi=a,this},quadraticCurveTo:function(t,e,n,i){return this.addData(Ns.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},arc:function(t,e,n,i,r,a){return this.addData(Ns.A,t,e,n,n,i,r-i,0,a?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,a),this._xi=Gs(r)*n+t,this._yi=Us(r)*n+e,this},arcTo:function(t,e,n,i,r){return this._ctx&&this._ctx.arcTo(t,e,n,i,r),this},rect:function(t,e,n,i){return this._ctx&&this._ctx.rect(t,e,n,i),this.addData(Ns.R,t,e,n,i),this},closePath:function(){this.addData(Ns.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},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,n=0;n<t.length;n++)e+=t[n];this._dashSum=e}return this},setLineDashOffset:function(t){return this._dashOffset=t,this},len:function(){return this._len},setData:function(t){var e=t.length;this.data&&this.data.length===e||!qs||(this.data=new Float32Array(e));for(var n=0;n<e;n++)this.data[n]=t[n];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,n=0,i=this._len,r=0;r<e;r++)n+=t[r].len();qs&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+n));for(r=0;r<e;r++)for(var a=t[r].data,o=0;o<a.length;o++)this.data[i++]=a[o];this._len=i},addData:function(t){if(this._saveData){var e=this.data;this._len+arguments.length>e.length&&(this._expandData(),e=this.data);for(var n=0;n<arguments.length;n++)e[this._len++]=arguments[n];this._prevCmd=t}},_expandData:function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(t,e){var n,i,r=this._dashSum,a=this._dashOffset,o=this._lineDash,s=this._ctx,l=this._xi,u=this._yi,h=t-l,c=e-u,d=js(h*h+c*c),f=l,p=u,g=o.length;for(a<0&&(a=r+a),f-=(a%=r)*(h/=d),p-=a*(c/=d);h>0&&f<=t||h<0&&f>=t||0===h&&(c>0&&p<=e||c<0&&p>=e);)f+=h*(n=o[i=this._dashIdx]),p+=c*n,this._dashIdx=(i+1)%g,h>0&&f<l||h<0&&f>l||c>0&&p<u||c<0&&p>u||s[i%2?"moveTo":"lineTo"](h>=0?Hs(f,t):Ws(f,t),c>=0?Hs(p,e):Ws(p,e));h=f-t,c=p-e,this._dashOffset=-js(h*h+c*c)},_dashedBezierTo:function(t,e,n,i,r,a){var o,s,l,u,h,c=this._dashSum,d=this._dashOffset,f=this._lineDash,p=this._ctx,g=this._xi,m=this._yi,v=ys.cubicAt,y=0,_=this._dashIdx,x=f.length,w=0;for(d<0&&(d=c+d),d%=c,o=0;o<1;o+=.1)s=v(g,t,n,r,o+.1)-v(g,t,n,r,o),l=v(m,e,i,a,o+.1)-v(m,e,i,a,o),y+=js(s*s+l*l);for(;_<x&&!((w+=f[_])>d);_++);for(o=(w-d)/y;o<=1;)u=v(g,t,n,r,o),h=v(m,e,i,a,o),_%2?p.moveTo(u,h):p.lineTo(u,h),o+=f[_]/y,_=(_+1)%x;_%2!=0&&p.lineTo(r,a),s=r-u,l=a-h,this._dashOffset=-js(s*s+l*l)},_dashedQuadraticTo:function(t,e,n,i){var r=n,a=i;n=(n+2*t)/3,i=(i+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,n,i,r,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,qs&&(this.data=new Float32Array(t)))},getBoundingRect:function(){zs[0]=zs[1]=Fs[0]=Fs[1]=Number.MAX_VALUE,Bs[0]=Bs[1]=Vs[0]=Vs[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,n=0,i=0,r=0,a=0;a<t.length;){var o=t[a++];switch(1===a&&(i=e=t[a],r=n=t[a+1]),o){case Ns.M:e=i=t[a++],n=r=t[a++],Fs[0]=i,Fs[1]=r,Vs[0]=i,Vs[1]=r;break;case Ns.L:Rs.fromLine(e,n,t[a],t[a+1],Fs,Vs),e=t[a++],n=t[a++];break;case Ns.C:Rs.fromCubic(e,n,t[a++],t[a++],t[a++],t[a++],t[a],t[a+1],Fs,Vs),e=t[a++],n=t[a++];break;case Ns.Q:Rs.fromQuadratic(e,n,t[a++],t[a++],t[a],t[a+1],Fs,Vs),e=t[a++],n=t[a++];break;case Ns.A:var s=t[a++],l=t[a++],u=t[a++],h=t[a++],c=t[a++],d=t[a++]+c;a+=1;var f=1-t[a++];1===a&&(i=Gs(c)*u+s,r=Us(c)*h+l),Rs.fromArc(s,l,u,h,c,d,f,Fs,Vs),e=Gs(d)*u+s,n=Us(d)*h+l;break;case Ns.R:i=e=t[a++],r=n=t[a++];var p=t[a++],g=t[a++];Rs.fromLine(i,r,i+p,r+g,Fs,Vs);break;case Ns.Z:e=i,n=r}se.min(zs,zs,Fs),se.max(Bs,Bs,Vs)}return 0===a&&(zs[0]=zs[1]=Bs[0]=Bs[1]=0),new Ai(zs[0],zs[1],Bs[0]-zs[0],Bs[1]-zs[1])},rebuildPath:function(t){for(var e,n,i,r,a,o,s=this.data,l=this._ux,u=this._uy,h=this._len,c=0;c<h;){var d=s[c++];switch(1===c&&(e=i=s[c],n=r=s[c+1]),d){case Ns.M:e=i=s[c++],n=r=s[c++],t.moveTo(i,r);break;case Ns.L:a=s[c++],o=s[c++],(Ys(a-i)>l||Ys(o-r)>u||c===h-1)&&(t.lineTo(a,o),i=a,r=o);break;case Ns.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),i=s[c-2],r=s[c-1];break;case Ns.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),i=s[c-2],r=s[c-1];break;case Ns.A:var f=s[c++],p=s[c++],g=s[c++],m=s[c++],v=s[c++],y=s[c++],_=s[c++],x=s[c++],w=g>m?g:m,b=g>m?1:g/m,S=g>m?m/g:1,M=v+y;Math.abs(g-m)>.001?(t.translate(f,p),t.rotate(_),t.scale(b,S),t.arc(0,0,w,v,M,1-x),t.scale(1/b,1/S),t.rotate(-_),t.translate(-f,-p)):t.arc(f,p,w,v,M,1-x),1===c&&(e=Gs(v)*g+f,n=Us(v)*m+p),i=Gs(M)*g+f,r=Us(M)*m+p;break;case Ns.R:e=i=s[c],n=r=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case Ns.Z:t.closePath(),i=e,r=n}}}},Xs.CMD=Ns;var Zs=Xs;var $s={containStroke:function(t,e,n,i,r,a,o){if(0===r)return!1;var s=r,l=0;if(o>e+s&&o>i+s||o<e-s&&o<i-s||a>t+s&&a>n+s||a<t-s&&a<n-s)return!1;if(t===n)return Math.abs(a-t)<=s/2;var u=(l=(e-i)/(t-n))*a-o+(t*i-n*e)/(t-n);return u*u/(l*l+1)<=s/2*s/2}};var Ks={containStroke:function(t,e,n,i,r,a,o,s,l,u,h){if(0===l)return!1;var c=l;return!(h>e+c&&h>i+c&&h>a+c&&h>s+c||h<e-c&&h<i-c&&h<a-c&&h<s-c||u>t+c&&u>n+c&&u>r+c&&u>o+c||u<t-c&&u<n-c&&u<r-c&&u<o-c)&&ys.cubicProjectPoint(t,e,n,i,r,a,o,s,u,h,null)<=c/2}},Qs=ys.quadraticProjectPoint;var Js={containStroke:function(t,e,n,i,r,a,o,s,l){if(0===o)return!1;var u=o;return!(l>e+u&&l>i+u&&l>a+u||l<e-u&&l<i-u&&l<a-u||s>t+u&&s>n+u&&s>r+u||s<t-u&&s<n-u&&s<r-u)&&Qs(t,e,n,i,r,a,s,l,null)<=u/2}},tl=2*Math.PI;var el={normalizeRadian:function(t){return(t%=tl)<0&&(t+=tl),t}},nl=el.normalizeRadian,il=2*Math.PI;var rl={containStroke:function(t,e,n,i,r,a,o,s,l){if(0===o)return!1;var u=o;s-=t,l-=e;var h=Math.sqrt(s*s+l*l);if(h-u>n||h+u<n)return!1;if(Math.abs(i-r)%il<1e-4)return!0;if(a){var c=i;i=nl(r),r=nl(c)}else i=nl(i),r=nl(r);i>r&&(r+=il);var d=Math.atan2(l,s);return d<0&&(d+=il),d>=i&&d<=r||d+il>=i&&d+il<=r}};var al=function(t,e,n,i,r,a){if(a>e&&a>i||a<e&&a<i)return 0;if(i===e)return 0;var o=i<e?1:-1,s=(a-e)/(i-e);1!==s&&0!==s||(o=i<e?.5:-.5);var l=s*(n-t)+t;return l===r?1/0:l>r?o:0},ol=el.normalizeRadian,sl=Zs.CMD,ll=2*Math.PI,ul=1e-4;var hl=[-1,-1,-1],cl=[-1,-1];function dl(t,e,n,i,r,a,o,s,l,u){if(u>e&&u>i&&u>a&&u>s||u<e&&u<i&&u<a&&u<s)return 0;var h,c=ys.cubicRootAt(e,i,a,s,u,hl);if(0===c)return 0;for(var d,f,p=0,g=-1,m=0;m<c;m++){var v=hl[m],y=0===v||1===v?.5:1;ys.cubicAt(t,n,r,o,v)<l||(g<0&&(g=ys.cubicExtrema(e,i,a,s,cl),cl[1]<cl[0]&&g>1&&(h=void 0,h=cl[0],cl[0]=cl[1],cl[1]=h),d=ys.cubicAt(e,i,a,s,cl[0]),g>1&&(f=ys.cubicAt(e,i,a,s,cl[1]))),2===g?v<cl[0]?p+=d<e?y:-y:v<cl[1]?p+=f<d?y:-y:p+=s<f?y:-y:v<cl[0]?p+=d<e?y:-y:p+=s<d?y:-y)}return p}function fl(t,e,n,i,r,a,o,s){if(s>e&&s>i&&s>a||s<e&&s<i&&s<a)return 0;var l=ys.quadraticRootAt(e,i,a,s,hl);if(0===l)return 0;var u=ys.quadraticExtremum(e,i,a);if(u>=0&&u<=1){for(var h=0,c=ys.quadraticAt(e,i,a,u),d=0;d<l;d++){var f=0===hl[d]||1===hl[d]?.5:1;ys.quadraticAt(t,n,r,hl[d])<o||(hl[d]<u?h+=c<e?f:-f:h+=a<c?f:-f)}return h}f=0===hl[0]||1===hl[0]?.5:1;return ys.quadraticAt(t,n,r,hl[0])<o?0:a<e?f:-f}function pl(t,e,n,i,r,a,o,s){if((s-=e)>n||s<-n)return 0;var l=Math.sqrt(n*n-s*s);hl[0]=-l,hl[1]=l;var u=Math.abs(i-r);if(u<1e-4)return 0;if(u%ll<1e-4){i=0,r=ll;var h=a?1:-1;return o>=hl[0]+t&&o<=hl[1]+t?h:0}if(a){l=i;i=ol(r),r=ol(l)}else i=ol(i),r=ol(r);i>r&&(r+=ll);for(var c=0,d=0;d<2;d++){var f=hl[d];if(f+t>o){var p=Math.atan2(s,f);h=a?1:-1;p<0&&(p=ll+p),(p>=i&&p<=r||p+ll>=i&&p+ll<=r)&&(p>Math.PI/2&&p<1.5*Math.PI&&(h=-h),c+=h)}}return c}function gl(t,e,n,i,r){for(var a,o,s=0,l=0,u=0,h=0,c=0,d=0;d<t.length;){var f=t[d++];switch(f===sl.M&&d>1&&(n||(s+=al(l,u,h,c,i,r))),1===d&&(h=l=t[d],c=u=t[d+1]),f){case sl.M:l=h=t[d++],u=c=t[d++];break;case sl.L:if(n){if($s.containStroke(l,u,t[d],t[d+1],e,i,r))return!0}else s+=al(l,u,t[d],t[d+1],i,r)||0;l=t[d++],u=t[d++];break;case sl.C:if(n){if(Ks.containStroke(l,u,t[d++],t[d++],t[d++],t[d++],t[d],t[d+1],e,i,r))return!0}else s+=dl(l,u,t[d++],t[d++],t[d++],t[d++],t[d],t[d+1],i,r)||0;l=t[d++],u=t[d++];break;case sl.Q:if(n){if(Js.containStroke(l,u,t[d++],t[d++],t[d],t[d+1],e,i,r))return!0}else s+=fl(l,u,t[d++],t[d++],t[d],t[d+1],i,r)||0;l=t[d++],u=t[d++];break;case sl.A:var p=t[d++],g=t[d++],m=t[d++],v=t[d++],y=t[d++],_=t[d++];d+=1;var x=1-t[d++],w=Math.cos(y)*m+p,b=Math.sin(y)*v+g;d>1?s+=al(l,u,w,b,i,r):(h=w,c=b);var S=(i-p)*v/m+p;if(n){if(rl.containStroke(p,g,v,y,y+_,x,e,S,r))return!0}else s+=pl(p,g,v,y,y+_,x,S,r);l=Math.cos(y+_)*m+p,u=Math.sin(y+_)*v+g;break;case sl.R:h=l=t[d++],c=u=t[d++];w=h+t[d++],b=c+t[d++];if(n){if($s.containStroke(h,c,w,c,e,i,r)||$s.containStroke(w,c,w,b,e,i,r)||$s.containStroke(w,b,h,b,e,i,r)||$s.containStroke(h,b,h,c,e,i,r))return!0}else s+=al(w,c,w,b,i,r),s+=al(h,b,h,c,i,r);break;case sl.Z:if(n){if($s.containStroke(l,u,h,c,e,i,r))return!0}else s+=al(l,u,h,c,i,r);l=h,u=c}}return n||(a=u,o=c,Math.abs(a-o)<ul)||(s+=al(l,u,h,c,i,r)||0),0!==s}var ml={contain:function(t,e,n){return gl(t,0,!1,e,n)},containStroke:function(t,e,n,i){return gl(t,e,!0,n,i)}},vl=ir.prototype.getCanvasPattern,yl=Math.abs,_l=new Zs(!0);function xl(t){Ia.call(this,t),this.path=null}xl.prototype={constructor:xl,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(t,e){var n,i=this.style,r=this.path||_l,a=i.hasStroke(),o=i.hasFill(),s=i.fill,l=i.stroke,u=o&&!!s.colorStops,h=a&&!!l.colorStops,c=o&&!!s.image,d=a&&!!l.image;(i.bind(t,this,e),this.setTransform(t),this.__dirty)&&(u&&(n=n||this.getBoundingRect(),this._fillGradient=i.getGradient(t,s,n)),h&&(n=n||this.getBoundingRect(),this._strokeGradient=i.getGradient(t,l,n)));u?t.fillStyle=this._fillGradient:c&&(t.fillStyle=vl.call(s,t)),h?t.strokeStyle=this._strokeGradient:d&&(t.strokeStyle=vl.call(l,t));var f=i.lineDash,p=i.lineDashOffset,g=!!t.setLineDash,m=this.getGlobalScale();if(r.setScale(m[0],m[1],this.segmentIgnoreThreshold),this.__dirtyPath||f&&!g&&a?(r.beginPath(t),f&&!g&&(r.setLineDash(f),r.setLineDashOffset(p)),this.buildPath(r,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),o)if(null!=i.fillOpacity){var v=t.globalAlpha;t.globalAlpha=i.fillOpacity*i.opacity,r.fill(t),t.globalAlpha=v}else r.fill(t);if(f&&g&&(t.setLineDash(f),t.lineDashOffset=p),a)if(null!=i.strokeOpacity){v=t.globalAlpha;t.globalAlpha=i.strokeOpacity*i.opacity,r.stroke(t),t.globalAlpha=v}else r.stroke(t);f&&g&&t.setLineDash([]),null!=i.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(t,e,n){},createPathProxy:function(){this.path=new Zs},getBoundingRect:function(){var t=this._rect,e=this.style,n=!t;if(n){var i=this.path;i||(i=this.path=new Zs),this.__dirtyPath&&(i.beginPath(),this.buildPath(i,this.shape,!1)),t=i.getBoundingRect()}if(this._rect=t,e.hasStroke()){var r=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||n){r.copy(t);var a=e.lineWidth,o=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(a=Math.max(a,this.strokeContainThreshold||4)),o>1e-10&&(r.width+=a/o,r.height+=a/o,r.x-=a/o/2,r.y-=a/o/2)}return r}return t},contain:function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),r=this.style;if(t=n[0],e=n[1],i.contain(t,e)){var a=this.path.data;if(r.hasStroke()){var o=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(r.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),ml.containStroke(a,o/s,t,e)))return!0}if(r.hasFill())return ml.contain(a,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):Ia.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var n=this.shape;if(n){if(Bt.isObject(t))for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);else n[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&yl(t[0]-1)>1e-10&&yl(t[3]-1)>1e-10?Math.sqrt(yl(t[0]*t[3]-t[2]*t[1])):1}},xl.extend=function(t){var e=function(e){xl.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var n=t.shape;if(n){this.shape=this.shape||{};var i=this.shape;for(var r in n)!i.hasOwnProperty(r)&&n.hasOwnProperty(r)&&(i[r]=n[r])}t.init&&t.init.call(this,e)};for(var n in Bt.inherits(e,xl),t)"style"!==n&&"shape"!==n&&(e.prototype[n]=t[n]);return e},Bt.inherits(xl,Ia);var wl=xl,bl=se.applyTransform,Sl=Zs.CMD,Ml=[[],[],[]],Tl=Math.sqrt,Il=Math.atan2;var Cl=function(t,e){var n,i,r,a,o,s=t.data,l=Sl.M,u=Sl.C,h=Sl.L,c=Sl.R,d=Sl.A,f=Sl.Q;for(r=0,a=0;r<s.length;){switch(n=s[r++],a=r,i=0,n){case l:case h:i=1;break;case u:i=3;break;case f:i=2;break;case d:var p=e[4],g=e[5],m=Tl(e[0]*e[0]+e[1]*e[1]),v=Tl(e[2]*e[2]+e[3]*e[3]),y=Il(-e[1]/v,e[0]/m);s[r]*=m,s[r++]+=p,s[r]*=v,s[r++]+=g,s[r++]*=m,s[r++]*=v,s[r++]+=y,s[r++]+=y,a=r+=2;break;case c:_[0]=s[r++],_[1]=s[r++],bl(_,_,e),s[a++]=_[0],s[a++]=_[1],_[0]+=s[r++],_[1]+=s[r++],bl(_,_,e),s[a++]=_[0],s[a++]=_[1]}for(o=0;o<i;o++){var _;(_=Ml[o])[0]=s[r++],_[1]=s[r++],bl(_,_,e),s[a++]=_[0],s[a++]=_[1]}}},Dl=Math.sqrt,kl=Math.sin,Al=Math.cos,Ol=Math.PI,Ll=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},Pl=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(Ll(t)*Ll(e))},Rl=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Pl(t,e))};function El(t,e,n,i,r,a,o,s,l,u,h){var c=l*(Ol/180),d=Al(c)*(t-n)/2+kl(c)*(e-i)/2,f=-1*kl(c)*(t-n)/2+Al(c)*(e-i)/2,p=d*d/(o*o)+f*f/(s*s);p>1&&(o*=Dl(p),s*=Dl(p));var g=(r===a?-1:1)*Dl((o*o*(s*s)-o*o*(f*f)-s*s*(d*d))/(o*o*(f*f)+s*s*(d*d)))||0,m=g*o*f/s,v=g*-s*d/o,y=(t+n)/2+Al(c)*m-kl(c)*v,_=(e+i)/2+kl(c)*m+Al(c)*v,x=Rl([1,0],[(d-m)/o,(f-v)/s]),w=[(d-m)/o,(f-v)/s],b=[(-1*d-m)/o,(-1*f-v)/s],S=Rl(w,b);Pl(w,b)<=-1&&(S=Ol),Pl(w,b)>=1&&(S=0),0===a&&S>0&&(S-=2*Ol),1===a&&S<0&&(S+=2*Ol),h.addData(u,y,_,o,s,x,S,c,a)}var Nl=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,zl=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Bl(t,e){var n=function(t){if(!t)return new Zs;for(var e,n=0,i=0,r=n,a=i,o=new Zs,s=Zs.CMD,l=t.match(Nl),u=0;u<l.length;u++){for(var h,c=l[u],d=c.charAt(0),f=c.match(zl)||[],p=f.length,g=0;g<p;g++)f[g]=parseFloat(f[g]);for(var m=0;m<p;){var v,y,_,x,w,b,S,M=n,T=i;switch(d){case"l":n+=f[m++],i+=f[m++],h=s.L,o.addData(h,n,i);break;case"L":n=f[m++],i=f[m++],h=s.L,o.addData(h,n,i);break;case"m":n+=f[m++],i+=f[m++],h=s.M,o.addData(h,n,i),r=n,a=i,d="l";break;case"M":n=f[m++],i=f[m++],h=s.M,o.addData(h,n,i),r=n,a=i,d="L";break;case"h":n+=f[m++],h=s.L,o.addData(h,n,i);break;case"H":n=f[m++],h=s.L,o.addData(h,n,i);break;case"v":i+=f[m++],h=s.L,o.addData(h,n,i);break;case"V":i=f[m++],h=s.L,o.addData(h,n,i);break;case"C":h=s.C,o.addData(h,f[m++],f[m++],f[m++],f[m++],f[m++],f[m++]),n=f[m-2],i=f[m-1];break;case"c":h=s.C,o.addData(h,f[m++]+n,f[m++]+i,f[m++]+n,f[m++]+i,f[m++]+n,f[m++]+i),n+=f[m-2],i+=f[m-1];break;case"S":v=n,y=i;var I=o.len(),C=o.data;e===s.C&&(v+=n-C[I-4],y+=i-C[I-3]),h=s.C,M=f[m++],T=f[m++],n=f[m++],i=f[m++],o.addData(h,v,y,M,T,n,i);break;case"s":v=n,y=i,I=o.len(),C=o.data,e===s.C&&(v+=n-C[I-4],y+=i-C[I-3]),h=s.C,M=n+f[m++],T=i+f[m++],n+=f[m++],i+=f[m++],o.addData(h,v,y,M,T,n,i);break;case"Q":M=f[m++],T=f[m++],n=f[m++],i=f[m++],h=s.Q,o.addData(h,M,T,n,i);break;case"q":M=f[m++]+n,T=f[m++]+i,n+=f[m++],i+=f[m++],h=s.Q,o.addData(h,M,T,n,i);break;case"T":v=n,y=i,I=o.len(),C=o.data,e===s.Q&&(v+=n-C[I-4],y+=i-C[I-3]),n=f[m++],i=f[m++],h=s.Q,o.addData(h,v,y,n,i);break;case"t":v=n,y=i,I=o.len(),C=o.data,e===s.Q&&(v+=n-C[I-4],y+=i-C[I-3]),n+=f[m++],i+=f[m++],h=s.Q,o.addData(h,v,y,n,i);break;case"A":_=f[m++],x=f[m++],w=f[m++],b=f[m++],S=f[m++],El(M=n,T=i,n=f[m++],i=f[m++],b,S,_,x,w,h=s.A,o);break;case"a":_=f[m++],x=f[m++],w=f[m++],b=f[m++],S=f[m++],El(M=n,T=i,n+=f[m++],i+=f[m++],b,S,_,x,w,h=s.A,o)}}"z"!==d&&"Z"!==d||(h=s.Z,o.addData(h),n=r,i=a),e=h}return o.toStatic(),o}(t);return(e=e||{}).buildPath=function(t){if(t.setData){t.setData(n.data),(e=t.getContext())&&t.rebuildPath(e)}else{var e=t;n.rebuildPath(e)}},e.applyTransform=function(t){Cl(n,t),this.dirty(!0)},e}var Fl=function(t,e){for(var n=[],i=t.length,r=0;r<i;r++){var a=t[r];a.path||a.createPathProxy(),a.__dirtyPath&&a.buildPath(a.path,a.shape,!0),n.push(a.path)}var o=new wl(e);return o.createPathProxy(),o.buildPath=function(t){t.appendPath(n);var e=t.getContext();e&&t.rebuildPath(e)},o},Vl={createFromString:function(t,e){return new wl(Bl(t,e))},extendFromString:function(t,e){return wl.extend(Bl(t,e))},mergePath:Fl},Hl=Yi.ContextCachedBy,Wl=function(t){Ia.call(this,t)};Wl.prototype={constructor:Wl,type:"text",brush:function(t,e){var n=this.style;this.__dirty&&xa.normalizeTextStyle(n,!0),n.fill=n.stroke=n.shadowBlur=n.shadowColor=n.shadowOffsetX=n.shadowOffsetY=null;var i=n.text;null!=i&&(i+=""),xa.needDrawText(i,n)?(this.setTransform(t),xa.renderText(this,t,i,n,null,e),this.restoreTransform(t)):t.__attrCachedBy=Hl.NONE},getBoundingRect:function(){var t=this.style;if(this.__dirty&&xa.normalizeTextStyle(t,!0),!this._rect){t.text;var e=Gr.getBoundingRect(t.text+"",t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich);if(e.x+=t.x||0,e.y+=t.y||0,xa.getStroke(t.textStroke,t.textStrokeWidth)){var n=t.textStrokeWidth;e.x-=n/2,e.y-=n/2,e.width+=n,e.height+=n}this._rect=e}return this._rect}},Bt.inherits(Wl,Ia);var Gl=Wl,Ul=wl.extend({type:"circle",shape:{cx:0,cy:0,r:0},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,!0)}}),jl=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]];var Yl=function(t){return J.browser.ie&&J.browser.version>=11?function(){var e,n=this.__clipPaths,i=this.style;if(n)for(var r=0;r<n.length;r++){var a=n[r],o=a&&a.shape,s=a&&a.type;if(o&&("sector"===s&&o.startAngle===o.endAngle||"rect"===s&&(!o.width||!o.height))){for(var l=0;l<jl.length;l++)jl[l][2]=i[jl[l][0]],i[jl[l][0]]=jl[l][1];e=!0;break}}if(t.apply(this,arguments),e)for(l=0;l<jl.length;l++)i[jl[l][0]]=jl[l][2]}:t},ql=wl.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:Yl(wl.prototype.brush),buildPath:function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r0||0,0),a=Math.max(e.r,0),o=e.startAngle,s=e.endAngle,l=e.clockwise,u=Math.cos(o),h=Math.sin(o);t.moveTo(u*r+n,h*r+i),t.lineTo(u*a+n,h*a+i),t.arc(n,i,a,o,s,!l),t.lineTo(Math.cos(s)*r+n,Math.sin(s)*r+i),0!==r&&t.arc(n,i,r,s,o,l),t.closePath()}}),Xl=wl.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=2*Math.PI;t.moveTo(n+e.r,i),t.arc(n,i,e.r,0,r,!1),t.moveTo(n+e.r0,i),t.arc(n,i,e.r0,0,r,!0)}}),Zl=Xl,$l=se.distance;function Kl(t,e,n,i,r,a,o){var s=.5*(n-t),l=.5*(i-e);return(2*(e-n)+s+l)*o+(-3*(e-n)-2*s-l)*a+s*r+e}var Ql=function(t,e){for(var n=t.length,i=[],r=0,a=1;a<n;a++)r+=$l(t[a-1],t[a]);var o=r/2;for(o=o<n?n:o,a=0;a<o;a++){var s,l,u,h=a/(o-1)*(e?n:n-1),c=Math.floor(h),d=h-c,f=t[c%n];e?(s=t[(c-1+n)%n],l=t[(c+1)%n],u=t[(c+2)%n]):(s=t[0===c?c:c-1],l=t[c>n-2?n-1:c+1],u=t[c>n-3?n-1:c+2]);var p=d*d,g=d*p;i.push([Kl(s[0],f[0],l[0],u[0],d,p,g),Kl(s[1],f[1],l[1],u[1],d,p,g)])}return i},Jl=se.min,tu=se.max,eu=se.scale,nu=se.distance,iu=se.add,ru=se.clone,au=se.sub;var ou=function(t,e,n,i){var r,a,o,s,l=[],u=[],h=[],c=[];if(i){o=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=t.length;d<f;d++)Jl(o,o,t[d]),tu(s,s,t[d]);Jl(o,o,i[0]),tu(s,s,i[1])}for(d=0,f=t.length;d<f;d++){var p=t[d];if(n)r=t[d?d-1:f-1],a=t[(d+1)%f];else{if(0===d||d===f-1){l.push(ru(t[d]));continue}r=t[d-1],a=t[d+1]}au(u,a,r),eu(u,u,e);var g=nu(p,r),m=nu(p,a),v=g+m;0!==v&&(g/=v,m/=v),eu(h,u,-g),eu(c,u,m);var y=iu([],p,h),_=iu([],p,c);i&&(tu(y,y,o),Jl(y,y,s),tu(_,_,o),Jl(_,_,s)),l.push(y),l.push(_)}return n&&l.push(l.shift()),l};var su=function(t,e,n){var i=e.points,r=e.smooth;if(i&&i.length>=2){if(r&&"spline"!==r){var a=ou(i,r,n,e.smoothConstraint);t.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(n?o:o-1);s++){var l=a[2*s],u=a[2*s+1],h=i[(s+1)%o];t.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{"spline"===r&&(i=Ql(i,n)),t.moveTo(i[0][0],i[0][1]);s=1;for(var c=i.length;s<c;s++)t.lineTo(i[s][0],i[s][1])}n&&t.closePath()}},lu={buildPath:su},uu=wl.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){lu.buildPath(t,e,!0)}}),hu=wl.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){lu.buildPath(t,e,!1)}}),cu=Math.round;function du(t,e,n){if(!e)return t;var i=cu(2*t);return(i+cu(e))%2==0?i/2:(i+(n?1:-1))/2}var fu=function(t,e,n){if(e){var i=e.x1,r=e.x2,a=e.y1,o=e.y2;t.x1=i,t.x2=r,t.y1=a,t.y2=o;var s=n&&n.lineWidth;s&&(cu(2*i)===cu(2*r)&&(t.x1=t.x2=du(i,s,!0)),cu(2*a)===cu(2*o)&&(t.y1=t.y2=du(a,s,!0)))}},pu=function(t,e,n){if(e){var i=e.x,r=e.y,a=e.width,o=e.height;t.x=i,t.y=r,t.width=a,t.height=o;var s=n&&n.lineWidth;s&&(t.x=du(i,s,!0),t.y=du(r,s,!0),t.width=Math.max(du(i+a,s,!1)-t.x,0===a?0:1),t.height=Math.max(du(r+o,s,!1)-t.y,0===o?0:1))}},gu={subPixelOptimizeLine:fu,subPixelOptimizeRect:pu,subPixelOptimize:du},mu=gu.subPixelOptimizeRect,vu={},yu=wl.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var n,i,r,a;this.subPixelOptimize?(mu(vu,e,this.style),n=vu.x,i=vu.y,r=vu.width,a=vu.height,vu.r=e.r,e=vu):(n=e.x,i=e.y,r=e.width,a=e.height),e.r?Ur.buildPath(t,e):t.rect(n,i,r,a),t.closePath()}}),_u=gu.subPixelOptimizeLine,xu={},wu=wl.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var n,i,r,a;this.subPixelOptimize?(_u(xu,e,this.style),n=xu.x1,i=xu.y1,r=xu.x2,a=xu.y2):(n=e.x1,i=e.y1,r=e.x2,a=e.y2);var o=e.percent;0!==o&&(t.moveTo(n,i),o<1&&(r=n*(1-o)+r*o,a=i*(1-o)+a*o),t.lineTo(r,a))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),bu=ys.quadraticSubdivide,Su=ys.cubicSubdivide,Mu=ys.quadraticAt,Tu=ys.cubicAt,Iu=ys.quadraticDerivativeAt,Cu=ys.cubicDerivativeAt,Du=[];function ku(t,e,n){var i=t.cpx2,r=t.cpy2;return null===i||null===r?[(n?Cu:Tu)(t.x1,t.cpx1,t.cpx2,t.x2,e),(n?Cu:Tu)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(n?Iu:Mu)(t.x1,t.cpx1,t.x2,e),(n?Iu:Mu)(t.y1,t.cpy1,t.y2,e)]}var Au=wl.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var n=e.x1,i=e.y1,r=e.x2,a=e.y2,o=e.cpx1,s=e.cpy1,l=e.cpx2,u=e.cpy2,h=e.percent;0!==h&&(t.moveTo(n,i),null==l||null==u?(h<1&&(bu(n,o,r,h,Du),o=Du[1],r=Du[2],bu(i,s,a,h,Du),s=Du[1],a=Du[2]),t.quadraticCurveTo(o,s,r,a)):(h<1&&(Su(n,o,l,r,h,Du),o=Du[1],l=Du[2],r=Du[3],Su(i,s,u,a,h,Du),s=Du[1],u=Du[2],a=Du[3]),t.bezierCurveTo(o,s,l,u,r,a)))},pointAt:function(t){return ku(this.shape,t,!1)},tangentAt:function(t){var e=ku(this.shape,t,!0);return se.normalize(e,e)}}),Ou=wl.extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r,0),a=e.startAngle,o=e.endAngle,s=e.clockwise,l=Math.cos(a),u=Math.sin(a);t.moveTo(l*r+n,u*r+i),t.arc(n,i,r,a,o,!s)}}),Lu=wl.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,n=0;n<e.length;n++)t=t||e[n].__dirtyPath;this.__dirtyPath=t,this.__dirty=this.__dirty||t},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)},buildPath:function(t,e){for(var n=e.paths||[],i=0;i<n.length;i++)n[i].buildPath(t,n[i].shape,!0)},afterBrush:function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),wl.prototype.getBoundingRect.call(this)}}),Pu=Lu,Ru=function(t){this.colorStops=t||[]};Ru.prototype={constructor:Ru,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}};var Eu=Ru,Nu=function(t,e,n,i,r,a){this.x=null==t?0:t,this.y=null==e?0:e,this.x2=null==n?1:n,this.y2=null==i?0:i,this.type="linear",this.global=a||!1,Eu.call(this,r)};Nu.prototype={constructor:Nu},Bt.inherits(Nu,Eu);var zu=Nu,Bu=function(t,e,n,i,r){this.x=null==t?.5:t,this.y=null==e?.5:e,this.r=null==n?.5:n,this.type="radial",this.global=r||!1,Eu.call(this,i)};Bu.prototype={constructor:Bu},Bt.inherits(Bu,Eu);var Fu=Bu,Vu=Bt.inherits;function Hu(t){Ia.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}Hu.prototype.incremental=!0,Hu.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},Hu.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.dirty()},Hu.prototype.addDisplayables=function(t,e){e=e||!1;for(var n=0;n<t.length;n++)this.addDisplayable(t[n],e)},Hu.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])},Hu.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){(e=this._displayables[t]).parent=this,e.update(),e.parent=null}for(t=0;t<this._temporaryDisplayables.length;t++){var e;(e=this._temporaryDisplayables[t]).parent=this,e.update(),e.parent=null}},Hu.prototype.brush=function(t,e){for(var n=this._cursor;n<this._displayables.length;n++){(i=this._displayables[n]).beforeBrush&&i.beforeBrush(t),i.brush(t,n===this._cursor?null:this._displayables[n-1]),i.afterBrush&&i.afterBrush(t)}this._cursor=n;for(n=0;n<this._temporaryDisplayables.length;n++){var i;(i=this._temporaryDisplayables[n]).beforeBrush&&i.beforeBrush(t),i.brush(t,0===n?null:this._temporaryDisplayables[n-1]),i.afterBrush&&i.afterBrush(t)}this._temporaryDisplayables=[],this.notClear=!0};var Wu=[];Hu.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new Ai(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(Wu)),t.union(i)}this._rect=t}return this._rect},Hu.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},Vu(Hu,Ia);var Gu=Da,Uu=Li,ju=Gl,Yu=Ul,qu=ql,Xu=Zl,Zu=uu,$u=hu,Ku=yu,Qu=wu,Ju=Au,th=Ou,eh=Pu,nh=zu,ih=Fu,rh=Ai,ah=Hu,oh=Math.max,sh=Math.min,lh={},uh=1,hh="emphasis",ch="normal",dh=1,fh={},ph={};function gh(t,e){ph[t]=e}function mh(t,e,n,i){var r=Vl.createFromString(t,e);return n&&("center"===i&&(n=vh(n,r.getBoundingRect())),_h(r,n)),r}function vh(t,e){var n,i=e.width/e.height,r=t.height*i;return n=r<=t.width?t.height:(r=t.width)/i,{x:t.x+t.width/2-r/2,y:t.y+t.height/2-n/2,width:r,height:n}}var yh=Vl.mergePath;function _h(t,e){if(t.applyTransform){var n=t.getBoundingRect().calculateTransform(e);t.applyTransform(n)}}var xh=gu.subPixelOptimize;function wh(t){return null!=t&&"none"!==t}var bh=Bt.createHashMap(),Sh=0;function Mh(t){var e=t.__hoverStl;if(e&&!t.__highlighted){var n=t.__zr,i=t.useHoverLayer&&n&&"canvas"===n.painter.type;if(t.__highlighted=i?"layer":"plain",!(t.isGroup||!n&&t.useHoverLayer)){var r=t,a=t.style;i&&(a=(r=n.addHover(t)).style),Vh(a),i||function(t){if(t.__hoverStlDirty){t.__hoverStlDirty=!1;var e=t.__hoverStl;if(e){var n=t.__cachedNormalStl={};t.__cachedNormalZ2=t.z2;var i=t.style;for(var r in e)null!=e[r]&&(n[r]=i[r]);n.fill=i.fill,n.stroke=i.stroke}else t.__cachedNormalStl=t.__cachedNormalZ2=null}}(r),a.extendFrom(e),Th(a,e,"fill"),Th(a,e,"stroke"),Fh(a),i||(t.dirty(!1),t.z2+=uh)}}}function Th(t,e,n){!wh(e[n])&&wh(t[n])&&(t[n]=function(t){if("string"!=typeof t)return t;var e=bh.get(t);return e||(e=Un.lift(t,-.1),Sh<1e4&&(bh.set(t,e),Sh++)),e}(t[n]))}function Ih(t){var e=t.__highlighted;if(e&&(t.__highlighted=!1,!t.isGroup))if("layer"===e)t.__zr&&t.__zr.removeHover(t);else{var n=t.style,i=t.__cachedNormalStl;i&&(Vh(n),t.setStyle(i),Fh(n));var r=t.__cachedNormalZ2;null!=r&&t.z2-r===uh&&(t.z2=r)}}function Ch(t,e,n){var i,r=ch,a=ch;t.__highlighted&&(r=hh,i=!0),e(t,n),t.__highlighted&&(a=hh,i=!0),t.isGroup&&t.traverse((function(t){!t.isGroup&&e(t,n)})),i&&t.__highDownOnUpdate&&t.__highDownOnUpdate(r,a)}function Dh(t,e){e=t.__hoverStl=!1!==e&&(t.hoverStyle||e||{}),t.__hoverStlDirty=!0,t.__highlighted&&(t.__cachedNormalStl=null,Ih(t),Mh(t))}function kh(t){!Ph(this,t)&&!this.__highByOuter&&Ch(this,Mh)}function Ah(t){!Ph(this,t)&&!this.__highByOuter&&Ch(this,Ih)}function Oh(t){this.__highByOuter|=1<<(t||0),Ch(this,Mh)}function Lh(t){!(this.__highByOuter&=~(1<<(t||0)))&&Ch(this,Ih)}function Ph(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function Rh(t,e){var n=!1===e;if(t.__highDownSilentOnTouch=t.highDownSilentOnTouch,t.__highDownOnUpdate=t.highDownOnUpdate,!n||t.__highDownDispatcher){var i=n?"off":"on";t[i]("mouseover",kh)[i]("mouseout",Ah),t[i]("emphasis",Oh)[i]("normal",Lh),t.__highByOuter=t.__highByOuter||0,t.__highDownDispatcher=!n}}function Eh(t,e,n,i,r){return Nh(t,e,i,r),n&&Bt.extend(t,n),t}function Nh(t,e,n,i){if((n=n||lh).isRectText){var r;n.getTextPosition?r=n.getTextPosition(e,i):"outside"===(r=e.getShallow("position")||(i?null:"inside"))&&(r="top"),t.textPosition=r,t.textOffset=e.getShallow("offset");var a=e.getShallow("rotate");null!=a&&(a*=Math.PI/180),t.textRotation=a,t.textDistance=Bt.retrieve2(e.getShallow("distance"),i?null:5)}var o,s=e.ecModel,l=s&&s.option.textStyle,u=function(t){var e;for(;t&&t!==t.ecModel;){var n=(t.option||lh).rich;if(n)for(var i in e=e||{},n)n.hasOwnProperty(i)&&(e[i]=1);t=t.parentModel}return e}(e);if(u)for(var h in o={},u)if(u.hasOwnProperty(h)){var c=e.getModel(["rich",h]);zh(o[h]={},c,l,n,i)}return t.rich=o,zh(t,e,l,n,i,!0),n.forceRich&&!n.textStyle&&(n.textStyle={}),t}function zh(t,e,n,i,r,a){n=!r&&n||lh,t.textFill=Bh(e.getShallow("color"),i)||n.color,t.textStroke=Bh(e.getShallow("textBorderColor"),i)||n.textBorderColor,t.textStrokeWidth=Bt.retrieve2(e.getShallow("textBorderWidth"),n.textBorderWidth),r||(a&&(t.insideRollbackOpt=i,Fh(t)),null==t.textFill&&(t.textFill=i.autoColor)),t.fontStyle=e.getShallow("fontStyle")||n.fontStyle,t.fontWeight=e.getShallow("fontWeight")||n.fontWeight,t.fontSize=e.getShallow("fontSize")||n.fontSize,t.fontFamily=e.getShallow("fontFamily")||n.fontFamily,t.textAlign=e.getShallow("align"),t.textVerticalAlign=e.getShallow("verticalAlign")||e.getShallow("baseline"),t.textLineHeight=e.getShallow("lineHeight"),t.textWidth=e.getShallow("width"),t.textHeight=e.getShallow("height"),t.textTag=e.getShallow("tag"),a&&i.disableBox||(t.textBackgroundColor=Bh(e.getShallow("backgroundColor"),i),t.textPadding=e.getShallow("padding"),t.textBorderColor=Bh(e.getShallow("borderColor"),i),t.textBorderWidth=e.getShallow("borderWidth"),t.textBorderRadius=e.getShallow("borderRadius"),t.textBoxShadowColor=e.getShallow("shadowColor"),t.textBoxShadowBlur=e.getShallow("shadowBlur"),t.textBoxShadowOffsetX=e.getShallow("shadowOffsetX"),t.textBoxShadowOffsetY=e.getShallow("shadowOffsetY")),t.textShadowColor=e.getShallow("textShadowColor")||n.textShadowColor,t.textShadowBlur=e.getShallow("textShadowBlur")||n.textShadowBlur,t.textShadowOffsetX=e.getShallow("textShadowOffsetX")||n.textShadowOffsetX,t.textShadowOffsetY=e.getShallow("textShadowOffsetY")||n.textShadowOffsetY}function Bh(t,e){return"auto"!==t?t:e&&e.autoColor?e.autoColor:null}function Fh(t){var e,n=t.textPosition,i=t.insideRollbackOpt;if(i&&null==t.textFill){var r=i.autoColor,a=i.isRectText,o=i.useInsideStyle,s=!1!==o&&(!0===o||a&&n&&"string"==typeof n&&n.indexOf("inside")>=0),l=!s&&null!=r;(s||l)&&(e={textFill:t.textFill,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth}),s&&(t.textFill="#fff",null==t.textStroke&&(t.textStroke=r,null==t.textStrokeWidth&&(t.textStrokeWidth=2))),l&&(t.textFill=r)}t.insideRollback=e}function Vh(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function Hh(t,e,n,i,r,a){if("function"==typeof r&&(a=r,r=null),i&&i.isAnimationEnabled()){var o=t?"Update":"",s=i.getShallow("animationDuration"+o),l=i.getShallow("animationEasing"+o),u=i.getShallow("animationDelay"+o);"function"==typeof u&&(u=u(r,i.getAnimationDelayParams?i.getAnimationDelayParams(e,r):null)),"function"==typeof s&&(s=s(r)),s>0?e.animateTo(n,s,u||0,l,a,!!a):(e.stopAnimation(),e.attr(n),a&&a())}else e.stopAnimation(),e.attr(n),a&&a()}function Wh(t,e,n,i,r){Hh(!0,t,e,n,i,r)}function Gh(t,e,n){return e&&!Bt.isArrayLike(e)&&(e=dn.getLocalTransform(e)),n&&(e=nn.invert([],e)),se.applyTransform([],t,e)}function Uh(t,e,n,i,r,a,o,s){var l,u=n-t,h=i-e,c=o-r,d=s-a,f=jh(c,d,u,h);if((l=f)<=1e-6&&l>=-1e-6)return!1;var p=t-r,g=e-a,m=jh(p,g,u,h)/f;if(m<0||m>1)return!1;var v=jh(p,g,c,d)/f;return!(v<0||v>1)}function jh(t,e,n,i){return t*i-n*e}gh("circle",Ul),gh("sector",ql),gh("ring",Zl),gh("polygon",uu),gh("polyline",hu),gh("rect",yu),gh("line",wu),gh("bezierCurve",Au),gh("arc",Ou);var Yh=function(t,e,n){var i=new Da({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===n){var r={width:t.width,height:t.height};i.setStyle(vh(e,r))}}});return i},qh=function(t){return gu.subPixelOptimizeLine(t.shape,t.shape,t.style),t},Xh=function(t){return gu.subPixelOptimizeRect(t.shape,t.shape,t.style),t},Zh=function(t,e,n){var i,r={isRectText:!0};!1===n?i=!0:r.autoColor=n,Nh(t,e,r,i)},$h=function(t,e,n){var i=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),r=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),a=["left"===t?-i:"right"===t?i:0,"top"===t?-r:"bottom"===t?r:0];return a=Gh(a,e,n),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"},Kh=function(t,e){return Bt.map(t,(function(t){var n=t[0];n=oh(n,e.x),n=sh(n,e.x+e.width);var i=t[1];return i=oh(i,e.y),[n,i=sh(i,e.y+e.height)]}))},Qh=function(t,e,n){var i=(e=Bt.extend({rectHover:!0},e)).style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(i.image=t.slice(8),Bt.defaults(i,n),new Da(e)):mh(t.replace("path://",""),e,n,"center")},Jh=function(t,e,n,i,r){for(var a=0,o=r[r.length-1];a<r.length;a++){var s=r[a];if(Uh(t,e,n,i,s[0],s[1],o[0],o[1]))return!0;o=s}},tc={Image:Gu,Group:Uu,Text:ju,Circle:Yu,Sector:qu,Ring:Xu,Polygon:Zu,Polyline:$u,Rect:Ku,Line:Qu,BezierCurve:Ju,Arc:th,CompoundPath:eh,LinearGradient:nh,RadialGradient:ih,BoundingRect:rh,IncrementalDisplayable:ah,Z2_EMPHASIS_LIFT:uh,CACHED_LABEL_STYLE_PROPERTIES:{color:"textFill",textBorderColor:"textStroke",textBorderWidth:"textStrokeWidth"},extendShape:function(t){return wl.extend(t)},extendPath:function(t,e){return Vl.extendFromString(t,e)},registerShape:gh,getShapeClass:function(t){if(ph.hasOwnProperty(t))return ph[t]},makePath:mh,makeImage:Yh,mergePath:yh,resizePath:_h,subPixelOptimizeLine:qh,subPixelOptimizeRect:Xh,subPixelOptimize:xh,setElementHoverStyle:Dh,setHoverStyle:function(t,e){Rh(t,!0),Ch(t,Dh,e)},setAsHighDownDispatcher:Rh,isHighDownDispatcher:function(t){return!(!t||!t.__highDownDispatcher)},getHighlightDigit:function(t){var e=fh[t];return null==e&&dh<=32&&(e=fh[t]=dh++),e},setLabelStyle:function(t,e,n,i,r,a,o){var s,l=(r=r||lh).labelFetcher,u=r.labelDataIndex,h=r.labelDimIndex,c=r.labelProp,d=n.getShallow("show"),f=i.getShallow("show");(d||f)&&(l&&(s=l.getFormattedLabel(u,"normal",null,h,c)),null==s&&(s=Bt.isFunction(r.defaultText)?r.defaultText(u,r):r.defaultText));var p=d?s:null,g=f?Bt.retrieve2(l?l.getFormattedLabel(u,"emphasis",null,h,c):null,s):null;null==p&&null==g||(Eh(t,n,a,r),Eh(e,i,o,r,!0)),t.text=p,e.text=g},modifyLabelStyle:function(t,e,n){var i=t.style;e&&(Vh(i),t.setStyle(e),Fh(i)),i=t.__hoverStl,n&&i&&(Vh(i),Bt.extend(i,n),Fh(i))},setTextStyle:Eh,setText:Zh,getFont:function(t,e){var n=e&&e.getModel("textStyle");return Bt.trim([t.fontStyle||n&&n.getShallow("fontStyle")||"",t.fontWeight||n&&n.getShallow("fontWeight")||"",(t.fontSize||n&&n.getShallow("fontSize")||12)+"px",t.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "))},updateProps:Wh,initProps:function(t,e,n,i,r){Hh(!1,t,e,n,i,r)},getTransform:function(t,e){for(var n=nn.identity([]);t&&t!==e;)nn.mul(n,t.getLocalTransform(),n),t=t.parent;return n},applyTransform:Gh,transformDirection:$h,groupTransition:function(t,e,n,i){if(t&&e){var r,a=(r={},t.traverse((function(t){!t.isGroup&&t.anid&&(r[t.anid]=t)})),r);e.traverse((function(t){if(!t.isGroup&&t.anid){var e=a[t.anid];if(e){var i=o(t);t.attr(o(e)),Wh(t,i,n,t.dataIndex)}}}))}function o(t){var e={position:se.clone(t.position),rotation:t.rotation};return t.shape&&(e.shape=Bt.extend({},t.shape)),e}},clipPointsByRect:Kh,clipRectByRect:function(t,e){var n=oh(t.x,e.x),i=sh(t.x+t.width,e.x+e.width),r=oh(t.y,e.y),a=sh(t.y+t.height,e.y+e.height);if(i>=n&&a>=r)return{x:n,y:r,width:i-n,height:a-r}},createIcon:Qh,linePolygonIntersect:Jh,lineLineIntersect:Uh},ec=["textStyle","color"],nc={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(ec):null)},getFont:function(){return tc.getFont({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return Gr.getBoundingRect(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("lineHeight"),this.getShallow("rich"),this.getShallow("truncateText"))}},ic=nc,rc=Uo([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),ac={getItemStyle:function(t,e){var n=rc(this,t,e),i=this.getBorderLineDash();return i&&(n.lineDash=i),n},getBorderLineDash:function(){var t=this.get("borderType");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}},oc=ac,sc=Ro.makeInner,lc=Go.enableClassExtend,uc=Go.enableClassCheck,hc=Bt.mixin,cc=sc();function dc(t,e,n){this.parentModel=e,this.ecModel=n,this.option=t}function fc(t,e,n){for(var i=0;i<e.length&&(!e[i]||null!=(t=t&&"object"==typeof t?t[e[i]]:null));i++);return null==t&&n&&(t=n.get(e)),t}function pc(t,e){var n=cc(t).getParent;return n?n.call(t,e):t.parentModel}dc.prototype={constructor:dc,init:null,mergeOption:function(t){Bt.merge(this.option,t,!0)},get:function(t,e){return null==t?this.option:fc(this.option,this.parsePath(t),!e&&pc(this,t))},getShallow:function(t,e){var n=this.option,i=null==n?n:n[t],r=!e&&pc(this,t);return null==i&&r&&(i=r.getShallow(t)),i},getModel:function(t,e){var n;return new dc(null==t?this.option:fc(this.option,t=this.parsePath(t)),e=e||(n=pc(this,t))&&n.getModel(t),this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new(0,this.constructor)(Bt.clone(this.option))},setReadOnly:function(t){},parsePath:function(t){return"string"==typeof t&&(t=t.split(".")),t},customizeGetParent:function(t){cc(this).getParent=t},isAnimationEnabled:function(){if(!J.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},lc(dc),uc(dc),hc(dc,qo),hc(dc,Zo),hc(dc,ic),hc(dc,oc);var gc=dc,mc=Go.parseClassType,vc=0;var yc={getUID:function(t){return[t||"",vc++,Math.random().toFixed(5)].join("_")},enableSubTypeDefaulter:function(t){var e={};return t.registerSubTypeDefaulter=function(t,n){t=mc(t),e[t.main]=n},t.determineSubType=function(n,i){var r=i.type;if(!r){var a=mc(n).main;t.hasSubTypes(n)&&e[a]&&(r=e[a](i))}return r},t},enableTopologicalTravel:function(t,e){function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}t.topologicalTravel=function(t,i,r,a){if(t.length){var o=function(t){var i={},r=[];return Bt.each(t,(function(a){var o=n(i,a),s=function(t,e){var n=[];return Bt.each(t,(function(t){Bt.indexOf(e,t)>=0&&n.push(t)})),n}(o.originalDeps=e(a),t);o.entryCount=s.length,0===o.entryCount&&r.push(a),Bt.each(s,(function(t){Bt.indexOf(o.predecessor,t)<0&&o.predecessor.push(t);var e=n(i,t);Bt.indexOf(e.successor,t)<0&&e.successor.push(a)}))})),{graph:i,noEntryList:r}}(i),s=o.graph,l=o.noEntryList,u={};for(Bt.each(t,(function(t){u[t]=!0}));l.length;){var h=l.pop(),c=s[h],d=!!u[h];d&&(r.call(a,h,c.originalDeps.slice()),delete u[h]),Bt.each(c.successor,d?p:f)}Bt.each(u,(function(){throw new Error("Circle dependency may exists")}))}function f(t){s[t].entryCount--,0===s[t].entryCount&&l.push(t)}function p(t){u[t]=!0,f(t)}}}},_c=1e-4;var xc=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function wc(t){if(0===t)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return t/Math.pow(10,e)>=10&&e++,e}var bc=function(t,e,n,i){var r=e[1]-e[0],a=n[1]-n[0];if(0===r)return 0===a?n[0]:(n[0]+n[1])/2;if(i)if(r>0){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])/r*a+n[0]},Sc=function(t,e){var n=Math.log,i=Math.LN10,r=Math.floor(n(t[1]-t[0])/i),a=Math.round(n(Math.abs(e[1]-e[0]))/i),o=Math.min(Math.max(-r+a,0),20);return isFinite(o)?o:20},Mc=function(t,e,n){if(!t[e])return 0;var i=Bt.reduce(t,(function(t,e){return t+(isNaN(e)?0:e)}),0);if(0===i)return 0;for(var r=Math.pow(10,n),a=Bt.map(t,(function(t){return(isNaN(t)?0:t)/i*r*100})),o=100*r,s=Bt.map(a,(function(t){return Math.floor(t)})),l=Bt.reduce(s,(function(t,e){return t+e}),0),u=Bt.map(a,(function(t,e){return t-s[e]}));l<o;){for(var h=Number.NEGATIVE_INFINITY,c=null,d=0,f=u.length;d<f;++d)u[d]>h&&(h=u[d],c=d);++s[c],u[c]=0,++l}return s[e]/r},Tc=function(t,e){var n=wc(t),i=Math.pow(10,n),r=t/i;return t=(e?r<1.5?1:r<2.5?2:r<4?3:r<7?5:10:r<1?1:r<2?2:r<3?3:r<5?5:10)*i,n>=-20?+t.toFixed(n<0?-n:0):t},Ic=function(t){t.sort((function(t,e){return s(t,e,0)?-1:1}));for(var e=-1/0,n=1,i=0;i<t.length;){for(var r=t[i].interval,a=t[i].close,o=0;o<2;o++)r[o]<=e&&(r[o]=e,a[o]=o?1:1-n),e=r[o],n=a[o];r[0]===r[1]&&a[0]*a[1]!=1?t.splice(i,1):i++}return t;function s(t,e,n){return t.interval[n]<e.interval[n]||t.interval[n]===e.interval[n]&&(t.close[n]-e.close[n]==(n?-1:1)||!n&&s(t,e,1))}},Cc={linearMap:bc,parsePercent:function(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?(n=t,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var n},round:function(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t},asc:function(t){return t.sort((function(t,e){return t-e})),t},getPrecision:function(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},getPrecisionSafe:function(t){var e=t.toString(),n=e.indexOf("e");if(n>0){var i=+e.slice(n+1);return i<0?-i:0}var r=e.indexOf(".");return r<0?0:e.length-1-r},getPixelPrecision:Sc,getPercentWithPrecision:Mc,MAX_SAFE_INTEGER:9007199254740991,remRadian:function(t){var e=2*Math.PI;return(t%e+e)%e},isRadianAroundZero:function(t){return t>-1e-4&&t<_c},parseDate:function(t){if(t instanceof Date)return t;if("string"==typeof t){var e=xc.exec(t);if(!e)return new Date(NaN);if(e[8]){var n=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(n-=e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,n,+(e[5]||0),+e[6]||0,+e[7]||0))}return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0)}return null==t?new Date(NaN):new Date(Math.round(t))},quantity:function(t){return Math.pow(10,wc(t))},quantityExponent:wc,nice:Tc,quantile:function(t,e){var n=(t.length-1)*e+1,i=Math.floor(n),r=+t[i-1],a=n-i;return a?r+a*(t[i]-r):r},reformIntervals:Ic,isNumeric:function(t){return t-parseFloat(t)>=0}};var Dc=Bt.normalizeCssArray,kc=/([&<>"'])/g,Ac={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Oc(t){return null==t?"":(t+"").replace(kc,(function(t,e){return Ac[e]}))}var Lc=["a","b","c","d","e","f","g"],Pc=function(t,e){return"{"+t+(null==e?"":e)+"}"};function Rc(t,e){return"0000".substr(0,e-(t+="").length)+t}var Ec=function(t,e,n){Bt.isArray(e)||(e=[e]);var i=e.length;if(!i)return"";for(var r=e[0].$vars||[],a=0;a<r.length;a++){var o=Lc[a];t=t.replace(Pc(o),Pc(o,0))}for(var s=0;s<i;s++)for(var l=0;l<r.length;l++){var u=e[s][r[l]];t=t.replace(Pc(Lc[l],s),n?Oc(u):u)}return t},Nc=function(t,e,n){return Bt.each(e,(function(e,i){t=t.replace("{"+i+"}",n?Oc(e):e)})),t},zc=function(t,e){var n=(t=Bt.isString(t)?{color:t,extraCssText:e}:t||{}).color,i=t.type,r=(e=t.extraCssText,t.renderMode||"html"),a=t.markerId||"X";return n?"html"===r?"subItem"===i?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Oc(n)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+Oc(n)+";"+(e||"")+'"></span>':{renderMode:r,content:"{marker"+a+"|}  ",style:{color:n}}:""},Bc=function(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var i=Cc.parseDate(e),r=n?"UTC":"",a=i["get"+r+"FullYear"](),o=i["get"+r+"Month"]()+1,s=i["get"+r+"Date"](),l=i["get"+r+"Hours"](),u=i["get"+r+"Minutes"](),h=i["get"+r+"Seconds"](),c=i["get"+r+"Milliseconds"]();return t=t.replace("MM",Rc(o,2)).replace("M",o).replace("yyyy",a).replace("yy",a%100).replace("dd",Rc(s,2)).replace("d",s).replace("hh",Rc(l,2)).replace("h",l).replace("mm",Rc(u,2)).replace("m",u).replace("ss",Rc(h,2)).replace("s",h).replace("SSS",Rc(c,3))},Fc=function(t,e,n,i,r,a,o,s){return Gr.getBoundingRect(t,e,n,i,r,s,a,o)},Vc={addCommas:function(t){return isNaN(t)?"-":(t=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")},toCamelCase:function(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},normalizeCssArray:Dc,encodeHTML:Oc,formatTpl:Ec,formatTplSimple:Nc,getTooltipMarker:zc,formatTime:Bc,capitalFirst:function(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t},truncateText:Gr.truncateText,getTextBoundingRect:function(t){return Gr.getBoundingRect(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)},getTextRect:Fc,windowOpen:function(t,e){if("_blank"===e||"blank"===e){var n=window.open();n.opener=null,n.location=t}else window.open(t,e)}},Hc=Cc.parsePercent,Wc=Bt.each,Gc=["left","right","top","bottom","width","height"],Uc=[["width","left","right"],["height","top","bottom"]];function jc(t,e,n,i,r){var a=0,o=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;e.eachChild((function(l,u){var h,c,d=l.position,f=l.getBoundingRect(),p=e.childAt(u+1),g=p&&p.getBoundingRect();if("horizontal"===t){var m=f.width+(g?-g.x+f.x:0);(h=a+m)>i||l.newline?(a=0,h=m,o+=s+n,s=f.height):s=Math.max(s,f.height)}else{var v=f.height+(g?-g.y+f.y:0);(c=o+v)>r||l.newline?(a+=s+n,o=0,c=v,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=a,d[1]=o,"horizontal"===t?a=h+n:o=c+n)}))}var Yc=jc,qc=Bt.curry(jc,"vertical"),Xc=Bt.curry(jc,"horizontal");function Zc(t,e,n){n=Vc.normalizeCssArray(n||0);var i=e.width,r=e.height,a=Hc(t.left,i),o=Hc(t.top,r),s=Hc(t.right,i),l=Hc(t.bottom,r),u=Hc(t.width,i),h=Hc(t.height,r),c=n[2]+n[0],d=n[1]+n[3],f=t.aspect;switch(isNaN(u)&&(u=i-s-d-a),isNaN(h)&&(h=r-l-c-o),null!=f&&(isNaN(u)&&isNaN(h)&&(f>i/r?u=.8*i:h=.8*r),isNaN(u)&&(u=f*h),isNaN(h)&&(h=u/f)),isNaN(a)&&(a=i-s-u-d),isNaN(o)&&(o=r-l-h-c),t.left||t.right){case"center":a=i/2-u/2-n[3];break;case"right":a=i-u-d}switch(t.top||t.bottom){case"middle":case"center":o=r/2-h/2-n[0];break;case"bottom":o=r-h-c}a=a||0,o=o||0,isNaN(u)&&(u=i-d-a-(s||0)),isNaN(h)&&(h=r-c-o-(l||0));var p=new Ai(a+n[3],o+n[0],u,h);return p.margin=n,p}function $c(t,e){return e&&t&&Wc(Gc,(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t}var Kc=function(t,e,n){!Bt.isObject(n)&&(n={});var i=n.ignoreSize;!Bt.isArray(i)&&(i=[i,i]);var r=o(Uc[0],0),a=o(Uc[1],1);function o(n,r){var a={},o=0,u={},h=0;if(Wc(n,(function(e){u[e]=t[e]})),Wc(n,(function(t){s(e,t)&&(a[t]=u[t]=e[t]),l(a,t)&&o++,l(u,t)&&h++})),i[r])return l(e,n[1])?u[n[2]]=null:l(e,n[2])&&(u[n[1]]=null),u;if(2!==h&&o){if(o>=2)return a;for(var c=0;c<n.length;c++){var d=n[c];if(!s(a,d)&&s(t,d)){a[d]=t[d];break}}return a}return u}function s(t,e){return t.hasOwnProperty(e)}function l(t,e){return null!=t[e]&&"auto"!==t[e]}function u(t,e,n){Wc(t,(function(t){e[t]=n[t]}))}u(Uc[0],t,r),u(Uc[1],t,a)},Qc={LOCATION_PARAMS:Gc,HV_NAMES:Uc,box:Yc,vbox:qc,hbox:Xc,getAvailableSize:function(t,e,n){var i=e.width,r=e.height,a=Hc(t.x,i),o=Hc(t.y,r),s=Hc(t.x2,i),l=Hc(t.y2,r);return(isNaN(a)||isNaN(parseFloat(t.x)))&&(a=0),(isNaN(s)||isNaN(parseFloat(t.x2)))&&(s=i),(isNaN(o)||isNaN(parseFloat(t.y)))&&(o=0),(isNaN(l)||isNaN(parseFloat(t.y2)))&&(l=r),n=Vc.normalizeCssArray(n||0),{width:Math.max(s-a-n[1]-n[3],0),height:Math.max(l-o-n[0]-n[2],0)}},getLayoutRect:Zc,positionElement:function(t,e,n,i,r){var a=!r||!r.hv||r.hv[0],o=!r||!r.hv||r.hv[1],s=r&&r.boundingMode||"all";if(a||o){var l;if("raw"===s)l="group"===t.type?new Ai(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(l=t.getBoundingRect(),t.needLocalTransform()){var u=t.getLocalTransform();(l=l.clone()).applyTransform(u)}e=Zc(Bt.defaults({width:l.width,height:l.height},e),n,i);var h=t.position,c=a?e.x-l.x:0,d=o?e.y-l.y:0;t.attr("position","raw"===s?[c,d]:[h[0]+c,h[1]+d])}},sizeCalculable:function(t,e){return null!=t[Uc[e][0]]||null!=t[Uc[e][1]]&&null!=t[Uc[e][2]]},mergeLayoutParam:Kc,getLayoutParams:function(t){return $c({},t)},copyLayoutParams:$c},Jc={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")}}},td=Go.enableClassManagement,ed=Go.parseClassType,nd=(0,Ro.makeInner)(),id=gc.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,n,i){gc.call(this,t,e,n,i),this.uid=yc.getUID("ec_cpt_model")},init:function(t,e,n,i){this.mergeDefaultAndTheme(t,n)},mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?Qc.getLayoutParams(t):{},r=e.getTheme();Bt.merge(t,r.get(this.mainType)),Bt.merge(t,this.getDefaultOption()),n&&Qc.mergeLayoutParam(t,i,n)},mergeOption:function(t,e){Bt.merge(this.option,t,!0);var n=this.layoutMode;n&&Qc.mergeLayoutParam(this.option,t,n)},optionUpdated:function(t,e){},getDefaultOption:function(){var t=nd(this);if(!t.defaultOption){for(var e=[],n=this.constructor;n;){var i=n.prototype.defaultOption;i&&e.push(i),n=n.superClass}for(var r={},a=e.length-1;a>=0;a--)r=Bt.merge(r,e[a],!0);t.defaultOption=r}return t.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});td(id,{registerWhenExtend:!0}),yc.enableSubTypeDefaulter(id),yc.enableTopologicalTravel(id,(function(t){var e=[];Bt.each(id.getClassesByMainType(t),(function(t){e=e.concat(t.prototype.dependencies||[])})),e=Bt.map(e,(function(t){return ed(t).main})),"dataset"!==t&&Bt.indexOf(e,"dataset")<=0&&e.unshift("dataset");return e})),Bt.mixin(id,Jc);var rd=id,ad="";"undefined"!=typeof navigator&&(ad=navigator.platform||"");var od={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:ad.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,animation:"auto",animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},sd=Ro.makeInner,ld=Ro.normalizeToArray,ud=sd();var hd={clearColorPalette:function(){ud(this).colorIdx=0,ud(this).colorNameMap={}},getColorFromPalette:function(t,e,n){var i=ud(e=e||this),r=i.colorIdx||0,a=i.colorNameMap=i.colorNameMap||{};if(a.hasOwnProperty(t))return a[t];var o=ld(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=n&&s?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]}(s,n):o;if((l=l||o)&&l.length){var u=l[r];return t&&(a[t]=u),i.colorIdx=(r+1)%l.length,u}}},cd=hd,dd={SOURCE_FORMAT_ORIGINAL:"original",SOURCE_FORMAT_ARRAY_ROWS:"arrayRows",SOURCE_FORMAT_OBJECT_ROWS:"objectRows",SOURCE_FORMAT_KEYED_COLUMNS:"keyedColumns",SOURCE_FORMAT_UNKNOWN:"unknown",SOURCE_FORMAT_TYPED_ARRAY:"typedArray",SERIES_LAYOUT_BY_COLUMN:"column",SERIES_LAYOUT_BY_ROW:"row"},fd=Bt.createHashMap,pd=Bt.isTypedArray,gd=Go.enableClassCheck,md=dd.SOURCE_FORMAT_ORIGINAL,vd=dd.SERIES_LAYOUT_BY_COLUMN,yd=dd.SOURCE_FORMAT_UNKNOWN,_d=dd.SOURCE_FORMAT_TYPED_ARRAY,xd=dd.SOURCE_FORMAT_KEYED_COLUMNS;function wd(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===xd?{}:[]),this.sourceFormat=t.sourceFormat||yd,this.seriesLayoutBy=t.seriesLayoutBy||vd,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&fd(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}wd.seriesDataToSource=function(t){return new wd({data:t,sourceFormat:pd(t)?_d:md,fromDataset:!1})},gd(wd);var bd=wd,Sd=Ro.makeInner,Md=Ro.getDataItemValue,Td=Bt.createHashMap,Id=Bt.each,Cd=Bt.map,Dd=Bt.isArray,kd=Bt.isString,Ad=Bt.isObject,Od=Bt.isTypedArray,Ld=Bt.isArrayLike,Pd=Bt.extend,Rd=dd.SOURCE_FORMAT_ORIGINAL,Ed=dd.SOURCE_FORMAT_ARRAY_ROWS,Nd=dd.SOURCE_FORMAT_OBJECT_ROWS,zd=dd.SOURCE_FORMAT_KEYED_COLUMNS,Bd=dd.SOURCE_FORMAT_UNKNOWN,Fd=dd.SOURCE_FORMAT_TYPED_ARRAY,Vd=dd.SERIES_LAYOUT_BY_ROW,Hd={Must:1,Might:2,Not:3},Wd=Sd();function Gd(t){if(t){var e=Td();return Cd(t,(function(t,n){if(null==(t=Pd({},Ad(t)?t:{name:t})).name)return t;t.name+="",null==t.displayName&&(t.displayName=t.name);var i=e.get(t.name);return i?t.name+="-"+i.count++:e.set(t.name,{count:1}),t}))}}function Ud(t,e,n,i){if(null==i&&(i=1/0),e===Vd)for(var r=0;r<n.length&&r<i;r++)t(n[r]?n[r][0]:null,r);else{var a=n[0]||[];for(r=0;r<a.length&&r<i;r++)t(a[r],r)}}function jd(t){var e=t.option;if(!e.data)return t.ecModel.getComponent("dataset",e.datasetIndex||0)}function Yd(t,e,n,i,r,a){var o,s,l;if(Od(t))return Hd.Not;if(i){var u=i[a];Ad(u)?(s=u.name,l=u.type):kd(u)&&(s=u)}if(null!=l)return"ordinal"===l?Hd.Must:Hd.Not;if(e===Ed)if(n===Vd){for(var h=t[a],c=0;c<(h||[]).length&&c<5;c++)if(null!=(o=g(h[r+c])))return o}else for(c=0;c<t.length&&c<5;c++){var d=t[r+c];if(d&&null!=(o=g(d[a])))return o}else if(e===Nd){if(!s)return Hd.Not;for(c=0;c<t.length&&c<5;c++){if((f=t[c])&&null!=(o=g(f[s])))return o}}else if(e===zd){if(!s)return Hd.Not;if(!(h=t[s])||Od(h))return Hd.Not;for(c=0;c<h.length&&c<5;c++)if(null!=(o=g(h[c])))return o}else if(e===Rd)for(c=0;c<t.length&&c<5;c++){var f=t[c],p=Md(f);if(!Dd(p))return Hd.Not;if(null!=(o=g(p[a])))return o}function g(t){var e=kd(t);return null!=t&&isFinite(t)&&""!==t?e?Hd.Might:Hd.Not:e&&"-"!==t?Hd.Must:void 0}return Hd.Not}var qd=function(t){var e=t.option.source,n=Bd;if(Od(e))n=Fd;else if(Dd(e)){0===e.length&&(n=Ed);for(var i=0,r=e.length;i<r;i++){var a=e[i];if(null!=a){if(Dd(a)){n=Ed;break}if(Ad(a)){n=Nd;break}}}}else if(Ad(e)){for(var o in e)if(e.hasOwnProperty(o)&&Ld(e[o])){n=zd;break}}else if(null!=e)throw new Error("Invalid data");Wd(t).sourceFormat=n},Xd=function(t){var e=t.option,n=e.data,i=Od(n)?Fd:Rd,r=!1,a=e.seriesLayoutBy,o=e.sourceHeader,s=e.dimensions,l=jd(t);if(l){var u=l.option;n=u.source,i=Wd(l).sourceFormat,r=!0,a=a||u.seriesLayoutBy,null==o&&(o=u.sourceHeader),s=s||u.dimensions}var h=function(t,e,n,i,r){if(!t)return{dimensionsDefine:Gd(r)};var a,o;if(e===Ed)"auto"===i||null==i?Ud((function(t){null!=t&&"-"!==t&&(kd(t)?null==o&&(o=1):o=0)}),n,t,10):o=i?1:0,r||1!==o||(r=[],Ud((function(t,e){r[e]=null!=t?t:""}),n,t)),a=r?r.length:n===Vd?t.length:t[0]?t[0].length:null;else if(e===Nd)r||(r=function(t){var e,n=0;for(;n<t.length&&!(e=t[n++]););if(e){var i=[];return Id(e,(function(t,e){i.push(e)})),i}}(t));else if(e===zd)r||(r=[],Id(t,(function(t,e){r.push(e)})));else if(e===Rd){var s=Md(t[0]);a=Dd(s)&&s.length||1}return{startIndex:o,dimensionsDefine:Gd(r),dimensionsDetectCount:a}}(n,i,a,o,s);Wd(t).source=new bd({data:n,fromDataset:r,seriesLayoutBy:a,sourceFormat:i,dimensionsDefine:h.dimensionsDefine,startIndex:h.startIndex,dimensionsDetectCount:h.dimensionsDetectCount,encodeDefine:e.encode})},Zd=function(t,e,n){var i={},r=jd(e);if(!r||!t)return i;var a,o,s=[],l=[],u=e.ecModel,h=Wd(u).datasetMap,c=r.uid+"_"+n.seriesLayoutBy;t=t.slice(),Id(t,(function(e,n){!Ad(e)&&(t[n]={name:e}),"ordinal"===e.type&&null==a&&(a=n,o=p(t[n])),i[e.name]=[]}));var d=h.get(c)||h.set(c,{categoryWayDim:o,valueWayDim:0});function f(t,e,n){for(var i=0;i<n;i++)t.push(e+i)}function p(t){var e=t.dimsDef;return e?e.length:1}return Id(t,(function(t,e){var n=t.name,r=p(t);if(null==a){var o=d.valueWayDim;f(i[n],o,r),f(l,o,r),d.valueWayDim+=r}else if(a===e)f(i[n],0,r),f(s,0,r);else{o=d.categoryWayDim;f(i[n],o,r),f(l,o,r),d.categoryWayDim+=r}})),s.length&&(i.itemName=s),l.length&&(i.seriesName=l),i},$d=function(t,e,n){var i={};if(!jd(t))return i;var r,a=e.sourceFormat,o=e.dimensionsDefine;a!==Nd&&a!==zd||Id(o,(function(t,e){"name"===(Ad(t)?t.name:t)&&(r=e)}));var s=function(){for(var t={},i={},s=[],l=0,u=Math.min(5,n);l<u;l++){var h=Yd(e.data,a,e.seriesLayoutBy,o,e.startIndex,l);s.push(h);var c=h===Hd.Not;if(c&&null==t.v&&l!==r&&(t.v=l),(null==t.n||t.n===t.v||!c&&s[t.n]===Hd.Not)&&(t.n=l),d(t)&&s[t.n]!==Hd.Not)return t;c||(h===Hd.Might&&null==i.v&&l!==r&&(i.v=l),null!=i.n&&i.n!==i.v||(i.n=l))}function d(t){return null!=t.v&&null!=t.n}return d(t)?t:d(i)?i:null}();if(s){i.value=s.v;var l=null!=r?r:s.n;i.itemName=[l],i.seriesName=[l]}return i},Kd={BE_ORDINAL:Hd,detectSourceFormat:qd,getSource:function(t){return Wd(t).source},resetSourceDefaulter:function(t){Wd(t).datasetMap=Td()},prepareSource:Xd,makeSeriesEncodeForAxisCoordSys:Zd,makeSeriesEncodeForNameBased:$d,guessOrdinal:function(t,e){return Yd(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}},Qd=Bt.each,Jd=Bt.filter,tf=Bt.map,ef=Bt.isArray,nf=Bt.indexOf,rf=Bt.isObject,af=Bt.isString,of=Bt.createHashMap,sf=Bt.assert,lf=Bt.clone,uf=Bt.merge,hf=Bt.extend,cf=Bt.mixin,df=Kd.resetSourceDefaulter,ff="\0_ec_inner",pf=gc.extend({init:function(t,e,n,i){n=n||{},this.option=null,this._theme=new gc(n),this._optionManager=i},setOption:function(t,e){sf(!(ff in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e=!1,n=this._optionManager;if(!t||"recreate"===t){var i=n.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(i)):gf.call(this,i),e=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var r=n.getTimelineOption(this);r&&(this.mergeOption(r),e=!0)}if(!t||"recreate"===t||"media"===t){var a=n.getMediaOption(this,this._api);a.length&&Qd(a,(function(t){this.mergeOption(t,e=!0)}),this)}return e},mergeOption:function(t){var e=this.option,n=this._componentsMap,i=[];df(this),Qd(t,(function(t,n){null!=t&&(rd.hasClass(n)?n&&i.push(n):e[n]=null==e[n]?lf(t):uf(e[n],t,!0))})),rd.topologicalTravel(i,rd.getAllClassMainTypes(),(function(i,r){var a=Ro.normalizeToArray(t[i]),o=Ro.mappingToExists(n.get(i),a);Ro.makeIdAndName(o),Qd(o,(function(t,e){var n=t.option;rf(n)&&(t.keyInfo.mainType=i,t.keyInfo.subType=function(t,e,n){var i=e.type?e.type:n?n.subType:rd.determineSubType(t,e);return i}(i,n,t.exist))}));var s=function(t,e){ef(e)||(e=e?[e]:[]);var n={};return Qd(e,(function(e){n[e]=(t.get(e)||[]).slice()})),n}(n,r);e[i]=[],n.set(i,[]),Qd(o,(function(t,r){var a=t.exist,o=t.option;if(sf(rf(o)||a,"Empty component definition"),o){var l=rd.getClass(i,t.keyInfo.subType,!0);if(a&&a.constructor===l)a.name=t.keyInfo.name,a.mergeOption(o,this),a.optionUpdated(o,!1);else{var u=hf({dependentModels:s,componentIndex:r},t.keyInfo);a=new l(o,this,this,u),hf(a,u),a.init(o,this,this,u),a.optionUpdated(null,!0)}}else a.mergeOption({},this),a.optionUpdated({},!1);n.get(i)[r]=a,e[i][r]=a.option}),this),"series"===i&&mf(this,n.get("series"))}),this),this._seriesIndicesMap=of(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var t=lf(this.option);return Qd(t,(function(e,n){if(rd.hasClass(n)){for(var i=(e=Ro.normalizeToArray(e)).length-1;i>=0;i--)Ro.isIdInner(e[i])&&e.splice(i,1);t[n]=e}})),delete t[ff],t},getTheme:function(){return this._theme},getComponent:function(t,e){var n=this._componentsMap.get(t);if(n)return n[e||0]},queryComponents:function(t){var e=t.mainType;if(!e)return[];var n,i=t.index,r=t.id,a=t.name,o=this._componentsMap.get(e);if(!o||!o.length)return[];if(null!=i)ef(i)||(i=[i]),n=Jd(tf(i,(function(t){return o[t]})),(function(t){return!!t}));else if(null!=r){var s=ef(r);n=Jd(o,(function(t){return s&&nf(r,t.id)>=0||!s&&t.id===r}))}else if(null!=a){var l=ef(a);n=Jd(o,(function(t){return l&&nf(a,t.name)>=0||!l&&t.name===a}))}else n=o.slice();return vf(n,t)},findComponents:function(t){var e,n,i,r,a,o=t.query,s=t.mainType,l=(n=s+"Index",i=s+"Id",r=s+"Name",!(e=o)||null==e[n]&&null==e[i]&&null==e[r]?null:{mainType:s,index:e[n],id:e[i],name:e[r]}),u=l?this.queryComponents(l):this._componentsMap.get(s);return a=vf(u,t),t.filter?Jd(a,t.filter):a},eachComponent:function(t,e,n){var i=this._componentsMap;if("function"==typeof t)n=e,e=t,i.each((function(t,i){Qd(t,(function(t,r){e.call(n,i,t,r)}))}));else if(af(t))Qd(i.get(t),e,n);else if(rf(t)){var r=this.findComponents(t);Qd(r,e,n)}},getSeriesByName:function(t){var e=this._componentsMap.get("series");return Jd(e,(function(e){return e.name===t}))},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(t){var e=this._componentsMap.get("series");return Jd(e,(function(e){return e.subType===t}))},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(t,e){Qd(this._seriesIndices,(function(n){var i=this._componentsMap.get("series")[n];t.call(e,i,n)}),this)},eachRawSeries:function(t,e){Qd(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,n){Qd(this._seriesIndices,(function(i){var r=this._componentsMap.get("series")[i];r.subType===t&&e.call(n,r,i)}),this)},eachRawSeriesByType:function(t,e,n){return Qd(this.getSeriesByType(t),e,n)},isSeriesFiltered:function(t){return null==this._seriesIndicesMap.get(t.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){mf(this,Jd(this._componentsMap.get("series"),t,e))},restoreData:function(t){var e=this._componentsMap;mf(this,e.get("series"));var n=[];e.each((function(t,e){n.push(e)})),rd.topologicalTravel(n,rd.getAllClassMainTypes(),(function(n,i){Qd(e.get(n),(function(e){("series"!==n||!function(t,e){if(e){var n=e.seiresIndex,i=e.seriesId,r=e.seriesName;return null!=n&&t.componentIndex!==n||null!=i&&t.id!==i||null!=r&&t.name!==r}}(e,t))&&e.restoreData()}))}))}});function gf(t){this.option={},this.option[ff]=1,this._componentsMap=of({series:[]}),this._seriesIndices,this._seriesIndicesMap,function(t,e){var n=t.color&&!t.colorLayer;Qd(e,(function(e,i){"colorLayer"===i&&n||rd.hasClass(i)||("object"==typeof e?t[i]=t[i]?uf(t[i],e,!1):lf(e):null==t[i]&&(t[i]=e))}))}(t,this._theme.option),uf(t,od,!1),this.mergeOption(t)}function mf(t,e){t._seriesIndicesMap=of(t._seriesIndices=tf(e,(function(t){return t.componentIndex}))||[])}function vf(t,e){return e.hasOwnProperty("subType")?Jd(t,(function(t){return t.subType===e.subType})):t}cf(pf,cd);var yf=pf,_f=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];var xf=function(t){Bt.each(_f,(function(e){this[e]=Bt.bind(t[e],t)}),this)},wf={};function bf(){this._coordinateSystems=[]}bf.prototype={constructor:bf,create:function(t,e){var n=[];Bt.each(wf,(function(i,r){var a=i.create(t,e);n=n.concat(a||[])})),this._coordinateSystems=n},update:function(t,e){Bt.each(this._coordinateSystems,(function(n){n.update&&n.update(t,e)}))},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},bf.register=function(t,e){wf[t]=e},bf.get=function(t){return wf[t]};var Sf=bf,Mf=Bt.each,Tf=Bt.clone,If=Bt.map,Cf=Bt.merge,Df=/^(min|max)?(.+)$/;function kf(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function Af(t,e,n){var i,r,a=[],o=[],s=t.timeline;if(t.baseOption&&(r=t.baseOption),(s||t.options)&&(r=r||{},a=(t.options||[]).slice()),t.media){r=r||{};var l=t.media;Mf(l,(function(t){t&&t.option&&(t.query?o.push(t):i||(i=t))}))}return r||(r=t),r.timeline||(r.timeline=s),Mf([r].concat(a).concat(Bt.map(o,(function(t){return t.option}))),(function(t){Mf(e,(function(e){e(t,n)}))})),{baseOption:r,timelineOptions:a,mediaDefault:i,mediaList:o}}function Of(t,e,n){var i={width:e,height:n,aspectratio:e/n},r=!0;return Bt.each(t,(function(t,e){var n=e.match(Df);if(n&&n[1]&&n[2]){var a=n[1],o=n[2].toLowerCase();(function(t,e,n){return"min"===n?t>=e:"max"===n?t<=e:t===e})(i[o],t,a)||(r=!1)}})),r}kf.prototype={constructor:kf,setOption:function(t,e){t&&Bt.each(Ro.normalizeToArray(t.series),(function(t){t&&t.data&&Bt.isTypedArray(t.data)&&Bt.setAsPrimitive(t.data)})),t=Tf(t);var n,i,r=this._optionBackup,a=Af.call(this,t,e,!r);this._newBaseOption=a.baseOption,r?(n=r.baseOption,i=a.baseOption,Mf(i=i||{},(function(t,e){if(null!=t){var i=n[e];if(rd.hasClass(e)){t=Ro.normalizeToArray(t),i=Ro.normalizeToArray(i);var r=Ro.mappingToExists(i,t);n[e]=If(r,(function(t){return t.option&&t.exist?Cf(t.exist,t.option,!0):t.exist||t.option}))}else n[e]=Cf(i,t,!0)}})),a.timelineOptions.length&&(r.timelineOptions=a.timelineOptions),a.mediaList.length&&(r.mediaList=a.mediaList),a.mediaDefault&&(r.mediaDefault=a.mediaDefault)):this._optionBackup=a},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=If(e.timelineOptions,Tf),this._mediaList=If(e.mediaList,Tf),this._mediaDefault=Tf(e.mediaDefault),this._currentMediaIndices=[],Tf(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,n=this._timelineOptions;if(n.length){var i=t.getComponent("timeline");i&&(e=Tf(n[i.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e,n,i=this._api.getWidth(),r=this._api.getHeight(),a=this._mediaList,o=this._mediaDefault,s=[],l=[];if(!a.length&&!o)return l;for(var u=0,h=a.length;u<h;u++)Of(a[u].query,i,r)&&s.push(u);return!s.length&&o&&(s=[-1]),s.length&&(e=s,n=this._currentMediaIndices,e.join(",")!==n.join(","))&&(l=If(s,(function(t){return Tf(-1===t?o.option:a[t].option)}))),this._currentMediaIndices=s,l}};var Lf=kf,Pf=Bt.each,Rf=Bt.isObject,Ef=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Nf(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=Ef.length;n<i;n++){var r=Ef[n],a=e.normal,o=e.emphasis;a&&a[r]&&(t[r]=t[r]||{},t[r].normal?Bt.merge(t[r].normal,a[r]):t[r].normal=a[r],a[r]=null),o&&o[r]&&(t[r]=t[r]||{},t[r].emphasis?Bt.merge(t[r].emphasis,o[r]):t[r].emphasis=o[r],o[r]=null)}}function zf(t,e,n){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var i=t[e].normal,r=t[e].emphasis;i&&(n?(t[e].normal=t[e].emphasis=null,Bt.defaults(t[e],i)):t[e]=i),r&&(t.emphasis=t.emphasis||{},t.emphasis[e]=r)}}function Bf(t){zf(t,"itemStyle"),zf(t,"lineStyle"),zf(t,"areaStyle"),zf(t,"label"),zf(t,"labelLine"),zf(t,"upperLabel"),zf(t,"edgeLabel")}function Ff(t,e){var n=Rf(t)&&t[e],i=Rf(n)&&n.textStyle;if(i)for(var r=0,a=Ro.TEXT_STYLE_OPTIONS.length;r<a;r++){e=Ro.TEXT_STYLE_OPTIONS[r];i.hasOwnProperty(e)&&(n[e]=i[e])}}function Vf(t){t&&(Bf(t),Ff(t,"label"),t.emphasis&&Ff(t.emphasis,"label"))}function Hf(t){return Bt.isArray(t)?t:t?[t]:[]}function Wf(t){return(Bt.isArray(t)?t[0]:t)||{}}var Gf=function(t,e){Pf(Hf(t.series),(function(t){Rf(t)&&function(t){if(Rf(t)){Nf(t),Bf(t),Ff(t,"label"),Ff(t,"upperLabel"),Ff(t,"edgeLabel"),t.emphasis&&(Ff(t.emphasis,"label"),Ff(t.emphasis,"upperLabel"),Ff(t.emphasis,"edgeLabel")),(n=t.markPoint)&&(Nf(n),Vf(n)),(i=t.markLine)&&(Nf(i),Vf(i));var e=t.markArea;e&&Vf(e);var n,i,r=t.data;if("graph"===t.type){r=r||t.nodes;var a=t.links||t.edges;if(a&&!Bt.isTypedArray(a))for(var o=0;o<a.length;o++)Vf(a[o]);Bt.each(t.categories,(function(t){Bf(t)}))}if(r&&!Bt.isTypedArray(r))for(o=0;o<r.length;o++)Vf(r[o]);if((n=t.markPoint)&&n.data){var s=n.data;for(o=0;o<s.length;o++)Vf(s[o])}if((i=t.markLine)&&i.data){var l=i.data;for(o=0;o<l.length;o++)Bt.isArray(l[o])?(Vf(l[o][0]),Vf(l[o][1])):Vf(l[o])}"gauge"===t.type?(Ff(t,"axisLabel"),Ff(t,"title"),Ff(t,"detail")):"treemap"===t.type?(zf(t.breadcrumb,"itemStyle"),Bt.each(t.levels,(function(t){Bf(t)}))):"tree"===t.type&&Bf(t.leaves)}}(t)}));var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),Pf(n,(function(e){Pf(Hf(t[e]),(function(t){t&&(Ff(t,"axisLabel"),Ff(t.axisPointer,"label"))}))})),Pf(Hf(t.parallel),(function(t){var e=t&&t.parallelAxisDefault;Ff(e,"axisLabel"),Ff(e&&e.axisPointer,"label")})),Pf(Hf(t.calendar),(function(t){zf(t,"itemStyle"),Ff(t,"dayLabel"),Ff(t,"monthLabel"),Ff(t,"yearLabel")})),Pf(Hf(t.radar),(function(t){Ff(t,"name")})),Pf(Hf(t.geo),(function(t){Rf(t)&&(Vf(t),Pf(Hf(t.regions),(function(t){Vf(t)})))})),Pf(Hf(t.timeline),(function(t){Vf(t),zf(t,"label"),zf(t,"itemStyle"),zf(t,"controlStyle",!0);var e=t.data;Bt.isArray(e)&&Bt.each(e,(function(t){Bt.isObject(t)&&(zf(t,"label"),zf(t,"itemStyle"))}))})),Pf(Hf(t.toolbox),(function(t){zf(t,"iconStyle"),Pf(t.feature,(function(t){zf(t,"iconStyle")}))})),Ff(Wf(t.axisPointer),"label"),Ff(Wf(t.tooltip).axisPointer,"label")},Uf=Bt.each,jf=Bt.isArray,Yf=Bt.isObject,qf=Ro.normalizeToArray;function Xf(t){Uf(Zf,(function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])}))}var Zf=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],$f=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"];var Kf=function(t,e){Gf(t,e),t.series=qf(t.series),Uf(t.series,(function(t){if(Yf(t)){var e=t.type;if("line"===e)null!=t.clipOverflow&&(t.clip=t.clipOverflow);else if("pie"===e||"gauge"===e)null!=t.clockWise&&(t.clockwise=t.clockWise);else if("gauge"===e){var n=function(t,e){e=e.split(",");for(var n=t,i=0;i<e.length&&null!=(n=n&&n[e[i]]);i++);return n}(t,"pointer.color");null!=n&&function(t,e,n,i){e=e.split(",");for(var r,a=t,o=0;o<e.length-1;o++)null==a[r=e[o]]&&(a[r]={}),a=a[r];(i||null==a[e[o]])&&(a[e[o]]=n)}(t,"itemStyle.color",n)}Xf(t)}})),t.dataRange&&(t.visualMap=t.dataRange),Uf($f,(function(e){var n=t[e];n&&(jf(n)||(n=[n]),Uf(n,(function(t){Xf(t)})))}))},Qf=Bt.createHashMap,Jf=Bt.each;function tp(t){Jf(t,(function(e,n){var i=[],r=[NaN,NaN],a=[e.stackResultDimension,e.stackedOverDimension],o=e.data,s=e.isStackedByIndex,l=o.map(a,(function(a,l,u){var h,c,d=o.get(e.stackedDimension,u);if(isNaN(d))return r;s?c=o.getRawIndex(u):h=o.get(e.stackedByDimension,u);for(var f=NaN,p=n-1;p>=0;p--){var g=t[p];if(s||(c=g.data.rawIndexOf(g.stackedByDimension,h)),c>=0){var m=g.data.getByRawIndex(g.stackResultDimension,c);if(d>=0&&m>0||d<=0&&m<0){d+=m,f=m;break}}}return i[0]=d,i[1]=f,i}));o.hostModel.setData(l),e.data=l}))}var ep=function(t){var e=Qf();t.eachSeries((function(t){var n=t.get("stack");if(n){var i=e.get(n)||e.set(n,[]),r=t.getData(),a={stackResultDimension:r.getCalculationInfo("stackResultDimension"),stackedOverDimension:r.getCalculationInfo("stackedOverDimension"),stackedDimension:r.getCalculationInfo("stackedDimension"),stackedByDimension:r.getCalculationInfo("stackedByDimension"),isStackedByIndex:r.getCalculationInfo("isStackedByIndex"),data:r,seriesModel:t};if(!a.stackedDimension||!a.isStackedByIndex&&!a.stackedByDimension)return;i.length&&r.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(a)}})),e.each(tp)},np=Bt.extend,ip=Bt.each,rp=Bt.isObject,ap=Ro.getDataItemValue,op=Ro.isDataItemOption,sp=Cc.parseDate,lp=dd.SOURCE_FORMAT_TYPED_ARRAY,up=dd.SOURCE_FORMAT_ARRAY_ROWS,hp=dd.SOURCE_FORMAT_ORIGINAL,cp=dd.SOURCE_FORMAT_OBJECT_ROWS;function dp(t,e){bd.isInstance(t)||(t=bd.seriesDataToSource(t)),this._source=t;var n=this._data=t.data,i=t.sourceFormat;i===lp&&(this._offset=0,this._dimSize=e,this._data=n);var r=pp[i===up?i+"_"+t.seriesLayoutBy:i];np(this,r)}var fp=dp.prototype;fp.pure=!1,fp.persistent=!0,fp.getSource=function(){return this._source};var pp={arrayRows_column:{pure:!0,count:function(){return Math.max(0,this._data.length-this._source.startIndex)},getItem:function(t){return this._data[t+this._source.startIndex]},appendData:vp},arrayRows_row:{pure:!0,count:function(){var t=this._data[0];return t?Math.max(0,t.length-this._source.startIndex):0},getItem:function(t){t+=this._source.startIndex;for(var e=[],n=this._data,i=0;i<n.length;i++){var r=n[i];e.push(r?r[t]:null)}return e},appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},objectRows:{pure:!0,count:gp,getItem:mp,appendData:vp},keyedColumns:{pure:!0,count:function(){var t=this._source.dimensionsDefine[0].name,e=this._data[t];return e?e.length:0},getItem:function(t){for(var e=[],n=this._source.dimensionsDefine,i=0;i<n.length;i++){var r=this._data[n[i].name];e.push(r?r[t]:null)}return e},appendData:function(t){var e=this._data;ip(t,(function(t,n){for(var i=e[n]||(e[n]=[]),r=0;r<(t||[]).length;r++)i.push(t[r])}))}},original:{count:gp,getItem:mp,appendData:vp},typedArray:{persistent:!1,pure:!0,count:function(){return this._data?this._data.length/this._dimSize:0},getItem:function(t,e){t-=this._offset,e=e||[];for(var n=this._dimSize*t,i=0;i<this._dimSize;i++)e[i]=this._data[n+i];return e},appendData:function(t){this._data=t},clean:function(){this._offset+=this.count(),this._data=null}}};function gp(){return this._data.length}function mp(t){return this._data[t]}function vp(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}var yp={arrayRows:_p,objectRows:function(t,e,n,i){return null!=n?t[i]:t},keyedColumns:_p,original:function(t,e,n,i){var r=ap(t);return null!=n&&r instanceof Array?r[n]:r},typedArray:_p};function _p(t,e,n,i){return null!=n?t[n]:t}function xp(t,e,n,i){return wp(t[i],this._dimensionInfos[e])}function wp(t,e){var n=e&&e.type;if("ordinal"===n){var i=e&&e.ordinalMeta;return i?i.parseAndCollect(t):t}return"time"===n&&"number"!=typeof t&&null!=t&&"-"!==t&&(t=+sp(t)),null==t||""===t?NaN:+t}var bp=function(t,e,n){if(t){var i=t.getRawDataItem(e);if(null!=i){var r,a,o=t.getProvider().getSource().sourceFormat,s=t.getDimensionInfo(n);return s&&(r=s.name,a=s.index),yp[o](i,e,a,r)}}},Sp=function(t,e,n){if(t){var i=t.getProvider().getSource().sourceFormat;if(i===hp||i===cp){var r=t.getRawDataItem(e);return i!==hp||rp(r)||(r=null),r?r[n]:void 0}}},Mp={DefaultDataProvider:dp,defaultDimValueGetters:{arrayRows:xp,objectRows:function(t,e,n,i){return wp(t[e],this._dimensionInfos[e])},keyedColumns:xp,original:function(t,e,n,i){var r=t&&(null==t.value?t:t.value);return!this._rawData.pure&&op(t)&&(this.hasItemOption=!0),wp(r instanceof Array?r[i]:r,this._dimensionInfos[e])},typedArray:function(t,e,n,i){return t[i]}},retrieveRawValue:bp,retrieveRawAttr:Sp},Tp=Mp.retrieveRawValue,Ip=Vc.getTooltipMarker,Cp=Vc.formatTpl,Dp=Ro.getTooltipRenderMode,kp=/\{@(.+?)\}/g,Ap={getDataParams:function(t,e){var n=this.getData(e),i=this.getRawValue(t,e),r=n.getRawIndex(t),a=n.getName(t),o=n.getRawDataItem(t),s=n.getItemVisual(t,"color"),l=n.getItemVisual(t,"borderColor"),u=this.ecModel.getComponent("tooltip"),h=u&&u.get("renderMode"),c=Dp(h),d=this.mainType,f="series"===d,p=n.userOutput;return{componentType:d,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:f?this.subType:null,seriesIndex:this.seriesIndex,seriesId:f?this.id:null,seriesName:f?this.name:null,name:a,dataIndex:r,data:o,dataType:e,value:i,color:s,borderColor:l,dimensionNames:p?p.dimensionNames:null,encode:p?p.encode:null,marker:Ip({color:s,renderMode:c}),$vars:["seriesName","name","value"]}},getFormattedLabel:function(t,e,n,i,r){e=e||"normal";var a=this.getData(n),o=a.getItemModel(t),s=this.getDataParams(t,n);null!=i&&s.value instanceof Array&&(s.value=s.value[i]);var l=o.get("normal"===e?[r||"label","formatter"]:[e,r||"label","formatter"]);return"function"==typeof l?(s.status=e,s.dimensionIndex=i,l(s)):"string"==typeof l?Cp(l,s).replace(kp,(function(e,n){var i=n.length;return"["===n.charAt(0)&&"]"===n.charAt(i-1)&&(n=+n.slice(1,i-1)),Tp(a,t,n)})):void 0},getRawValue:function(t,e){return Tp(this.getData(e),t)},formatTooltip:function(){}},Op=Ap,Lp=Bt.isArray;function Pp(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0,this.context}var Rp=Pp.prototype;Rp.perform=function(t){var e,n=this._upstream,i=t&&t.skip;if(this._dirty&&n){var r=this.context;r.data=r.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!i&&(e=this._plan(this.context));var a,o=h(this._modBy),s=this._modDataCount||0,l=h(t&&t.modBy),u=t&&t.modDataCount||0;function h(t){return!(t>=1)&&(t=1),t}o===l&&s===u||(e="reset"),(this._dirty||"reset"===e)&&(this._dirty=!1,a=function(t,e){var n,i;t._dueIndex=t._outputDueEnd=t._dueEnd=0,t._settedOutputEnd=null,!e&&t._reset&&((n=t._reset(t.context))&&n.progress&&(i=n.forceFirstProgress,n=n.progress),Lp(n)&&!n.length&&(n=null));t._progress=n,t._modBy=t._modDataCount=null;var r=t._downstream;return r&&r.dirty(),i}(this,i)),this._modBy=l,this._modDataCount=u;var c=t&&t.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,f=Math.min(null!=c?this._dueIndex+c:1/0,this._dueEnd);if(!i&&(a||d<f)){var p=this._progress;if(Lp(p))for(var g=0;g<p.length;g++)Np(this,p[g],d,f,l,u);else Np(this,p,d,f,l,u)}this._dueIndex=f;var m=null!=this._settedOutputEnd?this._settedOutputEnd:f;this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()};var Ep=function(){var t,e,n,i,r,a={reset:function(l,u,h,c){e=l,t=u,n=h,i=c,r=Math.ceil(i/n),a.next=n>1&&i>0?s:o}};return a;function o(){return e<t?e++:null}function s(){var a=e%r*n+Math.ceil(e/r),o=e>=t?null:a<i?a:e;return e++,o}}();function Np(t,e,n,i,r,a){Ep.reset(n,i,r,a),t._callingProgress=e,t._callingProgress({start:n,end:i,count:i-n,next:Ep.next},t.context)}Rp.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},Rp.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},Rp.pipe=function(t){(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},Rp.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},Rp.getUpstream=function(){return this._upstream},Rp.getDownstream=function(){return this._downstream},Rp.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t};var zp={createTask:function(t){return new Pp(t)}},Bp=Vc.formatTime,Fp=Vc.encodeHTML,Vp=Vc.addCommas,Hp=Vc.getTooltipMarker,Wp=Qc.getLayoutParams,Gp=Qc.mergeLayoutParam,Up=zp.createTask,jp=Kd.prepareSource,Yp=Kd.getSource,qp=Mp.retrieveRawValue,Xp=Ro.makeInner(),Zp=rd.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendVisualProvider:null,visualColorAccessPath:"itemStyle.color",visualBorderColorAccessPath:"itemStyle.borderColor",layoutMode:null,init:function(t,e,n,i){this.seriesIndex=this.componentIndex,this.dataTask=Up({count:Kp,reset:Qp}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),jp(this);var r=this.getInitialData(t,n);tg(r,this),this.dataTask.context.data=r,Xp(this).dataBeforeProcessed=r,$p(this)},mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?Wp(t):{},r=this.subType;rd.hasClass(r)&&(r+="Series"),Bt.merge(t,e.getTheme().get(this.subType)),Bt.merge(t,this.getDefaultOption()),Ro.defaultEmphasis(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&Gp(t,i,n)},mergeOption:function(t,e){t=Bt.merge(this.option,t,!0),this.fillDataTextStyle(t.data);var n=this.layoutMode;n&&Gp(this.option,t,n),jp(this);var i=this.getInitialData(t,e);tg(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,Xp(this).dataBeforeProcessed=i,$p(this)},fillDataTextStyle:function(t){if(t&&!Bt.isTypedArray(t))for(var e=["show"],n=0;n<t.length;n++)t[n]&&t[n].label&&Ro.defaultEmphasis(t[n],"label",e)},getInitialData:function(){},appendData:function(t){this.getRawData().appendData(t.data)},getData:function(t){var e=ng(this);if(e){var n=e.context.data;return null==t?n:n.getLinkedData(t)}return Xp(this).data},setData:function(t){var e=ng(this);if(e){var n=e.context;n.data!==t&&e.modifyOutputEnd&&e.setOutputEnd(t.count()),n.outputData=t,e!==this.dataTask&&(n.data=t)}Xp(this).data=t},getSource:function(){return Yp(this)},getRawData:function(){return Xp(this).dataBeforeProcessed},getBaseAxis:function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},formatTooltip:function(t,e,n,i){var r=this,a="html"===(i=i||"html")?"<br/>":"\n",o="richText"===i,s={},l=0;function u(t){return{renderMode:i,content:Fp(Vp(t)),style:s}}var h=this.getData(),c=h.mapDimension("defaultedTooltip",!0),d=c.length,f=this.getRawValue(t),p=Bt.isArray(f),g=h.getItemVisual(t,"color");Bt.isObject(g)&&g.colorStops&&(g=(g.colorStops[0]||{}).color),g=g||"transparent";var m=d>1||p&&!d?function(n){var a=Bt.reduce(n,(function(t,e,n){var i=h.getDimensionInfo(n);return t|(i&&!1!==i.tooltip&&null!=i.displayName)}),0),u=[];function d(t,n){var c=h.getDimensionInfo(n);if(c&&!1!==c.otherDims.tooltip){var d=c.type,f="sub"+r.seriesIndex+"at"+l,p=Hp({color:g,type:"subItem",renderMode:i,markerId:f}),m="string"==typeof p?p:p.content,v=(a?m+Fp(c.displayName||"-")+": ":"")+Fp("ordinal"===d?t+"":"time"===d?e?"":Bp("yyyy/MM/dd hh:mm:ss",t):Vp(t));v&&u.push(v),o&&(s[f]=g,++l)}}c.length?Bt.each(c,(function(e){d(qp(h,t,e),e)})):Bt.each(n,d);var f=a?o?"\n":"<br/>":"",p=f+u.join(f||", ");return{renderMode:i,content:p,style:s}}(f):u(d?qp(h,t,c[0]):p?f[0]:f),v=m.content,y=r.seriesIndex+"at"+l,_=Hp({color:g,type:"item",renderMode:i,markerId:y});s[y]=g,++l;var x=h.getName(t),w=this.name;Ro.isNameSpecified(this)||(w=""),w=w?Fp(w)+(e?": ":a):"";var b="string"==typeof _?_:_.content;return{html:e?b+w+v:w+b+(x?Fp(x)+": "+v:v),markers:s}},isAnimationEnabled:function(){if(J.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,n){var i=this.ecModel,r=cd.getColorFromPalette.call(this,t,e,n);return r||(r=i.getColorFromPalette(t,e,n)),r},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});function $p(t){var e=t.name;Ro.isNameSpecified(t)||(t.name=function(t){var e=t.getRawData(),n=e.mapDimension("seriesName",!0),i=[];return Bt.each(n,(function(t){var n=e.getDimensionInfo(t);n.displayName&&i.push(n.displayName)})),i.join(" ")}(t)||e)}function Kp(t){return t.model.getRawData().count()}function Qp(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),Jp}function Jp(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function tg(t,e){Bt.each(t.CHANGABLE_METHODS,(function(n){t.wrapMethod(n,Bt.curry(eg,e))}))}function eg(t){var e=ng(t);e&&e.setOutputEnd(this.count())}function ng(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i=n.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(t.uid))}return i}}Bt.mixin(Zp,Op),Bt.mixin(Zp,cd);var ig=Zp,rg=function(){this.group=new Li,this.uid=yc.getUID("viewComponent")},ag=rg.prototype={constructor:rg,init:function(t,e){},render:function(t,e,n,i){},dispose:function(){},filterForExposedEvent:null};ag.updateView=ag.updateLayout=ag.updateVisual=function(t,e,n,i){},Go.enableClassExtend(rg),Go.enableClassManagement(rg,{registerWhenExtend:!0});var og=rg,sg=Ro.makeInner;var lg=function(){var t=sg();return function(e){var n=t(e),i=e.pipelineContext,r=n.large,a=n.progressiveRender,o=n.large=i&&i.large,s=n.progressiveRender=i&&i.progressiveRender;return!!(r^o||a^s)&&"reset"}},ug=Bt.each,hg=zp.createTask,cg=Ro.makeInner(),dg=lg();function fg(){this.group=new Li,this.uid=yc.getUID("viewChart"),this.renderTask=hg({plan:vg,reset:yg}),this.renderTask.context={view:this}}fg.prototype={type:"chart",init:function(t,e){},render:function(t,e,n,i){},highlight:function(t,e,n,i){mg(t.getData(),i,"emphasis")},downplay:function(t,e,n,i){mg(t.getData(),i,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var pg=fg.prototype;function gg(t,e,n){if(t&&(t.trigger(e,n),t.isGroup&&!tc.isHighDownDispatcher(t)))for(var i=0,r=t.childCount();i<r;i++)gg(t.childAt(i),e,n)}function mg(t,e,n){var i=Ro.queryDataIndex(t,e),r=e&&null!=e.highlightKey?tc.getHighlightDigit(e.highlightKey):null;null!=i?ug(Ro.normalizeToArray(i),(function(e){gg(t.getItemGraphicEl(e),n,r)})):t.eachItemGraphicEl((function(t){gg(t,n,r)}))}function vg(t){return dg(t.model)}function yg(t){var e=t.model,n=t.ecModel,i=t.api,r=t.payload,a=e.pipelineContext.progressiveRender,o=t.view,s=r&&cg(r).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return"render"!==l&&o[l](e,n,i,r),_g[l]}pg.updateView=pg.updateLayout=pg.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},Go.enableClassExtend(fg,["dispose"]),Go.enableClassManagement(fg,{registerWhenExtend:!0}),fg.markUpdateMethod=function(t,e){cg(t).updateMethod=e};var _g={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)}}},xg=fg,wg="\0__throttleOriginMethod",bg="\0__throttleRate",Sg="\0__throttleType";function Mg(t,e,n){var i,r,a,o,s,l=0,u=0,h=null;function c(){u=(new Date).getTime(),h=null,t.apply(a,o||[])}e=e||0;var d=function(){i=(new Date).getTime(),a=this,o=arguments;var t=s||e,d=s||n;s=null,r=i-(d?l:u)-t,clearTimeout(h),d?h=setTimeout(c,t):r>=0?c():h=setTimeout(c,-r),l=i};return d.clear=function(){h&&(clearTimeout(h),h=null)},d.debounceNextCall=function(t){s=t},d}var Tg=function(t,e,n,i){var r=t[e];if(r){var a=r[wg]||r,o=r[Sg];if(r[bg]!==n||o!==i){if(null==n||!i)return t[e]=a;(r=t[e]=Mg(a,n,"debounce"===i))[wg]=a,r[Sg]=i,r[bg]=n}return r}},Ig=function(t,e){var n=t[e];n&&n[wg]&&(t[e]=n[wg])},Cg={throttle:Mg,createOrUpdate:Tg,clear:Ig},Dg=Bt.isFunction,kg={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),i=(t.visualColorAccessPath||"itemStyle.color").split("."),r=t.get(i),a=!Dg(r)||r instanceof Eu?null:r;r&&!a||(r=t.getColorFromPalette(t.name,null,e.getSeriesCount())),n.setVisual("color",r);var o=(t.visualBorderColorAccessPath||"itemStyle.borderColor").split("."),s=t.get(o);if(n.setVisual("borderColor",s),!e.isSeriesFiltered(t)){a&&n.each((function(e){n.setItemVisual(e,"color",a(t.getDataParams(e)))}));return{dataEach:n.hasItemOption?function(t,e){var n=t.getItemModel(e),r=n.get(i,!0),a=n.get(o,!0);null!=r&&t.setItemVisual(e,"color",r),null!=a&&t.setItemVisual(e,"borderColor",a)}:null}}}},Ag=kg,Og={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:""}}}},Lg=Mp.retrieveRawValue;var Pg=function(t,e){var n=e.getModel("aria");if(n.get("show"))if(n.get("description"))t.setAttribute("aria-label",n.get("description"));else{var i=0;e.eachSeries((function(t,e){++i}),this);var r,a=n.get("data.maxCount")||10,o=n.get("series.maxCount")||10,s=Math.min(i,o);if(!(i<1)){var l=function(){var t=e.getModel("title").option;t&&t.length&&(t=t[0]);return t&&t.text}();r=l?h(c("general.withTitle"),{title:l}):c("general.withoutTitle");var u=[];r+=h(c(i>1?"series.multiple.prefix":"series.single.prefix"),{seriesCount:i}),e.eachSeries((function(t,e){if(e<s){var n,r=t.get("name"),o="series."+(i>1?"multiple":"single")+".";n=h(n=c(r?o+"withName":o+"withoutName"),{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:(m=t.subType,Og.series.typeNames[m]||"自定义图")});var l=t.getData();window.data=l,l.count()>a?n+=h(c("data.partialData"),{displayCnt:a}):n+=c("data.allData");for(var d=[],f=0;f<l.count();f++)if(f<a){var p=l.getName(f),g=Lg(l,f);d.push(h(c(p?"data.withName":"data.withoutName"),{name:p,value:g}))}n+=d.join(c("data.separator.middle"))+c("data.separator.end"),u.push(n)}var m})),r+=u.join(c("series.multiple.separator.middle"))+c("series.multiple.separator.end"),t.setAttribute("aria-label",r)}}function h(t,e){if("string"!=typeof t)return t;var n=t;return Bt.each(e,(function(t,e){n=n.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)})),n}function c(t){var e=n.get(t);if(null==e){for(var i=t.split("."),r=Og.aria,a=0;a<i.length;++a)r=r[i[a]];return r}return e}},Rg=Math.PI;var Eg=function(t,e){e=e||{},Bt.defaults(e,{text:"loading",textColor:"#000",fontSize:"12px",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#c23531",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new tc.Group,i=new tc.Rect({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});n.add(i);var r=e.fontSize+" sans-serif",a=new tc.Rect({style:{fill:"none",text:e.text,font:r,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});if(n.add(a),e.showSpinner){var o=new tc.Arc({shape:{startAngle:-Rg/2,endAngle:-Rg/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001});o.animateShape(!0).when(1e3,{endAngle:3*Rg/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:3*Rg/2}).delay(300).start("circularInOut"),n.add(o)}return n.resize=function(){var n=Gr.getWidth(e.text,r),s=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-2*s-(e.showSpinner&&n?10:0)-n)/2-(e.showSpinner?0:n/2),u=t.getHeight()/2;e.showSpinner&&o.setShape({cx:l,cy:u}),a.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},n.resize(),n},Ng=Bt.each,zg=Bt.map,Bg=Bt.isFunction,Fg=Bt.createHashMap,Vg=Bt.noop,Hg=zp.createTask,Wg=yc.getUID,Gg=Ro.normalizeToArray;function Ug(t,e,n,i){this.ecInstance=t,this.api=e,this.unfinished;n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice();this._allHandlers=n.concat(i),this._stageTaskMap=Fg()}var jg=Ug.prototype;function Yg(t,e,n,i,r){var a;function o(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}r=r||{},Ng(e,(function(e,s){if(!r.visualType||r.visualType===e.visualType){var l=t._stageTaskMap.get(e.uid),u=l.seriesTaskMap,h=l.overallTask;if(h){var c,d=h.agentStubMap;d.each((function(t){o(r,t)&&(t.dirty(),c=!0)})),c&&h.dirty(),qg(h,i);var f=t.getPerformArgs(h,r.block);d.each((function(t){t.perform(f)})),a|=h.perform(f)}else u&&u.each((function(s,l){o(r,s)&&s.dirty();var u=t.getPerformArgs(s,r.block);u.skip=!e.performRawSeries&&n.isSeriesFiltered(s.context.model),qg(s,i),a|=s.perform(u)}))}})),t.unfinished|=a}jg.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each((function(t){var e=t.overallTask;e&&e.dirty()}))},jg.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,r=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex?n.step:null,a=i&&i.modDataCount;return{step:r,modBy:null!=a?Math.ceil(a/r):null,modDataCount:a}}},jg.getPipeline=function(t){return this._pipelineMap.get(t)},jg.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),r=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,a=t.get("large")&&i>=t.get("largeThreshold"),o="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:r,modDataCount:o,large:a}},jg.restorePipelines=function(t){var e=this,n=e._pipelineMap=Fg();t.eachSeries((function(t){var i=t.getProgressive(),r=t.uid;n.set(r,{id:r,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),im(e,t,t.dataTask)}))},jg.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.ecInstance.getModel(),n=this.api;Ng(this._allHandlers,(function(i){var r=t.get(i.uid)||t.set(i.uid,[]);i.reset&&function(t,e,n,i,r){var a=n.seriesTaskMap||(n.seriesTaskMap=Fg()),o=e.seriesType,s=e.getTargetSeries;e.createOnAllSeries?i.eachRawSeries(l):o?i.eachRawSeriesByType(o,l):s&&s(i,r).each(l);function l(n){var o=n.uid,s=a.get(o)||a.set(o,Hg({plan:Qg,reset:Jg,count:nm}));s.context={model:n,ecModel:i,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:t},im(t,n,s)}var u=t._pipelineMap;a.each((function(t,e){u.get(e)||(t.dispose(),a.removeKey(e))}))}(this,i,r,e,n),i.overallReset&&function(t,e,n,i,r){var a=n.overallTask=n.overallTask||Hg({reset:Xg});a.context={ecModel:i,api:r,overallReset:e.overallReset,scheduler:t};var o=a.agentStubMap=a.agentStubMap||Fg(),s=e.seriesType,l=e.getTargetSeries,u=!0,h=e.modifyOutputEnd;s?i.eachRawSeriesByType(s,c):l?l(i,r).each(c):(u=!1,Ng(i.getSeries(),c));function c(e){var n=e.uid,i=o.get(n);i||(i=o.set(n,Hg({reset:Zg,onDirty:Kg})),a.dirty()),i.context={model:e,overallProgress:u,modifyOutputEnd:h},i.agent=a,i.__block=u,im(t,e,i)}var d=t._pipelineMap;o.each((function(t,e){d.get(e)||(t.dispose(),a.dirty(),o.removeKey(e))}))}(this,i,r,e,n)}),this)},jg.prepareView=function(t,e,n,i){var r=t.renderTask,a=r.context;a.model=e,a.ecModel=n,a.api=i,r.__block=!t.incrementalPrepareRender,im(this,e,r)},jg.performDataProcessorTasks=function(t,e){Yg(this,this._dataProcessorHandlers,t,e,{block:!0})},jg.performVisualTasks=function(t,e,n){Yg(this,this._visualHandlers,t,e,n)},jg.performSeriesTasks=function(t){var e;t.eachSeries((function(t){e|=t.dataTask.perform()})),this.unfinished|=e},jg.plan=function(){this._pipelineMap.each((function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)}))};var qg=jg.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)};function Xg(t){t.overallReset(t.ecModel,t.api,t.payload)}function Zg(t,e){return t.overallProgress&&$g}function $g(){this.agent.dirty(),this.getDownstream().dirty()}function Kg(){this.agent&&this.agent.dirty()}function Qg(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function Jg(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=Gg(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?zg(e,(function(t,e){return em(e)})):tm}var tm=em(0);function em(t){return function(e,n){var i=n.data,r=n.resetDefines[t];if(r&&r.dataEach)for(var a=e.start;a<e.end;a++)r.dataEach(i,a);else r&&r.progress&&r.progress(e,i)}}function nm(t){return t.data.count()}function im(t,e,n){var i=e.uid,r=t._pipelineMap.get(i);!r.head&&(r.head=n),r.tail&&r.tail.pipe(n),r.tail=n,n.__idxInPipeline=r.count++,n.__pipeline=r}function rm(t){am=null;try{t(om,sm)}catch(t){}return am}Ug.wrapStageHandler=function(t,e){return Bg(t)&&(t={overallReset:t,seriesType:rm(t)}),t.uid=Wg("stageHandler"),e&&(t.visualType=e),t};var am,om={},sm={};function lm(t,e){for(var n in e.prototype)t[n]=Vg}lm(om,yf),lm(sm,xf),om.eachSeriesByType=om.eachRawSeriesByType=function(t){am=t},om.eachComponent=function(t){"series"===t.mainType&&t.subType&&(am=t.subType)};var um=Ug,hm=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],cm={color:hm,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],hm]},dm="#eee",fm=function(){return{axisLine:{lineStyle:{color:dm}},axisTick:{lineStyle:{color:dm}},axisLabel:{textStyle:{color:dm}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:dm}}}},pm=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],gm={color:pm,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:dm},crossStyle:{color:dm},label:{color:"#000"}}},legend:{textStyle:{color:dm}},textStyle:{color:dm},title:{textStyle:{color:dm}},toolbox:{iconStyle:{normal:{borderColor:dm}}},dataZoom:{textStyle:{color:dm}},visualMap:{textStyle:{color:dm}},timeline:{lineStyle:{color:dm},itemStyle:{normal:{color:pm[1]}},label:{normal:{textStyle:{color:dm}}},controlStyle:{normal:{color:dm,borderColor:dm}}},timeAxis:fm(),logAxis:fm(),valueAxis:fm(),categoryAxis:fm(),line:{symbol:"circle"},graph:{color:pm},gauge:{title:{textStyle:{color:dm}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};gm.categoryAxis.splitLine.show=!1;var mm=gm,vm=Kd.detectSourceFormat,ym=dd.SERIES_LAYOUT_BY_COLUMN;rd.extend({type:"dataset",defaultOption:{seriesLayoutBy:ym,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){vm(this)}}),og.extend({type:"dataset"});var _m=wl.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(t,e){var n=.5522848,i=e.cx,r=e.cy,a=e.rx,o=e.ry,s=a*n,l=o*n;t.moveTo(i-a,r),t.bezierCurveTo(i-a,r-l,i-s,r-o,i,r-o),t.bezierCurveTo(i+s,r-o,i+a,r-l,i+a,r),t.bezierCurveTo(i+a,r+l,i+s,r+o,i,r+o),t.bezierCurveTo(i-s,r+o,i-a,r+l,i-a,r),t.closePath()}}),xm=Vl.createFromString,wm=Bt.isString,bm=Bt.extend,Sm=Bt.defaults,Mm=Bt.trim,Tm=Bt.each,Im=/[\s,]+/;function Cm(t){wm(t)&&(t=(new DOMParser).parseFromString(t,"text/xml"));for(9===t.nodeType&&(t=t.firstChild);"svg"!==t.nodeName.toLowerCase()||1!==t.nodeType;)t=t.nextSibling;return t}function Dm(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}Dm.prototype.parse=function(t,e){e=e||{};var n=Cm(t);if(!n)throw new Error("Illegal svg");var i=new Li;this._root=i;var r=n.getAttribute("viewBox")||"",a=parseFloat(n.getAttribute("width")||e.width),o=parseFloat(n.getAttribute("height")||e.height);isNaN(a)&&(a=null),isNaN(o)&&(o=null),Rm(n,i,null,!0);for(var s,l,u=n.firstChild;u;)this._parseNode(u,i),u=u.nextSibling;if(r){var h=Mm(r).split(Im);h.length>=4&&(s={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(s&&null!=a&&null!=o&&(l=Fm(s,a,o),!e.ignoreViewBox)){var c=i;(i=new Li).add(c),c.scale=l.scale.slice(),c.position=l.position.slice()}return e.ignoreRootClip||null==a||null==o||i.setClipPath(new yu({shape:{x:0,y:0,width:a,height:o}})),{root:i,width:a,height:o,viewBoxRect:s,viewBoxTransform:l}},Dm.prototype._parseNode=function(t,e){var n,i,r=t.nodeName.toLowerCase();if("defs"===r?this._isDefine=!0:"text"===r&&(this._isText=!0),this._isDefine){if(i=Am[r]){var a=i.call(this,t),o=t.getAttribute("id");o&&(this._defs[o]=a)}}else(i=km[r])&&(n=i.call(this,t,e),e.add(n));for(var s=t.firstChild;s;)1===s.nodeType&&this._parseNode(s,n),3===s.nodeType&&this._isText&&this._parseText(s,n),s=s.nextSibling;"defs"===r?this._isDefine=!1:"text"===r&&(this._isText=!1)},Dm.prototype._parseText=function(t,e){if(1===t.nodeType){var n=t.getAttribute("dx")||0,i=t.getAttribute("dy")||0;this._textX+=parseFloat(n),this._textY+=parseFloat(i)}var r=new Gl({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});Om(e,r),Rm(t,r,this._defs);var a=r.style.fontSize;a&&a<9&&(r.style.fontSize=9,r.scale=r.scale||[1,1],r.scale[0]*=a/9,r.scale[1]*=a/9);var o=r.getBoundingRect();return this._textX+=o.width,e.add(r),r};var km={g:function(t,e){var n=new Li;return Om(e,n),Rm(t,n,this._defs),n},rect:function(t,e){var n=new yu;return Om(e,n),Rm(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 Ul;return Om(e,n),Rm(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 wu;return Om(e,n),Rm(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 _m;return Om(e,n),Rm(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&&(n=Lm(n));var i=new uu({shape:{points:n||[]}});return Om(e,i),Rm(t,i,this._defs),i},polyline:function(t,e){var n=new wl;Om(e,n),Rm(t,n,this._defs);var i=t.getAttribute("points");return i&&(i=Lm(i)),new hu({shape:{points:i||[]}})},image:function(t,e){var n=new Da;return Om(e,n),Rm(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,r=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0;this._textX=parseFloat(n)+parseFloat(r),this._textY=parseFloat(i)+parseFloat(a);var o=new Li;return Om(e,o),Rm(t,o,this._defs),o},tspan:function(t,e){var n=t.getAttribute("x"),i=t.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i));var r=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0,o=new Li;return Om(e,o),Rm(t,o,this._defs),this._textX+=r,this._textY+=a,o},path:function(t,e){var n=t.getAttribute("d")||"",i=xm(n);return Om(e,i),Rm(t,i,this._defs),i}},Am={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||0,10),n=parseInt(t.getAttribute("y1")||0,10),i=parseInt(t.getAttribute("x2")||10,10),r=parseInt(t.getAttribute("y2")||0,10),a=new zu(e,n,i,r);return function(t,e){var n=t.firstChild;for(;n;){if(1===n.nodeType){var i=n.getAttribute("offset");i=i.indexOf("%")>0?parseInt(i,10)/100:i?parseFloat(i):0;var r=n.getAttribute("stop-color")||"#000000";e.addColorStop(i,r)}n=n.nextSibling}}(t,a),a},radialgradient:function(t){}};function Om(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),Sm(e.__inheritedStyle,t.__inheritedStyle))}function Lm(t){for(var e=Mm(t).split(Im),n=[],i=0;i<e.length;i+=2){var r=parseFloat(e[i]),a=parseFloat(e[i+1]);n.push([r,a])}return n}var Pm={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 Rm(t,e,n,i){var r=e.__inheritedStyle||{},a="text"===e.type;if(1===t.nodeType&&(function(t,e){var n=t.getAttribute("transform");if(n){n=n.replace(/,/g," ");var i=null,r=[];n.replace(zm,(function(t,e,n){r.push(e,n)}));for(var a=r.length-1;a>0;a-=2){var o=r[a],s=r[a-1];switch(i=i||nn.create(),s){case"translate":o=Mm(o).split(Im),nn.translate(i,i,[parseFloat(o[0]),parseFloat(o[1]||0)]);break;case"scale":o=Mm(o).split(Im),nn.scale(i,i,[parseFloat(o[0]),parseFloat(o[1]||o[0])]);break;case"rotate":o=Mm(o).split(Im),nn.rotate(i,i,parseFloat(o[0]));break;case"skew":o=Mm(o).split(Im),console.warn("Skew transform is not supported yet");break;case"matrix":o=Mm(o).split(Im);i[0]=parseFloat(o[0]),i[1]=parseFloat(o[1]),i[2]=parseFloat(o[2]),i[3]=parseFloat(o[3]),i[4]=parseFloat(o[4]),i[5]=parseFloat(o[5])}}e.setLocalTransform(i)}}(t,e),bm(r,function(t){var e=t.getAttribute("style"),n={};if(!e)return n;var i,r={};Bm.lastIndex=0;for(;null!=(i=Bm.exec(e));)r[i[1]]=i[2];for(var a in Pm)Pm.hasOwnProperty(a)&&null!=r[a]&&(n[Pm[a]]=r[a]);return n}(t)),!i))for(var o in Pm)if(Pm.hasOwnProperty(o)){var s=t.getAttribute(o);null!=s&&(r[Pm[o]]=s)}var l=a?"textFill":"fill",u=a?"textStroke":"stroke";e.style=e.style||new er;var h=e.style;null!=r.fill&&h.set(l,Nm(r.fill,n)),null!=r.stroke&&h.set(u,Nm(r.stroke,n)),Tm(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],(function(t){var e="lineWidth"===t&&a?"textStrokeWidth":t;null!=r[t]&&h.set(e,parseFloat(r[t]))})),r.textBaseline&&"auto"!==r.textBaseline||(r.textBaseline="alphabetic"),"alphabetic"===r.textBaseline&&(r.textBaseline="bottom"),"start"===r.textAlign&&(r.textAlign="left"),"end"===r.textAlign&&(r.textAlign="right"),Tm(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],(function(t){null!=r[t]&&h.set(t,r[t])})),r.lineDash&&(e.style.lineDash=Mm(r.lineDash).split(Im)),h[u]&&"none"!==h[u]&&(e[u]=!0),e.__inheritedStyle=r}var Em=/url\(\s*#(.*?)\)/;function Nm(t,e){var n=e&&t&&t.match(Em);return n?e[Mm(n[1])]:t}var zm=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;var Bm=/([^\s:;]+)\s*:\s*([^:;]+)/g;function Fm(t,e,n){var i=e/t.width,r=n/t.height,a=Math.min(i,r);return{scale:[a,a],position:[-(t.x+t.width/2)*a+e/2,-(t.y+t.height/2)*a+n/2]}}var Vm={parseXML:Cm,makeViewBoxTransform:Fm,parseSVG:function(t,e){return(new Dm).parse(t,e)}},Hm=Bt.createHashMap,Wm=Bt.isString,Gm=Bt.isArray,Um=Bt.each,jm=Vm.parseXML,Ym=Hm(),qm={registerMap:function(t,e,n){var i;return Gm(e)?i=e:e.svg?i=[{type:"svg",source:e.svg,specialAreas:e.specialAreas}]:(e.geoJson&&!e.features&&(n=e.specialAreas,e=e.geoJson),i=[{type:"geoJSON",source:e,specialAreas:n}]),Um(i,(function(t){var e=t.type;"geoJson"===e&&(e=t.type="geoJSON"),(0,Xm[e])(t)})),Ym.set(t,i)},retrieveMap:function(t){return Ym.get(t)}},Xm={geoJSON:function(t){var e=t.source;t.geoJSON=Wm(e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=jm(t.source)}},Zm=qm;function $m(t){return t}function Km(t,e,n,i,r){this._old=t,this._new=e,this._oldKeyGetter=n||$m,this._newKeyGetter=i||$m,this.context=r}function Qm(t,e,n,i,r){for(var a=0;a<t.length;a++){var o="_ec_"+r[i](t[a],a),s=e[o];null==s?(n.push(o),e[o]=a):(s.length||(e[o]=s=[s]),s.push(a))}}Km.prototype={constructor:Km,add:function(t){return this._add=t,this},update:function(t){return this._update=t,this},remove:function(t){return this._remove=t,this},execute:function(){var t=this._old,e=this._new,n={},i=[],r=[];for(Qm(t,{},i,"_oldKeyGetter",this),Qm(e,n,r,"_newKeyGetter",this),a=0;a<t.length;a++){if(null!=(s=n[o=i[a]]))(u=s.length)?(1===u&&(n[o]=null),s=s.shift()):n[o]=null,this._update&&this._update(s,a);else this._remove&&this._remove(a)}for(var a=0;a<r.length;a++){var o=r[a];if(n.hasOwnProperty(o)){var s;if(null==(s=n[o]))continue;if(s.length)for(var l=0,u=s.length;l<u;l++)this._add&&this._add(s[l]);else this._add&&this._add(s)}}}};var Jm=Km,tv=Bt.each,ev=Bt.createHashMap,nv=ev(["tooltip","label","itemName","itemId","seriesName"]);function iv(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}var rv=function(t){var e={},n=e.encode={},i=ev(),r=[],a=[],o=e.userOutput={dimensionNames:t.dimensions.slice(),encode:{}};tv(t.dimensions,(function(e){var s,l=t.getDimensionInfo(e),u=l.coordDim;if(u){var h=l.coordDimIndex;iv(n,u)[h]=e,l.isExtraCoord||(i.set(u,1),"ordinal"!==(s=l.type)&&"time"!==s&&(r[0]=e),iv(o.encode,u)[h]=l.index),l.defaultTooltip&&a.push(e)}nv.each((function(t,e){var i=iv(n,e),r=l.otherDims[e];null!=r&&!1!==r&&(i[r]=l.name)}))}));var s=[],l={};i.each((function(t,e){var i=n[e];l[e]=i[0],s=s.concat(i)})),e.dataDimsOnCoord=s,e.encodeFirstDimNotExtra=l;var u=n.label;u&&u.length&&(r=u.slice());var h=n.tooltip;return h&&h.length?a=h.slice():a.length||(a=r.slice()),n.defaultedLabel=r,n.defaultedTooltip=a,e},av={OTHER_DIMENSIONS:nv,summarizeDimensions:rv,getDimensionTypeByAxis:function(t){return"category"===t?"ordinal":"time"===t?"time":"float"}};var ov=function(t){null!=t&&Bt.extend(this,t),this.otherDims={}},sv=Mp.defaultDimValueGetters,lv=Mp.DefaultDataProvider,uv=av.summarizeDimensions,hv=Bt.isObject,cv="undefined",dv={float:typeof Float64Array===cv?Array:Float64Array,int:typeof Int32Array===cv?Array:Int32Array,ordinal:Array,number:Array,time:Array},fv=typeof Uint32Array===cv?Array:Uint32Array,pv=typeof Int32Array===cv?Array:Int32Array,gv=typeof Uint16Array===cv?Array:Uint16Array;function mv(t){return t._rawCount>65535?fv:gv}var vv=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],yv=["_extent","_approximateExtent","_rawExtent"];function _v(t,e){Bt.each(vv.concat(e.__wrappedMethods||[]),(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t.__wrappedMethods=e.__wrappedMethods,Bt.each(yv,(function(n){t[n]=Bt.clone(e[n])})),t._calculationInfo=Bt.extend(e._calculationInfo)}var xv=function(t,e){t=t||["x","y"];for(var n={},i=[],r={},a=0;a<t.length;a++){var o=t[a];Bt.isString(o)?o=new ov({name:o}):o instanceof ov||(o=new ov(o));var s=o.name;o.type=o.type||"float",o.coordDim||(o.coordDim=s,o.coordDimIndex=0),o.otherDims=o.otherDims||{},i.push(s),n[s]=o,o.index=a,o.createInvertedIndices&&(r[s]=[])}this.dimensions=i,this._dimensionInfos=n,this.hostModel=e,this.dataType,this._indices=null,this._count=0,this._rawCount=0,this._storage={},this._nameList=[],this._idList=[],this._optionModels=[],this._visual={},this._layout={},this._itemVisuals=[],this.hasItemVisual={},this._itemLayouts=[],this._graphicEls=[],this._chunkSize=1e5,this._chunkCount=0,this._rawData,this._rawExtent={},this._extent={},this._approximateExtent={},this._dimensionsSummary=uv(this),this._invertedIndicesMap=r,this._calculationInfo={},this.userOutput=this._dimensionsSummary.userOutput},wv=xv.prototype;function bv(t,e,n,i,r){var a=dv[e.type],o=i-1,s=e.name,l=t[s][o];if(l&&l.length<n){for(var u=new a(Math.min(r-o*n,n)),h=0;h<l.length;h++)u[h]=l[h];t[s][o]=u}for(var c=i*n;c<r;c+=n)t[s].push(new a(Math.min(r-c,n)))}function Sv(t){var e=t._invertedIndicesMap;Bt.each(e,(function(n,i){var r=t._dimensionInfos[i].ordinalMeta;if(r){n=e[i]=new pv(r.categories.length);for(var a=0;a<n.length;a++)n[a]=-1;for(a=0;a<t._count;a++)n[t.get(i,a)]=a}}))}function Mv(t,e,n){var i;if(null!=e){var r=t._chunkSize,a=Math.floor(n/r),o=n%r,s=t.dimensions[e],l=t._storage[s][a];if(l){i=l[o];var u=t._dimensionInfos[s].ordinalMeta;u&&u.categories.length&&(i=u.categories[i])}}return i}function Tv(t){return t}function Iv(t){return t<this._count&&t>=0?this._indices[t]:-1}function Cv(t,e){var n=t._idList[e];return null==n&&(n=Mv(t,t._idDimIdx,e)),null==n&&(n="e\0\0"+e),n}function Dv(t){return Bt.isArray(t)||(t=[t]),t}function kv(t,e){var n=t.dimensions,i=new xv(Bt.map(n,t.getDimensionInfo,t),t.hostModel);_v(i,t);for(var r=i._storage={},a=t._storage,o=0;o<n.length;o++){var s=n[o];a[s]&&(Bt.indexOf(e,s)>=0?(r[s]=Av(a[s]),i._rawExtent[s]=Ov(),i._extent[s]=null):r[s]=a[s])}return i}function Av(t){for(var e,n,i=new Array(t.length),r=0;r<t.length;r++)i[r]=(e=t[r],n=void 0,(n=e.constructor)===Array?e.slice():new n(e));return i}function Ov(){return[1/0,-1/0]}wv.type="list",wv.hasItemOption=!0,wv.getDimension=function(t){return"number"!=typeof t&&(isNaN(t)||this._dimensionInfos.hasOwnProperty(t))||(t=this.dimensions[t]),t},wv.getDimensionInfo=function(t){return this._dimensionInfos[this.getDimension(t)]},wv.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},wv.mapDimension=function(t,e){var n=this._dimensionsSummary;if(null==e)return n.encodeFirstDimNotExtra[t];var i=n.encode[t];return!0===e?(i||[]).slice():i&&i[e]},wv.initData=function(t,e,n){(bd.isInstance(t)||Bt.isArrayLike(t))&&(t=new lv(t,this.dimensions.length)),this._rawData=t,this._storage={},this._indices=null,this._nameList=e||[],this._idList=[],this._nameRepeatCount={},n||(this.hasItemOption=!1),this.defaultDimValueGetter=sv[this._rawData.getSource().sourceFormat],this._dimValueGetter=n=n||this.defaultDimValueGetter,this._dimValueGetterArrayRows=sv.arrayRows,this._rawExtent={},this._initDataFromProvider(0,t.count()),t.pure&&(this.hasItemOption=!1)},wv.getProvider=function(){return this._rawData},wv.appendData=function(t){var e=this._rawData,n=this.count();e.appendData(t);var i=e.count();e.persistent||(i+=n),this._initDataFromProvider(n,i)},wv.appendValues=function(t,e){for(var n=this._chunkSize,i=this._storage,r=this.dimensions,a=r.length,o=this._rawExtent,s=this.count(),l=s+Math.max(t.length,e?e.length:0),u=this._chunkCount,h=0;h<a;h++){o[v=r[h]]||(o[v]=Ov()),i[v]||(i[v]=[]),bv(i,this._dimensionInfos[v],n,u,l),this._chunkCount=i[v].length}for(var c=new Array(a),d=s;d<l;d++){for(var f=d-s,p=Math.floor(d/n),g=d%n,m=0;m<a;m++){var v=r[m],y=this._dimValueGetterArrayRows(t[f]||c,v,f,m);i[v][p][g]=y;var _=o[v];y<_[0]&&(_[0]=y),y>_[1]&&(_[1]=y)}e&&(this._nameList[d]=e[f])}this._rawCount=this._count=l,this._extent={},Sv(this)},wv._initDataFromProvider=function(t,e){if(!(t>=e)){for(var n,i=this._chunkSize,r=this._rawData,a=this._storage,o=this.dimensions,s=o.length,l=this._dimensionInfos,u=this._nameList,h=this._idList,c=this._rawExtent,d=this._nameRepeatCount={},f=this._chunkCount,p=0;p<s;p++){c[w=o[p]]||(c[w]=Ov());var g=l[w];0===g.otherDims.itemName&&(n=this._nameDimIdx=p),0===g.otherDims.itemId&&(this._idDimIdx=p),a[w]||(a[w]=[]),bv(a,g,i,f,e),this._chunkCount=a[w].length}for(var m=new Array(s),v=t;v<e;v++){m=r.getItem(v,m);for(var y=Math.floor(v/i),_=v%i,x=0;x<s;x++){var w,b=a[w=o[x]][y],S=this._dimValueGetter(m,w,v,x);b[_]=S;var M=c[w];S<M[0]&&(M[0]=S),S>M[1]&&(M[1]=S)}if(!r.pure){var T=u[v];if(m&&null==T)if(null!=m.name)u[v]=T=m.name;else if(null!=n){var I=o[n],C=a[I][y];if(C){T=C[_];var D=l[I].ordinalMeta;D&&D.categories.length&&(T=D.categories[T])}}var k=null==m?null:m.id;null==k&&null!=T&&(d[T]=d[T]||0,k=T,d[T]>0&&(k+="__ec__"+d[T]),d[T]++),null!=k&&(h[v]=k)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=e,this._extent={},Sv(this)}},wv.count=function(){return this._count},wv.getIndices=function(){var t=this._indices;if(t){var e=t.constructor,n=this._count;if(e===Array){r=new e(n);for(var i=0;i<n;i++)r[i]=t[i]}else r=new e(t.buffer,0,n)}else{var r=new(e=mv(this))(this.count());for(i=0;i<r.length;i++)r[i]=i}return r},wv.get=function(t,e){if(!(e>=0&&e<this._count))return NaN;var n=this._storage;if(!n[t])return NaN;e=this.getRawIndex(e);var i=Math.floor(e/this._chunkSize),r=e%this._chunkSize;return n[t][i][r]},wv.getByRawIndex=function(t,e){if(!(e>=0&&e<this._rawCount))return NaN;var n=this._storage[t];if(!n)return NaN;var i=Math.floor(e/this._chunkSize),r=e%this._chunkSize;return n[i][r]},wv._getFast=function(t,e){var n=Math.floor(e/this._chunkSize),i=e%this._chunkSize;return this._storage[t][n][i]},wv.getValues=function(t,e){var n=[];Bt.isArray(t)||(e=t,t=this.dimensions);for(var i=0,r=t.length;i<r;i++)n.push(this.get(t[i],e));return n},wv.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},wv.getDataExtent=function(t){t=this.getDimension(t);var e=this._storage[t],n=Ov();if(!e)return n;var i,r=this.count();if(!this._indices)return this._rawExtent[t].slice();if(i=this._extent[t])return i.slice();for(var a=(i=n)[0],o=i[1],s=0;s<r;s++){var l=this._getFast(t,this.getRawIndex(s));l<a&&(a=l),l>o&&(o=l)}return i=[a,o],this._extent[t]=i,i},wv.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},wv.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},wv.getCalculationInfo=function(t){return this._calculationInfo[t]},wv.setCalculationInfo=function(t,e){hv(t)?Bt.extend(this._calculationInfo,t):this._calculationInfo[t]=e},wv.getSum=function(t){var e=0;if(this._storage[t])for(var n=0,i=this.count();n<i;n++){var r=this.get(t,n);isNaN(r)||(e+=r)}return e},wv.getMedian=function(t){var e=[];this.each(t,(function(t,n){isNaN(t)||e.push(t)}));var n=[].concat(e).sort((function(t,e){return t-e})),i=this.count();return 0===i?0:i%2==1?n[(i-1)/2]:(n[i/2]+n[i/2-1])/2},wv.rawIndexOf=function(t,e){var n=(t&&this._invertedIndicesMap[t])[e];return null==n||isNaN(n)?-1:n},wv.indexOfName=function(t){for(var e=0,n=this.count();e<n;e++)if(this.getName(e)===t)return e;return-1},wv.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,r=this._count-1;i<=r;){var a=(i+r)/2|0;if(e[a]<t)i=a+1;else{if(!(e[a]>t))return a;r=a-1}}return-1},wv.indicesOfNearest=function(t,e,n){var i=[];if(!this._storage[t])return i;null==n&&(n=1/0);for(var r=1/0,a=-1,o=0,s=0,l=this.count();s<l;s++){var u=e-this.get(t,s),h=Math.abs(u);h<=n&&((h<r||h===r&&u>=0&&a<0)&&(r=h,a=u,o=0),u===a&&(i[o++]=s))}return i.length=o,i},wv.getRawIndex=Tv,wv.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},wv.getName=function(t){var e=this.getRawIndex(t);return this._nameList[e]||Mv(this,this._nameDimIdx,e)||""},wv.getId=function(t){return Cv(this,this.getRawIndex(t))},wv.each=function(t,e,n,i){if(this._count){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this;for(var r=(t=Bt.map(Dv(t),this.getDimension,this)).length,a=0;a<this.count();a++)switch(r){case 0:e.call(n,a);break;case 1:e.call(n,this.get(t[0],a),a);break;case 2:e.call(n,this.get(t[0],a),this.get(t[1],a),a);break;default:for(var o=0,s=[];o<r;o++)s[o]=this.get(t[o],a);s[o]=a,e.apply(n,s)}}},wv.filterSelf=function(t,e,n,i){if(this._count){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this,t=Bt.map(Dv(t),this.getDimension,this);for(var r=this.count(),a=new(mv(this))(r),o=[],s=t.length,l=0,u=t[0],h=0;h<r;h++){var c,d=this.getRawIndex(h);if(0===s)c=e.call(n,h);else if(1===s){var f=this._getFast(u,d);c=e.call(n,f,h)}else{for(var p=0;p<s;p++)o[p]=this._getFast(u,d);o[p]=h,c=e.apply(n,o)}c&&(a[l++]=d)}return l<r&&(this._indices=a),this._count=l,this._extent={},this.getRawIndex=this._indices?Iv:Tv,this}},wv.selectRange=function(t){if(this._count){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);var i=e.length;if(i){var r=this.count(),a=new(mv(this))(r),o=0,s=e[0],l=t[s][0],u=t[s][1],h=!1;if(!this._indices){var c=0;if(1===i){for(var d=this._storage[e[0]],f=0;f<this._chunkCount;f++)for(var p=d[f],g=Math.min(this._count-f*this._chunkSize,this._chunkSize),m=0;m<g;m++){((w=p[m])>=l&&w<=u||isNaN(w))&&(a[o++]=c),c++}h=!0}else if(2===i){d=this._storage[s];var v=this._storage[e[1]],y=t[e[1]][0],_=t[e[1]][1];for(f=0;f<this._chunkCount;f++){p=d[f];var x=v[f];for(g=Math.min(this._count-f*this._chunkSize,this._chunkSize),m=0;m<g;m++){var w=p[m],b=x[m];(w>=l&&w<=u||isNaN(w))&&(b>=y&&b<=_||isNaN(b))&&(a[o++]=c),c++}}h=!0}}if(!h)if(1===i)for(m=0;m<r;m++){var S=this.getRawIndex(m);((w=this._getFast(s,S))>=l&&w<=u||isNaN(w))&&(a[o++]=S)}else for(m=0;m<r;m++){var M=!0;for(S=this.getRawIndex(m),f=0;f<i;f++){var T=e[f];((w=this._getFast(n,S))<t[T][0]||w>t[T][1])&&(M=!1)}M&&(a[o++]=this.getRawIndex(m))}return o<r&&(this._indices=a),this._count=o,this._extent={},this.getRawIndex=this._indices?Iv:Tv,this}}},wv.mapArray=function(t,e,n,i){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this;var r=[];return this.each(t,(function(){r.push(e&&e.apply(this,arguments))}),n),r},wv.map=function(t,e,n,i){n=n||i||this;var r=kv(this,t=Bt.map(Dv(t),this.getDimension,this));r._indices=this._indices,r.getRawIndex=r._indices?Iv:Tv;for(var a=r._storage,o=[],s=this._chunkSize,l=t.length,u=this.count(),h=[],c=r._rawExtent,d=0;d<u;d++){for(var f=0;f<l;f++)h[f]=this.get(t[f],d);h[l]=d;var p=e&&e.apply(n,h);if(null!=p){"object"!=typeof p&&(o[0]=p,p=o);for(var g=this.getRawIndex(d),m=Math.floor(g/s),v=g%s,y=0;y<p.length;y++){var _=t[y],x=p[y],w=c[_],b=a[_];b&&(b[m][v]=x),x<w[0]&&(w[0]=x),x>w[1]&&(w[1]=x)}}}return r},wv.downSample=function(t,e,n,i){for(var r=kv(this,[t]),a=r._storage,o=[],s=Math.floor(1/e),l=a[t],u=this.count(),h=this._chunkSize,c=r._rawExtent[t],d=new(mv(this))(u),f=0,p=0;p<u;p+=s){s>u-p&&(s=u-p,o.length=s);for(var g=0;g<s;g++){var m=this.getRawIndex(p+g),v=Math.floor(m/h),y=m%h;o[g]=l[v][y]}var _=n(o),x=this.getRawIndex(Math.min(p+i(o,_)||0,u-1)),w=x%h;l[Math.floor(x/h)][w]=_,_<c[0]&&(c[0]=_),_>c[1]&&(c[1]=_),d[f++]=x}return r._count=f,r._indices=d,r.getRawIndex=Iv,r},wv.getItemModel=function(t){var e=this.hostModel;return new gc(this.getRawDataItem(t),e,e&&e.ecModel)},wv.diff=function(t){var e=this;return new Jm(t?t.getIndices():[],this.getIndices(),(function(e){return Cv(t,e)}),(function(t){return Cv(e,t)}))},wv.getVisual=function(t){var e=this._visual;return e&&e[t]},wv.setVisual=function(t,e){if(hv(t))for(var n in t)t.hasOwnProperty(n)&&this.setVisual(n,t[n]);else this._visual=this._visual||{},this._visual[t]=e},wv.setLayout=function(t,e){if(hv(t))for(var n in t)t.hasOwnProperty(n)&&this.setLayout(n,t[n]);else this._layout[t]=e},wv.getLayout=function(t){return this._layout[t]},wv.getItemLayout=function(t){return this._itemLayouts[t]},wv.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?Bt.extend(this._itemLayouts[t]||{},e):e},wv.clearItemLayouts=function(){this._itemLayouts.length=0},wv.getItemVisual=function(t,e,n){var i=this._itemVisuals[t],r=i&&i[e];return null!=r||n?r:this.getVisual(e)},wv.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{},r=this.hasItemVisual;if(this._itemVisuals[t]=i,hv(e))for(var a in e)e.hasOwnProperty(a)&&(i[a]=e[a],r[a]=!0);else i[e]=n,r[e]=!0},wv.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var Lv=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};wv.setItemGraphicEl=function(t,e){var n=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=n&&n.seriesIndex,"group"===e.type&&e.traverse(Lv,e)),this._graphicEls[t]=e},wv.getItemGraphicEl=function(t){return this._graphicEls[t]},wv.eachItemGraphicEl=function(t,e){Bt.each(this._graphicEls,(function(n,i){n&&t&&t.call(e,n,i)}))},wv.cloneShallow=function(t){if(!t){var e=Bt.map(this.dimensions,this.getDimensionInfo,this);t=new xv(e,this.hostModel)}if(t._storage=this._storage,_v(t,this),this._indices){var n=this._indices.constructor;t._indices=new n(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?Iv:Tv,t},wv.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(Bt.slice(arguments)))})},wv.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],wv.CHANGABLE_METHODS=["filterSelf","selectRange"];var Pv=xv,Rv=Bt.createHashMap,Ev=Bt.each,Nv=Bt.isString,zv=Bt.defaults,Bv=Bt.extend,Fv=Bt.isObject,Vv=Bt.clone,Hv=Ro.normalizeToArray,Wv=Kd.guessOrdinal,Gv=Kd.BE_ORDINAL,Uv=av.OTHER_DIMENSIONS;function jv(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}var Yv=function(t,e,n){bd.isInstance(e)||(e=bd.seriesDataToSource(e)),n=n||{},t=(t||[]).slice();for(var i=(n.dimsDef||[]).slice(),r=Rv(),a=Rv(),o=[],s=function(t,e,n,i){var r=Math.max(t.dimensionsDetectCount||1,e.length,n.length,i||0);return Ev(e,(function(t){var e=t.dimsDef;e&&(r=Math.max(r,e.length))})),r}(e,t,i,n.dimCount),l=0;l<s;l++){var u=i[l]=Bv({},Fv(i[l])?i[l]:{name:i[l]}),h=u.name,c=o[l]=new ov;null!=h&&null==r.get(h)&&(c.name=c.displayName=h,r.set(h,l)),null!=u.type&&(c.type=u.type),null!=u.displayName&&(c.displayName=u.displayName)}var d=n.encodeDef;!d&&n.encodeDefaulter&&(d=n.encodeDefaulter(e,s)),(d=Rv(d)).each((function(t,e){if(1===(t=Hv(t).slice()).length&&!Nv(t[0])&&t[0]<0)d.set(e,!1);else{var n=d.set(e,[]);Ev(t,(function(t,i){Nv(t)&&(t=r.get(t)),null!=t&&t<s&&(n[i]=t,p(o[t],e,i))}))}}));var f=0;function p(t,e,n){null!=Uv.get(e)?t.otherDims[e]=n:(t.coordDim=e,t.coordDimIndex=n,a.set(e,!0))}Ev(t,(function(t,e){var n,i,r;if(Nv(t))n=t,t={};else{n=t.name;var a=t.ordinalMeta;t.ordinalMeta=null,(t=Vv(t)).ordinalMeta=a,i=t.dimsDef,r=t.otherDims,t.name=t.coordDim=t.coordDimIndex=t.dimsDef=t.otherDims=null}if(!1!==(s=d.get(n))){var s;if(!(s=Hv(s)).length)for(var l=0;l<(i&&i.length||1);l++){for(;f<o.length&&null!=o[f].coordDim;)f++;f<o.length&&s.push(f++)}Ev(s,(function(e,a){var s=o[e];if(p(zv(s,t),n,a),null==s.name&&i){var l=i[a];!Fv(l)&&(l={name:l}),s.name=s.displayName=l.name,s.defaultTooltip=l.defaultTooltip}r&&zv(s.otherDims,r)}))}}));var g=n.generateCoord,m=n.generateCoordCount,v=null!=m;m=g?m||1:0;for(var y=g||"value",_=0;_<s;_++){null==(c=o[_]=o[_]||new ov).coordDim&&(c.coordDim=jv(y,a,v),c.coordDimIndex=0,(!g||m<=0)&&(c.isExtraCoord=!0),m--),null==c.name&&(c.name=jv(c.coordDim,r)),null!=c.type||Wv(e,_,c.name)!==Gv.Must&&(!c.isExtraCoord||null==c.otherDims.itemName&&null==c.otherDims.seriesName)||(c.type="ordinal")}return o},qv=Yv;var Xv=function(t,e){return qv((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})},Zv=Bt.createHashMap,$v=Bt.each;function Kv(t){this.coordSysName=t,this.coordSysDims=[],this.axisMap=Zv(),this.categoryAxisMap=Zv(),this.firstCategoryDimIndex=null}var Qv={cartesian2d:function(t,e,n,i){var r=t.getReferringComponents("xAxis")[0],a=t.getReferringComponents("yAxis")[0];e.coordSysDims=["x","y"],n.set("x",r),n.set("y",a),Jv(r)&&(i.set("x",r),e.firstCategoryDimIndex=0),Jv(a)&&(i.set("y",a),e.firstCategoryDimIndex,e.firstCategoryDimIndex=1)},singleAxis:function(t,e,n,i){var r=t.getReferringComponents("singleAxis")[0];e.coordSysDims=["single"],n.set("single",r),Jv(r)&&(i.set("single",r),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var r=t.getReferringComponents("polar")[0],a=r.findAxisModel("radiusAxis"),o=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",a),n.set("angle",o),Jv(a)&&(i.set("radius",a),e.firstCategoryDimIndex=0),Jv(o)&&(i.set("angle",o),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e,n,i){e.coordSysDims=["lng","lat"]},parallel:function(t,e,n,i){var r=t.ecModel,a=r.getComponent("parallel",t.get("parallelIndex")),o=e.coordSysDims=a.dimensions.slice();$v(a.parallelAxisIndex,(function(t,a){var s=r.getComponent("parallelAxis",t),l=o[a];n.set(l,s),Jv(s)&&null==e.firstCategoryDimIndex&&(i.set(l,s),e.firstCategoryDimIndex=a)}))}};function Jv(t){return"category"===t.get("type")}var ty={getCoordSysInfoBySeries:function(t){var e=t.get("coordinateSystem"),n=new Kv(e),i=Qv[e];if(i)return i(t,n,n.axisMap,n.categoryAxisMap),n}},ey=Bt.each,ny=Bt.isString;function iy(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}var ry=function(t,e){return iy(t,e)?t.getCalculationInfo("stackResultDimension"):e},ay={enableDataStack:function(t,e,n){var i,r,a,o,s=(n=n||{}).byIndex,l=n.stackedCoordDimension,u=!(!t||!t.get("stack"));if(ey(e,(function(t,n){ny(t)&&(e[n]=t={name:t}),u&&!t.isExtraCoord&&(s||i||!t.ordinalMeta||(i=t),r||"ordinal"===t.type||"time"===t.type||l&&l!==t.coordDim||(r=t))})),!r||s||i||(s=!0),r){a="__\0ecstackresult",o="__\0ecstackedover",i&&(i.createInvertedIndices=!0);var h=r.coordDim,c=r.type,d=0;ey(e,(function(t){t.coordDim===h&&d++})),e.push({name:a,coordDim:h,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0}),d++,e.push({name:o,coordDim:o,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:r&&r.name,stackedByDimension:i&&i.name,isStackedByIndex:s,stackedOverDimension:o,stackResultDimension:a}},isDimensionStacked:iy,getStackedDimension:ry},oy=dd.SOURCE_FORMAT_ORIGINAL,sy=av.getDimensionTypeByAxis,ly=Ro.getDataItemValue,uy=ty.getCoordSysInfoBySeries,hy=ay.enableDataStack,cy=Kd.makeSeriesEncodeForAxisCoordSys;var dy=function(t,e,n){n=n||{},bd.isInstance(t)||(t=bd.seriesDataToSource(t));var i,r=e.get("coordinateSystem"),a=Sf.get(r),o=uy(e);o&&(i=Bt.map(o.coordSysDims,(function(t){var e={name:t},n=o.axisMap.get(t);if(n){var i=n.get("type");e.type=sy(i)}return e}))),i||(i=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]);var s,l,u=Xv(t,{coordDimensions:i,generateCoord:n.generateCoord,encodeDefaulter:n.useEncodeDefaulter?Bt.curry(cy,i,e):null});o&&Bt.each(u,(function(t,e){var n=t.coordDim,i=o.categoryAxisMap.get(n);i&&(null==s&&(s=e),t.ordinalMeta=i.getOrdinalMeta()),null!=t.otherDims.itemName&&(l=!0)})),l||null==s||(u[s].otherDims.itemName=0);var h=hy(e,u),c=new Pv(u,e);c.setCalculationInfo(h);var d=null!=s&&function(t){if(t.sourceFormat===oy){var e=function(t){var e=0;for(;e<t.length&&null==t[e];)e++;return t[e]}(t.data||[]);return null!=e&&!Bt.isArray(ly(e))}}(t)?function(t,e,n,i){return i===s?n:this.defaultDimValueGetter(t,e,n,i)}:null;return c.hasItemOption=!1,c.initData(t,null,d),c},fy=dy;function py(t){this._setting=t||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}py.prototype.parse=function(t){return t},py.prototype.getSetting=function(t){return this._setting[t]},py.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},py.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},py.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},py.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},py.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},py.prototype.getExtent=function(){return this._extent.slice()},py.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},py.prototype.isBlank=function(){return this._isBlank},py.prototype.setBlank=function(t){this._isBlank=t},py.prototype.getLabel=null,Go.enableClassExtend(py),Go.enableClassManagement(py,{registerWhenExtend:!0});var gy=py,my=Bt.createHashMap,vy=Bt.isObject,yy=Bt.map;function _y(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this._map}_y.createByAxisModel=function(t){var e=t.option,n=e.data,i=n&&yy(n,by);return new _y({categories:i,needCollect:!i,deduplication:!1!==e.dedplication})};var xy=_y.prototype;function wy(t){return t._map||(t._map=my(t.categories))}function by(t){return vy(t)&&null!=t.value?t.value:t+""}xy.getOrdinal=function(t){return wy(this).get(t)},xy.parseAndCollect=function(t){var e,n=this._needCollect;if("string"!=typeof t&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var i=wy(this);return null==(e=i.get(t))&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=NaN),e};var Sy=_y,My=gy.prototype,Ty=gy.extend({type:"ordinal",init:function(t,e){t&&!Bt.isArray(t)||(t=new Sy({categories:t})),this._ordinalMeta=t,this._extent=e||[0,t.categories.length-1]},parse:function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},contain:function(t){return t=this.parse(t),My.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return My.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(My.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push(n),n++;return t},getLabel:function(t){if(!this.isBlank())return this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:Bt.noop,niceExtent:Bt.noop});Ty.create=function(){return new Ty};var Iy=Ty,Cy=Cc.round;function Dy(t){return Cc.getPrecisionSafe(t)+2}function ky(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function Ay(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),ky(t,0,e),ky(t,1,e),t[0]>t[1]&&(t[0]=t[1])}var Oy={intervalScaleNiceTicks:function(t,e,n,i){var r={},a=t[1]-t[0],o=r.interval=Cc.nice(a/e,!0);null!=n&&o<n&&(o=r.interval=n),null!=i&&o>i&&(o=r.interval=i);var s=r.intervalPrecision=Dy(o);return Ay(r.niceTickExtent=[Cy(Math.ceil(t[0]/o)*o,s),Cy(Math.floor(t[1]/o)*o,s)],t),r},getIntervalPrecision:Dy,fixExtent:Ay},Ly=Cc.round,Py=gy.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]),Py.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Oy.getIntervalPrecision(t)},getTicks:function(t){var e=this._interval,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,a=[];if(!e)return a;n[0]<i[0]&&(t?a.push(Ly(i[0]-e,r)):a.push(n[0]));for(var o=i[0];o<=i[1]&&(a.push(o),(o=Ly(o+e,r))!==a[a.length-1]);)if(a.length>1e4)return[];var s=a.length?a[a.length-1]:i[1];return n[1]>s&&(t?a.push(Ly(s+e,r)):a.push(n[1])),a},getMinorTicks:function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),r=1;r<e.length;r++){for(var a=e[r],o=e[r-1],s=0,l=[],u=(a-o)/t;s<t-1;){var h=Cc.round(o+(s+1)*u);h>i[0]&&h<i[1]&&l.push(h),s++}n.push(l)}return n},getLabel:function(t,e){if(null==t)return"";var n=e&&e.precision;return null==n?n=Cc.getPrecisionSafe(t)||0:"auto"===n&&(n=this._intervalPrecision),t=Ly(t,n,!0),Vc.addCommas(t)},niceTicks:function(t,e,n){t=t||5;var i=this._extent,r=i[1]-i[0];if(isFinite(r)){r<0&&(r=-r,i.reverse());var a=Oy.intervalScaleNiceTicks(i,t,e,n);this._intervalPrecision=a.intervalPrecision,this._interval=a.interval,this._niceExtent=a.niceTickExtent}},niceExtent:function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var n=e[0];t.fixMax||(e[1]+=n/2),e[0]-=n/2}else e[1]=1;var i=e[1]-e[0];isFinite(i)||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var r=this._interval;t.fixMin||(e[0]=Ly(Math.floor(e[0]/r)*r)),t.fixMax||(e[1]=Ly(Math.ceil(e[1]/r)*r))}});Py.create=function(){return new Py};var Ry=Py,Ey=Cc.parsePercent,Ny=ay.isDimensionStacked,zy="__ec_stack_",By="undefined"!=typeof Float32Array?Float32Array:Array;function Fy(t){return t.get("stack")||zy+t.seriesIndex}function Vy(t){return t.dim+t.index}function Hy(t,e){var n=[];return e.eachSeriesByType(t,(function(t){Yy(t)&&!qy(t)&&n.push(t)})),n}function Wy(t){var e=function(t){var e={};Bt.each(t,(function(t){var n=t.coordinateSystem.getBaseAxis();if("time"===n.type||"value"===n.type)for(var i=t.getData(),r=n.dim+"_"+n.index,a=i.mapDimension(n.dim),o=0,s=i.count();o<s;++o){var l=i.get(a,o);e[r]?e[r].push(l):e[r]=[l]}}));var n=[];for(var i in e)if(e.hasOwnProperty(i)){var r=e[i];if(r){r.sort((function(t,e){return t-e}));for(var a=null,o=1;o<r.length;++o){var s=r[o]-r[o-1];s>0&&(a=null===a?s:Math.min(a,s))}n[i]=a}}return n}(t),n=[];return Bt.each(t,(function(t){var i,r=t.coordinateSystem.getBaseAxis(),a=r.getExtent();if("category"===r.type)i=r.getBandWidth();else if("value"===r.type||"time"===r.type){var o=r.dim+"_"+r.index,s=e[o],l=Math.abs(a[1]-a[0]),u=r.scale.getExtent(),h=Math.abs(u[1]-u[0]);i=s?l/h*s:l}else{var c=t.getData();i=Math.abs(a[1]-a[0])/c.count()}var d=Ey(t.get("barWidth"),i),f=Ey(t.get("barMaxWidth"),i),p=Ey(t.get("barMinWidth")||1,i),g=t.get("barGap"),m=t.get("barCategoryGap");n.push({bandWidth:i,barWidth:d,barMaxWidth:f,barMinWidth:p,barGap:g,barCategoryGap:m,axisKey:Vy(r),stackId:Fy(t)})})),Gy(n)}function Gy(t){var e={};Bt.each(t,(function(t,n){var i=t.axisKey,r=t.bandWidth,a=e[i]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},o=a.stacks;e[i]=a;var s=t.stackId;o[s]||a.autoWidthCount++,o[s]=o[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!o[s].width&&(o[s].width=l,l=Math.min(a.remainedWidth,l),a.remainedWidth-=l);var u=t.barMaxWidth;u&&(o[s].maxWidth=u);var h=t.barMinWidth;h&&(o[s].minWidth=h);var c=t.barGap;null!=c&&(a.gap=c);var d=t.barCategoryGap;null!=d&&(a.categoryGap=d)}));var n={};return Bt.each(e,(function(t,e){n[e]={};var i=t.stacks,r=t.bandWidth,a=Ey(t.categoryGap,r),o=Ey(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,u=(s-a)/(l+(l-1)*o);u=Math.max(u,0),Bt.each(i,(function(t){var e=t.maxWidth,n=t.minWidth;if(t.width){i=t.width;e&&(i=Math.min(i,e)),n&&(i=Math.max(i,n)),t.width=i,s-=i+o*i,l--}else{var i=u;e&&e<i&&(i=Math.min(e,s)),n&&n>i&&(i=n),i!==u&&(t.width=i,s-=i+o*i,l--)}})),u=(s-a)/(l+(l-1)*o),u=Math.max(u,0);var h,c=0;Bt.each(i,(function(t,e){t.width||(t.width=u),h=t,c+=t.width*(1+o)})),h&&(c-=h.width*o);var d=-c/2;Bt.each(i,(function(t,i){n[e][i]=n[e][i]||{bandWidth:r,offset:d,width:t.width},d+=t.width*(1+o)}))})),n}function Uy(t,e,n){if(t&&e){var i=t[Vy(e)];return null!=i&&null!=n&&(i=i[Fy(n)]),i}}var jy={seriesType:"bar",plan:lg(),reset:function(t){if(Yy(t)&&qy(t)){var e=t.getData(),n=t.coordinateSystem,i=n.grid.getRect(),r=n.getBaseAxis(),a=n.getOtherAxis(r),o=e.mapDimension(a.dim),s=e.mapDimension(r.dim),l=a.isHorizontal(),u=l?0:1,h=Uy(Wy([t]),r,t).width;return h>.5||(h=.5),{progress:function(t,e){var c,d=t.count,f=new By(2*d),p=new By(2*d),g=new By(d),m=[],v=[],y=0,_=0;for(;null!=(c=t.next());)v[u]=e.get(o,c),v[1-u]=e.get(s,c),m=n.dataToPoint(v,null,m),p[y]=l?i.x+i.width:m[0],f[y++]=m[0],p[y]=l?m[1]:i.y+i.height,f[y++]=m[1],g[_++]=c;e.setLayout({largePoints:f,largeDataIndices:g,largeBackgroundPoints:p,barWidth:h,valueAxisStart:Xy(r,a),backgroundStart:l?i.x:i.y,valueAxisHorizontal:l})}}}}};function Yy(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function qy(t){return t.pipelineContext&&t.pipelineContext.large}function Xy(t,e,n){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}var Zy=function(t){var e=[],n=t.axis,i="axis0";if("category"===n.type){for(var r=n.getBandWidth(),a=0;a<t.count;a++)e.push(Bt.defaults({bandWidth:r,axisKey:i,stackId:zy+a},t));var o=Gy(e),s=[];for(a=0;a<t.count;a++){var l=o[i][zy+a];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}},$y=function(t,e){var n=Hy(t,e),i=Wy(n),r={};Bt.each(n,(function(t){var e=t.getData(),n=t.coordinateSystem,a=n.getBaseAxis(),o=Fy(t),s=i[Vy(a)][o],l=s.offset,u=s.width,h=n.getOtherAxis(a),c=t.get("barMinHeight")||0;r[o]=r[o]||[],e.setLayout({bandWidth:s.bandWidth,offset:l,size:u});for(var d=e.mapDimension(h.dim),f=e.mapDimension(a.dim),p=Ny(e,d),g=h.isHorizontal(),m=Xy(a,h),v=0,y=e.count();v<y;v++){var _,x,w,b,S,M=e.get(d,v),T=e.get(f,v),I=M>=0?"p":"n",C=m;if(p&&(r[o][T]||(r[o][T]={p:m,n:m}),C=r[o][T][I]),g)_=C,x=(S=n.dataToPoint([M,T]))[1]+l,w=S[0]-m,b=u,Math.abs(w)<c&&(w=(w<0?-1:1)*c),isNaN(w)||p&&(r[o][T][I]+=w);else _=(S=n.dataToPoint([T,M]))[0]+l,x=C,w=u,b=S[1]-m,Math.abs(b)<c&&(b=(b<=0?-1:1)*c),isNaN(b)||p&&(r[o][T][I]+=b);e.setItemLayout(v,{x:_,y:x,width:w,height:b})}}),this)},Ky={getLayoutOnAxis:Zy,prepareLayoutBarSeries:Hy,makeColumnLayout:Wy,retrieveColumnLayout:Uy,layout:$y,largeLayout:jy},Qy=Ry.prototype,Jy=Math.ceil,t_=Math.floor,e_=1e3,n_=6e4,i_=36e5,r_=864e5,a_=Ry.extend({type:"time",getLabel:function(t){var e=this._stepLvl,n=new Date(t);return Vc.formatTime(e[0],n,this.getSetting("useUTC"))},niceExtent:function(t){var e=this._extent;if(e[0]===e[1]&&(e[0]-=r_,e[1]+=r_),e[1]===-1/0&&e[0]===1/0){var n=new Date;e[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),e[0]=e[1]-r_}this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var i=this._interval;t.fixMin||(e[0]=Cc.round(t_(e[0]/i)*i)),t.fixMax||(e[1]=Cc.round(Jy(e[1]/i)*i))},niceTicks:function(t,e,n){t=t||10;var i=this._extent,r=i[1]-i[0],a=r/t;null!=e&&a<e&&(a=e),null!=n&&a>n&&(a=n);var o=o_.length,s=function(t,e,n,i){for(;n<i;){var r=n+i>>>1;t[r][1]<e?n=r+1:i=r}return n}(o_,a,0,o),l=o_[Math.min(s,o-1)],u=l[1];if("year"===l[0]){var h=r/u;u*=Cc.nice(h/t,!0)}var c=this.getSetting("useUTC")?0:60*new Date(+i[0]||+i[1]).getTimezoneOffset()*1e3,d=[Math.round(Jy((i[0]-c)/u)*u+c),Math.round(t_((i[1]-c)/u)*u+c)];Oy.fixExtent(d,i),this._stepLvl=l,this._interval=u,this._niceExtent=d},parse:function(t){return+Cc.parseDate(t)}});Bt.each(["contain","normalize"],(function(t){a_.prototype[t]=function(e){return Qy[t].call(this,this.parse(e))}}));var o_=[["hh:mm:ss",e_],["hh:mm:ss",5e3],["hh:mm:ss",1e4],["hh:mm:ss",15e3],["hh:mm:ss",3e4],["hh:mm\nMM-dd",n_],["hh:mm\nMM-dd",3e5],["hh:mm\nMM-dd",6e5],["hh:mm\nMM-dd",9e5],["hh:mm\nMM-dd",18e5],["hh:mm\nMM-dd",i_],["hh:mm\nMM-dd",72e5],["hh:mm\nMM-dd",216e5],["hh:mm\nMM-dd",432e5],["MM-dd\nyyyy",r_],["MM-dd\nyyyy",1728e5],["MM-dd\nyyyy",2592e5],["MM-dd\nyyyy",3456e5],["MM-dd\nyyyy",432e6],["MM-dd\nyyyy",5184e5],["week",6048e5],["MM-dd\nyyyy",864e6],["week",12096e5],["week",18144e5],["month",26784e5],["week",36288e5],["month",53568e5],["week",6048e6],["quarter",8208e6],["month",107136e5],["month",13392e6],["half-year",16416e6],["month",214272e5],["month",26784e6],["year",32832e6]];a_.create=function(t){return new a_({useUTC:t.ecModel.get("useUTC")})};var s_=gy.prototype,l_=Ry.prototype,u_=Cc.getPrecisionSafe,h_=Cc.round,c_=Math.floor,d_=Math.ceil,f_=Math.pow,p_=Math.log,g_=gy.extend({type:"log",base:10,$constructor:function(){gy.apply(this,arguments),this._originalScale=new Ry},getTicks:function(t){var e=this._originalScale,n=this._extent,i=e.getExtent();return Bt.map(l_.getTicks.call(this,t),(function(t){var r=Cc.round(f_(this.base,t));return r=t===n[0]&&e.__fixMin?m_(r,i[0]):r,r=t===n[1]&&e.__fixMax?m_(r,i[1]):r}),this)},getMinorTicks:l_.getMinorTicks,getLabel:l_.getLabel,scale:function(t){return t=s_.scale.call(this,t),f_(this.base,t)},setExtent:function(t,e){var n=this.base;t=p_(t)/p_(n),e=p_(e)/p_(n),l_.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=s_.getExtent.call(this);e[0]=f_(t,e[0]),e[1]=f_(t,e[1]);var n=this._originalScale,i=n.getExtent();return n.__fixMin&&(e[0]=m_(e[0],i[0])),n.__fixMax&&(e[1]=m_(e[1],i[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=p_(t[0])/p_(e),t[1]=p_(t[1])/p_(e),s_.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(n===1/0||n<=0)){var i=Cc.quantity(n);for(t/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var r=[Cc.round(d_(e[0]/i)*i),Cc.round(c_(e[1]/i)*i)];this._interval=i,this._niceExtent=r}},niceExtent:function(t){l_.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});function m_(t,e){return h_(t,u_(e))}Bt.each(["contain","normalize"],(function(t){g_.prototype[t]=function(e){return e=p_(e)/p_(this.base),s_[t].call(this,e)}})),g_.create=function(){return new g_};var v_=Ky.prepareLayoutBarSeries,y_=Ky.makeColumnLayout,__=Ky.retrieveColumnLayout;function x_(t,e){var n,i,r,a=t.type,o=e.getMin(),s=e.getMax(),l=t.getExtent();"ordinal"===a?n=e.getCategories().length:(i=e.get("boundaryGap"),Bt.isArray(i)||(i=[i||0,i||0]),"boolean"==typeof i[0]&&(i=[0,0]),i[0]=Cc.parsePercent(i[0],1),i[1]=Cc.parsePercent(i[1],1),r=l[1]-l[0]||Math.abs(l[0])),"dataMin"===o?o=l[0]:"function"==typeof o&&(o=o({min:l[0],max:l[1]})),"dataMax"===s?s=l[1]:"function"==typeof s&&(s=s({min:l[0],max:l[1]}));var u=null!=o,h=null!=s;null==o&&(o="ordinal"===a?n?0:NaN:l[0]-i[0]*r),null==s&&(s="ordinal"===a?n?n-1:NaN:l[1]+i[1]*r),(null==o||!isFinite(o))&&(o=NaN),(null==s||!isFinite(s))&&(s=NaN),t.setBlank(Bt.eqNaN(o)||Bt.eqNaN(s)||"ordinal"===a&&!t.getOrdinalMeta().categories.length),e.getNeedCrossZero()&&(o>0&&s>0&&!u&&(o=0),o<0&&s<0&&!h&&(s=0));var c=e.ecModel;if(c&&"time"===a){var d,f=v_("bar",c);if(Bt.each(f,(function(t){d|=t.getBaseAxis()===e.axis})),d){var p=y_(f),g=function(t,e,n,i){var r=n.axis.getExtent(),a=r[1]-r[0],o=__(i,n.axis);if(void 0===o)return{min:t,max:e};var s=1/0;Bt.each(o,(function(t){s=Math.min(t.offset,s)}));var l=-1/0;Bt.each(o,(function(t){l=Math.max(t.offset+t.width,l)})),s=Math.abs(s),l=Math.abs(l);var u=s+l,h=e-t,c=h/(1-(s+l)/a)-h;return e+=c*(l/u),t-=c*(s/u),{min:t,max:e}}(o,s,e,p);o=g.min,s=g.max}}return{extent:[o,s],fixMin:u,fixMax:h}}function w_(t){var e,n=t.getLabelModel().get("formatter"),i="category"===t.type?t.scale.getExtent()[0]:null;return"string"==typeof n?(e=n,n=function(n){return n=t.scale.getLabel(n),e.replace("{value}",null!=n?n:"")}):"function"==typeof n?function(e,r){return null!=i&&(r=e-i),n(b_(t,e),r)}:function(e){return t.scale.getLabel(e)}}function b_(t,e){return"category"===t.type?t.scale.getLabel(e):e}function S_(t,e){var n=e*Math.PI/180,i=t.plain(),r=i.width,a=i.height,o=r*Math.cos(n)+a*Math.sin(n),s=r*Math.sin(n)+a*Math.cos(n);return new Ai(i.x,i.y,o,s)}function M_(t){var e=t.get("interval");return null==e?"auto":e}var T_=function(t,e){var n=x_(t,e),i=n.extent,r=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var a=t.type;t.setExtent(i[0],i[1]),t.niceExtent({splitNumber:r,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:"interval"===a||"time"===a?e.get("minInterval"):null,maxInterval:"interval"===a||"time"===a?e.get("maxInterval"):null});var o=e.get("interval");null!=o&&t.setInterval&&t.setInterval(o)},I_=function(t,e){if(e=e||t.get("type"))switch(e){case"category":return new Iy(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new Ry;default:return(gy.getClass(e)||Ry).create(t)}},C_=function(t){var e=t.scale.getExtent(),n=e[0],i=e[1];return!(n>0&&i>0||n<0&&i<0)},D_=function(t){var e=t.model,n=t.scale;if(e.get("axisLabel.show")&&!n.isBlank()){var i,r,a="category"===t.type,o=n.getExtent();r=a?n.count():(i=n.getTicks()).length;var s,l=t.getLabelModel(),u=w_(t),h=1;r>40&&(h=Math.ceil(r/40));for(var c=0;c<r;c+=h){var d=u(i?i[c]:o[0]+c),f=S_(l.getTextRect(d),l.get("rotate")||0);s?s.union(f):s=f}return s}},k_={getScaleExtent:x_,niceScaleExtent:T_,createScaleByModel:I_,ifAxisCrossZero:C_,makeLabelFormatter:w_,getAxisRawValue:b_,estimateLabelUnionRect:D_,getOptionCategoryInterval:M_,shouldShowAllLabels:function(t){return"category"===t.type&&0===M_(t.getLabelModel())}},A_={getMin:function(t){var e=this.option,n=t||null==e.rangeStart?e.min:e.rangeStart;return this.axis&&null!=n&&"dataMin"!==n&&"function"!=typeof n&&!Bt.eqNaN(n)&&(n=this.axis.scale.parse(n)),n},getMax:function(t){var e=this.option,n=t||null==e.rangeEnd?e.max:e.rangeEnd;return this.axis&&null!=n&&"dataMax"!==n&&"function"!=typeof n&&!Bt.eqNaN(n)&&(n=this.axis.scale.parse(n)),n},getNeedCrossZero:function(){var t=this.option;return null==t.rangeStart&&null==t.rangeEnd&&!t.scale},getCoordSysModel:Bt.noop,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},O_=A_,L_=Gr.calculateTextPosition,P_=tc.extendShape({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,a=e.height/2;t.moveTo(n,i-a),t.lineTo(n+r,i+a),t.lineTo(n-r,i+a),t.closePath()}}),R_=tc.extendShape({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,a=e.height/2;t.moveTo(n,i-a),t.lineTo(n+r,i),t.lineTo(n,i+a),t.lineTo(n-r,i),t.closePath()}}),E_=tc.extendShape({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.x,i=e.y,r=e.width/5*3,a=Math.max(r,e.height),o=r/2,s=o*o/(a-o),l=i-a+o+s,u=Math.asin(s/o),h=Math.cos(u)*o,c=Math.sin(u),d=Math.cos(u),f=.6*o,p=.7*o;t.moveTo(n-h,l+s),t.arc(n,l,o,Math.PI-u,2*Math.PI+u),t.bezierCurveTo(n+h-c*f,l+s+d*f,n,i-p,n,i),t.bezierCurveTo(n,i-p,n-h+c*f,l+s+d*f,n-h,l+s),t.closePath()}}),N_=tc.extendShape({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.height,i=e.width,r=e.x,a=e.y,o=i/3*2;t.moveTo(r,a),t.lineTo(r+o,a+n),t.lineTo(r,a+n/4*3),t.lineTo(r-o,a+n),t.lineTo(r,a),t.closePath()}}),z_={line:tc.Line,rect:tc.Rect,roundRect:tc.Rect,square:tc.Rect,circle:tc.Circle,diamond:R_,pin:E_,arrow:N_,triangle:P_},B_={line:function(t,e,n,i,r){r.x1=t,r.y1=e+i/2,r.x2=t+n,r.y2=e+i/2},rect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i},roundRect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i,r.r=Math.min(n,i)/4},square:function(t,e,n,i,r){var a=Math.min(n,i);r.x=t,r.y=e,r.width=a,r.height=a},circle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.r=Math.min(n,i)/2},diamond:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i},pin:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},arrow:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},triangle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i}},F_={};Bt.each(z_,(function(t,e){F_[e]=new t}));var V_=tc.extendShape({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,n){var i=L_(t,e,n),r=this.shape;return r&&"pin"===r.symbolType&&"inside"===e.textPosition&&(i.y=n.y+.4*n.height),i},buildPath:function(t,e,n){var i=e.symbolType;if("none"!==i){var r=F_[i];r||(r=F_[i="rect"]),B_[i](e.x,e.y,e.width,e.height,r.shape),r.buildPath(t,r.shape,n)}}});function H_(t,e){if("image"!==this.type){var n=this.style,i=this.shape;i&&"line"===i.symbolType?n.stroke=t:this.__isEmptyBrush?(n.stroke=t,n.fill=e||"#fff"):(n.fill&&(n.fill=t),n.stroke&&(n.stroke=t)),this.dirty(!1)}}var W_=function(t,e,n,i,r,a,o){var s,l=0===t.indexOf("empty");return l&&(t=t.substr(5,1).toLowerCase()+t.substr(6)),(s=0===t.indexOf("image://")?tc.makeImage(t.slice(8),new Ai(e,n,i,r),o?"center":"cover"):0===t.indexOf("path://")?tc.makePath(t.slice(7),{},new Ai(e,n,i,r),o?"center":"cover"):new V_({shape:{symbolType:t,x:e,y:n,width:i,height:r}})).__isEmptyBrush=l,s.setColor=H_,s.setColor(a),s},G_={createSymbol:W_},U_=Qc.getLayoutRect,j_=ay.enableDataStack,Y_=ay.isDimensionStacked,q_=ay.getStackedDimension;var X_=function(t,e){var n=e;gc.isInstance(e)||(n=new gc(e),Bt.mixin(n,O_));var i=k_.createScaleByModel(n);return i.setExtent(t[0],t[1]),k_.niceScaleExtent(i,n),i},Z_=function(t){Bt.mixin(t,O_)},$_={getLayoutRect:U_,completeDimensions:qv,createDimensions:Xv,createSymbol:G_.createSymbol,createList:function(t){return fy(t.getSource(),t)},dataStack:{isDimensionStacked:Y_,enableDataStack:j_,getStackedDimension:q_},createScale:X_,mixinAxisModelCommonMethods:Z_},K_=1e-8;function Q_(t,e){return Math.abs(t-e)<K_}var J_=function(t,e,n){var i=0,r=t[0];if(!r)return!1;for(var a=1;a<t.length;a++){var o=t[a];i+=al(r[0],r[1],o[0],o[1],e,n),r=o}var s=t[0];return Q_(r[0],s[0])&&Q_(r[1],s[1])||(i+=al(r[0],r[1],s[0],s[1],e,n)),0!==i},tx={contain:J_};function ex(t,e,n){if(this.name=t,this.geometries=e,n)n=[n[0],n[1]];else{var i=this.getBoundingRect();n=[i.x+i.width/2,i.y+i.height/2]}this.center=n}ex.prototype={constructor:ex,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,n=[e,e],i=[-e,-e],r=[],a=[],o=this.geometries,s=0;s<o.length;s++)if("polygon"===o[s].type){var l=o[s].exterior;Rs.fromPoints(l,r,a),se.min(n,n,r),se.max(i,i,a)}return 0===s&&(n[0]=n[1]=i[0]=i[1]=0),this._rect=new Ai(n[0],n[1],i[0]-n[0],i[1]-n[1])},contain:function(t){var e=this.getBoundingRect(),n=this.geometries;if(!e.contain(t[0],t[1]))return!1;t:for(var i=0,r=n.length;i<r;i++)if("polygon"===n[i].type){var a=n[i].exterior,o=n[i].interiors;if(tx.contain(a,t[0],t[1])){for(var s=0;s<(o?o.length:0);s++)if(tx.contain(o[s]))continue t;return!0}}return!1},transformTo:function(t,e,n,i){var r=this.getBoundingRect(),a=r.width/r.height;n?i||(i=n/a):n=a*i;for(var o=new Ai(t,e,n,i),s=r.calculateTransform(o),l=this.geometries,u=0;u<l.length;u++)if("polygon"===l[u].type){for(var h=l[u].exterior,c=l[u].interiors,d=0;d<h.length;d++)se.applyTransform(h[d],h[d],s);for(var f=0;f<(c?c.length:0);f++)for(d=0;d<c[f].length;d++)se.applyTransform(c[f][d],c[f][d],s)}(r=this._rect).copy(o),this.center=[r.x+r.width/2,r.y+r.height/2]},cloneShallow:function(t){null==t&&(t=this.name);var e=new ex(t,this.geometries,this.center);return e._rect=this._rect,e.transformTo=null,e}};var nx=ex;function ix(t,e,n){for(var i=[],r=e[0],a=e[1],o=0;o<t.length;o+=2){var s=t.charCodeAt(o)-64,l=t.charCodeAt(o+1)-64;s=s>>1^-(1&s),l=l>>1^-(1&l),r=s+=r,a=l+=a,i.push([s/n,l/n])}return i}var rx=function(t,e){return function(t){if(!t.UTF8Encoding)return t;var e=t.UTF8Scale;null==e&&(e=1024);for(var n=t.features,i=0;i<n.length;i++)for(var r=n[i].geometry,a=r.coordinates,o=r.encodeOffsets,s=0;s<a.length;s++){var l=a[s];if("Polygon"===r.type)a[s]=ix(l,o[s],e);else if("MultiPolygon"===r.type)for(var u=0;u<l.length;u++){var h=l[u];l[u]=ix(h,o[s][u],e)}}t.UTF8Encoding=!1}(t),Bt.map(Bt.filter(t.features,(function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0})),(function(t){var n=t.properties,i=t.geometry,r=i.coordinates,a=[];"Polygon"===i.type&&a.push({type:"polygon",exterior:r[0],interiors:r.slice(1)}),"MultiPolygon"===i.type&&Bt.each(r,(function(t){t[0]&&a.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})}));var o=new nx(n[e||"name"],a,n.cp);return o.properties=n,o}))},ax=Ro.makeInner,ox=k_.makeLabelFormatter,sx=k_.getOptionCategoryInterval,lx=k_.shouldShowAllLabels,ux=ax();function hx(t,e){var n,i,r=cx(t,"labels"),a=sx(e),o=dx(r,a);return o||(Bt.isFunction(a)?n=gx(t,a):(i="auto"===a?function(t){var e=ux(t).autoInterval;return null!=e?e:ux(t).autoInterval=t.calculateCategoryInterval()}(t):a,n=px(t,i)),fx(r,a,{labels:n,labelCategoryInterval:i}))}function cx(t,e){return ux(t)[e]||(ux(t)[e]=[])}function dx(t,e){for(var n=0;n<t.length;n++)if(t[n].key===e)return t[n].value}function fx(t,e,n){return t.push({key:e,value:n}),n}function px(t,e,n){var i=ox(t),r=t.scale,a=r.getExtent(),o=t.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=a[0],h=r.count();0!==u&&l>1&&h/l>2&&(u=Math.round(Math.ceil(u/l)*l));var c=lx(t),d=o.get("showMinLabel")||c,f=o.get("showMaxLabel")||c;d&&u!==a[0]&&g(a[0]);for(var p=u;p<=a[1];p+=l)g(p);function g(t){s.push(n?t:{formattedLabel:i(t),rawLabel:r.getLabel(t),tickValue:t})}return f&&p-l!==a[1]&&g(a[1]),s}function gx(t,e,n){var i=t.scale,r=ox(t),a=[];return Bt.each(i.getTicks(),(function(t){var o=i.getLabel(t);e(t,o)&&a.push(n?t:{formattedLabel:r(t),rawLabel:o,tickValue:t})})),a}var mx={createAxisLabels:function(t){return"category"===t.type?function(t){var e=t.getLabelModel(),n=hx(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(t):function(t){var e=t.scale.getTicks(),n=ox(t);return{labels:Bt.map(e,(function(e,i){return{formattedLabel:n(e,i),rawLabel:t.scale.getLabel(e),tickValue:e}}))}}(t)},createAxisTicks:function(t,e){return"category"===t.type?function(t,e){var n,i,r=cx(t,"ticks"),a=sx(e),o=dx(r,a);if(o)return o;e.get("show")&&!t.scale.isBlank()||(n=[]);if(Bt.isFunction(a))n=gx(t,a,!0);else if("auto"===a){var s=hx(t,t.getLabelModel());i=s.labelCategoryInterval,n=Bt.map(s.labels,(function(t){return t.tickValue}))}else n=px(t,i=a,!0);return fx(r,a,{ticks:n,tickCategoryInterval:i})}(t,e):{ticks:t.scale.getTicks()}},calculateCategoryInterval:function(t){var e=function(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}(t),n=ox(t),i=(e.axisRotate-e.labelRotate)/180*Math.PI,r=t.scale,a=r.getExtent(),o=r.count();if(a[1]-a[0]<1)return 0;var s=1;o>40&&(s=Math.max(1,Math.floor(o/40)));for(var l=a[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),h=Math.abs(u*Math.cos(i)),c=Math.abs(u*Math.sin(i)),d=0,f=0;l<=a[1];l+=s){var p,g,m=Gr.getBoundingRect(n(l),e.font,"center","top");p=1.3*m.width,g=1.3*m.height,d=Math.max(d,p,7),f=Math.max(f,g,7)}var v=d/h,y=f/c;isNaN(v)&&(v=1/0),isNaN(y)&&(y=1/0);var _=Math.max(0,Math.floor(Math.min(v,y))),x=ux(t.model),w=t.getExtent(),b=x.lastAutoInterval,S=x.lastTickCount;return null!=b&&null!=S&&Math.abs(b-_)<=1&&Math.abs(S-o)<=1&&b>_&&x.axisExtend0===w[0]&&x.axisExtend1===w[1]?_=b:(x.lastTickCount=o,x.lastAutoInterval=_,x.axisExtend0=w[0],x.axisExtend1=w[1]),_}},vx=Bt.each,yx=Bt.map,_x=Cc.linearMap,xx=Cc.getPixelPrecision,bx=Cc.round,Sx=mx.createAxisTicks,Mx=mx.createAxisLabels,Tx=mx.calculateCategoryInterval,Ix=[0,1],Cx=function(t,e,n){this.dim=t,this.scale=e,this._extent=n||[0,0],this.inverse=!1,this.onBand=!1};function Dx(t,e){var n=(t[1]-t[0])/e/2;t[0]+=n,t[1]-=n}Cx.prototype={constructor:Cx,contain:function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=n&&t<=i},containData:function(t){return this.scale.contain(t)},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return xx(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var n=this._extent;n[0]=t,n[1]=e},dataToCoord:function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&Dx(n=n.slice(),i.count()),_x(t,Ix,n,e)},coordToData:function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&Dx(n=n.slice(),i.count());var r=_x(t,n,Ix,e);return this.scale.scale(r)},pointToData:function(t,e){},getTicksCoords:function(t){var e=(t=t||{}).tickModel||this.getTickModel(),n=Sx(this,e).ticks,i=yx(n,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this);return function(t,e,n,i){var r=e.length;if(!t.onBand||n||!r)return;var a,o,s=t.getExtent();if(1===r)e[0].coord=s[0],a=e[1]={coord:s[0]};else{var l=e[r-1].tickValue-e[0].tickValue,u=(e[r-1].coord-e[0].coord)/l;vx(e,(function(t){t.coord-=u/2})),o=1+t.scale.getExtent()[1]-e[r-1].tickValue,a={coord:e[r-1].coord+u*o},e.push(a)}var h=s[0]>s[1];c(e[0].coord,s[0])&&(i?e[0].coord=s[0]:e.shift());i&&c(s[0],e[0].coord)&&e.unshift({coord:s[0]});c(s[1],a.coord)&&(i?a.coord=s[1]:e.pop());i&&c(a.coord,s[1])&&e.push({coord:s[1]});function c(t,e){return t=bx(t),e=bx(e),h?t>e:t<e}}(this,i,e.get("alignWithLabel"),t.clamp),i},getMinorTicksCoords:function(){if("ordinal"===this.scale.type)return[];var t=this.model.getModel("minorTick").get("splitNumber");t>0&&t<100||(t=5);var e=this.scale.getMinorTicks(t);return yx(e,(function(t){return yx(t,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this)}),this)},getViewLabels:function(){return Mx(this).labels},getLabelModel:function(){return this.model.getModel("axisLabel")},getTickModel:function(){return this.model.getModel("axisTick")},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return Tx(this)}};var kx=_o,Ax=nn,Ox=se,Lx=Un,Px=Cc,Rx=Vc,Ex=Cg.throttle,Nx=$_,zx=rx,Bx=Pv,Fx=gc,Vx=Cx,Hx=J,Wx=rx,Gx={};Bt.each(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],(function(t){Gx[t]=Bt[t]}));var Ux={};Bt.each(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","setHoverStyle","setLabelStyle","setTextStyle","setText","getFont","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","registerShape","getShapeClass","Group","Image","Text","Circle","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],(function(t){Ux[t]=tc[t]}));var jx,Yx,qx={zrender:kx,matrix:Ax,vector:Ox,color:Lx,number:Px,format:Rx,throttle:Ex,helper:Nx,parseGeoJSON:zx,List:Bx,Model:Fx,Axis:Vx,env:Hx,parseGeoJson:Wx,util:Gx,graphic:Ux},Xx=(jx=function(t,e){var n=Cg.throttle,i=Bt.assert,r=Bt.each,a=Bt.isFunction,o=Bt.isObject,s=rd.parseClassType,l={PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:2e3,CHART:3e3,POST_CHART_LAYOUT:3500,COMPONENT:4e3,BRUSH:5e3}},u="__flagInMainProcess",h="__optionUpdated",c=/^[a-zA-Z0-9_]+$/;function d(t,e){return function(n,i,r){e||!this._disposed?(n=n&&n.toLowerCase(),pe.prototype[t].call(this,n,i,r)):this.id}}function f(){pe.call(this)}function p(t,e,i){i=i||{},"string"==typeof e&&(e=B[e]),this.id,this.group,this._dom=t;var r=this._zr=_o.init(t,{renderer:i.renderer||"canvas",devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height});this._throttledZrFlush=n(Bt.bind(r.flush,r),17),(e=Bt.clone(e))&&Kf(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new Sf;var a,o,s=this._api=(o=(a=this)._coordSysMgr,Bt.extend(new xf(a),{getCoordinateSystems:Bt.bind(o.getCoordinateSystems,o),getComponentByElement:function(t){for(;t;){var e=t.__ecComponentInfo;if(null!=e)return a._model.getComponent(e.mainType,e.index);t=t.parent}}}));function l(t,e){return t.__prio-e.__prio}Vi(z,l),Vi(R,l),this._scheduler=new um(this,s,R,z),pe.call(this,this._ecEventProcessor=new O),this._messageCenter=new f,this._initEvents(),this.resize=Bt.bind(this.resize,this),this._pendingActions=[],r.animation.on("frame",this._onframe,this),function(t,e){t.on("rendered",(function(){e.trigger("rendered"),!t.animation.isFinished()||e[h]||e._scheduler.unfinished||e._pendingActions.length||e.trigger("finished")}))}(r,this),Bt.setAsPrimitive(this)}f.prototype.on=d("on",!0),f.prototype.off=d("off",!0),f.prototype.one=d("one",!0),Bt.mixin(f,pe);var g=p.prototype;function m(t,e,n){if(this._disposed)this.id;else{var i,r=this._model,a=this._coordSysMgr.getCoordinateSystems();e=Ro.parseFinder(r,e);for(var o=0;o<a.length;o++){var s=a[o];if(s[t]&&null!=(i=s[t](r,e,n)))return i}}}g._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[h]){var e=this[h].silent;this[u]=!0,y(this),v.update.call(this),this[u]=!1,this[h]=!1,b.call(this,e),S.call(this,e)}else if(t.unfinished){var n=1,i=this._model;this._api;t.unfinished=!1;do{var r=+new Date;t.performSeriesTasks(i),t.performDataProcessorTasks(i),x(this,i),t.performVisualTasks(i),C(this,this._model,0,"remain"),n-=+new Date-r}while(n>0&&t.unfinished);t.unfinished||this._zr.flush()}}},g.getDom=function(){return this._dom},g.getZr=function(){return this._zr},g.setOption=function(t,e,n){if(this._disposed)this.id;else{var i;if(o(e)&&(n=e.lazyUpdate,i=e.silent,e=e.notMerge),this[u]=!0,!this._model||e){var r=new Lf(this._api),a=this._theme,s=this._model=new yf;s.scheduler=this._scheduler,s.init(null,null,a,r)}this._model.setOption(t,E),n?(this[h]={silent:i},this[u]=!1):(y(this),v.update.call(this),this._zr.flush(),this[h]=!1,this[u]=!1,b.call(this,i),S.call(this,i))}},g.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},g.getModel=function(){return this._model},g.getOption=function(){return this._model&&this._model.getOption()},g.getWidth=function(){return this._zr.getWidth()},g.getHeight=function(){return this._zr.getHeight()},g.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},g.getRenderedCanvas=function(t){if(J.canvasSupported)return(t=t||{}).pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(t)},g.getSvgDataURL=function(){if(J.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return Bt.each(e,(function(t){t.stopAnimation(!0)})),t.painter.toDataURL()}},g.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,n=this._model,i=[],a=this;r(e,(function(t){n.eachComponent({mainType:t},(function(t){var e=a._componentsMap[t.__viewId];e.group.ignore||(i.push(e),e.group.ignore=!0)}))}));var o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return r(i,(function(t){t.group.ignore=!1})),o}this.id},g.getConnectedDataURL=function(t){if(this._disposed)this.id;else if(J.canvasSupported){var e="svg"===t.type,n=this.group,i=Math.min,a=Math.max,o=1/0;if(H[n]){var s=o,l=o,u=-1/0,h=-1/0,c=[],d=t&&t.pixelRatio||1;Bt.each(V,(function(r,o){if(r.group===n){var d=e?r.getZr().painter.getSvgDom().innerHTML:r.getRenderedCanvas(Bt.clone(t)),f=r.getDom().getBoundingClientRect();s=i(f.left,s),l=i(f.top,l),u=a(f.right,u),h=a(f.bottom,h),c.push({dom:d,left:f.left,top:f.top})}}));var f=(u*=d)-(s*=d),p=(h*=d)-(l*=d),g=Bt.createCanvas(),m=_o.init(g,{renderer:e?"svg":"canvas"});if(m.resize({width:f,height:p}),e){var v="";return r(c,(function(t){var e=t.left-s,n=t.top-l;v+='<g transform="translate('+e+","+n+')">'+t.dom+"</g>"})),m.painter.getSvgRoot().innerHTML=v,t.connectedBackgroundColor&&m.painter.setBackgroundColor(t.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}return t.connectedBackgroundColor&&m.add(new tc.Rect({shape:{x:0,y:0,width:f,height:p},style:{fill:t.connectedBackgroundColor}})),r(c,(function(t){var e=new tc.Image({style:{x:t.left*d-s,y:t.top*d-l,image:t.dom}});m.add(e)})),m.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},g.convertToPixel=Bt.curry(m,"convertToPixel"),g.convertFromPixel=Bt.curry(m,"convertFromPixel"),g.containPixel=function(t,e){if(!this._disposed){var n,i=this._model;return t=Ro.parseFinder(i,t),Bt.each(t,(function(t,i){i.indexOf("Models")>=0&&Bt.each(t,(function(t){var r=t.coordinateSystem;if(r&&r.containPoint)n|=!!r.containPoint(e);else if("seriesModels"===i){var a=this._chartsMap[t.__viewId];a&&a.containPoint&&(n|=a.containPoint(e,t))}}),this)}),this),!!n}this.id},g.getVisual=function(t,e){var n=this._model,i=(t=Ro.parseFinder(n,t,{defaultMainType:"series"})).seriesModel.getData(),r=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?i.indexOfRawIndex(t.dataIndex):null;return null!=r?i.getItemVisual(r,e):i.getVisual(e)},g.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},g.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var v={prepareAndUpdate:function(t){y(this),v.update.call(this,t)},update:function(t){var e=this._model,n=this._api,i=this._zr,r=this._coordSysMgr,a=this._scheduler;if(e){a.restoreData(e,t),a.performSeriesTasks(e),r.create(e,n),a.performDataProcessorTasks(e,t),x(this,e),r.update(e,n),T(e),a.performVisualTasks(e,t),I(this,e,n,t);var o=e.get("backgroundColor")||"transparent";if(J.canvasSupported)i.setBackgroundColor(o);else{var s=Un.parse(o);o=Un.stringify(s,"rgb"),0===s[3]&&(o="transparent")}D(e,n)}},updateTransform:function(t){var e=this._model,n=this,i=this._api;if(e){var r=[];e.eachComponent((function(a,o){var s=n.getViewOfComponentModel(o);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(o,e,i,t);l&&l.update&&r.push(s)}else r.push(s)}));var a=Bt.createHashMap();e.eachSeries((function(r){var o=n._chartsMap[r.__viewId];if(o.updateTransform){var s=o.updateTransform(r,e,i,t);s&&s.update&&a.set(r.uid,1)}else a.set(r.uid,1)})),T(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0,dirtyMap:a}),C(n,e,0,t,a),D(e,this._api)}},updateView:function(t){var e=this._model;e&&(xg.markUpdateMethod(t,"updateView"),T(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),I(this,this._model,this._api,t),D(e,this._api))},updateVisual:function(t){v.update.call(this,t)},updateLayout:function(t){v.update.call(this,t)}};function y(t){var e=t._model,n=t._scheduler;n.restorePipelines(e),n.prepareStageTasks(),M(t,"component",e,n),M(t,"chart",e,n),n.plan()}function _(t,e,n,i,a){var o=t._model;if(i){var s={};s[i+"Id"]=n[i+"Id"],s[i+"Index"]=n[i+"Index"],s[i+"Name"]=n[i+"Name"];var l={mainType:i,query:s};a&&(l.subType=a);var u=n.excludeSeriesId;null!=u&&(u=Bt.createHashMap(Ro.normalizeToArray(u))),o&&o.eachComponent(l,(function(e){u&&null!=u.get(e.id)||h(t["series"===i?"_chartsMap":"_componentsMap"][e.__viewId])}),t)}else r(t._componentsViews.concat(t._chartsViews),h);function h(i){i&&i.__alive&&i[e]&&i[e](i.__model,o,t._api,n)}}function x(t,e){var n=t._chartsMap,i=t._scheduler;e.eachSeries((function(t){i.updateStreamModes(t,n[t.__viewId])}))}function w(t,e){var n=t.type,i=t.escapeConnect,a=L[n],o=a.actionInfo,l=(o.update||"update").split(":"),c=l.pop();l=null!=l[0]&&s(l[0]),this[u]=!0;var d=[t],f=!1;t.batch&&(f=!0,d=Bt.map(t.batch,(function(e){return(e=Bt.defaults(Bt.extend({},e),t)).batch=null,e})));var p,g=[],m="highlight"===n||"downplay"===n;r(d,(function(t){(p=(p=a.action(t,this._model,this._api))||Bt.extend({},t)).type=o.event||p.type,g.push(p),m?_(this,c,t,"series"):l&&_(this,c,t,l.main,l.sub)}),this),"none"===c||m||l||(this[h]?(y(this),v.update.call(this,t),this[h]=!1):v[c].call(this,t)),p=f?{type:o.event||n,escapeConnect:i,batch:g}:g[0],this[u]=!1,!e&&this._messageCenter.trigger(p.type,p)}function b(t){for(var e=this._pendingActions;e.length;){var n=e.shift();w.call(this,n,t)}}function S(t){!t&&this.trigger("updated")}function M(t,e,n,i){for(var r="component"===e,a=r?t._componentsViews:t._chartsViews,o=r?t._componentsMap:t._chartsMap,l=t._zr,u=t._api,h=0;h<a.length;h++)a[h].__alive=!1;function c(t){var e="_ec_"+t.id+"_"+t.type,h=o[e];if(!h){var c=s(t.type);(h=new(r?og.getClass(c.main,c.sub):xg.getClass(c.sub))).init(n,u),o[e]=h,a.push(h),l.add(h.group)}t.__viewId=h.__id=e,h.__alive=!0,h.__model=t,h.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},!r&&i.prepareView(h,t,n,u)}for(r?n.eachComponent((function(t,e){"series"!==t&&c(e)})):n.eachSeries(c),h=0;h<a.length;){var d=a[h];d.__alive?h++:(!r&&d.renderTask.dispose(),l.remove(d.group),d.dispose(n,u),a.splice(h,1),delete o[d.__id],d.__id=d.group.__ecComponentInfo=null)}}function T(t){t.clearColorPalette(),t.eachSeries((function(t){t.clearColorPalette()}))}function I(t,e,n,i){!function(t,e,n,i,a){r(a||t._componentsViews,(function(t){var r=t.__model;t.render(r,e,n,i),A(r,t)}))}(t,e,n,i),r(t._chartsViews,(function(t){t.__alive=!1})),C(t,e,0,i),r(t._chartsViews,(function(t){t.__alive||t.remove(e,n)}))}function C(t,e,n,i,r){var a,o=t._scheduler;e.eachSeries((function(e){var n=t._chartsMap[e.__viewId];n.__alive=!0;var s=n.renderTask;o.updatePayload(s,i),r&&r.get(e.uid)&&s.dirty(),a|=s.perform(o.getPerformArgs(s)),n.group.silent=!!e.get("silent"),A(e,n),function(t,e){var n=t.get("blendMode")||null;e.group.traverse((function(t){t.isGroup||t.style.blend!==n&&t.setStyle("blend",n),t.eachPendingDisplayable&&t.eachPendingDisplayable((function(t){t.setStyle("blend",n)}))}))}(e,n)})),o.unfinished|=a,function(t,e){var n=t._zr,i=n.storage,r=0;i.traverse((function(t){r++})),r>e.get("hoverLayerThreshold")&&!J.node&&e.eachSeries((function(e){if(!e.preventUsingHoverLayer){var n=t._chartsMap[e.__viewId];n.__alive&&n.group.traverse((function(t){t.useHoverLayer=!0}))}}))}(t,e),Pg(t._zr.dom,e)}function D(t,e){r(N,(function(n){n(t,e)}))}g.resize=function(t){if(this._disposed)this.id;else{this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),i=t&&t.silent;this[u]=!0,n&&y(this),v.update.call(this),this[u]=!1,b.call(this,i),S.call(this,i)}}},g.showLoading=function(t,e){if(this._disposed)this.id;else if(o(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),F[t]){var n=F[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},g.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},g.makeActionFromEvent=function(t){var e=Bt.extend({},t);return e.type=P[t.type],e},g.dispatchAction=function(t,e){this._disposed?this.id:(o(e)||(e={silent:!!e}),L[t.type]&&this._model&&(this[u]?this._pendingActions.push(t):(w.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&J.browser.weChat&&this._throttledZrFlush(),b.call(this,e.silent),S.call(this,e.silent))))},g.appendData=function(t){if(this._disposed)this.id;else{var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0}},g.on=d("on",!1),g.off=d("off",!1),g.one=d("one",!1);var k=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function A(t,e){var n=t.get("z"),i=t.get("zlevel");e.group.traverse((function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=i&&(t.zlevel=i))}))}function O(){this.eventInfo}g._initEvents=function(){r(k,(function(t){var e=function(e){var n,i=this.getModel(),r=e.target;if("globalout"===t)n={};else if(r&&null!=r.dataIndex){var a=r.dataModel||i.getSeriesByIndex(r.seriesIndex);n=a&&a.getDataParams(r.dataIndex,r.dataType,r)||{}}else r&&r.eventData&&(n=Bt.extend({},r.eventData));if(n){var o=n.componentType,s=n.componentIndex;"markLine"!==o&&"markPoint"!==o&&"markArea"!==o||(o="series",s=n.seriesIndex);var l=o&&null!=s&&i.getComponent(o,s),u=l&&this["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];n.event=e,n.type=t,this._ecEventProcessor.eventInfo={targetEl:r,packedEvent:n,model:l,view:u},this.trigger(t,n)}};e.zrEventfulCallAtLast=!0,this._zr.on(t,e,this)}),this),r(P,(function(t,e){this._messageCenter.on(e,(function(t){this.trigger(e,t)}),this)}),this)},g.isDisposed=function(){return this._disposed},g.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},g.dispose=function(){if(this._disposed)this.id;else{this._disposed=!0,Ro.setAttribute(this.getDom(),U,"");var t=this._api,e=this._model;r(this._componentsViews,(function(n){n.dispose(e,t)})),r(this._chartsViews,(function(n){n.dispose(e,t)})),this._zr.dispose(),delete V[this.id]}},Bt.mixin(p,pe),O.prototype={constructor:O,normalizeQuery:function(t){var e={},n={},i={};if(Bt.isString(t)){var r=s(t);e.mainType=r.main||null,e.subType=r.sub||null}else{var a=["Index","Name","Id"],o={name:1,dataIndex:1,dataType:1};Bt.each(t,(function(t,r){for(var s=!1,l=0;l<a.length;l++){var u=a[l],h=r.lastIndexOf(u);if(h>0&&h===r.length-u.length){var c=r.slice(0,h);"data"!==c&&(e.mainType=c,e[u.toLowerCase()]=t,s=!0)}}o.hasOwnProperty(r)&&(n[r]=t,s=!0),s||(i[r]=t)}))}return{cptQuery:e,dataQuery:n,otherQuery:i}},filter:function(t,e,n){var i=this.eventInfo;if(!i)return!0;var r=i.targetEl,a=i.packedEvent,o=i.model,s=i.view;if(!o||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return h(l,o,"mainType")&&h(l,o,"subType")&&h(l,o,"index","componentIndex")&&h(l,o,"name")&&h(l,o,"id")&&h(u,a,"name")&&h(u,a,"dataIndex")&&h(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,r,a));function h(t,e,n,i){return null==t[n]||e[i||n]===t[n]}},afterTrigger:function(){this.eventInfo=null}};var L={},P={},R=[],E=[],N=[],z=[],B={},F={},V={},H={},W=new Date-0,G=new Date-0,U="_echarts_instance_";function j(t){H[t]=!1}var Y=j;function q(t){return V[Ro.getAttribute(t,U)]}function X(t,e){B[t]=e}function Z(t){E.push(t)}function $(t,e){tt(R,t,e,1e3)}function K(t,e,n){"function"==typeof e&&(n=e,e="");var r=o(t)?t.type:[t,t={event:e}][0];t.event=(t.event||r).toLowerCase(),e=t.event,i(c.test(r)&&c.test(e)),L[r]||(L[r]={action:n,actionInfo:t}),P[e]=r}function Q(t,e){tt(z,t,e,3e3,"visual")}function tt(t,e,n,i,r){(a(e)||o(e))&&(n=e,e=i);var s=um.wrapStageHandler(n,r);return s.__prio=e,s.__raw=n,t.push(s),s}function et(t,e){F[t]=e}Q(2e3,Ag),Z(Kf),$(900,ep),et("default",Eg),K({type:"highlight",event:"highlight",update:"highlight"},Bt.noop),K({type:"downplay",event:"downplay",update:"downplay"},Bt.noop),X("light",cm),X("dark",mm),e.version="4.8.0",e.dependencies={zrender:"4.3.1"},e.PRIORITY=l,e.init=function(t,e,n){var i=q(t);if(i)return i;var a=new p(t,e,n);return a.id="ec_"+W++,V[a.id]=a,Ro.setAttribute(t,U,a.id),function(t){var e="__connectUpdateStatus";function n(t,n){for(var i=0;i<t.length;i++)t[i][e]=n}r(P,(function(i,a){t._messageCenter.on(a,(function(i){if(H[t.group]&&0!==t[e]){if(i&&i.escapeConnect)return;var a=t.makeActionFromEvent(i),o=[];r(V,(function(e){e!==t&&e.group===t.group&&o.push(e)})),n(o,0),r(o,(function(t){1!==t[e]&&t.dispatchAction(a)})),n(o,2)}}))}))}(a),a},e.connect=function(t){if(Bt.isArray(t)){var e=t;t=null,r(e,(function(e){null!=e.group&&(t=e.group)})),t=t||"g_"+G++,r(e,(function(e){e.group=t}))}return H[t]=!0,t},e.disConnect=j,e.disconnect=Y,e.dispose=function(t){"string"==typeof t?t=V[t]:t instanceof p||(t=q(t)),t instanceof p&&!t.isDisposed()&&t.dispose()},e.getInstanceByDom=q,e.getInstanceById=function(t){return V[t]},e.registerTheme=X,e.registerPreprocessor=Z,e.registerProcessor=$,e.registerPostUpdate=function(t){N.push(t)},e.registerAction=K,e.registerCoordinateSystem=function(t,e){Sf.register(t,e)},e.getCoordinateSystemDimensions=function(t){var e=Sf.get(t);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()},e.registerLayout=function(t,e){tt(z,t,e,1e3,"layout")},e.registerVisual=Q,e.registerLoading=et,e.extendComponentModel=function(t){return rd.extend(t)},e.extendComponentView=function(t){return og.extend(t)},e.extendSeriesModel=function(t){return ig.extend(t)},e.extendChartView=function(t){return xg.extend(t)},e.setCanvasCreator=function(t){Bt.$override("createCanvas",t)},e.registerMap=function(t,e,n){Zm.registerMap(t,e,n)},e.getMap=function(t){var e=Zm.retrieveMap(t);return e&&e[0]&&{geoJson:e[0].geoJSON,specialAreas:e[0].specialAreas}},e.dataTool={},function(){for(var t in qx)qx.hasOwnProperty(t)&&(e[t]=qx[t])}()},jx(Yx={exports:{}},Yx.exports),Yx.exports),Zx=Go.enableClassCheck;function $x(t){return"_EC_"+t}var Kx=function(t){this._directed=t||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData},Qx=Kx.prototype;function Jx(t,e){this.id=null==t?"":t,this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=null==e?-1:e}function tw(t,e,n){this.node1=t,this.node2=e,this.dataIndex=null==n?-1:n}Qx.type="graph",Qx.isDirected=function(){return this._directed},Qx.addNode=function(t,e){t=null==t?""+e:""+t;var n=this._nodesMap;if(!n[$x(t)]){var i=new Jx(t,e);return i.hostGraph=this,this.nodes.push(i),n[$x(t)]=i,i}},Qx.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},Qx.getNodeById=function(t){return this._nodesMap[$x(t)]},Qx.addEdge=function(t,e,n){var i=this._nodesMap,r=this._edgesMap;if("number"==typeof t&&(t=this.nodes[t]),"number"==typeof e&&(e=this.nodes[e]),Jx.isInstance(t)||(t=i[$x(t)]),Jx.isInstance(e)||(e=i[$x(e)]),t&&e){var a=t.id+"-"+e.id;if(!r[a]){var o=new tw(t,e,n);return o.hostGraph=this,this._directed&&(t.outEdges.push(o),e.inEdges.push(o)),t.edges.push(o),t!==e&&e.edges.push(o),this.edges.push(o),r[a]=o,o}}},Qx.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},Qx.getEdge=function(t,e){Jx.isInstance(t)&&(t=t.id),Jx.isInstance(e)&&(e=e.id);var n=this._edgesMap;return this._directed?n[t+"-"+e]:n[t+"-"+e]||n[e+"-"+t]},Qx.eachNode=function(t,e){for(var n=this.nodes,i=n.length,r=0;r<i;r++)n[r].dataIndex>=0&&t.call(e,n[r],r)},Qx.eachEdge=function(t,e){for(var n=this.edges,i=n.length,r=0;r<i;r++)n[r].dataIndex>=0&&n[r].node1.dataIndex>=0&&n[r].node2.dataIndex>=0&&t.call(e,n[r],r)},Qx.breadthFirstTraverse=function(t,e,n,i){if(Jx.isInstance(e)||(e=this._nodesMap[$x(e)]),e){for(var r="out"===n?"outEdges":"in"===n?"inEdges":"edges",a=0;a<this.nodes.length;a++)this.nodes[a].__visited=!1;if(!t.call(i,e,null))for(var o=[e];o.length;){var s=o.shift(),l=s[r];for(a=0;a<l.length;a++){var u=l[a],h=u.node1===s?u.node2:u.node1;if(!h.__visited){if(t.call(i,h,s))return;o.push(h),h.__visited=!0}}}}},Qx.update=function(){for(var t=this.data,e=this.edgeData,n=this.nodes,i=this.edges,r=0,a=n.length;r<a;r++)n[r].dataIndex=-1;for(r=0,a=t.count();r<a;r++)n[t.getRawIndex(r)].dataIndex=r;e.filterSelf((function(t){var n=i[e.getRawIndex(t)];return n.node1.dataIndex>=0&&n.node2.dataIndex>=0}));for(r=0,a=i.length;r<a;r++)i[r].dataIndex=-1;for(r=0,a=e.count();r<a;r++)i[e.getRawIndex(r)].dataIndex=r},Qx.clone=function(){for(var t=new Kx(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 r=n[i];t.addEdge(r.node1.id,r.node2.id,r.dataIndex)}return t},Jx.prototype={constructor:Jx,degree:function(){return this.edges.length},inDegree:function(){return this.inEdges.length},outDegree:function(){return this.outEdges.length},getModel:function(t){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(t)}},tw.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(t)};var ew=function(t,e){return{getValue:function(n){var i=this[t][e];return i.get(i.getDimension(n||"value"),this.dataIndex)},setVisual:function(n,i){this.dataIndex>=0&&this[t][e].setItemVisual(this.dataIndex,n,i)},getVisual:function(n,i){return this[t][e].getItemVisual(this.dataIndex,n,i)},setLayout:function(n,i){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,n,i)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}};Bt.mixin(Jx,ew("hostGraph","data")),Bt.mixin(tw,ew("hostGraph","edgeData")),Kx.Node=Jx,Kx.Edge=tw,Zx(Jx),Zx(tw);var nw=Kx,iw=Bt.each,rw="\0__link_datas",aw="\0__link_mainData";function ow(t,e){if(function(t){return t[aw]===t}(this)){var n=Bt.extend({},this[rw]);n[this.dataType]=e,hw(e,n,t)}else cw(e,this.dataType,this[aw],t);return e}function sw(t,e){return t.struct&&t.struct.update(this),e}function lw(t,e){return iw(e[rw],(function(n,i){n!==e&&cw(n.cloneShallow(),i,e,t)})),e}function uw(t){var e=this[aw];return null==t||null==e?e:e[rw][t]}function hw(t,e,n){t[rw]={},iw(e,(function(e,i){cw(e,i,t,n)}))}function cw(t,e,n,i){n[rw][e]=t,t[aw]=n,t.dataType=e,i.struct&&(t[i.structAttr]=i.struct,i.struct[i.datasAttr[e]]=t),t.getLinkedData=uw}var dw=function(t){var e=t.mainData,n=t.datas;n||(n={main:e},t.datasAttr={main:"data"}),t.datas=t.mainData=null,hw(e,n,t),iw(n,(function(n){iw(e.TRANSFERABLE_METHODS,(function(e){n.wrapMethod(e,Bt.curry(ow,t))}))})),e.wrapMethod("cloneShallow",Bt.curry(lw,t)),iw(e.CHANGABLE_METHODS,(function(n){e.wrapMethod(n,Bt.curry(sw,t))})),Bt.assert(n[e.dataType]===e)},fw=dw;var pw=function(t,e,n,i,r){for(var a=new nw(i),o=0;o<t.length;o++)a.addNode(Bt.retrieve(t[o].id,t[o].name,o),o);var s=[],l=[],u=0;for(o=0;o<e.length;o++){var h=e[o],c=h.source,d=h.target;a.addEdge(c,d,u)&&(l.push(h),s.push(Bt.retrieve(h.id,c+" > "+d)),u++)}var f,p=n.get("coordinateSystem");if("cartesian2d"===p||"polar"===p)f=fy(t,n);else{var g=Sf.get(p),m=g&&"view"!==g.type&&g.dimensions||[];Bt.indexOf(m,"value")<0&&m.concat(["value"]);var v=Xv(t,{coordDimensions:m});(f=new Pv(v,n)).initData(t)}var y=new Pv(["value"],n);return y.initData(l,s),r&&r(f,y),fw({mainData:f,struct:a,structAttr:"graph",datas:{node:f,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a};var gw=function(t,e){this.getAllNames=function(){var t=e();return t.mapArray(t.getName)},this.containName=function(t){return e().indexOfName(t)>=0},this.indexOfName=function(e){return t().indexOfName(e)},this.getItemVisual=function(e,n){return t().getItemVisual(e,n)}},mw=Ro.defaultEmphasis,vw=Vc.encodeHTML,yw=Xx.extendSeriesModel({type:"series.graph",init:function(t){yw.superApply(this,"init",arguments);var e=this;function n(){return e._categoriesData}this.legendVisualProvider=new gw(n,n),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){yw.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){yw.superApply(this,"mergeDefaultAndTheme",arguments),mw(t,["edgeLabel"],["show"])},getInitialData:function(t,e){var n=t.edges||t.links||[],i=t.data||t.nodes||[],r=this;if(i&&n)return pw(i,n,this,!0,(function(t,n){t.wrapMethod("getItemModel",(function(t){var e=r._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t}));var i=r.getModel("edgeLabel"),a=new gc({label:i.option},i.parentModel,e),o=r.getModel("emphasis.edgeLabel"),s=new gc({emphasis:{label:o.option}},o.parentModel,e);function l(t){return(t=this.parsePath(t))&&"label"===t[0]?a:t&&"emphasis"===t[0]&&"label"===t[1]?s:this.parentModel}n.wrapMethod("getItemModel",(function(t){return t.customizeGetParent(l),t}))})).data},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,n){if("edge"===n){var i=this.getData(),r=this.getDataParams(t,n),a=i.graph.getEdgeByIndex(t),o=i.getName(a.node1.dataIndex),s=i.getName(a.node2.dataIndex),l=[];return null!=o&&l.push(o),null!=s&&l.push(s),l=vw(l.join(" > ")),r.value&&(l+=" : "+vw(r.value)),l}return yw.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var t=Bt.map(this.option.categories||[],(function(t){return null!=t.value?t:Bt.extend({value:0},t)})),e=new Pv(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray((function(t){return e.getItemModel(t,!0)}))},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},isAnimationEnabled:function(){return yw.superCall(this,"isAnimationEnabled")&&!("force"===this.get("layout")&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{label:{show:!0}}}}),_w=Mp.retrieveRawValue;var xw=function(t,e){var n=t.mapDimension("defaultedLabel",!0),i=n.length;if(1===i)return _w(t,e,n[0]);if(i){for(var r=[],a=0;a<n.length;a++){var o=_w(t,e,n[a]);r.push(o)}return r.join(" ")}},ww={getDefaultLabel:xw},bw=G_.createSymbol,Sw=Cc.parsePercent,Mw=ww.getDefaultLabel;function Tw(t,e,n){tc.Group.call(this),this.updateData(t,e,n)}var Iw=Tw.prototype,Cw=Tw.getSymbolSize=function(t,e){var n=t.getItemVisual(e,"symbolSize");return n instanceof Array?n.slice():[+n,+n]};function Dw(t){return[t[0]/2,t[1]/2]}function kw(t,e){this.parent.drift(t,e)}Iw._createSymbol=function(t,e,n,i,r){this.removeAll();var a=e.getItemVisual(n,"color"),o=bw(t,-1,-1,2,2,a,r);o.attr({z2:100,culling:!0,scale:Dw(i)}),o.drift=kw,this._symbolType=t,this.add(o)},Iw.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(t)},Iw.getSymbolPath=function(){return this.childAt(0)},Iw.getScale=function(){return this.childAt(0).scale},Iw.highlight=function(){this.childAt(0).trigger("emphasis")},Iw.downplay=function(){this.childAt(0).trigger("normal")},Iw.setZ=function(t,e){var n=this.childAt(0);n.zlevel=t,n.z=e},Iw.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":e.cursor},Iw.updateData=function(t,e,n){this.silent=!1;var i=t.getItemVisual(e,"symbol")||"circle",r=t.hostModel,a=Cw(t,e),o=i!==this._symbolType;if(o){var s=t.getItemVisual(e,"symbolKeepAspect");this._createSymbol(i,t,e,a,s)}else{(l=this.childAt(0)).silent=!1,tc.updateProps(l,{scale:Dw(a)},r,e)}if(this._updateCommon(t,e,a,n),o){var l=this.childAt(0),u=n&&n.fadeIn,h={scale:l.scale.slice()};u&&(h.style={opacity:l.style.opacity}),l.scale=[0,0],u&&(l.style.opacity=0),tc.initProps(l,h,r,e)}this._seriesModel=r};var Aw=["itemStyle"],Ow=["emphasis","itemStyle"],Lw=["label"],Pw=["emphasis","label"];function Rw(t,e){if(!this.incremental&&!this.useHoverLayer)if("emphasis"===e){var n=this.__symbolOriginalScale,i=n[1]/n[0],r={scale:[Math.max(1.1*n[0],n[0]+3),Math.max(1.1*n[1],n[1]+3*i)]};this.animateTo(r,400,"elasticOut")}else"normal"===e&&this.animateTo({scale:this.__symbolOriginalScale},400,"elasticOut")}Iw._updateCommon=function(t,e,n,i){var r=this.childAt(0),a=t.hostModel,o=t.getItemVisual(e,"color");"image"!==r.type?r.useStyle({strokeNoScale:!0}):r.setStyle({opacity:null,shadowBlur:null,shadowOffsetX:null,shadowOffsetY:null,shadowColor:null});var s=i&&i.itemStyle,l=i&&i.hoverItemStyle,u=i&&i.symbolOffset,h=i&&i.labelModel,c=i&&i.hoverLabelModel,d=i&&i.hoverAnimation,f=i&&i.cursorStyle;if(!i||t.hasItemOption){var p=i&&i.itemModel?i.itemModel:t.getItemModel(e);s=p.getModel(Aw).getItemStyle(["color"]),l=p.getModel(Ow).getItemStyle(),u=p.getShallow("symbolOffset"),h=p.getModel(Lw),c=p.getModel(Pw),d=p.getShallow("hoverAnimation"),f=p.getShallow("cursor")}else l=Bt.extend({},l);var g=r.style,m=t.getItemVisual(e,"symbolRotate");r.attr("rotation",(m||0)*Math.PI/180||0),u&&r.attr("position",[Sw(u[0],n[0]),Sw(u[1],n[1])]),f&&r.attr("cursor",f),r.setColor(o,i&&i.symbolInnerColor),r.setStyle(s);var v=t.getItemVisual(e,"opacity");null!=v&&(g.opacity=v);var y=t.getItemVisual(e,"liftZ"),_=r.__z2Origin;null!=y?null==_&&(r.__z2Origin=r.z2,r.z2+=y):null!=_&&(r.z2=_,r.__z2Origin=null);var x=i&&i.useNameLabel;tc.setLabelStyle(g,l,h,c,{labelFetcher:a,labelDataIndex:e,defaultText:function(e,n){return x?t.getName(e):Mw(t,e)},isRectText:!0,autoColor:o}),r.__symbolOriginalScale=Dw(n),r.hoverStyle=l,r.highDownOnUpdate=d&&a.isAnimationEnabled()?Rw:null,tc.setHoverStyle(r)},Iw.fadeOut=function(t,e){var n=this.childAt(0);this.silent=n.silent=!0,(!e||!e.keepLabel)&&(n.style.text=null),tc.updateProps(n,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,t)},Bt.inherits(Tw,tc.Group);var Ew=Tw,Nw=Bt.isObject;function zw(t){this.group=new tc.Group,this._symbolCtor=t||Ew}var Bw=zw.prototype;function Fw(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 Vw(t){return null==t||Nw(t)||(t={isIgnore:t}),t||{}}function Hw(t){var e=t.hostModel;return{itemStyle:e.getModel("itemStyle").getItemStyle(["color"]),hoverItemStyle:e.getModel("emphasis.itemStyle").getItemStyle(),symbolRotate:e.get("symbolRotate"),symbolOffset:e.get("symbolOffset"),hoverAnimation:e.get("hoverAnimation"),labelModel:e.getModel("label"),hoverLabelModel:e.getModel("emphasis.label"),cursorStyle:e.get("cursor")}}Bw.updateData=function(t,e){e=Vw(e);var n=this.group,i=t.hostModel,r=this._data,a=this._symbolCtor,o=Hw(t);r||n.removeAll(),t.diff(r).add((function(i){var r=t.getItemLayout(i);if(Fw(t,r,i,e)){var s=new a(t,i,o);s.attr("position",r),t.setItemGraphicEl(i,s),n.add(s)}})).update((function(s,l){var u=r.getItemGraphicEl(l),h=t.getItemLayout(s);Fw(t,h,s,e)?(u?(u.updateData(t,s,o),tc.updateProps(u,{position:h},i)):(u=new a(t,s)).attr("position",h),n.add(u),t.setItemGraphicEl(s,u)):n.remove(u)})).remove((function(t){var e=r.getItemGraphicEl(t);e&&e.fadeOut((function(){n.remove(e)}))})).execute(),this._data=t},Bw.isPersistent=function(){return!0},Bw.updateLayout=function(){var t=this._data;t&&t.eachItemGraphicEl((function(e,n){var i=t.getItemLayout(n);e.attr("position",i)}))},Bw.incrementalPrepareUpdate=function(t){this._seriesScope=Hw(t),this._data=null,this.group.removeAll()},Bw.incrementalUpdate=function(t,e,n){function i(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}n=Vw(n);for(var r=t.start;r<t.end;r++){var a=e.getItemLayout(r);if(Fw(e,a,r,n)){var o=new this._symbolCtor(e,r,this._seriesScope);o.traverse(i),o.attr("position",a),this.group.add(o),e.setItemGraphicEl(r,o)}}},Bw.remove=function(t){var e=this.group,n=this._data;n&&t?n.eachItemGraphicEl((function(t){t.fadeOut((function(){e.remove(t)}))})):e.removeAll()};var Ww=zw,Gw=tc.Line.prototype,Uw=tc.BezierCurve.prototype;function jw(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}var Yw=tc.extendShape({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){this[jw(e)?"_buildPathLine":"_buildPathCurve"](t,e)},_buildPathLine:Gw.buildPath,_buildPathCurve:Uw.buildPath,pointAt:function(t){return this[jw(this.shape)?"_pointAtLine":"_pointAtCurve"](t)},_pointAtLine:Gw.pointAt,_pointAtCurve:Uw.pointAt,tangentAt:function(t){var e=this.shape,n=jw(e)?[e.x2-e.x1,e.y2-e.y1]:this._tangentAtCurve(t);return se.normalize(n,n)},_tangentAtCurve:Uw.tangentAt}),qw=Cc.round,Xw=["fromSymbol","toSymbol"];function Zw(t){return"_"+t+"Type"}function $w(t,e,n){var i=e.getItemVisual(n,"color"),r=e.getItemVisual(n,t),a=e.getItemVisual(n,t+"Size");if(r&&"none"!==r){Bt.isArray(a)||(a=[a,a]);var o=G_.createSymbol(r,-a[0]/2,-a[1]/2,a[0],a[1],i);return o.name=t,o}}function Kw(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;var n=e[2];n?(t.cpx1=n[0],t.cpy1=n[1]):(t.cpx1=NaN,t.cpy1=NaN)}function Qw(t,e,n){tc.Group.call(this),this._createLine(t,e,n)}var Jw=Qw.prototype;Jw.beforeUpdate=function(){var t=this,e=t.childOfName("fromSymbol"),n=t.childOfName("toSymbol"),i=t.childOfName("label");if(e||n||!i.ignore){for(var r=1,a=this.parent;a;)a.scale&&(r/=a.scale[0]),a=a.parent;var o=t.childOfName("line");if(this.__dirty||o.__dirty){var s=o.shape.percent,l=o.pointAt(0),u=o.pointAt(s),h=se.sub([],u,l);if(se.normalize(h,h),e){e.attr("position",l);var c=o.tangentAt(0);e.attr("rotation",Math.PI/2-Math.atan2(c[1],c[0])),e.attr("scale",[r*s,r*s])}if(n){n.attr("position",u);c=o.tangentAt(1);n.attr("rotation",-Math.PI/2-Math.atan2(c[1],c[0])),n.attr("scale",[r*s,r*s])}if(!i.ignore){var d,f,p,g;i.attr("position",u);var m=i.__labelDistance,v=m[0]*r,y=m[1]*r,_=s/2,x=[(c=o.tangentAt(_))[1],-c[0]],w=o.pointAt(_);x[1]>0&&(x[0]=-x[0],x[1]=-x[1]);var b,S=c[0]<0?-1:1;if("start"!==i.__position&&"end"!==i.__position){var M=-Math.atan2(c[1],c[0]);u[0]<l[0]&&(M=Math.PI+M),i.attr("rotation",M)}switch(i.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":b=-y,p="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":b=y,p="top";break;default:b=0,p="middle"}switch(i.__position){case"end":d=[h[0]*v+u[0],h[1]*y+u[1]],f=h[0]>.8?"left":h[0]<-.8?"right":"center",p=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":d=[-h[0]*v+l[0],-h[1]*y+l[1]],f=h[0]>.8?"right":h[0]<-.8?"left":"center",p=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":d=[v*S+l[0],l[1]+b],f=c[0]<0?"right":"left",g=[-v*S,-b];break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":d=[w[0],w[1]+b],f="center",g=[0,-b];break;case"insideEndTop":case"insideEnd":case"insideEndBottom":d=[-v*S+u[0],u[1]+b],f=c[0]>=0?"right":"left",g=[v*S,-b]}i.attr({style:{textVerticalAlign:i.__verticalAlign||p,textAlign:i.__textAlign||f},position:d,scale:[r,r],origin:g})}}}},Jw._createLine=function(t,e,n){var i=t.hostModel,r=function(t){var e=new Yw({name:"line",subPixelOptimize:!0});return Kw(e.shape,t),e}(t.getItemLayout(e));r.shape.percent=0,tc.initProps(r,{shape:{percent:1}},i,e),this.add(r);var a=new tc.Text({name:"label",lineLabelOriginalOpacity:1});this.add(a),Bt.each(Xw,(function(n){var i=$w(n,t,e);this.add(i),this[Zw(n)]=t.getItemVisual(e,n)}),this),this._updateCommonStl(t,e,n)},Jw.updateData=function(t,e,n){var i=t.hostModel,r=this.childOfName("line"),a=t.getItemLayout(e),o={shape:{}};Kw(o.shape,a),tc.updateProps(r,o,i,e),Bt.each(Xw,(function(n){var i=t.getItemVisual(e,n),r=Zw(n);if(this[r]!==i){this.remove(this.childOfName(n));var a=$w(n,t,e);this.add(a)}this[r]=i}),this),this._updateCommonStl(t,e,n)},Jw._updateCommonStl=function(t,e,n){var i=t.hostModel,r=this.childOfName("line"),a=n&&n.lineStyle,o=n&&n.hoverLineStyle,s=n&&n.labelModel,l=n&&n.hoverLabelModel;if(!n||t.hasItemOption){var u=t.getItemModel(e);a=u.getModel("lineStyle").getLineStyle(),o=u.getModel("emphasis.lineStyle").getLineStyle(),s=u.getModel("label"),l=u.getModel("emphasis.label")}var h=t.getItemVisual(e,"color"),c=Bt.retrieve3(t.getItemVisual(e,"opacity"),a.opacity,1);r.useStyle(Bt.defaults({strokeNoScale:!0,fill:"none",stroke:h,opacity:c},a)),r.hoverStyle=o,Bt.each(Xw,(function(t){var e=this.childOfName(t);e&&(e.setColor(h),e.setStyle({opacity:c}))}),this);var d,f,p=s.getShallow("show"),g=l.getShallow("show"),m=this.childOfName("label");if((p||g)&&(d=h||"#000",null==(f=i.getFormattedLabel(e,"normal",t.dataType)))){var v=i.getRawValue(e);f=null==v?t.getName(e):isFinite(v)?qw(v):v}var y=p?f:null,_=g?Bt.retrieve2(i.getFormattedLabel(e,"emphasis",t.dataType),f):null,x=m.style;if(null!=y||null!=_){tc.setTextStyle(m.style,s,{text:y},{autoColor:d}),m.__textAlign=x.textAlign,m.__verticalAlign=x.textVerticalAlign,m.__position=s.get("position")||"middle";var w=s.get("distance");Bt.isArray(w)||(w=[w,w]),m.__labelDistance=w}m.hoverStyle=null!=_?{text:_,textFill:l.getTextColor(!0),fontStyle:l.getShallow("fontStyle"),fontWeight:l.getShallow("fontWeight"),fontSize:l.getShallow("fontSize"),fontFamily:l.getShallow("fontFamily")}:{text:null},m.ignore=!p&&!g,tc.setHoverStyle(this)},Jw.highlight=function(){this.trigger("emphasis")},Jw.downplay=function(){this.trigger("normal")},Jw.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},Jw.setLinePoints=function(t){var e=this.childOfName("line");Kw(e.shape,t),e.dirty()},Bt.inherits(Qw,tc.Group);var tb=Qw;function eb(t){this._ctor=t||tb,this.group=new tc.Group}var nb=eb.prototype;function ib(t){var e=t.hostModel;return{lineStyle:e.getModel("lineStyle").getLineStyle(),hoverLineStyle:e.getModel("emphasis.lineStyle").getLineStyle(),labelModel:e.getModel("label"),hoverLabelModel:e.getModel("emphasis.label")}}function rb(t){return isNaN(t[0])||isNaN(t[1])}function ab(t){return!rb(t[0])&&!rb(t[1])}nb.isPersistent=function(){return!0},nb.updateData=function(t){var e=this,n=e.group,i=e._lineData;e._lineData=t,i||n.removeAll();var r=ib(t);t.diff(i).add((function(n){!function(t,e,n,i){var r=e.getItemLayout(n);if(!ab(r))return;var a=new t._ctor(e,n,i);e.setItemGraphicEl(n,a),t.group.add(a)}(e,t,n,r)})).update((function(n,a){!function(t,e,n,i,r,a){var o=e.getItemGraphicEl(i);if(!ab(n.getItemLayout(r)))return void t.group.remove(o);o?o.updateData(n,r,a):o=new t._ctor(n,r,a);n.setItemGraphicEl(r,o),t.group.add(o)}(e,i,t,a,n,r)})).remove((function(t){n.remove(i.getItemGraphicEl(t))})).execute()},nb.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl((function(e,n){e.updateLayout(t,n)}),this)},nb.incrementalPrepareUpdate=function(t){this._seriesScope=ib(t),this._lineData=null,this.group.removeAll()},nb.incrementalUpdate=function(t,e){function n(t){t.isGroup||function(t){return t.animators&&t.animators.length>0}(t)||(t.incremental=t.useHoverLayer=!0)}for(var i=t.start;i<t.end;i++){if(ab(e.getItemLayout(i))){var r=new this._ctor(e,i,this._seriesScope);r.traverse(n),this.group.add(r),e.setItemGraphicEl(i,r)}}},nb.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},nb._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var ob=eb,sb="\0_ec_interaction_mutex";function lb(t){return t[sb]||(t[sb]={})}Xx.registerAction({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},(function(){}));var ub={take:function(t,e,n){lb(t)[e]=n},release:function(t,e,n){var i=lb(t);i[e]===n&&(i[e]=null)},isTaken:function(t,e){return!!lb(t)[e]}};function hb(t){this.pointerChecker,this._zr=t,this._opt={};var e=Bt.bind,n=e(cb,this),i=e(db,this),r=e(fb,this),a=e(pb,this),o=e(gb,this);pe.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(e,s){this.disable(),this._opt=Bt.defaults(Bt.clone(s)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==e&&(e=!0),!0!==e&&"move"!==e&&"pan"!==e||(t.on("mousedown",n),t.on("mousemove",i),t.on("mouseup",r)),!0!==e&&"scale"!==e&&"zoom"!==e||(t.on("mousewheel",a),t.on("pinch",o))},this.disable=function(){t.off("mousedown",n),t.off("mousemove",i),t.off("mouseup",r),t.off("mousewheel",a),t.off("pinch",o)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function cb(t){if(!(Re.isMiddleOrRightButtonOnMouseUpDown(t)||t.target&&t.target.draggable)){var e=t.offsetX,n=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,n)&&(this._x=e,this._y=n,this._dragging=!0)}}function db(t){if(this._dragging&&yb("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!ub.isTaken(this._zr,"globalPan")){var e=t.offsetX,n=t.offsetY,i=this._x,r=this._y,a=e-i,o=n-r;this._x=e,this._y=n,this._opt.preventDefaultMouseMove&&Re.stop(t.event),vb(this,"pan","moveOnMouseMove",t,{dx:a,dy:o,oldX:i,oldY:r,newX:e,newY:n})}}function fb(t){Re.isMiddleOrRightButtonOnMouseUpDown(t)||(this._dragging=!1)}function pb(t){var e=yb("zoomOnMouseWheel",t,this._opt),n=yb("moveOnMouseWheel",t,this._opt),i=t.wheelDelta,r=Math.abs(i),a=t.offsetX,o=t.offsetY;if(0!==i&&(e||n)){if(e){var s=r>3?1.4:r>1?1.2:1.1;mb(this,"zoom","zoomOnMouseWheel",t,{scale:i>0?s:1/s,originX:a,originY:o})}if(n){var l=Math.abs(i);mb(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(i>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:a,originY:o})}}}function gb(t){ub.isTaken(this._zr,"globalPan")||mb(this,"zoom",null,t,{scale:t.pinchScale>1?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY})}function mb(t,e,n,i,r){t.pointerChecker&&t.pointerChecker(i,r.originX,r.originY)&&(Re.stop(i.event),vb(t,e,n,i,r))}function vb(t,e,n,i,r){r.isAvailableBehavior=Bt.bind(yb,null,n,i),t.trigger(e,r)}function yb(t,e,n){var i=n[t];return!t||i&&(!Bt.isString(i)||e.event[i+"Key"])}Bt.mixin(hb,pe);var _b=hb;var xb=function(t,e,n,i){var r=t.target,a=t.zoomLimit,o=r.position,s=r.scale,l=t.zoom=t.zoom||1;if(l*=e,a){var u=a.min||0,h=a.max||1/0;l=Math.max(Math.min(h,l),u)}var c=l/t.zoom;t.zoom=l,o[0]-=(n-o[0])*(c-1),o[1]-=(i-o[1])*(c-1),s[0]*=c,s[1]*=c,r.dirty()},wb={updateViewOnPan:function(t,e,n){var i=t.target,r=i.position;r[0]+=e,r[1]+=n,i.dirty()},updateViewOnZoom:xb},bb={axisPointer:1,tooltip:1,brush:1};var Sb=function(t,e,n){var i=e.getComponentByElement(t.topTarget),r=i&&i.coordinateSystem;return i&&i!==n&&!bb[i.mainType]&&r&&r.model!==n},Mb={onIrrelevantElement:Sb};var Tb={getNodeGlobalScale:function(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var n=t.option.nodeScaleRatio,i=e.scale,r=i&&i[0]||1;return((e.getZoom()-1)*n+1)/r},getSymbolSize:function(t){var e=t.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}},Ib=Tb.getSymbolSize,Cb=[],Db=[],kb=[],Ab=ys.quadraticAt,Ob=se.distSquare,Lb=Math.abs;function Pb(t,e,n){for(var i,r=t[0],a=t[1],o=t[2],s=1/0,l=n*n,u=.1,h=.1;h<=.9;h+=.1){Cb[0]=Ab(r[0],a[0],o[0],h),Cb[1]=Ab(r[1],a[1],o[1],h),(f=Lb(Ob(Cb,e)-l))<s&&(s=f,i=h)}for(var c=0;c<32;c++){var d=i+u;Db[0]=Ab(r[0],a[0],o[0],i),Db[1]=Ab(r[1],a[1],o[1],i),kb[0]=Ab(r[0],a[0],o[0],d),kb[1]=Ab(r[1],a[1],o[1],d);var f=Ob(Db,e)-l;if(Lb(f)<.01)break;var p=Ob(kb,e)-l;u/=2,f<0?p>=0?i+=u:i-=u:p>=0?i-=u:i+=u}return i}var Rb=function(t,e){var n=[],i=ys.quadraticSubdivide,r=[[],[],[]],a=[[],[]],o=[];e/=2,t.eachEdge((function(t,s){var l=t.getLayout(),u=t.getVisual("fromSymbol"),h=t.getVisual("toSymbol");l.__original||(l.__original=[se.clone(l[0]),se.clone(l[1])],l[2]&&l.__original.push(se.clone(l[2])));var c=l.__original;if(null!=l[2]){if(se.copy(r[0],c[0]),se.copy(r[1],c[2]),se.copy(r[2],c[1]),u&&"none"!==u){var d=Ib(t.node1),f=Pb(r,c[0],d*e);i(r[0][0],r[1][0],r[2][0],f,n),r[0][0]=n[3],r[1][0]=n[4],i(r[0][1],r[1][1],r[2][1],f,n),r[0][1]=n[3],r[1][1]=n[4]}if(h&&"none"!==h){d=Ib(t.node2),f=Pb(r,c[1],d*e);i(r[0][0],r[1][0],r[2][0],f,n),r[1][0]=n[1],r[2][0]=n[2],i(r[0][1],r[1][1],r[2][1],f,n),r[1][1]=n[1],r[2][1]=n[2]}se.copy(l[0],r[0]),se.copy(l[1],r[2]),se.copy(l[2],r[1])}else{if(se.copy(a[0],c[0]),se.copy(a[1],c[1]),se.sub(o,a[1],a[0]),se.normalize(o,o),u&&"none"!==u){d=Ib(t.node1);se.scaleAndAdd(a[0],a[0],o,d*e)}if(h&&"none"!==h){d=Ib(t.node2);se.scaleAndAdd(a[1],a[1],o,-d*e)}se.copy(l[0],a[0]),se.copy(l[1],a[1])}}))},Eb=Mb.onIrrelevantElement,Nb=Tb.getNodeGlobalScale,zb="__focusNodeAdjacency",Bb="__unfocusNodeAdjacency",Fb=["itemStyle","opacity"],Vb=["lineStyle","opacity"];function Hb(t,e){var n=t.getVisual("opacity");return null!=n?n:t.getModel().get(e)}function Wb(t,e,n){var i=t.getGraphicEl(),r=Hb(t,e);null!=n&&(null==r&&(r=1),r*=n),i.downplay&&i.downplay(),i.traverse((function(t){if(!t.isGroup){var e=t.lineLabelOriginalOpacity;null!=e&&null==n||(e=r),t.setStyle("opacity",e)}}))}function Gb(t,e){var n=Hb(t,e),i=t.getGraphicEl();i.traverse((function(t){!t.isGroup&&t.setStyle("opacity",n)})),i.highlight&&i.highlight()}Xx.extendChartView({type:"graph",init:function(t,e){var n=new Ww,i=new ob,r=this.group;this._controller=new _b(e.getZr()),this._controllerHost={target:r},r.add(n.group),r.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},render:function(t,e,n){var i=this,r=t.coordinateSystem;this._model=t;var a=this._symbolDraw,o=this._lineDraw,s=this.group;if("view"===r.type){var l={position:r.position,scale:r.scale};this._firstRender?s.attr(l):tc.updateProps(s,l,t)}Rb(t.getGraph(),Nb(t));var u=t.getData();a.updateData(u);var h=t.getEdgeData();o.updateData(h),this._updateNodeAndLinkScale(),this._updateController(t,e,n),clearTimeout(this._layoutTimeout);var c=t.forceLayout,d=t.get("force.layoutAnimation");c&&this._startForceLayoutIteration(c,d),u.eachItemGraphicEl((function(e,r){var a=u.getItemModel(r);e.off("drag").off("dragend");var o=a.get("draggable");o&&e.on("drag",(function(){c&&(c.warmUp(),!this._layouting&&this._startForceLayoutIteration(c,d),c.setFixed(r),u.setItemLayout(r,e.position))}),this).on("dragend",(function(){c&&c.setUnfixed(r)}),this),e.setDraggable(o&&c),e[zb]&&e.off("mouseover",e[zb]),e[Bb]&&e.off("mouseout",e[Bb]),a.get("focusNodeAdjacency")&&(e.on("mouseover",e[zb]=function(){i._clearTimer(),n.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,dataIndex:e.dataIndex})}),e.on("mouseout",e[Bb]=function(){i._dispatchUnfocus(n)}))}),this),u.graph.eachEdge((function(e){var r=e.getGraphicEl();r[zb]&&r.off("mouseover",r[zb]),r[Bb]&&r.off("mouseout",r[Bb]),e.getModel().get("focusNodeAdjacency")&&(r.on("mouseover",r[zb]=function(){i._clearTimer(),n.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,edgeDataIndex:e.dataIndex})}),r.on("mouseout",r[Bb]=function(){i._dispatchUnfocus(n)}))}));var f="circular"===t.get("layout")&&t.get("circular.rotateLabel"),p=u.getLayout("cx"),g=u.getLayout("cy");u.eachItemGraphicEl((function(t,e){var n=u.getItemModel(e).get("label.rotate")||0,i=t.getSymbolPath();if(f){var r=u.getItemLayout(e),a=Math.atan2(r[1]-g,r[0]-p);a<0&&(a=2*Math.PI+a);var o=r[0]<p;o&&(a-=Math.PI);var s=o?"left":"right";tc.modifyLabelStyle(i,{textRotation:-a,textPosition:s,textOrigin:"center"},{textPosition:s})}else tc.modifyLabelStyle(i,{textRotation:n*=Math.PI/180})})),this._firstRender=!1},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={},this._clearTimer()},_dispatchUnfocus:function(t,e){var n=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout((function(){n._unfocusDelayTimer=null,t.dispatchAction({type:"unfocusNodeAdjacency",seriesId:n._model.id})}),500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(t,e,n,i){var r=t.getData().graph,a=i.dataIndex,o=i.edgeDataIndex,s=r.getNodeByIndex(a),l=r.getEdgeByIndex(o);(s||l)&&(r.eachNode((function(t){Wb(t,Fb,.1)})),r.eachEdge((function(t){Wb(t,Vb,.1)})),s&&(Gb(s,Fb),Bt.each(s.edges,(function(t){t.dataIndex<0||(Gb(t,Vb),Gb(t.node1,Fb),Gb(t.node2,Fb))}))),l&&(Gb(l,Vb),Gb(l.node1,Fb),Gb(l.node2,Fb)))},unfocusNodeAdjacency:function(t,e,n,i){var r=t.getData().graph;r.eachNode((function(t){Wb(t,Fb)})),r.eachEdge((function(t){Wb(t,Vb)}))},_startForceLayoutIteration:function(t,e){var n=this;!function i(){t.step((function(t){n.updateLayout(n._model),(n._layouting=!t)&&(e?n._layoutTimeout=setTimeout(i,16):i())}))}()},_updateController:function(t,e,n){var i=this._controller,r=this._controllerHost,a=this.group;i.setPointerChecker((function(e,i,r){var o=a.getBoundingRect();return o.applyTransform(a.transform),o.contain(i,r)&&!Eb(e,n,t)})),"view"===t.coordinateSystem.type?(i.enable(t.get("roam")),r.zoomLimit=t.get("scaleLimit"),r.zoom=t.coordinateSystem.getZoom(),i.off("pan").off("zoom").on("pan",(function(e){wb.updateViewOnPan(r,e.dx,e.dy),n.dispatchAction({seriesId:t.id,type:"graphRoam",dx:e.dx,dy:e.dy})})).on("zoom",(function(e){wb.updateViewOnZoom(r,e.scale,e.originX,e.originY),n.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:e.scale,originX:e.originX,originY:e.originY}),this._updateNodeAndLinkScale(),Rb(t.getGraph(),Nb(t)),this._lineDraw.updateLayout()}),this)):i.disable()},_updateNodeAndLinkScale:function(){var t=this._model,e=t.getData(),n=Nb(t),i=[n,n];e.eachItemGraphicEl((function(t,e){t.attr("scale",i)}))},updateLayout:function(t){Rb(t.getGraph(),Nb(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()}});var Ub=function(t,e,n){var i=t.getZoom(),r=t.getCenter(),a=e.zoom,o=t.dataToPoint(r);if(null!=e.dx&&null!=e.dy){o[0]-=e.dx,o[1]-=e.dy;r=t.pointToData(o);t.setCenter(r)}if(null!=a){if(n){var s=n.min||0,l=n.max||1/0;a=Math.max(Math.min(i*a,l),s)/i}t.scale[0]*=a,t.scale[1]*=a;var u=t.position,h=(e.originX-u[0])*(a-1),c=(e.originY-u[1])*(a-1);u[0]-=h,u[1]-=c,t.updateTransform();r=t.pointToData(o);t.setCenter(r),t.setZoom(a*i)}return{center:t.getCenter(),zoom:t.getZoom()}},jb={updateCenterAndZoom:Ub};Xx.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},(function(){})),Xx.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},(function(){}));var Yb=jb.updateCenterAndZoom;Xx.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},(function(t,e){e.eachComponent({mainType:"series",query:t},(function(e){var n=e.coordinateSystem,i=Yb(n,t);e.setCenter&&e.setCenter(i.center),e.setZoom&&e.setZoom(i.zoom)}))}));var qb=function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.eachSeriesByType("graph",(function(t){var n=t.getCategoriesData(),i=t.getGraph().data,r=n.mapArray(n.getName);i.filterSelf((function(t){var n=i.getItemModel(t).getShallow("category");if(null!=n){"number"==typeof n&&(n=r[n]);for(var a=0;a<e.length;a++)if(!e[a].isSelected(n))return!1}return!0}))}),this)},Xb=Bt.isFunction;var Zb=function(t,e,n){return{seriesType:t,performRawSeries:!0,reset:function(t,i,r){var a=t.getData(),o=t.get("symbol"),s=t.get("symbolSize"),l=t.get("symbolKeepAspect"),u=t.get("symbolRotate"),h=Xb(o),c=Xb(s),d=Xb(u),f=h||c||d,p=!h&&o?o:e,g=c?null:s;if(a.setVisual({legendSymbol:n||p,symbol:p,symbolSize:g,symbolKeepAspect:l,symbolRotate:u}),!i.isSeriesFiltered(t))return{dataEach:a.hasItemOption||f?function(e,n){if(f){var i=t.getRawValue(n),r=t.getDataParams(n);h&&e.setItemVisual(n,"symbol",o(i,r)),c&&e.setItemVisual(n,"symbolSize",s(i,r)),d&&e.setItemVisual(n,"symbolRotate",u(i,r))}if(e.hasItemOption){var a=e.getItemModel(n),l=a.getShallow("symbol",!0),p=a.getShallow("symbolSize",!0),g=a.getShallow("symbolRotate",!0),m=a.getShallow("symbolKeepAspect",!0);null!=l&&e.setItemVisual(n,"symbol",l),null!=p&&e.setItemVisual(n,"symbolSize",p),null!=g&&e.setItemVisual(n,"symbolRotate",g),null!=m&&e.setItemVisual(n,"symbolKeepAspect",m)}}:null}}}};var $b=function(t){var e={};t.eachSeriesByType("graph",(function(t){var n=t.getCategoriesData(),i=t.getData(),r={};n.each((function(i){var a=n.getName(i);r["ec-"+a]=i;var o=n.getItemModel(i),s=o.get("itemStyle.color")||t.getColorFromPalette(a,e);n.setItemVisual(i,"color",s);for(var l=["opacity","symbol","symbolSize","symbolKeepAspect"],u=0;u<l.length;u++){var h=o.getShallow(l[u],!0);null!=h&&n.setItemVisual(i,l[u],h)}})),n.count()&&i.each((function(t){var e=i.getItemModel(t).getShallow("category");if(null!=e){"string"==typeof e&&(e=r["ec-"+e]);for(var a=["color","opacity","symbol","symbolSize","symbolKeepAspect"],o=0;o<a.length;o++)null==i.getItemVisual(t,a[o],!0)&&i.setItemVisual(t,a[o],n.getItemVisual(e,a[o]))}}))}))};function Kb(t){return t instanceof Array||(t=[t,t]),t}var Qb=function(t){t.eachSeriesByType("graph",(function(t){var e=t.getGraph(),n=t.getEdgeData(),i=Kb(t.get("edgeSymbol")),r=Kb(t.get("edgeSymbolSize")),a="lineStyle.color".split("."),o="lineStyle.opacity".split(".");n.setVisual("fromSymbol",i&&i[0]),n.setVisual("toSymbol",i&&i[1]),n.setVisual("fromSymbolSize",r&&r[0]),n.setVisual("toSymbolSize",r&&r[1]),n.setVisual("color",t.get(a)),n.setVisual("opacity",t.get(o)),n.each((function(t){var i=n.getItemModel(t),r=e.getEdgeByIndex(t),s=Kb(i.getShallow("symbol",!0)),l=Kb(i.getShallow("symbolSize",!0)),u=i.get(a),h=i.get(o);switch(u){case"source":u=r.node1.getVisual("color");break;case"target":u=r.node2.getVisual("color")}s[0]&&r.setVisual("fromSymbol",s[0]),s[1]&&r.setVisual("toSymbol",s[1]),l[0]&&r.setVisual("fromSymbolSize",l[0]),l[1]&&r.setVisual("toSymbolSize",l[1]),r.setVisual("color",u),r.setVisual("opacity",h)}))}))};function Jb(t){t.eachEdge((function(t){var e=t.getModel().get("lineStyle.curveness")||0,n=se.clone(t.node1.getLayout()),i=se.clone(t.node2.getLayout()),r=[n,i];+e&&r.push([(n[0]+i[0])/2-(n[1]-i[1])*e,(n[1]+i[1])/2-(i[0]-n[0])*e]),t.setLayout(r)}))}var tS=function(t){var e=t.coordinateSystem;if(!e||"view"===e.type){var n=t.getGraph();n.eachNode((function(t){var e=t.getModel();t.setLayout([+e.get("x"),+e.get("y")])})),Jb(n)}},eS={simpleLayout:tS,simpleLayoutEdge:Jb},nS=Bt.each,iS=eS.simpleLayout,rS=eS.simpleLayoutEdge;var aS=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(),r=[];nS(n.dimensions,(function(t){r=r.concat(i.mapDimension(t,!0))}));for(var a=0;a<i.count();a++){for(var o=[],s=!1,l=0;l<r.length;l++){var u=i.get(r[l],a);isNaN(u)||(s=!0),o.push(u)}s?i.setItemLayout(a,n.dataToPoint(o)):i.setItemLayout(a,[NaN,NaN])}rS(i.graph)}else e&&"none"!==e||iS(t)}))},oS=Tb.getSymbolSize,sS=Tb.getNodeGlobalScale,lS=Math.PI,uS=[];var hS={value:function(t,e,n,i,r,a,o,s){var l=0,u=i.getSum("value"),h=2*Math.PI/(u||s);n.eachNode((function(t){var e=t.getValue("value"),n=h*(u?e:1)/2;l+=n,t.setLayout([r*Math.cos(l)+a,r*Math.sin(l)+o]),l+=n}))},symbolSize:function(t,e,n,i,r,a,o,s){var l=0;uS.length=s;var u=sS(t);n.eachNode((function(t){var e=oS(t);isNaN(e)&&(e=2),e<0&&(e=0),e*=u;var n=Math.asin(e/2/r);isNaN(n)&&(n=lS/2),uS[t.dataIndex]=n,l+=2*n}));var h=(2*lS-l)/s/2,c=0;n.eachNode((function(t){var e=h+uS[t.dataIndex];c+=e,t.setLayout([r*Math.cos(c)+a,r*Math.sin(c)+o]),c+=e}))}},cS={circularLayout:function(t,e){var n=t.coordinateSystem;if(!n||"view"===n.type){var i=n.getBoundingRect(),r=t.getData(),a=r.graph,o=i.width/2+i.x,s=i.height/2+i.y,l=Math.min(i.width,i.height)/2,u=r.count();r.setLayout({cx:o,cy:s}),u&&(hS[e](t,n,a,r,l,o,s,u),a.eachEdge((function(t){var e,n=t.getModel().get("lineStyle.curveness")||0,i=se.clone(t.node1.getLayout()),r=se.clone(t.node2.getLayout()),a=(i[0]+r[0])/2,l=(i[1]+r[1])/2;+n&&(e=[o*(n*=3)+a*(1-n),s*n+l*(1-n)]),t.setLayout([i,r,e])})))}}},dS=cS.circularLayout;var fS=function(t){t.eachSeriesByType("graph",(function(t){"circular"===t.get("layout")&&dS(t,"symbolSize")}))},pS=se.scaleAndAdd;var gS=function(t,e,n){for(var i=n.rect,r=i.width,a=i.height,o=[i.x+r/2,i.y+a/2],s=null==n.gravity?.1:n.gravity,l=0;l<t.length;l++){var u=t[l];u.p||(u.p=se.create(r*(Math.random()-.5)+o[0],a*(Math.random()-.5)+o[1])),u.pp=se.clone(u.p),u.edges=null}var h=null==n.friction?.6:n.friction,c=h;return{warmUp:function(){c=.8*h},setFixed:function(e){t[e].fixed=!0},setUnfixed:function(e){t[e].fixed=!1},step:function(n){for(var i=[],r=t.length,a=0;a<e.length;a++){var l=e[a];if(!l.ignoreForceLayout){var u=l.n1,h=l.n2;se.sub(i,h.p,u.p);var d=se.len(i)-l.d,f=h.w/(u.w+h.w);isNaN(f)&&(f=0),se.normalize(i,i),!u.fixed&&pS(u.p,u.p,i,f*d*c),!h.fixed&&pS(h.p,h.p,i,-(1-f)*d*c)}}for(a=0;a<r;a++){(v=t[a]).fixed||(se.sub(i,o,v.p),pS(v.p,v.p,i,s*c))}for(a=0;a<r;a++){u=t[a];for(var p=a+1;p<r;p++){h=t[p];se.sub(i,h.p,u.p),0===(d=se.len(i))&&(se.set(i,Math.random()-.5,Math.random()-.5),d=1);var g=(u.rep+h.rep)/d/d;!u.fixed&&pS(u.pp,u.pp,i,g),!h.fixed&&pS(h.pp,h.pp,i,-g)}}var m=[];for(a=0;a<r;a++){var v;(v=t[a]).fixed||(se.sub(m,v.p,v.pp),pS(v.p,v.p,m,c),se.copy(v.pp,v.p))}c*=.992,n&&n(t,e,c<.01)}}},mS={forceLayout:gS}.forceLayout,vS=eS.simpleLayout,yS=cS.circularLayout,_S=Cc.linearMap;var xS=function(t){t.eachSeriesByType("graph",(function(t){if(!(c=t.coordinateSystem)||"view"===c.type)if("force"===t.get("layout")){var e=t.preservedPoints||{},n=t.getGraph(),i=n.data,r=n.edgeData,a=t.getModel("force"),o=a.get("initLayout");t.preservedPoints?i.each((function(t){var n=i.getId(t);i.setItemLayout(t,e[n]||[NaN,NaN])})):o&&"none"!==o?"circular"===o&&yS(t,"value"):vS(t);var s=i.getDataExtent("value"),l=r.getDataExtent("value"),u=a.get("repulsion"),h=a.get("edgeLength");Bt.isArray(u)||(u=[u,u]),Bt.isArray(h)||(h=[h,h]),h=[h[1],h[0]];var c,d=i.mapArray("value",(function(t,e){var n=i.getItemLayout(e),r=_S(t,s,u);return isNaN(r)&&(r=(u[0]+u[1])/2),{w:r,rep:r,fixed:i.getItemModel(e).get("fixed"),p:!n||isNaN(n[0])||isNaN(n[1])?null:n}})),f=r.mapArray("value",(function(t,e){var i=n.getEdgeByIndex(e),r=_S(t,l,h);isNaN(r)&&(r=(h[0]+h[1])/2);var a=i.getModel();return{n1:d[i.node1.dataIndex],n2:d[i.node2.dataIndex],d:r,curveness:a.get("lineStyle.curveness")||0,ignoreForceLayout:a.get("ignoreForceLayout")}})),p=(c=t.coordinateSystem).getBoundingRect(),g=mS(d,f,{rect:p,gravity:a.get("gravity"),friction:a.get("friction")}),m=g.step;g.step=function(t){for(var r=0,a=d.length;r<a;r++)d[r].fixed&&se.copy(d[r].p,n.getNodeByIndex(r).getLayout());m((function(r,a,o){for(var s=0,l=r.length;s<l;s++)r[s].fixed||n.getNodeByIndex(s).setLayout(r[s].p),e[i.getId(s)]=r[s].p;for(s=0,l=a.length;s<l;s++){var u=a[s],h=n.getEdgeByIndex(s),c=u.n1.p,d=u.n2.p,f=h.getLayout();(f=f?f.slice():[])[0]=f[0]||[],f[1]=f[1]||[],se.copy(f[0],c),se.copy(f[1],d),+u.curveness&&(f[2]=[(c[0]+d[0])/2-(c[1]-d[1])*u.curveness,(c[1]+d[1])/2-(d[0]-c[0])*u.curveness]),h.setLayout(f)}t&&t(o)}))},t.forceLayout=g,t.preservedPoints=e,g.step()}else t.forceLayout=null}))},wS=se.applyTransform;function bS(){dn.call(this)}function SS(t){this.name=t,this.zoomLimit,dn.call(this),this._roamTransformable=new bS,this._rawTransformable=new bS,this._center,this._zoom}function MS(t,e,n,i){var r=n.seriesModel,a=r?r.coordinateSystem:null;return a===this?a[t](i):null}Bt.mixin(bS,dn),SS.prototype={constructor:SS,type:"view",dimensions:["x","y"],setBoundingRect:function(t,e,n,i){return this._rect=new Ai(t,e,n,i),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(t,e,n,i){this.transformTo(t,e,n,i),this._viewRect=new Ai(t,e,n,i)},transformTo:function(t,e,n,i){var r=this.getBoundingRect(),a=this._rawTransformable;a.transform=r.calculateTransform(new Ai(t,e,n,i)),a.decomposeTransform(),this._updateTransform()},setCenter:function(t){t&&(this._center=t,this._updateCenterAndZoom())},setZoom:function(t){t=t||1;var e=this.zoomLimit;e&&(null!=e.max&&(t=Math.min(e.max,t)),null!=e.min&&(t=Math.max(e.min,t))),this._zoom=t,this._updateCenterAndZoom()},getDefaultCenter:function(){var t=this.getBoundingRect();return[t.x+t.width/2,t.y+t.height/2]},getCenter:function(){return this._center||this.getDefaultCenter()},getZoom:function(){return this._zoom||1},getRoamTransform:function(){return this._roamTransformable.getLocalTransform()},_updateCenterAndZoom:function(){var t=this._rawTransformable.getLocalTransform(),e=this._roamTransformable,n=this.getDefaultCenter(),i=this.getCenter(),r=this.getZoom();i=se.applyTransform([],i,t),n=se.applyTransform([],n,t),e.origin=i,e.position=[n[0]-i[0],n[1]-i[1]],e.scale=[r,r],this._updateTransform()},_updateTransform:function(){var t=this._roamTransformable,e=this._rawTransformable;e.parent=t,t.updateTransform(),e.updateTransform(),nn.copy(this.transform||(this.transform=[]),e.transform||nn.create()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],nn.invert(this.invTransform,this.transform),this.decomposeTransform()},getTransformInfo:function(){var t=this._roamTransformable.transform,e=this._rawTransformable;return{roamTransform:t?Bt.slice(t):nn.create(),rawScale:Bt.slice(e.scale),rawPosition:Bt.slice(e.position)}},getViewRect:function(){return this._viewRect},getViewRectAfterRoam:function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},dataToPoint:function(t,e,n){var i=e?this._rawTransform:this.transform;return n=n||[],i?wS(n,t,i):se.copy(n,t)},pointToData:function(t){var e=this.invTransform;return e?wS([],t,e):[t[0],t[1]]},convertToPixel:Bt.curry(MS,"dataToPoint"),convertFromPixel:Bt.curry(MS,"pointToData"),containPoint:function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])}},Bt.mixin(SS,dn);var TS=SS,IS=Qc.getLayoutRect;var CS=function(t,e){var n=[];return t.eachSeriesByType("graph",(function(t){var i=t.get("coordinateSystem");if(!i||"view"===i){var r=t.getData(),a=r.mapArray((function(t){var e=r.getItemModel(t);return[+e.get("x"),+e.get("y")]})),o=[],s=[];Rs.fromPoints(a,o,s),s[0]-o[0]==0&&(s[0]+=1,o[0]-=1),s[1]-o[1]==0&&(s[1]+=1,o[1]-=1);var l=(s[0]-o[0])/(s[1]-o[1]),u=function(t,e,n){var i=t.getBoxLayoutParams();return i.aspect=n,IS(i,{width:e.getWidth(),height:e.getHeight()})}(t,e,l);isNaN(l)&&(o=[u.x,u.y],s=[u.x+u.width,u.y+u.height]);var h=s[0]-o[0],c=s[1]-o[1],d=u.width,f=u.height,p=t.coordinateSystem=new TS;p.zoomLimit=t.get("scaleLimit"),p.setBoundingRect(o[0],o[1],h,c),p.setViewRect(u.x,u.y,d,f),p.setCenter(t.get("center")),p.setZoom(t.get("zoom")),n.push(p)}})),n};Xx.registerProcessor(qb),Xx.registerVisual(Zb("graph","circle",null)),Xx.registerVisual($b),Xx.registerVisual(Qb),Xx.registerLayout(aS),Xx.registerLayout(Xx.PRIORITY.VISUAL.POST_CHART_LAYOUT,fS),Xx.registerLayout(xS),Xx.registerCoordinateSystem("graphView",{create:CS});var DS={"微区分析":["军工","机械制造","电子信息技术","新型材料","医药健康","环保科技","新型能源","有色金属","智能装备","农业","传统能源"],"有机分析":["军工","新型材料","医药健康","环保科技","新型能源","有色金属","农业","文物保护"],"无机分析":["军工","机械制造","电子信息技术","新型材料","医药健康","环保科技","新型能源","有色金属","智能装备","农业","传统能源"],"物性分析":["军工","机械制造","电子信息技术","新型材料","新型能源","有色金属","智能装备","传统能源"]};let kS=class extends s.Component{constructor(t){super(t),this.chartRef=s.createRef(),this.padding="10vh 4vh 4vh",this.generateData=()=>{const t=["#D54040","#FAD75C","#0BDD99","#00D8FF"],e=["#A45AE9","#485D9F","#485D9F","#B5A03E"],n={},i={},r=[];return Object.entries(DS).forEach((([a,o],s)=>{n[a]=n[a]||{id:a,name:a,value:1,itemStyle:{normal:{color:t[s%t.length]}}},o.forEach(((t,n)=>{i[t]=i[t]||{id:t,name:t,value:1,itemStyle:{normal:{color:e[n%e.length]}}},r.push({source:a,target:t,value:1})}))})),{nodes:Object.values(n).concat(Object.values(i)),links:r}},this.generateChartOption=()=>{const{nodes:t,links:e}=this.generateData();return{series:[{left:60,right:60,top:60,bottom:60,type:"graph",layout:"circular",circular:{rotateLabel:!0},nodes:t,links:e,label:{normal:{show:!0,color:"#cde0ff",fontSize:12}},lineStyle:{color:"source",curveness:.3}}]}},n.reaction((()=>t.gpui.params.padding),(t=>{this.padding=t||"10vh 4vh 4vh"}),{fireImmediately:!0})}componentDidMount(){this.chart=this.chart||Xx.init(this.chartRef.current),window.addEventListener("resize",(()=>{this.chart.resize()})),this.chart.setOption(this.generateChartOption(),{notMerge:!0})}render(){return s.createElement("div",{className:"g__index",style:{padding:this.padding}},s.createElement("div",{className:u},s.createElement("div",{ref:this.chartRef,className:h})))}};return l([n.observable],kS.prototype,"padding",void 0),kS=l([function(t){if(!0===t.isMobxInjector&&console.warn("Mobx observer: You are trying to use 'observer' on a component that already has 'inject'. Please apply 'observer' before applying 'inject'"),Z&&t.$$typeof===Z)throw new Error("Mobx observer: You are trying to use 'observer' on a function component wrapped in either another observer or 'React.memo'. The observer already applies 'React.memo' for you.");if(X&&t.$$typeof===X){var n=t.render;if("function"!=typeof n)throw new Error("render property of ForwardRef was not a function");return e.forwardRef((function(){var t=arguments;return e.createElement(T,null,(function(){return n.apply(void 0,t)}))}))}return"function"!=typeof t||t.prototype&&t.prototype.render||t.isReactClass||Object.prototype.isPrototypeOf.call(e.Component,t)?G(t):S(t)}],kS),kS}));
