define(["gpui-style-inject","react","mobx"],(function(t,e,i){"use strict";function n(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(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,n.get?n:{enumerable:!0,get:function(){return t[i]}})}})),e.default=t,Object.freeze(e)}var a=n(t),o=n(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,i,n){var r,a=arguments.length,o=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(o=(a<3?r(o):a>3?r(e,i,o):r(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o}a.default("html, body, #root {\n  width: 100%;\n  height: 100%;\n  margin: 0;\n  padding: 0;\n  overflow: hidden; }\n\n.g__index {\n  position: relative;\n  box-sizing: border-box;\n  width: 100%;\n  height: 100%; }\n");var u="index-module_main__3A4nU",h="index-module_chart__Cp-B-";if(a.default(".index-module_main__3A4nU {\n  position: relative;\n  width: 100%;\n  height: 100%; }\n  .index-module_main__3A4nU .index-module_chart__Cp-B- {\n    width: 100%;\n    height: 100%; }\n"),!e.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!i.spy)throw new Error("mobx-react-lite requires mobx at least version 4 to be available");function c(){return c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},c.apply(this,arguments)}function d(){var t=e.useState(0)[1];return e.useCallback((function(){t((function(t){return t+1}))}),[])}function f(t){return i.getDependencyTree(t)}var p,g=1e4,m=new Set;function v(){void 0===p&&(p=setTimeout(y,1e4))}function y(){p=void 0;var t=Date.now();m.forEach((function(e){var i=e.current;i&&t>=i.cleanAt&&(i.reaction.dispose(),e.current=null,m.delete(e))})),m.size>0&&v()}var _={};function x(t){return"observer"+t}function b(t,e,n){void 0===e&&(e="observed"),void 0===n&&(n=_);var r,a=(n.useForceUpdate||d)(),s=o.default.useRef(null);if(!s.current){var l=new i.Reaction(x(e),(function(){u.mounted?a():(l.dispose(),s.current=null)})),u=function(t){return{cleanAt:Date.now()+g,reaction:t}}(l);s.current=u,r=s,m.add(r),v()}var h,c,p=s.current.reaction;if(o.default.useDebugValue(p,f),o.default.useEffect((function(){var t;return t=s,m.delete(t),s.current?s.current.mounted=!0:(s.current={reaction:new i.Reaction(x(e),(function(){a()})),cleanAt:1/0},a()),function(){s.current.reaction.dispose(),s.current=null}}),[]),p.track((function(){try{h=t()}catch(t){c=t}})),c)throw c;return h}function w(t,i){var n,r=c({forwardRef:!1},i),a=t.displayName||t.name,o=function(e,i){return b((function(){return t(e,i)}),a)};return o.displayName=a,n=r.forwardRef?e.memo(e.forwardRef(o)):e.memo(o),function(t,e){Object.keys(t).forEach((function(i){S[i]||Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))}))}(t,n),n.displayName=a,n}var S={$$typeof:!0,render:!0,compare:!0,type:!0};function T(t){var e=t.children,i=t.render,n=e||i;return"function"!=typeof n?null:b(n)}function M(t,e,i,n,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`"+i):o||s?null:new Error("Invalid prop `"+r+"` of type `"+typeof t[e]+"` supplied to `"+i+"`, expected `function`.")}T.propTypes={children:M,render:M},T.displayName="Observer";var C=0;var I={};function A(t){return I[t]||(I[t]=function(t){if("function"==typeof Symbol)return Symbol(t);var e="__$mobx-react "+t+" ("+C+")";return C++,e}(t)),I[t]}function D(t,e){if(k(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var i=Object.keys(t),n=Object.keys(e);if(i.length!==n.length)return!1;for(var r=0;r<i.length;r++)if(!Object.hasOwnProperty.call(e,i[r])||!k(t[i[r]],e[i[r]]))return!1;return!0}function k(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function O(t,e,i){Object.hasOwnProperty.call(t,e)?t[e]=i:Object.defineProperty(t,e,{enumerable:!1,configurable:!0,writable:!0,value:i})}var P=A("patchMixins"),L=A("patchedDefinition");function R(t,e){for(var i=this,n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;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(i,r)}))}}function E(t,e){return function(){for(var i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];R.call.apply(R,[this,t,e].concat(n))}}function B(t,e,i){var n=function(t,e){var i=t[P]=t[P]||{},n=i[e]=i[e]||{};return n.locks=n.locks||0,n.methods=n.methods||[],n}(t,e);n.methods.indexOf(i)<0&&n.methods.push(i);var r=Object.getOwnPropertyDescriptor(t,e);if(!r||!r[L]){var a=t[e],o=z(t,e,r?r.enumerable:void 0,n,a);Object.defineProperty(t,e,o)}}function z(t,e,i,n,r){var a,o=E(r,n);return(a={})[L]=!0,a.get=function(){return o},a.set=function(r){if(this===t)o=E(r,n);else{var a=z(this,e,i,n,r);Object.defineProperty(this,e,a)}},a.configurable=!0,a.enumerable=i,a}var N=i.$mobx||"$mobx",F=A("isUnmounted"),H=A("skipRender"),V=A("isForcingUpdate");function W(t){var i=t.prototype;if(i.componentWillReact)throw new Error("The componentWillReact life-cycle event is no longer supported");if(t.__proto__!==e.PureComponent)if(i.shouldComponentUpdate){if(i.shouldComponentUpdate!==U)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}else i.shouldComponentUpdate=U;j(i,"props"),j(i,"state");var n=i.render;return i.render=function(){return G.call(this,n)},B(i,"componentWillUnmount",(function(){this.render[N]&&this.render[N].dispose(),this[F]=!0})),t}function G(t){var n=this;O(this,H,!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 i.Reaction(a+".render()",(function(){if(!s&&(s=!0,!0!==n[F])){var t=!0;try{O(n,V,!0),n[H]||e.Component.prototype.forceUpdate.call(n),t=!1}finally{O(n,V,!1),t&&l.dispose()}}}));function u(){s=!1;var t=void 0,e=void 0;if(l.track((function(){try{e=i._allowStateChanges(!1,o)}catch(e){t=e}})),t)throw t;return e}return l.reactComponent=this,u[N]=l,this.render=u,u.call(this)}function U(t,e){return this.state!==e||!D(this.props,t)}function j(t,e){var n=A("reactProp_"+e+"_valueHolder"),r=A("reactProp_"+e+"_atomHolder");function a(){return this[r]||O(this,r,i.createAtom("reactive "+e)),this[r]}Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get:function(){var t=!1;return i._allowStateReadsStart&&i._allowStateReadsEnd&&(t=i._allowStateReadsStart(!0)),a.call(this).reportObserved(),i._allowStateReadsStart&&i._allowStateReadsEnd&&i._allowStateReadsEnd(t),this[n]},set:function(t){this[V]||D(this[n],t)?O(this,n,t):(O(this,n,t),O(this,H,!0),a.call(this).reportChanged(),O(this,H,!1))}})}var Y="function"==typeof Symbol&&Symbol.for,X=Y?Symbol.for("react.forward_ref"):"function"==typeof e.forwardRef&&e.forwardRef((function(t){return null})).$$typeof,q=Y?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(!i.observable)throw new Error("mobx-react requires mobx to be available");var Z="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};"undefined"!=typeof window||void 0!==Z&&Z.__DEV__;var $=2311;var K=function(){return $++};var Q="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:function(t){var e={},i={},n=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);n&&(i.firefox=!0,i.version=n[1]);r&&(i.ie=!0,i.version=r[1]);a&&(i.edge=!0,i.version=a[1]);o&&(i.weChat=!0);return{browser:i,os:e,node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!i.ie&&!i.edge,pointerEventsSupported:"onpointerdown"in window&&(i.edge||i.ie&&i.version>=11),domSupported:"undefined"!=typeof document}}(navigator.userAgent),J={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},tt={"[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},et=Object.prototype.toString,it=Array.prototype,nt=it.forEach,rt=it.filter,at=it.slice,ot=it.map,st=it.reduce,lt={};function ut(t){if(null==t||"object"!=typeof t)return t;var e=t,i=et.call(t);if("[object Array]"===i){if(!bt(t)){e=[];for(var n=0,r=t.length;n<r;n++)e[n]=ut(t[n])}}else if(tt[i]){if(!bt(t)){var a=t.constructor;if(t.constructor.from)e=a.from(t);else{e=new a(t.length);for(n=0,r=t.length;n<r;n++)e[n]=ut(t[n])}}}else if(!J[i]&&!bt(t)&&!_t(t))for(var o in e={},t)t.hasOwnProperty(o)&&(e[o]=ut(t[o]));return e}function ht(t,e,i){if(!vt(e)||!vt(t))return i?ut(e):t;for(var n in e)if(e.hasOwnProperty(n)){var r=t[n],a=e[n];!vt(a)||!vt(r)||mt(a)||mt(r)||_t(a)||_t(r)||yt(a)||yt(r)||bt(a)||bt(r)?!i&&n in t||(t[n]=ut(e[n])):ht(r,a,i)}return t}function ct(t,e,i){for(var n in e)e.hasOwnProperty(n)&&(i?null!=e[n]:null==t[n])&&(t[n]=e[n]);return t}var dt,ft=function(){return lt.createCanvas()};function pt(t,e,i){if(t&&e)if(t.forEach&&t.forEach===nt)t.forEach(e,i);else if(t.length===+t.length)for(var n=0,r=t.length;n<r;n++)e.call(i,t[n],n,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(i,t[a],a,t)}function gt(t,e){var i=at.call(arguments,2);return function(){return t.apply(e,i.concat(at.call(arguments)))}}function mt(t){return"[object Array]"===et.call(t)}function vt(t){var e=typeof t;return"function"===e||!!t&&"object"===e}function yt(t){return!!J[et.call(t)]}function _t(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}lt.createCanvas=function(){return document.createElement("canvas")};var xt="__ec_primitive__";function bt(t){return t[xt]}function wt(t){var e=mt(t);this.data={};var i=this;function n(t,n){e?i.set(t,n):i.set(n,t)}t instanceof wt?t.each(n):t&&pt(t,n)}wt.prototype={constructor:wt,get:function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},set:function(t,e){return this.data[t]=e},each:function(t,e){for(var i in void 0!==e&&(t=gt(t,e)),this.data)this.data.hasOwnProperty(i)&&t(this.data[i],i)},removeKey:function(t){delete this.data[t]}};var St=function(t,e){"createCanvas"===t&&(dt=null),lt[t]=e},Tt=function(t,e){for(var i=t[0],n=1,r=t.length;n<r;n++)i=ht(i,t[n],e);return i},Mt=function(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var i=0,n=t.length;i<n;i++)if(t[i]===e)return i}return-1},Ct=function(t,e){var i=t.prototype;function n(){}for(var r in n.prototype=e.prototype,t.prototype=new n,i)i.hasOwnProperty(r)&&(t.prototype[r]=i[r]);t.prototype.constructor=t,t.superClass=e},It=function(t){if(t)return"string"!=typeof t&&"number"==typeof t.length},At=function(t,e,i){if(t&&e){if(t.map&&t.map===ot)return t.map(e,i);for(var n=[],r=0,a=t.length;r<a;r++)n.push(e.call(i,t[r],r,t));return n}},Dt=function(t,e,i,n){if(t&&e){if(t.reduce&&t.reduce===st)return t.reduce(e,i,n);for(var r=0,a=t.length;r<a;r++)i=e.call(n,i,t[r],r,t);return i}},kt=function(t,e,i){if(t&&e){if(t.filter&&t.filter===rt)return t.filter(e,i);for(var n=[],r=0,a=t.length;r<a;r++)e.call(i,t[r],r,t)&&n.push(t[r]);return n}},Ot=function(t,e,i){if(t&&e)for(var n=0,r=t.length;n<r;n++)if(e.call(i,t[n],n,t))return t[n]},Pt=function(t){var e=at.call(arguments,1);return function(){return t.apply(this,e.concat(at.call(arguments)))}},Lt=function(t){for(var e=0,i=arguments.length;e<i;e++)if(null!=arguments[e])return arguments[e]},Rt=function(){return Function.call.apply(at,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 i=new t.constructor(t.length+e.length),n=0;n<t.length;n++)i[n]=t[n];var r=t.length;for(n=0;n<e.length;n++)i[n+r]=e[n];return i},zt={$override:St,clone:ut,merge:ht,mergeAll:Tt,extend:function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t},defaults:ct,createCanvas:ft,getContext:function(){return dt||(dt=ft().getContext("2d")),dt},indexOf:Mt,inherits:Ct,mixin:function(t,e,i){ct(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,i)},isArrayLike:It,each:pt,map:At,reduce:Dt,filter:kt,find:Ot,bind:gt,curry:Pt,isArray:mt,isFunction:function(t){return"function"==typeof t},isString:function(t){return"[object String]"===et.call(t)},isObject:vt,isBuiltInObject:yt,isTypedArray:function(t){return!!tt[et.call(t)]},isDom:_t,eqNaN:function(t){return t!=t},retrieve:Lt,retrieve2:function(t,e){return null!=t?t:e},retrieve3:function(t,e,i){return null!=t?t:null!=e?e:i},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[xt]=!0},isPrimitive:bt,createHashMap:function(t){return new wt(t)},concatArray:Bt,noop:function(){}},Nt="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 Vt(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function Wt(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var Gt=function(t,e){var i=new Nt(2);return null==t&&(t=0),null==e&&(e=0),i[0]=t,i[1]=e,i},Ut=function(t,e){return t[0]=e[0],t[1]=e[1],t},jt=function(t){var e=new Nt(2);return e[0]=t[0],e[1]=t[1],e},Yt=function(t,e,i){return t[0]=e,t[1]=i,t},Xt=function(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t},qt=function(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t},Zt=function(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t},$t=function(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t},Kt=function(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t},Qt=function(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t},Jt=function(t,e){var i=Ft(e);return 0===i?(t[0]=0,t[1]=0):(t[0]=e[0]/i,t[1]=e[1]/i),t},te=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},ee=function(t,e,i,n){return t[0]=e[0]+n*(i[0]-e[0]),t[1]=e[1]+n*(i[1]-e[1]),t},ie=function(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[2]*r+i[4],t[1]=i[1]*n+i[3]*r+i[5],t},ne=function(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t},re=function(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t},ae={create:Gt,copy:Ut,clone:jt,set:Yt,add:Xt,scaleAndAdd:qt,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:Qt,normalize:Jt,distance:Vt,dist:Vt,distanceSquare:Wt,distSquare:Wt,negate:te,lerp:ee,applyTransform:ie,min:ne,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 i=t.offsetX,n=t.offsetY,r=i-this._x,a=n-this._y;this._x=i,this._y=n,e.drift(r,a,t),this.dispatchToElement(se(e,t),"drag",t.event);var o=this.findHover(i,n,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,i,n,r,a){var o=t._$handlers;if("function"==typeof i&&(r=n,n=i,i=null),!n||!e)return t;i=function(t,e){var i=t._$eventProcessor;return null!=e&&i&&i.normalizeQuery&&(e=i.normalizeQuery(e)),e}(t,i),o[e]||(o[e]=[]);for(var s=0;s<o[e].length;s++)if(o[e][s].h===n)return t;var l={h:n,one:a,query:i,ctx:r||t,callAtLast:n.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,i,n){return ce(this,t,e,i,n,!0)},on:function(t,e,i,n){return ce(this,t,e,i,n,!1)},isSilent:function(t){var e=this._$handlers;return!e[t]||!e[t].length},off:function(t,e){var i=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(i[t]){for(var n=[],r=0,a=i[t].length;r<a;r++)i[t][r].h!==e&&n.push(i[t][r]);i[t]=n}i[t]&&0===i[t].length&&delete i[t]}else delete i[t];return this},trigger:function(t){var e=this._$handlers[t],i=this._$eventProcessor;if(e){var n=arguments,r=n.length;r>3&&(n=ue.call(n,1));for(var a=e.length,o=0;o<a;){var s=e[o];if(i&&i.filter&&null!=s.query&&!i.filter(t,s.query))o++;else{switch(r){case 1:s.h.call(s.ctx);break;case 2:s.h.call(s.ctx,n[1]);break;case 3:s.h.call(s.ctx,n[1],n[2]);break;default:s.h.apply(s.ctx,n)}s.one?(e.splice(o,1),a--):o++}}}return i&&i.afterTrigger&&i.afterTrigger(t),this},triggerWithContext:function(t){var e=this._$handlers[t],i=this._$eventProcessor;if(e){var n=arguments,r=n.length;r>4&&(n=ue.call(n,1,n.length-1));for(var a=n[n.length-1],o=e.length,s=0;s<o;){var l=e[s];if(i&&i.filter&&null!=l.query&&!i.filter(t,l.query))s++;else{switch(r){case 1:l.h.call(a);break;case 2:l.h.call(a,n[1]);break;case 3:l.h.call(a,n[1],n[2]);break;default:l.h.apply(a,n)}l.one?(e.splice(s,1),o--):s++}}}return i&&i.afterTrigger&&i.afterTrigger(t),this}};var de=he,fe=Math.log(2);function pe(t,e,i,n,r,a){var o=n+"-"+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[i][l]}for(var u=n|1<<i,h=i+1;n&1<<h;)h++;for(var c=0,d=0,f=0;d<s;d++){var p=1<<d;p&r||(c+=(f%2?-1:1)*t[i][d]*pe(t,e-1,h,u,r|p,a),f++)}return a[o]=c,c}var ge=function(t,e){var i=[[t[0],t[1],1,0,0,0,-e[0]*t[0],-e[0]*t[1]],[0,0,0,t[0],t[1],1,-e[1]*t[0],-e[1]*t[1]],[t[2],t[3],1,0,0,0,-e[2]*t[2],-e[2]*t[3]],[0,0,0,t[2],t[3],1,-e[3]*t[2],-e[3]*t[3]],[t[4],t[5],1,0,0,0,-e[4]*t[4],-e[4]*t[5]],[0,0,0,t[4],t[5],1,-e[5]*t[4],-e[5]*t[5]],[t[6],t[7],1,0,0,0,-e[6]*t[6],-e[6]*t[7]],[0,0,0,t[6],t[7],1,-e[7]*t[6],-e[7]*t[7]]],n={},r=pe(i,8,0,0,0,n);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(i,7,0===o?1:0,1<<o,1<<s,n)/r*e[o];return function(t,e,i){var n=e*a[6]+i*a[7]+1;t[0]=(e*a[0]+i*a[1]+a[2])/n,t[1]=(e*a[3]+i*a[4]+a[5])/n}}},me={buildTransformer:ge}.buildTransformer,ve="___zrEVENTSAVED",ye=[];function _e(t,e,i,n,r){if(e.getBoundingClientRect&&Q.domSupported&&!xe(e)){var a=e[ve]||(e[ve]={}),o=function(t,e){var i=e.markers;if(i)return i;i=e.markers=[];for(var n=["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",n[s]+":0",r[l]+":0",n[1-s]+":auto",r[1-l]+":auto",""].join("!important;"),t.appendChild(o),i.push(o)}return i}(e,a),s=function(t,e,i){for(var n=i?"invTrans":"trans",r=e[n],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[n]=i?me(l,s):me(s,l))}(o,a,r);if(s)return s(t,i,n),!0}return!1}function xe(t){return"CANVAS"===t.nodeName.toUpperCase()}var be=function(t,e,i,n,r){return _e(ye,e,n,r,!0)&&_e(t,i,ye[0],ye[1])},we={transformLocalCoord:be,transformCoordWithViewport:_e,isCanvasEl:xe},Se=de,Te=we.isCanvasEl,Me=we.transformCoordWithViewport,Ce="undefined"!=typeof window&&!!window.addEventListener,Ie=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ae=[];function De(t,e,i,n){return i=i||{},n||!Q.canvasSupported?ke(t,e,i):Q.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(i.zrX=e.layerX,i.zrY=e.layerY):null!=e.offsetX?(i.zrX=e.offsetX,i.zrY=e.offsetY):ke(t,e,i),i}function ke(t,e,i){if(Q.domSupported&&t.getBoundingClientRect){var n=e.clientX,r=e.clientY;if(Te(t)){var a=t.getBoundingClientRect();return i.zrX=n-a.left,void(i.zrY=r-a.top)}if(Me(Ae,t,n,r))return i.zrX=Ae[0],void(i.zrY=Ae[1])}i.zrX=i.zrY=0}function Oe(t){return t||window.event}var Pe={Dispatcher:Se,clientToLocal:De,getNativeEvent:Oe,normalizeEvent:function(t,e,i){if(null!=(e=Oe(e)).zrX)return e;var n=e.type;if(n&&n.indexOf("touch")>=0){var r="touchend"!==n?e.targetTouches[0]:e.changedTouches[0];r&&De(t,r,e,i)}else De(t,e,e,i),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var a=e.button;return null==e.which&&void 0!==a&&Ie.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e},addEventListener:function(t,e,i,n){Ce?t.addEventListener(e,i,n):t.attachEvent("on"+e,i)},removeEventListener:function(t,e,i,n){Ce?t.removeEventListener(e,i,n):t.detachEvent("on"+e,i)},stop:Ce?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],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}Le.prototype={constructor:Le,recognize:function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,i){var n=t.touches;if(n){for(var r={points:[],touches:[],target:e,event:t},a=0,o=n.length;a<o;a++){var s=n[a],l=Pe.clientToLocal(i,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 i=Ee[e](this._track,t);if(i)return i}}};var Ee={pinch:function(t,e){var i=t.length;if(i){var n,r=(t[i-1]||{}).points,a=(t[i-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=[((n=r)[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}},Be=Le,ze="silent";function Ne(){Pe.stop(this.event)}function Fe(){}Fe.prototype.dispose=function(){};var He=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Ve=function(t,e,i,n){de.call(this),this.storage=t,this.painter=e,this.painterRoot=n,i=i||new Fe,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,le.call(this),this.setHandlerProxy(i)};function We(t,e,i){if(t[t.rectHover?"rectContain":"contain"](e,i)){for(var n,r=t;r;){if(r.clipPath&&!r.clipPath.contain(e,i))return!1;r.silent&&(n=!0),r=r.parent}return!n||ze}return!1}function Ge(t,e,i){var n=t.painter;return e<0||e>n.getWidth()||i<0||i>n.getHeight()}Ve.prototype={constructor:Ve,setHandlerProxy:function(t){this.proxy&&this.proxy.dispose(),t&&(zt.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,i=t.zrY,n=Ge(this,e,i),r=this._hovered,a=r.target;a&&!a.__zr&&(a=(r=this.findHover(r.x,r.y)).target);var o=this._hovered=n?{x:e,y:i}:this.findHover(e,i),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,i=t.zrIsToLocalDOM;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&!i&&this.trigger("globalout",{type:"globalout",event:t})},resize:function(t){this._hovered={}},dispatch:function(t,e){var i=this[t];i&&i.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,i){var n=(t=t||{}).target;if(!n||!n.silent){for(var r="on"+e,a=function(t,e,i){return{type:t,event:i,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:i.zrX,offsetY:i.zrY,gestureEvent:i.gestureEvent,pinchX:i.pinchX,pinchY:i.pinchY,pinchScale:i.pinchScale,wheelDelta:i.zrDelta,zrByTouch:i.zrByTouch,which:i.which,stop:Ne}}(e,t,i);n&&(n[r]&&(a.cancelBubble=n[r].call(n,a)),n.trigger(e,a),n=n.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(e,a),this.painter&&this.painter.eachOtherLayer((function(t){"function"==typeof t[r]&&t[r].call(t,a),t.trigger&&t.trigger(e,a)})))}},findHover:function(t,e,i){for(var n=this.storage.getDisplayList(),r={x:t,y:e},a=n.length-1;a>=0;a--){var o;if(n[a]!==i&&!n[a].ignore&&(o=We(n[a],t,e))&&(!r.topTarget&&(r.topTarget=n[a]),o!==ze)){r.target=n[a];break}}return r},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new Be);var i=this._gestureMgr;"start"===e&&i.clear();var n=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&i.clear(),n){var r=n.type;t.gestureEvent=r,this.dispatchToElement({target:n.target},r,n.event)}}},zt.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){Ve.prototype[t]=function(e){var i,n,r=e.zrX,a=e.zrY,o=Ge(this,r,a);if("mouseup"===t&&o||(n=(i=this.findHover(r,a)).target),"mousedown"===t)this._downEl=n,this._downPoint=[e.zrX,e.zrY],this._upEl=n;else if("mouseup"===t)this._upEl=n;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||ae.dist(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,e)}})),zt.mixin(Ve,de),zt.mixin(Ve,le);var Ue=Ve,je="undefined"==typeof Float32Array?Array:Float32Array;function Ye(){var t=new je(6);return Xe(t),t}function Xe(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function qe(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,i){var n=e[0]*i[0]+e[2]*i[1],r=e[1]*i[0]+e[3]*i[1],a=e[0]*i[2]+e[2]*i[3],o=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],l=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=n,t[1]=r,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t},$e=function(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t},Ke=function(t,e,i){var n=e[0],r=e[2],a=e[4],o=e[1],s=e[3],l=e[5],u=Math.sin(i),h=Math.cos(i);return t[0]=n*h+o*u,t[1]=-n*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},Qe=function(t,e,i){var n=i[0],r=i[1];return t[0]=e[0]*n,t[1]=e[1]*r,t[2]=e[2]*n,t[3]=e[3]*r,t[4]=e[4]*n,t[5]=e[5]*r,t},Je=function(t,e){var i=e[0],n=e[2],r=e[4],a=e[1],o=e[3],s=e[5],l=i*o-a*n;return l?(l=1/l,t[0]=o*l,t[1]=-a*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-o*r)*l,t[5]=(a*r-i*s)*l,t):null},ti={create:Ye,identity:Xe,copy:qe,mul:Ze,translate:$e,rotate:Ke,scale:Qe,invert:Je,clone:function(t){var e=Ye();return qe(e,t),e}},ei=ti.identity,ii=5e-5;function ni(t){return t>ii||t<-5e-5}var ri=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},ai=ri.prototype;ai.transform=null,ai.needLocalTransform=function(){return ni(this.rotation)||ni(this.position[0])||ni(this.position[1])||ni(this.scale[0]-1)||ni(this.scale[1]-1)};var oi=[];ai.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),n=this.transform;if(i||e){n=n||ti.create(),i?this.getLocalTransform(n):ei(n),e&&(i?ti.mul(n,t.transform,n):ti.copy(n,t.transform)),this.transform=n;var r=this.globalScaleRatio;if(null!=r&&1!==r){this.getGlobalScale(oi);var a=oi[0]<0?-1:1,o=oi[1]<0?-1:1,s=((oi[0]-a)*r+a)/oi[0]||0,l=((oi[1]-o)*r+o)/oi[1]||0;n[0]*=s,n[1]*=s,n[2]*=l,n[3]*=l}this.invTransform=this.invTransform||ti.create(),ti.invert(this.invTransform,n)}else n&&ei(n)},ai.getLocalTransform=function(t){return ri.getLocalTransform(this,t)},ai.setTransform=function(t){var e=this.transform,i=t.dpr||1;e?t.setTransform(i*e[0],i*e[1],i*e[2],i*e[3],i*e[4],i*e[5]):t.setTransform(i,0,0,i,0,0)},ai.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var si=[],li=ti.create();ai.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],n=this.position,r=this.scale;ni(e-1)&&(e=Math.sqrt(e)),ni(i-1)&&(i=Math.sqrt(i)),t[0]<0&&(e=-e),t[3]<0&&(i=-i),n[0]=t[4],n[1]=t[5],r[0]=e,r[1]=i,this.rotation=Math.atan2(-t[1]/i,t[0]/e)}},ai.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(ti.mul(si,t.invTransform,e),e=si);var i=this.origin;i&&(i[0]||i[1])&&(li[4]=i[0],li[5]=i[1],ti.mul(si,e,li),si[4]-=i[0],si[5]-=i[1],e=si),this.setLocalTransform(e)}},ai.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)},ai.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&ae.applyTransform(i,i,n),i},ai.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&ae.applyTransform(i,i,n),i},ri.getLocalTransform=function(t,e){ei(e=e||[]);var i=t.origin,n=t.scale||[1,1],r=t.rotation||0,a=t.position||[0,0];return i&&(e[4]-=i[0],e[5]-=i[1]),ti.scale(e,e,n),r&&ti.rotate(e,e,r),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=a[0],e[5]+=a[1],e};var ui=ri,hi={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=n*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.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-hi.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*hi.bounceIn(2*t):.5*hi.bounceOut(2*t-1)+.5}},ci=hi;function di(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}di.prototype={constructor:di,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)this._pausedTime+=e;else{var i=(t-this._startTime-this._pausedTime)/this._life;if(!(i<0)){i=Math.min(i,1);var n=this.easing,r="string"==typeof n?ci[n]:n,a="function"==typeof r?r(i):i;return this.fire("frame",a),1===i?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 fi=di,pi=function(){this.head=null,this.tail=null,this._len=0},gi=pi.prototype;gi.insert=function(t){var e=new mi(t);return this.insertEntry(e),e},gi.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++},gi.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},gi.len=function(){return this._len},gi.clear=function(){this.head=this.tail=null,this._len=0};var mi=function(t){this.value=t,this.next,this.prev},vi=function(t){this._list=new pi,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},yi=vi.prototype;yi.put=function(t,e){var i=this._list,n=this._map,r=null;if(null==n[t]){var a=i.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=i.head;i.remove(s),delete n[s.key],r=s.value,this._lastRemovedEntry=s}o?o.value=e:o=new mi(e),o.key=t,i.insertEntry(o),n[t]=o}return r},yi.get=function(t){var e=this._map[t],i=this._list;if(null!=e)return e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value},yi.clear=function(){this._list.clear(),this._map={}};var _i=vi,xi={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 bi(t){return(t=Math.round(t))<0?0:t>255?255:t}function wi(t){return t<0?0:t>1?1:t}function Si(t){return t.length&&"%"===t.charAt(t.length-1)?bi(parseFloat(t)/100*255):bi(parseInt(t,10))}function Ti(t){return t.length&&"%"===t.charAt(t.length-1)?wi(parseFloat(t)/100):wi(parseFloat(t))}function Mi(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}function Ci(t,e,i){return t+(e-t)*i}function Ii(t,e,i,n,r){return t[0]=e,t[1]=i,t[2]=n,t[3]=r,t}function Ai(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var Di=new _i(20),ki=null;function Oi(t,e){ki&&Ai(ki,e),ki=Di.put(t,ki||e.slice())}function Pi(t,e){if(t){e=e||[];var i=Di.get(t);if(i)return Ai(e,i);var n,r=(t+="").replace(/ /g,"").toLowerCase();if(r in xi)return Ai(e,xi[r]),Oi(t,e),e;if("#"===r.charAt(0))return 4===r.length?(n=parseInt(r.substr(1),16))>=0&&n<=4095?(Ii(e,(3840&n)>>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,1),Oi(t,e),e):void Ii(e,0,0,0,1):7===r.length?(n=parseInt(r.substr(1),16))>=0&&n<=16777215?(Ii(e,(16711680&n)>>16,(65280&n)>>8,255&n,1),Oi(t,e),e):void Ii(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 Ii(e,0,0,0,1);u=Ti(l.pop());case"rgb":return 3!==l.length?void Ii(e,0,0,0,1):(Ii(e,Si(l[0]),Si(l[1]),Si(l[2]),u),Oi(t,e),e);case"hsla":return 4!==l.length?void Ii(e,0,0,0,1):(l[3]=Ti(l[3]),Li(l,e),Oi(t,e),e);case"hsl":return 3!==l.length?void Ii(e,0,0,0,1):(Li(l,e),Oi(t,e),e);default:return}}Ii(e,0,0,0,1)}}function Li(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=Ti(t[1]),r=Ti(t[2]),a=r<=.5?r*(n+1):r+n-r*n,o=2*r-a;return Ii(e=e||[],bi(255*Mi(o,a,i+1/3)),bi(255*Mi(o,a,i)),bi(255*Mi(o,a,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Ri(t,e,i){if(e&&e.length&&t>=0&&t<=1){i=i||[];var n=t*(e.length-1),r=Math.floor(n),a=Math.ceil(n),o=e[r],s=e[a],l=n-r;return i[0]=bi(Ci(o[0],s[0],l)),i[1]=bi(Ci(o[1],s[1],l)),i[2]=bi(Ci(o[2],s[2],l)),i[3]=wi(Ci(o[3],s[3],l)),i}}function Ei(t,e,i){if(e&&e.length&&t>=0&&t<=1){var n=t*(e.length-1),r=Math.floor(n),a=Math.ceil(n),o=Pi(e[r]),s=Pi(e[a]),l=n-r,u=Bi([bi(Ci(o[0],s[0],l)),bi(Ci(o[1],s[1],l)),bi(Ci(o[2],s[2],l)),wi(Ci(o[3],s[3],l))],"rgba");return i?{color:u,leftIndex:r,rightIndex:a,value:n}:u}}function Bi(t,e){if(t&&t.length){var i=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(i+=","+t[3]),e+"("+i+")"}}var zi=function(t,e){var i=Pi(t);if(i){for(var n=0;n<3;n++)i[n]=e<0?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0,i[n]>255?i[n]=255:t[n]<0&&(i[n]=0);return Bi(i,4===i.length?"rgba":"rgb")}},Ni=function(t){var e=Pi(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)},Fi=function(t,e,i,n){if(t=Pi(t))return t=function(t){if(t){var e,i,n=t[0]/255,r=t[1]/255,a=t[2]/255,o=Math.min(n,r,a),s=Math.max(n,r,a),l=s-o,u=(s+o)/2;if(0===l)e=0,i=0;else{i=u<.5?l/(s+o):l/(2-s-o);var h=((s-n)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-a)/6+l/2)/l;n===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,i,u];return null!=t[3]&&f.push(t[3]),f}}(t),null!=e&&(t[0]=function(t){return(t=Math.round(t))<0?0:t>360?360:t}(e)),null!=i&&(t[1]=Ti(i)),null!=n&&(t[2]=Ti(n)),Bi(Li(t),"rgba")},Hi=function(t,e){if((t=Pi(t))&&null!=e)return t[3]=wi(e),Bi(t,"rgba")},Vi={parse:Pi,lift:zi,toHex:Ni,fastLerp:Ri,fastMapToColor:Ri,lerp:Ei,mapToColor:Ei,modifyHSL:Fi,modifyAlpha:Hi,stringify:Bi},Wi=zt.isArrayLike,Gi=Array.prototype.slice;function Ui(t,e){return t[e]}function ji(t,e,i){t[e]=i}function Yi(t,e,i){return(e-t)*i+t}function Xi(t,e,i){return i>.5?e:t}function qi(t,e,i,n,r){var a=t.length;if(1===r)for(var o=0;o<a;o++)n[o]=Yi(t[o],e[o],i);else{var s=a&&t[0].length;for(o=0;o<a;o++)for(var l=0;l<s;l++)n[o][l]=Yi(t[o][l],e[o][l],i)}}function Zi(t,e,i){var n=t.length,r=e.length;if(n!==r)if(n>r)t.length=r;else for(var a=n;a<r;a++)t.push(1===i?e[a]:Gi.call(e[a]));var o=t[0]&&t[0].length;for(a=0;a<t.length;a++)if(1===i)isNaN(t[a])&&(t[a]=e[a]);else for(var s=0;s<o;s++)isNaN(t[a][s])&&(t[a][s]=e[a][s])}function $i(t,e,i){if(t===e)return!0;var n=t.length;if(n!==e.length)return!1;if(1===i){for(var r=0;r<n;r++)if(t[r]!==e[r])return!1}else{var a=t[0].length;for(r=0;r<n;r++)for(var o=0;o<a;o++)if(t[r][o]!==e[r][o])return!1}return!0}function Ki(t,e,i,n,r,a,o,s,l){var u=t.length;if(1===l)for(var h=0;h<u;h++)s[h]=Qi(t[h],e[h],i[h],n[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]=Qi(t[h][d],e[h][d],i[h][d],n[h][d],r,a,o)}}function Qi(t,e,i,n,r,a,o){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*o+(-3*(e-i)-2*s-l)*a+s*r+e}function Ji(t){if(Wi(t)){var e=t.length;if(Wi(t[0])){for(var i=[],n=0;n<e;n++)i.push(Gi.call(t[n]));return i}return Gi.call(t)}return t}function tn(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function en(t,e,i,n,r,a){var o=t._getter,s=t._setter,l="spline"===e,u=n.length;if(u){var h,c=n[0].value,d=Wi(c),f=!1,p=!1,g=d?function(t){var e=t[t.length-1].value;return Wi(e&&e[0])?2:1}(n):0;n.sort((function(t,e){return t.time-e.time})),h=n[u-1].time;for(var m=[],v=[],y=n[0].value,_=!0,x=0;x<u;x++){m.push(n[x].time/h);var b=n[x].value;if(d&&$i(b,y,g)||!d&&b===y||(_=!1),y=b,"string"==typeof b){var w=Vi.parse(b);w?(b=w,f=!0):p=!0}v.push(b)}if(a||!_){var S=v[u-1];for(x=0;x<u-1;x++)d?Zi(v[x],S,g):!isNaN(v[x])||isNaN(S)||p||f||(v[x]=S);d&&Zi(o(t._target,r),S,g);var T,M,C,I,A,D=0,k=0;if(f)var O=[0,0,0,0];var P=new fi({target:t._target,life:h,loop:t._loop,delay:t._delay,onframe:function(t,e){var i;if(e<0)i=0;else if(e<k){for(i=Math.min(D+1,u-1);i>=0&&!(m[i]<=e);i--);i=Math.min(i,u-2)}else{for(i=D;i<u&&!(m[i]>e);i++);i=Math.min(i-1,u-2)}D=i,k=e;var n=m[i+1]-m[i];if(0!==n)if(T=(e-m[i])/n,l)if(C=v[i],M=v[0===i?i:i-1],I=v[i>u-2?u-1:i+1],A=v[i>u-3?u-1:i+2],d)Ki(M,C,I,A,T,T*T,T*T*T,o(t,r),g);else{if(f)a=Ki(M,C,I,A,T,T*T,T*T*T,O,1),a=tn(O);else{if(p)return Xi(C,I,T);a=Qi(M,C,I,A,T,T*T,T*T*T)}s(t,r,a)}else if(d)qi(v[i],v[i+1],T,o(t,r),g);else{var a;if(f)qi(v[i],v[i+1],T,O,1),a=tn(O);else{if(p)return Xi(v[i],v[i+1],T);a=Yi(v[i],v[i+1],T)}s(t,r,a)}},ondestroy:i});return e&&"spline"!==e&&(P.easing=e),P}}}var nn=function(t,e,i,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||Ui,this._setter=n||ji,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};nn.prototype={when:function(t,e){var i=this._tracks;for(var n in e)if(e.hasOwnProperty(n)){if(!i[n]){i[n]=[];var r=this._getter(this._target,n);if(null==r)continue;0!==t&&i[n].push({time:0,value:Ji(r)})}i[n].push({time:t,value:e[n]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].pause();this._paused=!0},resume:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var t=this._doneList,e=t.length,i=0;i<e;i++)t[i].call(this)},start:function(t,e){var i,n=this,r=0,a=function(){--r||n._doneCallback()};for(var o in this._tracks)if(this._tracks.hasOwnProperty(o)){var s=en(this,t,a,this._tracks[o],o,e);s&&(this._clipList.push(s),r++,this.animation&&this.animation.addClip(s),i=s)}if(i){var l=i.onframe;i.onframe=function(t,e){l(t,e);for(var i=0;i<n._onframeList.length;i++)n._onframeList[i](t,e)}}return r||this._doneCallback(),this},stop:function(t){for(var e=this._clipList,i=this.animation,n=0;n<e.length;n++){var r=e[n];t&&r.onframe(this._target,1),i&&i.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 rn=nn,an=1;"undefined"!=typeof window&&(an=Math.max(window.devicePixelRatio||1,1));var on={debugMode:0,devicePixelRatio:an},sn=function(){},ln=zt.isString,un=zt.isFunction,hn=zt.isObject,cn=zt.isArrayLike,dn=zt.indexOf,fn=function(){this.animators=[]};function pn(t,e,i,n,r,a,o,s){ln(n)?(a=r,r=n,n=0):un(r)?(a=r,r="linear",n=0):un(n)?(a=n,n=0):un(i)?(a=i,i=500):i||(i=500),t.stopAnimation(),gn(t,"",t,e,i,n,s);var l=t.animators.slice(),u=l.length;function h(){--u||a&&a()}u||a&&a();for(var c=0;c<l.length;c++)l[c].done(h).start(r,o)}function gn(t,e,i,n,r,a,o){var s={},l=0;for(var u in n)n.hasOwnProperty(u)&&(null!=i[u]?hn(n[u])&&!cn(n[u])?gn(t,e?e+"."+u:u,i[u],n[u],r,a,o):(o?(s[u]=i[u],mn(t,e,u,n[u])):s[u]=n[u],l++):null==n[u]||o||mn(t,e,u,n[u]));l>0&&t.animate(e,!1).when(null==r?500:r,s).delay(a||0)}function mn(t,e,i,n){if(e){var r={};r[e]={},r[e][i]=n,t.attr(r)}else t.attr(i,n)}fn.prototype={constructor:fn,animate:function(t,e){var i,n=!1,r=this,a=this.__zr;if(t){var o=t.split("."),s=r;n="shape"===o[0];for(var l=0,u=o.length;l<u;l++)s&&(s=s[o[l]]);s&&(i=s)}else i=r;if(i){var h=r.animators,c=new rn(i,e);return c.during((function(t){r.dirty(n)})).done((function(){h.splice(dn(h,c),1)})),h.push(c),a&&a.animation.addAnimator(c),c}sn('Property "'+t+'" is not existed in element '+r.id)},stopAnimation:function(t){for(var e=this.animators,i=e.length,n=0;n<i;n++)e[n].stop(t);return e.length=0,this},animateTo:function(t,e,i,n,r,a){pn(this,t,e,i,n,r,a)},animateFrom:function(t,e,i,n,r,a){pn(this,t,e,i,n,r,a,!0)}};var vn=fn,yn=function(t){ui.call(this,t),de.call(this,t),vn.call(this,t),this.id=t.id||K()};yn.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(t,e){},attrKV:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var i=this[t];i||(i=this[t]=[]),i[0]=e[0],i[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(zt.isObject(t))for(var i in t)t.hasOwnProperty(i)&&this.attrKV(i,t[i]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),this.clipPath=t,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 i=0;i<e.length;i++)t.animation.addAnimator(e[i]);this.clipPath&&this.clipPath.addSelfToZr(t)},removeSelfFromZr:function(t){this.__zr=null;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.removeAnimator(e[i]);this.clipPath&&this.clipPath.removeSelfFromZr(t)}},zt.mixin(yn,vn),zt.mixin(yn,ui),zt.mixin(yn,de);var _n,xn,bn,wn,Sn=yn,Tn=ae.applyTransform,Mn=Math.min,Cn=Math.max;function In(t,e,i,n){i<0&&(t+=i,i=-i),n<0&&(e+=n,n=-n),this.x=t,this.y=e,this.width=i,this.height=n}In.prototype={constructor:In,union:function(t){var e=Mn(t.x,this.x),i=Mn(t.y,this.y);this.width=Cn(t.x+t.width,this.x+this.width)-e,this.height=Cn(t.y+t.height,this.y+this.height)-i,this.x=e,this.y=i},applyTransform:(_n=[],xn=[],bn=[],wn=[],function(t){if(t){_n[0]=bn[0]=this.x,_n[1]=wn[1]=this.y,xn[0]=wn[0]=this.x+this.width,xn[1]=bn[1]=this.y+this.height,Tn(_n,_n,t),Tn(xn,xn,t),Tn(bn,bn,t),Tn(wn,wn,t),this.x=Mn(_n[0],xn[0],bn[0],wn[0]),this.y=Mn(_n[1],xn[1],bn[1],wn[1]);var e=Cn(_n[0],xn[0],bn[0],wn[0]),i=Cn(_n[1],xn[1],bn[1],wn[1]);this.width=e-this.x,this.height=i-this.y}}),calculateTransform:function(t){var e=this,i=t.width/e.width,n=t.height/e.height,r=ti.create();return ti.translate(r,r,[-e.x,-e.y]),ti.scale(r,r,[i,n]),ti.translate(r,r,[t.x,t.y]),r},intersect:function(t){if(!t)return!1;t instanceof In||(t=In.create(t));var e=this,i=e.x,n=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!(n<o||s<i||a<l||u<r)},contain:function(t,e){var i=this;return t>=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new In(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}}},In.create=function(t){return new In(t.x,t.y,t.width,t.height)};var An=In,Dn=function(t){for(var e in t=t||{},Sn.call(this,t),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};Dn.prototype={constructor:Dn,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,i=0;i<e.length;i++)if(e[i].name===t)return e[i]},childCount:function(){return this._children.length},add:function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},addBefore:function(t,e){if(t&&t!==this&&t.parent!==this&&e&&e.parent===this){var i=this._children,n=i.indexOf(e);n>=0&&(i.splice(n,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,i=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof Dn&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,n=this._children,r=zt.indexOf(n,t);return r<0||(n.splice(r,1),t.parent=null,i&&(i.delFromStorage(t),t instanceof Dn&&t.delChildrenFromStorage(i)),e&&e.refresh()),this},removeAll:function(){var t,e,i=this._children,n=this.__storage;for(e=0;e<i.length;e++)t=i[e],n&&(n.delFromStorage(t),t instanceof Dn&&t.delChildrenFromStorage(n)),t.parent=null;return i.length=0,this},eachChild:function(t,e){for(var i=this._children,n=0;n<i.length;n++){var r=i[n];t.call(e,r,n)}return this},traverse:function(t,e){for(var i=0;i<this._children.length;i++){var n=this._children[i];t.call(e,n),"group"===n.type&&n.traverse(t,e)}return this},addChildrenToStorage:function(t){for(var e=0;e<this._children.length;e++){var i=this._children[e];t.addToStorage(i),i instanceof Dn&&i.addChildrenToStorage(t)}},delChildrenFromStorage:function(t){for(var e=0;e<this._children.length;e++){var i=this._children[e];t.delFromStorage(i),i instanceof Dn&&i.delChildrenFromStorage(t)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(t){for(var e=null,i=new An(0,0,0,0),n=t||this._children,r=[],a=0;a<n.length;a++){var o=n[a];if(!o.ignore&&!o.invisible){var s=o.getBoundingRect(),l=o.getLocalTransform(r);l?(i.copy(s),i.applyTransform(l),(e=e||i.clone()).union(i)):(e=e||s.clone()).union(s)}}return e||i}},zt.inherits(Dn,Sn);var kn=Dn;function On(t,e,i,n){var r=e+1;if(r===i)return 1;if(n(t[r++],t[e])<0){for(;r<i&&n(t[r],t[r-1])<0;)r++;!function(t,e,i){i--;for(;e<i;){var n=t[e];t[e++]=t[i],t[i--]=n}}(t,e,r)}else for(;r<i&&n(t[r],t[r-1])>=0;)r++;return r-e}function Pn(t,e,i,n,r){for(n===e&&n++;n<i;n++){for(var a,o=t[n],s=e,l=n;s<l;)r(o,t[a=s+l>>>1])<0?l=a:s=a+1;var u=n-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=o}}function Ln(t,e,i,n,r,a){var o=0,s=0,l=1;if(a(t,e[i+r])>0){for(s=n-r;l<s&&a(t,e[i+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[i+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[i+h])>0?o=h+1:l=h}return l}function Rn(t,e,i,n,r,a){var o=0,s=0,l=1;if(a(t,e[i+r])<0){for(s=r+1;l<s&&a(t,e[i+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=n-r;l<s&&a(t,e[i+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[i+h])<0?l=h:o=h+1}return l}function En(t,e){var i,n,r=7,a=0;t.length;var o=[];function s(s){var l=i[s],u=n[s],h=i[s+1],c=n[s+1];n[s]=u+c,s===a-3&&(i[s+1]=i[s+2],n[s+1]=n[s+2]),a--;var d=Rn(t[h],t,l,u,0,e);l+=d,0!==(u-=d)&&0!==(c=Ln(t[l+u-1],t,h,c,c-1,e))&&(u<=c?function(i,n,a,s){var l=0;for(l=0;l<n;l++)o[l]=t[i+l];var u=0,h=a,c=i;if(t[c++]=t[h++],0==--s){for(l=0;l<n;l++)t[c+l]=o[u+l];return}if(1===n){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==--n){p=!0;break}}while((d|f)<g);if(p)break;do{if(0!==(d=Rn(t[h],o,u,n,0,e))){for(l=0;l<d;l++)t[c+l]=o[u+l];if(c+=d,u+=d,(n-=d)<=1){p=!0;break}}if(t[c++]=t[h++],0==--s){p=!0;break}if(0!==(f=Ln(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==--n){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===n){for(l=0;l<s;l++)t[c+l]=t[h+l];t[c+s]=o[u]}else{if(0===n)throw new Error;for(l=0;l<n;l++)t[c+l]=o[u+l]}}(l,u,h,c):function(i,n,a,s){var l=0;for(l=0;l<s;l++)o[l]=t[a+l];var u=i+n-1,h=s-1,c=a+s-1,d=0,f=0;if(t[c--]=t[u--],0==--n){for(d=c-(s-1),l=0;l<s;l++)t[d+l]=o[l];return}if(1===s){for(f=(c-=n)+1,d=(u-=n)+1,l=n-1;l>=0;l--)t[f+l]=t[d+l];return void(t[c]=o[h])}var p=r;for(;;){var g=0,m=0,v=!1;do{if(e(o[h],t[u])<0){if(t[c--]=t[u--],g++,m=0,0==--n){v=!0;break}}else if(t[c--]=o[h--],m++,g=0,1==--s){v=!0;break}}while((g|m)<p);if(v)break;do{if(0!==(g=n-Rn(o[h],t,i,n,n-1,e))){for(n-=g,f=(c-=g)+1,d=(u-=g)+1,l=g-1;l>=0;l--)t[f+l]=t[d+l];if(0===n){v=!0;break}}if(t[c--]=o[h--],1==--s){v=!0;break}if(0!==(m=s-Ln(t[u],o,0,s,s-1,e))){for(s-=m,f=(c-=m)+1,d=(h-=m)+1,l=0;l<m;l++)t[f+l]=o[d+l];if(s<=1){v=!0;break}}if(t[c--]=t[u--],0==--n){v=!0;break}p--}while(g>=7||m>=7);if(v)break;p<0&&(p=0),p+=2}(r=p)<1&&(r=1);if(1===s){for(f=(c-=n)+1,d=(u-=n)+1,l=n-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))}i=[],n=[],this.mergeRuns=function(){for(;a>1;){var t=a-2;if(t>=1&&n[t-1]<=n[t]+n[t+1]||t>=2&&n[t-2]<=n[t]+n[t-1])n[t-1]<n[t+1]&&t--;else if(n[t]>n[t+1])break;s(t)}},this.forceMergeRuns=function(){for(;a>1;){var t=a-2;t>0&&n[t-1]<n[t+1]&&t--,s(t)}},this.pushRun=function(t,e){i[a]=t,n[a]=e,a+=1}}var Bn=function(t,e,i,n){i||(i=0),n||(n=t.length);var r=n-i;if(!(r<2)){var a=0;if(r<32)Pn(t,i,n,i+(a=On(t,i,n,e)),e);else{var o=new En(t,e),s=function(t){for(var e=0;t>=32;)e|=1&t,t>>=1;return t+e}(r);do{if((a=On(t,i,n,e))<s){var l=r;l>s&&(l=s),Pn(t,i,i+l,i+a,e),a=l}o.pushRun(i,a),o.mergeRuns(),r-=a,i+=a}while(0!==r);o.forceMergeRuns()}}};function zn(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var Nn=function(){this._roots=[],this._displayList=[],this._displayListLen=0};Nn.prototype={constructor:Nn,traverse:function(t,e){for(var i=0;i<this._roots.length;i++)this._roots[i].traverse(t,e)},getDisplayList:function(t,e){return e=e||!1,t&&this.updateDisplayList(e),this._displayList},updateDisplayList:function(t){this._displayListLen=0;for(var e=this._roots,i=this._displayList,n=0,r=e.length;n<r;n++)this._updateAndAddDisplayable(e[n],null,t);i.length=this._displayListLen,Q.canvasSupported&&Bn(i,zn)},_updateAndAddDisplayable:function(t,e,i){if(!t.ignore||i){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var n=t.clipPath;if(n){e=e?e.slice():[];for(var r=n,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,i)}t.__dirty=!1}else t.__clipPaths=e,this._displayList[this._displayListLen++]=t}},addRoot:function(t){t.__storage!==this&&(t instanceof kn&&t.addChildrenToStorage(this),this.addToStorage(t),this._roots.push(t))},delRoot:function(t){if(null==t){for(var e=0;e<this._roots.length;e++){var i=this._roots[e];i instanceof kn&&i.delChildrenFromStorage(this)}return this._roots=[],this._displayList=[],void(this._displayListLen=0)}if(t instanceof Array){e=0;for(var n=t.length;e<n;e++)this.delRoot(t[e])}else{var r=zt.indexOf(this._roots,t);r>=0&&(this.delFromStorage(t),this._roots.splice(r,1),t instanceof kn&&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:zn};var Fn=Nn,Hn={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1};var Vn=function(t,e,i){return Hn.hasOwnProperty(e)?i*t.dpr:i},Wn={ContextCachedBy:{NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},WILL_BE_RESTORED:9},Gn=Wn.ContextCachedBy,Un=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],jn=function(t){this.extendFrom(t,!1)};function Yn(t,e,i){var n=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||(n=n*i.width+i.x,r=r*i.width+i.x,a=a*i.height+i.y,o=o*i.height+i.y),n=isNaN(n)?0:n,r=isNaN(r)?1:r,a=isNaN(a)?0:a,o=isNaN(o)?0:o,t.createLinearGradient(n,a,r,o)}function Xn(t,e,i){var n=i.width,r=i.height,a=Math.min(n,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*n+i.x,s=s*r+i.y,l*=a),t.createRadialGradient(o,s,0,o,s,l)}jn.prototype={constructor:jn,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,i){var n=this,r=i&&i.style,a=!r||t.__attrCachedBy!==Gn.STYLE_BIND;t.__attrCachedBy=Gn.STYLE_BIND;for(var o=0;o<Un.length;o++){var s=Un[o],l=s[0];(a||n[l]!==r[l])&&(t[l]=Vn(t,l,n[l]||s[1]))}if((a||n.fill!==r.fill)&&(t.fillStyle=n.fill),(a||n.stroke!==r.stroke)&&(t.strokeStyle=n.stroke),(a||n.opacity!==r.opacity)&&(t.globalAlpha=null==n.opacity?1:n.opacity),(a||n.blend!==r.blend)&&(t.globalCompositeOperation=n.blend||"source-over"),this.hasStroke()){var u=n.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 i in t)!t.hasOwnProperty(i)||!0!==e&&(!1===e?this.hasOwnProperty(i):null==t[i])||(this[i]=t[i])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,i){for(var n=("radial"===e.type?Xn:Yn)(t,e,i),r=e.colorStops,a=0;a<r.length;a++)n.addColorStop(r[a].offset,r[a].color);return n}};for(var qn=jn.prototype,Zn=0;Zn<Un.length;Zn++){var $n=Un[Zn];$n[0]in qn||(qn[$n[0]]=$n[1])}jn.getGradient=qn.getGradient;var Kn=jn,Qn=function(t,e){this.image=t,this.repeat=e,this.type="pattern"};Qn.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")};var Jn=Qn,tr=on.devicePixelRatio;function er(){return!1}function ir(t,e,i){var n=zt.createCanvas(),r=e.getWidth(),a=e.getHeight(),o=n.style;return o&&(o.position="absolute",o.left=0,o.top=0,o.width=r+"px",o.height=a+"px",n.setAttribute("data-zr-dom-id",t)),n.width=r*i,n.height=a*i,n}var nr=function(t,e,i){var n;i=i||tr,"string"==typeof t?n=ir(t,e,i):zt.isObject(t)&&(t=(n=t).id),this.id=t,this.dom=n;var r=n.style;r&&(n.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=i};nr.prototype={constructor:nr,__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=ir("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},resize:function(t,e){var i=this.dpr,n=this.dom,r=n.style,a=this.domBack;r&&(r.width=t+"px",r.height=e+"px"),n.width=t*i,n.height=e*i,a&&(a.width=t*i,a.height=e*i,1!==i&&this.ctxBack.scale(i,i))},clear:function(t,e){var i,n=this.dom,r=this.ctx,a=n.width,o=n.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(n,0,0,a/u,o/u)),r.clearRect(0,0,a,o),e&&"transparent"!==e)&&(e.colorStops?(i=e.__canvasGradient||Kn.getGradient(r,e,{x:0,y:0,width:a,height:o}),e.__canvasGradient=i):e.image&&(i=Jn.prototype.getCanvasPattern.call(e,r)),r.save(),r.fillStyle=i||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=nr,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 _i(50);function sr(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var i=t.pending[e],n=i.cb;n&&n(this,i.cbPayload),i.hostEl.dirty()}t.pending.length=0}function lr(t){return t&&t.width&&t.height}var ur=function(t,e,i,n,r){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!i)return e;var a=or.get(t),o={hostEl:i,cb:n,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=zt.getContext,dr=zt.extend,fr=zt.retrieve2,pr=zt.retrieve3,gr=zt.trim,mr={},vr=0,yr=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,_r="12px sans-serif",xr={};function br(t,e){var i=t+":"+(e=e||_r);if(mr[i])return mr[i];for(var n=(t+"").split("\n"),r=0,a=0,o=n.length;a<o;a++)r=Math.max(kr(n[a],e).width,r);return vr>5e3&&(vr=0,mr={}),vr++,mr[i]=r,r}function wr(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function Sr(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function Tr(t,e,i){var n=e.textPosition,r=e.textDistance,a=i.x,o=i.y;r=r||0;var s=i.height,l=i.width,u=s/2,h="left",c="top";switch(n){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 Mr(t,e,i,n,r){if(!e)return"";var a=(t+"").split("\n");r=Cr(e,i,n,r);for(var o=0,s=a.length;o<s;o++)a[o]=Ir(a[o],r);return a.join("\n")}function Cr(t,e,i,n){(n=dr({},n)).font=e;i=fr(i,"...");n.maxIterations=fr(n.maxIterations,2);var r=n.minChar=fr(n.minChar,0);n.cnCharWidth=br("国",e);var a=n.ascCharWidth=br("a",e);n.placeholder=fr(n.placeholder,"");for(var o=t=Math.max(0,t-1),s=0;s<r&&o>=a;s++)o-=a;var l=br(i,e);return l>o&&(i="",l=0),o=t-l,n.ellipsis=i,n.ellipsisWidth=l,n.contentWidth=o,n.containerWidth=t,n}function Ir(t,e){var i=e.containerWidth,n=e.font,r=e.contentWidth;if(!i)return"";var a=br(t,n);if(a<=i)return t;for(var o=0;;o++){if(a<=r||o>=e.maxIterations){t+=e.ellipsis;break}var s=0===o?Ar(t,r,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*r/a):0;a=br(t=t.substr(0,s),n)}return""===t&&(t=e.placeholder),t}function Ar(t,e,i,n){for(var r=0,a=0,o=t.length;a<o&&r<e;a++){var s=t.charCodeAt(a);r+=0<=s&&s<=127?i:n}return a}function Dr(t){return br("国",t)}function kr(t,e){return xr.measureText(t,e)}function Or(t,e,i,n,r){null!=t&&(t+="");var a=fr(n,Dr(e)),o=t?t.split("\n"):[],s=o.length*a,l=s,u=!0;if(i&&(l+=i[0]+i[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=Cr(c-(i?i[1]+i[3]:0),e,r.ellipsis,{minChar:r.minChar,placeholder:r.placeholder}),f=0,p=o.length;f<p;f++)o[f]=Ir(o[f],d)}return{lines:o,height:s,outerHeight:l,lineHeight:a,canCacheByTextString:u}}function Pr(t,e){var i={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return i;for(var n,r=yr.lastIndex=0;null!=(n=yr.exec(t));){var a=n.index;a>r&&Lr(i,t.substring(r,a)),Lr(i,n[2],n[1]),r=yr.lastIndex}r<t.length&&Lr(i,t.substring(r,t.length));var o=i.lines,s=0,l=0,u=[],h=e.textPadding,c=e.truncate,d=c&&c.outerWidth,f=c&&c.outerHeight;h&&(null!=d&&(d-=h[1]+h[3]),null!=f&&(f-=h[0]+h[2]));for(var p=0;p<o.length;p++){for(var g=o[p],m=0,v=0,y=0;y<g.tokens.length;y++){var _=(D=g.tokens[y]).styleName&&e.rich[D.styleName]||{},x=D.textPadding=_.textPadding,b=D.font=_.font||e.font,w=D.textHeight=fr(_.textHeight,Dr(b));if(x&&(w+=x[0]+x[2]),D.height=w,D.lineHeight=pr(_.textLineHeight,e.textLineHeight,w),D.textAlign=_&&_.textAlign||e.textAlign,D.textVerticalAlign=_&&_.textVerticalAlign||"middle",null!=f&&s+D.lineHeight>f)return{lines:[],width:0,height:0};D.textWidth=br(D.text,b);var S=_.textWidth,T=null==S||"auto"===S;if("string"==typeof S&&"%"===S.charAt(S.length-1))D.percentWidth=S,u.push(D),S=0;else{if(T){S=D.textWidth;var M=_.textBackgroundColor,C=M&&M.image;C&&(C=hr.findExistImage(C),hr.isImageReady(C)&&(S=Math.max(S,C.width*w/C.height)))}var I=x?x[1]+x[3]:0;S+=I;var A=null!=d?d-v:null;null!=A&&A<S&&(!T||A<I?(D.text="",D.textWidth=S=0):(D.text=Mr(D.text,A-I,b,c.ellipsis,{minChar:c.minChar}),D.textWidth=br(D.text,b),S=D.textWidth+I))}v+=D.width=S,_&&(m=Math.max(m,D.lineHeight))}g.width=v,g.lineHeight=m,s+=m,l=Math.max(l,v)}i.outerWidth=i.width=fr(e.textWidth,l),i.outerHeight=i.height=fr(e.textHeight,s),h&&(i.outerWidth+=h[1]+h[3],i.outerHeight+=h[0]+h[2]);for(p=0;p<u.length;p++){var D,k=(D=u[p]).percentWidth;D.width=parseInt(k,10)/100*l}return i}function Lr(t,e,i){for(var n=""===e,r=e.split("\n"),a=t.lines,o=0;o<r.length;o++){var s=r[o],l={styleName:i,text:s,isLineHolder:!s&&!n};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||n)&&u.push(l)}}}xr.measureText=function(t,e){var i=cr();return i.font=e||_r,i.measureText(t)};var Rr=function(t,e){xr[t]=e},Er=function(t,e,i,n,r,a,o,s){return o?function(t,e,i,n,r,a,o,s){var l=Pr(t,{rich:o,truncate:s,font:e,textAlign:i,textPadding:r,textLineHeight:a}),u=l.outerWidth,h=l.outerHeight,c=wr(0,u,i),d=Sr(0,h,n);return new An(c,d,u,h)}(t,e,i,n,r,a,o,s):function(t,e,i,n,r,a,o){var s=Or(t,e,r,a,o),l=br(t,e);r&&(l+=r[1]+r[3]);var u=s.outerHeight,h=wr(0,l,i),c=Sr(0,u,n),d=new An(h,c,l,u);return d.lineHeight=s.lineHeight,d}(t,e,i,n,r,a,s)},Br=function(t,e,i){return Tr({},{textPosition:t,textDistance:i},e)},zr=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:_r,$override:Rr,getWidth:br,getBoundingRect:Er,adjustTextX:wr,adjustTextY:Sr,calculateTextPosition:Tr,adjustTextPositionOnRect:Br,truncateText:Mr,getLineHeight:Dr,measureText:kr,parsePlainText:Or,parseRichText:Pr,makeFont:zr};var Fr={buildPath:function(t,e){var i,n,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?i=n=r=a=c:c instanceof Array?1===c.length?i=n=r=a=c[0]:2===c.length?(i=r=c[0],n=a=c[1]):3===c.length?(i=c[0],n=a=c[1],r=c[2]):(i=c[0],n=c[1],r=c[2],a=c[3]):i=n=r=a=0,i+n>u&&(i*=u/(o=i+n),n*=u/o),r+a>u&&(r*=u/(o=r+a),a*=u/o),n+r>h&&(n*=h/(o=n+r),r*=h/o),i+a>h&&(i*=h/(o=i+a),a*=h/o),t.moveTo(s+i,l),t.lineTo(s+u-n,l),0!==n&&t.arc(s+u-n,l+n,n,-Math.PI/2,0),t.lineTo(s+u,l+h-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+i),0!==i&&t.arc(s+i,l+i,i,Math.PI,1.5*Math.PI)}},Hr=zt.retrieve2,Vr=zt.retrieve3,Wr=zt.each,Gr=zt.normalizeCssArray,Ur=zt.isString,jr=zt.isObject,Yr=Wn.ContextCachedBy,Xr=Wn.WILL_BE_RESTORED,qr=Nr.DEFAULT_FONT,Zr={left:1,right:1,center:1},$r={top:1,bottom:1,middle:1},Kr=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],Qr={},Jr={};function ta(t){if(t){t.font=Nr.makeFont(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||Zr[e]?e:"left";var i=t.textVerticalAlign||t.textBaseline;"center"===i&&(i="middle"),t.textVerticalAlign=null==i||$r[i]?i:"top",t.textPadding&&(t.textPadding=Gr(t.textPadding))}}function ea(t,e,i,n,r){if(i&&e.textRotation){var a=e.textOrigin;"center"===a?(n=i.width/2+i.x,r=i.height/2+i.y):a&&(n=a[0]+i.x,r=a[1]+i.y),t.translate(n,r),t.rotate(-e.textRotation),t.translate(-n,-r)}}function ia(t,e,i,n,r,a,o,s){var l=n.rich[i.styleName]||{};l.text=i.text;var u=i.textVerticalAlign,h=a+r/2;"top"===u?h=a+i.height/2:"bottom"===u&&(h=a+r-i.height/2),!i.isLineHolder&&na(l)&&ra(t,e,l,"right"===s?o-i.width:"center"===s?o-i.width/2:o,h-i.height/2,i.width,i.height);var c=i.textPadding;c&&(o=ca(o,s,c),h-=i.height/2-c[2]-i.textHeight/2),sa(e,"shadowBlur",Vr(l.textShadowBlur,n.textShadowBlur,0)),sa(e,"shadowColor",l.textShadowColor||n.textShadowColor||"transparent"),sa(e,"shadowOffsetX",Vr(l.textShadowOffsetX,n.textShadowOffsetX,0)),sa(e,"shadowOffsetY",Vr(l.textShadowOffsetY,n.textShadowOffsetY,0)),sa(e,"textAlign",s),sa(e,"textBaseline","middle"),sa(e,"font",i.font||qr);var d=la(l.textStroke||n.textStroke,p),f=ua(l.textFill||n.textFill),p=Hr(l.textStrokeWidth,n.textStrokeWidth);d&&(sa(e,"lineWidth",p),sa(e,"strokeStyle",d),e.strokeText(i.text,o,h)),f&&(sa(e,"fillStyle",f),e.fillText(i.text,o,h))}function na(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function ra(t,e,i,n,r,a,o){var s=i.textBackgroundColor,l=i.textBorderWidth,u=i.textBorderColor,h=Ur(s);if(sa(e,"shadowBlur",i.textBoxShadowBlur||0),sa(e,"shadowColor",i.textBoxShadowColor||"transparent"),sa(e,"shadowOffsetX",i.textBoxShadowOffsetX||0),sa(e,"shadowOffsetY",i.textBoxShadowOffsetY||0),h||l&&u){e.beginPath();var c=i.textBorderRadius;c?Fr.buildPath(e,{x:n,y:r,width:a,height:o,r:c}):e.rect(n,r,a,o),e.closePath()}if(h)if(sa(e,"fillStyle",s),null!=i.fillOpacity){var d=e.globalAlpha;e.globalAlpha=i.fillOpacity*i.opacity,e.fill(),e.globalAlpha=d}else e.fill();else if(jr(s)){var f=s.image;(f=hr.createOrUpdateImage(f,null,t,aa,s))&&hr.isImageReady(f)&&e.drawImage(f,n,r,a,o)}if(l&&u)if(sa(e,"lineWidth",l),sa(e,"strokeStyle",u),null!=i.strokeOpacity){d=e.globalAlpha;e.globalAlpha=i.strokeOpacity*i.opacity,e.stroke(),e.globalAlpha=d}else e.stroke()}function aa(t,e){e.image=t}function oa(t,e,i,n){var r=i.x||0,a=i.y||0,o=i.textAlign,s=i.textVerticalAlign;if(n){var l=i.textPosition;if(l instanceof Array)r=n.x+ha(l[0],n.width),a=n.y+ha(l[1],n.height);else{var u=e&&e.calculateTextPosition?e.calculateTextPosition(Qr,i,n):Nr.calculateTextPosition(Qr,i,n);r=u.x,a=u.y,o=o||u.textAlign,s=s||u.textVerticalAlign}var h=i.textOffset;h&&(r+=h[0],a+=h[1])}return(t=t||{}).baseX=r,t.baseY=a,t.textAlign=o,t.textVerticalAlign=s,t}function sa(t,e,i){return t[e]=Vn(t,e,i),t[e]}function la(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function ua(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function ha(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function ca(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}var da=function(t){return ta(t),Wr(t.rich,ta),t},fa=function(t,e,i,n,r,a){n.rich?function(t,e,i,n,r,a){a!==Xr&&(e.__attrCachedBy=Yr.NONE);var o=t.__textCotentBlock;o&&!t.__dirtyText||(o=t.__textCotentBlock=Nr.parseRichText(i,n));!function(t,e,i,n,r){var a=i.width,o=i.outerWidth,s=i.outerHeight,l=n.textPadding,u=oa(Jr,t,n,r),h=u.baseX,c=u.baseY,d=u.textAlign,f=u.textVerticalAlign;ea(e,n,r,h,c);var p=Nr.adjustTextX(h,o,d),g=Nr.adjustTextY(c,s,f),m=p,v=g;l&&(m+=l[3],v+=l[0]);var y=m+a;na(n)&&ra(t,e,n,p,g,o,s);for(var _=0;_<i.lines.length;_++){for(var x,b=i.lines[_],w=b.tokens,S=w.length,T=b.lineHeight,M=b.width,C=0,I=m,A=y,D=S-1;C<S&&(!(x=w[C]).textAlign||"left"===x.textAlign);)ia(t,e,x,n,T,v,I,"left"),M-=x.width,I+=x.width,C++;for(;D>=0&&"right"===(x=w[D]).textAlign;)ia(t,e,x,n,T,v,A,"right"),M-=x.width,A-=x.width,D--;for(I+=(a-(I-m)-(y-A)-M)/2;C<=D;)ia(t,e,x=w[C],n,T,v,I+x.width/2,"center"),I+=x.width,C++;v+=T}}(t,e,o,n,r)}(t,e,i,n,r,a):function(t,e,i,n,r,a){var o,s=na(n),l=!1,u=e.__attrCachedBy===Yr.PLAIN_TEXT;a!==Xr?(a&&(o=a.style,l=!s&&u&&o),e.__attrCachedBy=s?Yr.NONE:Yr.PLAIN_TEXT):u&&(e.__attrCachedBy=Yr.NONE);var h=n.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=n.textPadding,f=n.textLineHeight,p=t.__textCotentBlock;p&&!t.__dirtyText||(p=t.__textCotentBlock=Nr.parsePlainText(i,c,d,f,n.truncate));var g=p.outerHeight,m=p.lines,v=p.lineHeight,y=oa(Jr,t,n,r),_=y.baseX,x=y.baseY,b=y.textAlign||"left",w=y.textVerticalAlign;ea(e,n,r,_,x);var S=Nr.adjustTextY(x,g,w),T=_,M=S;if(s||d){var C=Nr.getWidth(i,c);d&&(C+=d[1]+d[3]);var I=Nr.adjustTextX(_,C,b);s&&ra(t,e,n,I,S,C,g),d&&(T=ca(_,b,d),M+=d[0])}e.textAlign=b,e.textBaseline="middle",e.globalAlpha=n.opacity||1;for(var A=0;A<Kr.length;A++){var D=Kr[A],k=D[0],O=D[1],P=n[k];l&&P===o[k]||(e[O]=Vn(e,O,P||D[2]))}M+=v/2;var L=n.textStrokeWidth,R=l?o.textStrokeWidth:null,E=!l||L!==R,B=!l||E||n.textStroke!==o.textStroke,z=la(n.textStroke,L),N=ua(n.textFill);z&&(E&&(e.lineWidth=L),B&&(e.strokeStyle=z));N&&(l&&n.textFill===o.textFill||(e.fillStyle=N));if(1===m.length)z&&e.strokeText(m[0],T,M),N&&e.fillText(m[0],T,M);else for(A=0;A<m.length;A++)z&&e.strokeText(m[A],T,M),N&&e.fillText(m[A],T,M),M+=v}(t,e,i,n,r,a)},pa=function(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)},ga={normalizeTextStyle:da,renderText:fa,getBoxPosition:oa,getStroke:la,getFill:ua,parsePercent:ha,needDrawText:pa},ma=Wn.WILL_BE_RESTORED,va=new An,ya=function(){};ya.prototype={constructor:ya,drawRectText:function(t,e){var i=this.style;e=i.textRect||e,this.__dirty&&ga.normalizeTextStyle(i,!0);var n=i.text;if(null!=n&&(n+=""),ga.needDrawText(n,i)){t.save();var r=this.transform;i.transformText?this.setTransform(t):r&&(va.copy(e),va.applyTransform(r),e=va),ga.renderText(this,t,n,i,e,ma),t.restore()}}};var _a=ya;function xa(t){for(var e in t=t||{},Sn.call(this,t),t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new Kn(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 i=this.transformCoordToLocal(t,e);return this.getBoundingRect().contain(i[0],i[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){"style"!==t?Sn.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 Kn(t),this.dirty(!1),this},calculateTextPosition:null},zt.inherits(xa,Sn),zt.mixin(xa,_a);var ba=xa;function wa(t){ba.call(this,t)}wa.prototype={constructor:wa,type:"image",brush:function(t,e){var i=this.style,n=i.image;i.bind(t,this,e);var r=this._image=hr.createOrUpdateImage(n,this._image,this,this.onload);if(r&&hr.isImageReady(r)){var a=i.x||0,o=i.y||0,s=i.width,l=i.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),i.sWidth&&i.sHeight){var h=i.sx||0,c=i.sy||0;t.drawImage(r,h,c,i.sWidth,i.sHeight,a,o,s,l)}else if(i.sx&&i.sy){var d=s-(h=i.sx),f=l-(c=i.sy);t.drawImage(r,h,c,d,f,a,o,s,l)}else t.drawImage(r,a,o,s,l);null!=i.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))}},getBoundingRect:function(){var t=this.style;return this._rect||(this._rect=new An(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},zt.inherits(wa,ba);var Sa=wa,Ta=on.devicePixelRatio,Ma=1e5,Ca=314159,Ia=.01;function Aa(t){return parseInt(t,10)}var Da=new An(0,0,0,0),ka=new An(0,0,0,0);var Oa=function(t,e,i){this.type="canvas";var n=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=i=zt.extend({},i||{}),this.dpr=i.devicePixelRatio||Ta,this._singleCanvas=n,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,n){var s=t.width,l=t.height;null!=i.width&&(s=i.width),null!=i.height&&(l=i.height),this.dpr=i.devicePixelRatio||1,t.width=s*this.dpr,t.height=l*this.dpr,this._width=s,this._height=l;var u=new 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 i=document.createElement("div");return i.style.cssText=["position:relative","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",i}(this._width,this._height);t.appendChild(h)}this._hoverlayer=null,this._hoverElements=[]};Oa.prototype={constructor:Oa,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(t){var e=this.storage.getDisplayList(!0),i=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,t,this._redrawId);for(var n=0;n<i.length;n++){var r=i[n],a=this._layers[r];if(!a.__builtin__&&a.refresh){var o=0===n?this._backgroundColor:null;a.refresh(o)}}return this.refreshHover(),this},addHover:function(t,e){if(!t.__hoverMir){var i=new t.constructor({style:t.style,shape:t.shape,z:t.z,z2:t.z2,silent:t.silent});return i.__from=t,t.__hoverMir=i,e&&i.setStyle(e),this._hoverElements.push(i),i}},removeHover:function(t){var e=t.__hoverMir,i=this._hoverElements,n=zt.indexOf(i,e);n>=0&&i.splice(n,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,i=0;i<e.length;i++){var n=e[i].__from;n&&(n.__hoverMir=null)}e.length=0},refreshHover:function(){var t=this._hoverElements,e=t.length,i=this._hoverlayer;if(i&&i.clear(),e){Bn(t,this.storage.displayableSortFunc),i||(i=this._hoverlayer=this.getLayer(Ma));var n={};i.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,i,!0,n))):(t.splice(r,1),o.__hoverMir=null,e--)}i.ctx.restore()}},getHoverLayer:function(){return this.getLayer(Ma)},_paintList:function(t,e,i){if(this._redrawId===i){e=e||!1,this._updateLayerStatus(t);var n=this._doPaintList(t,e);if(this._needsManuallyCompositing&&this._compositeManually(),!n){var r=this;ar((function(){r._paintList(t,e,i)}))}}},_compositeManually:function(){var t=this.getLayer(Ca).ctx,e=this._domRoot.width,i=this._domRoot.height;t.clearRect(0,0,e,i),this.eachBuiltinLayer((function(n){n.virtual&&t.drawImage(n.dom,0,0,e,i)}))},_doPaintList:function(t,e){for(var i=[],n=0;n<this._zlevelList.length;n++){var r=this._zlevelList[n];(s=this._layers[r]).__builtin__&&s!==this._hoverlayer&&(s.__dirty||e)&&i.push(s)}for(var a=!0,o=0;o<i.length;o++){var s,l=(s=i[o]).ctx,u={};l.save();var h=e?s.__startIndex:s.__drawIndex,c=!e&&s.incremental&&Date.now,d=c&&Date.now(),f=s.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(s.__startIndex===s.__endIndex)s.clear(!1,f);else if(h===s.__startIndex){var p=t[h];p.incremental&&p.notClear&&!e||s.clear(!1,f)}-1===h&&(console.error("For some unknown reason. drawIndex is -1"),h=s.__startIndex);for(var g=h;g<s.__endIndex;g++){var m=t[g];if(this._doPaintEl(m,s,e,u),m.__dirty=m.__dirtyText=!1,c)if(Date.now()-d>15)break}s.__drawIndex=g,s.__drawIndex<s.__endIndex&&(a=!1),u.prevElClipPaths&&l.restore(),l.restore()}return Q.wxa&&zt.each(this._layers,(function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()})),a},_doPaintEl:function(t,e,i,n){var r=e.ctx,a=t.transform;if((e.__dirty||i)&&!t.invisible&&0!==t.style.opacity&&(!a||a[0]||a[3])&&(!t.culling||!function(t,e,i){return Da.copy(t.getBoundingRect()),t.transform&&Da.applyTransform(t.transform),ka.width=e,ka.height=i,!Da.intersect(ka)}(t,this._width,this._height))){var o=t.__clipPaths,s=n.prevElClipPaths;s&&!function(t,e){if(t===e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i<t.length;i++)if(t[i]!==e[i])return!0;return!1}(o,s)||(s&&(r.restore(),n.prevElClipPaths=null,n.prevEl=null),o&&(r.save(),function(t,e){for(var i=0;i<t.length;i++){var n=t[i];n.setTransform(e),e.beginPath(),n.buildPath(e,n.shape),e.clip(),n.restoreTransform(e)}}(o,r),n.prevElClipPaths=o)),t.beforeBrush&&t.beforeBrush(r),t.brush(r,n.prevEl||null),n.prevEl=t,t.afterBrush&&t.afterBrush(r)}},getLayer:function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=Ca);var i=this._layers[t];return i||((i=new rr("zr_"+t,this,this.dpr)).zlevel=t,i.__builtin__=!0,this._layerConfig[t]?zt.merge(i,this._layerConfig[t],!0):this._layerConfig[t-Ia]&&zt.merge(i,this._layerConfig[t-Ia],!0),e&&(i.virtual=e),this.insertLayer(t,i),i.initContext()),i},insertLayer:function(t,e){var i=this._layers,n=this._zlevelList,r=n.length,a=null,o=-1,s=this._domRoot;if(!i[t]&&function(t){return!!t&&(!!t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh)}(e)){if(r>0&&t>n[0]){for(o=0;o<r-1&&!(n[o]<t&&n[o+1]>t);o++);a=i[n[o]]}if(n.splice(o+1,0,t),i[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 i,n,r=this._zlevelList;for(n=0;n<r.length;n++)i=r[n],t.call(e,this._layers[i],i)},eachBuiltinLayer:function(t,e){var i,n,r,a=this._zlevelList;for(r=0;r<a.length;r++)n=a[r],(i=this._layers[n]).__builtin__&&t.call(e,i,n)},eachOtherLayer:function(t,e){var i,n,r,a=this._zlevelList;for(r=0;r<a.length;r++)n=a[r],(i=this._layers[n]).__builtin__||t.call(e,i,n)},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 i=1;i<t.length;i++){if((o=t[i]).zlevel!==t[i-1].zlevel||o.incremental){this._needsManuallyCompositing=!0;break}}var n,r=null,a=0;for(i=0;i<t.length;i++){var o,s,l=(o=t[i]).zlevel;n!==l&&(n=l,a=0),o.incremental?((s=this.getLayer(l+.001,this._needsManuallyCompositing)).incremental=!0,a=1):s=this.getLayer(l+(a>0?Ia:0),this._needsManuallyCompositing),s.__builtin__||sn("ZLevel "+l+" has been used by unkown layer "+s.id),s!==r&&(s.__used=!0,s.__startIndex!==i&&(s.__dirty=!0),s.__startIndex=i,s.incremental?s.__drawIndex=-1:s.__drawIndex=i,e(i),r=s),o.__dirty&&(s.__dirty=!0,s.incremental&&s.__drawIndex<0&&(s.__drawIndex=i))}e(i),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 i=this._layerConfig;i[t]?zt.merge(i[t],e,!0):i[t]=e;for(var n=0;n<this._zlevelList.length;n++){var r=this._zlevelList[n];if(r===t||r===t+Ia){var a=this._layers[r];zt.merge(a,i[t],!0)}}}},delLayer:function(t){var e=this._layers,i=this._zlevelList,n=e[t];n&&(n.dom.parentNode.removeChild(n.dom),delete e[t],i.splice(zt.indexOf(i,t),1))},resize:function(t,e){if(this._domRoot.style){var i=this._domRoot;i.style.display="none";var n=this._opts;if(null!=t&&(n.width=t),null!=e&&(n.height=e),t=this._getSize(0),e=this._getSize(1),i.style.display="",this._width!==t||e!==this._height){for(var r in i.style.width=t+"px",i.style.height=e+"px",this._layers)this._layers.hasOwnProperty(r)&&this._layers[r].resize(t,e);zt.each(this._progressiveLayers,(function(i){i.resize(t,e)})),this.refresh(!0)}this._width=t,this._height=e}else{if(null==t||null==e)return;this._width=t,this._height=e,this.getLayer(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 i=e.dom.width,n=e.dom.height,r=e.ctx;this.eachLayer((function(t){t.__builtin__?r.drawImage(t.dom,0,0,i,n):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,i=["width","height"][t],n=["clientWidth","clientHeight"][t],r=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[n]||Aa(s[i])||Aa(o.style[i]))-(Aa(s[r])||0)-(Aa(s[a])||0)|0},pathToImage:function(t,e){e=e||this.dpr;var i=document.createElement("canvas"),n=i.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;i.width=p*e,i.height=g*e,n.scale(e,e),n.clearRect(0,0,p,g),n.dpr=e;var m={position:t.position,rotation:t.rotation,scale:t.scale};t.position=[h-r.x,d-r.y],t.rotation=0,t.scale=[1,1],t.updateTransform(),t&&t.brush(n);var v=new Sa({style:{x:0,y:0,image:i}});return null!=m.position&&(v.position=t.position=m.position),null!=m.rotation&&(v.rotation=t.rotation=m.rotation),null!=m.scale&&(v.scale=t.scale=m.scale),v}};var Pa=Oa,La=Pe.Dispatcher,Ra=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,La.call(this)};Ra.prototype={constructor:Ra,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),i=0;i<e.length;i++)this.addClip(e[i])},removeClip:function(t){var e=zt.indexOf(this._clips,t);e>=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;i<e.length;i++)this.removeClip(e[i]);t.animation=null},_update:function(){for(var t=(new Date).getTime()-this._pausedTime,e=t-this._time,i=this._clips,n=i.length,r=[],a=[],o=0;o<n;o++){var s=i[o],l=s.step(t,e);l&&(r.push(l),a.push(s))}for(o=0;o<n;)i[o]._needsRemove?(i[o]=i[n-1],i.pop(),n--):o++;n=r.length;for(o=0;o<n;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 i=new rn(t,(e=e||{}).loop,e.getter,e.setter);return this.addAnimator(i),i}},zt.mixin(Ra,La);var Ea,Ba,za=Ra,Na=Pe.addEventListener,Fa=Pe.removeEventListener,Ha=Pe.normalizeEvent,Va=Pe.getNativeEvent,Wa=Q.domSupported,Ga=(Ba={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:Ea=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:zt.map(Ea,(function(t){var e=t.replace("mouse","pointer");return Ba.hasOwnProperty(e)?e:t}))}),Ua=["mousemove","mouseup"],ja=["pointermove","pointerup"];function Ya(t){return"mousewheel"===t&&Q.browser.firefox?"DOMMouseScroll":t}function Xa(t){var e=t.pointerType;return"pen"===e||"touch"===e}function qa(t){t&&(t.zrByTouch=!0)}function Za(t,e){for(var i=e,n=!1;i&&9!==i.nodeType&&!(n=i.domBelongToZr||i!==e&&i===t.painterRoot);)i=i.parentNode;return n}function $a(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 Ka=$a.prototype;Ka.stopPropagation=Ka.stopImmediatePropagation=Ka.preventDefault=zt.noop;var Qa={mousedown:function(t){t=Ha(this.dom,t),this._mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=Ha(this.dom,t);var e=this._mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||ro(this,!0),this.trigger("mousemove",t)},mouseup:function(t){t=Ha(this.dom,t),ro(this,!1),this.trigger("mouseup",t)},mouseout:function(t){t=Ha(this.dom,t),this._pointerCapturing&&(t.zrEventControl="no_globalout");var e=t.toElement||t.relatedTarget;t.zrIsToLocalDOM=Za(this,e),this.trigger("mouseout",t)},touchstart:function(t){qa(t=Ha(this.dom,t)),this._lastTouchMoment=new Date,this.handler.processGesture(t,"start"),Qa.mousemove.call(this,t),Qa.mousedown.call(this,t)},touchmove:function(t){qa(t=Ha(this.dom,t)),this.handler.processGesture(t,"change"),Qa.mousemove.call(this,t)},touchend:function(t){qa(t=Ha(this.dom,t)),this.handler.processGesture(t,"end"),Qa.mouseup.call(this,t),+new Date-this._lastTouchMoment<300&&Qa.click.call(this,t)},pointerdown:function(t){Qa.mousedown.call(this,t)},pointermove:function(t){Xa(t)||Qa.mousemove.call(this,t)},pointerup:function(t){Qa.mouseup.call(this,t)},pointerout:function(t){Xa(t)||Qa.mouseout.call(this,t)}};zt.each(["click","mousewheel","dblclick","contextmenu"],(function(t){Qa[t]=function(e){e=Ha(this.dom,e),this.trigger(t,e)}}));var Ja={pointermove:function(t){Xa(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;ro(this,!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function to(t,e){var i=e.domHandlers;Q.pointerEventsSupported?zt.each(Ga.pointer,(function(n){io(e,n,(function(e){i[n].call(t,e)}))})):(Q.touchEventsSupported&&zt.each(Ga.touch,(function(n){io(e,n,(function(r){i[n].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)}))})),zt.each(Ga.mouse,(function(n){io(e,n,(function(r){r=Va(r),e.touching||i[n].call(t,r)}))})))}function eo(t,e){function i(i){io(e,i,(function(n){n=Va(n),Za(t,n.target)||(n=function(t,e){return Ha(t.dom,new $a(t,e),!0)}(t,n),e.domHandlers[i].call(t,n))}),{capture:!0})}Q.pointerEventsSupported?zt.each(ja,i):Q.touchEventsSupported||zt.each(Ua,i)}function io(t,e,i,n){t.mounted[e]=i,t.listenerOpts[e]=n,Na(t.domTarget,Ya(e),i,n)}function no(t){var e=t.mounted;for(var i in e)e.hasOwnProperty(i)&&Fa(t.domTarget,Ya(i),e[i],t.listenerOpts[i]);t.mounted={}}function ro(t,e){if(t._mayPointerCapture=null,Wa&&t._pointerCapturing^e){t._pointerCapturing=e;var i=t._globalHandlerScope;e?eo(t,i):no(i)}}function ao(t,e){this.domTarget=t,this.domHandlers=e,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function oo(t,e){de.call(this),this.dom=t,this.painterRoot=e,this._localHandlerScope=new ao(t,Qa),Wa&&(this._globalHandlerScope=new ao(document,Ja)),this._pointerCapturing=!1,this._mayPointerCapture=null,to(this,this._localHandlerScope)}var so=oo.prototype;so.dispose=function(){no(this._localHandlerScope),Wa&&no(this._globalHandlerScope)},so.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},zt.mixin(oo,de);var lo=oo,uo=!Q.canvasSupported,ho={canvas:Pa},co={};var fo=function(t,e,i){i=i||{},this.dom=e,this.id=t;var n=this,r=new Fn,a=i.renderer;if(uo){if(!ho.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");a="vml"}else a&&ho[a]||(a="canvas");var o=new ho[a](e,r,i,t);this.storage=r,this.painter=o;var s=Q.node||Q.worker?null:new lo(o.getViewportRoot(),o.root);this.handler=new Ue(r,o,s,o.root),this.animation=new za({stage:{update:zt.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(n)},r.addToStorage=function(t){u.call(r,t),t.addSelfToZr(n)}};fo.prototype={constructor:fo,getId:function(){return this.id},add:function(t){this.storage.addRoot(t),this._needsRefresh=!0},remove:function(t){this.storage.delRoot(t),this._needsRefresh=!0},configLayer:function(t,e){this.painter.configLayer&&this.painter.configLayer(t,e),this._needsRefresh=!0},setBackgroundColor:function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh(),this._needsRefresh=this._needsRefreshHover=!1},refresh:function(){this._needsRefresh=!0},flush:function(){var t;this._needsRefresh&&(t=!0,this.refreshImmediately()),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately()),t&&this.trigger("rendered")},addHover:function(t,e){if(this.painter.addHover){var i=this.painter.addHover(t,e);return this.refreshHover(),i}},removeHover:function(t){this.painter.removeHover&&(this.painter.removeHover(t),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},resize:function(t){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,i){this.handler.on(t,e,i)},off:function(t,e){this.handler.off(t,e)},trigger:function(t,e){this.handler.trigger(t,e)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){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 co[t]}};var po=function(t,e){var i=new fo(K(),t,e);return co[i.id]=i,i},go={version:"4.3.1",init:po,dispose:function(t){if(t)t.dispose();else{for(var e in co)co.hasOwnProperty(e)&&co[e].dispose();co={}}return this},getInstance:function(t){return co[t]},registerPainter:function(t,e){ho[t]=e}},mo=zt.each,vo=zt.isObject,yo=zt.isArray,_o="series\0";function xo(t){return t instanceof Array?t:null==t?[]:[t]}function bo(t){return vo(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}var wo=0;function So(t,e){return t&&t.hasOwnProperty(e)}var To=function(t,e,i){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var n=0,r=i.length;n<r;n++){var a=i[n];!t.emphasis[e].hasOwnProperty(a)&&t[e].hasOwnProperty(a)&&(t.emphasis[e][a]=t[e][a])}}},Mo=function(t,e){e=(e||[]).slice();var i=zt.map(t||[],(function(t,e){return{exist:t}}));return mo(e,(function(t,n){if(vo(t)){for(var r=0;r<i.length;r++)if(!i[r].option&&null!=t.id&&i[r].exist.id===t.id+"")return i[r].option=t,void(e[n]=null);for(r=0;r<i.length;r++){var a=i[r].exist;if(!(i[r].option||null!=a.id&&null!=t.id||null==t.name||bo(t)||bo(a)||a.name!==t.name+""))return i[r].option=t,void(e[n]=null)}}})),mo(e,(function(t,e){if(vo(t)){for(var n=0;n<i.length;n++){var r=i[n].exist;if(!i[n].option&&!bo(r)&&null==t.id){i[n].option=t;break}}n>=i.length&&i.push({option:t})}})),i},Co=function(t,e){var i={},n={};return r(t||[],i),r(e||[],n,i),[a(i),a(n)];function r(t,e,i){for(var n=0,r=t.length;n<r;n++)for(var a=t[n].seriesId,o=xo(t[n].dataIndex),s=i&&i[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 i=[];for(var n in t)if(t.hasOwnProperty(n)&&null!=t[n])if(e)i.push(+n);else{var r=a(t[n],!0);r.length&&i.push({seriesId:n,dataIndex:r})}return i}},Io=function(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?zt.isArray(e.dataIndex)?zt.map(e.dataIndex,(function(e){return t.indexOfRawIndex(e)})):t.indexOfRawIndex(e.dataIndex):null!=e.name?zt.isArray(e.name)?zt.map(e.name,(function(e){return t.indexOfName(e)})):t.indexOfName(e.name):void 0},Ao=function(t,e,i){t.setAttribute?t.setAttribute(e,i):t[e]=i},Do=function(t,e){return t.getAttribute?t.getAttribute(e):t[e]},ko={normalizeToArray:xo,defaultEmphasis:To,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)||yo(t)||t instanceof Date?t:t.value},isDataItemOption:function(t){return vo(t)&&!(t instanceof Array)},mappingToExists:Mo,makeIdAndName:function(t){var e=zt.createHashMap();mo(t,(function(t,i){var n=t.exist;n&&e.set(n.id,t)})),mo(t,(function(t,i){var n=t.option;zt.assert(!n||null==n.id||!e.get(n.id)||e.get(n.id)===t,"id duplicates: "+(n&&n.id)),n&&null!=n.id&&e.set(n.id,t),!t.keyInfo&&(t.keyInfo={})})),mo(t,(function(t,i){var n=t.exist,r=t.option,a=t.keyInfo;if(vo(r)){if(a.name=null!=r.name?r.name+"":n?n.name:_o+i,n)a.id=n.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(_o))},isIdInner:bo,compressBatches:Co,queryDataIndex:Io,makeInner:function(){var t="__\0ec_inner_"+wo+++"_"+Math.random().toFixed(5);return function(e){return e[t]||(e[t]={})}},parseFinder:function(t,e,i){if(zt.isString(e)){var n={};n[e+"Index"]=0,e=n}var r=i&&i.defaultMainType;!r||So(e,r+"Index")||So(e,r+"Id")||So(e,r+"Name")||(e[r+"Index"]=0);var a={};return mo(e,(function(n,r){n=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==n||"index"===l&&"none"===n||i&&i.includeMainTypes&&zt.indexOf(i.includeMainTypes,s)<0)){var u={mainType:s};"index"===l&&"all"===n||(u[l]=n);var h=t.queryComponents(u);a[s+"Models"]=h,a[s+"Model"]=h[0]}}else a[r]=n})),a},setAttribute:Ao,getAttribute:Do,getTooltipRenderMode:function(t){return"auto"===t?Q.domSupported?"html":"richText":t||"html"},groupData:function(t,e){var i=zt.createHashMap(),n=[];return zt.each(t,(function(t){var r=e(t);(i.get(r)||(n.push(r),i.set(r,[]))).push(t)})),{keys:n,buckets:i}}},Oo="___EC__COMPONENT__CONTAINER___";function Po(t){var e={main:"",sub:""};return t&&(t=t.split("."),e.main=t[0]||"",e.sub=t[1]||""),e}var Lo=0;function Ro(t,e){var i=zt.slice(arguments,2);return this.superClass.prototype[e].apply(t,i)}function Eo(t,e,i){return this.superClass.prototype[e].apply(t,i)}var Bo=function(t,e){t.$constructor=t,t.extend=function(t){var e=this,i=function(){t.$constructor?t.$constructor.apply(this,arguments):e.apply(this,arguments)};return zt.extend(i.prototype,t),i.extend=this.extend,i.superCall=Ro,i.superApply=Eo,zt.inherits(i,this),i.superClass=e,i}},zo=function(t,e){e=e||{};var i={};if(t.registerClass=function(t,e){if(e)if(function(t){zt.assert(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}(e),(e=Po(e)).sub){if(e.sub!==Oo){var n=function(t){var e=i[t.main];e&&e[Oo]||((e=i[t.main]={})[Oo]=!0);return e}(e);n[e.sub]=t}}else i[e.main]=t;return t},t.getClass=function(t,e,n){var r=i[t];if(r&&r[Oo]&&(r=e?r[e]:null),n&&!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=Po(t);var e=[],n=i[t.main];return n&&n[Oo]?zt.each(n,(function(t,i){i!==Oo&&e.push(t)})):e.push(n),e},t.hasClass=function(t){return t=Po(t),!!i[t.main]},t.getAllClassMainTypes=function(){var t=[];return zt.each(i,(function(e,i){t.push(i)})),t},t.hasSubTypes=function(t){t=Po(t);var e=i[t.main];return e&&e[Oo]},t.parseClassType=Po,e.registerWhenExtend){var n=t.extend;n&&(t.extend=function(e){var i=n.call(this,e);return t.registerClass(i,e.type)})}return t},No={parseClassType:Po,enableClassExtend:Bo,enableClassCheck:function(t){var e=["__\0is_clz",Lo++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}},enableClassManagement:zo,setReadOnly:function(t,e){}};var Fo=function(t){for(var e=0;e<t.length;e++)t[e][1]||(t[e][1]=t[e][0]);return function(e,i,n){for(var r={},a=0;a<t.length;a++){var o=t[a][1];if(!(i&&zt.indexOf(i,o)>=0||n&&zt.indexOf(n,o)<0)){var s=e.getShallow(o);null!=s&&(r[t[a][0]]=s)}}return r}},Ho=Fo([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Vo={getLineStyle:function(t){var e=Ho(this,t);return e.lineDash=this.getLineDash(e.lineWidth),e},getLineDash:function(t){null==t&&(t=1);var e=this.get("type"),i=Math.max(t,2),n=4*t;return"solid"!==e&&null!=e&&("dashed"===e?[n,n]:[i,i])}},Wo=Vo,Go=Fo([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Uo={getAreaStyle:function(t,e){return Go(this,t,e)}},jo=ae.create,Yo=ae.distSquare,Xo=Math.pow,qo=Math.sqrt,Zo=1e-8,$o=1e-4,Ko=qo(3),Qo=1/3,Jo=jo(),ts=jo(),es=jo();function is(t){return t>-1e-8&&t<Zo}function ns(t){return t>Zo||t<-1e-8}function rs(t,e,i,n,r){var a=1-r;return a*a*(a*t+3*r*e)+r*r*(r*n+3*a*i)}function as(t,e,i,n){var r=1-n;return r*(r*t+2*n*e)+n*n*i}var os=function(t,e,i,n,r,a){var o=n+3*(e-i)-t,s=3*(i-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(is(h)&&is(c)){if(is(s))a[0]=0;else(T=-l/s)>=0&&T<=1&&(a[f++]=T)}else{var p=c*c-4*h*d;if(is(p)){var g=c/h,m=-g/2;(T=-s/o+g)>=0&&T<=1&&(a[f++]=T),m>=0&&m<=1&&(a[f++]=m)}else if(p>0){var v=qo(p),y=h*s+1.5*o*(-c+v),_=h*s+1.5*o*(-c-v);(T=(-s-((y=y<0?-Xo(-y,Qo):Xo(y,Qo))+(_=_<0?-Xo(-_,Qo):Xo(_,Qo))))/(3*o))>=0&&T<=1&&(a[f++]=T)}else{var x=(2*h*s-3*o*c)/(2*qo(h*h*h)),b=Math.acos(x)/3,w=qo(h),S=Math.cos(b),T=(-s-2*w*S)/(3*o),M=(m=(-s+w*(S+Ko*Math.sin(b)))/(3*o),(-s+w*(S-Ko*Math.sin(b)))/(3*o));T>=0&&T<=1&&(a[f++]=T),m>=0&&m<=1&&(a[f++]=m),M>=0&&M<=1&&(a[f++]=M)}}return f},ss=function(t,e,i,n,r){var a=6*i-12*e+6*t,o=9*e+3*n-3*t-9*i,s=3*e-3*t,l=0;if(is(o)){if(ns(a))(h=-s/a)>=0&&h<=1&&(r[l++]=h)}else{var u=a*a-4*o*s;if(is(u))r[0]=-a/(2*o);else if(u>0){var h,c=qo(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},ls=function(t,e,i,n,r,a){var o=(e-t)*r+t,s=(i-e)*r+e,l=(n-i)*r+i,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]=n},us=function(t,e,i,n,r,a,o,s,l,u,h){var c,d,f,p,g,m=.005,v=1/0;Jo[0]=l,Jo[1]=u;for(var y=0;y<1;y+=.05)ts[0]=rs(t,i,r,o,y),ts[1]=rs(e,n,a,s,y),(p=Yo(Jo,ts))<v&&(c=y,v=p);v=1/0;for(var _=0;_<32&&!(m<$o);_++)d=c-m,f=c+m,ts[0]=rs(t,i,r,o,d),ts[1]=rs(e,n,a,s,d),p=Yo(ts,Jo),d>=0&&p<v?(c=d,v=p):(es[0]=rs(t,i,r,o,f),es[1]=rs(e,n,a,s,f),g=Yo(es,Jo),f<=1&&g<v?(c=f,v=g):m*=.5);return h&&(h[0]=rs(t,i,r,o,c),h[1]=rs(e,n,a,s,c)),qo(v)},hs=function(t,e,i,n,r){var a=t-2*e+i,o=2*(e-t),s=t-n,l=0;if(is(a)){if(ns(o))(h=-s/o)>=0&&h<=1&&(r[l++]=h)}else{var u=o*o-4*a*s;if(is(u))(h=-o/(2*a))>=0&&h<=1&&(r[l++]=h);else if(u>0){var h,c=qo(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},cs=function(t,e,i,n,r){var a=(e-t)*n+t,o=(i-e)*n+e,s=(o-a)*n+a;r[0]=t,r[1]=a,r[2]=s,r[3]=s,r[4]=o,r[5]=i},ds=function(t,e,i,n,r,a,o,s,l){var u,h=.005,c=1/0;Jo[0]=o,Jo[1]=s;for(var d=0;d<1;d+=.05){ts[0]=as(t,i,r,d),ts[1]=as(e,n,a,d),(m=Yo(Jo,ts))<c&&(u=d,c=m)}c=1/0;for(var f=0;f<32&&!(h<$o);f++){var p=u-h,g=u+h;ts[0]=as(t,i,r,p),ts[1]=as(e,n,a,p);var m=Yo(ts,Jo);if(p>=0&&m<c)u=p,c=m;else{es[0]=as(t,i,r,g),es[1]=as(e,n,a,g);var v=Yo(es,Jo);g<=1&&v<c?(u=g,c=v):h*=.5}}return l&&(l[0]=as(t,i,r,u),l[1]=as(e,n,a,u)),qo(c)},fs={cubicAt:rs,cubicDerivativeAt:function(t,e,i,n,r){var a=1-r;return 3*(((e-t)*a+2*(i-e)*r)*a+(n-i)*r*r)},cubicRootAt:os,cubicExtrema:ss,cubicSubdivide:ls,cubicProjectPoint:us,quadraticAt:as,quadraticDerivativeAt:function(t,e,i,n){return 2*((1-n)*(e-t)+n*(i-e))},quadraticRootAt:hs,quadraticExtremum:function(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n},quadraticSubdivide:cs,quadraticProjectPoint:ds},ps=Math.min,gs=Math.max,ms=Math.sin,vs=Math.cos,ys=2*Math.PI,_s=ae.create(),xs=ae.create(),bs=ae.create();var ws=[],Ss=[];var Ts=function(t,e,i){if(0!==t.length){var n,r=t[0],a=r[0],o=r[0],s=r[1],l=r[1];for(n=1;n<t.length;n++)r=t[n],a=ps(a,r[0]),o=gs(o,r[0]),s=ps(s,r[1]),l=gs(l,r[1]);e[0]=a,e[1]=s,i[0]=o,i[1]=l}},Ms=function(t,e,i,n,r,a){r[0]=ps(t,i),r[1]=ps(e,n),a[0]=gs(t,i),a[1]=gs(e,n)},Cs=function(t,e,i,n,r,a,o,s,l,u){var h,c=fs.cubicExtrema,d=fs.cubicAt,f=c(t,i,r,o,ws);for(l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0,h=0;h<f;h++){var p=d(t,i,r,o,ws[h]);l[0]=ps(p,l[0]),u[0]=gs(p,u[0])}for(f=c(e,n,a,s,Ss),h=0;h<f;h++){var g=d(e,n,a,s,Ss[h]);l[1]=ps(g,l[1]),u[1]=gs(g,u[1])}l[0]=ps(t,l[0]),u[0]=gs(t,u[0]),l[0]=ps(o,l[0]),u[0]=gs(o,u[0]),l[1]=ps(e,l[1]),u[1]=gs(e,u[1]),l[1]=ps(s,l[1]),u[1]=gs(s,u[1])},Is=function(t,e,i,n,r,a,o,s){var l=fs.quadraticExtremum,u=fs.quadraticAt,h=gs(ps(l(t,i,r),1),0),c=gs(ps(l(e,n,a),1),0),d=u(t,i,r,h),f=u(e,n,a,c);o[0]=ps(t,r,d),o[1]=ps(e,a,f),s[0]=gs(t,r,d),s[1]=gs(e,a,f)},As=function(t,e,i,n,r,a,o,s,l){var u=ae.min,h=ae.max,c=Math.abs(r-a);if(c%ys<1e-4&&c>1e-4)return s[0]=t-i,s[1]=e-n,l[0]=t+i,void(l[1]=e+n);if(_s[0]=vs(r)*i+t,_s[1]=ms(r)*n+e,xs[0]=vs(a)*i+t,xs[1]=ms(a)*n+e,u(s,_s,xs),h(l,_s,xs),(r%=ys)<0&&(r+=ys),(a%=ys)<0&&(a+=ys),r>a&&!o?a+=ys:r<a&&o&&(r+=ys),o){var d=a;a=r,r=d}for(var f=0;f<a;f+=Math.PI/2)f>r&&(bs[0]=vs(f)*i+t,bs[1]=ms(f)*n+e,u(s,bs,s),h(l,bs,l))},Ds={fromPoints:Ts,fromLine:Ms,fromCubic:Cs,fromQuadratic:Is,fromArc:As},ks=on.devicePixelRatio,Os={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Ps=[],Ls=[],Rs=[],Es=[],Bs=Math.min,zs=Math.max,Ns=Math.cos,Fs=Math.sin,Hs=Math.sqrt,Vs=Math.abs,Ws="undefined"!=typeof Float32Array,Gs=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};Gs.prototype={constructor:Gs,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e,i){i=i||0,this._ux=Vs(i/ks/t)||0,this._uy=Vs(i/ks/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(Os.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var i=Vs(t-this._xi)>this._ux||Vs(e-this._yi)>this._uy||this._len<5;return this.addData(Os.L,t,e),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),i&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,i,n,r,a){return this.addData(Os.C,t,e,i,n,r,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,r,a):this._ctx.bezierCurveTo(t,e,i,n,r,a)),this._xi=r,this._yi=a,this},quadraticCurveTo:function(t,e,i,n){return this.addData(Os.Q,t,e,i,n),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,i,n):this._ctx.quadraticCurveTo(t,e,i,n)),this._xi=i,this._yi=n,this},arc:function(t,e,i,n,r,a){return this.addData(Os.A,t,e,i,i,n,r-n,0,a?0:1),this._ctx&&this._ctx.arc(t,e,i,n,r,a),this._xi=Ns(r)*i+t,this._yi=Fs(r)*i+e,this},arcTo:function(t,e,i,n,r){return this._ctx&&this._ctx.arcTo(t,e,i,n,r),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData(Os.R,t,e,i,n),this},closePath:function(){this.addData(Os.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,i),t.closePath()),this._xi=e,this._yi=i,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,i=0;i<t.length;i++)e+=t[i];this._dashSum=e}return this},setLineDashOffset:function(t){return this._dashOffset=t,this},len:function(){return this._len},setData:function(t){var e=t.length;this.data&&this.data.length===e||!Ws||(this.data=new Float32Array(e));for(var i=0;i<e;i++)this.data[i]=t[i];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,i=0,n=this._len,r=0;r<e;r++)i+=t[r].len();Ws&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i));for(r=0;r<e;r++)for(var a=t[r].data,o=0;o<a.length;o++)this.data[n++]=a[o];this._len=n},addData:function(t){if(this._saveData){var e=this.data;this._len+arguments.length>e.length&&(this._expandData(),e=this.data);for(var i=0;i<arguments.length;i++)e[this._len++]=arguments[i];this._prevCmd=t}},_expandData:function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(t,e){var i,n,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=Hs(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*(i=o[n=this._dashIdx]),p+=c*i,this._dashIdx=(n+1)%g,h>0&&f<l||h<0&&f>l||c>0&&p<u||c<0&&p>u||s[n%2?"moveTo":"lineTo"](h>=0?Bs(f,t):zs(f,t),c>=0?Bs(p,e):zs(p,e));h=f-t,c=p-e,this._dashOffset=-Hs(h*h+c*c)},_dashedBezierTo:function(t,e,i,n,r,a){var o,s,l,u,h,c=this._dashSum,d=this._dashOffset,f=this._lineDash,p=this._ctx,g=this._xi,m=this._yi,v=fs.cubicAt,y=0,_=this._dashIdx,x=f.length,b=0;for(d<0&&(d=c+d),d%=c,o=0;o<1;o+=.1)s=v(g,t,i,r,o+.1)-v(g,t,i,r,o),l=v(m,e,n,a,o+.1)-v(m,e,n,a,o),y+=Hs(s*s+l*l);for(;_<x&&!((b+=f[_])>d);_++);for(o=(b-d)/y;o<=1;)u=v(g,t,i,r,o),h=v(m,e,n,a,o),_%2?p.moveTo(u,h):p.lineTo(u,h),o+=f[_]/y,_=(_+1)%x;_%2!=0&&p.lineTo(r,a),s=r-u,l=a-h,this._dashOffset=-Hs(s*s+l*l)},_dashedQuadraticTo:function(t,e,i,n){var r=i,a=n;i=(i+2*t)/3,n=(n+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,i,n,r,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,Ws&&(this.data=new Float32Array(t)))},getBoundingRect:function(){Ps[0]=Ps[1]=Rs[0]=Rs[1]=Number.MAX_VALUE,Ls[0]=Ls[1]=Es[0]=Es[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,i=0,n=0,r=0,a=0;a<t.length;){var o=t[a++];switch(1===a&&(n=e=t[a],r=i=t[a+1]),o){case Os.M:e=n=t[a++],i=r=t[a++],Rs[0]=n,Rs[1]=r,Es[0]=n,Es[1]=r;break;case Os.L:Ds.fromLine(e,i,t[a],t[a+1],Rs,Es),e=t[a++],i=t[a++];break;case Os.C:Ds.fromCubic(e,i,t[a++],t[a++],t[a++],t[a++],t[a],t[a+1],Rs,Es),e=t[a++],i=t[a++];break;case Os.Q:Ds.fromQuadratic(e,i,t[a++],t[a++],t[a],t[a+1],Rs,Es),e=t[a++],i=t[a++];break;case Os.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&&(n=Ns(c)*u+s,r=Fs(c)*h+l),Ds.fromArc(s,l,u,h,c,d,f,Rs,Es),e=Ns(d)*u+s,i=Fs(d)*h+l;break;case Os.R:n=e=t[a++],r=i=t[a++];var p=t[a++],g=t[a++];Ds.fromLine(n,r,n+p,r+g,Rs,Es);break;case Os.Z:e=n,i=r}ae.min(Ps,Ps,Rs),ae.max(Ls,Ls,Es)}return 0===a&&(Ps[0]=Ps[1]=Ls[0]=Ls[1]=0),new An(Ps[0],Ps[1],Ls[0]-Ps[0],Ls[1]-Ps[1])},rebuildPath:function(t){for(var e,i,n,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=n=s[c],i=r=s[c+1]),d){case Os.M:e=n=s[c++],i=r=s[c++],t.moveTo(n,r);break;case Os.L:a=s[c++],o=s[c++],(Vs(a-n)>l||Vs(o-r)>u||c===h-1)&&(t.lineTo(a,o),n=a,r=o);break;case Os.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],r=s[c-1];break;case Os.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],r=s[c-1];break;case Os.A:var f=s[c++],p=s[c++],g=s[c++],m=s[c++],v=s[c++],y=s[c++],_=s[c++],x=s[c++],b=g>m?g:m,w=g>m?1:g/m,S=g>m?m/g:1,T=v+y;Math.abs(g-m)>.001?(t.translate(f,p),t.rotate(_),t.scale(w,S),t.arc(0,0,b,v,T,1-x),t.scale(1/w,1/S),t.rotate(-_),t.translate(-f,-p)):t.arc(f,p,b,v,T,1-x),1===c&&(e=Ns(v)*g+f,i=Fs(v)*m+p),n=Ns(T)*g+f,r=Fs(T)*m+p;break;case Os.R:e=n=s[c],i=r=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case Os.Z:t.closePath(),n=e,r=i}}}},Gs.CMD=Os;var Us=Gs;var js={containStroke:function(t,e,i,n,r,a,o){if(0===r)return!1;var s=r,l=0;if(o>e+s&&o>n+s||o<e-s&&o<n-s||a>t+s&&a>i+s||a<t-s&&a<i-s)return!1;if(t===i)return Math.abs(a-t)<=s/2;var u=(l=(e-n)/(t-i))*a-o+(t*n-i*e)/(t-i);return u*u/(l*l+1)<=s/2*s/2}};var Ys={containStroke:function(t,e,i,n,r,a,o,s,l,u,h){if(0===l)return!1;var c=l;return!(h>e+c&&h>n+c&&h>a+c&&h>s+c||h<e-c&&h<n-c&&h<a-c&&h<s-c||u>t+c&&u>i+c&&u>r+c&&u>o+c||u<t-c&&u<i-c&&u<r-c&&u<o-c)&&fs.cubicProjectPoint(t,e,i,n,r,a,o,s,u,h,null)<=c/2}},Xs=fs.quadraticProjectPoint;var qs={containStroke:function(t,e,i,n,r,a,o,s,l){if(0===o)return!1;var u=o;return!(l>e+u&&l>n+u&&l>a+u||l<e-u&&l<n-u&&l<a-u||s>t+u&&s>i+u&&s>r+u||s<t-u&&s<i-u&&s<r-u)&&Xs(t,e,i,n,r,a,s,l,null)<=u/2}},Zs=2*Math.PI;var $s={normalizeRadian:function(t){return(t%=Zs)<0&&(t+=Zs),t}},Ks=$s.normalizeRadian,Qs=2*Math.PI;var Js={containStroke:function(t,e,i,n,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>i||h+u<i)return!1;if(Math.abs(n-r)%Qs<1e-4)return!0;if(a){var c=n;n=Ks(r),r=Ks(c)}else n=Ks(n),r=Ks(r);n>r&&(r+=Qs);var d=Math.atan2(l,s);return d<0&&(d+=Qs),d>=n&&d<=r||d+Qs>=n&&d+Qs<=r}};var tl=function(t,e,i,n,r,a){if(a>e&&a>n||a<e&&a<n)return 0;if(n===e)return 0;var o=n<e?1:-1,s=(a-e)/(n-e);1!==s&&0!==s||(o=n<e?.5:-.5);var l=s*(i-t)+t;return l===r?1/0:l>r?o:0},el=$s.normalizeRadian,il=Us.CMD,nl=2*Math.PI;var rl=[-1,-1,-1],al=[-1,-1];function ol(t,e,i,n,r,a,o,s,l,u){if(u>e&&u>n&&u>a&&u>s||u<e&&u<n&&u<a&&u<s)return 0;var h,c=fs.cubicRootAt(e,n,a,s,u,rl);if(0===c)return 0;for(var d,f,p=0,g=-1,m=0;m<c;m++){var v=rl[m],y=0===v||1===v?.5:1;fs.cubicAt(t,i,r,o,v)<l||(g<0&&(g=fs.cubicExtrema(e,n,a,s,al),al[1]<al[0]&&g>1&&(h=void 0,h=al[0],al[0]=al[1],al[1]=h),d=fs.cubicAt(e,n,a,s,al[0]),g>1&&(f=fs.cubicAt(e,n,a,s,al[1]))),2===g?v<al[0]?p+=d<e?y:-y:v<al[1]?p+=f<d?y:-y:p+=s<f?y:-y:v<al[0]?p+=d<e?y:-y:p+=s<d?y:-y)}return p}function sl(t,e,i,n,r,a,o,s){if(s>e&&s>n&&s>a||s<e&&s<n&&s<a)return 0;var l=fs.quadraticRootAt(e,n,a,s,rl);if(0===l)return 0;var u=fs.quadraticExtremum(e,n,a);if(u>=0&&u<=1){for(var h=0,c=fs.quadraticAt(e,n,a,u),d=0;d<l;d++){var f=0===rl[d]||1===rl[d]?.5:1;fs.quadraticAt(t,i,r,rl[d])<o||(rl[d]<u?h+=c<e?f:-f:h+=a<c?f:-f)}return h}f=0===rl[0]||1===rl[0]?.5:1;return fs.quadraticAt(t,i,r,rl[0])<o?0:a<e?f:-f}function ll(t,e,i,n,r,a,o,s){if((s-=e)>i||s<-i)return 0;var l=Math.sqrt(i*i-s*s);rl[0]=-l,rl[1]=l;var u=Math.abs(n-r);if(u<1e-4)return 0;if(u%nl<1e-4){n=0,r=nl;var h=a?1:-1;return o>=rl[0]+t&&o<=rl[1]+t?h:0}if(a){l=n;n=el(r),r=el(l)}else n=el(n),r=el(r);n>r&&(r+=nl);for(var c=0,d=0;d<2;d++){var f=rl[d];if(f+t>o){var p=Math.atan2(s,f);h=a?1:-1;p<0&&(p=nl+p),(p>=n&&p<=r||p+nl>=n&&p+nl<=r)&&(p>Math.PI/2&&p<1.5*Math.PI&&(h=-h),c+=h)}}return c}function ul(t,e,i,n,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===il.M&&d>1&&(i||(s+=tl(l,u,h,c,n,r))),1===d&&(h=l=t[d],c=u=t[d+1]),f){case il.M:l=h=t[d++],u=c=t[d++];break;case il.L:if(i){if(js.containStroke(l,u,t[d],t[d+1],e,n,r))return!0}else s+=tl(l,u,t[d],t[d+1],n,r)||0;l=t[d++],u=t[d++];break;case il.C:if(i){if(Ys.containStroke(l,u,t[d++],t[d++],t[d++],t[d++],t[d],t[d+1],e,n,r))return!0}else s+=ol(l,u,t[d++],t[d++],t[d++],t[d++],t[d],t[d+1],n,r)||0;l=t[d++],u=t[d++];break;case il.Q:if(i){if(qs.containStroke(l,u,t[d++],t[d++],t[d],t[d+1],e,n,r))return!0}else s+=sl(l,u,t[d++],t[d++],t[d],t[d+1],n,r)||0;l=t[d++],u=t[d++];break;case il.A:var p=t[d++],g=t[d++],m=t[d++],v=t[d++],y=t[d++],_=t[d++];d+=1;var x=1-t[d++],b=Math.cos(y)*m+p,w=Math.sin(y)*v+g;d>1?s+=tl(l,u,b,w,n,r):(h=b,c=w);var S=(n-p)*v/m+p;if(i){if(Js.containStroke(p,g,v,y,y+_,x,e,S,r))return!0}else s+=ll(p,g,v,y,y+_,x,S,r);l=Math.cos(y+_)*m+p,u=Math.sin(y+_)*v+g;break;case il.R:h=l=t[d++],c=u=t[d++];b=h+t[d++],w=c+t[d++];if(i){if(js.containStroke(h,c,b,c,e,n,r)||js.containStroke(b,c,b,w,e,n,r)||js.containStroke(b,w,h,w,e,n,r)||js.containStroke(h,w,h,c,e,n,r))return!0}else s+=tl(b,c,b,w,n,r),s+=tl(h,w,h,c,n,r);break;case il.Z:if(i){if(js.containStroke(l,u,h,c,e,n,r))return!0}else s+=tl(l,u,h,c,n,r);l=h,u=c}}return i||(a=u,o=c,Math.abs(a-o)<1e-4)||(s+=tl(l,u,h,c,n,r)||0),0!==s}var hl={contain:function(t,e,i){return ul(t,0,!1,e,i)},containStroke:function(t,e,i,n){return ul(t,e,!0,i,n)}},cl=Jn.prototype.getCanvasPattern,dl=Math.abs,fl=new Us(!0);function pl(t){ba.call(this,t),this.path=null}pl.prototype={constructor:pl,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(t,e){var i,n=this.style,r=this.path||fl,a=n.hasStroke(),o=n.hasFill(),s=n.fill,l=n.stroke,u=o&&!!s.colorStops,h=a&&!!l.colorStops,c=o&&!!s.image,d=a&&!!l.image;(n.bind(t,this,e),this.setTransform(t),this.__dirty)&&(u&&(i=i||this.getBoundingRect(),this._fillGradient=n.getGradient(t,s,i)),h&&(i=i||this.getBoundingRect(),this._strokeGradient=n.getGradient(t,l,i)));u?t.fillStyle=this._fillGradient:c&&(t.fillStyle=cl.call(s,t)),h?t.strokeStyle=this._strokeGradient:d&&(t.strokeStyle=cl.call(l,t));var f=n.lineDash,p=n.lineDashOffset,g=!!t.setLineDash,m=this.getGlobalScale();if(r.setScale(m[0],m[1],this.segmentIgnoreThreshold),this.__dirtyPath||f&&!g&&a?(r.beginPath(t),f&&!g&&(r.setLineDash(f),r.setLineDashOffset(p)),this.buildPath(r,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),o)if(null!=n.fillOpacity){var v=t.globalAlpha;t.globalAlpha=n.fillOpacity*n.opacity,r.fill(t),t.globalAlpha=v}else r.fill(t);if(f&&g&&(t.setLineDash(f),t.lineDashOffset=p),a)if(null!=n.strokeOpacity){v=t.globalAlpha;t.globalAlpha=n.strokeOpacity*n.opacity,r.stroke(t),t.globalAlpha=v}else r.stroke(t);f&&g&&t.setLineDash([]),null!=n.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(t,e,i){},createPathProxy:function(){this.path=new Us},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;n||(n=this.path=new Us),this.__dirtyPath&&(n.beginPath(),this.buildPath(n,this.shape,!1)),t=n.getBoundingRect()}if(this._rect=t,e.hasStroke()){var r=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){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 i=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),r=this.style;if(t=i[0],e=i[1],n.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)),hl.containStroke(a,o/s,t,e)))return!0}if(r.hasFill())return hl.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):ba.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(zt.isObject(t))for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);else i[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&dl(t[0]-1)>1e-10&&dl(t[3]-1)>1e-10?Math.sqrt(dl(t[0]*t[3]-t[2]*t[1])):1}},pl.extend=function(t){var e=function(e){pl.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var n=this.shape;for(var r in i)!n.hasOwnProperty(r)&&i.hasOwnProperty(r)&&(n[r]=i[r])}t.init&&t.init.call(this,e)};for(var i in zt.inherits(e,pl),t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},zt.inherits(pl,ba);var gl=pl,ml=ae.applyTransform,vl=Us.CMD,yl=[[],[],[]],_l=Math.sqrt,xl=Math.atan2;var bl=function(t,e){var i,n,r,a,o,s=t.data,l=vl.M,u=vl.C,h=vl.L,c=vl.R,d=vl.A,f=vl.Q;for(r=0,a=0;r<s.length;){switch(i=s[r++],a=r,n=0,i){case l:case h:n=1;break;case u:n=3;break;case f:n=2;break;case d:var p=e[4],g=e[5],m=_l(e[0]*e[0]+e[1]*e[1]),v=_l(e[2]*e[2]+e[3]*e[3]),y=xl(-e[1]/v,e[0]/m);s[r]*=m,s[r++]+=p,s[r]*=v,s[r++]+=g,s[r++]*=m,s[r++]*=v,s[r++]+=y,s[r++]+=y,a=r+=2;break;case c:_[0]=s[r++],_[1]=s[r++],ml(_,_,e),s[a++]=_[0],s[a++]=_[1],_[0]+=s[r++],_[1]+=s[r++],ml(_,_,e),s[a++]=_[0],s[a++]=_[1]}for(o=0;o<n;o++){var _;(_=yl[o])[0]=s[r++],_[1]=s[r++],ml(_,_,e),s[a++]=_[0],s[a++]=_[1]}}},wl=Math.sqrt,Sl=Math.sin,Tl=Math.cos,Ml=Math.PI,Cl=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},Il=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(Cl(t)*Cl(e))},Al=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Il(t,e))};function Dl(t,e,i,n,r,a,o,s,l,u,h){var c=l*(Ml/180),d=Tl(c)*(t-i)/2+Sl(c)*(e-n)/2,f=-1*Sl(c)*(t-i)/2+Tl(c)*(e-n)/2,p=d*d/(o*o)+f*f/(s*s);p>1&&(o*=wl(p),s*=wl(p));var g=(r===a?-1:1)*wl((o*o*(s*s)-o*o*(f*f)-s*s*(d*d))/(o*o*(f*f)+s*s*(d*d)))||0,m=g*o*f/s,v=g*-s*d/o,y=(t+i)/2+Tl(c)*m-Sl(c)*v,_=(e+n)/2+Sl(c)*m+Tl(c)*v,x=Al([1,0],[(d-m)/o,(f-v)/s]),b=[(d-m)/o,(f-v)/s],w=[(-1*d-m)/o,(-1*f-v)/s],S=Al(b,w);Il(b,w)<=-1&&(S=Ml),Il(b,w)>=1&&(S=0),0===a&&S>0&&(S-=2*Ml),1===a&&S<0&&(S+=2*Ml),h.addData(u,y,_,o,s,x,S,c,a)}var kl=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Ol=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Pl(t,e){var i=function(t){if(!t)return new Us;for(var e,i=0,n=0,r=i,a=n,o=new Us,s=Us.CMD,l=t.match(kl),u=0;u<l.length;u++){for(var h,c=l[u],d=c.charAt(0),f=c.match(Ol)||[],p=f.length,g=0;g<p;g++)f[g]=parseFloat(f[g]);for(var m=0;m<p;){var v,y,_,x,b,w,S,T=i,M=n;switch(d){case"l":i+=f[m++],n+=f[m++],h=s.L,o.addData(h,i,n);break;case"L":i=f[m++],n=f[m++],h=s.L,o.addData(h,i,n);break;case"m":i+=f[m++],n+=f[m++],h=s.M,o.addData(h,i,n),r=i,a=n,d="l";break;case"M":i=f[m++],n=f[m++],h=s.M,o.addData(h,i,n),r=i,a=n,d="L";break;case"h":i+=f[m++],h=s.L,o.addData(h,i,n);break;case"H":i=f[m++],h=s.L,o.addData(h,i,n);break;case"v":n+=f[m++],h=s.L,o.addData(h,i,n);break;case"V":n=f[m++],h=s.L,o.addData(h,i,n);break;case"C":h=s.C,o.addData(h,f[m++],f[m++],f[m++],f[m++],f[m++],f[m++]),i=f[m-2],n=f[m-1];break;case"c":h=s.C,o.addData(h,f[m++]+i,f[m++]+n,f[m++]+i,f[m++]+n,f[m++]+i,f[m++]+n),i+=f[m-2],n+=f[m-1];break;case"S":v=i,y=n;var C=o.len(),I=o.data;e===s.C&&(v+=i-I[C-4],y+=n-I[C-3]),h=s.C,T=f[m++],M=f[m++],i=f[m++],n=f[m++],o.addData(h,v,y,T,M,i,n);break;case"s":v=i,y=n,C=o.len(),I=o.data,e===s.C&&(v+=i-I[C-4],y+=n-I[C-3]),h=s.C,T=i+f[m++],M=n+f[m++],i+=f[m++],n+=f[m++],o.addData(h,v,y,T,M,i,n);break;case"Q":T=f[m++],M=f[m++],i=f[m++],n=f[m++],h=s.Q,o.addData(h,T,M,i,n);break;case"q":T=f[m++]+i,M=f[m++]+n,i+=f[m++],n+=f[m++],h=s.Q,o.addData(h,T,M,i,n);break;case"T":v=i,y=n,C=o.len(),I=o.data,e===s.Q&&(v+=i-I[C-4],y+=n-I[C-3]),i=f[m++],n=f[m++],h=s.Q,o.addData(h,v,y,i,n);break;case"t":v=i,y=n,C=o.len(),I=o.data,e===s.Q&&(v+=i-I[C-4],y+=n-I[C-3]),i+=f[m++],n+=f[m++],h=s.Q,o.addData(h,v,y,i,n);break;case"A":_=f[m++],x=f[m++],b=f[m++],w=f[m++],S=f[m++],Dl(T=i,M=n,i=f[m++],n=f[m++],w,S,_,x,b,h=s.A,o);break;case"a":_=f[m++],x=f[m++],b=f[m++],w=f[m++],S=f[m++],Dl(T=i,M=n,i+=f[m++],n+=f[m++],w,S,_,x,b,h=s.A,o)}}"z"!==d&&"Z"!==d||(h=s.Z,o.addData(h),i=r,n=a),e=h}return o.toStatic(),o}(t);return(e=e||{}).buildPath=function(t){if(t.setData){t.setData(i.data),(e=t.getContext())&&t.rebuildPath(e)}else{var e=t;i.rebuildPath(e)}},e.applyTransform=function(t){bl(i,t),this.dirty(!0)},e}var Ll=function(t,e){for(var i=[],n=t.length,r=0;r<n;r++){var a=t[r];a.path||a.createPathProxy(),a.__dirtyPath&&a.buildPath(a.path,a.shape,!0),i.push(a.path)}var o=new gl(e);return o.createPathProxy(),o.buildPath=function(t){t.appendPath(i);var e=t.getContext();e&&t.rebuildPath(e)},o},Rl={createFromString:function(t,e){return new gl(Pl(t,e))},extendFromString:function(t,e){return gl.extend(Pl(t,e))},mergePath:Ll},El=Wn.ContextCachedBy,Bl=function(t){ba.call(this,t)};Bl.prototype={constructor:Bl,type:"text",brush:function(t,e){var i=this.style;this.__dirty&&ga.normalizeTextStyle(i,!0),i.fill=i.stroke=i.shadowBlur=i.shadowColor=i.shadowOffsetX=i.shadowOffsetY=null;var n=i.text;null!=n&&(n+=""),ga.needDrawText(n,i)?(this.setTransform(t),ga.renderText(this,t,n,i,null,e),this.restoreTransform(t)):t.__attrCachedBy=El.NONE},getBoundingRect:function(){var t=this.style;if(this.__dirty&&ga.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,ga.getStroke(t.textStroke,t.textStrokeWidth)){var i=t.textStrokeWidth;e.x-=i/2,e.y-=i/2,e.width+=i,e.height+=i}this._rect=e}return this._rect}},zt.inherits(Bl,ba);var zl=Bl,Nl=gl.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,i){i&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI,!0)}}),Fl=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]];var Hl=function(t){return Q.browser.ie&&Q.browser.version>=11?function(){var e,i=this.__clipPaths,n=this.style;if(i)for(var r=0;r<i.length;r++){var a=i[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<Fl.length;l++)Fl[l][2]=n[Fl[l][0]],n[Fl[l][0]]=Fl[l][1];e=!0;break}}if(t.apply(this,arguments),e)for(l=0;l<Fl.length;l++)n[Fl[l][0]]=Fl[l][2]}:t},Vl=gl.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:Hl(gl.prototype.brush),buildPath:function(t,e){var i=e.cx,n=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+i,h*r+n),t.lineTo(u*a+i,h*a+n),t.arc(i,n,a,o,s,!l),t.lineTo(Math.cos(s)*r+i,Math.sin(s)*r+n),0!==r&&t.arc(i,n,r,s,o,l),t.closePath()}}),Wl=gl.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=2*Math.PI;t.moveTo(i+e.r,n),t.arc(i,n,e.r,0,r,!1),t.moveTo(i+e.r0,n),t.arc(i,n,e.r0,0,r,!0)}}),Gl=Wl,Ul=ae.distance;function jl(t,e,i,n,r,a,o){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*o+(-3*(e-i)-2*s-l)*a+s*r+e}var Yl=function(t,e){for(var i=t.length,n=[],r=0,a=1;a<i;a++)r+=Ul(t[a-1],t[a]);var o=r/2;for(o=o<i?i:o,a=0;a<o;a++){var s,l,u,h=a/(o-1)*(e?i:i-1),c=Math.floor(h),d=h-c,f=t[c%i];e?(s=t[(c-1+i)%i],l=t[(c+1)%i],u=t[(c+2)%i]):(s=t[0===c?c:c-1],l=t[c>i-2?i-1:c+1],u=t[c>i-3?i-1:c+2]);var p=d*d,g=d*p;n.push([jl(s[0],f[0],l[0],u[0],d,p,g),jl(s[1],f[1],l[1],u[1],d,p,g)])}return n},Xl=ae.min,ql=ae.max,Zl=ae.scale,$l=ae.distance,Kl=ae.add,Ql=ae.clone,Jl=ae.sub;var tu=function(t,e,i,n){var r,a,o,s,l=[],u=[],h=[],c=[];if(n){o=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=t.length;d<f;d++)Xl(o,o,t[d]),ql(s,s,t[d]);Xl(o,o,n[0]),ql(s,s,n[1])}for(d=0,f=t.length;d<f;d++){var p=t[d];if(i)r=t[d?d-1:f-1],a=t[(d+1)%f];else{if(0===d||d===f-1){l.push(Ql(t[d]));continue}r=t[d-1],a=t[d+1]}Jl(u,a,r),Zl(u,u,e);var g=$l(p,r),m=$l(p,a),v=g+m;0!==v&&(g/=v,m/=v),Zl(h,u,-g),Zl(c,u,m);var y=Kl([],p,h),_=Kl([],p,c);n&&(ql(y,y,o),Xl(y,y,s),ql(_,_,o),Xl(_,_,s)),l.push(y),l.push(_)}return i&&l.push(l.shift()),l};var eu=function(t,e,i){var n=e.points,r=e.smooth;if(n&&n.length>=2){if(r&&"spline"!==r){var a=tu(n,r,i,e.smoothConstraint);t.moveTo(n[0][0],n[0][1]);for(var o=n.length,s=0;s<(i?o:o-1);s++){var l=a[2*s],u=a[2*s+1],h=n[(s+1)%o];t.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{"spline"===r&&(n=Yl(n,i)),t.moveTo(n[0][0],n[0][1]);s=1;for(var c=n.length;s<c;s++)t.lineTo(n[s][0],n[s][1])}i&&t.closePath()}},iu={buildPath:eu},nu=gl.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){iu.buildPath(t,e,!0)}}),ru=gl.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){iu.buildPath(t,e,!1)}}),au=Math.round;function ou(t,e,i){if(!e)return t;var n=au(2*t);return(n+au(e))%2==0?n/2:(n+(i?1:-1))/2}var su=function(t,e,i){if(e){var n=e.x1,r=e.x2,a=e.y1,o=e.y2;t.x1=n,t.x2=r,t.y1=a,t.y2=o;var s=i&&i.lineWidth;s&&(au(2*n)===au(2*r)&&(t.x1=t.x2=ou(n,s,!0)),au(2*a)===au(2*o)&&(t.y1=t.y2=ou(a,s,!0)))}},lu=function(t,e,i){if(e){var n=e.x,r=e.y,a=e.width,o=e.height;t.x=n,t.y=r,t.width=a,t.height=o;var s=i&&i.lineWidth;s&&(t.x=ou(n,s,!0),t.y=ou(r,s,!0),t.width=Math.max(ou(n+a,s,!1)-t.x,0===a?0:1),t.height=Math.max(ou(r+o,s,!1)-t.y,0===o?0:1))}},uu={subPixelOptimizeLine:su,subPixelOptimizeRect:lu,subPixelOptimize:ou},hu=uu.subPixelOptimizeRect,cu={},du=gl.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var i,n,r,a;this.subPixelOptimize?(hu(cu,e,this.style),i=cu.x,n=cu.y,r=cu.width,a=cu.height,cu.r=e.r,e=cu):(i=e.x,n=e.y,r=e.width,a=e.height),e.r?Fr.buildPath(t,e):t.rect(i,n,r,a),t.closePath()}}),fu=uu.subPixelOptimizeLine,pu={},gu=gl.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i,n,r,a;this.subPixelOptimize?(fu(pu,e,this.style),i=pu.x1,n=pu.y1,r=pu.x2,a=pu.y2):(i=e.x1,n=e.y1,r=e.x2,a=e.y2);var o=e.percent;0!==o&&(t.moveTo(i,n),o<1&&(r=i*(1-o)+r*o,a=n*(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]}}),mu=fs.quadraticSubdivide,vu=fs.cubicSubdivide,yu=fs.quadraticAt,_u=fs.cubicAt,xu=fs.quadraticDerivativeAt,bu=fs.cubicDerivativeAt,wu=[];function Su(t,e,i){var n=t.cpx2,r=t.cpy2;return null===n||null===r?[(i?bu:_u)(t.x1,t.cpx1,t.cpx2,t.x2,e),(i?bu:_u)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(i?xu:yu)(t.x1,t.cpx1,t.x2,e),(i?xu:yu)(t.y1,t.cpy1,t.y2,e)]}var Tu=gl.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.x1,n=e.y1,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(i,n),null==l||null==u?(h<1&&(mu(i,o,r,h,wu),o=wu[1],r=wu[2],mu(n,s,a,h,wu),s=wu[1],a=wu[2]),t.quadraticCurveTo(o,s,r,a)):(h<1&&(vu(i,o,l,r,h,wu),o=wu[1],l=wu[2],r=wu[3],vu(n,s,u,a,h,wu),s=wu[1],u=wu[2],a=wu[3]),t.bezierCurveTo(o,s,l,u,r,a)))},pointAt:function(t){return Su(this.shape,t,!1)},tangentAt:function(t){var e=Su(this.shape,t,!0);return ae.normalize(e,e)}}),Mu=gl.extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.cx,n=e.cy,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+i,u*r+n),t.arc(i,n,r,a,o,!s)}}),Cu=gl.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,i=0;i<e.length;i++)t=t||e[i].__dirtyPath;this.__dirtyPath=t,this.__dirty=this.__dirty||t},beforeBrush:function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),i=0;i<t.length;i++)t[i].path||t[i].createPathProxy(),t[i].path.setScale(e[0],e[1],t[i].segmentIgnoreThreshold)},buildPath:function(t,e){for(var i=e.paths||[],n=0;n<i.length;n++)i[n].buildPath(t,i[n].shape,!0)},afterBrush:function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),gl.prototype.getBoundingRect.call(this)}}),Iu=Cu,Au=function(t){this.colorStops=t||[]};Au.prototype={constructor:Au,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}};var Du=Au,ku=function(t,e,i,n,r,a){this.x=null==t?0:t,this.y=null==e?0:e,this.x2=null==i?1:i,this.y2=null==n?0:n,this.type="linear",this.global=a||!1,Du.call(this,r)};ku.prototype={constructor:ku},zt.inherits(ku,Du);var Ou=ku,Pu=function(t,e,i,n,r){this.x=null==t?.5:t,this.y=null==e?.5:e,this.r=null==i?.5:i,this.type="radial",this.global=r||!1,Du.call(this,n)};Pu.prototype={constructor:Pu},zt.inherits(Pu,Du);var Lu=Pu,Ru=zt.inherits;function Eu(t){ba.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}Eu.prototype.incremental=!0,Eu.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},Eu.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.dirty()},Eu.prototype.addDisplayables=function(t,e){e=e||!1;for(var i=0;i<t.length;i++)this.addDisplayable(t[i],e)},Eu.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])},Eu.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}},Eu.prototype.brush=function(t,e){for(var i=this._cursor;i<this._displayables.length;i++){(n=this._displayables[i]).beforeBrush&&n.beforeBrush(t),n.brush(t,i===this._cursor?null:this._displayables[i-1]),n.afterBrush&&n.afterBrush(t)}this._cursor=i;for(i=0;i<this._temporaryDisplayables.length;i++){var n;(n=this._temporaryDisplayables[i]).beforeBrush&&n.beforeBrush(t),n.brush(t,0===i?null:this._temporaryDisplayables[i-1]),n.afterBrush&&n.afterBrush(t)}this._temporaryDisplayables=[],this.notClear=!0};var Bu=[];Eu.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new An(1/0,1/0,-1/0,-1/0),e=0;e<this._displayables.length;e++){var i=this._displayables[e],n=i.getBoundingRect().clone();i.needLocalTransform()&&n.applyTransform(i.getLocalTransform(Bu)),t.union(n)}this._rect=t}return this._rect},Eu.prototype.contain=function(t,e){var i=this.transformCoordToLocal(t,e);if(this.getBoundingRect().contain(i[0],i[1]))for(var n=0;n<this._displayables.length;n++){if(this._displayables[n].contain(t,e))return!0}return!1},Ru(Eu,ba);var zu=Eu,Nu=Sa,Fu=kn,Hu=zl,Vu=Nl,Wu=Vl,Gu=Gl,Uu=nu,ju=ru,Yu=du,Xu=gu,qu=Tu,Zu=Mu,$u=Iu,Ku=Ou,Qu=Lu,Ju=An,th=zu,eh=Math.max,ih=Math.min,nh={},rh="emphasis",ah="normal",oh=1,sh={},lh={};function uh(t,e){lh[t]=e}function hh(t,e,i,n){var r=Rl.createFromString(t,e);return i&&("center"===n&&(i=ch(i,r.getBoundingRect())),fh(r,i)),r}function ch(t,e){var i,n=e.width/e.height,r=t.height*n;return i=r<=t.width?t.height:(r=t.width)/n,{x:t.x+t.width/2-r/2,y:t.y+t.height/2-i/2,width:r,height:i}}var dh=Rl.mergePath;function fh(t,e){if(t.applyTransform){var i=t.getBoundingRect().calculateTransform(e);t.applyTransform(i)}}var ph=uu.subPixelOptimize;function gh(t){return null!=t&&"none"!==t}var mh=zt.createHashMap(),vh=0;function yh(t){var e=t.__hoverStl;if(e&&!t.__highlighted){var i=t.__zr,n=t.useHoverLayer&&i&&"canvas"===i.painter.type;if(t.__highlighted=n?"layer":"plain",!(t.isGroup||!i&&t.useHoverLayer)){var r=t,a=t.style;n&&(a=(r=i.addHover(t)).style),Rh(a),n||function(t){if(t.__hoverStlDirty){t.__hoverStlDirty=!1;var e=t.__hoverStl;if(e){var i=t.__cachedNormalStl={};t.__cachedNormalZ2=t.z2;var n=t.style;for(var r in e)null!=e[r]&&(i[r]=n[r]);i.fill=n.fill,i.stroke=n.stroke}else t.__cachedNormalStl=t.__cachedNormalZ2=null}}(r),a.extendFrom(e),_h(a,e,"fill"),_h(a,e,"stroke"),Lh(a),n||(t.dirty(!1),t.z2+=1)}}}function _h(t,e,i){!gh(e[i])&&gh(t[i])&&(t[i]=function(t){if("string"!=typeof t)return t;var e=mh.get(t);return e||(e=Vi.lift(t,-.1),vh<1e4&&(mh.set(t,e),vh++)),e}(t[i]))}function xh(t){var e=t.__highlighted;if(e&&(t.__highlighted=!1,!t.isGroup))if("layer"===e)t.__zr&&t.__zr.removeHover(t);else{var i=t.style,n=t.__cachedNormalStl;n&&(Rh(i),t.setStyle(n),Lh(i));var r=t.__cachedNormalZ2;null!=r&&t.z2-r==1&&(t.z2=r)}}function bh(t,e,i){var n,r=ah,a=ah;t.__highlighted&&(r=rh,n=!0),e(t,i),t.__highlighted&&(a=rh,n=!0),t.isGroup&&t.traverse((function(t){!t.isGroup&&e(t,i)})),n&&t.__highDownOnUpdate&&t.__highDownOnUpdate(r,a)}function wh(t,e){e=t.__hoverStl=!1!==e&&(t.hoverStyle||e||{}),t.__hoverStlDirty=!0,t.__highlighted&&(t.__cachedNormalStl=null,xh(t),yh(t))}function Sh(t){!Ih(this,t)&&!this.__highByOuter&&bh(this,yh)}function Th(t){!Ih(this,t)&&!this.__highByOuter&&bh(this,xh)}function Mh(t){this.__highByOuter|=1<<(t||0),bh(this,yh)}function Ch(t){!(this.__highByOuter&=~(1<<(t||0)))&&bh(this,xh)}function Ih(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function Ah(t,e){var i=!1===e;if(t.__highDownSilentOnTouch=t.highDownSilentOnTouch,t.__highDownOnUpdate=t.highDownOnUpdate,!i||t.__highDownDispatcher){var n=i?"off":"on";t[n]("mouseover",Sh)[n]("mouseout",Th),t[n]("emphasis",Mh)[n]("normal",Ch),t.__highByOuter=t.__highByOuter||0,t.__highDownDispatcher=!i}}function Dh(t,e,i,n,r){return kh(t,e,n,r),i&&zt.extend(t,i),t}function kh(t,e,i,n){if((i=i||nh).isRectText){var r;i.getTextPosition?r=i.getTextPosition(e,n):"outside"===(r=e.getShallow("position")||(n?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=zt.retrieve2(e.getShallow("distance"),n?null:5)}var o,s=e.ecModel,l=s&&s.option.textStyle,u=function(t){var e;for(;t&&t!==t.ecModel;){var i=(t.option||nh).rich;if(i)for(var n in e=e||{},i)i.hasOwnProperty(n)&&(e[n]=1);t=t.parentModel}return e}(e);if(u)for(var h in o={},u)if(u.hasOwnProperty(h)){var c=e.getModel(["rich",h]);Oh(o[h]={},c,l,i,n)}return t.rich=o,Oh(t,e,l,i,n,!0),i.forceRich&&!i.textStyle&&(i.textStyle={}),t}function Oh(t,e,i,n,r,a){i=!r&&i||nh,t.textFill=Ph(e.getShallow("color"),n)||i.color,t.textStroke=Ph(e.getShallow("textBorderColor"),n)||i.textBorderColor,t.textStrokeWidth=zt.retrieve2(e.getShallow("textBorderWidth"),i.textBorderWidth),r||(a&&(t.insideRollbackOpt=n,Lh(t)),null==t.textFill&&(t.textFill=n.autoColor)),t.fontStyle=e.getShallow("fontStyle")||i.fontStyle,t.fontWeight=e.getShallow("fontWeight")||i.fontWeight,t.fontSize=e.getShallow("fontSize")||i.fontSize,t.fontFamily=e.getShallow("fontFamily")||i.fontFamily,t.textAlign=e.getShallow("align"),t.textVerticalAlign=e.getShallow("verticalAlign")||e.getShallow("baseline"),t.textLineHeight=e.getShallow("lineHeight"),t.textWidth=e.getShallow("width"),t.textHeight=e.getShallow("height"),t.textTag=e.getShallow("tag"),a&&n.disableBox||(t.textBackgroundColor=Ph(e.getShallow("backgroundColor"),n),t.textPadding=e.getShallow("padding"),t.textBorderColor=Ph(e.getShallow("borderColor"),n),t.textBorderWidth=e.getShallow("borderWidth"),t.textBorderRadius=e.getShallow("borderRadius"),t.textBoxShadowColor=e.getShallow("shadowColor"),t.textBoxShadowBlur=e.getShallow("shadowBlur"),t.textBoxShadowOffsetX=e.getShallow("shadowOffsetX"),t.textBoxShadowOffsetY=e.getShallow("shadowOffsetY")),t.textShadowColor=e.getShallow("textShadowColor")||i.textShadowColor,t.textShadowBlur=e.getShallow("textShadowBlur")||i.textShadowBlur,t.textShadowOffsetX=e.getShallow("textShadowOffsetX")||i.textShadowOffsetX,t.textShadowOffsetY=e.getShallow("textShadowOffsetY")||i.textShadowOffsetY}function Ph(t,e){return"auto"!==t?t:e&&e.autoColor?e.autoColor:null}function Lh(t){var e,i=t.textPosition,n=t.insideRollbackOpt;if(n&&null==t.textFill){var r=n.autoColor,a=n.isRectText,o=n.useInsideStyle,s=!1!==o&&(!0===o||a&&i&&"string"==typeof i&&i.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 Rh(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function Eh(t,e,i,n,r,a){if("function"==typeof r&&(a=r,r=null),n&&n.isAnimationEnabled()){var o=t?"Update":"",s=n.getShallow("animationDuration"+o),l=n.getShallow("animationEasing"+o),u=n.getShallow("animationDelay"+o);"function"==typeof u&&(u=u(r,n.getAnimationDelayParams?n.getAnimationDelayParams(e,r):null)),"function"==typeof s&&(s=s(r)),s>0?e.animateTo(i,s,u||0,l,a,!!a):(e.stopAnimation(),e.attr(i),a&&a())}else e.stopAnimation(),e.attr(i),a&&a()}function Bh(t,e,i,n,r){Eh(!0,t,e,i,n,r)}function zh(t,e,i){return e&&!zt.isArrayLike(e)&&(e=ui.getLocalTransform(e)),i&&(e=ti.invert([],e)),ae.applyTransform([],t,e)}function Nh(t,e,i,n,r,a,o,s){var l,u=i-t,h=n-e,c=o-r,d=s-a,f=Fh(c,d,u,h);if((l=f)<=1e-6&&l>=-1e-6)return!1;var p=t-r,g=e-a,m=Fh(p,g,u,h)/f;if(m<0||m>1)return!1;var v=Fh(p,g,c,d)/f;return!(v<0||v>1)}function Fh(t,e,i,n){return t*n-i*e}uh("circle",Nl),uh("sector",Vl),uh("ring",Gl),uh("polygon",nu),uh("polyline",ru),uh("rect",du),uh("line",gu),uh("bezierCurve",Tu),uh("arc",Mu);var Hh=function(t,e,i){var n=new Sa({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===i){var r={width:t.width,height:t.height};n.setStyle(ch(e,r))}}});return n},Vh=function(t){return uu.subPixelOptimizeLine(t.shape,t.shape,t.style),t},Wh=function(t){return uu.subPixelOptimizeRect(t.shape,t.shape,t.style),t},Gh=function(t,e,i){var n,r={isRectText:!0};!1===i?n=!0:r.autoColor=i,kh(t,e,r,n)},Uh=function(t,e,i){var n=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?-n:"right"===t?n:0,"top"===t?-r:"bottom"===t?r:0];return a=zh(a,e,i),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"},jh=function(t,e){return zt.map(t,(function(t){var i=t[0];i=eh(i,e.x),i=ih(i,e.x+e.width);var n=t[1];return n=eh(n,e.y),[i,n=ih(n,e.y+e.height)]}))},Yh=function(t,e,i){var n=(e=zt.extend({rectHover:!0},e)).style={strokeNoScale:!0};if(i=i||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(n.image=t.slice(8),zt.defaults(n,i),new Sa(e)):hh(t.replace("path://",""),e,i,"center")},Xh=function(t,e,i,n,r){for(var a=0,o=r[r.length-1];a<r.length;a++){var s=r[a];if(Nh(t,e,i,n,s[0],s[1],o[0],o[1]))return!0;o=s}},qh={Image:Nu,Group:Fu,Text:Hu,Circle:Vu,Sector:Wu,Ring:Gu,Polygon:Uu,Polyline:ju,Rect:Yu,Line:Xu,BezierCurve:qu,Arc:Zu,CompoundPath:$u,LinearGradient:Ku,RadialGradient:Qu,BoundingRect:Ju,IncrementalDisplayable:th,Z2_EMPHASIS_LIFT:1,CACHED_LABEL_STYLE_PROPERTIES:{color:"textFill",textBorderColor:"textStroke",textBorderWidth:"textStrokeWidth"},extendShape:function(t){return gl.extend(t)},extendPath:function(t,e){return Rl.extendFromString(t,e)},registerShape:uh,getShapeClass:function(t){if(lh.hasOwnProperty(t))return lh[t]},makePath:hh,makeImage:Hh,mergePath:dh,resizePath:fh,subPixelOptimizeLine:Vh,subPixelOptimizeRect:Wh,subPixelOptimize:ph,setElementHoverStyle:wh,setHoverStyle:function(t,e){Ah(t,!0),bh(t,wh,e)},setAsHighDownDispatcher:Ah,isHighDownDispatcher:function(t){return!(!t||!t.__highDownDispatcher)},getHighlightDigit:function(t){var e=sh[t];return null==e&&oh<=32&&(e=sh[t]=oh++),e},setLabelStyle:function(t,e,i,n,r,a,o){var s,l=(r=r||nh).labelFetcher,u=r.labelDataIndex,h=r.labelDimIndex,c=r.labelProp,d=i.getShallow("show"),f=n.getShallow("show");(d||f)&&(l&&(s=l.getFormattedLabel(u,"normal",null,h,c)),null==s&&(s=zt.isFunction(r.defaultText)?r.defaultText(u,r):r.defaultText));var p=d?s:null,g=f?zt.retrieve2(l?l.getFormattedLabel(u,"emphasis",null,h,c):null,s):null;null==p&&null==g||(Dh(t,i,a,r),Dh(e,n,o,r,!0)),t.text=p,e.text=g},modifyLabelStyle:function(t,e,i){var n=t.style;e&&(Rh(n),t.setStyle(e),Lh(n)),n=t.__hoverStl,i&&n&&(Rh(n),zt.extend(n,i),Lh(n))},setTextStyle:Dh,setText:Gh,getFont:function(t,e){var i=e&&e.getModel("textStyle");return zt.trim([t.fontStyle||i&&i.getShallow("fontStyle")||"",t.fontWeight||i&&i.getShallow("fontWeight")||"",(t.fontSize||i&&i.getShallow("fontSize")||12)+"px",t.fontFamily||i&&i.getShallow("fontFamily")||"sans-serif"].join(" "))},updateProps:Bh,initProps:function(t,e,i,n,r){Eh(!1,t,e,i,n,r)},getTransform:function(t,e){for(var i=ti.identity([]);t&&t!==e;)ti.mul(i,t.getLocalTransform(),i),t=t.parent;return i},applyTransform:zh,transformDirection:Uh,groupTransition:function(t,e,i,n){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 n=o(t);t.attr(o(e)),Bh(t,n,i,t.dataIndex)}}}))}function o(t){var e={position:ae.clone(t.position),rotation:t.rotation};return t.shape&&(e.shape=zt.extend({},t.shape)),e}},clipPointsByRect:jh,clipRectByRect:function(t,e){var i=eh(t.x,e.x),n=ih(t.x+t.width,e.x+e.width),r=eh(t.y,e.y),a=ih(t.y+t.height,e.y+e.height);if(n>=i&&a>=r)return{x:i,y:r,width:n-i,height:a-r}},createIcon:Yh,linePolygonIntersect:Xh,lineLineIntersect:Nh},Zh=["textStyle","color"],$h={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(Zh):null)},getFont:function(){return qh.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"))}},Kh=$h,Qh=Fo([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),Jh={getItemStyle:function(t,e){var i=Qh(this,t,e),n=this.getBorderLineDash();return n&&(i.lineDash=n),i},getBorderLineDash:function(){var t=this.get("borderType");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}},tc=Jh,ec=ko.makeInner,ic=No.enableClassExtend,nc=No.enableClassCheck,rc=zt.mixin,ac=ec();function oc(t,e,i){this.parentModel=e,this.ecModel=i,this.option=t}function sc(t,e,i){for(var n=0;n<e.length&&(!e[n]||null!=(t=t&&"object"==typeof t?t[e[n]]:null));n++);return null==t&&i&&(t=i.get(e)),t}function lc(t,e){var i=ac(t).getParent;return i?i.call(t,e):t.parentModel}oc.prototype={constructor:oc,init:null,mergeOption:function(t){zt.merge(this.option,t,!0)},get:function(t,e){return null==t?this.option:sc(this.option,this.parsePath(t),!e&&lc(this,t))},getShallow:function(t,e){var i=this.option,n=null==i?i:i[t],r=!e&&lc(this,t);return null==n&&r&&(n=r.getShallow(t)),n},getModel:function(t,e){var i;return new oc(null==t?this.option:sc(this.option,t=this.parsePath(t)),e=e||(i=lc(this,t))&&i.getModel(t),this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new(0,this.constructor)(zt.clone(this.option))},setReadOnly:function(t){},parsePath:function(t){return"string"==typeof t&&(t=t.split(".")),t},customizeGetParent:function(t){ac(this).getParent=t},isAnimationEnabled:function(){if(!Q.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},ic(oc),nc(oc),rc(oc,Wo),rc(oc,Uo),rc(oc,Kh),rc(oc,tc);var uc=oc,hc=No.parseClassType,cc=0;var dc={getUID:function(t){return[t||"",cc++,Math.random().toFixed(5)].join("_")},enableSubTypeDefaulter:function(t){var e={};return t.registerSubTypeDefaulter=function(t,i){t=hc(t),e[t.main]=i},t.determineSubType=function(i,n){var r=n.type;if(!r){var a=hc(i).main;t.hasSubTypes(i)&&e[a]&&(r=e[a](n))}return r},t},enableTopologicalTravel:function(t,e){function i(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}t.topologicalTravel=function(t,n,r,a){if(t.length){var o=function(t){var n={},r=[];return zt.each(t,(function(a){var o=i(n,a),s=function(t,e){var i=[];return zt.each(t,(function(t){zt.indexOf(e,t)>=0&&i.push(t)})),i}(o.originalDeps=e(a),t);o.entryCount=s.length,0===o.entryCount&&r.push(a),zt.each(s,(function(t){zt.indexOf(o.predecessor,t)<0&&o.predecessor.push(t);var e=i(n,t);zt.indexOf(e.successor,t)<0&&e.successor.push(a)}))})),{graph:n,noEntryList:r}}(n),s=o.graph,l=o.noEntryList,u={};for(zt.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]),zt.each(c.successor,d?p:f)}zt.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)}}}},fc=1e-4;var pc=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function gc(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 mc=function(t,e,i,n){var r=e[1]-e[0],a=i[1]-i[0];if(0===r)return 0===a?i[0]:(i[0]+i[1])/2;if(n)if(r>0){if(t<=e[0])return i[0];if(t>=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/r*a+i[0]},vc=function(t,e){var i=Math.log,n=Math.LN10,r=Math.floor(i(t[1]-t[0])/n),a=Math.round(i(Math.abs(e[1]-e[0]))/n),o=Math.min(Math.max(-r+a,0),20);return isFinite(o)?o:20},yc=function(t,e,i){if(!t[e])return 0;var n=zt.reduce(t,(function(t,e){return t+(isNaN(e)?0:e)}),0);if(0===n)return 0;for(var r=Math.pow(10,i),a=zt.map(t,(function(t){return(isNaN(t)?0:t)/n*r*100})),o=100*r,s=zt.map(a,(function(t){return Math.floor(t)})),l=zt.reduce(s,(function(t,e){return t+e}),0),u=zt.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},_c=function(t,e){var i=gc(t),n=Math.pow(10,i),r=t/n;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)*n,i>=-20?+t.toFixed(i<0?-i:0):t},xc=function(t){t.sort((function(t,e){return s(t,e,0)?-1:1}));for(var e=-1/0,i=1,n=0;n<t.length;){for(var r=t[n].interval,a=t[n].close,o=0;o<2;o++)r[o]<=e&&(r[o]=e,a[o]=o?1:1-i),e=r[o],i=a[o];r[0]===r[1]&&a[0]*a[1]!=1?t.splice(n,1):n++}return t;function s(t,e,i){return t.interval[i]<e.interval[i]||t.interval[i]===e.interval[i]&&(t.close[i]-e.close[i]==(i?-1:1)||!i&&s(t,e,1))}},bc={linearMap:mc,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?(i=t,i.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var i},round:function(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),i?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,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i},getPrecisionSafe:function(t){var e=t.toString(),i=e.indexOf("e");if(i>0){var n=+e.slice(i+1);return n<0?-n:0}var r=e.indexOf(".");return r<0?0:e.length-1-r},getPixelPrecision:vc,getPercentWithPrecision:yc,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<fc},parseDate:function(t){if(t instanceof Date)return t;if("string"==typeof t){var e=pc.exec(t);if(!e)return new Date(NaN);if(e[8]){var i=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(i-=e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,i,+(e[5]||0),+e[6]||0,+e[7]||0))}return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0)}return null==t?new Date(NaN):new Date(Math.round(t))},quantity:function(t){return Math.pow(10,gc(t))},quantityExponent:gc,nice:_c,quantile:function(t,e){var i=(t.length-1)*e+1,n=Math.floor(i),r=+t[n-1],a=i-n;return a?r+a*(t[n]-r):r},reformIntervals:xc,isNumeric:function(t){return t-parseFloat(t)>=0}};var wc=zt.normalizeCssArray,Sc=/([&<>"'])/g,Tc={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Mc(t){return null==t?"":(t+"").replace(Sc,(function(t,e){return Tc[e]}))}var Cc=["a","b","c","d","e","f","g"],Ic=function(t,e){return"{"+t+(null==e?"":e)+"}"};function Ac(t,e){return"0000".substr(0,e-(t+="").length)+t}var Dc=function(t,e,i){zt.isArray(e)||(e=[e]);var n=e.length;if(!n)return"";for(var r=e[0].$vars||[],a=0;a<r.length;a++){var o=Cc[a];t=t.replace(Ic(o),Ic(o,0))}for(var s=0;s<n;s++)for(var l=0;l<r.length;l++){var u=e[s][r[l]];t=t.replace(Ic(Cc[l],s),i?Mc(u):u)}return t},kc=function(t,e,i){return zt.each(e,(function(e,n){t=t.replace("{"+n+"}",i?Mc(e):e)})),t},Oc=function(t,e){var i=(t=zt.isString(t)?{color:t,extraCssText:e}:t||{}).color,n=t.type,r=(e=t.extraCssText,t.renderMode||"html"),a=t.markerId||"X";return i?"html"===r?"subItem"===n?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Mc(i)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+Mc(i)+";"+(e||"")+'"></span>':{renderMode:r,content:"{marker"+a+"|}  ",style:{color:i}}:""},Pc=function(t,e,i){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var n=bc.parseDate(e),r=i?"UTC":"",a=n["get"+r+"FullYear"](),o=n["get"+r+"Month"]()+1,s=n["get"+r+"Date"](),l=n["get"+r+"Hours"](),u=n["get"+r+"Minutes"](),h=n["get"+r+"Seconds"](),c=n["get"+r+"Milliseconds"]();return t=t.replace("MM",Ac(o,2)).replace("M",o).replace("yyyy",a).replace("yy",a%100).replace("dd",Ac(s,2)).replace("d",s).replace("hh",Ac(l,2)).replace("h",l).replace("mm",Ac(u,2)).replace("m",u).replace("ss",Ac(h,2)).replace("s",h).replace("SSS",Ac(c,3))},Lc=function(t,e,i,n,r,a,o,s){return Nr.getBoundingRect(t,e,i,n,r,s,a,o)},Rc={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:wc,encodeHTML:Mc,formatTpl:Dc,formatTplSimple:kc,getTooltipMarker:Oc,formatTime:Pc,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:Lc,windowOpen:function(t,e){if("_blank"===e||"blank"===e){var i=window.open();i.opener=null,i.location=t}else window.open(t,e)}},Ec=bc.parsePercent,Bc=zt.each,zc=["left","right","top","bottom","width","height"],Nc=[["width","left","right"],["height","top","bottom"]];function Fc(t,e,i,n,r){var a=0,o=0;null==n&&(n=1/0),null==r&&(r=1/0);var s=0;e.eachChild((function(l,u){var h,c,d=l.position,f=l.getBoundingRect(),p=e.childAt(u+1),g=p&&p.getBoundingRect();if("horizontal"===t){var m=f.width+(g?-g.x+f.x:0);(h=a+m)>n||l.newline?(a=0,h=m,o+=s+i,s=f.height):s=Math.max(s,f.height)}else{var v=f.height+(g?-g.y+f.y:0);(c=o+v)>r||l.newline?(a+=s+i,o=0,c=v,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=a,d[1]=o,"horizontal"===t?a=h+i:o=c+i)}))}var Hc=Fc,Vc=zt.curry(Fc,"vertical"),Wc=zt.curry(Fc,"horizontal");function Gc(t,e,i){i=Rc.normalizeCssArray(i||0);var n=e.width,r=e.height,a=Ec(t.left,n),o=Ec(t.top,r),s=Ec(t.right,n),l=Ec(t.bottom,r),u=Ec(t.width,n),h=Ec(t.height,r),c=i[2]+i[0],d=i[1]+i[3],f=t.aspect;switch(isNaN(u)&&(u=n-s-d-a),isNaN(h)&&(h=r-l-c-o),null!=f&&(isNaN(u)&&isNaN(h)&&(f>n/r?u=.8*n:h=.8*r),isNaN(u)&&(u=f*h),isNaN(h)&&(h=u/f)),isNaN(a)&&(a=n-s-u-d),isNaN(o)&&(o=r-l-h-c),t.left||t.right){case"center":a=n/2-u/2-i[3];break;case"right":a=n-u-d}switch(t.top||t.bottom){case"middle":case"center":o=r/2-h/2-i[0];break;case"bottom":o=r-h-c}a=a||0,o=o||0,isNaN(u)&&(u=n-d-a-(s||0)),isNaN(h)&&(h=r-c-o-(l||0));var p=new An(a+i[3],o+i[0],u,h);return p.margin=i,p}function Uc(t,e){return e&&t&&Bc(zc,(function(i){e.hasOwnProperty(i)&&(t[i]=e[i])})),t}var jc=function(t,e,i){!zt.isObject(i)&&(i={});var n=i.ignoreSize;!zt.isArray(n)&&(n=[n,n]);var r=o(Nc[0],0),a=o(Nc[1],1);function o(i,r){var a={},o=0,u={},h=0;if(Bc(i,(function(e){u[e]=t[e]})),Bc(i,(function(t){s(e,t)&&(a[t]=u[t]=e[t]),l(a,t)&&o++,l(u,t)&&h++})),n[r])return l(e,i[1])?u[i[2]]=null:l(e,i[2])&&(u[i[1]]=null),u;if(2!==h&&o){if(o>=2)return a;for(var c=0;c<i.length;c++){var d=i[c];if(!s(a,d)&&s(t,d)){a[d]=t[d];break}}return a}return u}function s(t,e){return t.hasOwnProperty(e)}function l(t,e){return null!=t[e]&&"auto"!==t[e]}function u(t,e,i){Bc(t,(function(t){e[t]=i[t]}))}u(Nc[0],t,r),u(Nc[1],t,a)},Yc={LOCATION_PARAMS:zc,HV_NAMES:Nc,box:Hc,vbox:Vc,hbox:Wc,getAvailableSize:function(t,e,i){var n=e.width,r=e.height,a=Ec(t.x,n),o=Ec(t.y,r),s=Ec(t.x2,n),l=Ec(t.y2,r);return(isNaN(a)||isNaN(parseFloat(t.x)))&&(a=0),(isNaN(s)||isNaN(parseFloat(t.x2)))&&(s=n),(isNaN(o)||isNaN(parseFloat(t.y)))&&(o=0),(isNaN(l)||isNaN(parseFloat(t.y2)))&&(l=r),i=Rc.normalizeCssArray(i||0),{width:Math.max(s-a-i[1]-i[3],0),height:Math.max(l-o-i[0]-i[2],0)}},getLayoutRect:Gc,positionElement:function(t,e,i,n,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 An(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=Gc(zt.defaults({width:l.width,height:l.height},e),i,n);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[Nc[e][0]]||null!=t[Nc[e][1]]&&null!=t[Nc[e][2]]},mergeLayoutParam:jc,getLayoutParams:function(t){return Uc({},t)},copyLayoutParams:Uc},Xc={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")}}},qc=No.enableClassManagement,Zc=No.parseClassType,$c=(0,ko.makeInner)(),Kc=uc.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,i,n){uc.call(this,t,e,i,n),this.uid=dc.getUID("ec_cpt_model")},init:function(t,e,i,n){this.mergeDefaultAndTheme(t,i)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?Yc.getLayoutParams(t):{},r=e.getTheme();zt.merge(t,r.get(this.mainType)),zt.merge(t,this.getDefaultOption()),i&&Yc.mergeLayoutParam(t,n,i)},mergeOption:function(t,e){zt.merge(this.option,t,!0);var i=this.layoutMode;i&&Yc.mergeLayoutParam(this.option,t,i)},optionUpdated:function(t,e){},getDefaultOption:function(){var t=$c(this);if(!t.defaultOption){for(var e=[],i=this.constructor;i;){var n=i.prototype.defaultOption;n&&e.push(n),i=i.superClass}for(var r={},a=e.length-1;a>=0;a--)r=zt.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)})}});qc(Kc,{registerWhenExtend:!0}),dc.enableSubTypeDefaulter(Kc),dc.enableTopologicalTravel(Kc,(function(t){var e=[];zt.each(Kc.getClassesByMainType(t),(function(t){e=e.concat(t.prototype.dependencies||[])})),e=zt.map(e,(function(t){return Zc(t).main})),"dataset"!==t&&zt.indexOf(e,"dataset")<=0&&e.unshift("dataset");return e})),zt.mixin(Kc,Xc);var Qc=Kc,Jc="";"undefined"!=typeof navigator&&(Jc=navigator.platform||"");var td={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:Jc.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},ed=ko.makeInner,id=ko.normalizeToArray,nd=ed();var rd={clearColorPalette:function(){nd(this).colorIdx=0,nd(this).colorNameMap={}},getColorFromPalette:function(t,e,i){var n=nd(e=e||this),r=n.colorIdx||0,a=n.colorNameMap=n.colorNameMap||{};if(a.hasOwnProperty(t))return a[t];var o=id(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=i&&s?function(t,e){for(var i=t.length,n=0;n<i;n++)if(t[n].length>e)return t[n];return t[i-1]}(s,i):o;if((l=l||o)&&l.length){var u=l[r];return t&&(a[t]=u),n.colorIdx=(r+1)%l.length,u}}},ad=rd,od={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"},sd=zt.createHashMap,ld=zt.isTypedArray,ud=No.enableClassCheck,hd=od.SOURCE_FORMAT_ORIGINAL,cd=od.SERIES_LAYOUT_BY_COLUMN,dd=od.SOURCE_FORMAT_UNKNOWN,fd=od.SOURCE_FORMAT_TYPED_ARRAY,pd=od.SOURCE_FORMAT_KEYED_COLUMNS;function gd(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===pd?{}:[]),this.sourceFormat=t.sourceFormat||dd,this.seriesLayoutBy=t.seriesLayoutBy||cd,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&sd(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}gd.seriesDataToSource=function(t){return new gd({data:t,sourceFormat:ld(t)?fd:hd,fromDataset:!1})},ud(gd);var md=gd,vd=ko.makeInner,yd=ko.getDataItemValue,_d=zt.createHashMap,xd=zt.each,bd=zt.map,wd=zt.isArray,Sd=zt.isString,Td=zt.isObject,Md=zt.isTypedArray,Cd=zt.isArrayLike,Id=zt.extend,Ad=od.SOURCE_FORMAT_ORIGINAL,Dd=od.SOURCE_FORMAT_ARRAY_ROWS,kd=od.SOURCE_FORMAT_OBJECT_ROWS,Od=od.SOURCE_FORMAT_KEYED_COLUMNS,Pd=od.SOURCE_FORMAT_UNKNOWN,Ld=od.SOURCE_FORMAT_TYPED_ARRAY,Rd=od.SERIES_LAYOUT_BY_ROW,Ed={Must:1,Might:2,Not:3},Bd=vd();function zd(t){if(t){var e=_d();return bd(t,(function(t,i){if(null==(t=Id({},Td(t)?t:{name:t})).name)return t;t.name+="",null==t.displayName&&(t.displayName=t.name);var n=e.get(t.name);return n?t.name+="-"+n.count++:e.set(t.name,{count:1}),t}))}}function Nd(t,e,i,n){if(null==n&&(n=1/0),e===Rd)for(var r=0;r<i.length&&r<n;r++)t(i[r]?i[r][0]:null,r);else{var a=i[0]||[];for(r=0;r<a.length&&r<n;r++)t(a[r],r)}}function Fd(t){var e=t.option;if(!e.data)return t.ecModel.getComponent("dataset",e.datasetIndex||0)}function Hd(t,e,i,n,r,a){var o,s,l;if(Md(t))return Ed.Not;if(n){var u=n[a];Td(u)?(s=u.name,l=u.type):Sd(u)&&(s=u)}if(null!=l)return"ordinal"===l?Ed.Must:Ed.Not;if(e===Dd)if(i===Rd){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===kd){if(!s)return Ed.Not;for(c=0;c<t.length&&c<5;c++){if((f=t[c])&&null!=(o=g(f[s])))return o}}else if(e===Od){if(!s)return Ed.Not;if(!(h=t[s])||Md(h))return Ed.Not;for(c=0;c<h.length&&c<5;c++)if(null!=(o=g(h[c])))return o}else if(e===Ad)for(c=0;c<t.length&&c<5;c++){var f=t[c],p=yd(f);if(!wd(p))return Ed.Not;if(null!=(o=g(p[a])))return o}function g(t){var e=Sd(t);return null!=t&&isFinite(t)&&""!==t?e?Ed.Might:Ed.Not:e&&"-"!==t?Ed.Must:void 0}return Ed.Not}var Vd=function(t){var e=t.option.source,i=Pd;if(Md(e))i=Ld;else if(wd(e)){0===e.length&&(i=Dd);for(var n=0,r=e.length;n<r;n++){var a=e[n];if(null!=a){if(wd(a)){i=Dd;break}if(Td(a)){i=kd;break}}}}else if(Td(e)){for(var o in e)if(e.hasOwnProperty(o)&&Cd(e[o])){i=Od;break}}else if(null!=e)throw new Error("Invalid data");Bd(t).sourceFormat=i},Wd=function(t){var e=t.option,i=e.data,n=Md(i)?Ld:Ad,r=!1,a=e.seriesLayoutBy,o=e.sourceHeader,s=e.dimensions,l=Fd(t);if(l){var u=l.option;i=u.source,n=Bd(l).sourceFormat,r=!0,a=a||u.seriesLayoutBy,null==o&&(o=u.sourceHeader),s=s||u.dimensions}var h=function(t,e,i,n,r){if(!t)return{dimensionsDefine:zd(r)};var a,o;if(e===Dd)"auto"===n||null==n?Nd((function(t){null!=t&&"-"!==t&&(Sd(t)?null==o&&(o=1):o=0)}),i,t,10):o=n?1:0,r||1!==o||(r=[],Nd((function(t,e){r[e]=null!=t?t:""}),i,t)),a=r?r.length:i===Rd?t.length:t[0]?t[0].length:null;else if(e===kd)r||(r=function(t){var e,i=0;for(;i<t.length&&!(e=t[i++]););if(e){var n=[];return xd(e,(function(t,e){n.push(e)})),n}}(t));else if(e===Od)r||(r=[],xd(t,(function(t,e){r.push(e)})));else if(e===Ad){var s=yd(t[0]);a=wd(s)&&s.length||1}return{startIndex:o,dimensionsDefine:zd(r),dimensionsDetectCount:a}}(i,n,a,o,s);Bd(t).source=new md({data:i,fromDataset:r,seriesLayoutBy:a,sourceFormat:n,dimensionsDefine:h.dimensionsDefine,startIndex:h.startIndex,dimensionsDetectCount:h.dimensionsDetectCount,encodeDefine:e.encode})},Gd=function(t,e,i){var n={},r=Fd(e);if(!r||!t)return n;var a,o,s=[],l=[],u=e.ecModel,h=Bd(u).datasetMap,c=r.uid+"_"+i.seriesLayoutBy;t=t.slice(),xd(t,(function(e,i){!Td(e)&&(t[i]={name:e}),"ordinal"===e.type&&null==a&&(a=i,o=p(t[i])),n[e.name]=[]}));var d=h.get(c)||h.set(c,{categoryWayDim:o,valueWayDim:0});function f(t,e,i){for(var n=0;n<i;n++)t.push(e+n)}function p(t){var e=t.dimsDef;return e?e.length:1}return xd(t,(function(t,e){var i=t.name,r=p(t);if(null==a){var o=d.valueWayDim;f(n[i],o,r),f(l,o,r),d.valueWayDim+=r}else if(a===e)f(n[i],0,r),f(s,0,r);else{o=d.categoryWayDim;f(n[i],o,r),f(l,o,r),d.categoryWayDim+=r}})),s.length&&(n.itemName=s),l.length&&(n.seriesName=l),n},Ud=function(t,e,i){var n={};if(!Fd(t))return n;var r,a=e.sourceFormat,o=e.dimensionsDefine;a!==kd&&a!==Od||xd(o,(function(t,e){"name"===(Td(t)?t.name:t)&&(r=e)}));var s=function(){for(var t={},n={},s=[],l=0,u=Math.min(5,i);l<u;l++){var h=Hd(e.data,a,e.seriesLayoutBy,o,e.startIndex,l);s.push(h);var c=h===Ed.Not;if(c&&null==t.v&&l!==r&&(t.v=l),(null==t.n||t.n===t.v||!c&&s[t.n]===Ed.Not)&&(t.n=l),d(t)&&s[t.n]!==Ed.Not)return t;c||(h===Ed.Might&&null==n.v&&l!==r&&(n.v=l),null!=n.n&&n.n!==n.v||(n.n=l))}function d(t){return null!=t.v&&null!=t.n}return d(t)?t:d(n)?n:null}();if(s){n.value=s.v;var l=null!=r?r:s.n;n.itemName=[l],n.seriesName=[l]}return n},jd={BE_ORDINAL:Ed,detectSourceFormat:Vd,getSource:function(t){return Bd(t).source},resetSourceDefaulter:function(t){Bd(t).datasetMap=_d()},prepareSource:Wd,makeSeriesEncodeForAxisCoordSys:Gd,makeSeriesEncodeForNameBased:Ud,guessOrdinal:function(t,e){return Hd(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}},Yd=zt.each,Xd=zt.filter,qd=zt.map,Zd=zt.isArray,$d=zt.indexOf,Kd=zt.isObject,Qd=zt.isString,Jd=zt.createHashMap,tf=zt.assert,ef=zt.clone,nf=zt.merge,rf=zt.extend,af=zt.mixin,of=jd.resetSourceDefaulter,sf="\0_ec_inner",lf=uc.extend({init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new uc(i),this._optionManager=n},setOption:function(t,e){tf(!(sf in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e=!1,i=this._optionManager;if(!t||"recreate"===t){var n=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(n)):uf.call(this,n),e=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var r=i.getTimelineOption(this);r&&(this.mergeOption(r),e=!0)}if(!t||"recreate"===t||"media"===t){var a=i.getMediaOption(this,this._api);a.length&&Yd(a,(function(t){this.mergeOption(t,e=!0)}),this)}return e},mergeOption:function(t){var e=this.option,i=this._componentsMap,n=[];of(this),Yd(t,(function(t,i){null!=t&&(Qc.hasClass(i)?i&&n.push(i):e[i]=null==e[i]?ef(t):nf(e[i],t,!0))})),Qc.topologicalTravel(n,Qc.getAllClassMainTypes(),(function(n,r){var a=ko.normalizeToArray(t[n]),o=ko.mappingToExists(i.get(n),a);ko.makeIdAndName(o),Yd(o,(function(t,e){var i=t.option;Kd(i)&&(t.keyInfo.mainType=n,t.keyInfo.subType=function(t,e,i){var n=e.type?e.type:i?i.subType:Qc.determineSubType(t,e);return n}(n,i,t.exist))}));var s=function(t,e){Zd(e)||(e=e?[e]:[]);var i={};return Yd(e,(function(e){i[e]=(t.get(e)||[]).slice()})),i}(i,r);e[n]=[],i.set(n,[]),Yd(o,(function(t,r){var a=t.exist,o=t.option;if(tf(Kd(o)||a,"Empty component definition"),o){var l=Qc.getClass(n,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=rf({dependentModels:s,componentIndex:r},t.keyInfo);a=new l(o,this,this,u),rf(a,u),a.init(o,this,this,u),a.optionUpdated(null,!0)}}else a.mergeOption({},this),a.optionUpdated({},!1);i.get(n)[r]=a,e[n][r]=a.option}),this),"series"===n&&hf(this,i.get("series"))}),this),this._seriesIndicesMap=Jd(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var t=ef(this.option);return Yd(t,(function(e,i){if(Qc.hasClass(i)){for(var n=(e=ko.normalizeToArray(e)).length-1;n>=0;n--)ko.isIdInner(e[n])&&e.splice(n,1);t[i]=e}})),delete t[sf],t},getTheme:function(){return this._theme},getComponent:function(t,e){var i=this._componentsMap.get(t);if(i)return i[e||0]},queryComponents:function(t){var e=t.mainType;if(!e)return[];var i,n=t.index,r=t.id,a=t.name,o=this._componentsMap.get(e);if(!o||!o.length)return[];if(null!=n)Zd(n)||(n=[n]),i=Xd(qd(n,(function(t){return o[t]})),(function(t){return!!t}));else if(null!=r){var s=Zd(r);i=Xd(o,(function(t){return s&&$d(r,t.id)>=0||!s&&t.id===r}))}else if(null!=a){var l=Zd(a);i=Xd(o,(function(t){return l&&$d(a,t.name)>=0||!l&&t.name===a}))}else i=o.slice();return cf(i,t)},findComponents:function(t){var e,i,n,r,a,o=t.query,s=t.mainType,l=(i=s+"Index",n=s+"Id",r=s+"Name",!(e=o)||null==e[i]&&null==e[n]&&null==e[r]?null:{mainType:s,index:e[i],id:e[n],name:e[r]}),u=l?this.queryComponents(l):this._componentsMap.get(s);return a=cf(u,t),t.filter?Xd(a,t.filter):a},eachComponent:function(t,e,i){var n=this._componentsMap;if("function"==typeof t)i=e,e=t,n.each((function(t,n){Yd(t,(function(t,r){e.call(i,n,t,r)}))}));else if(Qd(t))Yd(n.get(t),e,i);else if(Kd(t)){var r=this.findComponents(t);Yd(r,e,i)}},getSeriesByName:function(t){var e=this._componentsMap.get("series");return Xd(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 Xd(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){Yd(this._seriesIndices,(function(i){var n=this._componentsMap.get("series")[i];t.call(e,n,i)}),this)},eachRawSeries:function(t,e){Yd(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,i){Yd(this._seriesIndices,(function(n){var r=this._componentsMap.get("series")[n];r.subType===t&&e.call(i,r,n)}),this)},eachRawSeriesByType:function(t,e,i){return Yd(this.getSeriesByType(t),e,i)},isSeriesFiltered:function(t){return null==this._seriesIndicesMap.get(t.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){hf(this,Xd(this._componentsMap.get("series"),t,e))},restoreData:function(t){var e=this._componentsMap;hf(this,e.get("series"));var i=[];e.each((function(t,e){i.push(e)})),Qc.topologicalTravel(i,Qc.getAllClassMainTypes(),(function(i,n){Yd(e.get(i),(function(e){("series"!==i||!function(t,e){if(e){var i=e.seiresIndex,n=e.seriesId,r=e.seriesName;return null!=i&&t.componentIndex!==i||null!=n&&t.id!==n||null!=r&&t.name!==r}}(e,t))&&e.restoreData()}))}))}});function uf(t){this.option={},this.option[sf]=1,this._componentsMap=Jd({series:[]}),this._seriesIndices,this._seriesIndicesMap,function(t,e){var i=t.color&&!t.colorLayer;Yd(e,(function(e,n){"colorLayer"===n&&i||Qc.hasClass(n)||("object"==typeof e?t[n]=t[n]?nf(t[n],e,!1):ef(e):null==t[n]&&(t[n]=e))}))}(t,this._theme.option),nf(t,td,!1),this.mergeOption(t)}function hf(t,e){t._seriesIndicesMap=Jd(t._seriesIndices=qd(e,(function(t){return t.componentIndex}))||[])}function cf(t,e){return e.hasOwnProperty("subType")?Xd(t,(function(t){return t.subType===e.subType})):t}af(lf,ad);var df=lf,ff=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];var pf=function(t){zt.each(ff,(function(e){this[e]=zt.bind(t[e],t)}),this)},gf={};function mf(){this._coordinateSystems=[]}mf.prototype={constructor:mf,create:function(t,e){var i=[];zt.each(gf,(function(n,r){var a=n.create(t,e);i=i.concat(a||[])})),this._coordinateSystems=i},update:function(t,e){zt.each(this._coordinateSystems,(function(i){i.update&&i.update(t,e)}))},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},mf.register=function(t,e){gf[t]=e},mf.get=function(t){return gf[t]};var vf=mf,yf=zt.each,_f=zt.clone,xf=zt.map,bf=zt.merge,wf=/^(min|max)?(.+)$/;function Sf(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function Tf(t,e,i){var n,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;yf(l,(function(t){t&&t.option&&(t.query?o.push(t):n||(n=t))}))}return r||(r=t),r.timeline||(r.timeline=s),yf([r].concat(a).concat(zt.map(o,(function(t){return t.option}))),(function(t){yf(e,(function(e){e(t,i)}))})),{baseOption:r,timelineOptions:a,mediaDefault:n,mediaList:o}}function Mf(t,e,i){var n={width:e,height:i,aspectratio:e/i},r=!0;return zt.each(t,(function(t,e){var i=e.match(wf);if(i&&i[1]&&i[2]){var a=i[1],o=i[2].toLowerCase();(function(t,e,i){return"min"===i?t>=e:"max"===i?t<=e:t===e})(n[o],t,a)||(r=!1)}})),r}Sf.prototype={constructor:Sf,setOption:function(t,e){t&&zt.each(ko.normalizeToArray(t.series),(function(t){t&&t.data&&zt.isTypedArray(t.data)&&zt.setAsPrimitive(t.data)})),t=_f(t);var i,n,r=this._optionBackup,a=Tf.call(this,t,e,!r);this._newBaseOption=a.baseOption,r?(i=r.baseOption,n=a.baseOption,yf(n=n||{},(function(t,e){if(null!=t){var n=i[e];if(Qc.hasClass(e)){t=ko.normalizeToArray(t),n=ko.normalizeToArray(n);var r=ko.mappingToExists(n,t);i[e]=xf(r,(function(t){return t.option&&t.exist?bf(t.exist,t.option,!0):t.exist||t.option}))}else i[e]=bf(n,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=xf(e.timelineOptions,_f),this._mediaList=xf(e.mediaList,_f),this._mediaDefault=_f(e.mediaDefault),this._currentMediaIndices=[],_f(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=_f(i[n.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e,i,n=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++)Mf(a[u].query,n,r)&&s.push(u);return!s.length&&o&&(s=[-1]),s.length&&(e=s,i=this._currentMediaIndices,e.join(",")!==i.join(","))&&(l=xf(s,(function(t){return _f(-1===t?o.option:a[t].option)}))),this._currentMediaIndices=s,l}};var Cf=Sf,If=zt.each,Af=zt.isObject,Df=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function kf(t){var e=t&&t.itemStyle;if(e)for(var i=0,n=Df.length;i<n;i++){var r=Df[i],a=e.normal,o=e.emphasis;a&&a[r]&&(t[r]=t[r]||{},t[r].normal?zt.merge(t[r].normal,a[r]):t[r].normal=a[r],a[r]=null),o&&o[r]&&(t[r]=t[r]||{},t[r].emphasis?zt.merge(t[r].emphasis,o[r]):t[r].emphasis=o[r],o[r]=null)}}function Of(t,e,i){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var n=t[e].normal,r=t[e].emphasis;n&&(i?(t[e].normal=t[e].emphasis=null,zt.defaults(t[e],n)):t[e]=n),r&&(t.emphasis=t.emphasis||{},t.emphasis[e]=r)}}function Pf(t){Of(t,"itemStyle"),Of(t,"lineStyle"),Of(t,"areaStyle"),Of(t,"label"),Of(t,"labelLine"),Of(t,"upperLabel"),Of(t,"edgeLabel")}function Lf(t,e){var i=Af(t)&&t[e],n=Af(i)&&i.textStyle;if(n)for(var r=0,a=ko.TEXT_STYLE_OPTIONS.length;r<a;r++){e=ko.TEXT_STYLE_OPTIONS[r];n.hasOwnProperty(e)&&(i[e]=n[e])}}function Rf(t){t&&(Pf(t),Lf(t,"label"),t.emphasis&&Lf(t.emphasis,"label"))}function Ef(t){return zt.isArray(t)?t:t?[t]:[]}function Bf(t){return(zt.isArray(t)?t[0]:t)||{}}var zf=function(t,e){If(Ef(t.series),(function(t){Af(t)&&function(t){if(Af(t)){kf(t),Pf(t),Lf(t,"label"),Lf(t,"upperLabel"),Lf(t,"edgeLabel"),t.emphasis&&(Lf(t.emphasis,"label"),Lf(t.emphasis,"upperLabel"),Lf(t.emphasis,"edgeLabel")),(i=t.markPoint)&&(kf(i),Rf(i)),(n=t.markLine)&&(kf(n),Rf(n));var e=t.markArea;e&&Rf(e);var i,n,r=t.data;if("graph"===t.type){r=r||t.nodes;var a=t.links||t.edges;if(a&&!zt.isTypedArray(a))for(var o=0;o<a.length;o++)Rf(a[o]);zt.each(t.categories,(function(t){Pf(t)}))}if(r&&!zt.isTypedArray(r))for(o=0;o<r.length;o++)Rf(r[o]);if((i=t.markPoint)&&i.data){var s=i.data;for(o=0;o<s.length;o++)Rf(s[o])}if((n=t.markLine)&&n.data){var l=n.data;for(o=0;o<l.length;o++)zt.isArray(l[o])?(Rf(l[o][0]),Rf(l[o][1])):Rf(l[o])}"gauge"===t.type?(Lf(t,"axisLabel"),Lf(t,"title"),Lf(t,"detail")):"treemap"===t.type?(Of(t.breadcrumb,"itemStyle"),zt.each(t.levels,(function(t){Pf(t)}))):"tree"===t.type&&Pf(t.leaves)}}(t)}));var i=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&i.push("valueAxis","categoryAxis","logAxis","timeAxis"),If(i,(function(e){If(Ef(t[e]),(function(t){t&&(Lf(t,"axisLabel"),Lf(t.axisPointer,"label"))}))})),If(Ef(t.parallel),(function(t){var e=t&&t.parallelAxisDefault;Lf(e,"axisLabel"),Lf(e&&e.axisPointer,"label")})),If(Ef(t.calendar),(function(t){Of(t,"itemStyle"),Lf(t,"dayLabel"),Lf(t,"monthLabel"),Lf(t,"yearLabel")})),If(Ef(t.radar),(function(t){Lf(t,"name")})),If(Ef(t.geo),(function(t){Af(t)&&(Rf(t),If(Ef(t.regions),(function(t){Rf(t)})))})),If(Ef(t.timeline),(function(t){Rf(t),Of(t,"label"),Of(t,"itemStyle"),Of(t,"controlStyle",!0);var e=t.data;zt.isArray(e)&&zt.each(e,(function(t){zt.isObject(t)&&(Of(t,"label"),Of(t,"itemStyle"))}))})),If(Ef(t.toolbox),(function(t){Of(t,"iconStyle"),If(t.feature,(function(t){Of(t,"iconStyle")}))})),Lf(Bf(t.axisPointer),"label"),Lf(Bf(t.tooltip).axisPointer,"label")},Nf=zt.each,Ff=zt.isArray,Hf=zt.isObject,Vf=ko.normalizeToArray;function Wf(t){Nf(Gf,(function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])}))}var Gf=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],Uf=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"];var jf=function(t,e){zf(t,e),t.series=Vf(t.series),Nf(t.series,(function(t){if(Hf(t)){var e=t.type;if("line"===e)null!=t.clipOverflow&&(t.clip=t.clipOverflow);else if("pie"===e||"gauge"===e)null!=t.clockWise&&(t.clockwise=t.clockWise);else if("gauge"===e){var i=function(t,e){e=e.split(",");for(var i=t,n=0;n<e.length&&null!=(i=i&&i[e[n]]);n++);return i}(t,"pointer.color");null!=i&&function(t,e,i,n){e=e.split(",");for(var r,a=t,o=0;o<e.length-1;o++)null==a[r=e[o]]&&(a[r]={}),a=a[r];(n||null==a[e[o]])&&(a[e[o]]=i)}(t,"itemStyle.color",i)}Wf(t)}})),t.dataRange&&(t.visualMap=t.dataRange),Nf(Uf,(function(e){var i=t[e];i&&(Ff(i)||(i=[i]),Nf(i,(function(t){Wf(t)})))}))},Yf=zt.createHashMap,Xf=zt.each;function qf(t){Xf(t,(function(e,i){var n=[],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=i-1;p>=0;p--){var g=t[p];if(s||(c=g.data.rawIndexOf(g.stackedByDimension,h)),c>=0){var m=g.data.getByRawIndex(g.stackResultDimension,c);if(d>=0&&m>0||d<=0&&m<0){d+=m,f=m;break}}}return n[0]=d,n[1]=f,n}));o.hostModel.setData(l),e.data=l}))}var Zf=function(t){var e=Yf();t.eachSeries((function(t){var i=t.get("stack");if(i){var n=e.get(i)||e.set(i,[]),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;n.length&&r.setCalculationInfo("stackedOnSeries",n[n.length-1].seriesModel),n.push(a)}})),e.each(qf)},$f=zt.extend,Kf=zt.each,Qf=zt.isObject,Jf=ko.getDataItemValue,tp=ko.isDataItemOption,ep=bc.parseDate,ip=od.SOURCE_FORMAT_TYPED_ARRAY,np=od.SOURCE_FORMAT_ARRAY_ROWS,rp=od.SOURCE_FORMAT_ORIGINAL,ap=od.SOURCE_FORMAT_OBJECT_ROWS;function op(t,e){md.isInstance(t)||(t=md.seriesDataToSource(t)),this._source=t;var i=this._data=t.data,n=t.sourceFormat;n===ip&&(this._offset=0,this._dimSize=e,this._data=i);var r=lp[n===np?n+"_"+t.seriesLayoutBy:n];$f(this,r)}var sp=op.prototype;sp.pure=!1,sp.persistent=!0,sp.getSource=function(){return this._source};var lp={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:cp},arrayRows_row:{pure:!0,count:function(){var t=this._data[0];return t?Math.max(0,t.length-this._source.startIndex):0},getItem:function(t){t+=this._source.startIndex;for(var e=[],i=this._data,n=0;n<i.length;n++){var r=i[n];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:up,getItem:hp,appendData:cp},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=[],i=this._source.dimensionsDefine,n=0;n<i.length;n++){var r=this._data[i[n].name];e.push(r?r[t]:null)}return e},appendData:function(t){var e=this._data;Kf(t,(function(t,i){for(var n=e[i]||(e[i]=[]),r=0;r<(t||[]).length;r++)n.push(t[r])}))}},original:{count:up,getItem:hp,appendData:cp},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 i=this._dimSize*t,n=0;n<this._dimSize;n++)e[n]=this._data[i+n];return e},appendData:function(t){this._data=t},clean:function(){this._offset+=this.count(),this._data=null}}};function up(){return this._data.length}function hp(t){return this._data[t]}function cp(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}var dp={arrayRows:fp,objectRows:function(t,e,i,n){return null!=i?t[n]:t},keyedColumns:fp,original:function(t,e,i,n){var r=Jf(t);return null!=i&&r instanceof Array?r[i]:r},typedArray:fp};function fp(t,e,i,n){return null!=i?t[i]:t}function pp(t,e,i,n){return gp(t[n],this._dimensionInfos[e])}function gp(t,e){var i=e&&e.type;if("ordinal"===i){var n=e&&e.ordinalMeta;return n?n.parseAndCollect(t):t}return"time"===i&&"number"!=typeof t&&null!=t&&"-"!==t&&(t=+ep(t)),null==t||""===t?NaN:+t}var mp=function(t,e,i){if(t){var n=t.getRawDataItem(e);if(null!=n){var r,a,o=t.getProvider().getSource().sourceFormat,s=t.getDimensionInfo(i);return s&&(r=s.name,a=s.index),dp[o](n,e,a,r)}}},vp=function(t,e,i){if(t){var n=t.getProvider().getSource().sourceFormat;if(n===rp||n===ap){var r=t.getRawDataItem(e);return n!==rp||Qf(r)||(r=null),r?r[i]:void 0}}},yp={DefaultDataProvider:op,defaultDimValueGetters:{arrayRows:pp,objectRows:function(t,e,i,n){return gp(t[e],this._dimensionInfos[e])},keyedColumns:pp,original:function(t,e,i,n){var r=t&&(null==t.value?t:t.value);return!this._rawData.pure&&tp(t)&&(this.hasItemOption=!0),gp(r instanceof Array?r[n]:r,this._dimensionInfos[e])},typedArray:function(t,e,i,n){return t[n]}},retrieveRawValue:mp,retrieveRawAttr:vp},_p=yp.retrieveRawValue,xp=Rc.getTooltipMarker,bp=Rc.formatTpl,wp=ko.getTooltipRenderMode,Sp=/\{@(.+?)\}/g,Tp={getDataParams:function(t,e){var i=this.getData(e),n=this.getRawValue(t,e),r=i.getRawIndex(t),a=i.getName(t),o=i.getRawDataItem(t),s=i.getItemVisual(t,"color"),l=i.getItemVisual(t,"borderColor"),u=this.ecModel.getComponent("tooltip"),h=u&&u.get("renderMode"),c=wp(h),d=this.mainType,f="series"===d,p=i.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:n,color:s,borderColor:l,dimensionNames:p?p.dimensionNames:null,encode:p?p.encode:null,marker:xp({color:s,renderMode:c}),$vars:["seriesName","name","value"]}},getFormattedLabel:function(t,e,i,n,r){e=e||"normal";var a=this.getData(i),o=a.getItemModel(t),s=this.getDataParams(t,i);null!=n&&s.value instanceof Array&&(s.value=s.value[n]);var l=o.get("normal"===e?[r||"label","formatter"]:[e,r||"label","formatter"]);return"function"==typeof l?(s.status=e,s.dimensionIndex=n,l(s)):"string"==typeof l?bp(l,s).replace(Sp,(function(e,i){var n=i.length;return"["===i.charAt(0)&&"]"===i.charAt(n-1)&&(i=+i.slice(1,n-1)),_p(a,t,i)})):void 0},getRawValue:function(t,e){return _p(this.getData(e),t)},formatTooltip:function(){}},Mp=Tp,Cp=zt.isArray;function Ip(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 Ap=Ip.prototype;Ap.perform=function(t){var e,i=this._upstream,n=t&&t.skip;if(this._dirty&&i){var r=this.context;r.data=r.outputData=i.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!n&&(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 i,n;t._dueIndex=t._outputDueEnd=t._dueEnd=0,t._settedOutputEnd=null,!e&&t._reset&&((i=t._reset(t.context))&&i.progress&&(n=i.forceFirstProgress,i=i.progress),Cp(i)&&!i.length&&(i=null));t._progress=i,t._modBy=t._modDataCount=null;var r=t._downstream;return r&&r.dirty(),n}(this,n)),this._modBy=l,this._modDataCount=u;var c=t&&t.step;if(this._dueEnd=i?i._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,f=Math.min(null!=c?this._dueIndex+c:1/0,this._dueEnd);if(!n&&(a||d<f)){var p=this._progress;if(Cp(p))for(var g=0;g<p.length;g++)kp(this,p[g],d,f,l,u);else kp(this,p,d,f,l,u)}this._dueIndex=f;var m=null!=this._settedOutputEnd?this._settedOutputEnd:f;this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()};var Dp=function(){var t,e,i,n,r,a={reset:function(l,u,h,c){e=l,t=u,i=h,n=c,r=Math.ceil(n/i),a.next=i>1&&n>0?s:o}};return a;function o(){return e<t?e++:null}function s(){var a=e%r*i+Math.ceil(e/r),o=e>=t?null:a<n?a:e;return e++,o}}();function kp(t,e,i,n,r,a){Dp.reset(i,n,r,a),t._callingProgress=e,t._callingProgress({start:i,end:n,count:n-i,next:Dp.next},t.context)}Ap.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},Ap.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},Ap.pipe=function(t){(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},Ap.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},Ap.getUpstream=function(){return this._upstream},Ap.getDownstream=function(){return this._downstream},Ap.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t};var Op={createTask:function(t){return new Ip(t)}},Pp=Rc.formatTime,Lp=Rc.encodeHTML,Rp=Rc.addCommas,Ep=Rc.getTooltipMarker,Bp=Yc.getLayoutParams,zp=Yc.mergeLayoutParam,Np=Op.createTask,Fp=jd.prepareSource,Hp=jd.getSource,Vp=yp.retrieveRawValue,Wp=ko.makeInner(),Gp=Qc.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendVisualProvider:null,visualColorAccessPath:"itemStyle.color",visualBorderColorAccessPath:"itemStyle.borderColor",layoutMode:null,init:function(t,e,i,n){this.seriesIndex=this.componentIndex,this.dataTask=Np({count:jp,reset:Yp}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,i),Fp(this);var r=this.getInitialData(t,i);qp(r,this),this.dataTask.context.data=r,Wp(this).dataBeforeProcessed=r,Up(this)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?Bp(t):{},r=this.subType;Qc.hasClass(r)&&(r+="Series"),zt.merge(t,e.getTheme().get(this.subType)),zt.merge(t,this.getDefaultOption()),ko.defaultEmphasis(t,"label",["show"]),this.fillDataTextStyle(t.data),i&&zp(t,n,i)},mergeOption:function(t,e){t=zt.merge(this.option,t,!0),this.fillDataTextStyle(t.data);var i=this.layoutMode;i&&zp(this.option,t,i),Fp(this);var n=this.getInitialData(t,e);qp(n,this),this.dataTask.dirty(),this.dataTask.context.data=n,Wp(this).dataBeforeProcessed=n,Up(this)},fillDataTextStyle:function(t){if(t&&!zt.isTypedArray(t))for(var e=["show"],i=0;i<t.length;i++)t[i]&&t[i].label&&ko.defaultEmphasis(t[i],"label",e)},getInitialData:function(){},appendData:function(t){this.getRawData().appendData(t.data)},getData:function(t){var e=$p(this);if(e){var i=e.context.data;return null==t?i:i.getLinkedData(t)}return Wp(this).data},setData:function(t){var e=$p(this);if(e){var i=e.context;i.data!==t&&e.modifyOutputEnd&&e.setOutputEnd(t.count()),i.outputData=t,e!==this.dataTask&&(i.data=t)}Wp(this).data=t},getSource:function(){return Hp(this)},getRawData:function(){return Wp(this).dataBeforeProcessed},getBaseAxis:function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},formatTooltip:function(t,e,i,n){var r=this,a="html"===(n=n||"html")?"<br/>":"\n",o="richText"===n,s={},l=0;function u(t){return{renderMode:n,content:Lp(Rp(t)),style:s}}var h=this.getData(),c=h.mapDimension("defaultedTooltip",!0),d=c.length,f=this.getRawValue(t),p=zt.isArray(f),g=h.getItemVisual(t,"color");zt.isObject(g)&&g.colorStops&&(g=(g.colorStops[0]||{}).color),g=g||"transparent";var m=d>1||p&&!d?function(i){var a=zt.reduce(i,(function(t,e,i){var n=h.getDimensionInfo(i);return t|(n&&!1!==n.tooltip&&null!=n.displayName)}),0),u=[];function d(t,i){var c=h.getDimensionInfo(i);if(c&&!1!==c.otherDims.tooltip){var d=c.type,f="sub"+r.seriesIndex+"at"+l,p=Ep({color:g,type:"subItem",renderMode:n,markerId:f}),m="string"==typeof p?p:p.content,v=(a?m+Lp(c.displayName||"-")+": ":"")+Lp("ordinal"===d?t+"":"time"===d?e?"":Pp("yyyy/MM/dd hh:mm:ss",t):Rp(t));v&&u.push(v),o&&(s[f]=g,++l)}}c.length?zt.each(c,(function(e){d(Vp(h,t,e),e)})):zt.each(i,d);var f=a?o?"\n":"<br/>":"",p=f+u.join(f||", ");return{renderMode:n,content:p,style:s}}(f):u(d?Vp(h,t,c[0]):p?f[0]:f),v=m.content,y=r.seriesIndex+"at"+l,_=Ep({color:g,type:"item",renderMode:n,markerId:y});s[y]=g,++l;var x=h.getName(t),b=this.name;ko.isNameSpecified(this)||(b=""),b=b?Lp(b)+(e?": ":a):"";var w="string"==typeof _?_:_.content;return{html:e?w+b+v:b+w+(x?Lp(x)+": "+v:v),markers:s}},isAnimationEnabled:function(){if(Q.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,i){var n=this.ecModel,r=ad.getColorFromPalette.call(this,t,e,i);return r||(r=n.getColorFromPalette(t,e,i)),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 Up(t){var e=t.name;ko.isNameSpecified(t)||(t.name=function(t){var e=t.getRawData(),i=e.mapDimension("seriesName",!0),n=[];return zt.each(i,(function(t){var i=e.getDimensionInfo(t);i.displayName&&n.push(i.displayName)})),n.join(" ")}(t)||e)}function jp(t){return t.model.getRawData().count()}function Yp(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),Xp}function Xp(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function qp(t,e){zt.each(t.CHANGABLE_METHODS,(function(i){t.wrapMethod(i,zt.curry(Zp,e))}))}function Zp(t){var e=$p(t);e&&e.setOutputEnd(this.count())}function $p(t){var e=(t.ecModel||{}).scheduler,i=e&&e.getPipeline(t.uid);if(i){var n=i.currentTask;if(n){var r=n.agentStubMap;r&&(n=r.get(t.uid))}return n}}zt.mixin(Gp,Mp),zt.mixin(Gp,ad);var Kp=Gp,Qp=function(){this.group=new kn,this.uid=dc.getUID("viewComponent")},Jp=Qp.prototype={constructor:Qp,init:function(t,e){},render:function(t,e,i,n){},dispose:function(){},filterForExposedEvent:null};Jp.updateView=Jp.updateLayout=Jp.updateVisual=function(t,e,i,n){},No.enableClassExtend(Qp),No.enableClassManagement(Qp,{registerWhenExtend:!0});var tg=Qp,eg=ko.makeInner;var ig=function(){var t=eg();return function(e){var i=t(e),n=e.pipelineContext,r=i.large,a=i.progressiveRender,o=i.large=n&&n.large,s=i.progressiveRender=n&&n.progressiveRender;return!!(r^o||a^s)&&"reset"}},ng=zt.each,rg=Op.createTask,ag=ko.makeInner(),og=ig();function sg(){this.group=new kn,this.uid=dc.getUID("viewChart"),this.renderTask=rg({plan:cg,reset:dg}),this.renderTask.context={view:this}}sg.prototype={type:"chart",init:function(t,e){},render:function(t,e,i,n){},highlight:function(t,e,i,n){hg(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){hg(t.getData(),n,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var lg=sg.prototype;function ug(t,e,i){if(t&&(t.trigger(e,i),t.isGroup&&!qh.isHighDownDispatcher(t)))for(var n=0,r=t.childCount();n<r;n++)ug(t.childAt(n),e,i)}function hg(t,e,i){var n=ko.queryDataIndex(t,e),r=e&&null!=e.highlightKey?qh.getHighlightDigit(e.highlightKey):null;null!=n?ng(ko.normalizeToArray(n),(function(e){ug(t.getItemGraphicEl(e),i,r)})):t.eachItemGraphicEl((function(t){ug(t,i,r)}))}function cg(t){return og(t.model)}function dg(t){var e=t.model,i=t.ecModel,n=t.api,r=t.payload,a=e.pipelineContext.progressiveRender,o=t.view,s=r&&ag(r).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return"render"!==l&&o[l](e,i,n,r),fg[l]}lg.updateView=lg.updateLayout=lg.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},No.enableClassExtend(sg,["dispose"]),No.enableClassManagement(sg,{registerWhenExtend:!0}),sg.markUpdateMethod=function(t,e){ag(t).updateMethod=e};var fg={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)}}},pg=sg,gg="\0__throttleOriginMethod",mg="\0__throttleRate",vg="\0__throttleType";function yg(t,e,i){var n,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(){n=(new Date).getTime(),a=this,o=arguments;var t=s||e,d=s||i;s=null,r=n-(d?l:u)-t,clearTimeout(h),d?h=setTimeout(c,t):r>=0?c():h=setTimeout(c,-r),l=n};return d.clear=function(){h&&(clearTimeout(h),h=null)},d.debounceNextCall=function(t){s=t},d}var _g=function(t,e,i,n){var r=t[e];if(r){var a=r[gg]||r,o=r[vg];if(r[mg]!==i||o!==n){if(null==i||!n)return t[e]=a;(r=t[e]=yg(a,i,"debounce"===n))[gg]=a,r[vg]=n,r[mg]=i}return r}},xg=function(t,e){var i=t[e];i&&i[gg]&&(t[e]=i[gg])},bg={throttle:yg,createOrUpdate:_g,clear:xg},wg=zt.isFunction,Sg={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var i=t.getData(),n=(t.visualColorAccessPath||"itemStyle.color").split("."),r=t.get(n),a=!wg(r)||r instanceof Du?null:r;r&&!a||(r=t.getColorFromPalette(t.name,null,e.getSeriesCount())),i.setVisual("color",r);var o=(t.visualBorderColorAccessPath||"itemStyle.borderColor").split("."),s=t.get(o);if(i.setVisual("borderColor",s),!e.isSeriesFiltered(t)){a&&i.each((function(e){i.setItemVisual(e,"color",a(t.getDataParams(e)))}));return{dataEach:i.hasItemOption?function(t,e){var i=t.getItemModel(e),r=i.get(n,!0),a=i.get(o,!0);null!=r&&t.setItemVisual(e,"color",r),null!=a&&t.setItemVisual(e,"borderColor",a)}:null}}}},Tg=Sg,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:""}}}},Cg=yp.retrieveRawValue;var Ig=function(t,e){var i=e.getModel("aria");if(i.get("show"))if(i.get("description"))t.setAttribute("aria-label",i.get("description"));else{var n=0;e.eachSeries((function(t,e){++n}),this);var r,a=i.get("data.maxCount")||10,o=i.get("series.maxCount")||10,s=Math.min(n,o);if(!(n<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(n>1?"series.multiple.prefix":"series.single.prefix"),{seriesCount:n}),e.eachSeries((function(t,e){if(e<s){var i,r=t.get("name"),o="series."+(n>1?"multiple":"single")+".";i=h(i=c(r?o+"withName":o+"withoutName"),{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:(m=t.subType,Mg.series.typeNames[m]||"自定义图")});var l=t.getData();window.data=l,l.count()>a?i+=h(c("data.partialData"),{displayCnt:a}):i+=c("data.allData");for(var d=[],f=0;f<l.count();f++)if(f<a){var p=l.getName(f),g=Cg(l,f);d.push(h(c(p?"data.withName":"data.withoutName"),{name:p,value:g}))}i+=d.join(c("data.separator.middle"))+c("data.separator.end"),u.push(i)}var m})),r+=u.join(c("series.multiple.separator.middle"))+c("series.multiple.separator.end"),t.setAttribute("aria-label",r)}}function h(t,e){if("string"!=typeof t)return t;var i=t;return zt.each(e,(function(t,e){i=i.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)})),i}function c(t){var e=i.get(t);if(null==e){for(var n=t.split("."),r=Mg.aria,a=0;a<n.length;++a)r=r[n[a]];return r}return e}},Ag=Math.PI;var Dg=function(t,e){e=e||{},zt.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 i=new qh.Group,n=new qh.Rect({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});i.add(n);var r=e.fontSize+" sans-serif",a=new qh.Rect({style:{fill:"none",text:e.text,font:r,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});if(i.add(a),e.showSpinner){var o=new qh.Arc({shape:{startAngle:-Ag/2,endAngle:-Ag/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*Ag/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:3*Ag/2}).delay(300).start("circularInOut"),i.add(o)}return i.resize=function(){var i=Nr.getWidth(e.text,r),s=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-2*s-(e.showSpinner&&i?10:0)-i)/2-(e.showSpinner?0:i/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}),n.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},i.resize(),i},kg=zt.each,Og=zt.map,Pg=zt.isFunction,Lg=zt.createHashMap,Rg=zt.noop,Eg=Op.createTask,Bg=dc.getUID,zg=ko.normalizeToArray;function Ng(t,e,i,n){this.ecInstance=t,this.api=e,this.unfinished;i=this._dataProcessorHandlers=i.slice(),n=this._visualHandlers=n.slice();this._allHandlers=i.concat(n),this._stageTaskMap=Lg()}var Fg=Ng.prototype;function Hg(t,e,i,n,r){var a;function o(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}r=r||{},kg(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(),Vg(h,n);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&&i.isSeriesFiltered(s.context.model),Vg(s,n),a|=s.perform(u)}))}})),t.unfinished|=a}Fg.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each((function(t){var e=t.overallTask;e&&e.dirty()}))},Fg.getPerformArgs=function(t,e){if(t.__pipeline){var i=this._pipelineMap.get(t.__pipeline.id),n=i.context,r=!e&&i.progressiveEnabled&&(!n||n.progressiveRender)&&t.__idxInPipeline>i.blockIndex?i.step:null,a=n&&n.modDataCount;return{step:r,modBy:null!=a?Math.ceil(a/r):null,modDataCount:a}}},Fg.getPipeline=function(t){return this._pipelineMap.get(t)},Fg.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),n=t.getData().count(),r=i.progressiveEnabled&&e.incrementalPrepareRender&&n>=i.threshold,a=t.get("large")&&n>=t.get("largeThreshold"),o="mod"===t.get("progressiveChunkMode")?n:null;t.pipelineContext=i.context={progressiveRender:r,modDataCount:o,large:a}},Fg.restorePipelines=function(t){var e=this,i=e._pipelineMap=Lg();t.eachSeries((function(t){var n=t.getProgressive(),r=t.uid;i.set(r,{id:r,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:n&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(n||700),count:0}),Kg(e,t,t.dataTask)}))},Fg.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.ecInstance.getModel(),i=this.api;kg(this._allHandlers,(function(n){var r=t.get(n.uid)||t.set(n.uid,[]);n.reset&&function(t,e,i,n,r){var a=i.seriesTaskMap||(i.seriesTaskMap=Lg()),o=e.seriesType,s=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(l):o?n.eachRawSeriesByType(o,l):s&&s(n,r).each(l);function l(i){var o=i.uid,s=a.get(o)||a.set(o,Eg({plan:Yg,reset:Xg,count:$g}));s.context={model:i,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:t},Kg(t,i,s)}var u=t._pipelineMap;a.each((function(t,e){u.get(e)||(t.dispose(),a.removeKey(e))}))}(this,n,r,e,i),n.overallReset&&function(t,e,i,n,r){var a=i.overallTask=i.overallTask||Eg({reset:Wg});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:t};var o=a.agentStubMap=a.agentStubMap||Lg(),s=e.seriesType,l=e.getTargetSeries,u=!0,h=e.modifyOutputEnd;s?n.eachRawSeriesByType(s,c):l?l(n,r).each(c):(u=!1,kg(n.getSeries(),c));function c(e){var i=e.uid,n=o.get(i);n||(n=o.set(i,Eg({reset:Gg,onDirty:jg})),a.dirty()),n.context={model:e,overallProgress:u,modifyOutputEnd:h},n.agent=a,n.__block=u,Kg(t,e,n)}var d=t._pipelineMap;o.each((function(t,e){d.get(e)||(t.dispose(),a.dirty(),o.removeKey(e))}))}(this,n,r,e,i)}),this)},Fg.prepareView=function(t,e,i,n){var r=t.renderTask,a=r.context;a.model=e,a.ecModel=i,a.api=n,r.__block=!t.incrementalPrepareRender,Kg(this,e,r)},Fg.performDataProcessorTasks=function(t,e){Hg(this,this._dataProcessorHandlers,t,e,{block:!0})},Fg.performVisualTasks=function(t,e,i){Hg(this,this._visualHandlers,t,e,i)},Fg.performSeriesTasks=function(t){var e;t.eachSeries((function(t){e|=t.dataTask.perform()})),this.unfinished|=e},Fg.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 Vg=Fg.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)};function Wg(t){t.overallReset(t.ecModel,t.api,t.payload)}function Gg(t,e){return t.overallProgress&&Ug}function Ug(){this.agent.dirty(),this.getDownstream().dirty()}function jg(){this.agent&&this.agent.dirty()}function Yg(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function Xg(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=zg(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?Og(e,(function(t,e){return Zg(e)})):qg}var qg=Zg(0);function Zg(t){return function(e,i){var n=i.data,r=i.resetDefines[t];if(r&&r.dataEach)for(var a=e.start;a<e.end;a++)r.dataEach(n,a);else r&&r.progress&&r.progress(e,n)}}function $g(t){return t.data.count()}function Kg(t,e,i){var n=e.uid,r=t._pipelineMap.get(n);!r.head&&(r.head=i),r.tail&&r.tail.pipe(i),r.tail=i,i.__idxInPipeline=r.count++,i.__pipeline=r}function Qg(t){Jg=null;try{t(tm,em)}catch(t){}return Jg}Ng.wrapStageHandler=function(t,e){return Pg(t)&&(t={overallReset:t,seriesType:Qg(t)}),t.uid=Bg("stageHandler"),e&&(t.visualType=e),t};var Jg,tm={},em={};function im(t,e){for(var i in e.prototype)t[i]=Rg}im(tm,df),im(em,pf),tm.eachSeriesByType=tm.eachRawSeriesByType=function(t){Jg=t},tm.eachComponent=function(t){"series"===t.mainType&&t.subType&&(Jg=t.subType)};var nm=Ng,rm=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],am={color:rm,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],rm]},om="#eee",sm=function(){return{axisLine:{lineStyle:{color:om}},axisTick:{lineStyle:{color:om}},axisLabel:{textStyle:{color:om}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:om}}}},lm=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],um={color:lm,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:om},crossStyle:{color:om},label:{color:"#000"}}},legend:{textStyle:{color:om}},textStyle:{color:om},title:{textStyle:{color:om}},toolbox:{iconStyle:{normal:{borderColor:om}}},dataZoom:{textStyle:{color:om}},visualMap:{textStyle:{color:om}},timeline:{lineStyle:{color:om},itemStyle:{normal:{color:lm[1]}},label:{normal:{textStyle:{color:om}}},controlStyle:{normal:{color:om,borderColor:om}}},timeAxis:sm(),logAxis:sm(),valueAxis:sm(),categoryAxis:sm(),line:{symbol:"circle"},graph:{color:lm},gauge:{title:{textStyle:{color:om}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};um.categoryAxis.splitLine.show=!1;var hm=um,cm=jd.detectSourceFormat,dm=od.SERIES_LAYOUT_BY_COLUMN;Qc.extend({type:"dataset",defaultOption:{seriesLayoutBy:dm,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){cm(this)}}),tg.extend({type:"dataset"});var fm=gl.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(t,e){var i=.5522848,n=e.cx,r=e.cy,a=e.rx,o=e.ry,s=a*i,l=o*i;t.moveTo(n-a,r),t.bezierCurveTo(n-a,r-l,n-s,r-o,n,r-o),t.bezierCurveTo(n+s,r-o,n+a,r-l,n+a,r),t.bezierCurveTo(n+a,r+l,n+s,r+o,n,r+o),t.bezierCurveTo(n-s,r+o,n-a,r+l,n-a,r),t.closePath()}}),pm=Rl.createFromString,gm=zt.isString,mm=zt.extend,vm=zt.defaults,ym=zt.trim,_m=zt.each,xm=/[\s,]+/;function bm(t){gm(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 wm(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}wm.prototype.parse=function(t,e){e=e||{};var i=bm(t);if(!i)throw new Error("Illegal svg");var n=new kn;this._root=n;var r=i.getAttribute("viewBox")||"",a=parseFloat(i.getAttribute("width")||e.width),o=parseFloat(i.getAttribute("height")||e.height);isNaN(a)&&(a=null),isNaN(o)&&(o=null),Am(i,n,null,!0);for(var s,l,u=i.firstChild;u;)this._parseNode(u,n),u=u.nextSibling;if(r){var h=ym(r).split(xm);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=Lm(s,a,o),!e.ignoreViewBox)){var c=n;(n=new kn).add(c),c.scale=l.scale.slice(),c.position=l.position.slice()}return e.ignoreRootClip||null==a||null==o||n.setClipPath(new du({shape:{x:0,y:0,width:a,height:o}})),{root:n,width:a,height:o,viewBoxRect:s,viewBoxTransform:l}},wm.prototype._parseNode=function(t,e){var i,n,r=t.nodeName.toLowerCase();if("defs"===r?this._isDefine=!0:"text"===r&&(this._isText=!0),this._isDefine){if(n=Tm[r]){var a=n.call(this,t),o=t.getAttribute("id");o&&(this._defs[o]=a)}}else(n=Sm[r])&&(i=n.call(this,t,e),e.add(i));for(var s=t.firstChild;s;)1===s.nodeType&&this._parseNode(s,i),3===s.nodeType&&this._isText&&this._parseText(s,i),s=s.nextSibling;"defs"===r?this._isDefine=!1:"text"===r&&(this._isText=!1)},wm.prototype._parseText=function(t,e){if(1===t.nodeType){var i=t.getAttribute("dx")||0,n=t.getAttribute("dy")||0;this._textX+=parseFloat(i),this._textY+=parseFloat(n)}var r=new zl({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});Mm(e,r),Am(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 Sm={g:function(t,e){var i=new kn;return Mm(e,i),Am(t,i,this._defs),i},rect:function(t,e){var i=new du;return Mm(e,i),Am(t,i,this._defs),i.setShape({x:parseFloat(t.getAttribute("x")||0),y:parseFloat(t.getAttribute("y")||0),width:parseFloat(t.getAttribute("width")||0),height:parseFloat(t.getAttribute("height")||0)}),i},circle:function(t,e){var i=new Nl;return Mm(e,i),Am(t,i,this._defs),i.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),r:parseFloat(t.getAttribute("r")||0)}),i},line:function(t,e){var i=new gu;return Mm(e,i),Am(t,i,this._defs),i.setShape({x1:parseFloat(t.getAttribute("x1")||0),y1:parseFloat(t.getAttribute("y1")||0),x2:parseFloat(t.getAttribute("x2")||0),y2:parseFloat(t.getAttribute("y2")||0)}),i},ellipse:function(t,e){var i=new fm;return Mm(e,i),Am(t,i,this._defs),i.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),rx:parseFloat(t.getAttribute("rx")||0),ry:parseFloat(t.getAttribute("ry")||0)}),i},polygon:function(t,e){var i=t.getAttribute("points");i&&(i=Cm(i));var n=new nu({shape:{points:i||[]}});return Mm(e,n),Am(t,n,this._defs),n},polyline:function(t,e){var i=new gl;Mm(e,i),Am(t,i,this._defs);var n=t.getAttribute("points");return n&&(n=Cm(n)),new ru({shape:{points:n||[]}})},image:function(t,e){var i=new Sa;return Mm(e,i),Am(t,i,this._defs),i.setStyle({image:t.getAttribute("xlink:href"),x:t.getAttribute("x"),y:t.getAttribute("y"),width:t.getAttribute("width"),height:t.getAttribute("height")}),i},text:function(t,e){var i=t.getAttribute("x")||0,n=t.getAttribute("y")||0,r=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0;this._textX=parseFloat(i)+parseFloat(r),this._textY=parseFloat(n)+parseFloat(a);var o=new kn;return Mm(e,o),Am(t,o,this._defs),o},tspan:function(t,e){var i=t.getAttribute("x"),n=t.getAttribute("y");null!=i&&(this._textX=parseFloat(i)),null!=n&&(this._textY=parseFloat(n));var r=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0,o=new kn;return Mm(e,o),Am(t,o,this._defs),this._textX+=r,this._textY+=a,o},path:function(t,e){var i=t.getAttribute("d")||"",n=pm(i);return Mm(e,n),Am(t,n,this._defs),n}},Tm={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||0,10),i=parseInt(t.getAttribute("y1")||0,10),n=parseInt(t.getAttribute("x2")||10,10),r=parseInt(t.getAttribute("y2")||0,10),a=new Ou(e,i,n,r);return function(t,e){var i=t.firstChild;for(;i;){if(1===i.nodeType){var n=i.getAttribute("offset");n=n.indexOf("%")>0?parseInt(n,10)/100:n?parseFloat(n):0;var r=i.getAttribute("stop-color")||"#000000";e.addColorStop(n,r)}i=i.nextSibling}}(t,a),a},radialgradient:function(t){}};function Mm(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),vm(e.__inheritedStyle,t.__inheritedStyle))}function Cm(t){for(var e=ym(t).split(xm),i=[],n=0;n<e.length;n+=2){var r=parseFloat(e[n]),a=parseFloat(e[n+1]);i.push([r,a])}return i}var Im={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 Am(t,e,i,n){var r=e.__inheritedStyle||{},a="text"===e.type;if(1===t.nodeType&&(function(t,e){var i=t.getAttribute("transform");if(i){i=i.replace(/,/g," ");var n=null,r=[];i.replace(Om,(function(t,e,i){r.push(e,i)}));for(var a=r.length-1;a>0;a-=2){var o=r[a],s=r[a-1];switch(n=n||ti.create(),s){case"translate":o=ym(o).split(xm),ti.translate(n,n,[parseFloat(o[0]),parseFloat(o[1]||0)]);break;case"scale":o=ym(o).split(xm),ti.scale(n,n,[parseFloat(o[0]),parseFloat(o[1]||o[0])]);break;case"rotate":o=ym(o).split(xm),ti.rotate(n,n,parseFloat(o[0]));break;case"skew":o=ym(o).split(xm),console.warn("Skew transform is not supported yet");break;case"matrix":o=ym(o).split(xm);n[0]=parseFloat(o[0]),n[1]=parseFloat(o[1]),n[2]=parseFloat(o[2]),n[3]=parseFloat(o[3]),n[4]=parseFloat(o[4]),n[5]=parseFloat(o[5])}}e.setLocalTransform(n)}}(t,e),mm(r,function(t){var e=t.getAttribute("style"),i={};if(!e)return i;var n,r={};Pm.lastIndex=0;for(;null!=(n=Pm.exec(e));)r[n[1]]=n[2];for(var a in Im)Im.hasOwnProperty(a)&&null!=r[a]&&(i[Im[a]]=r[a]);return i}(t)),!n))for(var o in Im)if(Im.hasOwnProperty(o)){var s=t.getAttribute(o);null!=s&&(r[Im[o]]=s)}var l=a?"textFill":"fill",u=a?"textStroke":"stroke";e.style=e.style||new Kn;var h=e.style;null!=r.fill&&h.set(l,km(r.fill,i)),null!=r.stroke&&h.set(u,km(r.stroke,i)),_m(["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"),_m(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],(function(t){null!=r[t]&&h.set(t,r[t])})),r.lineDash&&(e.style.lineDash=ym(r.lineDash).split(xm)),h[u]&&"none"!==h[u]&&(e[u]=!0),e.__inheritedStyle=r}var Dm=/url\(\s*#(.*?)\)/;function km(t,e){var i=e&&t&&t.match(Dm);return i?e[ym(i[1])]:t}var Om=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;var Pm=/([^\s:;]+)\s*:\s*([^:;]+)/g;function Lm(t,e,i){var n=e/t.width,r=i/t.height,a=Math.min(n,r);return{scale:[a,a],position:[-(t.x+t.width/2)*a+e/2,-(t.y+t.height/2)*a+i/2]}}var Rm={parseXML:bm,makeViewBoxTransform:Lm,parseSVG:function(t,e){return(new wm).parse(t,e)}},Em=zt.createHashMap,Bm=zt.isString,zm=zt.isArray,Nm=zt.each,Fm=Rm.parseXML,Hm=Em(),Vm={registerMap:function(t,e,i){var n;return zm(e)?n=e:e.svg?n=[{type:"svg",source:e.svg,specialAreas:e.specialAreas}]:(e.geoJson&&!e.features&&(i=e.specialAreas,e=e.geoJson),n=[{type:"geoJSON",source:e,specialAreas:i}]),Nm(n,(function(t){var e=t.type;"geoJson"===e&&(e=t.type="geoJSON"),(0,Wm[e])(t)})),Hm.set(t,n)},retrieveMap:function(t){return Hm.get(t)}},Wm={geoJSON:function(t){var e=t.source;t.geoJSON=Bm(e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=Fm(t.source)}},Gm=Vm;function Um(t){return t}function jm(t,e,i,n,r){this._old=t,this._new=e,this._oldKeyGetter=i||Um,this._newKeyGetter=n||Um,this.context=r}function Ym(t,e,i,n,r){for(var a=0;a<t.length;a++){var o="_ec_"+r[n](t[a],a),s=e[o];null==s?(i.push(o),e[o]=a):(s.length||(e[o]=s=[s]),s.push(a))}}jm.prototype={constructor:jm,add:function(t){return this._add=t,this},update:function(t){return this._update=t,this},remove:function(t){return this._remove=t,this},execute:function(){var t=this._old,e=this._new,i={},n=[],r=[];for(Ym(t,{},n,"_oldKeyGetter",this),Ym(e,i,r,"_newKeyGetter",this),a=0;a<t.length;a++){if(null!=(s=i[o=n[a]]))(u=s.length)?(1===u&&(i[o]=null),s=s.shift()):i[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(i.hasOwnProperty(o)){var s;if(null==(s=i[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 Xm=jm,qm=zt.each,Zm=zt.createHashMap,$m=Zm(["tooltip","label","itemName","itemId","seriesName"]);function Km(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}var Qm=function(t){var e={},i=e.encode={},n=Zm(),r=[],a=[],o=e.userOutput={dimensionNames:t.dimensions.slice(),encode:{}};qm(t.dimensions,(function(e){var s,l=t.getDimensionInfo(e),u=l.coordDim;if(u){var h=l.coordDimIndex;Km(i,u)[h]=e,l.isExtraCoord||(n.set(u,1),"ordinal"!==(s=l.type)&&"time"!==s&&(r[0]=e),Km(o.encode,u)[h]=l.index),l.defaultTooltip&&a.push(e)}$m.each((function(t,e){var n=Km(i,e),r=l.otherDims[e];null!=r&&!1!==r&&(n[r]=l.name)}))}));var s=[],l={};n.each((function(t,e){var n=i[e];l[e]=n[0],s=s.concat(n)})),e.dataDimsOnCoord=s,e.encodeFirstDimNotExtra=l;var u=i.label;u&&u.length&&(r=u.slice());var h=i.tooltip;return h&&h.length?a=h.slice():a.length||(a=r.slice()),i.defaultedLabel=r,i.defaultedTooltip=a,e},Jm={OTHER_DIMENSIONS:$m,summarizeDimensions:Qm,getDimensionTypeByAxis:function(t){return"category"===t?"ordinal":"time"===t?"time":"float"}};var tv=function(t){null!=t&&zt.extend(this,t),this.otherDims={}},ev=yp.defaultDimValueGetters,iv=yp.DefaultDataProvider,nv=Jm.summarizeDimensions,rv=zt.isObject,av="undefined",ov={float:typeof Float64Array===av?Array:Float64Array,int:typeof Int32Array===av?Array:Int32Array,ordinal:Array,number:Array,time:Array},sv=typeof Uint32Array===av?Array:Uint32Array,lv=typeof Int32Array===av?Array:Int32Array,uv=typeof Uint16Array===av?Array:Uint16Array;function hv(t){return t._rawCount>65535?sv:uv}var cv=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],dv=["_extent","_approximateExtent","_rawExtent"];function fv(t,e){zt.each(cv.concat(e.__wrappedMethods||[]),(function(i){e.hasOwnProperty(i)&&(t[i]=e[i])})),t.__wrappedMethods=e.__wrappedMethods,zt.each(dv,(function(i){t[i]=zt.clone(e[i])})),t._calculationInfo=zt.extend(e._calculationInfo)}var pv=function(t,e){t=t||["x","y"];for(var i={},n=[],r={},a=0;a<t.length;a++){var o=t[a];zt.isString(o)?o=new tv({name:o}):o instanceof tv||(o=new tv(o));var s=o.name;o.type=o.type||"float",o.coordDim||(o.coordDim=s,o.coordDimIndex=0),o.otherDims=o.otherDims||{},n.push(s),i[s]=o,o.index=a,o.createInvertedIndices&&(r[s]=[])}this.dimensions=n,this._dimensionInfos=i,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=nv(this),this._invertedIndicesMap=r,this._calculationInfo={},this.userOutput=this._dimensionsSummary.userOutput},gv=pv.prototype;function mv(t,e,i,n,r){var a=ov[e.type],o=n-1,s=e.name,l=t[s][o];if(l&&l.length<i){for(var u=new a(Math.min(r-o*i,i)),h=0;h<l.length;h++)u[h]=l[h];t[s][o]=u}for(var c=n*i;c<r;c+=i)t[s].push(new a(Math.min(r-c,i)))}function vv(t){var e=t._invertedIndicesMap;zt.each(e,(function(i,n){var r=t._dimensionInfos[n].ordinalMeta;if(r){i=e[n]=new lv(r.categories.length);for(var a=0;a<i.length;a++)i[a]=-1;for(a=0;a<t._count;a++)i[t.get(n,a)]=a}}))}function yv(t,e,i){var n;if(null!=e){var r=t._chunkSize,a=Math.floor(i/r),o=i%r,s=t.dimensions[e],l=t._storage[s][a];if(l){n=l[o];var u=t._dimensionInfos[s].ordinalMeta;u&&u.categories.length&&(n=u.categories[n])}}return n}function _v(t){return t}function xv(t){return t<this._count&&t>=0?this._indices[t]:-1}function bv(t,e){var i=t._idList[e];return null==i&&(i=yv(t,t._idDimIdx,e)),null==i&&(i="e\0\0"+e),i}function wv(t){return zt.isArray(t)||(t=[t]),t}function Sv(t,e){var i=t.dimensions,n=new pv(zt.map(i,t.getDimensionInfo,t),t.hostModel);fv(n,t);for(var r=n._storage={},a=t._storage,o=0;o<i.length;o++){var s=i[o];a[s]&&(zt.indexOf(e,s)>=0?(r[s]=Tv(a[s]),n._rawExtent[s]=Mv(),n._extent[s]=null):r[s]=a[s])}return n}function Tv(t){for(var e,i,n=new Array(t.length),r=0;r<t.length;r++)n[r]=(e=t[r],i=void 0,(i=e.constructor)===Array?e.slice():new i(e));return n}function Mv(){return[1/0,-1/0]}gv.type="list",gv.hasItemOption=!0,gv.getDimension=function(t){return"number"!=typeof t&&(isNaN(t)||this._dimensionInfos.hasOwnProperty(t))||(t=this.dimensions[t]),t},gv.getDimensionInfo=function(t){return this._dimensionInfos[this.getDimension(t)]},gv.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},gv.mapDimension=function(t,e){var i=this._dimensionsSummary;if(null==e)return i.encodeFirstDimNotExtra[t];var n=i.encode[t];return!0===e?(n||[]).slice():n&&n[e]},gv.initData=function(t,e,i){(md.isInstance(t)||zt.isArrayLike(t))&&(t=new iv(t,this.dimensions.length)),this._rawData=t,this._storage={},this._indices=null,this._nameList=e||[],this._idList=[],this._nameRepeatCount={},i||(this.hasItemOption=!1),this.defaultDimValueGetter=ev[this._rawData.getSource().sourceFormat],this._dimValueGetter=i=i||this.defaultDimValueGetter,this._dimValueGetterArrayRows=ev.arrayRows,this._rawExtent={},this._initDataFromProvider(0,t.count()),t.pure&&(this.hasItemOption=!1)},gv.getProvider=function(){return this._rawData},gv.appendData=function(t){var e=this._rawData,i=this.count();e.appendData(t);var n=e.count();e.persistent||(n+=i),this._initDataFromProvider(i,n)},gv.appendValues=function(t,e){for(var i=this._chunkSize,n=this._storage,r=this.dimensions,a=r.length,o=this._rawExtent,s=this.count(),l=s+Math.max(t.length,e?e.length:0),u=this._chunkCount,h=0;h<a;h++){o[v=r[h]]||(o[v]=Mv()),n[v]||(n[v]=[]),mv(n,this._dimensionInfos[v],i,u,l),this._chunkCount=n[v].length}for(var c=new Array(a),d=s;d<l;d++){for(var f=d-s,p=Math.floor(d/i),g=d%i,m=0;m<a;m++){var v=r[m],y=this._dimValueGetterArrayRows(t[f]||c,v,f,m);n[v][p][g]=y;var _=o[v];y<_[0]&&(_[0]=y),y>_[1]&&(_[1]=y)}e&&(this._nameList[d]=e[f])}this._rawCount=this._count=l,this._extent={},vv(this)},gv._initDataFromProvider=function(t,e){if(!(t>=e)){for(var i,n=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[b=o[p]]||(c[b]=Mv());var g=l[b];0===g.otherDims.itemName&&(i=this._nameDimIdx=p),0===g.otherDims.itemId&&(this._idDimIdx=p),a[b]||(a[b]=[]),mv(a,g,n,f,e),this._chunkCount=a[b].length}for(var m=new Array(s),v=t;v<e;v++){m=r.getItem(v,m);for(var y=Math.floor(v/n),_=v%n,x=0;x<s;x++){var b,w=a[b=o[x]][y],S=this._dimValueGetter(m,b,v,x);w[_]=S;var T=c[b];S<T[0]&&(T[0]=S),S>T[1]&&(T[1]=S)}if(!r.pure){var M=u[v];if(m&&null==M)if(null!=m.name)u[v]=M=m.name;else if(null!=i){var C=o[i],I=a[C][y];if(I){M=I[_];var A=l[C].ordinalMeta;A&&A.categories.length&&(M=A.categories[M])}}var D=null==m?null:m.id;null==D&&null!=M&&(d[M]=d[M]||0,D=M,d[M]>0&&(D+="__ec__"+d[M]),d[M]++),null!=D&&(h[v]=D)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=e,this._extent={},vv(this)}},gv.count=function(){return this._count},gv.getIndices=function(){var t=this._indices;if(t){var e=t.constructor,i=this._count;if(e===Array){r=new e(i);for(var n=0;n<i;n++)r[n]=t[n]}else r=new e(t.buffer,0,i)}else{var r=new(e=hv(this))(this.count());for(n=0;n<r.length;n++)r[n]=n}return r},gv.get=function(t,e){if(!(e>=0&&e<this._count))return NaN;var i=this._storage;if(!i[t])return NaN;e=this.getRawIndex(e);var n=Math.floor(e/this._chunkSize),r=e%this._chunkSize;return i[t][n][r]},gv.getByRawIndex=function(t,e){if(!(e>=0&&e<this._rawCount))return NaN;var i=this._storage[t];if(!i)return NaN;var n=Math.floor(e/this._chunkSize),r=e%this._chunkSize;return i[n][r]},gv._getFast=function(t,e){var i=Math.floor(e/this._chunkSize),n=e%this._chunkSize;return this._storage[t][i][n]},gv.getValues=function(t,e){var i=[];zt.isArray(t)||(e=t,t=this.dimensions);for(var n=0,r=t.length;n<r;n++)i.push(this.get(t[n],e));return i},gv.hasValue=function(t){for(var e=this._dimensionsSummary.dataDimsOnCoord,i=0,n=e.length;i<n;i++)if(isNaN(this.get(e[i],t)))return!1;return!0},gv.getDataExtent=function(t){t=this.getDimension(t);var e=this._storage[t],i=Mv();if(!e)return i;var n,r=this.count();if(!this._indices)return this._rawExtent[t].slice();if(n=this._extent[t])return n.slice();for(var a=(n=i)[0],o=n[1],s=0;s<r;s++){var l=this._getFast(t,this.getRawIndex(s));l<a&&(a=l),l>o&&(o=l)}return n=[a,o],this._extent[t]=n,n},gv.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},gv.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},gv.getCalculationInfo=function(t){return this._calculationInfo[t]},gv.setCalculationInfo=function(t,e){rv(t)?zt.extend(this._calculationInfo,t):this._calculationInfo[t]=e},gv.getSum=function(t){var e=0;if(this._storage[t])for(var i=0,n=this.count();i<n;i++){var r=this.get(t,i);isNaN(r)||(e+=r)}return e},gv.getMedian=function(t){var e=[];this.each(t,(function(t,i){isNaN(t)||e.push(t)}));var i=[].concat(e).sort((function(t,e){return t-e})),n=this.count();return 0===n?0:n%2==1?i[(n-1)/2]:(i[n/2]+i[n/2-1])/2},gv.rawIndexOf=function(t,e){var i=(t&&this._invertedIndicesMap[t])[e];return null==i||isNaN(i)?-1:i},gv.indexOfName=function(t){for(var e=0,i=this.count();e<i;e++)if(this.getName(e)===t)return e;return-1},gv.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,i=e[t];if(null!=i&&i<this._count&&i===t)return t;for(var n=0,r=this._count-1;n<=r;){var a=(n+r)/2|0;if(e[a]<t)n=a+1;else{if(!(e[a]>t))return a;r=a-1}}return-1},gv.indicesOfNearest=function(t,e,i){var n=[];if(!this._storage[t])return n;null==i&&(i=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<=i&&((h<r||h===r&&u>=0&&a<0)&&(r=h,a=u,o=0),u===a&&(n[o++]=s))}return n.length=o,n},gv.getRawIndex=_v,gv.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],i=0;i<this.dimensions.length;i++){var n=this.dimensions[i];e.push(this.get(n,t))}return e},gv.getName=function(t){var e=this.getRawIndex(t);return this._nameList[e]||yv(this,this._nameDimIdx,e)||""},gv.getId=function(t){return bv(this,this.getRawIndex(t))},gv.each=function(t,e,i,n){if(this._count){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this;for(var r=(t=zt.map(wv(t),this.getDimension,this)).length,a=0;a<this.count();a++)switch(r){case 0:e.call(i,a);break;case 1:e.call(i,this.get(t[0],a),a);break;case 2:e.call(i,this.get(t[0],a),this.get(t[1],a),a);break;default:for(var o=0,s=[];o<r;o++)s[o]=this.get(t[o],a);s[o]=a,e.apply(i,s)}}},gv.filterSelf=function(t,e,i,n){if(this._count){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this,t=zt.map(wv(t),this.getDimension,this);for(var r=this.count(),a=new(hv(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(i,h);else if(1===s){var f=this._getFast(u,d);c=e.call(i,f,h)}else{for(var p=0;p<s;p++)o[p]=this._getFast(u,d);o[p]=h,c=e.apply(i,o)}c&&(a[l++]=d)}return l<r&&(this._indices=a),this._count=l,this._extent={},this.getRawIndex=this._indices?xv:_v,this}},gv.selectRange=function(t){if(this._count){var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(i);var n=e.length;if(n){var r=this.count(),a=new(hv(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===n){for(var d=this._storage[e[0]],f=0;f<this._chunkCount;f++)for(var p=d[f],g=Math.min(this._count-f*this._chunkSize,this._chunkSize),m=0;m<g;m++){((b=p[m])>=l&&b<=u||isNaN(b))&&(a[o++]=c),c++}h=!0}else if(2===n){d=this._storage[s];var v=this._storage[e[1]],y=t[e[1]][0],_=t[e[1]][1];for(f=0;f<this._chunkCount;f++){p=d[f];var x=v[f];for(g=Math.min(this._count-f*this._chunkSize,this._chunkSize),m=0;m<g;m++){var b=p[m],w=x[m];(b>=l&&b<=u||isNaN(b))&&(w>=y&&w<=_||isNaN(w))&&(a[o++]=c),c++}}h=!0}}if(!h)if(1===n)for(m=0;m<r;m++){var S=this.getRawIndex(m);((b=this._getFast(s,S))>=l&&b<=u||isNaN(b))&&(a[o++]=S)}else for(m=0;m<r;m++){var T=!0;for(S=this.getRawIndex(m),f=0;f<n;f++){var M=e[f];((b=this._getFast(i,S))<t[M][0]||b>t[M][1])&&(T=!1)}T&&(a[o++]=this.getRawIndex(m))}return o<r&&(this._indices=a),this._count=o,this._extent={},this.getRawIndex=this._indices?xv:_v,this}}},gv.mapArray=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this;var r=[];return this.each(t,(function(){r.push(e&&e.apply(this,arguments))}),i),r},gv.map=function(t,e,i,n){i=i||n||this;var r=Sv(this,t=zt.map(wv(t),this.getDimension,this));r._indices=this._indices,r.getRawIndex=r._indices?xv:_v;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(i,h);if(null!=p){"object"!=typeof p&&(o[0]=p,p=o);for(var g=this.getRawIndex(d),m=Math.floor(g/s),v=g%s,y=0;y<p.length;y++){var _=t[y],x=p[y],b=c[_],w=a[_];w&&(w[m][v]=x),x<b[0]&&(b[0]=x),x>b[1]&&(b[1]=x)}}}return r},gv.downSample=function(t,e,i,n){for(var r=Sv(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(hv(this))(u),f=0,p=0;p<u;p+=s){s>u-p&&(s=u-p,o.length=s);for(var g=0;g<s;g++){var m=this.getRawIndex(p+g),v=Math.floor(m/h),y=m%h;o[g]=l[v][y]}var _=i(o),x=this.getRawIndex(Math.min(p+n(o,_)||0,u-1)),b=x%h;l[Math.floor(x/h)][b]=_,_<c[0]&&(c[0]=_),_>c[1]&&(c[1]=_),d[f++]=x}return r._count=f,r._indices=d,r.getRawIndex=xv,r},gv.getItemModel=function(t){var e=this.hostModel;return new uc(this.getRawDataItem(t),e,e&&e.ecModel)},gv.diff=function(t){var e=this;return new Xm(t?t.getIndices():[],this.getIndices(),(function(e){return bv(t,e)}),(function(t){return bv(e,t)}))},gv.getVisual=function(t){var e=this._visual;return e&&e[t]},gv.setVisual=function(t,e){if(rv(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},gv.setLayout=function(t,e){if(rv(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},gv.getLayout=function(t){return this._layout[t]},gv.getItemLayout=function(t){return this._itemLayouts[t]},gv.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?zt.extend(this._itemLayouts[t]||{},e):e},gv.clearItemLayouts=function(){this._itemLayouts.length=0},gv.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],r=n&&n[e];return null!=r||i?r:this.getVisual(e)},gv.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{},r=this.hasItemVisual;if(this._itemVisuals[t]=n,rv(e))for(var a in e)e.hasOwnProperty(a)&&(n[a]=e[a],r[a]=!0);else n[e]=i,r[e]=!0},gv.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var Cv=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};gv.setItemGraphicEl=function(t,e){var i=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=i&&i.seriesIndex,"group"===e.type&&e.traverse(Cv,e)),this._graphicEls[t]=e},gv.getItemGraphicEl=function(t){return this._graphicEls[t]},gv.eachItemGraphicEl=function(t,e){zt.each(this._graphicEls,(function(i,n){i&&t&&t.call(e,i,n)}))},gv.cloneShallow=function(t){if(!t){var e=zt.map(this.dimensions,this.getDimensionInfo,this);t=new pv(e,this.hostModel)}if(t._storage=this._storage,fv(t,this),this._indices){var i=this._indices.constructor;t._indices=new i(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?xv:_v,t},gv.wrapMethod=function(t,e){var i=this[t];"function"==typeof i&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=i.apply(this,arguments);return e.apply(this,[t].concat(zt.slice(arguments)))})},gv.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],gv.CHANGABLE_METHODS=["filterSelf","selectRange"];var Iv=pv,Av=zt.createHashMap,Dv=zt.each,kv=zt.isString,Ov=zt.defaults,Pv=zt.extend,Lv=zt.isObject,Rv=zt.clone,Ev=ko.normalizeToArray,Bv=jd.guessOrdinal,zv=jd.BE_ORDINAL,Nv=Jm.OTHER_DIMENSIONS;function Fv(t,e,i){if(i||null!=e.get(t)){for(var n=0;null!=e.get(t+n);)n++;t+=n}return e.set(t,!0),t}var Hv=function(t,e,i){md.isInstance(e)||(e=md.seriesDataToSource(e)),i=i||{},t=(t||[]).slice();for(var n=(i.dimsDef||[]).slice(),r=Av(),a=Av(),o=[],s=function(t,e,i,n){var r=Math.max(t.dimensionsDetectCount||1,e.length,i.length,n||0);return Dv(e,(function(t){var e=t.dimsDef;e&&(r=Math.max(r,e.length))})),r}(e,t,n,i.dimCount),l=0;l<s;l++){var u=n[l]=Pv({},Lv(n[l])?n[l]:{name:n[l]}),h=u.name,c=o[l]=new tv;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=i.encodeDef;!d&&i.encodeDefaulter&&(d=i.encodeDefaulter(e,s)),(d=Av(d)).each((function(t,e){if(1===(t=Ev(t).slice()).length&&!kv(t[0])&&t[0]<0)d.set(e,!1);else{var i=d.set(e,[]);Dv(t,(function(t,n){kv(t)&&(t=r.get(t)),null!=t&&t<s&&(i[n]=t,p(o[t],e,n))}))}}));var f=0;function p(t,e,i){null!=Nv.get(e)?t.otherDims[e]=i:(t.coordDim=e,t.coordDimIndex=i,a.set(e,!0))}Dv(t,(function(t,e){var i,n,r;if(kv(t))i=t,t={};else{i=t.name;var a=t.ordinalMeta;t.ordinalMeta=null,(t=Rv(t)).ordinalMeta=a,n=t.dimsDef,r=t.otherDims,t.name=t.coordDim=t.coordDimIndex=t.dimsDef=t.otherDims=null}if(!1!==(s=d.get(i))){var s;if(!(s=Ev(s)).length)for(var l=0;l<(n&&n.length||1);l++){for(;f<o.length&&null!=o[f].coordDim;)f++;f<o.length&&s.push(f++)}Dv(s,(function(e,a){var s=o[e];if(p(Ov(s,t),i,a),null==s.name&&n){var l=n[a];!Lv(l)&&(l={name:l}),s.name=s.displayName=l.name,s.defaultTooltip=l.defaultTooltip}r&&Ov(s.otherDims,r)}))}}));var g=i.generateCoord,m=i.generateCoordCount,v=null!=m;m=g?m||1:0;for(var y=g||"value",_=0;_<s;_++){null==(c=o[_]=o[_]||new tv).coordDim&&(c.coordDim=Fv(y,a,v),c.coordDimIndex=0,(!g||m<=0)&&(c.isExtraCoord=!0),m--),null==c.name&&(c.name=Fv(c.coordDim,r)),null!=c.type||Bv(e,_,c.name)!==zv.Must&&(!c.isExtraCoord||null==c.otherDims.itemName&&null==c.otherDims.seriesName)||(c.type="ordinal")}return o},Vv=Hv;var Wv=function(t,e){return Vv((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})},Gv=zt.createHashMap,Uv=zt.each;function jv(t){this.coordSysName=t,this.coordSysDims=[],this.axisMap=Gv(),this.categoryAxisMap=Gv(),this.firstCategoryDimIndex=null}var Yv={cartesian2d:function(t,e,i,n){var r=t.getReferringComponents("xAxis")[0],a=t.getReferringComponents("yAxis")[0];e.coordSysDims=["x","y"],i.set("x",r),i.set("y",a),Xv(r)&&(n.set("x",r),e.firstCategoryDimIndex=0),Xv(a)&&(n.set("y",a),e.firstCategoryDimIndex,e.firstCategoryDimIndex=1)},singleAxis:function(t,e,i,n){var r=t.getReferringComponents("singleAxis")[0];e.coordSysDims=["single"],i.set("single",r),Xv(r)&&(n.set("single",r),e.firstCategoryDimIndex=0)},polar:function(t,e,i,n){var r=t.getReferringComponents("polar")[0],a=r.findAxisModel("radiusAxis"),o=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],i.set("radius",a),i.set("angle",o),Xv(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),Xv(o)&&(n.set("angle",o),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e,i,n){e.coordSysDims=["lng","lat"]},parallel:function(t,e,i,n){var r=t.ecModel,a=r.getComponent("parallel",t.get("parallelIndex")),o=e.coordSysDims=a.dimensions.slice();Uv(a.parallelAxisIndex,(function(t,a){var s=r.getComponent("parallelAxis",t),l=o[a];i.set(l,s),Xv(s)&&null==e.firstCategoryDimIndex&&(n.set(l,s),e.firstCategoryDimIndex=a)}))}};function Xv(t){return"category"===t.get("type")}var qv={getCoordSysInfoBySeries:function(t){var e=t.get("coordinateSystem"),i=new jv(e),n=Yv[e];if(n)return n(t,i,i.axisMap,i.categoryAxisMap),i}},Zv=zt.each,$v=zt.isString;function Kv(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}var Qv=function(t,e){return Kv(t,e)?t.getCalculationInfo("stackResultDimension"):e},Jv={enableDataStack:function(t,e,i){var n,r,a,o,s=(i=i||{}).byIndex,l=i.stackedCoordDimension,u=!(!t||!t.get("stack"));if(Zv(e,(function(t,i){$v(t)&&(e[i]=t={name:t}),u&&!t.isExtraCoord&&(s||n||!t.ordinalMeta||(n=t),r||"ordinal"===t.type||"time"===t.type||l&&l!==t.coordDim||(r=t))})),!r||s||n||(s=!0),r){a="__\0ecstackresult",o="__\0ecstackedover",n&&(n.createInvertedIndices=!0);var h=r.coordDim,c=r.type,d=0;Zv(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:n&&n.name,isStackedByIndex:s,stackedOverDimension:o,stackResultDimension:a}},isDimensionStacked:Kv,getStackedDimension:Qv},ty=od.SOURCE_FORMAT_ORIGINAL,ey=Jm.getDimensionTypeByAxis,iy=ko.getDataItemValue,ny=qv.getCoordSysInfoBySeries,ry=Jv.enableDataStack,ay=jd.makeSeriesEncodeForAxisCoordSys;var oy=function(t,e,i){i=i||{},md.isInstance(t)||(t=md.seriesDataToSource(t));var n,r=e.get("coordinateSystem"),a=vf.get(r),o=ny(e);o&&(n=zt.map(o.coordSysDims,(function(t){var e={name:t},i=o.axisMap.get(t);if(i){var n=i.get("type");e.type=ey(n)}return e}))),n||(n=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]);var s,l,u=Wv(t,{coordDimensions:n,generateCoord:i.generateCoord,encodeDefaulter:i.useEncodeDefaulter?zt.curry(ay,n,e):null});o&&zt.each(u,(function(t,e){var i=t.coordDim,n=o.categoryAxisMap.get(i);n&&(null==s&&(s=e),t.ordinalMeta=n.getOrdinalMeta()),null!=t.otherDims.itemName&&(l=!0)})),l||null==s||(u[s].otherDims.itemName=0);var h=ry(e,u),c=new Iv(u,e);c.setCalculationInfo(h);var d=null!=s&&function(t){if(t.sourceFormat===ty){var e=function(t){var e=0;for(;e<t.length&&null==t[e];)e++;return t[e]}(t.data||[]);return null!=e&&!zt.isArray(iy(e))}}(t)?function(t,e,i,n){return n===s?i:this.defaultDimValueGetter(t,e,i,n)}:null;return c.hasItemOption=!1,c.initData(t,null,d),c},sy=oy;function ly(t){this._setting=t||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}ly.prototype.parse=function(t){return t},ly.prototype.getSetting=function(t){return this._setting[t]},ly.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},ly.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},ly.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},ly.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},ly.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},ly.prototype.getExtent=function(){return this._extent.slice()},ly.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},ly.prototype.isBlank=function(){return this._isBlank},ly.prototype.setBlank=function(t){this._isBlank=t},ly.prototype.getLabel=null,No.enableClassExtend(ly),No.enableClassManagement(ly,{registerWhenExtend:!0});var uy=ly,hy=zt.createHashMap,cy=zt.isObject,dy=zt.map;function fy(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this._map}fy.createByAxisModel=function(t){var e=t.option,i=e.data,n=i&&dy(i,my);return new fy({categories:n,needCollect:!n,deduplication:!1!==e.dedplication})};var py=fy.prototype;function gy(t){return t._map||(t._map=hy(t.categories))}function my(t){return cy(t)&&null!=t.value?t.value:t+""}py.getOrdinal=function(t){return gy(this).get(t)},py.parseAndCollect=function(t){var e,i=this._needCollect;if("string"!=typeof t&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var n=gy(this);return null==(e=n.get(t))&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=NaN),e};var vy=fy,yy=uy.prototype,_y=uy.extend({type:"ordinal",init:function(t,e){t&&!zt.isArray(t)||(t=new vy({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),yy.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return yy.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(yy.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,i=e[0];i<=e[1];)t.push(i),i++;return t},getLabel:function(t){if(!this.isBlank())return this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:zt.noop,niceExtent:zt.noop});_y.create=function(){return new _y};var xy=_y,by=bc.round;function wy(t){return bc.getPrecisionSafe(t)+2}function Sy(t,e,i){t[e]=Math.max(Math.min(t[e],i[1]),i[0])}function Ty(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),Sy(t,0,e),Sy(t,1,e),t[0]>t[1]&&(t[0]=t[1])}var My={intervalScaleNiceTicks:function(t,e,i,n){var r={},a=t[1]-t[0],o=r.interval=bc.nice(a/e,!0);null!=i&&o<i&&(o=r.interval=i),null!=n&&o>n&&(o=r.interval=n);var s=r.intervalPrecision=wy(o);return Ty(r.niceTickExtent=[by(Math.ceil(t[0]/o)*o,s),by(Math.floor(t[1]/o)*o,s)],t),r},getIntervalPrecision:wy,fixExtent:Ty},Cy=bc.round,Iy=uy.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(e)||(i[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]),Iy.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=My.getIntervalPrecision(t)},getTicks:function(t){var e=this._interval,i=this._extent,n=this._niceExtent,r=this._intervalPrecision,a=[];if(!e)return a;i[0]<n[0]&&(t?a.push(Cy(n[0]-e,r)):a.push(i[0]));for(var o=n[0];o<=n[1]&&(a.push(o),(o=Cy(o+e,r))!==a[a.length-1]);)if(a.length>1e4)return[];var s=a.length?a[a.length-1]:n[1];return i[1]>s&&(t?a.push(Cy(s+e,r)):a.push(i[1])),a},getMinorTicks:function(t){for(var e=this.getTicks(!0),i=[],n=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=bc.round(o+(s+1)*u);h>n[0]&&h<n[1]&&l.push(h),s++}i.push(l)}return i},getLabel:function(t,e){if(null==t)return"";var i=e&&e.precision;return null==i?i=bc.getPrecisionSafe(t)||0:"auto"===i&&(i=this._intervalPrecision),t=Cy(t,i,!0),Rc.addCommas(t)},niceTicks:function(t,e,i){t=t||5;var n=this._extent,r=n[1]-n[0];if(isFinite(r)){r<0&&(r=-r,n.reverse());var a=My.intervalScaleNiceTicks(n,t,e,i);this._intervalPrecision=a.intervalPrecision,this._interval=a.interval,this._niceExtent=a.niceTickExtent}},niceExtent:function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var i=e[0];t.fixMax||(e[1]+=i/2),e[0]-=i/2}else e[1]=1;var n=e[1]-e[0];isFinite(n)||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var r=this._interval;t.fixMin||(e[0]=Cy(Math.floor(e[0]/r)*r)),t.fixMax||(e[1]=Cy(Math.ceil(e[1]/r)*r))}});Iy.create=function(){return new Iy};var Ay=Iy,Dy=bc.parsePercent,ky=Jv.isDimensionStacked,Oy="__ec_stack_",Py="undefined"!=typeof Float32Array?Float32Array:Array;function Ly(t){return t.get("stack")||Oy+t.seriesIndex}function Ry(t){return t.dim+t.index}function Ey(t,e){var i=[];return e.eachSeriesByType(t,(function(t){Hy(t)&&!Vy(t)&&i.push(t)})),i}function By(t){var e=function(t){var e={};zt.each(t,(function(t){var i=t.coordinateSystem.getBaseAxis();if("time"===i.type||"value"===i.type)for(var n=t.getData(),r=i.dim+"_"+i.index,a=n.mapDimension(i.dim),o=0,s=n.count();o<s;++o){var l=n.get(a,o);e[r]?e[r].push(l):e[r]=[l]}}));var i=[];for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];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))}i[n]=a}}return i}(t),i=[];return zt.each(t,(function(t){var n,r=t.coordinateSystem.getBaseAxis(),a=r.getExtent();if("category"===r.type)n=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]);n=s?l/h*s:l}else{var c=t.getData();n=Math.abs(a[1]-a[0])/c.count()}var d=Dy(t.get("barWidth"),n),f=Dy(t.get("barMaxWidth"),n),p=Dy(t.get("barMinWidth")||1,n),g=t.get("barGap"),m=t.get("barCategoryGap");i.push({bandWidth:n,barWidth:d,barMaxWidth:f,barMinWidth:p,barGap:g,barCategoryGap:m,axisKey:Ry(r),stackId:Ly(t)})})),zy(i)}function zy(t){var e={};zt.each(t,(function(t,i){var n=t.axisKey,r=t.bandWidth,a=e[n]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},o=a.stacks;e[n]=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 i={};return zt.each(e,(function(t,e){i[e]={};var n=t.stacks,r=t.bandWidth,a=Dy(t.categoryGap,r),o=Dy(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,u=(s-a)/(l+(l-1)*o);u=Math.max(u,0),zt.each(n,(function(t){var e=t.maxWidth,i=t.minWidth;if(t.width){n=t.width;e&&(n=Math.min(n,e)),i&&(n=Math.max(n,i)),t.width=n,s-=n+o*n,l--}else{var n=u;e&&e<n&&(n=Math.min(e,s)),i&&i>n&&(n=i),n!==u&&(t.width=n,s-=n+o*n,l--)}})),u=(s-a)/(l+(l-1)*o),u=Math.max(u,0);var h,c=0;zt.each(n,(function(t,e){t.width||(t.width=u),h=t,c+=t.width*(1+o)})),h&&(c-=h.width*o);var d=-c/2;zt.each(n,(function(t,n){i[e][n]=i[e][n]||{bandWidth:r,offset:d,width:t.width},d+=t.width*(1+o)}))})),i}function Ny(t,e,i){if(t&&e){var n=t[Ry(e)];return null!=n&&null!=i&&(n=n[Ly(i)]),n}}var Fy={seriesType:"bar",plan:ig(),reset:function(t){if(Hy(t)&&Vy(t)){var e=t.getData(),i=t.coordinateSystem,n=i.grid.getRect(),r=i.getBaseAxis(),a=i.getOtherAxis(r),o=e.mapDimension(a.dim),s=e.mapDimension(r.dim),l=a.isHorizontal(),u=l?0:1,h=Ny(By([t]),r,t).width;return h>.5||(h=.5),{progress:function(t,e){var c,d=t.count,f=new Py(2*d),p=new Py(2*d),g=new Py(d),m=[],v=[],y=0,_=0;for(;null!=(c=t.next());)v[u]=e.get(o,c),v[1-u]=e.get(s,c),m=i.dataToPoint(v,null,m),p[y]=l?n.x+n.width:m[0],f[y++]=m[0],p[y]=l?m[1]:n.y+n.height,f[y++]=m[1],g[_++]=c;e.setLayout({largePoints:f,largeDataIndices:g,largeBackgroundPoints:p,barWidth:h,valueAxisStart:Wy(r,a),backgroundStart:l?n.x:n.y,valueAxisHorizontal:l})}}}}};function Hy(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function Vy(t){return t.pipelineContext&&t.pipelineContext.large}function Wy(t,e,i){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}var Gy=function(t){var e=[],i=t.axis,n="axis0";if("category"===i.type){for(var r=i.getBandWidth(),a=0;a<t.count;a++)e.push(zt.defaults({bandWidth:r,axisKey:n,stackId:Oy+a},t));var o=zy(e),s=[];for(a=0;a<t.count;a++){var l=o[n][Oy+a];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}},Uy=function(t,e){var i=Ey(t,e),n=By(i),r={};zt.each(i,(function(t){var e=t.getData(),i=t.coordinateSystem,a=i.getBaseAxis(),o=Ly(t),s=n[Ry(a)][o],l=s.offset,u=s.width,h=i.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=ky(e,d),g=h.isHorizontal(),m=Wy(a,h),v=0,y=e.count();v<y;v++){var _,x,b,w,S,T=e.get(d,v),M=e.get(f,v),C=T>=0?"p":"n",I=m;if(p&&(r[o][M]||(r[o][M]={p:m,n:m}),I=r[o][M][C]),g)_=I,x=(S=i.dataToPoint([T,M]))[1]+l,b=S[0]-m,w=u,Math.abs(b)<c&&(b=(b<0?-1:1)*c),isNaN(b)||p&&(r[o][M][C]+=b);else _=(S=i.dataToPoint([M,T]))[0]+l,x=I,b=u,w=S[1]-m,Math.abs(w)<c&&(w=(w<=0?-1:1)*c),isNaN(w)||p&&(r[o][M][C]+=w);e.setItemLayout(v,{x:_,y:x,width:b,height:w})}}),this)},jy={getLayoutOnAxis:Gy,prepareLayoutBarSeries:Ey,makeColumnLayout:By,retrieveColumnLayout:Ny,layout:Uy,largeLayout:Fy},Yy=Ay.prototype,Xy=Math.ceil,qy=Math.floor,Zy=1e3,$y=6e4,Ky=36e5,Qy=864e5,Jy=Ay.extend({type:"time",getLabel:function(t){var e=this._stepLvl,i=new Date(t);return Rc.formatTime(e[0],i,this.getSetting("useUTC"))},niceExtent:function(t){var e=this._extent;if(e[0]===e[1]&&(e[0]-=Qy,e[1]+=Qy),e[1]===-1/0&&e[0]===1/0){var i=new Date;e[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),e[0]=e[1]-Qy}this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var n=this._interval;t.fixMin||(e[0]=bc.round(qy(e[0]/n)*n)),t.fixMax||(e[1]=bc.round(Xy(e[1]/n)*n))},niceTicks:function(t,e,i){t=t||10;var n=this._extent,r=n[1]-n[0],a=r/t;null!=e&&a<e&&(a=e),null!=i&&a>i&&(a=i);var o=t_.length,s=function(t,e,i,n){for(;i<n;){var r=i+n>>>1;t[r][1]<e?i=r+1:n=r}return i}(t_,a,0,o),l=t_[Math.min(s,o-1)],u=l[1];if("year"===l[0]){var h=r/u;u*=bc.nice(h/t,!0)}var c=this.getSetting("useUTC")?0:60*new Date(+n[0]||+n[1]).getTimezoneOffset()*1e3,d=[Math.round(Xy((n[0]-c)/u)*u+c),Math.round(qy((n[1]-c)/u)*u+c)];My.fixExtent(d,n),this._stepLvl=l,this._interval=u,this._niceExtent=d},parse:function(t){return+bc.parseDate(t)}});zt.each(["contain","normalize"],(function(t){Jy.prototype[t]=function(e){return Yy[t].call(this,this.parse(e))}}));var t_=[["hh:mm:ss",Zy],["hh:mm:ss",5e3],["hh:mm:ss",1e4],["hh:mm:ss",15e3],["hh:mm:ss",3e4],["hh:mm\nMM-dd",$y],["hh:mm\nMM-dd",3e5],["hh:mm\nMM-dd",6e5],["hh:mm\nMM-dd",9e5],["hh:mm\nMM-dd",18e5],["hh:mm\nMM-dd",Ky],["hh:mm\nMM-dd",72e5],["hh:mm\nMM-dd",216e5],["hh:mm\nMM-dd",432e5],["MM-dd\nyyyy",Qy],["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]];Jy.create=function(t){return new Jy({useUTC:t.ecModel.get("useUTC")})};var e_=uy.prototype,i_=Ay.prototype,n_=bc.getPrecisionSafe,r_=bc.round,a_=Math.floor,o_=Math.ceil,s_=Math.pow,l_=Math.log,u_=uy.extend({type:"log",base:10,$constructor:function(){uy.apply(this,arguments),this._originalScale=new Ay},getTicks:function(t){var e=this._originalScale,i=this._extent,n=e.getExtent();return zt.map(i_.getTicks.call(this,t),(function(t){var r=bc.round(s_(this.base,t));return r=t===i[0]&&e.__fixMin?h_(r,n[0]):r,r=t===i[1]&&e.__fixMax?h_(r,n[1]):r}),this)},getMinorTicks:i_.getMinorTicks,getLabel:i_.getLabel,scale:function(t){return t=e_.scale.call(this,t),s_(this.base,t)},setExtent:function(t,e){var i=this.base;t=l_(t)/l_(i),e=l_(e)/l_(i),i_.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=e_.getExtent.call(this);e[0]=s_(t,e[0]),e[1]=s_(t,e[1]);var i=this._originalScale,n=i.getExtent();return i.__fixMin&&(e[0]=h_(e[0],n[0])),i.__fixMax&&(e[1]=h_(e[1],n[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=l_(t[0])/l_(e),t[1]=l_(t[1])/l_(e),e_.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(i===1/0||i<=0)){var n=bc.quantity(i);for(t/i*n<=.5&&(n*=10);!isNaN(n)&&Math.abs(n)<1&&Math.abs(n)>0;)n*=10;var r=[bc.round(o_(e[0]/n)*n),bc.round(a_(e[1]/n)*n)];this._interval=n,this._niceExtent=r}},niceExtent:function(t){i_.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});function h_(t,e){return r_(t,n_(e))}zt.each(["contain","normalize"],(function(t){u_.prototype[t]=function(e){return e=l_(e)/l_(this.base),e_[t].call(this,e)}})),u_.create=function(){return new u_};var c_=jy.prepareLayoutBarSeries,d_=jy.makeColumnLayout,f_=jy.retrieveColumnLayout;function p_(t,e){var i,n,r,a=t.type,o=e.getMin(),s=e.getMax(),l=t.getExtent();"ordinal"===a?i=e.getCategories().length:(n=e.get("boundaryGap"),zt.isArray(n)||(n=[n||0,n||0]),"boolean"==typeof n[0]&&(n=[0,0]),n[0]=bc.parsePercent(n[0],1),n[1]=bc.parsePercent(n[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?i?0:NaN:l[0]-n[0]*r),null==s&&(s="ordinal"===a?i?i-1:NaN:l[1]+n[1]*r),(null==o||!isFinite(o))&&(o=NaN),(null==s||!isFinite(s))&&(s=NaN),t.setBlank(zt.eqNaN(o)||zt.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=c_("bar",c);if(zt.each(f,(function(t){d|=t.getBaseAxis()===e.axis})),d){var p=d_(f),g=function(t,e,i,n){var r=i.axis.getExtent(),a=r[1]-r[0],o=f_(n,i.axis);if(void 0===o)return{min:t,max:e};var s=1/0;zt.each(o,(function(t){s=Math.min(t.offset,s)}));var l=-1/0;zt.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 g_(t){var e,i=t.getLabelModel().get("formatter"),n="category"===t.type?t.scale.getExtent()[0]:null;return"string"==typeof i?(e=i,i=function(i){return i=t.scale.getLabel(i),e.replace("{value}",null!=i?i:"")}):"function"==typeof i?function(e,r){return null!=n&&(r=e-n),i(m_(t,e),r)}:function(e){return t.scale.getLabel(e)}}function m_(t,e){return"category"===t.type?t.scale.getLabel(e):e}function v_(t,e){var i=e*Math.PI/180,n=t.plain(),r=n.width,a=n.height,o=r*Math.cos(i)+a*Math.sin(i),s=r*Math.sin(i)+a*Math.cos(i);return new An(n.x,n.y,o,s)}function y_(t){var e=t.get("interval");return null==e?"auto":e}var __=function(t,e){var i=p_(t,e),n=i.extent,r=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var a=t.type;t.setExtent(n[0],n[1]),t.niceExtent({splitNumber:r,fixMin:i.fixMin,fixMax:i.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)},x_=function(t,e){if(e=e||t.get("type"))switch(e){case"category":return new xy(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new Ay;default:return(uy.getClass(e)||Ay).create(t)}},b_=function(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(i>0&&n>0||i<0&&n<0)},w_=function(t){var e=t.model,i=t.scale;if(e.get("axisLabel.show")&&!i.isBlank()){var n,r,a="category"===t.type,o=i.getExtent();r=a?i.count():(n=i.getTicks()).length;var s,l=t.getLabelModel(),u=g_(t),h=1;r>40&&(h=Math.ceil(r/40));for(var c=0;c<r;c+=h){var d=u(n?n[c]:o[0]+c),f=v_(l.getTextRect(d),l.get("rotate")||0);s?s.union(f):s=f}return s}},S_={getScaleExtent:p_,niceScaleExtent:__,createScaleByModel:x_,ifAxisCrossZero:b_,makeLabelFormatter:g_,getAxisRawValue:m_,estimateLabelUnionRect:w_,getOptionCategoryInterval:y_,shouldShowAllLabels:function(t){return"category"===t.type&&0===y_(t.getLabelModel())}},T_={getMin:function(t){var e=this.option,i=t||null==e.rangeStart?e.min:e.rangeStart;return this.axis&&null!=i&&"dataMin"!==i&&"function"!=typeof i&&!zt.eqNaN(i)&&(i=this.axis.scale.parse(i)),i},getMax:function(t){var e=this.option,i=t||null==e.rangeEnd?e.max:e.rangeEnd;return this.axis&&null!=i&&"dataMax"!==i&&"function"!=typeof i&&!zt.eqNaN(i)&&(i=this.axis.scale.parse(i)),i},getNeedCrossZero:function(){var t=this.option;return null==t.rangeStart&&null==t.rangeEnd&&!t.scale},getCoordSysModel:zt.noop,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},M_=T_,C_=Nr.calculateTextPosition,I_=qh.extendShape({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+r,n+a),t.lineTo(i-r,n+a),t.closePath()}}),A_=qh.extendShape({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+r,n),t.lineTo(i,n+a),t.lineTo(i-r,n),t.closePath()}}),D_=qh.extendShape({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,r=e.width/5*3,a=Math.max(r,e.height),o=r/2,s=o*o/(a-o),l=n-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(i-h,l+s),t.arc(i,l,o,Math.PI-u,2*Math.PI+u),t.bezierCurveTo(i+h-c*f,l+s+d*f,i,n-p,i,n),t.bezierCurveTo(i,n-p,i-h+c*f,l+s+d*f,i-h,l+s),t.closePath()}}),k_=qh.extendShape({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.height,n=e.width,r=e.x,a=e.y,o=n/3*2;t.moveTo(r,a),t.lineTo(r+o,a+i),t.lineTo(r,a+i/4*3),t.lineTo(r-o,a+i),t.lineTo(r,a),t.closePath()}}),O_={line:qh.Line,rect:qh.Rect,roundRect:qh.Rect,square:qh.Rect,circle:qh.Circle,diamond:A_,pin:D_,arrow:k_,triangle:I_},P_={line:function(t,e,i,n,r){r.x1=t,r.y1=e+n/2,r.x2=t+i,r.y2=e+n/2},rect:function(t,e,i,n,r){r.x=t,r.y=e,r.width=i,r.height=n},roundRect:function(t,e,i,n,r){r.x=t,r.y=e,r.width=i,r.height=n,r.r=Math.min(i,n)/4},square:function(t,e,i,n,r){var a=Math.min(i,n);r.x=t,r.y=e,r.width=a,r.height=a},circle:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.r=Math.min(i,n)/2},diamond:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.width=i,r.height=n},pin:function(t,e,i,n,r){r.x=t+i/2,r.y=e+n/2,r.width=i,r.height=n},arrow:function(t,e,i,n,r){r.x=t+i/2,r.y=e+n/2,r.width=i,r.height=n},triangle:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.width=i,r.height=n}},L_={};zt.each(O_,(function(t,e){L_[e]=new t}));var R_=qh.extendShape({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,i){var n=C_(t,e,i),r=this.shape;return r&&"pin"===r.symbolType&&"inside"===e.textPosition&&(n.y=i.y+.4*i.height),n},buildPath:function(t,e,i){var n=e.symbolType;if("none"!==n){var r=L_[n];r||(r=L_[n="rect"]),P_[n](e.x,e.y,e.width,e.height,r.shape),r.buildPath(t,r.shape,i)}}});function E_(t,e){if("image"!==this.type){var i=this.style,n=this.shape;n&&"line"===n.symbolType?i.stroke=t:this.__isEmptyBrush?(i.stroke=t,i.fill=e||"#fff"):(i.fill&&(i.fill=t),i.stroke&&(i.stroke=t)),this.dirty(!1)}}var B_=function(t,e,i,n,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://")?qh.makeImage(t.slice(8),new An(e,i,n,r),o?"center":"cover"):0===t.indexOf("path://")?qh.makePath(t.slice(7),{},new An(e,i,n,r),o?"center":"cover"):new R_({shape:{symbolType:t,x:e,y:i,width:n,height:r}})).__isEmptyBrush=l,s.setColor=E_,s.setColor(a),s},z_={createSymbol:B_};var N_=function(t,e){var i=e;uc.isInstance(e)||(i=new uc(e),zt.mixin(i,M_));var n=S_.createScaleByModel(i);return n.setExtent(t[0],t[1]),S_.niceScaleExtent(n,i),n},F_=function(t){zt.mixin(t,M_)},H_={getLayoutRect:Yc.getLayoutRect,completeDimensions:Vv,createDimensions:Wv,createSymbol:z_.createSymbol,createList:function(t){return sy(t.getSource(),t)},dataStack:{isDimensionStacked:Jv.isDimensionStacked,enableDataStack:Jv.enableDataStack,getStackedDimension:Jv.getStackedDimension},createScale:N_,mixinAxisModelCommonMethods:F_};function V_(t,e){return Math.abs(t-e)<1e-8}var W_=function(t,e,i){var n=0,r=t[0];if(!r)return!1;for(var a=1;a<t.length;a++){var o=t[a];n+=tl(r[0],r[1],o[0],o[1],e,i),r=o}var s=t[0];return V_(r[0],s[0])&&V_(r[1],s[1])||(n+=tl(r[0],r[1],s[0],s[1],e,i)),0!==n},G_={contain:W_};function U_(t,e,i){if(this.name=t,this.geometries=e,i)i=[i[0],i[1]];else{var n=this.getBoundingRect();i=[n.x+n.width/2,n.y+n.height/2]}this.center=i}U_.prototype={constructor:U_,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,i=[e,e],n=[-e,-e],r=[],a=[],o=this.geometries,s=0;s<o.length;s++)if("polygon"===o[s].type){var l=o[s].exterior;Ds.fromPoints(l,r,a),ae.min(i,i,r),ae.max(n,n,a)}return 0===s&&(i[0]=i[1]=n[0]=n[1]=0),this._rect=new An(i[0],i[1],n[0]-i[0],n[1]-i[1])},contain:function(t){var e=this.getBoundingRect(),i=this.geometries;if(!e.contain(t[0],t[1]))return!1;t:for(var n=0,r=i.length;n<r;n++)if("polygon"===i[n].type){var a=i[n].exterior,o=i[n].interiors;if(G_.contain(a,t[0],t[1])){for(var s=0;s<(o?o.length:0);s++)if(G_.contain(o[s]))continue t;return!0}}return!1},transformTo:function(t,e,i,n){var r=this.getBoundingRect(),a=r.width/r.height;i?n||(n=i/a):i=a*n;for(var o=new An(t,e,i,n),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 U_(t,this.geometries,this.center);return e._rect=this._rect,e.transformTo=null,e}};var j_=U_;function Y_(t,e,i){for(var n=[],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,n.push([s/i,l/i])}return n}var X_=function(t,e){return function(t){if(!t.UTF8Encoding)return t;var e=t.UTF8Scale;null==e&&(e=1024);for(var i=t.features,n=0;n<i.length;n++)for(var r=i[n].geometry,a=r.coordinates,o=r.encodeOffsets,s=0;s<a.length;s++){var l=a[s];if("Polygon"===r.type)a[s]=Y_(l,o[s],e);else if("MultiPolygon"===r.type)for(var u=0;u<l.length;u++){var h=l[u];l[u]=Y_(h,o[s][u],e)}}t.UTF8Encoding=!1}(t),zt.map(zt.filter(t.features,(function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0})),(function(t){var i=t.properties,n=t.geometry,r=n.coordinates,a=[];"Polygon"===n.type&&a.push({type:"polygon",exterior:r[0],interiors:r.slice(1)}),"MultiPolygon"===n.type&&zt.each(r,(function(t){t[0]&&a.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})}));var o=new j_(i[e||"name"],a,i.cp);return o.properties=i,o}))},q_=ko.makeInner,Z_=S_.makeLabelFormatter,$_=S_.getOptionCategoryInterval,K_=S_.shouldShowAllLabels,Q_=q_();function J_(t,e){var i,n,r=tx(t,"labels"),a=$_(e),o=ex(r,a);return o||(zt.isFunction(a)?i=rx(t,a):(n="auto"===a?function(t){var e=Q_(t).autoInterval;return null!=e?e:Q_(t).autoInterval=t.calculateCategoryInterval()}(t):a,i=nx(t,n)),ix(r,a,{labels:i,labelCategoryInterval:n}))}function tx(t,e){return Q_(t)[e]||(Q_(t)[e]=[])}function ex(t,e){for(var i=0;i<t.length;i++)if(t[i].key===e)return t[i].value}function ix(t,e,i){return t.push({key:e,value:i}),i}function nx(t,e,i){var n=Z_(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=K_(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(i?t:{formattedLabel:n(t),rawLabel:r.getLabel(t),tickValue:t})}return f&&p-l!==a[1]&&g(a[1]),s}function rx(t,e,i){var n=t.scale,r=Z_(t),a=[];return zt.each(n.getTicks(),(function(t){var o=n.getLabel(t);e(t,o)&&a.push(i?t:{formattedLabel:r(t),rawLabel:o,tickValue:t})})),a}var ax={createAxisLabels:function(t){return"category"===t.type?function(t){var e=t.getLabelModel(),i=J_(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:i.labelCategoryInterval}:i}(t):function(t){var e=t.scale.getTicks(),i=Z_(t);return{labels:zt.map(e,(function(e,n){return{formattedLabel:i(e,n),rawLabel:t.scale.getLabel(e),tickValue:e}}))}}(t)},createAxisTicks:function(t,e){return"category"===t.type?function(t,e){var i,n,r=tx(t,"ticks"),a=$_(e),o=ex(r,a);if(o)return o;e.get("show")&&!t.scale.isBlank()||(i=[]);if(zt.isFunction(a))i=rx(t,a,!0);else if("auto"===a){var s=J_(t,t.getLabelModel());n=s.labelCategoryInterval,i=zt.map(s.labels,(function(t){return t.tickValue}))}else i=nx(t,n=a,!0);return ix(r,a,{ticks:i,tickCategoryInterval:n})}(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),i=Z_(t),n=(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(n)),c=Math.abs(u*Math.sin(n)),d=0,f=0;l<=a[1];l+=s){var p,g,m=Nr.getBoundingRect(i(l),e.font,"center","top");p=1.3*m.width,g=1.3*m.height,d=Math.max(d,p,7),f=Math.max(f,g,7)}var v=d/h,y=f/c;isNaN(v)&&(v=1/0),isNaN(y)&&(y=1/0);var _=Math.max(0,Math.floor(Math.min(v,y))),x=Q_(t.model),b=t.getExtent(),w=x.lastAutoInterval,S=x.lastTickCount;return null!=w&&null!=S&&Math.abs(w-_)<=1&&Math.abs(S-o)<=1&&w>_&&x.axisExtend0===b[0]&&x.axisExtend1===b[1]?_=w:(x.lastTickCount=o,x.lastAutoInterval=_,x.axisExtend0=b[0],x.axisExtend1=b[1]),_}},ox=zt.each,sx=zt.map,lx=bc.linearMap,ux=bc.getPixelPrecision,hx=bc.round,cx=ax.createAxisTicks,dx=ax.createAxisLabels,fx=ax.calculateCategoryInterval,px=[0,1],gx=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onBand=!1};function mx(t,e){var i=(t[1]-t[0])/e/2;t[0]+=i,t[1]-=i}gx.prototype={constructor:gx,contain:function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=i&&t<=n},containData:function(t){return this.scale.contain(t)},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return ux(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var i=this._extent;i[0]=t,i[1]=e},dataToCoord:function(t,e){var i=this._extent,n=this.scale;return t=n.normalize(t),this.onBand&&"ordinal"===n.type&&mx(i=i.slice(),n.count()),lx(t,px,i,e)},coordToData:function(t,e){var i=this._extent,n=this.scale;this.onBand&&"ordinal"===n.type&&mx(i=i.slice(),n.count());var r=lx(t,i,px,e);return this.scale.scale(r)},pointToData:function(t,e){},getTicksCoords:function(t){var e=(t=t||{}).tickModel||this.getTickModel(),i=cx(this,e).ticks,n=sx(i,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this);return function(t,e,i,n){var r=e.length;if(!t.onBand||i||!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;ox(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])&&(n?e[0].coord=s[0]:e.shift());n&&c(s[0],e[0].coord)&&e.unshift({coord:s[0]});c(s[1],a.coord)&&(n?a.coord=s[1]:e.pop());n&&c(a.coord,s[1])&&e.push({coord:s[1]});function c(t,e){return t=hx(t),e=hx(e),h?t>e:t<e}}(this,n,e.get("alignWithLabel"),t.clamp),n},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 sx(e,(function(t){return sx(t,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this)}),this)},getViewLabels:function(){return dx(this).labels},getLabelModel:function(){return this.model.getModel("axisLabel")},getTickModel:function(){return this.model.getModel("axisTick")},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),i=e[1]-e[0]+(this.onBand?1:0);0===i&&(i=1);var n=Math.abs(t[1]-t[0]);return Math.abs(n)/i},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return fx(this)}};var vx=gx,yx=go,_x=ti,xx=ae,bx=Vi,Sx=bc,Tx=Rc,Mx=bg.throttle,Cx=H_,Ix=X_,Ax=Iv,Dx=uc,kx=vx,Ox=Q,Px=X_,Lx={};zt.each(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],(function(t){Lx[t]=zt[t]}));var Rx={};zt.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){Rx[t]=qh[t]}));var Ex,Bx,zx={zrender:yx,matrix:_x,vector:xx,color:bx,number:Sx,format:Tx,throttle:Mx,helper:Cx,parseGeoJSON:Ix,List:Ax,Model:Dx,Axis:kx,env:Ox,parseGeoJson:Px,util:Lx,graphic:Rx},Nx=(Ex=function(t,e){var i=bg.throttle,n=zt.assert,r=zt.each,a=zt.isFunction,o=zt.isObject,s=Qc.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(i,n,r){e||!this._disposed?(i=i&&i.toLowerCase(),de.prototype[t].call(this,i,n,r)):this.id}}function f(){de.call(this)}function p(t,e,n){n=n||{},"string"==typeof e&&(e=N[e]),this.id,this.group,this._dom=t;var r=this._zr=go.init(t,{renderer:n.renderer||"canvas",devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height});this._throttledZrFlush=i(zt.bind(r.flush,r),17),(e=zt.clone(e))&&jf(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new vf;var a,o,s=this._api=(o=(a=this)._coordSysMgr,zt.extend(new pf(a),{getCoordinateSystems:zt.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}Bn(z,l),Bn(R,l),this._scheduler=new nm(this,s,R,z),de.call(this,this._ecEventProcessor=new O),this._messageCenter=new f,this._initEvents(),this.resize=zt.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),zt.setAsPrimitive(this)}f.prototype.on=d("on",!0),f.prototype.off=d("off",!0),f.prototype.one=d("one",!0),zt.mixin(f,de);var g=p.prototype;function m(t,e,i){if(this._disposed)this.id;else{var n,r=this._model,a=this._coordSysMgr.getCoordinateSystems();e=ko.parseFinder(r,e);for(var o=0;o<a.length;o++){var s=a[o];if(s[t]&&null!=(n=s[t](r,e,i)))return n}}}g._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[h]){var e=this[h].silent;this[u]=!0,y(this),v.update.call(this),this[u]=!1,this[h]=!1,w.call(this,e),S.call(this,e)}else if(t.unfinished){var i=1,n=this._model;this._api;t.unfinished=!1;do{var r=+new Date;t.performSeriesTasks(n),t.performDataProcessorTasks(n),x(this,n),t.performVisualTasks(n),I(this,this._model,0,"remain"),i-=+new Date-r}while(i>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,i){if(this._disposed)this.id;else{var n;if(o(e)&&(i=e.lazyUpdate,n=e.silent,e=e.notMerge),this[u]=!0,!this._model||e){var r=new Cf(this._api),a=this._theme,s=this._model=new df;s.scheduler=this._scheduler,s.init(null,null,a,r)}this._model.setOption(t,E),i?(this[h]={silent:n},this[u]=!1):(y(this),v.update.call(this),this._zr.flush(),this[h]=!1,this[u]=!1,w.call(this,n),S.call(this,n))}},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(Q.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(Q.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return zt.each(e,(function(t){t.stopAnimation(!0)})),t.painter.toDataURL()}},g.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,i=this._model,n=[],a=this;r(e,(function(t){i.eachComponent({mainType:t},(function(t){var e=a._componentsMap[t.__viewId];e.group.ignore||(n.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(n,(function(t){t.group.ignore=!1})),o}this.id},g.getConnectedDataURL=function(t){if(this._disposed)this.id;else if(Q.canvasSupported){var e="svg"===t.type,i=this.group,n=Math.min,a=Math.max,o=1/0;if(V[i]){var s=o,l=o,u=-1/0,h=-1/0,c=[],d=t&&t.pixelRatio||1;zt.each(H,(function(r,o){if(r.group===i){var d=e?r.getZr().painter.getSvgDom().innerHTML:r.getRenderedCanvas(zt.clone(t)),f=r.getDom().getBoundingClientRect();s=n(f.left,s),l=n(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=zt.createCanvas(),m=go.init(g,{renderer:e?"svg":"canvas"});if(m.resize({width:f,height:p}),e){var v="";return r(c,(function(t){var e=t.left-s,i=t.top-l;v+='<g transform="translate('+e+","+i+')">'+t.dom+"</g>"})),m.painter.getSvgRoot().innerHTML=v,t.connectedBackgroundColor&&m.painter.setBackgroundColor(t.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}return t.connectedBackgroundColor&&m.add(new qh.Rect({shape:{x:0,y:0,width:f,height:p},style:{fill:t.connectedBackgroundColor}})),r(c,(function(t){var e=new qh.Image({style:{x:t.left*d-s,y:t.top*d-l,image:t.dom}});m.add(e)})),m.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},g.convertToPixel=zt.curry(m,"convertToPixel"),g.convertFromPixel=zt.curry(m,"convertFromPixel"),g.containPixel=function(t,e){if(!this._disposed){var i,n=this._model;return t=ko.parseFinder(n,t),zt.each(t,(function(t,n){n.indexOf("Models")>=0&&zt.each(t,(function(t){var r=t.coordinateSystem;if(r&&r.containPoint)i|=!!r.containPoint(e);else if("seriesModels"===n){var a=this._chartsMap[t.__viewId];a&&a.containPoint&&(i|=a.containPoint(e,t))}}),this)}),this),!!i}this.id},g.getVisual=function(t,e){var i=this._model,n=(t=ko.parseFinder(i,t,{defaultMainType:"series"})).seriesModel.getData(),r=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?n.indexOfRawIndex(t.dataIndex):null;return null!=r?n.getItemVisual(r,e):n.getVisual(e)},g.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},g.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var v={prepareAndUpdate:function(t){y(this),v.update.call(this,t)},update:function(t){var e=this._model,i=this._api,n=this._zr,r=this._coordSysMgr,a=this._scheduler;if(e){a.restoreData(e,t),a.performSeriesTasks(e),r.create(e,i),a.performDataProcessorTasks(e,t),x(this,e),r.update(e,i),M(e),a.performVisualTasks(e,t),C(this,e,i,t);var o=e.get("backgroundColor")||"transparent";if(Q.canvasSupported)n.setBackgroundColor(o);else{var s=Vi.parse(o);o=Vi.stringify(s,"rgb"),0===s[3]&&(o="transparent")}A(e,i)}},updateTransform:function(t){var e=this._model,i=this,n=this._api;if(e){var r=[];e.eachComponent((function(a,o){var s=i.getViewOfComponentModel(o);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(o,e,n,t);l&&l.update&&r.push(s)}else r.push(s)}));var a=zt.createHashMap();e.eachSeries((function(r){var o=i._chartsMap[r.__viewId];if(o.updateTransform){var s=o.updateTransform(r,e,n,t);s&&s.update&&a.set(r.uid,1)}else a.set(r.uid,1)})),M(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0,dirtyMap:a}),I(i,e,0,t,a),A(e,this._api)}},updateView:function(t){var e=this._model;e&&(pg.markUpdateMethod(t,"updateView"),M(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),C(this,this._model,this._api,t),A(e,this._api))},updateVisual:function(t){v.update.call(this,t)},updateLayout:function(t){v.update.call(this,t)}};function y(t){var e=t._model,i=t._scheduler;i.restorePipelines(e),i.prepareStageTasks(),T(t,"component",e,i),T(t,"chart",e,i),i.plan()}function _(t,e,i,n,a){var o=t._model;if(n){var s={};s[n+"Id"]=i[n+"Id"],s[n+"Index"]=i[n+"Index"],s[n+"Name"]=i[n+"Name"];var l={mainType:n,query:s};a&&(l.subType=a);var u=i.excludeSeriesId;null!=u&&(u=zt.createHashMap(ko.normalizeToArray(u))),o&&o.eachComponent(l,(function(e){u&&null!=u.get(e.id)||h(t["series"===n?"_chartsMap":"_componentsMap"][e.__viewId])}),t)}else r(t._componentsViews.concat(t._chartsViews),h);function h(n){n&&n.__alive&&n[e]&&n[e](n.__model,o,t._api,i)}}function x(t,e){var i=t._chartsMap,n=t._scheduler;e.eachSeries((function(t){n.updateStreamModes(t,i[t.__viewId])}))}function b(t,e){var i=t.type,n=t.escapeConnect,a=P[i],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=zt.map(t.batch,(function(e){return(e=zt.defaults(zt.extend({},e),t)).batch=null,e})));var p,g=[],m="highlight"===i||"downplay"===i;r(d,(function(t){(p=(p=a.action(t,this._model,this._api))||zt.extend({},t)).type=o.event||p.type,g.push(p),m?_(this,c,t,"series"):l&&_(this,c,t,l.main,l.sub)}),this),"none"===c||m||l||(this[h]?(y(this),v.update.call(this,t),this[h]=!1):v[c].call(this,t)),p=f?{type:o.event||i,escapeConnect:n,batch:g}:g[0],this[u]=!1,!e&&this._messageCenter.trigger(p.type,p)}function w(t){for(var e=this._pendingActions;e.length;){var i=e.shift();b.call(this,i,t)}}function S(t){!t&&this.trigger("updated")}function T(t,e,i,n){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?tg.getClass(c.main,c.sub):pg.getClass(c.sub))).init(i,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&&n.prepareView(h,t,i,u)}for(r?i.eachComponent((function(t,e){"series"!==t&&c(e)})):i.eachSeries(c),h=0;h<a.length;){var d=a[h];d.__alive?h++:(!r&&d.renderTask.dispose(),l.remove(d.group),d.dispose(i,u),a.splice(h,1),delete o[d.__id],d.__id=d.group.__ecComponentInfo=null)}}function M(t){t.clearColorPalette(),t.eachSeries((function(t){t.clearColorPalette()}))}function C(t,e,i,n){!function(t,e,i,n,a){r(a||t._componentsViews,(function(t){var r=t.__model;t.render(r,e,i,n),k(r,t)}))}(t,e,i,n),r(t._chartsViews,(function(t){t.__alive=!1})),I(t,e,0,n),r(t._chartsViews,(function(t){t.__alive||t.remove(e,i)}))}function I(t,e,i,n,r){var a,o=t._scheduler;e.eachSeries((function(e){var i=t._chartsMap[e.__viewId];i.__alive=!0;var s=i.renderTask;o.updatePayload(s,n),r&&r.get(e.uid)&&s.dirty(),a|=s.perform(o.getPerformArgs(s)),i.group.silent=!!e.get("silent"),k(e,i),function(t,e){var i=t.get("blendMode")||null;e.group.traverse((function(t){t.isGroup||t.style.blend!==i&&t.setStyle("blend",i),t.eachPendingDisplayable&&t.eachPendingDisplayable((function(t){t.setStyle("blend",i)}))}))}(e,i)})),o.unfinished|=a,function(t,e){var i=t._zr,n=i.storage,r=0;n.traverse((function(t){r++})),r>e.get("hoverLayerThreshold")&&!Q.node&&e.eachSeries((function(e){if(!e.preventUsingHoverLayer){var i=t._chartsMap[e.__viewId];i.__alive&&i.group.traverse((function(t){t.useHoverLayer=!0}))}}))}(t,e),Ig(t._zr.dom,e)}function A(t,e){r(B,(function(i){i(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 i=e.resetOption("media"),n=t&&t.silent;this[u]=!0,i&&y(this),v.update.call(this),this[u]=!1,w.call(this,n),S.call(this,n)}}},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 i=F[t](this._api,e),n=this._zr;this._loadingFX=i,n.add(i)}},g.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},g.makeActionFromEvent=function(t){var e=zt.extend({},t);return e.type=L[t.type],e},g.dispatchAction=function(t,e){this._disposed?this.id:(o(e)||(e={silent:!!e}),P[t.type]&&this._model&&(this[u]?this._pendingActions.push(t):(b.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&Q.browser.weChat&&this._throttledZrFlush(),w.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 D=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function k(t,e){var i=t.get("z"),n=t.get("zlevel");e.group.traverse((function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))}))}function O(){this.eventInfo}g._initEvents=function(){r(D,(function(t){var e=function(e){var i,n=this.getModel(),r=e.target;if("globalout"===t)i={};else if(r&&null!=r.dataIndex){var a=r.dataModel||n.getSeriesByIndex(r.seriesIndex);i=a&&a.getDataParams(r.dataIndex,r.dataType,r)||{}}else r&&r.eventData&&(i=zt.extend({},r.eventData));if(i){var o=i.componentType,s=i.componentIndex;"markLine"!==o&&"markPoint"!==o&&"markArea"!==o||(o="series",s=i.seriesIndex);var l=o&&null!=s&&n.getComponent(o,s),u=l&&this["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];i.event=e,i.type=t,this._ecEventProcessor.eventInfo={targetEl:r,packedEvent:i,model:l,view:u},this.trigger(t,i)}};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,ko.setAttribute(this.getDom(),U,"");var t=this._api,e=this._model;r(this._componentsViews,(function(i){i.dispose(e,t)})),r(this._chartsViews,(function(i){i.dispose(e,t)})),this._zr.dispose(),delete H[this.id]}},zt.mixin(p,de),O.prototype={constructor:O,normalizeQuery:function(t){var e={},i={},n={};if(zt.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};zt.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)&&(i[r]=t,s=!0),s||(n[r]=t)}))}return{cptQuery:e,dataQuery:i,otherQuery:n}},filter:function(t,e,i){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,a=n.packedEvent,o=n.model,s=n.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,i,n){return null==t[i]||e[n||i]===t[i]}},afterTrigger:function(){this.eventInfo=null}};var P={},L={},R=[],E=[],B=[],z=[],N={},F={},H={},V={},W=new Date-0,G=new Date-0,U="_echarts_instance_";function j(t){V[t]=!1}var Y=j;function X(t){return H[ko.getAttribute(t,U)]}function q(t,e){N[t]=e}function Z(t){E.push(t)}function $(t,e){tt(R,t,e,1e3)}function K(t,e,i){"function"==typeof e&&(i=e,e="");var r=o(t)?t.type:[t,t={event:e}][0];t.event=(t.event||r).toLowerCase(),e=t.event,n(c.test(r)&&c.test(e)),P[r]||(P[r]={action:i,actionInfo:t}),L[e]=r}function J(t,e){tt(z,t,e,3e3,"visual")}function tt(t,e,i,n,r){(a(e)||o(e))&&(i=e,e=n);var s=nm.wrapStageHandler(i,r);return s.__prio=e,s.__raw=i,t.push(s),s}function et(t,e){F[t]=e}J(2e3,Tg),Z(jf),$(900,Zf),et("default",Dg),K({type:"highlight",event:"highlight",update:"highlight"},zt.noop),K({type:"downplay",event:"downplay",update:"downplay"},zt.noop),q("light",am),q("dark",hm),e.version="4.8.0",e.dependencies={zrender:"4.3.1"},e.PRIORITY=l,e.init=function(t,e,i){var n=X(t);if(n)return n;var a=new p(t,e,i);return a.id="ec_"+W++,H[a.id]=a,ko.setAttribute(t,U,a.id),function(t){var e="__connectUpdateStatus";function i(t,i){for(var n=0;n<t.length;n++)t[n][e]=i}r(L,(function(n,a){t._messageCenter.on(a,(function(n){if(V[t.group]&&0!==t[e]){if(n&&n.escapeConnect)return;var a=t.makeActionFromEvent(n),o=[];r(H,(function(e){e!==t&&e.group===t.group&&o.push(e)})),i(o,0),r(o,(function(t){1!==t[e]&&t.dispatchAction(a)})),i(o,2)}}))}))}(a),a},e.connect=function(t){if(zt.isArray(t)){var e=t;t=null,r(e,(function(e){null!=e.group&&(t=e.group)})),t=t||"g_"+G++,r(e,(function(e){e.group=t}))}return V[t]=!0,t},e.disConnect=j,e.disconnect=Y,e.dispose=function(t){"string"==typeof t?t=H[t]:t instanceof p||(t=X(t)),t instanceof p&&!t.isDisposed()&&t.dispose()},e.getInstanceByDom=X,e.getInstanceById=function(t){return H[t]},e.registerTheme=q,e.registerPreprocessor=Z,e.registerProcessor=$,e.registerPostUpdate=function(t){B.push(t)},e.registerAction=K,e.registerCoordinateSystem=function(t,e){vf.register(t,e)},e.getCoordinateSystemDimensions=function(t){var e=vf.get(t);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()},e.registerLayout=function(t,e){tt(z,t,e,1e3,"layout")},e.registerVisual=J,e.registerLoading=et,e.extendComponentModel=function(t){return Qc.extend(t)},e.extendComponentView=function(t){return tg.extend(t)},e.extendSeriesModel=function(t){return Kp.extend(t)},e.extendChartView=function(t){return pg.extend(t)},e.setCanvasCreator=function(t){zt.$override("createCanvas",t)},e.registerMap=function(t,e,i){Gm.registerMap(t,e,i)},e.getMap=function(t){var e=Gm.retrieveMap(t);return e&&e[0]&&{geoJson:e[0].geoJSON,specialAreas:e[0].specialAreas}},e.dataTool={},function(){for(var t in zx)zx.hasOwnProperty(t)&&(e[t]=zx[t])}()},Ex(Bx={exports:{}},Bx.exports),Bx.exports);Kp.extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(t,e){return sy(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},clip:!0}});var Fx=yp.retrieveRawValue;var Hx=function(t,e){var i=t.mapDimension("defaultedLabel",!0),n=i.length;if(1===n)return Fx(t,e,i[0]);if(n){for(var r=[],a=0;a<i.length;a++){var o=Fx(t,e,i[a]);r.push(o)}return r.join(" ")}},Vx={getDefaultLabel:Hx},Wx=z_.createSymbol,Gx=bc.parsePercent,Ux=Vx.getDefaultLabel;function jx(t,e,i){qh.Group.call(this),this.updateData(t,e,i)}var Yx=jx.prototype,Xx=jx.getSymbolSize=function(t,e){var i=t.getItemVisual(e,"symbolSize");return i instanceof Array?i.slice():[+i,+i]};function qx(t){return[t[0]/2,t[1]/2]}function Zx(t,e){this.parent.drift(t,e)}Yx._createSymbol=function(t,e,i,n,r){this.removeAll();var a=e.getItemVisual(i,"color"),o=Wx(t,-1,-1,2,2,a,r);o.attr({z2:100,culling:!0,scale:qx(n)}),o.drift=Zx,this._symbolType=t,this.add(o)},Yx.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(t)},Yx.getSymbolPath=function(){return this.childAt(0)},Yx.getScale=function(){return this.childAt(0).scale},Yx.highlight=function(){this.childAt(0).trigger("emphasis")},Yx.downplay=function(){this.childAt(0).trigger("normal")},Yx.setZ=function(t,e){var i=this.childAt(0);i.zlevel=t,i.z=e},Yx.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":e.cursor},Yx.updateData=function(t,e,i){this.silent=!1;var n=t.getItemVisual(e,"symbol")||"circle",r=t.hostModel,a=Xx(t,e),o=n!==this._symbolType;if(o){var s=t.getItemVisual(e,"symbolKeepAspect");this._createSymbol(n,t,e,a,s)}else{(l=this.childAt(0)).silent=!1,qh.updateProps(l,{scale:qx(a)},r,e)}if(this._updateCommon(t,e,a,i),o){var l=this.childAt(0),u=i&&i.fadeIn,h={scale:l.scale.slice()};u&&(h.style={opacity:l.style.opacity}),l.scale=[0,0],u&&(l.style.opacity=0),qh.initProps(l,h,r,e)}this._seriesModel=r};var $x=["itemStyle"],Kx=["emphasis","itemStyle"],Qx=["label"],Jx=["emphasis","label"];function tb(t,e){if(!this.incremental&&!this.useHoverLayer)if("emphasis"===e){var i=this.__symbolOriginalScale,n=i[1]/i[0],r={scale:[Math.max(1.1*i[0],i[0]+3),Math.max(1.1*i[1],i[1]+3*n)]};this.animateTo(r,400,"elasticOut")}else"normal"===e&&this.animateTo({scale:this.__symbolOriginalScale},400,"elasticOut")}Yx._updateCommon=function(t,e,i,n){var r=this.childAt(0),a=t.hostModel,o=t.getItemVisual(e,"color");"image"!==r.type?r.useStyle({strokeNoScale:!0}):r.setStyle({opacity:null,shadowBlur:null,shadowOffsetX:null,shadowOffsetY:null,shadowColor:null});var s=n&&n.itemStyle,l=n&&n.hoverItemStyle,u=n&&n.symbolOffset,h=n&&n.labelModel,c=n&&n.hoverLabelModel,d=n&&n.hoverAnimation,f=n&&n.cursorStyle;if(!n||t.hasItemOption){var p=n&&n.itemModel?n.itemModel:t.getItemModel(e);s=p.getModel($x).getItemStyle(["color"]),l=p.getModel(Kx).getItemStyle(),u=p.getShallow("symbolOffset"),h=p.getModel(Qx),c=p.getModel(Jx),d=p.getShallow("hoverAnimation"),f=p.getShallow("cursor")}else l=zt.extend({},l);var g=r.style,m=t.getItemVisual(e,"symbolRotate");r.attr("rotation",(m||0)*Math.PI/180||0),u&&r.attr("position",[Gx(u[0],i[0]),Gx(u[1],i[1])]),f&&r.attr("cursor",f),r.setColor(o,n&&n.symbolInnerColor),r.setStyle(s);var v=t.getItemVisual(e,"opacity");null!=v&&(g.opacity=v);var y=t.getItemVisual(e,"liftZ"),_=r.__z2Origin;null!=y?null==_&&(r.__z2Origin=r.z2,r.z2+=y):null!=_&&(r.z2=_,r.__z2Origin=null);var x=n&&n.useNameLabel;qh.setLabelStyle(g,l,h,c,{labelFetcher:a,labelDataIndex:e,defaultText:function(e,i){return x?t.getName(e):Ux(t,e)},isRectText:!0,autoColor:o}),r.__symbolOriginalScale=qx(i),r.hoverStyle=l,r.highDownOnUpdate=d&&a.isAnimationEnabled()?tb:null,qh.setHoverStyle(r)},Yx.fadeOut=function(t,e){var i=this.childAt(0);this.silent=i.silent=!0,(!e||!e.keepLabel)&&(i.style.text=null),qh.updateProps(i,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,t)},zt.inherits(jx,qh.Group);var eb=jx,ib=zt.isObject;function nb(t){this.group=new qh.Group,this._symbolCtor=t||eb}var rb=nb.prototype;function ab(t,e,i,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(i))&&!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&"none"!==t.getItemVisual(i,"symbol")}function ob(t){return null==t||ib(t)||(t={isIgnore:t}),t||{}}function sb(t){var e=t.hostModel;return{itemStyle:e.getModel("itemStyle").getItemStyle(["color"]),hoverItemStyle:e.getModel("emphasis.itemStyle").getItemStyle(),symbolRotate:e.get("symbolRotate"),symbolOffset:e.get("symbolOffset"),hoverAnimation:e.get("hoverAnimation"),labelModel:e.getModel("label"),hoverLabelModel:e.getModel("emphasis.label"),cursorStyle:e.get("cursor")}}rb.updateData=function(t,e){e=ob(e);var i=this.group,n=t.hostModel,r=this._data,a=this._symbolCtor,o=sb(t);r||i.removeAll(),t.diff(r).add((function(n){var r=t.getItemLayout(n);if(ab(t,r,n,e)){var s=new a(t,n,o);s.attr("position",r),t.setItemGraphicEl(n,s),i.add(s)}})).update((function(s,l){var u=r.getItemGraphicEl(l),h=t.getItemLayout(s);ab(t,h,s,e)?(u?(u.updateData(t,s,o),qh.updateProps(u,{position:h},n)):(u=new a(t,s)).attr("position",h),i.add(u),t.setItemGraphicEl(s,u)):i.remove(u)})).remove((function(t){var e=r.getItemGraphicEl(t);e&&e.fadeOut((function(){i.remove(e)}))})).execute(),this._data=t},rb.isPersistent=function(){return!0},rb.updateLayout=function(){var t=this._data;t&&t.eachItemGraphicEl((function(e,i){var n=t.getItemLayout(i);e.attr("position",n)}))},rb.incrementalPrepareUpdate=function(t){this._seriesScope=sb(t),this._data=null,this.group.removeAll()},rb.incrementalUpdate=function(t,e,i){function n(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}i=ob(i);for(var r=t.start;r<t.end;r++){var a=e.getItemLayout(r);if(ab(e,a,r,i)){var o=new this._symbolCtor(e,r,this._seriesScope);o.traverse(n),o.attr("position",a),this.group.add(o),e.setItemGraphicEl(r,o)}}},rb.remove=function(t){var e=this.group,i=this._data;i&&t?i.eachItemGraphicEl((function(t){t.fadeOut((function(){e.remove(t)}))})):e.removeAll()};var lb=nb,ub=z_.createSymbol,hb=qh.extendShape({shape:{points:null},symbolProxy:null,softClipShape:null,buildPath:function(t,e){var i=e.points,n=e.size,r=this.symbolProxy,a=r.shape;if(!((t.getContext?t.getContext():t)&&n[0]<4))for(var o=0;o<i.length;){var s=i[o++],l=i[o++];isNaN(s)||isNaN(l)||(this.softClipShape&&!this.softClipShape.contain(s,l)||(a.x=s-n[0]/2,a.y=l-n[1]/2,a.width=n[0],a.height=n[1],r.buildPath(t,a,!0)))}},afterBrush:function(t){var e=this.shape,i=e.points,n=e.size;if(n[0]<4){this.setTransform(t);for(var r=0;r<i.length;){var a=i[r++],o=i[r++];isNaN(a)||isNaN(o)||(this.softClipShape&&!this.softClipShape.contain(a,o)||t.fillRect(a-n[0]/2,o-n[1]/2,n[0],n[1]))}this.restoreTransform(t)}},findDataIndex:function(t,e){for(var i=this.shape,n=i.points,r=i.size,a=Math.max(r[0],4),o=Math.max(r[1],4),s=n.length/2-1;s>=0;s--){var l=2*s,u=n[l]-a/2,h=n[l+1]-o/2;if(t>=u&&e>=h&&t<=u+a&&e<=h+o)return s}return-1}});function cb(){this.group=new qh.Group}var db=cb.prototype;db.isPersistent=function(){return!this._incremental},db.updateData=function(t,e){this.group.removeAll();var i=new hb({rectHover:!0,cursor:"default"});i.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(i,t,!1,e),this.group.add(i),this._incremental=null},db.updateLayout=function(t){if(!this._incremental){var e=t.getLayout("symbolPoints");this.group.eachChild((function(t){if(null!=t.startIndex){var i=2*(t.endIndex-t.startIndex),n=4*t.startIndex*2;e=new Float32Array(e.buffer,n,i)}t.setShape("points",e)}))}},db.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>2e6?(this._incremental||(this._incremental=new zu({silent:!0})),this.group.add(this._incremental)):this._incremental=null},db.incrementalUpdate=function(t,e,i){var n;this._incremental?(n=new hb,this._incremental.addDisplayable(n,!0)):((n=new hb({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end})).incremental=!0,this.group.add(n)),n.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(n,e,!!this._incremental,i)},db._setCommon=function(t,e,i,n){var r=e.hostModel;n=n||{};var a=e.getVisual("symbolSize");t.setShape("size",a instanceof Array?a:[a,a]),t.softClipShape=n.clipShape||null,t.symbolProxy=ub(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var o=t.shape.size[0]<4;t.useStyle(r.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=e.getVisual("color");s&&t.setColor(s),i||(t.seriesIndex=r.seriesIndex,t.on("mousemove",(function(e){t.dataIndex=null;var i=t.findDataIndex(e.offsetX,e.offsetY);i>=0&&(t.dataIndex=i+(t.startIndex||0))})))},db.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},db._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var fb=cb,pb=zt.map,gb=Jv.isDimensionStacked;var mb=function(t){return{seriesType:t,plan:ig(),reset:function(t){var e=t.getData(),i=t.coordinateSystem,n=t.pipelineContext.large;if(i){var r=pb(i.dimensions,(function(t){return e.mapDimension(t)})).slice(0,2),a=r.length,o=e.getCalculationInfo("stackResultDimension");return gb(e,r[0])&&(r[0]=o),gb(e,r[1])&&(r[1]=o),a&&{progress:function(t,e){for(var o=t.end-t.start,s=n&&new Float32Array(o*a),l=t.start,u=0,h=[],c=[];l<t.end;l++){var d;if(1===a){var f=e.get(r[0],l);d=!isNaN(f)&&i.dataToPoint(f,null,c)}else{f=h[0]=e.get(r[0],l);var p=h[1]=e.get(r[1],l);d=!isNaN(f)&&!isNaN(p)&&i.dataToPoint(h,null,c)}n?(s[u++]=d?d[0]:NaN,s[u++]=d?d[1]:NaN):e.setItemLayout(l,d&&d.slice()||[NaN,NaN])}n&&e.setLayout("symbolPoints",s)}}}}}};Nx.extendChartView({type:"scatter",render:function(t,e,i){var n=t.getData();this._updateSymbolDraw(n,t).updateData(n,{clipShape:this._getClipShape(t)}),this._finished=!0},incrementalPrepareRender:function(t,e,i){var n=t.getData();this._updateSymbolDraw(n,t).incrementalPrepareUpdate(n),this._finished=!1},incrementalRender:function(t,e,i){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,i){var n=t.getData();if(this.group.dirty(),!this._finished||n.count()>1e4||!this._symbolDraw.isPersistent())return{update:!0};var r=mb().reset(t);r.progress&&r.progress({start:0,end:n.count()},n),this._symbolDraw.updateLayout(n)},_getClipShape:function(t){var e=t.coordinateSystem,i=e&&e.getArea&&e.getArea();return t.get("clip",!0)?i:null},_updateSymbolDraw:function(t,e){var i=this._symbolDraw,n=e.pipelineContext.large;return i&&n===this._isLargeDraw||(i&&i.remove(),i=this._symbolDraw=n?new fb:new lb,this._isLargeDraw=n,this.group.removeAll()),this.group.add(i.group),i},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}});var vb=zt.isFunction;var yb=function(t,e,i){return{seriesType:t,performRawSeries:!0,reset:function(t,n,r){var a=t.getData(),o=t.get("symbol"),s=t.get("symbolSize"),l=t.get("symbolKeepAspect"),u=t.get("symbolRotate"),h=vb(o),c=vb(s),d=vb(u),f=h||c||d,p=!h&&o?o:e,g=c?null:s;if(a.setVisual({legendSymbol:i||p,symbol:p,symbolSize:g,symbolKeepAspect:l,symbolRotate:u}),!n.isSeriesFiltered(t))return{dataEach:a.hasItemOption||f?function(e,i){if(f){var n=t.getRawValue(i),r=t.getDataParams(i);h&&e.setItemVisual(i,"symbol",o(n,r)),c&&e.setItemVisual(i,"symbolSize",s(n,r)),d&&e.setItemVisual(i,"symbolRotate",u(n,r))}if(e.hasItemOption){var a=e.getItemModel(i),l=a.getShallow("symbol",!0),p=a.getShallow("symbolSize",!0),g=a.getShallow("symbolRotate",!0),m=a.getShallow("symbolKeepAspect",!0);null!=l&&e.setItemVisual(i,"symbol",l),null!=p&&e.setItemVisual(i,"symbolSize",p),null!=g&&e.setItemVisual(i,"symbolRotate",g),null!=m&&e.setItemVisual(i,"symbolKeepAspect",m)}}:null}}}};function _b(t){return this._axes[t]}var xb=function(t){this._axes={},this._dimList=[],this.name=t||""};xb.prototype={constructor:xb,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return zt.map(this._dimList,_b,this)},getAxesByScale:function(t){return t=t.toLowerCase(),zt.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 i=this._dimList,n=t instanceof Array?[]:{},r=0;r<i.length;r++){var a=i[r],o=this._axes[a];n[a]=o[e](t[a])}return n}};var bb=xb;function wb(t){bb.call(this,t)}wb.prototype={constructor:wb,type:"cartesian2d",dimensions:["x","y"],getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},containPoint:function(t){var e=this.getAxis("x"),i=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&i.contain(i.toLocalCoord(t[1]))},containData:function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},dataToPoint:function(t,e,i){var n=this.getAxis("x"),r=this.getAxis("y");return(i=i||[])[0]=n.toGlobalCoord(n.dataToCoord(t[0])),i[1]=r.toGlobalCoord(r.dataToCoord(t[1])),i},clampData:function(t,e){var i=this.getAxis("x").scale,n=this.getAxis("y").scale,r=i.getExtent(),a=n.getExtent(),o=i.parse(t[0]),s=n.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 i=this.getAxis("x"),n=this.getAxis("y");return(e=e||[])[0]=i.coordToData(i.toLocalCoord(t[0])),e[1]=n.coordToData(n.toLocalCoord(t[1])),e},getOtherAxis:function(t){return this.getAxis("x"===t.dim?"y":"x")},getArea:function(){var t=this.getAxis("x").getGlobalExtent(),e=this.getAxis("y").getGlobalExtent(),i=Math.min(t[0],t[1]),n=Math.min(e[0],e[1]),r=Math.max(t[0],t[1])-i,a=Math.max(e[0],e[1])-n;return new An(i,n,r,a)}},zt.inherits(wb,bb);var Sb=wb,Tb=function(t,e,i,n,r){vx.call(this,t,e,i),this.type=n||"value",this.position=r||"bottom"};Tb.prototype={constructor:Tb,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},zt.inherits(Tb,vx);var Mb=Tb,Cb={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)"]}}},Ib={};Ib.categoryAxis=zt.merge({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Cb),Ib.valueAxis=zt.merge({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},Cb),Ib.timeAxis=zt.defaults({scale:!0,min:"dataMin",max:"dataMax"},Ib.valueAxis),Ib.logAxis=zt.defaults({scale:!0,logBase:10},Ib.valueAxis);var Ab=Ib,Db=Yc.getLayoutParams,kb=Yc.mergeLayoutParam,Ob=["value","category","time","log"];var Pb=function(t,e,i,n){zt.each(Ob,(function(r){e.extend({type:t+"Axis."+r,mergeDefaultAndTheme:function(e,n){var a=this.layoutMode,o=a?Db(e):{},s=n.getTheme();zt.merge(e,s.get(r+"Axis")),zt.merge(e,this.getDefaultOption()),e.type=i(t,e),a&&kb(e,o,a)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=vy.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:zt.mergeAll([{},Ab[r+"Axis"],n],!0)})})),Qc.registerSubTypeDefaulter(t+"Axis",zt.curry(i,t))},Lb=Qc.extend({type:"cartesian2dAxis",axis:null,init:function(){Lb.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){Lb.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){Lb.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function Rb(t,e){return e.type||(e.data?"category":"value")}zt.merge(Lb.prototype,M_);var Eb={offset:0};Pb("x",Lb,Rb,Eb),Pb("y",Lb,Rb,Eb),Qc.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 Bb=zt.isObject,zb=zt.each,Nb=zt.map,Fb=zt.indexOf,Hb=Yc.getLayoutRect,Vb=S_.createScaleByModel,Wb=S_.ifAxisCrossZero,Gb=S_.niceScaleExtent,Ub=S_.estimateLabelUnionRect,jb=Jv.getStackedDimension;function Yb(t,e,i){return t.getCoordSysModel()===e}function Xb(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this.model=t}var qb=Xb.prototype;function Zb(t,e,i,n){i.getAxesOnZeroOf=function(){return r?[r]:[]};var r,a=t[e],o=i.model,s=o.get("axisLine.onZero"),l=o.get("axisLine.onZeroAxisIndex");if(s){if(null!=l)$b(a[l])&&(r=a[l]);else for(var u in a)if(a.hasOwnProperty(u)&&$b(a[u])&&!n[h(a[u])]){r=a[u];break}r&&(n[h(r)]=!0)}function h(t){return t.dim+"_"+t.index}}function $b(t){return t&&"category"!==t.type&&"time"!==t.type&&Wb(t)}qb.type="grid",qb.axisPointerEnabled=!0,qb.getRect=function(){return this._rect},qb.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model),zb(i.x,(function(t){Gb(t.scale,t.model)})),zb(i.y,(function(t){Gb(t.scale,t.model)}));var n={};zb(i.x,(function(t){Zb(i,"y",t,n)})),zb(i.y,(function(t){Zb(i,"x",t,n)})),this.resize(this.model,e)},qb.resize=function(t,e,i){var n=Hb(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=n;var r=this._axesList;function a(){zb(r,(function(t){var e=t.isHorizontal(),i=e?[0,n.width]:[0,n.height],r=t.inverse?1:0;t.setExtent(i[r],i[1-r]),function(t,e){var i=t.getExtent(),n=i[0]+i[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return n-t+e}}(t,e?n.x:n.y)}))}a(),!i&&t.get("containLabel")&&(zb(r,(function(t){if(!t.model.get("axisLabel.inside")){var e=Ub(t);if(e){var i=t.isHorizontal()?"height":"width",r=t.model.get("axisLabel.margin");n[i]-=e[i]+r,"top"===t.position?n.y+=e.height+r:"left"===t.position&&(n.x+=e.width+r)}}})),a())},qb.getAxis=function(t,e){var i=this._axesMap[t];if(null!=i){if(null==e)for(var n in i)if(i.hasOwnProperty(n))return i[n];return i[e]}},qb.getAxes=function(){return this._axesList.slice()},qb.getCartesian=function(t,e){if(null!=t&&null!=e){var i="x"+t+"y"+e;return this._coordsMap[i]}Bb(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,r=this._coordsList;n<r.length;n++)if(r[n].getAxis("x").index===t||r[n].getAxis("y").index===e)return r[n]},qb.getCartesians=function(){return this._coordsList.slice()},qb.convertToPixel=function(t,e,i){var n=this._findConvertTarget(t,e);return n.cartesian?n.cartesian.dataToPoint(i):n.axis?n.axis.toGlobalCoord(n.axis.dataToCoord(i)):null},qb.convertFromPixel=function(t,e,i){var n=this._findConvertTarget(t,e);return n.cartesian?n.cartesian.pointToData(i):n.axis?n.axis.coordToData(n.axis.toLocalCoord(i)):null},qb._findConvertTarget=function(t,e){var i,n,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)i=r.coordinateSystem,Fb(l,i)<0&&(i=null);else if(a&&o)i=this.getCartesian(a.componentIndex,o.componentIndex);else if(a)n=this.getAxis("x",a.componentIndex);else if(o)n=this.getAxis("y",o.componentIndex);else if(s){s.coordinateSystem===this&&(i=this._coordsList[0])}return{cartesian:i,axis:n}},qb.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},qb._initCartesian=function(t,e,i){var n={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(i,o){if(Yb(i,t)){var s=i.get("position");"x"===e?"top"!==s&&"bottom"!==s&&(s=n.bottom?"top":"bottom"):"left"!==s&&"right"!==s&&(s=n.left?"right":"left"),n[s]=!0;var l=new Mb(e,Vb(i),[0,0],i.get("type"),s),u="category"===l.type;l.onBand=u&&i.get("boundaryGap"),l.inverse=i.get("inverse"),i.axis=l,l.model=i,l.grid=this,l.index=o,this._axesList.push(l),r[e][o]=l,a[e]++}}}this._axesMap=r,zb(r.x,(function(e,i){zb(r.y,(function(n,r){var a="x"+i+"y"+r,o=new Sb(a);o.grid=this,o.model=t,this._coordsMap[a]=o,this._coordsList.push(o),o.addAxis(e),o.addAxis(n)}),this)}),this)},qb._updateScale=function(t,e){function i(t,e,i){zb(t.mapDimension(e.dim,!0),(function(i){e.scale.unionExtentFromData(t,jb(t,i))}))}zb(this._axesList,(function(t){t.scale.setExtent(1/0,-1/0)})),t.eachSeries((function(t){if(Jb(t)){var n=Qb(t),r=n[0],a=n[1];if(!Yb(r,e)||!Yb(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&&(i(s,l),i(s,u))}}),this)},qb.getTooltipAxes=function(t){var e=[],i=[];return zb(this.getCartesians(),(function(n){var r=null!=t&&"auto"!==t?n.getAxis(t):n.getBaseAxis(),a=n.getOtherAxis(r);Fb(e,r)<0&&e.push(r),Fb(i,a)<0&&i.push(a)})),{baseAxes:e,otherAxes:i}};var Kb=["xAxis","yAxis"];function Qb(t,e){return Nb(Kb,(function(e){return t.getReferringComponents(e)[0]}))}function Jb(t){return"cartesian2d"===t.get("coordinateSystem")}Xb.create=function(t,e){var i=[];return t.eachComponent("grid",(function(n,r){var a=new Xb(n,t,e);a.name="grid_"+r,a.resize(n,e,!0),n.coordinateSystem=a,i.push(a)})),t.eachSeries((function(t){if(Jb(t)){var e=Qb(t),i=e[0],n=e[1],r=i.getCoordSysModel().coordinateSystem;t.coordinateSystem=r.getCartesian(i.componentIndex,n.componentIndex)}})),i},Xb.dimensions=Xb.prototype.dimensions=Sb.prototype.dimensions,vf.register("cartesian2d",Xb);var tw=zt.retrieve,ew=zt.defaults,iw=zt.extend,nw=zt.each,rw=bc.isRadianAroundZero,aw=bc.remRadian,ow=z_.createSymbol,sw=ae.applyTransform,lw=S_.shouldShowAllLabels,uw=Math.PI,hw=function(t,e){this.opt=e,this.axisModel=t,ew(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new qh.Group;var i=new qh.Group({position:e.position.slice(),rotation:e.rotation});i.updateTransform(),this._transform=i.transform,this._dumbGroup=i};hw.prototype={constructor:hw,hasBuilder:function(t){return!!cw[t]},add:function(t){cw[t].call(this)},getGroup:function(){return this.group}};var cw={axisLine:function(){var t=this.opt,e=this.axisModel;if(e.get("axisLine.show")){var i=this.axisModel.axis.getExtent(),n=this._transform,r=[i[0],0],a=[i[1],0];n&&(sw(r,r,n),sw(a,a,n));var o=iw({lineCap:"round"},e.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new qh.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];nw([{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,i){if("none"!==s[i]&&null!=s[i]){var n=ow(s[i],-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)];n.attr({rotation:e.rotate,position:l,silent:!0,z2:11}),this.group.add(n)}}),this)}}},axisTickLabel:function(){var t=this.axisModel,e=this.opt,i=function(t,e,i){var n=e.axis,r=e.getModel("axisTick");if(!r.get("show")||n.scale.isBlank())return;for(var a=r.getModel("lineStyle"),o=i.tickDirection*r.get("length"),s=yw(n.getTicksCoords(),t._transform,o,ew(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),n=function(t,e,i){var n=e.axis,r=tw(i.axisLabelShow,e.get("axisLabel.show"));if(!r||n.scale.isBlank())return;var a=e.getModel("axisLabel"),o=a.get("margin"),s=n.getViewLabels(),l=(tw(i.labelRotate,a.get("rotate"))||0)*uw/180,u=fw(i.rotation,l,i.labelDirection),h=e.getCategories&&e.getCategories(!0),c=[],d=pw(e),f=e.get("triggerEvent");return nw(s,(function(r,s){var l=r.tickValue,p=r.formattedLabel,g=r.rawLabel,m=a;h&&h[l]&&h[l].textStyle&&(m=new uc(h[l].textStyle,a,e.ecModel));var v=m.getTextColor()||e.get("axisLine.lineStyle.color"),y=[n.dataToCoord(l),i.labelOffset+i.labelDirection*o],_=new qh.Text({anid:"label_"+l,position:y,rotation:u.rotation,silent:d,z2:10});qh.setTextStyle(_.style,m,{text:p,textAlign:m.getShallow("align",!0)||u.textAlign,textVerticalAlign:m.getShallow("verticalAlign",!0)||m.getShallow("baseline",!0)||u.textVerticalAlign,textFill:"function"==typeof v?v("category"===n.type?g:"value"===n.type?l+"":l,s):v}),f&&(_.eventData=dw(e),_.eventData.targetType="axisLabel",_.eventData.value=g),t._dumbGroup.add(_),_.updateTransform(),c.push(_),t.group.add(_),_.decomposeTransform()})),c}(this,t,e);!function(t,e,i){if(lw(t.axis))return;var n=t.get("axisLabel.showMinLabel"),r=t.get("axisLabel.showMaxLabel");e=e||[],i=i||[];var a=e[0],o=e[1],s=e[e.length-1],l=e[e.length-2],u=i[0],h=i[1],c=i[i.length-1],d=i[i.length-2];!1===n?(gw(a),gw(u)):mw(a,o)&&(n?(gw(o),gw(h)):(gw(a),gw(u)));!1===r?(gw(s),gw(c)):mw(l,s)&&(r?(gw(l),gw(d)):(gw(s),gw(c)))}(t,n,i),function(t,e,i){var n=e.axis,r=e.getModel("minorTick");if(!r.get("show")||n.scale.isBlank())return;var a=n.getMinorTicksCoords();if(!a.length)return;for(var o=r.getModel("lineStyle"),s=i.tickDirection*r.get("length"),l=ew(o.getLineStyle(),ew(e.getModel("axisTick").getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")})),u=0;u<a.length;u++)for(var h=yw(a[u],t._transform,s,l,"minorticks_"+u),c=0;c<h.length;c++)t.group.add(h[c])}(this,t,e)},axisName:function(){var t=this.opt,e=this.axisModel,i=tw(t.axisName,e.get("name"));if(i){var n,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,vw(a)?t.labelOffset+o*l:0],d=e.get("nameRotate");null!=d&&(d=d*uw/180),vw(a)?n=fw(t.rotation,null!=d?d:t.rotation,o):(n=function(t,e,i,n){var r,a,o=aw(i-t.rotation),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;rw(o-uw/2)?(a=l?"bottom":"top",r="center"):rw(o-1.5*uw)?(a=l?"top":"bottom",r="center"):(a="middle",r=o<1.5*uw&&o>uw/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(n.rotation)),!isFinite(r)&&(r=null)));var f=s.getFont(),p=e.get("nameTruncate",!0)||{},g=p.ellipsis,m=tw(t.nameTruncateMaxWidth,p.maxWidth,r),v=null!=g&&null!=m?Rc.truncateText(i,m,f,g,{minChar:2,placeholder:p.placeholder}):i,y=e.get("tooltip",!0),_=e.mainType,x={componentType:_,name:i,$vars:["name"]};x[_+"Index"]=e.componentIndex;var b=new qh.Text({anid:"name",__fullText:i,__truncatedText:v,position:c,rotation:n.rotation,silent:pw(e),z2:1,tooltip:y&&y.show?iw({content:i,formatter:function(){return i},formatterParams:x},y):null});qh.setTextStyle(b.style,s,{text:v,textFont:f,textFill:s.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:s.get("align")||n.textAlign,textVerticalAlign:s.get("verticalAlign")||n.textVerticalAlign}),e.get("triggerEvent")&&(b.eventData=dw(e),b.eventData.targetType="axisName",b.eventData.name=i),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},dw=hw.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},fw=hw.innerTextLayout=function(t,e,i){var n,r,a=aw(e-t);return rw(a)?(r=i>0?"top":"bottom",n="center"):rw(a-uw)?(r=i>0?"bottom":"top",n="center"):(r="middle",n=a>0&&a<uw?i>0?"right":"left":i>0?"left":"right"),{rotation:a,textAlign:n,textVerticalAlign:r}};var pw=hw.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)};function gw(t){t&&(t.ignore=!0)}function mw(t,e,i){var n=t&&t.getBoundingRect().clone(),r=e&&e.getBoundingRect().clone();if(n&&r){var a=ti.identity([]);return ti.rotate(a,a,-t.rotation),n.applyTransform(ti.mul([],a,t.getLocalTransform())),r.applyTransform(ti.mul([],a,e.getLocalTransform())),n.intersect(r)}}function vw(t){return"middle"===t||"center"===t}function yw(t,e,i,n,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]=i,e&&(sw(o,o,e),sw(s,s,e));var h=new qh.Line({anid:r+"_"+t[l].tickValue,subPixelOptimize:!0,shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:n,z2:2,silent:!0});a.push(h)}return a}var _w=hw,xw=zt.each,bw=zt.curry;function ww(t,e){return"all"===t||zt.isArray(t)&&zt.indexOf(t,e)>=0||t===e}function Sw(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[Mw(t)]}function Tw(t){return!!t.get("handle.show")}function Mw(t){return t.type+"||"+t.id}var Cw=function(t,e){var i={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(t,e,i){var n=e.getComponent("tooltip"),r=e.getComponent("axisPointer"),a=r.get("link",!0)||[],o=[];xw(i.getCoordinateSystems(),(function(i){if(i.axisPointerEnabled){var s=Mw(i.model),l=t.coordSysAxesInfo[s]={};t.coordSysMap[s]=i;var u=i.model.getModel("tooltip",n);if(xw(i.getAxes(),bw(f,!1,null)),i.getTooltipAxes&&n&&u.get("show")){var h="axis"===u.get("trigger"),c="cross"===u.get("axisPointer.type"),d=i.getTooltipAxes(u.get("axisPointer.axis"));(h||c)&&xw(d.baseAxes,bw(f,!c||"cross",h)),c&&xw(d.otherAxes,bw(f,"cross",!1))}}function f(n,s,h){var c=h.model.getModel("axisPointer",r),d=c.get("show");if(d&&("auto"!==d||n||Tw(c))){null==s&&(s=c.get("triggerTooltip")),c=n?function(t,e,i,n,r,a){var o=e.getModel("axisPointer"),s={};xw(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],(function(t){s[t]=zt.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&&zt.defaults(l,h.textStyle)}}return t.model.getModel("axisPointer",new uc(s,i,n))}(h,u,r,e,n,s):c;var f=c.get("snap"),p=Mw(h.model),g=s||f||"category"===h.type,m=t.axesInfo[p]={key:p,axis:h,coordSys:i,axisPointerModel:c,triggerTooltip:s,involveSeries:g,snap:f,useHandle:Tw(c),seriesModels:[]};l[p]=m,t.seriesInvolved|=g;var v=function(t,e){for(var i=e.model,n=e.dim,r=0;r<t.length;r++){var a=t[r]||{};if(ww(a[n+"AxisId"],i.id)||ww(a[n+"AxisIndex"],i.componentIndex)||ww(a[n+"AxisName"],i.name))return r}}(a,h);if(null!=v){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[p]=m,y.mapper=a[v].mapper,m.linkGroup=y}}}}))}(i,t,e),i.seriesInvolved&&function(t,e){e.eachSeries((function(e){var i=e.coordinateSystem,n=e.get("tooltip.trigger",!0),r=e.get("tooltip.show",!0);i&&"none"!==n&&!1!==n&&"item"!==n&&!1!==r&&!1!==e.get("axisPointer.show",!0)&&xw(t.coordSysAxesInfo[Mw(i.model)],(function(t){var n=t.axis;i.getAxis(n.dim)===n&&(t.seriesModels.push(e),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=e.getData().count())}))}),this)}(i,t),i},Iw=function(t){var e=Sw(t);if(e){var i=e.axisPointerModel,n=e.axis.scale,r=i.option,a=i.get("status"),o=i.get("value");null!=o&&(o=n.parse(o));var s=Tw(i);null==a&&(r.status=s?"show":"hide");var l=n.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")}},Aw={collect:Cw,fixValue:Iw,getAxisInfo:Sw,getAxisPointerModel:function(t){var e=Sw(t);return e&&e.axisPointerModel},makeKey:Mw},Dw=Nx.extendComponentView({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,i,n){this.axisPointerClass&&Aw.fixValue(t),Dw.superApply(this,"render",arguments),kw(this,t,e,i,n,!0)},updateAxisPointer:function(t,e,i,n,r){kw(this,t,e,i,n,!1)},remove:function(t,e){var i=this._axisPointer;i&&i.remove(e),Dw.superApply(this,"remove",arguments)},dispose:function(t,e){Ow(this,e),Dw.superApply(this,"dispose",arguments)}});function kw(t,e,i,n,r,a){var o=Dw.getAxisPointerClass(t.axisPointerClass);if(o){var s=Aw.getAxisPointerModel(e);s?(t._axisPointer||(t._axisPointer=new o)).render(e,s,n,a):Ow(t,n)}}function Ow(t,e,i){var n=t._axisPointer;n&&n.dispose(e,i),t._axisPointer=null}var Pw=[];Dw.registerAxisPointerClass=function(t,e){Pw[t]=e},Dw.getAxisPointerClass=function(t){return t&&Pw[t]};var Lw=Dw;var Rw=function(t,e,i){i=i||{};var n=t.coordinateSystem,r=e.axis,a={},o=r.getAxesOnZeroOf()[0],s=r.position,l=o?"onZero":s,u=r.dim,h=n.getRect(),c=[h.x,h.x+h.width,h.y,h.y+h.height],d={left:0,right:1,top:0,bottom:1,onZero:2},f=e.get("offset")||0,p="x"===u?[c[2]-f,c[3]+f]:[c[0]-f,c[1]+f];if(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),zt.retrieve(i.labelInside,e.get("axisLabel.inside"))&&(a.labelDirection=-a.labelDirection);var m=e.get("axisLabel.rotate");return a.labelRotate="top"===l?-m:m,a.z2=1,a},Ew={layout:Rw};var Bw=function(t,e,i,n){var r=i.axis;if(!r.scale.isBlank()){var a=i.getModel("splitArea"),o=a.getModel("areaStyle"),s=o.get("color"),l=n.coordinateSystem.getRect(),u=r.getTicksCoords({tickModel:a,clamp:!0});if(u.length){var h=s.length,c=t.__splitAreaColors,d=zt.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 m=r.toGlobalCoord(u[0].coord),v=o.getAreaStyle();s=zt.isArray(s)?s:[s];for(p=1;p<u.length;p++){var y,_,x,b,w=r.toGlobalCoord(u[p].coord);r.isHorizontal()?(y=m,_=l.y,x=w-y,b=l.height,m=y+x):(y=l.x,_=m,x=l.width,m=_+(b=w-_));var S=u[p-1].tickValue;null!=S&&d.set(S,f),e.add(new qh.Rect({anid:null!=S?"area_"+S:null,shape:{x:y,y:_,width:x,height:b},style:zt.defaults({fill:s[f]},v),silent:!0})),f=(f+1)%h}t.__splitAreaColors=d}}},zw={rectCoordAxisBuildSplitArea:Bw,rectCoordAxisHandleRemove:function(t){t.__splitAreaColors=null}},Nw=zw.rectCoordAxisBuildSplitArea,Fw=zw.rectCoordAxisHandleRemove,Hw=["axisLine","axisTickLabel","axisName"],Vw=["splitArea","splitLine","minorSplitLine"],Ww=Lw.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,i,n){this.group.removeAll();var r=this._axisGroup;if(this._axisGroup=new qh.Group,this.group.add(this._axisGroup),t.get("show")){var a=t.getCoordSysModel(),o=Ew.layout(a,t),s=new _w(t,o);zt.each(Hw,s.add,s),this._axisGroup.add(s.getGroup()),zt.each(Vw,(function(e){t.get(e+".show")&&this["_"+e](t,a)}),this),qh.groupTransition(r,this._axisGroup,t),Ww.superCall(this,"render",t,e,i,n)}},remove:function(){Fw(this)},_splitLine:function(t,e){var i=t.axis;if(!i.scale.isBlank()){var n=t.getModel("splitLine"),r=n.getModel("lineStyle"),a=r.get("color");a=zt.isArray(a)?a:[a];for(var o=e.coordinateSystem.getRect(),s=i.isHorizontal(),l=0,u=i.getTicksCoords({tickModel:n}),h=[],c=[],d=r.getLineStyle(),f=0;f<u.length;f++){var p=i.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,m=u[f].tickValue;this._axisGroup.add(new qh.Line({anid:null!=m?"line_"+u[f].tickValue:null,subPixelOptimize:!0,shape:{x1:h[0],y1:h[1],x2:c[0],y2:c[1]},style:zt.defaults({stroke:a[g]},d),silent:!0}))}}},_minorSplitLine:function(t,e){var i=t.axis,n=t.getModel("minorSplitLine").getModel("lineStyle"),r=e.coordinateSystem.getRect(),a=i.isHorizontal(),o=i.getMinorTicksCoords();if(o.length)for(var s=[],l=[],u=n.getLineStyle(),h=0;h<o.length;h++)for(var c=0;c<o[h].length;c++){var d=i.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 qh.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){Nw(this,this._axisGroup,t,e)}});Ww.extend({type:"xAxis"}),Ww.extend({type:"yAxis"}),Nx.extendComponentView({type:"grid",render:function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new qh.Rect({shape:t.coordinateSystem.getRect(),style:zt.defaults({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))}}),Nx.registerPreprocessor((function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})})),Nx.registerVisual(yb("scatter","circle")),Nx.registerLayout(mb("scatter"));var Gw=function(t,e){var i,n=[],r=t.seriesIndex;if(null==r||!(i=e.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=ko.queryDataIndex(a,t);if(null==o||o<0||zt.isArray(o))return{point:[]};var s=a.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)n=l.dataToPoint(a.getValues(zt.map(l.dimensions,(function(t){return a.mapDimension(t)})),o,!0))||[];else if(s){var u=s.getBoundingRect().clone();u.applyTransform(s.transform),n=[u.x+u.width/2,u.y+u.height/2]}return{point:n,el:s}},Uw=ko.makeInner,jw=zt.each,Yw=zt.curry,Xw=Uw();function qw(t,e,i,n,r){var a=t.axis;if(!a.scale.isBlank()&&a.containData(e))if(t.involveSeries){var o=function(t,e){var i=e.axis,n=i.dim,r=t,a=[],o=Number.MAX_VALUE,s=-1;return jw(e.seriesModels,(function(e,l){var u,h,c=e.getData().mapDimension(n,!0);if(e.getAxisTooltipData){var d=e.getAxisTooltipData(c,t,i);h=d.dataIndices,u=d.nestestValue}else{if(!(h=e.getData().indicesOfNearest(c[0],t,"category"===i.type?.5:null)).length)return;u=e.getData().get(c[0],h[0])}if(null!=u&&isFinite(u)){var f=t-u,p=Math.abs(f);p<=o&&((p<o||f>=0&&s<0)&&(o=p,s=f,r=u,a.length=0),jw(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&&zt.extend(r,s[0]),!n&&t.snap&&a.containData(l)&&null!=l&&(e=l),i.showPointer(t,e,s,r),i.showTooltip(t,o,l)}else i.showPointer(t,e)}function Zw(t,e,i,n){t[e.key]={value:i,payloadBatch:n}}function $w(t,e,i,n){var r=i.payloadBatch,a=e.axis,o=a.model,s=e.axisPointerModel;if(e.triggerTooltip&&r.length){var l=e.coordSys.model,u=Aw.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:n,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:r.slice()})}}function Kw(t){var e=t.axis.model,i={},n=i.axisDim=t.axis.dim;return i.axisIndex=i[n+"AxisIndex"]=e.componentIndex,i.axisName=i[n+"AxisName"]=e.name,i.axisId=i[n+"AxisId"]=e.id,i}function Qw(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}var Jw=function(t,e,i){var n=t.currTrigger,r=[t.x,t.y],a=t,o=t.dispatchAction||zt.bind(i.dispatchAction,i),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){Qw(r)&&(r=Gw({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=Qw(r),u=a.axesInfo,h=s.axesInfo,c="leave"===n||Qw(r),d={},f={},p={list:[],map:{}},g={showPointer:Yw(Zw,f),showTooltip:Yw($w,p)};jw(s.coordSysMap,(function(t,e){var i=l||t.containPoint(r);jw(s.coordSysAxesInfo[e],(function(t,e){var n=t.axis,a=function(t,e){for(var i=0;i<(t||[]).length;i++){var n=t[i];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}(u,t);if(!c&&i&&(!u||a)){var o=a&&a.value;null!=o||l||(o=n.pointToData(r)),null!=o&&qw(t,o,g,!1,d)}}))}));var m={};return jw(h,(function(t,e){var i=t.linkGroup;i&&!f[e]&&jw(i.axesInfo,(function(e,n){var r=f[n];if(e!==t&&r){var a=r.value;i.mapper&&(a=t.axis.scale.parse(i.mapper(a,Kw(e),Kw(t)))),m[t.key]=a}}))})),jw(m,(function(t,e){qw(h[e],t,g,!0,d)})),function(t,e,i){var n=i.axesInfo=[];jw(e,(function(e,i){var r=e.axisPointerModel.option,a=t[i];a?(!e.useHandle&&(r.status="show"),r.value=a.value,r.seriesDataIndices=(a.payloadBatch||[]).slice()):!e.useHandle&&(r.status="hide"),"show"===r.status&&n.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:r.value})}))}(f,h,d),function(t,e,i,n){if(Qw(e)||!t.list.length)return void n({type:"hideTip"});var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:i.tooltipOption,position:i.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}(p,r,t,o),function(t,e,i){var n=i.getZr(),r="axisPointerLastHighlights",a=Xw(n)[r]||{},o=Xw(n)[r]={};jw(t,(function(t,e){var i=t.axisPointerModel.option;"show"===i.status&&jw(i.seriesDataIndices,(function(t){var e=t.seriesIndex+" | "+t.dataIndex;o[e]=t}))}));var s=[],l=[];zt.each(a,(function(t,e){!o[e]&&l.push(t)})),zt.each(o,(function(t,e){!a[e]&&s.push(t)})),l.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,batch:l}),s.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,batch:s})}(h,0,i),d}};Nx.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 tS=(0,ko.makeInner)(),eS=zt.each;function iS(t,e,i){t.handler("leave",null,i)}function nS(t,e,i,n){e.handler(t,i,n)}var rS={register:function(t,e,i){if(!Q.node){var n=e.getZr();tS(n).records||(tS(n).records={}),function(t,e){if(tS(t).initialized)return;function i(i,n){t.on(i,(function(i){var r=function(t){var e={showTip:[],hideTip:[]},i=function(n){var r=e[n.type];r?r.push(n):(n.dispatchAction=i,t.dispatchAction(n))};return{dispatchAction:i,pendings:e}}(e);eS(tS(t).records,(function(t){t&&n(t,i,r.dispatchAction)})),function(t,e){var i,n=t.showTip.length,r=t.hideTip.length;n?i=t.showTip[n-1]:r&&(i=t.hideTip[r-1]);i&&(i.dispatchAction=null,e.dispatchAction(i))}(r.pendings,e)}))}tS(t).initialized=!0,i("click",zt.curry(nS,"click")),i("mousemove",zt.curry(nS,"mousemove")),i("globalout",iS)}(n,e),(tS(n).records[t]||(tS(n).records[t]={})).handler=i}},unregister:function(t,e){if(!Q.node){var i=e.getZr();(tS(i).records||{})[t]&&(tS(i).records[t]=null)}}},aS=Nx.extendComponentView({type:"axisPointer",render:function(t,e,i){var n=e.getComponent("tooltip"),r=t.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";rS.register("axisPointer",i,(function(t,e,i){"none"!==r&&("leave"===t||r.indexOf(t)>=0)&&i({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})}))},remove:function(t,e){rS.unregister(e.getZr(),"axisPointer"),aS.superApply(this._model,"remove",arguments)},dispose:function(t,e){rS.unregister("axisPointer",e),aS.superApply(this._model,"dispose",arguments)}}),oS=(0,ko.makeInner)(),sS=zt.clone,lS=zt.bind;function uS(){}function hS(t,e,i,n){cS(oS(i).lastProp,n)||(oS(i).lastProp=n,e?qh.updateProps(i,n,t):(i.stopAnimation(),i.attr(n)))}function cS(t,e){if(zt.isObject(t)&&zt.isObject(e)){var i=!0;return zt.each(e,(function(e,n){i=i&&cS(t[n],e)})),!!i}return t===e}function dS(t,e){t[e.get("label.show")?"show":"hide"]()}function fS(t){return{position:t.position.slice(),rotation:t.rotation||0}}function pS(t,e,i){var n=e.get("z"),r=e.get("zlevel");t&&t.traverse((function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=r&&(t.zlevel=r),t.silent=i)}))}function gS(t,e,i,n,r){var a=mS(i.get("value"),e.axis,e.ecModel,i.get("seriesDataIndices"),{precision:i.get("label.precision"),formatter:i.get("label.formatter")}),o=i.getModel("label"),s=Rc.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,i,n){var r=n.getWidth(),a=n.getHeight();t[0]=Math.min(t[0]+e,r)-e,t[1]=Math.min(t[1]+i,a)-i,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}(h,c,d,n);var g=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 mS(t,e,i,n,r){t=e.scale.parse(t);var a=e.scale.getLabel(t,{precision:r.precision}),o=r.formatter;if(o){var s={value:S_.getAxisRawValue(e,t),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};zt.each(n,(function(t){var e=i.getSeriesByIndex(t.seriesIndex),n=t.dataIndexInside,r=e&&e.getDataParams(n);r&&s.seriesData.push(r)})),zt.isString(o)?a=o.replace("{value}",a):zt.isFunction(o)&&(a=o(s))}return a}function vS(t,e,i){var n=ti.create();return ti.rotate(n,n,i.rotation),ti.translate(n,n,i.position),qh.applyTransform([t.dataToCoord(e),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],n)}uS.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,i,n){var r=e.get("value"),a=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,n||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,i);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=u;var h=this._moveAnimation=this.determineAnimation(t,e);if(o){var c=zt.curry(hS,e,h);this.updatePointerEl(o,l,c,e),this.updateLabelEl(o,l,c,e)}else o=this._group=new qh.Group,this.createPointerEl(o,l,t,e),this.createLabelEl(o,l,t,e),i.getZr().add(o);pS(o,e,!0),this._renderHandle(r)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var i=e.get("animation"),n=t.axis,r="category"===n.type,a=e.get("snap");if(!a&&!r)return!1;if("auto"===i||null==i){var o=this.animationThreshold;if(r&&n.getBandWidth()>o)return!0;if(a){var s=Aw.getAxisInfo(t).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>o}return!1}return!0===i},makeElOption:function(t,e,i,n,r){},createPointerEl:function(t,e,i,n){var r=e.pointer;if(r){var a=oS(t).pointerEl=new qh[r.type](sS(e.pointer));t.add(a)}},createLabelEl:function(t,e,i,n){if(e.label){var r=oS(t).labelEl=new qh.Rect(sS(e.label));t.add(r),dS(r,n)}},updatePointerEl:function(t,e,i){var n=oS(t).pointerEl;n&&e.pointer&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var r=oS(t).labelEl;r&&(r.setStyle(e.label.style),i(r,{shape:e.label.shape,position:e.label.position}),dS(r,n))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e,i=this._axisPointerModel,n=this._api.getZr(),r=this._handle,a=i.getModel("handle"),o=i.get("status");if(!a.get("show")||!o||"hide"===o)return r&&n.remove(r),void(this._handle=null);this._handle||(e=!0,r=this._handle=qh.createIcon(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Pe.stop(t.event)},onmousedown:lS(this._onHandleDragMove,this,0,0),drift:lS(this._onHandleDragMove,this),ondragend:lS(this._onHandleDragEnd,this)}),n.add(r)),pS(r,i,!1);r.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=a.get("size");zt.isArray(s)||(s=[s,s]),r.attr("scale",[s[0]/2,s[1]/2]),bg.createOrUpdate(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},_moveHandleToValue:function(t,e){hS(this._axisPointerModel,!e&&this._moveAnimation,this._handle,fS(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(fS(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(fS(n)),oS(i).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},_onHandleDragEnd:function(t){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}}},uS.prototype.constructor=uS,No.enableClassExtend(uS);var yS=function(t){var e,i=t.get("type"),n=t.getModel(i+"Style");return"line"===i?(e=n.getLineStyle()).fill=null:"shadow"===i&&((e=n.getAreaStyle()).stroke=null),e},_S={buildElStyle:yS,buildLabelElOption:gS,getValueLabel:mS,getTransformedPosition:vS,buildCartesianSingleLabelElOption:function(t,e,i,n,r,a){var o=_w.innerTextLayout(i.rotation,0,i.labelDirection);i.labelMargin=r.get("label.margin"),gS(e,n,r,a,{position:vS(n.axis,t,i),align:o.textAlign,verticalAlign:o.textVerticalAlign})},makeLineShape:function(t,e,i){return{x1:t[i=i||0],y1:t[1-i],x2:e[i],y2:e[1-i]}},makeRectShape:function(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}},makeSectorShape:function(t,e,i,n,r,a){return{cx:t,cy:e,r0:i,r:n,startAngle:r,endAngle:a,clockwise:!0}}},xS=uS.extend({makeElOption:function(t,e,i,n,r){var a=i.axis,o=a.grid,s=n.get("type"),l=bS(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(e,!0));if(s&&"none"!==s){var h=_S.buildElStyle(n),c=wS[s](a,u,l);c.style=h,t.graphicKey=c.type,t.pointer=c}var d=Ew.layout(o.model,i);_S.buildCartesianSingleLabelElOption(e,t,d,i,n,r)},getHandleTransform:function(t,e,i){var n=Ew.layout(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:_S.getTransformedPosition(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var r=i.axis,a=r.grid,o=r.getGlobalExtent(!0),s=bS(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 bS(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}var wS={line:function(t,e,i){return{type:"Line",subPixelOptimize:!0,shape:_S.makeLineShape([e,i[0]],[e,i[1]],SS(t))}},shadow:function(t,e,i){var n=Math.max(1,t.getBandWidth()),r=i[1]-i[0];return{type:"Rect",shape:_S.makeRectShape([e-n/2,i[0]],[n,r],SS(t))}}};function SS(t){return"x"===t.dim?0:1}Lw.registerAxisPointerClass("CartesianAxisPointer",xS),Nx.registerPreprocessor((function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!zt.isArray(e)&&(t.axisPointer.link=[e])}})),Nx.registerProcessor(Nx.PRIORITY.PROCESSOR.STATISTIC,(function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=Aw.collect(t,e)})),Nx.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},Jw),Nx.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 TS=zt.each,MS=Rc.toCamelCase,CS=["","-webkit-","-moz-","-o-"];function IS(t){var e,i,n,r=[],a=t.get("transitionDuration"),o=t.get("backgroundColor"),s=t.getModel("textStyle"),l=t.get("padding");return a&&r.push((n="left "+(e=a)+"s "+(i="cubic-bezier(0.23, 1, 0.32, 1)")+",top "+e+"s "+i,zt.map(CS,(function(t){return t+"transition:"+n})).join(";"))),o&&(Q.canvasSupported?r.push("background-Color:"+o):(r.push("background-Color:#"+Vi.toHex(o)),r.push("filter:alpha(opacity=70)"))),TS(["width","color","radius"],(function(e){var i="border-"+e,n=MS(i),a=t.get(n);null!=a&&r.push(i+":"+a+("color"===e?"":"px"))})),r.push(function(t){var e=[],i=t.get("fontSize"),n=t.getTextColor();return n&&e.push("color:"+n),e.push("font:"+t.getFont()),i&&e.push("line-height:"+Math.round(3*i/2)+"px"),TS(["decoration","align"],(function(i){var n=t.get(i);n&&e.push("text-"+i+":"+n)})),e.join(";")}(s)),null!=l&&r.push("padding:"+Rc.normalizeCssArray(l).join("px ")+"px"),r.join(";")+";"}function AS(t,e,i,n,r){var a=e&&e.painter;if(i){var o=a&&a.getViewportRoot();o&&we.transformLocalCoord(t,o,document.body,n,r)}else{t[0]=n,t[1]=r;var s=a&&a.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}}function DS(t,e,i){if(Q.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),a=this._appendToBody=i&&i.appendToBody;this._styleCoord=[0,0],AS(this._styleCoord,r,a,e.getWidth()/2,e.getHeight()/2),a?document.body.appendChild(n):t.appendChild(n),this._container=t,this._show=!1,this._hideTimeout;var o=this;n.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},n.onmousemove=function(t){if(t=t||window.event,!o._enterable){var e=r.handler,i=r.painter.getViewportRoot();Pe.normalizeEvent(i,t,!0),e.dispatch("mousemove",t)}},n.onmouseleave=function(){o._enterable&&o._show&&o.hideLater(o._hideDelay),o._inContent=!1}}DS.prototype={constructor:DS,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),i=t.style;"absolute"!==i.position&&"absolute"!==e.position&&(i.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el,i=this._styleCoord;e.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+IS(t)+";left:"+i[0]+"px;top:"+i[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 i=this._styleCoord;AS(i,this._zr,this._appendToBody,t,e);var n=this.el.style;n.left=i[0]+"px",n.top=i[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(zt.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 i=document.defaultView.getComputedStyle(this.el);i&&(t+=parseInt(i.borderLeftWidth,10)+parseInt(i.borderRightWidth,10),e+=parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10))}return{width:t,height:e}}};var kS=DS;function OS(t){this._zr=t.getZr(),this._show=!1,this._hideTimeout}OS.prototype={constructor:OS,_enterable:!0,update:function(){},show:function(t){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(t,e,i){this.el&&this._zr.remove(this.el);for(var n={},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?n["marker"+l]={textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:e[l],textOffset:[3,0]}:n["marker"+l]={textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:e[l]},o=(r=r.substr(s+1)).indexOf("{marker")}this.el=new zl({style:{rich:n,text:t,textLineHeight:20,textBackgroundColor:i.get("backgroundColor"),textBorderRadius:i.get("borderRadius"),textFill:i.get("textStyle.color"),textPadding:i.get("padding")},z:i.get("z")}),this._zr.add(this.el);var u=this;this.el.on("mouseover",(function(){u._enterable&&(clearTimeout(u._hideTimeout),u._show=!0),u._inContent=!0})),this.el.on("mouseout",(function(){u._enterable&&u._show&&u.hideLater(u._hideDelay),u._inContent=!1}))},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el.getBoundingRect();return[t.width,t.height]},moveTo:function(t,e){this.el&&this.el.attr("position",[t,e])},hide:function(){this.el&&this.el.hide(),this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(zt.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 PS=OS,LS=ko.getTooltipRenderMode,RS=zt.bind,ES=zt.each,BS=bc.parsePercent,zS=new qh.Rect({shape:{x:-1,y:-1,width:2,height:2}});function NS(t){for(var e=t.pop();t.length;){var i=t.pop();i&&(uc.isInstance(i)&&(i=i.get("tooltip",!0)),"string"==typeof i&&(i={formatter:i}),e=new uc(i,e,e.ecModel))}return e}function FS(t,e){return t.dispatchAction||zt.bind(e.dispatchAction,e)}function HS(t){return"center"===t||"middle"===t}Nx.extendComponentView({type:"tooltip",init:function(t,e){if(!Q.node){var i,n=t.getComponent("tooltip"),r=n.get("renderMode");this._renderMode=LS(r),"html"===this._renderMode?(i=new kS(e.getDom(),e,{appendToBody:n.get("appendToBody",!0)}),this._newLine="<br/>"):(i=new PS(e),this._newLine="\n"),this._tooltipContent=i}},render:function(t,e,i){if(!Q.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=i,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var n=this._tooltipContent;n.update(),n.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel.get("triggerOn");rS.register("itemTooltip",this._api,RS((function(e,i,n){"none"!==t&&(t.indexOf(e)>=0?this._tryShow(i,n):"leave"===e&&this._hide(n))}),this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,i=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var n=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!i.isDisposed()&&n.manuallyShowTip(t,e,i,{x:n._lastX,y:n._lastY})}))}},manuallyShowTip:function(t,e,i,n){if(n.from!==this.uid&&!Q.node){var r=FS(n,i);this._ticket="";var a=n.dataByCoordSys;if(n.tooltip&&null!=n.x&&null!=n.y){var o=zS;o.position=[n.x,n.y],o.update(),o.tooltip=n.tooltip,this._tryShow({offsetX:n.x,offsetY:n.y,target:o},r)}else if(a)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,dataByCoordSys:n.dataByCoordSys,tooltipOption:n.tooltipOption},r);else if(null!=n.seriesIndex){if(this._manuallyAxisShowTip(t,e,i,n))return;var s=Gw(n,e),l=s.point[0],u=s.point[1];null!=l&&null!=u&&this._tryShow({offsetX:l,offsetY:u,position:n.position,target:s.el},r)}else null!=n.x&&null!=n.y&&(i.dispatchAction({type:"updateAxisPointer",x:n.x,y:n.y}),this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,target:i.getZr().findHover(n.x,n.y).target},r))}},manuallyHideTip:function(t,e,i,n){var r=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,n.from!==this.uid&&this._hide(FS(n,i))},_manuallyAxisShowTip:function(t,e,i,n){var r=n.seriesIndex,a=n.dataIndex,o=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=a&&null!=o){var s=e.getSeriesByIndex(r);if(s)if("axis"===(t=NS([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model,t])).get("trigger"))return i.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:a,position:n.position}),!0}},_tryShow:function(t,e){var i=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var n=t.dataByCoordSys;n&&n.length?this._showAxisTooltip(n,t):i&&null!=i.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,i,e)):i&&i.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,i,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var i=t.get("showDelay");e=zt.bind(e,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(e,i):e()},_showAxisTooltip:function(t,e){var i=this._ecModel,n=this._tooltipModel,r=[e.offsetX,e.offsetY],a=[],o=[],s=NS([e.tooltipOption,n]),l=this._renderMode,u=this._newLine,h={};ES(t,(function(t){ES(t.dataByAxis,(function(t){var e=i.getComponent(t.axisDim+"Axis",t.axisIndex),n=t.value,r=[];if(e&&null!=n){var s=_S.getValueLabel(n,e.axis,i,t.seriesDataIndices,t.valueLabelOpt);zt.each(t.seriesDataIndices,(function(a){var u=i.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=S_.getAxisRawValue(e.axis,n),d.axisValueLabel=s,d){o.push(d);var f,p=u.formatTooltip(c,!0,null,l);if(zt.isObject(p)){f=p.html;var g=p.markers;zt.merge(h,g)}else f=p;r.push(f)}}));var c=s;"html"!==l?a.push(r.join(u)):a.push((c?Rc.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,i){var n=this._ecModel,r=e.seriesIndex,a=n.getSeriesByIndex(r),o=e.dataModel||a,s=e.dataIndex,l=e.dataType,u=o.getData(l),h=NS([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);zt.isObject(g)?(d=g.html,f=g.markers):(d=g,f=null);var m="item_"+o.name+"_"+s;this._showOrMove(h,(function(){this._showTooltipContent(h,d,p,m,t.offsetX,t.offsetY,t.position,t.target,f)})),i({type:"showTip",dataIndexInside:s,dataIndex:u.getRawIndex(s),seriesIndex:r,from:this.uid})}},_showComponentItemTooltip:function(t,e,i){var n=e.tooltip;if("string"==typeof n){n={content:n,formatter:n}}var r=new uc(n,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)})),i({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,i,n,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=Rc.formatTpl(h,i,!0);else if("function"==typeof h){var d=RS((function(e,n){e===this._ticket&&(u.setContent(n,l,t),this._updatePosition(t,o,r,a,u,i,s))}),this);this._ticket=n,c=h(i,n,d)}u.setContent(c,l,t),u.show(t),this._updatePosition(t,o,r,a,u,i,s)}},_updatePosition:function(t,e,i,n,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([i,n],a,r.el,d,{viewSize:[s,l],contentSize:u.slice()})),zt.isArray(e))i=BS(e[0],s),n=BS(e[1],l);else if(zt.isObject(e)){e.width=u[0],e.height=u[1];var f=Yc.getLayoutRect(e,{width:s,height:l});i=f.x,n=f.y,h=null,c=null}else if("string"==typeof e&&o){var p=function(t,e,i){var n=i[0],r=i[1],a=5,o=0,s=0,l=e.width,u=e.height;switch(t){case"inside":o=e.x+l/2-n/2,s=e.y+u/2-r/2;break;case"top":o=e.x+l/2-n/2,s=e.y-r-a;break;case"bottom":o=e.x+l/2-n/2,s=e.y+u+a;break;case"left":o=e.x-n-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);i=p[0],n=p[1]}else{p=function(t,e,i,n,r,a,o){var s=i.getOuterSize(),l=s.width,u=s.height;null!=a&&(t+l+a>n?t-=l+a:t+=a);null!=o&&(e+u+o>r?e-=u+o:e+=o);return[t,e]}(i,n,r,s,l,h?null:20,c?null:20);i=p[0],n=p[1]}if(h&&(i-=HS(h)?u[0]/2:"right"===h?u[0]:0),c&&(n-=HS(c)?u[1]/2:"bottom"===c?u[1]:0),t.get("confine")){p=function(t,e,i,n,r){var a=i.getOuterSize(),o=a.width,s=a.height;return t=Math.min(t+o,n)-o,e=Math.min(e+s,r)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}(i,n,r,s,l);i=p[0],n=p[1]}r.moveTo(i,n)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,i=!!e&&e.length===t.length;return i&&ES(e,(function(e,n){var r=e.dataByAxis||{},a=(t[n]||{}).dataByAxis||[];(i&=r.length===a.length)&&ES(r,(function(t,e){var n=a[e]||{},r=t.seriesDataIndices||[],o=n.seriesDataIndices||[];(i&=t.value===n.value&&t.axisType===n.axisType&&t.axisId===n.axisId&&r.length===o.length)&&ES(r,(function(t,e){var n=o[e];i&=t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex}))}))})),this._lastDataByCoordSys=t,!!i},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){Q.node||(this._tooltipContent.dispose(),rS.unregister("itemTooltip",e))}}),Nx.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},(function(){})),Nx.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},(function(){}));var VS=[{college:"材料学院",use_time:4264.33,numberOfResearchGroups:1883,numberOfRecords:91},{college:"能动学院",use_time:1094.2,numberOfResearchGroups:594,numberOfRecords:56},{college:"理学院",use_time:2751.5,numberOfResearchGroups:803,numberOfRecords:48},{college:"机械学院",use_time:1620.34,numberOfResearchGroups:748,numberOfRecords:46},{college:"电气学院",use_time:784.3,numberOfResearchGroups:381,numberOfRecords:38},{college:"电信学部",use_time:760.27,numberOfResearchGroups:295,numberOfRecords:36},{college:"生命学院",use_time:1847.83,numberOfResearchGroups:704,numberOfRecords:31},{college:"医学部",use_time:265.06,numberOfResearchGroups:133,numberOfRecords:26},{college:"化工学院",use_time:371.63,numberOfResearchGroups:170,numberOfRecords:24},{college:"前沿院",use_time:355.16,numberOfResearchGroups:238,numberOfRecords:13},{college:"航天学院",use_time:223.6,numberOfResearchGroups:102,numberOfRecords:13},{college:"一附院",use_time:130.64,numberOfResearchGroups:34,numberOfRecords:10},{college:"人居学院",use_time:22.66,numberOfResearchGroups:11,numberOfRecords:4},{college:"二附院",use_time:10.4,numberOfResearchGroups:6,numberOfRecords:2}];let WS=class extends s.Component{constructor(t){super(t),this.chartRef=s.createRef(),this.padding="7vh 2vh 2vh",this.generateChartOption=()=>{const t=[{color:"rgba(0, 150, 255, 0.42)",borderColor:"rgba(0, 150, 255, 1)"},{color:"rgba(213, 64, 64, 0.42)",borderColor:"rgba(213, 64, 64, 1)"},{color:"rgba(11, 210, 195, 0.42)",borderColor:"rgba(11, 210, 195, 1)"}];return{tooltip:{show:!0,formatter:({seriesName:t,data:e})=>(e.type,`${t}<br/>${e.name}: ${e.value}`)},xAxis:{axisLine:{show:!0,lineStyle:{color:"#2B3873"}},axisTick:{show:!0,lineStyle:{color:"#2B3873"}},axisLabel:{color:"#CDE0FF"},splitLine:{show:!1}},yAxis:{axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:"#CDE0FF"},splitLine:{show:!0,lineStyle:{color:"#2B3873",type:"dashed"}}},series:[{name:"支撑学科",type:"scatter",data:VS.map(((e,i)=>({name:e.college,value:[e.use_time,e.numberOfRecords],symbolSize:2*Math.sqrt(e.numberOfResearchGroups),itemStyle:t[i%t.length]}))),label:{show:!0,position:"inside",color:"#CDE0FF",formatter:({data:t})=>t.name},itemStyle:{borderWidth:1,borderType:"solid"}}]}},i.reaction((()=>t.gpui.params.padding),(t=>{this.padding=t||"7vh 2vh 2vh"}),{fireImmediately:!0})}componentDidMount(){this.chart=this.chart||Nx.init(this.chartRef.current),window.addEventListener("resize",(()=>{this.chart.resize()})),this.chart.setOption(this.generateChartOption(),{notMerge:!0})}render(){return s.createElement("div",{className:"g__index",style:{padding:this.padding}},s.createElement("div",{className:u},s.createElement("div",{ref:this.chartRef,className:h})))}};return l([i.observable],WS.prototype,"padding",void 0),WS=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'"),q&&t.$$typeof===q)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 i=t.render;if("function"!=typeof i)throw new Error("render property of ForwardRef was not a function");return e.forwardRef((function(){var t=arguments;return e.createElement(T,null,(function(){return i.apply(void 0,t)}))}))}return"function"!=typeof t||t.prototype&&t.prototype.render||t.isReactClass||Object.prototype.isPrototypeOf.call(e.Component,t)?W(t):w(t)}],WS),WS}));
