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=1e4,v=new Set;function y(){void 0===p&&(p=setTimeout(_,m))}function _(){p=void 0;var t=Date.now();v.forEach((function(e){var i=e.current;i&&t>=i.cleanAt&&(i.reaction.dispose(),e.current=null,v.delete(e))})),v.size>0&&y()}var x={};function b(t){return"observer"+t}function w(t,e,n){void 0===e&&(e="observed"),void 0===n&&(n=x);var r,a=(n.useForceUpdate||d)(),s=o.default.useRef(null);if(!s.current){var l=new i.Reaction(b(e),(function(){u.mounted?a():(l.dispose(),s.current=null)})),u=function(t){return{cleanAt:Date.now()+g,reaction:t}}(l);s.current=u,r=s,v.add(r),y()}var h,c,p=s.current.reaction;if(o.default.useDebugValue(p,f),o.default.useEffect((function(){var t;return t=s,v.delete(t),s.current?s.current.mounted=!0:(s.current={reaction:new i.Reaction(b(e),(function(){a()})),cleanAt:1/0},a()),function(){s.current.reaction.dispose(),s.current=null}}),[]),p.track((function(){try{h=t()}catch(t){c=t}})),c)throw c;return h}function S(t,i){var n,r=c({forwardRef:!1},i),a=t.displayName||t.name,o=function(e,i){return w((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){T[i]||Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))}))}(t,n),n.displayName=a,n}var T={$$typeof:!0,render:!0,compare:!0,type:!0};function M(t){var e=t.children,i=t.render,n=e||i;return"function"!=typeof n?null:w(n)}function C(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`.")}M.propTypes={children:C,render:C},M.displayName="Observer";var I=0;var A={};function D(t){return A[t]||(A[t]=function(t){if("function"==typeof Symbol)return Symbol(t);var e="__$mobx-react "+t+" ("+I+")";return I++,e}(t)),A[t]}function k(t,e){if(O(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])||!O(t[i[r]],e[i[r]]))return!1;return!0}function O(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function P(t,e,i){Object.hasOwnProperty.call(t,e)?t[e]=i:Object.defineProperty(t,e,{enumerable:!1,configurable:!0,writable:!0,value:i})}var L=D("patchMixins"),R=D("patchedDefinition");function E(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 B(t,e){return function(){for(var i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];E.call.apply(E,[this,t,e].concat(n))}}function z(t,e,i){var n=function(t,e){var i=t[L]=t[L]||{},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[R]){var a=t[e],o=N(t,e,r?r.enumerable:void 0,n,a);Object.defineProperty(t,e,o)}}function N(t,e,i,n,r){var a,o=B(r,n);return(a={})[R]=!0,a.get=function(){return o},a.set=function(r){if(this===t)o=B(r,n);else{var a=N(this,e,i,n,r);Object.defineProperty(this,e,a)}},a.configurable=!0,a.enumerable=i,a}var F=i.$mobx||"$mobx",H=D("isUnmounted"),V=D("skipRender"),W=D("isForcingUpdate");function G(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!==j)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}else i.shouldComponentUpdate=j;Y(i,"props"),Y(i,"state");var n=i.render;return i.render=function(){return U.call(this,n)},z(i,"componentWillUnmount",(function(){this.render[F]&&this.render[F].dispose(),this[H]=!0})),t}function U(t){var n=this;P(this,V,!1),P(this,W,!1);var r,a=(r=this).displayName||r.name||r.constructor&&(r.constructor.displayName||r.constructor.name)||"<component>",o=t.bind(this),s=!1,l=new i.Reaction(a+".render()",(function(){if(!s&&(s=!0,!0!==n[H])){var t=!0;try{P(n,W,!0),n[V]||e.Component.prototype.forceUpdate.call(n),t=!1}finally{P(n,W,!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[F]=l,this.render=u,u.call(this)}function j(t,e){return this.state!==e||!k(this.props,t)}function Y(t,e){var n=D("reactProp_"+e+"_valueHolder"),r=D("reactProp_"+e+"_atomHolder");function a(){return this[r]||P(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[W]||k(this[n],t)?P(this,n,t):(P(this,n,t),P(this,V,!0),a.call(this).reportChanged(),P(this,V,!1))}})}var X="function"==typeof Symbol&&Symbol.for,q=X?Symbol.for("react.forward_ref"):"function"==typeof e.forwardRef&&e.forwardRef((function(t){return null})).$$typeof,Z=X?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 $="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};"undefined"!=typeof window||void 0!==$&&$.__DEV__;var K=2311;var Q=function(){return K++};var J="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:function(t){var e={},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),tt={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},et={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},it=Object.prototype.toString,nt=Array.prototype,rt=nt.forEach,at=nt.filter,ot=nt.slice,st=nt.map,lt=nt.reduce,ut={};function ht(t){if(null==t||"object"!=typeof t)return t;var e=t,i=it.call(t);if("[object Array]"===i){if(!wt(t)){e=[];for(var n=0,r=t.length;n<r;n++)e[n]=ht(t[n])}}else if(et[i]){if(!wt(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]=ht(t[n])}}}else if(!tt[i]&&!wt(t)&&!xt(t))for(var o in e={},t)t.hasOwnProperty(o)&&(e[o]=ht(t[o]));return e}function ct(t,e,i){if(!yt(e)||!yt(t))return i?ht(e):t;for(var n in e)if(e.hasOwnProperty(n)){var r=t[n],a=e[n];!yt(a)||!yt(r)||vt(a)||vt(r)||xt(a)||xt(r)||_t(a)||_t(r)||wt(a)||wt(r)?!i&&n in t||(t[n]=ht(e[n])):ct(r,a,i)}return t}function dt(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 ft,pt=function(){return ut.createCanvas()};function gt(t,e,i){if(t&&e)if(t.forEach&&t.forEach===rt)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 mt(t,e){var i=ot.call(arguments,2);return function(){return t.apply(e,i.concat(ot.call(arguments)))}}function vt(t){return"[object Array]"===it.call(t)}function yt(t){var e=typeof t;return"function"===e||!!t&&"object"===e}function _t(t){return!!tt[it.call(t)]}function xt(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}ut.createCanvas=function(){return document.createElement("canvas")};var bt="__ec_primitive__";function wt(t){return t[bt]}function St(t){var e=vt(t);this.data={};var i=this;function n(t,n){e?i.set(t,n):i.set(n,t)}t instanceof St?t.each(n):t&&gt(t,n)}St.prototype={constructor:St,get:function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},set:function(t,e){return this.data[t]=e},each:function(t,e){for(var i in void 0!==e&&(t=mt(t,e)),this.data)this.data.hasOwnProperty(i)&&t(this.data[i],i)},removeKey:function(t){delete this.data[t]}};var Tt=function(t,e){"createCanvas"===t&&(ft=null),ut[t]=e},Mt=function(t,e){for(var i=t[0],n=1,r=t.length;n<r;n++)i=ct(i,t[n],e);return i},Ct=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},It=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},At=function(t){if(t)return"string"!=typeof t&&"number"==typeof t.length},Dt=function(t,e,i){if(t&&e){if(t.map&&t.map===st)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}},kt=function(t,e,i,n){if(t&&e){if(t.reduce&&t.reduce===lt)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}},Ot=function(t,e,i){if(t&&e){if(t.filter&&t.filter===at)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}},Pt=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]},Lt=function(t){var e=ot.call(arguments,1);return function(){return t.apply(this,e.concat(ot.call(arguments)))}},Rt=function(t){for(var e=0,i=arguments.length;e<i;e++)if(null!=arguments[e])return arguments[e]},Et=function(){return Function.call.apply(ot,arguments)},Bt=function(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t},zt=function(t,e){for(var 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},Nt={$override:Tt,clone:ht,merge:ct,mergeAll:Mt,extend:function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t},defaults:dt,createCanvas:pt,getContext:function(){return ft||(ft=pt().getContext("2d")),ft},indexOf:Ct,inherits:It,mixin:function(t,e,i){dt(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,i)},isArrayLike:At,each:gt,map:Dt,reduce:kt,filter:Ot,find:Pt,bind:mt,curry:Lt,isArray:vt,isFunction:function(t){return"function"==typeof t},isString:function(t){return"[object String]"===it.call(t)},isObject:yt,isBuiltInObject:_t,isTypedArray:function(t){return!!et[it.call(t)]},isDom:xt,eqNaN:function(t){return t!=t},retrieve:Rt,retrieve2:function(t,e){return null!=t?t:e},retrieve3:function(t,e,i){return null!=t?t:null!=e?e:i},slice:Et,normalizeCssArray:Bt,assert:function(t,e){if(!t)throw new Error(e)},trim:function(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},setAsPrimitive:function(t){t[bt]=!0},isPrimitive:wt,createHashMap:function(t){return new St(t)},concatArray:zt,noop:function(){}},Ft="undefined"==typeof Float32Array?Array:Float32Array;function Ht(t){return Math.sqrt(Vt(t))}function Vt(t){return t[0]*t[0]+t[1]*t[1]}function Wt(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function Gt(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var Ut=function(t,e){var i=new Ft(2);return null==t&&(t=0),null==e&&(e=0),i[0]=t,i[1]=e,i},jt=function(t,e){return t[0]=e[0],t[1]=e[1],t},Yt=function(t){var e=new Ft(2);return e[0]=t[0],e[1]=t[1],e},Xt=function(t,e,i){return t[0]=e,t[1]=i,t},qt=function(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t},Zt=function(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,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[0],t[1]=e[1]/i[1],t},Jt=function(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t},te=function(t,e){var i=Ht(e);return 0===i?(t[0]=0,t[1]=0):(t[0]=e[0]/i,t[1]=e[1]/i),t},ee=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},ie=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},ne=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},re=function(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t},ae=function(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t},oe={create:Ut,copy:jt,clone:Yt,set:Xt,add:qt,scaleAndAdd:Zt,sub:$t,len:Ht,length:Ht,lenSquare:Vt,lengthSquare:Vt,mul:Kt,div:Qt,dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},scale:Jt,normalize:te,distance:Wt,dist:Wt,distanceSquare:Gt,distSquare:Gt,negate:ee,lerp:ie,applyTransform:ne,min:re,max:ae};function se(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}function le(t,e){return{target:t,topTarget:e&&e.topTarget}}se.prototype={constructor:se,_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(le(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(le(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(le(s,t),"dragleave",t.event),o&&o!==s&&this.dispatchToElement(le(o,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(le(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(le(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};var ue=se,he=Array.prototype.slice,ce=function(t){this._$handlers={},this._$eventProcessor=t};function de(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}ce.prototype={constructor:ce,one:function(t,e,i,n){return de(this,t,e,i,n,!0)},on:function(t,e,i,n){return de(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=he.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=he.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 fe=ce,pe=Math.log(2);function ge(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)/pe);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]*ge(t,e-1,h,u,r|p,a),f++)}return a[o]=c,c}var me=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=ge(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)*ge(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}}},ve={buildTransformer:me}.buildTransformer,ye="___zrEVENTSAVED",_e=[];function xe(t,e,i,n,r){if(e.getBoundingClientRect&&J.domSupported&&!be(e)){var a=e[ye]||(e[ye]={}),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?ve(l,s):ve(s,l))}(o,a,r);if(s)return s(t,i,n),!0}return!1}function be(t){return"CANVAS"===t.nodeName.toUpperCase()}var we=function(t,e,i,n,r){return xe(_e,e,n,r,!0)&&xe(t,i,_e[0],_e[1])},Se={transformLocalCoord:we,transformCoordWithViewport:xe,isCanvasEl:be},Te=fe,Me=Se.isCanvasEl,Ce=Se.transformCoordWithViewport,Ie="undefined"!=typeof window&&!!window.addEventListener,Ae=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,De=[];function ke(t,e,i,n){return i=i||{},n||!J.canvasSupported?Oe(t,e,i):J.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):Oe(t,e,i),i}function Oe(t,e,i){if(J.domSupported&&t.getBoundingClientRect){var n=e.clientX,r=e.clientY;if(Me(t)){var a=t.getBoundingClientRect();return i.zrX=n-a.left,void(i.zrY=r-a.top)}if(Ce(De,t,n,r))return i.zrX=De[0],void(i.zrY=De[1])}i.zrX=i.zrY=0}function Pe(t){return t||window.event}var Le={Dispatcher:Te,clientToLocal:ke,getNativeEvent:Pe,normalizeEvent:function(t,e,i){if(null!=(e=Pe(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&&ke(t,r,e,i)}else ke(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&&Ae.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e},addEventListener:function(t,e,i,n){Ie?t.addEventListener(e,i,n):t.attachEvent("on"+e,i)},removeEventListener:function(t,e,i,n){Ie?t.removeEventListener(e,i,n):t.detachEvent("on"+e,i)},stop:Ie?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}},Re=function(){this._track=[]};function Ee(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}Re.prototype={constructor:Re,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=Le.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 Be)if(Be.hasOwnProperty(e)){var i=Be[e](this._track,t);if(i)return i}}};var Be={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=Ee(r)/Ee(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}}}}},ze=Re,Ne="silent";function Fe(){Le.stop(this.event)}function He(){}He.prototype.dispose=function(){};var Ve=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],We=function(t,e,i,n){fe.call(this),this.storage=t,this.painter=e,this.painterRoot=n,i=i||new He,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,ue.call(this),this.setHandlerProxy(i)};function Ge(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||Ne}return!1}function Ue(t,e,i){var n=t.painter;return e<0||e>n.getWidth()||i<0||i>n.getHeight()}We.prototype={constructor:We,setHandlerProxy:function(t){this.proxy&&this.proxy.dispose(),t&&(Nt.each(Ve,(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=Ue(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:Fe}}(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=Ge(n[a],t,e))&&(!r.topTarget&&(r.topTarget=n[a]),o!==Ne)){r.target=n[a];break}}return r},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new ze);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)}}},Nt.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){We.prototype[t]=function(e){var i,n,r=e.zrX,a=e.zrY,o=Ue(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||oe.dist(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,e)}})),Nt.mixin(We,fe),Nt.mixin(We,ue);var je=We,Ye="undefined"==typeof Float32Array?Array:Float32Array;function Xe(){var t=new Ye(6);return qe(t),t}function qe(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Ze(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 $e=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},Ke=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},Qe=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},Je=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},ti=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},ei={create:Xe,identity:qe,copy:Ze,mul:$e,translate:Ke,rotate:Qe,scale:Je,invert:ti,clone:function(t){var e=Xe();return Ze(e,t),e}},ii=ei.identity,ni=5e-5;function ri(t){return t>ni||t<-5e-5}var ai=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},oi=ai.prototype;oi.transform=null,oi.needLocalTransform=function(){return ri(this.rotation)||ri(this.position[0])||ri(this.position[1])||ri(this.scale[0]-1)||ri(this.scale[1]-1)};var si=[];oi.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),n=this.transform;if(i||e){n=n||ei.create(),i?this.getLocalTransform(n):ii(n),e&&(i?ei.mul(n,t.transform,n):ei.copy(n,t.transform)),this.transform=n;var r=this.globalScaleRatio;if(null!=r&&1!==r){this.getGlobalScale(si);var a=si[0]<0?-1:1,o=si[1]<0?-1:1,s=((si[0]-a)*r+a)/si[0]||0,l=((si[1]-o)*r+o)/si[1]||0;n[0]*=s,n[1]*=s,n[2]*=l,n[3]*=l}this.invTransform=this.invTransform||ei.create(),ei.invert(this.invTransform,n)}else n&&ii(n)},oi.getLocalTransform=function(t){return ai.getLocalTransform(this,t)},oi.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)},oi.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var li=[],ui=ei.create();oi.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;ri(e-1)&&(e=Math.sqrt(e)),ri(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)}},oi.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(ei.mul(li,t.invTransform,e),e=li);var i=this.origin;i&&(i[0]||i[1])&&(ui[4]=i[0],ui[5]=i[1],ei.mul(li,e,ui),li[4]-=i[0],li[5]-=i[1],e=li),this.setLocalTransform(e)}},oi.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)},oi.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&oe.applyTransform(i,i,n),i},oi.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&oe.applyTransform(i,i,n),i},ai.getLocalTransform=function(t,e){ii(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]),ei.scale(e,e,n),r&&ei.rotate(e,e,r),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=a[0],e[5]+=a[1],e};var hi=ai,ci={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-ci.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*ci.bounceIn(2*t):.5*ci.bounceOut(2*t-1)+.5}},di=ci;function fi(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}fi.prototype={constructor:fi,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?di[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 pi=fi,gi=function(){this.head=null,this.tail=null,this._len=0},mi=gi.prototype;mi.insert=function(t){var e=new vi(t);return this.insertEntry(e),e},mi.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++},mi.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--},mi.len=function(){return this._len},mi.clear=function(){this.head=this.tail=null,this._len=0};var vi=function(t){this.value=t,this.next,this.prev},yi=function(t){this._list=new gi,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},_i=yi.prototype;_i.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 vi(e),o.key=t,i.insertEntry(o),n[t]=o}return r},_i.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},_i.clear=function(){this._list.clear(),this._map={}};var xi=yi,bi={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 wi(t){return(t=Math.round(t))<0?0:t>255?255:t}function Si(t){return t<0?0:t>1?1:t}function Ti(t){return t.length&&"%"===t.charAt(t.length-1)?wi(parseFloat(t)/100*255):wi(parseInt(t,10))}function Mi(t){return t.length&&"%"===t.charAt(t.length-1)?Si(parseFloat(t)/100):Si(parseFloat(t))}function Ci(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 Ii(t,e,i){return t+(e-t)*i}function Ai(t,e,i,n,r){return t[0]=e,t[1]=i,t[2]=n,t[3]=r,t}function Di(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var ki=new xi(20),Oi=null;function Pi(t,e){Oi&&Di(Oi,e),Oi=ki.put(t,Oi||e.slice())}function Li(t,e){if(t){e=e||[];var i=ki.get(t);if(i)return Di(e,i);var n,r=(t+="").replace(/ /g,"").toLowerCase();if(r in bi)return Di(e,bi[r]),Pi(t,e),e;if("#"===r.charAt(0))return 4===r.length?(n=parseInt(r.substr(1),16))>=0&&n<=4095?(Ai(e,(3840&n)>>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,1),Pi(t,e),e):void Ai(e,0,0,0,1):7===r.length?(n=parseInt(r.substr(1),16))>=0&&n<=16777215?(Ai(e,(16711680&n)>>16,(65280&n)>>8,255&n,1),Pi(t,e),e):void Ai(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 Ai(e,0,0,0,1);u=Mi(l.pop());case"rgb":return 3!==l.length?void Ai(e,0,0,0,1):(Ai(e,Ti(l[0]),Ti(l[1]),Ti(l[2]),u),Pi(t,e),e);case"hsla":return 4!==l.length?void Ai(e,0,0,0,1):(l[3]=Mi(l[3]),Ri(l,e),Pi(t,e),e);case"hsl":return 3!==l.length?void Ai(e,0,0,0,1):(Ri(l,e),Pi(t,e),e);default:return}}Ai(e,0,0,0,1)}}function Ri(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=Mi(t[1]),r=Mi(t[2]),a=r<=.5?r*(n+1):r+n-r*n,o=2*r-a;return Ai(e=e||[],wi(255*Ci(o,a,i+1/3)),wi(255*Ci(o,a,i)),wi(255*Ci(o,a,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Ei(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]=wi(Ii(o[0],s[0],l)),i[1]=wi(Ii(o[1],s[1],l)),i[2]=wi(Ii(o[2],s[2],l)),i[3]=Si(Ii(o[3],s[3],l)),i}}function Bi(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=Li(e[r]),s=Li(e[a]),l=n-r,u=zi([wi(Ii(o[0],s[0],l)),wi(Ii(o[1],s[1],l)),wi(Ii(o[2],s[2],l)),Si(Ii(o[3],s[3],l))],"rgba");return i?{color:u,leftIndex:r,rightIndex:a,value:n}:u}}function zi(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 Ni=function(t,e){var i=Li(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 zi(i,4===i.length?"rgba":"rgb")}},Fi=function(t){var e=Li(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)},Hi=function(t,e,i,n){if(t=Li(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]=Mi(i)),null!=n&&(t[2]=Mi(n)),zi(Ri(t),"rgba")},Vi=function(t,e){if((t=Li(t))&&null!=e)return t[3]=Si(e),zi(t,"rgba")},Wi={parse:Li,lift:Ni,toHex:Fi,fastLerp:Ei,fastMapToColor:Ei,lerp:Bi,mapToColor:Bi,modifyHSL:Hi,modifyAlpha:Vi,stringify:zi},Gi=Nt.isArrayLike,Ui=Array.prototype.slice;function ji(t,e){return t[e]}function Yi(t,e,i){t[e]=i}function Xi(t,e,i){return(e-t)*i+t}function qi(t,e,i){return i>.5?e:t}function Zi(t,e,i,n,r){var a=t.length;if(1===r)for(var o=0;o<a;o++)n[o]=Xi(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]=Xi(t[o][l],e[o][l],i)}}function $i(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]:Ui.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 Ki(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 Qi(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]=Ji(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]=Ji(t[h][d],e[h][d],i[h][d],n[h][d],r,a,o)}}function Ji(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 tn(t){if(Gi(t)){var e=t.length;if(Gi(t[0])){for(var i=[],n=0;n<e;n++)i.push(Ui.call(t[n]));return i}return Ui.call(t)}return t}function en(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function nn(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=Gi(c),f=!1,p=!1,g=d?function(t){var e=t[t.length-1].value;return Gi(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&&Ki(b,y,g)||!d&&b===y||(_=!1),y=b,"string"==typeof b){var w=Wi.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?$i(v[x],S,g):!isNaN(v[x])||isNaN(S)||p||f||(v[x]=S);d&&$i(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 pi({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)Qi(M,C,I,A,T,T*T,T*T*T,o(t,r),g);else{if(f)a=Qi(M,C,I,A,T,T*T,T*T*T,O,1),a=en(O);else{if(p)return qi(C,I,T);a=Ji(M,C,I,A,T,T*T,T*T*T)}s(t,r,a)}else if(d)Zi(v[i],v[i+1],T,o(t,r),g);else{var a;if(f)Zi(v[i],v[i+1],T,O,1),a=en(O);else{if(p)return qi(v[i],v[i+1],T);a=Xi(v[i],v[i+1],T)}s(t,r,a)}},ondestroy:i});return e&&"spline"!==e&&(P.easing=e),P}}}var rn=function(t,e,i,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||ji,this._setter=n||Yi,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};rn.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:tn(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=nn(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 an=rn,on=1;"undefined"!=typeof window&&(on=Math.max(window.devicePixelRatio||1,1));var sn={debugMode:0,devicePixelRatio:on},ln=function(){},un=Nt.isString,hn=Nt.isFunction,cn=Nt.isObject,dn=Nt.isArrayLike,fn=Nt.indexOf,pn=function(){this.animators=[]};function gn(t,e,i,n,r,a,o,s){un(n)?(a=r,r=n,n=0):hn(r)?(a=r,r="linear",n=0):hn(n)?(a=n,n=0):hn(i)?(a=i,i=500):i||(i=500),t.stopAnimation(),mn(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 mn(t,e,i,n,r,a,o){var s={},l=0;for(var u in n)n.hasOwnProperty(u)&&(null!=i[u]?cn(n[u])&&!dn(n[u])?mn(t,e?e+"."+u:u,i[u],n[u],r,a,o):(o?(s[u]=i[u],vn(t,e,u,n[u])):s[u]=n[u],l++):null==n[u]||o||vn(t,e,u,n[u]));l>0&&t.animate(e,!1).when(null==r?500:r,s).delay(a||0)}function vn(t,e,i,n){if(e){var r={};r[e]={},r[e][i]=n,t.attr(r)}else t.attr(i,n)}pn.prototype={constructor:pn,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 an(i,e);return c.during((function(t){r.dirty(n)})).done((function(){h.splice(fn(h,c),1)})),h.push(c),a&&a.animation.addAnimator(c),c}ln('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){gn(this,t,e,i,n,r,a)},animateFrom:function(t,e,i,n,r,a){gn(this,t,e,i,n,r,a,!0)}};var yn=pn,_n=function(t){hi.call(this,t),fe.call(this,t),yn.call(this,t),this.id=t.id||Q()};_n.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(Nt.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)}},Nt.mixin(_n,yn),Nt.mixin(_n,hi),Nt.mixin(_n,fe);var xn,bn,wn,Sn,Tn=_n,Mn=oe.applyTransform,Cn=Math.min,In=Math.max;function An(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}An.prototype={constructor:An,union:function(t){var e=Cn(t.x,this.x),i=Cn(t.y,this.y);this.width=In(t.x+t.width,this.x+this.width)-e,this.height=In(t.y+t.height,this.y+this.height)-i,this.x=e,this.y=i},applyTransform:(xn=[],bn=[],wn=[],Sn=[],function(t){if(t){xn[0]=wn[0]=this.x,xn[1]=Sn[1]=this.y,bn[0]=Sn[0]=this.x+this.width,bn[1]=wn[1]=this.y+this.height,Mn(xn,xn,t),Mn(bn,bn,t),Mn(wn,wn,t),Mn(Sn,Sn,t),this.x=Cn(xn[0],bn[0],wn[0],Sn[0]),this.y=Cn(xn[1],bn[1],wn[1],Sn[1]);var e=In(xn[0],bn[0],wn[0],Sn[0]),i=In(xn[1],bn[1],wn[1],Sn[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=ei.create();return ei.translate(r,r,[-e.x,-e.y]),ei.scale(r,r,[i,n]),ei.translate(r,r,[t.x,t.y]),r},intersect:function(t){if(!t)return!1;t instanceof An||(t=An.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 An(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}}},An.create=function(t){return new An(t.x,t.y,t.width,t.height)};var Dn=An,kn=function(t){for(var e in t=t||{},Tn.call(this,t),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};kn.prototype={constructor:kn,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 kn&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,n=this._children,r=Nt.indexOf(n,t);return r<0||(n.splice(r,1),t.parent=null,i&&(i.delFromStorage(t),t instanceof kn&&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 kn&&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 kn&&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 kn&&i.delChildrenFromStorage(t)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(t){for(var e=null,i=new Dn(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}},Nt.inherits(kn,Tn);var On=kn,Pn=32,Ln=7;function Rn(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 En(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 Bn(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 zn(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 Nn(t,e){var i,n,r=Ln,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=zn(t[h],t,l,u,0,e);l+=d,0!==(u-=d)&&0!==(c=Bn(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=zn(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=Bn(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>=Ln||f>=Ln);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-zn(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-Bn(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>=Ln||m>=Ln);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 Fn=function(t,e,i,n){i||(i=0),n||(n=t.length);var r=n-i;if(!(r<2)){var a=0;if(r<Pn)En(t,i,n,i+(a=Rn(t,i,n,e)),e);else{var o=new Nn(t,e),s=function(t){for(var e=0;t>=Pn;)e|=1&t,t>>=1;return t+e}(r);do{if((a=Rn(t,i,n,e))<s){var l=r;l>s&&(l=s),En(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 Hn(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var Vn=function(){this._roots=[],this._displayList=[],this._displayListLen=0};Vn.prototype={constructor:Vn,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,J.canvasSupported&&Fn(i,Hn)},_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 On&&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 On&&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=Nt.indexOf(this._roots,t);r>=0&&(this.delFromStorage(t),this._roots.splice(r,1),t instanceof On&&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:Hn};var Wn=Vn,Gn={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1};var Un=function(t,e,i){return Gn.hasOwnProperty(e)?i*t.dpr:i},jn={ContextCachedBy:{NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},WILL_BE_RESTORED:9},Yn=jn.ContextCachedBy,Xn=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],qn=function(t){this.extendFrom(t,!1)};function Zn(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 $n(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)}qn.prototype={constructor:qn,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!==Yn.STYLE_BIND;t.__attrCachedBy=Yn.STYLE_BIND;for(var o=0;o<Xn.length;o++){var s=Xn[o],l=s[0];(a||n[l]!==r[l])&&(t[l]=Un(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?$n:Zn)(t,e,i),r=e.colorStops,a=0;a<r.length;a++)n.addColorStop(r[a].offset,r[a].color);return n}};for(var Kn=qn.prototype,Qn=0;Qn<Xn.length;Qn++){var Jn=Xn[Qn];Jn[0]in Kn||(Kn[Jn[0]]=Jn[1])}qn.getGradient=Kn.getGradient;var tr=qn,er=function(t,e){this.image=t,this.repeat=e,this.type="pattern"};er.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")};var ir=er,nr=sn.devicePixelRatio;function rr(){return!1}function ar(t,e,i){var n=Nt.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 or=function(t,e,i){var n;i=i||nr,"string"==typeof t?n=ar(t,e,i):Nt.isObject(t)&&(t=(n=t).id),this.id=t,this.dom=n;var r=n.style;r&&(n.onselectstart=rr,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};or.prototype={constructor:or,__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=ar("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||tr.getGradient(r,e,{x:0,y:0,width:a,height:o}),e.__canvasGradient=i):e.image&&(i=ir.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 sr=or,lr="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)},ur=new xi(50);function hr(){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 cr(t){return t&&t.width&&t.height}var dr=function(t,e,i,n,r){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!i)return e;var a=ur.get(t),o={hostEl:i,cb:n,cbPayload:r};return a?!cr(e=a.image)&&a.pending.push(o):((e=new Image).onload=e.onerror=hr,ur.put(t,e.__cachedImgObj={image:e,pending:[o]}),e.src=e.__zrImageSrc=t),e}return t}return e},fr={findExistImage:function(t){if("string"==typeof t){var e=ur.get(t);return e&&e.image}return t},createOrUpdateImage:dr,isImageReady:cr},pr=Nt.getContext,gr=Nt.extend,mr=Nt.retrieve2,vr=Nt.retrieve3,yr=Nt.trim,_r={},xr=0,br=5e3,wr=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,Sr="12px sans-serif",Tr={};function Mr(t,e){var i=t+":"+(e=e||Sr);if(_r[i])return _r[i];for(var n=(t+"").split("\n"),r=0,a=0,o=n.length;a<o;a++)r=Math.max(Rr(n[a],e).width,r);return xr>br&&(xr=0,_r={}),xr++,_r[i]=r,r}function Cr(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function Ir(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function Ar(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 Dr(t,e,i,n,r){if(!e)return"";var a=(t+"").split("\n");r=kr(e,i,n,r);for(var o=0,s=a.length;o<s;o++)a[o]=Or(a[o],r);return a.join("\n")}function kr(t,e,i,n){(n=gr({},n)).font=e;i=mr(i,"...");n.maxIterations=mr(n.maxIterations,2);var r=n.minChar=mr(n.minChar,0);n.cnCharWidth=Mr("国",e);var a=n.ascCharWidth=Mr("a",e);n.placeholder=mr(n.placeholder,"");for(var o=t=Math.max(0,t-1),s=0;s<r&&o>=a;s++)o-=a;var l=Mr(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 Or(t,e){var i=e.containerWidth,n=e.font,r=e.contentWidth;if(!i)return"";var a=Mr(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?Pr(t,r,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*r/a):0;a=Mr(t=t.substr(0,s),n)}return""===t&&(t=e.placeholder),t}function Pr(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 Lr(t){return Mr("国",t)}function Rr(t,e){return Tr.measureText(t,e)}function Er(t,e,i,n,r){null!=t&&(t+="");var a=mr(n,Lr(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=kr(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]=Or(o[f],d)}return{lines:o,height:s,outerHeight:l,lineHeight:a,canCacheByTextString:u}}function Br(t,e){var i={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return i;for(var n,r=wr.lastIndex=0;null!=(n=wr.exec(t));){var a=n.index;a>r&&zr(i,t.substring(r,a)),zr(i,n[2],n[1]),r=wr.lastIndex}r<t.length&&zr(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=mr(_.textHeight,Lr(b));if(x&&(w+=x[0]+x[2]),D.height=w,D.lineHeight=vr(_.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=Mr(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=fr.findExistImage(C),fr.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=Dr(D.text,A-I,b,c.ellipsis,{minChar:c.minChar}),D.textWidth=Mr(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=mr(e.textWidth,l),i.outerHeight=i.height=mr(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 zr(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)}}}Tr.measureText=function(t,e){var i=pr();return i.font=e||Sr,i.measureText(t)};var Nr=function(t,e){Tr[t]=e},Fr=function(t,e,i,n,r,a,o,s){return o?function(t,e,i,n,r,a,o,s){var l=Br(t,{rich:o,truncate:s,font:e,textAlign:i,textPadding:r,textLineHeight:a}),u=l.outerWidth,h=l.outerHeight,c=Cr(0,u,i),d=Ir(0,h,n);return new Dn(c,d,u,h)}(t,e,i,n,r,a,o,s):function(t,e,i,n,r,a,o){var s=Er(t,e,r,a,o),l=Mr(t,e);r&&(l+=r[1]+r[3]);var u=s.outerHeight,h=Cr(0,l,i),c=Ir(0,u,n),d=new Dn(h,c,l,u);return d.lineHeight=s.lineHeight,d}(t,e,i,n,r,a,s)},Hr=function(t,e,i){return Ar({},{textPosition:t,textDistance:i},e)},Vr=function(t){var e=(t.fontSize||t.fontFamily)&&[t.fontStyle,t.fontWeight,(t.fontSize||12)+"px",t.fontFamily||"sans-serif"].join(" ");return e&&yr(e)||t.textFont||t.font},Wr={DEFAULT_FONT:Sr,$override:Nr,getWidth:Mr,getBoundingRect:Fr,adjustTextX:Cr,adjustTextY:Ir,calculateTextPosition:Ar,adjustTextPositionOnRect:Hr,truncateText:Dr,getLineHeight:Lr,measureText:Rr,parsePlainText:Er,parseRichText:Br,makeFont:Vr};var Gr={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)}},Ur=Nt.retrieve2,jr=Nt.retrieve3,Yr=Nt.each,Xr=Nt.normalizeCssArray,qr=Nt.isString,Zr=Nt.isObject,$r=jn.ContextCachedBy,Kr=jn.WILL_BE_RESTORED,Qr=Wr.DEFAULT_FONT,Jr={left:1,right:1,center:1},ta={top:1,bottom:1,middle:1},ea=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],ia={},na={};function ra(t){if(t){t.font=Wr.makeFont(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||Jr[e]?e:"left";var i=t.textVerticalAlign||t.textBaseline;"center"===i&&(i="middle"),t.textVerticalAlign=null==i||ta[i]?i:"top",t.textPadding&&(t.textPadding=Xr(t.textPadding))}}function aa(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 oa(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&&sa(l)&&la(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=ga(o,s,c),h-=i.height/2-c[2]-i.textHeight/2),ca(e,"shadowBlur",jr(l.textShadowBlur,n.textShadowBlur,0)),ca(e,"shadowColor",l.textShadowColor||n.textShadowColor||"transparent"),ca(e,"shadowOffsetX",jr(l.textShadowOffsetX,n.textShadowOffsetX,0)),ca(e,"shadowOffsetY",jr(l.textShadowOffsetY,n.textShadowOffsetY,0)),ca(e,"textAlign",s),ca(e,"textBaseline","middle"),ca(e,"font",i.font||Qr);var d=da(l.textStroke||n.textStroke,p),f=fa(l.textFill||n.textFill),p=Ur(l.textStrokeWidth,n.textStrokeWidth);d&&(ca(e,"lineWidth",p),ca(e,"strokeStyle",d),e.strokeText(i.text,o,h)),f&&(ca(e,"fillStyle",f),e.fillText(i.text,o,h))}function sa(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function la(t,e,i,n,r,a,o){var s=i.textBackgroundColor,l=i.textBorderWidth,u=i.textBorderColor,h=qr(s);if(ca(e,"shadowBlur",i.textBoxShadowBlur||0),ca(e,"shadowColor",i.textBoxShadowColor||"transparent"),ca(e,"shadowOffsetX",i.textBoxShadowOffsetX||0),ca(e,"shadowOffsetY",i.textBoxShadowOffsetY||0),h||l&&u){e.beginPath();var c=i.textBorderRadius;c?Gr.buildPath(e,{x:n,y:r,width:a,height:o,r:c}):e.rect(n,r,a,o),e.closePath()}if(h)if(ca(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(Zr(s)){var f=s.image;(f=fr.createOrUpdateImage(f,null,t,ua,s))&&fr.isImageReady(f)&&e.drawImage(f,n,r,a,o)}if(l&&u)if(ca(e,"lineWidth",l),ca(e,"strokeStyle",u),null!=i.strokeOpacity){d=e.globalAlpha;e.globalAlpha=i.strokeOpacity*i.opacity,e.stroke(),e.globalAlpha=d}else e.stroke()}function ua(t,e){e.image=t}function ha(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+pa(l[0],n.width),a=n.y+pa(l[1],n.height);else{var u=e&&e.calculateTextPosition?e.calculateTextPosition(ia,i,n):Wr.calculateTextPosition(ia,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 ca(t,e,i){return t[e]=Un(t,e,i),t[e]}function da(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function fa(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function pa(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function ga(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}var ma=function(t){return ra(t),Yr(t.rich,ra),t},va=function(t,e,i,n,r,a){n.rich?function(t,e,i,n,r,a){a!==Kr&&(e.__attrCachedBy=$r.NONE);var o=t.__textCotentBlock;o&&!t.__dirtyText||(o=t.__textCotentBlock=Wr.parseRichText(i,n));!function(t,e,i,n,r){var a=i.width,o=i.outerWidth,s=i.outerHeight,l=n.textPadding,u=ha(na,t,n,r),h=u.baseX,c=u.baseY,d=u.textAlign,f=u.textVerticalAlign;aa(e,n,r,h,c);var p=Wr.adjustTextX(h,o,d),g=Wr.adjustTextY(c,s,f),m=p,v=g;l&&(m+=l[3],v+=l[0]);var y=m+a;sa(n)&&la(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);)oa(t,e,x,n,T,v,I,"left"),M-=x.width,I+=x.width,C++;for(;D>=0&&"right"===(x=w[D]).textAlign;)oa(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;)oa(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=sa(n),l=!1,u=e.__attrCachedBy===$r.PLAIN_TEXT;a!==Kr?(a&&(o=a.style,l=!s&&u&&o),e.__attrCachedBy=s?$r.NONE:$r.PLAIN_TEXT):u&&(e.__attrCachedBy=$r.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=Wr.parsePlainText(i,c,d,f,n.truncate));var g=p.outerHeight,m=p.lines,v=p.lineHeight,y=ha(na,t,n,r),_=y.baseX,x=y.baseY,b=y.textAlign||"left",w=y.textVerticalAlign;aa(e,n,r,_,x);var S=Wr.adjustTextY(x,g,w),T=_,M=S;if(s||d){var C=Wr.getWidth(i,c);d&&(C+=d[1]+d[3]);var I=Wr.adjustTextX(_,C,b);s&&la(t,e,n,I,S,C,g),d&&(T=ga(_,b,d),M+=d[0])}e.textAlign=b,e.textBaseline="middle",e.globalAlpha=n.opacity||1;for(var A=0;A<ea.length;A++){var D=ea[A],k=D[0],O=D[1],P=n[k];l&&P===o[k]||(e[O]=Un(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=da(n.textStroke,L),N=fa(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)},ya=function(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)},_a={normalizeTextStyle:ma,renderText:va,getBoxPosition:ha,getStroke:da,getFill:fa,parsePercent:pa,needDrawText:ya},xa=jn.WILL_BE_RESTORED,ba=new Dn,wa=function(){};wa.prototype={constructor:wa,drawRectText:function(t,e){var i=this.style;e=i.textRect||e,this.__dirty&&_a.normalizeTextStyle(i,!0);var n=i.text;if(null!=n&&(n+=""),_a.needDrawText(n,i)){t.save();var r=this.transform;i.transformText?this.setTransform(t):r&&(ba.copy(e),ba.applyTransform(r),e=ba),_a.renderText(this,t,n,i,e,xa),t.restore()}}};var Sa=wa;function Ta(t){for(var e in t=t||{},Tn.call(this,t),t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new tr(t.style),this._rect=null,this.__clipPaths=null}Ta.prototype={constructor:Ta,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,globalScaleRatio:1,beforeBrush:function(t){},afterBrush:function(t){},brush:function(t,e){},getBoundingRect:function(){},contain:function(t,e){return this.rectContain(t,e)},traverse:function(t,e){t.call(e,this)},rectContain:function(t,e){var 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?Tn.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 tr(t),this.dirty(!1),this},calculateTextPosition:null},Nt.inherits(Ta,Tn),Nt.mixin(Ta,Sa);var Ma=Ta;function Ca(t){Ma.call(this,t)}Ca.prototype={constructor:Ca,type:"image",brush:function(t,e){var i=this.style,n=i.image;i.bind(t,this,e);var r=this._image=fr.createOrUpdateImage(n,this._image,this,this.onload);if(r&&fr.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 Dn(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},Nt.inherits(Ca,Ma);var Ia=Ca,Aa=sn.devicePixelRatio,Da=1e5,ka=314159,Oa=.01;function Pa(t){return parseInt(t,10)}var La=new Dn(0,0,0,0),Ra=new Dn(0,0,0,0);var Ea=function(t,e,i){this.type="canvas";var n=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=i=Nt.extend({},i||{}),this.dpr=i.devicePixelRatio||Aa,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 sr(t,this,this.dpr);u.__builtin__=!0,u.initContext(),o[314159]=u,u.zlevel=ka,a.push(ka),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=[]};Ea.prototype={constructor:Ea,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=Nt.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){Fn(t,this.storage.displayableSortFunc),i||(i=this._hoverlayer=this.getLayer(Da));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(Da)},_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;lr((function(){r._paintList(t,e,i)}))}}},_compositeManually:function(){var t=this.getLayer(ka).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 J.wxa&&Nt.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 La.copy(t.getBoundingRect()),t.transform&&La.applyTransform(t.transform),Ra.width=e,Ra.height=i,!La.intersect(Ra)}(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=ka);var i=this._layers[t];return i||((i=new sr("zr_"+t,this,this.dpr)).zlevel=t,i.__builtin__=!0,this._layerConfig[t]?Nt.merge(i,this._layerConfig[t],!0):this._layerConfig[t-Oa]&&Nt.merge(i,this._layerConfig[t-Oa],!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?Oa:0),this._needsManuallyCompositing),s.__builtin__||ln("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]?Nt.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+Oa){var a=this._layers[r];Nt.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(Nt.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);Nt.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(ka).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 sr("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]||Pa(s[i])||Pa(o.style[i]))-(Pa(s[r])||0)-(Pa(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 Ia({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 Ba=Ea,za=Le.Dispatcher,Na=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,za.call(this)};Na.prototype={constructor:Na,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=Nt.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,lr((function e(){t._running&&(lr(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 an(t,(e=e||{}).loop,e.getter,e.setter);return this.addAnimator(i),i}},Nt.mixin(Na,za);var Fa,Ha,Va=Na,Wa=Le.addEventListener,Ga=Le.removeEventListener,Ua=Le.normalizeEvent,ja=Le.getNativeEvent,Ya=J.domSupported,Xa=(Ha={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:Fa=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:Nt.map(Fa,(function(t){var e=t.replace("mouse","pointer");return Ha.hasOwnProperty(e)?e:t}))}),qa={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]};function Za(t){return"mousewheel"===t&&J.browser.firefox?"DOMMouseScroll":t}function $a(t){var e=t.pointerType;return"pen"===e||"touch"===e}function Ka(t){t&&(t.zrByTouch=!0)}function Qa(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 Ja(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 to=Ja.prototype;to.stopPropagation=to.stopImmediatePropagation=to.preventDefault=Nt.noop;var eo={mousedown:function(t){t=Ua(this.dom,t),this._mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=Ua(this.dom,t);var e=this._mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||so(this,!0),this.trigger("mousemove",t)},mouseup:function(t){t=Ua(this.dom,t),so(this,!1),this.trigger("mouseup",t)},mouseout:function(t){t=Ua(this.dom,t),this._pointerCapturing&&(t.zrEventControl="no_globalout");var e=t.toElement||t.relatedTarget;t.zrIsToLocalDOM=Qa(this,e),this.trigger("mouseout",t)},touchstart:function(t){Ka(t=Ua(this.dom,t)),this._lastTouchMoment=new Date,this.handler.processGesture(t,"start"),eo.mousemove.call(this,t),eo.mousedown.call(this,t)},touchmove:function(t){Ka(t=Ua(this.dom,t)),this.handler.processGesture(t,"change"),eo.mousemove.call(this,t)},touchend:function(t){Ka(t=Ua(this.dom,t)),this.handler.processGesture(t,"end"),eo.mouseup.call(this,t),+new Date-this._lastTouchMoment<300&&eo.click.call(this,t)},pointerdown:function(t){eo.mousedown.call(this,t)},pointermove:function(t){$a(t)||eo.mousemove.call(this,t)},pointerup:function(t){eo.mouseup.call(this,t)},pointerout:function(t){$a(t)||eo.mouseout.call(this,t)}};Nt.each(["click","mousewheel","dblclick","contextmenu"],(function(t){eo[t]=function(e){e=Ua(this.dom,e),this.trigger(t,e)}}));var io={pointermove:function(t){$a(t)||io.mousemove.call(this,t)},pointerup:function(t){io.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this._pointerCapturing;so(this,!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function no(t,e){var i=e.domHandlers;J.pointerEventsSupported?Nt.each(Xa.pointer,(function(n){ao(e,n,(function(e){i[n].call(t,e)}))})):(J.touchEventsSupported&&Nt.each(Xa.touch,(function(n){ao(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)}))})),Nt.each(Xa.mouse,(function(n){ao(e,n,(function(r){r=ja(r),e.touching||i[n].call(t,r)}))})))}function ro(t,e){function i(i){ao(e,i,(function(n){n=ja(n),Qa(t,n.target)||(n=function(t,e){return Ua(t.dom,new Ja(t,e),!0)}(t,n),e.domHandlers[i].call(t,n))}),{capture:!0})}J.pointerEventsSupported?Nt.each(qa.pointer,i):J.touchEventsSupported||Nt.each(qa.mouse,i)}function ao(t,e,i,n){t.mounted[e]=i,t.listenerOpts[e]=n,Wa(t.domTarget,Za(e),i,n)}function oo(t){var e=t.mounted;for(var i in e)e.hasOwnProperty(i)&&Ga(t.domTarget,Za(i),e[i],t.listenerOpts[i]);t.mounted={}}function so(t,e){if(t._mayPointerCapture=null,Ya&&t._pointerCapturing^e){t._pointerCapturing=e;var i=t._globalHandlerScope;e?ro(t,i):oo(i)}}function lo(t,e){this.domTarget=t,this.domHandlers=e,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function uo(t,e){fe.call(this),this.dom=t,this.painterRoot=e,this._localHandlerScope=new lo(t,eo),Ya&&(this._globalHandlerScope=new lo(document,io)),this._pointerCapturing=!1,this._mayPointerCapture=null,no(this,this._localHandlerScope)}var ho=uo.prototype;ho.dispose=function(){oo(this._localHandlerScope),Ya&&oo(this._globalHandlerScope)},ho.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},Nt.mixin(uo,fe);var co=uo,fo=!J.canvasSupported,po={canvas:Ba},go={};var mo=function(t,e,i){i=i||{},this.dom=e,this.id=t;var n=this,r=new Wn,a=i.renderer;if(fo){if(!po.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");a="vml"}else a&&po[a]||(a="canvas");var o=new po[a](e,r,i,t);this.storage=r,this.painter=o;var s=J.node||J.worker?null:new co(o.getViewportRoot(),o.root);this.handler=new je(r,o,s,o.root),this.animation=new Va({stage:{update:Nt.bind(this.flush,this)}}),this.animation.start(),this._needsRefresh;var l=r.delFromStorage,u=r.addToStorage;r.delFromStorage=function(t){l.call(r,t),t&&t.removeSelfFromZr(n)},r.addToStorage=function(t){u.call(r,t),t.addSelfToZr(n)}};mo.prototype={constructor:mo,getId:function(){return this.id},add:function(t){this.storage.addRoot(t),this._needsRefresh=!0},remove:function(t){this.storage.delRoot(t),this._needsRefresh=!0},configLayer:function(t,e){this.painter.configLayer&&this.painter.configLayer(t,e),this._needsRefresh=!0},setBackgroundColor:function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh(),this._needsRefresh=this._needsRefreshHover=!1},refresh:function(){this._needsRefresh=!0},flush:function(){var t;this._needsRefresh&&(t=!0,this.refreshImmediately()),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately()),t&&this.trigger("rendered")},addHover:function(t,e){if(this.painter.addHover){var i=this.painter.addHover(t,e);return this.refreshHover(),i}},removeHover:function(t){this.painter.removeHover&&(this.painter.removeHover(t),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},resize:function(t){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 go[t]}};var vo=function(t,e){var i=new mo(Q(),t,e);return go[i.id]=i,i},yo={version:"4.3.1",init:vo,dispose:function(t){if(t)t.dispose();else{for(var e in go)go.hasOwnProperty(e)&&go[e].dispose();go={}}return this},getInstance:function(t){return go[t]},registerPainter:function(t,e){po[t]=e}},_o=Nt.each,xo=Nt.isObject,bo=Nt.isArray,wo="series\0";function So(t){return t instanceof Array?t:null==t?[]:[t]}function To(t){return xo(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}var Mo=0;function Co(t,e){return t&&t.hasOwnProperty(e)}var Io=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])}}},Ao=function(t,e){e=(e||[]).slice();var i=Nt.map(t||[],(function(t,e){return{exist:t}}));return _o(e,(function(t,n){if(xo(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||To(t)||To(a)||a.name!==t.name+""))return i[r].option=t,void(e[n]=null)}}})),_o(e,(function(t,e){if(xo(t)){for(var n=0;n<i.length;n++){var r=i[n].exist;if(!i[n].option&&!To(r)&&null==t.id){i[n].option=t;break}}n>=i.length&&i.push({option:t})}})),i},Do=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=So(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}},ko=function(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?Nt.isArray(e.dataIndex)?Nt.map(e.dataIndex,(function(e){return t.indexOfRawIndex(e)})):t.indexOfRawIndex(e.dataIndex):null!=e.name?Nt.isArray(e.name)?Nt.map(e.name,(function(e){return t.indexOfName(e)})):t.indexOfName(e.name):void 0},Oo=function(t,e,i){t.setAttribute?t.setAttribute(e,i):t[e]=i},Po=function(t,e){return t.getAttribute?t.getAttribute(e):t[e]},Lo={normalizeToArray:So,defaultEmphasis:Io,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!xo(t)||bo(t)||t instanceof Date?t:t.value},isDataItemOption:function(t){return xo(t)&&!(t instanceof Array)},mappingToExists:Ao,makeIdAndName:function(t){var e=Nt.createHashMap();_o(t,(function(t,i){var n=t.exist;n&&e.set(n.id,t)})),_o(t,(function(t,i){var n=t.option;Nt.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={})})),_o(t,(function(t,i){var n=t.exist,r=t.option,a=t.keyInfo;if(xo(r)){if(a.name=null!=r.name?r.name+"":n?n.name:wo+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(wo))},isIdInner:To,compressBatches:Do,queryDataIndex:ko,makeInner:function(){var t="__\0ec_inner_"+Mo+++"_"+Math.random().toFixed(5);return function(e){return e[t]||(e[t]={})}},parseFinder:function(t,e,i){if(Nt.isString(e)){var n={};n[e+"Index"]=0,e=n}var r=i&&i.defaultMainType;!r||Co(e,r+"Index")||Co(e,r+"Id")||Co(e,r+"Name")||(e[r+"Index"]=0);var a={};return _o(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&&Nt.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:Oo,getAttribute:Po,getTooltipRenderMode:function(t){return"auto"===t?J.domSupported?"html":"richText":t||"html"},groupData:function(t,e){var i=Nt.createHashMap(),n=[];return Nt.each(t,(function(t){var r=e(t);(i.get(r)||(n.push(r),i.set(r,[]))).push(t)})),{keys:n,buckets:i}}},Ro=".",Eo="___EC__COMPONENT__CONTAINER___";function Bo(t){var e={main:"",sub:""};return t&&(t=t.split(Ro),e.main=t[0]||"",e.sub=t[1]||""),e}var zo=0;function No(t,e){var i=Nt.slice(arguments,2);return this.superClass.prototype[e].apply(t,i)}function Fo(t,e,i){return this.superClass.prototype[e].apply(t,i)}var Ho=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 Nt.extend(i.prototype,t),i.extend=this.extend,i.superCall=No,i.superApply=Fo,Nt.inherits(i,this),i.superClass=e,i}},Vo=function(t,e){e=e||{};var i={};if(t.registerClass=function(t,e){if(e)if(function(t){Nt.assert(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}(e),(e=Bo(e)).sub){if(e.sub!==Eo){var n=function(t){var e=i[t.main];e&&e[Eo]||((e=i[t.main]={})[Eo]=!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[Eo]&&(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=Bo(t);var e=[],n=i[t.main];return n&&n[Eo]?Nt.each(n,(function(t,i){i!==Eo&&e.push(t)})):e.push(n),e},t.hasClass=function(t){return t=Bo(t),!!i[t.main]},t.getAllClassMainTypes=function(){var t=[];return Nt.each(i,(function(e,i){t.push(i)})),t},t.hasSubTypes=function(t){t=Bo(t);var e=i[t.main];return e&&e[Eo]},t.parseClassType=Bo,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},Wo={parseClassType:Bo,enableClassExtend:Ho,enableClassCheck:function(t){var e=["__\0is_clz",zo++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}},enableClassManagement:Vo,setReadOnly:function(t,e){}};var Go=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&&Nt.indexOf(i,o)>=0||n&&Nt.indexOf(n,o)<0)){var s=e.getShallow(o);null!=s&&(r[t[a][0]]=s)}}return r}},Uo=Go([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),jo={getLineStyle:function(t){var e=Uo(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])}},Yo=jo,Xo=Go([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),qo={getAreaStyle:function(t,e){return Xo(this,t,e)}},Zo=oe.create,$o=oe.distSquare,Ko=Math.pow,Qo=Math.sqrt,Jo=1e-8,ts=1e-4,es=Qo(3),is=1/3,ns=Zo(),rs=Zo(),as=Zo();function os(t){return t>-Jo&&t<Jo}function ss(t){return t>Jo||t<-Jo}function ls(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 us(t,e,i,n){var r=1-n;return r*(r*t+2*n*e)+n*n*i}var hs=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(os(h)&&os(c)){if(os(s))a[0]=0;else(T=-l/s)>=0&&T<=1&&(a[f++]=T)}else{var p=c*c-4*h*d;if(os(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?-Ko(-y,is):Ko(y,is))+(_=_<0?-Ko(-_,is):Ko(_,is))))/(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+es*Math.sin(b)))/(3*o),(-s+w*(S-es*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},cs=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(os(o)){if(ss(a))(h=-s/a)>=0&&h<=1&&(r[l++]=h)}else{var u=a*a-4*o*s;if(os(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},ds=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},fs=function(t,e,i,n,r,a,o,s,l,u,h){var c,d,f,p,g,m=.005,v=1/0;ns[0]=l,ns[1]=u;for(var y=0;y<1;y+=.05)rs[0]=ls(t,i,r,o,y),rs[1]=ls(e,n,a,s,y),(p=$o(ns,rs))<v&&(c=y,v=p);v=1/0;for(var _=0;_<32&&!(m<ts);_++)d=c-m,f=c+m,rs[0]=ls(t,i,r,o,d),rs[1]=ls(e,n,a,s,d),p=$o(rs,ns),d>=0&&p<v?(c=d,v=p):(as[0]=ls(t,i,r,o,f),as[1]=ls(e,n,a,s,f),g=$o(as,ns),f<=1&&g<v?(c=f,v=g):m*=.5);return h&&(h[0]=ls(t,i,r,o,c),h[1]=ls(e,n,a,s,c)),Qo(v)},ps=function(t,e,i,n,r){var a=t-2*e+i,o=2*(e-t),s=t-n,l=0;if(os(a)){if(ss(o))(h=-s/o)>=0&&h<=1&&(r[l++]=h)}else{var u=o*o-4*a*s;if(os(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},gs=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},ms=function(t,e,i,n,r,a,o,s,l){var u,h=.005,c=1/0;ns[0]=o,ns[1]=s;for(var d=0;d<1;d+=.05){rs[0]=us(t,i,r,d),rs[1]=us(e,n,a,d),(m=$o(ns,rs))<c&&(u=d,c=m)}c=1/0;for(var f=0;f<32&&!(h<ts);f++){var p=u-h,g=u+h;rs[0]=us(t,i,r,p),rs[1]=us(e,n,a,p);var m=$o(rs,ns);if(p>=0&&m<c)u=p,c=m;else{as[0]=us(t,i,r,g),as[1]=us(e,n,a,g);var v=$o(as,ns);g<=1&&v<c?(u=g,c=v):h*=.5}}return l&&(l[0]=us(t,i,r,u),l[1]=us(e,n,a,u)),Qo(c)},vs={cubicAt:ls,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:hs,cubicExtrema:cs,cubicSubdivide:ds,cubicProjectPoint:fs,quadraticAt:us,quadraticDerivativeAt:function(t,e,i,n){return 2*((1-n)*(e-t)+n*(i-e))},quadraticRootAt:ps,quadraticExtremum:function(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n},quadraticSubdivide:gs,quadraticProjectPoint:ms},ys=Math.min,_s=Math.max,xs=Math.sin,bs=Math.cos,ws=2*Math.PI,Ss=oe.create(),Ts=oe.create(),Ms=oe.create();var Cs=[],Is=[];var As=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=ys(a,r[0]),o=_s(o,r[0]),s=ys(s,r[1]),l=_s(l,r[1]);e[0]=a,e[1]=s,i[0]=o,i[1]=l}},Ds=function(t,e,i,n,r,a){r[0]=ys(t,i),r[1]=ys(e,n),a[0]=_s(t,i),a[1]=_s(e,n)},ks=function(t,e,i,n,r,a,o,s,l,u){var h,c=vs.cubicExtrema,d=vs.cubicAt,f=c(t,i,r,o,Cs);for(l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0,h=0;h<f;h++){var p=d(t,i,r,o,Cs[h]);l[0]=ys(p,l[0]),u[0]=_s(p,u[0])}for(f=c(e,n,a,s,Is),h=0;h<f;h++){var g=d(e,n,a,s,Is[h]);l[1]=ys(g,l[1]),u[1]=_s(g,u[1])}l[0]=ys(t,l[0]),u[0]=_s(t,u[0]),l[0]=ys(o,l[0]),u[0]=_s(o,u[0]),l[1]=ys(e,l[1]),u[1]=_s(e,u[1]),l[1]=ys(s,l[1]),u[1]=_s(s,u[1])},Os=function(t,e,i,n,r,a,o,s){var l=vs.quadraticExtremum,u=vs.quadraticAt,h=_s(ys(l(t,i,r),1),0),c=_s(ys(l(e,n,a),1),0),d=u(t,i,r,h),f=u(e,n,a,c);o[0]=ys(t,r,d),o[1]=ys(e,a,f),s[0]=_s(t,r,d),s[1]=_s(e,a,f)},Ps=function(t,e,i,n,r,a,o,s,l){var u=oe.min,h=oe.max,c=Math.abs(r-a);if(c%ws<1e-4&&c>1e-4)return s[0]=t-i,s[1]=e-n,l[0]=t+i,void(l[1]=e+n);if(Ss[0]=bs(r)*i+t,Ss[1]=xs(r)*n+e,Ts[0]=bs(a)*i+t,Ts[1]=xs(a)*n+e,u(s,Ss,Ts),h(l,Ss,Ts),(r%=ws)<0&&(r+=ws),(a%=ws)<0&&(a+=ws),r>a&&!o?a+=ws:r<a&&o&&(r+=ws),o){var d=a;a=r,r=d}for(var f=0;f<a;f+=Math.PI/2)f>r&&(Ms[0]=bs(f)*i+t,Ms[1]=xs(f)*n+e,u(s,Ms,s),h(l,Ms,l))},Ls={fromPoints:As,fromLine:Ds,fromCubic:ks,fromQuadratic:Os,fromArc:Ps},Rs=sn.devicePixelRatio,Es={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Bs=[],zs=[],Ns=[],Fs=[],Hs=Math.min,Vs=Math.max,Ws=Math.cos,Gs=Math.sin,Us=Math.sqrt,js=Math.abs,Ys="undefined"!=typeof Float32Array,Xs=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};Xs.prototype={constructor:Xs,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e,i){i=i||0,this._ux=js(i/Rs/t)||0,this._uy=js(i/Rs/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(Es.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=js(t-this._xi)>this._ux||js(e-this._yi)>this._uy||this._len<5;return this.addData(Es.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(Es.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(Es.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(Es.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=Ws(r)*i+t,this._yi=Gs(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(Es.R,t,e,i,n),this},closePath:function(){this.addData(Es.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||!Ys||(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();Ys&&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=Us(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?Hs(f,t):Vs(f,t),c>=0?Hs(p,e):Vs(p,e));h=f-t,c=p-e,this._dashOffset=-Us(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=vs.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+=Us(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=-Us(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,Ys&&(this.data=new Float32Array(t)))},getBoundingRect:function(){Bs[0]=Bs[1]=Ns[0]=Ns[1]=Number.MAX_VALUE,zs[0]=zs[1]=Fs[0]=Fs[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 Es.M:e=n=t[a++],i=r=t[a++],Ns[0]=n,Ns[1]=r,Fs[0]=n,Fs[1]=r;break;case Es.L:Ls.fromLine(e,i,t[a],t[a+1],Ns,Fs),e=t[a++],i=t[a++];break;case Es.C:Ls.fromCubic(e,i,t[a++],t[a++],t[a++],t[a++],t[a],t[a+1],Ns,Fs),e=t[a++],i=t[a++];break;case Es.Q:Ls.fromQuadratic(e,i,t[a++],t[a++],t[a],t[a+1],Ns,Fs),e=t[a++],i=t[a++];break;case Es.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=Ws(c)*u+s,r=Gs(c)*h+l),Ls.fromArc(s,l,u,h,c,d,f,Ns,Fs),e=Ws(d)*u+s,i=Gs(d)*h+l;break;case Es.R:n=e=t[a++],r=i=t[a++];var p=t[a++],g=t[a++];Ls.fromLine(n,r,n+p,r+g,Ns,Fs);break;case Es.Z:e=n,i=r}oe.min(Bs,Bs,Ns),oe.max(zs,zs,Fs)}return 0===a&&(Bs[0]=Bs[1]=zs[0]=zs[1]=0),new Dn(Bs[0],Bs[1],zs[0]-Bs[0],zs[1]-Bs[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 Es.M:e=n=s[c++],i=r=s[c++],t.moveTo(n,r);break;case Es.L:a=s[c++],o=s[c++],(js(a-n)>l||js(o-r)>u||c===h-1)&&(t.lineTo(a,o),n=a,r=o);break;case Es.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 Es.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],r=s[c-1];break;case Es.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=Ws(v)*g+f,i=Gs(v)*m+p),n=Ws(T)*g+f,r=Gs(T)*m+p;break;case Es.R:e=n=s[c],i=r=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case Es.Z:t.closePath(),n=e,r=i}}}},Xs.CMD=Es;var qs=Xs;var Zs={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 $s={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)&&vs.cubicProjectPoint(t,e,i,n,r,a,o,s,u,h,null)<=c/2}},Ks=vs.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)&&Ks(t,e,i,n,r,a,s,l,null)<=u/2}},Js=2*Math.PI;var tl={normalizeRadian:function(t){return(t%=Js)<0&&(t+=Js),t}},el=tl.normalizeRadian,il=2*Math.PI;var nl={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)%il<1e-4)return!0;if(a){var c=n;n=el(r),r=el(c)}else n=el(n),r=el(r);n>r&&(r+=il);var d=Math.atan2(l,s);return d<0&&(d+=il),d>=n&&d<=r||d+il>=n&&d+il<=r}};var rl=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},al=tl.normalizeRadian,ol=qs.CMD,sl=2*Math.PI,ll=1e-4;var ul=[-1,-1,-1],hl=[-1,-1];function cl(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=vs.cubicRootAt(e,n,a,s,u,ul);if(0===c)return 0;for(var d,f,p=0,g=-1,m=0;m<c;m++){var v=ul[m],y=0===v||1===v?.5:1;vs.cubicAt(t,i,r,o,v)<l||(g<0&&(g=vs.cubicExtrema(e,n,a,s,hl),hl[1]<hl[0]&&g>1&&(h=void 0,h=hl[0],hl[0]=hl[1],hl[1]=h),d=vs.cubicAt(e,n,a,s,hl[0]),g>1&&(f=vs.cubicAt(e,n,a,s,hl[1]))),2===g?v<hl[0]?p+=d<e?y:-y:v<hl[1]?p+=f<d?y:-y:p+=s<f?y:-y:v<hl[0]?p+=d<e?y:-y:p+=s<d?y:-y)}return p}function dl(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=vs.quadraticRootAt(e,n,a,s,ul);if(0===l)return 0;var u=vs.quadraticExtremum(e,n,a);if(u>=0&&u<=1){for(var h=0,c=vs.quadraticAt(e,n,a,u),d=0;d<l;d++){var f=0===ul[d]||1===ul[d]?.5:1;vs.quadraticAt(t,i,r,ul[d])<o||(ul[d]<u?h+=c<e?f:-f:h+=a<c?f:-f)}return h}f=0===ul[0]||1===ul[0]?.5:1;return vs.quadraticAt(t,i,r,ul[0])<o?0:a<e?f:-f}function fl(t,e,i,n,r,a,o,s){if((s-=e)>i||s<-i)return 0;var l=Math.sqrt(i*i-s*s);ul[0]=-l,ul[1]=l;var u=Math.abs(n-r);if(u<1e-4)return 0;if(u%sl<1e-4){n=0,r=sl;var h=a?1:-1;return o>=ul[0]+t&&o<=ul[1]+t?h:0}if(a){l=n;n=al(r),r=al(l)}else n=al(n),r=al(r);n>r&&(r+=sl);for(var c=0,d=0;d<2;d++){var f=ul[d];if(f+t>o){var p=Math.atan2(s,f);h=a?1:-1;p<0&&(p=sl+p),(p>=n&&p<=r||p+sl>=n&&p+sl<=r)&&(p>Math.PI/2&&p<1.5*Math.PI&&(h=-h),c+=h)}}return c}function pl(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===ol.M&&d>1&&(i||(s+=rl(l,u,h,c,n,r))),1===d&&(h=l=t[d],c=u=t[d+1]),f){case ol.M:l=h=t[d++],u=c=t[d++];break;case ol.L:if(i){if(Zs.containStroke(l,u,t[d],t[d+1],e,n,r))return!0}else s+=rl(l,u,t[d],t[d+1],n,r)||0;l=t[d++],u=t[d++];break;case ol.C:if(i){if($s.containStroke(l,u,t[d++],t[d++],t[d++],t[d++],t[d],t[d+1],e,n,r))return!0}else s+=cl(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 ol.Q:if(i){if(Qs.containStroke(l,u,t[d++],t[d++],t[d],t[d+1],e,n,r))return!0}else s+=dl(l,u,t[d++],t[d++],t[d],t[d+1],n,r)||0;l=t[d++],u=t[d++];break;case ol.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+=rl(l,u,b,w,n,r):(h=b,c=w);var S=(n-p)*v/m+p;if(i){if(nl.containStroke(p,g,v,y,y+_,x,e,S,r))return!0}else s+=fl(p,g,v,y,y+_,x,S,r);l=Math.cos(y+_)*m+p,u=Math.sin(y+_)*v+g;break;case ol.R:h=l=t[d++],c=u=t[d++];b=h+t[d++],w=c+t[d++];if(i){if(Zs.containStroke(h,c,b,c,e,n,r)||Zs.containStroke(b,c,b,w,e,n,r)||Zs.containStroke(b,w,h,w,e,n,r)||Zs.containStroke(h,w,h,c,e,n,r))return!0}else s+=rl(b,c,b,w,n,r),s+=rl(h,w,h,c,n,r);break;case ol.Z:if(i){if(Zs.containStroke(l,u,h,c,e,n,r))return!0}else s+=rl(l,u,h,c,n,r);l=h,u=c}}return i||(a=u,o=c,Math.abs(a-o)<ll)||(s+=rl(l,u,h,c,n,r)||0),0!==s}var gl={contain:function(t,e,i){return pl(t,0,!1,e,i)},containStroke:function(t,e,i,n){return pl(t,e,!0,i,n)}},ml=ir.prototype.getCanvasPattern,vl=Math.abs,yl=new qs(!0);function _l(t){Ma.call(this,t),this.path=null}_l.prototype={constructor:_l,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(t,e){var i,n=this.style,r=this.path||yl,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=ml.call(s,t)),h?t.strokeStyle=this._strokeGradient:d&&(t.strokeStyle=ml.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 qs},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;n||(n=this.path=new qs),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)),gl.containStroke(a,o/s,t,e)))return!0}if(r.hasFill())return gl.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):Ma.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(Nt.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&&vl(t[0]-1)>1e-10&&vl(t[3]-1)>1e-10?Math.sqrt(vl(t[0]*t[3]-t[2]*t[1])):1}},_l.extend=function(t){var e=function(e){_l.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 Nt.inherits(e,_l),t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},Nt.inherits(_l,Ma);var xl=_l,bl=oe.applyTransform,wl=qs.CMD,Sl=[[],[],[]],Tl=Math.sqrt,Ml=Math.atan2;var Cl=function(t,e){var i,n,r,a,o,s=t.data,l=wl.M,u=wl.C,h=wl.L,c=wl.R,d=wl.A,f=wl.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=Tl(e[0]*e[0]+e[1]*e[1]),v=Tl(e[2]*e[2]+e[3]*e[3]),y=Ml(-e[1]/v,e[0]/m);s[r]*=m,s[r++]+=p,s[r]*=v,s[r++]+=g,s[r++]*=m,s[r++]*=v,s[r++]+=y,s[r++]+=y,a=r+=2;break;case c:_[0]=s[r++],_[1]=s[r++],bl(_,_,e),s[a++]=_[0],s[a++]=_[1],_[0]+=s[r++],_[1]+=s[r++],bl(_,_,e),s[a++]=_[0],s[a++]=_[1]}for(o=0;o<n;o++){var _;(_=Sl[o])[0]=s[r++],_[1]=s[r++],bl(_,_,e),s[a++]=_[0],s[a++]=_[1]}}},Il=Math.sqrt,Al=Math.sin,Dl=Math.cos,kl=Math.PI,Ol=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},Pl=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(Ol(t)*Ol(e))},Ll=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Pl(t,e))};function Rl(t,e,i,n,r,a,o,s,l,u,h){var c=l*(kl/180),d=Dl(c)*(t-i)/2+Al(c)*(e-n)/2,f=-1*Al(c)*(t-i)/2+Dl(c)*(e-n)/2,p=d*d/(o*o)+f*f/(s*s);p>1&&(o*=Il(p),s*=Il(p));var g=(r===a?-1:1)*Il((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+Dl(c)*m-Al(c)*v,_=(e+n)/2+Al(c)*m+Dl(c)*v,x=Ll([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=Ll(b,w);Pl(b,w)<=-1&&(S=kl),Pl(b,w)>=1&&(S=0),0===a&&S>0&&(S-=2*kl),1===a&&S<0&&(S+=2*kl),h.addData(u,y,_,o,s,x,S,c,a)}var El=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Bl=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function zl(t,e){var i=function(t){if(!t)return new qs;for(var e,i=0,n=0,r=i,a=n,o=new qs,s=qs.CMD,l=t.match(El),u=0;u<l.length;u++){for(var h,c=l[u],d=c.charAt(0),f=c.match(Bl)||[],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++],Rl(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++],Rl(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){Cl(i,t),this.dirty(!0)},e}var Nl=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 xl(e);return o.createPathProxy(),o.buildPath=function(t){t.appendPath(i);var e=t.getContext();e&&t.rebuildPath(e)},o},Fl={createFromString:function(t,e){return new xl(zl(t,e))},extendFromString:function(t,e){return xl.extend(zl(t,e))},mergePath:Nl},Hl=jn.ContextCachedBy,Vl=function(t){Ma.call(this,t)};Vl.prototype={constructor:Vl,type:"text",brush:function(t,e){var i=this.style;this.__dirty&&_a.normalizeTextStyle(i,!0),i.fill=i.stroke=i.shadowBlur=i.shadowColor=i.shadowOffsetX=i.shadowOffsetY=null;var n=i.text;null!=n&&(n+=""),_a.needDrawText(n,i)?(this.setTransform(t),_a.renderText(this,t,n,i,null,e),this.restoreTransform(t)):t.__attrCachedBy=Hl.NONE},getBoundingRect:function(){var t=this.style;if(this.__dirty&&_a.normalizeTextStyle(t,!0),!this._rect){t.text;var e=Wr.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,_a.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}},Nt.inherits(Vl,Ma);var Wl=Vl,Gl=xl.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)}}),Ul=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]];var jl=function(t){return J.browser.ie&&J.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<Ul.length;l++)Ul[l][2]=n[Ul[l][0]],n[Ul[l][0]]=Ul[l][1];e=!0;break}}if(t.apply(this,arguments),e)for(l=0;l<Ul.length;l++)n[Ul[l][0]]=Ul[l][2]}:t},Yl=xl.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:jl(xl.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()}}),Xl=xl.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)}}),ql=Xl,Zl=oe.distance;function $l(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 Kl=function(t,e){for(var i=t.length,n=[],r=0,a=1;a<i;a++)r+=Zl(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([$l(s[0],f[0],l[0],u[0],d,p,g),$l(s[1],f[1],l[1],u[1],d,p,g)])}return n},Ql=oe.min,Jl=oe.max,tu=oe.scale,eu=oe.distance,iu=oe.add,nu=oe.clone,ru=oe.sub;var au=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++)Ql(o,o,t[d]),Jl(s,s,t[d]);Ql(o,o,n[0]),Jl(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(nu(t[d]));continue}r=t[d-1],a=t[d+1]}ru(u,a,r),tu(u,u,e);var g=eu(p,r),m=eu(p,a),v=g+m;0!==v&&(g/=v,m/=v),tu(h,u,-g),tu(c,u,m);var y=iu([],p,h),_=iu([],p,c);n&&(Jl(y,y,o),Ql(y,y,s),Jl(_,_,o),Ql(_,_,s)),l.push(y),l.push(_)}return i&&l.push(l.shift()),l};var ou=function(t,e,i){var n=e.points,r=e.smooth;if(n&&n.length>=2){if(r&&"spline"!==r){var a=au(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=Kl(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()}},su={buildPath:ou},lu=xl.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){su.buildPath(t,e,!0)}}),uu=xl.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){su.buildPath(t,e,!1)}}),hu=Math.round;function cu(t,e,i){if(!e)return t;var n=hu(2*t);return(n+hu(e))%2==0?n/2:(n+(i?1:-1))/2}var du=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&&(hu(2*n)===hu(2*r)&&(t.x1=t.x2=cu(n,s,!0)),hu(2*a)===hu(2*o)&&(t.y1=t.y2=cu(a,s,!0)))}},fu=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=cu(n,s,!0),t.y=cu(r,s,!0),t.width=Math.max(cu(n+a,s,!1)-t.x,0===a?0:1),t.height=Math.max(cu(r+o,s,!1)-t.y,0===o?0:1))}},pu={subPixelOptimizeLine:du,subPixelOptimizeRect:fu,subPixelOptimize:cu},gu=pu.subPixelOptimizeRect,mu={},vu=xl.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?(gu(mu,e,this.style),i=mu.x,n=mu.y,r=mu.width,a=mu.height,mu.r=e.r,e=mu):(i=e.x,n=e.y,r=e.width,a=e.height),e.r?Gr.buildPath(t,e):t.rect(i,n,r,a),t.closePath()}}),yu=pu.subPixelOptimizeLine,_u={},xu=xl.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?(yu(_u,e,this.style),i=_u.x1,n=_u.y1,r=_u.x2,a=_u.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]}}),bu=vs.quadraticSubdivide,wu=vs.cubicSubdivide,Su=vs.quadraticAt,Tu=vs.cubicAt,Mu=vs.quadraticDerivativeAt,Cu=vs.cubicDerivativeAt,Iu=[];function Au(t,e,i){var n=t.cpx2,r=t.cpy2;return null===n||null===r?[(i?Cu:Tu)(t.x1,t.cpx1,t.cpx2,t.x2,e),(i?Cu:Tu)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(i?Mu:Su)(t.x1,t.cpx1,t.x2,e),(i?Mu:Su)(t.y1,t.cpy1,t.y2,e)]}var Du=xl.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&&(bu(i,o,r,h,Iu),o=Iu[1],r=Iu[2],bu(n,s,a,h,Iu),s=Iu[1],a=Iu[2]),t.quadraticCurveTo(o,s,r,a)):(h<1&&(wu(i,o,l,r,h,Iu),o=Iu[1],l=Iu[2],r=Iu[3],wu(n,s,u,a,h,Iu),s=Iu[1],u=Iu[2],a=Iu[3]),t.bezierCurveTo(o,s,l,u,r,a)))},pointAt:function(t){return Au(this.shape,t,!1)},tangentAt:function(t){var e=Au(this.shape,t,!0);return oe.normalize(e,e)}}),ku=xl.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)}}),Ou=xl.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(),xl.prototype.getBoundingRect.call(this)}}),Pu=Ou,Lu=function(t){this.colorStops=t||[]};Lu.prototype={constructor:Lu,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}};var Ru=Lu,Eu=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,Ru.call(this,r)};Eu.prototype={constructor:Eu},Nt.inherits(Eu,Ru);var Bu=Eu,zu=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,Ru.call(this,n)};zu.prototype={constructor:zu},Nt.inherits(zu,Ru);var Nu=zu,Fu=Nt.inherits;function Hu(t){Ma.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}Hu.prototype.incremental=!0,Hu.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},Hu.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.dirty()},Hu.prototype.addDisplayables=function(t,e){e=e||!1;for(var i=0;i<t.length;i++)this.addDisplayable(t[i],e)},Hu.prototype.eachPendingDisplayable=function(t){for(var e=this._cursor;e<this._displayables.length;e++)t&&t(this._displayables[e]);for(e=0;e<this._temporaryDisplayables.length;e++)t&&t(this._temporaryDisplayables[e])},Hu.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){(e=this._displayables[t]).parent=this,e.update(),e.parent=null}for(t=0;t<this._temporaryDisplayables.length;t++){var e;(e=this._temporaryDisplayables[t]).parent=this,e.update(),e.parent=null}},Hu.prototype.brush=function(t,e){for(var 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 Vu=[];Hu.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new Dn(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(Vu)),t.union(n)}this._rect=t}return this._rect},Hu.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},Fu(Hu,Ma);var Wu=Hu,Gu=Ia,Uu=On,ju=Wl,Yu=Gl,Xu=Yl,qu=ql,Zu=lu,$u=uu,Ku=vu,Qu=xu,Ju=Du,th=ku,eh=Pu,ih=Bu,nh=Nu,rh=Dn,ah=Wu,oh=Math.max,sh=Math.min,lh={},uh=1,hh="emphasis",ch="normal",dh=1,fh={},ph={};function gh(t,e){ph[t]=e}function mh(t,e,i,n){var r=Fl.createFromString(t,e);return i&&("center"===n&&(i=vh(i,r.getBoundingRect())),_h(r,i)),r}function vh(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 yh=Fl.mergePath;function _h(t,e){if(t.applyTransform){var i=t.getBoundingRect().calculateTransform(e);t.applyTransform(i)}}var xh=pu.subPixelOptimize;function bh(t){return null!=t&&"none"!==t}var wh=Nt.createHashMap(),Sh=0;function Th(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),Hh(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),Mh(a,e,"fill"),Mh(a,e,"stroke"),Fh(a),n||(t.dirty(!1),t.z2+=uh)}}}function Mh(t,e,i){!bh(e[i])&&bh(t[i])&&(t[i]=function(t){if("string"!=typeof t)return t;var e=wh.get(t);return e||(e=Wi.lift(t,-.1),Sh<1e4&&(wh.set(t,e),Sh++)),e}(t[i]))}function Ch(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&&(Hh(i),t.setStyle(n),Fh(i));var r=t.__cachedNormalZ2;null!=r&&t.z2-r===uh&&(t.z2=r)}}function Ih(t,e,i){var n,r=ch,a=ch;t.__highlighted&&(r=hh,n=!0),e(t,i),t.__highlighted&&(a=hh,n=!0),t.isGroup&&t.traverse((function(t){!t.isGroup&&e(t,i)})),n&&t.__highDownOnUpdate&&t.__highDownOnUpdate(r,a)}function Ah(t,e){e=t.__hoverStl=!1!==e&&(t.hoverStyle||e||{}),t.__hoverStlDirty=!0,t.__highlighted&&(t.__cachedNormalStl=null,Ch(t),Th(t))}function Dh(t){!Lh(this,t)&&!this.__highByOuter&&Ih(this,Th)}function kh(t){!Lh(this,t)&&!this.__highByOuter&&Ih(this,Ch)}function Oh(t){this.__highByOuter|=1<<(t||0),Ih(this,Th)}function Ph(t){!(this.__highByOuter&=~(1<<(t||0)))&&Ih(this,Ch)}function Lh(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function Rh(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",Dh)[n]("mouseout",kh),t[n]("emphasis",Oh)[n]("normal",Ph),t.__highByOuter=t.__highByOuter||0,t.__highDownDispatcher=!i}}function Eh(t,e,i,n,r){return Bh(t,e,n,r),i&&Nt.extend(t,i),t}function Bh(t,e,i,n){if((i=i||lh).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=Nt.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||lh).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]);zh(o[h]={},c,l,i,n)}return t.rich=o,zh(t,e,l,i,n,!0),i.forceRich&&!i.textStyle&&(i.textStyle={}),t}function zh(t,e,i,n,r,a){i=!r&&i||lh,t.textFill=Nh(e.getShallow("color"),n)||i.color,t.textStroke=Nh(e.getShallow("textBorderColor"),n)||i.textBorderColor,t.textStrokeWidth=Nt.retrieve2(e.getShallow("textBorderWidth"),i.textBorderWidth),r||(a&&(t.insideRollbackOpt=n,Fh(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=Nh(e.getShallow("backgroundColor"),n),t.textPadding=e.getShallow("padding"),t.textBorderColor=Nh(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 Nh(t,e){return"auto"!==t?t:e&&e.autoColor?e.autoColor:null}function Fh(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 Hh(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function Vh(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 Wh(t,e,i,n,r){Vh(!0,t,e,i,n,r)}function Gh(t,e,i){return e&&!Nt.isArrayLike(e)&&(e=hi.getLocalTransform(e)),i&&(e=ei.invert([],e)),oe.applyTransform([],t,e)}function Uh(t,e,i,n,r,a,o,s){var l,u=i-t,h=n-e,c=o-r,d=s-a,f=jh(c,d,u,h);if((l=f)<=1e-6&&l>=-1e-6)return!1;var p=t-r,g=e-a,m=jh(p,g,u,h)/f;if(m<0||m>1)return!1;var v=jh(p,g,c,d)/f;return!(v<0||v>1)}function jh(t,e,i,n){return t*n-i*e}gh("circle",Gl),gh("sector",Yl),gh("ring",ql),gh("polygon",lu),gh("polyline",uu),gh("rect",vu),gh("line",xu),gh("bezierCurve",Du),gh("arc",ku);var Yh=function(t,e,i){var n=new Ia({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(vh(e,r))}}});return n},Xh=function(t){return pu.subPixelOptimizeLine(t.shape,t.shape,t.style),t},qh=function(t){return pu.subPixelOptimizeRect(t.shape,t.shape,t.style),t},Zh=function(t,e,i){var n,r={isRectText:!0};!1===i?n=!0:r.autoColor=i,Bh(t,e,r,n)},$h=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=Gh(a,e,i),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"},Kh=function(t,e){return Nt.map(t,(function(t){var i=t[0];i=oh(i,e.x),i=sh(i,e.x+e.width);var n=t[1];return n=oh(n,e.y),[i,n=sh(n,e.y+e.height)]}))},Qh=function(t,e,i){var n=(e=Nt.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),Nt.defaults(n,i),new Ia(e)):mh(t.replace("path://",""),e,i,"center")},Jh=function(t,e,i,n,r){for(var a=0,o=r[r.length-1];a<r.length;a++){var s=r[a];if(Uh(t,e,i,n,s[0],s[1],o[0],o[1]))return!0;o=s}},tc={Image:Gu,Group:Uu,Text:ju,Circle:Yu,Sector:Xu,Ring:qu,Polygon:Zu,Polyline:$u,Rect:Ku,Line:Qu,BezierCurve:Ju,Arc:th,CompoundPath:eh,LinearGradient:ih,RadialGradient:nh,BoundingRect:rh,IncrementalDisplayable:ah,Z2_EMPHASIS_LIFT:uh,CACHED_LABEL_STYLE_PROPERTIES:{color:"textFill",textBorderColor:"textStroke",textBorderWidth:"textStrokeWidth"},extendShape:function(t){return xl.extend(t)},extendPath:function(t,e){return Fl.extendFromString(t,e)},registerShape:gh,getShapeClass:function(t){if(ph.hasOwnProperty(t))return ph[t]},makePath:mh,makeImage:Yh,mergePath:yh,resizePath:_h,subPixelOptimizeLine:Xh,subPixelOptimizeRect:qh,subPixelOptimize:xh,setElementHoverStyle:Ah,setHoverStyle:function(t,e){Rh(t,!0),Ih(t,Ah,e)},setAsHighDownDispatcher:Rh,isHighDownDispatcher:function(t){return!(!t||!t.__highDownDispatcher)},getHighlightDigit:function(t){var e=fh[t];return null==e&&dh<=32&&(e=fh[t]=dh++),e},setLabelStyle:function(t,e,i,n,r,a,o){var s,l=(r=r||lh).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=Nt.isFunction(r.defaultText)?r.defaultText(u,r):r.defaultText));var p=d?s:null,g=f?Nt.retrieve2(l?l.getFormattedLabel(u,"emphasis",null,h,c):null,s):null;null==p&&null==g||(Eh(t,i,a,r),Eh(e,n,o,r,!0)),t.text=p,e.text=g},modifyLabelStyle:function(t,e,i){var n=t.style;e&&(Hh(n),t.setStyle(e),Fh(n)),n=t.__hoverStl,i&&n&&(Hh(n),Nt.extend(n,i),Fh(n))},setTextStyle:Eh,setText:Zh,getFont:function(t,e){var i=e&&e.getModel("textStyle");return Nt.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:Wh,initProps:function(t,e,i,n,r){Vh(!1,t,e,i,n,r)},getTransform:function(t,e){for(var i=ei.identity([]);t&&t!==e;)ei.mul(i,t.getLocalTransform(),i),t=t.parent;return i},applyTransform:Gh,transformDirection:$h,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)),Wh(t,n,i,t.dataIndex)}}}))}function o(t){var e={position:oe.clone(t.position),rotation:t.rotation};return t.shape&&(e.shape=Nt.extend({},t.shape)),e}},clipPointsByRect:Kh,clipRectByRect:function(t,e){var i=oh(t.x,e.x),n=sh(t.x+t.width,e.x+e.width),r=oh(t.y,e.y),a=sh(t.y+t.height,e.y+e.height);if(n>=i&&a>=r)return{x:i,y:r,width:n-i,height:a-r}},createIcon:Qh,linePolygonIntersect:Jh,lineLineIntersect:Uh},ec=["textStyle","color"],ic={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(ec):null)},getFont:function(){return tc.getFont({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return Wr.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"))}},nc=ic,rc=Go([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),ac={getItemStyle:function(t,e){var i=rc(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]}},oc=ac,sc=Lo.makeInner,lc=Wo.enableClassExtend,uc=Wo.enableClassCheck,hc=Nt.mixin,cc=sc();function dc(t,e,i){this.parentModel=e,this.ecModel=i,this.option=t}function fc(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 pc(t,e){var i=cc(t).getParent;return i?i.call(t,e):t.parentModel}dc.prototype={constructor:dc,init:null,mergeOption:function(t){Nt.merge(this.option,t,!0)},get:function(t,e){return null==t?this.option:fc(this.option,this.parsePath(t),!e&&pc(this,t))},getShallow:function(t,e){var i=this.option,n=null==i?i:i[t],r=!e&&pc(this,t);return null==n&&r&&(n=r.getShallow(t)),n},getModel:function(t,e){var i;return new dc(null==t?this.option:fc(this.option,t=this.parsePath(t)),e=e||(i=pc(this,t))&&i.getModel(t),this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new(0,this.constructor)(Nt.clone(this.option))},setReadOnly:function(t){},parsePath:function(t){return"string"==typeof t&&(t=t.split(".")),t},customizeGetParent:function(t){cc(this).getParent=t},isAnimationEnabled:function(){if(!J.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},lc(dc),uc(dc),hc(dc,Yo),hc(dc,qo),hc(dc,nc),hc(dc,oc);var gc=dc,mc=Wo.parseClassType,vc=0;var yc={getUID:function(t){return[t||"",vc++,Math.random().toFixed(5)].join("_")},enableSubTypeDefaulter:function(t){var e={};return t.registerSubTypeDefaulter=function(t,i){t=mc(t),e[t.main]=i},t.determineSubType=function(i,n){var r=n.type;if(!r){var a=mc(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 Nt.each(t,(function(a){var o=i(n,a),s=function(t,e){var i=[];return Nt.each(t,(function(t){Nt.indexOf(e,t)>=0&&i.push(t)})),i}(o.originalDeps=e(a),t);o.entryCount=s.length,0===o.entryCount&&r.push(a),Nt.each(s,(function(t){Nt.indexOf(o.predecessor,t)<0&&o.predecessor.push(t);var e=i(n,t);Nt.indexOf(e.successor,t)<0&&e.successor.push(a)}))})),{graph:n,noEntryList:r}}(n),s=o.graph,l=o.noEntryList,u={};for(Nt.each(t,(function(t){u[t]=!0}));l.length;){var h=l.pop(),c=s[h],d=!!u[h];d&&(r.call(a,h,c.originalDeps.slice()),delete u[h]),Nt.each(c.successor,d?p:f)}Nt.each(u,(function(){throw new Error("Circle dependency may exists")}))}function f(t){s[t].entryCount--,0===s[t].entryCount&&l.push(t)}function p(t){u[t]=!0,f(t)}}}},_c=1e-4;var xc=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function bc(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 wc=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]},Sc=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},Tc=function(t,e,i){if(!t[e])return 0;var n=Nt.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=Nt.map(t,(function(t){return(isNaN(t)?0:t)/n*r*100})),o=100*r,s=Nt.map(a,(function(t){return Math.floor(t)})),l=Nt.reduce(s,(function(t,e){return t+e}),0),u=Nt.map(a,(function(t,e){return t-s[e]}));l<o;){for(var h=Number.NEGATIVE_INFINITY,c=null,d=0,f=u.length;d<f;++d)u[d]>h&&(h=u[d],c=d);++s[c],u[c]=0,++l}return s[e]/r},Mc=function(t,e){var i=bc(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},Cc=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))}},Ic={linearMap:wc,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:Sc,getPercentWithPrecision:Tc,MAX_SAFE_INTEGER:9007199254740991,remRadian:function(t){var e=2*Math.PI;return(t%e+e)%e},isRadianAroundZero:function(t){return t>-1e-4&&t<_c},parseDate:function(t){if(t instanceof Date)return t;if("string"==typeof t){var e=xc.exec(t);if(!e)return new Date(NaN);if(e[8]){var 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,bc(t))},quantityExponent:bc,nice:Mc,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:Cc,isNumeric:function(t){return t-parseFloat(t)>=0}};var Ac=Nt.normalizeCssArray,Dc=/([&<>"'])/g,kc={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Oc(t){return null==t?"":(t+"").replace(Dc,(function(t,e){return kc[e]}))}var Pc=["a","b","c","d","e","f","g"],Lc=function(t,e){return"{"+t+(null==e?"":e)+"}"};function Rc(t,e){return"0000".substr(0,e-(t+="").length)+t}var Ec=function(t,e,i){Nt.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=Pc[a];t=t.replace(Lc(o),Lc(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(Lc(Pc[l],s),i?Oc(u):u)}return t},Bc=function(t,e,i){return Nt.each(e,(function(e,n){t=t.replace("{"+n+"}",i?Oc(e):e)})),t},zc=function(t,e){var i=(t=Nt.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:'+Oc(i)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+Oc(i)+";"+(e||"")+'"></span>':{renderMode:r,content:"{marker"+a+"|}  ",style:{color:i}}:""},Nc=function(t,e,i){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var n=Ic.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",Rc(o,2)).replace("M",o).replace("yyyy",a).replace("yy",a%100).replace("dd",Rc(s,2)).replace("d",s).replace("hh",Rc(l,2)).replace("h",l).replace("mm",Rc(u,2)).replace("m",u).replace("ss",Rc(h,2)).replace("s",h).replace("SSS",Rc(c,3))},Fc=function(t,e,i,n,r,a,o,s){return Wr.getBoundingRect(t,e,i,n,r,s,a,o)},Hc={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:Ac,encodeHTML:Oc,formatTpl:Ec,formatTplSimple:Bc,getTooltipMarker:zc,formatTime:Nc,capitalFirst:function(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t},truncateText:Wr.truncateText,getTextBoundingRect:function(t){return Wr.getBoundingRect(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)},getTextRect:Fc,windowOpen:function(t,e){if("_blank"===e||"blank"===e){var i=window.open();i.opener=null,i.location=t}else window.open(t,e)}},Vc=Ic.parsePercent,Wc=Nt.each,Gc=["left","right","top","bottom","width","height"],Uc=[["width","left","right"],["height","top","bottom"]];function jc(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 Yc=jc,Xc=Nt.curry(jc,"vertical"),qc=Nt.curry(jc,"horizontal");function Zc(t,e,i){i=Hc.normalizeCssArray(i||0);var n=e.width,r=e.height,a=Vc(t.left,n),o=Vc(t.top,r),s=Vc(t.right,n),l=Vc(t.bottom,r),u=Vc(t.width,n),h=Vc(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 Dn(a+i[3],o+i[0],u,h);return p.margin=i,p}function $c(t,e){return e&&t&&Wc(Gc,(function(i){e.hasOwnProperty(i)&&(t[i]=e[i])})),t}var Kc=function(t,e,i){!Nt.isObject(i)&&(i={});var n=i.ignoreSize;!Nt.isArray(n)&&(n=[n,n]);var r=o(Uc[0],0),a=o(Uc[1],1);function o(i,r){var a={},o=0,u={},h=0;if(Wc(i,(function(e){u[e]=t[e]})),Wc(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){Wc(t,(function(t){e[t]=i[t]}))}u(Uc[0],t,r),u(Uc[1],t,a)},Qc={LOCATION_PARAMS:Gc,HV_NAMES:Uc,box:Yc,vbox:Xc,hbox:qc,getAvailableSize:function(t,e,i){var n=e.width,r=e.height,a=Vc(t.x,n),o=Vc(t.y,r),s=Vc(t.x2,n),l=Vc(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=Hc.normalizeCssArray(i||0),{width:Math.max(s-a-i[1]-i[3],0),height:Math.max(l-o-i[0]-i[2],0)}},getLayoutRect:Zc,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 Dn(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(l=t.getBoundingRect(),t.needLocalTransform()){var u=t.getLocalTransform();(l=l.clone()).applyTransform(u)}e=Zc(Nt.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[Uc[e][0]]||null!=t[Uc[e][1]]&&null!=t[Uc[e][2]]},mergeLayoutParam:Kc,getLayoutParams:function(t){return $c({},t)},copyLayoutParams:$c},Jc={getBoxLayoutParams:function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}}},td=Wo.enableClassManagement,ed=Wo.parseClassType,id=(0,Lo.makeInner)(),nd=gc.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,i,n){gc.call(this,t,e,i,n),this.uid=yc.getUID("ec_cpt_model")},init:function(t,e,i,n){this.mergeDefaultAndTheme(t,i)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?Qc.getLayoutParams(t):{},r=e.getTheme();Nt.merge(t,r.get(this.mainType)),Nt.merge(t,this.getDefaultOption()),i&&Qc.mergeLayoutParam(t,n,i)},mergeOption:function(t,e){Nt.merge(this.option,t,!0);var i=this.layoutMode;i&&Qc.mergeLayoutParam(this.option,t,i)},optionUpdated:function(t,e){},getDefaultOption:function(){var t=id(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=Nt.merge(r,e[a],!0);t.defaultOption=r}return t.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});td(nd,{registerWhenExtend:!0}),yc.enableSubTypeDefaulter(nd),yc.enableTopologicalTravel(nd,(function(t){var e=[];Nt.each(nd.getClassesByMainType(t),(function(t){e=e.concat(t.prototype.dependencies||[])})),e=Nt.map(e,(function(t){return ed(t).main})),"dataset"!==t&&Nt.indexOf(e,"dataset")<=0&&e.unshift("dataset");return e})),Nt.mixin(nd,Jc);var rd=nd,ad="";"undefined"!=typeof navigator&&(ad=navigator.platform||"");var od={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:ad.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,animation:"auto",animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},sd=Lo.makeInner,ld=Lo.normalizeToArray,ud=sd();var hd={clearColorPalette:function(){ud(this).colorIdx=0,ud(this).colorNameMap={}},getColorFromPalette:function(t,e,i){var n=ud(e=e||this),r=n.colorIdx||0,a=n.colorNameMap=n.colorNameMap||{};if(a.hasOwnProperty(t))return a[t];var o=ld(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}}},cd=hd,dd={SOURCE_FORMAT_ORIGINAL:"original",SOURCE_FORMAT_ARRAY_ROWS:"arrayRows",SOURCE_FORMAT_OBJECT_ROWS:"objectRows",SOURCE_FORMAT_KEYED_COLUMNS:"keyedColumns",SOURCE_FORMAT_UNKNOWN:"unknown",SOURCE_FORMAT_TYPED_ARRAY:"typedArray",SERIES_LAYOUT_BY_COLUMN:"column",SERIES_LAYOUT_BY_ROW:"row"},fd=Nt.createHashMap,pd=Nt.isTypedArray,gd=Wo.enableClassCheck,md=dd.SOURCE_FORMAT_ORIGINAL,vd=dd.SERIES_LAYOUT_BY_COLUMN,yd=dd.SOURCE_FORMAT_UNKNOWN,_d=dd.SOURCE_FORMAT_TYPED_ARRAY,xd=dd.SOURCE_FORMAT_KEYED_COLUMNS;function bd(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===xd?{}:[]),this.sourceFormat=t.sourceFormat||yd,this.seriesLayoutBy=t.seriesLayoutBy||vd,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&fd(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}bd.seriesDataToSource=function(t){return new bd({data:t,sourceFormat:pd(t)?_d:md,fromDataset:!1})},gd(bd);var wd=bd,Sd=Lo.makeInner,Td=Lo.getDataItemValue,Md=Nt.createHashMap,Cd=Nt.each,Id=Nt.map,Ad=Nt.isArray,Dd=Nt.isString,kd=Nt.isObject,Od=Nt.isTypedArray,Pd=Nt.isArrayLike,Ld=Nt.extend,Rd=dd.SOURCE_FORMAT_ORIGINAL,Ed=dd.SOURCE_FORMAT_ARRAY_ROWS,Bd=dd.SOURCE_FORMAT_OBJECT_ROWS,zd=dd.SOURCE_FORMAT_KEYED_COLUMNS,Nd=dd.SOURCE_FORMAT_UNKNOWN,Fd=dd.SOURCE_FORMAT_TYPED_ARRAY,Hd=dd.SERIES_LAYOUT_BY_ROW,Vd={Must:1,Might:2,Not:3},Wd=Sd();function Gd(t){if(t){var e=Md();return Id(t,(function(t,i){if(null==(t=Ld({},kd(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 Ud(t,e,i,n){if(null==n&&(n=1/0),e===Hd)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 jd(t){var e=t.option;if(!e.data)return t.ecModel.getComponent("dataset",e.datasetIndex||0)}function Yd(t,e,i,n,r,a){var o,s,l;if(Od(t))return Vd.Not;if(n){var u=n[a];kd(u)?(s=u.name,l=u.type):Dd(u)&&(s=u)}if(null!=l)return"ordinal"===l?Vd.Must:Vd.Not;if(e===Ed)if(i===Hd){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===Bd){if(!s)return Vd.Not;for(c=0;c<t.length&&c<5;c++){if((f=t[c])&&null!=(o=g(f[s])))return o}}else if(e===zd){if(!s)return Vd.Not;if(!(h=t[s])||Od(h))return Vd.Not;for(c=0;c<h.length&&c<5;c++)if(null!=(o=g(h[c])))return o}else if(e===Rd)for(c=0;c<t.length&&c<5;c++){var f=t[c],p=Td(f);if(!Ad(p))return Vd.Not;if(null!=(o=g(p[a])))return o}function g(t){var e=Dd(t);return null!=t&&isFinite(t)&&""!==t?e?Vd.Might:Vd.Not:e&&"-"!==t?Vd.Must:void 0}return Vd.Not}var Xd=function(t){var e=t.option.source,i=Nd;if(Od(e))i=Fd;else if(Ad(e)){0===e.length&&(i=Ed);for(var n=0,r=e.length;n<r;n++){var a=e[n];if(null!=a){if(Ad(a)){i=Ed;break}if(kd(a)){i=Bd;break}}}}else if(kd(e)){for(var o in e)if(e.hasOwnProperty(o)&&Pd(e[o])){i=zd;break}}else if(null!=e)throw new Error("Invalid data");Wd(t).sourceFormat=i},qd=function(t){var e=t.option,i=e.data,n=Od(i)?Fd:Rd,r=!1,a=e.seriesLayoutBy,o=e.sourceHeader,s=e.dimensions,l=jd(t);if(l){var u=l.option;i=u.source,n=Wd(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:Gd(r)};var a,o;if(e===Ed)"auto"===n||null==n?Ud((function(t){null!=t&&"-"!==t&&(Dd(t)?null==o&&(o=1):o=0)}),i,t,10):o=n?1:0,r||1!==o||(r=[],Ud((function(t,e){r[e]=null!=t?t:""}),i,t)),a=r?r.length:i===Hd?t.length:t[0]?t[0].length:null;else if(e===Bd)r||(r=function(t){var e,i=0;for(;i<t.length&&!(e=t[i++]););if(e){var n=[];return Cd(e,(function(t,e){n.push(e)})),n}}(t));else if(e===zd)r||(r=[],Cd(t,(function(t,e){r.push(e)})));else if(e===Rd){var s=Td(t[0]);a=Ad(s)&&s.length||1}return{startIndex:o,dimensionsDefine:Gd(r),dimensionsDetectCount:a}}(i,n,a,o,s);Wd(t).source=new wd({data:i,fromDataset:r,seriesLayoutBy:a,sourceFormat:n,dimensionsDefine:h.dimensionsDefine,startIndex:h.startIndex,dimensionsDetectCount:h.dimensionsDetectCount,encodeDefine:e.encode})},Zd=function(t,e,i){var n={},r=jd(e);if(!r||!t)return n;var a,o,s=[],l=[],u=e.ecModel,h=Wd(u).datasetMap,c=r.uid+"_"+i.seriesLayoutBy;t=t.slice(),Cd(t,(function(e,i){!kd(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 Cd(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},$d=function(t,e,i){var n={};if(!jd(t))return n;var r,a=e.sourceFormat,o=e.dimensionsDefine;a!==Bd&&a!==zd||Cd(o,(function(t,e){"name"===(kd(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=Yd(e.data,a,e.seriesLayoutBy,o,e.startIndex,l);s.push(h);var c=h===Vd.Not;if(c&&null==t.v&&l!==r&&(t.v=l),(null==t.n||t.n===t.v||!c&&s[t.n]===Vd.Not)&&(t.n=l),d(t)&&s[t.n]!==Vd.Not)return t;c||(h===Vd.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},Kd={BE_ORDINAL:Vd,detectSourceFormat:Xd,getSource:function(t){return Wd(t).source},resetSourceDefaulter:function(t){Wd(t).datasetMap=Md()},prepareSource:qd,makeSeriesEncodeForAxisCoordSys:Zd,makeSeriesEncodeForNameBased:$d,guessOrdinal:function(t,e){return Yd(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}},Qd=Nt.each,Jd=Nt.filter,tf=Nt.map,ef=Nt.isArray,nf=Nt.indexOf,rf=Nt.isObject,af=Nt.isString,of=Nt.createHashMap,sf=Nt.assert,lf=Nt.clone,uf=Nt.merge,hf=Nt.extend,cf=Nt.mixin,df=Kd.resetSourceDefaulter,ff="\0_ec_inner",pf=gc.extend({init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new gc(i),this._optionManager=n},setOption:function(t,e){sf(!(ff in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e=!1,i=this._optionManager;if(!t||"recreate"===t){var n=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(n)):gf.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&&Qd(a,(function(t){this.mergeOption(t,e=!0)}),this)}return e},mergeOption:function(t){var e=this.option,i=this._componentsMap,n=[];df(this),Qd(t,(function(t,i){null!=t&&(rd.hasClass(i)?i&&n.push(i):e[i]=null==e[i]?lf(t):uf(e[i],t,!0))})),rd.topologicalTravel(n,rd.getAllClassMainTypes(),(function(n,r){var a=Lo.normalizeToArray(t[n]),o=Lo.mappingToExists(i.get(n),a);Lo.makeIdAndName(o),Qd(o,(function(t,e){var i=t.option;rf(i)&&(t.keyInfo.mainType=n,t.keyInfo.subType=function(t,e,i){var n=e.type?e.type:i?i.subType:rd.determineSubType(t,e);return n}(n,i,t.exist))}));var s=function(t,e){ef(e)||(e=e?[e]:[]);var i={};return Qd(e,(function(e){i[e]=(t.get(e)||[]).slice()})),i}(i,r);e[n]=[],i.set(n,[]),Qd(o,(function(t,r){var a=t.exist,o=t.option;if(sf(rf(o)||a,"Empty component definition"),o){var l=rd.getClass(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=hf({dependentModels:s,componentIndex:r},t.keyInfo);a=new l(o,this,this,u),hf(a,u),a.init(o,this,this,u),a.optionUpdated(null,!0)}}else a.mergeOption({},this),a.optionUpdated({},!1);i.get(n)[r]=a,e[n][r]=a.option}),this),"series"===n&&mf(this,i.get("series"))}),this),this._seriesIndicesMap=of(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var t=lf(this.option);return Qd(t,(function(e,i){if(rd.hasClass(i)){for(var n=(e=Lo.normalizeToArray(e)).length-1;n>=0;n--)Lo.isIdInner(e[n])&&e.splice(n,1);t[i]=e}})),delete t[ff],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)ef(n)||(n=[n]),i=Jd(tf(n,(function(t){return o[t]})),(function(t){return!!t}));else if(null!=r){var s=ef(r);i=Jd(o,(function(t){return s&&nf(r,t.id)>=0||!s&&t.id===r}))}else if(null!=a){var l=ef(a);i=Jd(o,(function(t){return l&&nf(a,t.name)>=0||!l&&t.name===a}))}else i=o.slice();return vf(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=vf(u,t),t.filter?Jd(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){Qd(t,(function(t,r){e.call(i,n,t,r)}))}));else if(af(t))Qd(n.get(t),e,i);else if(rf(t)){var r=this.findComponents(t);Qd(r,e,i)}},getSeriesByName:function(t){var e=this._componentsMap.get("series");return Jd(e,(function(e){return e.name===t}))},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(t){var e=this._componentsMap.get("series");return Jd(e,(function(e){return e.subType===t}))},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(t,e){Qd(this._seriesIndices,(function(i){var n=this._componentsMap.get("series")[i];t.call(e,n,i)}),this)},eachRawSeries:function(t,e){Qd(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,i){Qd(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 Qd(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){mf(this,Jd(this._componentsMap.get("series"),t,e))},restoreData:function(t){var e=this._componentsMap;mf(this,e.get("series"));var i=[];e.each((function(t,e){i.push(e)})),rd.topologicalTravel(i,rd.getAllClassMainTypes(),(function(i,n){Qd(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 gf(t){this.option={},this.option[ff]=1,this._componentsMap=of({series:[]}),this._seriesIndices,this._seriesIndicesMap,function(t,e){var i=t.color&&!t.colorLayer;Qd(e,(function(e,n){"colorLayer"===n&&i||rd.hasClass(n)||("object"==typeof e?t[n]=t[n]?uf(t[n],e,!1):lf(e):null==t[n]&&(t[n]=e))}))}(t,this._theme.option),uf(t,od,!1),this.mergeOption(t)}function mf(t,e){t._seriesIndicesMap=of(t._seriesIndices=tf(e,(function(t){return t.componentIndex}))||[])}function vf(t,e){return e.hasOwnProperty("subType")?Jd(t,(function(t){return t.subType===e.subType})):t}cf(pf,cd);var yf=pf,_f=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];var xf=function(t){Nt.each(_f,(function(e){this[e]=Nt.bind(t[e],t)}),this)},bf={};function wf(){this._coordinateSystems=[]}wf.prototype={constructor:wf,create:function(t,e){var i=[];Nt.each(bf,(function(n,r){var a=n.create(t,e);i=i.concat(a||[])})),this._coordinateSystems=i},update:function(t,e){Nt.each(this._coordinateSystems,(function(i){i.update&&i.update(t,e)}))},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},wf.register=function(t,e){bf[t]=e},wf.get=function(t){return bf[t]};var Sf=wf,Tf=Nt.each,Mf=Nt.clone,Cf=Nt.map,If=Nt.merge,Af=/^(min|max)?(.+)$/;function Df(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function kf(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;Tf(l,(function(t){t&&t.option&&(t.query?o.push(t):n||(n=t))}))}return r||(r=t),r.timeline||(r.timeline=s),Tf([r].concat(a).concat(Nt.map(o,(function(t){return t.option}))),(function(t){Tf(e,(function(e){e(t,i)}))})),{baseOption:r,timelineOptions:a,mediaDefault:n,mediaList:o}}function Of(t,e,i){var n={width:e,height:i,aspectratio:e/i},r=!0;return Nt.each(t,(function(t,e){var i=e.match(Af);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}Df.prototype={constructor:Df,setOption:function(t,e){t&&Nt.each(Lo.normalizeToArray(t.series),(function(t){t&&t.data&&Nt.isTypedArray(t.data)&&Nt.setAsPrimitive(t.data)})),t=Mf(t);var i,n,r=this._optionBackup,a=kf.call(this,t,e,!r);this._newBaseOption=a.baseOption,r?(i=r.baseOption,n=a.baseOption,Tf(n=n||{},(function(t,e){if(null!=t){var n=i[e];if(rd.hasClass(e)){t=Lo.normalizeToArray(t),n=Lo.normalizeToArray(n);var r=Lo.mappingToExists(n,t);i[e]=Cf(r,(function(t){return t.option&&t.exist?If(t.exist,t.option,!0):t.exist||t.option}))}else i[e]=If(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=Cf(e.timelineOptions,Mf),this._mediaList=Cf(e.mediaList,Mf),this._mediaDefault=Mf(e.mediaDefault),this._currentMediaIndices=[],Mf(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=Mf(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++)Of(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=Cf(s,(function(t){return Mf(-1===t?o.option:a[t].option)}))),this._currentMediaIndices=s,l}};var Pf=Df,Lf=Nt.each,Rf=Nt.isObject,Ef=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Bf(t){var e=t&&t.itemStyle;if(e)for(var i=0,n=Ef.length;i<n;i++){var r=Ef[i],a=e.normal,o=e.emphasis;a&&a[r]&&(t[r]=t[r]||{},t[r].normal?Nt.merge(t[r].normal,a[r]):t[r].normal=a[r],a[r]=null),o&&o[r]&&(t[r]=t[r]||{},t[r].emphasis?Nt.merge(t[r].emphasis,o[r]):t[r].emphasis=o[r],o[r]=null)}}function zf(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,Nt.defaults(t[e],n)):t[e]=n),r&&(t.emphasis=t.emphasis||{},t.emphasis[e]=r)}}function Nf(t){zf(t,"itemStyle"),zf(t,"lineStyle"),zf(t,"areaStyle"),zf(t,"label"),zf(t,"labelLine"),zf(t,"upperLabel"),zf(t,"edgeLabel")}function Ff(t,e){var i=Rf(t)&&t[e],n=Rf(i)&&i.textStyle;if(n)for(var r=0,a=Lo.TEXT_STYLE_OPTIONS.length;r<a;r++){e=Lo.TEXT_STYLE_OPTIONS[r];n.hasOwnProperty(e)&&(i[e]=n[e])}}function Hf(t){t&&(Nf(t),Ff(t,"label"),t.emphasis&&Ff(t.emphasis,"label"))}function Vf(t){return Nt.isArray(t)?t:t?[t]:[]}function Wf(t){return(Nt.isArray(t)?t[0]:t)||{}}var Gf=function(t,e){Lf(Vf(t.series),(function(t){Rf(t)&&function(t){if(Rf(t)){Bf(t),Nf(t),Ff(t,"label"),Ff(t,"upperLabel"),Ff(t,"edgeLabel"),t.emphasis&&(Ff(t.emphasis,"label"),Ff(t.emphasis,"upperLabel"),Ff(t.emphasis,"edgeLabel")),(i=t.markPoint)&&(Bf(i),Hf(i)),(n=t.markLine)&&(Bf(n),Hf(n));var e=t.markArea;e&&Hf(e);var i,n,r=t.data;if("graph"===t.type){r=r||t.nodes;var a=t.links||t.edges;if(a&&!Nt.isTypedArray(a))for(var o=0;o<a.length;o++)Hf(a[o]);Nt.each(t.categories,(function(t){Nf(t)}))}if(r&&!Nt.isTypedArray(r))for(o=0;o<r.length;o++)Hf(r[o]);if((i=t.markPoint)&&i.data){var s=i.data;for(o=0;o<s.length;o++)Hf(s[o])}if((n=t.markLine)&&n.data){var l=n.data;for(o=0;o<l.length;o++)Nt.isArray(l[o])?(Hf(l[o][0]),Hf(l[o][1])):Hf(l[o])}"gauge"===t.type?(Ff(t,"axisLabel"),Ff(t,"title"),Ff(t,"detail")):"treemap"===t.type?(zf(t.breadcrumb,"itemStyle"),Nt.each(t.levels,(function(t){Nf(t)}))):"tree"===t.type&&Nf(t.leaves)}}(t)}));var i=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&i.push("valueAxis","categoryAxis","logAxis","timeAxis"),Lf(i,(function(e){Lf(Vf(t[e]),(function(t){t&&(Ff(t,"axisLabel"),Ff(t.axisPointer,"label"))}))})),Lf(Vf(t.parallel),(function(t){var e=t&&t.parallelAxisDefault;Ff(e,"axisLabel"),Ff(e&&e.axisPointer,"label")})),Lf(Vf(t.calendar),(function(t){zf(t,"itemStyle"),Ff(t,"dayLabel"),Ff(t,"monthLabel"),Ff(t,"yearLabel")})),Lf(Vf(t.radar),(function(t){Ff(t,"name")})),Lf(Vf(t.geo),(function(t){Rf(t)&&(Hf(t),Lf(Vf(t.regions),(function(t){Hf(t)})))})),Lf(Vf(t.timeline),(function(t){Hf(t),zf(t,"label"),zf(t,"itemStyle"),zf(t,"controlStyle",!0);var e=t.data;Nt.isArray(e)&&Nt.each(e,(function(t){Nt.isObject(t)&&(zf(t,"label"),zf(t,"itemStyle"))}))})),Lf(Vf(t.toolbox),(function(t){zf(t,"iconStyle"),Lf(t.feature,(function(t){zf(t,"iconStyle")}))})),Ff(Wf(t.axisPointer),"label"),Ff(Wf(t.tooltip).axisPointer,"label")},Uf=Nt.each,jf=Nt.isArray,Yf=Nt.isObject,Xf=Lo.normalizeToArray;function qf(t){Uf(Zf,(function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])}))}var Zf=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],$f=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"];var Kf=function(t,e){Gf(t,e),t.series=Xf(t.series),Uf(t.series,(function(t){if(Yf(t)){var e=t.type;if("line"===e)null!=t.clipOverflow&&(t.clip=t.clipOverflow);else if("pie"===e||"gauge"===e)null!=t.clockWise&&(t.clockwise=t.clockWise);else if("gauge"===e){var 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)}qf(t)}})),t.dataRange&&(t.visualMap=t.dataRange),Uf($f,(function(e){var i=t[e];i&&(jf(i)||(i=[i]),Uf(i,(function(t){qf(t)})))}))},Qf=Nt.createHashMap,Jf=Nt.each;function tp(t){Jf(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 ep=function(t){var e=Qf();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(tp)},ip=Nt.extend,np=Nt.each,rp=Nt.isObject,ap=Lo.getDataItemValue,op=Lo.isDataItemOption,sp=Ic.parseDate,lp=dd.SOURCE_FORMAT_TYPED_ARRAY,up=dd.SOURCE_FORMAT_ARRAY_ROWS,hp=dd.SOURCE_FORMAT_ORIGINAL,cp=dd.SOURCE_FORMAT_OBJECT_ROWS;function dp(t,e){wd.isInstance(t)||(t=wd.seriesDataToSource(t)),this._source=t;var i=this._data=t.data,n=t.sourceFormat;n===lp&&(this._offset=0,this._dimSize=e,this._data=i);var r=pp[n===up?n+"_"+t.seriesLayoutBy:n];ip(this,r)}var fp=dp.prototype;fp.pure=!1,fp.persistent=!0,fp.getSource=function(){return this._source};var pp={arrayRows_column:{pure:!0,count:function(){return Math.max(0,this._data.length-this._source.startIndex)},getItem:function(t){return this._data[t+this._source.startIndex]},appendData:vp},arrayRows_row:{pure:!0,count:function(){var t=this._data[0];return t?Math.max(0,t.length-this._source.startIndex):0},getItem:function(t){t+=this._source.startIndex;for(var e=[],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:gp,getItem:mp,appendData:vp},keyedColumns:{pure:!0,count:function(){var t=this._source.dimensionsDefine[0].name,e=this._data[t];return e?e.length:0},getItem:function(t){for(var e=[],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;np(t,(function(t,i){for(var n=e[i]||(e[i]=[]),r=0;r<(t||[]).length;r++)n.push(t[r])}))}},original:{count:gp,getItem:mp,appendData:vp},typedArray:{persistent:!1,pure:!0,count:function(){return this._data?this._data.length/this._dimSize:0},getItem:function(t,e){t-=this._offset,e=e||[];for(var 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 gp(){return this._data.length}function mp(t){return this._data[t]}function vp(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}var yp={arrayRows:_p,objectRows:function(t,e,i,n){return null!=i?t[n]:t},keyedColumns:_p,original:function(t,e,i,n){var r=ap(t);return null!=i&&r instanceof Array?r[i]:r},typedArray:_p};function _p(t,e,i,n){return null!=i?t[i]:t}function xp(t,e,i,n){return bp(t[n],this._dimensionInfos[e])}function bp(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=+sp(t)),null==t||""===t?NaN:+t}var wp=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),yp[o](n,e,a,r)}}},Sp=function(t,e,i){if(t){var n=t.getProvider().getSource().sourceFormat;if(n===hp||n===cp){var r=t.getRawDataItem(e);return n!==hp||rp(r)||(r=null),r?r[i]:void 0}}},Tp={DefaultDataProvider:dp,defaultDimValueGetters:{arrayRows:xp,objectRows:function(t,e,i,n){return bp(t[e],this._dimensionInfos[e])},keyedColumns:xp,original:function(t,e,i,n){var r=t&&(null==t.value?t:t.value);return!this._rawData.pure&&op(t)&&(this.hasItemOption=!0),bp(r instanceof Array?r[n]:r,this._dimensionInfos[e])},typedArray:function(t,e,i,n){return t[n]}},retrieveRawValue:wp,retrieveRawAttr:Sp},Mp=Tp.retrieveRawValue,Cp=Hc.getTooltipMarker,Ip=Hc.formatTpl,Ap=Lo.getTooltipRenderMode,Dp=/\{@(.+?)\}/g,kp={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=Ap(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:Cp({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?Ip(l,s).replace(Dp,(function(e,i){var n=i.length;return"["===i.charAt(0)&&"]"===i.charAt(n-1)&&(i=+i.slice(1,n-1)),Mp(a,t,i)})):void 0},getRawValue:function(t,e){return Mp(this.getData(e),t)},formatTooltip:function(){}},Op=kp,Pp=Nt.isArray;function Lp(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0,this.context}var Rp=Lp.prototype;Rp.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),Pp(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(Pp(p))for(var g=0;g<p.length;g++)Bp(this,p[g],d,f,l,u);else Bp(this,p,d,f,l,u)}this._dueIndex=f;var m=null!=this._settedOutputEnd?this._settedOutputEnd:f;this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()};var Ep=function(){var t,e,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 Bp(t,e,i,n,r,a){Ep.reset(i,n,r,a),t._callingProgress=e,t._callingProgress({start:i,end:n,count:n-i,next:Ep.next},t.context)}Rp.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},Rp.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},Rp.pipe=function(t){(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},Rp.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},Rp.getUpstream=function(){return this._upstream},Rp.getDownstream=function(){return this._downstream},Rp.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t};var zp={createTask:function(t){return new Lp(t)}},Np=Hc.formatTime,Fp=Hc.encodeHTML,Hp=Hc.addCommas,Vp=Hc.getTooltipMarker,Wp=Qc.getLayoutParams,Gp=Qc.mergeLayoutParam,Up=zp.createTask,jp=Kd.prepareSource,Yp=Kd.getSource,Xp=Tp.retrieveRawValue,qp=Lo.makeInner(),Zp=rd.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendVisualProvider:null,visualColorAccessPath:"itemStyle.color",visualBorderColorAccessPath:"itemStyle.borderColor",layoutMode:null,init:function(t,e,i,n){this.seriesIndex=this.componentIndex,this.dataTask=Up({count:Kp,reset:Qp}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,i),jp(this);var r=this.getInitialData(t,i);tg(r,this),this.dataTask.context.data=r,qp(this).dataBeforeProcessed=r,$p(this)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?Wp(t):{},r=this.subType;rd.hasClass(r)&&(r+="Series"),Nt.merge(t,e.getTheme().get(this.subType)),Nt.merge(t,this.getDefaultOption()),Lo.defaultEmphasis(t,"label",["show"]),this.fillDataTextStyle(t.data),i&&Gp(t,n,i)},mergeOption:function(t,e){t=Nt.merge(this.option,t,!0),this.fillDataTextStyle(t.data);var i=this.layoutMode;i&&Gp(this.option,t,i),jp(this);var n=this.getInitialData(t,e);tg(n,this),this.dataTask.dirty(),this.dataTask.context.data=n,qp(this).dataBeforeProcessed=n,$p(this)},fillDataTextStyle:function(t){if(t&&!Nt.isTypedArray(t))for(var e=["show"],i=0;i<t.length;i++)t[i]&&t[i].label&&Lo.defaultEmphasis(t[i],"label",e)},getInitialData:function(){},appendData:function(t){this.getRawData().appendData(t.data)},getData:function(t){var e=ig(this);if(e){var i=e.context.data;return null==t?i:i.getLinkedData(t)}return qp(this).data},setData:function(t){var e=ig(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)}qp(this).data=t},getSource:function(){return Yp(this)},getRawData:function(){return qp(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:Fp(Hp(t)),style:s}}var h=this.getData(),c=h.mapDimension("defaultedTooltip",!0),d=c.length,f=this.getRawValue(t),p=Nt.isArray(f),g=h.getItemVisual(t,"color");Nt.isObject(g)&&g.colorStops&&(g=(g.colorStops[0]||{}).color),g=g||"transparent";var m=d>1||p&&!d?function(i){var a=Nt.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=Vp({color:g,type:"subItem",renderMode:n,markerId:f}),m="string"==typeof p?p:p.content,v=(a?m+Fp(c.displayName||"-")+": ":"")+Fp("ordinal"===d?t+"":"time"===d?e?"":Np("yyyy/MM/dd hh:mm:ss",t):Hp(t));v&&u.push(v),o&&(s[f]=g,++l)}}c.length?Nt.each(c,(function(e){d(Xp(h,t,e),e)})):Nt.each(i,d);var f=a?o?"\n":"<br/>":"",p=f+u.join(f||", ");return{renderMode:n,content:p,style:s}}(f):u(d?Xp(h,t,c[0]):p?f[0]:f),v=m.content,y=r.seriesIndex+"at"+l,_=Vp({color:g,type:"item",renderMode:n,markerId:y});s[y]=g,++l;var x=h.getName(t),b=this.name;Lo.isNameSpecified(this)||(b=""),b=b?Fp(b)+(e?": ":a):"";var w="string"==typeof _?_:_.content;return{html:e?w+b+v:b+w+(x?Fp(x)+": "+v:v),markers:s}},isAnimationEnabled:function(){if(J.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,i){var n=this.ecModel,r=cd.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 $p(t){var e=t.name;Lo.isNameSpecified(t)||(t.name=function(t){var e=t.getRawData(),i=e.mapDimension("seriesName",!0),n=[];return Nt.each(i,(function(t){var i=e.getDimensionInfo(t);i.displayName&&n.push(i.displayName)})),n.join(" ")}(t)||e)}function Kp(t){return t.model.getRawData().count()}function Qp(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),Jp}function Jp(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function tg(t,e){Nt.each(t.CHANGABLE_METHODS,(function(i){t.wrapMethod(i,Nt.curry(eg,e))}))}function eg(t){var e=ig(t);e&&e.setOutputEnd(this.count())}function ig(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}}Nt.mixin(Zp,Op),Nt.mixin(Zp,cd);var ng=Zp,rg=function(){this.group=new On,this.uid=yc.getUID("viewComponent")},ag=rg.prototype={constructor:rg,init:function(t,e){},render:function(t,e,i,n){},dispose:function(){},filterForExposedEvent:null};ag.updateView=ag.updateLayout=ag.updateVisual=function(t,e,i,n){},Wo.enableClassExtend(rg),Wo.enableClassManagement(rg,{registerWhenExtend:!0});var og=rg,sg=Lo.makeInner;var lg=function(){var t=sg();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"}},ug=Nt.each,hg=zp.createTask,cg=Lo.makeInner(),dg=lg();function fg(){this.group=new On,this.uid=yc.getUID("viewChart"),this.renderTask=hg({plan:vg,reset:yg}),this.renderTask.context={view:this}}fg.prototype={type:"chart",init:function(t,e){},render:function(t,e,i,n){},highlight:function(t,e,i,n){mg(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){mg(t.getData(),n,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var pg=fg.prototype;function gg(t,e,i){if(t&&(t.trigger(e,i),t.isGroup&&!tc.isHighDownDispatcher(t)))for(var n=0,r=t.childCount();n<r;n++)gg(t.childAt(n),e,i)}function mg(t,e,i){var n=Lo.queryDataIndex(t,e),r=e&&null!=e.highlightKey?tc.getHighlightDigit(e.highlightKey):null;null!=n?ug(Lo.normalizeToArray(n),(function(e){gg(t.getItemGraphicEl(e),i,r)})):t.eachItemGraphicEl((function(t){gg(t,i,r)}))}function vg(t){return dg(t.model)}function yg(t){var e=t.model,i=t.ecModel,n=t.api,r=t.payload,a=e.pipelineContext.progressiveRender,o=t.view,s=r&&cg(r).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return"render"!==l&&o[l](e,i,n,r),_g[l]}pg.updateView=pg.updateLayout=pg.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},Wo.enableClassExtend(fg,["dispose"]),Wo.enableClassManagement(fg,{registerWhenExtend:!0}),fg.markUpdateMethod=function(t,e){cg(t).updateMethod=e};var _g={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},xg=fg,bg="\0__throttleOriginMethod",wg="\0__throttleRate",Sg="\0__throttleType";function Tg(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 Mg=function(t,e,i,n){var r=t[e];if(r){var a=r[bg]||r,o=r[Sg];if(r[wg]!==i||o!==n){if(null==i||!n)return t[e]=a;(r=t[e]=Tg(a,i,"debounce"===n))[bg]=a,r[Sg]=n,r[wg]=i}return r}},Cg=function(t,e){var i=t[e];i&&i[bg]&&(t[e]=i[bg])},Ig={throttle:Tg,createOrUpdate:Mg,clear:Cg},Ag=Nt.isFunction,Dg={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var i=t.getData(),n=(t.visualColorAccessPath||"itemStyle.color").split("."),r=t.get(n),a=!Ag(r)||r instanceof Ru?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}}}},kg=Dg,Og={legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表，"},series:{single:{prefix:"",withName:"图表类型是{seriesType}，表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType}，",withoutName:"第{seriesId}个系列是一个{seriesType}，",separator:{middle:"；",end:"。"}}},data:{allData:"其数据是——",partialData:"其中，前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:"，",end:""}}}},Pg=Tp.retrieveRawValue;var Lg=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,Og.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=Pg(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 Nt.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=Og.aria,a=0;a<n.length;++a)r=r[n[a]];return r}return e}},Rg=Math.PI;var Eg=function(t,e){e=e||{},Nt.defaults(e,{text:"loading",textColor:"#000",fontSize:"12px",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#c23531",spinnerRadius:10,lineWidth:5,zlevel:0});var i=new tc.Group,n=new tc.Rect({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});i.add(n);var r=e.fontSize+" sans-serif",a=new tc.Rect({style:{fill:"none",text:e.text,font:r,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});if(i.add(a),e.showSpinner){var o=new tc.Arc({shape:{startAngle:-Rg/2,endAngle:-Rg/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001});o.animateShape(!0).when(1e3,{endAngle:3*Rg/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:3*Rg/2}).delay(300).start("circularInOut"),i.add(o)}return i.resize=function(){var i=Wr.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},Bg=Nt.each,zg=Nt.map,Ng=Nt.isFunction,Fg=Nt.createHashMap,Hg=Nt.noop,Vg=zp.createTask,Wg=yc.getUID,Gg=Lo.normalizeToArray;function Ug(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=Fg()}var jg=Ug.prototype;function Yg(t,e,i,n,r){var a;function o(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}r=r||{},Bg(e,(function(e,s){if(!r.visualType||r.visualType===e.visualType){var l=t._stageTaskMap.get(e.uid),u=l.seriesTaskMap,h=l.overallTask;if(h){var c,d=h.agentStubMap;d.each((function(t){o(r,t)&&(t.dirty(),c=!0)})),c&&h.dirty(),Xg(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),Xg(s,n),a|=s.perform(u)}))}})),t.unfinished|=a}jg.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each((function(t){var e=t.overallTask;e&&e.dirty()}))},jg.getPerformArgs=function(t,e){if(t.__pipeline){var 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}}},jg.getPipeline=function(t){return this._pipelineMap.get(t)},jg.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}},jg.restorePipelines=function(t){var e=this,i=e._pipelineMap=Fg();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}),nm(e,t,t.dataTask)}))},jg.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.ecInstance.getModel(),i=this.api;Bg(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=Fg()),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,Vg({plan:Qg,reset:Jg,count:im}));s.context={model:i,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:t},nm(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||Vg({reset:qg});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:t};var o=a.agentStubMap=a.agentStubMap||Fg(),s=e.seriesType,l=e.getTargetSeries,u=!0,h=e.modifyOutputEnd;s?n.eachRawSeriesByType(s,c):l?l(n,r).each(c):(u=!1,Bg(n.getSeries(),c));function c(e){var i=e.uid,n=o.get(i);n||(n=o.set(i,Vg({reset:Zg,onDirty:Kg})),a.dirty()),n.context={model:e,overallProgress:u,modifyOutputEnd:h},n.agent=a,n.__block=u,nm(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)},jg.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,nm(this,e,r)},jg.performDataProcessorTasks=function(t,e){Yg(this,this._dataProcessorHandlers,t,e,{block:!0})},jg.performVisualTasks=function(t,e,i){Yg(this,this._visualHandlers,t,e,i)},jg.performSeriesTasks=function(t){var e;t.eachSeries((function(t){e|=t.dataTask.perform()})),this.unfinished|=e},jg.plan=function(){this._pipelineMap.each((function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)}))};var Xg=jg.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)};function qg(t){t.overallReset(t.ecModel,t.api,t.payload)}function Zg(t,e){return t.overallProgress&&$g}function $g(){this.agent.dirty(),this.getDownstream().dirty()}function Kg(){this.agent&&this.agent.dirty()}function Qg(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function Jg(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=Gg(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?zg(e,(function(t,e){return em(e)})):tm}var tm=em(0);function em(t){return function(e,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 im(t){return t.data.count()}function nm(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 rm(t){am=null;try{t(om,sm)}catch(t){}return am}Ug.wrapStageHandler=function(t,e){return Ng(t)&&(t={overallReset:t,seriesType:rm(t)}),t.uid=Wg("stageHandler"),e&&(t.visualType=e),t};var am,om={},sm={};function lm(t,e){for(var i in e.prototype)t[i]=Hg}lm(om,yf),lm(sm,xf),om.eachSeriesByType=om.eachRawSeriesByType=function(t){am=t},om.eachComponent=function(t){"series"===t.mainType&&t.subType&&(am=t.subType)};var um=Ug,hm=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],cm={color:hm,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],hm]},dm="#eee",fm=function(){return{axisLine:{lineStyle:{color:dm}},axisTick:{lineStyle:{color:dm}},axisLabel:{textStyle:{color:dm}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:dm}}}},pm=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],gm={color:pm,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:dm},crossStyle:{color:dm},label:{color:"#000"}}},legend:{textStyle:{color:dm}},textStyle:{color:dm},title:{textStyle:{color:dm}},toolbox:{iconStyle:{normal:{borderColor:dm}}},dataZoom:{textStyle:{color:dm}},visualMap:{textStyle:{color:dm}},timeline:{lineStyle:{color:dm},itemStyle:{normal:{color:pm[1]}},label:{normal:{textStyle:{color:dm}}},controlStyle:{normal:{color:dm,borderColor:dm}}},timeAxis:fm(),logAxis:fm(),valueAxis:fm(),categoryAxis:fm(),line:{symbol:"circle"},graph:{color:pm},gauge:{title:{textStyle:{color:dm}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};gm.categoryAxis.splitLine.show=!1;var mm=gm,vm=Kd.detectSourceFormat,ym=dd.SERIES_LAYOUT_BY_COLUMN;rd.extend({type:"dataset",defaultOption:{seriesLayoutBy:ym,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){vm(this)}}),og.extend({type:"dataset"});var _m=xl.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()}}),xm=Fl.createFromString,bm=Nt.isString,wm=Nt.extend,Sm=Nt.defaults,Tm=Nt.trim,Mm=Nt.each,Cm=/[\s,]+/;function Im(t){bm(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 Am(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}Am.prototype.parse=function(t,e){e=e||{};var i=Im(t);if(!i)throw new Error("Illegal svg");var n=new On;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),Rm(i,n,null,!0);for(var s,l,u=i.firstChild;u;)this._parseNode(u,n),u=u.nextSibling;if(r){var h=Tm(r).split(Cm);h.length>=4&&(s={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(s&&null!=a&&null!=o&&(l=Fm(s,a,o),!e.ignoreViewBox)){var c=n;(n=new On).add(c),c.scale=l.scale.slice(),c.position=l.position.slice()}return e.ignoreRootClip||null==a||null==o||n.setClipPath(new vu({shape:{x:0,y:0,width:a,height:o}})),{root:n,width:a,height:o,viewBoxRect:s,viewBoxTransform:l}},Am.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=km[r]){var a=n.call(this,t),o=t.getAttribute("id");o&&(this._defs[o]=a)}}else(n=Dm[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)},Am.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 Wl({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});Om(e,r),Rm(t,r,this._defs);var a=r.style.fontSize;a&&a<9&&(r.style.fontSize=9,r.scale=r.scale||[1,1],r.scale[0]*=a/9,r.scale[1]*=a/9);var o=r.getBoundingRect();return this._textX+=o.width,e.add(r),r};var Dm={g:function(t,e){var i=new On;return Om(e,i),Rm(t,i,this._defs),i},rect:function(t,e){var i=new vu;return Om(e,i),Rm(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 Gl;return Om(e,i),Rm(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 xu;return Om(e,i),Rm(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 _m;return Om(e,i),Rm(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=Pm(i));var n=new lu({shape:{points:i||[]}});return Om(e,n),Rm(t,n,this._defs),n},polyline:function(t,e){var i=new xl;Om(e,i),Rm(t,i,this._defs);var n=t.getAttribute("points");return n&&(n=Pm(n)),new uu({shape:{points:n||[]}})},image:function(t,e){var i=new Ia;return Om(e,i),Rm(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 On;return Om(e,o),Rm(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 On;return Om(e,o),Rm(t,o,this._defs),this._textX+=r,this._textY+=a,o},path:function(t,e){var i=t.getAttribute("d")||"",n=xm(i);return Om(e,n),Rm(t,n,this._defs),n}},km={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 Bu(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 Om(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),Sm(e.__inheritedStyle,t.__inheritedStyle))}function Pm(t){for(var e=Tm(t).split(Cm),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 Lm={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-align":"textAlign","alignment-baseline":"textBaseline"};function Rm(t,e,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(zm,(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||ei.create(),s){case"translate":o=Tm(o).split(Cm),ei.translate(n,n,[parseFloat(o[0]),parseFloat(o[1]||0)]);break;case"scale":o=Tm(o).split(Cm),ei.scale(n,n,[parseFloat(o[0]),parseFloat(o[1]||o[0])]);break;case"rotate":o=Tm(o).split(Cm),ei.rotate(n,n,parseFloat(o[0]));break;case"skew":o=Tm(o).split(Cm),console.warn("Skew transform is not supported yet");break;case"matrix":o=Tm(o).split(Cm);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),wm(r,function(t){var e=t.getAttribute("style"),i={};if(!e)return i;var n,r={};Nm.lastIndex=0;for(;null!=(n=Nm.exec(e));)r[n[1]]=n[2];for(var a in Lm)Lm.hasOwnProperty(a)&&null!=r[a]&&(i[Lm[a]]=r[a]);return i}(t)),!n))for(var o in Lm)if(Lm.hasOwnProperty(o)){var s=t.getAttribute(o);null!=s&&(r[Lm[o]]=s)}var l=a?"textFill":"fill",u=a?"textStroke":"stroke";e.style=e.style||new tr;var h=e.style;null!=r.fill&&h.set(l,Bm(r.fill,i)),null!=r.stroke&&h.set(u,Bm(r.stroke,i)),Mm(["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"),Mm(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],(function(t){null!=r[t]&&h.set(t,r[t])})),r.lineDash&&(e.style.lineDash=Tm(r.lineDash).split(Cm)),h[u]&&"none"!==h[u]&&(e[u]=!0),e.__inheritedStyle=r}var Em=/url\(\s*#(.*?)\)/;function Bm(t,e){var i=e&&t&&t.match(Em);return i?e[Tm(i[1])]:t}var zm=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;var Nm=/([^\s:;]+)\s*:\s*([^:;]+)/g;function Fm(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 Hm={parseXML:Im,makeViewBoxTransform:Fm,parseSVG:function(t,e){return(new Am).parse(t,e)}},Vm=Nt.createHashMap,Wm=Nt.isString,Gm=Nt.isArray,Um=Nt.each,jm=Hm.parseXML,Ym=Vm(),Xm={registerMap:function(t,e,i){var n;return Gm(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}]),Um(n,(function(t){var e=t.type;"geoJson"===e&&(e=t.type="geoJSON"),(0,qm[e])(t)})),Ym.set(t,n)},retrieveMap:function(t){return Ym.get(t)}},qm={geoJSON:function(t){var e=t.source;t.geoJSON=Wm(e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=jm(t.source)}},Zm=Xm;function $m(t){return t}function Km(t,e,i,n,r){this._old=t,this._new=e,this._oldKeyGetter=i||$m,this._newKeyGetter=n||$m,this.context=r}function Qm(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))}}Km.prototype={constructor:Km,add:function(t){return this._add=t,this},update:function(t){return this._update=t,this},remove:function(t){return this._remove=t,this},execute:function(){var t=this._old,e=this._new,i={},n=[],r=[];for(Qm(t,{},n,"_oldKeyGetter",this),Qm(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 Jm=Km,tv=Nt.each,ev=Nt.createHashMap,iv=ev(["tooltip","label","itemName","itemId","seriesName"]);function nv(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}var rv=function(t){var e={},i=e.encode={},n=ev(),r=[],a=[],o=e.userOutput={dimensionNames:t.dimensions.slice(),encode:{}};tv(t.dimensions,(function(e){var s,l=t.getDimensionInfo(e),u=l.coordDim;if(u){var h=l.coordDimIndex;nv(i,u)[h]=e,l.isExtraCoord||(n.set(u,1),"ordinal"!==(s=l.type)&&"time"!==s&&(r[0]=e),nv(o.encode,u)[h]=l.index),l.defaultTooltip&&a.push(e)}iv.each((function(t,e){var n=nv(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},av={OTHER_DIMENSIONS:iv,summarizeDimensions:rv,getDimensionTypeByAxis:function(t){return"category"===t?"ordinal":"time"===t?"time":"float"}};var ov=function(t){null!=t&&Nt.extend(this,t),this.otherDims={}},sv=Tp.defaultDimValueGetters,lv=Tp.DefaultDataProvider,uv=av.summarizeDimensions,hv=Nt.isObject,cv="undefined",dv={float:typeof Float64Array===cv?Array:Float64Array,int:typeof Int32Array===cv?Array:Int32Array,ordinal:Array,number:Array,time:Array},fv=typeof Uint32Array===cv?Array:Uint32Array,pv=typeof Int32Array===cv?Array:Int32Array,gv=typeof Uint16Array===cv?Array:Uint16Array;function mv(t){return t._rawCount>65535?fv:gv}var vv=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],yv=["_extent","_approximateExtent","_rawExtent"];function _v(t,e){Nt.each(vv.concat(e.__wrappedMethods||[]),(function(i){e.hasOwnProperty(i)&&(t[i]=e[i])})),t.__wrappedMethods=e.__wrappedMethods,Nt.each(yv,(function(i){t[i]=Nt.clone(e[i])})),t._calculationInfo=Nt.extend(e._calculationInfo)}var xv=function(t,e){t=t||["x","y"];for(var i={},n=[],r={},a=0;a<t.length;a++){var o=t[a];Nt.isString(o)?o=new ov({name:o}):o instanceof ov||(o=new ov(o));var s=o.name;o.type=o.type||"float",o.coordDim||(o.coordDim=s,o.coordDimIndex=0),o.otherDims=o.otherDims||{},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=uv(this),this._invertedIndicesMap=r,this._calculationInfo={},this.userOutput=this._dimensionsSummary.userOutput},bv=xv.prototype;function wv(t,e,i,n,r){var a=dv[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 Sv(t){var e=t._invertedIndicesMap;Nt.each(e,(function(i,n){var r=t._dimensionInfos[n].ordinalMeta;if(r){i=e[n]=new pv(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 Tv(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 Mv(t){return t}function Cv(t){return t<this._count&&t>=0?this._indices[t]:-1}function Iv(t,e){var i=t._idList[e];return null==i&&(i=Tv(t,t._idDimIdx,e)),null==i&&(i="e\0\0"+e),i}function Av(t){return Nt.isArray(t)||(t=[t]),t}function Dv(t,e){var i=t.dimensions,n=new xv(Nt.map(i,t.getDimensionInfo,t),t.hostModel);_v(n,t);for(var r=n._storage={},a=t._storage,o=0;o<i.length;o++){var s=i[o];a[s]&&(Nt.indexOf(e,s)>=0?(r[s]=kv(a[s]),n._rawExtent[s]=Ov(),n._extent[s]=null):r[s]=a[s])}return n}function kv(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 Ov(){return[1/0,-1/0]}bv.type="list",bv.hasItemOption=!0,bv.getDimension=function(t){return"number"!=typeof t&&(isNaN(t)||this._dimensionInfos.hasOwnProperty(t))||(t=this.dimensions[t]),t},bv.getDimensionInfo=function(t){return this._dimensionInfos[this.getDimension(t)]},bv.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},bv.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]},bv.initData=function(t,e,i){(wd.isInstance(t)||Nt.isArrayLike(t))&&(t=new lv(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=sv[this._rawData.getSource().sourceFormat],this._dimValueGetter=i=i||this.defaultDimValueGetter,this._dimValueGetterArrayRows=sv.arrayRows,this._rawExtent={},this._initDataFromProvider(0,t.count()),t.pure&&(this.hasItemOption=!1)},bv.getProvider=function(){return this._rawData},bv.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)},bv.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]=Ov()),n[v]||(n[v]=[]),wv(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={},Sv(this)},bv._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]=Ov());var g=l[b];0===g.otherDims.itemName&&(i=this._nameDimIdx=p),0===g.otherDims.itemId&&(this._idDimIdx=p),a[b]||(a[b]=[]),wv(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={},Sv(this)}},bv.count=function(){return this._count},bv.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=mv(this))(this.count());for(n=0;n<r.length;n++)r[n]=n}return r},bv.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]},bv.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]},bv._getFast=function(t,e){var i=Math.floor(e/this._chunkSize),n=e%this._chunkSize;return this._storage[t][i][n]},bv.getValues=function(t,e){var i=[];Nt.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},bv.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},bv.getDataExtent=function(t){t=this.getDimension(t);var e=this._storage[t],i=Ov();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},bv.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},bv.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},bv.getCalculationInfo=function(t){return this._calculationInfo[t]},bv.setCalculationInfo=function(t,e){hv(t)?Nt.extend(this._calculationInfo,t):this._calculationInfo[t]=e},bv.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},bv.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},bv.rawIndexOf=function(t,e){var i=(t&&this._invertedIndicesMap[t])[e];return null==i||isNaN(i)?-1:i},bv.indexOfName=function(t){for(var e=0,i=this.count();e<i;e++)if(this.getName(e)===t)return e;return-1},bv.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},bv.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},bv.getRawIndex=Mv,bv.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},bv.getName=function(t){var e=this.getRawIndex(t);return this._nameList[e]||Tv(this,this._nameDimIdx,e)||""},bv.getId=function(t){return Iv(this,this.getRawIndex(t))},bv.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=Nt.map(Av(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)}}},bv.filterSelf=function(t,e,i,n){if(this._count){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this,t=Nt.map(Av(t),this.getDimension,this);for(var r=this.count(),a=new(mv(this))(r),o=[],s=t.length,l=0,u=t[0],h=0;h<r;h++){var c,d=this.getRawIndex(h);if(0===s)c=e.call(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?Cv:Mv,this}},bv.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(mv(this))(r),o=0,s=e[0],l=t[s][0],u=t[s][1],h=!1;if(!this._indices){var c=0;if(1===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?Cv:Mv,this}}},bv.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},bv.map=function(t,e,i,n){i=i||n||this;var r=Dv(this,t=Nt.map(Av(t),this.getDimension,this));r._indices=this._indices,r.getRawIndex=r._indices?Cv:Mv;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},bv.downSample=function(t,e,i,n){for(var r=Dv(this,[t]),a=r._storage,o=[],s=Math.floor(1/e),l=a[t],u=this.count(),h=this._chunkSize,c=r._rawExtent[t],d=new(mv(this))(u),f=0,p=0;p<u;p+=s){s>u-p&&(s=u-p,o.length=s);for(var g=0;g<s;g++){var m=this.getRawIndex(p+g),v=Math.floor(m/h),y=m%h;o[g]=l[v][y]}var _=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=Cv,r},bv.getItemModel=function(t){var e=this.hostModel;return new gc(this.getRawDataItem(t),e,e&&e.ecModel)},bv.diff=function(t){var e=this;return new Jm(t?t.getIndices():[],this.getIndices(),(function(e){return Iv(t,e)}),(function(t){return Iv(e,t)}))},bv.getVisual=function(t){var e=this._visual;return e&&e[t]},bv.setVisual=function(t,e){if(hv(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},bv.setLayout=function(t,e){if(hv(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},bv.getLayout=function(t){return this._layout[t]},bv.getItemLayout=function(t){return this._itemLayouts[t]},bv.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?Nt.extend(this._itemLayouts[t]||{},e):e},bv.clearItemLayouts=function(){this._itemLayouts.length=0},bv.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],r=n&&n[e];return null!=r||i?r:this.getVisual(e)},bv.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{},r=this.hasItemVisual;if(this._itemVisuals[t]=n,hv(e))for(var a in e)e.hasOwnProperty(a)&&(n[a]=e[a],r[a]=!0);else n[e]=i,r[e]=!0},bv.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var Pv=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};bv.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(Pv,e)),this._graphicEls[t]=e},bv.getItemGraphicEl=function(t){return this._graphicEls[t]},bv.eachItemGraphicEl=function(t,e){Nt.each(this._graphicEls,(function(i,n){i&&t&&t.call(e,i,n)}))},bv.cloneShallow=function(t){if(!t){var e=Nt.map(this.dimensions,this.getDimensionInfo,this);t=new xv(e,this.hostModel)}if(t._storage=this._storage,_v(t,this),this._indices){var i=this._indices.constructor;t._indices=new i(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?Cv:Mv,t},bv.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(Nt.slice(arguments)))})},bv.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],bv.CHANGABLE_METHODS=["filterSelf","selectRange"];var Lv=xv,Rv=Nt.createHashMap,Ev=Nt.each,Bv=Nt.isString,zv=Nt.defaults,Nv=Nt.extend,Fv=Nt.isObject,Hv=Nt.clone,Vv=Lo.normalizeToArray,Wv=Kd.guessOrdinal,Gv=Kd.BE_ORDINAL,Uv=av.OTHER_DIMENSIONS;function jv(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 Yv=function(t,e,i){wd.isInstance(e)||(e=wd.seriesDataToSource(e)),i=i||{},t=(t||[]).slice();for(var n=(i.dimsDef||[]).slice(),r=Rv(),a=Rv(),o=[],s=function(t,e,i,n){var r=Math.max(t.dimensionsDetectCount||1,e.length,i.length,n||0);return Ev(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]=Nv({},Fv(n[l])?n[l]:{name:n[l]}),h=u.name,c=o[l]=new ov;null!=h&&null==r.get(h)&&(c.name=c.displayName=h,r.set(h,l)),null!=u.type&&(c.type=u.type),null!=u.displayName&&(c.displayName=u.displayName)}var d=i.encodeDef;!d&&i.encodeDefaulter&&(d=i.encodeDefaulter(e,s)),(d=Rv(d)).each((function(t,e){if(1===(t=Vv(t).slice()).length&&!Bv(t[0])&&t[0]<0)d.set(e,!1);else{var i=d.set(e,[]);Ev(t,(function(t,n){Bv(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!=Uv.get(e)?t.otherDims[e]=i:(t.coordDim=e,t.coordDimIndex=i,a.set(e,!0))}Ev(t,(function(t,e){var i,n,r;if(Bv(t))i=t,t={};else{i=t.name;var a=t.ordinalMeta;t.ordinalMeta=null,(t=Hv(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=Vv(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++)}Ev(s,(function(e,a){var s=o[e];if(p(zv(s,t),i,a),null==s.name&&n){var l=n[a];!Fv(l)&&(l={name:l}),s.name=s.displayName=l.name,s.defaultTooltip=l.defaultTooltip}r&&zv(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 ov).coordDim&&(c.coordDim=jv(y,a,v),c.coordDimIndex=0,(!g||m<=0)&&(c.isExtraCoord=!0),m--),null==c.name&&(c.name=jv(c.coordDim,r)),null!=c.type||Wv(e,_,c.name)!==Gv.Must&&(!c.isExtraCoord||null==c.otherDims.itemName&&null==c.otherDims.seriesName)||(c.type="ordinal")}return o},Xv=Yv;var qv=function(t,e){return Xv((e=e||{}).coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,encodeDefaulter:e.encodeDefaulter,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})},Zv=Nt.createHashMap,$v=Nt.each;function Kv(t){this.coordSysName=t,this.coordSysDims=[],this.axisMap=Zv(),this.categoryAxisMap=Zv(),this.firstCategoryDimIndex=null}var Qv={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),Jv(r)&&(n.set("x",r),e.firstCategoryDimIndex=0),Jv(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),Jv(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),Jv(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),Jv(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();$v(a.parallelAxisIndex,(function(t,a){var s=r.getComponent("parallelAxis",t),l=o[a];i.set(l,s),Jv(s)&&null==e.firstCategoryDimIndex&&(n.set(l,s),e.firstCategoryDimIndex=a)}))}};function Jv(t){return"category"===t.get("type")}var ty={getCoordSysInfoBySeries:function(t){var e=t.get("coordinateSystem"),i=new Kv(e),n=Qv[e];if(n)return n(t,i,i.axisMap,i.categoryAxisMap),i}},ey=Nt.each,iy=Nt.isString;function ny(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}var ry=function(t,e){return ny(t,e)?t.getCalculationInfo("stackResultDimension"):e},ay={enableDataStack:function(t,e,i){var n,r,a,o,s=(i=i||{}).byIndex,l=i.stackedCoordDimension,u=!(!t||!t.get("stack"));if(ey(e,(function(t,i){iy(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;ey(e,(function(t){t.coordDim===h&&d++})),e.push({name:a,coordDim:h,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0}),d++,e.push({name:o,coordDim:o,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:r&&r.name,stackedByDimension:n&&n.name,isStackedByIndex:s,stackedOverDimension:o,stackResultDimension:a}},isDimensionStacked:ny,getStackedDimension:ry},oy=dd.SOURCE_FORMAT_ORIGINAL,sy=av.getDimensionTypeByAxis,ly=Lo.getDataItemValue,uy=ty.getCoordSysInfoBySeries,hy=ay.enableDataStack,cy=Kd.makeSeriesEncodeForAxisCoordSys;var dy=function(t,e,i){i=i||{},wd.isInstance(t)||(t=wd.seriesDataToSource(t));var n,r=e.get("coordinateSystem"),a=Sf.get(r),o=uy(e);o&&(n=Nt.map(o.coordSysDims,(function(t){var e={name:t},i=o.axisMap.get(t);if(i){var n=i.get("type");e.type=sy(n)}return e}))),n||(n=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]);var s,l,u=qv(t,{coordDimensions:n,generateCoord:i.generateCoord,encodeDefaulter:i.useEncodeDefaulter?Nt.curry(cy,n,e):null});o&&Nt.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=hy(e,u),c=new Lv(u,e);c.setCalculationInfo(h);var d=null!=s&&function(t){if(t.sourceFormat===oy){var e=function(t){var e=0;for(;e<t.length&&null==t[e];)e++;return t[e]}(t.data||[]);return null!=e&&!Nt.isArray(ly(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},fy=dy;function py(t){this._setting=t||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}py.prototype.parse=function(t){return t},py.prototype.getSetting=function(t){return this._setting[t]},py.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},py.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},py.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},py.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},py.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},py.prototype.getExtent=function(){return this._extent.slice()},py.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},py.prototype.isBlank=function(){return this._isBlank},py.prototype.setBlank=function(t){this._isBlank=t},py.prototype.getLabel=null,Wo.enableClassExtend(py),Wo.enableClassManagement(py,{registerWhenExtend:!0});var gy=py,my=Nt.createHashMap,vy=Nt.isObject,yy=Nt.map;function _y(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this._map}_y.createByAxisModel=function(t){var e=t.option,i=e.data,n=i&&yy(i,wy);return new _y({categories:n,needCollect:!n,deduplication:!1!==e.dedplication})};var xy=_y.prototype;function by(t){return t._map||(t._map=my(t.categories))}function wy(t){return vy(t)&&null!=t.value?t.value:t+""}xy.getOrdinal=function(t){return by(this).get(t)},xy.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=by(this);return null==(e=n.get(t))&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=NaN),e};var Sy=_y,Ty=gy.prototype,My=gy.extend({type:"ordinal",init:function(t,e){t&&!Nt.isArray(t)||(t=new Sy({categories:t})),this._ordinalMeta=t,this._extent=e||[0,t.categories.length-1]},parse:function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},contain:function(t){return t=this.parse(t),Ty.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return Ty.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(Ty.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:Nt.noop,niceExtent:Nt.noop});My.create=function(){return new My};var Cy=My,Iy=Ic.round;function Ay(t){return Ic.getPrecisionSafe(t)+2}function Dy(t,e,i){t[e]=Math.max(Math.min(t[e],i[1]),i[0])}function ky(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),Dy(t,0,e),Dy(t,1,e),t[0]>t[1]&&(t[0]=t[1])}var Oy={intervalScaleNiceTicks:function(t,e,i,n){var r={},a=t[1]-t[0],o=r.interval=Ic.nice(a/e,!0);null!=i&&o<i&&(o=r.interval=i),null!=n&&o>n&&(o=r.interval=n);var s=r.intervalPrecision=Ay(o);return ky(r.niceTickExtent=[Iy(Math.ceil(t[0]/o)*o,s),Iy(Math.floor(t[1]/o)*o,s)],t),r},getIntervalPrecision:Ay,fixExtent:ky},Py=Ic.round,Ly=gy.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]),Ly.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Oy.getIntervalPrecision(t)},getTicks:function(t){var e=this._interval,i=this._extent,n=this._niceExtent,r=this._intervalPrecision,a=[];if(!e)return a;i[0]<n[0]&&(t?a.push(Py(n[0]-e,r)):a.push(i[0]));for(var o=n[0];o<=n[1]&&(a.push(o),(o=Py(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(Py(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=Ic.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=Ic.getPrecisionSafe(t)||0:"auto"===i&&(i=this._intervalPrecision),t=Py(t,i,!0),Hc.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=Oy.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]=Py(Math.floor(e[0]/r)*r)),t.fixMax||(e[1]=Py(Math.ceil(e[1]/r)*r))}});Ly.create=function(){return new Ly};var Ry=Ly,Ey=Ic.parsePercent,By=ay.isDimensionStacked,zy="__ec_stack_",Ny="undefined"!=typeof Float32Array?Float32Array:Array;function Fy(t){return t.get("stack")||zy+t.seriesIndex}function Hy(t){return t.dim+t.index}function Vy(t,e){var i=[];return e.eachSeriesByType(t,(function(t){Yy(t)&&!Xy(t)&&i.push(t)})),i}function Wy(t){var e=function(t){var e={};Nt.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 Nt.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=Ey(t.get("barWidth"),n),f=Ey(t.get("barMaxWidth"),n),p=Ey(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:Hy(r),stackId:Fy(t)})})),Gy(i)}function Gy(t){var e={};Nt.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 Nt.each(e,(function(t,e){i[e]={};var n=t.stacks,r=t.bandWidth,a=Ey(t.categoryGap,r),o=Ey(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,u=(s-a)/(l+(l-1)*o);u=Math.max(u,0),Nt.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;Nt.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;Nt.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 Uy(t,e,i){if(t&&e){var n=t[Hy(e)];return null!=n&&null!=i&&(n=n[Fy(i)]),n}}var jy={seriesType:"bar",plan:lg(),reset:function(t){if(Yy(t)&&Xy(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=Uy(Wy([t]),r,t).width;return h>.5||(h=.5),{progress:function(t,e){var c,d=t.count,f=new Ny(2*d),p=new Ny(2*d),g=new Ny(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:qy(r,a),backgroundStart:l?n.x:n.y,valueAxisHorizontal:l})}}}}};function Yy(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function Xy(t){return t.pipelineContext&&t.pipelineContext.large}function qy(t,e,i){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}var Zy=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(Nt.defaults({bandWidth:r,axisKey:n,stackId:zy+a},t));var o=Gy(e),s=[];for(a=0;a<t.count;a++){var l=o[n][zy+a];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}},$y=function(t,e){var i=Vy(t,e),n=Wy(i),r={};Nt.each(i,(function(t){var e=t.getData(),i=t.coordinateSystem,a=i.getBaseAxis(),o=Fy(t),s=n[Hy(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=By(e,d),g=h.isHorizontal(),m=qy(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)},Ky={getLayoutOnAxis:Zy,prepareLayoutBarSeries:Vy,makeColumnLayout:Wy,retrieveColumnLayout:Uy,layout:$y,largeLayout:jy},Qy=Ry.prototype,Jy=Math.ceil,t_=Math.floor,e_=1e3,i_=6e4,n_=36e5,r_=864e5,a_=Ry.extend({type:"time",getLabel:function(t){var e=this._stepLvl,i=new Date(t);return Hc.formatTime(e[0],i,this.getSetting("useUTC"))},niceExtent:function(t){var e=this._extent;if(e[0]===e[1]&&(e[0]-=r_,e[1]+=r_),e[1]===-1/0&&e[0]===1/0){var i=new Date;e[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),e[0]=e[1]-r_}this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var n=this._interval;t.fixMin||(e[0]=Ic.round(t_(e[0]/n)*n)),t.fixMax||(e[1]=Ic.round(Jy(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=o_.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}(o_,a,0,o),l=o_[Math.min(s,o-1)],u=l[1];if("year"===l[0]){var h=r/u;u*=Ic.nice(h/t,!0)}var c=this.getSetting("useUTC")?0:60*new Date(+n[0]||+n[1]).getTimezoneOffset()*1e3,d=[Math.round(Jy((n[0]-c)/u)*u+c),Math.round(t_((n[1]-c)/u)*u+c)];Oy.fixExtent(d,n),this._stepLvl=l,this._interval=u,this._niceExtent=d},parse:function(t){return+Ic.parseDate(t)}});Nt.each(["contain","normalize"],(function(t){a_.prototype[t]=function(e){return Qy[t].call(this,this.parse(e))}}));var o_=[["hh:mm:ss",e_],["hh:mm:ss",5e3],["hh:mm:ss",1e4],["hh:mm:ss",15e3],["hh:mm:ss",3e4],["hh:mm\nMM-dd",i_],["hh:mm\nMM-dd",3e5],["hh:mm\nMM-dd",6e5],["hh:mm\nMM-dd",9e5],["hh:mm\nMM-dd",18e5],["hh:mm\nMM-dd",n_],["hh:mm\nMM-dd",72e5],["hh:mm\nMM-dd",216e5],["hh:mm\nMM-dd",432e5],["MM-dd\nyyyy",r_],["MM-dd\nyyyy",1728e5],["MM-dd\nyyyy",2592e5],["MM-dd\nyyyy",3456e5],["MM-dd\nyyyy",432e6],["MM-dd\nyyyy",5184e5],["week",6048e5],["MM-dd\nyyyy",864e6],["week",12096e5],["week",18144e5],["month",26784e5],["week",36288e5],["month",53568e5],["week",6048e6],["quarter",8208e6],["month",107136e5],["month",13392e6],["half-year",16416e6],["month",214272e5],["month",26784e6],["year",32832e6]];a_.create=function(t){return new a_({useUTC:t.ecModel.get("useUTC")})};var s_=gy.prototype,l_=Ry.prototype,u_=Ic.getPrecisionSafe,h_=Ic.round,c_=Math.floor,d_=Math.ceil,f_=Math.pow,p_=Math.log,g_=gy.extend({type:"log",base:10,$constructor:function(){gy.apply(this,arguments),this._originalScale=new Ry},getTicks:function(t){var e=this._originalScale,i=this._extent,n=e.getExtent();return Nt.map(l_.getTicks.call(this,t),(function(t){var r=Ic.round(f_(this.base,t));return r=t===i[0]&&e.__fixMin?m_(r,n[0]):r,r=t===i[1]&&e.__fixMax?m_(r,n[1]):r}),this)},getMinorTicks:l_.getMinorTicks,getLabel:l_.getLabel,scale:function(t){return t=s_.scale.call(this,t),f_(this.base,t)},setExtent:function(t,e){var i=this.base;t=p_(t)/p_(i),e=p_(e)/p_(i),l_.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=s_.getExtent.call(this);e[0]=f_(t,e[0]),e[1]=f_(t,e[1]);var i=this._originalScale,n=i.getExtent();return i.__fixMin&&(e[0]=m_(e[0],n[0])),i.__fixMax&&(e[1]=m_(e[1],n[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=p_(t[0])/p_(e),t[1]=p_(t[1])/p_(e),s_.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(i===1/0||i<=0)){var n=Ic.quantity(i);for(t/i*n<=.5&&(n*=10);!isNaN(n)&&Math.abs(n)<1&&Math.abs(n)>0;)n*=10;var r=[Ic.round(d_(e[0]/n)*n),Ic.round(c_(e[1]/n)*n)];this._interval=n,this._niceExtent=r}},niceExtent:function(t){l_.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});function m_(t,e){return h_(t,u_(e))}Nt.each(["contain","normalize"],(function(t){g_.prototype[t]=function(e){return e=p_(e)/p_(this.base),s_[t].call(this,e)}})),g_.create=function(){return new g_};var v_=Ky.prepareLayoutBarSeries,y_=Ky.makeColumnLayout,__=Ky.retrieveColumnLayout;function x_(t,e){var 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"),Nt.isArray(n)||(n=[n||0,n||0]),"boolean"==typeof n[0]&&(n=[0,0]),n[0]=Ic.parsePercent(n[0],1),n[1]=Ic.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(Nt.eqNaN(o)||Nt.eqNaN(s)||"ordinal"===a&&!t.getOrdinalMeta().categories.length),e.getNeedCrossZero()&&(o>0&&s>0&&!u&&(o=0),o<0&&s<0&&!h&&(s=0));var c=e.ecModel;if(c&&"time"===a){var d,f=v_("bar",c);if(Nt.each(f,(function(t){d|=t.getBaseAxis()===e.axis})),d){var p=y_(f),g=function(t,e,i,n){var r=i.axis.getExtent(),a=r[1]-r[0],o=__(n,i.axis);if(void 0===o)return{min:t,max:e};var s=1/0;Nt.each(o,(function(t){s=Math.min(t.offset,s)}));var l=-1/0;Nt.each(o,(function(t){l=Math.max(t.offset+t.width,l)})),s=Math.abs(s),l=Math.abs(l);var u=s+l,h=e-t,c=h/(1-(s+l)/a)-h;return e+=c*(l/u),t-=c*(s/u),{min:t,max:e}}(o,s,e,p);o=g.min,s=g.max}}return{extent:[o,s],fixMin:u,fixMax:h}}function b_(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(w_(t,e),r)}:function(e){return t.scale.getLabel(e)}}function w_(t,e){return"category"===t.type?t.scale.getLabel(e):e}function S_(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 Dn(n.x,n.y,o,s)}function T_(t){var e=t.get("interval");return null==e?"auto":e}var M_=function(t,e){var i=x_(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)},C_=function(t,e){if(e=e||t.get("type"))switch(e){case"category":return new Cy(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new Ry;default:return(gy.getClass(e)||Ry).create(t)}},I_=function(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(i>0&&n>0||i<0&&n<0)},A_=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=b_(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=S_(l.getTextRect(d),l.get("rotate")||0);s?s.union(f):s=f}return s}},D_={getScaleExtent:x_,niceScaleExtent:M_,createScaleByModel:C_,ifAxisCrossZero:I_,makeLabelFormatter:b_,getAxisRawValue:w_,estimateLabelUnionRect:A_,getOptionCategoryInterval:T_,shouldShowAllLabels:function(t){return"category"===t.type&&0===T_(t.getLabelModel())}},k_={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&&!Nt.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&&!Nt.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:Nt.noop,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},O_=k_,P_=Wr.calculateTextPosition,L_=tc.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()}}),R_=tc.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()}}),E_=tc.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()}}),B_=tc.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()}}),z_={line:tc.Line,rect:tc.Rect,roundRect:tc.Rect,square:tc.Rect,circle:tc.Circle,diamond:R_,pin:E_,arrow:B_,triangle:L_},N_={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}},F_={};Nt.each(z_,(function(t,e){F_[e]=new t}));var H_=tc.extendShape({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,i){var n=P_(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=F_[n];r||(r=F_[n="rect"]),N_[n](e.x,e.y,e.width,e.height,r.shape),r.buildPath(t,r.shape,i)}}});function V_(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 W_=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://")?tc.makeImage(t.slice(8),new Dn(e,i,n,r),o?"center":"cover"):0===t.indexOf("path://")?tc.makePath(t.slice(7),{},new Dn(e,i,n,r),o?"center":"cover"):new H_({shape:{symbolType:t,x:e,y:i,width:n,height:r}})).__isEmptyBrush=l,s.setColor=V_,s.setColor(a),s},G_={createSymbol:W_};var U_=function(t,e){var i=e;gc.isInstance(e)||(i=new gc(e),Nt.mixin(i,O_));var n=D_.createScaleByModel(i);return n.setExtent(t[0],t[1]),D_.niceScaleExtent(n,i),n},j_=function(t){Nt.mixin(t,O_)},Y_={getLayoutRect:Qc.getLayoutRect,completeDimensions:Xv,createDimensions:qv,createSymbol:G_.createSymbol,createList:function(t){return fy(t.getSource(),t)},dataStack:{isDimensionStacked:ay.isDimensionStacked,enableDataStack:ay.enableDataStack,getStackedDimension:ay.getStackedDimension},createScale:U_,mixinAxisModelCommonMethods:j_},X_=1e-8;function q_(t,e){return Math.abs(t-e)<X_}var Z_=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+=rl(r[0],r[1],o[0],o[1],e,i),r=o}var s=t[0];return q_(r[0],s[0])&&q_(r[1],s[1])||(n+=rl(r[0],r[1],s[0],s[1],e,i)),0!==n},$_={contain:Z_};function K_(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}K_.prototype={constructor:K_,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;Ls.fromPoints(l,r,a),oe.min(i,i,r),oe.max(n,n,a)}return 0===s&&(i[0]=i[1]=n[0]=n[1]=0),this._rect=new Dn(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($_.contain(a,t[0],t[1])){for(var s=0;s<(o?o.length:0);s++)if($_.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 Dn(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++)oe.applyTransform(h[d],h[d],s);for(var f=0;f<(c?c.length:0);f++)for(d=0;d<c[f].length;d++)oe.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 K_(t,this.geometries,this.center);return e._rect=this._rect,e.transformTo=null,e}};var Q_=K_;function J_(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 tx=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]=J_(l,o[s],e);else if("MultiPolygon"===r.type)for(var u=0;u<l.length;u++){var h=l[u];l[u]=J_(h,o[s][u],e)}}t.UTF8Encoding=!1}(t),Nt.map(Nt.filter(t.features,(function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0})),(function(t){var 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&&Nt.each(r,(function(t){t[0]&&a.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})}));var o=new Q_(i[e||"name"],a,i.cp);return o.properties=i,o}))},ex=Lo.makeInner,ix=D_.makeLabelFormatter,nx=D_.getOptionCategoryInterval,rx=D_.shouldShowAllLabels,ax=ex();function ox(t,e){var i,n,r=sx(t,"labels"),a=nx(e),o=lx(r,a);return o||(Nt.isFunction(a)?i=cx(t,a):(n="auto"===a?function(t){var e=ax(t).autoInterval;return null!=e?e:ax(t).autoInterval=t.calculateCategoryInterval()}(t):a,i=hx(t,n)),ux(r,a,{labels:i,labelCategoryInterval:n}))}function sx(t,e){return ax(t)[e]||(ax(t)[e]=[])}function lx(t,e){for(var i=0;i<t.length;i++)if(t[i].key===e)return t[i].value}function ux(t,e,i){return t.push({key:e,value:i}),i}function hx(t,e,i){var n=ix(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=rx(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 cx(t,e,i){var n=t.scale,r=ix(t),a=[];return Nt.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 dx={createAxisLabels:function(t){return"category"===t.type?function(t){var e=t.getLabelModel(),i=ox(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:i.labelCategoryInterval}:i}(t):function(t){var e=t.scale.getTicks(),i=ix(t);return{labels:Nt.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=sx(t,"ticks"),a=nx(e),o=lx(r,a);if(o)return o;e.get("show")&&!t.scale.isBlank()||(i=[]);if(Nt.isFunction(a))i=cx(t,a,!0);else if("auto"===a){var s=ox(t,t.getLabelModel());n=s.labelCategoryInterval,i=Nt.map(s.labels,(function(t){return t.tickValue}))}else i=hx(t,n=a,!0);return ux(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=ix(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=Wr.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=ax(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]),_}},fx=Nt.each,px=Nt.map,gx=Ic.linearMap,mx=Ic.getPixelPrecision,vx=Ic.round,yx=dx.createAxisTicks,_x=dx.createAxisLabels,xx=dx.calculateCategoryInterval,bx=[0,1],Sx=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onBand=!1};function Tx(t,e){var i=(t[1]-t[0])/e/2;t[0]+=i,t[1]-=i}Sx.prototype={constructor:Sx,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 mx(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&&Tx(i=i.slice(),n.count()),gx(t,bx,i,e)},coordToData:function(t,e){var i=this._extent,n=this.scale;this.onBand&&"ordinal"===n.type&&Tx(i=i.slice(),n.count());var r=gx(t,i,bx,e);return this.scale.scale(r)},pointToData:function(t,e){},getTicksCoords:function(t){var e=(t=t||{}).tickModel||this.getTickModel(),i=yx(this,e).ticks,n=px(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;fx(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=vx(t),e=vx(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 px(e,(function(t){return px(t,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this)}),this)},getViewLabels:function(){return _x(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 xx(this)}};var Mx=Sx,Cx=yo,Ix=ei,Ax=oe,Dx=Wi,kx=Ic,Ox=Hc,Px=Ig.throttle,Lx=Y_,Rx=tx,Ex=Lv,Bx=gc,zx=Mx,Nx=J,Fx=tx,Hx={};Nt.each(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],(function(t){Hx[t]=Nt[t]}));var Vx={};Nt.each(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","setHoverStyle","setLabelStyle","setTextStyle","setText","getFont","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","registerShape","getShapeClass","Group","Image","Text","Circle","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],(function(t){Vx[t]=tc[t]}));var Wx,Gx,Ux={zrender:Cx,matrix:Ix,vector:Ax,color:Dx,number:kx,format:Ox,throttle:Px,helper:Lx,parseGeoJSON:Rx,List:Ex,Model:Bx,Axis:zx,env:Nx,parseGeoJson:Fx,util:Hx,graphic:Vx},jx=(Wx=function(t,e){var i=Ig.throttle,n=Nt.assert,r=Nt.each,a=Nt.isFunction,o=Nt.isObject,s=rd.parseClassType,l={PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:2e3,CHART:3e3,POST_CHART_LAYOUT:3500,COMPONENT:4e3,BRUSH:5e3}},u="__flagInMainProcess",h="__optionUpdated",c=/^[a-zA-Z0-9_]+$/;function d(t,e){return function(i,n,r){e||!this._disposed?(i=i&&i.toLowerCase(),fe.prototype[t].call(this,i,n,r)):this.id}}function f(){fe.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=yo.init(t,{renderer:n.renderer||"canvas",devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height});this._throttledZrFlush=i(Nt.bind(r.flush,r),17),(e=Nt.clone(e))&&Kf(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new Sf;var a,o,s=this._api=(o=(a=this)._coordSysMgr,Nt.extend(new xf(a),{getCoordinateSystems:Nt.bind(o.getCoordinateSystems,o),getComponentByElement:function(t){for(;t;){var e=t.__ecComponentInfo;if(null!=e)return a._model.getComponent(e.mainType,e.index);t=t.parent}}}));function l(t,e){return t.__prio-e.__prio}Fn(z,l),Fn(R,l),this._scheduler=new um(this,s,R,z),fe.call(this,this._ecEventProcessor=new O),this._messageCenter=new f,this._initEvents(),this.resize=Nt.bind(this.resize,this),this._pendingActions=[],r.animation.on("frame",this._onframe,this),function(t,e){t.on("rendered",(function(){e.trigger("rendered"),!t.animation.isFinished()||e[h]||e._scheduler.unfinished||e._pendingActions.length||e.trigger("finished")}))}(r,this),Nt.setAsPrimitive(this)}f.prototype.on=d("on",!0),f.prototype.off=d("off",!0),f.prototype.one=d("one",!0),Nt.mixin(f,fe);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=Lo.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 Pf(this._api),a=this._theme,s=this._model=new yf;s.scheduler=this._scheduler,s.init(null,null,a,r)}this._model.setOption(t,E),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(J.canvasSupported)return(t=t||{}).pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(t)},g.getSvgDataURL=function(){if(J.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return Nt.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(J.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;Nt.each(H,(function(r,o){if(r.group===i){var d=e?r.getZr().painter.getSvgDom().innerHTML:r.getRenderedCanvas(Nt.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=Nt.createCanvas(),m=yo.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 tc.Rect({shape:{x:0,y:0,width:f,height:p},style:{fill:t.connectedBackgroundColor}})),r(c,(function(t){var e=new tc.Image({style:{x:t.left*d-s,y:t.top*d-l,image:t.dom}});m.add(e)})),m.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},g.convertToPixel=Nt.curry(m,"convertToPixel"),g.convertFromPixel=Nt.curry(m,"convertFromPixel"),g.containPixel=function(t,e){if(!this._disposed){var i,n=this._model;return t=Lo.parseFinder(n,t),Nt.each(t,(function(t,n){n.indexOf("Models")>=0&&Nt.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=Lo.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(J.canvasSupported)n.setBackgroundColor(o);else{var s=Wi.parse(o);o=Wi.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=Nt.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&&(xg.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=Nt.createHashMap(Lo.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=Nt.map(t.batch,(function(e){return(e=Nt.defaults(Nt.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))||Nt.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?og.getClass(c.main,c.sub):xg.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")&&!J.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),Lg(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=Nt.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&&J.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=Nt.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,Lo.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]}},Nt.mixin(p,fe),O.prototype={constructor:O,normalizeQuery:function(t){var e={},i={},n={};if(Nt.isString(t)){var r=s(t);e.mainType=r.main||null,e.subType=r.sub||null}else{var a=["Index","Name","Id"],o={name:1,dataIndex:1,dataType:1};Nt.each(t,(function(t,r){for(var s=!1,l=0;l<a.length;l++){var u=a[l],h=r.lastIndexOf(u);if(h>0&&h===r.length-u.length){var c=r.slice(0,h);"data"!==c&&(e.mainType=c,e[u.toLowerCase()]=t,s=!0)}}o.hasOwnProperty(r)&&(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[Lo.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 Q(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=um.wrapStageHandler(i,r);return s.__prio=e,s.__raw=i,t.push(s),s}function et(t,e){F[t]=e}Q(2e3,kg),Z(Kf),$(900,ep),et("default",Eg),K({type:"highlight",event:"highlight",update:"highlight"},Nt.noop),K({type:"downplay",event:"downplay",update:"downplay"},Nt.noop),q("light",cm),q("dark",mm),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,Lo.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(Nt.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){Sf.register(t,e)},e.getCoordinateSystemDimensions=function(t){var e=Sf.get(t);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()},e.registerLayout=function(t,e){tt(z,t,e,1e3,"layout")},e.registerVisual=Q,e.registerLoading=et,e.extendComponentModel=function(t){return rd.extend(t)},e.extendComponentView=function(t){return og.extend(t)},e.extendSeriesModel=function(t){return ng.extend(t)},e.extendChartView=function(t){return xg.extend(t)},e.setCanvasCreator=function(t){Nt.$override("createCanvas",t)},e.registerMap=function(t,e,i){Zm.registerMap(t,e,i)},e.getMap=function(t){var e=Zm.retrieveMap(t);return e&&e[0]&&{geoJson:e[0].geoJSON,specialAreas:e[0].specialAreas}},e.dataTool={},function(){for(var t in Ux)Ux.hasOwnProperty(t)&&(e[t]=Ux[t])}()},Wx(Gx={exports:{}},Gx.exports),Gx.exports);ng.extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(t,e){return fy(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 Yx=Tp.retrieveRawValue;var Xx=function(t,e){var i=t.mapDimension("defaultedLabel",!0),n=i.length;if(1===n)return Yx(t,e,i[0]);if(n){for(var r=[],a=0;a<i.length;a++){var o=Yx(t,e,i[a]);r.push(o)}return r.join(" ")}},qx={getDefaultLabel:Xx},Zx=G_.createSymbol,$x=Ic.parsePercent,Kx=qx.getDefaultLabel;function Qx(t,e,i){tc.Group.call(this),this.updateData(t,e,i)}var Jx=Qx.prototype,tb=Qx.getSymbolSize=function(t,e){var i=t.getItemVisual(e,"symbolSize");return i instanceof Array?i.slice():[+i,+i]};function eb(t){return[t[0]/2,t[1]/2]}function ib(t,e){this.parent.drift(t,e)}Jx._createSymbol=function(t,e,i,n,r){this.removeAll();var a=e.getItemVisual(i,"color"),o=Zx(t,-1,-1,2,2,a,r);o.attr({z2:100,culling:!0,scale:eb(n)}),o.drift=ib,this._symbolType=t,this.add(o)},Jx.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(t)},Jx.getSymbolPath=function(){return this.childAt(0)},Jx.getScale=function(){return this.childAt(0).scale},Jx.highlight=function(){this.childAt(0).trigger("emphasis")},Jx.downplay=function(){this.childAt(0).trigger("normal")},Jx.setZ=function(t,e){var i=this.childAt(0);i.zlevel=t,i.z=e},Jx.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":e.cursor},Jx.updateData=function(t,e,i){this.silent=!1;var n=t.getItemVisual(e,"symbol")||"circle",r=t.hostModel,a=tb(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,tc.updateProps(l,{scale:eb(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),tc.initProps(l,h,r,e)}this._seriesModel=r};var nb=["itemStyle"],rb=["emphasis","itemStyle"],ab=["label"],ob=["emphasis","label"];function sb(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")}Jx._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(nb).getItemStyle(["color"]),l=p.getModel(rb).getItemStyle(),u=p.getShallow("symbolOffset"),h=p.getModel(ab),c=p.getModel(ob),d=p.getShallow("hoverAnimation"),f=p.getShallow("cursor")}else l=Nt.extend({},l);var g=r.style,m=t.getItemVisual(e,"symbolRotate");r.attr("rotation",(m||0)*Math.PI/180||0),u&&r.attr("position",[$x(u[0],i[0]),$x(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;tc.setLabelStyle(g,l,h,c,{labelFetcher:a,labelDataIndex:e,defaultText:function(e,i){return x?t.getName(e):Kx(t,e)},isRectText:!0,autoColor:o}),r.__symbolOriginalScale=eb(i),r.hoverStyle=l,r.highDownOnUpdate=d&&a.isAnimationEnabled()?sb:null,tc.setHoverStyle(r)},Jx.fadeOut=function(t,e){var i=this.childAt(0);this.silent=i.silent=!0,(!e||!e.keepLabel)&&(i.style.text=null),tc.updateProps(i,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,t)},Nt.inherits(Qx,tc.Group);var lb=Qx,ub=Nt.isObject;function hb(t){this.group=new tc.Group,this._symbolCtor=t||lb}var cb=hb.prototype;function db(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 fb(t){return null==t||ub(t)||(t={isIgnore:t}),t||{}}function pb(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")}}cb.updateData=function(t,e){e=fb(e);var i=this.group,n=t.hostModel,r=this._data,a=this._symbolCtor,o=pb(t);r||i.removeAll(),t.diff(r).add((function(n){var r=t.getItemLayout(n);if(db(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);db(t,h,s,e)?(u?(u.updateData(t,s,o),tc.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},cb.isPersistent=function(){return!0},cb.updateLayout=function(){var t=this._data;t&&t.eachItemGraphicEl((function(e,i){var n=t.getItemLayout(i);e.attr("position",n)}))},cb.incrementalPrepareUpdate=function(t){this._seriesScope=pb(t),this._data=null,this.group.removeAll()},cb.incrementalUpdate=function(t,e,i){function n(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}i=fb(i);for(var r=t.start;r<t.end;r++){var a=e.getItemLayout(r);if(db(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)}}},cb.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 gb=hb,mb=G_.createSymbol,vb=tc.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 yb(){this.group=new tc.Group}var _b=yb.prototype;_b.isPersistent=function(){return!this._incremental},_b.updateData=function(t,e){this.group.removeAll();var i=new vb({rectHover:!0,cursor:"default"});i.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(i,t,!1,e),this.group.add(i),this._incremental=null},_b.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)}))}},_b.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>2e6?(this._incremental||(this._incremental=new Wu({silent:!0})),this.group.add(this._incremental)):this._incremental=null},_b.incrementalUpdate=function(t,e,i){var n;this._incremental?(n=new vb,this._incremental.addDisplayable(n,!0)):((n=new vb({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)},_b._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=mb(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))})))},_b.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},_b._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var xb=yb,bb=Nt.map,wb=ay.isDimensionStacked;var Sb=function(t){return{seriesType:t,plan:lg(),reset:function(t){var e=t.getData(),i=t.coordinateSystem,n=t.pipelineContext.large;if(i){var r=bb(i.dimensions,(function(t){return e.mapDimension(t)})).slice(0,2),a=r.length,o=e.getCalculationInfo("stackResultDimension");return wb(e,r[0])&&(r[0]=o),wb(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)}}}}}};jx.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=Sb().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 xb:new gb,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 Tb=Nt.isFunction;var Mb=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=Tb(o),c=Tb(s),d=Tb(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 Cb(t){return this._axes[t]}var Ib=function(t){this._axes={},this._dimList=[],this.name=t||""};Ib.prototype={constructor:Ib,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return Nt.map(this._dimList,Cb,this)},getAxesByScale:function(t){return t=t.toLowerCase(),Nt.filter(this.getAxes(),(function(e){return e.scale.type===t}))},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var 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 Ab=Ib;function Db(t){Ab.call(this,t)}Db.prototype={constructor:Db,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 Dn(i,n,r,a)}},Nt.inherits(Db,Ab);var kb=Db,Ob=function(t,e,i,n,r){Mx.call(this,t,e,i),this.type=n||"value",this.position=r||"bottom"};Ob.prototype={constructor:Ob,index:0,getAxesOnZeroOf:null,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},getGlobalExtent:function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},Nt.inherits(Ob,Mx);var Pb=Ob,Lb={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)"]}}},Rb={};Rb.categoryAxis=Nt.merge({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Lb),Rb.valueAxis=Nt.merge({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},Lb),Rb.timeAxis=Nt.defaults({scale:!0,min:"dataMin",max:"dataMax"},Rb.valueAxis),Rb.logAxis=Nt.defaults({scale:!0,logBase:10},Rb.valueAxis);var Eb=Rb,Bb=Qc.getLayoutParams,zb=Qc.mergeLayoutParam,Nb=["value","category","time","log"];var Fb=function(t,e,i,n){Nt.each(Nb,(function(r){e.extend({type:t+"Axis."+r,mergeDefaultAndTheme:function(e,n){var a=this.layoutMode,o=a?Bb(e):{},s=n.getTheme();Nt.merge(e,s.get(r+"Axis")),Nt.merge(e,this.getDefaultOption()),e.type=i(t,e),a&&zb(e,o,a)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=Sy.createByAxisModel(this))},getCategories:function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:Nt.mergeAll([{},Eb[r+"Axis"],n],!0)})})),rd.registerSubTypeDefaulter(t+"Axis",Nt.curry(i,t))},Hb=rd.extend({type:"cartesian2dAxis",axis:null,init:function(){Hb.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){Hb.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){Hb.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function Vb(t,e){return e.type||(e.data?"category":"value")}Nt.merge(Hb.prototype,O_);var Wb={offset:0};Fb("x",Hb,Vb,Wb),Fb("y",Hb,Vb,Wb),rd.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 Gb=Nt.isObject,Ub=Nt.each,jb=Nt.map,Yb=Nt.indexOf,Xb=Qc.getLayoutRect,qb=D_.createScaleByModel,Zb=D_.ifAxisCrossZero,$b=D_.niceScaleExtent,Kb=D_.estimateLabelUnionRect,Qb=ay.getStackedDimension;function Jb(t,e,i){return t.getCoordSysModel()===e}function tw(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this.model=t}var ew=tw.prototype;function iw(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)nw(a[l])&&(r=a[l]);else for(var u in a)if(a.hasOwnProperty(u)&&nw(a[u])&&!n[h(a[u])]){r=a[u];break}r&&(n[h(r)]=!0)}function h(t){return t.dim+"_"+t.index}}function nw(t){return t&&"category"!==t.type&&"time"!==t.type&&Zb(t)}ew.type="grid",ew.axisPointerEnabled=!0,ew.getRect=function(){return this._rect},ew.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model),Ub(i.x,(function(t){$b(t.scale,t.model)})),Ub(i.y,(function(t){$b(t.scale,t.model)}));var n={};Ub(i.x,(function(t){iw(i,"y",t,n)})),Ub(i.y,(function(t){iw(i,"x",t,n)})),this.resize(this.model,e)},ew.resize=function(t,e,i){var n=Xb(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=n;var r=this._axesList;function a(){Ub(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")&&(Ub(r,(function(t){if(!t.model.get("axisLabel.inside")){var e=Kb(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())},ew.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]}},ew.getAxes=function(){return this._axesList.slice()},ew.getCartesian=function(t,e){if(null!=t&&null!=e){var i="x"+t+"y"+e;return this._coordsMap[i]}Gb(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]},ew.getCartesians=function(){return this._coordsList.slice()},ew.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},ew.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},ew._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,Yb(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}},ew.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},ew._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(Jb(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 Pb(e,qb(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,Ub(r.x,(function(e,i){Ub(r.y,(function(n,r){var a="x"+i+"y"+r,o=new kb(a);o.grid=this,o.model=t,this._coordsMap[a]=o,this._coordsList.push(o),o.addAxis(e),o.addAxis(n)}),this)}),this)},ew._updateScale=function(t,e){function i(t,e,i){Ub(t.mapDimension(e.dim,!0),(function(i){e.scale.unionExtentFromData(t,Qb(t,i))}))}Ub(this._axesList,(function(t){t.scale.setExtent(1/0,-1/0)})),t.eachSeries((function(t){if(ow(t)){var n=aw(t),r=n[0],a=n[1];if(!Jb(r,e)||!Jb(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)},ew.getTooltipAxes=function(t){var e=[],i=[];return Ub(this.getCartesians(),(function(n){var r=null!=t&&"auto"!==t?n.getAxis(t):n.getBaseAxis(),a=n.getOtherAxis(r);Yb(e,r)<0&&e.push(r),Yb(i,a)<0&&i.push(a)})),{baseAxes:e,otherAxes:i}};var rw=["xAxis","yAxis"];function aw(t,e){return jb(rw,(function(e){return t.getReferringComponents(e)[0]}))}function ow(t){return"cartesian2d"===t.get("coordinateSystem")}tw.create=function(t,e){var i=[];return t.eachComponent("grid",(function(n,r){var a=new tw(n,t,e);a.name="grid_"+r,a.resize(n,e,!0),n.coordinateSystem=a,i.push(a)})),t.eachSeries((function(t){if(ow(t)){var e=aw(t),i=e[0],n=e[1],r=i.getCoordSysModel().coordinateSystem;t.coordinateSystem=r.getCartesian(i.componentIndex,n.componentIndex)}})),i},tw.dimensions=tw.prototype.dimensions=kb.prototype.dimensions,Sf.register("cartesian2d",tw);var sw=Nt.retrieve,lw=Nt.defaults,uw=Nt.extend,hw=Nt.each,cw=Ic.isRadianAroundZero,dw=Ic.remRadian,fw=G_.createSymbol,pw=oe.applyTransform,gw=D_.shouldShowAllLabels,mw=Math.PI,vw=function(t,e){this.opt=e,this.axisModel=t,lw(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new tc.Group;var i=new tc.Group({position:e.position.slice(),rotation:e.rotation});i.updateTransform(),this._transform=i.transform,this._dumbGroup=i};vw.prototype={constructor:vw,hasBuilder:function(t){return!!yw[t]},add:function(t){yw[t].call(this)},getGroup:function(){return this.group}};var yw={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&&(pw(r,r,n),pw(a,a,n));var o=uw({lineCap:"round"},e.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new tc.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];hw([{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=fw(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=Mw(n.getTicksCoords(),t._transform,o,lw(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=sw(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=(sw(i.labelRotate,a.get("rotate"))||0)*mw/180,u=xw(i.rotation,l,i.labelDirection),h=e.getCategories&&e.getCategories(!0),c=[],d=bw(e),f=e.get("triggerEvent");return hw(s,(function(r,s){var l=r.tickValue,p=r.formattedLabel,g=r.rawLabel,m=a;h&&h[l]&&h[l].textStyle&&(m=new gc(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 tc.Text({anid:"label_"+l,position:y,rotation:u.rotation,silent:d,z2:10});tc.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=_w(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(gw(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?(ww(a),ww(u)):Sw(a,o)&&(n?(ww(o),ww(h)):(ww(a),ww(u)));!1===r?(ww(s),ww(c)):Sw(l,s)&&(r?(ww(l),ww(d)):(ww(s),ww(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=lw(o.getLineStyle(),lw(e.getModel("axisTick").getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")})),u=0;u<a.length;u++)for(var h=Mw(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=sw(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,Tw(a)?t.labelOffset+o*l:0],d=e.get("nameRotate");null!=d&&(d=d*mw/180),Tw(a)?n=xw(t.rotation,null!=d?d:t.rotation,o):(n=function(t,e,i,n){var r,a,o=dw(i-t.rotation),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;cw(o-mw/2)?(a=l?"bottom":"top",r="center"):cw(o-1.5*mw)?(a=l?"top":"bottom",r="center"):(a="middle",r=o<1.5*mw&&o>mw/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=sw(t.nameTruncateMaxWidth,p.maxWidth,r),v=null!=g&&null!=m?Hc.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 tc.Text({anid:"name",__fullText:i,__truncatedText:v,position:c,rotation:n.rotation,silent:bw(e),z2:1,tooltip:y&&y.show?uw({content:i,formatter:function(){return i},formatterParams:x},y):null});tc.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=_w(e),b.eventData.targetType="axisName",b.eventData.name=i),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},_w=vw.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},xw=vw.innerTextLayout=function(t,e,i){var n,r,a=dw(e-t);return cw(a)?(r=i>0?"top":"bottom",n="center"):cw(a-mw)?(r=i>0?"bottom":"top",n="center"):(r="middle",n=a>0&&a<mw?i>0?"right":"left":i>0?"left":"right"),{rotation:a,textAlign:n,textVerticalAlign:r}};var bw=vw.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)};function ww(t){t&&(t.ignore=!0)}function Sw(t,e,i){var n=t&&t.getBoundingRect().clone(),r=e&&e.getBoundingRect().clone();if(n&&r){var a=ei.identity([]);return ei.rotate(a,a,-t.rotation),n.applyTransform(ei.mul([],a,t.getLocalTransform())),r.applyTransform(ei.mul([],a,e.getLocalTransform())),n.intersect(r)}}function Tw(t){return"middle"===t||"center"===t}function Mw(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&&(pw(o,o,e),pw(s,s,e));var h=new tc.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 Cw=vw,Iw=Nt.each,Aw=Nt.curry;function Dw(t,e){return"all"===t||Nt.isArray(t)&&Nt.indexOf(t,e)>=0||t===e}function kw(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[Pw(t)]}function Ow(t){return!!t.get("handle.show")}function Pw(t){return t.type+"||"+t.id}var Lw=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=[];Iw(i.getCoordinateSystems(),(function(i){if(i.axisPointerEnabled){var s=Pw(i.model),l=t.coordSysAxesInfo[s]={};t.coordSysMap[s]=i;var u=i.model.getModel("tooltip",n);if(Iw(i.getAxes(),Aw(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)&&Iw(d.baseAxes,Aw(f,!c||"cross",h)),c&&Iw(d.otherAxes,Aw(f,"cross",!1))}}function f(n,s,h){var c=h.model.getModel("axisPointer",r),d=c.get("show");if(d&&("auto"!==d||n||Ow(c))){null==s&&(s=c.get("triggerTooltip")),c=n?function(t,e,i,n,r,a){var o=e.getModel("axisPointer"),s={};Iw(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],(function(t){s[t]=Nt.clone(o.get(t))})),s.snap="category"!==t.type&&!!a,"cross"===o.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===r){var u=o.get("label.show");if(l.show=null==u||u,!a){var h=s.lineStyle=o.get("crossStyle");h&&Nt.defaults(l,h.textStyle)}}return t.model.getModel("axisPointer",new gc(s,i,n))}(h,u,r,e,n,s):c;var f=c.get("snap"),p=Pw(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:Ow(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(Dw(a[n+"AxisId"],i.id)||Dw(a[n+"AxisIndex"],i.componentIndex)||Dw(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)&&Iw(t.coordSysAxesInfo[Pw(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},Rw=function(t){var e=kw(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=Ow(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")}},Ew={collect:Lw,fixValue:Rw,getAxisInfo:kw,getAxisPointerModel:function(t){var e=kw(t);return e&&e.axisPointerModel},makeKey:Pw},Bw=jx.extendComponentView({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,i,n){this.axisPointerClass&&Ew.fixValue(t),Bw.superApply(this,"render",arguments),zw(this,t,e,i,n,!0)},updateAxisPointer:function(t,e,i,n,r){zw(this,t,e,i,n,!1)},remove:function(t,e){var i=this._axisPointer;i&&i.remove(e),Bw.superApply(this,"remove",arguments)},dispose:function(t,e){Nw(this,e),Bw.superApply(this,"dispose",arguments)}});function zw(t,e,i,n,r,a){var o=Bw.getAxisPointerClass(t.axisPointerClass);if(o){var s=Ew.getAxisPointerModel(e);s?(t._axisPointer||(t._axisPointer=new o)).render(e,s,n,a):Nw(t,n)}}function Nw(t,e,i){var n=t._axisPointer;n&&n.dispose(e,i),t._axisPointer=null}var Fw=[];Bw.registerAxisPointerClass=function(t,e){Fw[t]=e},Bw.getAxisPointerClass=function(t){return t&&Fw[t]};var Hw=Bw;var Vw=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),Nt.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},Ww={layout:Vw};var Gw=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=Nt.createHashMap(),f=0;if(c)for(var p=0;p<u.length;p++){var g=c.get(u[p].tickValue);if(null!=g){f=(g+(h-1)*p)%h;break}}var m=r.toGlobalCoord(u[0].coord),v=o.getAreaStyle();s=Nt.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 tc.Rect({anid:null!=S?"area_"+S:null,shape:{x:y,y:_,width:x,height:b},style:Nt.defaults({fill:s[f]},v),silent:!0})),f=(f+1)%h}t.__splitAreaColors=d}}},Uw={rectCoordAxisBuildSplitArea:Gw,rectCoordAxisHandleRemove:function(t){t.__splitAreaColors=null}},jw=Uw.rectCoordAxisBuildSplitArea,Yw=Uw.rectCoordAxisHandleRemove,Xw=["axisLine","axisTickLabel","axisName"],qw=["splitArea","splitLine","minorSplitLine"],Zw=Hw.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,i,n){this.group.removeAll();var r=this._axisGroup;if(this._axisGroup=new tc.Group,this.group.add(this._axisGroup),t.get("show")){var a=t.getCoordSysModel(),o=Ww.layout(a,t),s=new Cw(t,o);Nt.each(Xw,s.add,s),this._axisGroup.add(s.getGroup()),Nt.each(qw,(function(e){t.get(e+".show")&&this["_"+e](t,a)}),this),tc.groupTransition(r,this._axisGroup,t),Zw.superCall(this,"render",t,e,i,n)}},remove:function(){Yw(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=Nt.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 tc.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:Nt.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 tc.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){jw(this,this._axisGroup,t,e)}});Zw.extend({type:"xAxis"}),Zw.extend({type:"yAxis"}),jx.extendComponentView({type:"grid",render:function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new tc.Rect({shape:t.coordinateSystem.getRect(),style:Nt.defaults({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))}}),jx.registerPreprocessor((function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})})),jx.registerVisual(Mb("scatter","circle")),jx.registerLayout(Sb("scatter"));var $w=function(t,e){var i,n=[],r=t.seriesIndex;if(null==r||!(i=e.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=Lo.queryDataIndex(a,t);if(null==o||o<0||Nt.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(Nt.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}},Kw=Lo.makeInner,Qw=Nt.each,Jw=Nt.curry,tS=Kw();function eS(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 Qw(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),Qw(h,(function(t){a.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})})))}})),{payloadBatch:a,snapToValue:r}}(e,t),s=o.payloadBatch,l=o.snapToValue;s[0]&&null==r.seriesIndex&&Nt.extend(r,s[0]),!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 iS(t,e,i,n){t[e.key]={value:i,payloadBatch:n}}function nS(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=Ew.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 rS(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 aS(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}var oS=function(t,e,i){var n=t.currTrigger,r=[t.x,t.y],a=t,o=t.dispatchAction||Nt.bind(i.dispatchAction,i),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){aS(r)&&(r=$w({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=aS(r),u=a.axesInfo,h=s.axesInfo,c="leave"===n||aS(r),d={},f={},p={list:[],map:{}},g={showPointer:Jw(iS,f),showTooltip:Jw(nS,p)};Qw(s.coordSysMap,(function(t,e){var i=l||t.containPoint(r);Qw(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&&eS(t,o,g,!1,d)}}))}));var m={};return Qw(h,(function(t,e){var i=t.linkGroup;i&&!f[e]&&Qw(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,rS(e),rS(t)))),m[t.key]=a}}))})),Qw(m,(function(t,e){eS(h[e],t,g,!0,d)})),function(t,e,i){var n=i.axesInfo=[];Qw(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(aS(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=tS(n)[r]||{},o=tS(n)[r]={};Qw(t,(function(t,e){var i=t.axisPointerModel.option;"show"===i.status&&Qw(i.seriesDataIndices,(function(t){var e=t.seriesIndex+" | "+t.dataIndex;o[e]=t}))}));var s=[],l=[];Nt.each(a,(function(t,e){!o[e]&&l.push(t)})),Nt.each(o,(function(t,e){!a[e]&&s.push(t)})),l.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,batch:l}),s.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,batch:s})}(h,0,i),d}};jx.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 sS=(0,Lo.makeInner)(),lS=Nt.each;function uS(t,e,i){t.handler("leave",null,i)}function hS(t,e,i,n){e.handler(t,i,n)}var cS={register:function(t,e,i){if(!J.node){var n=e.getZr();sS(n).records||(sS(n).records={}),function(t,e){if(sS(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);lS(sS(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)}))}sS(t).initialized=!0,i("click",Nt.curry(hS,"click")),i("mousemove",Nt.curry(hS,"mousemove")),i("globalout",uS)}(n,e),(sS(n).records[t]||(sS(n).records[t]={})).handler=i}},unregister:function(t,e){if(!J.node){var i=e.getZr();(sS(i).records||{})[t]&&(sS(i).records[t]=null)}}},dS=jx.extendComponentView({type:"axisPointer",render:function(t,e,i){var n=e.getComponent("tooltip"),r=t.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";cS.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){cS.unregister(e.getZr(),"axisPointer"),dS.superApply(this._model,"remove",arguments)},dispose:function(t,e){cS.unregister("axisPointer",e),dS.superApply(this._model,"dispose",arguments)}}),fS=(0,Lo.makeInner)(),pS=Nt.clone,gS=Nt.bind;function mS(){}function vS(t,e,i,n){yS(fS(i).lastProp,n)||(fS(i).lastProp=n,e?tc.updateProps(i,n,t):(i.stopAnimation(),i.attr(n)))}function yS(t,e){if(Nt.isObject(t)&&Nt.isObject(e)){var i=!0;return Nt.each(e,(function(e,n){i=i&&yS(t[n],e)})),!!i}return t===e}function _S(t,e){t[e.get("label.show")?"show":"hide"]()}function xS(t){return{position:t.position.slice(),rotation:t.rotation||0}}function bS(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 wS(t,e,i,n,r){var a=SS(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=Hc.normalizeCssArray(o.get("padding")||0),l=o.getFont(),u=Wr.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 SS(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:D_.getAxisRawValue(e,t),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};Nt.each(n,(function(t){var e=i.getSeriesByIndex(t.seriesIndex),n=t.dataIndexInside,r=e&&e.getDataParams(n);r&&s.seriesData.push(r)})),Nt.isString(o)?a=o.replace("{value}",a):Nt.isFunction(o)&&(a=o(s))}return a}function TS(t,e,i){var n=ei.create();return ei.rotate(n,n,i.rotation),ei.translate(n,n,i.position),tc.applyTransform([t.dataToCoord(e),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],n)}mS.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=Nt.curry(vS,e,h);this.updatePointerEl(o,l,c,e),this.updateLabelEl(o,l,c,e)}else o=this._group=new tc.Group,this.createPointerEl(o,l,t,e),this.createLabelEl(o,l,t,e),i.getZr().add(o);bS(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=Ew.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=fS(t).pointerEl=new tc[r.type](pS(e.pointer));t.add(a)}},createLabelEl:function(t,e,i,n){if(e.label){var r=fS(t).labelEl=new tc.Rect(pS(e.label));t.add(r),_S(r,n)}},updatePointerEl:function(t,e,i){var n=fS(t).pointerEl;n&&e.pointer&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var r=fS(t).labelEl;r&&(r.setStyle(e.label.style),i(r,{shape:e.label.shape,position:e.label.position}),_S(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=tc.createIcon(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Le.stop(t.event)},onmousedown:gS(this._onHandleDragMove,this,0,0),drift:gS(this._onHandleDragMove,this),ondragend:gS(this._onHandleDragEnd,this)}),n.add(r)),bS(r,i,!1);r.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=a.get("size");Nt.isArray(s)||(s=[s,s]),r.attr("scale",[s[0]/2,s[1]/2]),Ig.createOrUpdate(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},_moveHandleToValue:function(t,e){vS(this._axisPointerModel,!e&&this._moveAnimation,this._handle,xS(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(xS(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(xS(n)),fS(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]}}},mS.prototype.constructor=mS,Wo.enableClassExtend(mS);var MS=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},CS={buildElStyle:MS,buildLabelElOption:wS,getValueLabel:SS,getTransformedPosition:TS,buildCartesianSingleLabelElOption:function(t,e,i,n,r,a){var o=Cw.innerTextLayout(i.rotation,0,i.labelDirection);i.labelMargin=r.get("label.margin"),wS(e,n,r,a,{position:TS(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}}},IS=mS.extend({makeElOption:function(t,e,i,n,r){var a=i.axis,o=a.grid,s=n.get("type"),l=AS(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(e,!0));if(s&&"none"!==s){var h=CS.buildElStyle(n),c=DS[s](a,u,l);c.style=h,t.graphicKey=c.type,t.pointer=c}var d=Ww.layout(o.model,i);CS.buildCartesianSingleLabelElOption(e,t,d,i,n,r)},getHandleTransform:function(t,e,i){var n=Ww.layout(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:CS.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=AS(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 AS(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}var DS={line:function(t,e,i){return{type:"Line",subPixelOptimize:!0,shape:CS.makeLineShape([e,i[0]],[e,i[1]],kS(t))}},shadow:function(t,e,i){var n=Math.max(1,t.getBandWidth()),r=i[1]-i[0];return{type:"Rect",shape:CS.makeRectShape([e-n/2,i[0]],[n,r],kS(t))}}};function kS(t){return"x"===t.dim?0:1}Hw.registerAxisPointerClass("CartesianAxisPointer",IS),jx.registerPreprocessor((function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!Nt.isArray(e)&&(t.axisPointer.link=[e])}})),jx.registerProcessor(jx.PRIORITY.PROCESSOR.STATISTIC,(function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=Ew.collect(t,e)})),jx.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},oS),jx.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 OS=Nt.each,PS=Hc.toCamelCase,LS=["","-webkit-","-moz-","-o-"];function RS(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,Nt.map(LS,(function(t){return t+"transition:"+n})).join(";"))),o&&(J.canvasSupported?r.push("background-Color:"+o):(r.push("background-Color:#"+Wi.toHex(o)),r.push("filter:alpha(opacity=70)"))),OS(["width","color","radius"],(function(e){var i="border-"+e,n=PS(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"),OS(["decoration","align"],(function(i){var n=t.get(i);n&&e.push("text-"+i+":"+n)})),e.join(";")}(s)),null!=l&&r.push("padding:"+Hc.normalizeCssArray(l).join("px ")+"px"),r.join(";")+";"}function ES(t,e,i,n,r){var a=e&&e.painter;if(i){var o=a&&a.getViewportRoot();o&&Se.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 BS(t,e,i){if(J.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],ES(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();Le.normalizeEvent(i,t,!0),e.dispatch("mousemove",t)}},n.onmouseleave=function(){o._enterable&&o._show&&o.hideLater(o._hideDelay),o._inContent=!1}}BS.prototype={constructor:BS,_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;"+RS(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;ES(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(Nt.bind(this.hide,this),t)):this.hide())},isShow:function(){return this._show},dispose:function(){this.el.parentNode.removeChild(this.el)},getOuterSize:function(){var t=this.el.clientWidth,e=this.el.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var 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 zS=BS;function NS(t){this._zr=t.getZr(),this._show=!1,this._hideTimeout}NS.prototype={constructor:NS,_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 Wl({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(Nt.bind(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){var t=this.getSize();return{width:t[0],height:t[1]}}};var FS=NS,HS=Lo.getTooltipRenderMode,VS=Nt.bind,WS=Nt.each,GS=Ic.parsePercent,US=new tc.Rect({shape:{x:-1,y:-1,width:2,height:2}});function jS(t){for(var e=t.pop();t.length;){var i=t.pop();i&&(gc.isInstance(i)&&(i=i.get("tooltip",!0)),"string"==typeof i&&(i={formatter:i}),e=new gc(i,e,e.ecModel))}return e}function YS(t,e){return t.dispatchAction||Nt.bind(e.dispatchAction,e)}function XS(t){return"center"===t||"middle"===t}jx.extendComponentView({type:"tooltip",init:function(t,e){if(!J.node){var i,n=t.getComponent("tooltip"),r=n.get("renderMode");this._renderMode=HS(r),"html"===this._renderMode?(i=new zS(e.getDom(),e,{appendToBody:n.get("appendToBody",!0)}),this._newLine="<br/>"):(i=new FS(e),this._newLine="\n"),this._tooltipContent=i}},render:function(t,e,i){if(!J.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");cS.register("itemTooltip",this._api,VS((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&&!J.node){var r=YS(n,i);this._ticket="";var a=n.dataByCoordSys;if(n.tooltip&&null!=n.x&&null!=n.y){var o=US;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=$w(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(YS(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=jS([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=Nt.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=jS([e.tooltipOption,n]),l=this._renderMode,u=this._newLine,h={};WS(t,(function(t){WS(t.dataByAxis,(function(t){var e=i.getComponent(t.axisDim+"Axis",t.axisIndex),n=t.value,r=[];if(e&&null!=n){var s=CS.getValueLabel(n,e.axis,i,t.seriesDataIndices,t.valueLabelOpt);Nt.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=D_.getAxisRawValue(e.axis,n),d.axisValueLabel=s,d){o.push(d);var f,p=u.formatTooltip(c,!0,null,l);if(Nt.isObject(p)){f=p.html;var g=p.markers;Nt.merge(h,g)}else f=p;r.push(f)}}));var c=s;"html"!==l?a.push(r.join(u)):a.push((c?Hc.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=jS([u.getItemModel(s),o,a&&(a.coordinateSystem||{}).model,this._tooltipModel]),c=h.get("trigger");if(null==c||"item"===c){var d,f,p=o.getDataParams(s,l),g=o.formatTooltip(s,!1,l,this._renderMode);Nt.isObject(g)?(d=g.html,f=g.markers):(d=g,f=null);var 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 gc(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=Hc.formatTpl(h,i,!0);else if("function"==typeof h){var d=VS((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()})),Nt.isArray(e))i=GS(e[0],s),n=GS(e[1],l);else if(Nt.isObject(e)){e.width=u[0],e.height=u[1];var f=Qc.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-=XS(h)?u[0]/2:"right"===h?u[0]:0),c&&(n-=XS(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&&WS(e,(function(e,n){var r=e.dataByAxis||{},a=(t[n]||{}).dataByAxis||[];(i&=r.length===a.length)&&WS(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)&&WS(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){J.node||(this._tooltipContent.dispose(),cS.unregister("itemTooltip",e))}}),jx.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},(function(){})),jx.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},(function(){}));var qS=[{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 ZS=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:qS.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||jx.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],ZS.prototype,"padding",void 0),ZS=l([function(t){if(!0===t.isMobxInjector&&console.warn("Mobx observer: You are trying to use 'observer' on a component that already has 'inject'. Please apply 'observer' before applying 'inject'"),Z&&t.$$typeof===Z)throw new Error("Mobx observer: You are trying to use 'observer' on a function component wrapped in either another observer or 'React.memo'. The observer already applies 'React.memo' for you.");if(q&&t.$$typeof===q){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(M,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)?G(t):S(t)}],ZS),ZS}));
