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}function u(t,e,n,i){return new(n||(n=Promise))((function(r,a){function o(t){try{l(i.next(t))}catch(t){a(t)}}function s(t){try{l(i.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,s)}l((i=i.apply(t,e||[])).next())}))}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 h="index-module_main__fxJZg",c="index-module_chart__xRUFU";if(a.default(".index-module_main__fxJZg {\n  position: relative;\n  width: 100%;\n  height: 100%; }\n  .index-module_main__fxJZg .index-module_chart__xRUFU {\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 d(){return d=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},d.apply(this,arguments)}function f(){var t=e.useState(0)[1];return e.useCallback((function(){t((function(t){return t+1}))}),[])}function p(t){return n.getDependencyTree(t)}var g,v=1e4,m=new Set;function y(){void 0===g&&(g=setTimeout(x,1e4))}function x(){g=void 0;var t=Date.now();m.forEach((function(e){var n=e.current;n&&t>=n.cleanAt&&(n.reaction.dispose(),e.current=null,m.delete(e))})),m.size>0&&y()}var _={};function w(t){return"observer"+t}function b(t,e,i){void 0===e&&(e="observed"),void 0===i&&(i=_);var r,a=(i.useForceUpdate||f)(),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()+v,reaction:t}}(l);s.current=u,r=s,m.add(r),y()}var h,c,d=s.current.reaction;if(o.default.useDebugValue(d,p),o.default.useEffect((function(){var t;return t=s,m.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}}),[]),d.track((function(){try{h=t()}catch(t){c=t}})),c)throw c;return h}function S(t,n){var i,r=d({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){T[n]||Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}(t,i),i.displayName=a,i}var T={$$typeof:!0,render:!0,compare:!0,type:!0};function C(t){var e=t.children,n=t.render,i=e||n;return"function"!=typeof i?null:b(i)}function M(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`.")}C.propTypes={children:M,render:M},C.displayName="Observer";var A=0;var I={};function k(t){return I[t]||(I[t]=function(t){if("function"==typeof Symbol)return Symbol(t);var e="__$mobx-react "+t+" ("+A+")";return A++,e}(t)),I[t]}function D(t,e){if(P(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])||!P(t[n[r]],e[n[r]]))return!1;return!0}function P(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function O(t,e,n){Object.hasOwnProperty.call(t,e)?t[e]=n:Object.defineProperty(t,e,{enumerable:!1,configurable:!0,writable:!0,value:n})}var L=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 B(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 N(t,e,n){var i=function(t,e){var n=t[L]=t[L]||{},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=z(t,e,r?r.enumerable:void 0,i,a);Object.defineProperty(t,e,o)}}function z(t,e,n,i,r){var a,o=B(r,i);return(a={})[R]=!0,a.get=function(){return o},a.set=function(r){if(this===t)o=B(r,i);else{var a=z(this,e,n,i,r);Object.defineProperty(this,e,a)}},a.configurable=!0,a.enumerable=n,a}var F=n.$mobx||"$mobx",H=k("isUnmounted"),W=k("skipRender"),V=k("isForcingUpdate");function U(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!==G)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}else n.shouldComponentUpdate=G;Y(n,"props"),Y(n,"state");var i=n.render;return n.render=function(){return j.call(this,i)},N(n,"componentWillUnmount",(function(){this.render[F]&&this.render[F].dispose(),this[H]=!0})),t}function j(t){var i=this;O(this,W,!1),O(this,V,!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[H])){var t=!0;try{O(i,V,!0),i[W]||e.Component.prototype.forceUpdate.call(i),t=!1}finally{O(i,V,!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 G(t,e){return this.state!==e||!D(this.props,t)}function Y(t,e){var i=k("reactProp_"+e+"_valueHolder"),r=k("reactProp_"+e+"_atomHolder");function a(){return this[r]||O(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[V]||D(this[i],t)?O(this,i,t):(O(this,i,t),O(this,W,!0),a.call(this).reportChanged(),O(this,W,!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:{};function K(t){var e={exports:{}};return t(e,e.exports),e.exports}"undefined"!=typeof window||void 0!==$&&$.__DEV__;var J=2311;var Q=function(){return J++};var tt="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),et={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},nt={"[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},it=Object.prototype.toString,rt=Array.prototype,at=rt.forEach,ot=rt.filter,st=rt.slice,lt=rt.map,ut=rt.reduce,ht={};function ct(t){if(null==t||"object"!=typeof t)return t;var e=t,n=it.call(t);if("[object Array]"===n){if(!St(t)){e=[];for(var i=0,r=t.length;i<r;i++)e[i]=ct(t[i])}}else if(nt[n]){if(!St(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]=ct(t[i])}}}else if(!et[n]&&!St(t)&&!wt(t))for(var o in e={},t)t.hasOwnProperty(o)&&(e[o]=ct(t[o]));return e}function dt(t,e,n){if(!xt(e)||!xt(t))return n?ct(e):t;for(var i in e)if(e.hasOwnProperty(i)){var r=t[i],a=e[i];!xt(a)||!xt(r)||yt(a)||yt(r)||wt(a)||wt(r)||_t(a)||_t(r)||St(a)||St(r)?!n&&i in t||(t[i]=ct(e[i])):dt(r,a,n)}return t}function ft(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 pt,gt=function(){return ht.createCanvas()};function vt(t,e,n){if(t&&e)if(t.forEach&&t.forEach===at)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=st.call(arguments,2);return function(){return t.apply(e,n.concat(st.call(arguments)))}}function yt(t){return"[object Array]"===it.call(t)}function xt(t){var e=typeof t;return"function"===e||!!t&&"object"===e}function _t(t){return!!et[it.call(t)]}function wt(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}ht.createCanvas=function(){return document.createElement("canvas")};var bt="__ec_primitive__";function St(t){return t[bt]}function Tt(t){var e=yt(t);this.data={};var n=this;function i(t,i){e?n.set(t,i):n.set(i,t)}t instanceof Tt?t.each(i):t&&vt(t,i)}Tt.prototype={constructor:Tt,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 Ct=function(t,e){for(var n=t[0],i=1,r=t.length;i<r;i++)n=dt(n,t[i],e);return n},Mt=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},At=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},It=function(t,e,n){if(t&&e){if(t.map&&t.map===lt)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}},kt=function(t,e,n,i){if(t&&e){if(t.reduce&&t.reduce===ut)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}},Dt=function(t,e,n){if(t&&e){if(t.filter&&t.filter===ot)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}},Pt=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]},Ot=function(t){var e=st.call(arguments,1);return function(){return t.apply(this,e.concat(st.call(arguments)))}},Lt=function(t){for(var e=0,n=arguments.length;e<n;e++)if(null!=arguments[e])return arguments[e]},Rt=function(){return Function.call.apply(st,arguments)},Et=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},Bt=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},Nt={$override:function(t,e){"createCanvas"===t&&(pt=null),ht[t]=e},clone:ct,merge:dt,mergeAll:Ct,extend:function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},defaults:ft,createCanvas:gt,getContext:function(){return pt||(pt=gt().getContext("2d")),pt},indexOf:Mt,inherits:At,mixin:function(t,e,n){ft(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,n)},isArrayLike:function(t){if(t)return"string"!=typeof t&&"number"==typeof t.length},each:vt,map:It,reduce:kt,filter:Dt,find:Pt,bind:mt,curry:Ot,isArray:yt,isFunction:function(t){return"function"==typeof t},isString:function(t){return"[object String]"===it.call(t)},isObject:xt,isBuiltInObject:_t,isTypedArray:function(t){return!!nt[it.call(t)]},isDom:wt,eqNaN:function(t){return t!=t},retrieve:Lt,retrieve2:function(t,e){return null!=t?t:e},retrieve3:function(t,e,n){return null!=t?t:null!=e?e:n},slice:Rt,normalizeCssArray:Et,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[bt]=!0},isPrimitive:St,createHashMap:function(t){return new Tt(t)},concatArray:Bt,noop:function(){}},zt="undefined"==typeof Float32Array?Array:Float32Array;function Ft(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 Vt(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 zt(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},Gt=function(t){var e=new zt(2);return e[0]=t[0],e[1]=t[1],e},Yt=function(t,e,n){return t[0]=e,t[1]=n,t},qt=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t},Xt=function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t},Zt=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],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},Jt=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t},Qt=function(t,e){var n=Ft(e);return 0===n?(t[0]=0,t[1]=0):(t[0]=e[0]/n,t[1]=e[1]/n),t},te=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},ee=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},ne=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},ie=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t},re=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t},ae={create:Ut,copy:jt,clone:Gt,set:Yt,add:qt,scaleAndAdd:Xt,sub:Zt,len:Ft,length:Ft,lenSquare:Ht,lengthSquare:Ht,mul:$t,div:Kt,dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},scale:Jt,normalize:Qt,distance:Wt,dist:Wt,distanceSquare:Vt,distSquare:Vt,negate:te,lerp:ee,applyTransform:ne,min:ie,max:re};function oe(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}function se(t,e){return{target:t,topTarget:e&&e.topTarget}}oe.prototype={constructor:oe,_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(se(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(se(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(se(s,t),"dragleave",t.event),o&&o!==s&&this.dispatchToElement(se(o,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(se(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(se(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};var le=oe,ue=Array.prototype.slice,he=function(t){this._$handlers={},this._$eventProcessor=t};function ce(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}he.prototype={constructor:he,one:function(t,e,n,i){return ce(this,t,e,n,i,!0)},on:function(t,e,n,i){return ce(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=ue.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=ue.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 de=he,fe=Math.log(2);function pe(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)/fe);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]*pe(t,e-1,h,u,r|p,a),f++)}return a[o]=c,c}var ge=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=pe(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)*pe(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}}},ve={buildTransformer:ge}.buildTransformer,me="___zrEVENTSAVED",ye=[];function xe(t,e,n,i,r){if(e.getBoundingClientRect&&tt.domSupported&&!_e(e)){var a=e[me]||(e[me]={}),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?ve(l,s):ve(s,l))}(o,a,r);if(s)return s(t,n,i),!0}return!1}function _e(t){return"CANVAS"===t.nodeName.toUpperCase()}var we=function(t,e,n,i,r){return xe(ye,e,i,r,!0)&&xe(t,n,ye[0],ye[1])},be={transformLocalCoord:we,transformCoordWithViewport:xe,isCanvasEl:_e},Se=de,Te=be.isCanvasEl,Ce=be.transformCoordWithViewport,Me="undefined"!=typeof window&&!!window.addEventListener,Ae=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ie=[];function ke(t,e,n,i){return n=n||{},i||!tt.canvasSupported?De(t,e,n):tt.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):De(t,e,n),n}function De(t,e,n){if(tt.domSupported&&t.getBoundingClientRect){var i=e.clientX,r=e.clientY;if(Te(t)){var a=t.getBoundingClientRect();return n.zrX=i-a.left,void(n.zrY=r-a.top)}if(Ce(Ie,t,i,r))return n.zrX=Ie[0],void(n.zrY=Ie[1])}n.zrX=n.zrY=0}function Pe(t){return t||window.event}var Oe={Dispatcher:Se,clientToLocal:ke,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&&ke(t,r,e,n)}else ke(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&&Ae.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e},addEventListener:function(t,e,n,i){Me?t.addEventListener(e,n,i):t.attachEvent("on"+e,n)},removeEventListener:function(t,e,n,i){Me?t.removeEventListener(e,n,i):t.detachEvent("on"+e,n)},stop:Me?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}},Le=function(){this._track=[]};function Re(t){var e=t[1][0]-t[0][0],n=t[1][1]-t[0][1];return Math.sqrt(e*e+n*n)}Le.prototype={constructor:Le,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=Oe.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 Ee)if(Ee.hasOwnProperty(e)){var n=Ee[e](this._track,t);if(n)return n}}};var Ee={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=Re(r)/Re(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=Le,Ne="silent";function ze(){Oe.stop(this.event)}function Fe(){}Fe.prototype.dispose=function(){};var He=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],We=function(t,e,n,i){de.call(this),this.storage=t,this.painter=e,this.painterRoot=i,n=n||new Fe,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,le.call(this),this.setHandlerProxy(n)};function Ve(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||Ne}return!1}function Ue(t,e,n){var i=t.painter;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}We.prototype={constructor:We,setHandlerProxy:function(t){this.proxy&&this.proxy.dispose(),t&&(Nt.each(He,(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=Ue(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:ze}}(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=Ve(i[a],t,e))&&(!r.topTarget&&(r.topTarget=i[a]),o!==Ne)){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)}}},Nt.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){We.prototype[t]=function(e){var n,i,r=e.zrX,a=e.zrY,o=Ue(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||ae.dist(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}})),Nt.mixin(We,de),Nt.mixin(We,le);var je=We,Ge="undefined"==typeof Float32Array?Array:Float32Array;function Ye(){var t=new Ge(6);return qe(t),t}function qe(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Xe(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 Ze=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},$e=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},Ke=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},Je=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},Qe=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},tn={create:Ye,identity:qe,copy:Xe,mul:Ze,translate:$e,rotate:Ke,scale:Je,invert:Qe,clone:function(t){var e=Ye();return Xe(e,t),e}},en=tn.identity,nn=5e-5;function rn(t){return t>nn||t<-5e-5}var an=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},on=an.prototype;on.transform=null,on.needLocalTransform=function(){return rn(this.rotation)||rn(this.position[0])||rn(this.position[1])||rn(this.scale[0]-1)||rn(this.scale[1]-1)};var sn=[];on.updateTransform=function(){var t=this.parent,e=t&&t.transform,n=this.needLocalTransform(),i=this.transform;if(n||e){i=i||tn.create(),n?this.getLocalTransform(i):en(i),e&&(n?tn.mul(i,t.transform,i):tn.copy(i,t.transform)),this.transform=i;var r=this.globalScaleRatio;if(null!=r&&1!==r){this.getGlobalScale(sn);var a=sn[0]<0?-1:1,o=sn[1]<0?-1:1,s=((sn[0]-a)*r+a)/sn[0]||0,l=((sn[1]-o)*r+o)/sn[1]||0;i[0]*=s,i[1]*=s,i[2]*=l,i[3]*=l}this.invTransform=this.invTransform||tn.create(),tn.invert(this.invTransform,i)}else i&&en(i)},on.getLocalTransform=function(t){return an.getLocalTransform(this,t)},on.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)},on.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var ln=[],un=tn.create();on.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;rn(e-1)&&(e=Math.sqrt(e)),rn(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)}},on.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(tn.mul(ln,t.invTransform,e),e=ln);var n=this.origin;n&&(n[0]||n[1])&&(un[4]=n[0],un[5]=n[1],tn.mul(ln,e,un),ln[4]-=n[0],ln[5]-=n[1],e=ln),this.setLocalTransform(e)}},on.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)},on.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&ae.applyTransform(n,n,i),n},on.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&ae.applyTransform(n,n,i),n},an.getLocalTransform=function(t,e){en(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]),tn.scale(e,e,i),r&&tn.rotate(e,e,r),n&&(e[4]+=n[0],e[5]+=n[1]),e[4]+=a[0],e[5]+=a[1],e};var hn=an,cn={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-cn.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*cn.bounceIn(2*t):.5*cn.bounceOut(2*t-1)+.5}},dn=cn;function fn(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}fn.prototype={constructor:fn,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?dn[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 pn=fn,gn=function(){this.head=null,this.tail=null,this._len=0},vn=gn.prototype;vn.insert=function(t){var e=new mn(t);return this.insertEntry(e),e},vn.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++},vn.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--},vn.len=function(){return this._len},vn.clear=function(){this.head=this.tail=null,this._len=0};var mn=function(t){this.value=t,this.next,this.prev},yn=function(t){this._list=new gn,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},xn=yn.prototype;xn.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 mn(e),o.key=t,n.insertEntry(o),i[t]=o}return r},xn.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},xn.clear=function(){this._list.clear(),this._map={}};var _n=yn,wn={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 bn(t){return(t=Math.round(t))<0?0:t>255?255:t}function Sn(t){return t<0?0:t>1?1:t}function Tn(t){return t.length&&"%"===t.charAt(t.length-1)?bn(parseFloat(t)/100*255):bn(parseInt(t,10))}function Cn(t){return t.length&&"%"===t.charAt(t.length-1)?Sn(parseFloat(t)/100):Sn(parseFloat(t))}function Mn(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 An(t,e,n){return t+(e-t)*n}function In(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function kn(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var Dn=new _n(20),Pn=null;function On(t,e){Pn&&kn(Pn,e),Pn=Dn.put(t,Pn||e.slice())}function Ln(t,e){if(t){e=e||[];var n=Dn.get(t);if(n)return kn(e,n);var i,r=(t+="").replace(/ /g,"").toLowerCase();if(r in wn)return kn(e,wn[r]),On(t,e),e;if("#"===r.charAt(0))return 4===r.length?(i=parseInt(r.substr(1),16))>=0&&i<=4095?(In(e,(3840&i)>>4|(3840&i)>>8,240&i|(240&i)>>4,15&i|(15&i)<<4,1),On(t,e),e):void In(e,0,0,0,1):7===r.length?(i=parseInt(r.substr(1),16))>=0&&i<=16777215?(In(e,(16711680&i)>>16,(65280&i)>>8,255&i,1),On(t,e),e):void In(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 In(e,0,0,0,1);u=Cn(l.pop());case"rgb":return 3!==l.length?void In(e,0,0,0,1):(In(e,Tn(l[0]),Tn(l[1]),Tn(l[2]),u),On(t,e),e);case"hsla":return 4!==l.length?void In(e,0,0,0,1):(l[3]=Cn(l[3]),Rn(l,e),On(t,e),e);case"hsl":return 3!==l.length?void In(e,0,0,0,1):(Rn(l,e),On(t,e),e);default:return}}In(e,0,0,0,1)}}function Rn(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 In(e=e||[],bn(255*Mn(o,a,n+1/3)),bn(255*Mn(o,a,n)),bn(255*Mn(o,a,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function En(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]=bn(An(o[0],s[0],l)),n[1]=bn(An(o[1],s[1],l)),n[2]=bn(An(o[2],s[2],l)),n[3]=Sn(An(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=Ln(e[r]),s=Ln(e[a]),l=i-r,u=Nn([bn(An(o[0],s[0],l)),bn(An(o[1],s[1],l)),bn(An(o[2],s[2],l)),Sn(An(o[3],s[3],l))],"rgba");return n?{color:u,leftIndex:r,rightIndex:a,value:i}:u}}function Nn(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 zn=function(t,e){var n=Ln(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 Nn(n,4===n.length?"rgba":"rgb")}},Fn=function(t){var e=Ln(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)},Hn=function(t,e,n,i){if(t=Ln(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)),Nn(Rn(t),"rgba")},Wn=function(t,e){if((t=Ln(t))&&null!=e)return t[3]=Sn(e),Nn(t,"rgba")},Vn={parse:Ln,lift:zn,toHex:Fn,fastLerp:En,fastMapToColor:En,lerp:Bn,mapToColor:Bn,modifyHSL:Hn,modifyAlpha:Wn,stringify:Nn},Un=Nt.isArrayLike,jn=Array.prototype.slice;function Gn(t,e){return t[e]}function Yn(t,e,n){t[e]=n}function qn(t,e,n){return(e-t)*n+t}function Xn(t,e,n){return n>.5?e:t}function Zn(t,e,n,i,r){var a=t.length;if(1===r)for(var o=0;o<a;o++)i[o]=qn(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]=qn(t[o][l],e[o][l],n)}}function $n(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]:jn.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 Kn(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 Jn(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]=Qn(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]=Qn(t[h][d],e[h][d],n[h][d],i[h][d],r,a,o)}}function Qn(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 ti(t){if(Un(t)){var e=t.length;if(Un(t[0])){for(var n=[],i=0;i<e;i++)n.push(jn.call(t[i]));return n}return jn.call(t)}return t}function ei(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function ni(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=Un(c),f=!1,p=!1,g=d?function(t){var e=t[t.length-1].value;return Un(e&&e[0])?2:1}(i):0;i.sort((function(t,e){return t.time-e.time})),h=i[u-1].time;for(var v=[],m=[],y=i[0].value,x=!0,_=0;_<u;_++){v.push(i[_].time/h);var w=i[_].value;if(d&&Kn(w,y,g)||!d&&w===y||(x=!1),y=w,"string"==typeof w){var b=Vn.parse(w);b?(w=b,f=!0):p=!0}m.push(w)}if(a||!x){var S=m[u-1];for(_=0;_<u-1;_++)d?$n(m[_],S,g):!isNaN(m[_])||isNaN(S)||p||f||(m[_]=S);d&&$n(o(t._target,r),S,g);var T,C,M,A,I,k=0,D=0;if(f)var P=[0,0,0,0];var O=new pn({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<D){for(n=Math.min(k+1,u-1);n>=0&&!(v[n]<=e);n--);n=Math.min(n,u-2)}else{for(n=k;n<u&&!(v[n]>e);n++);n=Math.min(n-1,u-2)}k=n,D=e;var i=v[n+1]-v[n];if(0!==i)if(T=(e-v[n])/i,l)if(M=m[n],C=m[0===n?n:n-1],A=m[n>u-2?u-1:n+1],I=m[n>u-3?u-1:n+2],d)Jn(C,M,A,I,T,T*T,T*T*T,o(t,r),g);else{if(f)a=Jn(C,M,A,I,T,T*T,T*T*T,P,1),a=ei(P);else{if(p)return Xn(M,A,T);a=Qn(C,M,A,I,T,T*T,T*T*T)}s(t,r,a)}else if(d)Zn(m[n],m[n+1],T,o(t,r),g);else{var a;if(f)Zn(m[n],m[n+1],T,P,1),a=ei(P);else{if(p)return Xn(m[n],m[n+1],T);a=qn(m[n],m[n+1],T)}s(t,r,a)}},ondestroy:n});return e&&"spline"!==e&&(O.easing=e),O}}}var ii=function(t,e,n,i){this._tracks={},this._target=t,this._loop=e||!1,this._getter=n||Gn,this._setter=i||Yn,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};ii.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:ti(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=ni(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 ri=ii,ai=1;"undefined"!=typeof window&&(ai=Math.max(window.devicePixelRatio||1,1));var oi={debugMode:0,devicePixelRatio:ai},si=function(){},li=Nt.isString,ui=Nt.isFunction,hi=Nt.isObject,ci=Nt.isArrayLike,di=Nt.indexOf,fi=function(){this.animators=[]};function pi(t,e,n,i,r,a,o,s){li(i)?(a=r,r=i,i=0):ui(r)?(a=r,r="linear",i=0):ui(i)?(a=i,i=0):ui(n)?(a=n,n=500):n||(n=500),t.stopAnimation(),gi(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 gi(t,e,n,i,r,a,o){var s={},l=0;for(var u in i)i.hasOwnProperty(u)&&(null!=n[u]?hi(i[u])&&!ci(i[u])?gi(t,e?e+"."+u:u,n[u],i[u],r,a,o):(o?(s[u]=n[u],vi(t,e,u,i[u])):s[u]=i[u],l++):null==i[u]||o||vi(t,e,u,i[u]));l>0&&t.animate(e,!1).when(null==r?500:r,s).delay(a||0)}function vi(t,e,n,i){if(e){var r={};r[e]={},r[e][n]=i,t.attr(r)}else t.attr(n,i)}fi.prototype={constructor:fi,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 ri(n,e);return c.during((function(t){r.dirty(i)})).done((function(){h.splice(di(h,c),1)})),h.push(c),a&&a.animation.addAnimator(c),c}si('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){pi(this,t,e,n,i,r,a)},animateFrom:function(t,e,n,i,r,a){pi(this,t,e,n,i,r,a,!0)}};var mi=fi,yi=function(t){hn.call(this,t),de.call(this,t),mi.call(this,t),this.id=t.id||Q()};yi.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(Nt.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)}},Nt.mixin(yi,mi),Nt.mixin(yi,hn),Nt.mixin(yi,de);var xi,_i,wi,bi,Si=yi,Ti=ae.applyTransform,Ci=Math.min,Mi=Math.max;function Ai(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}Ai.prototype={constructor:Ai,union:function(t){var e=Ci(t.x,this.x),n=Ci(t.y,this.y);this.width=Mi(t.x+t.width,this.x+this.width)-e,this.height=Mi(t.y+t.height,this.y+this.height)-n,this.x=e,this.y=n},applyTransform:(xi=[],_i=[],wi=[],bi=[],function(t){if(t){xi[0]=wi[0]=this.x,xi[1]=bi[1]=this.y,_i[0]=bi[0]=this.x+this.width,_i[1]=wi[1]=this.y+this.height,Ti(xi,xi,t),Ti(_i,_i,t),Ti(wi,wi,t),Ti(bi,bi,t),this.x=Ci(xi[0],_i[0],wi[0],bi[0]),this.y=Ci(xi[1],_i[1],wi[1],bi[1]);var e=Mi(xi[0],_i[0],wi[0],bi[0]),n=Mi(xi[1],_i[1],wi[1],bi[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=tn.create();return tn.translate(r,r,[-e.x,-e.y]),tn.scale(r,r,[n,i]),tn.translate(r,r,[t.x,t.y]),r},intersect:function(t){if(!t)return!1;t instanceof Ai||(t=Ai.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 Ai(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}}},Ai.create=function(t){return new Ai(t.x,t.y,t.width,t.height)};var Ii=Ai,ki=function(t){for(var e in t=t||{},Si.call(this,t),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};ki.prototype={constructor:ki,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 ki&&t.addChildrenToStorage(e)),n&&n.refresh()},remove:function(t){var e=this.__zr,n=this.__storage,i=this._children,r=Nt.indexOf(i,t);return r<0||(i.splice(r,1),t.parent=null,n&&(n.delFromStorage(t),t instanceof ki&&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 ki&&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 ki&&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 ki&&n.delChildrenFromStorage(t)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(t){for(var e=null,n=new Ii(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}},Nt.inherits(ki,Si);var Di=ki;function Pi(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 Oi(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 Li(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 Ri(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 Ei(t,e){var n,i,r=7,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=Ri(t[h],t,l,u,0,e);l+=d,0!==(u-=d)&&0!==(c=Li(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=Ri(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=Li(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>=7||f>=7);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,v=0,m=!1;do{if(e(o[h],t[u])<0){if(t[c--]=t[u--],g++,v=0,0==--i){m=!0;break}}else if(t[c--]=o[h--],v++,g=0,1==--s){m=!0;break}}while((g|v)<p);if(m)break;do{if(0!==(g=i-Ri(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){m=!0;break}}if(t[c--]=o[h--],1==--s){m=!0;break}if(0!==(v=s-Li(t[u],o,0,s,s-1,e))){for(s-=v,f=(c-=v)+1,d=(h-=v)+1,l=0;l<v;l++)t[f+l]=o[d+l];if(s<=1){m=!0;break}}if(t[c--]=t[u--],0==--i){m=!0;break}p--}while(g>=7||v>=7);if(m)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 Bi=function(t,e,n,i){n||(n=0),i||(i=t.length);var r=i-n;if(!(r<2)){var a=0;if(r<32)Oi(t,n,i,n+(a=Pi(t,n,i,e)),e);else{var o=new Ei(t,e),s=function(t){for(var e=0;t>=32;)e|=1&t,t>>=1;return t+e}(r);do{if((a=Pi(t,n,i,e))<s){var l=r;l>s&&(l=s),Oi(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 Ni(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var zi=function(){this._roots=[],this._displayList=[],this._displayListLen=0};zi.prototype={constructor:zi,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,tt.canvasSupported&&Bi(n,Ni)},_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 Di&&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 Di&&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=Nt.indexOf(this._roots,t);r>=0&&(this.delFromStorage(t),this._roots.splice(r,1),t instanceof Di&&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:Ni};var Fi=zi,Hi={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1};var Wi=function(t,e,n){return Hi.hasOwnProperty(e)?n*t.dpr:n},Vi={ContextCachedBy:{NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},WILL_BE_RESTORED:9},Ui=Vi.ContextCachedBy,ji=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],Gi=function(t){this.extendFrom(t,!1)};function Yi(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 qi(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)}Gi.prototype={constructor:Gi,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!==Ui.STYLE_BIND;t.__attrCachedBy=Ui.STYLE_BIND;for(var o=0;o<ji.length;o++){var s=ji[o],l=s[0];(a||i[l]!==r[l])&&(t[l]=Wi(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?qi:Yi)(t,e,n),r=e.colorStops,a=0;a<r.length;a++)i.addColorStop(r[a].offset,r[a].color);return i}};for(var Xi=Gi.prototype,Zi=0;Zi<ji.length;Zi++){var $i=ji[Zi];$i[0]in Xi||(Xi[$i[0]]=$i[1])}Gi.getGradient=Xi.getGradient;var Ki=Gi,Ji=function(t,e){this.image=t,this.repeat=e,this.type="pattern"};Ji.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")};var Qi=Ji,tr=oi.devicePixelRatio;function er(){return!1}function nr(t,e,n){var i=Nt.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 ir=function(t,e,n){var i;n=n||tr,"string"==typeof t?i=nr(t,e,n):Nt.isObject(t)&&(t=(i=t).id),this.id=t,this.dom=i;var r=i.style;r&&(i.onselectstart=er,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};ir.prototype={constructor:ir,__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=nr("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||Ki.getGradient(r,e,{x:0,y:0,width:a,height:o}),e.__canvasGradient=n):e.image&&(n=Qi.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 rr=ir,ar="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)},or=new _n(50);function sr(){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 lr(t){return t&&t.width&&t.height}var ur=function(t,e,n,i,r){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!n)return e;var a=or.get(t),o={hostEl:n,cb:i,cbPayload:r};return a?!lr(e=a.image)&&a.pending.push(o):((e=new Image).onload=e.onerror=sr,or.put(t,e.__cachedImgObj={image:e,pending:[o]}),e.src=e.__zrImageSrc=t),e}return t}return e},hr={findExistImage:function(t){if("string"==typeof t){var e=or.get(t);return e&&e.image}return t},createOrUpdateImage:ur,isImageReady:lr},cr=Nt.getContext,dr=Nt.extend,fr=Nt.retrieve2,pr=Nt.retrieve3,gr=Nt.trim,vr={},mr=0,yr=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,xr="12px sans-serif",_r={};function wr(t,e){var n=t+":"+(e=e||xr);if(vr[n])return vr[n];for(var i=(t+"").split("\n"),r=0,a=0,o=i.length;a<o;a++)r=Math.max(Dr(i[a],e).width,r);return mr>5e3&&(mr=0,vr={}),mr++,vr[n]=r,r}function br(t,e,n){return"right"===n?t-=e:"center"===n&&(t-=e/2),t}function Sr(t,e,n){return"middle"===n?t-=e/2:"bottom"===n&&(t-=e),t}function Tr(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 Cr(t,e,n,i,r){if(!e)return"";var a=(t+"").split("\n");r=Mr(e,n,i,r);for(var o=0,s=a.length;o<s;o++)a[o]=Ar(a[o],r);return a.join("\n")}function Mr(t,e,n,i){(i=dr({},i)).font=e;n=fr(n,"...");i.maxIterations=fr(i.maxIterations,2);var r=i.minChar=fr(i.minChar,0);i.cnCharWidth=wr("国",e);var a=i.ascCharWidth=wr("a",e);i.placeholder=fr(i.placeholder,"");for(var o=t=Math.max(0,t-1),s=0;s<r&&o>=a;s++)o-=a;var l=wr(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 Ar(t,e){var n=e.containerWidth,i=e.font,r=e.contentWidth;if(!n)return"";var a=wr(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?Ir(t,r,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*r/a):0;a=wr(t=t.substr(0,s),i)}return""===t&&(t=e.placeholder),t}function Ir(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 kr(t){return wr("国",t)}function Dr(t,e){return _r.measureText(t,e)}function Pr(t,e,n,i,r){null!=t&&(t+="");var a=fr(i,kr(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=Mr(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]=Ar(o[f],d)}return{lines:o,height:s,outerHeight:l,lineHeight:a,canCacheByTextString:u}}function Or(t,e){var n={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return n;for(var i,r=yr.lastIndex=0;null!=(i=yr.exec(t));){var a=i.index;a>r&&Lr(n,t.substring(r,a)),Lr(n,i[2],i[1]),r=yr.lastIndex}r<t.length&&Lr(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],v=0,m=0,y=0;y<g.tokens.length;y++){var x=(k=g.tokens[y]).styleName&&e.rich[k.styleName]||{},_=k.textPadding=x.textPadding,w=k.font=x.font||e.font,b=k.textHeight=fr(x.textHeight,kr(w));if(_&&(b+=_[0]+_[2]),k.height=b,k.lineHeight=pr(x.textLineHeight,e.textLineHeight,b),k.textAlign=x&&x.textAlign||e.textAlign,k.textVerticalAlign=x&&x.textVerticalAlign||"middle",null!=f&&s+k.lineHeight>f)return{lines:[],width:0,height:0};k.textWidth=wr(k.text,w);var S=x.textWidth,T=null==S||"auto"===S;if("string"==typeof S&&"%"===S.charAt(S.length-1))k.percentWidth=S,u.push(k),S=0;else{if(T){S=k.textWidth;var C=x.textBackgroundColor,M=C&&C.image;M&&(M=hr.findExistImage(M),hr.isImageReady(M)&&(S=Math.max(S,M.width*b/M.height)))}var A=_?_[1]+_[3]:0;S+=A;var I=null!=d?d-m:null;null!=I&&I<S&&(!T||I<A?(k.text="",k.textWidth=S=0):(k.text=Cr(k.text,I-A,w,c.ellipsis,{minChar:c.minChar}),k.textWidth=wr(k.text,w),S=k.textWidth+A))}m+=k.width=S,x&&(v=Math.max(v,k.lineHeight))}g.width=m,g.lineHeight=v,s+=v,l=Math.max(l,m)}n.outerWidth=n.width=fr(e.textWidth,l),n.outerHeight=n.height=fr(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,D=(k=u[p]).percentWidth;k.width=parseInt(D,10)/100*l}return n}function Lr(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)}}}_r.measureText=function(t,e){var n=cr();return n.font=e||xr,n.measureText(t)};var Rr=function(t,e,n,i,r,a,o,s){return o?function(t,e,n,i,r,a,o,s){var l=Or(t,{rich:o,truncate:s,font:e,textAlign:n,textPadding:r,textLineHeight:a}),u=l.outerWidth,h=l.outerHeight,c=br(0,u,n),d=Sr(0,h,i);return new Ii(c,d,u,h)}(t,e,n,i,r,a,o,s):function(t,e,n,i,r,a,o){var s=Pr(t,e,r,a,o),l=wr(t,e);r&&(l+=r[1]+r[3]);var u=s.outerHeight,h=br(0,l,n),c=Sr(0,u,i),d=new Ii(h,c,l,u);return d.lineHeight=s.lineHeight,d}(t,e,n,i,r,a,s)},Er=function(t,e,n){return Tr({},{textPosition:t,textDistance:n},e)},Br=function(t){var e=(t.fontSize||t.fontFamily)&&[t.fontStyle,t.fontWeight,(t.fontSize||12)+"px",t.fontFamily||"sans-serif"].join(" ");return e&&gr(e)||t.textFont||t.font},Nr={DEFAULT_FONT:xr,$override:function(t,e){_r[t]=e},getWidth:wr,getBoundingRect:Rr,adjustTextX:br,adjustTextY:Sr,calculateTextPosition:Tr,adjustTextPositionOnRect:Er,truncateText:Cr,getLineHeight:kr,measureText:Dr,parsePlainText:Pr,parseRichText:Or,makeFont:Br};var zr={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)}},Fr=Nt.retrieve2,Hr=Nt.retrieve3,Wr=Nt.each,Vr=Nt.normalizeCssArray,Ur=Nt.isString,jr=Nt.isObject,Gr=Vi.ContextCachedBy,Yr=Vi.WILL_BE_RESTORED,qr=Nr.DEFAULT_FONT,Xr={left:1,right:1,center:1},Zr={top:1,bottom:1,middle:1},$r=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],Kr={},Jr={};function Qr(t){if(t){t.font=Nr.makeFont(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||Xr[e]?e:"left";var n=t.textVerticalAlign||t.textBaseline;"center"===n&&(n="middle"),t.textVerticalAlign=null==n||Zr[n]?n:"top",t.textPadding&&(t.textPadding=Vr(t.textPadding))}}function ta(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 ea(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&&na(l)&&ia(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=ha(o,s,c),h-=n.height/2-c[2]-n.textHeight/2),oa(e,"shadowBlur",Hr(l.textShadowBlur,i.textShadowBlur,0)),oa(e,"shadowColor",l.textShadowColor||i.textShadowColor||"transparent"),oa(e,"shadowOffsetX",Hr(l.textShadowOffsetX,i.textShadowOffsetX,0)),oa(e,"shadowOffsetY",Hr(l.textShadowOffsetY,i.textShadowOffsetY,0)),oa(e,"textAlign",s),oa(e,"textBaseline","middle"),oa(e,"font",n.font||qr);var d=sa(l.textStroke||i.textStroke,p),f=la(l.textFill||i.textFill),p=Fr(l.textStrokeWidth,i.textStrokeWidth);d&&(oa(e,"lineWidth",p),oa(e,"strokeStyle",d),e.strokeText(n.text,o,h)),f&&(oa(e,"fillStyle",f),e.fillText(n.text,o,h))}function na(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function ia(t,e,n,i,r,a,o){var s=n.textBackgroundColor,l=n.textBorderWidth,u=n.textBorderColor,h=Ur(s);if(oa(e,"shadowBlur",n.textBoxShadowBlur||0),oa(e,"shadowColor",n.textBoxShadowColor||"transparent"),oa(e,"shadowOffsetX",n.textBoxShadowOffsetX||0),oa(e,"shadowOffsetY",n.textBoxShadowOffsetY||0),h||l&&u){e.beginPath();var c=n.textBorderRadius;c?zr.buildPath(e,{x:i,y:r,width:a,height:o,r:c}):e.rect(i,r,a,o),e.closePath()}if(h)if(oa(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(jr(s)){var f=s.image;(f=hr.createOrUpdateImage(f,null,t,ra,s))&&hr.isImageReady(f)&&e.drawImage(f,i,r,a,o)}if(l&&u)if(oa(e,"lineWidth",l),oa(e,"strokeStyle",u),null!=n.strokeOpacity){d=e.globalAlpha;e.globalAlpha=n.strokeOpacity*n.opacity,e.stroke(),e.globalAlpha=d}else e.stroke()}function ra(t,e){e.image=t}function aa(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+ua(l[0],i.width),a=i.y+ua(l[1],i.height);else{var u=e&&e.calculateTextPosition?e.calculateTextPosition(Kr,n,i):Nr.calculateTextPosition(Kr,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 oa(t,e,n){return t[e]=Wi(t,e,n),t[e]}function sa(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function la(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function ua(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function ha(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}var ca=function(t){return Qr(t),Wr(t.rich,Qr),t},da=function(t,e,n,i,r,a){i.rich?function(t,e,n,i,r,a){a!==Yr&&(e.__attrCachedBy=Gr.NONE);var o=t.__textCotentBlock;o&&!t.__dirtyText||(o=t.__textCotentBlock=Nr.parseRichText(n,i));!function(t,e,n,i,r){var a=n.width,o=n.outerWidth,s=n.outerHeight,l=i.textPadding,u=aa(Jr,t,i,r),h=u.baseX,c=u.baseY,d=u.textAlign,f=u.textVerticalAlign;ta(e,i,r,h,c);var p=Nr.adjustTextX(h,o,d),g=Nr.adjustTextY(c,s,f),v=p,m=g;l&&(v+=l[3],m+=l[0]);var y=v+a;na(i)&&ia(t,e,i,p,g,o,s);for(var x=0;x<n.lines.length;x++){for(var _,w=n.lines[x],b=w.tokens,S=b.length,T=w.lineHeight,C=w.width,M=0,A=v,I=y,k=S-1;M<S&&(!(_=b[M]).textAlign||"left"===_.textAlign);)ea(t,e,_,i,T,m,A,"left"),C-=_.width,A+=_.width,M++;for(;k>=0&&"right"===(_=b[k]).textAlign;)ea(t,e,_,i,T,m,I,"right"),C-=_.width,I-=_.width,k--;for(A+=(a-(A-v)-(y-I)-C)/2;M<=k;)ea(t,e,_=b[M],i,T,m,A+_.width/2,"center"),A+=_.width,M++;m+=T}}(t,e,o,i,r)}(t,e,n,i,r,a):function(t,e,n,i,r,a){var o,s=na(i),l=!1,u=e.__attrCachedBy===Gr.PLAIN_TEXT;a!==Yr?(a&&(o=a.style,l=!s&&u&&o),e.__attrCachedBy=s?Gr.NONE:Gr.PLAIN_TEXT):u&&(e.__attrCachedBy=Gr.NONE);var h=i.font||qr;l&&h===(o.font||qr)||(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=Nr.parsePlainText(n,c,d,f,i.truncate));var g=p.outerHeight,v=p.lines,m=p.lineHeight,y=aa(Jr,t,i,r),x=y.baseX,_=y.baseY,w=y.textAlign||"left",b=y.textVerticalAlign;ta(e,i,r,x,_);var S=Nr.adjustTextY(_,g,b),T=x,C=S;if(s||d){var M=Nr.getWidth(n,c);d&&(M+=d[1]+d[3]);var A=Nr.adjustTextX(x,M,w);s&&ia(t,e,i,A,S,M,g),d&&(T=ha(x,w,d),C+=d[0])}e.textAlign=w,e.textBaseline="middle",e.globalAlpha=i.opacity||1;for(var I=0;I<$r.length;I++){var k=$r[I],D=k[0],P=k[1],O=i[D];l&&O===o[D]||(e[P]=Wi(e,P,O||k[2]))}C+=m/2;var L=i.textStrokeWidth,R=l?o.textStrokeWidth:null,E=!l||L!==R,B=!l||E||i.textStroke!==o.textStroke,N=sa(i.textStroke,L),z=la(i.textFill);N&&(E&&(e.lineWidth=L),B&&(e.strokeStyle=N));z&&(l&&i.textFill===o.textFill||(e.fillStyle=z));if(1===v.length)N&&e.strokeText(v[0],T,C),z&&e.fillText(v[0],T,C);else for(I=0;I<v.length;I++)N&&e.strokeText(v[I],T,C),z&&e.fillText(v[I],T,C),C+=m}(t,e,n,i,r,a)},fa=function(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)},pa={normalizeTextStyle:ca,renderText:da,getBoxPosition:aa,getStroke:sa,getFill:la,parsePercent:ua,needDrawText:fa},ga=Vi.WILL_BE_RESTORED,va=new Ii,ma=function(){};ma.prototype={constructor:ma,drawRectText:function(t,e){var n=this.style;e=n.textRect||e,this.__dirty&&pa.normalizeTextStyle(n,!0);var i=n.text;if(null!=i&&(i+=""),pa.needDrawText(i,n)){t.save();var r=this.transform;n.transformText?this.setTransform(t):r&&(va.copy(e),va.applyTransform(r),e=va),pa.renderText(this,t,i,n,e,ga),t.restore()}}};var ya=ma;function xa(t){for(var e in t=t||{},Si.call(this,t),t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new Ki(t.style),this._rect=null,this.__clipPaths=null}xa.prototype={constructor:xa,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?Si.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 Ki(t),this.dirty(!1),this},calculateTextPosition:null},Nt.inherits(xa,Si),Nt.mixin(xa,ya);var _a=xa;function wa(t){_a.call(this,t)}wa.prototype={constructor:wa,type:"image",brush:function(t,e){var n=this.style,i=n.image;n.bind(t,this,e);var r=this._image=hr.createOrUpdateImage(i,this._image,this,this.onload);if(r&&hr.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 Ii(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},Nt.inherits(wa,_a);var ba=wa,Sa=oi.devicePixelRatio,Ta=1e5,Ca=314159,Ma=.01;function Aa(t){return parseInt(t,10)}var Ia=new Ii(0,0,0,0),ka=new Ii(0,0,0,0);var Da=function(t,e,n){this.type="canvas";var i=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=n=Nt.extend({},n||{}),this.dpr=n.devicePixelRatio||Sa,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 rr(t,this,this.dpr);u.__builtin__=!0,u.initContext(),o[314159]=u,u.zlevel=Ca,a.push(Ca),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=[]};Da.prototype={constructor:Da,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=Nt.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){Bi(t,this.storage.displayableSortFunc),n||(n=this._hoverlayer=this.getLayer(Ta));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(Ta)},_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;ar((function(){r._paintList(t,e,n)}))}}},_compositeManually:function(){var t=this.getLayer(Ca).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 v=t[g];if(this._doPaintEl(v,s,e,u),v.__dirty=v.__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 tt.wxa&&Nt.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 Ia.copy(t.getBoundingRect()),t.transform&&Ia.applyTransform(t.transform),ka.width=e,ka.height=n,!Ia.intersect(ka)}(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=Ca);var n=this._layers[t];return n||((n=new rr("zr_"+t,this,this.dpr)).zlevel=t,n.__builtin__=!0,this._layerConfig[t]?Nt.merge(n,this._layerConfig[t],!0):this._layerConfig[t-Ma]&&Nt.merge(n,this._layerConfig[t-Ma],!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?Ma:0),this._needsManuallyCompositing),s.__builtin__||si("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]?Nt.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+Ma){var a=this._layers[r];Nt.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(Nt.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);Nt.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(Ca).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 rr("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]||Aa(s[n])||Aa(o.style[n]))-(Aa(s[r])||0)-(Aa(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 v={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 m=new ba({style:{x:0,y:0,image:n}});return null!=v.position&&(m.position=t.position=v.position),null!=v.rotation&&(m.rotation=t.rotation=v.rotation),null!=v.scale&&(m.scale=t.scale=v.scale),m}};var Pa=Da,Oa=Oe.Dispatcher,La=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,Oa.call(this)};La.prototype={constructor:La,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=Nt.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,ar((function e(){t._running&&(ar(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 ri(t,(e=e||{}).loop,e.getter,e.setter);return this.addAnimator(n),n}},Nt.mixin(La,Oa);var Ra,Ea,Ba=La,Na=Oe.addEventListener,za=Oe.removeEventListener,Fa=Oe.normalizeEvent,Ha=Oe.getNativeEvent,Wa=tt.domSupported,Va=(Ea={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:Ra=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:Nt.map(Ra,(function(t){var e=t.replace("mouse","pointer");return Ea.hasOwnProperty(e)?e:t}))}),Ua=["mousemove","mouseup"],ja=["pointermove","pointerup"];function Ga(t){return"mousewheel"===t&&tt.browser.firefox?"DOMMouseScroll":t}function Ya(t){var e=t.pointerType;return"pen"===e||"touch"===e}function qa(t){t&&(t.zrByTouch=!0)}function Xa(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 Za(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 $a=Za.prototype;$a.stopPropagation=$a.stopImmediatePropagation=$a.preventDefault=Nt.noop;var Ka={mousedown:function(t){t=Fa(this.dom,t),this._mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=Fa(this.dom,t);var e=this._mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||io(this,!0),this.trigger("mousemove",t)},mouseup:function(t){t=Fa(this.dom,t),io(this,!1),this.trigger("mouseup",t)},mouseout:function(t){t=Fa(this.dom,t),this._pointerCapturing&&(t.zrEventControl="no_globalout");var e=t.toElement||t.relatedTarget;t.zrIsToLocalDOM=Xa(this,e),this.trigger("mouseout",t)},touchstart:function(t){qa(t=Fa(this.dom,t)),this._lastTouchMoment=new Date,this.handler.processGesture(t,"start"),Ka.mousemove.call(this,t),Ka.mousedown.call(this,t)},touchmove:function(t){qa(t=Fa(this.dom,t)),this.handler.processGesture(t,"change"),Ka.mousemove.call(this,t)},touchend:function(t){qa(t=Fa(this.dom,t)),this.handler.processGesture(t,"end"),Ka.mouseup.call(this,t),+new Date-this._lastTouchMoment<300&&Ka.click.call(this,t)},pointerdown:function(t){Ka.mousedown.call(this,t)},pointermove:function(t){Ya(t)||Ka.mousemove.call(this,t)},pointerup:function(t){Ka.mouseup.call(this,t)},pointerout:function(t){Ya(t)||Ka.mouseout.call(this,t)}};Nt.each(["click","mousewheel","dblclick","contextmenu"],(function(t){Ka[t]=function(e){e=Fa(this.dom,e),this.trigger(t,e)}}));var Ja={pointermove:function(t){Ya(t)||Ja.mousemove.call(this,t)},pointerup:function(t){Ja.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this._pointerCapturing;io(this,!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function Qa(t,e){var n=e.domHandlers;tt.pointerEventsSupported?Nt.each(Va.pointer,(function(i){eo(e,i,(function(e){n[i].call(t,e)}))})):(tt.touchEventsSupported&&Nt.each(Va.touch,(function(i){eo(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)}))})),Nt.each(Va.mouse,(function(i){eo(e,i,(function(r){r=Ha(r),e.touching||n[i].call(t,r)}))})))}function to(t,e){function n(n){eo(e,n,(function(i){i=Ha(i),Xa(t,i.target)||(i=function(t,e){return Fa(t.dom,new Za(t,e),!0)}(t,i),e.domHandlers[n].call(t,i))}),{capture:!0})}tt.pointerEventsSupported?Nt.each(ja,n):tt.touchEventsSupported||Nt.each(Ua,n)}function eo(t,e,n,i){t.mounted[e]=n,t.listenerOpts[e]=i,Na(t.domTarget,Ga(e),n,i)}function no(t){var e=t.mounted;for(var n in e)e.hasOwnProperty(n)&&za(t.domTarget,Ga(n),e[n],t.listenerOpts[n]);t.mounted={}}function io(t,e){if(t._mayPointerCapture=null,Wa&&t._pointerCapturing^e){t._pointerCapturing=e;var n=t._globalHandlerScope;e?to(t,n):no(n)}}function ro(t,e){this.domTarget=t,this.domHandlers=e,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function ao(t,e){de.call(this),this.dom=t,this.painterRoot=e,this._localHandlerScope=new ro(t,Ka),Wa&&(this._globalHandlerScope=new ro(document,Ja)),this._pointerCapturing=!1,this._mayPointerCapture=null,Qa(this,this._localHandlerScope)}var oo=ao.prototype;oo.dispose=function(){no(this._localHandlerScope),Wa&&no(this._globalHandlerScope)},oo.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},Nt.mixin(ao,de);var so=ao,lo=!tt.canvasSupported,uo={canvas:Pa},ho={};var co=function(t,e,n){n=n||{},this.dom=e,this.id=t;var i=this,r=new Fi,a=n.renderer;if(lo){if(!uo.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");a="vml"}else a&&uo[a]||(a="canvas");var o=new uo[a](e,r,n,t);this.storage=r,this.painter=o;var s=tt.node||tt.worker?null:new so(o.getViewportRoot(),o.root);this.handler=new je(r,o,s,o.root),this.animation=new Ba({stage:{update:Nt.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)}};co.prototype={constructor:co,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 ho[t]}};var fo=function(t,e){var n=new co(Q(),t,e);return ho[n.id]=n,n},po={version:"4.3.1",init:fo,dispose:function(t){if(t)t.dispose();else{for(var e in ho)ho.hasOwnProperty(e)&&ho[e].dispose();ho={}}return this},getInstance:function(t){return ho[t]},registerPainter:function(t,e){uo[t]=e}},go=Nt.each,vo=Nt.isObject,mo=Nt.isArray,yo="series\0";function xo(t){return t instanceof Array?t:null==t?[]:[t]}function _o(t){return vo(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}var wo=0;function bo(t,e){return t&&t.hasOwnProperty(e)}var So=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])}}},To=function(t,e){e=(e||[]).slice();var n=Nt.map(t||[],(function(t,e){return{exist:t}}));return go(e,(function(t,i){if(vo(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||_o(t)||_o(a)||a.name!==t.name+""))return n[r].option=t,void(e[i]=null)}}})),go(e,(function(t,e){if(vo(t)){for(var i=0;i<n.length;i++){var r=n[i].exist;if(!n[i].option&&!_o(r)&&null==t.id){n[i].option=t;break}}i>=n.length&&n.push({option:t})}})),n},Co=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=xo(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}},Mo=function(t,e,n){t.setAttribute?t.setAttribute(e,n):t[e]=n},Ao=function(t,e){return t.getAttribute?t.getAttribute(e):t[e]},Io={normalizeToArray:xo,defaultEmphasis:So,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!vo(t)||mo(t)||t instanceof Date?t:t.value},isDataItemOption:function(t){return vo(t)&&!(t instanceof Array)},mappingToExists:To,makeIdAndName:function(t){var e=Nt.createHashMap();go(t,(function(t,n){var i=t.exist;i&&e.set(i.id,t)})),go(t,(function(t,n){var i=t.option;Nt.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={})})),go(t,(function(t,n){var i=t.exist,r=t.option,a=t.keyInfo;if(vo(r)){if(a.name=null!=r.name?r.name+"":i?i.name:yo+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(yo))},isIdInner:_o,compressBatches:Co,queryDataIndex:function(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?Nt.isArray(e.dataIndex)?Nt.map(e.dataIndex,(function(e){return t.indexOfRawIndex(e)})):t.indexOfRawIndex(e.dataIndex):null!=e.name?Nt.isArray(e.name)?Nt.map(e.name,(function(e){return t.indexOfName(e)})):t.indexOfName(e.name):void 0},makeInner:function(){var t="__\0ec_inner_"+wo+++"_"+Math.random().toFixed(5);return function(e){return e[t]||(e[t]={})}},parseFinder:function(t,e,n){if(Nt.isString(e)){var i={};i[e+"Index"]=0,e=i}var r=n&&n.defaultMainType;!r||bo(e,r+"Index")||bo(e,r+"Id")||bo(e,r+"Name")||(e[r+"Index"]=0);var a={};return go(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&&Nt.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:Mo,getAttribute:Ao,getTooltipRenderMode:function(t){return"auto"===t?tt.domSupported?"html":"richText":t||"html"},groupData:function(t,e){var n=Nt.createHashMap(),i=[];return Nt.each(t,(function(t){var r=e(t);(n.get(r)||(i.push(r),n.set(r,[]))).push(t)})),{keys:i,buckets:n}}},ko="___EC__COMPONENT__CONTAINER___";function Do(t){var e={main:"",sub:""};return t&&(t=t.split("."),e.main=t[0]||"",e.sub=t[1]||""),e}var Po=0;function Oo(t,e){var n=Nt.slice(arguments,2);return this.superClass.prototype[e].apply(t,n)}function Lo(t,e,n){return this.superClass.prototype[e].apply(t,n)}var Ro=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 Nt.extend(n.prototype,t),n.extend=this.extend,n.superCall=Oo,n.superApply=Lo,Nt.inherits(n,this),n.superClass=e,n}},Eo=function(t,e){e=e||{};var n={};if(t.registerClass=function(t,e){if(e)if(function(t){Nt.assert(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}(e),(e=Do(e)).sub){if(e.sub!==ko){var i=function(t){var e=n[t.main];e&&e[ko]||((e=n[t.main]={})[ko]=!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[ko]&&(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=Do(t);var e=[],i=n[t.main];return i&&i[ko]?Nt.each(i,(function(t,n){n!==ko&&e.push(t)})):e.push(i),e},t.hasClass=function(t){return t=Do(t),!!n[t.main]},t.getAllClassMainTypes=function(){var t=[];return Nt.each(n,(function(e,n){t.push(n)})),t},t.hasSubTypes=function(t){t=Do(t);var e=n[t.main];return e&&e[ko]},t.parseClassType=Do,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},Bo={parseClassType:Do,enableClassExtend:Ro,enableClassCheck:function(t){var e=["__\0is_clz",Po++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}},enableClassManagement:Eo,setReadOnly:function(t,e){}};var No=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&&Nt.indexOf(n,o)>=0||i&&Nt.indexOf(i,o)<0)){var s=e.getShallow(o);null!=s&&(r[t[a][0]]=s)}}return r}},zo=No([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Fo={getLineStyle:function(t){var e=zo(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])}},Ho=Fo,Wo=No([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Vo={getAreaStyle:function(t,e){return Wo(this,t,e)}},Uo=ae.create,jo=ae.distSquare,Go=Math.pow,Yo=Math.sqrt,qo=1e-8,Xo=1e-4,Zo=Yo(3),$o=1/3,Ko=Uo(),Jo=Uo(),Qo=Uo();function ts(t){return t>-1e-8&&t<qo}function es(t){return t>qo||t<-1e-8}function ns(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 is(t,e,n,i){var r=1-i;return r*(r*t+2*i*e)+i*i*n}var rs=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(ts(h)&&ts(c)){if(ts(s))a[0]=0;else(T=-l/s)>=0&&T<=1&&(a[f++]=T)}else{var p=c*c-4*h*d;if(ts(p)){var g=c/h,v=-g/2;(T=-s/o+g)>=0&&T<=1&&(a[f++]=T),v>=0&&v<=1&&(a[f++]=v)}else if(p>0){var m=Yo(p),y=h*s+1.5*o*(-c+m),x=h*s+1.5*o*(-c-m);(T=(-s-((y=y<0?-Go(-y,$o):Go(y,$o))+(x=x<0?-Go(-x,$o):Go(x,$o))))/(3*o))>=0&&T<=1&&(a[f++]=T)}else{var _=(2*h*s-3*o*c)/(2*Yo(h*h*h)),w=Math.acos(_)/3,b=Yo(h),S=Math.cos(w),T=(-s-2*b*S)/(3*o),C=(v=(-s+b*(S+Zo*Math.sin(w)))/(3*o),(-s+b*(S-Zo*Math.sin(w)))/(3*o));T>=0&&T<=1&&(a[f++]=T),v>=0&&v<=1&&(a[f++]=v),C>=0&&C<=1&&(a[f++]=C)}}return f},as=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(ts(o)){if(es(a))(h=-s/a)>=0&&h<=1&&(r[l++]=h)}else{var u=a*a-4*o*s;if(ts(u))r[0]=-a/(2*o);else if(u>0){var h,c=Yo(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},os=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},ss=function(t,e,n,i,r,a,o,s,l,u,h){var c,d,f,p,g,v=.005,m=1/0;Ko[0]=l,Ko[1]=u;for(var y=0;y<1;y+=.05)Jo[0]=ns(t,n,r,o,y),Jo[1]=ns(e,i,a,s,y),(p=jo(Ko,Jo))<m&&(c=y,m=p);m=1/0;for(var x=0;x<32&&!(v<Xo);x++)d=c-v,f=c+v,Jo[0]=ns(t,n,r,o,d),Jo[1]=ns(e,i,a,s,d),p=jo(Jo,Ko),d>=0&&p<m?(c=d,m=p):(Qo[0]=ns(t,n,r,o,f),Qo[1]=ns(e,i,a,s,f),g=jo(Qo,Ko),f<=1&&g<m?(c=f,m=g):v*=.5);return h&&(h[0]=ns(t,n,r,o,c),h[1]=ns(e,i,a,s,c)),Yo(m)},ls=function(t,e,n,i,r){var a=t-2*e+n,o=2*(e-t),s=t-i,l=0;if(ts(a)){if(es(o))(h=-s/o)>=0&&h<=1&&(r[l++]=h)}else{var u=o*o-4*a*s;if(ts(u))(h=-o/(2*a))>=0&&h<=1&&(r[l++]=h);else if(u>0){var h,c=Yo(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},us=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},hs=function(t,e,n,i,r,a,o,s,l){var u,h=.005,c=1/0;Ko[0]=o,Ko[1]=s;for(var d=0;d<1;d+=.05){Jo[0]=is(t,n,r,d),Jo[1]=is(e,i,a,d),(v=jo(Ko,Jo))<c&&(u=d,c=v)}c=1/0;for(var f=0;f<32&&!(h<Xo);f++){var p=u-h,g=u+h;Jo[0]=is(t,n,r,p),Jo[1]=is(e,i,a,p);var v=jo(Jo,Ko);if(p>=0&&v<c)u=p,c=v;else{Qo[0]=is(t,n,r,g),Qo[1]=is(e,i,a,g);var m=jo(Qo,Ko);g<=1&&m<c?(u=g,c=m):h*=.5}}return l&&(l[0]=is(t,n,r,u),l[1]=is(e,i,a,u)),Yo(c)},cs={cubicAt:ns,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:rs,cubicExtrema:as,cubicSubdivide:os,cubicProjectPoint:ss,quadraticAt:is,quadraticDerivativeAt:function(t,e,n,i){return 2*((1-i)*(e-t)+i*(n-e))},quadraticRootAt:ls,quadraticExtremum:function(t,e,n){var i=t+n-2*e;return 0===i?.5:(t-e)/i},quadraticSubdivide:us,quadraticProjectPoint:hs},ds=Math.min,fs=Math.max,ps=Math.sin,gs=Math.cos,vs=2*Math.PI,ms=ae.create(),ys=ae.create(),xs=ae.create();var _s=[],ws=[];var bs=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=ds(a,r[0]),o=fs(o,r[0]),s=ds(s,r[1]),l=fs(l,r[1]);e[0]=a,e[1]=s,n[0]=o,n[1]=l}},Ss=function(t,e,n,i,r,a){r[0]=ds(t,n),r[1]=ds(e,i),a[0]=fs(t,n),a[1]=fs(e,i)},Ts=function(t,e,n,i,r,a,o,s,l,u){var h,c=cs.cubicExtrema,d=cs.cubicAt,f=c(t,n,r,o,_s);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,_s[h]);l[0]=ds(p,l[0]),u[0]=fs(p,u[0])}for(f=c(e,i,a,s,ws),h=0;h<f;h++){var g=d(e,i,a,s,ws[h]);l[1]=ds(g,l[1]),u[1]=fs(g,u[1])}l[0]=ds(t,l[0]),u[0]=fs(t,u[0]),l[0]=ds(o,l[0]),u[0]=fs(o,u[0]),l[1]=ds(e,l[1]),u[1]=fs(e,u[1]),l[1]=ds(s,l[1]),u[1]=fs(s,u[1])},Cs=function(t,e,n,i,r,a,o,s){var l=cs.quadraticExtremum,u=cs.quadraticAt,h=fs(ds(l(t,n,r),1),0),c=fs(ds(l(e,i,a),1),0),d=u(t,n,r,h),f=u(e,i,a,c);o[0]=ds(t,r,d),o[1]=ds(e,a,f),s[0]=fs(t,r,d),s[1]=fs(e,a,f)},Ms=function(t,e,n,i,r,a,o,s,l){var u=ae.min,h=ae.max,c=Math.abs(r-a);if(c%vs<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]=gs(r)*n+t,ms[1]=ps(r)*i+e,ys[0]=gs(a)*n+t,ys[1]=ps(a)*i+e,u(s,ms,ys),h(l,ms,ys),(r%=vs)<0&&(r+=vs),(a%=vs)<0&&(a+=vs),r>a&&!o?a+=vs:r<a&&o&&(r+=vs),o){var d=a;a=r,r=d}for(var f=0;f<a;f+=Math.PI/2)f>r&&(xs[0]=gs(f)*n+t,xs[1]=ps(f)*i+e,u(s,xs,s),h(l,xs,l))},As={fromPoints:bs,fromLine:Ss,fromCubic:Ts,fromQuadratic:Cs,fromArc:Ms},Is=oi.devicePixelRatio,ks={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Ds=[],Ps=[],Os=[],Ls=[],Rs=Math.min,Es=Math.max,Bs=Math.cos,Ns=Math.sin,zs=Math.sqrt,Fs=Math.abs,Hs="undefined"!=typeof Float32Array,Ws=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};Ws.prototype={constructor:Ws,_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=Fs(n/Is/t)||0,this._uy=Fs(n/Is/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(ks.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=Fs(t-this._xi)>this._ux||Fs(e-this._yi)>this._uy||this._len<5;return this.addData(ks.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(ks.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(ks.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(ks.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=Bs(r)*n+t,this._yi=Ns(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(ks.R,t,e,n,i),this},closePath:function(){this.addData(ks.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||!Hs||(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();Hs&&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=zs(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?Rs(f,t):Es(f,t),c>=0?Rs(p,e):Es(p,e));h=f-t,c=p-e,this._dashOffset=-zs(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,v=this._yi,m=cs.cubicAt,y=0,x=this._dashIdx,_=f.length,w=0;for(d<0&&(d=c+d),d%=c,o=0;o<1;o+=.1)s=m(g,t,n,r,o+.1)-m(g,t,n,r,o),l=m(v,e,i,a,o+.1)-m(v,e,i,a,o),y+=zs(s*s+l*l);for(;x<_&&!((w+=f[x])>d);x++);for(o=(w-d)/y;o<=1;)u=m(g,t,n,r,o),h=m(v,e,i,a,o),x%2?p.moveTo(u,h):p.lineTo(u,h),o+=f[x]/y,x=(x+1)%_;x%2!=0&&p.lineTo(r,a),s=r-u,l=a-h,this._dashOffset=-zs(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,Hs&&(this.data=new Float32Array(t)))},getBoundingRect:function(){Ds[0]=Ds[1]=Os[0]=Os[1]=Number.MAX_VALUE,Ps[0]=Ps[1]=Ls[0]=Ls[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 ks.M:e=i=t[a++],n=r=t[a++],Os[0]=i,Os[1]=r,Ls[0]=i,Ls[1]=r;break;case ks.L:As.fromLine(e,n,t[a],t[a+1],Os,Ls),e=t[a++],n=t[a++];break;case ks.C:As.fromCubic(e,n,t[a++],t[a++],t[a++],t[a++],t[a],t[a+1],Os,Ls),e=t[a++],n=t[a++];break;case ks.Q:As.fromQuadratic(e,n,t[a++],t[a++],t[a],t[a+1],Os,Ls),e=t[a++],n=t[a++];break;case ks.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=Bs(c)*u+s,r=Ns(c)*h+l),As.fromArc(s,l,u,h,c,d,f,Os,Ls),e=Bs(d)*u+s,n=Ns(d)*h+l;break;case ks.R:i=e=t[a++],r=n=t[a++];var p=t[a++],g=t[a++];As.fromLine(i,r,i+p,r+g,Os,Ls);break;case ks.Z:e=i,n=r}ae.min(Ds,Ds,Os),ae.max(Ps,Ps,Ls)}return 0===a&&(Ds[0]=Ds[1]=Ps[0]=Ps[1]=0),new Ii(Ds[0],Ds[1],Ps[0]-Ds[0],Ps[1]-Ds[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 ks.M:e=i=s[c++],n=r=s[c++],t.moveTo(i,r);break;case ks.L:a=s[c++],o=s[c++],(Fs(a-i)>l||Fs(o-r)>u||c===h-1)&&(t.lineTo(a,o),i=a,r=o);break;case ks.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 ks.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),i=s[c-2],r=s[c-1];break;case ks.A:var f=s[c++],p=s[c++],g=s[c++],v=s[c++],m=s[c++],y=s[c++],x=s[c++],_=s[c++],w=g>v?g:v,b=g>v?1:g/v,S=g>v?v/g:1,T=m+y;Math.abs(g-v)>.001?(t.translate(f,p),t.rotate(x),t.scale(b,S),t.arc(0,0,w,m,T,1-_),t.scale(1/b,1/S),t.rotate(-x),t.translate(-f,-p)):t.arc(f,p,w,m,T,1-_),1===c&&(e=Bs(m)*g+f,n=Ns(m)*v+p),i=Bs(T)*g+f,r=Ns(T)*v+p;break;case ks.R:e=i=s[c],n=r=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case ks.Z:t.closePath(),i=e,r=n}}}},Ws.CMD=ks;var Vs=Ws;var Us={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 js={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)&&cs.cubicProjectPoint(t,e,n,i,r,a,o,s,u,h,null)<=c/2}},Gs=cs.quadraticProjectPoint;var Ys={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)&&Gs(t,e,n,i,r,a,s,l,null)<=u/2}},qs=2*Math.PI;var Xs={normalizeRadian:function(t){return(t%=qs)<0&&(t+=qs),t}},Zs=Xs.normalizeRadian,$s=2*Math.PI;var Ks={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)%$s<1e-4)return!0;if(a){var c=i;i=Zs(r),r=Zs(c)}else i=Zs(i),r=Zs(r);i>r&&(r+=$s);var d=Math.atan2(l,s);return d<0&&(d+=$s),d>=i&&d<=r||d+$s>=i&&d+$s<=r}};var Js=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},Qs=Xs.normalizeRadian,tl=Vs.CMD,el=2*Math.PI;var nl=[-1,-1,-1],il=[-1,-1];function rl(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=cs.cubicRootAt(e,i,a,s,u,nl);if(0===c)return 0;for(var d,f,p=0,g=-1,v=0;v<c;v++){var m=nl[v],y=0===m||1===m?.5:1;cs.cubicAt(t,n,r,o,m)<l||(g<0&&(g=cs.cubicExtrema(e,i,a,s,il),il[1]<il[0]&&g>1&&(h=void 0,h=il[0],il[0]=il[1],il[1]=h),d=cs.cubicAt(e,i,a,s,il[0]),g>1&&(f=cs.cubicAt(e,i,a,s,il[1]))),2===g?m<il[0]?p+=d<e?y:-y:m<il[1]?p+=f<d?y:-y:p+=s<f?y:-y:m<il[0]?p+=d<e?y:-y:p+=s<d?y:-y)}return p}function al(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=cs.quadraticRootAt(e,i,a,s,nl);if(0===l)return 0;var u=cs.quadraticExtremum(e,i,a);if(u>=0&&u<=1){for(var h=0,c=cs.quadraticAt(e,i,a,u),d=0;d<l;d++){var f=0===nl[d]||1===nl[d]?.5:1;cs.quadraticAt(t,n,r,nl[d])<o||(nl[d]<u?h+=c<e?f:-f:h+=a<c?f:-f)}return h}f=0===nl[0]||1===nl[0]?.5:1;return cs.quadraticAt(t,n,r,nl[0])<o?0:a<e?f:-f}function ol(t,e,n,i,r,a,o,s){if((s-=e)>n||s<-n)return 0;var l=Math.sqrt(n*n-s*s);nl[0]=-l,nl[1]=l;var u=Math.abs(i-r);if(u<1e-4)return 0;if(u%el<1e-4){i=0,r=el;var h=a?1:-1;return o>=nl[0]+t&&o<=nl[1]+t?h:0}if(a){l=i;i=Qs(r),r=Qs(l)}else i=Qs(i),r=Qs(r);i>r&&(r+=el);for(var c=0,d=0;d<2;d++){var f=nl[d];if(f+t>o){var p=Math.atan2(s,f);h=a?1:-1;p<0&&(p=el+p),(p>=i&&p<=r||p+el>=i&&p+el<=r)&&(p>Math.PI/2&&p<1.5*Math.PI&&(h=-h),c+=h)}}return c}function sl(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===tl.M&&d>1&&(n||(s+=Js(l,u,h,c,i,r))),1===d&&(h=l=t[d],c=u=t[d+1]),f){case tl.M:l=h=t[d++],u=c=t[d++];break;case tl.L:if(n){if(Us.containStroke(l,u,t[d],t[d+1],e,i,r))return!0}else s+=Js(l,u,t[d],t[d+1],i,r)||0;l=t[d++],u=t[d++];break;case tl.C:if(n){if(js.containStroke(l,u,t[d++],t[d++],t[d++],t[d++],t[d],t[d+1],e,i,r))return!0}else s+=rl(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 tl.Q:if(n){if(Ys.containStroke(l,u,t[d++],t[d++],t[d],t[d+1],e,i,r))return!0}else s+=al(l,u,t[d++],t[d++],t[d],t[d+1],i,r)||0;l=t[d++],u=t[d++];break;case tl.A:var p=t[d++],g=t[d++],v=t[d++],m=t[d++],y=t[d++],x=t[d++];d+=1;var _=1-t[d++],w=Math.cos(y)*v+p,b=Math.sin(y)*m+g;d>1?s+=Js(l,u,w,b,i,r):(h=w,c=b);var S=(i-p)*m/v+p;if(n){if(Ks.containStroke(p,g,m,y,y+x,_,e,S,r))return!0}else s+=ol(p,g,m,y,y+x,_,S,r);l=Math.cos(y+x)*v+p,u=Math.sin(y+x)*m+g;break;case tl.R:h=l=t[d++],c=u=t[d++];w=h+t[d++],b=c+t[d++];if(n){if(Us.containStroke(h,c,w,c,e,i,r)||Us.containStroke(w,c,w,b,e,i,r)||Us.containStroke(w,b,h,b,e,i,r)||Us.containStroke(h,b,h,c,e,i,r))return!0}else s+=Js(w,c,w,b,i,r),s+=Js(h,b,h,c,i,r);break;case tl.Z:if(n){if(Us.containStroke(l,u,h,c,e,i,r))return!0}else s+=Js(l,u,h,c,i,r);l=h,u=c}}return n||(a=u,o=c,Math.abs(a-o)<1e-4)||(s+=Js(l,u,h,c,i,r)||0),0!==s}var ll={contain:function(t,e,n){return sl(t,0,!1,e,n)},containStroke:function(t,e,n,i){return sl(t,e,!0,n,i)}},ul=Qi.prototype.getCanvasPattern,hl=Math.abs,cl=new Vs(!0);function dl(t){_a.call(this,t),this.path=null}dl.prototype={constructor:dl,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(t,e){var n,i=this.style,r=this.path||cl,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=ul.call(s,t)),h?t.strokeStyle=this._strokeGradient:d&&(t.strokeStyle=ul.call(l,t));var f=i.lineDash,p=i.lineDashOffset,g=!!t.setLineDash,v=this.getGlobalScale();if(r.setScale(v[0],v[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 m=t.globalAlpha;t.globalAlpha=i.fillOpacity*i.opacity,r.fill(t),t.globalAlpha=m}else r.fill(t);if(f&&g&&(t.setLineDash(f),t.lineDashOffset=p),a)if(null!=i.strokeOpacity){m=t.globalAlpha;t.globalAlpha=i.strokeOpacity*i.opacity,r.stroke(t),t.globalAlpha=m}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 Vs},getBoundingRect:function(){var t=this._rect,e=this.style,n=!t;if(n){var i=this.path;i||(i=this.path=new Vs),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)),ll.containStroke(a,o/s,t,e)))return!0}if(r.hasFill())return ll.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):_a.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var n=this.shape;if(n){if(Nt.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&&hl(t[0]-1)>1e-10&&hl(t[3]-1)>1e-10?Math.sqrt(hl(t[0]*t[3]-t[2]*t[1])):1}},dl.extend=function(t){var e=function(e){dl.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 Nt.inherits(e,dl),t)"style"!==n&&"shape"!==n&&(e.prototype[n]=t[n]);return e},Nt.inherits(dl,_a);var fl=dl,pl=ae.applyTransform,gl=Vs.CMD,vl=[[],[],[]],ml=Math.sqrt,yl=Math.atan2;var xl=function(t,e){var n,i,r,a,o,s=t.data,l=gl.M,u=gl.C,h=gl.L,c=gl.R,d=gl.A,f=gl.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],v=ml(e[0]*e[0]+e[1]*e[1]),m=ml(e[2]*e[2]+e[3]*e[3]),y=yl(-e[1]/m,e[0]/v);s[r]*=v,s[r++]+=p,s[r]*=m,s[r++]+=g,s[r++]*=v,s[r++]*=m,s[r++]+=y,s[r++]+=y,a=r+=2;break;case c:x[0]=s[r++],x[1]=s[r++],pl(x,x,e),s[a++]=x[0],s[a++]=x[1],x[0]+=s[r++],x[1]+=s[r++],pl(x,x,e),s[a++]=x[0],s[a++]=x[1]}for(o=0;o<i;o++){var x;(x=vl[o])[0]=s[r++],x[1]=s[r++],pl(x,x,e),s[a++]=x[0],s[a++]=x[1]}}},_l=Math.sqrt,wl=Math.sin,bl=Math.cos,Sl=Math.PI,Tl=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},Cl=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(Tl(t)*Tl(e))},Ml=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Cl(t,e))};function Al(t,e,n,i,r,a,o,s,l,u,h){var c=l*(Sl/180),d=bl(c)*(t-n)/2+wl(c)*(e-i)/2,f=-1*wl(c)*(t-n)/2+bl(c)*(e-i)/2,p=d*d/(o*o)+f*f/(s*s);p>1&&(o*=_l(p),s*=_l(p));var g=(r===a?-1:1)*_l((o*o*(s*s)-o*o*(f*f)-s*s*(d*d))/(o*o*(f*f)+s*s*(d*d)))||0,v=g*o*f/s,m=g*-s*d/o,y=(t+n)/2+bl(c)*v-wl(c)*m,x=(e+i)/2+wl(c)*v+bl(c)*m,_=Ml([1,0],[(d-v)/o,(f-m)/s]),w=[(d-v)/o,(f-m)/s],b=[(-1*d-v)/o,(-1*f-m)/s],S=Ml(w,b);Cl(w,b)<=-1&&(S=Sl),Cl(w,b)>=1&&(S=0),0===a&&S>0&&(S-=2*Sl),1===a&&S<0&&(S+=2*Sl),h.addData(u,y,x,o,s,_,S,c,a)}var Il=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,kl=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Dl(t,e){var n=function(t){if(!t)return new Vs;for(var e,n=0,i=0,r=n,a=i,o=new Vs,s=Vs.CMD,l=t.match(Il),u=0;u<l.length;u++){for(var h,c=l[u],d=c.charAt(0),f=c.match(kl)||[],p=f.length,g=0;g<p;g++)f[g]=parseFloat(f[g]);for(var v=0;v<p;){var m,y,x,_,w,b,S,T=n,C=i;switch(d){case"l":n+=f[v++],i+=f[v++],h=s.L,o.addData(h,n,i);break;case"L":n=f[v++],i=f[v++],h=s.L,o.addData(h,n,i);break;case"m":n+=f[v++],i+=f[v++],h=s.M,o.addData(h,n,i),r=n,a=i,d="l";break;case"M":n=f[v++],i=f[v++],h=s.M,o.addData(h,n,i),r=n,a=i,d="L";break;case"h":n+=f[v++],h=s.L,o.addData(h,n,i);break;case"H":n=f[v++],h=s.L,o.addData(h,n,i);break;case"v":i+=f[v++],h=s.L,o.addData(h,n,i);break;case"V":i=f[v++],h=s.L,o.addData(h,n,i);break;case"C":h=s.C,o.addData(h,f[v++],f[v++],f[v++],f[v++],f[v++],f[v++]),n=f[v-2],i=f[v-1];break;case"c":h=s.C,o.addData(h,f[v++]+n,f[v++]+i,f[v++]+n,f[v++]+i,f[v++]+n,f[v++]+i),n+=f[v-2],i+=f[v-1];break;case"S":m=n,y=i;var M=o.len(),A=o.data;e===s.C&&(m+=n-A[M-4],y+=i-A[M-3]),h=s.C,T=f[v++],C=f[v++],n=f[v++],i=f[v++],o.addData(h,m,y,T,C,n,i);break;case"s":m=n,y=i,M=o.len(),A=o.data,e===s.C&&(m+=n-A[M-4],y+=i-A[M-3]),h=s.C,T=n+f[v++],C=i+f[v++],n+=f[v++],i+=f[v++],o.addData(h,m,y,T,C,n,i);break;case"Q":T=f[v++],C=f[v++],n=f[v++],i=f[v++],h=s.Q,o.addData(h,T,C,n,i);break;case"q":T=f[v++]+n,C=f[v++]+i,n+=f[v++],i+=f[v++],h=s.Q,o.addData(h,T,C,n,i);break;case"T":m=n,y=i,M=o.len(),A=o.data,e===s.Q&&(m+=n-A[M-4],y+=i-A[M-3]),n=f[v++],i=f[v++],h=s.Q,o.addData(h,m,y,n,i);break;case"t":m=n,y=i,M=o.len(),A=o.data,e===s.Q&&(m+=n-A[M-4],y+=i-A[M-3]),n+=f[v++],i+=f[v++],h=s.Q,o.addData(h,m,y,n,i);break;case"A":x=f[v++],_=f[v++],w=f[v++],b=f[v++],S=f[v++],Al(T=n,C=i,n=f[v++],i=f[v++],b,S,x,_,w,h=s.A,o);break;case"a":x=f[v++],_=f[v++],w=f[v++],b=f[v++],S=f[v++],Al(T=n,C=i,n+=f[v++],i+=f[v++],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){xl(n,t),this.dirty(!0)},e}var Pl=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 fl(e);return o.createPathProxy(),o.buildPath=function(t){t.appendPath(n);var e=t.getContext();e&&t.rebuildPath(e)},o},Ol={createFromString:function(t,e){return new fl(Dl(t,e))},extendFromString:function(t,e){return fl.extend(Dl(t,e))},mergePath:Pl},Ll=Vi.ContextCachedBy,Rl=function(t){_a.call(this,t)};Rl.prototype={constructor:Rl,type:"text",brush:function(t,e){var n=this.style;this.__dirty&&pa.normalizeTextStyle(n,!0),n.fill=n.stroke=n.shadowBlur=n.shadowColor=n.shadowOffsetX=n.shadowOffsetY=null;var i=n.text;null!=i&&(i+=""),pa.needDrawText(i,n)?(this.setTransform(t),pa.renderText(this,t,i,n,null,e),this.restoreTransform(t)):t.__attrCachedBy=Ll.NONE},getBoundingRect:function(){var t=this.style;if(this.__dirty&&pa.normalizeTextStyle(t,!0),!this._rect){t.text;var e=Nr.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,pa.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}},Nt.inherits(Rl,_a);var El=Rl,Bl=fl.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)}}),Nl=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]];var zl=function(t){return tt.browser.ie&&tt.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<Nl.length;l++)Nl[l][2]=i[Nl[l][0]],i[Nl[l][0]]=Nl[l][1];e=!0;break}}if(t.apply(this,arguments),e)for(l=0;l<Nl.length;l++)i[Nl[l][0]]=Nl[l][2]}:t},Fl=fl.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:zl(fl.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()}}),Hl=fl.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)}}),Wl=Hl,Vl=ae.distance;function Ul(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 jl=function(t,e){for(var n=t.length,i=[],r=0,a=1;a<n;a++)r+=Vl(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([Ul(s[0],f[0],l[0],u[0],d,p,g),Ul(s[1],f[1],l[1],u[1],d,p,g)])}return i},Gl=ae.min,Yl=ae.max,ql=ae.scale,Xl=ae.distance,Zl=ae.add,$l=ae.clone,Kl=ae.sub;var Jl=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++)Gl(o,o,t[d]),Yl(s,s,t[d]);Gl(o,o,i[0]),Yl(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($l(t[d]));continue}r=t[d-1],a=t[d+1]}Kl(u,a,r),ql(u,u,e);var g=Xl(p,r),v=Xl(p,a),m=g+v;0!==m&&(g/=m,v/=m),ql(h,u,-g),ql(c,u,v);var y=Zl([],p,h),x=Zl([],p,c);i&&(Yl(y,y,o),Gl(y,y,s),Yl(x,x,o),Gl(x,x,s)),l.push(y),l.push(x)}return n&&l.push(l.shift()),l};var Ql=function(t,e,n){var i=e.points,r=e.smooth;if(i&&i.length>=2){if(r&&"spline"!==r){var a=Jl(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=jl(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()}},tu={buildPath:Ql},eu=fl.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){tu.buildPath(t,e,!0)}}),nu=fl.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){tu.buildPath(t,e,!1)}}),iu=Math.round;function ru(t,e,n){if(!e)return t;var i=iu(2*t);return(i+iu(e))%2==0?i/2:(i+(n?1:-1))/2}var au=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&&(iu(2*i)===iu(2*r)&&(t.x1=t.x2=ru(i,s,!0)),iu(2*a)===iu(2*o)&&(t.y1=t.y2=ru(a,s,!0)))}},ou=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=ru(i,s,!0),t.y=ru(r,s,!0),t.width=Math.max(ru(i+a,s,!1)-t.x,0===a?0:1),t.height=Math.max(ru(r+o,s,!1)-t.y,0===o?0:1))}},su={subPixelOptimizeLine:au,subPixelOptimizeRect:ou,subPixelOptimize:ru},lu=su.subPixelOptimizeRect,uu={},hu=fl.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?(lu(uu,e,this.style),n=uu.x,i=uu.y,r=uu.width,a=uu.height,uu.r=e.r,e=uu):(n=e.x,i=e.y,r=e.width,a=e.height),e.r?zr.buildPath(t,e):t.rect(n,i,r,a),t.closePath()}}),cu=su.subPixelOptimizeLine,du={},fu=fl.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?(cu(du,e,this.style),n=du.x1,i=du.y1,r=du.x2,a=du.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]}}),pu=cs.quadraticSubdivide,gu=cs.cubicSubdivide,vu=cs.quadraticAt,mu=cs.cubicAt,yu=cs.quadraticDerivativeAt,xu=cs.cubicDerivativeAt,_u=[];function wu(t,e,n){var i=t.cpx2,r=t.cpy2;return null===i||null===r?[(n?xu:mu)(t.x1,t.cpx1,t.cpx2,t.x2,e),(n?xu:mu)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(n?yu:vu)(t.x1,t.cpx1,t.x2,e),(n?yu:vu)(t.y1,t.cpy1,t.y2,e)]}var bu=fl.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&&(pu(n,o,r,h,_u),o=_u[1],r=_u[2],pu(i,s,a,h,_u),s=_u[1],a=_u[2]),t.quadraticCurveTo(o,s,r,a)):(h<1&&(gu(n,o,l,r,h,_u),o=_u[1],l=_u[2],r=_u[3],gu(i,s,u,a,h,_u),s=_u[1],u=_u[2],a=_u[3]),t.bezierCurveTo(o,s,l,u,r,a)))},pointAt:function(t){return wu(this.shape,t,!1)},tangentAt:function(t){var e=wu(this.shape,t,!0);return ae.normalize(e,e)}}),Su=fl.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)}}),Tu=fl.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(),fl.prototype.getBoundingRect.call(this)}}),Cu=Tu,Mu=function(t){this.colorStops=t||[]};Mu.prototype={constructor:Mu,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}};var Au=Mu,Iu=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,Au.call(this,r)};Iu.prototype={constructor:Iu},Nt.inherits(Iu,Au);var ku=Iu,Du=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,Au.call(this,i)};Du.prototype={constructor:Du},Nt.inherits(Du,Au);var Pu=Du,Ou=Nt.inherits;function Lu(t){_a.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}Lu.prototype.incremental=!0,Lu.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},Lu.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.dirty()},Lu.prototype.addDisplayables=function(t,e){e=e||!1;for(var n=0;n<t.length;n++)this.addDisplayable(t[n],e)},Lu.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])},Lu.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}},Lu.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 Ru=[];Lu.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new Ii(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(Ru)),t.union(i)}this._rect=t}return this._rect},Lu.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},Ou(Lu,_a);var Eu=ba,Bu=Di,Nu=El,zu=Bl,Fu=Fl,Hu=Wl,Wu=eu,Vu=nu,Uu=hu,ju=fu,Gu=bu,Yu=Su,qu=Cu,Xu=ku,Zu=Pu,$u=Ii,Ku=Lu,Ju=Math.max,Qu=Math.min,th={},eh="emphasis",nh="normal",ih=1,rh={},ah={};function oh(t,e){ah[t]=e}function sh(t,e,n,i){var r=Ol.createFromString(t,e);return n&&("center"===i&&(n=lh(n,r.getBoundingRect())),hh(r,n)),r}function lh(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 uh=Ol.mergePath;function hh(t,e){if(t.applyTransform){var n=t.getBoundingRect().calculateTransform(e);t.applyTransform(n)}}var ch=su.subPixelOptimize;function dh(t){return null!=t&&"none"!==t}var fh=Nt.createHashMap(),ph=0;function gh(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),Ph(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),vh(a,e,"fill"),vh(a,e,"stroke"),Dh(a),i||(t.dirty(!1),t.z2+=1)}}}function vh(t,e,n){!dh(e[n])&&dh(t[n])&&(t[n]=function(t){if("string"!=typeof t)return t;var e=fh.get(t);return e||(e=Vn.lift(t,-.1),ph<1e4&&(fh.set(t,e),ph++)),e}(t[n]))}function mh(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&&(Ph(n),t.setStyle(i),Dh(n));var r=t.__cachedNormalZ2;null!=r&&t.z2-r==1&&(t.z2=r)}}function yh(t,e,n){var i,r=nh,a=nh;t.__highlighted&&(r=eh,i=!0),e(t,n),t.__highlighted&&(a=eh,i=!0),t.isGroup&&t.traverse((function(t){!t.isGroup&&e(t,n)})),i&&t.__highDownOnUpdate&&t.__highDownOnUpdate(r,a)}function xh(t,e){e=t.__hoverStl=!1!==e&&(t.hoverStyle||e||{}),t.__hoverStlDirty=!0,t.__highlighted&&(t.__cachedNormalStl=null,mh(t),gh(t))}function _h(t){!Th(this,t)&&!this.__highByOuter&&yh(this,gh)}function wh(t){!Th(this,t)&&!this.__highByOuter&&yh(this,mh)}function bh(t){this.__highByOuter|=1<<(t||0),yh(this,gh)}function Sh(t){!(this.__highByOuter&=~(1<<(t||0)))&&yh(this,mh)}function Th(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function Ch(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",_h)[i]("mouseout",wh),t[i]("emphasis",bh)[i]("normal",Sh),t.__highByOuter=t.__highByOuter||0,t.__highDownDispatcher=!n}}function Mh(t,e,n,i,r){return Ah(t,e,i,r),n&&Nt.extend(t,n),t}function Ah(t,e,n,i){if((n=n||th).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=Nt.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||th).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]);Ih(o[h]={},c,l,n,i)}return t.rich=o,Ih(t,e,l,n,i,!0),n.forceRich&&!n.textStyle&&(n.textStyle={}),t}function Ih(t,e,n,i,r,a){n=!r&&n||th,t.textFill=kh(e.getShallow("color"),i)||n.color,t.textStroke=kh(e.getShallow("textBorderColor"),i)||n.textBorderColor,t.textStrokeWidth=Nt.retrieve2(e.getShallow("textBorderWidth"),n.textBorderWidth),r||(a&&(t.insideRollbackOpt=i,Dh(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=kh(e.getShallow("backgroundColor"),i),t.textPadding=e.getShallow("padding"),t.textBorderColor=kh(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 kh(t,e){return"auto"!==t?t:e&&e.autoColor?e.autoColor:null}function Dh(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 Ph(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function Oh(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 Lh(t,e,n,i,r){Oh(!0,t,e,n,i,r)}function Rh(t,e,n){return e&&!Nt.isArrayLike(e)&&(e=hn.getLocalTransform(e)),n&&(e=tn.invert([],e)),ae.applyTransform([],t,e)}function Eh(t,e,n,i,r,a,o,s){var l,u=n-t,h=i-e,c=o-r,d=s-a,f=Bh(c,d,u,h);if((l=f)<=1e-6&&l>=-1e-6)return!1;var p=t-r,g=e-a,v=Bh(p,g,u,h)/f;if(v<0||v>1)return!1;var m=Bh(p,g,c,d)/f;return!(m<0||m>1)}function Bh(t,e,n,i){return t*i-n*e}oh("circle",Bl),oh("sector",Fl),oh("ring",Wl),oh("polygon",eu),oh("polyline",nu),oh("rect",hu),oh("line",fu),oh("bezierCurve",bu),oh("arc",Su);var Nh=function(t,e,n){var i=new ba({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(lh(e,r))}}});return i},zh=function(t){return su.subPixelOptimizeLine(t.shape,t.shape,t.style),t},Fh=function(t){return su.subPixelOptimizeRect(t.shape,t.shape,t.style),t},Hh=function(t,e,n){var i,r={isRectText:!0};!1===n?i=!0:r.autoColor=n,Ah(t,e,r,i)},Wh=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=Rh(a,e,n),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"},Vh=function(t,e){return Nt.map(t,(function(t){var n=t[0];n=Ju(n,e.x),n=Qu(n,e.x+e.width);var i=t[1];return i=Ju(i,e.y),[n,i=Qu(i,e.y+e.height)]}))},Uh=function(t,e,n){var i=(e=Nt.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),Nt.defaults(i,n),new ba(e)):sh(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(Eh(t,e,n,i,s[0],s[1],o[0],o[1]))return!0;o=s}},Gh={Image:Eu,Group:Bu,Text:Nu,Circle:zu,Sector:Fu,Ring:Hu,Polygon:Wu,Polyline:Vu,Rect:Uu,Line:ju,BezierCurve:Gu,Arc:Yu,CompoundPath:qu,LinearGradient:Xu,RadialGradient:Zu,BoundingRect:$u,IncrementalDisplayable:Ku,Z2_EMPHASIS_LIFT:1,CACHED_LABEL_STYLE_PROPERTIES:{color:"textFill",textBorderColor:"textStroke",textBorderWidth:"textStrokeWidth"},extendShape:function(t){return fl.extend(t)},extendPath:function(t,e){return Ol.extendFromString(t,e)},registerShape:oh,getShapeClass:function(t){if(ah.hasOwnProperty(t))return ah[t]},makePath:sh,makeImage:Nh,mergePath:uh,resizePath:hh,subPixelOptimizeLine:zh,subPixelOptimizeRect:Fh,subPixelOptimize:ch,setElementHoverStyle:xh,setHoverStyle:function(t,e){Ch(t,!0),yh(t,xh,e)},setAsHighDownDispatcher:Ch,isHighDownDispatcher:function(t){return!(!t||!t.__highDownDispatcher)},getHighlightDigit:function(t){var e=rh[t];return null==e&&ih<=32&&(e=rh[t]=ih++),e},setLabelStyle:function(t,e,n,i,r,a,o){var s,l=(r=r||th).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=Nt.isFunction(r.defaultText)?r.defaultText(u,r):r.defaultText));var p=d?s:null,g=f?Nt.retrieve2(l?l.getFormattedLabel(u,"emphasis",null,h,c):null,s):null;null==p&&null==g||(Mh(t,n,a,r),Mh(e,i,o,r,!0)),t.text=p,e.text=g},modifyLabelStyle:function(t,e,n){var i=t.style;e&&(Ph(i),t.setStyle(e),Dh(i)),i=t.__hoverStl,n&&i&&(Ph(i),Nt.extend(i,n),Dh(i))},setTextStyle:Mh,setText:Hh,getFont:function(t,e){var n=e&&e.getModel("textStyle");return Nt.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:Lh,initProps:function(t,e,n,i,r){Oh(!1,t,e,n,i,r)},getTransform:function(t,e){for(var n=tn.identity([]);t&&t!==e;)tn.mul(n,t.getLocalTransform(),n),t=t.parent;return n},applyTransform:Rh,transformDirection:Wh,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)),Lh(t,i,n,t.dataIndex)}}}))}function o(t){var e={position:ae.clone(t.position),rotation:t.rotation};return t.shape&&(e.shape=Nt.extend({},t.shape)),e}},clipPointsByRect:Vh,clipRectByRect:function(t,e){var n=Ju(t.x,e.x),i=Qu(t.x+t.width,e.x+e.width),r=Ju(t.y,e.y),a=Qu(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:Uh,linePolygonIntersect:jh,lineLineIntersect:Eh},Yh=["textStyle","color"],qh={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(Yh):null)},getFont:function(){return Gh.getFont({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return Nr.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"))}},Xh=qh,Zh=No([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),$h={getItemStyle:function(t,e){var n=Zh(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]}},Kh=$h,Jh=Io.makeInner,Qh=Bo.enableClassExtend,tc=Bo.enableClassCheck,ec=Nt.mixin,nc=Jh();function ic(t,e,n){this.parentModel=e,this.ecModel=n,this.option=t}function rc(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 ac(t,e){var n=nc(t).getParent;return n?n.call(t,e):t.parentModel}ic.prototype={constructor:ic,init:null,mergeOption:function(t){Nt.merge(this.option,t,!0)},get:function(t,e){return null==t?this.option:rc(this.option,this.parsePath(t),!e&&ac(this,t))},getShallow:function(t,e){var n=this.option,i=null==n?n:n[t],r=!e&&ac(this,t);return null==i&&r&&(i=r.getShallow(t)),i},getModel:function(t,e){var n;return new ic(null==t?this.option:rc(this.option,t=this.parsePath(t)),e=e||(n=ac(this,t))&&n.getModel(t),this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new(0,this.constructor)(Nt.clone(this.option))},setReadOnly:function(t){},parsePath:function(t){return"string"==typeof t&&(t=t.split(".")),t},customizeGetParent:function(t){nc(this).getParent=t},isAnimationEnabled:function(){if(!tt.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},Qh(ic),tc(ic),ec(ic,Ho),ec(ic,Vo),ec(ic,Xh),ec(ic,Kh);var oc=ic,sc=Bo.parseClassType,lc=0;var uc={getUID:function(t){return[t||"",lc++,Math.random().toFixed(5)].join("_")},enableSubTypeDefaulter:function(t){var e={};return t.registerSubTypeDefaulter=function(t,n){t=sc(t),e[t.main]=n},t.determineSubType=function(n,i){var r=i.type;if(!r){var a=sc(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 Nt.each(t,(function(a){var o=n(i,a),s=function(t,e){var n=[];return Nt.each(t,(function(t){Nt.indexOf(e,t)>=0&&n.push(t)})),n}(o.originalDeps=e(a),t);o.entryCount=s.length,0===o.entryCount&&r.push(a),Nt.each(s,(function(t){Nt.indexOf(o.predecessor,t)<0&&o.predecessor.push(t);var e=n(i,t);Nt.indexOf(e.successor,t)<0&&e.successor.push(a)}))})),{graph:i,noEntryList:r}}(i),s=o.graph,l=o.noEntryList,u={};for(Nt.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]),Nt.each(c.successor,d?p:f)}Nt.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)}}}},hc=1e-4;var cc=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function dc(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 fc=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]},pc=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},gc=function(t,e,n){if(!t[e])return 0;var i=Nt.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=Nt.map(t,(function(t){return(isNaN(t)?0:t)/i*r*100})),o=100*r,s=Nt.map(a,(function(t){return Math.floor(t)})),l=Nt.reduce(s,(function(t,e){return t+e}),0),u=Nt.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},vc=function(t,e){var n=dc(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},mc=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))}},yc={linearMap:fc,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:pc,getPercentWithPrecision:gc,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<hc},parseDate:function(t){if(t instanceof Date)return t;if("string"==typeof t){var e=cc.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,dc(t))},quantityExponent:dc,nice:vc,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:mc,isNumeric:function(t){return t-parseFloat(t)>=0}};var xc=Nt.normalizeCssArray,_c=/([&<>"'])/g,wc={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function bc(t){return null==t?"":(t+"").replace(_c,(function(t,e){return wc[e]}))}var Sc=["a","b","c","d","e","f","g"],Tc=function(t,e){return"{"+t+(null==e?"":e)+"}"};function Cc(t,e){return"0000".substr(0,e-(t+="").length)+t}var Mc=function(t,e,n){Nt.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=Sc[a];t=t.replace(Tc(o),Tc(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(Tc(Sc[l],s),n?bc(u):u)}return t},Ac=function(t,e,n){return Nt.each(e,(function(e,i){t=t.replace("{"+i+"}",n?bc(e):e)})),t},Ic=function(t,e){var n=(t=Nt.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:'+bc(n)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+bc(n)+";"+(e||"")+'"></span>':{renderMode:r,content:"{marker"+a+"|}  ",style:{color:n}}:""},kc=function(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var i=yc.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",Cc(o,2)).replace("M",o).replace("yyyy",a).replace("yy",a%100).replace("dd",Cc(s,2)).replace("d",s).replace("hh",Cc(l,2)).replace("h",l).replace("mm",Cc(u,2)).replace("m",u).replace("ss",Cc(h,2)).replace("s",h).replace("SSS",Cc(c,3))},Dc=function(t,e,n,i,r,a,o,s){return Nr.getBoundingRect(t,e,n,i,r,s,a,o)},Pc={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:xc,encodeHTML:bc,formatTpl:Mc,formatTplSimple:Ac,getTooltipMarker:Ic,formatTime:kc,capitalFirst:function(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t},truncateText:Nr.truncateText,getTextBoundingRect:function(t){return Nr.getBoundingRect(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)},getTextRect:Dc,windowOpen:function(t,e){if("_blank"===e||"blank"===e){var n=window.open();n.opener=null,n.location=t}else window.open(t,e)}},Oc=yc.parsePercent,Lc=Nt.each,Rc=["left","right","top","bottom","width","height"],Ec=[["width","left","right"],["height","top","bottom"]];function Bc(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 v=f.width+(g?-g.x+f.x:0);(h=a+v)>i||l.newline?(a=0,h=v,o+=s+n,s=f.height):s=Math.max(s,f.height)}else{var m=f.height+(g?-g.y+f.y:0);(c=o+m)>r||l.newline?(a+=s+n,o=0,c=m,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 Nc=Bc,zc=Nt.curry(Bc,"vertical"),Fc=Nt.curry(Bc,"horizontal");function Hc(t,e,n){n=Pc.normalizeCssArray(n||0);var i=e.width,r=e.height,a=Oc(t.left,i),o=Oc(t.top,r),s=Oc(t.right,i),l=Oc(t.bottom,r),u=Oc(t.width,i),h=Oc(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 Ii(a+n[3],o+n[0],u,h);return p.margin=n,p}function Wc(t,e){return e&&t&&Lc(Rc,(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t}var Vc=function(t,e,n){!Nt.isObject(n)&&(n={});var i=n.ignoreSize;!Nt.isArray(i)&&(i=[i,i]);var r=o(Ec[0],0),a=o(Ec[1],1);function o(n,r){var a={},o=0,u={},h=0;if(Lc(n,(function(e){u[e]=t[e]})),Lc(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){Lc(t,(function(t){e[t]=n[t]}))}u(Ec[0],t,r),u(Ec[1],t,a)},Uc={LOCATION_PARAMS:Rc,HV_NAMES:Ec,box:Nc,vbox:zc,hbox:Fc,getAvailableSize:function(t,e,n){var i=e.width,r=e.height,a=Oc(t.x,i),o=Oc(t.y,r),s=Oc(t.x2,i),l=Oc(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=Pc.normalizeCssArray(n||0),{width:Math.max(s-a-n[1]-n[3],0),height:Math.max(l-o-n[0]-n[2],0)}},getLayoutRect:Hc,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 Ii(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=Hc(Nt.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[Ec[e][0]]||null!=t[Ec[e][1]]&&null!=t[Ec[e][2]]},mergeLayoutParam:Vc,getLayoutParams:function(t){return Wc({},t)},copyLayoutParams:Wc},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")}}},Gc=Bo.enableClassManagement,Yc=Bo.parseClassType,qc=(0,Io.makeInner)(),Xc=oc.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,n,i){oc.call(this,t,e,n,i),this.uid=uc.getUID("ec_cpt_model")},init:function(t,e,n,i){this.mergeDefaultAndTheme(t,n)},mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?Uc.getLayoutParams(t):{},r=e.getTheme();Nt.merge(t,r.get(this.mainType)),Nt.merge(t,this.getDefaultOption()),n&&Uc.mergeLayoutParam(t,i,n)},mergeOption:function(t,e){Nt.merge(this.option,t,!0);var n=this.layoutMode;n&&Uc.mergeLayoutParam(this.option,t,n)},optionUpdated:function(t,e){},getDefaultOption:function(){var t=qc(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=Nt.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)})}});Gc(Xc,{registerWhenExtend:!0}),uc.enableSubTypeDefaulter(Xc),uc.enableTopologicalTravel(Xc,(function(t){var e=[];Nt.each(Xc.getClassesByMainType(t),(function(t){e=e.concat(t.prototype.dependencies||[])})),e=Nt.map(e,(function(t){return Yc(t).main})),"dataset"!==t&&Nt.indexOf(e,"dataset")<=0&&e.unshift("dataset");return e})),Nt.mixin(Xc,jc);var Zc=Xc,$c="";"undefined"!=typeof navigator&&($c=navigator.platform||"");var Kc={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:$c.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},Jc=Io.makeInner,Qc=Io.normalizeToArray,td=Jc();var ed={clearColorPalette:function(){td(this).colorIdx=0,td(this).colorNameMap={}},getColorFromPalette:function(t,e,n){var i=td(e=e||this),r=i.colorIdx||0,a=i.colorNameMap=i.colorNameMap||{};if(a.hasOwnProperty(t))return a[t];var o=Qc(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}}},nd=ed,id={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"},rd=Nt.createHashMap,ad=Nt.isTypedArray,od=Bo.enableClassCheck,sd=id.SOURCE_FORMAT_ORIGINAL,ld=id.SERIES_LAYOUT_BY_COLUMN,ud=id.SOURCE_FORMAT_UNKNOWN,hd=id.SOURCE_FORMAT_TYPED_ARRAY,cd=id.SOURCE_FORMAT_KEYED_COLUMNS;function dd(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===cd?{}:[]),this.sourceFormat=t.sourceFormat||ud,this.seriesLayoutBy=t.seriesLayoutBy||ld,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&rd(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}dd.seriesDataToSource=function(t){return new dd({data:t,sourceFormat:ad(t)?hd:sd,fromDataset:!1})},od(dd);var fd=dd,pd=Io.makeInner,gd=Io.getDataItemValue,vd=Nt.createHashMap,md=Nt.each,yd=Nt.map,xd=Nt.isArray,_d=Nt.isString,wd=Nt.isObject,bd=Nt.isTypedArray,Sd=Nt.isArrayLike,Td=Nt.extend,Cd=id.SOURCE_FORMAT_ORIGINAL,Md=id.SOURCE_FORMAT_ARRAY_ROWS,Ad=id.SOURCE_FORMAT_OBJECT_ROWS,Id=id.SOURCE_FORMAT_KEYED_COLUMNS,kd=id.SOURCE_FORMAT_UNKNOWN,Dd=id.SOURCE_FORMAT_TYPED_ARRAY,Pd=id.SERIES_LAYOUT_BY_ROW,Od={Must:1,Might:2,Not:3},Ld=pd();function Rd(t){if(t){var e=vd();return yd(t,(function(t,n){if(null==(t=Td({},wd(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 Ed(t,e,n,i){if(null==i&&(i=1/0),e===Pd)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 Bd(t){var e=t.option;if(!e.data)return t.ecModel.getComponent("dataset",e.datasetIndex||0)}function Nd(t,e,n,i,r,a){var o,s,l;if(bd(t))return Od.Not;if(i){var u=i[a];wd(u)?(s=u.name,l=u.type):_d(u)&&(s=u)}if(null!=l)return"ordinal"===l?Od.Must:Od.Not;if(e===Md)if(n===Pd){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===Ad){if(!s)return Od.Not;for(c=0;c<t.length&&c<5;c++){if((f=t[c])&&null!=(o=g(f[s])))return o}}else if(e===Id){if(!s)return Od.Not;if(!(h=t[s])||bd(h))return Od.Not;for(c=0;c<h.length&&c<5;c++)if(null!=(o=g(h[c])))return o}else if(e===Cd)for(c=0;c<t.length&&c<5;c++){var f=t[c],p=gd(f);if(!xd(p))return Od.Not;if(null!=(o=g(p[a])))return o}function g(t){var e=_d(t);return null!=t&&isFinite(t)&&""!==t?e?Od.Might:Od.Not:e&&"-"!==t?Od.Must:void 0}return Od.Not}var zd=function(t){var e=t.option.source,n=kd;if(bd(e))n=Dd;else if(xd(e)){0===e.length&&(n=Md);for(var i=0,r=e.length;i<r;i++){var a=e[i];if(null!=a){if(xd(a)){n=Md;break}if(wd(a)){n=Ad;break}}}}else if(wd(e)){for(var o in e)if(e.hasOwnProperty(o)&&Sd(e[o])){n=Id;break}}else if(null!=e)throw new Error("Invalid data");Ld(t).sourceFormat=n},Fd=function(t,e,n){var i={},r=Bd(e);if(!r||!t)return i;var a,o,s=[],l=[],u=e.ecModel,h=Ld(u).datasetMap,c=r.uid+"_"+n.seriesLayoutBy;t=t.slice(),md(t,(function(e,n){!wd(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 md(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},Hd=function(t,e,n){var i={};if(!Bd(t))return i;var r,a=e.sourceFormat,o=e.dimensionsDefine;a!==Ad&&a!==Id||md(o,(function(t,e){"name"===(wd(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=Nd(e.data,a,e.seriesLayoutBy,o,e.startIndex,l);s.push(h);var c=h===Od.Not;if(c&&null==t.v&&l!==r&&(t.v=l),(null==t.n||t.n===t.v||!c&&s[t.n]===Od.Not)&&(t.n=l),d(t)&&s[t.n]!==Od.Not)return t;c||(h===Od.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},Wd={BE_ORDINAL:Od,detectSourceFormat:zd,getSource:function(t){return Ld(t).source},resetSourceDefaulter:function(t){Ld(t).datasetMap=vd()},prepareSource:function(t){var e=t.option,n=e.data,i=bd(n)?Dd:Cd,r=!1,a=e.seriesLayoutBy,o=e.sourceHeader,s=e.dimensions,l=Bd(t);if(l){var u=l.option;n=u.source,i=Ld(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:Rd(r)};var a,o;if(e===Md)"auto"===i||null==i?Ed((function(t){null!=t&&"-"!==t&&(_d(t)?null==o&&(o=1):o=0)}),n,t,10):o=i?1:0,r||1!==o||(r=[],Ed((function(t,e){r[e]=null!=t?t:""}),n,t)),a=r?r.length:n===Pd?t.length:t[0]?t[0].length:null;else if(e===Ad)r||(r=function(t){var e,n=0;for(;n<t.length&&!(e=t[n++]););if(e){var i=[];return md(e,(function(t,e){i.push(e)})),i}}(t));else if(e===Id)r||(r=[],md(t,(function(t,e){r.push(e)})));else if(e===Cd){var s=gd(t[0]);a=xd(s)&&s.length||1}return{startIndex:o,dimensionsDefine:Rd(r),dimensionsDetectCount:a}}(n,i,a,o,s);Ld(t).source=new fd({data:n,fromDataset:r,seriesLayoutBy:a,sourceFormat:i,dimensionsDefine:h.dimensionsDefine,startIndex:h.startIndex,dimensionsDetectCount:h.dimensionsDetectCount,encodeDefine:e.encode})},makeSeriesEncodeForAxisCoordSys:Fd,makeSeriesEncodeForNameBased:Hd,guessOrdinal:function(t,e){return Nd(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}},Vd=Nt.each,Ud=Nt.filter,jd=Nt.map,Gd=Nt.isArray,Yd=Nt.indexOf,qd=Nt.isObject,Xd=Nt.isString,Zd=Nt.createHashMap,$d=Nt.assert,Kd=Nt.clone,Jd=Nt.merge,Qd=Nt.extend,tf=Nt.mixin,ef=Wd.resetSourceDefaulter,nf="\0_ec_inner",rf=oc.extend({init:function(t,e,n,i){n=n||{},this.option=null,this._theme=new oc(n),this._optionManager=i},setOption:function(t,e){$d(!(nf 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)):af.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&&Vd(a,(function(t){this.mergeOption(t,e=!0)}),this)}return e},mergeOption:function(t){var e=this.option,n=this._componentsMap,i=[];ef(this),Vd(t,(function(t,n){null!=t&&(Zc.hasClass(n)?n&&i.push(n):e[n]=null==e[n]?Kd(t):Jd(e[n],t,!0))})),Zc.topologicalTravel(i,Zc.getAllClassMainTypes(),(function(i,r){var a=Io.normalizeToArray(t[i]),o=Io.mappingToExists(n.get(i),a);Io.makeIdAndName(o),Vd(o,(function(t,e){var n=t.option;qd(n)&&(t.keyInfo.mainType=i,t.keyInfo.subType=function(t,e,n){var i=e.type?e.type:n?n.subType:Zc.determineSubType(t,e);return i}(i,n,t.exist))}));var s=function(t,e){Gd(e)||(e=e?[e]:[]);var n={};return Vd(e,(function(e){n[e]=(t.get(e)||[]).slice()})),n}(n,r);e[i]=[],n.set(i,[]),Vd(o,(function(t,r){var a=t.exist,o=t.option;if($d(qd(o)||a,"Empty component definition"),o){var l=Zc.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=Qd({dependentModels:s,componentIndex:r},t.keyInfo);a=new l(o,this,this,u),Qd(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&&of(this,n.get("series"))}),this),this._seriesIndicesMap=Zd(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var t=Kd(this.option);return Vd(t,(function(e,n){if(Zc.hasClass(n)){for(var i=(e=Io.normalizeToArray(e)).length-1;i>=0;i--)Io.isIdInner(e[i])&&e.splice(i,1);t[n]=e}})),delete t[nf],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)Gd(i)||(i=[i]),n=Ud(jd(i,(function(t){return o[t]})),(function(t){return!!t}));else if(null!=r){var s=Gd(r);n=Ud(o,(function(t){return s&&Yd(r,t.id)>=0||!s&&t.id===r}))}else if(null!=a){var l=Gd(a);n=Ud(o,(function(t){return l&&Yd(a,t.name)>=0||!l&&t.name===a}))}else n=o.slice();return sf(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=sf(u,t),t.filter?Ud(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){Vd(t,(function(t,r){e.call(n,i,t,r)}))}));else if(Xd(t))Vd(i.get(t),e,n);else if(qd(t)){var r=this.findComponents(t);Vd(r,e,n)}},getSeriesByName:function(t){var e=this._componentsMap.get("series");return Ud(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 Ud(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){Vd(this._seriesIndices,(function(n){var i=this._componentsMap.get("series")[n];t.call(e,i,n)}),this)},eachRawSeries:function(t,e){Vd(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,n){Vd(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 Vd(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){of(this,Ud(this._componentsMap.get("series"),t,e))},restoreData:function(t){var e=this._componentsMap;of(this,e.get("series"));var n=[];e.each((function(t,e){n.push(e)})),Zc.topologicalTravel(n,Zc.getAllClassMainTypes(),(function(n,i){Vd(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 af(t){this.option={},this.option[nf]=1,this._componentsMap=Zd({series:[]}),this._seriesIndices,this._seriesIndicesMap,function(t,e){var n=t.color&&!t.colorLayer;Vd(e,(function(e,i){"colorLayer"===i&&n||Zc.hasClass(i)||("object"==typeof e?t[i]=t[i]?Jd(t[i],e,!1):Kd(e):null==t[i]&&(t[i]=e))}))}(t,this._theme.option),Jd(t,Kc,!1),this.mergeOption(t)}function of(t,e){t._seriesIndicesMap=Zd(t._seriesIndices=jd(e,(function(t){return t.componentIndex}))||[])}function sf(t,e){return e.hasOwnProperty("subType")?Ud(t,(function(t){return t.subType===e.subType})):t}tf(rf,nd);var lf=rf,uf=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];var hf=function(t){Nt.each(uf,(function(e){this[e]=Nt.bind(t[e],t)}),this)},cf={};function df(){this._coordinateSystems=[]}df.prototype={constructor:df,create:function(t,e){var n=[];Nt.each(cf,(function(i,r){var a=i.create(t,e);n=n.concat(a||[])})),this._coordinateSystems=n},update:function(t,e){Nt.each(this._coordinateSystems,(function(n){n.update&&n.update(t,e)}))},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},df.register=function(t,e){cf[t]=e},df.get=function(t){return cf[t]};var ff=df,pf=Nt.each,gf=Nt.clone,vf=Nt.map,mf=Nt.merge,yf=/^(min|max)?(.+)$/;function xf(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function _f(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;pf(l,(function(t){t&&t.option&&(t.query?o.push(t):i||(i=t))}))}return r||(r=t),r.timeline||(r.timeline=s),pf([r].concat(a).concat(Nt.map(o,(function(t){return t.option}))),(function(t){pf(e,(function(e){e(t,n)}))})),{baseOption:r,timelineOptions:a,mediaDefault:i,mediaList:o}}function wf(t,e,n){var i={width:e,height:n,aspectratio:e/n},r=!0;return Nt.each(t,(function(t,e){var n=e.match(yf);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}xf.prototype={constructor:xf,setOption:function(t,e){t&&Nt.each(Io.normalizeToArray(t.series),(function(t){t&&t.data&&Nt.isTypedArray(t.data)&&Nt.setAsPrimitive(t.data)})),t=gf(t);var n,i,r=this._optionBackup,a=_f.call(this,t,e,!r);this._newBaseOption=a.baseOption,r?(n=r.baseOption,i=a.baseOption,pf(i=i||{},(function(t,e){if(null!=t){var i=n[e];if(Zc.hasClass(e)){t=Io.normalizeToArray(t),i=Io.normalizeToArray(i);var r=Io.mappingToExists(i,t);n[e]=vf(r,(function(t){return t.option&&t.exist?mf(t.exist,t.option,!0):t.exist||t.option}))}else n[e]=mf(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=vf(e.timelineOptions,gf),this._mediaList=vf(e.mediaList,gf),this._mediaDefault=gf(e.mediaDefault),this._currentMediaIndices=[],gf(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,n=this._timelineOptions;if(n.length){var i=t.getComponent("timeline");i&&(e=gf(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++)wf(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=vf(s,(function(t){return gf(-1===t?o.option:a[t].option)}))),this._currentMediaIndices=s,l}};var bf=xf,Sf=Nt.each,Tf=Nt.isObject,Cf=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Mf(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=Cf.length;n<i;n++){var r=Cf[n],a=e.normal,o=e.emphasis;a&&a[r]&&(t[r]=t[r]||{},t[r].normal?Nt.merge(t[r].normal,a[r]):t[r].normal=a[r],a[r]=null),o&&o[r]&&(t[r]=t[r]||{},t[r].emphasis?Nt.merge(t[r].emphasis,o[r]):t[r].emphasis=o[r],o[r]=null)}}function Af(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,Nt.defaults(t[e],i)):t[e]=i),r&&(t.emphasis=t.emphasis||{},t.emphasis[e]=r)}}function If(t){Af(t,"itemStyle"),Af(t,"lineStyle"),Af(t,"areaStyle"),Af(t,"label"),Af(t,"labelLine"),Af(t,"upperLabel"),Af(t,"edgeLabel")}function kf(t,e){var n=Tf(t)&&t[e],i=Tf(n)&&n.textStyle;if(i)for(var r=0,a=Io.TEXT_STYLE_OPTIONS.length;r<a;r++){e=Io.TEXT_STYLE_OPTIONS[r];i.hasOwnProperty(e)&&(n[e]=i[e])}}function Df(t){t&&(If(t),kf(t,"label"),t.emphasis&&kf(t.emphasis,"label"))}function Pf(t){return Nt.isArray(t)?t:t?[t]:[]}function Of(t){return(Nt.isArray(t)?t[0]:t)||{}}var Lf=function(t,e){Sf(Pf(t.series),(function(t){Tf(t)&&function(t){if(Tf(t)){Mf(t),If(t),kf(t,"label"),kf(t,"upperLabel"),kf(t,"edgeLabel"),t.emphasis&&(kf(t.emphasis,"label"),kf(t.emphasis,"upperLabel"),kf(t.emphasis,"edgeLabel")),(n=t.markPoint)&&(Mf(n),Df(n)),(i=t.markLine)&&(Mf(i),Df(i));var e=t.markArea;e&&Df(e);var n,i,r=t.data;if("graph"===t.type){r=r||t.nodes;var a=t.links||t.edges;if(a&&!Nt.isTypedArray(a))for(var o=0;o<a.length;o++)Df(a[o]);Nt.each(t.categories,(function(t){If(t)}))}if(r&&!Nt.isTypedArray(r))for(o=0;o<r.length;o++)Df(r[o]);if((n=t.markPoint)&&n.data){var s=n.data;for(o=0;o<s.length;o++)Df(s[o])}if((i=t.markLine)&&i.data){var l=i.data;for(o=0;o<l.length;o++)Nt.isArray(l[o])?(Df(l[o][0]),Df(l[o][1])):Df(l[o])}"gauge"===t.type?(kf(t,"axisLabel"),kf(t,"title"),kf(t,"detail")):"treemap"===t.type?(Af(t.breadcrumb,"itemStyle"),Nt.each(t.levels,(function(t){If(t)}))):"tree"===t.type&&If(t.leaves)}}(t)}));var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),Sf(n,(function(e){Sf(Pf(t[e]),(function(t){t&&(kf(t,"axisLabel"),kf(t.axisPointer,"label"))}))})),Sf(Pf(t.parallel),(function(t){var e=t&&t.parallelAxisDefault;kf(e,"axisLabel"),kf(e&&e.axisPointer,"label")})),Sf(Pf(t.calendar),(function(t){Af(t,"itemStyle"),kf(t,"dayLabel"),kf(t,"monthLabel"),kf(t,"yearLabel")})),Sf(Pf(t.radar),(function(t){kf(t,"name")})),Sf(Pf(t.geo),(function(t){Tf(t)&&(Df(t),Sf(Pf(t.regions),(function(t){Df(t)})))})),Sf(Pf(t.timeline),(function(t){Df(t),Af(t,"label"),Af(t,"itemStyle"),Af(t,"controlStyle",!0);var e=t.data;Nt.isArray(e)&&Nt.each(e,(function(t){Nt.isObject(t)&&(Af(t,"label"),Af(t,"itemStyle"))}))})),Sf(Pf(t.toolbox),(function(t){Af(t,"iconStyle"),Sf(t.feature,(function(t){Af(t,"iconStyle")}))})),kf(Of(t.axisPointer),"label"),kf(Of(t.tooltip).axisPointer,"label")},Rf=Nt.each,Ef=Nt.isArray,Bf=Nt.isObject,Nf=Io.normalizeToArray;function zf(t){Rf(Ff,(function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])}))}var Ff=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],Hf=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"];var Wf=function(t,e){Lf(t,e),t.series=Nf(t.series),Rf(t.series,(function(t){if(Bf(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)}zf(t)}})),t.dataRange&&(t.visualMap=t.dataRange),Rf(Hf,(function(e){var n=t[e];n&&(Ef(n)||(n=[n]),Rf(n,(function(t){zf(t)})))}))},Vf=Nt.createHashMap,Uf=Nt.each;function jf(t){Uf(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 v=g.data.getByRawIndex(g.stackResultDimension,c);if(d>=0&&v>0||d<=0&&v<0){d+=v,f=v;break}}}return i[0]=d,i[1]=f,i}));o.hostModel.setData(l),e.data=l}))}var Gf=function(t){var e=Vf();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(jf)},Yf=Nt.extend,qf=Nt.each,Xf=Nt.isObject,Zf=Io.getDataItemValue,$f=Io.isDataItemOption,Kf=yc.parseDate,Jf=id.SOURCE_FORMAT_TYPED_ARRAY,Qf=id.SOURCE_FORMAT_ARRAY_ROWS,tp=id.SOURCE_FORMAT_ORIGINAL,ep=id.SOURCE_FORMAT_OBJECT_ROWS;function np(t,e){fd.isInstance(t)||(t=fd.seriesDataToSource(t)),this._source=t;var n=this._data=t.data,i=t.sourceFormat;i===Jf&&(this._offset=0,this._dimSize=e,this._data=n);var r=rp[i===Qf?i+"_"+t.seriesLayoutBy:i];Yf(this,r)}var ip=np.prototype;ip.pure=!1,ip.persistent=!0,ip.getSource=function(){return this._source};var rp={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:sp},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:ap,getItem:op,appendData:sp},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;qf(t,(function(t,n){for(var i=e[n]||(e[n]=[]),r=0;r<(t||[]).length;r++)i.push(t[r])}))}},original:{count:ap,getItem:op,appendData:sp},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 ap(){return this._data.length}function op(t){return this._data[t]}function sp(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}var lp={arrayRows:up,objectRows:function(t,e,n,i){return null!=n?t[i]:t},keyedColumns:up,original:function(t,e,n,i){var r=Zf(t);return null!=n&&r instanceof Array?r[n]:r},typedArray:up};function up(t,e,n,i){return null!=n?t[n]:t}function hp(t,e,n,i){return cp(t[i],this._dimensionInfos[e])}function cp(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=+Kf(t)),null==t||""===t?NaN:+t}var dp={DefaultDataProvider:np,defaultDimValueGetters:{arrayRows:hp,objectRows:function(t,e,n,i){return cp(t[e],this._dimensionInfos[e])},keyedColumns:hp,original:function(t,e,n,i){var r=t&&(null==t.value?t:t.value);return!this._rawData.pure&&$f(t)&&(this.hasItemOption=!0),cp(r instanceof Array?r[i]:r,this._dimensionInfos[e])},typedArray:function(t,e,n,i){return t[i]}},retrieveRawValue: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),lp[o](i,e,a,r)}}},retrieveRawAttr:function(t,e,n){if(t){var i=t.getProvider().getSource().sourceFormat;if(i===tp||i===ep){var r=t.getRawDataItem(e);return i!==tp||Xf(r)||(r=null),r?r[n]:void 0}}}},fp=dp.retrieveRawValue,pp=Pc.getTooltipMarker,gp=Pc.formatTpl,vp=Io.getTooltipRenderMode,mp=/\{@(.+?)\}/g,yp={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=vp(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:pp({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?gp(l,s).replace(mp,(function(e,n){var i=n.length;return"["===n.charAt(0)&&"]"===n.charAt(i-1)&&(n=+n.slice(1,i-1)),fp(a,t,n)})):void 0},getRawValue:function(t,e){return fp(this.getData(e),t)},formatTooltip:function(){}},xp=yp,_p=Nt.isArray;function wp(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 bp=wp.prototype;bp.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),_p(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(_p(p))for(var g=0;g<p.length;g++)Tp(this,p[g],d,f,l,u);else Tp(this,p,d,f,l,u)}this._dueIndex=f;var v=null!=this._settedOutputEnd?this._settedOutputEnd:f;this._outputDueEnd=v}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()};var Sp=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 Tp(t,e,n,i,r,a){Sp.reset(n,i,r,a),t._callingProgress=e,t._callingProgress({start:n,end:i,count:i-n,next:Sp.next},t.context)}bp.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},bp.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},bp.pipe=function(t){(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},bp.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},bp.getUpstream=function(){return this._upstream},bp.getDownstream=function(){return this._downstream},bp.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t};var Cp={createTask:function(t){return new wp(t)}},Mp=Pc.formatTime,Ap=Pc.encodeHTML,Ip=Pc.addCommas,kp=Pc.getTooltipMarker,Dp=Uc.getLayoutParams,Pp=Uc.mergeLayoutParam,Op=Cp.createTask,Lp=Wd.prepareSource,Rp=Wd.getSource,Ep=dp.retrieveRawValue,Bp=Io.makeInner(),Np=Zc.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=Op({count:Fp,reset:Hp}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),Lp(this);var r=this.getInitialData(t,n);Vp(r,this),this.dataTask.context.data=r,Bp(this).dataBeforeProcessed=r,zp(this)},mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?Dp(t):{},r=this.subType;Zc.hasClass(r)&&(r+="Series"),Nt.merge(t,e.getTheme().get(this.subType)),Nt.merge(t,this.getDefaultOption()),Io.defaultEmphasis(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&Pp(t,i,n)},mergeOption:function(t,e){t=Nt.merge(this.option,t,!0),this.fillDataTextStyle(t.data);var n=this.layoutMode;n&&Pp(this.option,t,n),Lp(this);var i=this.getInitialData(t,e);Vp(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,Bp(this).dataBeforeProcessed=i,zp(this)},fillDataTextStyle:function(t){if(t&&!Nt.isTypedArray(t))for(var e=["show"],n=0;n<t.length;n++)t[n]&&t[n].label&&Io.defaultEmphasis(t[n],"label",e)},getInitialData:function(){},appendData:function(t){this.getRawData().appendData(t.data)},getData:function(t){var e=jp(this);if(e){var n=e.context.data;return null==t?n:n.getLinkedData(t)}return Bp(this).data},setData:function(t){var e=jp(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)}Bp(this).data=t},getSource:function(){return Rp(this)},getRawData:function(){return Bp(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:Ap(Ip(t)),style:s}}var h=this.getData(),c=h.mapDimension("defaultedTooltip",!0),d=c.length,f=this.getRawValue(t),p=Nt.isArray(f),g=h.getItemVisual(t,"color");Nt.isObject(g)&&g.colorStops&&(g=(g.colorStops[0]||{}).color),g=g||"transparent";var v=d>1||p&&!d?function(n){var a=Nt.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=kp({color:g,type:"subItem",renderMode:i,markerId:f}),v="string"==typeof p?p:p.content,m=(a?v+Ap(c.displayName||"-")+": ":"")+Ap("ordinal"===d?t+"":"time"===d?e?"":Mp("yyyy/MM/dd hh:mm:ss",t):Ip(t));m&&u.push(m),o&&(s[f]=g,++l)}}c.length?Nt.each(c,(function(e){d(Ep(h,t,e),e)})):Nt.each(n,d);var f=a?o?"\n":"<br/>":"",p=f+u.join(f||", ");return{renderMode:i,content:p,style:s}}(f):u(d?Ep(h,t,c[0]):p?f[0]:f),m=v.content,y=r.seriesIndex+"at"+l,x=kp({color:g,type:"item",renderMode:i,markerId:y});s[y]=g,++l;var _=h.getName(t),w=this.name;Io.isNameSpecified(this)||(w=""),w=w?Ap(w)+(e?": ":a):"";var b="string"==typeof x?x:x.content;return{html:e?b+w+m:w+b+(_?Ap(_)+": "+m:m),markers:s}},isAnimationEnabled:function(){if(tt.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=nd.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 zp(t){var e=t.name;Io.isNameSpecified(t)||(t.name=function(t){var e=t.getRawData(),n=e.mapDimension("seriesName",!0),i=[];return Nt.each(n,(function(t){var n=e.getDimensionInfo(t);n.displayName&&i.push(n.displayName)})),i.join(" ")}(t)||e)}function Fp(t){return t.model.getRawData().count()}function Hp(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),Wp}function Wp(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Vp(t,e){Nt.each(t.CHANGABLE_METHODS,(function(n){t.wrapMethod(n,Nt.curry(Up,e))}))}function Up(t){var e=jp(t);e&&e.setOutputEnd(this.count())}function jp(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}}Nt.mixin(Np,xp),Nt.mixin(Np,nd);var Gp=Np,Yp=function(){this.group=new Di,this.uid=uc.getUID("viewComponent")},qp=Yp.prototype={constructor:Yp,init:function(t,e){},render:function(t,e,n,i){},dispose:function(){},filterForExposedEvent:null};qp.updateView=qp.updateLayout=qp.updateVisual=function(t,e,n,i){},Bo.enableClassExtend(Yp),Bo.enableClassManagement(Yp,{registerWhenExtend:!0});var Xp=Yp,Zp=Io.makeInner;var $p=function(){var t=Zp();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"}},Kp=Nt.each,Jp=Cp.createTask,Qp=Io.makeInner(),tg=$p();function eg(){this.group=new Di,this.uid=uc.getUID("viewChart"),this.renderTask=Jp({plan:ag,reset:og}),this.renderTask.context={view:this}}eg.prototype={type:"chart",init:function(t,e){},render:function(t,e,n,i){},highlight:function(t,e,n,i){rg(t.getData(),i,"emphasis")},downplay:function(t,e,n,i){rg(t.getData(),i,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var ng=eg.prototype;function ig(t,e,n){if(t&&(t.trigger(e,n),t.isGroup&&!Gh.isHighDownDispatcher(t)))for(var i=0,r=t.childCount();i<r;i++)ig(t.childAt(i),e,n)}function rg(t,e,n){var i=Io.queryDataIndex(t,e),r=e&&null!=e.highlightKey?Gh.getHighlightDigit(e.highlightKey):null;null!=i?Kp(Io.normalizeToArray(i),(function(e){ig(t.getItemGraphicEl(e),n,r)})):t.eachItemGraphicEl((function(t){ig(t,n,r)}))}function ag(t){return tg(t.model)}function og(t){var e=t.model,n=t.ecModel,i=t.api,r=t.payload,a=e.pipelineContext.progressiveRender,o=t.view,s=r&&Qp(r).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return"render"!==l&&o[l](e,n,i,r),sg[l]}ng.updateView=ng.updateLayout=ng.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},Bo.enableClassExtend(eg,["dispose"]),Bo.enableClassManagement(eg,{registerWhenExtend:!0}),eg.markUpdateMethod=function(t,e){Qp(t).updateMethod=e};var sg={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)}}},lg=eg,ug="\0__throttleOriginMethod",hg="\0__throttleRate",cg="\0__throttleType";function dg(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 fg={throttle:dg,createOrUpdate:function(t,e,n,i){var r=t[e];if(r){var a=r[ug]||r,o=r[cg];if(r[hg]!==n||o!==i){if(null==n||!i)return t[e]=a;(r=t[e]=dg(a,n,"debounce"===i))[ug]=a,r[cg]=i,r[hg]=n}return r}},clear:function(t,e){var n=t[e];n&&n[ug]&&(t[e]=n[ug])}},pg=Nt.isFunction,gg={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),i=(t.visualColorAccessPath||"itemStyle.color").split("."),r=t.get(i),a=!pg(r)||r instanceof Au?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}}}},vg=gg,mg={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:""}}}},yg=dp.retrieveRawValue;var xg=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:(v=t.subType,mg.series.typeNames[v]||"自定义图")});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=yg(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 v})),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 Nt.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=mg.aria,a=0;a<i.length;++a)r=r[i[a]];return r}return e}},_g=Math.PI;var wg=function(t,e){e=e||{},Nt.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 Gh.Group,i=new Gh.Rect({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});n.add(i);var r=e.fontSize+" sans-serif",a=new Gh.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 Gh.Arc({shape:{startAngle:-_g/2,endAngle:-_g/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*_g/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:3*_g/2}).delay(300).start("circularInOut"),n.add(o)}return n.resize=function(){var n=Nr.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},bg=Nt.each,Sg=Nt.map,Tg=Nt.isFunction,Cg=Nt.createHashMap,Mg=Nt.noop,Ag=Cp.createTask,Ig=uc.getUID,kg=Io.normalizeToArray;function Dg(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=Cg()}var Pg=Dg.prototype;function Og(t,e,n,i,r){var a;function o(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}r=r||{},bg(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(),Lg(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),Lg(s,i),a|=s.perform(u)}))}})),t.unfinished|=a}Pg.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each((function(t){var e=t.overallTask;e&&e.dirty()}))},Pg.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}}},Pg.getPipeline=function(t){return this._pipelineMap.get(t)},Pg.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}},Pg.restorePipelines=function(t){var e=this,n=e._pipelineMap=Cg();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}),Ug(e,t,t.dataTask)}))},Pg.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.ecInstance.getModel(),n=this.api;bg(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=Cg()),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,Ag({plan:zg,reset:Fg,count:Vg}));s.context={model:n,ecModel:i,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:t},Ug(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||Ag({reset:Rg});a.context={ecModel:i,api:r,overallReset:e.overallReset,scheduler:t};var o=a.agentStubMap=a.agentStubMap||Cg(),s=e.seriesType,l=e.getTargetSeries,u=!0,h=e.modifyOutputEnd;s?i.eachRawSeriesByType(s,c):l?l(i,r).each(c):(u=!1,bg(i.getSeries(),c));function c(e){var n=e.uid,i=o.get(n);i||(i=o.set(n,Ag({reset:Eg,onDirty:Ng})),a.dirty()),i.context={model:e,overallProgress:u,modifyOutputEnd:h},i.agent=a,i.__block=u,Ug(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)},Pg.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,Ug(this,e,r)},Pg.performDataProcessorTasks=function(t,e){Og(this,this._dataProcessorHandlers,t,e,{block:!0})},Pg.performVisualTasks=function(t,e,n){Og(this,this._visualHandlers,t,e,n)},Pg.performSeriesTasks=function(t){var e;t.eachSeries((function(t){e|=t.dataTask.perform()})),this.unfinished|=e},Pg.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 Lg=Pg.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)};function Rg(t){t.overallReset(t.ecModel,t.api,t.payload)}function Eg(t,e){return t.overallProgress&&Bg}function Bg(){this.agent.dirty(),this.getDownstream().dirty()}function Ng(){this.agent&&this.agent.dirty()}function zg(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function Fg(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=kg(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?Sg(e,(function(t,e){return Wg(e)})):Hg}var Hg=Wg(0);function Wg(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 Vg(t){return t.data.count()}function Ug(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 jg(t){Gg=null;try{t(Yg,qg)}catch(t){}return Gg}Dg.wrapStageHandler=function(t,e){return Tg(t)&&(t={overallReset:t,seriesType:jg(t)}),t.uid=Ig("stageHandler"),e&&(t.visualType=e),t};var Gg,Yg={},qg={};function Xg(t,e){for(var n in e.prototype)t[n]=Mg}Xg(Yg,lf),Xg(qg,hf),Yg.eachSeriesByType=Yg.eachRawSeriesByType=function(t){Gg=t},Yg.eachComponent=function(t){"series"===t.mainType&&t.subType&&(Gg=t.subType)};var Zg=Dg,$g=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],Kg={color:$g,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],$g]},Jg="#eee",Qg=function(){return{axisLine:{lineStyle:{color:Jg}},axisTick:{lineStyle:{color:Jg}},axisLabel:{textStyle:{color:Jg}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:Jg}}}},tv=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],ev={color:tv,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:Jg},crossStyle:{color:Jg},label:{color:"#000"}}},legend:{textStyle:{color:Jg}},textStyle:{color:Jg},title:{textStyle:{color:Jg}},toolbox:{iconStyle:{normal:{borderColor:Jg}}},dataZoom:{textStyle:{color:Jg}},visualMap:{textStyle:{color:Jg}},timeline:{lineStyle:{color:Jg},itemStyle:{normal:{color:tv[1]}},label:{normal:{textStyle:{color:Jg}}},controlStyle:{normal:{color:Jg,borderColor:Jg}}},timeAxis:Qg(),logAxis:Qg(),valueAxis:Qg(),categoryAxis:Qg(),line:{symbol:"circle"},graph:{color:tv},gauge:{title:{textStyle:{color:Jg}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};ev.categoryAxis.splitLine.show=!1;var nv=ev,iv=Wd.detectSourceFormat,rv=id.SERIES_LAYOUT_BY_COLUMN;Zc.extend({type:"dataset",defaultOption:{seriesLayoutBy:rv,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){iv(this)}}),Xp.extend({type:"dataset"});var av=fl.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()}}),ov=Ol.createFromString,sv=Nt.isString,lv=Nt.extend,uv=Nt.defaults,hv=Nt.trim,cv=Nt.each,dv=/[\s,]+/;function fv(t){sv(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 pv(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}pv.prototype.parse=function(t,e){e=e||{};var n=fv(t);if(!n)throw new Error("Illegal svg");var i=new Di;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),_v(n,i,null,!0);for(var s,l,u=n.firstChild;u;)this._parseNode(u,i),u=u.nextSibling;if(r){var h=hv(r).split(dv);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=Cv(s,a,o),!e.ignoreViewBox)){var c=i;(i=new Di).add(c),c.scale=l.scale.slice(),c.position=l.position.slice()}return e.ignoreRootClip||null==a||null==o||i.setClipPath(new hu({shape:{x:0,y:0,width:a,height:o}})),{root:i,width:a,height:o,viewBoxRect:s,viewBoxTransform:l}},pv.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=vv[r]){var a=i.call(this,t),o=t.getAttribute("id");o&&(this._defs[o]=a)}}else(i=gv[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)},pv.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 El({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});mv(e,r),_v(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 gv={g:function(t,e){var n=new Di;return mv(e,n),_v(t,n,this._defs),n},rect:function(t,e){var n=new hu;return mv(e,n),_v(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 Bl;return mv(e,n),_v(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 fu;return mv(e,n),_v(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 av;return mv(e,n),_v(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=yv(n));var i=new eu({shape:{points:n||[]}});return mv(e,i),_v(t,i,this._defs),i},polyline:function(t,e){var n=new fl;mv(e,n),_v(t,n,this._defs);var i=t.getAttribute("points");return i&&(i=yv(i)),new nu({shape:{points:i||[]}})},image:function(t,e){var n=new ba;return mv(e,n),_v(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 Di;return mv(e,o),_v(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 Di;return mv(e,o),_v(t,o,this._defs),this._textX+=r,this._textY+=a,o},path:function(t,e){var n=t.getAttribute("d")||"",i=ov(n);return mv(e,i),_v(t,i,this._defs),i}},vv={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 ku(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 mv(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),uv(e.__inheritedStyle,t.__inheritedStyle))}function yv(t){for(var e=hv(t).split(dv),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 xv={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 _v(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(Sv,(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||tn.create(),s){case"translate":o=hv(o).split(dv),tn.translate(i,i,[parseFloat(o[0]),parseFloat(o[1]||0)]);break;case"scale":o=hv(o).split(dv),tn.scale(i,i,[parseFloat(o[0]),parseFloat(o[1]||o[0])]);break;case"rotate":o=hv(o).split(dv),tn.rotate(i,i,parseFloat(o[0]));break;case"skew":o=hv(o).split(dv),console.warn("Skew transform is not supported yet");break;case"matrix":o=hv(o).split(dv);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),lv(r,function(t){var e=t.getAttribute("style"),n={};if(!e)return n;var i,r={};Tv.lastIndex=0;for(;null!=(i=Tv.exec(e));)r[i[1]]=i[2];for(var a in xv)xv.hasOwnProperty(a)&&null!=r[a]&&(n[xv[a]]=r[a]);return n}(t)),!i))for(var o in xv)if(xv.hasOwnProperty(o)){var s=t.getAttribute(o);null!=s&&(r[xv[o]]=s)}var l=a?"textFill":"fill",u=a?"textStroke":"stroke";e.style=e.style||new Ki;var h=e.style;null!=r.fill&&h.set(l,bv(r.fill,n)),null!=r.stroke&&h.set(u,bv(r.stroke,n)),cv(["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"),cv(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],(function(t){null!=r[t]&&h.set(t,r[t])})),r.lineDash&&(e.style.lineDash=hv(r.lineDash).split(dv)),h[u]&&"none"!==h[u]&&(e[u]=!0),e.__inheritedStyle=r}var wv=/url\(\s*#(.*?)\)/;function bv(t,e){var n=e&&t&&t.match(wv);return n?e[hv(n[1])]:t}var Sv=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;var Tv=/([^\s:;]+)\s*:\s*([^:;]+)/g;function Cv(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 Mv={parseXML:fv,makeViewBoxTransform:Cv,parseSVG:function(t,e){return(new pv).parse(t,e)}},Av=Nt.createHashMap,Iv=Nt.isString,kv=Nt.isArray,Dv=Nt.each,Pv=Mv.parseXML,Ov=Av(),Lv={registerMap:function(t,e,n){var i;return kv(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}]),Dv(i,(function(t){var e=t.type;"geoJson"===e&&(e=t.type="geoJSON"),(0,Rv[e])(t)})),Ov.set(t,i)},retrieveMap:function(t){return Ov.get(t)}},Rv={geoJSON:function(t){var e=t.source;t.geoJSON=Iv(e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=Pv(t.source)}},Ev=Lv;function Bv(t){return t}function Nv(t,e,n,i,r){this._old=t,this._new=e,this._oldKeyGetter=n||Bv,this._newKeyGetter=i||Bv,this.context=r}function zv(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))}}Nv.prototype={constructor:Nv,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(zv(t,{},i,"_oldKeyGetter",this),zv(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 Fv=Nv,Hv=Nt.each,Wv=Nt.createHashMap,Vv=Wv(["tooltip","label","itemName","itemId","seriesName"]);function Uv(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}var jv={OTHER_DIMENSIONS:Vv,summarizeDimensions:function(t){var e={},n=e.encode={},i=Wv(),r=[],a=[],o=e.userOutput={dimensionNames:t.dimensions.slice(),encode:{}};Hv(t.dimensions,(function(e){var s,l=t.getDimensionInfo(e),u=l.coordDim;if(u){var h=l.coordDimIndex;Uv(n,u)[h]=e,l.isExtraCoord||(i.set(u,1),"ordinal"!==(s=l.type)&&"time"!==s&&(r[0]=e),Uv(o.encode,u)[h]=l.index),l.defaultTooltip&&a.push(e)}Vv.each((function(t,e){var i=Uv(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},getDimensionTypeByAxis:function(t){return"category"===t?"ordinal":"time"===t?"time":"float"}};var Gv=function(t){null!=t&&Nt.extend(this,t),this.otherDims={}},Yv=dp.defaultDimValueGetters,qv=dp.DefaultDataProvider,Xv=jv.summarizeDimensions,Zv=Nt.isObject,$v="undefined",Kv={float:typeof Float64Array===$v?Array:Float64Array,int:typeof Int32Array===$v?Array:Int32Array,ordinal:Array,number:Array,time:Array},Jv=typeof Uint32Array===$v?Array:Uint32Array,Qv=typeof Int32Array===$v?Array:Int32Array,tm=typeof Uint16Array===$v?Array:Uint16Array;function em(t){return t._rawCount>65535?Jv:tm}var nm=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],im=["_extent","_approximateExtent","_rawExtent"];function rm(t,e){Nt.each(nm.concat(e.__wrappedMethods||[]),(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t.__wrappedMethods=e.__wrappedMethods,Nt.each(im,(function(n){t[n]=Nt.clone(e[n])})),t._calculationInfo=Nt.extend(e._calculationInfo)}var am=function(t,e){t=t||["x","y"];for(var n={},i=[],r={},a=0;a<t.length;a++){var o=t[a];Nt.isString(o)?o=new Gv({name:o}):o instanceof Gv||(o=new Gv(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=Xv(this),this._invertedIndicesMap=r,this._calculationInfo={},this.userOutput=this._dimensionsSummary.userOutput},om=am.prototype;function sm(t,e,n,i,r){var a=Kv[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 lm(t){var e=t._invertedIndicesMap;Nt.each(e,(function(n,i){var r=t._dimensionInfos[i].ordinalMeta;if(r){n=e[i]=new Qv(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 um(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 hm(t){return t}function cm(t){return t<this._count&&t>=0?this._indices[t]:-1}function dm(t,e){var n=t._idList[e];return null==n&&(n=um(t,t._idDimIdx,e)),null==n&&(n="e\0\0"+e),n}function fm(t){return Nt.isArray(t)||(t=[t]),t}function pm(t,e){var n=t.dimensions,i=new am(Nt.map(n,t.getDimensionInfo,t),t.hostModel);rm(i,t);for(var r=i._storage={},a=t._storage,o=0;o<n.length;o++){var s=n[o];a[s]&&(Nt.indexOf(e,s)>=0?(r[s]=gm(a[s]),i._rawExtent[s]=vm(),i._extent[s]=null):r[s]=a[s])}return i}function gm(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 vm(){return[1/0,-1/0]}om.type="list",om.hasItemOption=!0,om.getDimension=function(t){return"number"!=typeof t&&(isNaN(t)||this._dimensionInfos.hasOwnProperty(t))||(t=this.dimensions[t]),t},om.getDimensionInfo=function(t){return this._dimensionInfos[this.getDimension(t)]},om.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},om.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]},om.initData=function(t,e,n){(fd.isInstance(t)||Nt.isArrayLike(t))&&(t=new qv(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=Yv[this._rawData.getSource().sourceFormat],this._dimValueGetter=n=n||this.defaultDimValueGetter,this._dimValueGetterArrayRows=Yv.arrayRows,this._rawExtent={},this._initDataFromProvider(0,t.count()),t.pure&&(this.hasItemOption=!1)},om.getProvider=function(){return this._rawData},om.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)},om.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[m=r[h]]||(o[m]=vm()),i[m]||(i[m]=[]),sm(i,this._dimensionInfos[m],n,u,l),this._chunkCount=i[m].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,v=0;v<a;v++){var m=r[v],y=this._dimValueGetterArrayRows(t[f]||c,m,f,v);i[m][p][g]=y;var x=o[m];y<x[0]&&(x[0]=y),y>x[1]&&(x[1]=y)}e&&(this._nameList[d]=e[f])}this._rawCount=this._count=l,this._extent={},lm(this)},om._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]=vm());var g=l[w];0===g.otherDims.itemName&&(n=this._nameDimIdx=p),0===g.otherDims.itemId&&(this._idDimIdx=p),a[w]||(a[w]=[]),sm(a,g,i,f,e),this._chunkCount=a[w].length}for(var v=new Array(s),m=t;m<e;m++){v=r.getItem(m,v);for(var y=Math.floor(m/i),x=m%i,_=0;_<s;_++){var w,b=a[w=o[_]][y],S=this._dimValueGetter(v,w,m,_);b[x]=S;var T=c[w];S<T[0]&&(T[0]=S),S>T[1]&&(T[1]=S)}if(!r.pure){var C=u[m];if(v&&null==C)if(null!=v.name)u[m]=C=v.name;else if(null!=n){var M=o[n],A=a[M][y];if(A){C=A[x];var I=l[M].ordinalMeta;I&&I.categories.length&&(C=I.categories[C])}}var k=null==v?null:v.id;null==k&&null!=C&&(d[C]=d[C]||0,k=C,d[C]>0&&(k+="__ec__"+d[C]),d[C]++),null!=k&&(h[m]=k)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=e,this._extent={},lm(this)}},om.count=function(){return this._count},om.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=em(this))(this.count());for(i=0;i<r.length;i++)r[i]=i}return r},om.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]},om.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]},om._getFast=function(t,e){var n=Math.floor(e/this._chunkSize),i=e%this._chunkSize;return this._storage[t][n][i]},om.getValues=function(t,e){var n=[];Nt.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},om.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},om.getDataExtent=function(t){t=this.getDimension(t);var e=this._storage[t],n=vm();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},om.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},om.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},om.getCalculationInfo=function(t){return this._calculationInfo[t]},om.setCalculationInfo=function(t,e){Zv(t)?Nt.extend(this._calculationInfo,t):this._calculationInfo[t]=e},om.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},om.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},om.rawIndexOf=function(t,e){var n=(t&&this._invertedIndicesMap[t])[e];return null==n||isNaN(n)?-1:n},om.indexOfName=function(t){for(var e=0,n=this.count();e<n;e++)if(this.getName(e)===t)return e;return-1},om.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},om.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},om.getRawIndex=hm,om.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},om.getName=function(t){var e=this.getRawIndex(t);return this._nameList[e]||um(this,this._nameDimIdx,e)||""},om.getId=function(t){return dm(this,this.getRawIndex(t))},om.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=Nt.map(fm(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)}}},om.filterSelf=function(t,e,n,i){if(this._count){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this,t=Nt.map(fm(t),this.getDimension,this);for(var r=this.count(),a=new(em(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?cm:hm,this}},om.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(em(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),v=0;v<g;v++){((w=p[v])>=l&&w<=u||isNaN(w))&&(a[o++]=c),c++}h=!0}else if(2===i){d=this._storage[s];var m=this._storage[e[1]],y=t[e[1]][0],x=t[e[1]][1];for(f=0;f<this._chunkCount;f++){p=d[f];var _=m[f];for(g=Math.min(this._count-f*this._chunkSize,this._chunkSize),v=0;v<g;v++){var w=p[v],b=_[v];(w>=l&&w<=u||isNaN(w))&&(b>=y&&b<=x||isNaN(b))&&(a[o++]=c),c++}}h=!0}}if(!h)if(1===i)for(v=0;v<r;v++){var S=this.getRawIndex(v);((w=this._getFast(s,S))>=l&&w<=u||isNaN(w))&&(a[o++]=S)}else for(v=0;v<r;v++){var T=!0;for(S=this.getRawIndex(v),f=0;f<i;f++){var C=e[f];((w=this._getFast(n,S))<t[C][0]||w>t[C][1])&&(T=!1)}T&&(a[o++]=this.getRawIndex(v))}return o<r&&(this._indices=a),this._count=o,this._extent={},this.getRawIndex=this._indices?cm:hm,this}}},om.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},om.map=function(t,e,n,i){n=n||i||this;var r=pm(this,t=Nt.map(fm(t),this.getDimension,this));r._indices=this._indices,r.getRawIndex=r._indices?cm:hm;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),v=Math.floor(g/s),m=g%s,y=0;y<p.length;y++){var x=t[y],_=p[y],w=c[x],b=a[x];b&&(b[v][m]=_),_<w[0]&&(w[0]=_),_>w[1]&&(w[1]=_)}}}return r},om.downSample=function(t,e,n,i){for(var r=pm(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(em(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 v=this.getRawIndex(p+g),m=Math.floor(v/h),y=v%h;o[g]=l[m][y]}var x=n(o),_=this.getRawIndex(Math.min(p+i(o,x)||0,u-1)),w=_%h;l[Math.floor(_/h)][w]=x,x<c[0]&&(c[0]=x),x>c[1]&&(c[1]=x),d[f++]=_}return r._count=f,r._indices=d,r.getRawIndex=cm,r},om.getItemModel=function(t){var e=this.hostModel;return new oc(this.getRawDataItem(t),e,e&&e.ecModel)},om.diff=function(t){var e=this;return new Fv(t?t.getIndices():[],this.getIndices(),(function(e){return dm(t,e)}),(function(t){return dm(e,t)}))},om.getVisual=function(t){var e=this._visual;return e&&e[t]},om.setVisual=function(t,e){if(Zv(t))for(var n in t)t.hasOwnProperty(n)&&this.setVisual(n,t[n]);else this._visual=this._visual||{},this._visual[t]=e},om.setLayout=function(t,e){if(Zv(t))for(var n in t)t.hasOwnProperty(n)&&this.setLayout(n,t[n]);else this._layout[t]=e},om.getLayout=function(t){return this._layout[t]},om.getItemLayout=function(t){return this._itemLayouts[t]},om.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?Nt.extend(this._itemLayouts[t]||{},e):e},om.clearItemLayouts=function(){this._itemLayouts.length=0},om.getItemVisual=function(t,e,n){var i=this._itemVisuals[t],r=i&&i[e];return null!=r||n?r:this.getVisual(e)},om.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{},r=this.hasItemVisual;if(this._itemVisuals[t]=i,Zv(e))for(var a in e)e.hasOwnProperty(a)&&(i[a]=e[a],r[a]=!0);else i[e]=n,r[e]=!0},om.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var mm=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};om.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(mm,e)),this._graphicEls[t]=e},om.getItemGraphicEl=function(t){return this._graphicEls[t]},om.eachItemGraphicEl=function(t,e){Nt.each(this._graphicEls,(function(n,i){n&&t&&t.call(e,n,i)}))},om.cloneShallow=function(t){if(!t){var e=Nt.map(this.dimensions,this.getDimensionInfo,this);t=new am(e,this.hostModel)}if(t._storage=this._storage,rm(t,this),this._indices){var n=this._indices.constructor;t._indices=new n(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?cm:hm,t},om.wrapMethod=function(t,e){var n=this[t];"function"==typeof n&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(Nt.slice(arguments)))})},om.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],om.CHANGABLE_METHODS=["filterSelf","selectRange"];var ym=am,xm=Nt.createHashMap,_m=Nt.each,wm=Nt.isString,bm=Nt.defaults,Sm=Nt.extend,Tm=Nt.isObject,Cm=Nt.clone,Mm=Io.normalizeToArray,Am=Wd.guessOrdinal,Im=Wd.BE_ORDINAL,km=jv.OTHER_DIMENSIONS;function Dm(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 Pm=function(t,e,n){fd.isInstance(e)||(e=fd.seriesDataToSource(e)),n=n||{},t=(t||[]).slice();for(var i=(n.dimsDef||[]).slice(),r=xm(),a=xm(),o=[],s=function(t,e,n,i){var r=Math.max(t.dimensionsDetectCount||1,e.length,n.length,i||0);return _m(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]=Sm({},Tm(i[l])?i[l]:{name:i[l]}),h=u.name,c=o[l]=new Gv;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=xm(d)).each((function(t,e){if(1===(t=Mm(t).slice()).length&&!wm(t[0])&&t[0]<0)d.set(e,!1);else{var n=d.set(e,[]);_m(t,(function(t,i){wm(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!=km.get(e)?t.otherDims[e]=n:(t.coordDim=e,t.coordDimIndex=n,a.set(e,!0))}_m(t,(function(t,e){var n,i,r;if(wm(t))n=t,t={};else{n=t.name;var a=t.ordinalMeta;t.ordinalMeta=null,(t=Cm(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=Mm(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++)}_m(s,(function(e,a){var s=o[e];if(p(bm(s,t),n,a),null==s.name&&i){var l=i[a];!Tm(l)&&(l={name:l}),s.name=s.displayName=l.name,s.defaultTooltip=l.defaultTooltip}r&&bm(s.otherDims,r)}))}}));var g=n.generateCoord,v=n.generateCoordCount,m=null!=v;v=g?v||1:0;for(var y=g||"value",x=0;x<s;x++){null==(c=o[x]=o[x]||new Gv).coordDim&&(c.coordDim=Dm(y,a,m),c.coordDimIndex=0,(!g||v<=0)&&(c.isExtraCoord=!0),v--),null==c.name&&(c.name=Dm(c.coordDim,r)),null!=c.type||Am(e,x,c.name)!==Im.Must&&(!c.isExtraCoord||null==c.otherDims.itemName&&null==c.otherDims.seriesName)||(c.type="ordinal")}return o},Om=Pm;var Lm=function(t,e){return Om((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})},Rm=Nt.createHashMap,Em=Nt.each;function Bm(t){this.coordSysName=t,this.coordSysDims=[],this.axisMap=Rm(),this.categoryAxisMap=Rm(),this.firstCategoryDimIndex=null}var Nm={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),zm(r)&&(i.set("x",r),e.firstCategoryDimIndex=0),zm(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),zm(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),zm(a)&&(i.set("radius",a),e.firstCategoryDimIndex=0),zm(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();Em(a.parallelAxisIndex,(function(t,a){var s=r.getComponent("parallelAxis",t),l=o[a];n.set(l,s),zm(s)&&null==e.firstCategoryDimIndex&&(i.set(l,s),e.firstCategoryDimIndex=a)}))}};function zm(t){return"category"===t.get("type")}var Fm={getCoordSysInfoBySeries:function(t){var e=t.get("coordinateSystem"),n=new Bm(e),i=Nm[e];if(i)return i(t,n,n.axisMap,n.categoryAxisMap),n}},Hm=Nt.each,Wm=Nt.isString;function Vm(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}var Um={enableDataStack:function(t,e,n){var i,r,a,o,s=(n=n||{}).byIndex,l=n.stackedCoordDimension,u=!(!t||!t.get("stack"));if(Hm(e,(function(t,n){Wm(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;Hm(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:Vm,getStackedDimension:function(t,e){return Vm(t,e)?t.getCalculationInfo("stackResultDimension"):e}},jm=id.SOURCE_FORMAT_ORIGINAL,Gm=jv.getDimensionTypeByAxis,Ym=Io.getDataItemValue,qm=Fm.getCoordSysInfoBySeries,Xm=Um.enableDataStack,Zm=Wd.makeSeriesEncodeForAxisCoordSys;var $m=function(t,e,n){n=n||{},fd.isInstance(t)||(t=fd.seriesDataToSource(t));var i,r=e.get("coordinateSystem"),a=ff.get(r),o=qm(e);o&&(i=Nt.map(o.coordSysDims,(function(t){var e={name:t},n=o.axisMap.get(t);if(n){var i=n.get("type");e.type=Gm(i)}return e}))),i||(i=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]);var s,l,u=Lm(t,{coordDimensions:i,generateCoord:n.generateCoord,encodeDefaulter:n.useEncodeDefaulter?Nt.curry(Zm,i,e):null});o&&Nt.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=Xm(e,u),c=new ym(u,e);c.setCalculationInfo(h);var d=null!=s&&function(t){if(t.sourceFormat===jm){var e=function(t){var e=0;for(;e<t.length&&null==t[e];)e++;return t[e]}(t.data||[]);return null!=e&&!Nt.isArray(Ym(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},Km=$m;function Jm(t){this._setting=t||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}Jm.prototype.parse=function(t){return t},Jm.prototype.getSetting=function(t){return this._setting[t]},Jm.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},Jm.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},Jm.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},Jm.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},Jm.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},Jm.prototype.getExtent=function(){return this._extent.slice()},Jm.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},Jm.prototype.isBlank=function(){return this._isBlank},Jm.prototype.setBlank=function(t){this._isBlank=t},Jm.prototype.getLabel=null,Bo.enableClassExtend(Jm),Bo.enableClassManagement(Jm,{registerWhenExtend:!0});var Qm=Jm,ty=Nt.createHashMap,ey=Nt.isObject,ny=Nt.map;function iy(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this._map}iy.createByAxisModel=function(t){var e=t.option,n=e.data,i=n&&ny(n,oy);return new iy({categories:i,needCollect:!i,deduplication:!1!==e.dedplication})};var ry=iy.prototype;function ay(t){return t._map||(t._map=ty(t.categories))}function oy(t){return ey(t)&&null!=t.value?t.value:t+""}ry.getOrdinal=function(t){return ay(this).get(t)},ry.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=ay(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=iy,ly=Qm.prototype,uy=Qm.extend({type:"ordinal",init:function(t,e){t&&!Nt.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),ly.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return ly.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(ly.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:Nt.noop,niceExtent:Nt.noop});uy.create=function(){return new uy};var hy=uy,cy=yc.round;function dy(t){return yc.getPrecisionSafe(t)+2}function fy(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function py(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),fy(t,0,e),fy(t,1,e),t[0]>t[1]&&(t[0]=t[1])}var gy={intervalScaleNiceTicks:function(t,e,n,i){var r={},a=t[1]-t[0],o=r.interval=yc.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 py(r.niceTickExtent=[cy(Math.ceil(t[0]/o)*o,s),cy(Math.floor(t[1]/o)*o,s)],t),r},getIntervalPrecision:dy,fixExtent:py},vy=yc.round,my=Qm.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]),my.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=gy.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(vy(i[0]-e,r)):a.push(n[0]));for(var o=i[0];o<=i[1]&&(a.push(o),(o=vy(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(vy(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=yc.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=yc.getPrecisionSafe(t)||0:"auto"===n&&(n=this._intervalPrecision),t=vy(t,n,!0),Pc.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=gy.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]=vy(Math.floor(e[0]/r)*r)),t.fixMax||(e[1]=vy(Math.ceil(e[1]/r)*r))}});my.create=function(){return new my};var yy=my,xy=yc.parsePercent,_y=Um.isDimensionStacked,wy="__ec_stack_",by="undefined"!=typeof Float32Array?Float32Array:Array;function Sy(t){return t.get("stack")||wy+t.seriesIndex}function Ty(t){return t.dim+t.index}function Cy(t,e){var n=[];return e.eachSeriesByType(t,(function(t){Dy(t)&&!Py(t)&&n.push(t)})),n}function My(t){var e=function(t){var e={};Nt.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 Nt.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=xy(t.get("barWidth"),i),f=xy(t.get("barMaxWidth"),i),p=xy(t.get("barMinWidth")||1,i),g=t.get("barGap"),v=t.get("barCategoryGap");n.push({bandWidth:i,barWidth:d,barMaxWidth:f,barMinWidth:p,barGap:g,barCategoryGap:v,axisKey:Ty(r),stackId:Sy(t)})})),Ay(n)}function Ay(t){var e={};Nt.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 Nt.each(e,(function(t,e){n[e]={};var i=t.stacks,r=t.bandWidth,a=xy(t.categoryGap,r),o=xy(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,u=(s-a)/(l+(l-1)*o);u=Math.max(u,0),Nt.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;Nt.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;Nt.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 Iy(t,e,n){if(t&&e){var i=t[Ty(e)];return null!=i&&null!=n&&(i=i[Sy(n)]),i}}var ky={seriesType:"bar",plan:$p(),reset:function(t){if(Dy(t)&&Py(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=Iy(My([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),v=[],m=[],y=0,x=0;for(;null!=(c=t.next());)m[u]=e.get(o,c),m[1-u]=e.get(s,c),v=n.dataToPoint(m,null,v),p[y]=l?i.x+i.width:v[0],f[y++]=v[0],p[y]=l?v[1]:i.y+i.height,f[y++]=v[1],g[x++]=c;e.setLayout({largePoints:f,largeDataIndices:g,largeBackgroundPoints:p,barWidth:h,valueAxisStart:Oy(r,a),backgroundStart:l?i.x:i.y,valueAxisHorizontal:l})}}}}};function Dy(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function Py(t){return t.pipelineContext&&t.pipelineContext.large}function Oy(t,e,n){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}var Ly=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(Nt.defaults({bandWidth:r,axisKey:i,stackId:wy+a},t));var o=Ay(e),s=[];for(a=0;a<t.count;a++){var l=o[i][wy+a];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}},Ry=function(t,e){var n=Cy(t,e),i=My(n),r={};Nt.each(n,(function(t){var e=t.getData(),n=t.coordinateSystem,a=n.getBaseAxis(),o=Sy(t),s=i[Ty(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=_y(e,d),g=h.isHorizontal(),v=Oy(a,h),m=0,y=e.count();m<y;m++){var x,_,w,b,S,T=e.get(d,m),C=e.get(f,m),M=T>=0?"p":"n",A=v;if(p&&(r[o][C]||(r[o][C]={p:v,n:v}),A=r[o][C][M]),g)x=A,_=(S=n.dataToPoint([T,C]))[1]+l,w=S[0]-v,b=u,Math.abs(w)<c&&(w=(w<0?-1:1)*c),isNaN(w)||p&&(r[o][C][M]+=w);else x=(S=n.dataToPoint([C,T]))[0]+l,_=A,w=u,b=S[1]-v,Math.abs(b)<c&&(b=(b<=0?-1:1)*c),isNaN(b)||p&&(r[o][C][M]+=b);e.setItemLayout(m,{x:x,y:_,width:w,height:b})}}),this)},Ey={getLayoutOnAxis:Ly,prepareLayoutBarSeries:Cy,makeColumnLayout:My,retrieveColumnLayout:Iy,layout:Ry,largeLayout:ky},By=yy.prototype,Ny=Math.ceil,zy=Math.floor,Fy=1e3,Hy=6e4,Wy=36e5,Vy=864e5,Uy=yy.extend({type:"time",getLabel:function(t){var e=this._stepLvl,n=new Date(t);return Pc.formatTime(e[0],n,this.getSetting("useUTC"))},niceExtent:function(t){var e=this._extent;if(e[0]===e[1]&&(e[0]-=Vy,e[1]+=Vy),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]-Vy}this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var i=this._interval;t.fixMin||(e[0]=yc.round(zy(e[0]/i)*i)),t.fixMax||(e[1]=yc.round(Ny(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=jy.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}(jy,a,0,o),l=jy[Math.min(s,o-1)],u=l[1];if("year"===l[0]){var h=r/u;u*=yc.nice(h/t,!0)}var c=this.getSetting("useUTC")?0:60*new Date(+i[0]||+i[1]).getTimezoneOffset()*1e3,d=[Math.round(Ny((i[0]-c)/u)*u+c),Math.round(zy((i[1]-c)/u)*u+c)];gy.fixExtent(d,i),this._stepLvl=l,this._interval=u,this._niceExtent=d},parse:function(t){return+yc.parseDate(t)}});Nt.each(["contain","normalize"],(function(t){Uy.prototype[t]=function(e){return By[t].call(this,this.parse(e))}}));var jy=[["hh:mm:ss",Fy],["hh:mm:ss",5e3],["hh:mm:ss",1e4],["hh:mm:ss",15e3],["hh:mm:ss",3e4],["hh:mm\nMM-dd",Hy],["hh:mm\nMM-dd",3e5],["hh:mm\nMM-dd",6e5],["hh:mm\nMM-dd",9e5],["hh:mm\nMM-dd",18e5],["hh:mm\nMM-dd",Wy],["hh:mm\nMM-dd",72e5],["hh:mm\nMM-dd",216e5],["hh:mm\nMM-dd",432e5],["MM-dd\nyyyy",Vy],["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]];Uy.create=function(t){return new Uy({useUTC:t.ecModel.get("useUTC")})};var Gy=Qm.prototype,Yy=yy.prototype,qy=yc.getPrecisionSafe,Xy=yc.round,Zy=Math.floor,$y=Math.ceil,Ky=Math.pow,Jy=Math.log,Qy=Qm.extend({type:"log",base:10,$constructor:function(){Qm.apply(this,arguments),this._originalScale=new yy},getTicks:function(t){var e=this._originalScale,n=this._extent,i=e.getExtent();return Nt.map(Yy.getTicks.call(this,t),(function(t){var r=yc.round(Ky(this.base,t));return r=t===n[0]&&e.__fixMin?tx(r,i[0]):r,r=t===n[1]&&e.__fixMax?tx(r,i[1]):r}),this)},getMinorTicks:Yy.getMinorTicks,getLabel:Yy.getLabel,scale:function(t){return t=Gy.scale.call(this,t),Ky(this.base,t)},setExtent:function(t,e){var n=this.base;t=Jy(t)/Jy(n),e=Jy(e)/Jy(n),Yy.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=Gy.getExtent.call(this);e[0]=Ky(t,e[0]),e[1]=Ky(t,e[1]);var n=this._originalScale,i=n.getExtent();return n.__fixMin&&(e[0]=tx(e[0],i[0])),n.__fixMax&&(e[1]=tx(e[1],i[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=Jy(t[0])/Jy(e),t[1]=Jy(t[1])/Jy(e),Gy.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=yc.quantity(n);for(t/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var r=[yc.round($y(e[0]/i)*i),yc.round(Zy(e[1]/i)*i)];this._interval=i,this._niceExtent=r}},niceExtent:function(t){Yy.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});function tx(t,e){return Xy(t,qy(e))}Nt.each(["contain","normalize"],(function(t){Qy.prototype[t]=function(e){return e=Jy(e)/Jy(this.base),Gy[t].call(this,e)}})),Qy.create=function(){return new Qy};var ex=Ey.prepareLayoutBarSeries,nx=Ey.makeColumnLayout,ix=Ey.retrieveColumnLayout;function rx(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"),Nt.isArray(i)||(i=[i||0,i||0]),"boolean"==typeof i[0]&&(i=[0,0]),i[0]=yc.parsePercent(i[0],1),i[1]=yc.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(Nt.eqNaN(o)||Nt.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=ex("bar",c);if(Nt.each(f,(function(t){d|=t.getBaseAxis()===e.axis})),d){var p=nx(f),g=function(t,e,n,i){var r=n.axis.getExtent(),a=r[1]-r[0],o=ix(i,n.axis);if(void 0===o)return{min:t,max:e};var s=1/0;Nt.each(o,(function(t){s=Math.min(t.offset,s)}));var l=-1/0;Nt.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 ax(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(ox(t,e),r)}:function(e){return t.scale.getLabel(e)}}function ox(t,e){return"category"===t.type?t.scale.getLabel(e):e}function sx(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 Ii(i.x,i.y,o,s)}function lx(t){var e=t.get("interval");return null==e?"auto":e}var ux=function(t,e){var n=rx(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)},hx=function(t,e){if(e=e||t.get("type"))switch(e){case"category":return new hy(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new yy;default:return(Qm.getClass(e)||yy).create(t)}},cx=function(t){var e=t.scale.getExtent(),n=e[0],i=e[1];return!(n>0&&i>0||n<0&&i<0)},dx=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=ax(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=sx(l.getTextRect(d),l.get("rotate")||0);s?s.union(f):s=f}return s}},fx={getScaleExtent:rx,niceScaleExtent:ux,createScaleByModel:hx,ifAxisCrossZero:cx,makeLabelFormatter:ax,getAxisRawValue:ox,estimateLabelUnionRect:dx,getOptionCategoryInterval:lx,shouldShowAllLabels:function(t){return"category"===t.type&&0===lx(t.getLabelModel())}},px={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&&!Nt.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&&!Nt.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:Nt.noop,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},gx=px,vx=Nr.calculateTextPosition,mx=Gh.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()}}),yx=Gh.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()}}),xx=Gh.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()}}),_x=Gh.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()}}),bx={line:Gh.Line,rect:Gh.Rect,roundRect:Gh.Rect,square:Gh.Rect,circle:Gh.Circle,diamond:yx,pin:xx,arrow:_x,triangle:mx},Sx={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}},Tx={};Nt.each(bx,(function(t,e){Tx[e]=new t}));var Cx=Gh.extendShape({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,n){var i=vx(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=Tx[i];r||(r=Tx[i="rect"]),Sx[i](e.x,e.y,e.width,e.height,r.shape),r.buildPath(t,r.shape,n)}}});function Mx(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 Ax=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://")?Gh.makeImage(t.slice(8),new Ii(e,n,i,r),o?"center":"cover"):0===t.indexOf("path://")?Gh.makePath(t.slice(7),{},new Ii(e,n,i,r),o?"center":"cover"):new Cx({shape:{symbolType:t,x:e,y:n,width:i,height:r}})).__isEmptyBrush=l,s.setColor=Mx,s.setColor(a),s},Ix={createSymbol:Ax};var kx=function(t,e){var n=e;oc.isInstance(e)||(n=new oc(e),Nt.mixin(n,gx));var i=fx.createScaleByModel(n);return i.setExtent(t[0],t[1]),fx.niceScaleExtent(i,n),i},Dx=function(t){Nt.mixin(t,gx)},Px={getLayoutRect:Uc.getLayoutRect,completeDimensions:Om,createDimensions:Lm,createSymbol:Ix.createSymbol,createList:function(t){return Km(t.getSource(),t)},dataStack:{isDimensionStacked:Um.isDimensionStacked,enableDataStack:Um.enableDataStack,getStackedDimension:Um.getStackedDimension},createScale:kx,mixinAxisModelCommonMethods:Dx};function Ox(t,e){return Math.abs(t-e)<1e-8}var Lx=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+=Js(r[0],r[1],o[0],o[1],e,n),r=o}var s=t[0];return Ox(r[0],s[0])&&Ox(r[1],s[1])||(i+=Js(r[0],r[1],s[0],s[1],e,n)),0!==i},Rx={contain:Lx};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;As.fromPoints(l,r,a),ae.min(n,n,r),ae.max(i,i,a)}return 0===s&&(n[0]=n[1]=i[0]=i[1]=0),this._rect=new Ii(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(Rx.contain(a,t[0],t[1])){for(var s=0;s<(o?o.length:0);s++)if(Rx.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 Ii(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++)ae.applyTransform(h[d],h[d],s);for(var f=0;f<(c?c.length:0);f++)for(d=0;d<c[f].length;d++)ae.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 Bx=Ex;function Nx(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 zx=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]=Nx(l,o[s],e);else if("MultiPolygon"===r.type)for(var u=0;u<l.length;u++){var h=l[u];l[u]=Nx(h,o[s][u],e)}}t.UTF8Encoding=!1}(t),Nt.map(Nt.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&&Nt.each(r,(function(t){t[0]&&a.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})}));var o=new Bx(n[e||"name"],a,n.cp);return o.properties=n,o}))},Fx=Io.makeInner,Hx=fx.makeLabelFormatter,Wx=fx.getOptionCategoryInterval,Vx=fx.shouldShowAllLabels,Ux=Fx();function jx(t,e){var n,i,r=Gx(t,"labels"),a=Wx(e),o=Yx(r,a);return o||(Nt.isFunction(a)?n=Zx(t,a):(i="auto"===a?function(t){var e=Ux(t).autoInterval;return null!=e?e:Ux(t).autoInterval=t.calculateCategoryInterval()}(t):a,n=Xx(t,i)),qx(r,a,{labels:n,labelCategoryInterval:i}))}function Gx(t,e){return Ux(t)[e]||(Ux(t)[e]=[])}function Yx(t,e){for(var n=0;n<t.length;n++)if(t[n].key===e)return t[n].value}function qx(t,e,n){return t.push({key:e,value:n}),n}function Xx(t,e,n){var i=Hx(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=Vx(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 Zx(t,e,n){var i=t.scale,r=Hx(t),a=[];return Nt.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 $x={createAxisLabels:function(t){return"category"===t.type?function(t){var e=t.getLabelModel(),n=jx(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(t):function(t){var e=t.scale.getTicks(),n=Hx(t);return{labels:Nt.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=Gx(t,"ticks"),a=Wx(e),o=Yx(r,a);if(o)return o;e.get("show")&&!t.scale.isBlank()||(n=[]);if(Nt.isFunction(a))n=Zx(t,a,!0);else if("auto"===a){var s=jx(t,t.getLabelModel());i=s.labelCategoryInterval,n=Nt.map(s.labels,(function(t){return t.tickValue}))}else n=Xx(t,i=a,!0);return qx(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=Hx(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,v=Nr.getBoundingRect(n(l),e.font,"center","top");p=1.3*v.width,g=1.3*v.height,d=Math.max(d,p,7),f=Math.max(f,g,7)}var m=d/h,y=f/c;isNaN(m)&&(m=1/0),isNaN(y)&&(y=1/0);var x=Math.max(0,Math.floor(Math.min(m,y))),_=Ux(t.model),w=t.getExtent(),b=_.lastAutoInterval,S=_.lastTickCount;return null!=b&&null!=S&&Math.abs(b-x)<=1&&Math.abs(S-o)<=1&&b>x&&_.axisExtend0===w[0]&&_.axisExtend1===w[1]?x=b:(_.lastTickCount=o,_.lastAutoInterval=x,_.axisExtend0=w[0],_.axisExtend1=w[1]),x}},Kx=Nt.each,Jx=Nt.map,Qx=yc.linearMap,t_=yc.getPixelPrecision,e_=yc.round,n_=$x.createAxisTicks,i_=$x.createAxisLabels,r_=$x.calculateCategoryInterval,a_=[0,1],o_=function(t,e,n){this.dim=t,this.scale=e,this._extent=n||[0,0],this.inverse=!1,this.onBand=!1};function s_(t,e){var n=(t[1]-t[0])/e/2;t[0]+=n,t[1]-=n}o_.prototype={constructor:o_,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 t_(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&&s_(n=n.slice(),i.count()),Qx(t,a_,n,e)},coordToData:function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&s_(n=n.slice(),i.count());var r=Qx(t,n,a_,e);return this.scale.scale(r)},pointToData:function(t,e){},getTicksCoords:function(t){var e=(t=t||{}).tickModel||this.getTickModel(),n=n_(this,e).ticks,i=Jx(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;Kx(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=e_(t),e=e_(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 Jx(e,(function(t){return Jx(t,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this)}),this)},getViewLabels:function(){return i_(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 r_(this)}};var l_=o_,u_=po,h_=tn,c_=ae,d_=Vn,f_=yc,p_=Pc,g_=fg.throttle,v_=Px,m_=zx,y_=ym,x_=oc,__=l_,w_=tt,b_=zx,S_={};Nt.each(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],(function(t){S_[t]=Nt[t]}));var T_={};Nt.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){T_[t]=Gh[t]}));var C_={zrender:u_,matrix:h_,vector:c_,color:d_,number:f_,format:p_,throttle:g_,helper:v_,parseGeoJSON:m_,List:y_,Model:x_,Axis:__,env:w_,parseGeoJson:b_,util:S_,graphic:T_},M_=K((function(t,e){var n=fg.throttle,i=Nt.assert,r=Nt.each,a=Nt.isFunction,o=Nt.isObject,s=Zc.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(),de.prototype[t].call(this,n,i,r)):this.id}}function f(){de.call(this)}function p(t,e,i){i=i||{},"string"==typeof e&&(e=z[e]),this.id,this.group,this._dom=t;var r=this._zr=po.init(t,{renderer:i.renderer||"canvas",devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height});this._throttledZrFlush=n(Nt.bind(r.flush,r),17),(e=Nt.clone(e))&&Wf(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new ff;var a,o,s=this._api=(o=(a=this)._coordSysMgr,Nt.extend(new hf(a),{getCoordinateSystems:Nt.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}Bi(N,l),Bi(R,l),this._scheduler=new Zg(this,s,R,N),de.call(this,this._ecEventProcessor=new P),this._messageCenter=new f,this._initEvents(),this.resize=Nt.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),Nt.setAsPrimitive(this)}f.prototype.on=d("on",!0),f.prototype.off=d("off",!0),f.prototype.one=d("one",!0),Nt.mixin(f,de);var g=p.prototype;function v(t,e,n){if(this._disposed)this.id;else{var i,r=this._model,a=this._coordSysMgr.getCoordinateSystems();e=Io.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),m.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,r=this._api;t.unfinished=!1;do{var a=+new Date;t.performSeriesTasks(i),t.performDataProcessorTasks(i),_(this,i),t.performVisualTasks(i),A(this,this._model,r,"remain"),n-=+new Date-a}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 bf(this._api),a=this._theme,s=this._model=new lf;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),m.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(tt.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(tt.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return Nt.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(tt.canvasSupported){var e="svg"===t.type,n=this.group,i=Math.min,a=Math.max,o=1/0;if(W[n]){var s=o,l=o,u=-1/0,h=-1/0,c=[],d=t&&t.pixelRatio||1;Nt.each(H,(function(r,o){if(r.group===n){var d=e?r.getZr().painter.getSvgDom().innerHTML:r.getRenderedCanvas(Nt.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=Nt.createCanvas(),v=po.init(g,{renderer:e?"svg":"canvas"});if(v.resize({width:f,height:p}),e){var m="";return r(c,(function(t){var e=t.left-s,n=t.top-l;m+='<g transform="translate('+e+","+n+')">'+t.dom+"</g>"})),v.painter.getSvgRoot().innerHTML=m,t.connectedBackgroundColor&&v.painter.setBackgroundColor(t.connectedBackgroundColor),v.refreshImmediately(),v.painter.toDataURL()}return t.connectedBackgroundColor&&v.add(new Gh.Rect({shape:{x:0,y:0,width:f,height:p},style:{fill:t.connectedBackgroundColor}})),r(c,(function(t){var e=new Gh.Image({style:{x:t.left*d-s,y:t.top*d-l,image:t.dom}});v.add(e)})),v.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},g.convertToPixel=Nt.curry(v,"convertToPixel"),g.convertFromPixel=Nt.curry(v,"convertFromPixel"),g.containPixel=function(t,e){if(!this._disposed){var n,i=this._model;return t=Io.parseFinder(i,t),Nt.each(t,(function(t,i){i.indexOf("Models")>=0&&Nt.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=Io.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 m={prepareAndUpdate:function(t){y(this),m.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),_(this,e),r.update(e,n),C(e),a.performVisualTasks(e,t),M(this,e,n,t);var o=e.get("backgroundColor")||"transparent";if(tt.canvasSupported)i.setBackgroundColor(o);else{var s=Vn.parse(o);o=Vn.stringify(s,"rgb"),0===s[3]&&(o="transparent")}I(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=Nt.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)})),C(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0,dirtyMap:a}),A(n,e,i,t,a),I(e,this._api)}},updateView:function(t){var e=this._model;e&&(lg.markUpdateMethod(t,"updateView"),C(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),M(this,this._model,this._api,t),I(e,this._api))},updateVisual:function(t){m.update.call(this,t)},updateLayout:function(t){m.update.call(this,t)}};function y(t){var e=t._model,n=t._scheduler;n.restorePipelines(e),n.prepareStageTasks(),T(t,"component",e,n),T(t,"chart",e,n),n.plan()}function x(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=Nt.createHashMap(Io.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 _(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=O[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=Nt.map(t.batch,(function(e){return(e=Nt.defaults(Nt.extend({},e),t)).batch=null,e})));var p,g=[],v="highlight"===n||"downplay"===n;r(d,(function(t){(p=(p=a.action(t,this._model,this._api))||Nt.extend({},t)).type=o.event||p.type,g.push(p),v?x(this,c,t,"series"):l&&x(this,c,t,l.main,l.sub)}),this),"none"===c||v||l||(this[h]?(y(this),m.update.call(this,t),this[h]=!1):m[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 T(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?Xp.getClass(c.main,c.sub):lg.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)}r?n.eachComponent((function(t,e){"series"!==t&&c(e)})):n.eachSeries(c);for(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 C(t){t.clearColorPalette(),t.eachSeries((function(t){t.clearColorPalette()}))}function M(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),D(r,t)}))}(t,e,n,i),r(t._chartsViews,(function(t){t.__alive=!1})),A(t,e,n,i),r(t._chartsViews,(function(t){t.__alive||t.remove(e,n)}))}function A(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"),D(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")&&!tt.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),xg(t._zr.dom,e)}function I(t,e){r(B,(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),m.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=Nt.extend({},t);return e.type=L[t.type],e},g.dispatchAction=function(t,e){this._disposed?this.id:(o(e)||(e={silent:!!e}),O[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&&tt.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 D(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 P(){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=Nt.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(L,(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,Io.setAttribute(this.getDom(),j,"");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 H[this.id]}},Nt.mixin(p,de),P.prototype={constructor:P,normalizeQuery:function(t){var e={},n={},i={};if(Nt.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};Nt.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 O={},L={},R=[],E=[],B=[],N=[],z={},F={},H={},W={},V=new Date-0,U=new Date-0,j="_echarts_instance_";function G(t){W[t]=!1}var Y=G;function q(t){return H[Io.getAttribute(t,j)]}function X(t,e){z[t]=e}function Z(t){E.push(t)}function $(t,e){Q(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)),O[r]||(O[r]={action:n,actionInfo:t}),L[e]=r}function J(t,e){Q(N,t,e,3e3,"visual")}function Q(t,e,n,i,r){(a(e)||o(e))&&(n=e,e=i);var s=Zg.wrapStageHandler(n,r);return s.__prio=e,s.__raw=n,t.push(s),s}function et(t,e){F[t]=e}J(2e3,vg),Z(Wf),$(900,Gf),et("default",wg),K({type:"highlight",event:"highlight",update:"highlight"},Nt.noop),K({type:"downplay",event:"downplay",update:"downplay"},Nt.noop),X("light",Kg),X("dark",nv);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_"+V++,H[a.id]=a,Io.setAttribute(t,j,a.id),function(t){var e="__connectUpdateStatus";function n(t,n){for(var i=0;i<t.length;i++)t[i][e]=n}r(L,(function(i,a){t._messageCenter.on(a,(function(i){if(W[t.group]&&0!==t[e]){if(i&&i.escapeConnect)return;var a=t.makeActionFromEvent(i),o=[];r(H,(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(Nt.isArray(t)){var e=t;t=null,r(e,(function(e){null!=e.group&&(t=e.group)})),t=t||"g_"+U++,r(e,(function(e){e.group=t}))}return W[t]=!0,t},e.disConnect=G,e.disconnect=Y,e.dispose=function(t){"string"==typeof t?t=H[t]:t instanceof p||(t=q(t)),t instanceof p&&!t.isDisposed()&&t.dispose()},e.getInstanceByDom=q,e.getInstanceById=function(t){return H[t]},e.registerTheme=X,e.registerPreprocessor=Z,e.registerProcessor=$,e.registerPostUpdate=function(t){B.push(t)},e.registerAction=K,e.registerCoordinateSystem=function(t,e){ff.register(t,e)},e.getCoordinateSystemDimensions=function(t){var e=ff.get(t);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()},e.registerLayout=function(t,e){Q(N,t,e,1e3,"layout")},e.registerVisual=J,e.registerLoading=et,e.extendComponentModel=function(t){return Zc.extend(t)},e.extendComponentView=function(t){return Xp.extend(t)},e.extendSeriesModel=function(t){return Gp.extend(t)},e.extendChartView=function(t){return lg.extend(t)},e.setCanvasCreator=function(t){Nt.$override("createCanvas",t)},e.registerMap=function(t,e,n){Ev.registerMap(t,e,n)},e.getMap=function(t){var e=Ev.retrieveMap(t);return e&&e[0]&&{geoJson:e[0].geoJSON,specialAreas:e[0].specialAreas}},e.dataTool={},function(){for(var t in C_)C_.hasOwnProperty(t)&&(e[t]=C_[t])}()}));function A_(t){return this._axes[t]}var I_=function(t){this._axes={},this._dimList=[],this.name=t||""};I_.prototype={constructor:I_,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return Nt.map(this._dimList,A_,this)},getAxesByScale:function(t){return t=t.toLowerCase(),Nt.filter(this.getAxes(),(function(e){return e.scale.type===t}))},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var n=this._dimList,i=t instanceof Array?[]:{},r=0;r<n.length;r++){var a=n[r],o=this._axes[a];i[a]=o[e](t[a])}return i}};var k_=I_;function D_(t){k_.call(this,t)}D_.prototype={constructor:D_,type:"cartesian2d",dimensions:["x","y"],getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},containPoint:function(t){var e=this.getAxis("x"),n=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},containData:function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},dataToPoint:function(t,e,n){var i=this.getAxis("x"),r=this.getAxis("y");return(n=n||[])[0]=i.toGlobalCoord(i.dataToCoord(t[0])),n[1]=r.toGlobalCoord(r.dataToCoord(t[1])),n},clampData:function(t,e){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,r=n.getExtent(),a=i.getExtent(),o=n.parse(t[0]),s=i.parse(t[1]);return(e=e||[])[0]=Math.min(Math.max(Math.min(r[0],r[1]),o),Math.max(r[0],r[1])),e[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),e},pointToData:function(t,e){var n=this.getAxis("x"),i=this.getAxis("y");return(e=e||[])[0]=n.coordToData(n.toLocalCoord(t[0])),e[1]=i.coordToData(i.toLocalCoord(t[1])),e},getOtherAxis:function(t){return this.getAxis("x"===t.dim?"y":"x")},getArea:function(){var t=this.getAxis("x").getGlobalExtent(),e=this.getAxis("y").getGlobalExtent(),n=Math.min(t[0],t[1]),i=Math.min(e[0],e[1]),r=Math.max(t[0],t[1])-n,a=Math.max(e[0],e[1])-i;return new Ii(n,i,r,a)}},Nt.inherits(D_,k_);var P_=D_,O_=function(t,e,n,i,r){l_.call(this,t,e,n),this.type=i||"value",this.position=r||"bottom"};O_.prototype={constructor:O_,index:0,getAxesOnZeroOf:null,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},getGlobalExtent:function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},Nt.inherits(O_,l_);var L_=O_,R_={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#333",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},E_={};E_.categoryAxis=Nt.merge({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},R_),E_.valueAxis=Nt.merge({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},R_),E_.timeAxis=Nt.defaults({scale:!0,min:"dataMin",max:"dataMax"},E_.valueAxis),E_.logAxis=Nt.defaults({scale:!0,logBase:10},E_.valueAxis);var B_=E_,N_=Uc.getLayoutParams,z_=Uc.mergeLayoutParam,F_=["value","category","time","log"];var H_=function(t,e,n,i){Nt.each(F_,(function(r){e.extend({type:t+"Axis."+r,mergeDefaultAndTheme:function(e,i){var a=this.layoutMode,o=a?N_(e):{},s=i.getTheme();Nt.merge(e,s.get(r+"Axis")),Nt.merge(e,this.getDefaultOption()),e.type=n(t,e),a&&z_(e,o,a)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=sy.createByAxisModel(this))},getCategories:function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:Nt.mergeAll([{},B_[r+"Axis"],i],!0)})})),Zc.registerSubTypeDefaulter(t+"Axis",Nt.curry(n,t))},W_=Zc.extend({type:"cartesian2dAxis",axis:null,init:function(){W_.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){W_.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){W_.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function V_(t,e){return e.type||(e.data?"category":"value")}Nt.merge(W_.prototype,gx);var U_={offset:0};H_("x",W_,V_,U_),H_("y",W_,V_,U_),Zc.extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});var j_=Nt.isObject,G_=Nt.each,Y_=Nt.map,q_=Nt.indexOf,X_=Uc.getLayoutRect,Z_=fx.createScaleByModel,$_=fx.ifAxisCrossZero,K_=fx.niceScaleExtent,J_=fx.estimateLabelUnionRect,Q_=Um.getStackedDimension;function tw(t,e,n){return t.getCoordSysModel()===e}function ew(t,e,n){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,n),this.model=t}var nw=ew.prototype;function iw(t,e,n,i){n.getAxesOnZeroOf=function(){return r?[r]:[]};var r,a=t[e],o=n.model,s=o.get("axisLine.onZero"),l=o.get("axisLine.onZeroAxisIndex");if(s){if(null!=l)rw(a[l])&&(r=a[l]);else for(var u in a)if(a.hasOwnProperty(u)&&rw(a[u])&&!i[h(a[u])]){r=a[u];break}r&&(i[h(r)]=!0)}function h(t){return t.dim+"_"+t.index}}function rw(t){return t&&"category"!==t.type&&"time"!==t.type&&$_(t)}nw.type="grid",nw.axisPointerEnabled=!0,nw.getRect=function(){return this._rect},nw.update=function(t,e){var n=this._axesMap;this._updateScale(t,this.model),G_(n.x,(function(t){K_(t.scale,t.model)})),G_(n.y,(function(t){K_(t.scale,t.model)}));var i={};G_(n.x,(function(t){iw(n,"y",t,i)})),G_(n.y,(function(t){iw(n,"x",t,i)})),this.resize(this.model,e)},nw.resize=function(t,e,n){var i=X_(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=i;var r=this._axesList;function a(){G_(r,(function(t){var e=t.isHorizontal(),n=e?[0,i.width]:[0,i.height],r=t.inverse?1:0;t.setExtent(n[r],n[1-r]),function(t,e){var n=t.getExtent(),i=n[0]+n[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return i-t+e}}(t,e?i.x:i.y)}))}a(),!n&&t.get("containLabel")&&(G_(r,(function(t){if(!t.model.get("axisLabel.inside")){var e=J_(t);if(e){var n=t.isHorizontal()?"height":"width",r=t.model.get("axisLabel.margin");i[n]-=e[n]+r,"top"===t.position?i.y+=e.height+r:"left"===t.position&&(i.x+=e.width+r)}}})),a())},nw.getAxis=function(t,e){var n=this._axesMap[t];if(null!=n){if(null==e)for(var i in n)if(n.hasOwnProperty(i))return n[i];return n[e]}},nw.getAxes=function(){return this._axesList.slice()},nw.getCartesian=function(t,e){if(null!=t&&null!=e){var n="x"+t+"y"+e;return this._coordsMap[n]}j_(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,r=this._coordsList;i<r.length;i++)if(r[i].getAxis("x").index===t||r[i].getAxis("y").index===e)return r[i]},nw.getCartesians=function(){return this._coordsList.slice()},nw.convertToPixel=function(t,e,n){var i=this._findConvertTarget(t,e);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},nw.convertFromPixel=function(t,e,n){var i=this._findConvertTarget(t,e);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},nw._findConvertTarget=function(t,e){var n,i,r=e.seriesModel,a=e.xAxisModel||r&&r.getReferringComponents("xAxis")[0],o=e.yAxisModel||r&&r.getReferringComponents("yAxis")[0],s=e.gridModel,l=this._coordsList;if(r)n=r.coordinateSystem,q_(l,n)<0&&(n=null);else if(a&&o)n=this.getCartesian(a.componentIndex,o.componentIndex);else if(a)i=this.getAxis("x",a.componentIndex);else if(o)i=this.getAxis("y",o.componentIndex);else if(s){s.coordinateSystem===this&&(n=this._coordsList[0])}return{cartesian:n,axis:i}},nw.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},nw._initCartesian=function(t,e,n){var i={left:!1,right:!1,top:!1,bottom:!1},r={x:{},y:{}},a={x:0,y:0};if(e.eachComponent("xAxis",o("x"),this),e.eachComponent("yAxis",o("y"),this),!a.x||!a.y)return this._axesMap={},void(this._axesList=[]);function o(e){return function(n,o){if(tw(n,t)){var s=n.get("position");"x"===e?"top"!==s&&"bottom"!==s&&(s=i.bottom?"top":"bottom"):"left"!==s&&"right"!==s&&(s=i.left?"right":"left"),i[s]=!0;var l=new L_(e,Z_(n),[0,0],n.get("type"),s),u="category"===l.type;l.onBand=u&&n.get("boundaryGap"),l.inverse=n.get("inverse"),n.axis=l,l.model=n,l.grid=this,l.index=o,this._axesList.push(l),r[e][o]=l,a[e]++}}}this._axesMap=r,G_(r.x,(function(e,n){G_(r.y,(function(i,r){var a="x"+n+"y"+r,o=new P_(a);o.grid=this,o.model=t,this._coordsMap[a]=o,this._coordsList.push(o),o.addAxis(e),o.addAxis(i)}),this)}),this)},nw._updateScale=function(t,e){function n(t,e,n){G_(t.mapDimension(e.dim,!0),(function(n){e.scale.unionExtentFromData(t,Q_(t,n))}))}G_(this._axesList,(function(t){t.scale.setExtent(1/0,-1/0)})),t.eachSeries((function(t){if(sw(t)){var i=ow(t),r=i[0],a=i[1];if(!tw(r,e)||!tw(a,e))return;var o=this.getCartesian(r.componentIndex,a.componentIndex),s=t.getData(),l=o.getAxis("x"),u=o.getAxis("y");"list"===s.type&&(n(s,l),n(s,u))}}),this)},nw.getTooltipAxes=function(t){var e=[],n=[];return G_(this.getCartesians(),(function(i){var r=null!=t&&"auto"!==t?i.getAxis(t):i.getBaseAxis(),a=i.getOtherAxis(r);q_(e,r)<0&&e.push(r),q_(n,a)<0&&n.push(a)})),{baseAxes:e,otherAxes:n}};var aw=["xAxis","yAxis"];function ow(t,e){return Y_(aw,(function(e){return t.getReferringComponents(e)[0]}))}function sw(t){return"cartesian2d"===t.get("coordinateSystem")}ew.create=function(t,e){var n=[];return t.eachComponent("grid",(function(i,r){var a=new ew(i,t,e);a.name="grid_"+r,a.resize(i,e,!0),i.coordinateSystem=a,n.push(a)})),t.eachSeries((function(t){if(sw(t)){var e=ow(t),n=e[0],i=e[1],r=n.getCoordSysModel().coordinateSystem;t.coordinateSystem=r.getCartesian(n.componentIndex,i.componentIndex)}})),n},ew.dimensions=ew.prototype.dimensions=P_.prototype.dimensions,ff.register("cartesian2d",ew),Gp.extend({type:"series.__base_bar__",getInitialData:function(t,e){return Km(this.getSource(),this,{useEncodeDefaulter:!0})},getMarkerPosition:function(t){var e=this.coordinateSystem;if(e){var n=e.dataToPoint(e.clampData(t)),i=this.getData(),r=i.getLayout("offset"),a=i.getLayout("size");return n[e.getBaseAxis().isHorizontal()?0:1]+=r+a/2,n}return[NaN,NaN]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",itemStyle:{},emphasis:{}}}).extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect",getProgressive:function(){return!!this.get("large")&&this.get("progressive")},getProgressiveThreshold:function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t},defaultOption:{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1}}});var lw=dp.retrieveRawValue;var uw=function(t,e){var n=t.mapDimension("defaultedLabel",!0),i=n.length;if(1===i)return lw(t,e,n[0]);if(i){for(var r=[],a=0;a<n.length;a++){var o=lw(t,e,n[a]);r.push(o)}return r.join(" ")}},hw={getDefaultLabel:uw}.getDefaultLabel;function cw(t,e){"outside"===t.textPosition&&(t.textPosition=e)}var dw=function(t,e,n,i,r,a,o){var s=n.getModel("label"),l=n.getModel("emphasis.label");Gh.setLabelStyle(t,e,s,l,{labelFetcher:r,labelDataIndex:a,defaultText:hw(r.getData(),a),isRectText:!0,autoColor:i}),cw(t),cw(e)},fw={setLabel:dw},pw=No([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),gw={getBarItemStyle:function(t){var e=pw(this,t);if(this.getBorderLineDash){var n=this.getBorderLineDash();n&&(e.lineDash=n)}return e}},vw=gw,mw=yc.round;function yw(t,e,n){var i=t.getArea(),r=t.getBaseAxis().isHorizontal(),a=i.x,o=i.y,s=i.width,l=i.height,u=n.get("lineStyle.width")||2;a-=u/2,o-=u/2,s+=u,l+=u,a=Math.floor(a),s=Math.round(s);var h=new Gh.Rect({shape:{x:a,y:o,width:s,height:l}});return e&&(h.shape[r?"width":"height"]=0,Gh.initProps(h,{shape:{width:s,height:l}},n)),h}function xw(t,e,n){var i=t.getArea(),r=new Gh.Sector({shape:{cx:mw(t.cx,1),cy:mw(t.cy,1),r0:mw(i.r0,1),r:mw(i.r,1),startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}});return e&&(r.shape.endAngle=i.startAngle,Gh.initProps(r,{shape:{endAngle:i.endAngle}},n)),r}var _w={createGridClipPath:yw,createPolarClipPath:xw,createClipPath:function(t,e,n){return t?"polar"===t.type?xw(t,e,n):"cartesian2d"===t.type?yw(t,e,n):null:null}},ww=(0,Gh.extendShape)({type:"sausage",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},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=.5*(a-r),s=r+o,l=e.startAngle,u=e.endAngle,h=e.clockwise,c=Math.cos(l),d=Math.sin(l),f=Math.cos(u),p=Math.sin(u);(h?u-l<2*Math.PI:l-u<2*Math.PI)&&(t.moveTo(c*r+n,d*r+i),t.arc(c*s+n,d*s+i,o,-Math.PI+l,l,!h)),t.arc(n,i,a,l,u,!h),t.moveTo(f*a+n,p*a+i),t.arc(f*s+n,p*s+i,o,u-2*Math.PI,u-Math.PI,!h),0!==r&&(t.arc(n,i,r,u,l,h),t.moveTo(c*r+n,p*r+i)),t.closePath()}}),bw=fw.setLabel,Sw=fg.throttle,Tw=_w.createClipPath,Cw=["itemStyle","barBorderWidth"],Mw=[0,0];Nt.extend(oc.prototype,vw),M_.extendChartView({type:"bar",render:function(t,e,n){this._updateDrawMode(t);var i=t.get("coordinateSystem");return"cartesian2d"!==i&&"polar"!==i||(this._isLargeDraw?this._renderLarge(t,e,n):this._renderNormal(t,e,n)),this.group},incrementalPrepareRender:function(t,e,n){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e,n,i){this._incrementalRenderLarge(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(null==this._isLargeDraw||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(t,e,n){var i,r=this.group,a=t.getData(),o=this._data,s=t.coordinateSystem,l=s.getBaseAxis();"cartesian2d"===s.type?i=l.isHorizontal():"polar"===s.type&&(i="angle"===l.dim);var u=t.isAnimationEnabled()?t:null,h=t.get("clip",!0),c=function(t,e){var n=t.getArea&&t.getArea();if("cartesian2d"===t.type){var i=t.getBaseAxis();if("category"!==i.type||!i.onBand){var r=e.getLayout("bandWidth");i.isHorizontal()?(n.x-=r,n.width+=2*r):(n.y-=r,n.height+=2*r)}}return n}(s,a);r.removeClipPath();var d=t.get("roundCap",!0),f=t.get("showBackground",!0),p=t.getModel("backgroundStyle"),g=p.get("barBorderRadius")||0,v=[],m=this._backgroundEls||[];a.diff(o).add((function(e){var n=a.getItemModel(e),o=Lw[s.type](a,e,n);if(f){var l=Lw[s.type](a,e),m=function(t,e,n){var i="polar"===t.type?Gh.Sector:Gh.Rect;return new i({shape:Fw(e,n,t),silent:!0,z2:0})}(s,i,l);m.useStyle(p.getBarItemStyle()),"cartesian2d"===s.type&&m.setShape("r",g),v[e]=m}if(a.hasValue(e)){if(h)if(kw[s.type](c,o))return void r.remove(y);var y=Dw[s.type](e,o,i,u,!1,d);a.setItemGraphicEl(e,y),r.add(y),Ew(y,a,e,n,o,t,i,"polar"===s.type)}})).update((function(e,n){var l=a.getItemModel(e),y=Lw[s.type](a,e,l);if(f){var x=m[n];x.useStyle(p.getBarItemStyle()),"cartesian2d"===s.type&&x.setShape("r",g),v[e]=x;var _=Lw[s.type](a,e),w=Fw(i,_,s);Gh.updateProps(x,{shape:w},u,e)}var b=o.getItemGraphicEl(n);if(a.hasValue(e)){if(h)if(kw[s.type](c,y))return void r.remove(b);b?Gh.updateProps(b,{shape:y},u,e):b=Dw[s.type](e,y,i,u,!0,d),a.setItemGraphicEl(e,b),r.add(b),Ew(b,a,e,l,y,t,i,"polar"===s.type)}else r.remove(b)})).remove((function(t){var e=o.getItemGraphicEl(t);"cartesian2d"===s.type?e&&Pw(t,u,e):e&&Ow(t,u,e)})).execute();var y=this._backgroundGroup||(this._backgroundGroup=new Di);y.removeAll();for(var x=0;x<v.length;++x)y.add(v[x]);r.add(y),this._backgroundEls=v,this._data=a},_renderLarge:function(t,e,n){this._clear(),Nw(t,this.group);var i=t.get("clip",!0)?Tw(t.coordinateSystem,!1,t):null;i?this.group.setClipPath(i):this.group.removeClipPath()},_incrementalRenderLarge:function(t,e){this._removeBackground(),Nw(e,this.group,!0)},dispose:Nt.noop,remove:function(t){this._clear(t)},_clear:function(t){var e=this.group,n=this._data;t&&t.get("animation")&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl((function(e){"sector"===e.type?Ow(e.dataIndex,t,e):Pw(e.dataIndex,t,e)}))):e.removeAll(),this._data=null},_removeBackground:function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null}});var Aw=Math.max,Iw=Math.min,kw={cartesian2d:function(t,e){var n=e.width<0?-1:1,i=e.height<0?-1:1;n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height);var r=Aw(e.x,t.x),a=Iw(e.x+e.width,t.x+t.width),o=Aw(e.y,t.y),s=Iw(e.y+e.height,t.y+t.height);e.x=r,e.y=o,e.width=a-r,e.height=s-o;var l=e.width<0||e.height<0;return n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),l},polar:function(t){return!1}},Dw={cartesian2d:function(t,e,n,i,r){var a=new Gh.Rect({shape:Nt.extend({},e),z2:1});if(a.name="item",i){var o=n?"height":"width",s={};a.shape[o]=0,s[o]=e[o],Gh[r?"updateProps":"initProps"](a,{shape:s},i,t)}return a},polar:function(t,e,n,i,r,a){var o=e.startAngle<e.endAngle,s=new(!n&&a?ww:Gh.Sector)({shape:Nt.defaults({clockwise:o},e),z2:1});if(s.name="item",i){var l=n?"r":"endAngle",u={};s.shape[l]=n?0:e.startAngle,u[l]=e[l],Gh[r?"updateProps":"initProps"](s,{shape:u},i,t)}return s}};function Pw(t,e,n){n.style.text=null,Gh.updateProps(n,{shape:{width:0}},e,t,(function(){n.parent&&n.parent.remove(n)}))}function Ow(t,e,n){n.style.text=null,Gh.updateProps(n,{shape:{r:n.shape.r0}},e,t,(function(){n.parent&&n.parent.remove(n)}))}var Lw={cartesian2d:function(t,e,n){var i=t.getItemLayout(e),r=n?function(t,e){var n=t.get(Cw)||0,i=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),r=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(n,i,r)}(n,i):0,a=i.width>0?1:-1,o=i.height>0?1:-1;return{x:i.x+a*r/2,y:i.y+o*r/2,width:i.width-a*r,height:i.height-o*r}},polar:function(t,e,n){var i=t.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle}}};function Rw(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}function Ew(t,e,n,i,r,a,o,s){var l=e.getItemVisual(n,"color"),u=e.getItemVisual(n,"opacity"),h=e.getVisual("borderColor"),c=i.getModel("itemStyle"),d=i.getModel("emphasis.itemStyle").getBarItemStyle();s||t.setShape("r",c.get("barBorderRadius")||0),t.useStyle(Nt.defaults({stroke:Rw(r)?"none":h,fill:Rw(r)?"none":l,opacity:u},c.getBarItemStyle()));var f=i.getShallow("cursor");f&&t.attr("cursor",f);var p=o?r.height>0?"bottom":"top":r.width>0?"left":"right";s||bw(t.style,d,i,l,a,n,p),Rw(r)&&(d.fill=d.stroke="none"),Gh.setHoverStyle(t,d)}var Bw=fl.extend({type:"largeBar",shape:{points:[]},buildPath:function(t,e){for(var n=e.points,i=this.__startPoint,r=this.__baseDimIdx,a=0;a<n.length;a+=2)i[r]=n[a+r],t.moveTo(i[0],i[1]),t.lineTo(n[a],n[a+1])}});function Nw(t,e,n){var i=t.getData(),r=[],a=i.getLayout("valueAxisHorizontal")?1:0;r[1-a]=i.getLayout("valueAxisStart");var o=i.getLayout("largeDataIndices"),s=i.getLayout("barWidth"),l=t.getModel("backgroundStyle");if(t.get("showBackground",!0)){var u=i.getLayout("largeBackgroundPoints"),h=[];h[1-a]=i.getLayout("backgroundStart");var c=new Bw({shape:{points:u},incremental:!!n,__startPoint:h,__baseDimIdx:a,__largeDataIndices:o,__barWidth:s,silent:!0,z2:0});!function(t,e,n){var i=e.get("borderColor")||e.get("color"),r=e.getItemStyle(["color","borderColor"]);t.useStyle(r),t.style.fill=null,t.style.stroke=i,t.style.lineWidth=n.getLayout("barWidth")}(c,l,i),e.add(c)}var d=new Bw({shape:{points:i.getLayout("largePoints")},incremental:!!n,__startPoint:r,__baseDimIdx:a,__largeDataIndices:o,__barWidth:s});e.add(d),function(t,e,n){var i=n.getVisual("borderColor")||n.getVisual("color"),r=e.getModel("itemStyle").getItemStyle(["color","borderColor"]);t.useStyle(r),t.style.fill=null,t.style.stroke=i,t.style.lineWidth=n.getLayout("barWidth")}(d,t,i),d.seriesIndex=t.seriesIndex,t.get("silent")||(d.on("mousedown",zw),d.on("mousemove",zw))}var zw=Sw((function(t){var e=function(t,e,n){var i=t.__baseDimIdx,r=1-i,a=t.shape.points,o=t.__largeDataIndices,s=Math.abs(t.__barWidth/2),l=t.__startPoint[r];Mw[0]=e,Mw[1]=n;for(var u=Mw[i],h=Mw[1-i],c=u-s,d=u+s,f=0,p=a.length/2;f<p;f++){var g=2*f,v=a[g+i],m=a[g+r];if(v>=c&&v<=d&&(l<=m?h>=l&&h<=m:h>=m&&h<=l))return o[f]}return-1}(this,t.offsetX,t.offsetY);this.dataIndex=e>=0?e:null}),30,!1);function Fw(t,e,n){var i,r="polar"===n.type;return i=r?n.getArea():n.grid.getRect(),r?{cx:i.cx,cy:i.cy,r0:t?i.r0:e.r0,r:t?i.r:e.r,startAngle:t?e.startAngle:0,endAngle:t?e.endAngle:2*Math.PI}:{x:t?e.x:i.x,y:t?i.y:e.y,width:t?e.width:i.width,height:t?i.height:e.height}}var Hw=Nt.retrieve,Ww=Nt.defaults,Vw=Nt.extend,Uw=Nt.each,jw=yc.isRadianAroundZero,Gw=yc.remRadian,Yw=Ix.createSymbol,qw=ae.applyTransform,Xw=fx.shouldShowAllLabels,Zw=Math.PI,$w=function(t,e){this.opt=e,this.axisModel=t,Ww(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new Gh.Group;var n=new Gh.Group({position:e.position.slice(),rotation:e.rotation});n.updateTransform(),this._transform=n.transform,this._dumbGroup=n};$w.prototype={constructor:$w,hasBuilder:function(t){return!!Kw[t]},add:function(t){Kw[t].call(this)},getGroup:function(){return this.group}};var Kw={axisLine:function(){var t=this.opt,e=this.axisModel;if(e.get("axisLine.show")){var n=this.axisModel.axis.getExtent(),i=this._transform,r=[n[0],0],a=[n[1],0];i&&(qw(r,r,i),qw(a,a,i));var o=Vw({lineCap:"round"},e.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new Gh.Line({anid:"line",subPixelOptimize:!0,shape:{x1:r[0],y1:r[1],x2:a[0],y2:a[1]},style:o,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1}));var s=e.get("axisLine.symbol"),l=e.get("axisLine.symbolSize"),u=e.get("axisLine.symbolOffset")||0;if("number"==typeof u&&(u=[u,u]),null!=s){"string"==typeof s&&(s=[s,s]),"string"!=typeof l&&"number"!=typeof l||(l=[l,l]);var h=l[0],c=l[1];Uw([{rotate:t.rotation+Math.PI/2,offset:u[0],r:0},{rotate:t.rotation-Math.PI/2,offset:u[1],r:Math.sqrt((r[0]-a[0])*(r[0]-a[0])+(r[1]-a[1])*(r[1]-a[1]))}],(function(e,n){if("none"!==s[n]&&null!=s[n]){var i=Yw(s[n],-h/2,-c/2,h,c,o.stroke,!0),a=e.r+e.offset,l=[r[0]+a*Math.cos(t.rotation),r[1]-a*Math.sin(t.rotation)];i.attr({rotation:e.rotate,position:l,silent:!0,z2:11}),this.group.add(i)}}),this)}}},axisTickLabel:function(){var t=this.axisModel,e=this.opt,n=function(t,e,n){var i=e.axis,r=e.getModel("axisTick");if(!r.get("show")||i.scale.isBlank())return;for(var a=r.getModel("lineStyle"),o=n.tickDirection*r.get("length"),s=rb(i.getTicksCoords(),t._transform,o,Ww(a.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}),"ticks"),l=0;l<s.length;l++)t.group.add(s[l]);return s}(this,t,e),i=function(t,e,n){var i=e.axis,r=Hw(n.axisLabelShow,e.get("axisLabel.show"));if(!r||i.scale.isBlank())return;var a=e.getModel("axisLabel"),o=a.get("margin"),s=i.getViewLabels(),l=(Hw(n.labelRotate,a.get("rotate"))||0)*Zw/180,u=Qw(n.rotation,l,n.labelDirection),h=e.getCategories&&e.getCategories(!0),c=[],d=tb(e),f=e.get("triggerEvent");return Uw(s,(function(r,s){var l=r.tickValue,p=r.formattedLabel,g=r.rawLabel,v=a;h&&h[l]&&h[l].textStyle&&(v=new oc(h[l].textStyle,a,e.ecModel));var m=v.getTextColor()||e.get("axisLine.lineStyle.color"),y=[i.dataToCoord(l),n.labelOffset+n.labelDirection*o],x=new Gh.Text({anid:"label_"+l,position:y,rotation:u.rotation,silent:d,z2:10});Gh.setTextStyle(x.style,v,{text:p,textAlign:v.getShallow("align",!0)||u.textAlign,textVerticalAlign:v.getShallow("verticalAlign",!0)||v.getShallow("baseline",!0)||u.textVerticalAlign,textFill:"function"==typeof m?m("category"===i.type?g:"value"===i.type?l+"":l,s):m}),f&&(x.eventData=Jw(e),x.eventData.targetType="axisLabel",x.eventData.value=g),t._dumbGroup.add(x),x.updateTransform(),c.push(x),t.group.add(x),x.decomposeTransform()})),c}(this,t,e);!function(t,e,n){if(Xw(t.axis))return;var i=t.get("axisLabel.showMinLabel"),r=t.get("axisLabel.showMaxLabel");e=e||[],n=n||[];var a=e[0],o=e[1],s=e[e.length-1],l=e[e.length-2],u=n[0],h=n[1],c=n[n.length-1],d=n[n.length-2];!1===i?(eb(a),eb(u)):nb(a,o)&&(i?(eb(o),eb(h)):(eb(a),eb(u)));!1===r?(eb(s),eb(c)):nb(l,s)&&(r?(eb(l),eb(d)):(eb(s),eb(c)))}(t,i,n),function(t,e,n){var i=e.axis,r=e.getModel("minorTick");if(!r.get("show")||i.scale.isBlank())return;var a=i.getMinorTicksCoords();if(!a.length)return;for(var o=r.getModel("lineStyle"),s=n.tickDirection*r.get("length"),l=Ww(o.getLineStyle(),Ww(e.getModel("axisTick").getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")})),u=0;u<a.length;u++)for(var h=rb(a[u],t._transform,s,l,"minorticks_"+u),c=0;c<h.length;c++)t.group.add(h[c])}(this,t,e)},axisName:function(){var t=this.opt,e=this.axisModel,n=Hw(t.axisName,e.get("name"));if(n){var i,r,a=e.get("nameLocation"),o=t.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=this.axisModel.axis.getExtent(),h=u[0]>u[1]?-1:1,c=["start"===a?u[0]-h*l:"end"===a?u[1]+h*l:(u[0]+u[1])/2,ib(a)?t.labelOffset+o*l:0],d=e.get("nameRotate");null!=d&&(d=d*Zw/180),ib(a)?i=Qw(t.rotation,null!=d?d:t.rotation,o):(i=function(t,e,n,i){var r,a,o=Gw(n-t.rotation),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;jw(o-Zw/2)?(a=l?"bottom":"top",r="center"):jw(o-1.5*Zw)?(a=l?"top":"bottom",r="center"):(a="middle",r=o<1.5*Zw&&o>Zw/2?l?"left":"right":l?"right":"left");return{rotation:o,textAlign:r,textVerticalAlign:a}}(t,a,d||0,u),null!=(r=t.axisNameAvailableWidth)&&(r=Math.abs(r/Math.sin(i.rotation)),!isFinite(r)&&(r=null)));var f=s.getFont(),p=e.get("nameTruncate",!0)||{},g=p.ellipsis,v=Hw(t.nameTruncateMaxWidth,p.maxWidth,r),m=null!=g&&null!=v?Pc.truncateText(n,v,f,g,{minChar:2,placeholder:p.placeholder}):n,y=e.get("tooltip",!0),x=e.mainType,_={componentType:x,name:n,$vars:["name"]};_[x+"Index"]=e.componentIndex;var w=new Gh.Text({anid:"name",__fullText:n,__truncatedText:m,position:c,rotation:i.rotation,silent:tb(e),z2:1,tooltip:y&&y.show?Vw({content:n,formatter:function(){return n},formatterParams:_},y):null});Gh.setTextStyle(w.style,s,{text:m,textFont:f,textFill:s.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:s.get("align")||i.textAlign,textVerticalAlign:s.get("verticalAlign")||i.textVerticalAlign}),e.get("triggerEvent")&&(w.eventData=Jw(e),w.eventData.targetType="axisName",w.eventData.name=n),this._dumbGroup.add(w),w.updateTransform(),this.group.add(w),w.decomposeTransform()}}},Jw=$w.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},Qw=$w.innerTextLayout=function(t,e,n){var i,r,a=Gw(e-t);return jw(a)?(r=n>0?"top":"bottom",i="center"):jw(a-Zw)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=a>0&&a<Zw?n>0?"right":"left":n>0?"left":"right"),{rotation:a,textAlign:i,textVerticalAlign:r}};var tb=$w.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)};function eb(t){t&&(t.ignore=!0)}function nb(t,e,n){var i=t&&t.getBoundingRect().clone(),r=e&&e.getBoundingRect().clone();if(i&&r){var a=tn.identity([]);return tn.rotate(a,a,-t.rotation),i.applyTransform(tn.mul([],a,t.getLocalTransform())),r.applyTransform(tn.mul([],a,e.getLocalTransform())),i.intersect(r)}}function ib(t){return"middle"===t||"center"===t}function rb(t,e,n,i,r){for(var a=[],o=[],s=[],l=0;l<t.length;l++){var u=t[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=n,e&&(qw(o,o,e),qw(s,s,e));var h=new Gh.Line({anid:r+"_"+t[l].tickValue,subPixelOptimize:!0,shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:i,z2:2,silent:!0});a.push(h)}return a}var ab=$w,ob=Nt.each,sb=Nt.curry;function lb(t,e){return"all"===t||Nt.isArray(t)&&Nt.indexOf(t,e)>=0||t===e}function ub(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[cb(t)]}function hb(t){return!!t.get("handle.show")}function cb(t){return t.type+"||"+t.id}var db=function(t,e){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(t,e,n){var i=e.getComponent("tooltip"),r=e.getComponent("axisPointer"),a=r.get("link",!0)||[],o=[];ob(n.getCoordinateSystems(),(function(n){if(n.axisPointerEnabled){var s=cb(n.model),l=t.coordSysAxesInfo[s]={};t.coordSysMap[s]=n;var u=n.model.getModel("tooltip",i);if(ob(n.getAxes(),sb(f,!1,null)),n.getTooltipAxes&&i&&u.get("show")){var h="axis"===u.get("trigger"),c="cross"===u.get("axisPointer.type"),d=n.getTooltipAxes(u.get("axisPointer.axis"));(h||c)&&ob(d.baseAxes,sb(f,!c||"cross",h)),c&&ob(d.otherAxes,sb(f,"cross",!1))}}function f(i,s,h){var c=h.model.getModel("axisPointer",r),d=c.get("show");if(d&&("auto"!==d||i||hb(c))){null==s&&(s=c.get("triggerTooltip")),c=i?function(t,e,n,i,r,a){var o=e.getModel("axisPointer"),s={};ob(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],(function(t){s[t]=Nt.clone(o.get(t))})),s.snap="category"!==t.type&&!!a,"cross"===o.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===r){var u=o.get("label.show");if(l.show=null==u||u,!a){var h=s.lineStyle=o.get("crossStyle");h&&Nt.defaults(l,h.textStyle)}}return t.model.getModel("axisPointer",new oc(s,n,i))}(h,u,r,e,i,s):c;var f=c.get("snap"),p=cb(h.model),g=s||f||"category"===h.type,v=t.axesInfo[p]={key:p,axis:h,coordSys:n,axisPointerModel:c,triggerTooltip:s,involveSeries:g,snap:f,useHandle:hb(c),seriesModels:[]};l[p]=v,t.seriesInvolved|=g;var m=function(t,e){for(var n=e.model,i=e.dim,r=0;r<t.length;r++){var a=t[r]||{};if(lb(a[i+"AxisId"],n.id)||lb(a[i+"AxisIndex"],n.componentIndex)||lb(a[i+"AxisName"],n.name))return r}}(a,h);if(null!=m){var y=o[m]||(o[m]={axesInfo:{}});y.axesInfo[p]=v,y.mapper=a[m].mapper,v.linkGroup=y}}}}))}(n,t,e),n.seriesInvolved&&function(t,e){e.eachSeries((function(e){var n=e.coordinateSystem,i=e.get("tooltip.trigger",!0),r=e.get("tooltip.show",!0);n&&"none"!==i&&!1!==i&&"item"!==i&&!1!==r&&!1!==e.get("axisPointer.show",!0)&&ob(t.coordSysAxesInfo[cb(n.model)],(function(t){var i=t.axis;n.getAxis(i.dim)===i&&(t.seriesModels.push(e),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=e.getData().count())}))}),this)}(n,t),n},fb=function(t){var e=ub(t);if(e){var n=e.axisPointerModel,i=e.axis.scale,r=n.option,a=n.get("status"),o=n.get("value");null!=o&&(o=i.parse(o));var s=hb(n);null==a&&(r.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==o||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),r.value=o,s&&(r.status=e.axis.scale.isBlank()?"hide":"show")}},pb={collect:db,fixValue:fb,getAxisInfo:ub,getAxisPointerModel:function(t){var e=ub(t);return e&&e.axisPointerModel},makeKey:cb},gb=M_.extendComponentView({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,n,i){this.axisPointerClass&&pb.fixValue(t),gb.superApply(this,"render",arguments),vb(this,t,e,n,i,!0)},updateAxisPointer:function(t,e,n,i,r){vb(this,t,e,n,i,!1)},remove:function(t,e){var n=this._axisPointer;n&&n.remove(e),gb.superApply(this,"remove",arguments)},dispose:function(t,e){mb(this,e),gb.superApply(this,"dispose",arguments)}});function vb(t,e,n,i,r,a){var o=gb.getAxisPointerClass(t.axisPointerClass);if(o){var s=pb.getAxisPointerModel(e);s?(t._axisPointer||(t._axisPointer=new o)).render(e,s,i,a):mb(t,i)}}function mb(t,e,n){var i=t._axisPointer;i&&i.dispose(e,n),t._axisPointer=null}var yb=[];gb.registerAxisPointerClass=function(t,e){yb[t]=e},gb.getAxisPointerClass=function(t){return t&&yb[t]};var xb=gb;var _b=function(t,e,n){n=n||{};var i=t.coordinateSystem,r=e.axis,a={},o=r.getAxesOnZeroOf()[0],s=r.position,l=o?"onZero":s,u=r.dim,h=i.getRect(),c=[h.x,h.x+h.width,h.y,h.y+h.height],d={left:0,right:1,top:0,bottom:1,onZero:2},f=e.get("offset")||0,p="x"===u?[c[2]-f,c[3]+f]:[c[0]-f,c[1]+f];if(o){var g=o.toGlobalCoord(o.dataToCoord(0));p[d.onZero]=Math.max(Math.min(g,p[1]),p[0])}a.position=["y"===u?p[d[l]]:c[0],"x"===u?p[d[l]]:c[3]],a.rotation=Math.PI/2*("x"===u?0:1),a.labelDirection=a.tickDirection=a.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],a.labelOffset=o?p[d[s]]-p[d.onZero]:0,e.get("axisTick.inside")&&(a.tickDirection=-a.tickDirection),Nt.retrieve(n.labelInside,e.get("axisLabel.inside"))&&(a.labelDirection=-a.labelDirection);var v=e.get("axisLabel.rotate");return a.labelRotate="top"===l?-v:v,a.z2=1,a},wb={layout:_b};var bb=function(t,e,n,i){var r=n.axis;if(!r.scale.isBlank()){var a=n.getModel("splitArea"),o=a.getModel("areaStyle"),s=o.get("color"),l=i.coordinateSystem.getRect(),u=r.getTicksCoords({tickModel:a,clamp:!0});if(u.length){var h=s.length,c=t.__splitAreaColors,d=Nt.createHashMap(),f=0;if(c)for(var p=0;p<u.length;p++){var g=c.get(u[p].tickValue);if(null!=g){f=(g+(h-1)*p)%h;break}}var v=r.toGlobalCoord(u[0].coord),m=o.getAreaStyle();s=Nt.isArray(s)?s:[s];for(p=1;p<u.length;p++){var y,x,_,w,b=r.toGlobalCoord(u[p].coord);r.isHorizontal()?(y=v,x=l.y,_=b-y,w=l.height,v=y+_):(y=l.x,x=v,_=l.width,v=x+(w=b-x));var S=u[p-1].tickValue;null!=S&&d.set(S,f),e.add(new Gh.Rect({anid:null!=S?"area_"+S:null,shape:{x:y,y:x,width:_,height:w},style:Nt.defaults({fill:s[f]},m),silent:!0})),f=(f+1)%h}t.__splitAreaColors=d}}},Sb={rectCoordAxisBuildSplitArea:bb,rectCoordAxisHandleRemove:function(t){t.__splitAreaColors=null}},Tb=Sb.rectCoordAxisBuildSplitArea,Cb=Sb.rectCoordAxisHandleRemove,Mb=["axisLine","axisTickLabel","axisName"],Ab=["splitArea","splitLine","minorSplitLine"],Ib=xb.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,n,i){this.group.removeAll();var r=this._axisGroup;if(this._axisGroup=new Gh.Group,this.group.add(this._axisGroup),t.get("show")){var a=t.getCoordSysModel(),o=wb.layout(a,t),s=new ab(t,o);Nt.each(Mb,s.add,s),this._axisGroup.add(s.getGroup()),Nt.each(Ab,(function(e){t.get(e+".show")&&this["_"+e](t,a)}),this),Gh.groupTransition(r,this._axisGroup,t),Ib.superCall(this,"render",t,e,n,i)}},remove:function(){Cb(this)},_splitLine:function(t,e){var n=t.axis;if(!n.scale.isBlank()){var i=t.getModel("splitLine"),r=i.getModel("lineStyle"),a=r.get("color");a=Nt.isArray(a)?a:[a];for(var o=e.coordinateSystem.getRect(),s=n.isHorizontal(),l=0,u=n.getTicksCoords({tickModel:i}),h=[],c=[],d=r.getLineStyle(),f=0;f<u.length;f++){var p=n.toGlobalCoord(u[f].coord);s?(h[0]=p,h[1]=o.y,c[0]=p,c[1]=o.y+o.height):(h[0]=o.x,h[1]=p,c[0]=o.x+o.width,c[1]=p);var g=l++%a.length,v=u[f].tickValue;this._axisGroup.add(new Gh.Line({anid:null!=v?"line_"+u[f].tickValue:null,subPixelOptimize:!0,shape:{x1:h[0],y1:h[1],x2:c[0],y2:c[1]},style:Nt.defaults({stroke:a[g]},d),silent:!0}))}}},_minorSplitLine:function(t,e){var n=t.axis,i=t.getModel("minorSplitLine").getModel("lineStyle"),r=e.coordinateSystem.getRect(),a=n.isHorizontal(),o=n.getMinorTicksCoords();if(o.length)for(var s=[],l=[],u=i.getLineStyle(),h=0;h<o.length;h++)for(var c=0;c<o[h].length;c++){var d=n.toGlobalCoord(o[h][c].coord);a?(s[0]=d,s[1]=r.y,l[0]=d,l[1]=r.y+r.height):(s[0]=r.x,s[1]=d,l[0]=r.x+r.width,l[1]=d),this._axisGroup.add(new Gh.Line({anid:"minor_line_"+o[h][c].tickValue,subPixelOptimize:!0,shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:u,silent:!0}))}},_splitArea:function(t,e){Tb(this,this._axisGroup,t,e)}});Ib.extend({type:"xAxis"}),Ib.extend({type:"yAxis"}),M_.extendComponentView({type:"grid",render:function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new Gh.Rect({shape:t.coordinateSystem.getRect(),style:Nt.defaults({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))}}),M_.registerPreprocessor((function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})}));var kb=Ey.layout,Db=Ey.largeLayout;M_.registerLayout(M_.PRIORITY.VISUAL.LAYOUT,Nt.curry(kb,"bar")),M_.registerLayout(M_.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Db),M_.registerVisual({seriesType:"bar",reset:function(t){t.getData().setVisual("legendSymbol","roundRect")}});var Pb=function(t,e){var n,i=[],r=t.seriesIndex;if(null==r||!(n=e.getSeriesByIndex(r)))return{point:[]};var a=n.getData(),o=Io.queryDataIndex(a,t);if(null==o||o<0||Nt.isArray(o))return{point:[]};var s=a.getItemGraphicEl(o),l=n.coordinateSystem;if(n.getTooltipPosition)i=n.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)i=l.dataToPoint(a.getValues(Nt.map(l.dimensions,(function(t){return a.mapDimension(t)})),o,!0))||[];else if(s){var u=s.getBoundingRect().clone();u.applyTransform(s.transform),i=[u.x+u.width/2,u.y+u.height/2]}return{point:i,el:s}},Ob=Io.makeInner,Lb=Nt.each,Rb=Nt.curry,Eb=Ob();function Bb(t,e,n,i,r){var a=t.axis;if(!a.scale.isBlank()&&a.containData(e))if(t.involveSeries){var o=function(t,e){var n=e.axis,i=n.dim,r=t,a=[],o=Number.MAX_VALUE,s=-1;return Lb(e.seriesModels,(function(e,l){var u,h,c=e.getData().mapDimension(i,!0);if(e.getAxisTooltipData){var d=e.getAxisTooltipData(c,t,n);h=d.dataIndices,u=d.nestestValue}else{if(!(h=e.getData().indicesOfNearest(c[0],t,"category"===n.type?.5:null)).length)return;u=e.getData().get(c[0],h[0])}if(null!=u&&isFinite(u)){var f=t-u,p=Math.abs(f);p<=o&&((p<o||f>=0&&s<0)&&(o=p,s=f,r=u,a.length=0),Lb(h,(function(t){a.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})})))}})),{payloadBatch:a,snapToValue:r}}(e,t),s=o.payloadBatch,l=o.snapToValue;s[0]&&null==r.seriesIndex&&Nt.extend(r,s[0]),!i&&t.snap&&a.containData(l)&&null!=l&&(e=l),n.showPointer(t,e,s,r),n.showTooltip(t,o,l)}else n.showPointer(t,e)}function Nb(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function zb(t,e,n,i){var r=n.payloadBatch,a=e.axis,o=a.model,s=e.axisPointerModel;if(e.triggerTooltip&&r.length){var l=e.coordSys.model,u=pb.makeKey(l),h=t.map[u];h||(h=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:i,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:r.slice()})}}function Fb(t){var e=t.axis.model,n={},i=n.axisDim=t.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=e.componentIndex,n.axisName=n[i+"AxisName"]=e.name,n.axisId=n[i+"AxisId"]=e.id,n}function Hb(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}var Wb=function(t,e,n){var i=t.currTrigger,r=[t.x,t.y],a=t,o=t.dispatchAction||Nt.bind(n.dispatchAction,n),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){Hb(r)&&(r=Pb({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=Hb(r),u=a.axesInfo,h=s.axesInfo,c="leave"===i||Hb(r),d={},f={},p={list:[],map:{}},g={showPointer:Rb(Nb,f),showTooltip:Rb(zb,p)};Lb(s.coordSysMap,(function(t,e){var n=l||t.containPoint(r);Lb(s.coordSysAxesInfo[e],(function(t,e){var i=t.axis,a=function(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}(u,t);if(!c&&n&&(!u||a)){var o=a&&a.value;null!=o||l||(o=i.pointToData(r)),null!=o&&Bb(t,o,g,!1,d)}}))}));var v={};return Lb(h,(function(t,e){var n=t.linkGroup;n&&!f[e]&&Lb(n.axesInfo,(function(e,i){var r=f[i];if(e!==t&&r){var a=r.value;n.mapper&&(a=t.axis.scale.parse(n.mapper(a,Fb(e),Fb(t)))),v[t.key]=a}}))})),Lb(v,(function(t,e){Bb(h[e],t,g,!0,d)})),function(t,e,n){var i=n.axesInfo=[];Lb(e,(function(e,n){var r=e.axisPointerModel.option,a=t[n];a?(!e.useHandle&&(r.status="show"),r.value=a.value,r.seriesDataIndices=(a.payloadBatch||[]).slice()):!e.useHandle&&(r.status="hide"),"show"===r.status&&i.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:r.value})}))}(f,h,d),function(t,e,n,i){if(Hb(e)||!t.list.length)return void i({type:"hideTip"});var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}(p,r,t,o),function(t,e,n){var i=n.getZr(),r="axisPointerLastHighlights",a=Eb(i)[r]||{},o=Eb(i)[r]={};Lb(t,(function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&Lb(n.seriesDataIndices,(function(t){var e=t.seriesIndex+" | "+t.dataIndex;o[e]=t}))}));var s=[],l=[];Nt.each(a,(function(t,e){!o[e]&&l.push(t)})),Nt.each(o,(function(t,e){!a[e]&&s.push(t)})),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,batch:s})}(h,0,n),d}};M_.extendComponentModel({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}}});var Vb=(0,Io.makeInner)(),Ub=Nt.each;function jb(t,e,n){t.handler("leave",null,n)}function Gb(t,e,n,i){e.handler(t,n,i)}var Yb={register:function(t,e,n){if(!tt.node){var i=e.getZr();Vb(i).records||(Vb(i).records={}),function(t,e){if(Vb(t).initialized)return;function n(n,i){t.on(n,(function(n){var r=function(t){var e={showTip:[],hideTip:[]},n=function(i){var r=e[i.type];r?r.push(i):(i.dispatchAction=n,t.dispatchAction(i))};return{dispatchAction:n,pendings:e}}(e);Ub(Vb(t).records,(function(t){t&&i(t,n,r.dispatchAction)})),function(t,e){var n,i=t.showTip.length,r=t.hideTip.length;i?n=t.showTip[i-1]:r&&(n=t.hideTip[r-1]);n&&(n.dispatchAction=null,e.dispatchAction(n))}(r.pendings,e)}))}Vb(t).initialized=!0,n("click",Nt.curry(Gb,"click")),n("mousemove",Nt.curry(Gb,"mousemove")),n("globalout",jb)}(i,e),(Vb(i).records[t]||(Vb(i).records[t]={})).handler=n}},unregister:function(t,e){if(!tt.node){var n=e.getZr();(Vb(n).records||{})[t]&&(Vb(n).records[t]=null)}}},qb=M_.extendComponentView({type:"axisPointer",render:function(t,e,n){var i=e.getComponent("tooltip"),r=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";Yb.register("axisPointer",n,(function(t,e,n){"none"!==r&&("leave"===t||r.indexOf(t)>=0)&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})}))},remove:function(t,e){Yb.unregister(e.getZr(),"axisPointer"),qb.superApply(this._model,"remove",arguments)},dispose:function(t,e){Yb.unregister("axisPointer",e),qb.superApply(this._model,"dispose",arguments)}}),Xb=(0,Io.makeInner)(),Zb=Nt.clone,$b=Nt.bind;function Kb(){}function Jb(t,e,n,i){Qb(Xb(n).lastProp,i)||(Xb(n).lastProp=i,e?Gh.updateProps(n,i,t):(n.stopAnimation(),n.attr(i)))}function Qb(t,e){if(Nt.isObject(t)&&Nt.isObject(e)){var n=!0;return Nt.each(e,(function(e,i){n=n&&Qb(t[i],e)})),!!n}return t===e}function tS(t,e){t[e.get("label.show")?"show":"hide"]()}function eS(t){return{position:t.position.slice(),rotation:t.rotation||0}}function nS(t,e,n){var i=e.get("z"),r=e.get("zlevel");t&&t.traverse((function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=r&&(t.zlevel=r),t.silent=n)}))}function iS(t,e,n,i,r){var a=rS(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get("label.precision"),formatter:n.get("label.formatter")}),o=n.getModel("label"),s=Pc.normalizeCssArray(o.get("padding")||0),l=o.getFont(),u=Nr.getBoundingRect(a,l),h=r.position,c=u.width+s[1]+s[3],d=u.height+s[0]+s[2],f=r.align;"right"===f&&(h[0]-=c),"center"===f&&(h[0]-=c/2);var p=r.verticalAlign;"bottom"===p&&(h[1]-=d),"middle"===p&&(h[1]-=d/2),function(t,e,n,i){var r=i.getWidth(),a=i.getHeight();t[0]=Math.min(t[0]+e,r)-e,t[1]=Math.min(t[1]+n,a)-n,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}(h,c,d,i);var g=o.get("backgroundColor");g&&"auto"!==g||(g=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:c,height:d,r:o.get("borderRadius")},position:h.slice(),style:{text:a,textFont:l,textFill:o.getTextColor(),textPosition:"inside",textPadding:s,fill:g,stroke:o.get("borderColor")||"transparent",lineWidth:o.get("borderWidth")||0,shadowBlur:o.get("shadowBlur"),shadowColor:o.get("shadowColor"),shadowOffsetX:o.get("shadowOffsetX"),shadowOffsetY:o.get("shadowOffsetY")},z2:10}}function rS(t,e,n,i,r){t=e.scale.parse(t);var a=e.scale.getLabel(t,{precision:r.precision}),o=r.formatter;if(o){var s={value:fx.getAxisRawValue(e,t),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};Nt.each(i,(function(t){var e=n.getSeriesByIndex(t.seriesIndex),i=t.dataIndexInside,r=e&&e.getDataParams(i);r&&s.seriesData.push(r)})),Nt.isString(o)?a=o.replace("{value}",a):Nt.isFunction(o)&&(a=o(s))}return a}function aS(t,e,n){var i=tn.create();return tn.rotate(i,i,n.rotation),tn.translate(i,i,n.position),Gh.applyTransform([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}Kb.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,n,i){var r=e.get("value"),a=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,i||this._lastValue!==r||this._lastStatus!==a){this._lastValue=r,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||"hide"===a)return o&&o.hide(),void(s&&s.hide());o&&o.show(),s&&s.show();var l={};this.makeElOption(l,r,t,e,n);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=u;var h=this._moveAnimation=this.determineAnimation(t,e);if(o){var c=Nt.curry(Jb,e,h);this.updatePointerEl(o,l,c,e),this.updateLabelEl(o,l,c,e)}else o=this._group=new Gh.Group,this.createPointerEl(o,l,t,e),this.createLabelEl(o,l,t,e),n.getZr().add(o);nS(o,e,!0),this._renderHandle(r)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var n=e.get("animation"),i=t.axis,r="category"===i.type,a=e.get("snap");if(!a&&!r)return!1;if("auto"===n||null==n){var o=this.animationThreshold;if(r&&i.getBandWidth()>o)return!0;if(a){var s=pb.getAxisInfo(t).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>o}return!1}return!0===n},makeElOption:function(t,e,n,i,r){},createPointerEl:function(t,e,n,i){var r=e.pointer;if(r){var a=Xb(t).pointerEl=new Gh[r.type](Zb(e.pointer));t.add(a)}},createLabelEl:function(t,e,n,i){if(e.label){var r=Xb(t).labelEl=new Gh.Rect(Zb(e.label));t.add(r),tS(r,i)}},updatePointerEl:function(t,e,n){var i=Xb(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,n,i){var r=Xb(t).labelEl;r&&(r.setStyle(e.label.style),n(r,{shape:e.label.shape,position:e.label.position}),tS(r,i))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e,n=this._axisPointerModel,i=this._api.getZr(),r=this._handle,a=n.getModel("handle"),o=n.get("status");if(!a.get("show")||!o||"hide"===o)return r&&i.remove(r),void(this._handle=null);this._handle||(e=!0,r=this._handle=Gh.createIcon(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Oe.stop(t.event)},onmousedown:$b(this._onHandleDragMove,this,0,0),drift:$b(this._onHandleDragMove,this),ondragend:$b(this._onHandleDragEnd,this)}),i.add(r)),nS(r,n,!1);r.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=a.get("size");Nt.isArray(s)||(s=[s,s]),r.attr("scale",[s[0]/2,s[1]/2]),fg.createOrUpdate(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},_moveHandleToValue:function(t,e){Jb(this._axisPointerModel,!e&&this._moveAnimation,this._handle,eS(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(eS(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(eS(i)),Xb(n).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},_onHandleDragEnd:function(t){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}},Kb.prototype.constructor=Kb,Bo.enableClassExtend(Kb);var oS=function(t){var e,n=t.get("type"),i=t.getModel(n+"Style");return"line"===n?(e=i.getLineStyle()).fill=null:"shadow"===n&&((e=i.getAreaStyle()).stroke=null),e},sS={buildElStyle:oS,buildLabelElOption:iS,getValueLabel:rS,getTransformedPosition:aS,buildCartesianSingleLabelElOption:function(t,e,n,i,r,a){var o=ab.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=r.get("label.margin"),iS(e,i,r,a,{position:aS(i.axis,t,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})},makeLineShape:function(t,e,n){return{x1:t[n=n||0],y1:t[1-n],x2:e[n],y2:e[1-n]}},makeRectShape:function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}},makeSectorShape:function(t,e,n,i,r,a){return{cx:t,cy:e,r0:n,r:i,startAngle:r,endAngle:a,clockwise:!0}}},lS=Kb.extend({makeElOption:function(t,e,n,i,r){var a=n.axis,o=a.grid,s=i.get("type"),l=uS(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(e,!0));if(s&&"none"!==s){var h=sS.buildElStyle(i),c=hS[s](a,u,l);c.style=h,t.graphicKey=c.type,t.pointer=c}var d=wb.layout(o.model,n);sS.buildCartesianSingleLabelElOption(e,t,d,n,i,r)},getHandleTransform:function(t,e,n){var i=wb.layout(e.axis.grid.model,e,{labelInside:!1});return i.labelMargin=n.get("handle.margin"),{position:sS.getTransformedPosition(e.axis,t,i),rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,n,i){var r=n.axis,a=r.grid,o=r.getGlobalExtent(!0),s=uS(a,r).getOtherAxis(r).getGlobalExtent(),l="x"===r.dim?0:1,u=t.position;u[l]+=e[l],u[l]=Math.min(o[1],u[l]),u[l]=Math.max(o[0],u[l]);var h=(s[1]+s[0])/2,c=[h,h];c[l]=u[l];return{position:u,rotation:t.rotation,cursorPoint:c,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}}});function uS(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var hS={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:sS.makeLineShape([e,n[0]],[e,n[1]],cS(t))}},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),r=n[1]-n[0];return{type:"Rect",shape:sS.makeRectShape([e-i/2,n[0]],[i,r],cS(t))}}};function cS(t){return"x"===t.dim?0:1}xb.registerAxisPointerClass("CartesianAxisPointer",lS),M_.registerPreprocessor((function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!Nt.isArray(e)&&(t.axisPointer.link=[e])}})),M_.registerProcessor(M_.PRIORITY.PROCESSOR.STATISTIC,(function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=pb.collect(t,e)})),M_.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},Wb),M_.extendComponentModel({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}});var dS=Nt.each,fS=Pc.toCamelCase,pS=["","-webkit-","-moz-","-o-"];function gS(t){var e,n,i,r=[],a=t.get("transitionDuration"),o=t.get("backgroundColor"),s=t.getModel("textStyle"),l=t.get("padding");return a&&r.push((i="left "+(e=a)+"s "+(n="cubic-bezier(0.23, 1, 0.32, 1)")+",top "+e+"s "+n,Nt.map(pS,(function(t){return t+"transition:"+i})).join(";"))),o&&(tt.canvasSupported?r.push("background-Color:"+o):(r.push("background-Color:#"+Vn.toHex(o)),r.push("filter:alpha(opacity=70)"))),dS(["width","color","radius"],(function(e){var n="border-"+e,i=fS(n),a=t.get(i);null!=a&&r.push(n+":"+a+("color"===e?"":"px"))})),r.push(function(t){var e=[],n=t.get("fontSize"),i=t.getTextColor();return i&&e.push("color:"+i),e.push("font:"+t.getFont()),n&&e.push("line-height:"+Math.round(3*n/2)+"px"),dS(["decoration","align"],(function(n){var i=t.get(n);i&&e.push("text-"+n+":"+i)})),e.join(";")}(s)),null!=l&&r.push("padding:"+Pc.normalizeCssArray(l).join("px ")+"px"),r.join(";")+";"}function vS(t,e,n,i,r){var a=e&&e.painter;if(n){var o=a&&a.getViewportRoot();o&&be.transformLocalCoord(t,o,document.body,i,r)}else{t[0]=i,t[1]=r;var s=a&&a.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}}function mS(t,e,n){if(tt.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var r=this._zr=e.getZr(),a=this._appendToBody=n&&n.appendToBody;this._styleCoord=[0,0],vS(this._styleCoord,r,a,e.getWidth()/2,e.getHeight()/2),a?document.body.appendChild(i):t.appendChild(i),this._container=t,this._show=!1,this._hideTimeout;var o=this;i.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},i.onmousemove=function(t){if(t=t||window.event,!o._enterable){var e=r.handler,n=r.painter.getViewportRoot();Oe.normalizeEvent(n,t,!0),e.dispatch("mousemove",t)}},i.onmouseleave=function(){o._enterable&&o._show&&o.hideLater(o._hideDelay),o._inContent=!1}}mS.prototype={constructor:mS,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),n=t.style;"absolute"!==n.position&&"absolute"!==e.position&&(n.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el,n=this._styleCoord;e.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+gS(t)+";left:"+n[0]+"px;top:"+n[1]+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",e.style.pointerEvents=this._enterable?"auto":"none",this._show=!0},setContent:function(t){this.el.innerHTML=null==t?"":t},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var n=this._styleCoord;vS(n,this._zr,this._appendToBody,t,e);var i=this.el.style;i.left=n[0]+"px",i.top=n[1]+"px"},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(Nt.bind(this.hide,this),t)):this.hide())},isShow:function(){return this._show},dispose:function(){this.el.parentNode.removeChild(this.el)},getOuterSize:function(){var t=this.el.clientWidth,e=this.el.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var n=document.defaultView.getComputedStyle(this.el);n&&(t+=parseInt(n.borderLeftWidth,10)+parseInt(n.borderRightWidth,10),e+=parseInt(n.borderTopWidth,10)+parseInt(n.borderBottomWidth,10))}return{width:t,height:e}}};var yS=mS;function xS(t){this._zr=t.getZr(),this._show=!1,this._hideTimeout}xS.prototype={constructor:xS,_enterable:!0,update:function(){},show:function(t){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(t,e,n){this.el&&this._zr.remove(this.el);for(var i={},r=t,a="{marker",o=r.indexOf(a);o>=0;){var s=r.indexOf("|}"),l=r.substr(o+7,s-o-7);l.indexOf("sub")>-1?i["marker"+l]={textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:e[l],textOffset:[3,0]}:i["marker"+l]={textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:e[l]},o=(r=r.substr(s+1)).indexOf("{marker")}this.el=new El({style:{rich:i,text:t,textLineHeight:20,textBackgroundColor:n.get("backgroundColor"),textBorderRadius:n.get("borderRadius"),textFill:n.get("textStyle.color"),textPadding:n.get("padding")},z:n.get("z")}),this._zr.add(this.el);var u=this;this.el.on("mouseover",(function(){u._enterable&&(clearTimeout(u._hideTimeout),u._show=!0),u._inContent=!0})),this.el.on("mouseout",(function(){u._enterable&&u._show&&u.hideLater(u._hideDelay),u._inContent=!1}))},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el.getBoundingRect();return[t.width,t.height]},moveTo:function(t,e){this.el&&this.el.attr("position",[t,e])},hide:function(){this.el&&this.el.hide(),this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(Nt.bind(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){var t=this.getSize();return{width:t[0],height:t[1]}}};var _S=xS,wS=Io.getTooltipRenderMode,bS=Nt.bind,SS=Nt.each,TS=yc.parsePercent,CS=new Gh.Rect({shape:{x:-1,y:-1,width:2,height:2}});function MS(t){for(var e=t.pop();t.length;){var n=t.pop();n&&(oc.isInstance(n)&&(n=n.get("tooltip",!0)),"string"==typeof n&&(n={formatter:n}),e=new oc(n,e,e.ecModel))}return e}function AS(t,e){return t.dispatchAction||Nt.bind(e.dispatchAction,e)}function IS(t){return"center"===t||"middle"===t}M_.extendComponentView({type:"tooltip",init:function(t,e){if(!tt.node){var n,i=t.getComponent("tooltip"),r=i.get("renderMode");this._renderMode=wS(r),"html"===this._renderMode?(n=new yS(e.getDom(),e,{appendToBody:i.get("appendToBody",!0)}),this._newLine="<br/>"):(n=new _S(e),this._newLine="\n"),this._tooltipContent=n}},render:function(t,e,n){if(!tt.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=n,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var i=this._tooltipContent;i.update(),i.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel.get("triggerOn");Yb.register("itemTooltip",this._api,bS((function(e,n,i){"none"!==t&&(t.indexOf(e)>=0?this._tryShow(n,i):"leave"===e&&this._hide(i))}),this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,n=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&i.manuallyShowTip(t,e,n,{x:i._lastX,y:i._lastY})}))}},manuallyShowTip:function(t,e,n,i){if(i.from!==this.uid&&!tt.node){var r=AS(i,n);this._ticket="";var a=i.dataByCoordSys;if(i.tooltip&&null!=i.x&&null!=i.y){var o=CS;o.position=[i.x,i.y],o.update(),o.tooltip=i.tooltip,this._tryShow({offsetX:i.x,offsetY:i.y,target:o},r)}else if(a)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:i.dataByCoordSys,tooltipOption:i.tooltipOption},r);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,i))return;var s=Pb(i,e),l=s.point[0],u=s.point[1];null!=l&&null!=u&&this._tryShow({offsetX:l,offsetY:u,position:i.position,target:s.el},r)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},r))}},manuallyHideTip:function(t,e,n,i){var r=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,i.from!==this.uid&&this._hide(AS(i,n))},_manuallyAxisShowTip:function(t,e,n,i){var r=i.seriesIndex,a=i.dataIndex,o=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=a&&null!=o){var s=e.getSeriesByIndex(r);if(s)if("axis"===(t=MS([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model,t])).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:a,position:i.position}),!0}},_tryShow:function(t,e){var n=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var i=t.dataByCoordSys;i&&i.length?this._showAxisTooltip(i,t):n&&null!=n.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,n,e)):n&&n.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,n,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var n=t.get("showDelay");e=Nt.bind(e,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(e,n):e()},_showAxisTooltip:function(t,e){var n=this._ecModel,i=this._tooltipModel,r=[e.offsetX,e.offsetY],a=[],o=[],s=MS([e.tooltipOption,i]),l=this._renderMode,u=this._newLine,h={};SS(t,(function(t){SS(t.dataByAxis,(function(t){var e=n.getComponent(t.axisDim+"Axis",t.axisIndex),i=t.value,r=[];if(e&&null!=i){var s=sS.getValueLabel(i,e.axis,n,t.seriesDataIndices,t.valueLabelOpt);Nt.each(t.seriesDataIndices,(function(a){var u=n.getSeriesByIndex(a.seriesIndex),c=a.dataIndexInside,d=u&&u.getDataParams(c);if(d.axisDim=t.axisDim,d.axisIndex=t.axisIndex,d.axisType=t.axisType,d.axisId=t.axisId,d.axisValue=fx.getAxisRawValue(e.axis,i),d.axisValueLabel=s,d){o.push(d);var f,p=u.formatTooltip(c,!0,null,l);if(Nt.isObject(p)){f=p.html;var g=p.markers;Nt.merge(h,g)}else f=p;r.push(f)}}));var c=s;"html"!==l?a.push(r.join(u)):a.push((c?Pc.encodeHTML(c)+u:"")+r.join(u))}}))}),this),a.reverse(),a=a.join(this._newLine+this._newLine);var c=e.position;this._showOrMove(s,(function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(s,c,r[0],r[1],this._tooltipContent,o):this._showTooltipContent(s,a,o,Math.random(),r[0],r[1],c,void 0,h)}))},_showSeriesItemTooltip:function(t,e,n){var i=this._ecModel,r=e.seriesIndex,a=i.getSeriesByIndex(r),o=e.dataModel||a,s=e.dataIndex,l=e.dataType,u=o.getData(l),h=MS([u.getItemModel(s),o,a&&(a.coordinateSystem||{}).model,this._tooltipModel]),c=h.get("trigger");if(null==c||"item"===c){var d,f,p=o.getDataParams(s,l),g=o.formatTooltip(s,!1,l,this._renderMode);Nt.isObject(g)?(d=g.html,f=g.markers):(d=g,f=null);var v="item_"+o.name+"_"+s;this._showOrMove(h,(function(){this._showTooltipContent(h,d,p,v,t.offsetX,t.offsetY,t.position,t.target,f)})),n({type:"showTip",dataIndexInside:s,dataIndex:u.getRawIndex(s),seriesIndex:r,from:this.uid})}},_showComponentItemTooltip:function(t,e,n){var i=e.tooltip;if("string"==typeof i){i={content:i,formatter:i}}var r=new oc(i,this._tooltipModel,this._ecModel),a=r.get("content"),o=Math.random();this._showOrMove(r,(function(){this._showTooltipContent(r,a,r.get("formatterParams")||{},o,t.offsetX,t.offsetY,t.position,e)})),n({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,n,i,r,a,o,s,l){if(this._ticket="",t.get("showContent")&&t.get("show")){var u=this._tooltipContent,h=t.get("formatter");o=o||t.get("position");var c=e;if(h&&"string"==typeof h)c=Pc.formatTpl(h,n,!0);else if("function"==typeof h){var d=bS((function(e,i){e===this._ticket&&(u.setContent(i,l,t),this._updatePosition(t,o,r,a,u,n,s))}),this);this._ticket=i,c=h(n,i,d)}u.setContent(c,l,t),u.show(t),this._updatePosition(t,o,r,a,u,n,s)}},_updatePosition:function(t,e,n,i,r,a,o){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u=r.getSize(),h=t.get("align"),c=t.get("verticalAlign"),d=o&&o.getBoundingRect().clone();if(o&&d.applyTransform(o.transform),"function"==typeof e&&(e=e([n,i],a,r.el,d,{viewSize:[s,l],contentSize:u.slice()})),Nt.isArray(e))n=TS(e[0],s),i=TS(e[1],l);else if(Nt.isObject(e)){e.width=u[0],e.height=u[1];var f=Uc.getLayoutRect(e,{width:s,height:l});n=f.x,i=f.y,h=null,c=null}else if("string"==typeof e&&o){var p=function(t,e,n){var i=n[0],r=n[1],a=5,o=0,s=0,l=e.width,u=e.height;switch(t){case"inside":o=e.x+l/2-i/2,s=e.y+u/2-r/2;break;case"top":o=e.x+l/2-i/2,s=e.y-r-a;break;case"bottom":o=e.x+l/2-i/2,s=e.y+u+a;break;case"left":o=e.x-i-a,s=e.y+u/2-r/2;break;case"right":o=e.x+l+a,s=e.y+u/2-r/2}return[o,s]}(e,d,u);n=p[0],i=p[1]}else{p=function(t,e,n,i,r,a,o){var s=n.getOuterSize(),l=s.width,u=s.height;null!=a&&(t+l+a>i?t-=l+a:t+=a);null!=o&&(e+u+o>r?e-=u+o:e+=o);return[t,e]}(n,i,r,s,l,h?null:20,c?null:20);n=p[0],i=p[1]}if(h&&(n-=IS(h)?u[0]/2:"right"===h?u[0]:0),c&&(i-=IS(c)?u[1]/2:"bottom"===c?u[1]:0),t.get("confine")){p=function(t,e,n,i,r){var a=n.getOuterSize(),o=a.width,s=a.height;return t=Math.min(t+o,i)-o,e=Math.min(e+s,r)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}(n,i,r,s,l);n=p[0],i=p[1]}r.moveTo(n,i)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,n=!!e&&e.length===t.length;return n&&SS(e,(function(e,i){var r=e.dataByAxis||{},a=(t[i]||{}).dataByAxis||[];(n&=r.length===a.length)&&SS(r,(function(t,e){var i=a[e]||{},r=t.seriesDataIndices||[],o=i.seriesDataIndices||[];(n&=t.value===i.value&&t.axisType===i.axisType&&t.axisId===i.axisId&&r.length===o.length)&&SS(r,(function(t,e){var i=o[e];n&=t.seriesIndex===i.seriesIndex&&t.dataIndex===i.dataIndex}))}))})),this._lastDataByCoordSys=t,!!n},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){tt.node||(this._tooltipContent.dispose(),Yb.unregister("itemTooltip",e))}}),M_.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},(function(){})),M_.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},(function(){}));var kS=K((function(t,e){var n;n=function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={exports:{},id:i,loaded:!1};return t[i].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}return n.m=t,n.c=e,n.p="",n(0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){var i=n(2),r=n(3),a=n(4),o=n(22);function s(t){var e=new a(t),n=r(a.prototype.request,e);return i.extend(n,a.prototype,e),i.extend(n,e),n}var l=s(n(10));l.Axios=a,l.create=function(t){return s(o(l.defaults,t))},l.Cancel=n(23),l.CancelToken=n(24),l.isCancel=n(9),l.all=function(t){return Promise.all(t)},l.spread=n(25),t.exports=l,t.exports.default=l},function(t,e,n){var i=n(3),r=Object.prototype.toString;function a(t){return"[object Array]"===r.call(t)}function o(t){return void 0===t}function s(t){return null!==t&&"object"==typeof t}function l(t){return"[object Function]"===r.call(t)}function u(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),a(t))for(var n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.call(null,t[r],r,t)}t.exports={isArray:a,isArrayBuffer:function(t){return"[object ArrayBuffer]"===r.call(t)},isBuffer:function(t){return null!==t&&!o(t)&&null!==t.constructor&&!o(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:s,isUndefined:o,isDate:function(t){return"[object Date]"===r.call(t)},isFile:function(t){return"[object File]"===r.call(t)},isBlob:function(t){return"[object Blob]"===r.call(t)},isFunction:l,isStream:function(t){return s(t)&&l(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:u,merge:function t(){var e={};function n(n,i){"object"==typeof e[i]&&"object"==typeof n?e[i]=t(e[i],n):e[i]=n}for(var i=0,r=arguments.length;i<r;i++)u(arguments[i],n);return e},deepMerge:function t(){var e={};function n(n,i){"object"==typeof e[i]&&"object"==typeof n?e[i]=t(e[i],n):e[i]="object"==typeof n?t({},n):n}for(var i=0,r=arguments.length;i<r;i++)u(arguments[i],n);return e},extend:function(t,e,n){return u(e,(function(e,r){t[r]=n&&"function"==typeof e?i(e,n):e})),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(t,e){t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),i=0;i<n.length;i++)n[i]=arguments[i];return t.apply(e,n)}}},function(t,e,n){var i=n(2),r=n(5),a=n(6),o=n(7),s=n(22);function l(t){this.defaults=t,this.interceptors={request:new a,response:new a}}l.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=[o,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach((function(t){e.unshift(t.fulfilled,t.rejected)})),this.interceptors.response.forEach((function(t){e.push(t.fulfilled,t.rejected)}));e.length;)n=n.then(e.shift(),e.shift());return n},l.prototype.getUri=function(t){return t=s(this.defaults,t),r(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},i.forEach(["delete","get","head","options"],(function(t){l.prototype[t]=function(e,n){return this.request(i.merge(n||{},{method:t,url:e}))}})),i.forEach(["post","put","patch"],(function(t){l.prototype[t]=function(e,n,r){return this.request(i.merge(r||{},{method:t,url:e,data:n}))}})),t.exports=l},function(t,e,n){var i=n(2);function r(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var a;if(n)a=n(e);else if(i.isURLSearchParams(e))a=e.toString();else{var o=[];i.forEach(e,(function(t,e){null!=t&&(i.isArray(t)?e+="[]":t=[t],i.forEach(t,(function(t){i.isDate(t)?t=t.toISOString():i.isObject(t)&&(t=JSON.stringify(t)),o.push(r(e)+"="+r(t))})))})),a=o.join("&")}if(a){var s=t.indexOf("#");-1!==s&&(t=t.slice(0,s)),t+=(-1===t.indexOf("?")?"?":"&")+a}return t}},function(t,e,n){var i=n(2);function r(){this.handlers=[]}r.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},r.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},r.prototype.forEach=function(t){i.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=r},function(t,e,n){var i=n(2),r=n(8),a=n(9),o=n(10);function s(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return s(t),t.headers=t.headers||{},t.data=r(t.data,t.headers,t.transformRequest),t.headers=i.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),i.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||o.adapter)(t).then((function(e){return s(t),e.data=r(e.data,e.headers,t.transformResponse),e}),(function(e){return a(e)||(s(t),e&&e.response&&(e.response.data=r(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},function(t,e,n){var i=n(2);t.exports=function(t,e,n){return i.forEach(n,(function(n){t=n(t,e)})),t}},function(t,e){t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e,n){var i=n(2),r=n(11),a={"Content-Type":"application/x-www-form-urlencoded"};function o(t,e){!i.isUndefined(t)&&i.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var s,l={adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(s=n(12)),s),transformRequest:[function(t,e){return r(e,"Accept"),r(e,"Content-Type"),i.isFormData(t)||i.isArrayBuffer(t)||i.isBuffer(t)||i.isStream(t)||i.isFile(t)||i.isBlob(t)?t:i.isArrayBufferView(t)?t.buffer:i.isURLSearchParams(t)?(o(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):i.isObject(t)?(o(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};i.forEach(["delete","get","head"],(function(t){l.headers[t]={}})),i.forEach(["post","put","patch"],(function(t){l.headers[t]=i.merge(a)})),t.exports=l},function(t,e,n){var i=n(2);t.exports=function(t,e){i.forEach(t,(function(n,i){i!==e&&i.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[i])}))}},function(t,e,n){var i=n(2),r=n(13),a=n(5),o=n(16),s=n(19),l=n(20),u=n(14);t.exports=function(t){return new Promise((function(e,h){var c=t.data,d=t.headers;i.isFormData(c)&&delete d["Content-Type"];var f=new XMLHttpRequest;if(t.auth){var p=t.auth.username||"",g=t.auth.password||"";d.Authorization="Basic "+btoa(p+":"+g)}var v=o(t.baseURL,t.url);if(f.open(t.method.toUpperCase(),a(v,t.params,t.paramsSerializer),!0),f.timeout=t.timeout,f.onreadystatechange=function(){if(f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in f?s(f.getAllResponseHeaders()):null,i={data:t.responseType&&"text"!==t.responseType?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:n,config:t,request:f};r(e,h,i),f=null}},f.onabort=function(){f&&(h(u("Request aborted",t,"ECONNABORTED",f)),f=null)},f.onerror=function(){h(u("Network Error",t,null,f)),f=null},f.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),h(u(e,t,"ECONNABORTED",f)),f=null},i.isStandardBrowserEnv()){var m=n(21),y=(t.withCredentials||l(v))&&t.xsrfCookieName?m.read(t.xsrfCookieName):void 0;y&&(d[t.xsrfHeaderName]=y)}if("setRequestHeader"in f&&i.forEach(d,(function(t,e){void 0===c&&"content-type"===e.toLowerCase()?delete d[e]:f.setRequestHeader(e,t)})),i.isUndefined(t.withCredentials)||(f.withCredentials=!!t.withCredentials),t.responseType)try{f.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&f.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){f&&(f.abort(),h(t),f=null)})),void 0===c&&(c=null),f.send(c)}))}},function(t,e,n){var i=n(14);t.exports=function(t,e,n){var r=n.config.validateStatus;!r||r(n.status)?t(n):e(i("Request failed with status code "+n.status,n.config,null,n.request,n))}},function(t,e,n){var i=n(15);t.exports=function(t,e,n,r,a){var o=new Error(t);return i(o,e,n,r,a)}},function(t,e){t.exports=function(t,e,n,i,r){return t.config=e,n&&(t.code=n),t.request=i,t.response=r,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t}},function(t,e,n){var i=n(17),r=n(18);t.exports=function(t,e){return t&&!i(e)?r(t,e):e}},function(t,e){t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e){t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,n){var i=n(2),r=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,a,o={};return t?(i.forEach(t.split("\n"),(function(t){if(a=t.indexOf(":"),e=i.trim(t.substr(0,a)).toLowerCase(),n=i.trim(t.substr(a+1)),e){if(o[e]&&r.indexOf(e)>=0)return;o[e]="set-cookie"===e?(o[e]?o[e]:[]).concat([n]):o[e]?o[e]+", "+n:n}})),o):o}},function(t,e,n){var i=n(2);t.exports=i.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(t){var i=t;return e&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=r(window.location.href),function(e){var n=i.isString(e)?r(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},function(t,e,n){var i=n(2);t.exports=i.isStandardBrowserEnv()?{write:function(t,e,n,r,a,o){var s=[];s.push(t+"="+encodeURIComponent(e)),i.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),i.isString(r)&&s.push("path="+r),i.isString(a)&&s.push("domain="+a),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(t,e,n){var i=n(2);t.exports=function(t,e){e=e||{};var n={},r=["url","method","params","data"],a=["headers","auth","proxy"],o=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];i.forEach(r,(function(t){void 0!==e[t]&&(n[t]=e[t])})),i.forEach(a,(function(r){i.isObject(e[r])?n[r]=i.deepMerge(t[r],e[r]):void 0!==e[r]?n[r]=e[r]:i.isObject(t[r])?n[r]=i.deepMerge(t[r]):void 0!==t[r]&&(n[r]=t[r])})),i.forEach(o,(function(i){void 0!==e[i]?n[i]=e[i]:void 0!==t[i]&&(n[i]=t[i])}));var s=r.concat(a).concat(o),l=Object.keys(e).filter((function(t){return-1===s.indexOf(t)}));return i.forEach(l,(function(i){void 0!==e[i]?n[i]=e[i]:void 0!==t[i]&&(n[i]=t[i])})),n}},function(t,e){function n(t){this.message=t}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,t.exports=n},function(t,e,n){var i=n(23);function r(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var n=this;t((function(t){n.reason||(n.reason=new i(t),e(n.reason))}))}r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var t;return{token:new r((function(e){t=e})),cancel:t}},t.exports=r},function(t,e){t.exports=function(t){return function(e){return t.apply(null,e)}}}])},t.exports=n()}));let DS=class extends s.Component{constructor(t){super(t),this.chartRef=s.createRef(),this.padding="7vh 2vh 2vh",this.renderChart=()=>u(this,void 0,void 0,(function*(){const{base_url:t,set_id_of_paper:e,set_id_of_patent:n,set_id_of_awards:i,deviceToken:r}=this.props.gpui.params;if(t&&e&&n&&i&&r){this.timer&&(clearTimeout(this.timer),this.timer=null);try{const a=[{itemColor:"#4297F8",labelColor:"#FFFFFF"},{itemColor:"#76F7F6",labelColor:"#1D4A31"},{itemColor:"#FFCA11",labelColor:"#1D4A31"}],o=[];yield Promise.all([kS.get(`${t}/set/data/${e}`,{headers:{"X-Gini-Token":r}}).then((t=>{t.data[0].data.filter((t=>["三大检索","核心刊物","核心期刊"].includes(t.group["名称"]))).forEach(((t,e)=>{o.push(Object.assign({barMinHeight:15,name:t.group["名称"],type:"bar",stack:1,data:[{value:t.data["标识"],unit:"篇"},null,null],itemStyle:{normal:{color:a[e].itemColor}},label:{normal:{show:!0,formatter:({seriesName:t})=>`${t}`,color:a[e].labelColor}}}))}))})),kS.get(`${t}/set/data/${n}`,{headers:{"X-Gini-Token":r}}).then((t=>{t.data[0].data.filter((t=>["教师专利","学生专利"].includes(t.group["名称"]))).forEach(((t,e)=>{o.push({barMinHeight:15,name:t.group["名称"],type:"bar",stack:1,data:[null,{value:t.data["标识"],unit:"个"},null],itemStyle:{normal:{color:a[e].itemColor}},label:{normal:{show:!0,formatter:({seriesName:t})=>`${t}`,color:a[e].labelColor}}})}))})),kS.get(`${t}/set/data/${i}`,{headers:{"X-Gini-Token":r}}).then((t=>{t.data[0].data.filter((t=>["国家级","省部级"].includes(t.group["名称"]))).forEach(((t,e)=>{o.push({barMinHeight:15,name:t.group["名称"],type:"bar",stack:1,data:[null,null,{value:t.data["标识"],unit:"个"}],itemStyle:{normal:{color:a[e].itemColor}},label:{normal:{show:!0,formatter:({seriesName:t})=>`${t}`,color:a[e].labelColor}}})}))}))]),this.chart.setOption(this.generateChartOption(o),{notMerge:!0})}catch(t){console.error("@components:wall-iharbour/analysis-of-startup-use: 组件渲染时发生错误",t)}this.props.gpui.params.interval>0&&(this.timer=setTimeout(this.renderChart,this.props.gpui.params.interval))}})),this.generateChartOption=t=>({tooltip:{show:!0,formatter:({seriesName:t,name:e,data:n})=>`${e}<br/>${t}: ${n.value} ${n.unit}`},xAxis:[{type:"category",data:["论文","专利","获奖"],axisLine:{show:!0,lineStyle:{color:"#2B3873"}},axisTick:{show:!1},axisLabel:{show:!0,color:"#CDE0FC"}}],yAxis:[{type:"value",axisLine:{show:!1},axisTick:{show:!1},boundaryGap:["0","50%"],splitLine:{show:!0,lineStyle:{color:"#2B3873",type:"dotted"}},axisLabel:{show:!0,color:"#CDE0FC"}}],series:t}),n.reaction((()=>t.gpui.params.padding),(t=>{this.padding=t||"7vh 2vh 2vh"}),{fireImmediately:!0})}componentDidMount(){this.chart=this.chart||M_.init(this.chartRef.current),window.addEventListener("resize",(()=>{this.chart.resize()})),n.reaction((()=>({baseURL:this.props.gpui.params.base_url,setIdOfPaper:this.props.gpui.params.set_id_of_paper,setIdOfPatent:this.props.gpui.params.set_id_of_patent,setIdOfAwards:this.props.gpui.params.set_id_of_awards,deviceToken:this.props.gpui.params.deviceToken,interval:this.props.gpui.params.interval})),(()=>{this.renderChart()}),{fireImmediately:!0})}render(){return s.createElement("div",{className:"g__index",style:{padding:this.padding}},s.createElement("div",{className:h},s.createElement("div",{ref:this.chartRef,className:c})))}};return l([n.observable],DS.prototype,"padding",void 0),DS=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(C,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)?U(t):S(t)}],DS),DS}));
