define(["gpui-style-inject","react","mobx"],(function(e,t,n){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function a(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var r=i(e),o=i(t),s=a(t);
/*! *****************************************************************************
    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(e,t,n,i){var a,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(o=(r<3?a(o):r>3?a(t,n,o):a(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o}function u(e,t,n,i){return new(n||(n=Promise))((function(a,r){function o(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((i=i.apply(e,t||[])).next())}))}r.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 c="index-module_main__byUtB",h="index-module_chart__0Bj7I",d="index-module_summary__zonaF",f="index-module_title__OGEcA",p="index-module_total__dsBMA";if(r.default(".index-module_main__byUtB {\n  position: relative;\n  width: 100%;\n  height: 100%; }\n  .index-module_main__byUtB .index-module_chart__0Bj7I {\n    width: 100%;\n    height: 100%; }\n  .index-module_main__byUtB .index-module_summary__zonaF {\n    position: absolute;\n    top: 50%;\n    left: 50%;\n    display: flex;\n    flex-direction: column;\n    justify-content: center;\n    align-items: center;\n    transform: translate(-50%, -50%); }\n    .index-module_main__byUtB .index-module_summary__zonaF .index-module_title__OGEcA {\n      font-size: 4.8vh;\n      color: #cde0ff; }\n    .index-module_main__byUtB .index-module_summary__zonaF .index-module_total__dsBMA {\n      font-size: 6vh;\n      font-weight: 600;\n      background-image: linear-gradient(to bottom, #0096ff 0%, #00d8ff 100%);\n      -webkit-text-fill-color: transparent;\n      -webkit-background-clip: text; }\n      .index-module_main__byUtB .index-module_summary__zonaF .index-module_total__dsBMA > span {\n        padding-left: 1vh;\n        font-size: 3vh;\n        font-weight: 400; }\n"),!t.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!n.spy)throw new Error("mobx-react-lite requires mobx at least version 4 to be available");function g(){return g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},g.apply(this,arguments)}function m(){var e=t.useState(0)[1];return t.useCallback((function(){e((function(e){return e+1}))}),[])}function v(e){return n.getDependencyTree(e)}var y,_=1e4,x=1e4,b=new Set;function w(){void 0===y&&(y=setTimeout(S,x))}function S(){y=void 0;var e=Date.now();b.forEach((function(t){var n=t.current;n&&e>=n.cleanAt&&(n.reaction.dispose(),t.current=null,b.delete(t))})),b.size>0&&w()}var M={};function T(e){return"observer"+e}function I(e,t,i){void 0===t&&(t="observed"),void 0===i&&(i=M);var a,r=(i.useForceUpdate||m)(),s=o.default.useRef(null);if(!s.current){var l=new n.Reaction(T(t),(function(){u.mounted?r():(l.dispose(),s.current=null)})),u=function(e){return{cleanAt:Date.now()+_,reaction:e}}(l);s.current=u,a=s,b.add(a),w()}var c,h,d=s.current.reaction;if(o.default.useDebugValue(d,v),o.default.useEffect((function(){var e;return e=s,b.delete(e),s.current?s.current.mounted=!0:(s.current={reaction:new n.Reaction(T(t),(function(){r()})),cleanAt:1/0},r()),function(){s.current.reaction.dispose(),s.current=null}}),[]),d.track((function(){try{c=e()}catch(e){h=e}})),h)throw h;return c}function A(e,n){var i,a=g({forwardRef:!1},n),r=e.displayName||e.name,o=function(t,n){return I((function(){return e(t,n)}),r)};return o.displayName=r,i=a.forwardRef?t.memo(t.forwardRef(o)):t.memo(o),function(e,t){Object.keys(e).forEach((function(n){D[n]||Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}(e,i),i.displayName=r,i}var D={$$typeof:!0,render:!0,compare:!0,type:!0};function C(e){var t=e.children,n=e.render,i=t||n;return"function"!=typeof i?null:I(i)}function O(e,t,n,i,a){var r="children"===t?"render":"children",o="function"==typeof e[t],s="function"==typeof e[r];return o&&s?new Error("MobX Observer: Do not use children and render in the same time in`"+n):o||s?null:new Error("Invalid prop `"+a+"` of type `"+typeof e[t]+"` supplied to `"+n+"`, expected `function`.")}C.propTypes={children:O,render:O},C.displayName="Observer";var k=0;var L={};function E(e){return L[e]||(L[e]=function(e){if("function"==typeof Symbol)return Symbol(e);var t="__$mobx-react "+e+" ("+k+")";return k++,t}(e)),L[e]}function N(e,t){if(P(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var a=0;a<n.length;a++)if(!Object.hasOwnProperty.call(t,n[a])||!P(e[n[a]],t[n[a]]))return!1;return!0}function P(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function R(e,t,n){Object.hasOwnProperty.call(e,t)?e[t]=n:Object.defineProperty(e,t,{enumerable:!1,configurable:!0,writable:!0,value:n})}var z=E("patchMixins"),B=E("patchedDefinition");function V(e,t){for(var n=this,i=arguments.length,a=new Array(i>2?i-2:0),r=2;r<i;r++)a[r-2]=arguments[r];t.locks++;try{var o;return null!=e&&(o=e.apply(this,a)),o}finally{t.locks--,0===t.locks&&t.methods.forEach((function(e){e.apply(n,a)}))}}function H(e,t){return function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];V.call.apply(V,[this,e,t].concat(i))}}function Y(e,t,n){var i=function(e,t){var n=e[z]=e[z]||{},i=n[t]=n[t]||{};return i.locks=i.locks||0,i.methods=i.methods||[],i}(e,t);i.methods.indexOf(n)<0&&i.methods.push(n);var a=Object.getOwnPropertyDescriptor(e,t);if(!a||!a[B]){var r=e[t],o=F(e,t,a?a.enumerable:void 0,i,r);Object.defineProperty(e,t,o)}}function F(e,t,n,i,a){var r,o=H(a,i);return(r={})[B]=!0,r.get=function(){return o},r.set=function(a){if(this===e)o=H(a,i);else{var r=F(this,t,n,i,a);Object.defineProperty(this,t,r)}},r.configurable=!0,r.enumerable=n,r}var G=n.$mobx||"$mobx",W=E("isUnmounted"),j=E("skipRender"),U=E("isForcingUpdate");function Z(e){var n=e.prototype;if(n.componentWillReact)throw new Error("The componentWillReact life-cycle event is no longer supported");if(e.__proto__!==t.PureComponent)if(n.shouldComponentUpdate){if(n.shouldComponentUpdate!==q)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}else n.shouldComponentUpdate=q;K(n,"props"),K(n,"state");var i=n.render;return n.render=function(){return X.call(this,i)},Y(n,"componentWillUnmount",(function(){this.render[G]&&this.render[G].dispose(),this[W]=!0})),e}function X(e){var i=this;R(this,j,!1),R(this,U,!1);var a,r=(a=this).displayName||a.name||a.constructor&&(a.constructor.displayName||a.constructor.name)||"<component>",o=e.bind(this),s=!1,l=new n.Reaction(r+".render()",(function(){if(!s&&(s=!0,!0!==i[W])){var e=!0;try{R(i,U,!0),i[j]||t.Component.prototype.forceUpdate.call(i),e=!1}finally{R(i,U,!1),e&&l.dispose()}}}));function u(){s=!1;var e=void 0,t=void 0;if(l.track((function(){try{t=n._allowStateChanges(!1,o)}catch(t){e=t}})),e)throw e;return t}return l.reactComponent=this,u[G]=l,this.render=u,u.call(this)}function q(e,t){return this.state!==t||!N(this.props,e)}function K(e,t){var i=E("reactProp_"+t+"_valueHolder"),a=E("reactProp_"+t+"_atomHolder");function r(){return this[a]||R(this,a,n.createAtom("reactive "+t)),this[a]}Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){var e=!1;return n._allowStateReadsStart&&n._allowStateReadsEnd&&(e=n._allowStateReadsStart(!0)),r.call(this).reportObserved(),n._allowStateReadsStart&&n._allowStateReadsEnd&&n._allowStateReadsEnd(e),this[i]},set:function(e){this[U]||N(this[i],e)?R(this,i,e):(R(this,i,e),R(this,j,!0),r.call(this).reportChanged(),R(this,j,!1))}})}var $="function"==typeof Symbol&&Symbol.for,Q=$?Symbol.for("react.forward_ref"):"function"==typeof t.forwardRef&&t.forwardRef((function(e){return null})).$$typeof,J=$?Symbol.for("react.memo"):"function"==typeof t.memo&&t.memo((function(e){return null})).$$typeof;if(!t.Component)throw new Error("mobx-react requires React to be available");if(!n.observable)throw new Error("mobx-react requires mobx to be available");var ee="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function te(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ne(e){var t={exports:{}};return e(t,t.exports),t.exports}function ie(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets option of @rollup/plugin-commonjs appropriately for this require call to behave properly.')}"undefined"!=typeof window||void 0!==ee&&ee.__DEV__;var ae=2311;var re=function(){return ae++};var oe="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(e){var t={},n={},i=e.match(/Firefox\/([\d.]+)/),a=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),r=e.match(/Edge\/([\d.]+)/),o=/micromessenger/i.test(e);i&&(n.firefox=!0,n.version=i[1]);a&&(n.ie=!0,n.version=a[1]);r&&(n.edge=!0,n.version=r[1]);o&&(n.weChat=!0);return{browser:n,os:t,node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!n.ie&&!n.edge,pointerEventsSupported:"onpointerdown"in window&&(n.edge||n.ie&&n.version>=11),domSupported:"undefined"!=typeof document}}(navigator.userAgent),se={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},le={"[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},ue=Object.prototype.toString,ce=Array.prototype,he=ce.forEach,de=ce.filter,fe=ce.slice,pe=ce.map,ge=ce.reduce,me={};function ve(e){if(null==e||"object"!=typeof e)return e;var t=e,n=ue.call(e);if("[object Array]"===n){if(!Ce(e)){t=[];for(var i=0,a=e.length;i<a;i++)t[i]=ve(e[i])}}else if(le[n]){if(!Ce(e)){var r=e.constructor;if(e.constructor.from)t=r.from(e);else{t=new r(e.length);for(i=0,a=e.length;i<a;i++)t[i]=ve(e[i])}}}else if(!se[n]&&!Ce(e)&&!Ae(e))for(var o in t={},e)e.hasOwnProperty(o)&&(t[o]=ve(e[o]));return t}function ye(e,t,n){if(!Te(t)||!Te(e))return n?ve(t):e;for(var i in t)if(t.hasOwnProperty(i)){var a=e[i],r=t[i];!Te(r)||!Te(a)||Me(r)||Me(a)||Ae(r)||Ae(a)||Ie(r)||Ie(a)||Ce(r)||Ce(a)?!n&&i in e||(e[i]=ve(t[i])):ye(a,r,n)}return e}function _e(e,t,n){for(var i in t)t.hasOwnProperty(i)&&(n?null!=t[i]:null==e[i])&&(e[i]=t[i]);return e}var xe,be=function(){return me.createCanvas()};function we(e,t,n){if(e&&t)if(e.forEach&&e.forEach===he)e.forEach(t,n);else if(e.length===+e.length)for(var i=0,a=e.length;i<a;i++)t.call(n,e[i],i,e);else for(var r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function Se(e,t){var n=fe.call(arguments,2);return function(){return e.apply(t,n.concat(fe.call(arguments)))}}function Me(e){return"[object Array]"===ue.call(e)}function Te(e){var t=typeof e;return"function"===t||!!e&&"object"===t}function Ie(e){return!!se[ue.call(e)]}function Ae(e){return"object"==typeof e&&"number"==typeof e.nodeType&&"object"==typeof e.ownerDocument}me.createCanvas=function(){return document.createElement("canvas")};var De="__ec_primitive__";function Ce(e){return e[De]}function Oe(e){var t=Me(e);this.data={};var n=this;function i(e,i){t?n.set(e,i):n.set(i,e)}e instanceof Oe?e.each(i):e&&we(e,i)}Oe.prototype={constructor:Oe,get:function(e){return this.data.hasOwnProperty(e)?this.data[e]:null},set:function(e,t){return this.data[e]=t},each:function(e,t){for(var n in void 0!==t&&(e=Se(e,t)),this.data)this.data.hasOwnProperty(n)&&e(this.data[n],n)},removeKey:function(e){delete this.data[e]}};var ke=function(e,t){for(var n=e[0],i=1,a=e.length;i<a;i++)n=ye(n,e[i],t);return n},Le=function(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n}return-1},Ee=function(e,t){var n=e.prototype;function i(){}for(var a in i.prototype=t.prototype,e.prototype=new i,n)n.hasOwnProperty(a)&&(e.prototype[a]=n[a]);e.prototype.constructor=e,e.superClass=t},Ne=function(e,t,n){if(e&&t){if(e.map&&e.map===pe)return e.map(t,n);for(var i=[],a=0,r=e.length;a<r;a++)i.push(t.call(n,e[a],a,e));return i}},Pe=function(e,t,n,i){if(e&&t){if(e.reduce&&e.reduce===ge)return e.reduce(t,n,i);for(var a=0,r=e.length;a<r;a++)n=t.call(i,n,e[a],a,e);return n}},Re=function(e,t,n){if(e&&t){if(e.filter&&e.filter===de)return e.filter(t,n);for(var i=[],a=0,r=e.length;a<r;a++)t.call(n,e[a],a,e)&&i.push(e[a]);return i}},ze=function(e,t,n){if(e&&t)for(var i=0,a=e.length;i<a;i++)if(t.call(n,e[i],i,e))return e[i]},Be=function(e){var t=fe.call(arguments,1);return function(){return e.apply(this,t.concat(fe.call(arguments)))}},Ve=function(e){for(var t=0,n=arguments.length;t<n;t++)if(null!=arguments[t])return arguments[t]},He=function(){return Function.call.apply(fe,arguments)},Ye=function(e){if("number"==typeof e)return[e,e,e,e];var t=e.length;return 2===t?[e[0],e[1],e[0],e[1]]:3===t?[e[0],e[1],e[2],e[1]]:e},Fe=function(e,t){for(var n=new e.constructor(e.length+t.length),i=0;i<e.length;i++)n[i]=e[i];var a=e.length;for(i=0;i<t.length;i++)n[i+a]=t[i];return n},Ge={$override:function(e,t){"createCanvas"===e&&(xe=null),me[e]=t},clone:ve,merge:ye,mergeAll:ke,extend:function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},defaults:_e,createCanvas:be,getContext:function(){return xe||(xe=be().getContext("2d")),xe},indexOf:Le,inherits:Ee,mixin:function(e,t,n){_e(e="prototype"in e?e.prototype:e,t="prototype"in t?t.prototype:t,n)},isArrayLike:function(e){if(e)return"string"!=typeof e&&"number"==typeof e.length},each:we,map:Ne,reduce:Pe,filter:Re,find:ze,bind:Se,curry:Be,isArray:Me,isFunction:function(e){return"function"==typeof e},isString:function(e){return"[object String]"===ue.call(e)},isObject:Te,isBuiltInObject:Ie,isTypedArray:function(e){return!!le[ue.call(e)]},isDom:Ae,eqNaN:function(e){return e!=e},retrieve:Ve,retrieve2:function(e,t){return null!=e?e:t},retrieve3:function(e,t,n){return null!=e?e:null!=t?t:n},slice:He,normalizeCssArray:Ye,assert:function(e,t){if(!e)throw new Error(t)},trim:function(e){return null==e?null:"function"==typeof e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},setAsPrimitive:function(e){e[De]=!0},isPrimitive:Ce,createHashMap:function(e){return new Oe(e)},concatArray:Fe,noop:function(){}},We="undefined"==typeof Float32Array?Array:Float32Array;function je(e){return Math.sqrt(Ue(e))}function Ue(e){return e[0]*e[0]+e[1]*e[1]}function Ze(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}function Xe(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var qe=function(e,t){var n=new We(2);return null==e&&(e=0),null==t&&(t=0),n[0]=e,n[1]=t,n},Ke=function(e,t){return e[0]=t[0],e[1]=t[1],e},$e=function(e){var t=new We(2);return t[0]=e[0],t[1]=e[1],t},Qe=function(e,t,n){return e[0]=t,e[1]=n,e},Je=function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e},et=function(e,t,n,i){return e[0]=t[0]+n[0]*i,e[1]=t[1]+n[1]*i,e},tt=function(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e},nt=function(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e},it=function(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e},at=function(e,t){return e[0]*t[0]+e[1]*t[1]},rt=function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e},ot=function(e,t){var n=je(t);return 0===n?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e},st=function(e,t){return e[0]=-t[0],e[1]=-t[1],e},lt=function(e,t,n,i){return e[0]=t[0]+i*(n[0]-t[0]),e[1]=t[1]+i*(n[1]-t[1]),e},ut=function(e,t,n){var i=t[0],a=t[1];return e[0]=n[0]*i+n[2]*a+n[4],e[1]=n[1]*i+n[3]*a+n[5],e},ct=function(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e},ht=function(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e},dt={create:qe,copy:Ke,clone:$e,set:Qe,add:Je,scaleAndAdd:et,sub:tt,len:je,length:je,lenSquare:Ue,lengthSquare:Ue,mul:nt,div:it,dot:at,scale:rt,normalize:ot,distance:Ze,dist:Ze,distanceSquare:Xe,distSquare:Xe,negate:st,lerp:lt,applyTransform:ut,min:ct,max:ht};function ft(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}function pt(e,t){return{target:e,topTarget:t&&t.topTarget}}ft.prototype={constructor:ft,_dragStart:function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.dispatchToElement(pt(t,e),"dragstart",e.event))},_drag:function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,i=e.offsetY,a=n-this._x,r=i-this._y;this._x=n,this._y=i,t.drift(a,r,e),this.dispatchToElement(pt(t,e),"drag",e.event);var o=this.findHover(n,i,t).target,s=this._dropTarget;this._dropTarget=o,t!==o&&(s&&o!==s&&this.dispatchToElement(pt(s,e),"dragleave",e.event),o&&o!==s&&this.dispatchToElement(pt(o,e),"dragenter",e.event))}},_dragEnd:function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.dispatchToElement(pt(t,e),"dragend",e.event),this._dropTarget&&this.dispatchToElement(pt(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null}};var gt=ft,mt=Array.prototype.slice,vt=function(e){this._$handlers={},this._$eventProcessor=e};function yt(e,t,n,i,a,r){var o=e._$handlers;if("function"==typeof n&&(a=i,i=n,n=null),!i||!t)return e;n=function(e,t){var n=e._$eventProcessor;return null!=t&&n&&n.normalizeQuery&&(t=n.normalizeQuery(t)),t}(e,n),o[t]||(o[t]=[]);for(var s=0;s<o[t].length;s++)if(o[t][s].h===i)return e;var l={h:i,one:r,query:n,ctx:a||e,callAtLast:i.zrEventfulCallAtLast},u=o[t].length-1,c=o[t][u];return c&&c.callAtLast?o[t].splice(u,0,l):o[t].push(l),e}vt.prototype={constructor:vt,one:function(e,t,n,i){return yt(this,e,t,n,i,!0)},on:function(e,t,n,i){return yt(this,e,t,n,i,!1)},isSilent:function(e){var t=this._$handlers;return!t[e]||!t[e].length},off:function(e,t){var n=this._$handlers;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var i=[],a=0,r=n[e].length;a<r;a++)n[e][a].h!==t&&i.push(n[e][a]);n[e]=i}n[e]&&0===n[e].length&&delete n[e]}else delete n[e];return this},trigger:function(e){var t=this._$handlers[e],n=this._$eventProcessor;if(t){var i=arguments,a=i.length;a>3&&(i=mt.call(i,1));for(var r=t.length,o=0;o<r;){var s=t[o];if(n&&n.filter&&null!=s.query&&!n.filter(e,s.query))o++;else{switch(a){case 1:s.h.call(s.ctx);break;case 2:s.h.call(s.ctx,i[1]);break;case 3:s.h.call(s.ctx,i[1],i[2]);break;default:s.h.apply(s.ctx,i)}s.one?(t.splice(o,1),r--):o++}}}return n&&n.afterTrigger&&n.afterTrigger(e),this},triggerWithContext:function(e){var t=this._$handlers[e],n=this._$eventProcessor;if(t){var i=arguments,a=i.length;a>4&&(i=mt.call(i,1,i.length-1));for(var r=i[i.length-1],o=t.length,s=0;s<o;){var l=t[s];if(n&&n.filter&&null!=l.query&&!n.filter(e,l.query))s++;else{switch(a){case 1:l.h.call(r);break;case 2:l.h.call(r,i[1]);break;case 3:l.h.call(r,i[1],i[2]);break;default:l.h.apply(r,i)}l.one?(t.splice(s,1),o--):s++}}}return n&&n.afterTrigger&&n.afterTrigger(e),this}};var _t=vt,xt=Math.log(2);function bt(e,t,n,i,a,r){var o=i+"-"+a,s=e.length;if(r.hasOwnProperty(o))return r[o];if(1===t){var l=Math.round(Math.log((1<<s)-1&~a)/xt);return e[n][l]}for(var u=i|1<<n,c=n+1;i&1<<c;)c++;for(var h=0,d=0,f=0;d<s;d++){var p=1<<d;p&a||(h+=(f%2?-1:1)*e[n][d]*bt(e,t-1,c,u,a|p,r),f++)}return r[o]=h,h}var wt=function(e,t){var n=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],i={},a=bt(n,8,0,0,0,i);if(0!==a){for(var r=[],o=0;o<8;o++)for(var s=0;s<8;s++)null==r[s]&&(r[s]=0),r[s]+=((o+s)%2?-1:1)*bt(n,7,0===o?1:0,1<<o,1<<s,i)/a*t[o];return function(e,t,n){var i=t*r[6]+n*r[7]+1;e[0]=(t*r[0]+n*r[1]+r[2])/i,e[1]=(t*r[3]+n*r[4]+r[5])/i}}},St={buildTransformer:wt}.buildTransformer,Mt="___zrEVENTSAVED",Tt=[];function It(e,t,n,i,a){if(t.getBoundingClientRect&&oe.domSupported&&!At(t)){var r=t[Mt]||(t[Mt]={}),o=function(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var i=["left","right"],a=["top","bottom"],r=0;r<4;r++){var o=document.createElement("div"),s=r%2,l=(r>>1)%2;o.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[s]+":0",a[l]+":0",i[1-s]+":auto",a[1-l]+":auto",""].join("!important;"),e.appendChild(o),n.push(o)}return n}(t,r),s=function(e,t,n){for(var i=n?"invTrans":"trans",a=t[i],r=t.srcCoords,o=!0,s=[],l=[],u=0;u<4;u++){var c=e[u].getBoundingClientRect(),h=2*u,d=c.left,f=c.top;s.push(d,f),o=o&&r&&d===r[h]&&f===r[h+1],l.push(e[u].offsetLeft,e[u].offsetTop)}return o&&a?a:(t.srcCoords=s,t[i]=n?St(l,s):St(s,l))}(o,r,a);if(s)return s(e,n,i),!0}return!1}function At(e){return"CANVAS"===e.nodeName.toUpperCase()}var Dt=function(e,t,n,i,a){return It(Tt,t,i,a,!0)&&It(e,n,Tt[0],Tt[1])},Ct={transformLocalCoord:Dt,transformCoordWithViewport:It,isCanvasEl:At},Ot=_t,kt=Ct.isCanvasEl,Lt=Ct.transformCoordWithViewport,Et="undefined"!=typeof window&&!!window.addEventListener,Nt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Pt=[];function Rt(e,t,n,i){return n=n||{},i||!oe.canvasSupported?zt(e,t,n):oe.browser.firefox&&null!=t.layerX&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):null!=t.offsetX?(n.zrX=t.offsetX,n.zrY=t.offsetY):zt(e,t,n),n}function zt(e,t,n){if(oe.domSupported&&e.getBoundingClientRect){var i=t.clientX,a=t.clientY;if(kt(e)){var r=e.getBoundingClientRect();return n.zrX=i-r.left,void(n.zrY=a-r.top)}if(Lt(Pt,e,i,a))return n.zrX=Pt[0],void(n.zrY=Pt[1])}n.zrX=n.zrY=0}function Bt(e){return e||window.event}var Vt={Dispatcher:Ot,clientToLocal:Rt,getNativeEvent:Bt,normalizeEvent:function(e,t,n){if(null!=(t=Bt(t)).zrX)return t;var i=t.type;if(i&&i.indexOf("touch")>=0){var a="touchend"!==i?t.targetTouches[0]:t.changedTouches[0];a&&Rt(e,a,t,n)}else Rt(e,t,t,n),t.zrDelta=t.wheelDelta?t.wheelDelta/120:-(t.detail||0)/3;var r=t.button;return null==t.which&&void 0!==r&&Nt.test(t.type)&&(t.which=1&r?1:2&r?3:4&r?2:0),t},addEventListener:function(e,t,n,i){Et?e.addEventListener(t,n,i):e.attachEvent("on"+t,n)},removeEventListener:function(e,t,n,i){Et?e.removeEventListener(t,n,i):e.detachEvent("on"+t,n)},stop:Et?function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0}:function(e){e.returnValue=!1,e.cancelBubble=!0},isMiddleOrRightButtonOnMouseUpDown:function(e){return 2===e.which||3===e.which},notLeftMouse:function(e){return e.which>1}},Ht=function(){this._track=[]};function Yt(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}Ht.prototype={constructor:Ht,recognize:function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},clear:function(){return this._track.length=0,this},_doTrack:function(e,t,n){var i=e.touches;if(i){for(var a={points:[],touches:[],target:t,event:e},r=0,o=i.length;r<o;r++){var s=i[r],l=Vt.clientToLocal(n,s,{});a.points.push([l.zrX,l.zrY]),a.touches.push(s)}this._track.push(a)}},_recognize:function(e){for(var t in Ft)if(Ft.hasOwnProperty(t)){var n=Ft[t](this._track,e);if(n)return n}}};var Ft={pinch:function(e,t){var n=e.length;if(n){var i,a=(e[n-1]||{}).points,r=(e[n-2]||{}).points||a;if(r&&r.length>1&&a&&a.length>1){var o=Yt(a)/Yt(r);!isFinite(o)&&(o=1),t.pinchScale=o;var s=[((i=a)[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return t.pinchX=s[0],t.pinchY=s[1],{type:"pinch",target:e[0].target,event:t}}}}},Gt=Ht,Wt="silent";function jt(){Vt.stop(this.event)}function Ut(){}Ut.prototype.dispose=function(){};var Zt=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Xt=function(e,t,n,i){_t.call(this),this.storage=e,this.painter=t,this.painterRoot=i,n=n||new Ut,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,gt.call(this),this.setHandlerProxy(n)};function qt(e,t,n){if(e[e.rectHover?"rectContain":"contain"](t,n)){for(var i,a=e;a;){if(a.clipPath&&!a.clipPath.contain(t,n))return!1;a.silent&&(i=!0),a=a.parent}return!i||Wt}return!1}function Kt(e,t,n){var i=e.painter;return t<0||t>i.getWidth()||n<0||n>i.getHeight()}Xt.prototype={constructor:Xt,setHandlerProxy:function(e){this.proxy&&this.proxy.dispose(),e&&(Ge.each(Zt,(function(t){e.on&&e.on(t,this[t],this)}),this),e.handler=this),this.proxy=e},mousemove:function(e){var t=e.zrX,n=e.zrY,i=Kt(this,t,n),a=this._hovered,r=a.target;r&&!r.__zr&&(r=(a=this.findHover(a.x,a.y)).target);var o=this._hovered=i?{x:t,y:n}:this.findHover(t,n),s=o.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),r&&s!==r&&this.dispatchToElement(a,"mouseout",e),this.dispatchToElement(o,"mousemove",e),s&&s!==r&&this.dispatchToElement(o,"mouseover",e)},mouseout:function(e){var t=e.zrEventControl,n=e.zrIsToLocalDOM;"only_globalout"!==t&&this.dispatchToElement(this._hovered,"mouseout",e),"no_globalout"!==t&&!n&&this.trigger("globalout",{type:"globalout",event:e})},resize:function(e){this._hovered={}},dispatch:function(e,t){var n=this[e];n&&n.call(this,t)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},dispatchToElement:function(e,t,n){var i=(e=e||{}).target;if(!i||!i.silent){for(var a="on"+t,r=function(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:jt}}(t,e,n);i&&(i[a]&&(r.cancelBubble=i[a].call(i,r)),i.trigger(t,r),i=i.parent,!r.cancelBubble););r.cancelBubble||(this.trigger(t,r),this.painter&&this.painter.eachOtherLayer((function(e){"function"==typeof e[a]&&e[a].call(e,r),e.trigger&&e.trigger(t,r)})))}},findHover:function(e,t,n){for(var i=this.storage.getDisplayList(),a={x:e,y:t},r=i.length-1;r>=0;r--){var o;if(i[r]!==n&&!i[r].ignore&&(o=qt(i[r],e,t))&&(!a.topTarget&&(a.topTarget=i[r]),o!==Wt)){a.target=i[r];break}}return a},processGesture:function(e,t){this._gestureMgr||(this._gestureMgr=new Gt);var n=this._gestureMgr;"start"===t&&n.clear();var i=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if("end"===t&&n.clear(),i){var a=i.type;e.gestureEvent=a,this.dispatchToElement({target:i.target},a,i.event)}}},Ge.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(e){Xt.prototype[e]=function(t){var n,i,a=t.zrX,r=t.zrY,o=Kt(this,a,r);if("mouseup"===e&&o||(i=(n=this.findHover(a,r)).target),"mousedown"===e)this._downEl=i,this._downPoint=[t.zrX,t.zrY],this._upEl=i;else if("mouseup"===e)this._upEl=i;else if("click"===e){if(this._downEl!==this._upEl||!this._downPoint||dt.dist(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,e,t)}})),Ge.mixin(Xt,_t),Ge.mixin(Xt,gt);var $t=Xt,Qt="undefined"==typeof Float32Array?Array:Float32Array;function Jt(){var e=new Qt(6);return en(e),e}function en(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function tn(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}var nn=function(e,t,n){var i=t[0]*n[0]+t[2]*n[1],a=t[1]*n[0]+t[3]*n[1],r=t[0]*n[2]+t[2]*n[3],o=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],l=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=i,e[1]=a,e[2]=r,e[3]=o,e[4]=s,e[5]=l,e},an=function(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e},rn=function(e,t,n){var i=t[0],a=t[2],r=t[4],o=t[1],s=t[3],l=t[5],u=Math.sin(n),c=Math.cos(n);return e[0]=i*c+o*u,e[1]=-i*u+o*c,e[2]=a*c+s*u,e[3]=-a*u+c*s,e[4]=c*r+u*l,e[5]=c*l-u*r,e},on=function(e,t,n){var i=n[0],a=n[1];return e[0]=t[0]*i,e[1]=t[1]*a,e[2]=t[2]*i,e[3]=t[3]*a,e[4]=t[4]*i,e[5]=t[5]*a,e},sn=function(e,t){var n=t[0],i=t[2],a=t[4],r=t[1],o=t[3],s=t[5],l=n*o-r*i;return l?(l=1/l,e[0]=o*l,e[1]=-r*l,e[2]=-i*l,e[3]=n*l,e[4]=(i*s-o*a)*l,e[5]=(r*a-n*s)*l,e):null},ln={create:Jt,identity:en,copy:tn,mul:nn,translate:an,rotate:rn,scale:on,invert:sn,clone:function(e){var t=Jt();return tn(t,e),t}},un=ln.identity,cn=5e-5;function hn(e){return e>cn||e<-5e-5}var dn=function(e){(e=e||{}).position||(this.position=[0,0]),null==e.rotation&&(this.rotation=0),e.scale||(this.scale=[1,1]),this.origin=this.origin||null},fn=dn.prototype;fn.transform=null,fn.needLocalTransform=function(){return hn(this.rotation)||hn(this.position[0])||hn(this.position[1])||hn(this.scale[0]-1)||hn(this.scale[1]-1)};var pn=[];fn.updateTransform=function(){var e=this.parent,t=e&&e.transform,n=this.needLocalTransform(),i=this.transform;if(n||t){i=i||ln.create(),n?this.getLocalTransform(i):un(i),t&&(n?ln.mul(i,e.transform,i):ln.copy(i,e.transform)),this.transform=i;var a=this.globalScaleRatio;if(null!=a&&1!==a){this.getGlobalScale(pn);var r=pn[0]<0?-1:1,o=pn[1]<0?-1:1,s=((pn[0]-r)*a+r)/pn[0]||0,l=((pn[1]-o)*a+o)/pn[1]||0;i[0]*=s,i[1]*=s,i[2]*=l,i[3]*=l}this.invTransform=this.invTransform||ln.create(),ln.invert(this.invTransform,i)}else i&&un(i)},fn.getLocalTransform=function(e){return dn.getLocalTransform(this,e)},fn.setTransform=function(e){var t=this.transform,n=e.dpr||1;t?e.setTransform(n*t[0],n*t[1],n*t[2],n*t[3],n*t[4],n*t[5]):e.setTransform(n,0,0,n,0,0)},fn.restoreTransform=function(e){var t=e.dpr||1;e.setTransform(t,0,0,t,0,0)};var gn=[],mn=ln.create();fn.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],i=this.position,a=this.scale;hn(t-1)&&(t=Math.sqrt(t)),hn(n-1)&&(n=Math.sqrt(n)),e[0]<0&&(t=-t),e[3]<0&&(n=-n),i[0]=e[4],i[1]=e[5],a[0]=t,a[1]=n,this.rotation=Math.atan2(-e[1]/n,e[0]/t)}},fn.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(ln.mul(gn,e.invTransform,t),t=gn);var n=this.origin;n&&(n[0]||n[1])&&(mn[4]=n[0],mn[5]=n[1],ln.mul(gn,t,mn),gn[4]-=n[0],gn[5]-=n[1],t=gn),this.setLocalTransform(t)}},fn.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},fn.transformCoordToLocal=function(e,t){var n=[e,t],i=this.invTransform;return i&&dt.applyTransform(n,n,i),n},fn.transformCoordToGlobal=function(e,t){var n=[e,t],i=this.transform;return i&&dt.applyTransform(n,n,i),n},dn.getLocalTransform=function(e,t){un(t=t||[]);var n=e.origin,i=e.scale||[1,1],a=e.rotation||0,r=e.position||[0,0];return n&&(t[4]-=n[0],t[5]-=n[1]),ln.scale(t,t,i),a&&ln.rotate(t,t,a),n&&(t[4]+=n[0],t[5]+=n[1]),t[4]+=r[0],t[5]+=r[1],t};var vn=dn,yn={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return.5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return 0===e?0:Math.pow(1024,e-1)},exponentialOut:function(e){return 1===e?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4))},elasticOut:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/.4)+1)},elasticInOut:function(e){var t,n=.1,i=.4;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=i*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/i)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-yn.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?.5*yn.bounceIn(2*e):.5*yn.bounceOut(2*e-1)+.5}},_n=yn;function xn(e){this._target=e.target,this._life=e.life||1e3,this._delay=e.delay||0,this._initialized=!1,this.loop=null!=e.loop&&e.loop,this.gap=e.gap||0,this.easing=e.easing||"Linear",this.onframe=e.onframe,this.ondestroy=e.ondestroy,this.onrestart=e.onrestart,this._pausedTime=0,this._paused=!1}xn.prototype={constructor:xn,step:function(e,t){if(this._initialized||(this._startTime=e+this._delay,this._initialized=!0),this._paused)this._pausedTime+=t;else{var n=(e-this._startTime-this._pausedTime)/this._life;if(!(n<0)){n=Math.min(n,1);var i=this.easing,a="string"==typeof i?_n[i]:i,r="function"==typeof a?a(n):n;return this.fire("frame",r),1===n?this.loop?(this.restart(e),"restart"):(this._needsRemove=!0,"destroy"):null}}},restart:function(e){var t=(e-this._startTime-this._pausedTime)%this._life;this._startTime=e-t+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(e,t){this[e="on"+e]&&this[e](this._target,t)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var bn=xn,wn=function(){this.head=null,this.tail=null,this._len=0},Sn=wn.prototype;Sn.insert=function(e){var t=new Mn(e);return this.insertEntry(t),t},Sn.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},Sn.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},Sn.len=function(){return this._len},Sn.clear=function(){this.head=this.tail=null,this._len=0};var Mn=function(e){this.value=e,this.next,this.prev},Tn=function(e){this._list=new wn,this._map={},this._maxSize=e||10,this._lastRemovedEntry=null},In=Tn.prototype;In.put=function(e,t){var n=this._list,i=this._map,a=null;if(null==i[e]){var r=n.len(),o=this._lastRemovedEntry;if(r>=this._maxSize&&r>0){var s=n.head;n.remove(s),delete i[s.key],a=s.value,this._lastRemovedEntry=s}o?o.value=t:o=new Mn(t),o.key=e,n.insertEntry(o),i[e]=o}return a},In.get=function(e){var t=this._map[e],n=this._list;if(null!=t)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},In.clear=function(){this._list.clear(),this._map={}};var An=Tn,Dn={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 Cn(e){return(e=Math.round(e))<0?0:e>255?255:e}function On(e){return e<0?0:e>1?1:e}function kn(e){return e.length&&"%"===e.charAt(e.length-1)?Cn(parseFloat(e)/100*255):Cn(parseInt(e,10))}function Ln(e){return e.length&&"%"===e.charAt(e.length-1)?On(parseFloat(e)/100):On(parseFloat(e))}function En(e,t,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?e+(t-e)*n*6:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function Nn(e,t,n){return e+(t-e)*n}function Pn(e,t,n,i,a){return e[0]=t,e[1]=n,e[2]=i,e[3]=a,e}function Rn(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var zn=new An(20),Bn=null;function Vn(e,t){Bn&&Rn(Bn,t),Bn=zn.put(e,Bn||t.slice())}function Hn(e,t){if(e){t=t||[];var n=zn.get(e);if(n)return Rn(t,n);var i,a=(e+="").replace(/ /g,"").toLowerCase();if(a in Dn)return Rn(t,Dn[a]),Vn(e,t),t;if("#"===a.charAt(0))return 4===a.length?(i=parseInt(a.substr(1),16))>=0&&i<=4095?(Pn(t,(3840&i)>>4|(3840&i)>>8,240&i|(240&i)>>4,15&i|(15&i)<<4,1),Vn(e,t),t):void Pn(t,0,0,0,1):7===a.length?(i=parseInt(a.substr(1),16))>=0&&i<=16777215?(Pn(t,(16711680&i)>>16,(65280&i)>>8,255&i,1),Vn(e,t),t):void Pn(t,0,0,0,1):void 0;var r=a.indexOf("("),o=a.indexOf(")");if(-1!==r&&o+1===a.length){var s=a.substr(0,r),l=a.substr(r+1,o-(r+1)).split(","),u=1;switch(s){case"rgba":if(4!==l.length)return void Pn(t,0,0,0,1);u=Ln(l.pop());case"rgb":return 3!==l.length?void Pn(t,0,0,0,1):(Pn(t,kn(l[0]),kn(l[1]),kn(l[2]),u),Vn(e,t),t);case"hsla":return 4!==l.length?void Pn(t,0,0,0,1):(l[3]=Ln(l[3]),Yn(l,t),Vn(e,t),t);case"hsl":return 3!==l.length?void Pn(t,0,0,0,1):(Yn(l,t),Vn(e,t),t);default:return}}Pn(t,0,0,0,1)}}function Yn(e,t){var n=(parseFloat(e[0])%360+360)%360/360,i=Ln(e[1]),a=Ln(e[2]),r=a<=.5?a*(i+1):a+i-a*i,o=2*a-r;return Pn(t=t||[],Cn(255*En(o,r,n+1/3)),Cn(255*En(o,r,n)),Cn(255*En(o,r,n-1/3)),1),4===e.length&&(t[3]=e[3]),t}function Fn(e,t,n){if(t&&t.length&&e>=0&&e<=1){n=n||[];var i=e*(t.length-1),a=Math.floor(i),r=Math.ceil(i),o=t[a],s=t[r],l=i-a;return n[0]=Cn(Nn(o[0],s[0],l)),n[1]=Cn(Nn(o[1],s[1],l)),n[2]=Cn(Nn(o[2],s[2],l)),n[3]=On(Nn(o[3],s[3],l)),n}}function Gn(e,t,n){if(t&&t.length&&e>=0&&e<=1){var i=e*(t.length-1),a=Math.floor(i),r=Math.ceil(i),o=Hn(t[a]),s=Hn(t[r]),l=i-a,u=Wn([Cn(Nn(o[0],s[0],l)),Cn(Nn(o[1],s[1],l)),Cn(Nn(o[2],s[2],l)),On(Nn(o[3],s[3],l))],"rgba");return n?{color:u,leftIndex:a,rightIndex:r,value:i}:u}}function Wn(e,t){if(e&&e.length){var n=e[0]+","+e[1]+","+e[2];return"rgba"!==t&&"hsva"!==t&&"hsla"!==t||(n+=","+e[3]),t+"("+n+")"}}var jn=function(e,t){var n=Hn(e);if(n){for(var i=0;i<3;i++)n[i]=t<0?n[i]*(1-t)|0:(255-n[i])*t+n[i]|0,n[i]>255?n[i]=255:e[i]<0&&(n[i]=0);return Wn(n,4===n.length?"rgba":"rgb")}},Un=function(e){var t=Hn(e);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)},Zn=function(e,t,n,i){if(e=Hn(e))return e=function(e){if(e){var t,n,i=e[0]/255,a=e[1]/255,r=e[2]/255,o=Math.min(i,a,r),s=Math.max(i,a,r),l=s-o,u=(s+o)/2;if(0===l)t=0,n=0;else{n=u<.5?l/(s+o):l/(2-s-o);var c=((s-i)/6+l/2)/l,h=((s-a)/6+l/2)/l,d=((s-r)/6+l/2)/l;i===s?t=d-h:a===s?t=1/3+c-d:r===s&&(t=2/3+h-c),t<0&&(t+=1),t>1&&(t-=1)}var f=[360*t,n,u];return null!=e[3]&&f.push(e[3]),f}}(e),null!=t&&(e[0]=function(e){return(e=Math.round(e))<0?0:e>360?360:e}(t)),null!=n&&(e[1]=Ln(n)),null!=i&&(e[2]=Ln(i)),Wn(Yn(e),"rgba")},Xn=function(e,t){if((e=Hn(e))&&null!=t)return e[3]=On(t),Wn(e,"rgba")},qn={parse:Hn,lift:jn,toHex:Un,fastLerp:Fn,fastMapToColor:Fn,lerp:Gn,mapToColor:Gn,modifyHSL:Zn,modifyAlpha:Xn,stringify:Wn},Kn=Ge.isArrayLike,$n=Array.prototype.slice;function Qn(e,t){return e[t]}function Jn(e,t,n){e[t]=n}function ei(e,t,n){return(t-e)*n+e}function ti(e,t,n){return n>.5?t:e}function ni(e,t,n,i,a){var r=e.length;if(1===a)for(var o=0;o<r;o++)i[o]=ei(e[o],t[o],n);else{var s=r&&e[0].length;for(o=0;o<r;o++)for(var l=0;l<s;l++)i[o][l]=ei(e[o][l],t[o][l],n)}}function ii(e,t,n){var i=e.length,a=t.length;if(i!==a)if(i>a)e.length=a;else for(var r=i;r<a;r++)e.push(1===n?t[r]:$n.call(t[r]));var o=e[0]&&e[0].length;for(r=0;r<e.length;r++)if(1===n)isNaN(e[r])&&(e[r]=t[r]);else for(var s=0;s<o;s++)isNaN(e[r][s])&&(e[r][s]=t[r][s])}function ai(e,t,n){if(e===t)return!0;var i=e.length;if(i!==t.length)return!1;if(1===n){for(var a=0;a<i;a++)if(e[a]!==t[a])return!1}else{var r=e[0].length;for(a=0;a<i;a++)for(var o=0;o<r;o++)if(e[a][o]!==t[a][o])return!1}return!0}function ri(e,t,n,i,a,r,o,s,l){var u=e.length;if(1===l)for(var c=0;c<u;c++)s[c]=oi(e[c],t[c],n[c],i[c],a,r,o);else{var h=e[0].length;for(c=0;c<u;c++)for(var d=0;d<h;d++)s[c][d]=oi(e[c][d],t[c][d],n[c][d],i[c][d],a,r,o)}}function oi(e,t,n,i,a,r,o){var s=.5*(n-e),l=.5*(i-t);return(2*(t-n)+s+l)*o+(-3*(t-n)-2*s-l)*r+s*a+t}function si(e){if(Kn(e)){var t=e.length;if(Kn(e[0])){for(var n=[],i=0;i<t;i++)n.push($n.call(e[i]));return n}return $n.call(e)}return e}function li(e){return e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.floor(e[2]),"rgba("+e.join(",")+")"}function ui(e,t,n,i,a,r){var o=e._getter,s=e._setter,l="spline"===t,u=i.length;if(u){var c,h=i[0].value,d=Kn(h),f=!1,p=!1,g=d?function(e){var t=e[e.length-1].value;return Kn(t&&t[0])?2:1}(i):0;i.sort((function(e,t){return e.time-t.time})),c=i[u-1].time;for(var m=[],v=[],y=i[0].value,_=!0,x=0;x<u;x++){m.push(i[x].time/c);var b=i[x].value;if(d&&ai(b,y,g)||!d&&b===y||(_=!1),y=b,"string"==typeof b){var w=qn.parse(b);w?(b=w,f=!0):p=!0}v.push(b)}if(r||!_){var S=v[u-1];for(x=0;x<u-1;x++)d?ii(v[x],S,g):!isNaN(v[x])||isNaN(S)||p||f||(v[x]=S);d&&ii(o(e._target,a),S,g);var M,T,I,A,D,C=0,O=0;if(f)var k=[0,0,0,0];var L=new bn({target:e._target,life:c,loop:e._loop,delay:e._delay,onframe:function(e,t){var n;if(t<0)n=0;else if(t<O){for(n=Math.min(C+1,u-1);n>=0&&!(m[n]<=t);n--);n=Math.min(n,u-2)}else{for(n=C;n<u&&!(m[n]>t);n++);n=Math.min(n-1,u-2)}C=n,O=t;var i=m[n+1]-m[n];if(0!==i)if(M=(t-m[n])/i,l)if(I=v[n],T=v[0===n?n:n-1],A=v[n>u-2?u-1:n+1],D=v[n>u-3?u-1:n+2],d)ri(T,I,A,D,M,M*M,M*M*M,o(e,a),g);else{if(f)r=ri(T,I,A,D,M,M*M,M*M*M,k,1),r=li(k);else{if(p)return ti(I,A,M);r=oi(T,I,A,D,M,M*M,M*M*M)}s(e,a,r)}else if(d)ni(v[n],v[n+1],M,o(e,a),g);else{var r;if(f)ni(v[n],v[n+1],M,k,1),r=li(k);else{if(p)return ti(v[n],v[n+1],M);r=ei(v[n],v[n+1],M)}s(e,a,r)}},ondestroy:n});return t&&"spline"!==t&&(L.easing=t),L}}}var ci=function(e,t,n,i){this._tracks={},this._target=e,this._loop=t||!1,this._getter=n||Qn,this._setter=i||Jn,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};ci.prototype={when:function(e,t){var n=this._tracks;for(var i in t)if(t.hasOwnProperty(i)){if(!n[i]){n[i]=[];var a=this._getter(this._target,i);if(null==a)continue;0!==e&&n[i].push({time:0,value:si(a)})}n[i].push({time:e,value:t[i]})}return this},during:function(e){return this._onframeList.push(e),this},pause:function(){for(var e=0;e<this._clipList.length;e++)this._clipList[e].pause();this._paused=!0},resume:function(){for(var e=0;e<this._clipList.length;e++)this._clipList[e].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var e=this._doneList,t=e.length,n=0;n<t;n++)e[n].call(this)},start:function(e,t){var n,i=this,a=0,r=function(){--a||i._doneCallback()};for(var o in this._tracks)if(this._tracks.hasOwnProperty(o)){var s=ui(this,e,r,this._tracks[o],o,t);s&&(this._clipList.push(s),a++,this.animation&&this.animation.addClip(s),n=s)}if(n){var l=n.onframe;n.onframe=function(e,t){l(e,t);for(var n=0;n<i._onframeList.length;n++)i._onframeList[n](e,t)}}return a||this._doneCallback(),this},stop:function(e){for(var t=this._clipList,n=this.animation,i=0;i<t.length;i++){var a=t[i];e&&a.onframe(this._target,1),n&&n.removeClip(a)}t.length=0},delay:function(e){return this._delay=e,this},done:function(e){return e&&this._doneList.push(e),this},getClips:function(){return this._clipList}};var hi=ci,di=1;"undefined"!=typeof window&&(di=Math.max(window.devicePixelRatio||1,1));var fi={debugMode:0,devicePixelRatio:di},pi=function(){},gi=Ge.isString,mi=Ge.isFunction,vi=Ge.isObject,yi=Ge.isArrayLike,_i=Ge.indexOf,xi=function(){this.animators=[]};function bi(e,t,n,i,a,r,o,s){gi(i)?(r=a,a=i,i=0):mi(a)?(r=a,a="linear",i=0):mi(i)?(r=i,i=0):mi(n)?(r=n,n=500):n||(n=500),e.stopAnimation(),wi(e,"",e,t,n,i,s);var l=e.animators.slice(),u=l.length;function c(){--u||r&&r()}u||r&&r();for(var h=0;h<l.length;h++)l[h].done(c).start(a,o)}function wi(e,t,n,i,a,r,o){var s={},l=0;for(var u in i)i.hasOwnProperty(u)&&(null!=n[u]?vi(i[u])&&!yi(i[u])?wi(e,t?t+"."+u:u,n[u],i[u],a,r,o):(o?(s[u]=n[u],Si(e,t,u,i[u])):s[u]=i[u],l++):null==i[u]||o||Si(e,t,u,i[u]));l>0&&e.animate(t,!1).when(null==a?500:a,s).delay(r||0)}function Si(e,t,n,i){if(t){var a={};a[t]={},a[t][n]=i,e.attr(a)}else e.attr(n,i)}xi.prototype={constructor:xi,animate:function(e,t){var n,i=!1,a=this,r=this.__zr;if(e){var o=e.split("."),s=a;i="shape"===o[0];for(var l=0,u=o.length;l<u;l++)s&&(s=s[o[l]]);s&&(n=s)}else n=a;if(n){var c=a.animators,h=new hi(n,t);return h.during((function(e){a.dirty(i)})).done((function(){c.splice(_i(c,h),1)})),c.push(h),r&&r.animation.addAnimator(h),h}pi('Property "'+e+'" is not existed in element '+a.id)},stopAnimation:function(e){for(var t=this.animators,n=t.length,i=0;i<n;i++)t[i].stop(e);return t.length=0,this},animateTo:function(e,t,n,i,a,r){bi(this,e,t,n,i,a,r)},animateFrom:function(e,t,n,i,a,r){bi(this,e,t,n,i,a,r,!0)}};var Mi=xi,Ti=function(e){vn.call(this,e),_t.call(this,e),Mi.call(this,e),this.id=e.id||re()};Ti.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(e,t){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=e,n[5]+=t,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(e,t){},attrKV:function(e,t){if("position"===e||"scale"===e||"origin"===e){if(t){var n=this[e];n||(n=this[e]=[]),n[0]=t[0],n[1]=t[1]}}else this[e]=t},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(e,t){if("string"==typeof e)this.attrKV(e,t);else if(Ge.isObject(e))for(var n in e)e.hasOwnProperty(n)&&this.attrKV(n,e[n]);return this.dirty(!1),this},setClipPath:function(e){var t=this.__zr;t&&e.addSelfToZr(t),this.clipPath&&this.clipPath!==e&&this.removeClipPath(),this.clipPath=e,e.__zr=t,e.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var e=this.clipPath;e&&(e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(e){this.__zr=e;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.addAnimator(t[n]);this.clipPath&&this.clipPath.addSelfToZr(e)},removeSelfFromZr:function(e){this.__zr=null;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.removeAnimator(t[n]);this.clipPath&&this.clipPath.removeSelfFromZr(e)}},Ge.mixin(Ti,Mi),Ge.mixin(Ti,vn),Ge.mixin(Ti,_t);var Ii,Ai,Di,Ci,Oi=Ti,ki=dt.applyTransform,Li=Math.min,Ei=Math.max;function Ni(e,t,n,i){n<0&&(e+=n,n=-n),i<0&&(t+=i,i=-i),this.x=e,this.y=t,this.width=n,this.height=i}Ni.prototype={constructor:Ni,union:function(e){var t=Li(e.x,this.x),n=Li(e.y,this.y);this.width=Ei(e.x+e.width,this.x+this.width)-t,this.height=Ei(e.y+e.height,this.y+this.height)-n,this.x=t,this.y=n},applyTransform:(Ii=[],Ai=[],Di=[],Ci=[],function(e){if(e){Ii[0]=Di[0]=this.x,Ii[1]=Ci[1]=this.y,Ai[0]=Ci[0]=this.x+this.width,Ai[1]=Di[1]=this.y+this.height,ki(Ii,Ii,e),ki(Ai,Ai,e),ki(Di,Di,e),ki(Ci,Ci,e),this.x=Li(Ii[0],Ai[0],Di[0],Ci[0]),this.y=Li(Ii[1],Ai[1],Di[1],Ci[1]);var t=Ei(Ii[0],Ai[0],Di[0],Ci[0]),n=Ei(Ii[1],Ai[1],Di[1],Ci[1]);this.width=t-this.x,this.height=n-this.y}}),calculateTransform:function(e){var t=this,n=e.width/t.width,i=e.height/t.height,a=ln.create();return ln.translate(a,a,[-t.x,-t.y]),ln.scale(a,a,[n,i]),ln.translate(a,a,[e.x,e.y]),a},intersect:function(e){if(!e)return!1;e instanceof Ni||(e=Ni.create(e));var t=this,n=t.x,i=t.x+t.width,a=t.y,r=t.y+t.height,o=e.x,s=e.x+e.width,l=e.y,u=e.y+e.height;return!(i<o||s<n||r<l||u<a)},contain:function(e,t){var n=this;return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height},clone:function(){return new Ni(this.x,this.y,this.width,this.height)},copy:function(e){this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},Ni.create=function(e){return new Ni(e.x,e.y,e.width,e.height)};var Pi=Ni,Ri=function(e){for(var t in e=e||{},Oi.call(this,e),e)e.hasOwnProperty(t)&&(this[t]=e[t]);this._children=[],this.__storage=null,this.__dirty=!0};Ri.prototype={constructor:Ri,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(e){return this._children[e]},childOfName:function(e){for(var t=this._children,n=0;n<t.length;n++)if(t[n].name===e)return t[n]},childCount:function(){return this._children.length},add:function(e){return e&&e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),this},addBefore:function(e,t){if(e&&e!==this&&e.parent!==this&&t&&t.parent===this){var n=this._children,i=n.indexOf(t);i>=0&&(n.splice(i,0,e),this._doAdd(e))}return this},_doAdd:function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__storage,n=this.__zr;t&&t!==e.__storage&&(t.addToStorage(e),e instanceof Ri&&e.addChildrenToStorage(t)),n&&n.refresh()},remove:function(e){var t=this.__zr,n=this.__storage,i=this._children,a=Ge.indexOf(i,e);return a<0||(i.splice(a,1),e.parent=null,n&&(n.delFromStorage(e),e instanceof Ri&&e.delChildrenFromStorage(n)),t&&t.refresh()),this},removeAll:function(){var e,t,n=this._children,i=this.__storage;for(t=0;t<n.length;t++)e=n[t],i&&(i.delFromStorage(e),e instanceof Ri&&e.delChildrenFromStorage(i)),e.parent=null;return n.length=0,this},eachChild:function(e,t){for(var n=this._children,i=0;i<n.length;i++){var a=n[i];e.call(t,a,i)}return this},traverse:function(e,t){for(var n=0;n<this._children.length;n++){var i=this._children[n];e.call(t,i),"group"===i.type&&i.traverse(e,t)}return this},addChildrenToStorage:function(e){for(var t=0;t<this._children.length;t++){var n=this._children[t];e.addToStorage(n),n instanceof Ri&&n.addChildrenToStorage(e)}},delChildrenFromStorage:function(e){for(var t=0;t<this._children.length;t++){var n=this._children[t];e.delFromStorage(n),n instanceof Ri&&n.delChildrenFromStorage(e)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(e){for(var t=null,n=new Pi(0,0,0,0),i=e||this._children,a=[],r=0;r<i.length;r++){var o=i[r];if(!o.ignore&&!o.invisible){var s=o.getBoundingRect(),l=o.getLocalTransform(a);l?(n.copy(s),n.applyTransform(l),(t=t||n.clone()).union(n)):(t=t||s.clone()).union(s)}}return t||n}},Ge.inherits(Ri,Oi);var zi=Ri,Bi=32,Vi=7;function Hi(e,t,n,i){var a=t+1;if(a===n)return 1;if(i(e[a++],e[t])<0){for(;a<n&&i(e[a],e[a-1])<0;)a++;!function(e,t,n){n--;for(;t<n;){var i=e[t];e[t++]=e[n],e[n--]=i}}(e,t,a)}else for(;a<n&&i(e[a],e[a-1])>=0;)a++;return a-t}function Yi(e,t,n,i,a){for(i===t&&i++;i<n;i++){for(var r,o=e[i],s=t,l=i;s<l;)a(o,e[r=s+l>>>1])<0?l=r:s=r+1;var u=i-s;switch(u){case 3:e[s+3]=e[s+2];case 2:e[s+2]=e[s+1];case 1:e[s+1]=e[s];break;default:for(;u>0;)e[s+u]=e[s+u-1],u--}e[s]=o}}function Fi(e,t,n,i,a,r){var o=0,s=0,l=1;if(r(e,t[n+a])>0){for(s=i-a;l<s&&r(e,t[n+a+l])>0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=a,l+=a}else{for(s=a+1;l<s&&r(e,t[n+a-l])<=0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=o;o=a-l,l=a-u}for(o++;o<l;){var c=o+(l-o>>>1);r(e,t[n+c])>0?o=c+1:l=c}return l}function Gi(e,t,n,i,a,r){var o=0,s=0,l=1;if(r(e,t[n+a])<0){for(s=a+1;l<s&&r(e,t[n+a-l])<0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=o;o=a-l,l=a-u}else{for(s=i-a;l<s&&r(e,t[n+a+l])>=0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=a,l+=a}for(o++;o<l;){var c=o+(l-o>>>1);r(e,t[n+c])<0?l=c:o=c+1}return l}function Wi(e,t){var n,i,a=Vi,r=0;e.length;var o=[];function s(s){var l=n[s],u=i[s],c=n[s+1],h=i[s+1];i[s]=u+h,s===r-3&&(n[s+1]=n[s+2],i[s+1]=i[s+2]),r--;var d=Gi(e[c],e,l,u,0,t);l+=d,0!==(u-=d)&&0!==(h=Fi(e[l+u-1],e,c,h,h-1,t))&&(u<=h?function(n,i,r,s){var l=0;for(l=0;l<i;l++)o[l]=e[n+l];var u=0,c=r,h=n;if(e[h++]=e[c++],0==--s){for(l=0;l<i;l++)e[h+l]=o[u+l];return}if(1===i){for(l=0;l<s;l++)e[h+l]=e[c+l];return void(e[h+s]=o[u])}var d,f,p,g=a;for(;;){d=0,f=0,p=!1;do{if(t(e[c],o[u])<0){if(e[h++]=e[c++],f++,d=0,0==--s){p=!0;break}}else if(e[h++]=o[u++],d++,f=0,1==--i){p=!0;break}}while((d|f)<g);if(p)break;do{if(0!==(d=Gi(e[c],o,u,i,0,t))){for(l=0;l<d;l++)e[h+l]=o[u+l];if(h+=d,u+=d,(i-=d)<=1){p=!0;break}}if(e[h++]=e[c++],0==--s){p=!0;break}if(0!==(f=Fi(o[u],e,c,s,0,t))){for(l=0;l<f;l++)e[h+l]=e[c+l];if(h+=f,c+=f,0===(s-=f)){p=!0;break}}if(e[h++]=o[u++],1==--i){p=!0;break}g--}while(d>=Vi||f>=Vi);if(p)break;g<0&&(g=0),g+=2}if((a=g)<1&&(a=1),1===i){for(l=0;l<s;l++)e[h+l]=e[c+l];e[h+s]=o[u]}else{if(0===i)throw new Error;for(l=0;l<i;l++)e[h+l]=o[u+l]}}(l,u,c,h):function(n,i,r,s){var l=0;for(l=0;l<s;l++)o[l]=e[r+l];var u=n+i-1,c=s-1,h=r+s-1,d=0,f=0;if(e[h--]=e[u--],0==--i){for(d=h-(s-1),l=0;l<s;l++)e[d+l]=o[l];return}if(1===s){for(f=(h-=i)+1,d=(u-=i)+1,l=i-1;l>=0;l--)e[f+l]=e[d+l];return void(e[h]=o[c])}var p=a;for(;;){var g=0,m=0,v=!1;do{if(t(o[c],e[u])<0){if(e[h--]=e[u--],g++,m=0,0==--i){v=!0;break}}else if(e[h--]=o[c--],m++,g=0,1==--s){v=!0;break}}while((g|m)<p);if(v)break;do{if(0!==(g=i-Gi(o[c],e,n,i,i-1,t))){for(i-=g,f=(h-=g)+1,d=(u-=g)+1,l=g-1;l>=0;l--)e[f+l]=e[d+l];if(0===i){v=!0;break}}if(e[h--]=o[c--],1==--s){v=!0;break}if(0!==(m=s-Fi(e[u],o,0,s,s-1,t))){for(s-=m,f=(h-=m)+1,d=(c-=m)+1,l=0;l<m;l++)e[f+l]=o[d+l];if(s<=1){v=!0;break}}if(e[h--]=e[u--],0==--i){v=!0;break}p--}while(g>=Vi||m>=Vi);if(v)break;p<0&&(p=0),p+=2}(a=p)<1&&(a=1);if(1===s){for(f=(h-=i)+1,d=(u-=i)+1,l=i-1;l>=0;l--)e[f+l]=e[d+l];e[h]=o[c]}else{if(0===s)throw new Error;for(d=h-(s-1),l=0;l<s;l++)e[d+l]=o[l]}}(l,u,c,h))}n=[],i=[],this.mergeRuns=function(){for(;r>1;){var e=r-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]<i[e+1]&&e--;else if(i[e]>i[e+1])break;s(e)}},this.forceMergeRuns=function(){for(;r>1;){var e=r-2;e>0&&i[e-1]<i[e+1]&&e--,s(e)}},this.pushRun=function(e,t){n[r]=e,i[r]=t,r+=1}}var ji=function(e,t,n,i){n||(n=0),i||(i=e.length);var a=i-n;if(!(a<2)){var r=0;if(a<Bi)Yi(e,n,i,n+(r=Hi(e,n,i,t)),t);else{var o=new Wi(e,t),s=function(e){for(var t=0;e>=Bi;)t|=1&e,e>>=1;return e+t}(a);do{if((r=Hi(e,n,i,t))<s){var l=a;l>s&&(l=s),Yi(e,n,n+l,n+r,t),r=l}o.pushRun(n,r),o.mergeRuns(),a-=r,n+=r}while(0!==a);o.forceMergeRuns()}}};function Ui(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var Zi=function(){this._roots=[],this._displayList=[],this._displayListLen=0};Zi.prototype={constructor:Zi,traverse:function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},getDisplayList:function(e,t){return t=t||!1,e&&this.updateDisplayList(t),this._displayList},updateDisplayList:function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,i=0,a=t.length;i<a;i++)this._updateAndAddDisplayable(t[i],null,e);n.length=this._displayListLen,oe.canvasSupported&&ji(n,Ui)},_updateAndAddDisplayable:function(e,t,n){if(!e.ignore||n){e.beforeUpdate(),e.__dirty&&e.update(),e.afterUpdate();var i=e.clipPath;if(i){t=t?t.slice():[];for(var a=i,r=e;a;)a.parent=r,a.updateTransform(),t.push(a),r=a,a=a.clipPath}if(e.isGroup){for(var o=e._children,s=0;s<o.length;s++){var l=o[s];e.__dirty&&(l.__dirty=!0),this._updateAndAddDisplayable(l,t,n)}e.__dirty=!1}else e.__clipPaths=t,this._displayList[this._displayListLen++]=e}},addRoot:function(e){e.__storage!==this&&(e instanceof zi&&e.addChildrenToStorage(this),this.addToStorage(e),this._roots.push(e))},delRoot:function(e){if(null==e){for(var t=0;t<this._roots.length;t++){var n=this._roots[t];n instanceof zi&&n.delChildrenFromStorage(this)}return this._roots=[],this._displayList=[],void(this._displayListLen=0)}if(e instanceof Array){t=0;for(var i=e.length;t<i;t++)this.delRoot(e[t])}else{var a=Ge.indexOf(this._roots,e);a>=0&&(this.delFromStorage(e),this._roots.splice(a,1),e instanceof zi&&e.delChildrenFromStorage(this))}},addToStorage:function(e){return e&&(e.__storage=this,e.dirty(!1)),this},delFromStorage:function(e){return e&&(e.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:Ui};var Xi=Zi,qi={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1};var Ki=function(e,t,n){return qi.hasOwnProperty(t)?n*e.dpr:n},$i={ContextCachedBy:{NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},WILL_BE_RESTORED:9},Qi=$i.ContextCachedBy,Ji=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],ea=function(e){this.extendFrom(e,!1)};function ta(e,t,n){var i=null==t.x?0:t.x,a=null==t.x2?1:t.x2,r=null==t.y?0:t.y,o=null==t.y2?0:t.y2;return t.global||(i=i*n.width+n.x,a=a*n.width+n.x,r=r*n.height+n.y,o=o*n.height+n.y),i=isNaN(i)?0:i,a=isNaN(a)?1:a,r=isNaN(r)?0:r,o=isNaN(o)?0:o,e.createLinearGradient(i,r,a,o)}function na(e,t,n){var i=n.width,a=n.height,r=Math.min(i,a),o=null==t.x?.5:t.x,s=null==t.y?.5:t.y,l=null==t.r?.5:t.r;return t.global||(o=o*i+n.x,s=s*a+n.y,l*=r),e.createRadialGradient(o,s,0,o,s,l)}ea.prototype={constructor:ea,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(e,t,n){var i=this,a=n&&n.style,r=!a||e.__attrCachedBy!==Qi.STYLE_BIND;e.__attrCachedBy=Qi.STYLE_BIND;for(var o=0;o<Ji.length;o++){var s=Ji[o],l=s[0];(r||i[l]!==a[l])&&(e[l]=Ki(e,l,i[l]||s[1]))}if((r||i.fill!==a.fill)&&(e.fillStyle=i.fill),(r||i.stroke!==a.stroke)&&(e.strokeStyle=i.stroke),(r||i.opacity!==a.opacity)&&(e.globalAlpha=null==i.opacity?1:i.opacity),(r||i.blend!==a.blend)&&(e.globalCompositeOperation=i.blend||"source-over"),this.hasStroke()){var u=i.lineWidth;e.lineWidth=u/(this.strokeNoScale&&t&&t.getLineScale?t.getLineScale():1)}},hasFill:function(){var e=this.fill;return null!=e&&"none"!==e},hasStroke:function(){var e=this.stroke;return null!=e&&"none"!==e&&this.lineWidth>0},extendFrom:function(e,t){if(e)for(var n in e)!e.hasOwnProperty(n)||!0!==t&&(!1===t?this.hasOwnProperty(n):null==e[n])||(this[n]=e[n])},set:function(e,t){"string"==typeof e?this[e]=t:this.extendFrom(e,!0)},clone:function(){var e=new this.constructor;return e.extendFrom(this,!0),e},getGradient:function(e,t,n){for(var i=("radial"===t.type?na:ta)(e,t,n),a=t.colorStops,r=0;r<a.length;r++)i.addColorStop(a[r].offset,a[r].color);return i}};for(var ia=ea.prototype,aa=0;aa<Ji.length;aa++){var ra=Ji[aa];ra[0]in ia||(ia[ra[0]]=ra[1])}ea.getGradient=ia.getGradient;var oa=ea,sa=function(e,t){this.image=e,this.repeat=t,this.type="pattern"};sa.prototype.getCanvasPattern=function(e){return e.createPattern(this.image,this.repeat||"repeat")};var la=sa,ua=fi.devicePixelRatio;function ca(){return!1}function ha(e,t,n){var i=Ge.createCanvas(),a=t.getWidth(),r=t.getHeight(),o=i.style;return o&&(o.position="absolute",o.left=0,o.top=0,o.width=a+"px",o.height=r+"px",i.setAttribute("data-zr-dom-id",e)),i.width=a*n,i.height=r*n,i}var da=function(e,t,n){var i;n=n||ua,"string"==typeof e?i=ha(e,t,n):Ge.isObject(e)&&(e=(i=e).id),this.id=e,this.dom=i;var a=i.style;a&&(i.onselectstart=ca,a["-webkit-user-select"]="none",a["user-select"]="none",a["-webkit-touch-callout"]="none",a["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",a.padding=0,a.margin=0,a["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=t,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=n};da.prototype={constructor:da,__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 e=this.dpr;this.domBack=ha("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),1!==e&&this.ctxBack.scale(e,e)},resize:function(e,t){var n=this.dpr,i=this.dom,a=i.style,r=this.domBack;a&&(a.width=e+"px",a.height=t+"px"),i.width=e*n,i.height=t*n,r&&(r.width=e*n,r.height=t*n,1!==n&&this.ctxBack.scale(n,n))},clear:function(e,t){var n,i=this.dom,a=this.ctx,r=i.width,o=i.height,s=(t=t||this.clearColor,this.motionBlur&&!e),l=this.lastFrameAlpha,u=this.dpr;(s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(i,0,0,r/u,o/u)),a.clearRect(0,0,r,o),t&&"transparent"!==t)&&(t.colorStops?(n=t.__canvasGradient||oa.getGradient(a,t,{x:0,y:0,width:r,height:o}),t.__canvasGradient=n):t.image&&(n=la.prototype.getCanvasPattern.call(t,a)),a.save(),a.fillStyle=n||t,a.fillRect(0,0,r,o),a.restore());if(s){var c=this.domBack;a.save(),a.globalAlpha=l,a.drawImage(c,0,0,r,o),a.restore()}}};var fa=da,pa="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){setTimeout(e,16)},ga=new An(50);function ma(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var n=e.pending[t],i=n.cb;i&&i(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function va(e){return e&&e.width&&e.height}var ya=function(e,t,n,i,a){if(e){if("string"==typeof e){if(t&&t.__zrImageSrc===e||!n)return t;var r=ga.get(e),o={hostEl:n,cb:i,cbPayload:a};return r?!va(t=r.image)&&r.pending.push(o):((t=new Image).onload=t.onerror=ma,ga.put(e,t.__cachedImgObj={image:t,pending:[o]}),t.src=t.__zrImageSrc=e),t}return e}return t},_a={findExistImage:function(e){if("string"==typeof e){var t=ga.get(e);return t&&t.image}return e},createOrUpdateImage:ya,isImageReady:va},xa=Ge.getContext,ba=Ge.extend,wa=Ge.retrieve2,Sa=Ge.retrieve3,Ma=Ge.trim,Ta={},Ia=0,Aa=5e3,Da=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,Ca="12px sans-serif",Oa={};function ka(e,t){var n=e+":"+(t=t||Ca);if(Ta[n])return Ta[n];for(var i=(e+"").split("\n"),a=0,r=0,o=i.length;r<o;r++)a=Math.max(Ha(i[r],t).width,a);return Ia>Aa&&(Ia=0,Ta={}),Ia++,Ta[n]=a,a}function La(e,t,n){return"right"===n?e-=t:"center"===n&&(e-=t/2),e}function Ea(e,t,n){return"middle"===n?e-=t/2:"bottom"===n&&(e-=t),e}function Na(e,t,n){var i=t.textPosition,a=t.textDistance,r=n.x,o=n.y;a=a||0;var s=n.height,l=n.width,u=s/2,c="left",h="top";switch(i){case"left":r-=a,o+=u,c="right",h="middle";break;case"right":r+=a+l,o+=u,h="middle";break;case"top":r+=l/2,o-=a,c="center",h="bottom";break;case"bottom":r+=l/2,o+=s+a,c="center";break;case"inside":r+=l/2,o+=u,c="center",h="middle";break;case"insideLeft":r+=a,o+=u,h="middle";break;case"insideRight":r+=l-a,o+=u,c="right",h="middle";break;case"insideTop":r+=l/2,o+=a,c="center";break;case"insideBottom":r+=l/2,o+=s-a,c="center",h="bottom";break;case"insideTopLeft":r+=a,o+=a;break;case"insideTopRight":r+=l-a,o+=a,c="right";break;case"insideBottomLeft":r+=a,o+=s-a,h="bottom";break;case"insideBottomRight":r+=l-a,o+=s-a,c="right",h="bottom"}return(e=e||{}).x=r,e.y=o,e.textAlign=c,e.textVerticalAlign=h,e}function Pa(e,t,n,i,a){if(!t)return"";var r=(e+"").split("\n");a=Ra(t,n,i,a);for(var o=0,s=r.length;o<s;o++)r[o]=za(r[o],a);return r.join("\n")}function Ra(e,t,n,i){(i=ba({},i)).font=t;n=wa(n,"...");i.maxIterations=wa(i.maxIterations,2);var a=i.minChar=wa(i.minChar,0);i.cnCharWidth=ka("国",t);var r=i.ascCharWidth=ka("a",t);i.placeholder=wa(i.placeholder,"");for(var o=e=Math.max(0,e-1),s=0;s<a&&o>=r;s++)o-=r;var l=ka(n,t);return l>o&&(n="",l=0),o=e-l,i.ellipsis=n,i.ellipsisWidth=l,i.contentWidth=o,i.containerWidth=e,i}function za(e,t){var n=t.containerWidth,i=t.font,a=t.contentWidth;if(!n)return"";var r=ka(e,i);if(r<=n)return e;for(var o=0;;o++){if(r<=a||o>=t.maxIterations){e+=t.ellipsis;break}var s=0===o?Ba(e,a,t.ascCharWidth,t.cnCharWidth):r>0?Math.floor(e.length*a/r):0;r=ka(e=e.substr(0,s),i)}return""===e&&(e=t.placeholder),e}function Ba(e,t,n,i){for(var a=0,r=0,o=e.length;r<o&&a<t;r++){var s=e.charCodeAt(r);a+=0<=s&&s<=127?n:i}return r}function Va(e){return ka("国",e)}function Ha(e,t){return Oa.measureText(e,t)}function Ya(e,t,n,i,a){null!=e&&(e+="");var r=wa(i,Va(t)),o=e?e.split("\n"):[],s=o.length*r,l=s,u=!0;if(n&&(l+=n[0]+n[2]),e&&a){u=!1;var c=a.outerHeight,h=a.outerWidth;if(null!=c&&l>c)e="",o=[];else if(null!=h)for(var d=Ra(h-(n?n[1]+n[3]:0),t,a.ellipsis,{minChar:a.minChar,placeholder:a.placeholder}),f=0,p=o.length;f<p;f++)o[f]=za(o[f],d)}return{lines:o,height:s,outerHeight:l,lineHeight:r,canCacheByTextString:u}}function Fa(e,t){var n={lines:[],width:0,height:0};if(null!=e&&(e+=""),!e)return n;for(var i,a=Da.lastIndex=0;null!=(i=Da.exec(e));){var r=i.index;r>a&&Ga(n,e.substring(a,r)),Ga(n,i[2],i[1]),a=Da.lastIndex}a<e.length&&Ga(n,e.substring(a,e.length));var o=n.lines,s=0,l=0,u=[],c=t.textPadding,h=t.truncate,d=h&&h.outerWidth,f=h&&h.outerHeight;c&&(null!=d&&(d-=c[1]+c[3]),null!=f&&(f-=c[0]+c[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 _=(C=g.tokens[y]).styleName&&t.rich[C.styleName]||{},x=C.textPadding=_.textPadding,b=C.font=_.font||t.font,w=C.textHeight=wa(_.textHeight,Va(b));if(x&&(w+=x[0]+x[2]),C.height=w,C.lineHeight=Sa(_.textLineHeight,t.textLineHeight,w),C.textAlign=_&&_.textAlign||t.textAlign,C.textVerticalAlign=_&&_.textVerticalAlign||"middle",null!=f&&s+C.lineHeight>f)return{lines:[],width:0,height:0};C.textWidth=ka(C.text,b);var S=_.textWidth,M=null==S||"auto"===S;if("string"==typeof S&&"%"===S.charAt(S.length-1))C.percentWidth=S,u.push(C),S=0;else{if(M){S=C.textWidth;var T=_.textBackgroundColor,I=T&&T.image;I&&(I=_a.findExistImage(I),_a.isImageReady(I)&&(S=Math.max(S,I.width*w/I.height)))}var A=x?x[1]+x[3]:0;S+=A;var D=null!=d?d-v:null;null!=D&&D<S&&(!M||D<A?(C.text="",C.textWidth=S=0):(C.text=Pa(C.text,D-A,b,h.ellipsis,{minChar:h.minChar}),C.textWidth=ka(C.text,b),S=C.textWidth+A))}v+=C.width=S,_&&(m=Math.max(m,C.lineHeight))}g.width=v,g.lineHeight=m,s+=m,l=Math.max(l,v)}n.outerWidth=n.width=wa(t.textWidth,l),n.outerHeight=n.height=wa(t.textHeight,s),c&&(n.outerWidth+=c[1]+c[3],n.outerHeight+=c[0]+c[2]);for(p=0;p<u.length;p++){var C,O=(C=u[p]).percentWidth;C.width=parseInt(O,10)/100*l}return n}function Ga(e,t,n){for(var i=""===t,a=t.split("\n"),r=e.lines,o=0;o<a.length;o++){var s=a[o],l={styleName:n,text:s,isLineHolder:!s&&!i};if(o)r.push({tokens:[l]});else{var u=(r[r.length-1]||(r[0]={tokens:[]})).tokens,c=u.length;1===c&&u[0].isLineHolder?u[0]=l:(s||!c||i)&&u.push(l)}}}Oa.measureText=function(e,t){var n=xa();return n.font=t||Ca,n.measureText(e)};var Wa=function(e,t,n,i,a,r,o,s){return o?function(e,t,n,i,a,r,o,s){var l=Fa(e,{rich:o,truncate:s,font:t,textAlign:n,textPadding:a,textLineHeight:r}),u=l.outerWidth,c=l.outerHeight,h=La(0,u,n),d=Ea(0,c,i);return new Pi(h,d,u,c)}(e,t,n,i,a,r,o,s):function(e,t,n,i,a,r,o){var s=Ya(e,t,a,r,o),l=ka(e,t);a&&(l+=a[1]+a[3]);var u=s.outerHeight,c=La(0,l,n),h=Ea(0,u,i),d=new Pi(c,h,l,u);return d.lineHeight=s.lineHeight,d}(e,t,n,i,a,r,s)},ja=function(e,t,n){return Na({},{textPosition:e,textDistance:n},t)},Ua=function(e){var t=(e.fontSize||e.fontFamily)&&[e.fontStyle,e.fontWeight,(e.fontSize||12)+"px",e.fontFamily||"sans-serif"].join(" ");return t&&Ma(t)||e.textFont||e.font},Za={DEFAULT_FONT:Ca,$override:function(e,t){Oa[e]=t},getWidth:ka,getBoundingRect:Wa,adjustTextX:La,adjustTextY:Ea,calculateTextPosition:Na,adjustTextPositionOnRect:ja,truncateText:Pa,getLineHeight:Va,measureText:Ha,parsePlainText:Ya,parseRichText:Fa,makeFont:Ua};var Xa={buildPath:function(e,t){var n,i,a,r,o,s=t.x,l=t.y,u=t.width,c=t.height,h=t.r;u<0&&(s+=u,u=-u),c<0&&(l+=c,c=-c),"number"==typeof h?n=i=a=r=h:h instanceof Array?1===h.length?n=i=a=r=h[0]:2===h.length?(n=a=h[0],i=r=h[1]):3===h.length?(n=h[0],i=r=h[1],a=h[2]):(n=h[0],i=h[1],a=h[2],r=h[3]):n=i=a=r=0,n+i>u&&(n*=u/(o=n+i),i*=u/o),a+r>u&&(a*=u/(o=a+r),r*=u/o),i+a>c&&(i*=c/(o=i+a),a*=c/o),n+r>c&&(n*=c/(o=n+r),r*=c/o),e.moveTo(s+n,l),e.lineTo(s+u-i,l),0!==i&&e.arc(s+u-i,l+i,i,-Math.PI/2,0),e.lineTo(s+u,l+c-a),0!==a&&e.arc(s+u-a,l+c-a,a,0,Math.PI/2),e.lineTo(s+r,l+c),0!==r&&e.arc(s+r,l+c-r,r,Math.PI/2,Math.PI),e.lineTo(s,l+n),0!==n&&e.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}},qa=Ge.retrieve2,Ka=Ge.retrieve3,$a=Ge.each,Qa=Ge.normalizeCssArray,Ja=Ge.isString,er=Ge.isObject,tr=$i.ContextCachedBy,nr=$i.WILL_BE_RESTORED,ir=Za.DEFAULT_FONT,ar={left:1,right:1,center:1},rr={top:1,bottom:1,middle:1},or=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],sr={},lr={};function ur(e){if(e){e.font=Za.makeFont(e);var t=e.textAlign;"middle"===t&&(t="center"),e.textAlign=null==t||ar[t]?t:"left";var n=e.textVerticalAlign||e.textBaseline;"center"===n&&(n="middle"),e.textVerticalAlign=null==n||rr[n]?n:"top",e.textPadding&&(e.textPadding=Qa(e.textPadding))}}function cr(e,t,n,i,a){if(n&&t.textRotation){var r=t.textOrigin;"center"===r?(i=n.width/2+n.x,a=n.height/2+n.y):r&&(i=r[0]+n.x,a=r[1]+n.y),e.translate(i,a),e.rotate(-t.textRotation),e.translate(-i,-a)}}function hr(e,t,n,i,a,r,o,s){var l=i.rich[n.styleName]||{};l.text=n.text;var u=n.textVerticalAlign,c=r+a/2;"top"===u?c=r+n.height/2:"bottom"===u&&(c=r+a-n.height/2),!n.isLineHolder&&dr(l)&&fr(e,t,l,"right"===s?o-n.width:"center"===s?o-n.width/2:o,c-n.height/2,n.width,n.height);var h=n.textPadding;h&&(o=xr(o,s,h),c-=n.height/2-h[2]-n.textHeight/2),mr(t,"shadowBlur",Ka(l.textShadowBlur,i.textShadowBlur,0)),mr(t,"shadowColor",l.textShadowColor||i.textShadowColor||"transparent"),mr(t,"shadowOffsetX",Ka(l.textShadowOffsetX,i.textShadowOffsetX,0)),mr(t,"shadowOffsetY",Ka(l.textShadowOffsetY,i.textShadowOffsetY,0)),mr(t,"textAlign",s),mr(t,"textBaseline","middle"),mr(t,"font",n.font||ir);var d=vr(l.textStroke||i.textStroke,p),f=yr(l.textFill||i.textFill),p=qa(l.textStrokeWidth,i.textStrokeWidth);d&&(mr(t,"lineWidth",p),mr(t,"strokeStyle",d),t.strokeText(n.text,o,c)),f&&(mr(t,"fillStyle",f),t.fillText(n.text,o,c))}function dr(e){return!!(e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor)}function fr(e,t,n,i,a,r,o){var s=n.textBackgroundColor,l=n.textBorderWidth,u=n.textBorderColor,c=Ja(s);if(mr(t,"shadowBlur",n.textBoxShadowBlur||0),mr(t,"shadowColor",n.textBoxShadowColor||"transparent"),mr(t,"shadowOffsetX",n.textBoxShadowOffsetX||0),mr(t,"shadowOffsetY",n.textBoxShadowOffsetY||0),c||l&&u){t.beginPath();var h=n.textBorderRadius;h?Xa.buildPath(t,{x:i,y:a,width:r,height:o,r:h}):t.rect(i,a,r,o),t.closePath()}if(c)if(mr(t,"fillStyle",s),null!=n.fillOpacity){var d=t.globalAlpha;t.globalAlpha=n.fillOpacity*n.opacity,t.fill(),t.globalAlpha=d}else t.fill();else if(er(s)){var f=s.image;(f=_a.createOrUpdateImage(f,null,e,pr,s))&&_a.isImageReady(f)&&t.drawImage(f,i,a,r,o)}if(l&&u)if(mr(t,"lineWidth",l),mr(t,"strokeStyle",u),null!=n.strokeOpacity){d=t.globalAlpha;t.globalAlpha=n.strokeOpacity*n.opacity,t.stroke(),t.globalAlpha=d}else t.stroke()}function pr(e,t){t.image=e}function gr(e,t,n,i){var a=n.x||0,r=n.y||0,o=n.textAlign,s=n.textVerticalAlign;if(i){var l=n.textPosition;if(l instanceof Array)a=i.x+_r(l[0],i.width),r=i.y+_r(l[1],i.height);else{var u=t&&t.calculateTextPosition?t.calculateTextPosition(sr,n,i):Za.calculateTextPosition(sr,n,i);a=u.x,r=u.y,o=o||u.textAlign,s=s||u.textVerticalAlign}var c=n.textOffset;c&&(a+=c[0],r+=c[1])}return(e=e||{}).baseX=a,e.baseY=r,e.textAlign=o,e.textVerticalAlign=s,e}function mr(e,t,n){return e[t]=Ki(e,t,n),e[t]}function vr(e,t){return null==e||t<=0||"transparent"===e||"none"===e?null:e.image||e.colorStops?"#000":e}function yr(e){return null==e||"none"===e?null:e.image||e.colorStops?"#000":e}function _r(e,t){return"string"==typeof e?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function xr(e,t,n){return"right"===t?e-n[1]:"center"===t?e+n[3]/2-n[1]/2:e+n[3]}var br=function(e){return ur(e),$a(e.rich,ur),e},wr=function(e,t,n,i,a,r){i.rich?function(e,t,n,i,a,r){r!==nr&&(t.__attrCachedBy=tr.NONE);var o=e.__textCotentBlock;o&&!e.__dirtyText||(o=e.__textCotentBlock=Za.parseRichText(n,i));!function(e,t,n,i,a){var r=n.width,o=n.outerWidth,s=n.outerHeight,l=i.textPadding,u=gr(lr,e,i,a),c=u.baseX,h=u.baseY,d=u.textAlign,f=u.textVerticalAlign;cr(t,i,a,c,h);var p=Za.adjustTextX(c,o,d),g=Za.adjustTextY(h,s,f),m=p,v=g;l&&(m+=l[3],v+=l[0]);var y=m+r;dr(i)&&fr(e,t,i,p,g,o,s);for(var _=0;_<n.lines.length;_++){for(var x,b=n.lines[_],w=b.tokens,S=w.length,M=b.lineHeight,T=b.width,I=0,A=m,D=y,C=S-1;I<S&&(!(x=w[I]).textAlign||"left"===x.textAlign);)hr(e,t,x,i,M,v,A,"left"),T-=x.width,A+=x.width,I++;for(;C>=0&&"right"===(x=w[C]).textAlign;)hr(e,t,x,i,M,v,D,"right"),T-=x.width,D-=x.width,C--;for(A+=(r-(A-m)-(y-D)-T)/2;I<=C;)hr(e,t,x=w[I],i,M,v,A+x.width/2,"center"),A+=x.width,I++;v+=M}}(e,t,o,i,a)}(e,t,n,i,a,r):function(e,t,n,i,a,r){var o,s=dr(i),l=!1,u=t.__attrCachedBy===tr.PLAIN_TEXT;r!==nr?(r&&(o=r.style,l=!s&&u&&o),t.__attrCachedBy=s?tr.NONE:tr.PLAIN_TEXT):u&&(t.__attrCachedBy=tr.NONE);var c=i.font||ir;l&&c===(o.font||ir)||(t.font=c);var h=e.__computedFont;e.__styleFont!==c&&(e.__styleFont=c,h=e.__computedFont=t.font);var d=i.textPadding,f=i.textLineHeight,p=e.__textCotentBlock;p&&!e.__dirtyText||(p=e.__textCotentBlock=Za.parsePlainText(n,h,d,f,i.truncate));var g=p.outerHeight,m=p.lines,v=p.lineHeight,y=gr(lr,e,i,a),_=y.baseX,x=y.baseY,b=y.textAlign||"left",w=y.textVerticalAlign;cr(t,i,a,_,x);var S=Za.adjustTextY(x,g,w),M=_,T=S;if(s||d){var I=Za.getWidth(n,h);d&&(I+=d[1]+d[3]);var A=Za.adjustTextX(_,I,b);s&&fr(e,t,i,A,S,I,g),d&&(M=xr(_,b,d),T+=d[0])}t.textAlign=b,t.textBaseline="middle",t.globalAlpha=i.opacity||1;for(var D=0;D<or.length;D++){var C=or[D],O=C[0],k=C[1],L=i[O];l&&L===o[O]||(t[k]=Ki(t,k,L||C[2]))}T+=v/2;var E=i.textStrokeWidth,N=l?o.textStrokeWidth:null,P=!l||E!==N,R=!l||P||i.textStroke!==o.textStroke,z=vr(i.textStroke,E),B=yr(i.textFill);z&&(P&&(t.lineWidth=E),R&&(t.strokeStyle=z));B&&(l&&i.textFill===o.textFill||(t.fillStyle=B));if(1===m.length)z&&t.strokeText(m[0],M,T),B&&t.fillText(m[0],M,T);else for(D=0;D<m.length;D++)z&&t.strokeText(m[D],M,T),B&&t.fillText(m[D],M,T),T+=v}(e,t,n,i,a,r)},Sr=function(e,t){return null!=e&&(e||t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor||t.textPadding)},Mr={normalizeTextStyle:br,renderText:wr,getBoxPosition:gr,getStroke:vr,getFill:yr,parsePercent:_r,needDrawText:Sr},Tr=$i.WILL_BE_RESTORED,Ir=new Pi,Ar=function(){};Ar.prototype={constructor:Ar,drawRectText:function(e,t){var n=this.style;t=n.textRect||t,this.__dirty&&Mr.normalizeTextStyle(n,!0);var i=n.text;if(null!=i&&(i+=""),Mr.needDrawText(i,n)){e.save();var a=this.transform;n.transformText?this.setTransform(e):a&&(Ir.copy(t),Ir.applyTransform(a),t=Ir),Mr.renderText(this,e,i,n,t,Tr),e.restore()}}};var Dr=Ar;function Cr(e){for(var t in e=e||{},Oi.call(this,e),e)e.hasOwnProperty(t)&&"style"!==t&&(this[t]=e[t]);this.style=new oa(e.style),this._rect=null,this.__clipPaths=null}Cr.prototype={constructor:Cr,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(e){},afterBrush:function(e){},brush:function(e,t){},getBoundingRect:function(){},contain:function(e,t){return this.rectContain(e,t)},traverse:function(e,t){e.call(t,this)},rectContain:function(e,t){var n=this.transformCoordToLocal(e,t);return this.getBoundingRect().contain(n[0],n[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(e){return this.animate("style",e)},attrKV:function(e,t){"style"!==e?Oi.prototype.attrKV.call(this,e,t):this.style.set(t)},setStyle:function(e,t){return this.style.set(e,t),this.dirty(!1),this},useStyle:function(e){return this.style=new oa(e),this.dirty(!1),this},calculateTextPosition:null},Ge.inherits(Cr,Oi),Ge.mixin(Cr,Dr);var Or=Cr;function kr(e){Or.call(this,e)}kr.prototype={constructor:kr,type:"image",brush:function(e,t){var n=this.style,i=n.image;n.bind(e,this,t);var a=this._image=_a.createOrUpdateImage(i,this._image,this,this.onload);if(a&&_a.isImageReady(a)){var r=n.x||0,o=n.y||0,s=n.width,l=n.height,u=a.width/a.height;if(null==s&&null!=l?s=l*u:null==l&&null!=s?l=s/u:null==s&&null==l&&(s=a.width,l=a.height),this.setTransform(e),n.sWidth&&n.sHeight){var c=n.sx||0,h=n.sy||0;e.drawImage(a,c,h,n.sWidth,n.sHeight,r,o,s,l)}else if(n.sx&&n.sy){var d=s-(c=n.sx),f=l-(h=n.sy);e.drawImage(a,c,h,d,f,r,o,s,l)}else e.drawImage(a,r,o,s,l);null!=n.text&&(this.restoreTransform(e),this.drawRectText(e,this.getBoundingRect()))}},getBoundingRect:function(){var e=this.style;return this._rect||(this._rect=new Pi(e.x||0,e.y||0,e.width||0,e.height||0)),this._rect}},Ge.inherits(kr,Or);var Lr=kr,Er=fi.devicePixelRatio,Nr=1e5,Pr=314159,Rr=.01;function zr(e){return parseInt(e,10)}var Br=new Pi(0,0,0,0),Vr=new Pi(0,0,0,0);var Hr=function(e,t,n){this.type="canvas";var i=!e.nodeName||"CANVAS"===e.nodeName.toUpperCase();this._opts=n=Ge.extend({},n||{}),this.dpr=n.devicePixelRatio||Er,this._singleCanvas=i,this.root=e;var a=e.style;a&&(a["-webkit-tap-highlight-color"]="transparent",a["-webkit-user-select"]=a["user-select"]=a["-webkit-touch-callout"]="none",e.innerHTML=""),this.storage=t;var r=this._zlevelList=[],o=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,i){var s=e.width,l=e.height;null!=n.width&&(s=n.width),null!=n.height&&(l=n.height),this.dpr=n.devicePixelRatio||1,e.width=s*this.dpr,e.height=l*this.dpr,this._width=s,this._height=l;var u=new fa(e,this,this.dpr);u.__builtin__=!0,u.initContext(),o[314159]=u,u.zlevel=Pr,r.push(Pr),this._domRoot=e}else{this._width=this._getSize(0),this._height=this._getSize(1);var c=this._domRoot=function(e,t){var n=document.createElement("div");return n.style.cssText=["position:relative","width:"+e+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",n}(this._width,this._height);e.appendChild(c)}this._hoverlayer=null,this._hoverElements=[]};Hr.prototype={constructor:Hr,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},refresh:function(e){var t=this.storage.getDisplayList(!0),n=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,e,this._redrawId);for(var i=0;i<n.length;i++){var a=n[i],r=this._layers[a];if(!r.__builtin__&&r.refresh){var o=0===i?this._backgroundColor:null;r.refresh(o)}}return this.refreshHover(),this},addHover:function(e,t){if(!e.__hoverMir){var n=new e.constructor({style:e.style,shape:e.shape,z:e.z,z2:e.z2,silent:e.silent});return n.__from=e,e.__hoverMir=n,t&&n.setStyle(t),this._hoverElements.push(n),n}},removeHover:function(e){var t=e.__hoverMir,n=this._hoverElements,i=Ge.indexOf(n,t);i>=0&&n.splice(i,1),e.__hoverMir=null},clearHover:function(e){for(var t=this._hoverElements,n=0;n<t.length;n++){var i=t[n].__from;i&&(i.__hoverMir=null)}t.length=0},refreshHover:function(){var e=this._hoverElements,t=e.length,n=this._hoverlayer;if(n&&n.clear(),t){ji(e,this.storage.displayableSortFunc),n||(n=this._hoverlayer=this.getLayer(Nr));var i={};n.ctx.save();for(var a=0;a<t;){var r=e[a],o=r.__from;o&&o.__zr?(a++,o.invisible||(r.transform=o.transform,r.invTransform=o.invTransform,r.__clipPaths=o.__clipPaths,this._doPaintEl(r,n,!0,i))):(e.splice(a,1),o.__hoverMir=null,t--)}n.ctx.restore()}},getHoverLayer:function(){return this.getLayer(Nr)},_paintList:function(e,t,n){if(this._redrawId===n){t=t||!1,this._updateLayerStatus(e);var i=this._doPaintList(e,t);if(this._needsManuallyCompositing&&this._compositeManually(),!i){var a=this;pa((function(){a._paintList(e,t,n)}))}}},_compositeManually:function(){var e=this.getLayer(Pr).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),this.eachBuiltinLayer((function(i){i.virtual&&e.drawImage(i.dom,0,0,t,n)}))},_doPaintList:function(e,t){for(var n=[],i=0;i<this._zlevelList.length;i++){var a=this._zlevelList[i];(s=this._layers[a]).__builtin__&&s!==this._hoverlayer&&(s.__dirty||t)&&n.push(s)}for(var r=!0,o=0;o<n.length;o++){var s,l=(s=n[o]).ctx,u={};l.save();var c=t?s.__startIndex:s.__drawIndex,h=!t&&s.incremental&&Date.now,d=h&&Date.now(),f=s.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(s.__startIndex===s.__endIndex)s.clear(!1,f);else if(c===s.__startIndex){var p=e[c];p.incremental&&p.notClear&&!t||s.clear(!1,f)}-1===c&&(console.error("For some unknown reason. drawIndex is -1"),c=s.__startIndex);for(var g=c;g<s.__endIndex;g++){var m=e[g];if(this._doPaintEl(m,s,t,u),m.__dirty=m.__dirtyText=!1,h)if(Date.now()-d>15)break}s.__drawIndex=g,s.__drawIndex<s.__endIndex&&(r=!1),u.prevElClipPaths&&l.restore(),l.restore()}return oe.wxa&&Ge.each(this._layers,(function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()})),r},_doPaintEl:function(e,t,n,i){var a=t.ctx,r=e.transform;if((t.__dirty||n)&&!e.invisible&&0!==e.style.opacity&&(!r||r[0]||r[3])&&(!e.culling||!function(e,t,n){return Br.copy(e.getBoundingRect()),e.transform&&Br.applyTransform(e.transform),Vr.width=t,Vr.height=n,!Br.intersect(Vr)}(e,this._width,this._height))){var o=e.__clipPaths,s=i.prevElClipPaths;s&&!function(e,t){if(e===t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}(o,s)||(s&&(a.restore(),i.prevElClipPaths=null,i.prevEl=null),o&&(a.save(),function(e,t){for(var n=0;n<e.length;n++){var i=e[n];i.setTransform(t),t.beginPath(),i.buildPath(t,i.shape),t.clip(),i.restoreTransform(t)}}(o,a),i.prevElClipPaths=o)),e.beforeBrush&&e.beforeBrush(a),e.brush(a,i.prevEl||null),i.prevEl=e,e.afterBrush&&e.afterBrush(a)}},getLayer:function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=Pr);var n=this._layers[e];return n||((n=new fa("zr_"+e,this,this.dpr)).zlevel=e,n.__builtin__=!0,this._layerConfig[e]?Ge.merge(n,this._layerConfig[e],!0):this._layerConfig[e-Rr]&&Ge.merge(n,this._layerConfig[e-Rr],!0),t&&(n.virtual=t),this.insertLayer(e,n),n.initContext()),n},insertLayer:function(e,t){var n=this._layers,i=this._zlevelList,a=i.length,r=null,o=-1,s=this._domRoot;if(!n[e]&&function(e){return!!e&&(!!e.__builtin__||"function"==typeof e.resize&&"function"==typeof e.refresh)}(t)){if(a>0&&e>i[0]){for(o=0;o<a-1&&!(i[o]<e&&i[o+1]>e);o++);r=n[i[o]]}if(i.splice(o+1,0,e),n[e]=t,!t.virtual)if(r){var l=r.dom;l.nextSibling?s.insertBefore(t.dom,l.nextSibling):s.appendChild(t.dom)}else s.firstChild?s.insertBefore(t.dom,s.firstChild):s.appendChild(t.dom)}},eachLayer:function(e,t){var n,i,a=this._zlevelList;for(i=0;i<a.length;i++)n=a[i],e.call(t,this._layers[n],n)},eachBuiltinLayer:function(e,t){var n,i,a,r=this._zlevelList;for(a=0;a<r.length;a++)i=r[a],(n=this._layers[i]).__builtin__&&e.call(t,n,i)},eachOtherLayer:function(e,t){var n,i,a,r=this._zlevelList;for(a=0;a<r.length;a++)i=r[a],(n=this._layers[i]).__builtin__||e.call(t,n,i)},getLayers:function(){return this._layers},_updateLayerStatus:function(e){function t(e){a&&(a.__endIndex!==e&&(a.__dirty=!0),a.__endIndex=e)}if(this.eachBuiltinLayer((function(e,t){e.__dirty=e.__used=!1})),this._singleCanvas)for(var n=1;n<e.length;n++){if((o=e[n]).zlevel!==e[n-1].zlevel||o.incremental){this._needsManuallyCompositing=!0;break}}var i,a=null,r=0;for(n=0;n<e.length;n++){var o,s,l=(o=e[n]).zlevel;i!==l&&(i=l,r=0),o.incremental?((s=this.getLayer(l+.001,this._needsManuallyCompositing)).incremental=!0,r=1):s=this.getLayer(l+(r>0?Rr:0),this._needsManuallyCompositing),s.__builtin__||pi("ZLevel "+l+" has been used by unkown layer "+s.id),s!==a&&(s.__used=!0,s.__startIndex!==n&&(s.__dirty=!0),s.__startIndex=n,s.incremental?s.__drawIndex=-1:s.__drawIndex=n,t(n),a=s),o.__dirty&&(s.__dirty=!0,s.incremental&&s.__drawIndex<0&&(s.__drawIndex=n))}t(n),this.eachBuiltinLayer((function(e,t){!e.__used&&e.getElementCount()>0&&(e.__dirty=!0,e.__startIndex=e.__endIndex=e.__drawIndex=0),e.__dirty&&e.__drawIndex<0&&(e.__drawIndex=e.__startIndex)}))},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(e){e.clear()},setBackgroundColor:function(e){this._backgroundColor=e},configLayer:function(e,t){if(t){var n=this._layerConfig;n[e]?Ge.merge(n[e],t,!0):n[e]=t;for(var i=0;i<this._zlevelList.length;i++){var a=this._zlevelList[i];if(a===e||a===e+Rr){var r=this._layers[a];Ge.merge(r,n[e],!0)}}}},delLayer:function(e){var t=this._layers,n=this._zlevelList,i=t[e];i&&(i.dom.parentNode.removeChild(i.dom),delete t[e],n.splice(Ge.indexOf(n,e),1))},resize:function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var i=this._opts;if(null!=e&&(i.width=e),null!=t&&(i.height=t),e=this._getSize(0),t=this._getSize(1),n.style.display="",this._width!==e||t!==this._height){for(var a in n.style.width=e+"px",n.style.height=t+"px",this._layers)this._layers.hasOwnProperty(a)&&this._layers[a].resize(e,t);Ge.each(this._progressiveLayers,(function(n){n.resize(e,t)})),this.refresh(!0)}this._width=e,this._height=t}else{if(null==e||null==t)return;this._width=e,this._height=t,this.getLayer(Pr).resize(e,t)}return this},clearLayer:function(e){var t=this._layers[e];t&&t.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[314159].dom;var t=new fa("image",this,e.pixelRatio||this.dpr);if(t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor),e.pixelRatio<=this.dpr){this.refresh();var n=t.dom.width,i=t.dom.height,a=t.ctx;this.eachLayer((function(e){e.__builtin__?a.drawImage(e.dom,0,0,n,i):e.renderToCanvas&&(t.ctx.save(),e.renderToCanvas(t.ctx),t.ctx.restore())}))}else for(var r={},o=this.storage.getDisplayList(!0),s=0;s<o.length;s++){var l=o[s];this._doPaintEl(l,t,!0,r)}return t.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(e){var t=this._opts,n=["width","height"][e],i=["clientWidth","clientHeight"][e],a=["paddingLeft","paddingTop"][e],r=["paddingRight","paddingBottom"][e];if(null!=t[n]&&"auto"!==t[n])return parseFloat(t[n]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[i]||zr(s[n])||zr(o.style[n]))-(zr(s[a])||0)-(zr(s[r])||0)|0},pathToImage:function(e,t){t=t||this.dpr;var n=document.createElement("canvas"),i=n.getContext("2d"),a=e.getBoundingRect(),r=e.style,o=r.shadowBlur*t,s=r.shadowOffsetX*t,l=r.shadowOffsetY*t,u=r.hasStroke()?r.lineWidth:0,c=Math.max(u/2,-s+o),h=Math.max(u/2,s+o),d=Math.max(u/2,-l+o),f=Math.max(u/2,l+o),p=a.width+c+h,g=a.height+d+f;n.width=p*t,n.height=g*t,i.scale(t,t),i.clearRect(0,0,p,g),i.dpr=t;var m={position:e.position,rotation:e.rotation,scale:e.scale};e.position=[c-a.x,d-a.y],e.rotation=0,e.scale=[1,1],e.updateTransform(),e&&e.brush(i);var v=new Lr({style:{x:0,y:0,image:n}});return null!=m.position&&(v.position=e.position=m.position),null!=m.rotation&&(v.rotation=e.rotation=m.rotation),null!=m.scale&&(v.scale=e.scale=m.scale),v}};var Yr=Hr,Fr=Vt.Dispatcher,Gr=function(e){e=e||{},this.stage=e.stage||{},this.onframe=e.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,Fr.call(this)};Gr.prototype={constructor:Gr,addClip:function(e){this._clips.push(e)},addAnimator:function(e){e.animation=this;for(var t=e.getClips(),n=0;n<t.length;n++)this.addClip(t[n])},removeClip:function(e){var t=Ge.indexOf(this._clips,e);t>=0&&this._clips.splice(t,1)},removeAnimator:function(e){for(var t=e.getClips(),n=0;n<t.length;n++)this.removeClip(t[n]);e.animation=null},_update:function(){for(var e=(new Date).getTime()-this._pausedTime,t=e-this._time,n=this._clips,i=n.length,a=[],r=[],o=0;o<i;o++){var s=n[o],l=s.step(e,t);l&&(a.push(l),r.push(s))}for(o=0;o<i;)n[o]._needsRemove?(n[o]=n[i-1],n.pop(),i--):o++;i=a.length;for(o=0;o<i;o++)r[o].fire(a[o]);this._time=e,this.onframe(t),this.trigger("frame",t),this.stage.update&&this.stage.update()},_startLoop:function(){var e=this;this._running=!0,pa((function t(){e._running&&(pa(t),!e._paused&&e._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(e,t){var n=new hi(e,(t=t||{}).loop,t.getter,t.setter);return this.addAnimator(n),n}},Ge.mixin(Gr,Fr);var Wr,jr,Ur=Gr,Zr=Vt.addEventListener,Xr=Vt.removeEventListener,qr=Vt.normalizeEvent,Kr=Vt.getNativeEvent,$r=oe.domSupported,Qr=(jr={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:Wr=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:Ge.map(Wr,(function(e){var t=e.replace("mouse","pointer");return jr.hasOwnProperty(t)?t:e}))}),Jr={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]};function eo(e){return"mousewheel"===e&&oe.browser.firefox?"DOMMouseScroll":e}function to(e){var t=e.pointerType;return"pen"===t||"touch"===t}function no(e){e&&(e.zrByTouch=!0)}function io(e,t){for(var n=t,i=!1;n&&9!==n.nodeType&&!(i=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return i}function ao(e,t){this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}var ro=ao.prototype;ro.stopPropagation=ro.stopImmediatePropagation=ro.preventDefault=Ge.noop;var oo={mousedown:function(e){e=qr(this.dom,e),this._mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=qr(this.dom,e);var t=this._mayPointerCapture;!t||e.zrX===t[0]&&e.zrY===t[1]||fo(this,!0),this.trigger("mousemove",e)},mouseup:function(e){e=qr(this.dom,e),fo(this,!1),this.trigger("mouseup",e)},mouseout:function(e){e=qr(this.dom,e),this._pointerCapturing&&(e.zrEventControl="no_globalout");var t=e.toElement||e.relatedTarget;e.zrIsToLocalDOM=io(this,t),this.trigger("mouseout",e)},touchstart:function(e){no(e=qr(this.dom,e)),this._lastTouchMoment=new Date,this.handler.processGesture(e,"start"),oo.mousemove.call(this,e),oo.mousedown.call(this,e)},touchmove:function(e){no(e=qr(this.dom,e)),this.handler.processGesture(e,"change"),oo.mousemove.call(this,e)},touchend:function(e){no(e=qr(this.dom,e)),this.handler.processGesture(e,"end"),oo.mouseup.call(this,e),+new Date-this._lastTouchMoment<300&&oo.click.call(this,e)},pointerdown:function(e){oo.mousedown.call(this,e)},pointermove:function(e){to(e)||oo.mousemove.call(this,e)},pointerup:function(e){oo.mouseup.call(this,e)},pointerout:function(e){to(e)||oo.mouseout.call(this,e)}};Ge.each(["click","mousewheel","dblclick","contextmenu"],(function(e){oo[e]=function(t){t=qr(this.dom,t),this.trigger(e,t)}}));var so={pointermove:function(e){to(e)||so.mousemove.call(this,e)},pointerup:function(e){so.mouseup.call(this,e)},mousemove:function(e){this.trigger("mousemove",e)},mouseup:function(e){var t=this._pointerCapturing;fo(this,!1),this.trigger("mouseup",e),t&&(e.zrEventControl="only_globalout",this.trigger("mouseout",e))}};function lo(e,t){var n=t.domHandlers;oe.pointerEventsSupported?Ge.each(Qr.pointer,(function(i){co(t,i,(function(t){n[i].call(e,t)}))})):(oe.touchEventsSupported&&Ge.each(Qr.touch,(function(i){co(t,i,(function(a){n[i].call(e,a),function(e){e.touching=!0,null!=e.touchTimer&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout((function(){e.touching=!1,e.touchTimer=null}),700)}(t)}))})),Ge.each(Qr.mouse,(function(i){co(t,i,(function(a){a=Kr(a),t.touching||n[i].call(e,a)}))})))}function uo(e,t){function n(n){co(t,n,(function(i){i=Kr(i),io(e,i.target)||(i=function(e,t){return qr(e.dom,new ao(e,t),!0)}(e,i),t.domHandlers[n].call(e,i))}),{capture:!0})}oe.pointerEventsSupported?Ge.each(Jr.pointer,n):oe.touchEventsSupported||Ge.each(Jr.mouse,n)}function co(e,t,n,i){e.mounted[t]=n,e.listenerOpts[t]=i,Zr(e.domTarget,eo(t),n,i)}function ho(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&Xr(e.domTarget,eo(n),t[n],e.listenerOpts[n]);e.mounted={}}function fo(e,t){if(e._mayPointerCapture=null,$r&&e._pointerCapturing^t){e._pointerCapturing=t;var n=e._globalHandlerScope;t?uo(e,n):ho(n)}}function po(e,t){this.domTarget=e,this.domHandlers=t,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function go(e,t){_t.call(this),this.dom=e,this.painterRoot=t,this._localHandlerScope=new po(e,oo),$r&&(this._globalHandlerScope=new po(document,so)),this._pointerCapturing=!1,this._mayPointerCapture=null,lo(this,this._localHandlerScope)}var mo=go.prototype;mo.dispose=function(){ho(this._localHandlerScope),$r&&ho(this._globalHandlerScope)},mo.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||"default")},Ge.mixin(go,_t);var vo=go,yo=!oe.canvasSupported,_o={canvas:Yr},xo={};var bo=function(e,t,n){n=n||{},this.dom=t,this.id=e;var i=this,a=new Xi,r=n.renderer;if(yo){if(!_o.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");r="vml"}else r&&_o[r]||(r="canvas");var o=new _o[r](t,a,n,e);this.storage=a,this.painter=o;var s=oe.node||oe.worker?null:new vo(o.getViewportRoot(),o.root);this.handler=new $t(a,o,s,o.root),this.animation=new Ur({stage:{update:Ge.bind(this.flush,this)}}),this.animation.start(),this._needsRefresh;var l=a.delFromStorage,u=a.addToStorage;a.delFromStorage=function(e){l.call(a,e),e&&e.removeSelfFromZr(i)},a.addToStorage=function(e){u.call(a,e),e.addSelfToZr(i)}};bo.prototype={constructor:bo,getId:function(){return this.id},add:function(e){this.storage.addRoot(e),this._needsRefresh=!0},remove:function(e){this.storage.delRoot(e),this._needsRefresh=!0},configLayer:function(e,t){this.painter.configLayer&&this.painter.configLayer(e,t),this._needsRefresh=!0},setBackgroundColor:function(e){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),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 e;this._needsRefresh&&(e=!0,this.refreshImmediately()),this._needsRefreshHover&&(e=!0,this.refreshHoverImmediately()),e&&this.trigger("rendered")},addHover:function(e,t){if(this.painter.addHover){var n=this.painter.addHover(e,t);return this.refreshHover(),n}},removeHover:function(e){this.painter.removeHover&&(this.painter.removeHover(e),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(e){e=e||{},this.painter.resize(e.width,e.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(e,t){return this.painter.pathToImage(e,t)},setCursorStyle:function(e){this.handler.setCursorStyle(e)},findHover:function(e,t){return this.handler.findHover(e,t)},on:function(e,t,n){this.handler.on(e,t,n)},off:function(e,t){this.handler.off(e,t)},trigger:function(e,t){this.handler.trigger(e,t)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){var e;this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,e=this.id,delete xo[e]}};var wo=function(e,t){var n=new bo(re(),e,t);return xo[n.id]=n,n},So={version:"4.3.1",init:wo,dispose:function(e){if(e)e.dispose();else{for(var t in xo)xo.hasOwnProperty(t)&&xo[t].dispose();xo={}}return this},getInstance:function(e){return xo[e]},registerPainter:function(e,t){_o[e]=t}},Mo=Ge.each,To=Ge.isObject,Io=Ge.isArray,Ao="series\0";function Do(e){return e instanceof Array?e:null==e?[]:[e]}function Co(e){return To(e)&&e.id&&0===(e.id+"").indexOf("\0_ec_\0")}var Oo=0;function ko(e,t){return e&&e.hasOwnProperty(t)}var Lo=function(e,t,n){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var i=0,a=n.length;i<a;i++){var r=n[i];!e.emphasis[t].hasOwnProperty(r)&&e[t].hasOwnProperty(r)&&(e.emphasis[t][r]=e[t][r])}}},Eo=function(e,t){t=(t||[]).slice();var n=Ge.map(e||[],(function(e,t){return{exist:e}}));return Mo(t,(function(e,i){if(To(e)){for(var a=0;a<n.length;a++)if(!n[a].option&&null!=e.id&&n[a].exist.id===e.id+"")return n[a].option=e,void(t[i]=null);for(a=0;a<n.length;a++){var r=n[a].exist;if(!(n[a].option||null!=r.id&&null!=e.id||null==e.name||Co(e)||Co(r)||r.name!==e.name+""))return n[a].option=e,void(t[i]=null)}}})),Mo(t,(function(e,t){if(To(e)){for(var i=0;i<n.length;i++){var a=n[i].exist;if(!n[i].option&&!Co(a)&&null==e.id){n[i].option=e;break}}i>=n.length&&n.push({option:e})}})),n},No=function(e,t){var n={},i={};return a(e||[],n),a(t||[],i,n),[r(n),r(i)];function a(e,t,n){for(var i=0,a=e.length;i<a;i++)for(var r=e[i].seriesId,o=Do(e[i].dataIndex),s=n&&n[r],l=0,u=o.length;l<u;l++){var c=o[l];s&&s[c]?s[c]=null:(t[r]||(t[r]={}))[c]=1}}function r(e,t){var n=[];for(var i in e)if(e.hasOwnProperty(i)&&null!=e[i])if(t)n.push(+i);else{var a=r(e[i],!0);a.length&&n.push({seriesId:i,dataIndex:a})}return n}},Po=function(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n},Ro=function(e,t){return e.getAttribute?e.getAttribute(t):e[t]},zo=function(e,t){var n=Ge.createHashMap(),i=[];return Ge.each(e,(function(e){var a=t(e);(n.get(a)||(i.push(a),n.set(a,[]))).push(e)})),{keys:i,buckets:n}},Bo={normalizeToArray:Do,defaultEmphasis:Lo,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(e){return!To(e)||Io(e)||e instanceof Date?e:e.value},isDataItemOption:function(e){return To(e)&&!(e instanceof Array)},mappingToExists:Eo,makeIdAndName:function(e){var t=Ge.createHashMap();Mo(e,(function(e,n){var i=e.exist;i&&t.set(i.id,e)})),Mo(e,(function(e,n){var i=e.option;Ge.assert(!i||null==i.id||!t.get(i.id)||t.get(i.id)===e,"id duplicates: "+(i&&i.id)),i&&null!=i.id&&t.set(i.id,e),!e.keyInfo&&(e.keyInfo={})})),Mo(e,(function(e,n){var i=e.exist,a=e.option,r=e.keyInfo;if(To(a)){if(r.name=null!=a.name?a.name+"":i?i.name:Ao+n,i)r.id=i.id;else if(null!=a.id)r.id=a.id+"";else{var o=0;do{r.id="\0"+r.name+"\0"+o++}while(t.get(r.id))}t.set(r.id,e)}}))},isNameSpecified:function(e){var t=e.name;return!(!t||!t.indexOf(Ao))},isIdInner:Co,compressBatches:No,queryDataIndex:function(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?Ge.isArray(t.dataIndex)?Ge.map(t.dataIndex,(function(t){return e.indexOfRawIndex(t)})):e.indexOfRawIndex(t.dataIndex):null!=t.name?Ge.isArray(t.name)?Ge.map(t.name,(function(t){return e.indexOfName(t)})):e.indexOfName(t.name):void 0},makeInner:function(){var e="__\0ec_inner_"+Oo+++"_"+Math.random().toFixed(5);return function(t){return t[e]||(t[e]={})}},parseFinder:function(e,t,n){if(Ge.isString(t)){var i={};i[t+"Index"]=0,t=i}var a=n&&n.defaultMainType;!a||ko(t,a+"Index")||ko(t,a+"Id")||ko(t,a+"Name")||(t[a+"Index"]=0);var r={};return Mo(t,(function(i,a){i=t[a];if("dataIndex"!==a&&"dataIndexInside"!==a){var o=a.match(/^(\w+)(Index|Id|Name)$/)||[],s=o[1],l=(o[2]||"").toLowerCase();if(!(!s||!l||null==i||"index"===l&&"none"===i||n&&n.includeMainTypes&&Ge.indexOf(n.includeMainTypes,s)<0)){var u={mainType:s};"index"===l&&"all"===i||(u[l]=i);var c=e.queryComponents(u);r[s+"Models"]=c,r[s+"Model"]=c[0]}}else r[a]=i})),r},setAttribute:Po,getAttribute:Ro,getTooltipRenderMode:function(e){return"auto"===e?oe.domSupported?"html":"richText":e||"html"},groupData:zo},Vo=".",Ho="___EC__COMPONENT__CONTAINER___";function Yo(e){var t={main:"",sub:""};return e&&(e=e.split(Vo),t.main=e[0]||"",t.sub=e[1]||""),t}var Fo=0;function Go(e,t){var n=Ge.slice(arguments,2);return this.superClass.prototype[t].apply(e,n)}function Wo(e,t,n){return this.superClass.prototype[t].apply(e,n)}var jo=function(e,t){e.$constructor=e,e.extend=function(e){var t=this,n=function(){e.$constructor?e.$constructor.apply(this,arguments):t.apply(this,arguments)};return Ge.extend(n.prototype,e),n.extend=this.extend,n.superCall=Go,n.superApply=Wo,Ge.inherits(n,this),n.superClass=t,n}},Uo=function(e,t){t=t||{};var n={};if(e.registerClass=function(e,t){if(t)if(function(e){Ge.assert(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),'componentType "'+e+'" illegal')}(t),(t=Yo(t)).sub){if(t.sub!==Ho){var i=function(e){var t=n[e.main];t&&t[Ho]||((t=n[e.main]={})[Ho]=!0);return t}(t);i[t.sub]=e}}else n[t.main]=e;return e},e.getClass=function(e,t,i){var a=n[e];if(a&&a[Ho]&&(a=t?a[t]:null),i&&!a)throw new Error(t?"Component "+e+"."+(t||"")+" not exists. Load it first.":e+".type should be specified.");return a},e.getClassesByMainType=function(e){e=Yo(e);var t=[],i=n[e.main];return i&&i[Ho]?Ge.each(i,(function(e,n){n!==Ho&&t.push(e)})):t.push(i),t},e.hasClass=function(e){return e=Yo(e),!!n[e.main]},e.getAllClassMainTypes=function(){var e=[];return Ge.each(n,(function(t,n){e.push(n)})),e},e.hasSubTypes=function(e){e=Yo(e);var t=n[e.main];return t&&t[Ho]},e.parseClassType=Yo,t.registerWhenExtend){var i=e.extend;i&&(e.extend=function(t){var n=i.call(this,t);return e.registerClass(n,t.type)})}return e},Zo={parseClassType:Yo,enableClassExtend:jo,enableClassCheck:function(e){var t=["__\0is_clz",Fo++,Math.random().toFixed(3)].join("_");e.prototype[t]=!0,e.isInstance=function(e){return!(!e||!e[t])}},enableClassManagement:Uo,setReadOnly:function(e,t){}};var Xo=function(e){for(var t=0;t<e.length;t++)e[t][1]||(e[t][1]=e[t][0]);return function(t,n,i){for(var a={},r=0;r<e.length;r++){var o=e[r][1];if(!(n&&Ge.indexOf(n,o)>=0||i&&Ge.indexOf(i,o)<0)){var s=t.getShallow(o);null!=s&&(a[e[r][0]]=s)}}return a}},qo=Xo([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Ko={getLineStyle:function(e){var t=qo(this,e);return t.lineDash=this.getLineDash(t.lineWidth),t},getLineDash:function(e){null==e&&(e=1);var t=this.get("type"),n=Math.max(e,2),i=4*e;return"solid"!==t&&null!=t&&("dashed"===t?[i,i]:[n,n])}},$o=Ko,Qo=Xo([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Jo={getAreaStyle:function(e,t){return Qo(this,e,t)}},es=dt.create,ts=dt.distSquare,ns=Math.pow,is=Math.sqrt,as=1e-8,rs=1e-4,os=is(3),ss=1/3,ls=es(),us=es(),cs=es();function hs(e){return e>-as&&e<as}function ds(e){return e>as||e<-as}function fs(e,t,n,i,a){var r=1-a;return r*r*(r*e+3*a*t)+a*a*(a*i+3*r*n)}function ps(e,t,n,i){var a=1-i;return a*(a*e+2*i*t)+i*i*n}var gs=function(e,t,n,i,a,r){var o=i+3*(t-n)-e,s=3*(n-2*t+e),l=3*(t-e),u=e-a,c=s*s-3*o*l,h=s*l-9*o*u,d=l*l-3*s*u,f=0;if(hs(c)&&hs(h)){if(hs(s))r[0]=0;else(M=-l/s)>=0&&M<=1&&(r[f++]=M)}else{var p=h*h-4*c*d;if(hs(p)){var g=h/c,m=-g/2;(M=-s/o+g)>=0&&M<=1&&(r[f++]=M),m>=0&&m<=1&&(r[f++]=m)}else if(p>0){var v=is(p),y=c*s+1.5*o*(-h+v),_=c*s+1.5*o*(-h-v);(M=(-s-((y=y<0?-ns(-y,ss):ns(y,ss))+(_=_<0?-ns(-_,ss):ns(_,ss))))/(3*o))>=0&&M<=1&&(r[f++]=M)}else{var x=(2*c*s-3*o*h)/(2*is(c*c*c)),b=Math.acos(x)/3,w=is(c),S=Math.cos(b),M=(-s-2*w*S)/(3*o),T=(m=(-s+w*(S+os*Math.sin(b)))/(3*o),(-s+w*(S-os*Math.sin(b)))/(3*o));M>=0&&M<=1&&(r[f++]=M),m>=0&&m<=1&&(r[f++]=m),T>=0&&T<=1&&(r[f++]=T)}}return f},ms=function(e,t,n,i,a){var r=6*n-12*t+6*e,o=9*t+3*i-3*e-9*n,s=3*t-3*e,l=0;if(hs(o)){if(ds(r))(c=-s/r)>=0&&c<=1&&(a[l++]=c)}else{var u=r*r-4*o*s;if(hs(u))a[0]=-r/(2*o);else if(u>0){var c,h=is(u),d=(-r-h)/(2*o);(c=(-r+h)/(2*o))>=0&&c<=1&&(a[l++]=c),d>=0&&d<=1&&(a[l++]=d)}}return l},vs=function(e,t,n,i,a,r){var o=(t-e)*a+e,s=(n-t)*a+t,l=(i-n)*a+n,u=(s-o)*a+o,c=(l-s)*a+s,h=(c-u)*a+u;r[0]=e,r[1]=o,r[2]=u,r[3]=h,r[4]=h,r[5]=c,r[6]=l,r[7]=i},ys=function(e,t,n,i,a,r,o,s,l,u,c){var h,d,f,p,g,m=.005,v=1/0;ls[0]=l,ls[1]=u;for(var y=0;y<1;y+=.05)us[0]=fs(e,n,a,o,y),us[1]=fs(t,i,r,s,y),(p=ts(ls,us))<v&&(h=y,v=p);v=1/0;for(var _=0;_<32&&!(m<rs);_++)d=h-m,f=h+m,us[0]=fs(e,n,a,o,d),us[1]=fs(t,i,r,s,d),p=ts(us,ls),d>=0&&p<v?(h=d,v=p):(cs[0]=fs(e,n,a,o,f),cs[1]=fs(t,i,r,s,f),g=ts(cs,ls),f<=1&&g<v?(h=f,v=g):m*=.5);return c&&(c[0]=fs(e,n,a,o,h),c[1]=fs(t,i,r,s,h)),is(v)},_s=function(e,t,n,i,a){var r=e-2*t+n,o=2*(t-e),s=e-i,l=0;if(hs(r)){if(ds(o))(c=-s/o)>=0&&c<=1&&(a[l++]=c)}else{var u=o*o-4*r*s;if(hs(u))(c=-o/(2*r))>=0&&c<=1&&(a[l++]=c);else if(u>0){var c,h=is(u),d=(-o-h)/(2*r);(c=(-o+h)/(2*r))>=0&&c<=1&&(a[l++]=c),d>=0&&d<=1&&(a[l++]=d)}}return l},xs=function(e,t,n,i,a){var r=(t-e)*i+e,o=(n-t)*i+t,s=(o-r)*i+r;a[0]=e,a[1]=r,a[2]=s,a[3]=s,a[4]=o,a[5]=n},bs=function(e,t,n,i,a,r,o,s,l){var u,c=.005,h=1/0;ls[0]=o,ls[1]=s;for(var d=0;d<1;d+=.05){us[0]=ps(e,n,a,d),us[1]=ps(t,i,r,d),(m=ts(ls,us))<h&&(u=d,h=m)}h=1/0;for(var f=0;f<32&&!(c<rs);f++){var p=u-c,g=u+c;us[0]=ps(e,n,a,p),us[1]=ps(t,i,r,p);var m=ts(us,ls);if(p>=0&&m<h)u=p,h=m;else{cs[0]=ps(e,n,a,g),cs[1]=ps(t,i,r,g);var v=ts(cs,ls);g<=1&&v<h?(u=g,h=v):c*=.5}}return l&&(l[0]=ps(e,n,a,u),l[1]=ps(t,i,r,u)),is(h)},ws={cubicAt:fs,cubicDerivativeAt:function(e,t,n,i,a){var r=1-a;return 3*(((t-e)*r+2*(n-t)*a)*r+(i-n)*a*a)},cubicRootAt:gs,cubicExtrema:ms,cubicSubdivide:vs,cubicProjectPoint:ys,quadraticAt:ps,quadraticDerivativeAt:function(e,t,n,i){return 2*((1-i)*(t-e)+i*(n-t))},quadraticRootAt:_s,quadraticExtremum:function(e,t,n){var i=e+n-2*t;return 0===i?.5:(e-t)/i},quadraticSubdivide:xs,quadraticProjectPoint:bs},Ss=Math.min,Ms=Math.max,Ts=Math.sin,Is=Math.cos,As=2*Math.PI,Ds=dt.create(),Cs=dt.create(),Os=dt.create();var ks=[],Ls=[];var Es=function(e,t,n){if(0!==e.length){var i,a=e[0],r=a[0],o=a[0],s=a[1],l=a[1];for(i=1;i<e.length;i++)a=e[i],r=Ss(r,a[0]),o=Ms(o,a[0]),s=Ss(s,a[1]),l=Ms(l,a[1]);t[0]=r,t[1]=s,n[0]=o,n[1]=l}},Ns=function(e,t,n,i,a,r){a[0]=Ss(e,n),a[1]=Ss(t,i),r[0]=Ms(e,n),r[1]=Ms(t,i)},Ps=function(e,t,n,i,a,r,o,s,l,u){var c,h=ws.cubicExtrema,d=ws.cubicAt,f=h(e,n,a,o,ks);for(l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0,c=0;c<f;c++){var p=d(e,n,a,o,ks[c]);l[0]=Ss(p,l[0]),u[0]=Ms(p,u[0])}for(f=h(t,i,r,s,Ls),c=0;c<f;c++){var g=d(t,i,r,s,Ls[c]);l[1]=Ss(g,l[1]),u[1]=Ms(g,u[1])}l[0]=Ss(e,l[0]),u[0]=Ms(e,u[0]),l[0]=Ss(o,l[0]),u[0]=Ms(o,u[0]),l[1]=Ss(t,l[1]),u[1]=Ms(t,u[1]),l[1]=Ss(s,l[1]),u[1]=Ms(s,u[1])},Rs=function(e,t,n,i,a,r,o,s){var l=ws.quadraticExtremum,u=ws.quadraticAt,c=Ms(Ss(l(e,n,a),1),0),h=Ms(Ss(l(t,i,r),1),0),d=u(e,n,a,c),f=u(t,i,r,h);o[0]=Ss(e,a,d),o[1]=Ss(t,r,f),s[0]=Ms(e,a,d),s[1]=Ms(t,r,f)},zs=function(e,t,n,i,a,r,o,s,l){var u=dt.min,c=dt.max,h=Math.abs(a-r);if(h%As<1e-4&&h>1e-4)return s[0]=e-n,s[1]=t-i,l[0]=e+n,void(l[1]=t+i);if(Ds[0]=Is(a)*n+e,Ds[1]=Ts(a)*i+t,Cs[0]=Is(r)*n+e,Cs[1]=Ts(r)*i+t,u(s,Ds,Cs),c(l,Ds,Cs),(a%=As)<0&&(a+=As),(r%=As)<0&&(r+=As),a>r&&!o?r+=As:a<r&&o&&(a+=As),o){var d=r;r=a,a=d}for(var f=0;f<r;f+=Math.PI/2)f>a&&(Os[0]=Is(f)*n+e,Os[1]=Ts(f)*i+t,u(s,Os,s),c(l,Os,l))},Bs={fromPoints:Es,fromLine:Ns,fromCubic:Ps,fromQuadratic:Rs,fromArc:zs},Vs=fi.devicePixelRatio,Hs={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Ys=[],Fs=[],Gs=[],Ws=[],js=Math.min,Us=Math.max,Zs=Math.cos,Xs=Math.sin,qs=Math.sqrt,Ks=Math.abs,$s="undefined"!=typeof Float32Array,Qs=function(e){this._saveData=!e,this._saveData&&(this.data=[]),this._ctx=null};Qs.prototype={constructor:Qs,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(e,t,n){n=n||0,this._ux=Ks(n/Vs/e)||0,this._uy=Ks(n/Vs/t)||0},getContext:function(){return this._ctx},beginPath:function(e){return this._ctx=e,e&&e.beginPath(),e&&(this.dpr=e.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(e,t){return this.addData(Hs.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},lineTo:function(e,t){var n=Ks(e-this._xi)>this._ux||Ks(t-this._yi)>this._uy||this._len<5;return this.addData(Hs.L,e,t),this._ctx&&n&&(this._needsDash()?this._dashedLineTo(e,t):this._ctx.lineTo(e,t)),n&&(this._xi=e,this._yi=t),this},bezierCurveTo:function(e,t,n,i,a,r){return this.addData(Hs.C,e,t,n,i,a,r),this._ctx&&(this._needsDash()?this._dashedBezierTo(e,t,n,i,a,r):this._ctx.bezierCurveTo(e,t,n,i,a,r)),this._xi=a,this._yi=r,this},quadraticCurveTo:function(e,t,n,i){return this.addData(Hs.Q,e,t,n,i),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(e,t,n,i):this._ctx.quadraticCurveTo(e,t,n,i)),this._xi=n,this._yi=i,this},arc:function(e,t,n,i,a,r){return this.addData(Hs.A,e,t,n,n,i,a-i,0,r?0:1),this._ctx&&this._ctx.arc(e,t,n,i,a,r),this._xi=Zs(a)*n+e,this._yi=Xs(a)*n+t,this},arcTo:function(e,t,n,i,a){return this._ctx&&this._ctx.arcTo(e,t,n,i,a),this},rect:function(e,t,n,i){return this._ctx&&this._ctx.rect(e,t,n,i),this.addData(Hs.R,e,t,n,i),this},closePath:function(){this.addData(Hs.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&(this._needsDash()&&this._dashedLineTo(t,n),e.closePath()),this._xi=t,this._yi=n,this},fill:function(e){e&&e.fill(),this.toStatic()},stroke:function(e){e&&e.stroke(),this.toStatic()},setLineDash:function(e){if(e instanceof Array){this._lineDash=e,this._dashIdx=0;for(var t=0,n=0;n<e.length;n++)t+=e[n];this._dashSum=t}return this},setLineDashOffset:function(e){return this._dashOffset=e,this},len:function(){return this._len},setData:function(e){var t=e.length;this.data&&this.data.length===t||!$s||(this.data=new Float32Array(t));for(var n=0;n<t;n++)this.data[n]=e[n];this._len=t},appendPath:function(e){e instanceof Array||(e=[e]);for(var t=e.length,n=0,i=this._len,a=0;a<t;a++)n+=e[a].len();$s&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+n));for(a=0;a<t;a++)for(var r=e[a].data,o=0;o<r.length;o++)this.data[i++]=r[o];this._len=i},addData:function(e){if(this._saveData){var t=this.data;this._len+arguments.length>t.length&&(this._expandData(),t=this.data);for(var n=0;n<arguments.length;n++)t[this._len++]=arguments[n];this._prevCmd=e}},_expandData:function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(e,t){var n,i,a=this._dashSum,r=this._dashOffset,o=this._lineDash,s=this._ctx,l=this._xi,u=this._yi,c=e-l,h=t-u,d=qs(c*c+h*h),f=l,p=u,g=o.length;for(r<0&&(r=a+r),f-=(r%=a)*(c/=d),p-=r*(h/=d);c>0&&f<=e||c<0&&f>=e||0===c&&(h>0&&p<=t||h<0&&p>=t);)f+=c*(n=o[i=this._dashIdx]),p+=h*n,this._dashIdx=(i+1)%g,c>0&&f<l||c<0&&f>l||h>0&&p<u||h<0&&p>u||s[i%2?"moveTo":"lineTo"](c>=0?js(f,e):Us(f,e),h>=0?js(p,t):Us(p,t));c=f-e,h=p-t,this._dashOffset=-qs(c*c+h*h)},_dashedBezierTo:function(e,t,n,i,a,r){var o,s,l,u,c,h=this._dashSum,d=this._dashOffset,f=this._lineDash,p=this._ctx,g=this._xi,m=this._yi,v=ws.cubicAt,y=0,_=this._dashIdx,x=f.length,b=0;for(d<0&&(d=h+d),d%=h,o=0;o<1;o+=.1)s=v(g,e,n,a,o+.1)-v(g,e,n,a,o),l=v(m,t,i,r,o+.1)-v(m,t,i,r,o),y+=qs(s*s+l*l);for(;_<x&&!((b+=f[_])>d);_++);for(o=(b-d)/y;o<=1;)u=v(g,e,n,a,o),c=v(m,t,i,r,o),_%2?p.moveTo(u,c):p.lineTo(u,c),o+=f[_]/y,_=(_+1)%x;_%2!=0&&p.lineTo(a,r),s=a-u,l=r-c,this._dashOffset=-qs(s*s+l*l)},_dashedQuadraticTo:function(e,t,n,i){var a=n,r=i;n=(n+2*e)/3,i=(i+2*t)/3,e=(this._xi+2*e)/3,t=(this._yi+2*t)/3,this._dashedBezierTo(e,t,n,i,a,r)},toStatic:function(){var e=this.data;e instanceof Array&&(e.length=this._len,$s&&(this.data=new Float32Array(e)))},getBoundingRect:function(){Ys[0]=Ys[1]=Gs[0]=Gs[1]=Number.MAX_VALUE,Fs[0]=Fs[1]=Ws[0]=Ws[1]=-Number.MAX_VALUE;for(var e=this.data,t=0,n=0,i=0,a=0,r=0;r<e.length;){var o=e[r++];switch(1===r&&(i=t=e[r],a=n=e[r+1]),o){case Hs.M:t=i=e[r++],n=a=e[r++],Gs[0]=i,Gs[1]=a,Ws[0]=i,Ws[1]=a;break;case Hs.L:Bs.fromLine(t,n,e[r],e[r+1],Gs,Ws),t=e[r++],n=e[r++];break;case Hs.C:Bs.fromCubic(t,n,e[r++],e[r++],e[r++],e[r++],e[r],e[r+1],Gs,Ws),t=e[r++],n=e[r++];break;case Hs.Q:Bs.fromQuadratic(t,n,e[r++],e[r++],e[r],e[r+1],Gs,Ws),t=e[r++],n=e[r++];break;case Hs.A:var s=e[r++],l=e[r++],u=e[r++],c=e[r++],h=e[r++],d=e[r++]+h;r+=1;var f=1-e[r++];1===r&&(i=Zs(h)*u+s,a=Xs(h)*c+l),Bs.fromArc(s,l,u,c,h,d,f,Gs,Ws),t=Zs(d)*u+s,n=Xs(d)*c+l;break;case Hs.R:i=t=e[r++],a=n=e[r++];var p=e[r++],g=e[r++];Bs.fromLine(i,a,i+p,a+g,Gs,Ws);break;case Hs.Z:t=i,n=a}dt.min(Ys,Ys,Gs),dt.max(Fs,Fs,Ws)}return 0===r&&(Ys[0]=Ys[1]=Fs[0]=Fs[1]=0),new Pi(Ys[0],Ys[1],Fs[0]-Ys[0],Fs[1]-Ys[1])},rebuildPath:function(e){for(var t,n,i,a,r,o,s=this.data,l=this._ux,u=this._uy,c=this._len,h=0;h<c;){var d=s[h++];switch(1===h&&(t=i=s[h],n=a=s[h+1]),d){case Hs.M:t=i=s[h++],n=a=s[h++],e.moveTo(i,a);break;case Hs.L:r=s[h++],o=s[h++],(Ks(r-i)>l||Ks(o-a)>u||h===c-1)&&(e.lineTo(r,o),i=r,a=o);break;case Hs.C:e.bezierCurveTo(s[h++],s[h++],s[h++],s[h++],s[h++],s[h++]),i=s[h-2],a=s[h-1];break;case Hs.Q:e.quadraticCurveTo(s[h++],s[h++],s[h++],s[h++]),i=s[h-2],a=s[h-1];break;case Hs.A:var f=s[h++],p=s[h++],g=s[h++],m=s[h++],v=s[h++],y=s[h++],_=s[h++],x=s[h++],b=g>m?g:m,w=g>m?1:g/m,S=g>m?m/g:1,M=v+y;Math.abs(g-m)>.001?(e.translate(f,p),e.rotate(_),e.scale(w,S),e.arc(0,0,b,v,M,1-x),e.scale(1/w,1/S),e.rotate(-_),e.translate(-f,-p)):e.arc(f,p,b,v,M,1-x),1===h&&(t=Zs(v)*g+f,n=Xs(v)*m+p),i=Zs(M)*g+f,a=Xs(M)*m+p;break;case Hs.R:t=i=s[h],n=a=s[h+1],e.rect(s[h++],s[h++],s[h++],s[h++]);break;case Hs.Z:e.closePath(),i=t,a=n}}}},Qs.CMD=Hs;var Js=Qs;var el={containStroke:function(e,t,n,i,a,r,o){if(0===a)return!1;var s=a,l=0;if(o>t+s&&o>i+s||o<t-s&&o<i-s||r>e+s&&r>n+s||r<e-s&&r<n-s)return!1;if(e===n)return Math.abs(r-e)<=s/2;var u=(l=(t-i)/(e-n))*r-o+(e*i-n*t)/(e-n);return u*u/(l*l+1)<=s/2*s/2}};var tl={containStroke:function(e,t,n,i,a,r,o,s,l,u,c){if(0===l)return!1;var h=l;return!(c>t+h&&c>i+h&&c>r+h&&c>s+h||c<t-h&&c<i-h&&c<r-h&&c<s-h||u>e+h&&u>n+h&&u>a+h&&u>o+h||u<e-h&&u<n-h&&u<a-h&&u<o-h)&&ws.cubicProjectPoint(e,t,n,i,a,r,o,s,u,c,null)<=h/2}},nl=ws.quadraticProjectPoint;var il={containStroke:function(e,t,n,i,a,r,o,s,l){if(0===o)return!1;var u=o;return!(l>t+u&&l>i+u&&l>r+u||l<t-u&&l<i-u&&l<r-u||s>e+u&&s>n+u&&s>a+u||s<e-u&&s<n-u&&s<a-u)&&nl(e,t,n,i,a,r,s,l,null)<=u/2}},al=2*Math.PI;var rl={normalizeRadian:function(e){return(e%=al)<0&&(e+=al),e}},ol=rl.normalizeRadian,sl=2*Math.PI;var ll={containStroke:function(e,t,n,i,a,r,o,s,l){if(0===o)return!1;var u=o;s-=e,l-=t;var c=Math.sqrt(s*s+l*l);if(c-u>n||c+u<n)return!1;if(Math.abs(i-a)%sl<1e-4)return!0;if(r){var h=i;i=ol(a),a=ol(h)}else i=ol(i),a=ol(a);i>a&&(a+=sl);var d=Math.atan2(l,s);return d<0&&(d+=sl),d>=i&&d<=a||d+sl>=i&&d+sl<=a}};var ul=function(e,t,n,i,a,r){if(r>t&&r>i||r<t&&r<i)return 0;if(i===t)return 0;var o=i<t?1:-1,s=(r-t)/(i-t);1!==s&&0!==s||(o=i<t?.5:-.5);var l=s*(n-e)+e;return l===a?1/0:l>a?o:0},cl=rl.normalizeRadian,hl=Js.CMD,dl=2*Math.PI,fl=1e-4;var pl=[-1,-1,-1],gl=[-1,-1];function ml(e,t,n,i,a,r,o,s,l,u){if(u>t&&u>i&&u>r&&u>s||u<t&&u<i&&u<r&&u<s)return 0;var c,h=ws.cubicRootAt(t,i,r,s,u,pl);if(0===h)return 0;for(var d,f,p=0,g=-1,m=0;m<h;m++){var v=pl[m],y=0===v||1===v?.5:1;ws.cubicAt(e,n,a,o,v)<l||(g<0&&(g=ws.cubicExtrema(t,i,r,s,gl),gl[1]<gl[0]&&g>1&&(c=void 0,c=gl[0],gl[0]=gl[1],gl[1]=c),d=ws.cubicAt(t,i,r,s,gl[0]),g>1&&(f=ws.cubicAt(t,i,r,s,gl[1]))),2===g?v<gl[0]?p+=d<t?y:-y:v<gl[1]?p+=f<d?y:-y:p+=s<f?y:-y:v<gl[0]?p+=d<t?y:-y:p+=s<d?y:-y)}return p}function vl(e,t,n,i,a,r,o,s){if(s>t&&s>i&&s>r||s<t&&s<i&&s<r)return 0;var l=ws.quadraticRootAt(t,i,r,s,pl);if(0===l)return 0;var u=ws.quadraticExtremum(t,i,r);if(u>=0&&u<=1){for(var c=0,h=ws.quadraticAt(t,i,r,u),d=0;d<l;d++){var f=0===pl[d]||1===pl[d]?.5:1;ws.quadraticAt(e,n,a,pl[d])<o||(pl[d]<u?c+=h<t?f:-f:c+=r<h?f:-f)}return c}f=0===pl[0]||1===pl[0]?.5:1;return ws.quadraticAt(e,n,a,pl[0])<o?0:r<t?f:-f}function yl(e,t,n,i,a,r,o,s){if((s-=t)>n||s<-n)return 0;var l=Math.sqrt(n*n-s*s);pl[0]=-l,pl[1]=l;var u=Math.abs(i-a);if(u<1e-4)return 0;if(u%dl<1e-4){i=0,a=dl;var c=r?1:-1;return o>=pl[0]+e&&o<=pl[1]+e?c:0}if(r){l=i;i=cl(a),a=cl(l)}else i=cl(i),a=cl(a);i>a&&(a+=dl);for(var h=0,d=0;d<2;d++){var f=pl[d];if(f+e>o){var p=Math.atan2(s,f);c=r?1:-1;p<0&&(p=dl+p),(p>=i&&p<=a||p+dl>=i&&p+dl<=a)&&(p>Math.PI/2&&p<1.5*Math.PI&&(c=-c),h+=c)}}return h}function _l(e,t,n,i,a){for(var r,o,s=0,l=0,u=0,c=0,h=0,d=0;d<e.length;){var f=e[d++];switch(f===hl.M&&d>1&&(n||(s+=ul(l,u,c,h,i,a))),1===d&&(c=l=e[d],h=u=e[d+1]),f){case hl.M:l=c=e[d++],u=h=e[d++];break;case hl.L:if(n){if(el.containStroke(l,u,e[d],e[d+1],t,i,a))return!0}else s+=ul(l,u,e[d],e[d+1],i,a)||0;l=e[d++],u=e[d++];break;case hl.C:if(n){if(tl.containStroke(l,u,e[d++],e[d++],e[d++],e[d++],e[d],e[d+1],t,i,a))return!0}else s+=ml(l,u,e[d++],e[d++],e[d++],e[d++],e[d],e[d+1],i,a)||0;l=e[d++],u=e[d++];break;case hl.Q:if(n){if(il.containStroke(l,u,e[d++],e[d++],e[d],e[d+1],t,i,a))return!0}else s+=vl(l,u,e[d++],e[d++],e[d],e[d+1],i,a)||0;l=e[d++],u=e[d++];break;case hl.A:var p=e[d++],g=e[d++],m=e[d++],v=e[d++],y=e[d++],_=e[d++];d+=1;var x=1-e[d++],b=Math.cos(y)*m+p,w=Math.sin(y)*v+g;d>1?s+=ul(l,u,b,w,i,a):(c=b,h=w);var S=(i-p)*v/m+p;if(n){if(ll.containStroke(p,g,v,y,y+_,x,t,S,a))return!0}else s+=yl(p,g,v,y,y+_,x,S,a);l=Math.cos(y+_)*m+p,u=Math.sin(y+_)*v+g;break;case hl.R:c=l=e[d++],h=u=e[d++];b=c+e[d++],w=h+e[d++];if(n){if(el.containStroke(c,h,b,h,t,i,a)||el.containStroke(b,h,b,w,t,i,a)||el.containStroke(b,w,c,w,t,i,a)||el.containStroke(c,w,c,h,t,i,a))return!0}else s+=ul(b,h,b,w,i,a),s+=ul(c,w,c,h,i,a);break;case hl.Z:if(n){if(el.containStroke(l,u,c,h,t,i,a))return!0}else s+=ul(l,u,c,h,i,a);l=c,u=h}}return n||(r=u,o=h,Math.abs(r-o)<fl)||(s+=ul(l,u,c,h,i,a)||0),0!==s}var xl={contain:function(e,t,n){return _l(e,0,!1,t,n)},containStroke:function(e,t,n,i){return _l(e,t,!0,n,i)}},bl=la.prototype.getCanvasPattern,wl=Math.abs,Sl=new Js(!0);function Ml(e){Or.call(this,e),this.path=null}Ml.prototype={constructor:Ml,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(e,t){var n,i=this.style,a=this.path||Sl,r=i.hasStroke(),o=i.hasFill(),s=i.fill,l=i.stroke,u=o&&!!s.colorStops,c=r&&!!l.colorStops,h=o&&!!s.image,d=r&&!!l.image;(i.bind(e,this,t),this.setTransform(e),this.__dirty)&&(u&&(n=n||this.getBoundingRect(),this._fillGradient=i.getGradient(e,s,n)),c&&(n=n||this.getBoundingRect(),this._strokeGradient=i.getGradient(e,l,n)));u?e.fillStyle=this._fillGradient:h&&(e.fillStyle=bl.call(s,e)),c?e.strokeStyle=this._strokeGradient:d&&(e.strokeStyle=bl.call(l,e));var f=i.lineDash,p=i.lineDashOffset,g=!!e.setLineDash,m=this.getGlobalScale();if(a.setScale(m[0],m[1],this.segmentIgnoreThreshold),this.__dirtyPath||f&&!g&&r?(a.beginPath(e),f&&!g&&(a.setLineDash(f),a.setLineDashOffset(p)),this.buildPath(a,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(e.beginPath(),this.path.rebuildPath(e)),o)if(null!=i.fillOpacity){var v=e.globalAlpha;e.globalAlpha=i.fillOpacity*i.opacity,a.fill(e),e.globalAlpha=v}else a.fill(e);if(f&&g&&(e.setLineDash(f),e.lineDashOffset=p),r)if(null!=i.strokeOpacity){v=e.globalAlpha;e.globalAlpha=i.strokeOpacity*i.opacity,a.stroke(e),e.globalAlpha=v}else a.stroke(e);f&&g&&e.setLineDash([]),null!=i.text&&(this.restoreTransform(e),this.drawRectText(e,this.getBoundingRect()))},buildPath:function(e,t,n){},createPathProxy:function(){this.path=new Js},getBoundingRect:function(){var e=this._rect,t=this.style,n=!e;if(n){var i=this.path;i||(i=this.path=new Js),this.__dirtyPath&&(i.beginPath(),this.buildPath(i,this.shape,!1)),e=i.getBoundingRect()}if(this._rect=e,t.hasStroke()){var a=this._rectWithStroke||(this._rectWithStroke=e.clone());if(this.__dirty||n){a.copy(e);var r=t.lineWidth,o=t.strokeNoScale?this.getLineScale():1;t.hasFill()||(r=Math.max(r,this.strokeContainThreshold||4)),o>1e-10&&(a.width+=r/o,a.height+=r/o,a.x-=r/o/2,a.y-=r/o/2)}return a}return e},contain:function(e,t){var n=this.transformCoordToLocal(e,t),i=this.getBoundingRect(),a=this.style;if(e=n[0],t=n[1],i.contain(e,t)){var r=this.path.data;if(a.hasStroke()){var o=a.lineWidth,s=a.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(a.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),xl.containStroke(r,o/s,e,t)))return!0}if(a.hasFill())return xl.contain(r,e,t)}return!1},dirty:function(e){null==e&&(e=!0),e&&(this.__dirtyPath=e,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(e){return this.animate("shape",e)},attrKV:function(e,t){"shape"===e?(this.setShape(t),this.__dirtyPath=!0,this._rect=null):Or.prototype.attrKV.call(this,e,t)},setShape:function(e,t){var n=this.shape;if(n){if(Ge.isObject(e))for(var i in e)e.hasOwnProperty(i)&&(n[i]=e[i]);else n[e]=t;this.dirty(!0)}return this},getLineScale:function(){var e=this.transform;return e&&wl(e[0]-1)>1e-10&&wl(e[3]-1)>1e-10?Math.sqrt(wl(e[0]*e[3]-e[2]*e[1])):1}},Ml.extend=function(e){var t=function(t){Ml.call(this,t),e.style&&this.style.extendFrom(e.style,!1);var n=e.shape;if(n){this.shape=this.shape||{};var i=this.shape;for(var a in n)!i.hasOwnProperty(a)&&n.hasOwnProperty(a)&&(i[a]=n[a])}e.init&&e.init.call(this,t)};for(var n in Ge.inherits(t,Ml),e)"style"!==n&&"shape"!==n&&(t.prototype[n]=e[n]);return t},Ge.inherits(Ml,Or);var Tl=Ml,Il=dt.applyTransform,Al=Js.CMD,Dl=[[],[],[]],Cl=Math.sqrt,Ol=Math.atan2;var kl=function(e,t){var n,i,a,r,o,s=e.data,l=Al.M,u=Al.C,c=Al.L,h=Al.R,d=Al.A,f=Al.Q;for(a=0,r=0;a<s.length;){switch(n=s[a++],r=a,i=0,n){case l:case c:i=1;break;case u:i=3;break;case f:i=2;break;case d:var p=t[4],g=t[5],m=Cl(t[0]*t[0]+t[1]*t[1]),v=Cl(t[2]*t[2]+t[3]*t[3]),y=Ol(-t[1]/v,t[0]/m);s[a]*=m,s[a++]+=p,s[a]*=v,s[a++]+=g,s[a++]*=m,s[a++]*=v,s[a++]+=y,s[a++]+=y,r=a+=2;break;case h:_[0]=s[a++],_[1]=s[a++],Il(_,_,t),s[r++]=_[0],s[r++]=_[1],_[0]+=s[a++],_[1]+=s[a++],Il(_,_,t),s[r++]=_[0],s[r++]=_[1]}for(o=0;o<i;o++){var _;(_=Dl[o])[0]=s[a++],_[1]=s[a++],Il(_,_,t),s[r++]=_[0],s[r++]=_[1]}}},Ll=Math.sqrt,El=Math.sin,Nl=Math.cos,Pl=Math.PI,Rl=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])},zl=function(e,t){return(e[0]*t[0]+e[1]*t[1])/(Rl(e)*Rl(t))},Bl=function(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(zl(e,t))};function Vl(e,t,n,i,a,r,o,s,l,u,c){var h=l*(Pl/180),d=Nl(h)*(e-n)/2+El(h)*(t-i)/2,f=-1*El(h)*(e-n)/2+Nl(h)*(t-i)/2,p=d*d/(o*o)+f*f/(s*s);p>1&&(o*=Ll(p),s*=Ll(p));var g=(a===r?-1:1)*Ll((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=(e+n)/2+Nl(h)*m-El(h)*v,_=(t+i)/2+El(h)*m+Nl(h)*v,x=Bl([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=Bl(b,w);zl(b,w)<=-1&&(S=Pl),zl(b,w)>=1&&(S=0),0===r&&S>0&&(S-=2*Pl),1===r&&S<0&&(S+=2*Pl),c.addData(u,y,_,o,s,x,S,h,r)}var Hl=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Yl=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Fl(e,t){var n=function(e){if(!e)return new Js;for(var t,n=0,i=0,a=n,r=i,o=new Js,s=Js.CMD,l=e.match(Hl),u=0;u<l.length;u++){for(var c,h=l[u],d=h.charAt(0),f=h.match(Yl)||[],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,M=n,T=i;switch(d){case"l":n+=f[m++],i+=f[m++],c=s.L,o.addData(c,n,i);break;case"L":n=f[m++],i=f[m++],c=s.L,o.addData(c,n,i);break;case"m":n+=f[m++],i+=f[m++],c=s.M,o.addData(c,n,i),a=n,r=i,d="l";break;case"M":n=f[m++],i=f[m++],c=s.M,o.addData(c,n,i),a=n,r=i,d="L";break;case"h":n+=f[m++],c=s.L,o.addData(c,n,i);break;case"H":n=f[m++],c=s.L,o.addData(c,n,i);break;case"v":i+=f[m++],c=s.L,o.addData(c,n,i);break;case"V":i=f[m++],c=s.L,o.addData(c,n,i);break;case"C":c=s.C,o.addData(c,f[m++],f[m++],f[m++],f[m++],f[m++],f[m++]),n=f[m-2],i=f[m-1];break;case"c":c=s.C,o.addData(c,f[m++]+n,f[m++]+i,f[m++]+n,f[m++]+i,f[m++]+n,f[m++]+i),n+=f[m-2],i+=f[m-1];break;case"S":v=n,y=i;var I=o.len(),A=o.data;t===s.C&&(v+=n-A[I-4],y+=i-A[I-3]),c=s.C,M=f[m++],T=f[m++],n=f[m++],i=f[m++],o.addData(c,v,y,M,T,n,i);break;case"s":v=n,y=i,I=o.len(),A=o.data,t===s.C&&(v+=n-A[I-4],y+=i-A[I-3]),c=s.C,M=n+f[m++],T=i+f[m++],n+=f[m++],i+=f[m++],o.addData(c,v,y,M,T,n,i);break;case"Q":M=f[m++],T=f[m++],n=f[m++],i=f[m++],c=s.Q,o.addData(c,M,T,n,i);break;case"q":M=f[m++]+n,T=f[m++]+i,n+=f[m++],i+=f[m++],c=s.Q,o.addData(c,M,T,n,i);break;case"T":v=n,y=i,I=o.len(),A=o.data,t===s.Q&&(v+=n-A[I-4],y+=i-A[I-3]),n=f[m++],i=f[m++],c=s.Q,o.addData(c,v,y,n,i);break;case"t":v=n,y=i,I=o.len(),A=o.data,t===s.Q&&(v+=n-A[I-4],y+=i-A[I-3]),n+=f[m++],i+=f[m++],c=s.Q,o.addData(c,v,y,n,i);break;case"A":_=f[m++],x=f[m++],b=f[m++],w=f[m++],S=f[m++],Vl(M=n,T=i,n=f[m++],i=f[m++],w,S,_,x,b,c=s.A,o);break;case"a":_=f[m++],x=f[m++],b=f[m++],w=f[m++],S=f[m++],Vl(M=n,T=i,n+=f[m++],i+=f[m++],w,S,_,x,b,c=s.A,o)}}"z"!==d&&"Z"!==d||(c=s.Z,o.addData(c),n=a,i=r),t=c}return o.toStatic(),o}(e);return(t=t||{}).buildPath=function(e){if(e.setData){e.setData(n.data),(t=e.getContext())&&e.rebuildPath(t)}else{var t=e;n.rebuildPath(t)}},t.applyTransform=function(e){kl(n,e),this.dirty(!0)},t}var Gl=function(e,t){for(var n=[],i=e.length,a=0;a<i;a++){var r=e[a];r.path||r.createPathProxy(),r.__dirtyPath&&r.buildPath(r.path,r.shape,!0),n.push(r.path)}var o=new Tl(t);return o.createPathProxy(),o.buildPath=function(e){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t)},o},Wl={createFromString:function(e,t){return new Tl(Fl(e,t))},extendFromString:function(e,t){return Tl.extend(Fl(e,t))},mergePath:Gl},jl=$i.ContextCachedBy,Ul=function(e){Or.call(this,e)};Ul.prototype={constructor:Ul,type:"text",brush:function(e,t){var n=this.style;this.__dirty&&Mr.normalizeTextStyle(n,!0),n.fill=n.stroke=n.shadowBlur=n.shadowColor=n.shadowOffsetX=n.shadowOffsetY=null;var i=n.text;null!=i&&(i+=""),Mr.needDrawText(i,n)?(this.setTransform(e),Mr.renderText(this,e,i,n,null,t),this.restoreTransform(e)):e.__attrCachedBy=jl.NONE},getBoundingRect:function(){var e=this.style;if(this.__dirty&&Mr.normalizeTextStyle(e,!0),!this._rect){e.text;var t=Za.getBoundingRect(e.text+"",e.font,e.textAlign,e.textVerticalAlign,e.textPadding,e.textLineHeight,e.rich);if(t.x+=e.x||0,t.y+=e.y||0,Mr.getStroke(e.textStroke,e.textStrokeWidth)){var n=e.textStrokeWidth;t.x-=n/2,t.y-=n/2,t.width+=n,t.height+=n}this._rect=t}return this._rect}},Ge.inherits(Ul,Or);var Zl=Ul,Xl=Tl.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(e,t,n){n&&e.moveTo(t.cx+t.r,t.cy),e.arc(t.cx,t.cy,t.r,0,2*Math.PI,!0)}}),ql=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]];var Kl=function(e){return oe.browser.ie&&oe.browser.version>=11?function(){var t,n=this.__clipPaths,i=this.style;if(n)for(var a=0;a<n.length;a++){var r=n[a],o=r&&r.shape,s=r&&r.type;if(o&&("sector"===s&&o.startAngle===o.endAngle||"rect"===s&&(!o.width||!o.height))){for(var l=0;l<ql.length;l++)ql[l][2]=i[ql[l][0]],i[ql[l][0]]=ql[l][1];t=!0;break}}if(e.apply(this,arguments),t)for(l=0;l<ql.length;l++)i[ql[l][0]]=ql[l][2]}:e},$l=Tl.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:Kl(Tl.prototype.brush),buildPath:function(e,t){var n=t.cx,i=t.cy,a=Math.max(t.r0||0,0),r=Math.max(t.r,0),o=t.startAngle,s=t.endAngle,l=t.clockwise,u=Math.cos(o),c=Math.sin(o);e.moveTo(u*a+n,c*a+i),e.lineTo(u*r+n,c*r+i),e.arc(n,i,r,o,s,!l),e.lineTo(Math.cos(s)*a+n,Math.sin(s)*a+i),0!==a&&e.arc(n,i,a,s,o,l),e.closePath()}}),Ql=Tl.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(e,t){var n=t.cx,i=t.cy,a=2*Math.PI;e.moveTo(n+t.r,i),e.arc(n,i,t.r,0,a,!1),e.moveTo(n+t.r0,i),e.arc(n,i,t.r0,0,a,!0)}}),Jl=Ql,eu=dt.distance;function tu(e,t,n,i,a,r,o){var s=.5*(n-e),l=.5*(i-t);return(2*(t-n)+s+l)*o+(-3*(t-n)-2*s-l)*r+s*a+t}var nu=function(e,t){for(var n=e.length,i=[],a=0,r=1;r<n;r++)a+=eu(e[r-1],e[r]);var o=a/2;for(o=o<n?n:o,r=0;r<o;r++){var s,l,u,c=r/(o-1)*(t?n:n-1),h=Math.floor(c),d=c-h,f=e[h%n];t?(s=e[(h-1+n)%n],l=e[(h+1)%n],u=e[(h+2)%n]):(s=e[0===h?h:h-1],l=e[h>n-2?n-1:h+1],u=e[h>n-3?n-1:h+2]);var p=d*d,g=d*p;i.push([tu(s[0],f[0],l[0],u[0],d,p,g),tu(s[1],f[1],l[1],u[1],d,p,g)])}return i},iu=dt.min,au=dt.max,ru=dt.scale,ou=dt.distance,su=dt.add,lu=dt.clone,uu=dt.sub;var cu=function(e,t,n,i){var a,r,o,s,l=[],u=[],c=[],h=[];if(i){o=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=e.length;d<f;d++)iu(o,o,e[d]),au(s,s,e[d]);iu(o,o,i[0]),au(s,s,i[1])}for(d=0,f=e.length;d<f;d++){var p=e[d];if(n)a=e[d?d-1:f-1],r=e[(d+1)%f];else{if(0===d||d===f-1){l.push(lu(e[d]));continue}a=e[d-1],r=e[d+1]}uu(u,r,a),ru(u,u,t);var g=ou(p,a),m=ou(p,r),v=g+m;0!==v&&(g/=v,m/=v),ru(c,u,-g),ru(h,u,m);var y=su([],p,c),_=su([],p,h);i&&(au(y,y,o),iu(y,y,s),au(_,_,o),iu(_,_,s)),l.push(y),l.push(_)}return n&&l.push(l.shift()),l};var hu=function(e,t,n){var i=t.points,a=t.smooth;if(i&&i.length>=2){if(a&&"spline"!==a){var r=cu(i,a,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(n?o:o-1);s++){var l=r[2*s],u=r[2*s+1],c=i[(s+1)%o];e.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{"spline"===a&&(i=nu(i,n)),e.moveTo(i[0][0],i[0][1]);s=1;for(var h=i.length;s<h;s++)e.lineTo(i[s][0],i[s][1])}n&&e.closePath()}},du={buildPath:hu},fu=Tl.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(e,t){du.buildPath(e,t,!0)}}),pu=Tl.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(e,t){du.buildPath(e,t,!1)}}),gu=Math.round;function mu(e,t,n){if(!t)return e;var i=gu(2*e);return(i+gu(t))%2==0?i/2:(i+(n?1:-1))/2}var vu=function(e,t,n){if(t){var i=t.x1,a=t.x2,r=t.y1,o=t.y2;e.x1=i,e.x2=a,e.y1=r,e.y2=o;var s=n&&n.lineWidth;s&&(gu(2*i)===gu(2*a)&&(e.x1=e.x2=mu(i,s,!0)),gu(2*r)===gu(2*o)&&(e.y1=e.y2=mu(r,s,!0)))}},yu=function(e,t,n){if(t){var i=t.x,a=t.y,r=t.width,o=t.height;e.x=i,e.y=a,e.width=r,e.height=o;var s=n&&n.lineWidth;s&&(e.x=mu(i,s,!0),e.y=mu(a,s,!0),e.width=Math.max(mu(i+r,s,!1)-e.x,0===r?0:1),e.height=Math.max(mu(a+o,s,!1)-e.y,0===o?0:1))}},_u={subPixelOptimizeLine:vu,subPixelOptimizeRect:yu,subPixelOptimize:mu},xu=_u.subPixelOptimizeRect,bu={},wu=Tl.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(e,t){var n,i,a,r;this.subPixelOptimize?(xu(bu,t,this.style),n=bu.x,i=bu.y,a=bu.width,r=bu.height,bu.r=t.r,t=bu):(n=t.x,i=t.y,a=t.width,r=t.height),t.r?Xa.buildPath(e,t):e.rect(n,i,a,r),e.closePath()}}),Su=_u.subPixelOptimizeLine,Mu={},Tu=Tl.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(e,t){var n,i,a,r;this.subPixelOptimize?(Su(Mu,t,this.style),n=Mu.x1,i=Mu.y1,a=Mu.x2,r=Mu.y2):(n=t.x1,i=t.y1,a=t.x2,r=t.y2);var o=t.percent;0!==o&&(e.moveTo(n,i),o<1&&(a=n*(1-o)+a*o,r=i*(1-o)+r*o),e.lineTo(a,r))},pointAt:function(e){var t=this.shape;return[t.x1*(1-e)+t.x2*e,t.y1*(1-e)+t.y2*e]}}),Iu=ws.quadraticSubdivide,Au=ws.cubicSubdivide,Du=ws.quadraticAt,Cu=ws.cubicAt,Ou=ws.quadraticDerivativeAt,ku=ws.cubicDerivativeAt,Lu=[];function Eu(e,t,n){var i=e.cpx2,a=e.cpy2;return null===i||null===a?[(n?ku:Cu)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?ku:Cu)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?Ou:Du)(e.x1,e.cpx1,e.x2,t),(n?Ou:Du)(e.y1,e.cpy1,e.y2,t)]}var Nu=Tl.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(e,t){var n=t.x1,i=t.y1,a=t.x2,r=t.y2,o=t.cpx1,s=t.cpy1,l=t.cpx2,u=t.cpy2,c=t.percent;0!==c&&(e.moveTo(n,i),null==l||null==u?(c<1&&(Iu(n,o,a,c,Lu),o=Lu[1],a=Lu[2],Iu(i,s,r,c,Lu),s=Lu[1],r=Lu[2]),e.quadraticCurveTo(o,s,a,r)):(c<1&&(Au(n,o,l,a,c,Lu),o=Lu[1],l=Lu[2],a=Lu[3],Au(i,s,u,r,c,Lu),s=Lu[1],u=Lu[2],r=Lu[3]),e.bezierCurveTo(o,s,l,u,a,r)))},pointAt:function(e){return Eu(this.shape,e,!1)},tangentAt:function(e){var t=Eu(this.shape,e,!0);return dt.normalize(t,t)}}),Pu=Tl.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(e,t){var n=t.cx,i=t.cy,a=Math.max(t.r,0),r=t.startAngle,o=t.endAngle,s=t.clockwise,l=Math.cos(r),u=Math.sin(r);e.moveTo(l*a+n,u*a+i),e.arc(n,i,a,r,o,!s)}}),Ru=Tl.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var e=this.__dirtyPath,t=this.shape.paths,n=0;n<t.length;n++)e=e||t[n].__dirtyPath;this.__dirtyPath=e,this.__dirty=this.__dirty||e},beforeBrush:function(){this._updatePathDirty();for(var e=this.shape.paths||[],t=this.getGlobalScale(),n=0;n<e.length;n++)e[n].path||e[n].createPathProxy(),e[n].path.setScale(t[0],t[1],e[n].segmentIgnoreThreshold)},buildPath:function(e,t){for(var n=t.paths||[],i=0;i<n.length;i++)n[i].buildPath(e,n[i].shape,!0)},afterBrush:function(){for(var e=this.shape.paths||[],t=0;t<e.length;t++)e[t].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),Tl.prototype.getBoundingRect.call(this)}}),zu=Ru,Bu=function(e){this.colorStops=e||[]};Bu.prototype={constructor:Bu,addColorStop:function(e,t){this.colorStops.push({offset:e,color:t})}};var Vu=Bu,Hu=function(e,t,n,i,a,r){this.x=null==e?0:e,this.y=null==t?0:t,this.x2=null==n?1:n,this.y2=null==i?0:i,this.type="linear",this.global=r||!1,Vu.call(this,a)};Hu.prototype={constructor:Hu},Ge.inherits(Hu,Vu);var Yu=Hu,Fu=function(e,t,n,i,a){this.x=null==e?.5:e,this.y=null==t?.5:t,this.r=null==n?.5:n,this.type="radial",this.global=a||!1,Vu.call(this,i)};Fu.prototype={constructor:Fu},Ge.inherits(Fu,Vu);var Gu=Fu,Wu=Ge.inherits;function ju(e){Or.call(this,e),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}ju.prototype.incremental=!0,ju.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},ju.prototype.addDisplayable=function(e,t){t?this._temporaryDisplayables.push(e):this._displayables.push(e),this.dirty()},ju.prototype.addDisplayables=function(e,t){t=t||!1;for(var n=0;n<e.length;n++)this.addDisplayable(e[n],t)},ju.prototype.eachPendingDisplayable=function(e){for(var t=this._cursor;t<this._displayables.length;t++)e&&e(this._displayables[t]);for(t=0;t<this._temporaryDisplayables.length;t++)e&&e(this._temporaryDisplayables[t])},ju.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){(t=this._displayables[e]).parent=this,t.update(),t.parent=null}for(e=0;e<this._temporaryDisplayables.length;e++){var t;(t=this._temporaryDisplayables[e]).parent=this,t.update(),t.parent=null}},ju.prototype.brush=function(e,t){for(var n=this._cursor;n<this._displayables.length;n++){(i=this._displayables[n]).beforeBrush&&i.beforeBrush(e),i.brush(e,n===this._cursor?null:this._displayables[n-1]),i.afterBrush&&i.afterBrush(e)}this._cursor=n;for(n=0;n<this._temporaryDisplayables.length;n++){var i;(i=this._temporaryDisplayables[n]).beforeBrush&&i.beforeBrush(e),i.brush(e,0===n?null:this._temporaryDisplayables[n-1]),i.afterBrush&&i.afterBrush(e)}this._temporaryDisplayables=[],this.notClear=!0};var Uu=[];ju.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new Pi(1/0,1/0,-1/0,-1/0),t=0;t<this._displayables.length;t++){var n=this._displayables[t],i=n.getBoundingRect().clone();n.needLocalTransform()&&i.applyTransform(n.getLocalTransform(Uu)),e.union(i)}this._rect=e}return this._rect},ju.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t);if(this.getBoundingRect().contain(n[0],n[1]))for(var i=0;i<this._displayables.length;i++){if(this._displayables[i].contain(e,t))return!0}return!1},Wu(ju,Or);var Zu=ju,Xu=Lr,qu=zi,Ku=Zl,$u=Xl,Qu=$l,Ju=Jl,ec=fu,tc=pu,nc=wu,ic=Tu,ac=Nu,rc=Pu,oc=zu,sc=Yu,lc=Gu,uc=Pi,cc=Zu,hc=Math.max,dc=Math.min,fc={},pc=1,gc="emphasis",mc="normal",vc=1,yc={},_c={};function xc(e,t){_c[e]=t}function bc(e,t,n,i){var a=Wl.createFromString(e,t);return n&&("center"===i&&(n=wc(n,a.getBoundingRect())),Mc(a,n)),a}function wc(e,t){var n,i=t.width/t.height,a=e.height*i;return n=a<=e.width?e.height:(a=e.width)/i,{x:e.x+e.width/2-a/2,y:e.y+e.height/2-n/2,width:a,height:n}}var Sc=Wl.mergePath;function Mc(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}var Tc=_u.subPixelOptimize;function Ic(e){return null!=e&&"none"!==e}var Ac=Ge.createHashMap(),Dc=0;function Cc(e){var t=e.__hoverStl;if(t&&!e.__highlighted){var n=e.__zr,i=e.useHoverLayer&&n&&"canvas"===n.painter.type;if(e.__highlighted=i?"layer":"plain",!(e.isGroup||!n&&e.useHoverLayer)){var a=e,r=e.style;i&&(r=(a=n.addHover(e)).style),jc(r),i||function(e){if(e.__hoverStlDirty){e.__hoverStlDirty=!1;var t=e.__hoverStl;if(t){var n=e.__cachedNormalStl={};e.__cachedNormalZ2=e.z2;var i=e.style;for(var a in t)null!=t[a]&&(n[a]=i[a]);n.fill=i.fill,n.stroke=i.stroke}else e.__cachedNormalStl=e.__cachedNormalZ2=null}}(a),r.extendFrom(t),Oc(r,t,"fill"),Oc(r,t,"stroke"),Wc(r),i||(e.dirty(!1),e.z2+=pc)}}}function Oc(e,t,n){!Ic(t[n])&&Ic(e[n])&&(e[n]=function(e){if("string"!=typeof e)return e;var t=Ac.get(e);return t||(t=qn.lift(e,-.1),Dc<1e4&&(Ac.set(e,t),Dc++)),t}(e[n]))}function kc(e){var t=e.__highlighted;if(t&&(e.__highlighted=!1,!e.isGroup))if("layer"===t)e.__zr&&e.__zr.removeHover(e);else{var n=e.style,i=e.__cachedNormalStl;i&&(jc(n),e.setStyle(i),Wc(n));var a=e.__cachedNormalZ2;null!=a&&e.z2-a===pc&&(e.z2=a)}}function Lc(e,t,n){var i,a=mc,r=mc;e.__highlighted&&(a=gc,i=!0),t(e,n),e.__highlighted&&(r=gc,i=!0),e.isGroup&&e.traverse((function(e){!e.isGroup&&t(e,n)})),i&&e.__highDownOnUpdate&&e.__highDownOnUpdate(a,r)}function Ec(e,t){t=e.__hoverStl=!1!==t&&(e.hoverStyle||t||{}),e.__hoverStlDirty=!0,e.__highlighted&&(e.__cachedNormalStl=null,kc(e),Cc(e))}function Nc(e){!Bc(this,e)&&!this.__highByOuter&&Lc(this,Cc)}function Pc(e){!Bc(this,e)&&!this.__highByOuter&&Lc(this,kc)}function Rc(e){this.__highByOuter|=1<<(e||0),Lc(this,Cc)}function zc(e){!(this.__highByOuter&=~(1<<(e||0)))&&Lc(this,kc)}function Bc(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function Vc(e,t){var n=!1===t;if(e.__highDownSilentOnTouch=e.highDownSilentOnTouch,e.__highDownOnUpdate=e.highDownOnUpdate,!n||e.__highDownDispatcher){var i=n?"off":"on";e[i]("mouseover",Nc)[i]("mouseout",Pc),e[i]("emphasis",Rc)[i]("normal",zc),e.__highByOuter=e.__highByOuter||0,e.__highDownDispatcher=!n}}function Hc(e,t,n,i,a){return Yc(e,t,i,a),n&&Ge.extend(e,n),e}function Yc(e,t,n,i){if((n=n||fc).isRectText){var a;n.getTextPosition?a=n.getTextPosition(t,i):"outside"===(a=t.getShallow("position")||(i?null:"inside"))&&(a="top"),e.textPosition=a,e.textOffset=t.getShallow("offset");var r=t.getShallow("rotate");null!=r&&(r*=Math.PI/180),e.textRotation=r,e.textDistance=Ge.retrieve2(t.getShallow("distance"),i?null:5)}var o,s=t.ecModel,l=s&&s.option.textStyle,u=function(e){var t;for(;e&&e!==e.ecModel;){var n=(e.option||fc).rich;if(n)for(var i in t=t||{},n)n.hasOwnProperty(i)&&(t[i]=1);e=e.parentModel}return t}(t);if(u)for(var c in o={},u)if(u.hasOwnProperty(c)){var h=t.getModel(["rich",c]);Fc(o[c]={},h,l,n,i)}return e.rich=o,Fc(e,t,l,n,i,!0),n.forceRich&&!n.textStyle&&(n.textStyle={}),e}function Fc(e,t,n,i,a,r){n=!a&&n||fc,e.textFill=Gc(t.getShallow("color"),i)||n.color,e.textStroke=Gc(t.getShallow("textBorderColor"),i)||n.textBorderColor,e.textStrokeWidth=Ge.retrieve2(t.getShallow("textBorderWidth"),n.textBorderWidth),a||(r&&(e.insideRollbackOpt=i,Wc(e)),null==e.textFill&&(e.textFill=i.autoColor)),e.fontStyle=t.getShallow("fontStyle")||n.fontStyle,e.fontWeight=t.getShallow("fontWeight")||n.fontWeight,e.fontSize=t.getShallow("fontSize")||n.fontSize,e.fontFamily=t.getShallow("fontFamily")||n.fontFamily,e.textAlign=t.getShallow("align"),e.textVerticalAlign=t.getShallow("verticalAlign")||t.getShallow("baseline"),e.textLineHeight=t.getShallow("lineHeight"),e.textWidth=t.getShallow("width"),e.textHeight=t.getShallow("height"),e.textTag=t.getShallow("tag"),r&&i.disableBox||(e.textBackgroundColor=Gc(t.getShallow("backgroundColor"),i),e.textPadding=t.getShallow("padding"),e.textBorderColor=Gc(t.getShallow("borderColor"),i),e.textBorderWidth=t.getShallow("borderWidth"),e.textBorderRadius=t.getShallow("borderRadius"),e.textBoxShadowColor=t.getShallow("shadowColor"),e.textBoxShadowBlur=t.getShallow("shadowBlur"),e.textBoxShadowOffsetX=t.getShallow("shadowOffsetX"),e.textBoxShadowOffsetY=t.getShallow("shadowOffsetY")),e.textShadowColor=t.getShallow("textShadowColor")||n.textShadowColor,e.textShadowBlur=t.getShallow("textShadowBlur")||n.textShadowBlur,e.textShadowOffsetX=t.getShallow("textShadowOffsetX")||n.textShadowOffsetX,e.textShadowOffsetY=t.getShallow("textShadowOffsetY")||n.textShadowOffsetY}function Gc(e,t){return"auto"!==e?e:t&&t.autoColor?t.autoColor:null}function Wc(e){var t,n=e.textPosition,i=e.insideRollbackOpt;if(i&&null==e.textFill){var a=i.autoColor,r=i.isRectText,o=i.useInsideStyle,s=!1!==o&&(!0===o||r&&n&&"string"==typeof n&&n.indexOf("inside")>=0),l=!s&&null!=a;(s||l)&&(t={textFill:e.textFill,textStroke:e.textStroke,textStrokeWidth:e.textStrokeWidth}),s&&(e.textFill="#fff",null==e.textStroke&&(e.textStroke=a,null==e.textStrokeWidth&&(e.textStrokeWidth=2))),l&&(e.textFill=a)}e.insideRollback=t}function jc(e){var t=e.insideRollback;t&&(e.textFill=t.textFill,e.textStroke=t.textStroke,e.textStrokeWidth=t.textStrokeWidth,e.insideRollback=null)}function Uc(e,t,n,i,a,r){if("function"==typeof a&&(r=a,a=null),i&&i.isAnimationEnabled()){var o=e?"Update":"",s=i.getShallow("animationDuration"+o),l=i.getShallow("animationEasing"+o),u=i.getShallow("animationDelay"+o);"function"==typeof u&&(u=u(a,i.getAnimationDelayParams?i.getAnimationDelayParams(t,a):null)),"function"==typeof s&&(s=s(a)),s>0?t.animateTo(n,s,u||0,l,r,!!r):(t.stopAnimation(),t.attr(n),r&&r())}else t.stopAnimation(),t.attr(n),r&&r()}function Zc(e,t,n,i,a){Uc(!0,e,t,n,i,a)}function Xc(e,t,n){return t&&!Ge.isArrayLike(t)&&(t=vn.getLocalTransform(t)),n&&(t=ln.invert([],t)),dt.applyTransform([],e,t)}function qc(e,t,n,i,a,r,o,s){var l,u=n-e,c=i-t,h=o-a,d=s-r,f=Kc(h,d,u,c);if((l=f)<=1e-6&&l>=-1e-6)return!1;var p=e-a,g=t-r,m=Kc(p,g,u,c)/f;if(m<0||m>1)return!1;var v=Kc(p,g,h,d)/f;return!(v<0||v>1)}function Kc(e,t,n,i){return e*i-n*t}xc("circle",Xl),xc("sector",$l),xc("ring",Jl),xc("polygon",fu),xc("polyline",pu),xc("rect",wu),xc("line",Tu),xc("bezierCurve",Nu),xc("arc",Pu);var $c=function(e,t,n){var i=new Lr({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if("center"===n){var a={width:e.width,height:e.height};i.setStyle(wc(t,a))}}});return i},Qc=function(e){return _u.subPixelOptimizeLine(e.shape,e.shape,e.style),e},Jc=function(e){return _u.subPixelOptimizeRect(e.shape,e.shape,e.style),e},eh=function(e,t,n){var i,a={isRectText:!0};!1===n?i=!0:a.autoColor=n,Yc(e,t,a,i)},th=function(e,t,n){var i=0===t[4]||0===t[5]||0===t[0]?1:Math.abs(2*t[4]/t[0]),a=0===t[4]||0===t[5]||0===t[2]?1:Math.abs(2*t[4]/t[2]),r=["left"===e?-i:"right"===e?i:0,"top"===e?-a:"bottom"===e?a:0];return r=Xc(r,t,n),Math.abs(r[0])>Math.abs(r[1])?r[0]>0?"right":"left":r[1]>0?"bottom":"top"},nh=function(e,t){return Ge.map(e,(function(e){var n=e[0];n=hc(n,t.x),n=dc(n,t.x+t.width);var i=e[1];return i=hc(i,t.y),[n,i=dc(i,t.y+t.height)]}))},ih=function(e,t,n){var i=(t=Ge.extend({rectHover:!0},t)).style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},e)return 0===e.indexOf("image://")?(i.image=e.slice(8),Ge.defaults(i,n),new Lr(t)):bc(e.replace("path://",""),t,n,"center")},ah=function(e,t,n,i,a){for(var r=0,o=a[a.length-1];r<a.length;r++){var s=a[r];if(qc(e,t,n,i,s[0],s[1],o[0],o[1]))return!0;o=s}},rh={Image:Xu,Group:qu,Text:Ku,Circle:$u,Sector:Qu,Ring:Ju,Polygon:ec,Polyline:tc,Rect:nc,Line:ic,BezierCurve:ac,Arc:rc,CompoundPath:oc,LinearGradient:sc,RadialGradient:lc,BoundingRect:uc,IncrementalDisplayable:cc,Z2_EMPHASIS_LIFT:pc,CACHED_LABEL_STYLE_PROPERTIES:{color:"textFill",textBorderColor:"textStroke",textBorderWidth:"textStrokeWidth"},extendShape:function(e){return Tl.extend(e)},extendPath:function(e,t){return Wl.extendFromString(e,t)},registerShape:xc,getShapeClass:function(e){if(_c.hasOwnProperty(e))return _c[e]},makePath:bc,makeImage:$c,mergePath:Sc,resizePath:Mc,subPixelOptimizeLine:Qc,subPixelOptimizeRect:Jc,subPixelOptimize:Tc,setElementHoverStyle:Ec,setHoverStyle:function(e,t){Vc(e,!0),Lc(e,Ec,t)},setAsHighDownDispatcher:Vc,isHighDownDispatcher:function(e){return!(!e||!e.__highDownDispatcher)},getHighlightDigit:function(e){var t=yc[e];return null==t&&vc<=32&&(t=yc[e]=vc++),t},setLabelStyle:function(e,t,n,i,a,r,o){var s,l=(a=a||fc).labelFetcher,u=a.labelDataIndex,c=a.labelDimIndex,h=a.labelProp,d=n.getShallow("show"),f=i.getShallow("show");(d||f)&&(l&&(s=l.getFormattedLabel(u,"normal",null,c,h)),null==s&&(s=Ge.isFunction(a.defaultText)?a.defaultText(u,a):a.defaultText));var p=d?s:null,g=f?Ge.retrieve2(l?l.getFormattedLabel(u,"emphasis",null,c,h):null,s):null;null==p&&null==g||(Hc(e,n,r,a),Hc(t,i,o,a,!0)),e.text=p,t.text=g},modifyLabelStyle:function(e,t,n){var i=e.style;t&&(jc(i),e.setStyle(t),Wc(i)),i=e.__hoverStl,n&&i&&(jc(i),Ge.extend(i,n),Wc(i))},setTextStyle:Hc,setText:eh,getFont:function(e,t){var n=t&&t.getModel("textStyle");return Ge.trim([e.fontStyle||n&&n.getShallow("fontStyle")||"",e.fontWeight||n&&n.getShallow("fontWeight")||"",(e.fontSize||n&&n.getShallow("fontSize")||12)+"px",e.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "))},updateProps:Zc,initProps:function(e,t,n,i,a){Uc(!1,e,t,n,i,a)},getTransform:function(e,t){for(var n=ln.identity([]);e&&e!==t;)ln.mul(n,e.getLocalTransform(),n),e=e.parent;return n},applyTransform:Xc,transformDirection:th,groupTransition:function(e,t,n,i){if(e&&t){var a,r=(a={},e.traverse((function(e){!e.isGroup&&e.anid&&(a[e.anid]=e)})),a);t.traverse((function(e){if(!e.isGroup&&e.anid){var t=r[e.anid];if(t){var i=o(e);e.attr(o(t)),Zc(e,i,n,e.dataIndex)}}}))}function o(e){var t={position:dt.clone(e.position),rotation:e.rotation};return e.shape&&(t.shape=Ge.extend({},e.shape)),t}},clipPointsByRect:nh,clipRectByRect:function(e,t){var n=hc(e.x,t.x),i=dc(e.x+e.width,t.x+t.width),a=hc(e.y,t.y),r=dc(e.y+e.height,t.y+t.height);if(i>=n&&r>=a)return{x:n,y:a,width:i-n,height:r-a}},createIcon:ih,linePolygonIntersect:ah,lineLineIntersect:qc},oh=["textStyle","color"],sh={getTextColor:function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(oh):null)},getFont:function(){return rh.getFont({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(e){return Za.getBoundingRect(e,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("lineHeight"),this.getShallow("rich"),this.getShallow("truncateText"))}},lh=sh,uh=Xo([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),ch={getItemStyle:function(e,t){var n=uh(this,e,t),i=this.getBorderLineDash();return i&&(n.lineDash=i),n},getBorderLineDash:function(){var e=this.get("borderType");return"solid"===e||null==e?null:"dashed"===e?[5,5]:[1,1]}},hh=ch,dh=Bo.makeInner,fh=Zo.enableClassExtend,ph=Zo.enableClassCheck,gh=Ge.mixin,mh=dh();function vh(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}function yh(e,t,n){for(var i=0;i<t.length&&(!t[i]||null!=(e=e&&"object"==typeof e?e[t[i]]:null));i++);return null==e&&n&&(e=n.get(t)),e}function _h(e,t){var n=mh(e).getParent;return n?n.call(e,t):e.parentModel}vh.prototype={constructor:vh,init:null,mergeOption:function(e){Ge.merge(this.option,e,!0)},get:function(e,t){return null==e?this.option:yh(this.option,this.parsePath(e),!t&&_h(this,e))},getShallow:function(e,t){var n=this.option,i=null==n?n:n[e],a=!t&&_h(this,e);return null==i&&a&&(i=a.getShallow(e)),i},getModel:function(e,t){var n;return new vh(null==e?this.option:yh(this.option,e=this.parsePath(e)),t=t||(n=_h(this,e))&&n.getModel(e),this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new(0,this.constructor)(Ge.clone(this.option))},setReadOnly:function(e){},parsePath:function(e){return"string"==typeof e&&(e=e.split(".")),e},customizeGetParent:function(e){mh(this).getParent=e},isAnimationEnabled:function(){if(!oe.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},fh(vh),ph(vh),gh(vh,$o),gh(vh,Jo),gh(vh,lh),gh(vh,hh);var xh=vh,bh=Zo.parseClassType,wh=0;var Sh={getUID:function(e){return[e||"",wh++,Math.random().toFixed(5)].join("_")},enableSubTypeDefaulter:function(e){var t={};return e.registerSubTypeDefaulter=function(e,n){e=bh(e),t[e.main]=n},e.determineSubType=function(n,i){var a=i.type;if(!a){var r=bh(n).main;e.hasSubTypes(n)&&t[r]&&(a=t[r](i))}return a},e},enableTopologicalTravel:function(e,t){function n(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}e.topologicalTravel=function(e,i,a,r){if(e.length){var o=function(e){var i={},a=[];return Ge.each(e,(function(r){var o=n(i,r),s=function(e,t){var n=[];return Ge.each(e,(function(e){Ge.indexOf(t,e)>=0&&n.push(e)})),n}(o.originalDeps=t(r),e);o.entryCount=s.length,0===o.entryCount&&a.push(r),Ge.each(s,(function(e){Ge.indexOf(o.predecessor,e)<0&&o.predecessor.push(e);var t=n(i,e);Ge.indexOf(t.successor,e)<0&&t.successor.push(r)}))})),{graph:i,noEntryList:a}}(i),s=o.graph,l=o.noEntryList,u={};for(Ge.each(e,(function(e){u[e]=!0}));l.length;){var c=l.pop(),h=s[c],d=!!u[c];d&&(a.call(r,c,h.originalDeps.slice()),delete u[c]),Ge.each(h.successor,d?p:f)}Ge.each(u,(function(){throw new Error("Circle dependency may exists")}))}function f(e){s[e].entryCount--,0===s[e].entryCount&&l.push(e)}function p(e){u[e]=!0,f(e)}}}},Mh=1e-4;var Th=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function Ih(e){if(0===e)return 0;var t=Math.floor(Math.log(e)/Math.LN10);return e/Math.pow(10,t)>=10&&t++,t}var Ah=function(e,t,n,i){var a=t[1]-t[0],r=n[1]-n[0];if(0===a)return 0===r?n[0]:(n[0]+n[1])/2;if(i)if(a>0){if(e<=t[0])return n[0];if(e>=t[1])return n[1]}else{if(e>=t[0])return n[0];if(e<=t[1])return n[1]}else{if(e===t[0])return n[0];if(e===t[1])return n[1]}return(e-t[0])/a*r+n[0]},Dh=function(e){if(e=+e,isNaN(e))return 0;for(var t=1,n=0;Math.round(e*t)/t!==e;)t*=10,n++;return n},Ch=function(e,t){var n=Math.log,i=Math.LN10,a=Math.floor(n(e[1]-e[0])/i),r=Math.round(n(Math.abs(t[1]-t[0]))/i),o=Math.min(Math.max(-a+r,0),20);return isFinite(o)?o:20},Oh=function(e,t,n){if(!e[t])return 0;var i=Ge.reduce(e,(function(e,t){return e+(isNaN(t)?0:t)}),0);if(0===i)return 0;for(var a=Math.pow(10,n),r=Ge.map(e,(function(e){return(isNaN(e)?0:e)/i*a*100})),o=100*a,s=Ge.map(r,(function(e){return Math.floor(e)})),l=Ge.reduce(s,(function(e,t){return e+t}),0),u=Ge.map(r,(function(e,t){return e-s[t]}));l<o;){for(var c=Number.NEGATIVE_INFINITY,h=null,d=0,f=u.length;d<f;++d)u[d]>c&&(c=u[d],h=d);++s[h],u[h]=0,++l}return s[t]/a},kh=function(e,t){var n=Ih(e),i=Math.pow(10,n),a=e/i;return e=(t?a<1.5?1:a<2.5?2:a<4?3:a<7?5:10:a<1?1:a<2?2:a<3?3:a<5?5:10)*i,n>=-20?+e.toFixed(n<0?-n:0):e},Lh=function(e,t){var n=(e.length-1)*t+1,i=Math.floor(n),a=+e[i-1],r=n-i;return r?a+r*(e[i]-a):a},Eh=function(e){e.sort((function(e,t){return s(e,t,0)?-1:1}));for(var t=-1/0,n=1,i=0;i<e.length;){for(var a=e[i].interval,r=e[i].close,o=0;o<2;o++)a[o]<=t&&(a[o]=t,r[o]=o?1:1-n),t=a[o],n=r[o];a[0]===a[1]&&r[0]*r[1]!=1?e.splice(i,1):i++}return e;function s(e,t,n){return e.interval[n]<t.interval[n]||e.interval[n]===t.interval[n]&&(e.close[n]-t.close[n]==(n?-1:1)||!n&&s(e,t,1))}},Nh=function(e){return e-parseFloat(e)>=0},Ph={linearMap:Ah,parsePercent:function(e,t){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%"}return"string"==typeof e?(n=e,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):null==e?NaN:+e;var n},round:function(e,t,n){return null==t&&(t=10),t=Math.min(Math.max(0,t),20),e=(+e).toFixed(t),n?e:+e},asc:function(e){return e.sort((function(e,t){return e-t})),e},getPrecision:Dh,getPrecisionSafe:function(e){var t=e.toString(),n=t.indexOf("e");if(n>0){var i=+t.slice(n+1);return i<0?-i:0}var a=t.indexOf(".");return a<0?0:t.length-1-a},getPixelPrecision:Ch,getPercentWithPrecision:Oh,MAX_SAFE_INTEGER:9007199254740991,remRadian:function(e){var t=2*Math.PI;return(e%t+t)%t},isRadianAroundZero:function(e){return e>-1e-4&&e<Mh},parseDate:function(e){if(e instanceof Date)return e;if("string"==typeof e){var t=Th.exec(e);if(!t)return new Date(NaN);if(t[8]){var n=+t[4]||0;return"Z"!==t[8].toUpperCase()&&(n-=t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,+t[7]||0))}return new Date(+t[1],+(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,+t[7]||0)}return null==e?new Date(NaN):new Date(Math.round(e))},quantity:function(e){return Math.pow(10,Ih(e))},quantityExponent:Ih,nice:kh,quantile:Lh,reformIntervals:Eh,isNumeric:Nh};var Rh=Ge.normalizeCssArray,zh=/([&<>"'])/g,Bh={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Vh(e){return null==e?"":(e+"").replace(zh,(function(e,t){return Bh[t]}))}var Hh=["a","b","c","d","e","f","g"],Yh=function(e,t){return"{"+e+(null==t?"":t)+"}"};function Fh(e,t){return"0000".substr(0,t-(e+="").length)+e}var Gh=function(e,t,n){Ge.isArray(t)||(t=[t]);var i=t.length;if(!i)return"";for(var a=t[0].$vars||[],r=0;r<a.length;r++){var o=Hh[r];e=e.replace(Yh(o),Yh(o,0))}for(var s=0;s<i;s++)for(var l=0;l<a.length;l++){var u=t[s][a[l]];e=e.replace(Yh(Hh[l],s),n?Vh(u):u)}return e},Wh=function(e,t,n){return Ge.each(t,(function(t,i){e=e.replace("{"+i+"}",n?Vh(t):t)})),e},jh=function(e,t){var n=(e=Ge.isString(e)?{color:e,extraCssText:t}:e||{}).color,i=e.type,a=(t=e.extraCssText,e.renderMode||"html"),r=e.markerId||"X";return n?"html"===a?"subItem"===i?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Vh(n)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+Vh(n)+";"+(t||"")+'"></span>':{renderMode:a,content:"{marker"+r+"|}  ",style:{color:n}}:""},Uh=function(e,t,n){"week"!==e&&"month"!==e&&"quarter"!==e&&"half-year"!==e&&"year"!==e||(e="MM-dd\nyyyy");var i=Ph.parseDate(t),a=n?"UTC":"",r=i["get"+a+"FullYear"](),o=i["get"+a+"Month"]()+1,s=i["get"+a+"Date"](),l=i["get"+a+"Hours"](),u=i["get"+a+"Minutes"](),c=i["get"+a+"Seconds"](),h=i["get"+a+"Milliseconds"]();return e=e.replace("MM",Fh(o,2)).replace("M",o).replace("yyyy",r).replace("yy",r%100).replace("dd",Fh(s,2)).replace("d",s).replace("hh",Fh(l,2)).replace("h",l).replace("mm",Fh(u,2)).replace("m",u).replace("ss",Fh(c,2)).replace("s",c).replace("SSS",Fh(h,3))},Zh=function(e,t,n,i,a,r,o,s){return Za.getBoundingRect(e,t,n,i,a,s,r,o)},Xh={addCommas:function(e){return isNaN(e)?"-":(e=(e+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")},toCamelCase:function(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,(function(e,t){return t.toUpperCase()})),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e},normalizeCssArray:Rh,encodeHTML:Vh,formatTpl:Gh,formatTplSimple:Wh,getTooltipMarker:jh,formatTime:Uh,capitalFirst:function(e){return e?e.charAt(0).toUpperCase()+e.substr(1):e},truncateText:Za.truncateText,getTextBoundingRect:function(e){return Za.getBoundingRect(e.text,e.font,e.textAlign,e.textVerticalAlign,e.textPadding,e.textLineHeight,e.rich,e.truncate)},getTextRect:Zh,windowOpen:function(e,t){if("_blank"===t||"blank"===t){var n=window.open();n.opener=null,n.location=e}else window.open(e,t)}},qh=Ph.parsePercent,Kh=Ge.each,$h=["left","right","top","bottom","width","height"],Qh=[["width","left","right"],["height","top","bottom"]];function Jh(e,t,n,i,a){var r=0,o=0;null==i&&(i=1/0),null==a&&(a=1/0);var s=0;t.eachChild((function(l,u){var c,h,d=l.position,f=l.getBoundingRect(),p=t.childAt(u+1),g=p&&p.getBoundingRect();if("horizontal"===e){var m=f.width+(g?-g.x+f.x:0);(c=r+m)>i||l.newline?(r=0,c=m,o+=s+n,s=f.height):s=Math.max(s,f.height)}else{var v=f.height+(g?-g.y+f.y:0);(h=o+v)>a||l.newline?(r+=s+n,o=0,h=v,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=r,d[1]=o,"horizontal"===e?r=c+n:o=h+n)}))}var ed=Jh,td=Ge.curry(Jh,"vertical"),nd=Ge.curry(Jh,"horizontal");function id(e,t,n){n=Xh.normalizeCssArray(n||0);var i=t.width,a=t.height,r=qh(e.left,i),o=qh(e.top,a),s=qh(e.right,i),l=qh(e.bottom,a),u=qh(e.width,i),c=qh(e.height,a),h=n[2]+n[0],d=n[1]+n[3],f=e.aspect;switch(isNaN(u)&&(u=i-s-d-r),isNaN(c)&&(c=a-l-h-o),null!=f&&(isNaN(u)&&isNaN(c)&&(f>i/a?u=.8*i:c=.8*a),isNaN(u)&&(u=f*c),isNaN(c)&&(c=u/f)),isNaN(r)&&(r=i-s-u-d),isNaN(o)&&(o=a-l-c-h),e.left||e.right){case"center":r=i/2-u/2-n[3];break;case"right":r=i-u-d}switch(e.top||e.bottom){case"middle":case"center":o=a/2-c/2-n[0];break;case"bottom":o=a-c-h}r=r||0,o=o||0,isNaN(u)&&(u=i-d-r-(s||0)),isNaN(c)&&(c=a-h-o-(l||0));var p=new Pi(r+n[3],o+n[0],u,c);return p.margin=n,p}function ad(e,t){return t&&e&&Kh($h,(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})),e}var rd=function(e,t,n,i,a){var r=!a||!a.hv||a.hv[0],o=!a||!a.hv||a.hv[1],s=a&&a.boundingMode||"all";if(r||o){var l;if("raw"===s)l="group"===e.type?new Pi(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(l=e.getBoundingRect(),e.needLocalTransform()){var u=e.getLocalTransform();(l=l.clone()).applyTransform(u)}t=id(Ge.defaults({width:l.width,height:l.height},t),n,i);var c=e.position,h=r?t.x-l.x:0,d=o?t.y-l.y:0;e.attr("position","raw"===s?[h,d]:[c[0]+h,c[1]+d])}},od=function(e,t,n){!Ge.isObject(n)&&(n={});var i=n.ignoreSize;!Ge.isArray(i)&&(i=[i,i]);var a=o(Qh[0],0),r=o(Qh[1],1);function o(n,a){var r={},o=0,u={},c=0;if(Kh(n,(function(t){u[t]=e[t]})),Kh(n,(function(e){s(t,e)&&(r[e]=u[e]=t[e]),l(r,e)&&o++,l(u,e)&&c++})),i[a])return l(t,n[1])?u[n[2]]=null:l(t,n[2])&&(u[n[1]]=null),u;if(2!==c&&o){if(o>=2)return r;for(var h=0;h<n.length;h++){var d=n[h];if(!s(r,d)&&s(e,d)){r[d]=e[d];break}}return r}return u}function s(e,t){return e.hasOwnProperty(t)}function l(e,t){return null!=e[t]&&"auto"!==e[t]}function u(e,t,n){Kh(e,(function(e){t[e]=n[e]}))}u(Qh[0],e,a),u(Qh[1],e,r)},sd={LOCATION_PARAMS:$h,HV_NAMES:Qh,box:ed,vbox:td,hbox:nd,getAvailableSize:function(e,t,n){var i=t.width,a=t.height,r=qh(e.x,i),o=qh(e.y,a),s=qh(e.x2,i),l=qh(e.y2,a);return(isNaN(r)||isNaN(parseFloat(e.x)))&&(r=0),(isNaN(s)||isNaN(parseFloat(e.x2)))&&(s=i),(isNaN(o)||isNaN(parseFloat(e.y)))&&(o=0),(isNaN(l)||isNaN(parseFloat(e.y2)))&&(l=a),n=Xh.normalizeCssArray(n||0),{width:Math.max(s-r-n[1]-n[3],0),height:Math.max(l-o-n[0]-n[2],0)}},getLayoutRect:id,positionElement:rd,sizeCalculable:function(e,t){return null!=e[Qh[t][0]]||null!=e[Qh[t][1]]&&null!=e[Qh[t][2]]},mergeLayoutParam:od,getLayoutParams:function(e){return ad({},e)},copyLayoutParams:ad},ld={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")}}},ud=Zo.enableClassManagement,cd=Zo.parseClassType,hd=(0,Bo.makeInner)(),dd=xh.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(e,t,n,i){xh.call(this,e,t,n,i),this.uid=Sh.getUID("ec_cpt_model")},init:function(e,t,n,i){this.mergeDefaultAndTheme(e,n)},mergeDefaultAndTheme:function(e,t){var n=this.layoutMode,i=n?sd.getLayoutParams(e):{},a=t.getTheme();Ge.merge(e,a.get(this.mainType)),Ge.merge(e,this.getDefaultOption()),n&&sd.mergeLayoutParam(e,i,n)},mergeOption:function(e,t){Ge.merge(this.option,e,!0);var n=this.layoutMode;n&&sd.mergeLayoutParam(this.option,e,n)},optionUpdated:function(e,t){},getDefaultOption:function(){var e=hd(this);if(!e.defaultOption){for(var t=[],n=this.constructor;n;){var i=n.prototype.defaultOption;i&&t.push(i),n=n.superClass}for(var a={},r=t.length-1;r>=0;r--)a=Ge.merge(a,t[r],!0);e.defaultOption=a}return e.defaultOption},getReferringComponents:function(e){return this.ecModel.queryComponents({mainType:e,index:this.get(e+"Index",!0),id:this.get(e+"Id",!0)})}});ud(dd,{registerWhenExtend:!0}),Sh.enableSubTypeDefaulter(dd),Sh.enableTopologicalTravel(dd,(function(e){var t=[];Ge.each(dd.getClassesByMainType(e),(function(e){t=t.concat(e.prototype.dependencies||[])})),t=Ge.map(t,(function(e){return cd(e).main})),"dataset"!==e&&Ge.indexOf(t,"dataset")<=0&&t.unshift("dataset");return t})),Ge.mixin(dd,ld);var fd=dd,pd="";"undefined"!=typeof navigator&&(pd=navigator.platform||"");var gd={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:pd.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},md=Bo.makeInner,vd=Bo.normalizeToArray,yd=md();var _d={clearColorPalette:function(){yd(this).colorIdx=0,yd(this).colorNameMap={}},getColorFromPalette:function(e,t,n){var i=yd(t=t||this),a=i.colorIdx||0,r=i.colorNameMap=i.colorNameMap||{};if(r.hasOwnProperty(e))return r[e];var o=vd(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=n&&s?function(e,t){for(var n=e.length,i=0;i<n;i++)if(e[i].length>t)return e[i];return e[n-1]}(s,n):o;if((l=l||o)&&l.length){var u=l[a];return e&&(r[e]=u),i.colorIdx=(a+1)%l.length,u}}},xd=_d,bd={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"},wd=Ge.createHashMap,Sd=Ge.isTypedArray,Md=Zo.enableClassCheck,Td=bd.SOURCE_FORMAT_ORIGINAL,Id=bd.SERIES_LAYOUT_BY_COLUMN,Ad=bd.SOURCE_FORMAT_UNKNOWN,Dd=bd.SOURCE_FORMAT_TYPED_ARRAY,Cd=bd.SOURCE_FORMAT_KEYED_COLUMNS;function Od(e){this.fromDataset=e.fromDataset,this.data=e.data||(e.sourceFormat===Cd?{}:[]),this.sourceFormat=e.sourceFormat||Ad,this.seriesLayoutBy=e.seriesLayoutBy||Id,this.dimensionsDefine=e.dimensionsDefine,this.encodeDefine=e.encodeDefine&&wd(e.encodeDefine),this.startIndex=e.startIndex||0,this.dimensionsDetectCount=e.dimensionsDetectCount}Od.seriesDataToSource=function(e){return new Od({data:e,sourceFormat:Sd(e)?Dd:Td,fromDataset:!1})},Md(Od);var kd=Od,Ld=Bo.makeInner,Ed=Bo.getDataItemValue,Nd=Ge.createHashMap,Pd=Ge.each,Rd=Ge.map,zd=Ge.isArray,Bd=Ge.isString,Vd=Ge.isObject,Hd=Ge.isTypedArray,Yd=Ge.isArrayLike,Fd=Ge.extend,Gd=bd.SOURCE_FORMAT_ORIGINAL,Wd=bd.SOURCE_FORMAT_ARRAY_ROWS,jd=bd.SOURCE_FORMAT_OBJECT_ROWS,Ud=bd.SOURCE_FORMAT_KEYED_COLUMNS,Zd=bd.SOURCE_FORMAT_UNKNOWN,Xd=bd.SOURCE_FORMAT_TYPED_ARRAY,qd=bd.SERIES_LAYOUT_BY_ROW,Kd={Must:1,Might:2,Not:3},$d=Ld();function Qd(e){if(e){var t=Nd();return Rd(e,(function(e,n){if(null==(e=Fd({},Vd(e)?e:{name:e})).name)return e;e.name+="",null==e.displayName&&(e.displayName=e.name);var i=t.get(e.name);return i?e.name+="-"+i.count++:t.set(e.name,{count:1}),e}))}}function Jd(e,t,n,i){if(null==i&&(i=1/0),t===qd)for(var a=0;a<n.length&&a<i;a++)e(n[a]?n[a][0]:null,a);else{var r=n[0]||[];for(a=0;a<r.length&&a<i;a++)e(r[a],a)}}function ef(e){var t=e.option;if(!t.data)return e.ecModel.getComponent("dataset",t.datasetIndex||0)}function tf(e,t,n,i,a,r){var o,s,l;if(Hd(e))return Kd.Not;if(i){var u=i[r];Vd(u)?(s=u.name,l=u.type):Bd(u)&&(s=u)}if(null!=l)return"ordinal"===l?Kd.Must:Kd.Not;if(t===Wd)if(n===qd){for(var c=e[r],h=0;h<(c||[]).length&&h<5;h++)if(null!=(o=g(c[a+h])))return o}else for(h=0;h<e.length&&h<5;h++){var d=e[a+h];if(d&&null!=(o=g(d[r])))return o}else if(t===jd){if(!s)return Kd.Not;for(h=0;h<e.length&&h<5;h++){if((f=e[h])&&null!=(o=g(f[s])))return o}}else if(t===Ud){if(!s)return Kd.Not;if(!(c=e[s])||Hd(c))return Kd.Not;for(h=0;h<c.length&&h<5;h++)if(null!=(o=g(c[h])))return o}else if(t===Gd)for(h=0;h<e.length&&h<5;h++){var f=e[h],p=Ed(f);if(!zd(p))return Kd.Not;if(null!=(o=g(p[r])))return o}function g(e){var t=Bd(e);return null!=e&&isFinite(e)&&""!==e?t?Kd.Might:Kd.Not:t&&"-"!==e?Kd.Must:void 0}return Kd.Not}var nf=function(e){var t=e.option.source,n=Zd;if(Hd(t))n=Xd;else if(zd(t)){0===t.length&&(n=Wd);for(var i=0,a=t.length;i<a;i++){var r=t[i];if(null!=r){if(zd(r)){n=Wd;break}if(Vd(r)){n=jd;break}}}}else if(Vd(t)){for(var o in t)if(t.hasOwnProperty(o)&&Yd(t[o])){n=Ud;break}}else if(null!=t)throw new Error("Invalid data");$d(e).sourceFormat=n},af=function(e,t,n){var i={},a=ef(t);if(!a||!e)return i;var r,o,s=[],l=[],u=t.ecModel,c=$d(u).datasetMap,h=a.uid+"_"+n.seriesLayoutBy;e=e.slice(),Pd(e,(function(t,n){!Vd(t)&&(e[n]={name:t}),"ordinal"===t.type&&null==r&&(r=n,o=p(e[n])),i[t.name]=[]}));var d=c.get(h)||c.set(h,{categoryWayDim:o,valueWayDim:0});function f(e,t,n){for(var i=0;i<n;i++)e.push(t+i)}function p(e){var t=e.dimsDef;return t?t.length:1}return Pd(e,(function(e,t){var n=e.name,a=p(e);if(null==r){var o=d.valueWayDim;f(i[n],o,a),f(l,o,a),d.valueWayDim+=a}else if(r===t)f(i[n],0,a),f(s,0,a);else{o=d.categoryWayDim;f(i[n],o,a),f(l,o,a),d.categoryWayDim+=a}})),s.length&&(i.itemName=s),l.length&&(i.seriesName=l),i},rf=function(e,t,n){var i={};if(!ef(e))return i;var a,r=t.sourceFormat,o=t.dimensionsDefine;r!==jd&&r!==Ud||Pd(o,(function(e,t){"name"===(Vd(e)?e.name:e)&&(a=t)}));var s=function(){for(var e={},i={},s=[],l=0,u=Math.min(5,n);l<u;l++){var c=tf(t.data,r,t.seriesLayoutBy,o,t.startIndex,l);s.push(c);var h=c===Kd.Not;if(h&&null==e.v&&l!==a&&(e.v=l),(null==e.n||e.n===e.v||!h&&s[e.n]===Kd.Not)&&(e.n=l),d(e)&&s[e.n]!==Kd.Not)return e;h||(c===Kd.Might&&null==i.v&&l!==a&&(i.v=l),null!=i.n&&i.n!==i.v||(i.n=l))}function d(e){return null!=e.v&&null!=e.n}return d(e)?e:d(i)?i:null}();if(s){i.value=s.v;var l=null!=a?a:s.n;i.itemName=[l],i.seriesName=[l]}return i},of={BE_ORDINAL:Kd,detectSourceFormat:nf,getSource:function(e){return $d(e).source},resetSourceDefaulter:function(e){$d(e).datasetMap=Nd()},prepareSource:function(e){var t=e.option,n=t.data,i=Hd(n)?Xd:Gd,a=!1,r=t.seriesLayoutBy,o=t.sourceHeader,s=t.dimensions,l=ef(e);if(l){var u=l.option;n=u.source,i=$d(l).sourceFormat,a=!0,r=r||u.seriesLayoutBy,null==o&&(o=u.sourceHeader),s=s||u.dimensions}var c=function(e,t,n,i,a){if(!e)return{dimensionsDefine:Qd(a)};var r,o;if(t===Wd)"auto"===i||null==i?Jd((function(e){null!=e&&"-"!==e&&(Bd(e)?null==o&&(o=1):o=0)}),n,e,10):o=i?1:0,a||1!==o||(a=[],Jd((function(e,t){a[t]=null!=e?e:""}),n,e)),r=a?a.length:n===qd?e.length:e[0]?e[0].length:null;else if(t===jd)a||(a=function(e){var t,n=0;for(;n<e.length&&!(t=e[n++]););if(t){var i=[];return Pd(t,(function(e,t){i.push(t)})),i}}(e));else if(t===Ud)a||(a=[],Pd(e,(function(e,t){a.push(t)})));else if(t===Gd){var s=Ed(e[0]);r=zd(s)&&s.length||1}return{startIndex:o,dimensionsDefine:Qd(a),dimensionsDetectCount:r}}(n,i,r,o,s);$d(e).source=new kd({data:n,fromDataset:a,seriesLayoutBy:r,sourceFormat:i,dimensionsDefine:c.dimensionsDefine,startIndex:c.startIndex,dimensionsDetectCount:c.dimensionsDetectCount,encodeDefine:t.encode})},makeSeriesEncodeForAxisCoordSys:af,makeSeriesEncodeForNameBased:rf,guessOrdinal:function(e,t){return tf(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}},sf=Ge.each,lf=Ge.filter,uf=Ge.map,cf=Ge.isArray,hf=Ge.indexOf,df=Ge.isObject,ff=Ge.isString,pf=Ge.createHashMap,gf=Ge.assert,mf=Ge.clone,vf=Ge.merge,yf=Ge.extend,_f=Ge.mixin,xf=of.resetSourceDefaulter,bf="\0_ec_inner",wf=xh.extend({init:function(e,t,n,i){n=n||{},this.option=null,this._theme=new xh(n),this._optionManager=i},setOption:function(e,t){gf(!(bf in e),"please use chart.getOption()"),this._optionManager.setOption(e,t),this.resetOption(null)},resetOption:function(e){var t=!1,n=this._optionManager;if(!e||"recreate"===e){var i=n.mountOption("recreate"===e);this.option&&"recreate"!==e?(this.restoreData(),this.mergeOption(i)):Sf.call(this,i),t=!0}if("timeline"!==e&&"media"!==e||this.restoreData(),!e||"recreate"===e||"timeline"===e){var a=n.getTimelineOption(this);a&&(this.mergeOption(a),t=!0)}if(!e||"recreate"===e||"media"===e){var r=n.getMediaOption(this,this._api);r.length&&sf(r,(function(e){this.mergeOption(e,t=!0)}),this)}return t},mergeOption:function(e){var t=this.option,n=this._componentsMap,i=[];xf(this),sf(e,(function(e,n){null!=e&&(fd.hasClass(n)?n&&i.push(n):t[n]=null==t[n]?mf(e):vf(t[n],e,!0))})),fd.topologicalTravel(i,fd.getAllClassMainTypes(),(function(i,a){var r=Bo.normalizeToArray(e[i]),o=Bo.mappingToExists(n.get(i),r);Bo.makeIdAndName(o),sf(o,(function(e,t){var n=e.option;df(n)&&(e.keyInfo.mainType=i,e.keyInfo.subType=function(e,t,n){var i=t.type?t.type:n?n.subType:fd.determineSubType(e,t);return i}(i,n,e.exist))}));var s=function(e,t){cf(t)||(t=t?[t]:[]);var n={};return sf(t,(function(t){n[t]=(e.get(t)||[]).slice()})),n}(n,a);t[i]=[],n.set(i,[]),sf(o,(function(e,a){var r=e.exist,o=e.option;if(gf(df(o)||r,"Empty component definition"),o){var l=fd.getClass(i,e.keyInfo.subType,!0);if(r&&r.constructor===l)r.name=e.keyInfo.name,r.mergeOption(o,this),r.optionUpdated(o,!1);else{var u=yf({dependentModels:s,componentIndex:a},e.keyInfo);r=new l(o,this,this,u),yf(r,u),r.init(o,this,this,u),r.optionUpdated(null,!0)}}else r.mergeOption({},this),r.optionUpdated({},!1);n.get(i)[a]=r,t[i][a]=r.option}),this),"series"===i&&Mf(this,n.get("series"))}),this),this._seriesIndicesMap=pf(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var e=mf(this.option);return sf(e,(function(t,n){if(fd.hasClass(n)){for(var i=(t=Bo.normalizeToArray(t)).length-1;i>=0;i--)Bo.isIdInner(t[i])&&t.splice(i,1);e[n]=t}})),delete e[bf],e},getTheme:function(){return this._theme},getComponent:function(e,t){var n=this._componentsMap.get(e);if(n)return n[t||0]},queryComponents:function(e){var t=e.mainType;if(!t)return[];var n,i=e.index,a=e.id,r=e.name,o=this._componentsMap.get(t);if(!o||!o.length)return[];if(null!=i)cf(i)||(i=[i]),n=lf(uf(i,(function(e){return o[e]})),(function(e){return!!e}));else if(null!=a){var s=cf(a);n=lf(o,(function(e){return s&&hf(a,e.id)>=0||!s&&e.id===a}))}else if(null!=r){var l=cf(r);n=lf(o,(function(e){return l&&hf(r,e.name)>=0||!l&&e.name===r}))}else n=o.slice();return Tf(n,e)},findComponents:function(e){var t,n,i,a,r,o=e.query,s=e.mainType,l=(n=s+"Index",i=s+"Id",a=s+"Name",!(t=o)||null==t[n]&&null==t[i]&&null==t[a]?null:{mainType:s,index:t[n],id:t[i],name:t[a]}),u=l?this.queryComponents(l):this._componentsMap.get(s);return r=Tf(u,e),e.filter?lf(r,e.filter):r},eachComponent:function(e,t,n){var i=this._componentsMap;if("function"==typeof e)n=t,t=e,i.each((function(e,i){sf(e,(function(e,a){t.call(n,i,e,a)}))}));else if(ff(e))sf(i.get(e),t,n);else if(df(e)){var a=this.findComponents(e);sf(a,t,n)}},getSeriesByName:function(e){var t=this._componentsMap.get("series");return lf(t,(function(t){return t.name===e}))},getSeriesByIndex:function(e){return this._componentsMap.get("series")[e]},getSeriesByType:function(e){var t=this._componentsMap.get("series");return lf(t,(function(t){return t.subType===e}))},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(e,t){sf(this._seriesIndices,(function(n){var i=this._componentsMap.get("series")[n];e.call(t,i,n)}),this)},eachRawSeries:function(e,t){sf(this._componentsMap.get("series"),e,t)},eachSeriesByType:function(e,t,n){sf(this._seriesIndices,(function(i){var a=this._componentsMap.get("series")[i];a.subType===e&&t.call(n,a,i)}),this)},eachRawSeriesByType:function(e,t,n){return sf(this.getSeriesByType(e),t,n)},isSeriesFiltered:function(e){return null==this._seriesIndicesMap.get(e.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(e,t){Mf(this,lf(this._componentsMap.get("series"),e,t))},restoreData:function(e){var t=this._componentsMap;Mf(this,t.get("series"));var n=[];t.each((function(e,t){n.push(t)})),fd.topologicalTravel(n,fd.getAllClassMainTypes(),(function(n,i){sf(t.get(n),(function(t){("series"!==n||!function(e,t){if(t){var n=t.seiresIndex,i=t.seriesId,a=t.seriesName;return null!=n&&e.componentIndex!==n||null!=i&&e.id!==i||null!=a&&e.name!==a}}(t,e))&&t.restoreData()}))}))}});function Sf(e){this.option={},this.option[bf]=1,this._componentsMap=pf({series:[]}),this._seriesIndices,this._seriesIndicesMap,function(e,t){var n=e.color&&!e.colorLayer;sf(t,(function(t,i){"colorLayer"===i&&n||fd.hasClass(i)||("object"==typeof t?e[i]=e[i]?vf(e[i],t,!1):mf(t):null==e[i]&&(e[i]=t))}))}(e,this._theme.option),vf(e,gd,!1),this.mergeOption(e)}function Mf(e,t){e._seriesIndicesMap=pf(e._seriesIndices=uf(t,(function(e){return e.componentIndex}))||[])}function Tf(e,t){return t.hasOwnProperty("subType")?lf(e,(function(e){return e.subType===t.subType})):e}_f(wf,xd);var If=wf,Af=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];var Df=function(e){Ge.each(Af,(function(t){this[t]=Ge.bind(e[t],e)}),this)},Cf={};function Of(){this._coordinateSystems=[]}Of.prototype={constructor:Of,create:function(e,t){var n=[];Ge.each(Cf,(function(i,a){var r=i.create(e,t);n=n.concat(r||[])})),this._coordinateSystems=n},update:function(e,t){Ge.each(this._coordinateSystems,(function(n){n.update&&n.update(e,t)}))},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},Of.register=function(e,t){Cf[e]=t},Of.get=function(e){return Cf[e]};var kf=Of,Lf=Ge.each,Ef=Ge.clone,Nf=Ge.map,Pf=Ge.merge,Rf=/^(min|max)?(.+)$/;function zf(e){this._api=e,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function Bf(e,t,n){var i,a,r=[],o=[],s=e.timeline;if(e.baseOption&&(a=e.baseOption),(s||e.options)&&(a=a||{},r=(e.options||[]).slice()),e.media){a=a||{};var l=e.media;Lf(l,(function(e){e&&e.option&&(e.query?o.push(e):i||(i=e))}))}return a||(a=e),a.timeline||(a.timeline=s),Lf([a].concat(r).concat(Ge.map(o,(function(e){return e.option}))),(function(e){Lf(t,(function(t){t(e,n)}))})),{baseOption:a,timelineOptions:r,mediaDefault:i,mediaList:o}}function Vf(e,t,n){var i={width:t,height:n,aspectratio:t/n},a=!0;return Ge.each(e,(function(e,t){var n=t.match(Rf);if(n&&n[1]&&n[2]){var r=n[1],o=n[2].toLowerCase();(function(e,t,n){return"min"===n?e>=t:"max"===n?e<=t:e===t})(i[o],e,r)||(a=!1)}})),a}zf.prototype={constructor:zf,setOption:function(e,t){e&&Ge.each(Bo.normalizeToArray(e.series),(function(e){e&&e.data&&Ge.isTypedArray(e.data)&&Ge.setAsPrimitive(e.data)})),e=Ef(e);var n,i,a=this._optionBackup,r=Bf.call(this,e,t,!a);this._newBaseOption=r.baseOption,a?(n=a.baseOption,i=r.baseOption,Lf(i=i||{},(function(e,t){if(null!=e){var i=n[t];if(fd.hasClass(t)){e=Bo.normalizeToArray(e),i=Bo.normalizeToArray(i);var a=Bo.mappingToExists(i,e);n[t]=Nf(a,(function(e){return e.option&&e.exist?Pf(e.exist,e.option,!0):e.exist||e.option}))}else n[t]=Pf(i,e,!0)}})),r.timelineOptions.length&&(a.timelineOptions=r.timelineOptions),r.mediaList.length&&(a.mediaList=r.mediaList),r.mediaDefault&&(a.mediaDefault=r.mediaDefault)):this._optionBackup=r},mountOption:function(e){var t=this._optionBackup;return this._timelineOptions=Nf(t.timelineOptions,Ef),this._mediaList=Nf(t.mediaList,Ef),this._mediaDefault=Ef(t.mediaDefault),this._currentMediaIndices=[],Ef(e?t.baseOption:this._newBaseOption)},getTimelineOption:function(e){var t,n=this._timelineOptions;if(n.length){var i=e.getComponent("timeline");i&&(t=Ef(n[i.getCurrentIndex()],!0))}return t},getMediaOption:function(e){var t,n,i=this._api.getWidth(),a=this._api.getHeight(),r=this._mediaList,o=this._mediaDefault,s=[],l=[];if(!r.length&&!o)return l;for(var u=0,c=r.length;u<c;u++)Vf(r[u].query,i,a)&&s.push(u);return!s.length&&o&&(s=[-1]),s.length&&(t=s,n=this._currentMediaIndices,t.join(",")!==n.join(","))&&(l=Nf(s,(function(e){return Ef(-1===e?o.option:r[e].option)}))),this._currentMediaIndices=s,l}};var Hf=zf,Yf=Ge.each,Ff=Ge.isObject,Gf=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Wf(e){var t=e&&e.itemStyle;if(t)for(var n=0,i=Gf.length;n<i;n++){var a=Gf[n],r=t.normal,o=t.emphasis;r&&r[a]&&(e[a]=e[a]||{},e[a].normal?Ge.merge(e[a].normal,r[a]):e[a].normal=r[a],r[a]=null),o&&o[a]&&(e[a]=e[a]||{},e[a].emphasis?Ge.merge(e[a].emphasis,o[a]):e[a].emphasis=o[a],o[a]=null)}}function jf(e,t,n){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var i=e[t].normal,a=e[t].emphasis;i&&(n?(e[t].normal=e[t].emphasis=null,Ge.defaults(e[t],i)):e[t]=i),a&&(e.emphasis=e.emphasis||{},e.emphasis[t]=a)}}function Uf(e){jf(e,"itemStyle"),jf(e,"lineStyle"),jf(e,"areaStyle"),jf(e,"label"),jf(e,"labelLine"),jf(e,"upperLabel"),jf(e,"edgeLabel")}function Zf(e,t){var n=Ff(e)&&e[t],i=Ff(n)&&n.textStyle;if(i)for(var a=0,r=Bo.TEXT_STYLE_OPTIONS.length;a<r;a++){t=Bo.TEXT_STYLE_OPTIONS[a];i.hasOwnProperty(t)&&(n[t]=i[t])}}function Xf(e){e&&(Uf(e),Zf(e,"label"),e.emphasis&&Zf(e.emphasis,"label"))}function qf(e){return Ge.isArray(e)?e:e?[e]:[]}function Kf(e){return(Ge.isArray(e)?e[0]:e)||{}}var $f=function(e,t){Yf(qf(e.series),(function(e){Ff(e)&&function(e){if(Ff(e)){Wf(e),Uf(e),Zf(e,"label"),Zf(e,"upperLabel"),Zf(e,"edgeLabel"),e.emphasis&&(Zf(e.emphasis,"label"),Zf(e.emphasis,"upperLabel"),Zf(e.emphasis,"edgeLabel")),(n=e.markPoint)&&(Wf(n),Xf(n)),(i=e.markLine)&&(Wf(i),Xf(i));var t=e.markArea;t&&Xf(t);var n,i,a=e.data;if("graph"===e.type){a=a||e.nodes;var r=e.links||e.edges;if(r&&!Ge.isTypedArray(r))for(var o=0;o<r.length;o++)Xf(r[o]);Ge.each(e.categories,(function(e){Uf(e)}))}if(a&&!Ge.isTypedArray(a))for(o=0;o<a.length;o++)Xf(a[o]);if((n=e.markPoint)&&n.data){var s=n.data;for(o=0;o<s.length;o++)Xf(s[o])}if((i=e.markLine)&&i.data){var l=i.data;for(o=0;o<l.length;o++)Ge.isArray(l[o])?(Xf(l[o][0]),Xf(l[o][1])):Xf(l[o])}"gauge"===e.type?(Zf(e,"axisLabel"),Zf(e,"title"),Zf(e,"detail")):"treemap"===e.type?(jf(e.breadcrumb,"itemStyle"),Ge.each(e.levels,(function(e){Uf(e)}))):"tree"===e.type&&Uf(e.leaves)}}(e)}));var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),Yf(n,(function(t){Yf(qf(e[t]),(function(e){e&&(Zf(e,"axisLabel"),Zf(e.axisPointer,"label"))}))})),Yf(qf(e.parallel),(function(e){var t=e&&e.parallelAxisDefault;Zf(t,"axisLabel"),Zf(t&&t.axisPointer,"label")})),Yf(qf(e.calendar),(function(e){jf(e,"itemStyle"),Zf(e,"dayLabel"),Zf(e,"monthLabel"),Zf(e,"yearLabel")})),Yf(qf(e.radar),(function(e){Zf(e,"name")})),Yf(qf(e.geo),(function(e){Ff(e)&&(Xf(e),Yf(qf(e.regions),(function(e){Xf(e)})))})),Yf(qf(e.timeline),(function(e){Xf(e),jf(e,"label"),jf(e,"itemStyle"),jf(e,"controlStyle",!0);var t=e.data;Ge.isArray(t)&&Ge.each(t,(function(e){Ge.isObject(e)&&(jf(e,"label"),jf(e,"itemStyle"))}))})),Yf(qf(e.toolbox),(function(e){jf(e,"iconStyle"),Yf(e.feature,(function(e){jf(e,"iconStyle")}))})),Zf(Kf(e.axisPointer),"label"),Zf(Kf(e.tooltip).axisPointer,"label")},Qf=Ge.each,Jf=Ge.isArray,ep=Ge.isObject,tp=Bo.normalizeToArray;function np(e){Qf(ip,(function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])}))}var ip=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],ap=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"];var rp=function(e,t){$f(e,t),e.series=tp(e.series),Qf(e.series,(function(e){if(ep(e)){var t=e.type;if("line"===t)null!=e.clipOverflow&&(e.clip=e.clipOverflow);else if("pie"===t||"gauge"===t)null!=e.clockWise&&(e.clockwise=e.clockWise);else if("gauge"===t){var n=function(e,t){t=t.split(",");for(var n=e,i=0;i<t.length&&null!=(n=n&&n[t[i]]);i++);return n}(e,"pointer.color");null!=n&&function(e,t,n,i){t=t.split(",");for(var a,r=e,o=0;o<t.length-1;o++)null==r[a=t[o]]&&(r[a]={}),r=r[a];(i||null==r[t[o]])&&(r[t[o]]=n)}(e,"itemStyle.color",n)}np(e)}})),e.dataRange&&(e.visualMap=e.dataRange),Qf(ap,(function(t){var n=e[t];n&&(Jf(n)||(n=[n]),Qf(n,(function(e){np(e)})))}))},op=Ge.createHashMap,sp=Ge.each;function lp(e){sp(e,(function(t,n){var i=[],a=[NaN,NaN],r=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,l=o.map(r,(function(r,l,u){var c,h,d=o.get(t.stackedDimension,u);if(isNaN(d))return a;s?h=o.getRawIndex(u):c=o.get(t.stackedByDimension,u);for(var f=NaN,p=n-1;p>=0;p--){var g=e[p];if(s||(h=g.data.rawIndexOf(g.stackedByDimension,c)),h>=0){var m=g.data.getByRawIndex(g.stackResultDimension,h);if(d>=0&&m>0||d<=0&&m<0){d+=m,f=m;break}}}return i[0]=d,i[1]=f,i}));o.hostModel.setData(l),t.data=l}))}var up=function(e){var t=op();e.eachSeries((function(e){var n=e.get("stack");if(n){var i=t.get(n)||t.set(n,[]),a=e.getData(),r={stackResultDimension:a.getCalculationInfo("stackResultDimension"),stackedOverDimension:a.getCalculationInfo("stackedOverDimension"),stackedDimension:a.getCalculationInfo("stackedDimension"),stackedByDimension:a.getCalculationInfo("stackedByDimension"),isStackedByIndex:a.getCalculationInfo("isStackedByIndex"),data:a,seriesModel:e};if(!r.stackedDimension||!r.isStackedByIndex&&!r.stackedByDimension)return;i.length&&a.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(r)}})),t.each(lp)},cp=Ge.extend,hp=Ge.each,dp=Ge.isObject,fp=Bo.getDataItemValue,pp=Bo.isDataItemOption,gp=Ph.parseDate,mp=bd.SOURCE_FORMAT_TYPED_ARRAY,vp=bd.SOURCE_FORMAT_ARRAY_ROWS,yp=bd.SOURCE_FORMAT_ORIGINAL,_p=bd.SOURCE_FORMAT_OBJECT_ROWS;function xp(e,t){kd.isInstance(e)||(e=kd.seriesDataToSource(e)),this._source=e;var n=this._data=e.data,i=e.sourceFormat;i===mp&&(this._offset=0,this._dimSize=t,this._data=n);var a=wp[i===vp?i+"_"+e.seriesLayoutBy:i];cp(this,a)}var bp=xp.prototype;bp.pure=!1,bp.persistent=!0,bp.getSource=function(){return this._source};var wp={arrayRows_column:{pure:!0,count:function(){return Math.max(0,this._data.length-this._source.startIndex)},getItem:function(e){return this._data[e+this._source.startIndex]},appendData:Tp},arrayRows_row:{pure:!0,count:function(){var e=this._data[0];return e?Math.max(0,e.length-this._source.startIndex):0},getItem:function(e){e+=this._source.startIndex;for(var t=[],n=this._data,i=0;i<n.length;i++){var a=n[i];t.push(a?a[e]:null)}return t},appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},objectRows:{pure:!0,count:Sp,getItem:Mp,appendData:Tp},keyedColumns:{pure:!0,count:function(){var e=this._source.dimensionsDefine[0].name,t=this._data[e];return t?t.length:0},getItem:function(e){for(var t=[],n=this._source.dimensionsDefine,i=0;i<n.length;i++){var a=this._data[n[i].name];t.push(a?a[e]:null)}return t},appendData:function(e){var t=this._data;hp(e,(function(e,n){for(var i=t[n]||(t[n]=[]),a=0;a<(e||[]).length;a++)i.push(e[a])}))}},original:{count:Sp,getItem:Mp,appendData:Tp},typedArray:{persistent:!1,pure:!0,count:function(){return this._data?this._data.length/this._dimSize:0},getItem:function(e,t){e-=this._offset,t=t||[];for(var n=this._dimSize*e,i=0;i<this._dimSize;i++)t[i]=this._data[n+i];return t},appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}}};function Sp(){return this._data.length}function Mp(e){return this._data[e]}function Tp(e){for(var t=0;t<e.length;t++)this._data.push(e[t])}var Ip={arrayRows:Ap,objectRows:function(e,t,n,i){return null!=n?e[i]:e},keyedColumns:Ap,original:function(e,t,n,i){var a=fp(e);return null!=n&&a instanceof Array?a[n]:a},typedArray:Ap};function Ap(e,t,n,i){return null!=n?e[n]:e}function Dp(e,t,n,i){return Cp(e[i],this._dimensionInfos[t])}function Cp(e,t){var n=t&&t.type;if("ordinal"===n){var i=t&&t.ordinalMeta;return i?i.parseAndCollect(e):e}return"time"===n&&"number"!=typeof e&&null!=e&&"-"!==e&&(e=+gp(e)),null==e||""===e?NaN:+e}var Op=function(e,t,n){if(e){var i=e.getProvider().getSource().sourceFormat;if(i===yp||i===_p){var a=e.getRawDataItem(t);return i!==yp||dp(a)||(a=null),a?a[n]:void 0}}},kp={DefaultDataProvider:xp,defaultDimValueGetters:{arrayRows:Dp,objectRows:function(e,t,n,i){return Cp(e[t],this._dimensionInfos[t])},keyedColumns:Dp,original:function(e,t,n,i){var a=e&&(null==e.value?e:e.value);return!this._rawData.pure&&pp(e)&&(this.hasItemOption=!0),Cp(a instanceof Array?a[i]:a,this._dimensionInfos[t])},typedArray:function(e,t,n,i){return e[i]}},retrieveRawValue:function(e,t,n){if(e){var i=e.getRawDataItem(t);if(null!=i){var a,r,o=e.getProvider().getSource().sourceFormat,s=e.getDimensionInfo(n);return s&&(a=s.name,r=s.index),Ip[o](i,t,r,a)}}},retrieveRawAttr:Op},Lp=kp.retrieveRawValue,Ep=Xh.getTooltipMarker,Np=Xh.formatTpl,Pp=Bo.getTooltipRenderMode,Rp=/\{@(.+?)\}/g,zp={getDataParams:function(e,t){var n=this.getData(t),i=this.getRawValue(e,t),a=n.getRawIndex(e),r=n.getName(e),o=n.getRawDataItem(e),s=n.getItemVisual(e,"color"),l=n.getItemVisual(e,"borderColor"),u=this.ecModel.getComponent("tooltip"),c=u&&u.get("renderMode"),h=Pp(c),d=this.mainType,f="series"===d,p=n.userOutput;return{componentType:d,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:f?this.subType:null,seriesIndex:this.seriesIndex,seriesId:f?this.id:null,seriesName:f?this.name:null,name:r,dataIndex:a,data:o,dataType:t,value:i,color:s,borderColor:l,dimensionNames:p?p.dimensionNames:null,encode:p?p.encode:null,marker:Ep({color:s,renderMode:h}),$vars:["seriesName","name","value"]}},getFormattedLabel:function(e,t,n,i,a){t=t||"normal";var r=this.getData(n),o=r.getItemModel(e),s=this.getDataParams(e,n);null!=i&&s.value instanceof Array&&(s.value=s.value[i]);var l=o.get("normal"===t?[a||"label","formatter"]:[t,a||"label","formatter"]);return"function"==typeof l?(s.status=t,s.dimensionIndex=i,l(s)):"string"==typeof l?Np(l,s).replace(Rp,(function(t,n){var i=n.length;return"["===n.charAt(0)&&"]"===n.charAt(i-1)&&(n=+n.slice(1,i-1)),Lp(r,e,n)})):void 0},getRawValue:function(e,t){return Lp(this.getData(t),e)},formatTooltip:function(){}},Bp=zp,Vp=Ge.isArray;function Hp(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0,this.context}var Yp=Hp.prototype;Yp.perform=function(e){var t,n=this._upstream,i=e&&e.skip;if(this._dirty&&n){var a=this.context;a.data=a.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!i&&(t=this._plan(this.context));var r,o=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;function c(e){return!(e>=1)&&(e=1),e}o===l&&s===u||(t="reset"),(this._dirty||"reset"===t)&&(this._dirty=!1,r=function(e,t){var n,i;e._dueIndex=e._outputDueEnd=e._dueEnd=0,e._settedOutputEnd=null,!t&&e._reset&&((n=e._reset(e.context))&&n.progress&&(i=n.forceFirstProgress,n=n.progress),Vp(n)&&!n.length&&(n=null));e._progress=n,e._modBy=e._modDataCount=null;var a=e._downstream;return a&&a.dirty(),i}(this,i)),this._modBy=l,this._modDataCount=u;var h=e&&e.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,f=Math.min(null!=h?this._dueIndex+h:1/0,this._dueEnd);if(!i&&(r||d<f)){var p=this._progress;if(Vp(p))for(var g=0;g<p.length;g++)Gp(this,p[g],d,f,l,u);else Gp(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 Fp=function(){var e,t,n,i,a,r={reset:function(l,u,c,h){t=l,e=u,n=c,i=h,a=Math.ceil(i/n),r.next=n>1&&i>0?s:o}};return r;function o(){return t<e?t++:null}function s(){var r=t%a*n+Math.ceil(t/a),o=t>=e?null:r<i?r:t;return t++,o}}();function Gp(e,t,n,i,a,r){Fp.reset(n,i,a,r),e._callingProgress=t,e._callingProgress({start:n,end:i,count:i-n,next:Fp.next},e.context)}Yp.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},Yp.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},Yp.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},Yp.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},Yp.getUpstream=function(){return this._upstream},Yp.getDownstream=function(){return this._downstream},Yp.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e};var Wp={createTask:function(e){return new Hp(e)}},jp=Xh.formatTime,Up=Xh.encodeHTML,Zp=Xh.addCommas,Xp=Xh.getTooltipMarker,qp=sd.getLayoutParams,Kp=sd.mergeLayoutParam,$p=Wp.createTask,Qp=of.prepareSource,Jp=of.getSource,eg=kp.retrieveRawValue,tg=Bo.makeInner(),ng=fd.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendVisualProvider:null,visualColorAccessPath:"itemStyle.color",visualBorderColorAccessPath:"itemStyle.borderColor",layoutMode:null,init:function(e,t,n,i){this.seriesIndex=this.componentIndex,this.dataTask=$p({count:ag,reset:rg}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),Qp(this);var a=this.getInitialData(e,n);sg(a,this),this.dataTask.context.data=a,tg(this).dataBeforeProcessed=a,ig(this)},mergeDefaultAndTheme:function(e,t){var n=this.layoutMode,i=n?qp(e):{},a=this.subType;fd.hasClass(a)&&(a+="Series"),Ge.merge(e,t.getTheme().get(this.subType)),Ge.merge(e,this.getDefaultOption()),Bo.defaultEmphasis(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&Kp(e,i,n)},mergeOption:function(e,t){e=Ge.merge(this.option,e,!0),this.fillDataTextStyle(e.data);var n=this.layoutMode;n&&Kp(this.option,e,n),Qp(this);var i=this.getInitialData(e,t);sg(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,tg(this).dataBeforeProcessed=i,ig(this)},fillDataTextStyle:function(e){if(e&&!Ge.isTypedArray(e))for(var t=["show"],n=0;n<e.length;n++)e[n]&&e[n].label&&Bo.defaultEmphasis(e[n],"label",t)},getInitialData:function(){},appendData:function(e){this.getRawData().appendData(e.data)},getData:function(e){var t=ug(this);if(t){var n=t.context.data;return null==e?n:n.getLinkedData(e)}return tg(this).data},setData:function(e){var t=ug(this);if(t){var n=t.context;n.data!==e&&t.modifyOutputEnd&&t.setOutputEnd(e.count()),n.outputData=e,t!==this.dataTask&&(n.data=e)}tg(this).data=e},getSource:function(){return Jp(this)},getRawData:function(){return tg(this).dataBeforeProcessed},getBaseAxis:function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},formatTooltip:function(e,t,n,i){var a=this,r="html"===(i=i||"html")?"<br/>":"\n",o="richText"===i,s={},l=0;function u(e){return{renderMode:i,content:Up(Zp(e)),style:s}}var c=this.getData(),h=c.mapDimension("defaultedTooltip",!0),d=h.length,f=this.getRawValue(e),p=Ge.isArray(f),g=c.getItemVisual(e,"color");Ge.isObject(g)&&g.colorStops&&(g=(g.colorStops[0]||{}).color),g=g||"transparent";var m=d>1||p&&!d?function(n){var r=Ge.reduce(n,(function(e,t,n){var i=c.getDimensionInfo(n);return e|(i&&!1!==i.tooltip&&null!=i.displayName)}),0),u=[];function d(e,n){var h=c.getDimensionInfo(n);if(h&&!1!==h.otherDims.tooltip){var d=h.type,f="sub"+a.seriesIndex+"at"+l,p=Xp({color:g,type:"subItem",renderMode:i,markerId:f}),m="string"==typeof p?p:p.content,v=(r?m+Up(h.displayName||"-")+": ":"")+Up("ordinal"===d?e+"":"time"===d?t?"":jp("yyyy/MM/dd hh:mm:ss",e):Zp(e));v&&u.push(v),o&&(s[f]=g,++l)}}h.length?Ge.each(h,(function(t){d(eg(c,e,t),t)})):Ge.each(n,d);var f=r?o?"\n":"<br/>":"",p=f+u.join(f||", ");return{renderMode:i,content:p,style:s}}(f):u(d?eg(c,e,h[0]):p?f[0]:f),v=m.content,y=a.seriesIndex+"at"+l,_=Xp({color:g,type:"item",renderMode:i,markerId:y});s[y]=g,++l;var x=c.getName(e),b=this.name;Bo.isNameSpecified(this)||(b=""),b=b?Up(b)+(t?": ":r):"";var w="string"==typeof _?_:_.content;return{html:t?w+b+v:b+w+(x?Up(x)+": "+v:v),markers:s}},isAnimationEnabled:function(){if(oe.node)return!1;var e=this.getShallow("animation");return e&&this.getData().count()>this.getShallow("animationThreshold")&&(e=!1),e},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(e,t,n){var i=this.ecModel,a=xd.getColorFromPalette.call(this,e,t,n);return a||(a=i.getColorFromPalette(e,t,n)),a},coordDimToDataDim:function(e){return this.getRawData().mapDimension(e,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});function ig(e){var t=e.name;Bo.isNameSpecified(e)||(e.name=function(e){var t=e.getRawData(),n=t.mapDimension("seriesName",!0),i=[];return Ge.each(n,(function(e){var n=t.getDimensionInfo(e);n.displayName&&i.push(n.displayName)})),i.join(" ")}(e)||t)}function ag(e){return e.model.getRawData().count()}function rg(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),og}function og(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function sg(e,t){Ge.each(e.CHANGABLE_METHODS,(function(n){e.wrapMethod(n,Ge.curry(lg,t))}))}function lg(e){var t=ug(e);t&&t.setOutputEnd(this.count())}function ug(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var i=n.currentTask;if(i){var a=i.agentStubMap;a&&(i=a.get(e.uid))}return i}}Ge.mixin(ng,Bp),Ge.mixin(ng,xd);var cg=ng,hg=function(){this.group=new zi,this.uid=Sh.getUID("viewComponent")},dg=hg.prototype={constructor:hg,init:function(e,t){},render:function(e,t,n,i){},dispose:function(){},filterForExposedEvent:null};dg.updateView=dg.updateLayout=dg.updateVisual=function(e,t,n,i){},Zo.enableClassExtend(hg),Zo.enableClassManagement(hg,{registerWhenExtend:!0});var fg=hg,pg=Bo.makeInner;var gg=function(){var e=pg();return function(t){var n=e(t),i=t.pipelineContext,a=n.large,r=n.progressiveRender,o=n.large=i&&i.large,s=n.progressiveRender=i&&i.progressiveRender;return!!(a^o||r^s)&&"reset"}},mg=Ge.each,vg=Wp.createTask,yg=Bo.makeInner(),_g=gg();function xg(){this.group=new zi,this.uid=Sh.getUID("viewChart"),this.renderTask=vg({plan:Mg,reset:Tg}),this.renderTask.context={view:this}}xg.prototype={type:"chart",init:function(e,t){},render:function(e,t,n,i){},highlight:function(e,t,n,i){Sg(e.getData(),i,"emphasis")},downplay:function(e,t,n,i){Sg(e.getData(),i,"normal")},remove:function(e,t){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var bg=xg.prototype;function wg(e,t,n){if(e&&(e.trigger(t,n),e.isGroup&&!rh.isHighDownDispatcher(e)))for(var i=0,a=e.childCount();i<a;i++)wg(e.childAt(i),t,n)}function Sg(e,t,n){var i=Bo.queryDataIndex(e,t),a=t&&null!=t.highlightKey?rh.getHighlightDigit(t.highlightKey):null;null!=i?mg(Bo.normalizeToArray(i),(function(t){wg(e.getItemGraphicEl(t),n,a)})):e.eachItemGraphicEl((function(e){wg(e,n,a)}))}function Mg(e){return _g(e.model)}function Tg(e){var t=e.model,n=e.ecModel,i=e.api,a=e.payload,r=t.pipelineContext.progressiveRender,o=e.view,s=a&&yg(a).updateMethod,l=r?"incrementalPrepareRender":s&&o[s]?s:"render";return"render"!==l&&o[l](t,n,i,a),Ig[l]}bg.updateView=bg.updateLayout=bg.updateVisual=function(e,t,n,i){this.render(e,t,n,i)},Zo.enableClassExtend(xg,["dispose"]),Zo.enableClassManagement(xg,{registerWhenExtend:!0}),xg.markUpdateMethod=function(e,t){yg(e).updateMethod=t};var Ig={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},Ag=xg,Dg="\0__throttleOriginMethod",Cg="\0__throttleRate",Og="\0__throttleType";function kg(e,t,n){var i,a,r,o,s,l=0,u=0,c=null;function h(){u=(new Date).getTime(),c=null,e.apply(r,o||[])}t=t||0;var d=function(){i=(new Date).getTime(),r=this,o=arguments;var e=s||t,d=s||n;s=null,a=i-(d?l:u)-e,clearTimeout(c),d?c=setTimeout(h,e):a>=0?h():c=setTimeout(h,-a),l=i};return d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(e){s=e},d}var Lg={throttle:kg,createOrUpdate:function(e,t,n,i){var a=e[t];if(a){var r=a[Dg]||a,o=a[Og];if(a[Cg]!==n||o!==i){if(null==n||!i)return e[t]=r;(a=e[t]=kg(r,n,"debounce"===i))[Dg]=r,a[Og]=i,a[Cg]=n}return a}},clear:function(e,t){var n=e[t];n&&n[Dg]&&(e[t]=n[Dg])}},Eg=Ge.isFunction,Ng={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),i=(e.visualColorAccessPath||"itemStyle.color").split("."),a=e.get(i),r=!Eg(a)||a instanceof Vu?null:a;a&&!r||(a=e.getColorFromPalette(e.name,null,t.getSeriesCount())),n.setVisual("color",a);var o=(e.visualBorderColorAccessPath||"itemStyle.borderColor").split("."),s=e.get(o);if(n.setVisual("borderColor",s),!t.isSeriesFiltered(e)){r&&n.each((function(t){n.setItemVisual(t,"color",r(e.getDataParams(t)))}));return{dataEach:n.hasItemOption?function(e,t){var n=e.getItemModel(t),a=n.get(i,!0),r=n.get(o,!0);null!=a&&e.setItemVisual(t,"color",a),null!=r&&e.setItemVisual(t,"borderColor",r)}:null}}}},Pg=Ng,Rg={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:""}}}},zg=kp.retrieveRawValue;var Bg=function(e,t){var n=t.getModel("aria");if(n.get("show"))if(n.get("description"))e.setAttribute("aria-label",n.get("description"));else{var i=0;t.eachSeries((function(e,t){++i}),this);var a,r=n.get("data.maxCount")||10,o=n.get("series.maxCount")||10,s=Math.min(i,o);if(!(i<1)){var l=function(){var e=t.getModel("title").option;e&&e.length&&(e=e[0]);return e&&e.text}();a=l?c(h("general.withTitle"),{title:l}):h("general.withoutTitle");var u=[];a+=c(h(i>1?"series.multiple.prefix":"series.single.prefix"),{seriesCount:i}),t.eachSeries((function(e,t){if(t<s){var n,a=e.get("name"),o="series."+(i>1?"multiple":"single")+".";n=c(n=h(a?o+"withName":o+"withoutName"),{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:(m=e.subType,Rg.series.typeNames[m]||"自定义图")});var l=e.getData();window.data=l,l.count()>r?n+=c(h("data.partialData"),{displayCnt:r}):n+=h("data.allData");for(var d=[],f=0;f<l.count();f++)if(f<r){var p=l.getName(f),g=zg(l,f);d.push(c(h(p?"data.withName":"data.withoutName"),{name:p,value:g}))}n+=d.join(h("data.separator.middle"))+h("data.separator.end"),u.push(n)}var m})),a+=u.join(h("series.multiple.separator.middle"))+h("series.multiple.separator.end"),e.setAttribute("aria-label",a)}}function c(e,t){if("string"!=typeof e)return e;var n=e;return Ge.each(t,(function(e,t){n=n.replace(new RegExp("\\{\\s*"+t+"\\s*\\}","g"),e)})),n}function h(e){var t=n.get(e);if(null==t){for(var i=e.split("."),a=Rg.aria,r=0;r<i.length;++r)a=a[i[r]];return a}return t}},Vg=Math.PI;var Hg=function(e,t){t=t||{},Ge.defaults(t,{text:"loading",textColor:"#000",fontSize:"12px",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#c23531",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new rh.Group,i=new rh.Rect({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(i);var a=t.fontSize+" sans-serif",r=new rh.Rect({style:{fill:"none",text:t.text,font:a,textPosition:"right",textDistance:10,textFill:t.textColor},zlevel:t.zlevel,z:10001});if(n.add(r),t.showSpinner){var o=new rh.Arc({shape:{startAngle:-Vg/2,endAngle:-Vg/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001});o.animateShape(!0).when(1e3,{endAngle:3*Vg/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:3*Vg/2}).delay(300).start("circularInOut"),n.add(o)}return n.resize=function(){var n=Za.getWidth(t.text,a),s=t.showSpinner?t.spinnerRadius:0,l=(e.getWidth()-2*s-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner?0:n/2),u=e.getHeight()/2;t.showSpinner&&o.setShape({cx:l,cy:u}),r.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),i.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n},Yg=Ge.each,Fg=Ge.map,Gg=Ge.isFunction,Wg=Ge.createHashMap,jg=Ge.noop,Ug=Wp.createTask,Zg=Sh.getUID,Xg=Bo.normalizeToArray;function qg(e,t,n,i){this.ecInstance=e,this.api=t,this.unfinished;n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice();this._allHandlers=n.concat(i),this._stageTaskMap=Wg()}var Kg=qg.prototype;function $g(e,t,n,i,a){var r;function o(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}a=a||{},Yg(t,(function(t,s){if(!a.visualType||a.visualType===t.visualType){var l=e._stageTaskMap.get(t.uid),u=l.seriesTaskMap,c=l.overallTask;if(c){var h,d=c.agentStubMap;d.each((function(e){o(a,e)&&(e.dirty(),h=!0)})),h&&c.dirty(),Qg(c,i);var f=e.getPerformArgs(c,a.block);d.each((function(e){e.perform(f)})),r|=c.perform(f)}else u&&u.each((function(s,l){o(a,s)&&s.dirty();var u=e.getPerformArgs(s,a.block);u.skip=!t.performRawSeries&&n.isSeriesFiltered(s.context.model),Qg(s,i),r|=s.perform(u)}))}})),e.unfinished|=r}Kg.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each((function(e){var t=e.overallTask;t&&t.dirty()}))},Kg.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),i=n.context,a=!t&&n.progressiveEnabled&&(!i||i.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,r=i&&i.modDataCount;return{step:a,modBy:null!=r?Math.ceil(r/a):null,modDataCount:r}}},Kg.getPipeline=function(e){return this._pipelineMap.get(e)},Kg.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),i=e.getData().count(),a=n.progressiveEnabled&&t.incrementalPrepareRender&&i>=n.threshold,r=e.get("large")&&i>=e.get("largeThreshold"),o="mod"===e.get("progressiveChunkMode")?i:null;e.pipelineContext=n.context={progressiveRender:a,modDataCount:o,large:r}},Kg.restorePipelines=function(e){var t=this,n=t._pipelineMap=Wg();e.eachSeries((function(e){var i=e.getProgressive(),a=e.uid;n.set(a,{id:a,head:null,tail:null,threshold:e.getProgressiveThreshold(),progressiveEnabled:i&&!(e.preventIncremental&&e.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),lm(t,e,e.dataTask)}))},Kg.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.ecInstance.getModel(),n=this.api;Yg(this._allHandlers,(function(i){var a=e.get(i.uid)||e.set(i.uid,[]);i.reset&&function(e,t,n,i,a){var r=n.seriesTaskMap||(n.seriesTaskMap=Wg()),o=t.seriesType,s=t.getTargetSeries;t.createOnAllSeries?i.eachRawSeries(l):o?i.eachRawSeriesByType(o,l):s&&s(i,a).each(l);function l(n){var o=n.uid,s=r.get(o)||r.set(o,Ug({plan:im,reset:am,count:sm}));s.context={model:n,ecModel:i,api:a,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:e},lm(e,n,s)}var u=e._pipelineMap;r.each((function(e,t){u.get(t)||(e.dispose(),r.removeKey(t))}))}(this,i,a,t,n),i.overallReset&&function(e,t,n,i,a){var r=n.overallTask=n.overallTask||Ug({reset:Jg});r.context={ecModel:i,api:a,overallReset:t.overallReset,scheduler:e};var o=r.agentStubMap=r.agentStubMap||Wg(),s=t.seriesType,l=t.getTargetSeries,u=!0,c=t.modifyOutputEnd;s?i.eachRawSeriesByType(s,h):l?l(i,a).each(h):(u=!1,Yg(i.getSeries(),h));function h(t){var n=t.uid,i=o.get(n);i||(i=o.set(n,Ug({reset:em,onDirty:nm})),r.dirty()),i.context={model:t,overallProgress:u,modifyOutputEnd:c},i.agent=r,i.__block=u,lm(e,t,i)}var d=e._pipelineMap;o.each((function(e,t){d.get(t)||(e.dispose(),r.dirty(),o.removeKey(t))}))}(this,i,a,t,n)}),this)},Kg.prepareView=function(e,t,n,i){var a=e.renderTask,r=a.context;r.model=t,r.ecModel=n,r.api=i,a.__block=!e.incrementalPrepareRender,lm(this,t,a)},Kg.performDataProcessorTasks=function(e,t){$g(this,this._dataProcessorHandlers,e,t,{block:!0})},Kg.performVisualTasks=function(e,t,n){$g(this,this._visualHandlers,e,t,n)},Kg.performSeriesTasks=function(e){var t;e.eachSeries((function(e){t|=e.dataTask.perform()})),this.unfinished|=t},Kg.plan=function(){this._pipelineMap.each((function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)}))};var Qg=Kg.updatePayload=function(e,t){"remain"!==t&&(e.context.payload=t)};function Jg(e){e.overallReset(e.ecModel,e.api,e.payload)}function em(e,t){return e.overallProgress&&tm}function tm(){this.agent.dirty(),this.getDownstream().dirty()}function nm(){this.agent&&this.agent.dirty()}function im(e){return e.plan&&e.plan(e.model,e.ecModel,e.api,e.payload)}function am(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=Xg(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?Fg(t,(function(e,t){return om(t)})):rm}var rm=om(0);function om(e){return function(t,n){var i=n.data,a=n.resetDefines[e];if(a&&a.dataEach)for(var r=t.start;r<t.end;r++)a.dataEach(i,r);else a&&a.progress&&a.progress(t,i)}}function sm(e){return e.data.count()}function lm(e,t,n){var i=t.uid,a=e._pipelineMap.get(i);!a.head&&(a.head=n),a.tail&&a.tail.pipe(n),a.tail=n,n.__idxInPipeline=a.count++,n.__pipeline=a}function um(e){cm=null;try{e(hm,dm)}catch(e){}return cm}qg.wrapStageHandler=function(e,t){return Gg(e)&&(e={overallReset:e,seriesType:um(e)}),e.uid=Zg("stageHandler"),t&&(e.visualType=t),e};var cm,hm={},dm={};function fm(e,t){for(var n in t.prototype)e[n]=jg}fm(hm,If),fm(dm,Df),hm.eachSeriesByType=hm.eachRawSeriesByType=function(e){cm=e},hm.eachComponent=function(e){"series"===e.mainType&&e.subType&&(cm=e.subType)};var pm=qg,gm=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],mm={color:gm,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],gm]},vm="#eee",ym=function(){return{axisLine:{lineStyle:{color:vm}},axisTick:{lineStyle:{color:vm}},axisLabel:{textStyle:{color:vm}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:vm}}}},_m=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],xm={color:_m,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:vm},crossStyle:{color:vm},label:{color:"#000"}}},legend:{textStyle:{color:vm}},textStyle:{color:vm},title:{textStyle:{color:vm}},toolbox:{iconStyle:{normal:{borderColor:vm}}},dataZoom:{textStyle:{color:vm}},visualMap:{textStyle:{color:vm}},timeline:{lineStyle:{color:vm},itemStyle:{normal:{color:_m[1]}},label:{normal:{textStyle:{color:vm}}},controlStyle:{normal:{color:vm,borderColor:vm}}},timeAxis:ym(),logAxis:ym(),valueAxis:ym(),categoryAxis:ym(),line:{symbol:"circle"},graph:{color:_m},gauge:{title:{textStyle:{color:vm}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};xm.categoryAxis.splitLine.show=!1;var bm=xm,wm=of.detectSourceFormat,Sm=bd.SERIES_LAYOUT_BY_COLUMN;fd.extend({type:"dataset",defaultOption:{seriesLayoutBy:Sm,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){wm(this)}}),fg.extend({type:"dataset"});var Mm=Tl.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(e,t){var n=.5522848,i=t.cx,a=t.cy,r=t.rx,o=t.ry,s=r*n,l=o*n;e.moveTo(i-r,a),e.bezierCurveTo(i-r,a-l,i-s,a-o,i,a-o),e.bezierCurveTo(i+s,a-o,i+r,a-l,i+r,a),e.bezierCurveTo(i+r,a+l,i+s,a+o,i,a+o),e.bezierCurveTo(i-s,a+o,i-r,a+l,i-r,a),e.closePath()}}),Tm=Mm,Im=Wl.createFromString,Am=Ge.isString,Dm=Ge.extend,Cm=Ge.defaults,Om=Ge.trim,km=Ge.each,Lm=/[\s,]+/;function Em(e){Am(e)&&(e=(new DOMParser).parseFromString(e,"text/xml"));for(9===e.nodeType&&(e=e.firstChild);"svg"!==e.nodeName.toLowerCase()||1!==e.nodeType;)e=e.nextSibling;return e}function Nm(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}Nm.prototype.parse=function(e,t){t=t||{};var n=Em(e);if(!n)throw new Error("Illegal svg");var i=new zi;this._root=i;var a=n.getAttribute("viewBox")||"",r=parseFloat(n.getAttribute("width")||t.width),o=parseFloat(n.getAttribute("height")||t.height);isNaN(r)&&(r=null),isNaN(o)&&(o=null),Hm(n,i,null,!0);for(var s,l,u=n.firstChild;u;)this._parseNode(u,i),u=u.nextSibling;if(a){var c=Om(a).split(Lm);c.length>=4&&(s={x:parseFloat(c[0]||0),y:parseFloat(c[1]||0),width:parseFloat(c[2]),height:parseFloat(c[3])})}if(s&&null!=r&&null!=o&&(l=jm(s,r,o),!t.ignoreViewBox)){var h=i;(i=new zi).add(h),h.scale=l.scale.slice(),h.position=l.position.slice()}return t.ignoreRootClip||null==r||null==o||i.setClipPath(new wu({shape:{x:0,y:0,width:r,height:o}})),{root:i,width:r,height:o,viewBoxRect:s,viewBoxTransform:l}},Nm.prototype._parseNode=function(e,t){var n,i,a=e.nodeName.toLowerCase();if("defs"===a?this._isDefine=!0:"text"===a&&(this._isText=!0),this._isDefine){if(i=Rm[a]){var r=i.call(this,e),o=e.getAttribute("id");o&&(this._defs[o]=r)}}else(i=Pm[a])&&(n=i.call(this,e,t),t.add(n));for(var s=e.firstChild;s;)1===s.nodeType&&this._parseNode(s,n),3===s.nodeType&&this._isText&&this._parseText(s,n),s=s.nextSibling;"defs"===a?this._isDefine=!1:"text"===a&&(this._isText=!1)},Nm.prototype._parseText=function(e,t){if(1===e.nodeType){var n=e.getAttribute("dx")||0,i=e.getAttribute("dy")||0;this._textX+=parseFloat(n),this._textY+=parseFloat(i)}var a=new Zl({style:{text:e.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});zm(t,a),Hm(e,a,this._defs);var r=a.style.fontSize;r&&r<9&&(a.style.fontSize=9,a.scale=a.scale||[1,1],a.scale[0]*=r/9,a.scale[1]*=r/9);var o=a.getBoundingRect();return this._textX+=o.width,t.add(a),a};var Pm={g:function(e,t){var n=new zi;return zm(t,n),Hm(e,n,this._defs),n},rect:function(e,t){var n=new wu;return zm(t,n),Hm(e,n,this._defs),n.setShape({x:parseFloat(e.getAttribute("x")||0),y:parseFloat(e.getAttribute("y")||0),width:parseFloat(e.getAttribute("width")||0),height:parseFloat(e.getAttribute("height")||0)}),n},circle:function(e,t){var n=new Xl;return zm(t,n),Hm(e,n,this._defs),n.setShape({cx:parseFloat(e.getAttribute("cx")||0),cy:parseFloat(e.getAttribute("cy")||0),r:parseFloat(e.getAttribute("r")||0)}),n},line:function(e,t){var n=new Tu;return zm(t,n),Hm(e,n,this._defs),n.setShape({x1:parseFloat(e.getAttribute("x1")||0),y1:parseFloat(e.getAttribute("y1")||0),x2:parseFloat(e.getAttribute("x2")||0),y2:parseFloat(e.getAttribute("y2")||0)}),n},ellipse:function(e,t){var n=new Tm;return zm(t,n),Hm(e,n,this._defs),n.setShape({cx:parseFloat(e.getAttribute("cx")||0),cy:parseFloat(e.getAttribute("cy")||0),rx:parseFloat(e.getAttribute("rx")||0),ry:parseFloat(e.getAttribute("ry")||0)}),n},polygon:function(e,t){var n=e.getAttribute("points");n&&(n=Bm(n));var i=new fu({shape:{points:n||[]}});return zm(t,i),Hm(e,i,this._defs),i},polyline:function(e,t){var n=new Tl;zm(t,n),Hm(e,n,this._defs);var i=e.getAttribute("points");return i&&(i=Bm(i)),new pu({shape:{points:i||[]}})},image:function(e,t){var n=new Lr;return zm(t,n),Hm(e,n,this._defs),n.setStyle({image:e.getAttribute("xlink:href"),x:e.getAttribute("x"),y:e.getAttribute("y"),width:e.getAttribute("width"),height:e.getAttribute("height")}),n},text:function(e,t){var n=e.getAttribute("x")||0,i=e.getAttribute("y")||0,a=e.getAttribute("dx")||0,r=e.getAttribute("dy")||0;this._textX=parseFloat(n)+parseFloat(a),this._textY=parseFloat(i)+parseFloat(r);var o=new zi;return zm(t,o),Hm(e,o,this._defs),o},tspan:function(e,t){var n=e.getAttribute("x"),i=e.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i));var a=e.getAttribute("dx")||0,r=e.getAttribute("dy")||0,o=new zi;return zm(t,o),Hm(e,o,this._defs),this._textX+=a,this._textY+=r,o},path:function(e,t){var n=e.getAttribute("d")||"",i=Im(n);return zm(t,i),Hm(e,i,this._defs),i}},Rm={lineargradient:function(e){var t=parseInt(e.getAttribute("x1")||0,10),n=parseInt(e.getAttribute("y1")||0,10),i=parseInt(e.getAttribute("x2")||10,10),a=parseInt(e.getAttribute("y2")||0,10),r=new Yu(t,n,i,a);return function(e,t){var n=e.firstChild;for(;n;){if(1===n.nodeType){var i=n.getAttribute("offset");i=i.indexOf("%")>0?parseInt(i,10)/100:i?parseFloat(i):0;var a=n.getAttribute("stop-color")||"#000000";t.addColorStop(i,a)}n=n.nextSibling}}(e,r),r},radialgradient:function(e){}};function zm(e,t){e&&e.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),Cm(t.__inheritedStyle,e.__inheritedStyle))}function Bm(e){for(var t=Om(e).split(Lm),n=[],i=0;i<t.length;i+=2){var a=parseFloat(t[i]),r=parseFloat(t[i+1]);n.push([a,r])}return n}var Vm={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 Hm(e,t,n,i){var a=t.__inheritedStyle||{},r="text"===t.type;if(1===e.nodeType&&(function(e,t){var n=e.getAttribute("transform");if(n){n=n.replace(/,/g," ");var i=null,a=[];n.replace(Gm,(function(e,t,n){a.push(t,n)}));for(var r=a.length-1;r>0;r-=2){var o=a[r],s=a[r-1];switch(i=i||ln.create(),s){case"translate":o=Om(o).split(Lm),ln.translate(i,i,[parseFloat(o[0]),parseFloat(o[1]||0)]);break;case"scale":o=Om(o).split(Lm),ln.scale(i,i,[parseFloat(o[0]),parseFloat(o[1]||o[0])]);break;case"rotate":o=Om(o).split(Lm),ln.rotate(i,i,parseFloat(o[0]));break;case"skew":o=Om(o).split(Lm),console.warn("Skew transform is not supported yet");break;case"matrix":o=Om(o).split(Lm);i[0]=parseFloat(o[0]),i[1]=parseFloat(o[1]),i[2]=parseFloat(o[2]),i[3]=parseFloat(o[3]),i[4]=parseFloat(o[4]),i[5]=parseFloat(o[5])}}t.setLocalTransform(i)}}(e,t),Dm(a,function(e){var t=e.getAttribute("style"),n={};if(!t)return n;var i,a={};Wm.lastIndex=0;for(;null!=(i=Wm.exec(t));)a[i[1]]=i[2];for(var r in Vm)Vm.hasOwnProperty(r)&&null!=a[r]&&(n[Vm[r]]=a[r]);return n}(e)),!i))for(var o in Vm)if(Vm.hasOwnProperty(o)){var s=e.getAttribute(o);null!=s&&(a[Vm[o]]=s)}var l=r?"textFill":"fill",u=r?"textStroke":"stroke";t.style=t.style||new oa;var c=t.style;null!=a.fill&&c.set(l,Fm(a.fill,n)),null!=a.stroke&&c.set(u,Fm(a.stroke,n)),km(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],(function(e){var t="lineWidth"===e&&r?"textStrokeWidth":e;null!=a[e]&&c.set(t,parseFloat(a[e]))})),a.textBaseline&&"auto"!==a.textBaseline||(a.textBaseline="alphabetic"),"alphabetic"===a.textBaseline&&(a.textBaseline="bottom"),"start"===a.textAlign&&(a.textAlign="left"),"end"===a.textAlign&&(a.textAlign="right"),km(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],(function(e){null!=a[e]&&c.set(e,a[e])})),a.lineDash&&(t.style.lineDash=Om(a.lineDash).split(Lm)),c[u]&&"none"!==c[u]&&(t[u]=!0),t.__inheritedStyle=a}var Ym=/url\(\s*#(.*?)\)/;function Fm(e,t){var n=t&&e&&e.match(Ym);return n?t[Om(n[1])]:e}var Gm=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;var Wm=/([^\s:;]+)\s*:\s*([^:;]+)/g;function jm(e,t,n){var i=t/e.width,a=n/e.height,r=Math.min(i,a);return{scale:[r,r],position:[-(e.x+e.width/2)*r+t/2,-(e.y+e.height/2)*r+n/2]}}var Um={parseXML:Em,makeViewBoxTransform:jm,parseSVG:function(e,t){return(new Nm).parse(e,t)}},Zm=Ge.createHashMap,Xm=Ge.isString,qm=Ge.isArray,Km=Ge.each,$m=Um.parseXML,Qm=Zm(),Jm={registerMap:function(e,t,n){var i;return qm(t)?i=t:t.svg?i=[{type:"svg",source:t.svg,specialAreas:t.specialAreas}]:(t.geoJson&&!t.features&&(n=t.specialAreas,t=t.geoJson),i=[{type:"geoJSON",source:t,specialAreas:n}]),Km(i,(function(e){var t=e.type;"geoJson"===t&&(t=e.type="geoJSON"),(0,ev[t])(e)})),Qm.set(e,i)},retrieveMap:function(e){return Qm.get(e)}},ev={geoJSON:function(e){var t=e.source;e.geoJSON=Xm(t)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(t):new Function("return ("+t+");")():t},svg:function(e){e.svgXML=$m(e.source)}},tv=Jm;function nv(e){return e}function iv(e,t,n,i,a){this._old=e,this._new=t,this._oldKeyGetter=n||nv,this._newKeyGetter=i||nv,this.context=a}function av(e,t,n,i,a){for(var r=0;r<e.length;r++){var o="_ec_"+a[i](e[r],r),s=t[o];null==s?(n.push(o),t[o]=r):(s.length||(t[o]=s=[s]),s.push(r))}}iv.prototype={constructor:iv,add:function(e){return this._add=e,this},update:function(e){return this._update=e,this},remove:function(e){return this._remove=e,this},execute:function(){var e=this._old,t=this._new,n={},i=[],a=[];for(av(e,{},i,"_oldKeyGetter",this),av(t,n,a,"_newKeyGetter",this),r=0;r<e.length;r++){if(null!=(s=n[o=i[r]]))(u=s.length)?(1===u&&(n[o]=null),s=s.shift()):n[o]=null,this._update&&this._update(s,r);else this._remove&&this._remove(r)}for(var r=0;r<a.length;r++){var o=a[r];if(n.hasOwnProperty(o)){var s;if(null==(s=n[o]))continue;if(s.length)for(var l=0,u=s.length;l<u;l++)this._add&&this._add(s[l]);else this._add&&this._add(s)}}}};var rv=iv,ov=Ge.each,sv=Ge.createHashMap,lv=sv(["tooltip","label","itemName","itemId","seriesName"]);function uv(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}var cv={OTHER_DIMENSIONS:lv,summarizeDimensions:function(e){var t={},n=t.encode={},i=sv(),a=[],r=[],o=t.userOutput={dimensionNames:e.dimensions.slice(),encode:{}};ov(e.dimensions,(function(t){var s,l=e.getDimensionInfo(t),u=l.coordDim;if(u){var c=l.coordDimIndex;uv(n,u)[c]=t,l.isExtraCoord||(i.set(u,1),"ordinal"!==(s=l.type)&&"time"!==s&&(a[0]=t),uv(o.encode,u)[c]=l.index),l.defaultTooltip&&r.push(t)}lv.each((function(e,t){var i=uv(n,t),a=l.otherDims[t];null!=a&&!1!==a&&(i[a]=l.name)}))}));var s=[],l={};i.each((function(e,t){var i=n[t];l[t]=i[0],s=s.concat(i)})),t.dataDimsOnCoord=s,t.encodeFirstDimNotExtra=l;var u=n.label;u&&u.length&&(a=u.slice());var c=n.tooltip;return c&&c.length?r=c.slice():r.length||(r=a.slice()),n.defaultedLabel=a,n.defaultedTooltip=r,t},getDimensionTypeByAxis:function(e){return"category"===e?"ordinal":"time"===e?"time":"float"}};var hv=function(e){null!=e&&Ge.extend(this,e),this.otherDims={}},dv=kp.defaultDimValueGetters,fv=kp.DefaultDataProvider,pv=cv.summarizeDimensions,gv=Ge.isObject,mv="undefined",vv={float:typeof Float64Array===mv?Array:Float64Array,int:typeof Int32Array===mv?Array:Int32Array,ordinal:Array,number:Array,time:Array},yv=typeof Uint32Array===mv?Array:Uint32Array,_v=typeof Int32Array===mv?Array:Int32Array,xv=typeof Uint16Array===mv?Array:Uint16Array;function bv(e){return e._rawCount>65535?yv:xv}var wv=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],Sv=["_extent","_approximateExtent","_rawExtent"];function Mv(e,t){Ge.each(wv.concat(t.__wrappedMethods||[]),(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})),e.__wrappedMethods=t.__wrappedMethods,Ge.each(Sv,(function(n){e[n]=Ge.clone(t[n])})),e._calculationInfo=Ge.extend(t._calculationInfo)}var Tv=function(e,t){e=e||["x","y"];for(var n={},i=[],a={},r=0;r<e.length;r++){var o=e[r];Ge.isString(o)?o=new hv({name:o}):o instanceof hv||(o=new hv(o));var s=o.name;o.type=o.type||"float",o.coordDim||(o.coordDim=s,o.coordDimIndex=0),o.otherDims=o.otherDims||{},i.push(s),n[s]=o,o.index=r,o.createInvertedIndices&&(a[s]=[])}this.dimensions=i,this._dimensionInfos=n,this.hostModel=t,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=pv(this),this._invertedIndicesMap=a,this._calculationInfo={},this.userOutput=this._dimensionsSummary.userOutput},Iv=Tv.prototype;function Av(e,t,n,i,a){var r=vv[t.type],o=i-1,s=t.name,l=e[s][o];if(l&&l.length<n){for(var u=new r(Math.min(a-o*n,n)),c=0;c<l.length;c++)u[c]=l[c];e[s][o]=u}for(var h=i*n;h<a;h+=n)e[s].push(new r(Math.min(a-h,n)))}function Dv(e){var t=e._invertedIndicesMap;Ge.each(t,(function(n,i){var a=e._dimensionInfos[i].ordinalMeta;if(a){n=t[i]=new _v(a.categories.length);for(var r=0;r<n.length;r++)n[r]=-1;for(r=0;r<e._count;r++)n[e.get(i,r)]=r}}))}function Cv(e,t,n){var i;if(null!=t){var a=e._chunkSize,r=Math.floor(n/a),o=n%a,s=e.dimensions[t],l=e._storage[s][r];if(l){i=l[o];var u=e._dimensionInfos[s].ordinalMeta;u&&u.categories.length&&(i=u.categories[i])}}return i}function Ov(e){return e}function kv(e){return e<this._count&&e>=0?this._indices[e]:-1}function Lv(e,t){var n=e._idList[t];return null==n&&(n=Cv(e,e._idDimIdx,t)),null==n&&(n="e\0\0"+t),n}function Ev(e){return Ge.isArray(e)||(e=[e]),e}function Nv(e,t){var n=e.dimensions,i=new Tv(Ge.map(n,e.getDimensionInfo,e),e.hostModel);Mv(i,e);for(var a=i._storage={},r=e._storage,o=0;o<n.length;o++){var s=n[o];r[s]&&(Ge.indexOf(t,s)>=0?(a[s]=Pv(r[s]),i._rawExtent[s]=Rv(),i._extent[s]=null):a[s]=r[s])}return i}function Pv(e){for(var t,n,i=new Array(e.length),a=0;a<e.length;a++)i[a]=(t=e[a],n=void 0,(n=t.constructor)===Array?t.slice():new n(t));return i}function Rv(){return[1/0,-1/0]}Iv.type="list",Iv.hasItemOption=!0,Iv.getDimension=function(e){return"number"!=typeof e&&(isNaN(e)||this._dimensionInfos.hasOwnProperty(e))||(e=this.dimensions[e]),e},Iv.getDimensionInfo=function(e){return this._dimensionInfos[this.getDimension(e)]},Iv.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},Iv.mapDimension=function(e,t){var n=this._dimensionsSummary;if(null==t)return n.encodeFirstDimNotExtra[e];var i=n.encode[e];return!0===t?(i||[]).slice():i&&i[t]},Iv.initData=function(e,t,n){(kd.isInstance(e)||Ge.isArrayLike(e))&&(e=new fv(e,this.dimensions.length)),this._rawData=e,this._storage={},this._indices=null,this._nameList=t||[],this._idList=[],this._nameRepeatCount={},n||(this.hasItemOption=!1),this.defaultDimValueGetter=dv[this._rawData.getSource().sourceFormat],this._dimValueGetter=n=n||this.defaultDimValueGetter,this._dimValueGetterArrayRows=dv.arrayRows,this._rawExtent={},this._initDataFromProvider(0,e.count()),e.pure&&(this.hasItemOption=!1)},Iv.getProvider=function(){return this._rawData},Iv.appendData=function(e){var t=this._rawData,n=this.count();t.appendData(e);var i=t.count();t.persistent||(i+=n),this._initDataFromProvider(n,i)},Iv.appendValues=function(e,t){for(var n=this._chunkSize,i=this._storage,a=this.dimensions,r=a.length,o=this._rawExtent,s=this.count(),l=s+Math.max(e.length,t?t.length:0),u=this._chunkCount,c=0;c<r;c++){o[v=a[c]]||(o[v]=Rv()),i[v]||(i[v]=[]),Av(i,this._dimensionInfos[v],n,u,l),this._chunkCount=i[v].length}for(var h=new Array(r),d=s;d<l;d++){for(var f=d-s,p=Math.floor(d/n),g=d%n,m=0;m<r;m++){var v=a[m],y=this._dimValueGetterArrayRows(e[f]||h,v,f,m);i[v][p][g]=y;var _=o[v];y<_[0]&&(_[0]=y),y>_[1]&&(_[1]=y)}t&&(this._nameList[d]=t[f])}this._rawCount=this._count=l,this._extent={},Dv(this)},Iv._initDataFromProvider=function(e,t){if(!(e>=t)){for(var n,i=this._chunkSize,a=this._rawData,r=this._storage,o=this.dimensions,s=o.length,l=this._dimensionInfos,u=this._nameList,c=this._idList,h=this._rawExtent,d=this._nameRepeatCount={},f=this._chunkCount,p=0;p<s;p++){h[b=o[p]]||(h[b]=Rv());var g=l[b];0===g.otherDims.itemName&&(n=this._nameDimIdx=p),0===g.otherDims.itemId&&(this._idDimIdx=p),r[b]||(r[b]=[]),Av(r,g,i,f,t),this._chunkCount=r[b].length}for(var m=new Array(s),v=e;v<t;v++){m=a.getItem(v,m);for(var y=Math.floor(v/i),_=v%i,x=0;x<s;x++){var b,w=r[b=o[x]][y],S=this._dimValueGetter(m,b,v,x);w[_]=S;var M=h[b];S<M[0]&&(M[0]=S),S>M[1]&&(M[1]=S)}if(!a.pure){var T=u[v];if(m&&null==T)if(null!=m.name)u[v]=T=m.name;else if(null!=n){var I=o[n],A=r[I][y];if(A){T=A[_];var D=l[I].ordinalMeta;D&&D.categories.length&&(T=D.categories[T])}}var C=null==m?null:m.id;null==C&&null!=T&&(d[T]=d[T]||0,C=T,d[T]>0&&(C+="__ec__"+d[T]),d[T]++),null!=C&&(c[v]=C)}}!a.persistent&&a.clean&&a.clean(),this._rawCount=this._count=t,this._extent={},Dv(this)}},Iv.count=function(){return this._count},Iv.getIndices=function(){var e=this._indices;if(e){var t=e.constructor,n=this._count;if(t===Array){a=new t(n);for(var i=0;i<n;i++)a[i]=e[i]}else a=new t(e.buffer,0,n)}else{var a=new(t=bv(this))(this.count());for(i=0;i<a.length;i++)a[i]=i}return a},Iv.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var n=this._storage;if(!n[e])return NaN;t=this.getRawIndex(t);var i=Math.floor(t/this._chunkSize),a=t%this._chunkSize;return n[e][i][a]},Iv.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var n=this._storage[e];if(!n)return NaN;var i=Math.floor(t/this._chunkSize),a=t%this._chunkSize;return n[i][a]},Iv._getFast=function(e,t){var n=Math.floor(t/this._chunkSize),i=t%this._chunkSize;return this._storage[e][n][i]},Iv.getValues=function(e,t){var n=[];Ge.isArray(e)||(t=e,e=this.dimensions);for(var i=0,a=e.length;i<a;i++)n.push(this.get(e[i],t));return n},Iv.hasValue=function(e){for(var t=this._dimensionsSummary.dataDimsOnCoord,n=0,i=t.length;n<i;n++)if(isNaN(this.get(t[n],e)))return!1;return!0},Iv.getDataExtent=function(e){e=this.getDimension(e);var t=this._storage[e],n=Rv();if(!t)return n;var i,a=this.count();if(!this._indices)return this._rawExtent[e].slice();if(i=this._extent[e])return i.slice();for(var r=(i=n)[0],o=i[1],s=0;s<a;s++){var l=this._getFast(e,this.getRawIndex(s));l<r&&(r=l),l>o&&(o=l)}return i=[r,o],this._extent[e]=i,i},Iv.getApproximateExtent=function(e){return e=this.getDimension(e),this._approximateExtent[e]||this.getDataExtent(e)},Iv.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},Iv.getCalculationInfo=function(e){return this._calculationInfo[e]},Iv.setCalculationInfo=function(e,t){gv(e)?Ge.extend(this._calculationInfo,e):this._calculationInfo[e]=t},Iv.getSum=function(e){var t=0;if(this._storage[e])for(var n=0,i=this.count();n<i;n++){var a=this.get(e,n);isNaN(a)||(t+=a)}return t},Iv.getMedian=function(e){var t=[];this.each(e,(function(e,n){isNaN(e)||t.push(e)}));var n=[].concat(t).sort((function(e,t){return e-t})),i=this.count();return 0===i?0:i%2==1?n[(i-1)/2]:(n[i/2]+n[i/2-1])/2},Iv.rawIndexOf=function(e,t){var n=(e&&this._invertedIndicesMap[e])[t];return null==n||isNaN(n)?-1:n},Iv.indexOfName=function(e){for(var t=0,n=this.count();t<n;t++)if(this.getName(t)===e)return t;return-1},Iv.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(null!=n&&n<this._count&&n===e)return e;for(var i=0,a=this._count-1;i<=a;){var r=(i+a)/2|0;if(t[r]<e)i=r+1;else{if(!(t[r]>e))return r;a=r-1}}return-1},Iv.indicesOfNearest=function(e,t,n){var i=[];if(!this._storage[e])return i;null==n&&(n=1/0);for(var a=1/0,r=-1,o=0,s=0,l=this.count();s<l;s++){var u=t-this.get(e,s),c=Math.abs(u);c<=n&&((c<a||c===a&&u>=0&&r<0)&&(a=c,r=u,o=0),u===r&&(i[o++]=s))}return i.length=o,i},Iv.getRawIndex=Ov,Iv.getRawDataItem=function(e){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(e));for(var t=[],n=0;n<this.dimensions.length;n++){var i=this.dimensions[n];t.push(this.get(i,e))}return t},Iv.getName=function(e){var t=this.getRawIndex(e);return this._nameList[t]||Cv(this,this._nameDimIdx,t)||""},Iv.getId=function(e){return Lv(this,this.getRawIndex(e))},Iv.each=function(e,t,n,i){if(this._count){"function"==typeof e&&(i=n,n=t,t=e,e=[]),n=n||i||this;for(var a=(e=Ge.map(Ev(e),this.getDimension,this)).length,r=0;r<this.count();r++)switch(a){case 0:t.call(n,r);break;case 1:t.call(n,this.get(e[0],r),r);break;case 2:t.call(n,this.get(e[0],r),this.get(e[1],r),r);break;default:for(var o=0,s=[];o<a;o++)s[o]=this.get(e[o],r);s[o]=r,t.apply(n,s)}}},Iv.filterSelf=function(e,t,n,i){if(this._count){"function"==typeof e&&(i=n,n=t,t=e,e=[]),n=n||i||this,e=Ge.map(Ev(e),this.getDimension,this);for(var a=this.count(),r=new(bv(this))(a),o=[],s=e.length,l=0,u=e[0],c=0;c<a;c++){var h,d=this.getRawIndex(c);if(0===s)h=t.call(n,c);else if(1===s){var f=this._getFast(u,d);h=t.call(n,f,c)}else{for(var p=0;p<s;p++)o[p]=this._getFast(u,d);o[p]=c,h=t.apply(n,o)}h&&(r[l++]=d)}return l<a&&(this._indices=r),this._count=l,this._extent={},this.getRawIndex=this._indices?kv:Ov,this}},Iv.selectRange=function(e){if(this._count){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);var i=t.length;if(i){var a=this.count(),r=new(bv(this))(a),o=0,s=t[0],l=e[s][0],u=e[s][1],c=!1;if(!this._indices){var h=0;if(1===i){for(var d=this._storage[t[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))&&(r[o++]=h),h++}c=!0}else if(2===i){d=this._storage[s];var v=this._storage[t[1]],y=e[t[1]][0],_=e[t[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))&&(r[o++]=h),h++}}c=!0}}if(!c)if(1===i)for(m=0;m<a;m++){var S=this.getRawIndex(m);((b=this._getFast(s,S))>=l&&b<=u||isNaN(b))&&(r[o++]=S)}else for(m=0;m<a;m++){var M=!0;for(S=this.getRawIndex(m),f=0;f<i;f++){var T=t[f];((b=this._getFast(n,S))<e[T][0]||b>e[T][1])&&(M=!1)}M&&(r[o++]=this.getRawIndex(m))}return o<a&&(this._indices=r),this._count=o,this._extent={},this.getRawIndex=this._indices?kv:Ov,this}}},Iv.mapArray=function(e,t,n,i){"function"==typeof e&&(i=n,n=t,t=e,e=[]),n=n||i||this;var a=[];return this.each(e,(function(){a.push(t&&t.apply(this,arguments))}),n),a},Iv.map=function(e,t,n,i){n=n||i||this;var a=Nv(this,e=Ge.map(Ev(e),this.getDimension,this));a._indices=this._indices,a.getRawIndex=a._indices?kv:Ov;for(var r=a._storage,o=[],s=this._chunkSize,l=e.length,u=this.count(),c=[],h=a._rawExtent,d=0;d<u;d++){for(var f=0;f<l;f++)c[f]=this.get(e[f],d);c[l]=d;var p=t&&t.apply(n,c);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 _=e[y],x=p[y],b=h[_],w=r[_];w&&(w[m][v]=x),x<b[0]&&(b[0]=x),x>b[1]&&(b[1]=x)}}}return a},Iv.downSample=function(e,t,n,i){for(var a=Nv(this,[e]),r=a._storage,o=[],s=Math.floor(1/t),l=r[e],u=this.count(),c=this._chunkSize,h=a._rawExtent[e],d=new(bv(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/c),y=m%c;o[g]=l[v][y]}var _=n(o),x=this.getRawIndex(Math.min(p+i(o,_)||0,u-1)),b=x%c;l[Math.floor(x/c)][b]=_,_<h[0]&&(h[0]=_),_>h[1]&&(h[1]=_),d[f++]=x}return a._count=f,a._indices=d,a.getRawIndex=kv,a},Iv.getItemModel=function(e){var t=this.hostModel;return new xh(this.getRawDataItem(e),t,t&&t.ecModel)},Iv.diff=function(e){var t=this;return new rv(e?e.getIndices():[],this.getIndices(),(function(t){return Lv(e,t)}),(function(e){return Lv(t,e)}))},Iv.getVisual=function(e){var t=this._visual;return t&&t[e]},Iv.setVisual=function(e,t){if(gv(e))for(var n in e)e.hasOwnProperty(n)&&this.setVisual(n,e[n]);else this._visual=this._visual||{},this._visual[e]=t},Iv.setLayout=function(e,t){if(gv(e))for(var n in e)e.hasOwnProperty(n)&&this.setLayout(n,e[n]);else this._layout[e]=t},Iv.getLayout=function(e){return this._layout[e]},Iv.getItemLayout=function(e){return this._itemLayouts[e]},Iv.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?Ge.extend(this._itemLayouts[e]||{},t):t},Iv.clearItemLayouts=function(){this._itemLayouts.length=0},Iv.getItemVisual=function(e,t,n){var i=this._itemVisuals[e],a=i&&i[t];return null!=a||n?a:this.getVisual(t)},Iv.setItemVisual=function(e,t,n){var i=this._itemVisuals[e]||{},a=this.hasItemVisual;if(this._itemVisuals[e]=i,gv(t))for(var r in t)t.hasOwnProperty(r)&&(i[r]=t[r],a[r]=!0);else i[t]=n,a[t]=!0},Iv.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var zv=function(e){e.seriesIndex=this.seriesIndex,e.dataIndex=this.dataIndex,e.dataType=this.dataType};Iv.setItemGraphicEl=function(e,t){var n=this.hostModel;t&&(t.dataIndex=e,t.dataType=this.dataType,t.seriesIndex=n&&n.seriesIndex,"group"===t.type&&t.traverse(zv,t)),this._graphicEls[e]=t},Iv.getItemGraphicEl=function(e){return this._graphicEls[e]},Iv.eachItemGraphicEl=function(e,t){Ge.each(this._graphicEls,(function(n,i){n&&e&&e.call(t,n,i)}))},Iv.cloneShallow=function(e){if(!e){var t=Ge.map(this.dimensions,this.getDimensionInfo,this);e=new Tv(t,this.hostModel)}if(e._storage=this._storage,Mv(e,this),this._indices){var n=this._indices.constructor;e._indices=new n(this._indices)}else e._indices=null;return e.getRawIndex=e._indices?kv:Ov,e},Iv.wrapMethod=function(e,t){var n=this[e];"function"==typeof n&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(Ge.slice(arguments)))})},Iv.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],Iv.CHANGABLE_METHODS=["filterSelf","selectRange"];var Bv=Tv,Vv=Ge.createHashMap,Hv=Ge.each,Yv=Ge.isString,Fv=Ge.defaults,Gv=Ge.extend,Wv=Ge.isObject,jv=Ge.clone,Uv=Bo.normalizeToArray,Zv=of.guessOrdinal,Xv=of.BE_ORDINAL,qv=cv.OTHER_DIMENSIONS;function Kv(e,t,n){if(n||null!=t.get(e)){for(var i=0;null!=t.get(e+i);)i++;e+=i}return t.set(e,!0),e}var $v=function(e,t,n){kd.isInstance(t)||(t=kd.seriesDataToSource(t)),n=n||{},e=(e||[]).slice();for(var i=(n.dimsDef||[]).slice(),a=Vv(),r=Vv(),o=[],s=function(e,t,n,i){var a=Math.max(e.dimensionsDetectCount||1,t.length,n.length,i||0);return Hv(t,(function(e){var t=e.dimsDef;t&&(a=Math.max(a,t.length))})),a}(t,e,i,n.dimCount),l=0;l<s;l++){var u=i[l]=Gv({},Wv(i[l])?i[l]:{name:i[l]}),c=u.name,h=o[l]=new hv;null!=c&&null==a.get(c)&&(h.name=h.displayName=c,a.set(c,l)),null!=u.type&&(h.type=u.type),null!=u.displayName&&(h.displayName=u.displayName)}var d=n.encodeDef;!d&&n.encodeDefaulter&&(d=n.encodeDefaulter(t,s)),(d=Vv(d)).each((function(e,t){if(1===(e=Uv(e).slice()).length&&!Yv(e[0])&&e[0]<0)d.set(t,!1);else{var n=d.set(t,[]);Hv(e,(function(e,i){Yv(e)&&(e=a.get(e)),null!=e&&e<s&&(n[i]=e,p(o[e],t,i))}))}}));var f=0;function p(e,t,n){null!=qv.get(t)?e.otherDims[t]=n:(e.coordDim=t,e.coordDimIndex=n,r.set(t,!0))}Hv(e,(function(e,t){var n,i,a;if(Yv(e))n=e,e={};else{n=e.name;var r=e.ordinalMeta;e.ordinalMeta=null,(e=jv(e)).ordinalMeta=r,i=e.dimsDef,a=e.otherDims,e.name=e.coordDim=e.coordDimIndex=e.dimsDef=e.otherDims=null}if(!1!==(s=d.get(n))){var s;if(!(s=Uv(s)).length)for(var l=0;l<(i&&i.length||1);l++){for(;f<o.length&&null!=o[f].coordDim;)f++;f<o.length&&s.push(f++)}Hv(s,(function(t,r){var s=o[t];if(p(Fv(s,e),n,r),null==s.name&&i){var l=i[r];!Wv(l)&&(l={name:l}),s.name=s.displayName=l.name,s.defaultTooltip=l.defaultTooltip}a&&Fv(s.otherDims,a)}))}}));var g=n.generateCoord,m=n.generateCoordCount,v=null!=m;m=g?m||1:0;for(var y=g||"value",_=0;_<s;_++){null==(h=o[_]=o[_]||new hv).coordDim&&(h.coordDim=Kv(y,r,v),h.coordDimIndex=0,(!g||m<=0)&&(h.isExtraCoord=!0),m--),null==h.name&&(h.name=Kv(h.coordDim,a)),null!=h.type||Zv(t,_,h.name)!==Xv.Must&&(!h.isExtraCoord||null==h.otherDims.itemName&&null==h.otherDims.seriesName)||(h.type="ordinal")}return o},Qv=$v;var Jv=function(e,t){return Qv((t=t||{}).coordDimensions||[],e,{dimsDef:t.dimensionsDefine||e.dimensionsDefine,encodeDef:t.encodeDefine||e.encodeDefine,dimCount:t.dimensionsCount,encodeDefaulter:t.encodeDefaulter,generateCoord:t.generateCoord,generateCoordCount:t.generateCoordCount})},ey=Ge.createHashMap,ty=Ge.each;function ny(e){this.coordSysName=e,this.coordSysDims=[],this.axisMap=ey(),this.categoryAxisMap=ey(),this.firstCategoryDimIndex=null}var iy={cartesian2d:function(e,t,n,i){var a=e.getReferringComponents("xAxis")[0],r=e.getReferringComponents("yAxis")[0];t.coordSysDims=["x","y"],n.set("x",a),n.set("y",r),ay(a)&&(i.set("x",a),t.firstCategoryDimIndex=0),ay(r)&&(i.set("y",r),t.firstCategoryDimIndex,t.firstCategoryDimIndex=1)},singleAxis:function(e,t,n,i){var a=e.getReferringComponents("singleAxis")[0];t.coordSysDims=["single"],n.set("single",a),ay(a)&&(i.set("single",a),t.firstCategoryDimIndex=0)},polar:function(e,t,n,i){var a=e.getReferringComponents("polar")[0],r=a.findAxisModel("radiusAxis"),o=a.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],n.set("radius",r),n.set("angle",o),ay(r)&&(i.set("radius",r),t.firstCategoryDimIndex=0),ay(o)&&(i.set("angle",o),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},geo:function(e,t,n,i){t.coordSysDims=["lng","lat"]},parallel:function(e,t,n,i){var a=e.ecModel,r=a.getComponent("parallel",e.get("parallelIndex")),o=t.coordSysDims=r.dimensions.slice();ty(r.parallelAxisIndex,(function(e,r){var s=a.getComponent("parallelAxis",e),l=o[r];n.set(l,s),ay(s)&&null==t.firstCategoryDimIndex&&(i.set(l,s),t.firstCategoryDimIndex=r)}))}};function ay(e){return"category"===e.get("type")}var ry={getCoordSysInfoBySeries:function(e){var t=e.get("coordinateSystem"),n=new ny(t),i=iy[t];if(i)return i(e,n,n.axisMap,n.categoryAxisMap),n}},oy=Ge.each,sy=Ge.isString;function ly(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}var uy={enableDataStack:function(e,t,n){var i,a,r,o,s=(n=n||{}).byIndex,l=n.stackedCoordDimension,u=!(!e||!e.get("stack"));if(oy(t,(function(e,n){sy(e)&&(t[n]=e={name:e}),u&&!e.isExtraCoord&&(s||i||!e.ordinalMeta||(i=e),a||"ordinal"===e.type||"time"===e.type||l&&l!==e.coordDim||(a=e))})),!a||s||i||(s=!0),a){r="__\0ecstackresult",o="__\0ecstackedover",i&&(i.createInvertedIndices=!0);var c=a.coordDim,h=a.type,d=0;oy(t,(function(e){e.coordDim===c&&d++})),t.push({name:r,coordDim:c,coordDimIndex:d,type:h,isExtraCoord:!0,isCalculationCoord:!0}),d++,t.push({name:o,coordDim:o,coordDimIndex:d,type:h,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:a&&a.name,stackedByDimension:i&&i.name,isStackedByIndex:s,stackedOverDimension:o,stackResultDimension:r}},isDimensionStacked:ly,getStackedDimension:function(e,t){return ly(e,t)?e.getCalculationInfo("stackResultDimension"):t}},cy=bd.SOURCE_FORMAT_ORIGINAL,hy=cv.getDimensionTypeByAxis,dy=Bo.getDataItemValue,fy=ry.getCoordSysInfoBySeries,py=uy.enableDataStack,gy=of.makeSeriesEncodeForAxisCoordSys;var my=function(e,t,n){n=n||{},kd.isInstance(e)||(e=kd.seriesDataToSource(e));var i,a=t.get("coordinateSystem"),r=kf.get(a),o=fy(t);o&&(i=Ge.map(o.coordSysDims,(function(e){var t={name:e},n=o.axisMap.get(e);if(n){var i=n.get("type");t.type=hy(i)}return t}))),i||(i=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||["x","y"]);var s,l,u=Jv(e,{coordDimensions:i,generateCoord:n.generateCoord,encodeDefaulter:n.useEncodeDefaulter?Ge.curry(gy,i,t):null});o&&Ge.each(u,(function(e,t){var n=e.coordDim,i=o.categoryAxisMap.get(n);i&&(null==s&&(s=t),e.ordinalMeta=i.getOrdinalMeta()),null!=e.otherDims.itemName&&(l=!0)})),l||null==s||(u[s].otherDims.itemName=0);var c=py(t,u),h=new Bv(u,t);h.setCalculationInfo(c);var d=null!=s&&function(e){if(e.sourceFormat===cy){var t=function(e){var t=0;for(;t<e.length&&null==e[t];)t++;return e[t]}(e.data||[]);return null!=t&&!Ge.isArray(dy(t))}}(e)?function(e,t,n,i){return i===s?n:this.defaultDimValueGetter(e,t,n,i)}:null;return h.hasItemOption=!1,h.initData(e,null,d),h},vy=my;function yy(e){this._setting=e||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}yy.prototype.parse=function(e){return e},yy.prototype.getSetting=function(e){return this._setting[e]},yy.prototype.contain=function(e){var t=this._extent;return e>=t[0]&&e<=t[1]},yy.prototype.normalize=function(e){var t=this._extent;return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])},yy.prototype.scale=function(e){var t=this._extent;return e*(t[1]-t[0])+t[0]},yy.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1])},yy.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},yy.prototype.getExtent=function(){return this._extent.slice()},yy.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t)},yy.prototype.isBlank=function(){return this._isBlank},yy.prototype.setBlank=function(e){this._isBlank=e},yy.prototype.getLabel=null,Zo.enableClassExtend(yy),Zo.enableClassManagement(yy,{registerWhenExtend:!0});var _y=yy,xy=Ge.createHashMap,by=Ge.isObject,wy=Ge.map;function Sy(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this._map}Sy.createByAxisModel=function(e){var t=e.option,n=t.data,i=n&&wy(n,Iy);return new Sy({categories:i,needCollect:!i,deduplication:!1!==t.dedplication})};var My=Sy.prototype;function Ty(e){return e._map||(e._map=xy(e.categories))}function Iy(e){return by(e)&&null!=e.value?e.value:e+""}My.getOrdinal=function(e){return Ty(this).get(e)},My.parseAndCollect=function(e){var t,n=this._needCollect;if("string"!=typeof e&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var i=Ty(this);return null==(t=i.get(e))&&(n?(t=this.categories.length,this.categories[t]=e,i.set(e,t)):t=NaN),t};var Ay=Sy,Dy=_y.prototype,Cy=_y.extend({type:"ordinal",init:function(e,t){e&&!Ge.isArray(e)||(e=new Ay({categories:e})),this._ordinalMeta=e,this._extent=t||[0,e.categories.length-1]},parse:function(e){return"string"==typeof e?this._ordinalMeta.getOrdinal(e):Math.round(e)},contain:function(e){return e=this.parse(e),Dy.contain.call(this,e)&&null!=this._ordinalMeta.categories[e]},normalize:function(e){return Dy.normalize.call(this,this.parse(e))},scale:function(e){return Math.round(Dy.scale.call(this,e))},getTicks:function(){for(var e=[],t=this._extent,n=t[0];n<=t[1];)e.push(n),n++;return e},getLabel:function(e){if(!this.isBlank())return this._ordinalMeta.categories[e]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(e,t){this.unionExtent(e.getApproximateExtent(t))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:Ge.noop,niceExtent:Ge.noop});Cy.create=function(){return new Cy};var Oy=Cy,ky=Ph.round;function Ly(e){return Ph.getPrecisionSafe(e)+2}function Ey(e,t,n){e[t]=Math.max(Math.min(e[t],n[1]),n[0])}function Ny(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),Ey(e,0,t),Ey(e,1,t),e[0]>e[1]&&(e[0]=e[1])}var Py={intervalScaleNiceTicks:function(e,t,n,i){var a={},r=e[1]-e[0],o=a.interval=Ph.nice(r/t,!0);null!=n&&o<n&&(o=a.interval=n),null!=i&&o>i&&(o=a.interval=i);var s=a.intervalPrecision=Ly(o);return Ny(a.niceTickExtent=[ky(Math.ceil(e[0]/o)*o,s),ky(Math.floor(e[1]/o)*o,s)],e),a},getIntervalPrecision:Ly,fixExtent:Ny},Ry=Ph.round,zy=_y.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(e,t){var n=this._extent;isNaN(e)||(n[0]=parseFloat(e)),isNaN(t)||(n[1]=parseFloat(t))},unionExtent:function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1]),zy.prototype.setExtent.call(this,t[0],t[1])},getInterval:function(){return this._interval},setInterval:function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=Py.getIntervalPrecision(e)},getTicks:function(e){var t=this._interval,n=this._extent,i=this._niceExtent,a=this._intervalPrecision,r=[];if(!t)return r;n[0]<i[0]&&(e?r.push(Ry(i[0]-t,a)):r.push(n[0]));for(var o=i[0];o<=i[1]&&(r.push(o),(o=Ry(o+t,a))!==r[r.length-1]);)if(r.length>1e4)return[];var s=r.length?r[r.length-1]:i[1];return n[1]>s&&(e?r.push(Ry(s+t,a)):r.push(n[1])),r},getMinorTicks:function(e){for(var t=this.getTicks(!0),n=[],i=this.getExtent(),a=1;a<t.length;a++){for(var r=t[a],o=t[a-1],s=0,l=[],u=(r-o)/e;s<e-1;){var c=Ph.round(o+(s+1)*u);c>i[0]&&c<i[1]&&l.push(c),s++}n.push(l)}return n},getLabel:function(e,t){if(null==e)return"";var n=t&&t.precision;return null==n?n=Ph.getPrecisionSafe(e)||0:"auto"===n&&(n=this._intervalPrecision),e=Ry(e,n,!0),Xh.addCommas(e)},niceTicks:function(e,t,n){e=e||5;var i=this._extent,a=i[1]-i[0];if(isFinite(a)){a<0&&(a=-a,i.reverse());var r=Py.intervalScaleNiceTicks(i,e,t,n);this._intervalPrecision=r.intervalPrecision,this._interval=r.interval,this._niceExtent=r.niceTickExtent}},niceExtent:function(e){var t=this._extent;if(t[0]===t[1])if(0!==t[0]){var n=t[0];e.fixMax||(t[1]+=n/2),t[0]-=n/2}else t[1]=1;var i=t[1]-t[0];isFinite(i)||(t[0]=0,t[1]=1),this.niceTicks(e.splitNumber,e.minInterval,e.maxInterval);var a=this._interval;e.fixMin||(t[0]=Ry(Math.floor(t[0]/a)*a)),e.fixMax||(t[1]=Ry(Math.ceil(t[1]/a)*a))}});zy.create=function(){return new zy};var By=zy,Vy=Ph.parsePercent,Hy=uy.isDimensionStacked,Yy="__ec_stack_",Fy="undefined"!=typeof Float32Array?Float32Array:Array;function Gy(e){return e.get("stack")||Yy+e.seriesIndex}function Wy(e){return e.dim+e.index}function jy(e,t){var n=[];return t.eachSeriesByType(e,(function(e){Ky(e)&&!$y(e)&&n.push(e)})),n}function Uy(e){var t=function(e){var t={};Ge.each(e,(function(e){var n=e.coordinateSystem.getBaseAxis();if("time"===n.type||"value"===n.type)for(var i=e.getData(),a=n.dim+"_"+n.index,r=i.mapDimension(n.dim),o=0,s=i.count();o<s;++o){var l=i.get(r,o);t[a]?t[a].push(l):t[a]=[l]}}));var n=[];for(var i in t)if(t.hasOwnProperty(i)){var a=t[i];if(a){a.sort((function(e,t){return e-t}));for(var r=null,o=1;o<a.length;++o){var s=a[o]-a[o-1];s>0&&(r=null===r?s:Math.min(r,s))}n[i]=r}}return n}(e),n=[];return Ge.each(e,(function(e){var i,a=e.coordinateSystem.getBaseAxis(),r=a.getExtent();if("category"===a.type)i=a.getBandWidth();else if("value"===a.type||"time"===a.type){var o=a.dim+"_"+a.index,s=t[o],l=Math.abs(r[1]-r[0]),u=a.scale.getExtent(),c=Math.abs(u[1]-u[0]);i=s?l/c*s:l}else{var h=e.getData();i=Math.abs(r[1]-r[0])/h.count()}var d=Vy(e.get("barWidth"),i),f=Vy(e.get("barMaxWidth"),i),p=Vy(e.get("barMinWidth")||1,i),g=e.get("barGap"),m=e.get("barCategoryGap");n.push({bandWidth:i,barWidth:d,barMaxWidth:f,barMinWidth:p,barGap:g,barCategoryGap:m,axisKey:Wy(a),stackId:Gy(e)})})),Zy(n)}function Zy(e){var t={};Ge.each(e,(function(e,n){var i=e.axisKey,a=e.bandWidth,r=t[i]||{bandWidth:a,remainedWidth:a,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},o=r.stacks;t[i]=r;var s=e.stackId;o[s]||r.autoWidthCount++,o[s]=o[s]||{width:0,maxWidth:0};var l=e.barWidth;l&&!o[s].width&&(o[s].width=l,l=Math.min(r.remainedWidth,l),r.remainedWidth-=l);var u=e.barMaxWidth;u&&(o[s].maxWidth=u);var c=e.barMinWidth;c&&(o[s].minWidth=c);var h=e.barGap;null!=h&&(r.gap=h);var d=e.barCategoryGap;null!=d&&(r.categoryGap=d)}));var n={};return Ge.each(t,(function(e,t){n[t]={};var i=e.stacks,a=e.bandWidth,r=Vy(e.categoryGap,a),o=Vy(e.gap,1),s=e.remainedWidth,l=e.autoWidthCount,u=(s-r)/(l+(l-1)*o);u=Math.max(u,0),Ge.each(i,(function(e){var t=e.maxWidth,n=e.minWidth;if(e.width){i=e.width;t&&(i=Math.min(i,t)),n&&(i=Math.max(i,n)),e.width=i,s-=i+o*i,l--}else{var i=u;t&&t<i&&(i=Math.min(t,s)),n&&n>i&&(i=n),i!==u&&(e.width=i,s-=i+o*i,l--)}})),u=(s-r)/(l+(l-1)*o),u=Math.max(u,0);var c,h=0;Ge.each(i,(function(e,t){e.width||(e.width=u),c=e,h+=e.width*(1+o)})),c&&(h-=c.width*o);var d=-h/2;Ge.each(i,(function(e,i){n[t][i]=n[t][i]||{bandWidth:a,offset:d,width:e.width},d+=e.width*(1+o)}))})),n}function Xy(e,t,n){if(e&&t){var i=e[Wy(t)];return null!=i&&null!=n&&(i=i[Gy(n)]),i}}var qy={seriesType:"bar",plan:gg(),reset:function(e){if(Ky(e)&&$y(e)){var t=e.getData(),n=e.coordinateSystem,i=n.grid.getRect(),a=n.getBaseAxis(),r=n.getOtherAxis(a),o=t.mapDimension(r.dim),s=t.mapDimension(a.dim),l=r.isHorizontal(),u=l?0:1,c=Xy(Uy([e]),a,e).width;return c>.5||(c=.5),{progress:function(e,t){var h,d=e.count,f=new Fy(2*d),p=new Fy(2*d),g=new Fy(d),m=[],v=[],y=0,_=0;for(;null!=(h=e.next());)v[u]=t.get(o,h),v[1-u]=t.get(s,h),m=n.dataToPoint(v,null,m),p[y]=l?i.x+i.width:m[0],f[y++]=m[0],p[y]=l?m[1]:i.y+i.height,f[y++]=m[1],g[_++]=h;t.setLayout({largePoints:f,largeDataIndices:g,largeBackgroundPoints:p,barWidth:c,valueAxisStart:Qy(a,r),backgroundStart:l?i.x:i.y,valueAxisHorizontal:l})}}}}};function Ky(e){return e.coordinateSystem&&"cartesian2d"===e.coordinateSystem.type}function $y(e){return e.pipelineContext&&e.pipelineContext.large}function Qy(e,t,n){return t.toGlobalCoord(t.dataToCoord("log"===t.type?1:0))}var Jy=function(e){var t=[],n=e.axis,i="axis0";if("category"===n.type){for(var a=n.getBandWidth(),r=0;r<e.count;r++)t.push(Ge.defaults({bandWidth:a,axisKey:i,stackId:Yy+r},e));var o=Zy(t),s=[];for(r=0;r<e.count;r++){var l=o[i][Yy+r];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}},e_=function(e,t){var n=jy(e,t),i=Uy(n),a={};Ge.each(n,(function(e){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),o=Gy(e),s=i[Wy(r)][o],l=s.offset,u=s.width,c=n.getOtherAxis(r),h=e.get("barMinHeight")||0;a[o]=a[o]||[],t.setLayout({bandWidth:s.bandWidth,offset:l,size:u});for(var d=t.mapDimension(c.dim),f=t.mapDimension(r.dim),p=Hy(t,d),g=c.isHorizontal(),m=Qy(r,c),v=0,y=t.count();v<y;v++){var _,x,b,w,S,M=t.get(d,v),T=t.get(f,v),I=M>=0?"p":"n",A=m;if(p&&(a[o][T]||(a[o][T]={p:m,n:m}),A=a[o][T][I]),g)_=A,x=(S=n.dataToPoint([M,T]))[1]+l,b=S[0]-m,w=u,Math.abs(b)<h&&(b=(b<0?-1:1)*h),isNaN(b)||p&&(a[o][T][I]+=b);else _=(S=n.dataToPoint([T,M]))[0]+l,x=A,b=u,w=S[1]-m,Math.abs(w)<h&&(w=(w<=0?-1:1)*h),isNaN(w)||p&&(a[o][T][I]+=w);t.setItemLayout(v,{x:_,y:x,width:b,height:w})}}),this)},t_={getLayoutOnAxis:Jy,prepareLayoutBarSeries:jy,makeColumnLayout:Uy,retrieveColumnLayout:Xy,layout:e_,largeLayout:qy},n_=By.prototype,i_=Math.ceil,a_=Math.floor,r_=1e3,o_=6e4,s_=36e5,l_=864e5,u_=By.extend({type:"time",getLabel:function(e){var t=this._stepLvl,n=new Date(e);return Xh.formatTime(t[0],n,this.getSetting("useUTC"))},niceExtent:function(e){var t=this._extent;if(t[0]===t[1]&&(t[0]-=l_,t[1]+=l_),t[1]===-1/0&&t[0]===1/0){var n=new Date;t[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),t[0]=t[1]-l_}this.niceTicks(e.splitNumber,e.minInterval,e.maxInterval);var i=this._interval;e.fixMin||(t[0]=Ph.round(a_(t[0]/i)*i)),e.fixMax||(t[1]=Ph.round(i_(t[1]/i)*i))},niceTicks:function(e,t,n){e=e||10;var i=this._extent,a=i[1]-i[0],r=a/e;null!=t&&r<t&&(r=t),null!=n&&r>n&&(r=n);var o=c_.length,s=function(e,t,n,i){for(;n<i;){var a=n+i>>>1;e[a][1]<t?n=a+1:i=a}return n}(c_,r,0,o),l=c_[Math.min(s,o-1)],u=l[1];if("year"===l[0]){var c=a/u;u*=Ph.nice(c/e,!0)}var h=this.getSetting("useUTC")?0:60*new Date(+i[0]||+i[1]).getTimezoneOffset()*1e3,d=[Math.round(i_((i[0]-h)/u)*u+h),Math.round(a_((i[1]-h)/u)*u+h)];Py.fixExtent(d,i),this._stepLvl=l,this._interval=u,this._niceExtent=d},parse:function(e){return+Ph.parseDate(e)}});Ge.each(["contain","normalize"],(function(e){u_.prototype[e]=function(t){return n_[e].call(this,this.parse(t))}}));var c_=[["hh:mm:ss",r_],["hh:mm:ss",5e3],["hh:mm:ss",1e4],["hh:mm:ss",15e3],["hh:mm:ss",3e4],["hh:mm\nMM-dd",o_],["hh:mm\nMM-dd",3e5],["hh:mm\nMM-dd",6e5],["hh:mm\nMM-dd",9e5],["hh:mm\nMM-dd",18e5],["hh:mm\nMM-dd",s_],["hh:mm\nMM-dd",72e5],["hh:mm\nMM-dd",216e5],["hh:mm\nMM-dd",432e5],["MM-dd\nyyyy",l_],["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]];u_.create=function(e){return new u_({useUTC:e.ecModel.get("useUTC")})};var h_=_y.prototype,d_=By.prototype,f_=Ph.getPrecisionSafe,p_=Ph.round,g_=Math.floor,m_=Math.ceil,v_=Math.pow,y_=Math.log,__=_y.extend({type:"log",base:10,$constructor:function(){_y.apply(this,arguments),this._originalScale=new By},getTicks:function(e){var t=this._originalScale,n=this._extent,i=t.getExtent();return Ge.map(d_.getTicks.call(this,e),(function(e){var a=Ph.round(v_(this.base,e));return a=e===n[0]&&t.__fixMin?x_(a,i[0]):a,a=e===n[1]&&t.__fixMax?x_(a,i[1]):a}),this)},getMinorTicks:d_.getMinorTicks,getLabel:d_.getLabel,scale:function(e){return e=h_.scale.call(this,e),v_(this.base,e)},setExtent:function(e,t){var n=this.base;e=y_(e)/y_(n),t=y_(t)/y_(n),d_.setExtent.call(this,e,t)},getExtent:function(){var e=this.base,t=h_.getExtent.call(this);t[0]=v_(e,t[0]),t[1]=v_(e,t[1]);var n=this._originalScale,i=n.getExtent();return n.__fixMin&&(t[0]=x_(t[0],i[0])),n.__fixMax&&(t[1]=x_(t[1],i[1])),t},unionExtent:function(e){this._originalScale.unionExtent(e);var t=this.base;e[0]=y_(e[0])/y_(t),e[1]=y_(e[1])/y_(t),h_.unionExtent.call(this,e)},unionExtentFromData:function(e,t){this.unionExtent(e.getApproximateExtent(t))},niceTicks:function(e){e=e||10;var t=this._extent,n=t[1]-t[0];if(!(n===1/0||n<=0)){var i=Ph.quantity(n);for(e/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var a=[Ph.round(m_(t[0]/i)*i),Ph.round(g_(t[1]/i)*i)];this._interval=i,this._niceExtent=a}},niceExtent:function(e){d_.niceExtent.call(this,e);var t=this._originalScale;t.__fixMin=e.fixMin,t.__fixMax=e.fixMax}});function x_(e,t){return p_(e,f_(t))}Ge.each(["contain","normalize"],(function(e){__.prototype[e]=function(t){return t=y_(t)/y_(this.base),h_[e].call(this,t)}})),__.create=function(){return new __};var b_=__,w_=t_.prepareLayoutBarSeries,S_=t_.makeColumnLayout,M_=t_.retrieveColumnLayout;function T_(e,t){var n,i,a,r=e.type,o=t.getMin(),s=t.getMax(),l=e.getExtent();"ordinal"===r?n=t.getCategories().length:(i=t.get("boundaryGap"),Ge.isArray(i)||(i=[i||0,i||0]),"boolean"==typeof i[0]&&(i=[0,0]),i[0]=Ph.parsePercent(i[0],1),i[1]=Ph.parsePercent(i[1],1),a=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,c=null!=s;null==o&&(o="ordinal"===r?n?0:NaN:l[0]-i[0]*a),null==s&&(s="ordinal"===r?n?n-1:NaN:l[1]+i[1]*a),(null==o||!isFinite(o))&&(o=NaN),(null==s||!isFinite(s))&&(s=NaN),e.setBlank(Ge.eqNaN(o)||Ge.eqNaN(s)||"ordinal"===r&&!e.getOrdinalMeta().categories.length),t.getNeedCrossZero()&&(o>0&&s>0&&!u&&(o=0),o<0&&s<0&&!c&&(s=0));var h=t.ecModel;if(h&&"time"===r){var d,f=w_("bar",h);if(Ge.each(f,(function(e){d|=e.getBaseAxis()===t.axis})),d){var p=S_(f),g=function(e,t,n,i){var a=n.axis.getExtent(),r=a[1]-a[0],o=M_(i,n.axis);if(void 0===o)return{min:e,max:t};var s=1/0;Ge.each(o,(function(e){s=Math.min(e.offset,s)}));var l=-1/0;Ge.each(o,(function(e){l=Math.max(e.offset+e.width,l)})),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=t-e,h=c/(1-(s+l)/r)-c;return t+=h*(l/u),e-=h*(s/u),{min:e,max:t}}(o,s,t,p);o=g.min,s=g.max}}return{extent:[o,s],fixMin:u,fixMax:c}}function I_(e){var t,n=e.getLabelModel().get("formatter"),i="category"===e.type?e.scale.getExtent()[0]:null;return"string"==typeof n?(t=n,n=function(n){return n=e.scale.getLabel(n),t.replace("{value}",null!=n?n:"")}):"function"==typeof n?function(t,a){return null!=i&&(a=t-i),n(A_(e,t),a)}:function(t){return e.scale.getLabel(t)}}function A_(e,t){return"category"===e.type?e.scale.getLabel(t):t}function D_(e,t){var n=t*Math.PI/180,i=e.plain(),a=i.width,r=i.height,o=a*Math.cos(n)+r*Math.sin(n),s=a*Math.sin(n)+r*Math.cos(n);return new Pi(i.x,i.y,o,s)}function C_(e){var t=e.get("interval");return null==t?"auto":t}var O_=function(e,t){var n=T_(e,t),i=n.extent,a=t.get("splitNumber");"log"===e.type&&(e.base=t.get("logBase"));var r=e.type;e.setExtent(i[0],i[1]),e.niceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:"interval"===r||"time"===r?t.get("minInterval"):null,maxInterval:"interval"===r||"time"===r?t.get("maxInterval"):null});var o=t.get("interval");null!=o&&e.setInterval&&e.setInterval(o)},k_=function(e,t){if(t=t||e.get("type"))switch(t){case"category":return new Oy(e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),[1/0,-1/0]);case"value":return new By;default:return(_y.getClass(t)||By).create(e)}},L_=function(e){var t=e.scale.getExtent(),n=t[0],i=t[1];return!(n>0&&i>0||n<0&&i<0)},E_=function(e){var t=e.model,n=e.scale;if(t.get("axisLabel.show")&&!n.isBlank()){var i,a,r="category"===e.type,o=n.getExtent();a=r?n.count():(i=n.getTicks()).length;var s,l=e.getLabelModel(),u=I_(e),c=1;a>40&&(c=Math.ceil(a/40));for(var h=0;h<a;h+=c){var d=u(i?i[h]:o[0]+h),f=D_(l.getTextRect(d),l.get("rotate")||0);s?s.union(f):s=f}return s}},N_={getScaleExtent:T_,niceScaleExtent:O_,createScaleByModel:k_,ifAxisCrossZero:L_,makeLabelFormatter:I_,getAxisRawValue:A_,estimateLabelUnionRect:E_,getOptionCategoryInterval:C_,shouldShowAllLabels:function(e){return"category"===e.type&&0===C_(e.getLabelModel())}},P_={getMin:function(e){var t=this.option,n=e||null==t.rangeStart?t.min:t.rangeStart;return this.axis&&null!=n&&"dataMin"!==n&&"function"!=typeof n&&!Ge.eqNaN(n)&&(n=this.axis.scale.parse(n)),n},getMax:function(e){var t=this.option,n=e||null==t.rangeEnd?t.max:t.rangeEnd;return this.axis&&null!=n&&"dataMax"!==n&&"function"!=typeof n&&!Ge.eqNaN(n)&&(n=this.axis.scale.parse(n)),n},getNeedCrossZero:function(){var e=this.option;return null==e.rangeStart&&null==e.rangeEnd&&!e.scale},getCoordSysModel:Ge.noop,setRange:function(e,t){this.option.rangeStart=e,this.option.rangeEnd=t},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},R_=P_,z_=Za.calculateTextPosition,B_=rh.extendShape({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,i=t.cy,a=t.width/2,r=t.height/2;e.moveTo(n,i-r),e.lineTo(n+a,i+r),e.lineTo(n-a,i+r),e.closePath()}}),V_=rh.extendShape({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,i=t.cy,a=t.width/2,r=t.height/2;e.moveTo(n,i-r),e.lineTo(n+a,i),e.lineTo(n,i+r),e.lineTo(n-a,i),e.closePath()}}),H_=rh.extendShape({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,i=t.y,a=t.width/5*3,r=Math.max(a,t.height),o=a/2,s=o*o/(r-o),l=i-r+o+s,u=Math.asin(s/o),c=Math.cos(u)*o,h=Math.sin(u),d=Math.cos(u),f=.6*o,p=.7*o;e.moveTo(n-c,l+s),e.arc(n,l,o,Math.PI-u,2*Math.PI+u),e.bezierCurveTo(n+c-h*f,l+s+d*f,n,i-p,n,i),e.bezierCurveTo(n,i-p,n-c+h*f,l+s+d*f,n-c,l+s),e.closePath()}}),Y_=rh.extendShape({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,i=t.width,a=t.x,r=t.y,o=i/3*2;e.moveTo(a,r),e.lineTo(a+o,r+n),e.lineTo(a,r+n/4*3),e.lineTo(a-o,r+n),e.lineTo(a,r),e.closePath()}}),F_={line:rh.Line,rect:rh.Rect,roundRect:rh.Rect,square:rh.Rect,circle:rh.Circle,diamond:V_,pin:H_,arrow:Y_,triangle:B_},G_={line:function(e,t,n,i,a){a.x1=e,a.y1=t+i/2,a.x2=e+n,a.y2=t+i/2},rect:function(e,t,n,i,a){a.x=e,a.y=t,a.width=n,a.height=i},roundRect:function(e,t,n,i,a){a.x=e,a.y=t,a.width=n,a.height=i,a.r=Math.min(n,i)/4},square:function(e,t,n,i,a){var r=Math.min(n,i);a.x=e,a.y=t,a.width=r,a.height=r},circle:function(e,t,n,i,a){a.cx=e+n/2,a.cy=t+i/2,a.r=Math.min(n,i)/2},diamond:function(e,t,n,i,a){a.cx=e+n/2,a.cy=t+i/2,a.width=n,a.height=i},pin:function(e,t,n,i,a){a.x=e+n/2,a.y=t+i/2,a.width=n,a.height=i},arrow:function(e,t,n,i,a){a.x=e+n/2,a.y=t+i/2,a.width=n,a.height=i},triangle:function(e,t,n,i,a){a.cx=e+n/2,a.cy=t+i/2,a.width=n,a.height=i}},W_={};Ge.each(F_,(function(e,t){W_[t]=new e}));var j_=rh.extendShape({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var i=z_(e,t,n),a=this.shape;return a&&"pin"===a.symbolType&&"inside"===t.textPosition&&(i.y=n.y+.4*n.height),i},buildPath:function(e,t,n){var i=t.symbolType;if("none"!==i){var a=W_[i];a||(a=W_[i="rect"]),G_[i](t.x,t.y,t.width,t.height,a.shape),a.buildPath(e,a.shape,n)}}});function U_(e,t){if("image"!==this.type){var n=this.style,i=this.shape;i&&"line"===i.symbolType?n.stroke=e:this.__isEmptyBrush?(n.stroke=e,n.fill=t||"#fff"):(n.fill&&(n.fill=e),n.stroke&&(n.stroke=e)),this.dirty(!1)}}var Z_=function(e,t,n,i,a,r,o){var s,l=0===e.indexOf("empty");return l&&(e=e.substr(5,1).toLowerCase()+e.substr(6)),(s=0===e.indexOf("image://")?rh.makeImage(e.slice(8),new Pi(t,n,i,a),o?"center":"cover"):0===e.indexOf("path://")?rh.makePath(e.slice(7),{},new Pi(t,n,i,a),o?"center":"cover"):new j_({shape:{symbolType:e,x:t,y:n,width:i,height:a}})).__isEmptyBrush=l,s.setColor=U_,s.setColor(r),s},X_={createSymbol:Z_},q_=sd.getLayoutRect,K_=uy.enableDataStack,$_=uy.isDimensionStacked,Q_=uy.getStackedDimension;var J_=function(e,t){var n=t;xh.isInstance(t)||(n=new xh(t),Ge.mixin(n,R_));var i=N_.createScaleByModel(n);return i.setExtent(e[0],e[1]),N_.niceScaleExtent(i,n),i},ex=function(e){Ge.mixin(e,R_)},tx={getLayoutRect:q_,completeDimensions:Qv,createDimensions:Jv,createSymbol:X_.createSymbol,createList:function(e){return vy(e.getSource(),e)},dataStack:{isDimensionStacked:$_,enableDataStack:K_,getStackedDimension:Q_},createScale:J_,mixinAxisModelCommonMethods:ex},nx=1e-8;function ix(e,t){return Math.abs(e-t)<nx}var ax=function(e,t,n){var i=0,a=e[0];if(!a)return!1;for(var r=1;r<e.length;r++){var o=e[r];i+=ul(a[0],a[1],o[0],o[1],t,n),a=o}var s=e[0];return ix(a[0],s[0])&&ix(a[1],s[1])||(i+=ul(a[0],a[1],s[0],s[1],t,n)),0!==i},rx={contain:ax};function ox(e,t,n){if(this.name=e,this.geometries=t,n)n=[n[0],n[1]];else{var i=this.getBoundingRect();n=[i.x+i.width/2,i.y+i.height/2]}this.center=n}ox.prototype={constructor:ox,properties:null,getBoundingRect:function(){var e=this._rect;if(e)return e;for(var t=Number.MAX_VALUE,n=[t,t],i=[-t,-t],a=[],r=[],o=this.geometries,s=0;s<o.length;s++)if("polygon"===o[s].type){var l=o[s].exterior;Bs.fromPoints(l,a,r),dt.min(n,n,a),dt.max(i,i,r)}return 0===s&&(n[0]=n[1]=i[0]=i[1]=0),this._rect=new Pi(n[0],n[1],i[0]-n[0],i[1]-n[1])},contain:function(e){var t=this.getBoundingRect(),n=this.geometries;if(!t.contain(e[0],e[1]))return!1;e:for(var i=0,a=n.length;i<a;i++)if("polygon"===n[i].type){var r=n[i].exterior,o=n[i].interiors;if(rx.contain(r,e[0],e[1])){for(var s=0;s<(o?o.length:0);s++)if(rx.contain(o[s]))continue e;return!0}}return!1},transformTo:function(e,t,n,i){var a=this.getBoundingRect(),r=a.width/a.height;n?i||(i=n/r):n=r*i;for(var o=new Pi(e,t,n,i),s=a.calculateTransform(o),l=this.geometries,u=0;u<l.length;u++)if("polygon"===l[u].type){for(var c=l[u].exterior,h=l[u].interiors,d=0;d<c.length;d++)dt.applyTransform(c[d],c[d],s);for(var f=0;f<(h?h.length:0);f++)for(d=0;d<h[f].length;d++)dt.applyTransform(h[f][d],h[f][d],s)}(a=this._rect).copy(o),this.center=[a.x+a.width/2,a.y+a.height/2]},cloneShallow:function(e){null==e&&(e=this.name);var t=new ox(e,this.geometries,this.center);return t._rect=this._rect,t.transformTo=null,t}};var sx=ox;function lx(e,t,n){for(var i=[],a=t[0],r=t[1],o=0;o<e.length;o+=2){var s=e.charCodeAt(o)-64,l=e.charCodeAt(o+1)-64;s=s>>1^-(1&s),l=l>>1^-(1&l),a=s+=a,r=l+=r,i.push([s/n,l/n])}return i}var ux=function(e,t){return function(e){if(!e.UTF8Encoding)return e;var t=e.UTF8Scale;null==t&&(t=1024);for(var n=e.features,i=0;i<n.length;i++)for(var a=n[i].geometry,r=a.coordinates,o=a.encodeOffsets,s=0;s<r.length;s++){var l=r[s];if("Polygon"===a.type)r[s]=lx(l,o[s],t);else if("MultiPolygon"===a.type)for(var u=0;u<l.length;u++){var c=l[u];l[u]=lx(c,o[s][u],t)}}e.UTF8Encoding=!1}(e),Ge.map(Ge.filter(e.features,(function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0})),(function(e){var n=e.properties,i=e.geometry,a=i.coordinates,r=[];"Polygon"===i.type&&r.push({type:"polygon",exterior:a[0],interiors:a.slice(1)}),"MultiPolygon"===i.type&&Ge.each(a,(function(e){e[0]&&r.push({type:"polygon",exterior:e[0],interiors:e.slice(1)})}));var o=new sx(n[t||"name"],r,n.cp);return o.properties=n,o}))},cx=Bo.makeInner,hx=N_.makeLabelFormatter,dx=N_.getOptionCategoryInterval,fx=N_.shouldShowAllLabels,px=cx();function gx(e,t){var n,i,a=mx(e,"labels"),r=dx(t),o=vx(a,r);return o||(Ge.isFunction(r)?n=xx(e,r):(i="auto"===r?function(e){var t=px(e).autoInterval;return null!=t?t:px(e).autoInterval=e.calculateCategoryInterval()}(e):r,n=_x(e,i)),yx(a,r,{labels:n,labelCategoryInterval:i}))}function mx(e,t){return px(e)[t]||(px(e)[t]=[])}function vx(e,t){for(var n=0;n<e.length;n++)if(e[n].key===t)return e[n].value}function yx(e,t,n){return e.push({key:t,value:n}),n}function _x(e,t,n){var i=hx(e),a=e.scale,r=a.getExtent(),o=e.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=r[0],c=a.count();0!==u&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=fx(e),d=o.get("showMinLabel")||h,f=o.get("showMaxLabel")||h;d&&u!==r[0]&&g(r[0]);for(var p=u;p<=r[1];p+=l)g(p);function g(e){s.push(n?e:{formattedLabel:i(e),rawLabel:a.getLabel(e),tickValue:e})}return f&&p-l!==r[1]&&g(r[1]),s}function xx(e,t,n){var i=e.scale,a=hx(e),r=[];return Ge.each(i.getTicks(),(function(e){var o=i.getLabel(e);t(e,o)&&r.push(n?e:{formattedLabel:a(e),rawLabel:o,tickValue:e})})),r}var bx={createAxisLabels:function(e){return"category"===e.type?function(e){var t=e.getLabelModel(),n=gx(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(e):function(e){var t=e.scale.getTicks(),n=hx(e);return{labels:Ge.map(t,(function(t,i){return{formattedLabel:n(t,i),rawLabel:e.scale.getLabel(t),tickValue:t}}))}}(e)},createAxisTicks:function(e,t){return"category"===e.type?function(e,t){var n,i,a=mx(e,"ticks"),r=dx(t),o=vx(a,r);if(o)return o;t.get("show")&&!e.scale.isBlank()||(n=[]);if(Ge.isFunction(r))n=xx(e,r,!0);else if("auto"===r){var s=gx(e,e.getLabelModel());i=s.labelCategoryInterval,n=Ge.map(s.labels,(function(e){return e.tickValue}))}else n=_x(e,i=r,!0);return yx(a,r,{ticks:n,tickCategoryInterval:i})}(e,t):{ticks:e.scale.getTicks()}},calculateCategoryInterval:function(e){var t=function(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}(e),n=hx(e),i=(t.axisRotate-t.labelRotate)/180*Math.PI,a=e.scale,r=a.getExtent(),o=a.count();if(r[1]-r[0]<1)return 0;var s=1;o>40&&(s=Math.max(1,Math.floor(o/40)));for(var l=r[0],u=e.dataToCoord(l+1)-e.dataToCoord(l),c=Math.abs(u*Math.cos(i)),h=Math.abs(u*Math.sin(i)),d=0,f=0;l<=r[1];l+=s){var p,g,m=Za.getBoundingRect(n(l),t.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/c,y=f/h;isNaN(v)&&(v=1/0),isNaN(y)&&(y=1/0);var _=Math.max(0,Math.floor(Math.min(v,y))),x=px(e.model),b=e.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]),_}},Sx=Ge.each,Mx=Ge.map,Tx=Ph.linearMap,Ix=Ph.getPixelPrecision,Ax=Ph.round,Dx=bx.createAxisTicks,Cx=bx.createAxisLabels,Ox=bx.calculateCategoryInterval,kx=[0,1],Lx=function(e,t,n){this.dim=e,this.scale=t,this._extent=n||[0,0],this.inverse=!1,this.onBand=!1};function Ex(e,t){var n=(e[1]-e[0])/t/2;e[0]+=n,e[1]-=n}Lx.prototype={constructor:Lx,contain:function(e){var t=this._extent,n=Math.min(t[0],t[1]),i=Math.max(t[0],t[1]);return e>=n&&e<=i},containData:function(e){return this.scale.contain(e)},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(e){return Ix(e||this.scale.getExtent(),this._extent)},setExtent:function(e,t){var n=this._extent;n[0]=e,n[1]=t},dataToCoord:function(e,t){var n=this._extent,i=this.scale;return e=i.normalize(e),this.onBand&&"ordinal"===i.type&&Ex(n=n.slice(),i.count()),Tx(e,kx,n,t)},coordToData:function(e,t){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&Ex(n=n.slice(),i.count());var a=Tx(e,n,kx,t);return this.scale.scale(a)},pointToData:function(e,t){},getTicksCoords:function(e){var t=(e=e||{}).tickModel||this.getTickModel(),n=Dx(this,t).ticks,i=Mx(n,(function(e){return{coord:this.dataToCoord(e),tickValue:e}}),this);return function(e,t,n,i){var a=t.length;if(!e.onBand||n||!a)return;var r,o,s=e.getExtent();if(1===a)t[0].coord=s[0],r=t[1]={coord:s[0]};else{var l=t[a-1].tickValue-t[0].tickValue,u=(t[a-1].coord-t[0].coord)/l;Sx(t,(function(e){e.coord-=u/2})),o=1+e.scale.getExtent()[1]-t[a-1].tickValue,r={coord:t[a-1].coord+u*o},t.push(r)}var c=s[0]>s[1];h(t[0].coord,s[0])&&(i?t[0].coord=s[0]:t.shift());i&&h(s[0],t[0].coord)&&t.unshift({coord:s[0]});h(s[1],r.coord)&&(i?r.coord=s[1]:t.pop());i&&h(r.coord,s[1])&&t.push({coord:s[1]});function h(e,t){return e=Ax(e),t=Ax(t),c?e>t:e<t}}(this,i,t.get("alignWithLabel"),e.clamp),i},getMinorTicksCoords:function(){if("ordinal"===this.scale.type)return[];var e=this.model.getModel("minorTick").get("splitNumber");e>0&&e<100||(e=5);var t=this.scale.getMinorTicks(e);return Mx(t,(function(e){return Mx(e,(function(e){return{coord:this.dataToCoord(e),tickValue:e}}),this)}),this)},getViewLabels:function(){return Cx(this).labels},getLabelModel:function(){return this.model.getModel("axisLabel")},getTickModel:function(){return this.model.getModel("axisTick")},getBandWidth:function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(e[1]-e[0]);return Math.abs(i)/n},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return Ox(this)}};var Nx=Lx,Px=So,Rx=ln,zx=dt,Bx=qn,Vx=Ph,Hx=Xh,Yx=Lg.throttle,Fx=tx,Gx=ux,Wx=Bv,jx=xh,Ux=Nx,Zx=oe,Xx=ux,qx={};Ge.each(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],(function(e){qx[e]=Ge[e]}));var Kx={};Ge.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(e){Kx[e]=rh[e]}));var $x={zrender:Px,matrix:Rx,vector:zx,color:Bx,number:Vx,format:Hx,throttle:Yx,helper:Fx,parseGeoJSON:Gx,List:Wx,Model:jx,Axis:Ux,env:Zx,parseGeoJson:Xx,util:qx,graphic:Kx},Qx=ne((function(e,t){var n=Lg.throttle,i=Ge.assert,a=Ge.each,r=Ge.isFunction,o=Ge.isObject,s=fd.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",c="__optionUpdated",h=/^[a-zA-Z0-9_]+$/;function d(e,t){return function(n,i,a){t||!this._disposed?(n=n&&n.toLowerCase(),_t.prototype[e].call(this,n,i,a)):this.id}}function f(){_t.call(this)}function p(e,t,i){i=i||{},"string"==typeof t&&(t=B[t]),this.id,this.group,this._dom=e;var a=this._zr=So.init(e,{renderer:i.renderer||"canvas",devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height});this._throttledZrFlush=n(Ge.bind(a.flush,a),17),(t=Ge.clone(t))&&rp(t,!0),this._theme=t,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new kf;var r,o,s=this._api=(o=(r=this)._coordSysMgr,Ge.extend(new Df(r),{getCoordinateSystems:Ge.bind(o.getCoordinateSystems,o),getComponentByElement:function(e){for(;e;){var t=e.__ecComponentInfo;if(null!=t)return r._model.getComponent(t.mainType,t.index);e=e.parent}}}));function l(e,t){return e.__prio-t.__prio}ji(z,l),ji(N,l),this._scheduler=new pm(this,s,N,z),_t.call(this,this._ecEventProcessor=new k),this._messageCenter=new f,this._initEvents(),this.resize=Ge.bind(this.resize,this),this._pendingActions=[],a.animation.on("frame",this._onframe,this),function(e,t){e.on("rendered",(function(){t.trigger("rendered"),!e.animation.isFinished()||t[c]||t._scheduler.unfinished||t._pendingActions.length||t.trigger("finished")}))}(a,this),Ge.setAsPrimitive(this)}f.prototype.on=d("on",!0),f.prototype.off=d("off",!0),f.prototype.one=d("one",!0),Ge.mixin(f,_t);var g=p.prototype;function m(e,t,n){if(this._disposed)this.id;else{var i,a=this._model,r=this._coordSysMgr.getCoordinateSystems();t=Bo.parseFinder(a,t);for(var o=0;o<r.length;o++){var s=r[o];if(s[e]&&null!=(i=s[e](a,t,n)))return i}}}g._onframe=function(){if(!this._disposed){var e=this._scheduler;if(this[c]){var t=this[c].silent;this[u]=!0,y(this),v.update.call(this),this[u]=!1,this[c]=!1,w.call(this,t),S.call(this,t)}else if(e.unfinished){var n=1,i=this._model,a=this._api;e.unfinished=!1;do{var r=+new Date;e.performSeriesTasks(i),e.performDataProcessorTasks(i),x(this,i),e.performVisualTasks(i),A(this,this._model,a,"remain"),n-=+new Date-r}while(n>0&&e.unfinished);e.unfinished||this._zr.flush()}}},g.getDom=function(){return this._dom},g.getZr=function(){return this._zr},g.setOption=function(e,t,n){if(this._disposed)this.id;else{var i;if(o(t)&&(n=t.lazyUpdate,i=t.silent,t=t.notMerge),this[u]=!0,!this._model||t){var a=new Hf(this._api),r=this._theme,s=this._model=new If;s.scheduler=this._scheduler,s.init(null,null,r,a)}this._model.setOption(e,P),n?(this[c]={silent:i},this[u]=!1):(y(this),v.update.call(this),this._zr.flush(),this[c]=!1,this[u]=!1,w.call(this,i),S.call(this,i))}},g.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},g.getModel=function(){return this._model},g.getOption=function(){return this._model&&this._model.getOption()},g.getWidth=function(){return this._zr.getWidth()},g.getHeight=function(){return this._zr.getHeight()},g.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},g.getRenderedCanvas=function(e){if(oe.canvasSupported)return(e=e||{}).pixelRatio=e.pixelRatio||1,e.backgroundColor=e.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(e)},g.getSvgDataURL=function(){if(oe.svgSupported){var e=this._zr,t=e.storage.getDisplayList();return Ge.each(t,(function(e){e.stopAnimation(!0)})),e.painter.toDataURL()}},g.getDataURL=function(e){if(!this._disposed){var t=(e=e||{}).excludeComponents,n=this._model,i=[],r=this;a(t,(function(e){n.eachComponent({mainType:e},(function(e){var t=r._componentsMap[e.__viewId];t.group.ignore||(i.push(t),t.group.ignore=!0)}))}));var o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.getRenderedCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return a(i,(function(e){e.group.ignore=!1})),o}this.id},g.getConnectedDataURL=function(e){if(this._disposed)this.id;else if(oe.canvasSupported){var t="svg"===e.type,n=this.group,i=Math.min,r=Math.max,o=1/0;if(Y[n]){var s=o,l=o,u=-1/0,c=-1/0,h=[],d=e&&e.pixelRatio||1;Ge.each(H,(function(a,o){if(a.group===n){var d=t?a.getZr().painter.getSvgDom().innerHTML:a.getRenderedCanvas(Ge.clone(e)),f=a.getDom().getBoundingClientRect();s=i(f.left,s),l=i(f.top,l),u=r(f.right,u),c=r(f.bottom,c),h.push({dom:d,left:f.left,top:f.top})}}));var f=(u*=d)-(s*=d),p=(c*=d)-(l*=d),g=Ge.createCanvas(),m=So.init(g,{renderer:t?"svg":"canvas"});if(m.resize({width:f,height:p}),t){var v="";return a(h,(function(e){var t=e.left-s,n=e.top-l;v+='<g transform="translate('+t+","+n+')">'+e.dom+"</g>"})),m.painter.getSvgRoot().innerHTML=v,e.connectedBackgroundColor&&m.painter.setBackgroundColor(e.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}return e.connectedBackgroundColor&&m.add(new rh.Rect({shape:{x:0,y:0,width:f,height:p},style:{fill:e.connectedBackgroundColor}})),a(h,(function(e){var t=new rh.Image({style:{x:e.left*d-s,y:e.top*d-l,image:e.dom}});m.add(t)})),m.refreshImmediately(),g.toDataURL("image/"+(e&&e.type||"png"))}return this.getDataURL(e)}},g.convertToPixel=Ge.curry(m,"convertToPixel"),g.convertFromPixel=Ge.curry(m,"convertFromPixel"),g.containPixel=function(e,t){if(!this._disposed){var n,i=this._model;return e=Bo.parseFinder(i,e),Ge.each(e,(function(e,i){i.indexOf("Models")>=0&&Ge.each(e,(function(e){var a=e.coordinateSystem;if(a&&a.containPoint)n|=!!a.containPoint(t);else if("seriesModels"===i){var r=this._chartsMap[e.__viewId];r&&r.containPoint&&(n|=r.containPoint(t,e))}}),this)}),this),!!n}this.id},g.getVisual=function(e,t){var n=this._model,i=(e=Bo.parseFinder(n,e,{defaultMainType:"series"})).seriesModel.getData(),a=e.hasOwnProperty("dataIndexInside")?e.dataIndexInside:e.hasOwnProperty("dataIndex")?i.indexOfRawIndex(e.dataIndex):null;return null!=a?i.getItemVisual(a,t):i.getVisual(t)},g.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},g.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]};var v={prepareAndUpdate:function(e){y(this),v.update.call(this,e)},update:function(e){var t=this._model,n=this._api,i=this._zr,a=this._coordSysMgr,r=this._scheduler;if(t){r.restoreData(t,e),r.performSeriesTasks(t),a.create(t,n),r.performDataProcessorTasks(t,e),x(this,t),a.update(t,n),T(t),r.performVisualTasks(t,e),I(this,t,n,e);var o=t.get("backgroundColor")||"transparent";if(oe.canvasSupported)i.setBackgroundColor(o);else{var s=qn.parse(o);o=qn.stringify(s,"rgb"),0===s[3]&&(o="transparent")}D(t,n)}},updateTransform:function(e){var t=this._model,n=this,i=this._api;if(t){var a=[];t.eachComponent((function(r,o){var s=n.getViewOfComponentModel(o);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(o,t,i,e);l&&l.update&&a.push(s)}else a.push(s)}));var r=Ge.createHashMap();t.eachSeries((function(a){var o=n._chartsMap[a.__viewId];if(o.updateTransform){var s=o.updateTransform(a,t,i,e);s&&s.update&&r.set(a.uid,1)}else r.set(a.uid,1)})),T(t),this._scheduler.performVisualTasks(t,e,{setDirty:!0,dirtyMap:r}),A(n,t,i,e,r),D(t,this._api)}},updateView:function(e){var t=this._model;t&&(Ag.markUpdateMethod(e,"updateView"),T(t),this._scheduler.performVisualTasks(t,e,{setDirty:!0}),I(this,this._model,this._api,e),D(t,this._api))},updateVisual:function(e){v.update.call(this,e)},updateLayout:function(e){v.update.call(this,e)}};function y(e){var t=e._model,n=e._scheduler;n.restorePipelines(t),n.prepareStageTasks(),M(e,"component",t,n),M(e,"chart",t,n),n.plan()}function _(e,t,n,i,r){var o=e._model;if(i){var s={};s[i+"Id"]=n[i+"Id"],s[i+"Index"]=n[i+"Index"],s[i+"Name"]=n[i+"Name"];var l={mainType:i,query:s};r&&(l.subType=r);var u=n.excludeSeriesId;null!=u&&(u=Ge.createHashMap(Bo.normalizeToArray(u))),o&&o.eachComponent(l,(function(t){u&&null!=u.get(t.id)||c(e["series"===i?"_chartsMap":"_componentsMap"][t.__viewId])}),e)}else a(e._componentsViews.concat(e._chartsViews),c);function c(i){i&&i.__alive&&i[t]&&i[t](i.__model,o,e._api,n)}}function x(e,t){var n=e._chartsMap,i=e._scheduler;t.eachSeries((function(e){i.updateStreamModes(e,n[e.__viewId])}))}function b(e,t){var n=e.type,i=e.escapeConnect,r=L[n],o=r.actionInfo,l=(o.update||"update").split(":"),h=l.pop();l=null!=l[0]&&s(l[0]),this[u]=!0;var d=[e],f=!1;e.batch&&(f=!0,d=Ge.map(e.batch,(function(t){return(t=Ge.defaults(Ge.extend({},t),e)).batch=null,t})));var p,g=[],m="highlight"===n||"downplay"===n;a(d,(function(e){(p=(p=r.action(e,this._model,this._api))||Ge.extend({},e)).type=o.event||p.type,g.push(p),m?_(this,h,e,"series"):l&&_(this,h,e,l.main,l.sub)}),this),"none"===h||m||l||(this[c]?(y(this),v.update.call(this,e),this[c]=!1):v[h].call(this,e)),p=f?{type:o.event||n,escapeConnect:i,batch:g}:g[0],this[u]=!1,!t&&this._messageCenter.trigger(p.type,p)}function w(e){for(var t=this._pendingActions;t.length;){var n=t.shift();b.call(this,n,e)}}function S(e){!e&&this.trigger("updated")}function M(e,t,n,i){for(var a="component"===t,r=a?e._componentsViews:e._chartsViews,o=a?e._componentsMap:e._chartsMap,l=e._zr,u=e._api,c=0;c<r.length;c++)r[c].__alive=!1;function h(e){var t="_ec_"+e.id+"_"+e.type,c=o[t];if(!c){var h=s(e.type);(c=new(a?fg.getClass(h.main,h.sub):Ag.getClass(h.sub))).init(n,u),o[t]=c,r.push(c),l.add(c.group)}e.__viewId=c.__id=t,c.__alive=!0,c.__model=e,c.group.__ecComponentInfo={mainType:e.mainType,index:e.componentIndex},!a&&i.prepareView(c,e,n,u)}a?n.eachComponent((function(e,t){"series"!==e&&h(t)})):n.eachSeries(h);for(c=0;c<r.length;){var d=r[c];d.__alive?c++:(!a&&d.renderTask.dispose(),l.remove(d.group),d.dispose(n,u),r.splice(c,1),delete o[d.__id],d.__id=d.group.__ecComponentInfo=null)}}function T(e){e.clearColorPalette(),e.eachSeries((function(e){e.clearColorPalette()}))}function I(e,t,n,i){!function(e,t,n,i,r){a(r||e._componentsViews,(function(e){var a=e.__model;e.render(a,t,n,i),O(a,e)}))}(e,t,n,i),a(e._chartsViews,(function(e){e.__alive=!1})),A(e,t,n,i),a(e._chartsViews,(function(e){e.__alive||e.remove(t,n)}))}function A(e,t,n,i,a){var r,o=e._scheduler;t.eachSeries((function(t){var n=e._chartsMap[t.__viewId];n.__alive=!0;var s=n.renderTask;o.updatePayload(s,i),a&&a.get(t.uid)&&s.dirty(),r|=s.perform(o.getPerformArgs(s)),n.group.silent=!!t.get("silent"),O(t,n),function(e,t){var n=e.get("blendMode")||null;t.group.traverse((function(e){e.isGroup||e.style.blend!==n&&e.setStyle("blend",n),e.eachPendingDisplayable&&e.eachPendingDisplayable((function(e){e.setStyle("blend",n)}))}))}(t,n)})),o.unfinished|=r,function(e,t){var n=e._zr,i=n.storage,a=0;i.traverse((function(e){a++})),a>t.get("hoverLayerThreshold")&&!oe.node&&t.eachSeries((function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.group.traverse((function(e){e.useHoverLayer=!0}))}}))}(e,t),Bg(e._zr.dom,t)}function D(e,t){a(R,(function(n){n(e,t)}))}g.resize=function(e){if(this._disposed)this.id;else{this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption("media"),i=e&&e.silent;this[u]=!0,n&&y(this),v.update.call(this),this[u]=!1,w.call(this,i),S.call(this,i)}}},g.showLoading=function(e,t){if(this._disposed)this.id;else if(o(e)&&(t=e,e=""),e=e||"default",this.hideLoading(),V[e]){var n=V[e](this._api,t),i=this._zr;this._loadingFX=n,i.add(n)}},g.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},g.makeActionFromEvent=function(e){var t=Ge.extend({},e);return t.type=E[e.type],t},g.dispatchAction=function(e,t){this._disposed?this.id:(o(t)||(t={silent:!!t}),L[e.type]&&this._model&&(this[u]?this._pendingActions.push(e):(b.call(this,e,t.silent),t.flush?this._zr.flush(!0):!1!==t.flush&&oe.browser.weChat&&this._throttledZrFlush(),w.call(this,t.silent),S.call(this,t.silent))))},g.appendData=function(e){if(this._disposed)this.id;else{var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0}},g.on=d("on",!1),g.off=d("off",!1),g.one=d("one",!1);var C=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function O(e,t){var n=e.get("z"),i=e.get("zlevel");t.group.traverse((function(e){"group"!==e.type&&(null!=n&&(e.z=n),null!=i&&(e.zlevel=i))}))}function k(){this.eventInfo}g._initEvents=function(){a(C,(function(e){var t=function(t){var n,i=this.getModel(),a=t.target;if("globalout"===e)n={};else if(a&&null!=a.dataIndex){var r=a.dataModel||i.getSeriesByIndex(a.seriesIndex);n=r&&r.getDataParams(a.dataIndex,a.dataType,a)||{}}else a&&a.eventData&&(n=Ge.extend({},a.eventData));if(n){var o=n.componentType,s=n.componentIndex;"markLine"!==o&&"markPoint"!==o&&"markArea"!==o||(o="series",s=n.seriesIndex);var l=o&&null!=s&&i.getComponent(o,s),u=l&&this["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];n.event=t,n.type=e,this._ecEventProcessor.eventInfo={targetEl:a,packedEvent:n,model:l,view:u},this.trigger(e,n)}};t.zrEventfulCallAtLast=!0,this._zr.on(e,t,this)}),this),a(E,(function(e,t){this._messageCenter.on(t,(function(e){this.trigger(t,e)}),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,Bo.setAttribute(this.getDom(),W,"");var e=this._api,t=this._model;a(this._componentsViews,(function(n){n.dispose(t,e)})),a(this._chartsViews,(function(n){n.dispose(t,e)})),this._zr.dispose(),delete H[this.id]}},Ge.mixin(p,_t),k.prototype={constructor:k,normalizeQuery:function(e){var t={},n={},i={};if(Ge.isString(e)){var a=s(e);t.mainType=a.main||null,t.subType=a.sub||null}else{var r=["Index","Name","Id"],o={name:1,dataIndex:1,dataType:1};Ge.each(e,(function(e,a){for(var s=!1,l=0;l<r.length;l++){var u=r[l],c=a.lastIndexOf(u);if(c>0&&c===a.length-u.length){var h=a.slice(0,c);"data"!==h&&(t.mainType=h,t[u.toLowerCase()]=e,s=!0)}}o.hasOwnProperty(a)&&(n[a]=e,s=!0),s||(i[a]=e)}))}return{cptQuery:t,dataQuery:n,otherQuery:i}},filter:function(e,t,n){var i=this.eventInfo;if(!i)return!0;var a=i.targetEl,r=i.packedEvent,o=i.model,s=i.view;if(!o||!s)return!0;var l=t.cptQuery,u=t.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,r,"name")&&c(u,r,"dataIndex")&&c(u,r,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,t.otherQuery,a,r));function c(e,t,n,i){return null==e[n]||t[i||n]===e[n]}},afterTrigger:function(){this.eventInfo=null}};var L={},E={},N=[],P=[],R=[],z=[],B={},V={},H={},Y={},F=new Date-0,G=new Date-0,W="_echarts_instance_";function j(e){Y[e]=!1}var U=j;function Z(e){return H[Bo.getAttribute(e,W)]}function X(e,t){B[e]=t}function q(e){P.push(e)}function K(e,t){J(N,e,t,1e3)}function $(e,t,n){"function"==typeof t&&(n=t,t="");var a=o(e)?e.type:[e,e={event:t}][0];e.event=(e.event||a).toLowerCase(),t=e.event,i(h.test(a)&&h.test(t)),L[a]||(L[a]={action:n,actionInfo:e}),E[t]=a}function Q(e,t){J(z,e,t,3e3,"visual")}function J(e,t,n,i,a){(r(t)||o(t))&&(n=t,t=i);var s=pm.wrapStageHandler(n,a);return s.__prio=t,s.__raw=n,e.push(s),s}function ee(e,t){V[e]=t}Q(2e3,Pg),q(rp),K(900,up),ee("default",Hg),$({type:"highlight",event:"highlight",update:"highlight"},Ge.noop),$({type:"downplay",event:"downplay",update:"downplay"},Ge.noop),X("light",mm),X("dark",bm);t.version="4.8.0",t.dependencies={zrender:"4.3.1"},t.PRIORITY=l,t.init=function(e,t,n){var i=Z(e);if(i)return i;var r=new p(e,t,n);return r.id="ec_"+F++,H[r.id]=r,Bo.setAttribute(e,W,r.id),function(e){var t="__connectUpdateStatus";function n(e,n){for(var i=0;i<e.length;i++)e[i][t]=n}a(E,(function(i,r){e._messageCenter.on(r,(function(i){if(Y[e.group]&&0!==e[t]){if(i&&i.escapeConnect)return;var r=e.makeActionFromEvent(i),o=[];a(H,(function(t){t!==e&&t.group===e.group&&o.push(t)})),n(o,0),a(o,(function(e){1!==e[t]&&e.dispatchAction(r)})),n(o,2)}}))}))}(r),r},t.connect=function(e){if(Ge.isArray(e)){var t=e;e=null,a(t,(function(t){null!=t.group&&(e=t.group)})),e=e||"g_"+G++,a(t,(function(t){t.group=e}))}return Y[e]=!0,e},t.disConnect=j,t.disconnect=U,t.dispose=function(e){"string"==typeof e?e=H[e]:e instanceof p||(e=Z(e)),e instanceof p&&!e.isDisposed()&&e.dispose()},t.getInstanceByDom=Z,t.getInstanceById=function(e){return H[e]},t.registerTheme=X,t.registerPreprocessor=q,t.registerProcessor=K,t.registerPostUpdate=function(e){R.push(e)},t.registerAction=$,t.registerCoordinateSystem=function(e,t){kf.register(e,t)},t.getCoordinateSystemDimensions=function(e){var t=kf.get(e);if(t)return t.getDimensionsInfo?t.getDimensionsInfo():t.dimensions.slice()},t.registerLayout=function(e,t){J(z,e,t,1e3,"layout")},t.registerVisual=Q,t.registerLoading=ee,t.extendComponentModel=function(e){return fd.extend(e)},t.extendComponentView=function(e){return fg.extend(e)},t.extendSeriesModel=function(e){return cg.extend(e)},t.extendChartView=function(e){return Ag.extend(e)},t.setCanvasCreator=function(e){Ge.$override("createCanvas",e)},t.registerMap=function(e,t,n){tv.registerMap(e,t,n)},t.getMap=function(e){var t=tv.retrieveMap(e);return t&&t[0]&&{geoJson:t[0].geoJSON,specialAreas:t[0].specialAreas}},t.dataTool={},function(){for(var e in $x)$x.hasOwnProperty(e)&&(t[e]=$x[e])}()}));cg.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(e,t){return vy(this.getSource(),this,{useEncodeDefaulter:!0})},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,clip:!0,label:{position:"top"},lineStyle:{width:2,type:"solid"},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0}});var Jx=kp.retrieveRawValue;var eb=function(e,t){var n=e.mapDimension("defaultedLabel",!0),i=n.length;if(1===i)return Jx(e,t,n[0]);if(i){for(var a=[],r=0;r<n.length;r++){var o=Jx(e,t,n[r]);a.push(o)}return a.join(" ")}},tb={getDefaultLabel:eb},nb=X_.createSymbol,ib=Ph.parsePercent,ab=tb.getDefaultLabel;function rb(e,t,n){rh.Group.call(this),this.updateData(e,t,n)}var ob=rb.prototype,sb=rb.getSymbolSize=function(e,t){var n=e.getItemVisual(t,"symbolSize");return n instanceof Array?n.slice():[+n,+n]};function lb(e){return[e[0]/2,e[1]/2]}function ub(e,t){this.parent.drift(e,t)}ob._createSymbol=function(e,t,n,i,a){this.removeAll();var r=t.getItemVisual(n,"color"),o=nb(e,-1,-1,2,2,r,a);o.attr({z2:100,culling:!0,scale:lb(i)}),o.drift=ub,this._symbolType=e,this.add(o)},ob.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(e)},ob.getSymbolPath=function(){return this.childAt(0)},ob.getScale=function(){return this.childAt(0).scale},ob.highlight=function(){this.childAt(0).trigger("emphasis")},ob.downplay=function(){this.childAt(0).trigger("normal")},ob.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},ob.setDraggable=function(e){var t=this.childAt(0);t.draggable=e,t.cursor=e?"move":t.cursor},ob.updateData=function(e,t,n){this.silent=!1;var i=e.getItemVisual(t,"symbol")||"circle",a=e.hostModel,r=sb(e,t),o=i!==this._symbolType;if(o){var s=e.getItemVisual(t,"symbolKeepAspect");this._createSymbol(i,e,t,r,s)}else{(l=this.childAt(0)).silent=!1,rh.updateProps(l,{scale:lb(r)},a,t)}if(this._updateCommon(e,t,r,n),o){var l=this.childAt(0),u=n&&n.fadeIn,c={scale:l.scale.slice()};u&&(c.style={opacity:l.style.opacity}),l.scale=[0,0],u&&(l.style.opacity=0),rh.initProps(l,c,a,t)}this._seriesModel=a};var cb=["itemStyle"],hb=["emphasis","itemStyle"],db=["label"],fb=["emphasis","label"];function pb(e,t){if(!this.incremental&&!this.useHoverLayer)if("emphasis"===t){var n=this.__symbolOriginalScale,i=n[1]/n[0],a={scale:[Math.max(1.1*n[0],n[0]+3),Math.max(1.1*n[1],n[1]+3*i)]};this.animateTo(a,400,"elasticOut")}else"normal"===t&&this.animateTo({scale:this.__symbolOriginalScale},400,"elasticOut")}ob._updateCommon=function(e,t,n,i){var a=this.childAt(0),r=e.hostModel,o=e.getItemVisual(t,"color");"image"!==a.type?a.useStyle({strokeNoScale:!0}):a.setStyle({opacity:null,shadowBlur:null,shadowOffsetX:null,shadowOffsetY:null,shadowColor:null});var s=i&&i.itemStyle,l=i&&i.hoverItemStyle,u=i&&i.symbolOffset,c=i&&i.labelModel,h=i&&i.hoverLabelModel,d=i&&i.hoverAnimation,f=i&&i.cursorStyle;if(!i||e.hasItemOption){var p=i&&i.itemModel?i.itemModel:e.getItemModel(t);s=p.getModel(cb).getItemStyle(["color"]),l=p.getModel(hb).getItemStyle(),u=p.getShallow("symbolOffset"),c=p.getModel(db),h=p.getModel(fb),d=p.getShallow("hoverAnimation"),f=p.getShallow("cursor")}else l=Ge.extend({},l);var g=a.style,m=e.getItemVisual(t,"symbolRotate");a.attr("rotation",(m||0)*Math.PI/180||0),u&&a.attr("position",[ib(u[0],n[0]),ib(u[1],n[1])]),f&&a.attr("cursor",f),a.setColor(o,i&&i.symbolInnerColor),a.setStyle(s);var v=e.getItemVisual(t,"opacity");null!=v&&(g.opacity=v);var y=e.getItemVisual(t,"liftZ"),_=a.__z2Origin;null!=y?null==_&&(a.__z2Origin=a.z2,a.z2+=y):null!=_&&(a.z2=_,a.__z2Origin=null);var x=i&&i.useNameLabel;rh.setLabelStyle(g,l,c,h,{labelFetcher:r,labelDataIndex:t,defaultText:function(t,n){return x?e.getName(t):ab(e,t)},isRectText:!0,autoColor:o}),a.__symbolOriginalScale=lb(n),a.hoverStyle=l,a.highDownOnUpdate=d&&r.isAnimationEnabled()?pb:null,rh.setHoverStyle(a)},ob.fadeOut=function(e,t){var n=this.childAt(0);this.silent=n.silent=!0,(!t||!t.keepLabel)&&(n.style.text=null),rh.updateProps(n,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,e)},Ge.inherits(rb,rh.Group);var gb=rb,mb=Ge.isObject;function vb(e){this.group=new rh.Group,this._symbolCtor=e||gb}var yb=vb.prototype;function _b(e,t,n,i){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(i.isIgnore&&i.isIgnore(n))&&!(i.clipShape&&!i.clipShape.contain(t[0],t[1]))&&"none"!==e.getItemVisual(n,"symbol")}function xb(e){return null==e||mb(e)||(e={isIgnore:e}),e||{}}function bb(e){var t=e.hostModel;return{itemStyle:t.getModel("itemStyle").getItemStyle(["color"]),hoverItemStyle:t.getModel("emphasis.itemStyle").getItemStyle(),symbolRotate:t.get("symbolRotate"),symbolOffset:t.get("symbolOffset"),hoverAnimation:t.get("hoverAnimation"),labelModel:t.getModel("label"),hoverLabelModel:t.getModel("emphasis.label"),cursorStyle:t.get("cursor")}}yb.updateData=function(e,t){t=xb(t);var n=this.group,i=e.hostModel,a=this._data,r=this._symbolCtor,o=bb(e);a||n.removeAll(),e.diff(a).add((function(i){var a=e.getItemLayout(i);if(_b(e,a,i,t)){var s=new r(e,i,o);s.attr("position",a),e.setItemGraphicEl(i,s),n.add(s)}})).update((function(s,l){var u=a.getItemGraphicEl(l),c=e.getItemLayout(s);_b(e,c,s,t)?(u?(u.updateData(e,s,o),rh.updateProps(u,{position:c},i)):(u=new r(e,s)).attr("position",c),n.add(u),e.setItemGraphicEl(s,u)):n.remove(u)})).remove((function(e){var t=a.getItemGraphicEl(e);t&&t.fadeOut((function(){n.remove(t)}))})).execute(),this._data=e},yb.isPersistent=function(){return!0},yb.updateLayout=function(){var e=this._data;e&&e.eachItemGraphicEl((function(t,n){var i=e.getItemLayout(n);t.attr("position",i)}))},yb.incrementalPrepareUpdate=function(e){this._seriesScope=bb(e),this._data=null,this.group.removeAll()},yb.incrementalUpdate=function(e,t,n){function i(e){e.isGroup||(e.incremental=e.useHoverLayer=!0)}n=xb(n);for(var a=e.start;a<e.end;a++){var r=t.getItemLayout(a);if(_b(t,r,a,n)){var o=new this._symbolCtor(t,a,this._seriesScope);o.traverse(i),o.attr("position",r),this.group.add(o),t.setItemGraphicEl(a,o)}}},yb.remove=function(e){var t=this.group,n=this._data;n&&e?n.eachItemGraphicEl((function(e){e.fadeOut((function(){t.remove(e)}))})):t.removeAll()};var wb=vb,Sb=uy.isDimensionStacked,Mb=Ge.map;var Tb={prepareDataCoordInfo:function(e,t,n){var i,a=e.getBaseAxis(),r=e.getOtherAxis(a),o=function(e,t){var n=0,i=e.scale.getExtent();"start"===t?n=i[0]:"end"===t?n=i[1]:i[0]>0?n=i[0]:i[1]<0&&(n=i[1]);return n}(r,n),s=a.dim,l=r.dim,u=t.mapDimension(l),c=t.mapDimension(s),h="x"===l||"radius"===l?1:0,d=Mb(e.dimensions,(function(e){return t.mapDimension(e)})),f=t.getCalculationInfo("stackResultDimension");return(i|=Sb(t,d[0]))&&(d[0]=f),(i|=Sb(t,d[1]))&&(d[1]=f),{dataDimsForPoint:d,valueStart:o,valueAxisDim:l,baseAxisDim:s,stacked:!!i,valueDim:u,baseDim:c,baseDataOffset:h,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}},getStackedOnPoint:function(e,t,n,i){var a=NaN;e.stacked&&(a=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(a)&&(a=e.valueStart);var r=e.baseDataOffset,o=[];return o[r]=n.get(e.baseDim,i),o[1-r]=a,t.dataToPoint(o)}},Ib=Tb.prepareDataCoordInfo,Ab=Tb.getStackedOnPoint;var Db=function(e,t,n,i,a,r,o,s){for(var l=function(e,t){var n=[];return t.diff(e).add((function(e){n.push({cmd:"+",idx:e})})).update((function(e,t){n.push({cmd:"=",idx:t,idx1:e})})).remove((function(e){n.push({cmd:"-",idx:e})})).execute(),n}(e,t),u=[],c=[],h=[],d=[],f=[],p=[],g=[],m=Ib(a,t,o),v=Ib(r,e,s),y=0;y<l.length;y++){var _=l[y],x=!0;switch(_.cmd){case"=":var b=e.getItemLayout(_.idx),w=t.getItemLayout(_.idx1);(isNaN(b[0])||isNaN(b[1]))&&(b=w.slice()),u.push(b),c.push(w),h.push(n[_.idx]),d.push(i[_.idx1]),g.push(t.getRawIndex(_.idx1));break;case"+":var S=_.idx;u.push(a.dataToPoint([t.get(m.dataDimsForPoint[0],S),t.get(m.dataDimsForPoint[1],S)])),c.push(t.getItemLayout(S).slice()),h.push(Ab(m,a,t,S)),d.push(i[S]),g.push(t.getRawIndex(S));break;case"-":S=_.idx;var M=e.getRawIndex(S);M!==S?(u.push(e.getItemLayout(S)),c.push(r.dataToPoint([e.get(v.dataDimsForPoint[0],S),e.get(v.dataDimsForPoint[1],S)])),h.push(n[S]),d.push(Ab(v,r,e,S)),g.push(M)):x=!1}x&&(f.push(_),p.push(p.length))}p.sort((function(e,t){return g[e]-g[t]}));var T=[],I=[],A=[],D=[],C=[];for(y=0;y<p.length;y++){S=p[y];T[y]=u[S],I[y]=c[S],A[y]=h[S],D[y]=d[S],C[y]=f[S]}return{current:T,next:I,stackedOnCurrent:A,stackedOnNext:D,status:C}},Cb=dt.min,Ob=dt.max,kb=dt.scaleAndAdd,Lb=dt.copy,Eb=[],Nb=[],Pb=[];function Rb(e){return isNaN(e[0])||isNaN(e[1])}function zb(e,t,n,i,a,r,o,s,l,u,c){return"none"!==u&&u?Bb.apply(this,arguments):Vb.apply(this,arguments)}function Bb(e,t,n,i,a,r,o,s,l,u,c){for(var h=0,d=n,f=0;f<i;f++){var p=t[d];if(d>=a||d<0)break;if(Rb(p)){if(c){d+=r;continue}break}if(d===n)e[r>0?"moveTo":"lineTo"](p[0],p[1]);else if(l>0){var g=t[h],m="y"===u?1:0,v=(p[m]-g[m])*l;Lb(Nb,g),Nb[m]=g[m]+v,Lb(Pb,p),Pb[m]=p[m]-v,e.bezierCurveTo(Nb[0],Nb[1],Pb[0],Pb[1],p[0],p[1])}else e.lineTo(p[0],p[1]);h=d,d+=r}return f}function Vb(e,t,n,i,a,r,o,s,l,u,c){for(var h=0,d=n,f=0;f<i;f++){var p=t[d];if(d>=a||d<0)break;if(Rb(p)){if(c){d+=r;continue}break}if(d===n)e[r>0?"moveTo":"lineTo"](p[0],p[1]),Lb(Nb,p);else if(l>0){var g=d+r,m=t[g];if(c)for(;m&&Rb(t[g]);)m=t[g+=r];var v=.5,y=t[h];if(!(m=t[g])||Rb(m))Lb(Pb,p);else{var _,x;if(Rb(m)&&!c&&(m=p),dt.sub(Eb,m,y),"x"===u||"y"===u){var b="x"===u?0:1;_=Math.abs(p[b]-y[b]),x=Math.abs(p[b]-m[b])}else _=dt.dist(p,y),x=dt.dist(p,m);kb(Pb,p,Eb,-l*(1-(v=x/(x+_))))}Cb(Nb,Nb,s),Ob(Nb,Nb,o),Cb(Pb,Pb,s),Ob(Pb,Pb,o),e.bezierCurveTo(Nb[0],Nb[1],Pb[0],Pb[1],p[0],p[1]),kb(Nb,p,Eb,l*v)}else e.lineTo(p[0],p[1]);h=d,d+=r}return f}function Hb(e,t){var n=[1/0,1/0],i=[-1/0,-1/0];if(t)for(var a=0;a<e.length;a++){var r=e[a];r[0]<n[0]&&(n[0]=r[0]),r[1]<n[1]&&(n[1]=r[1]),r[0]>i[0]&&(i[0]=r[0]),r[1]>i[1]&&(i[1]=r[1])}return{min:t?n:i,max:t?i:n}}var Yb=Tl.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:Kl(Tl.prototype.brush),buildPath:function(e,t){var n=t.points,i=0,a=n.length,r=Hb(n,t.smoothConstraint);if(t.connectNulls){for(;a>0&&Rb(n[a-1]);a--);for(;i<a&&Rb(n[i]);i++);}for(;i<a;)i+=zb(e,n,i,a,a,1,r.min,r.max,t.smooth,t.smoothMonotone,t.connectNulls)+1}}),Fb=Tl.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:Kl(Tl.prototype.brush),buildPath:function(e,t){var n=t.points,i=t.stackedOnPoints,a=0,r=n.length,o=t.smoothMonotone,s=Hb(n,t.smoothConstraint),l=Hb(i,t.smoothConstraint);if(t.connectNulls){for(;r>0&&Rb(n[r-1]);r--);for(;a<r&&Rb(n[a]);a++);}for(;a<r;){var u=zb(e,n,a,r,r,1,s.min,s.max,t.smooth,o,t.connectNulls);zb(e,i,a+u-1,u,r,-1,l.min,l.max,t.stackedOnSmooth,o,t.connectNulls),a+=u+1,e.closePath()}}}),Gb={Polyline:Yb,Polygon:Fb},Wb=Ph.round;function jb(e,t,n){var i=e.getArea(),a=e.getBaseAxis().isHorizontal(),r=i.x,o=i.y,s=i.width,l=i.height,u=n.get("lineStyle.width")||2;r-=u/2,o-=u/2,s+=u,l+=u,r=Math.floor(r),s=Math.round(s);var c=new rh.Rect({shape:{x:r,y:o,width:s,height:l}});return t&&(c.shape[a?"width":"height"]=0,rh.initProps(c,{shape:{width:s,height:l}},n)),c}function Ub(e,t,n){var i=e.getArea(),a=new rh.Sector({shape:{cx:Wb(e.cx,1),cy:Wb(e.cy,1),r0:Wb(i.r0,1),r:Wb(i.r,1),startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}});return t&&(a.shape.endAngle=i.startAngle,rh.initProps(a,{shape:{endAngle:i.endAngle}},n)),a}var Zb={createGridClipPath:jb,createPolarClipPath:Ub,createClipPath:function(e,t,n){return e?"polar"===e.type?Ub(e,t,n):"cartesian2d"===e.type?jb(e,t,n):null:null}},Xb=Bs.fromPoints,qb=Gb.Polyline,Kb=Gb.Polygon,$b=Tb.prepareDataCoordInfo,Qb=Tb.getStackedOnPoint,Jb=Zb.createGridClipPath,ew=Zb.createPolarClipPath;function tw(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++){var i=e[n],a=t[n];if(i[0]!==a[0]||i[1]!==a[1])return}return!0}}function nw(e,t){var n=[],i=[],a=[],r=[];return Xb(e,n,i),Xb(t,a,r),Math.max(Math.abs(n[0]-a[0]),Math.abs(n[1]-a[1]),Math.abs(i[0]-r[0]),Math.abs(i[1]-r[1]))}function iw(e){return"number"==typeof e?e:e?.5:0}function aw(e,t,n){for(var i=t.getBaseAxis(),a="x"===i.dim||"radius"===i.dim?0:1,r=[],o=0;o<e.length-1;o++){var s=e[o+1],l=e[o];r.push(l);var u=[];switch(n){case"end":u[a]=s[a],u[1-a]=l[1-a],r.push(u);break;case"middle":var c=(l[a]+s[a])/2,h=[];u[a]=h[a]=c,u[1-a]=l[1-a],h[1-a]=s[1-a],r.push(u),r.push(h);break;default:u[a]=l[a],u[1-a]=s[1-a],r.push(u)}}return e[o]&&r.push(e[o]),r}function rw(e,t,n){var i=e.get("showAllSymbol"),a="auto"===i;if(!i||a){var r=n.getAxesByScale("ordinal")[0];if(r&&(!a||!function(e,t){var n=e.getExtent(),i=Math.abs(n[1]-n[0])/e.scale.count();isNaN(i)&&(i=0);for(var a=t.count(),r=Math.max(1,Math.round(a/5)),o=0;o<a;o+=r)if(1.5*gb.getSymbolSize(t,o)[e.isHorizontal()?1:0]>i)return!1;return!0}(r,t))){var o=t.mapDimension(r.dim),s={};return Ge.each(r.getViewLabels(),(function(e){s[e.tickValue]=1})),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function ow(e,t,n){if("cartesian2d"===e.type){var i=e.getBaseAxis().isHorizontal(),a=Jb(e,t,n);if(!n.get("clip",!0)){var r=a.shape,o=Math.max(r.width,r.height);i?(r.y-=o,r.height+=2*o):(r.x-=o,r.width+=2*o)}return a}return ew(e,t,n)}Ag.extend({type:"line",init:function(){var e=new rh.Group,t=new wb;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e},render:function(e,t,n){var i=e.coordinateSystem,a=this.group,r=e.getData(),o=e.getModel("lineStyle"),s=e.getModel("areaStyle"),l=r.mapArray(r.getItemLayout),u="polar"===i.type,c=this._coordSys,h=this._symbolDraw,d=this._polyline,f=this._polygon,p=this._lineGroup,g=e.get("animation"),m=!s.isEmpty(),v=s.get("origin"),y=function(e,t,n){if(!n.valueDim)return[];for(var i=[],a=0,r=t.count();a<r;a++)i.push(Qb(n,e,t,a));return i}(i,r,$b(i,r,v)),_=e.get("showSymbol"),x=_&&!u&&rw(e,r,i),b=this._data;b&&b.eachItemGraphicEl((function(e,t){e.__temp&&(a.remove(e),b.setItemGraphicEl(t,null))})),_||h.remove(),a.add(p);var w,S=!u&&e.get("step");i&&i.getArea&&e.get("clip",!0)&&(null!=(w=i.getArea()).width?(w.x-=.1,w.y-=.1,w.width+=.2,w.height+=.2):w.r0&&(w.r0-=.5,w.r1+=.5)),this._clipShapeForSymbol=w,d&&c.type===i.type&&S===this._step?(m&&!f?f=this._newPolygon(l,y,i,g):f&&!m&&(p.remove(f),f=this._polygon=null),p.setClipPath(ow(i,!1,e)),_&&h.updateData(r,{isIgnore:x,clipShape:w}),r.eachItemGraphicEl((function(e){e.stopAnimation(!0)})),tw(this._stackedOnPoints,y)&&tw(this._points,l)||(g?this._updateAnimation(r,y,i,n,S,v):(S&&(l=aw(l,i,S),y=aw(y,i,S)),d.setShape({points:l}),f&&f.setShape({points:l,stackedOnPoints:y})))):(_&&h.updateData(r,{isIgnore:x,clipShape:w}),S&&(l=aw(l,i,S),y=aw(y,i,S)),d=this._newPolyline(l,i,g),m&&(f=this._newPolygon(l,y,i,g)),p.setClipPath(ow(i,!0,e)));var M=function(e,t){var n=e.getVisual("visualMeta");if(n&&n.length&&e.count()&&"cartesian2d"===t.type){for(var i,a,r=n.length-1;r>=0;r--){var o=n[r].dimension,s=e.dimensions[o],l=e.getDimensionInfo(s);if("x"===(i=l&&l.coordDim)||"y"===i){a=n[r];break}}if(a){var u=t.getAxis(i),c=Ge.map(a.stops,(function(e){return{coord:u.toGlobalCoord(u.dataToCoord(e.value)),color:e.color}})),h=c.length,d=a.outerColors.slice();h&&c[0].coord>c[h-1].coord&&(c.reverse(),d.reverse());var f=c[0].coord-10,p=c[h-1].coord+10,g=p-f;if(g<.001)return"transparent";Ge.each(c,(function(e){e.offset=(e.coord-f)/g})),c.push({offset:h?c[h-1].offset:.5,color:d[1]||"transparent"}),c.unshift({offset:h?c[0].offset:.5,color:d[0]||"transparent"});var m=new rh.LinearGradient(0,0,0,0,c,!0);return m[i]=f,m[i+"2"]=p,m}}}(r,i)||r.getVisual("color");d.useStyle(Ge.defaults(o.getLineStyle(),{fill:"none",stroke:M,lineJoin:"bevel"}));var T=e.get("smooth");if(T=iw(e.get("smooth")),d.setShape({smooth:T,smoothMonotone:e.get("smoothMonotone"),connectNulls:e.get("connectNulls")}),f){var I=r.getCalculationInfo("stackedOnSeries"),A=0;f.useStyle(Ge.defaults(s.getAreaStyle(),{fill:M,opacity:.7,lineJoin:"bevel"})),I&&(A=iw(I.get("smooth"))),f.setShape({smooth:T,stackedOnSmooth:A,smoothMonotone:e.get("smoothMonotone"),connectNulls:e.get("connectNulls")})}this._data=r,this._coordSys=i,this._stackedOnPoints=y,this._points=l,this._step=S,this._valueOrigin=v},dispose:function(){},highlight:function(e,t,n,i){var a=e.getData(),r=Bo.queryDataIndex(a,i);if(!(r instanceof Array)&&null!=r&&r>=0){var o=a.getItemGraphicEl(r);if(!o){var s=a.getItemLayout(r);if(!s)return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(s[0],s[1]))return;(o=new gb(a,r)).position=s,o.setZ(e.get("zlevel"),e.get("z")),o.ignore=isNaN(s[0])||isNaN(s[1]),o.__temp=!0,a.setItemGraphicEl(r,o),o.stopSymbolAnimation(!0),this.group.add(o)}o.highlight()}else Ag.prototype.highlight.call(this,e,t,n,i)},downplay:function(e,t,n,i){var a=e.getData(),r=Bo.queryDataIndex(a,i);if(null!=r&&r>=0){var o=a.getItemGraphicEl(r);o&&(o.__temp?(a.setItemGraphicEl(r,null),this.group.remove(o)):o.downplay())}else Ag.prototype.downplay.call(this,e,t,n,i)},_newPolyline:function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new qb({shape:{points:e},silent:!0,z2:10}),this._lineGroup.add(t),this._polyline=t,t},_newPolygon:function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new Kb({shape:{points:e,stackedOnPoints:t},silent:!0}),this._lineGroup.add(n),this._polygon=n,n},_updateAnimation:function(e,t,n,i,a,r){var o=this._polyline,s=this._polygon,l=e.hostModel,u=Db(this._data,e,this._stackedOnPoints,t,this._coordSys,n,this._valueOrigin,r),c=u.current,h=u.stackedOnCurrent,d=u.next,f=u.stackedOnNext;if(a&&(c=aw(u.current,n,a),h=aw(u.stackedOnCurrent,n,a),d=aw(u.next,n,a),f=aw(u.stackedOnNext,n,a)),nw(c,d)>3e3||s&&nw(h,f)>3e3)return o.setShape({points:d}),void(s&&s.setShape({points:d,stackedOnPoints:f}));o.shape.__points=u.current,o.shape.points=c,rh.updateProps(o,{shape:{points:d}},l),s&&(s.setShape({points:c,stackedOnPoints:h}),rh.updateProps(s,{shape:{points:d,stackedOnPoints:f}},l));for(var p=[],g=u.status,m=0;m<g.length;m++){if("="===g[m].cmd){var v=e.getItemGraphicEl(g[m].idx1);v&&p.push({el:v,ptIdx:m})}}o.animators&&o.animators.length&&o.animators[0].during((function(){for(var e=0;e<p.length;e++){p[e].el.attr("position",o.shape.__points[p[e].ptIdx])}}))},remove:function(e){var t=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl((function(e,i){e.__temp&&(t.remove(e),n.setItemGraphicEl(i,null))})),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._data=null}});var sw=Ge.isFunction;var lw=function(e,t,n){return{seriesType:e,performRawSeries:!0,reset:function(e,i,a){var r=e.getData(),o=e.get("symbol"),s=e.get("symbolSize"),l=e.get("symbolKeepAspect"),u=e.get("symbolRotate"),c=sw(o),h=sw(s),d=sw(u),f=c||h||d,p=!c&&o?o:t,g=h?null:s;if(r.setVisual({legendSymbol:n||p,symbol:p,symbolSize:g,symbolKeepAspect:l,symbolRotate:u}),!i.isSeriesFiltered(e))return{dataEach:r.hasItemOption||f?function(t,n){if(f){var i=e.getRawValue(n),a=e.getDataParams(n);c&&t.setItemVisual(n,"symbol",o(i,a)),h&&t.setItemVisual(n,"symbolSize",s(i,a)),d&&t.setItemVisual(n,"symbolRotate",u(i,a))}if(t.hasItemOption){var r=t.getItemModel(n),l=r.getShallow("symbol",!0),p=r.getShallow("symbolSize",!0),g=r.getShallow("symbolRotate",!0),m=r.getShallow("symbolKeepAspect",!0);null!=l&&t.setItemVisual(n,"symbol",l),null!=p&&t.setItemVisual(n,"symbolSize",p),null!=g&&t.setItemVisual(n,"symbolRotate",g),null!=m&&t.setItemVisual(n,"symbolKeepAspect",m)}}:null}}}},uw=Ge.map,cw=uy.isDimensionStacked;var hw=function(e){return{seriesType:e,plan:gg(),reset:function(e){var t=e.getData(),n=e.coordinateSystem,i=e.pipelineContext.large;if(n){var a=uw(n.dimensions,(function(e){return t.mapDimension(e)})).slice(0,2),r=a.length,o=t.getCalculationInfo("stackResultDimension");return cw(t,a[0])&&(a[0]=o),cw(t,a[1])&&(a[1]=o),r&&{progress:function(e,t){for(var o=e.end-e.start,s=i&&new Float32Array(o*r),l=e.start,u=0,c=[],h=[];l<e.end;l++){var d;if(1===r){var f=t.get(a[0],l);d=!isNaN(f)&&n.dataToPoint(f,null,h)}else{f=c[0]=t.get(a[0],l);var p=c[1]=t.get(a[1],l);d=!isNaN(f)&&!isNaN(p)&&n.dataToPoint(c,null,h)}i?(s[u++]=d?d[0]:NaN,s[u++]=d?d[1]:NaN):t.setItemLayout(l,d&&d.slice()||[NaN,NaN])}i&&t.setLayout("symbolPoints",s)}}}}}},dw={average:function(e){for(var t=0,n=0,i=0;i<e.length;i++)isNaN(e[i])||(t+=e[i],n++);return 0===n?NaN:t/n},sum:function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n]||0;return t},max:function(e){for(var t=-1/0,n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n<e.length;n++)e[n]<t&&(t=e[n]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},fw=function(e,t){return Math.round(e.length/2)};var pw=function(e){return{seriesType:e,modifyOutputEnd:!0,reset:function(e,t,n){var i=e.getData(),a=e.get("sampling"),r=e.coordinateSystem;if("cartesian2d"===r.type&&a){var o,s=r.getBaseAxis(),l=r.getOtherAxis(s),u=s.getExtent(),c=u[1]-u[0],h=Math.round(i.count()/c);if(h>1)"string"==typeof a?o=dw[a]:"function"==typeof a&&(o=a),o&&e.setData(i.downSample(i.mapDimension(l.dim),1/h,o,fw))}}}};function gw(e){return this._axes[e]}var mw=function(e){this._axes={},this._dimList=[],this.name=e||""};mw.prototype={constructor:mw,type:"cartesian",getAxis:function(e){return this._axes[e]},getAxes:function(){return Ge.map(this._dimList,gw,this)},getAxesByScale:function(e){return e=e.toLowerCase(),Ge.filter(this.getAxes(),(function(t){return t.scale.type===e}))},addAxis:function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},dataToCoord:function(e){return this._dataCoordConvert(e,"dataToCoord")},coordToData:function(e){return this._dataCoordConvert(e,"coordToData")},_dataCoordConvert:function(e,t){for(var n=this._dimList,i=e instanceof Array?[]:{},a=0;a<n.length;a++){var r=n[a],o=this._axes[r];i[r]=o[t](e[r])}return i}};var vw=mw;function yw(e){vw.call(this,e)}yw.prototype={constructor:yw,type:"cartesian2d",dimensions:["x","y"],getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},containPoint:function(e){var t=this.getAxis("x"),n=this.getAxis("y");return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},containData:function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},dataToPoint:function(e,t,n){var i=this.getAxis("x"),a=this.getAxis("y");return(n=n||[])[0]=i.toGlobalCoord(i.dataToCoord(e[0])),n[1]=a.toGlobalCoord(a.dataToCoord(e[1])),n},clampData:function(e,t){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,a=n.getExtent(),r=i.getExtent(),o=n.parse(e[0]),s=i.parse(e[1]);return(t=t||[])[0]=Math.min(Math.max(Math.min(a[0],a[1]),o),Math.max(a[0],a[1])),t[1]=Math.min(Math.max(Math.min(r[0],r[1]),s),Math.max(r[0],r[1])),t},pointToData:function(e,t){var n=this.getAxis("x"),i=this.getAxis("y");return(t=t||[])[0]=n.coordToData(n.toLocalCoord(e[0])),t[1]=i.coordToData(i.toLocalCoord(e[1])),t},getOtherAxis:function(e){return this.getAxis("x"===e.dim?"y":"x")},getArea:function(){var e=this.getAxis("x").getGlobalExtent(),t=this.getAxis("y").getGlobalExtent(),n=Math.min(e[0],e[1]),i=Math.min(t[0],t[1]),a=Math.max(e[0],e[1])-n,r=Math.max(t[0],t[1])-i;return new Pi(n,i,a,r)}},Ge.inherits(yw,vw);var _w=yw,xw=function(e,t,n,i,a){Nx.call(this,e,t,n),this.type=i||"value",this.position=a||"bottom"};xw.prototype={constructor:xw,index:0,getAxesOnZeroOf:null,model:null,isHorizontal:function(){var e=this.position;return"top"===e||"bottom"===e},getGlobalExtent:function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(e,t){return this.coordToData(this.toLocalCoord(e["x"===this.dim?0:1]),t)},toLocalCoord:null,toGlobalCoord:null},Ge.inherits(xw,Nx);var bw=xw,ww={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)"]}}},Sw={};Sw.categoryAxis=Ge.merge({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},ww),Sw.valueAxis=Ge.merge({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},ww),Sw.timeAxis=Ge.defaults({scale:!0,min:"dataMin",max:"dataMax"},Sw.valueAxis),Sw.logAxis=Ge.defaults({scale:!0,logBase:10},Sw.valueAxis);var Mw=Sw,Tw=sd.getLayoutParams,Iw=sd.mergeLayoutParam,Aw=["value","category","time","log"];var Dw=function(e,t,n,i){Ge.each(Aw,(function(a){t.extend({type:e+"Axis."+a,mergeDefaultAndTheme:function(t,i){var r=this.layoutMode,o=r?Tw(t):{},s=i.getTheme();Ge.merge(t,s.get(a+"Axis")),Ge.merge(t,this.getDefaultOption()),t.type=n(e,t),r&&Iw(t,o,r)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=Ay.createByAxisModel(this))},getCategories:function(e){var t=this.option;if("category"===t.type)return e?t.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:Ge.mergeAll([{},Mw[a+"Axis"],i],!0)})})),fd.registerSubTypeDefaulter(e+"Axis",Ge.curry(n,e))},Cw=fd.extend({type:"cartesian2dAxis",axis:null,init:function(){Cw.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){Cw.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){Cw.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function Ow(e,t){return t.type||(t.data?"category":"value")}Ge.merge(Cw.prototype,R_);var kw={offset:0};Dw("x",Cw,Ow,kw),Dw("y",Cw,Ow,kw),fd.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 Lw=Ge.isObject,Ew=Ge.each,Nw=Ge.map,Pw=Ge.indexOf,Rw=sd.getLayoutRect,zw=N_.createScaleByModel,Bw=N_.ifAxisCrossZero,Vw=N_.niceScaleExtent,Hw=N_.estimateLabelUnionRect,Yw=uy.getStackedDimension;function Fw(e,t,n){return e.getCoordSysModel()===t}function Gw(e,t,n){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(e,t,n),this.model=e}var Ww=Gw.prototype;function jw(e,t,n,i){n.getAxesOnZeroOf=function(){return a?[a]:[]};var a,r=e[t],o=n.model,s=o.get("axisLine.onZero"),l=o.get("axisLine.onZeroAxisIndex");if(s){if(null!=l)Uw(r[l])&&(a=r[l]);else for(var u in r)if(r.hasOwnProperty(u)&&Uw(r[u])&&!i[c(r[u])]){a=r[u];break}a&&(i[c(a)]=!0)}function c(e){return e.dim+"_"+e.index}}function Uw(e){return e&&"category"!==e.type&&"time"!==e.type&&Bw(e)}Ww.type="grid",Ww.axisPointerEnabled=!0,Ww.getRect=function(){return this._rect},Ww.update=function(e,t){var n=this._axesMap;this._updateScale(e,this.model),Ew(n.x,(function(e){Vw(e.scale,e.model)})),Ew(n.y,(function(e){Vw(e.scale,e.model)}));var i={};Ew(n.x,(function(e){jw(n,"y",e,i)})),Ew(n.y,(function(e){jw(n,"x",e,i)})),this.resize(this.model,t)},Ww.resize=function(e,t,n){var i=Rw(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()});this._rect=i;var a=this._axesList;function r(){Ew(a,(function(e){var t=e.isHorizontal(),n=t?[0,i.width]:[0,i.height],a=e.inverse?1:0;e.setExtent(n[a],n[1-a]),function(e,t){var n=e.getExtent(),i=n[0]+n[1];e.toGlobalCoord="x"===e.dim?function(e){return e+t}:function(e){return i-e+t},e.toLocalCoord="x"===e.dim?function(e){return e-t}:function(e){return i-e+t}}(e,t?i.x:i.y)}))}r(),!n&&e.get("containLabel")&&(Ew(a,(function(e){if(!e.model.get("axisLabel.inside")){var t=Hw(e);if(t){var n=e.isHorizontal()?"height":"width",a=e.model.get("axisLabel.margin");i[n]-=t[n]+a,"top"===e.position?i.y+=t.height+a:"left"===e.position&&(i.x+=t.width+a)}}})),r())},Ww.getAxis=function(e,t){var n=this._axesMap[e];if(null!=n){if(null==t)for(var i in n)if(n.hasOwnProperty(i))return n[i];return n[t]}},Ww.getAxes=function(){return this._axesList.slice()},Ww.getCartesian=function(e,t){if(null!=e&&null!=t){var n="x"+e+"y"+t;return this._coordsMap[n]}Lw(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,a=this._coordsList;i<a.length;i++)if(a[i].getAxis("x").index===e||a[i].getAxis("y").index===t)return a[i]},Ww.getCartesians=function(){return this._coordsList.slice()},Ww.convertToPixel=function(e,t,n){var i=this._findConvertTarget(e,t);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},Ww.convertFromPixel=function(e,t,n){var i=this._findConvertTarget(e,t);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},Ww._findConvertTarget=function(e,t){var n,i,a=t.seriesModel,r=t.xAxisModel||a&&a.getReferringComponents("xAxis")[0],o=t.yAxisModel||a&&a.getReferringComponents("yAxis")[0],s=t.gridModel,l=this._coordsList;if(a)n=a.coordinateSystem,Pw(l,n)<0&&(n=null);else if(r&&o)n=this.getCartesian(r.componentIndex,o.componentIndex);else if(r)i=this.getAxis("x",r.componentIndex);else if(o)i=this.getAxis("y",o.componentIndex);else if(s){s.coordinateSystem===this&&(n=this._coordsList[0])}return{cartesian:n,axis:i}},Ww.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},Ww._initCartesian=function(e,t,n){var i={left:!1,right:!1,top:!1,bottom:!1},a={x:{},y:{}},r={x:0,y:0};if(t.eachComponent("xAxis",o("x"),this),t.eachComponent("yAxis",o("y"),this),!r.x||!r.y)return this._axesMap={},void(this._axesList=[]);function o(t){return function(n,o){if(Fw(n,e)){var s=n.get("position");"x"===t?"top"!==s&&"bottom"!==s&&(s=i.bottom?"top":"bottom"):"left"!==s&&"right"!==s&&(s=i.left?"right":"left"),i[s]=!0;var l=new bw(t,zw(n),[0,0],n.get("type"),s),u="category"===l.type;l.onBand=u&&n.get("boundaryGap"),l.inverse=n.get("inverse"),n.axis=l,l.model=n,l.grid=this,l.index=o,this._axesList.push(l),a[t][o]=l,r[t]++}}}this._axesMap=a,Ew(a.x,(function(t,n){Ew(a.y,(function(i,a){var r="x"+n+"y"+a,o=new _w(r);o.grid=this,o.model=e,this._coordsMap[r]=o,this._coordsList.push(o),o.addAxis(t),o.addAxis(i)}),this)}),this)},Ww._updateScale=function(e,t){function n(e,t,n){Ew(e.mapDimension(t.dim,!0),(function(n){t.scale.unionExtentFromData(e,Yw(e,n))}))}Ew(this._axesList,(function(e){e.scale.setExtent(1/0,-1/0)})),e.eachSeries((function(e){if(qw(e)){var i=Xw(e),a=i[0],r=i[1];if(!Fw(a,t)||!Fw(r,t))return;var o=this.getCartesian(a.componentIndex,r.componentIndex),s=e.getData(),l=o.getAxis("x"),u=o.getAxis("y");"list"===s.type&&(n(s,l),n(s,u))}}),this)},Ww.getTooltipAxes=function(e){var t=[],n=[];return Ew(this.getCartesians(),(function(i){var a=null!=e&&"auto"!==e?i.getAxis(e):i.getBaseAxis(),r=i.getOtherAxis(a);Pw(t,a)<0&&t.push(a),Pw(n,r)<0&&n.push(r)})),{baseAxes:t,otherAxes:n}};var Zw=["xAxis","yAxis"];function Xw(e,t){return Nw(Zw,(function(t){return e.getReferringComponents(t)[0]}))}function qw(e){return"cartesian2d"===e.get("coordinateSystem")}Gw.create=function(e,t){var n=[];return e.eachComponent("grid",(function(i,a){var r=new Gw(i,e,t);r.name="grid_"+a,r.resize(i,t,!0),i.coordinateSystem=r,n.push(r)})),e.eachSeries((function(e){if(qw(e)){var t=Xw(e),n=t[0],i=t[1],a=n.getCoordSysModel().coordinateSystem;e.coordinateSystem=a.getCartesian(n.componentIndex,i.componentIndex)}})),n},Gw.dimensions=Gw.prototype.dimensions=_w.prototype.dimensions,kf.register("cartesian2d",Gw);var Kw=Ge.retrieve,$w=Ge.defaults,Qw=Ge.extend,Jw=Ge.each,eS=Ph.isRadianAroundZero,tS=Ph.remRadian,nS=X_.createSymbol,iS=dt.applyTransform,aS=N_.shouldShowAllLabels,rS=Math.PI,oS=function(e,t){this.opt=t,this.axisModel=e,$w(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new rh.Group;var n=new rh.Group({position:t.position.slice(),rotation:t.rotation});n.updateTransform(),this._transform=n.transform,this._dumbGroup=n};oS.prototype={constructor:oS,hasBuilder:function(e){return!!sS[e]},add:function(e){sS[e].call(this)},getGroup:function(){return this.group}};var sS={axisLine:function(){var e=this.opt,t=this.axisModel;if(t.get("axisLine.show")){var n=this.axisModel.axis.getExtent(),i=this._transform,a=[n[0],0],r=[n[1],0];i&&(iS(a,a,i),iS(r,r,i));var o=Qw({lineCap:"round"},t.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new rh.Line({anid:"line",subPixelOptimize:!0,shape:{x1:a[0],y1:a[1],x2:r[0],y2:r[1]},style:o,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1}));var s=t.get("axisLine.symbol"),l=t.get("axisLine.symbolSize"),u=t.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 c=l[0],h=l[1];Jw([{rotate:e.rotation+Math.PI/2,offset:u[0],r:0},{rotate:e.rotation-Math.PI/2,offset:u[1],r:Math.sqrt((a[0]-r[0])*(a[0]-r[0])+(a[1]-r[1])*(a[1]-r[1]))}],(function(t,n){if("none"!==s[n]&&null!=s[n]){var i=nS(s[n],-c/2,-h/2,c,h,o.stroke,!0),r=t.r+t.offset,l=[a[0]+r*Math.cos(e.rotation),a[1]-r*Math.sin(e.rotation)];i.attr({rotation:t.rotate,position:l,silent:!0,z2:11}),this.group.add(i)}}),this)}}},axisTickLabel:function(){var e=this.axisModel,t=this.opt,n=function(e,t,n){var i=t.axis,a=t.getModel("axisTick");if(!a.get("show")||i.scale.isBlank())return;for(var r=a.getModel("lineStyle"),o=n.tickDirection*a.get("length"),s=pS(i.getTicksCoords(),e._transform,o,$w(r.getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")}),"ticks"),l=0;l<s.length;l++)e.group.add(s[l]);return s}(this,e,t),i=function(e,t,n){var i=t.axis,a=Kw(n.axisLabelShow,t.get("axisLabel.show"));if(!a||i.scale.isBlank())return;var r=t.getModel("axisLabel"),o=r.get("margin"),s=i.getViewLabels(),l=(Kw(n.labelRotate,r.get("rotate"))||0)*rS/180,u=uS(n.rotation,l,n.labelDirection),c=t.getCategories&&t.getCategories(!0),h=[],d=cS(t),f=t.get("triggerEvent");return Jw(s,(function(a,s){var l=a.tickValue,p=a.formattedLabel,g=a.rawLabel,m=r;c&&c[l]&&c[l].textStyle&&(m=new xh(c[l].textStyle,r,t.ecModel));var v=m.getTextColor()||t.get("axisLine.lineStyle.color"),y=[i.dataToCoord(l),n.labelOffset+n.labelDirection*o],_=new rh.Text({anid:"label_"+l,position:y,rotation:u.rotation,silent:d,z2:10});rh.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"===i.type?g:"value"===i.type?l+"":l,s):v}),f&&(_.eventData=lS(t),_.eventData.targetType="axisLabel",_.eventData.value=g),e._dumbGroup.add(_),_.updateTransform(),h.push(_),e.group.add(_),_.decomposeTransform()})),h}(this,e,t);!function(e,t,n){if(aS(e.axis))return;var i=e.get("axisLabel.showMinLabel"),a=e.get("axisLabel.showMaxLabel");t=t||[],n=n||[];var r=t[0],o=t[1],s=t[t.length-1],l=t[t.length-2],u=n[0],c=n[1],h=n[n.length-1],d=n[n.length-2];!1===i?(hS(r),hS(u)):dS(r,o)&&(i?(hS(o),hS(c)):(hS(r),hS(u)));!1===a?(hS(s),hS(h)):dS(l,s)&&(a?(hS(l),hS(d)):(hS(s),hS(h)))}(e,i,n),function(e,t,n){var i=t.axis,a=t.getModel("minorTick");if(!a.get("show")||i.scale.isBlank())return;var r=i.getMinorTicksCoords();if(!r.length)return;for(var o=a.getModel("lineStyle"),s=n.tickDirection*a.get("length"),l=$w(o.getLineStyle(),$w(t.getModel("axisTick").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})),u=0;u<r.length;u++)for(var c=pS(r[u],e._transform,s,l,"minorticks_"+u),h=0;h<c.length;h++)e.group.add(c[h])}(this,e,t)},axisName:function(){var e=this.opt,t=this.axisModel,n=Kw(e.axisName,t.get("name"));if(n){var i,a,r=t.get("nameLocation"),o=e.nameDirection,s=t.getModel("nameTextStyle"),l=t.get("nameGap")||0,u=this.axisModel.axis.getExtent(),c=u[0]>u[1]?-1:1,h=["start"===r?u[0]-c*l:"end"===r?u[1]+c*l:(u[0]+u[1])/2,fS(r)?e.labelOffset+o*l:0],d=t.get("nameRotate");null!=d&&(d=d*rS/180),fS(r)?i=uS(e.rotation,null!=d?d:e.rotation,o):(i=function(e,t,n,i){var a,r,o=tS(n-e.rotation),s=i[0]>i[1],l="start"===t&&!s||"start"!==t&&s;eS(o-rS/2)?(r=l?"bottom":"top",a="center"):eS(o-1.5*rS)?(r=l?"top":"bottom",a="center"):(r="middle",a=o<1.5*rS&&o>rS/2?l?"left":"right":l?"right":"left");return{rotation:o,textAlign:a,textVerticalAlign:r}}(e,r,d||0,u),null!=(a=e.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(i.rotation)),!isFinite(a)&&(a=null)));var f=s.getFont(),p=t.get("nameTruncate",!0)||{},g=p.ellipsis,m=Kw(e.nameTruncateMaxWidth,p.maxWidth,a),v=null!=g&&null!=m?Xh.truncateText(n,m,f,g,{minChar:2,placeholder:p.placeholder}):n,y=t.get("tooltip",!0),_=t.mainType,x={componentType:_,name:n,$vars:["name"]};x[_+"Index"]=t.componentIndex;var b=new rh.Text({anid:"name",__fullText:n,__truncatedText:v,position:h,rotation:i.rotation,silent:cS(t),z2:1,tooltip:y&&y.show?Qw({content:n,formatter:function(){return n},formatterParams:x},y):null});rh.setTextStyle(b.style,s,{text:v,textFont:f,textFill:s.getTextColor()||t.get("axisLine.lineStyle.color"),textAlign:s.get("align")||i.textAlign,textVerticalAlign:s.get("verticalAlign")||i.textVerticalAlign}),t.get("triggerEvent")&&(b.eventData=lS(t),b.eventData.targetType="axisName",b.eventData.name=n),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},lS=oS.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},uS=oS.innerTextLayout=function(e,t,n){var i,a,r=tS(t-e);return eS(r)?(a=n>0?"top":"bottom",i="center"):eS(r-rS)?(a=n>0?"bottom":"top",i="center"):(a="middle",i=r>0&&r<rS?n>0?"right":"left":n>0?"left":"right"),{rotation:r,textAlign:i,textVerticalAlign:a}};var cS=oS.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)};function hS(e){e&&(e.ignore=!0)}function dS(e,t,n){var i=e&&e.getBoundingRect().clone(),a=t&&t.getBoundingRect().clone();if(i&&a){var r=ln.identity([]);return ln.rotate(r,r,-e.rotation),i.applyTransform(ln.mul([],r,e.getLocalTransform())),a.applyTransform(ln.mul([],r,t.getLocalTransform())),i.intersect(a)}}function fS(e){return"middle"===e||"center"===e}function pS(e,t,n,i,a){for(var r=[],o=[],s=[],l=0;l<e.length;l++){var u=e[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=n,t&&(iS(o,o,t),iS(s,s,t));var c=new rh.Line({anid:a+"_"+e[l].tickValue,subPixelOptimize:!0,shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:i,z2:2,silent:!0});r.push(c)}return r}var gS=oS,mS=Ge.each,vS=Ge.curry;function yS(e,t){return"all"===e||Ge.isArray(e)&&Ge.indexOf(e,t)>=0||e===t}function _S(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[bS(e)]}function xS(e){return!!e.get("handle.show")}function bS(e){return e.type+"||"+e.id}var wS=function(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(e,t,n){var i=t.getComponent("tooltip"),a=t.getComponent("axisPointer"),r=a.get("link",!0)||[],o=[];mS(n.getCoordinateSystems(),(function(n){if(n.axisPointerEnabled){var s=bS(n.model),l=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var u=n.model.getModel("tooltip",i);if(mS(n.getAxes(),vS(f,!1,null)),n.getTooltipAxes&&i&&u.get("show")){var c="axis"===u.get("trigger"),h="cross"===u.get("axisPointer.type"),d=n.getTooltipAxes(u.get("axisPointer.axis"));(c||h)&&mS(d.baseAxes,vS(f,!h||"cross",c)),h&&mS(d.otherAxes,vS(f,"cross",!1))}}function f(i,s,c){var h=c.model.getModel("axisPointer",a),d=h.get("show");if(d&&("auto"!==d||i||xS(h))){null==s&&(s=h.get("triggerTooltip")),h=i?function(e,t,n,i,a,r){var o=t.getModel("axisPointer"),s={};mS(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],(function(e){s[e]=Ge.clone(o.get(e))})),s.snap="category"!==e.type&&!!r,"cross"===o.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===a){var u=o.get("label.show");if(l.show=null==u||u,!r){var c=s.lineStyle=o.get("crossStyle");c&&Ge.defaults(l,c.textStyle)}}return e.model.getModel("axisPointer",new xh(s,n,i))}(c,u,a,t,i,s):h;var f=h.get("snap"),p=bS(c.model),g=s||f||"category"===c.type,m=e.axesInfo[p]={key:p,axis:c,coordSys:n,axisPointerModel:h,triggerTooltip:s,involveSeries:g,snap:f,useHandle:xS(h),seriesModels:[]};l[p]=m,e.seriesInvolved|=g;var v=function(e,t){for(var n=t.model,i=t.dim,a=0;a<e.length;a++){var r=e[a]||{};if(yS(r[i+"AxisId"],n.id)||yS(r[i+"AxisIndex"],n.componentIndex)||yS(r[i+"AxisName"],n.name))return a}}(r,c);if(null!=v){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[p]=m,y.mapper=r[v].mapper,m.linkGroup=y}}}}))}(n,e,t),n.seriesInvolved&&function(e,t){t.eachSeries((function(t){var n=t.coordinateSystem,i=t.get("tooltip.trigger",!0),a=t.get("tooltip.show",!0);n&&"none"!==i&&!1!==i&&"item"!==i&&!1!==a&&!1!==t.get("axisPointer.show",!0)&&mS(e.coordSysAxesInfo[bS(n.model)],(function(e){var i=e.axis;n.getAxis(i.dim)===i&&(e.seriesModels.push(t),null==e.seriesDataCount&&(e.seriesDataCount=0),e.seriesDataCount+=t.getData().count())}))}),this)}(n,e),n},SS=function(e){var t=_S(e);if(t){var n=t.axisPointerModel,i=t.axis.scale,a=n.option,r=n.get("status"),o=n.get("value");null!=o&&(o=i.parse(o));var s=xS(n);null==r&&(a.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==o||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),a.value=o,s&&(a.status=t.axis.scale.isBlank()?"hide":"show")}},MS={collect:wS,fixValue:SS,getAxisInfo:_S,getAxisPointerModel:function(e){var t=_S(e);return t&&t.axisPointerModel},makeKey:bS},TS=Qx.extendComponentView({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(e,t,n,i){this.axisPointerClass&&MS.fixValue(e),TS.superApply(this,"render",arguments),IS(this,e,t,n,i,!0)},updateAxisPointer:function(e,t,n,i,a){IS(this,e,t,n,i,!1)},remove:function(e,t){var n=this._axisPointer;n&&n.remove(t),TS.superApply(this,"remove",arguments)},dispose:function(e,t){AS(this,t),TS.superApply(this,"dispose",arguments)}});function IS(e,t,n,i,a,r){var o=TS.getAxisPointerClass(e.axisPointerClass);if(o){var s=MS.getAxisPointerModel(t);s?(e._axisPointer||(e._axisPointer=new o)).render(t,s,i,r):AS(e,i)}}function AS(e,t,n){var i=e._axisPointer;i&&i.dispose(t,n),e._axisPointer=null}var DS=[];TS.registerAxisPointerClass=function(e,t){DS[e]=t},TS.getAxisPointerClass=function(e){return e&&DS[e]};var CS=TS;var OS=function(e,t,n){n=n||{};var i=e.coordinateSystem,a=t.axis,r={},o=a.getAxesOnZeroOf()[0],s=a.position,l=o?"onZero":s,u=a.dim,c=i.getRect(),h=[c.x,c.x+c.width,c.y,c.y+c.height],d={left:0,right:1,top:0,bottom:1,onZero:2},f=t.get("offset")||0,p="x"===u?[h[2]-f,h[3]+f]:[h[0]-f,h[1]+f];if(o){var g=o.toGlobalCoord(o.dataToCoord(0));p[d.onZero]=Math.max(Math.min(g,p[1]),p[0])}r.position=["y"===u?p[d[l]]:h[0],"x"===u?p[d[l]]:h[3]],r.rotation=Math.PI/2*("x"===u?0:1),r.labelDirection=r.tickDirection=r.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],r.labelOffset=o?p[d[s]]-p[d.onZero]:0,t.get("axisTick.inside")&&(r.tickDirection=-r.tickDirection),Ge.retrieve(n.labelInside,t.get("axisLabel.inside"))&&(r.labelDirection=-r.labelDirection);var m=t.get("axisLabel.rotate");return r.labelRotate="top"===l?-m:m,r.z2=1,r},kS={layout:OS};var LS=function(e,t,n,i){var a=n.axis;if(!a.scale.isBlank()){var r=n.getModel("splitArea"),o=r.getModel("areaStyle"),s=o.get("color"),l=i.coordinateSystem.getRect(),u=a.getTicksCoords({tickModel:r,clamp:!0});if(u.length){var c=s.length,h=e.__splitAreaColors,d=Ge.createHashMap(),f=0;if(h)for(var p=0;p<u.length;p++){var g=h.get(u[p].tickValue);if(null!=g){f=(g+(c-1)*p)%c;break}}var m=a.toGlobalCoord(u[0].coord),v=o.getAreaStyle();s=Ge.isArray(s)?s:[s];for(p=1;p<u.length;p++){var y,_,x,b,w=a.toGlobalCoord(u[p].coord);a.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),t.add(new rh.Rect({anid:null!=S?"area_"+S:null,shape:{x:y,y:_,width:x,height:b},style:Ge.defaults({fill:s[f]},v),silent:!0})),f=(f+1)%c}e.__splitAreaColors=d}}},ES={rectCoordAxisBuildSplitArea:LS,rectCoordAxisHandleRemove:function(e){e.__splitAreaColors=null}},NS=ES.rectCoordAxisBuildSplitArea,PS=ES.rectCoordAxisHandleRemove,RS=["axisLine","axisTickLabel","axisName"],zS=["splitArea","splitLine","minorSplitLine"],BS=CS.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(e,t,n,i){this.group.removeAll();var a=this._axisGroup;if(this._axisGroup=new rh.Group,this.group.add(this._axisGroup),e.get("show")){var r=e.getCoordSysModel(),o=kS.layout(r,e),s=new gS(e,o);Ge.each(RS,s.add,s),this._axisGroup.add(s.getGroup()),Ge.each(zS,(function(t){e.get(t+".show")&&this["_"+t](e,r)}),this),rh.groupTransition(a,this._axisGroup,e),BS.superCall(this,"render",e,t,n,i)}},remove:function(){PS(this)},_splitLine:function(e,t){var n=e.axis;if(!n.scale.isBlank()){var i=e.getModel("splitLine"),a=i.getModel("lineStyle"),r=a.get("color");r=Ge.isArray(r)?r:[r];for(var o=t.coordinateSystem.getRect(),s=n.isHorizontal(),l=0,u=n.getTicksCoords({tickModel:i}),c=[],h=[],d=a.getLineStyle(),f=0;f<u.length;f++){var p=n.toGlobalCoord(u[f].coord);s?(c[0]=p,c[1]=o.y,h[0]=p,h[1]=o.y+o.height):(c[0]=o.x,c[1]=p,h[0]=o.x+o.width,h[1]=p);var g=l++%r.length,m=u[f].tickValue;this._axisGroup.add(new rh.Line({anid:null!=m?"line_"+u[f].tickValue:null,subPixelOptimize:!0,shape:{x1:c[0],y1:c[1],x2:h[0],y2:h[1]},style:Ge.defaults({stroke:r[g]},d),silent:!0}))}}},_minorSplitLine:function(e,t){var n=e.axis,i=e.getModel("minorSplitLine").getModel("lineStyle"),a=t.coordinateSystem.getRect(),r=n.isHorizontal(),o=n.getMinorTicksCoords();if(o.length)for(var s=[],l=[],u=i.getLineStyle(),c=0;c<o.length;c++)for(var h=0;h<o[c].length;h++){var d=n.toGlobalCoord(o[c][h].coord);r?(s[0]=d,s[1]=a.y,l[0]=d,l[1]=a.y+a.height):(s[0]=a.x,s[1]=d,l[0]=a.x+a.width,l[1]=d),this._axisGroup.add(new rh.Line({anid:"minor_line_"+o[c][h].tickValue,subPixelOptimize:!0,shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:u,silent:!0}))}},_splitArea:function(e,t){NS(this,this._axisGroup,e,t)}});BS.extend({type:"xAxis"}),BS.extend({type:"yAxis"}),Qx.extendComponentView({type:"grid",render:function(e,t){this.group.removeAll(),e.get("show")&&this.group.add(new rh.Rect({shape:e.coordinateSystem.getRect(),style:Ge.defaults({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))}}),Qx.registerPreprocessor((function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})),Qx.registerVisual(lw("line","circle","line")),Qx.registerLayout(hw("line")),Qx.registerProcessor(Qx.PRIORITY.PROCESSOR.STATISTIC,pw("line"));var VS=cg.extend({type:"series.__base_bar__",getInitialData:function(e,t){return vy(this.getSource(),this,{useEncodeDefaulter:!0})},getMarkerPosition:function(e){var t=this.coordinateSystem;if(t){var n=t.dataToPoint(t.clampData(e)),i=this.getData(),a=i.getLayout("offset"),r=i.getLayout("size");return n[t.getBaseAxis().isHorizontal()?0:1]+=a+r/2,n}return[NaN,NaN]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",itemStyle:{},emphasis:{}}});VS.extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect",getProgressive:function(){return!!this.get("large")&&this.get("progressive")},getProgressiveThreshold:function(){var e=this.get("progressiveThreshold"),t=this.get("largeThreshold");return t>e&&(e=t),e},defaultOption:{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1}}});var HS=tb.getDefaultLabel;function YS(e,t){"outside"===e.textPosition&&(e.textPosition=t)}var FS=function(e,t,n,i,a,r,o){var s=n.getModel("label"),l=n.getModel("emphasis.label");rh.setLabelStyle(e,t,s,l,{labelFetcher:a,labelDataIndex:r,defaultText:HS(a.getData(),r),isRectText:!0,autoColor:i}),YS(e),YS(t)},GS={setLabel:FS},WS=Xo([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),jS={getBarItemStyle:function(e){var t=WS(this,e);if(this.getBorderLineDash){var n=this.getBorderLineDash();n&&(t.lineDash=n)}return t}},US=jS,ZS=(0,rh.extendShape)({type:"sausage",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},buildPath:function(e,t){var n=t.cx,i=t.cy,a=Math.max(t.r0||0,0),r=Math.max(t.r,0),o=.5*(r-a),s=a+o,l=t.startAngle,u=t.endAngle,c=t.clockwise,h=Math.cos(l),d=Math.sin(l),f=Math.cos(u),p=Math.sin(u);(c?u-l<2*Math.PI:l-u<2*Math.PI)&&(e.moveTo(h*a+n,d*a+i),e.arc(h*s+n,d*s+i,o,-Math.PI+l,l,!c)),e.arc(n,i,r,l,u,!c),e.moveTo(f*r+n,p*r+i),e.arc(f*s+n,p*s+i,o,u-2*Math.PI,u-Math.PI,!c),0!==a&&(e.arc(n,i,a,u,l,c),e.moveTo(h*a+n,p*a+i)),e.closePath()}}),XS=GS.setLabel,qS=Lg.throttle,KS=Zb.createClipPath,$S=["itemStyle","barBorderWidth"],QS=[0,0];Ge.extend(xh.prototype,US),Qx.extendChartView({type:"bar",render:function(e,t,n){this._updateDrawMode(e);var i=e.get("coordinateSystem");return"cartesian2d"!==i&&"polar"!==i||(this._isLargeDraw?this._renderLarge(e,t,n):this._renderNormal(e,t,n)),this.group},incrementalPrepareRender:function(e,t,n){this._clear(),this._updateDrawMode(e)},incrementalRender:function(e,t,n,i){this._incrementalRenderLarge(e,t)},_updateDrawMode:function(e){var t=e.pipelineContext.large;(null==this._isLargeDraw||t^this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},_renderNormal:function(e,t,n){var i,a=this.group,r=e.getData(),o=this._data,s=e.coordinateSystem,l=s.getBaseAxis();"cartesian2d"===s.type?i=l.isHorizontal():"polar"===s.type&&(i="angle"===l.dim);var u=e.isAnimationEnabled()?e:null,c=e.get("clip",!0),h=function(e,t){var n=e.getArea&&e.getArea();if("cartesian2d"===e.type){var i=e.getBaseAxis();if("category"!==i.type||!i.onBand){var a=t.getLayout("bandWidth");i.isHorizontal()?(n.x-=a,n.width+=2*a):(n.y-=a,n.height+=2*a)}}return n}(s,r);a.removeClipPath();var d=e.get("roundCap",!0),f=e.get("showBackground",!0),p=e.getModel("backgroundStyle"),g=p.get("barBorderRadius")||0,m=[],v=this._backgroundEls||[];r.diff(o).add((function(t){var n=r.getItemModel(t),o=rM[s.type](r,t,n);if(f){var l=rM[s.type](r,t),v=function(e,t,n){var i="polar"===e.type?rh.Sector:rh.Rect;return new i({shape:hM(t,n,e),silent:!0,z2:0})}(s,i,l);v.useStyle(p.getBarItemStyle()),"cartesian2d"===s.type&&v.setShape("r",g),m[t]=v}if(r.hasValue(t)){if(c)if(tM[s.type](h,o))return void a.remove(y);var y=nM[s.type](t,o,i,u,!1,d);r.setItemGraphicEl(t,y),a.add(y),sM(y,r,t,n,o,e,i,"polar"===s.type)}})).update((function(t,n){var l=r.getItemModel(t),y=rM[s.type](r,t,l);if(f){var _=v[n];_.useStyle(p.getBarItemStyle()),"cartesian2d"===s.type&&_.setShape("r",g),m[t]=_;var x=rM[s.type](r,t),b=hM(i,x,s);rh.updateProps(_,{shape:b},u,t)}var w=o.getItemGraphicEl(n);if(r.hasValue(t)){if(c)if(tM[s.type](h,y))return void a.remove(w);w?rh.updateProps(w,{shape:y},u,t):w=nM[s.type](t,y,i,u,!0,d),r.setItemGraphicEl(t,w),a.add(w),sM(w,r,t,l,y,e,i,"polar"===s.type)}else a.remove(w)})).remove((function(e){var t=o.getItemGraphicEl(e);"cartesian2d"===s.type?t&&iM(e,u,t):t&&aM(e,u,t)})).execute();var y=this._backgroundGroup||(this._backgroundGroup=new zi);y.removeAll();for(var _=0;_<m.length;++_)y.add(m[_]);a.add(y),this._backgroundEls=m,this._data=r},_renderLarge:function(e,t,n){this._clear(),uM(e,this.group);var i=e.get("clip",!0)?KS(e.coordinateSystem,!1,e):null;i?this.group.setClipPath(i):this.group.removeClipPath()},_incrementalRenderLarge:function(e,t){this._removeBackground(),uM(t,this.group,!0)},dispose:Ge.noop,remove:function(e){this._clear(e)},_clear:function(e){var t=this.group,n=this._data;e&&e.get("animation")&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl((function(t){"sector"===t.type?aM(t.dataIndex,e,t):iM(t.dataIndex,e,t)}))):t.removeAll(),this._data=null},_removeBackground:function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null}});var JS=Math.max,eM=Math.min,tM={cartesian2d:function(e,t){var n=t.width<0?-1:1,i=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),i<0&&(t.y+=t.height,t.height=-t.height);var a=JS(t.x,e.x),r=eM(t.x+t.width,e.x+e.width),o=JS(t.y,e.y),s=eM(t.y+t.height,e.y+e.height);t.x=a,t.y=o,t.width=r-a,t.height=s-o;var l=t.width<0||t.height<0;return n<0&&(t.x+=t.width,t.width=-t.width),i<0&&(t.y+=t.height,t.height=-t.height),l},polar:function(e){return!1}},nM={cartesian2d:function(e,t,n,i,a){var r=new rh.Rect({shape:Ge.extend({},t),z2:1});if(r.name="item",i){var o=n?"height":"width",s={};r.shape[o]=0,s[o]=t[o],rh[a?"updateProps":"initProps"](r,{shape:s},i,e)}return r},polar:function(e,t,n,i,a,r){var o=t.startAngle<t.endAngle,s=new(!n&&r?ZS:rh.Sector)({shape:Ge.defaults({clockwise:o},t),z2:1});if(s.name="item",i){var l=n?"r":"endAngle",u={};s.shape[l]=n?0:t.startAngle,u[l]=t[l],rh[a?"updateProps":"initProps"](s,{shape:u},i,e)}return s}};function iM(e,t,n){n.style.text=null,rh.updateProps(n,{shape:{width:0}},t,e,(function(){n.parent&&n.parent.remove(n)}))}function aM(e,t,n){n.style.text=null,rh.updateProps(n,{shape:{r:n.shape.r0}},t,e,(function(){n.parent&&n.parent.remove(n)}))}var rM={cartesian2d:function(e,t,n){var i=e.getItemLayout(t),a=n?function(e,t){var n=e.get($S)||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(n,i,a)}(n,i):0,r=i.width>0?1:-1,o=i.height>0?1:-1;return{x:i.x+r*a/2,y:i.y+o*a/2,width:i.width-r*a,height:i.height-o*a}},polar:function(e,t,n){var i=e.getItemLayout(t);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle}}};function oM(e){return null!=e.startAngle&&null!=e.endAngle&&e.startAngle===e.endAngle}function sM(e,t,n,i,a,r,o,s){var l=t.getItemVisual(n,"color"),u=t.getItemVisual(n,"opacity"),c=t.getVisual("borderColor"),h=i.getModel("itemStyle"),d=i.getModel("emphasis.itemStyle").getBarItemStyle();s||e.setShape("r",h.get("barBorderRadius")||0),e.useStyle(Ge.defaults({stroke:oM(a)?"none":c,fill:oM(a)?"none":l,opacity:u},h.getBarItemStyle()));var f=i.getShallow("cursor");f&&e.attr("cursor",f);var p=o?a.height>0?"bottom":"top":a.width>0?"left":"right";s||XS(e.style,d,i,l,r,n,p),oM(a)&&(d.fill=d.stroke="none"),rh.setHoverStyle(e,d)}var lM=Tl.extend({type:"largeBar",shape:{points:[]},buildPath:function(e,t){for(var n=t.points,i=this.__startPoint,a=this.__baseDimIdx,r=0;r<n.length;r+=2)i[a]=n[r+a],e.moveTo(i[0],i[1]),e.lineTo(n[r],n[r+1])}});function uM(e,t,n){var i=e.getData(),a=[],r=i.getLayout("valueAxisHorizontal")?1:0;a[1-r]=i.getLayout("valueAxisStart");var o=i.getLayout("largeDataIndices"),s=i.getLayout("barWidth"),l=e.getModel("backgroundStyle");if(e.get("showBackground",!0)){var u=i.getLayout("largeBackgroundPoints"),c=[];c[1-r]=i.getLayout("backgroundStart");var h=new lM({shape:{points:u},incremental:!!n,__startPoint:c,__baseDimIdx:r,__largeDataIndices:o,__barWidth:s,silent:!0,z2:0});!function(e,t,n){var i=t.get("borderColor")||t.get("color"),a=t.getItemStyle(["color","borderColor"]);e.useStyle(a),e.style.fill=null,e.style.stroke=i,e.style.lineWidth=n.getLayout("barWidth")}(h,l,i),t.add(h)}var d=new lM({shape:{points:i.getLayout("largePoints")},incremental:!!n,__startPoint:a,__baseDimIdx:r,__largeDataIndices:o,__barWidth:s});t.add(d),function(e,t,n){var i=n.getVisual("borderColor")||n.getVisual("color"),a=t.getModel("itemStyle").getItemStyle(["color","borderColor"]);e.useStyle(a),e.style.fill=null,e.style.stroke=i,e.style.lineWidth=n.getLayout("barWidth")}(d,e,i),d.seriesIndex=e.seriesIndex,e.get("silent")||(d.on("mousedown",cM),d.on("mousemove",cM))}var cM=qS((function(e){var t=function(e,t,n){var i=e.__baseDimIdx,a=1-i,r=e.shape.points,o=e.__largeDataIndices,s=Math.abs(e.__barWidth/2),l=e.__startPoint[a];QS[0]=t,QS[1]=n;for(var u=QS[i],c=QS[1-i],h=u-s,d=u+s,f=0,p=r.length/2;f<p;f++){var g=2*f,m=r[g+i],v=r[g+a];if(m>=h&&m<=d&&(l<=v?c>=l&&c<=v:c>=v&&c<=l))return o[f]}return-1}(this,e.offsetX,e.offsetY);this.dataIndex=t>=0?t:null}),30,!1);function hM(e,t,n){var i,a="polar"===n.type;return i=a?n.getArea():n.grid.getRect(),a?{cx:i.cx,cy:i.cy,r0:e?i.r0:t.r0,r:e?i.r:t.r,startAngle:e?t.startAngle:0,endAngle:e?t.endAngle:2*Math.PI}:{x:e?t.x:i.x,y:e?i.y:t.y,width:e?t.width:i.width,height:e?i.height:t.height}}var dM=t_.layout,fM=t_.largeLayout;Qx.registerLayout(Qx.PRIORITY.VISUAL.LAYOUT,Ge.curry(dM,"bar")),Qx.registerLayout(Qx.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,fM),Qx.registerVisual({seriesType:"bar",reset:function(e){e.getData().setVisual("legendSymbol","roundRect")}});var pM=Ge.extend,gM=Ge.isArray;var mM=function(e,t,n){t=gM(t)&&{coordDimensions:t}||pM({},t);var i=e.getSource(),a=Jv(i,t),r=new Bv(a,e);return r.initData(i,n),r},vM={updateSelectedMap:function(e){this._targetList=Ge.isArray(e)?e.slice():[],this._selectTargetMap=Ge.reduce(e||[],(function(e,t){return e.set(t.name,t),e}),Ge.createHashMap())},select:function(e,t){var n=null!=t?this._targetList[t]:this._selectTargetMap.get(e);"single"===this.get("selectedMode")&&this._selectTargetMap.each((function(e){e.selected=!1})),n&&(n.selected=!0)},unSelect:function(e,t){var n=null!=t?this._targetList[t]:this._selectTargetMap.get(e);n&&(n.selected=!1)},toggleSelected:function(e,t){var n=null!=t?this._targetList[t]:this._selectTargetMap.get(e);if(null!=n)return this[n.selected?"unSelect":"select"](e,t),n.selected},isSelected:function(e,t){var n=null!=t?this._targetList[t]:this._selectTargetMap.get(e);return n&&n.selected}};var yM=function(e,t){this.getAllNames=function(){var e=t();return e.mapArray(e.getName)},this.containName=function(e){return t().indexOfName(e)>=0},this.indexOfName=function(t){return e().indexOfName(t)},this.getItemVisual=function(t,n){return e().getItemVisual(t,n)}},_M=Ph.getPercentWithPrecision,xM=kp.retrieveRawAttr,bM=of.makeSeriesEncodeForNameBased,wM=Qx.extendSeriesModel({type:"series.pie",init:function(e){wM.superApply(this,"init",arguments),this.legendVisualProvider=new yM(Ge.bind(this.getData,this),Ge.bind(this.getRawData,this)),this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(e)},mergeOption:function(e){wM.superCall(this,"mergeOption",e),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(e,t){return mM(this,{coordDimensions:["value"],encodeDefaulter:Ge.curry(bM,this)})},_createSelectableList:function(){for(var e=this.getRawData(),t=e.mapDimension("value"),n=[],i=0,a=e.count();i<a;i++)n.push({name:e.getName(i),value:e.get(t,i),selected:xM(e,i,"selected")});return n},getDataParams:function(e){var t=this.getData(),n=wM.superCall(this,"getDataParams",e),i=[];return t.each(t.mapDimension("value"),(function(e){i.push(e)})),n.percent=_M(i,e,t.hostModel.get("percentPrecision")),n.$vars.push("percent"),n},_defaultLabelLine:function(e){Bo.defaultEmphasis(e,"labelLine",["show"]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:!1,show:!0,position:"outer",alignTo:"none",margin:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},animationType:"expansion",animationTypeUpdate:"transition",animationEasing:"cubicOut"}});function SM(e,t,n,i){var a=t.getData(),r=this.dataIndex,o=a.getName(r),s=t.get("selectedOffset");i.dispatchAction({type:"pieToggleSelect",from:e,name:o,seriesId:t.id}),a.each((function(e){MM(a.getItemGraphicEl(e),a.getItemLayout(e),t.isSelected(a.getName(e)),s,n)}))}function MM(e,t,n,i,a){var r=(t.startAngle+t.endAngle)/2,o=n?i:0,s=[Math.cos(r)*o,Math.sin(r)*o];a?e.animate().when(200,{position:s}).start("bounceOut"):e.attr("position",s)}function TM(e,t){rh.Group.call(this);var n=new rh.Sector({z2:2}),i=new rh.Polyline,a=new rh.Text;this.add(n),this.add(i),this.add(a),this.updateData(e,t,!0)}Ge.mixin(wM,vM);var IM=TM.prototype;IM.updateData=function(e,t,n){var i=this.childAt(0),a=this.childAt(1),r=this.childAt(2),o=e.hostModel,s=e.getItemModel(t),l=e.getItemLayout(t),u=Ge.extend({},l);u.label=null;var c=o.getShallow("animationTypeUpdate");n?(i.setShape(u),"scale"===o.getShallow("animationType")?(i.shape.r=l.r0,rh.initProps(i,{shape:{r:l.r}},o,t)):(i.shape.endAngle=l.startAngle,rh.updateProps(i,{shape:{endAngle:l.endAngle}},o,t))):"expansion"===c?i.setShape(u):rh.updateProps(i,{shape:u},o,t);var h=e.getItemVisual(t,"color");i.useStyle(Ge.defaults({lineJoin:"bevel",fill:h},s.getModel("itemStyle").getItemStyle())),i.hoverStyle=s.getModel("emphasis.itemStyle").getItemStyle();var d=s.getShallow("cursor");d&&i.attr("cursor",d),MM(this,e.getItemLayout(t),o.isSelected(e.getName(t)),o.get("selectedOffset"),o.get("animation"));var f=!n&&"transition"===c;this._updateLabel(e,t,f),this.highDownOnUpdate=o.get("silent")?null:function(e,t){var n=o.isAnimationEnabled()&&s.get("hoverAnimation");"emphasis"===t?(a.ignore=a.hoverIgnore,r.ignore=r.hoverIgnore,n&&(i.stopAnimation(!0),i.animateTo({shape:{r:l.r+o.get("hoverOffset")}},300,"elasticOut"))):(a.ignore=a.normalIgnore,r.ignore=r.normalIgnore,n&&(i.stopAnimation(!0),i.animateTo({shape:{r:l.r}},300,"elasticOut")))},rh.setHoverStyle(this)},IM._updateLabel=function(e,t,n){var i=this.childAt(1),a=this.childAt(2),r=e.hostModel,o=e.getItemModel(t),s=e.getItemLayout(t).label,l=e.getItemVisual(t,"color");if(!s||isNaN(s.x)||isNaN(s.y))a.ignore=a.normalIgnore=a.hoverIgnore=i.ignore=i.normalIgnore=i.hoverIgnore=!0;else{var u={points:s.linePoints||[[s.x,s.y],[s.x,s.y],[s.x,s.y]]},c={x:s.x,y:s.y};n?(rh.updateProps(i,{shape:u},r,t),rh.updateProps(a,{style:c},r,t)):(i.attr({shape:u}),a.attr({style:c})),a.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var h=o.getModel("label"),d=o.getModel("emphasis.label"),f=o.getModel("labelLine"),p=o.getModel("emphasis.labelLine");l=e.getItemVisual(t,"color");rh.setLabelStyle(a.style,a.hoverStyle={},h,d,{labelFetcher:e.hostModel,labelDataIndex:t,defaultText:s.text,autoColor:l,useInsideStyle:!!s.inside},{textAlign:s.textAlign,textVerticalAlign:s.verticalAlign,opacity:e.getItemVisual(t,"opacity")}),a.ignore=a.normalIgnore=!h.get("show"),a.hoverIgnore=!d.get("show"),i.ignore=i.normalIgnore=!f.get("show"),i.hoverIgnore=!p.get("show"),i.setStyle({stroke:l,opacity:e.getItemVisual(t,"opacity")}),i.setStyle(f.getModel("lineStyle").getLineStyle()),i.hoverStyle=p.getModel("lineStyle").getLineStyle();var g=f.get("smooth");g&&!0===g&&(g=.4),i.setShape({smooth:g})}},Ge.inherits(TM,rh.Group),Ag.extend({type:"pie",init:function(){var e=new rh.Group;this._sectorGroup=e},render:function(e,t,n,i){if(!i||i.from!==this.uid){var a=e.getData(),r=this._data,o=this.group,s=t.get("animation"),l=!r,u=e.get("animationType"),c=e.get("animationTypeUpdate"),h=Ge.curry(SM,this.uid,e,s,n),d=e.get("selectedMode");if(a.diff(r).add((function(e){var t=new TM(a,e);l&&"scale"!==u&&t.eachChild((function(e){e.stopAnimation(!0)})),d&&t.on("click",h),a.setItemGraphicEl(e,t),o.add(t)})).update((function(e,t){var n=r.getItemGraphicEl(t);l||"transition"===c||n.eachChild((function(e){e.stopAnimation(!0)})),n.updateData(a,e),n.off("click"),d&&n.on("click",h),o.add(n),a.setItemGraphicEl(e,n)})).remove((function(e){var t=r.getItemGraphicEl(e);o.remove(t)})).execute(),s&&a.count()>0&&(l?"scale"!==u:"transition"!==c)){for(var f=a.getItemLayout(0),p=1;isNaN(f.startAngle)&&p<a.count();++p)f=a.getItemLayout(p);var g=Math.max(n.getWidth(),n.getHeight())/2,m=Ge.bind(o.removeClipPath,o);o.setClipPath(this._createClipPath(f.cx,f.cy,g,f.startAngle,f.clockwise,m,e,l))}else o.removeClipPath();this._data=a}},dispose:function(){},_createClipPath:function(e,t,n,i,a,r,o,s){var l=new rh.Sector({shape:{cx:e,cy:t,r0:0,r:n,startAngle:i,endAngle:i,clockwise:a}});return(s?rh.initProps:rh.updateProps)(l,{shape:{endAngle:i+(a?1:-1)*Math.PI*2}},o,r),l},containPoint:function(e,t){var n=t.getData().getItemLayout(0);if(n){var i=e[0]-n.cx,a=e[1]-n.cy,r=Math.sqrt(i*i+a*a);return r<=n.r&&r>=n.r0}}});var AM=function(e,t){Ge.each(t,(function(t){t.update="updateView",Qx.registerAction(t,(function(n,i){var a={};return i.eachComponent({mainType:"series",subType:e,query:n},(function(e){e[t.method]&&e[t.method](n.name,n.dataIndex);var i=e.getData();i.each((function(t){var n=i.getName(t);a[n]=e.isSelected(n)||!1}))})),{name:n.name,selected:a,seriesId:n.seriesId}}))}))},DM=Ge.createHashMap;var CM=function(e){return{getTargetSeries:function(t){var n={},i=DM();return t.eachSeriesByType(e,(function(e){e.__paletteScope=n,i.set(e.uid,e)})),i},reset:function(e,t){var n=e.getRawData(),i={},a=e.getData();a.each((function(e){var t=a.getRawIndex(e);i[t]=e})),n.each((function(t){var r,o=i[t],s=null!=o&&a.getItemVisual(o,"color",!0),l=null!=o&&a.getItemVisual(o,"borderColor",!0);if(s&&l||(r=n.getItemModel(t)),!s){var u=r.get("itemStyle.color")||e.getColorFromPalette(n.getName(t)||t+"",e.__paletteScope,n.count());null!=o&&a.setItemVisual(o,"color",u)}if(!l){var c=r.get("itemStyle.borderColor");null!=o&&a.setItemVisual(o,"borderColor",c)}}))}}},OM=Ph.parsePercent,kM=Math.PI/180;function LM(e,t,n,i,a,r,o,s,l,u){function c(t,n,i,a){for(var r=t;r<n&&!(e[r].y+i>l+o);r++)if(e[r].y+=i,r>t&&r+1<n&&e[r+1].y>e[r].y+e[r].height)return void h(r,i/2);h(n-1,i/2)}function h(t,n){for(var i=t;i>=0&&!(e[i].y-n<l)&&(e[i].y-=n,!(i>0&&e[i].y>e[i-1].y+e[i-1].height));i--);}function d(e,t,n,i,a,r){for(var o=t?Number.MAX_VALUE:0,s=0,l=e.length;s<l;s++)if("none"===e[s].labelAlignTo){var u=Math.abs(e[s].y-i),c=e[s].len,h=e[s].len2,d=u<a+c?Math.sqrt((a+c+h)*(a+c+h)-u*u):Math.abs(e[s].x-n);t&&d>=o&&(d=o-10),!t&&d<=o&&(d=o+10),e[s].x=n+d*r,o=d}}e.sort((function(e,t){return e.y-t.y}));for(var f,p=0,g=e.length,m=[],v=[],y=0;y<g;y++){if("outer"===e[y].position&&"labelLine"===e[y].labelAlignTo){var _=e[y].x-u;e[y].linePoints[1][0]+=_,e[y].x=u}(f=e[y].y-p)<0&&c(y,g,-f),p=e[y].y+e[y].height}o-p<0&&h(g-1,p-o);for(y=0;y<g;y++)e[y].y>=n?v.push(e[y]):m.push(e[y]);d(m,!1,t,n,i,a),d(v,!0,t,n,i,a)}function EM(e){return"center"===e.position}var NM=function(e,t,n,i,a,r){var o,s,l=e.getData(),u=[],c=!1,h=(e.get("minShowLabelAngle")||0)*kM;l.each((function(i){var r=l.getItemLayout(i),d=l.getItemModel(i),f=d.getModel("label"),p=f.get("position")||d.get("emphasis.label.position"),g=f.get("distanceToLabelLine"),m=f.get("alignTo"),v=OM(f.get("margin"),n),y=f.get("bleedMargin"),_=f.getFont(),x=d.getModel("labelLine"),b=x.get("length");b=OM(b,n);var w=x.get("length2");if(w=OM(w,n),!(r.angle<h)){var S,M,T,I,A=(r.startAngle+r.endAngle)/2,D=Math.cos(A),C=Math.sin(A);o=r.cx,s=r.cy;var O,k=e.getFormattedLabel(i,"normal")||l.getName(i),L=Za.getBoundingRect(k,_,I,"top"),E="inside"===p||"inner"===p;if("center"===p)S=r.cx,M=r.cy,I="center";else{var N=(E?(r.r+r.r0)/2*D:r.r*D)+o,P=(E?(r.r+r.r0)/2*C:r.r*C)+s;if(S=N+3*D,M=P+3*C,!E){var R=N+D*(b+t-r.r),z=P+C*(b+t-r.r),B=R+(D<0?-1:1)*w;S="edge"===m?D<0?a+v:a+n-v:B+(D<0?-g:g),M=z,T=[[N,P],[R,z],[B,z]]}I=E?"center":"edge"===m?D>0?"right":"left":D>0?"left":"right"}var V=f.get("rotate");O="number"==typeof V?V*(Math.PI/180):V?D<0?-A+Math.PI:-A:0,c=!!O,r.label={x:S,y:M,position:p,height:L.height,len:b,len2:w,linePoints:T,textAlign:I,verticalAlign:"middle",rotation:O,inside:E,labelDistance:g,labelAlignTo:m,labelMargin:v,bleedMargin:y,textRect:L,text:k,font:_},E||u.push(r.label)}})),!c&&e.get("avoidLabelOverlap")&&function(e,t,n,i,a,r,o,s){for(var l=[],u=[],c=Number.MAX_VALUE,h=-Number.MAX_VALUE,d=0;d<e.length;d++)EM(e[d])||(e[d].x<t?(c=Math.min(c,e[d].x),l.push(e[d])):(h=Math.max(h,e[d].x),u.push(e[d])));for(LM(u,t,n,i,1,0,r,0,s,h),LM(l,t,n,i,-1,0,r,0,s,c),d=0;d<e.length;d++){var f=e[d];if(!EM(f)){var p=f.linePoints;if(p){var g,m="edge"===f.labelAlignTo,v=f.textRect.width;(g=m?f.x<t?p[2][0]-f.labelDistance-o-f.labelMargin:o+a-f.labelMargin-p[2][0]-f.labelDistance:f.x<t?f.x-o-f.bleedMargin:o+a-f.x-f.bleedMargin)<f.textRect.width&&(f.text=Za.truncateText(f.text,g,f.font),"edge"===f.labelAlignTo&&(v=Za.getWidth(f.text,f.font)));var y=p[1][0]-p[2][0];m?f.x<t?p[2][0]=o+f.labelMargin+v+f.labelDistance:p[2][0]=o+a-f.labelMargin-v-f.labelDistance:(f.x<t?p[2][0]=f.x+f.labelDistance:p[2][0]=f.x-f.labelDistance,p[1][0]=p[2][0]+y),p[1][1]=p[2][1]=f.y}}}}(u,o,s,t,n,i,a,r)},PM=Ph.parsePercent,RM=Ph.linearMap,zM=2*Math.PI,BM=Math.PI/180;var VM=function(e,t,n,i){t.eachSeriesByType(e,(function(e){var t=e.getData(),i=t.mapDimension("value"),a=function(e,t){return sd.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,n),r=e.get("center"),o=e.get("radius");Ge.isArray(o)||(o=[0,o]),Ge.isArray(r)||(r=[r,r]);var s=PM(a.width,n.getWidth()),l=PM(a.height,n.getHeight()),u=Math.min(s,l),c=PM(r[0],s)+a.x,h=PM(r[1],l)+a.y,d=PM(o[0],u/2),f=PM(o[1],u/2),p=-e.get("startAngle")*BM,g=e.get("minAngle")*BM,m=0;t.each(i,(function(e){!isNaN(e)&&m++}));var v=t.getSum(i),y=Math.PI/(v||m)*2,_=e.get("clockwise"),x=e.get("roseType"),b=e.get("stillShowZeroSum"),w=t.getDataExtent(i);w[0]=0;var S=zM,M=0,T=p,I=_?1:-1;if(t.each(i,(function(e,n){var i;if(isNaN(e))t.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:_,cx:c,cy:h,r0:d,r:x?NaN:f,viewRect:a});else{(i="area"!==x?0===v&&b?y:e*y:zM/m)<g?(i=g,S-=g):M+=e;var r=T+I*i;t.setItemLayout(n,{angle:i,startAngle:T,endAngle:r,clockwise:_,cx:c,cy:h,r0:d,r:x?RM(e,w,[d,f]):f,viewRect:a}),T=r}})),S<zM&&m)if(S<=.001){var A=zM/m;t.each(i,(function(e,n){if(!isNaN(e)){var i=t.getItemLayout(n);i.angle=A,i.startAngle=p+I*n*A,i.endAngle=p+I*(n+1)*A}}))}else y=S/M,T=p,t.each(i,(function(e,n){if(!isNaN(e)){var i=t.getItemLayout(n),a=i.angle===g?g:e*y;i.startAngle=T,i.endAngle=T+I*a,T+=I*a}}));NM(e,f,a.width,a.height,a.x,a.y)}))};var HM=function(e){return{seriesType:e,reset:function(e,t){var n=t.findComponents({mainType:"legend"});if(n&&n.length){var i=e.getData();i.filterSelf((function(e){for(var t=i.getName(e),a=0;a<n.length;a++)if(!n[a].isSelected(t))return!1;return!0}))}}}};AM("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),Qx.registerVisual(CM("pie")),Qx.registerLayout(Ge.curry(VM,"pie")),Qx.registerProcessor(HM("pie")),cg.extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(e,t){return vy(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",getProgressive:function(){var e=this.option.progressive;return null==e?this.option.large?5e3:this.get("progressive"):e},getProgressiveThreshold:function(){var e=this.option.progressiveThreshold;return null==e?this.option.large?1e4:this.get("progressiveThreshold"):e},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},clip:!0}});var YM=X_.createSymbol,FM=rh.extendShape({shape:{points:null},symbolProxy:null,softClipShape:null,buildPath:function(e,t){var n=t.points,i=t.size,a=this.symbolProxy,r=a.shape;if(!((e.getContext?e.getContext():e)&&i[0]<4))for(var o=0;o<n.length;){var s=n[o++],l=n[o++];isNaN(s)||isNaN(l)||(this.softClipShape&&!this.softClipShape.contain(s,l)||(r.x=s-i[0]/2,r.y=l-i[1]/2,r.width=i[0],r.height=i[1],a.buildPath(e,r,!0)))}},afterBrush:function(e){var t=this.shape,n=t.points,i=t.size;if(i[0]<4){this.setTransform(e);for(var a=0;a<n.length;){var r=n[a++],o=n[a++];isNaN(r)||isNaN(o)||(this.softClipShape&&!this.softClipShape.contain(r,o)||e.fillRect(r-i[0]/2,o-i[1]/2,i[0],i[1]))}this.restoreTransform(e)}},findDataIndex:function(e,t){for(var n=this.shape,i=n.points,a=n.size,r=Math.max(a[0],4),o=Math.max(a[1],4),s=i.length/2-1;s>=0;s--){var l=2*s,u=i[l]-r/2,c=i[l+1]-o/2;if(e>=u&&t>=c&&e<=u+r&&t<=c+o)return s}return-1}});function GM(){this.group=new rh.Group}var WM=GM.prototype;WM.isPersistent=function(){return!this._incremental},WM.updateData=function(e,t){this.group.removeAll();var n=new FM({rectHover:!0,cursor:"default"});n.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(n,e,!1,t),this.group.add(n),this._incremental=null},WM.updateLayout=function(e){if(!this._incremental){var t=e.getLayout("symbolPoints");this.group.eachChild((function(e){if(null!=e.startIndex){var n=2*(e.endIndex-e.startIndex),i=4*e.startIndex*2;t=new Float32Array(t.buffer,i,n)}e.setShape("points",t)}))}},WM.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clearIncremental(),e.count()>2e6?(this._incremental||(this._incremental=new Zu({silent:!0})),this.group.add(this._incremental)):this._incremental=null},WM.incrementalUpdate=function(e,t,n){var i;this._incremental?(i=new FM,this._incremental.addDisplayable(i,!0)):((i=new FM({rectHover:!0,cursor:"default",startIndex:e.start,endIndex:e.end})).incremental=!0,this.group.add(i)),i.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(i,t,!!this._incremental,n)},WM._setCommon=function(e,t,n,i){var a=t.hostModel;i=i||{};var r=t.getVisual("symbolSize");e.setShape("size",r instanceof Array?r:[r,r]),e.softClipShape=i.clipShape||null,e.symbolProxy=YM(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;var o=e.shape.size[0]<4;e.useStyle(a.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=t.getVisual("color");s&&e.setColor(s),n||(e.seriesIndex=a.seriesIndex,e.on("mousemove",(function(t){e.dataIndex=null;var n=e.findDataIndex(t.offsetX,t.offsetY);n>=0&&(e.dataIndex=n+(e.startIndex||0))})))},WM.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},WM._clearIncremental=function(){var e=this._incremental;e&&e.clearDisplaybles()};var jM=GM;function UM(e,t,n){Nx.call(this,e,t,n),this.type="value",this.angle=0,this.name="",this.model}Qx.extendChartView({type:"scatter",render:function(e,t,n){var i=e.getData();this._updateSymbolDraw(i,e).updateData(i,{clipShape:this._getClipShape(e)}),this._finished=!0},incrementalPrepareRender:function(e,t,n){var i=e.getData();this._updateSymbolDraw(i,e).incrementalPrepareUpdate(i),this._finished=!1},incrementalRender:function(e,t,n){this._symbolDraw.incrementalUpdate(e,t.getData(),{clipShape:this._getClipShape(t)}),this._finished=e.end===t.getData().count()},updateTransform:function(e,t,n){var i=e.getData();if(this.group.dirty(),!this._finished||i.count()>1e4||!this._symbolDraw.isPersistent())return{update:!0};var a=hw().reset(e);a.progress&&a.progress({start:0,end:i.count()},i),this._symbolDraw.updateLayout(i)},_getClipShape:function(e){var t=e.coordinateSystem,n=t&&t.getArea&&t.getArea();return e.get("clip",!0)?n:null},_updateSymbolDraw:function(e,t){var n=this._symbolDraw,i=t.pipelineContext.large;return n&&i===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=i?new jM:new wb,this._isLargeDraw=i,this.group.removeAll()),this.group.add(n.group),n},remove:function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}}),Qx.registerVisual(lw("scatter","circle")),Qx.registerLayout(hw("scatter")),Ge.inherits(UM,Nx);var ZM=UM,XM=N_.getScaleExtent,qM=N_.niceScaleExtent;function KM(e,t,n){this._model=e,this.dimensions=[],this._indicatorAxes=Ge.map(e.getIndicatorModels(),(function(e,t){var n="indicator_"+t,i=new ZM(n,"log"===e.get("axisType")?new b_:new By);return i.name=e.get("name"),i.model=e,e.axis=i,this.dimensions.push(n),i}),this),this.resize(e,n),this.cx,this.cy,this.r,this.r0,this.startAngle}KM.prototype.getIndicatorAxes=function(){return this._indicatorAxes},KM.prototype.dataToPoint=function(e,t){var n=this._indicatorAxes[t];return this.coordToPoint(n.dataToCoord(e),t)},KM.prototype.coordToPoint=function(e,t){var n=this._indicatorAxes[t].angle;return[this.cx+e*Math.cos(n),this.cy-e*Math.sin(n)]},KM.prototype.pointToData=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,i=Math.sqrt(t*t+n*n);t/=i,n/=i;for(var a,r=Math.atan2(-n,t),o=1/0,s=-1,l=0;l<this._indicatorAxes.length;l++){var u=this._indicatorAxes[l],c=Math.abs(r-u.angle);c<o&&(a=u,s=l,o=c)}return[s,+(a&&a.coordToData(i))]},KM.prototype.resize=function(e,t){var n=e.get("center"),i=t.getWidth(),a=t.getHeight(),r=Math.min(i,a)/2;this.cx=Ph.parsePercent(n[0],i),this.cy=Ph.parsePercent(n[1],a),this.startAngle=e.get("startAngle")*Math.PI/180;var o=e.get("radius");"string"!=typeof o&&"number"!=typeof o||(o=[0,o]),this.r0=Ph.parsePercent(o[0],r),this.r=Ph.parsePercent(o[1],r),Ge.each(this._indicatorAxes,(function(e,t){e.setExtent(this.r0,this.r);var n=this.startAngle+t*Math.PI*2/this._indicatorAxes.length;n=Math.atan2(Math.sin(n),Math.cos(n)),e.angle=n}),this)},KM.prototype.update=function(e,t){var n=this._indicatorAxes,i=this._model;Ge.each(n,(function(e){e.scale.setExtent(1/0,-1/0)})),e.eachSeriesByType("radar",(function(t,a){if("radar"===t.get("coordinateSystem")&&e.getComponent("radar",t.get("radarIndex"))===i){var r=t.getData();Ge.each(n,(function(e){e.scale.unionExtentFromData(r,r.mapDimension(e.dim))}))}}),this);var a=i.get("splitNumber");function r(e){var t=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),n=e/t;return 2===n?n=5:n*=2,n*t}Ge.each(n,(function(e,t){var n=XM(e.scale,e.model).extent;qM(e.scale,e.model);var i=e.model,o=e.scale,s=i.getMin(),l=i.getMax(),u=o.getInterval();if(null!=s&&null!=l)o.setExtent(+s,+l),o.setInterval((l-s)/a);else if(null!=s){do{c=s+u*a,o.setExtent(+s,c),o.setInterval(u),u=r(u)}while(c<n[1]&&isFinite(c)&&isFinite(n[1]))}else if(null!=l){do{h=l-u*a,o.setExtent(h,+l),o.setInterval(u),u=r(u)}while(h>n[0]&&isFinite(h)&&isFinite(n[0]))}else{o.getTicks().length-1>a&&(u=r(u));var c=Math.ceil(n[1]/u)*u,h=Ph.round(c-u*a);o.setExtent(h,c),o.setInterval(u)}}))},KM.dimensions=[],KM.create=function(e,t){var n=[];return e.eachComponent("radar",(function(i){var a=new KM(i,e,t);n.push(a),i.coordinateSystem=a})),e.eachSeriesByType("radar",(function(e){"radar"===e.get("coordinateSystem")&&(e.coordinateSystem=n[e.get("radarIndex")||0])})),n},kf.register("radar",KM);var $M=Mw.valueAxis;function QM(e,t){return Ge.defaults({show:t},e)}Qx.extendComponentModel({type:"radar",optionUpdated:function(){var e=this.get("boundaryGap"),t=this.get("splitNumber"),n=this.get("scale"),i=this.get("axisLine"),a=this.get("axisTick"),r=this.get("axisType"),o=this.get("axisLabel"),s=this.get("name"),l=this.get("name.show"),u=this.get("name.formatter"),c=this.get("nameGap"),h=this.get("triggerEvent"),d=Ge.map(this.get("indicator")||[],(function(d){null!=d.max&&d.max>0&&!d.min?d.min=0:null!=d.min&&d.min<0&&!d.max&&(d.max=0);var f=s;if(null!=d.color&&(f=Ge.defaults({color:d.color},s)),d=Ge.merge(Ge.clone(d),{boundaryGap:e,splitNumber:t,scale:n,axisLine:i,axisTick:a,axisType:r,axisLabel:o,name:d.text,nameLocation:"end",nameGap:c,nameTextStyle:f,triggerEvent:h},!1),l||(d.name=""),"string"==typeof u){var p=d.name;d.name=u.replace("{value}",null!=p?p:"")}else"function"==typeof u&&(d.name=u(d.name,d));var g=Ge.extend(new xh(d,null,this.ecModel),R_);return g.mainType="radar",g.componentIndex=this.componentIndex,g}),this);this.getIndicatorModels=function(){return d}},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,name:{show:!0},boundaryGap:[0,0],splitNumber:5,nameGap:15,scale:!1,shape:"polygon",axisLine:Ge.merge({lineStyle:{color:"#bbb"}},$M.axisLine),axisLabel:QM($M.axisLabel,!1),axisTick:QM($M.axisTick,!1),axisType:"interval",splitLine:QM($M.splitLine,!0),splitArea:QM($M.splitArea,!0),indicator:[]}});var JM=["axisLine","axisTickLabel","axisName"];Qx.extendComponentView({type:"radar",render:function(e,t,n){this.group.removeAll(),this._buildAxes(e),this._buildSplitLineAndArea(e)},_buildAxes:function(e){var t=e.coordinateSystem,n=t.getIndicatorAxes(),i=Ge.map(n,(function(e){return new gS(e.model,{position:[t.cx,t.cy],rotation:e.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}));Ge.each(i,(function(e){Ge.each(JM,e.add,e),this.group.add(e.getGroup())}),this)},_buildSplitLineAndArea:function(e){var t=e.coordinateSystem,n=t.getIndicatorAxes();if(n.length){var i=e.get("shape"),a=e.getModel("splitLine"),r=e.getModel("splitArea"),o=a.getModel("lineStyle"),s=r.getModel("areaStyle"),l=a.get("show"),u=r.get("show"),c=o.get("color"),h=s.get("color");c=Ge.isArray(c)?c:[c],h=Ge.isArray(h)?h:[h];var d=[],f=[];if("circle"===i)for(var p=n[0].getTicksCoords(),g=t.cx,m=t.cy,v=0;v<p.length;v++){if(l)d[T(d,c,v)].push(new rh.Circle({shape:{cx:g,cy:m,r:p[v].coord}}));if(u&&v<p.length-1)f[T(f,h,v)].push(new rh.Ring({shape:{cx:g,cy:m,r0:p[v].coord,r:p[v+1].coord}}))}else{var y,_=Ge.map(n,(function(e,n){var i=e.getTicksCoords();return y=null==y?i.length-1:Math.min(i.length-1,y),Ge.map(i,(function(e){return t.coordToPoint(e.coord,n)}))})),x=[];for(v=0;v<=y;v++){for(var b=[],w=0;w<n.length;w++)b.push(_[w][v]);if(b[0]&&b.push(b[0].slice()),l)d[T(d,c,v)].push(new rh.Polyline({shape:{points:b}}));if(u&&x)f[T(f,h,v-1)].push(new rh.Polygon({shape:{points:b.concat(x)}}));x=b.slice().reverse()}}var S=o.getLineStyle(),M=s.getAreaStyle();Ge.each(f,(function(e,t){this.group.add(rh.mergePath(e,{style:Ge.defaults({stroke:"none",fill:h[t%h.length]},M),silent:!0}))}),this),Ge.each(d,(function(e,t){this.group.add(rh.mergePath(e,{style:Ge.defaults({fill:"none",stroke:c[t%c.length]},S),silent:!0}))}),this)}function T(e,t,n){var i=n%t.length;return e[i]=e[i]||[],i}}});var eT=Xh.encodeHTML,tT=cg.extend({type:"series.radar",dependencies:["radar"],init:function(e){tT.superApply(this,"init",arguments),this.legendVisualProvider=new yM(Ge.bind(this.getData,this),Ge.bind(this.getRawData,this))},getInitialData:function(e,t){return mM(this,{generateCoord:"indicator_",generateCoordCount:1/0})},formatTooltip:function(e){var t=this.getData(),n=this.coordinateSystem.getIndicatorAxes(),i=this.getData().getName(e);return eT(""===i?this.name:i)+"<br/>"+Ge.map(n,(function(n,i){var a=t.get(t.mapDimension(n.dim),e);return eT(n.name+" : "+a)})).join("<br />")},getTooltipPosition:function(e){if(null!=e)for(var t=this.getData(),n=this.coordinateSystem,i=t.getValues(Ge.map(n.dimensions,(function(e){return t.mapDimension(e)})),e,!0),a=0,r=i.length;a<r;a++)if(!isNaN(i[a])){var o=n.getIndicatorAxes();return n.coordToPoint(o[a].dataToCoord(i[a]),a)}},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}});function nT(e){return!isNaN(e[0])&&!isNaN(e[1])}function iT(e){return[e.cx,e.cy]}Qx.extendChartView({type:"radar",render:function(e,t,n){var i=e.coordinateSystem,a=this.group,r=e.getData(),o=this._data;function s(e,t){var n=e.getItemVisual(t,"symbol")||"circle",i=e.getItemVisual(t,"color");if("none"!==n){var a=function(e){return Ge.isArray(e)||(e=[+e,+e]),e}(e.getItemVisual(t,"symbolSize")),r=X_.createSymbol(n,-1,-1,2,2,i);return r.attr({style:{strokeNoScale:!0},z2:100,scale:[a[0]/2,a[1]/2]}),r}}function l(t,n,i,a,r,o){i.removeAll();for(var l=0;l<n.length-1;l++){var u=s(a,r);u&&(u.__dimIdx=l,t[l]?(u.attr("position",t[l]),rh[o?"initProps":"updateProps"](u,{position:n[l]},e,r)):u.attr("position",n[l]),i.add(u))}}function u(e){return Ge.map(e,(function(e){return[i.cx,i.cy]}))}r.diff(o).add((function(t){var n=r.getItemLayout(t);if(n){var i=new rh.Polygon,a=new rh.Polyline,o={shape:{points:n}};i.shape.points=u(n),a.shape.points=u(n),rh.initProps(i,o,e,t),rh.initProps(a,o,e,t);var s=new rh.Group,c=new rh.Group;s.add(a),s.add(i),s.add(c),l(a.shape.points,n,c,r,t,!0),r.setItemGraphicEl(t,s)}})).update((function(t,n){var i=o.getItemGraphicEl(n),a=i.childAt(0),s=i.childAt(1),u=i.childAt(2),c={shape:{points:r.getItemLayout(t)}};c.shape.points&&(l(a.shape.points,c.shape.points,u,r,t,!1),rh.updateProps(a,c,e),rh.updateProps(s,c,e),r.setItemGraphicEl(t,i))})).remove((function(e){a.remove(o.getItemGraphicEl(e))})).execute(),r.eachItemGraphicEl((function(e,t){var n=r.getItemModel(t),i=e.childAt(0),o=e.childAt(1),s=e.childAt(2),l=r.getItemVisual(t,"color");a.add(e),i.useStyle(Ge.defaults(n.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:l})),i.hoverStyle=n.getModel("emphasis.lineStyle").getLineStyle();var u=n.getModel("areaStyle"),c=n.getModel("emphasis.areaStyle"),h=u.isEmpty()&&u.parentModel.isEmpty(),d=c.isEmpty()&&c.parentModel.isEmpty();d=d&&h,o.ignore=h,o.useStyle(Ge.defaults(u.getAreaStyle(),{fill:l,opacity:.7})),o.hoverStyle=c.getAreaStyle();var f=n.getModel("itemStyle").getItemStyle(["color"]),p=n.getModel("emphasis.itemStyle").getItemStyle(),g=n.getModel("label"),m=n.getModel("emphasis.label");s.eachChild((function(e){e.setStyle(f),e.hoverStyle=Ge.clone(p);var n=r.get(r.dimensions[e.__dimIdx],t);(null==n||isNaN(n))&&(n=""),rh.setLabelStyle(e.style,e.hoverStyle,g,m,{labelFetcher:r.hostModel,labelDataIndex:t,labelDimIndex:e.__dimIdx,defaultText:n,autoColor:l,isRectText:!0})})),e.highDownOnUpdate=function(e,t){o.attr("ignore","emphasis"===t?d:h)},rh.setHoverStyle(e)})),this._data=r},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});var aT=function(e){e.eachSeriesByType("radar",(function(e){var t=e.getData(),n=[],i=e.coordinateSystem;if(i){var a=i.getIndicatorAxes();Ge.each(a,(function(e,r){t.each(t.mapDimension(a[r].dim),(function(e,t){n[t]=n[t]||[];var a=i.dataToPoint(e,r);n[t][r]=nT(a)?a:iT(i)}))})),t.each((function(e){var a=Ge.find(n[e],(function(e){return nT(e)}))||iT(i);n[e].push(a.slice()),t.setItemLayout(e,n[e])}))}}))};var rT=function(e){var t=e.polar;if(t){Ge.isArray(t)||(t=[t]);var n=[];Ge.each(t,(function(t,i){t.indicator?(t.type&&!t.shape&&(t.shape=t.type),e.radar=e.radar||[],Ge.isArray(e.radar)||(e.radar=[e.radar]),e.radar.push(t)):n.push(t)})),e.polar=n}Ge.each(e.series,(function(e){e&&"radar"===e.type&&e.polarIndex&&(e.radarIndex=e.polarIndex)}))};Qx.registerVisual(CM("radar")),Qx.registerVisual(lw("radar","circle")),Qx.registerLayout(aT),Qx.registerProcessor(HM("radar")),Qx.registerPreprocessor(rT);for(var oT=[126,25],sT=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],lT=0;lT<sT.length;lT++)for(var uT=0;uT<sT[lT].length;uT++)sT[lT][uT][0]/=10.5,sT[lT][uT][1]/=-14,sT[lT][uT][0]+=oT[0],sT[lT][uT][1]+=oT[1];var cT=function(e,t){"china"===e&&t.push(new sx("南海诸岛",Ge.map(sT,(function(e){return{type:"polygon",exterior:e}})),oT))},hT={"南海诸岛":[32,80],"广东":[0,-10],"香港":[10,5],"澳门":[-10,10],"天津":[5,5]};var dT=function(e,t){if("china"===e){var n=hT[t.name];if(n){var i=t.center;i[0]+=n[0]/10.5,i[1]+=-n[1]/14}}},fT={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]};var pT=function(e,t){if("world"===e){var n=fT[t.name];if(n){var i=t.center;i[0]=n[0],i[1]=n[1]}}},gT=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];var mT=function(e,t){"china"===e&&"台湾"===t.name&&t.geometries.push({type:"polygon",exterior:gT[0]})},vT=Ge.each,yT=(0,Bo.makeInner)();function _T(e){for(var t,n=0;n<e.length;n++){var i=e[n].getBoundingRect();(t=t||i.clone()).union(i)}return t}var xT={load:function(e,t,n){var i=yT(t).parsed;if(i)return i;var a,r=t.specialAreas||{},o=t.geoJSON;try{a=o?ux(o,n):[]}catch(e){throw new Error("Invalid geoJson format\n"+e.message)}return cT(e,a),vT(a,(function(t){var n=t.name;dT(e,t),pT(e,t),mT(e,t);var i=r[n];i&&t.transformTo(i.left,i.top,i.width,i.height)})),yT(t).parsed={regions:a,boundingRect:_T(a)}}},bT=Um.parseSVG,wT=Um.makeViewBoxTransform,ST=Ge.assert,MT=Ge.createHashMap,TT=(0,Bo.makeInner)(),IT={load:function(e,t){var n=TT(t).originRoot;if(n)return{root:n,boundingRect:TT(t).boundingRect};var i=AT(t);return TT(t).originRoot=i.root,TT(t).boundingRect=i.boundingRect,i},makeGraphic:function(e,t,n){var i=TT(t),a=i.rootMap||(i.rootMap=MT()),r=a.get(n);if(r)return r;var o=i.originRoot,s=i.boundingRect;return i.originRootHostKey?r=AT(t,s).root:(i.originRootHostKey=n,r=o),a.set(n,r)},removeGraphic:function(e,t,n){var i=TT(t),a=i.rootMap;a&&a.removeKey(n),n===i.originRootHostKey&&(i.originRootHostKey=null)}};function AT(e,t){var n,i,a=e.svgXML;try{i=(n=a&&bT(a,{ignoreViewBox:!0,ignoreRootClip:!0})||{}).root,ST(null!=i)}catch(e){throw new Error("Invalid svg format\n"+e.message)}var r=n.width,o=n.height,s=n.viewBoxRect;if(t||(t=null==r||null==o?i.getBoundingRect():new Pi(0,0,0,0),null!=r&&(t.width=r),null!=o&&(t.height=o)),s){var l=wT(s,t.width,t.height),u=i;(i=new zi).add(u),u.scale=l.scale,u.position=l.position}return i.setClipPath(new wu({shape:t.plain()})),{root:i,boundingRect:t}}var DT=IT,CT=Ge.each,OT=Ge.createHashMap,kT={geoJSON:xT,svg:DT};function LT(e){return function(t,n){var i=ET(t),a=[];return CT(i,(function(i){var r=kT[i.type][e];r&&a.push(r(t,i,n))})),a}}function ET(e){return tv.retrieveMap(e)||[]}var NT={load:function(e,t,n){var i,a=[],r=OT(),o=OT(),s=ET(e);return CT(s,(function(s){var l=kT[s.type].load(e,s,n);CT(l.regions,(function(e){var n=e.name;t&&t.hasOwnProperty(n)&&(e=e.cloneShallow(n=t[n])),a.push(e),r.set(n,e),o.set(n,e.center)}));var u=l.boundingRect;u&&(i?i.union(u):i=u.clone())})),{regions:a,regionsMap:r,nameCoordMap:o,boundingRect:i||new Pi(0,0,0,0)}},makeGraphic:LT("makeGraphic"),removeGraphic:LT("removeGraphic")},PT=Xh.encodeHTML,RT=Xh.addCommas,zT=kp.retrieveRawAttr,BT=of.makeSeriesEncodeForNameBased,VT=cg.extend({type:"series.map",dependencies:["geo"],layoutMode:"box",needsDrawMap:!1,seriesGroup:[],getInitialData:function(e){for(var t=mM(this,{coordDimensions:["value"],encodeDefaulter:Ge.curry(BT,this)}),n=t.mapDimension("value"),i=Ge.createHashMap(),a=[],r=[],o=0,s=t.count();o<s;o++){var l=t.getName(o);i.set(l,!0),a.push({name:l,value:t.get(n,o),selected:zT(t,o,"selected")})}var u=NT.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return Ge.each(u.regions,(function(e){var t=e.name;i.get(t)||(a.push({name:t}),r.push(t))})),this.updateSelectedMap(a),t.appendValues([],r),t},getHostGeoModel:function(){var e=this.option.geoIndex;return null!=e?this.dependentModels.geo[e]:null},getMapType:function(){return(this.getHostGeoModel()||this).option.map},getRawValue:function(e){var t=this.getData();return t.get(t.mapDimension("value"),e)},getRegionModel:function(e){var t=this.getData();return t.getItemModel(t.indexOfName(e))},formatTooltip:function(e){for(var t=this.getData(),n=RT(this.getRawValue(e)),i=t.getName(e),a=this.seriesGroup,r=[],o=0;o<a.length;o++){var s=a[o].originalData.indexOfName(i),l=t.mapDimension("value");isNaN(a[o].originalData.get(l,s))||r.push(PT(a[o].name))}return r.join(", ")+"<br />"+PT(i+" : "+n)},getTooltipPosition:function(e){if(null!=e){var t=this.getData().getName(e),n=this.coordinateSystem,i=n.getRegion(t);return i&&n.dataToPoint(i.center)}},setZoom:function(e){this.option.zoom=e},setCenter:function(e){this.option.center=e},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},nameProperty:"name"}});Ge.mixin(VT,vM);var HT="\0_ec_interaction_mutex";function YT(e){return e[HT]||(e[HT]={})}Qx.registerAction({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},(function(){}));var FT={take:function(e,t,n){YT(e)[t]=n},release:function(e,t,n){var i=YT(e);i[t]===n&&(i[t]=null)},isTaken:function(e,t){return!!YT(e)[t]}};function GT(e){this.pointerChecker,this._zr=e,this._opt={};var t=Ge.bind,n=t(WT,this),i=t(jT,this),a=t(UT,this),r=t(ZT,this),o=t(XT,this);_t.call(this),this.setPointerChecker=function(e){this.pointerChecker=e},this.enable=function(t,s){this.disable(),this._opt=Ge.defaults(Ge.clone(s)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(e.on("mousedown",n),e.on("mousemove",i),e.on("mouseup",a)),!0!==t&&"scale"!==t&&"zoom"!==t||(e.on("mousewheel",r),e.on("pinch",o))},this.disable=function(){e.off("mousedown",n),e.off("mousemove",i),e.off("mouseup",a),e.off("mousewheel",r),e.off("pinch",o)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function WT(e){if(!(Vt.isMiddleOrRightButtonOnMouseUpDown(e)||e.target&&e.target.draggable)){var t=e.offsetX,n=e.offsetY;this.pointerChecker&&this.pointerChecker(e,t,n)&&(this._x=t,this._y=n,this._dragging=!0)}}function jT(e){if(this._dragging&&$T("moveOnMouseMove",e,this._opt)&&"pinch"!==e.gestureEvent&&!FT.isTaken(this._zr,"globalPan")){var t=e.offsetX,n=e.offsetY,i=this._x,a=this._y,r=t-i,o=n-a;this._x=t,this._y=n,this._opt.preventDefaultMouseMove&&Vt.stop(e.event),KT(this,"pan","moveOnMouseMove",e,{dx:r,dy:o,oldX:i,oldY:a,newX:t,newY:n})}}function UT(e){Vt.isMiddleOrRightButtonOnMouseUpDown(e)||(this._dragging=!1)}function ZT(e){var t=$T("zoomOnMouseWheel",e,this._opt),n=$T("moveOnMouseWheel",e,this._opt),i=e.wheelDelta,a=Math.abs(i),r=e.offsetX,o=e.offsetY;if(0!==i&&(t||n)){if(t){var s=a>3?1.4:a>1?1.2:1.1;qT(this,"zoom","zoomOnMouseWheel",e,{scale:i>0?s:1/s,originX:r,originY:o})}if(n){var l=Math.abs(i);qT(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:(i>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:r,originY:o})}}}function XT(e){FT.isTaken(this._zr,"globalPan")||qT(this,"zoom",null,e,{scale:e.pinchScale>1?1.1:1/1.1,originX:e.pinchX,originY:e.pinchY})}function qT(e,t,n,i,a){e.pointerChecker&&e.pointerChecker(i,a.originX,a.originY)&&(Vt.stop(i.event),KT(e,t,n,i,a))}function KT(e,t,n,i,a){a.isAvailableBehavior=Ge.bind($T,null,n,i),e.trigger(t,a)}function $T(e,t,n){var i=n[e];return!e||i&&(!Ge.isString(i)||t.event[i+"Key"])}Ge.mixin(GT,_t);var QT=GT;var JT=function(e,t,n,i){var a=e.target,r=e.zoomLimit,o=a.position,s=a.scale,l=e.zoom=e.zoom||1;if(l*=t,r){var u=r.min||0,c=r.max||1/0;l=Math.max(Math.min(c,l),u)}var h=l/e.zoom;e.zoom=l,o[0]-=(n-o[0])*(h-1),o[1]-=(i-o[1])*(h-1),s[0]*=h,s[1]*=h,a.dirty()},eI={updateViewOnPan:function(e,t,n){var i=e.target,a=i.position;a[0]+=t,a[1]+=n,i.dirty()},updateViewOnZoom:JT},tI={axisPointer:1,tooltip:1,brush:1};var nI=function(e,t,n){var i=t.getComponentByElement(e.topTarget),a=i&&i.coordinateSystem;return i&&i!==n&&!tI[i.mainType]&&a&&a.model!==n},iI={onIrrelevantElement:nI},aI=iI.onIrrelevantElement,rI=Sh.getUID;function oI(e){var t=e.getItemStyle(),n=e.get("areaColor");return null!=n&&(t.fill=n),t}function sI(e,t){t.eachChild((function(t){Ge.each(t.__regions,(function(n){t.trigger(e.isSelected(n.name)?"emphasis":"normal")}))}))}function lI(e,t){var n=new rh.Group;this.uid=rI("ec_map_draw"),this._controller=new QT(e.getZr()),this._controllerHost={target:t?n:null},this.group=n,this._updateGroup=t,this._mouseDownFlag,this._mapName,this._initialized,n.add(this._regionsGroup=new rh.Group),n.add(this._backgroundGroup=new rh.Group)}lI.prototype={constructor:lI,draw:function(e,t,n,i,a){var r="geo"===e.mainType,o=e.getData&&e.getData();r&&t.eachComponent({mainType:"series",subType:"map"},(function(t){o||t.getHostGeoModel()!==e||(o=t.getData())}));var s=e.coordinateSystem;this._updateBackground(s);var l,u=this._regionsGroup,c=this.group,h=s.getTransformInfo(),d=!u.childAt(0)||a;if(d)c.transform=h.roamTransform,c.decomposeTransform(),c.dirty();else{var f=new vn;f.transform=h.roamTransform,f.decomposeTransform();var p={scale:f.scale,position:f.position};l=f.scale,rh.updateProps(c,p,e)}var g=h.rawScale,m=h.rawPosition;u.removeAll();var v=["itemStyle"],y=["emphasis","itemStyle"],_=["label"],x=["emphasis","label"],b=Ge.createHashMap();Ge.each(s.regions,(function(t){var n=b.get(t.name)||b.set(t.name,new rh.Group),i=new rh.CompoundPath({segmentIgnoreThreshold:1,shape:{paths:[]}});n.add(i);var a,s=(N=e.getRegionModel(t.name)||e).getModel(v),h=N.getModel(y),f=oI(s),p=oI(h),w=N.getModel(_),S=N.getModel(x);if(o){a=o.indexOfName(t.name);var M=o.getItemVisual(a,"color",!0);M&&(f.fill=M)}var T=function(e){return[e[0]*g[0]+m[0],e[1]*g[1]+m[1]]};Ge.each(t.geometries,(function(e){if("polygon"===e.type){for(var t=[],n=0;n<e.exterior.length;++n)t.push(T(e.exterior[n]));i.shape.paths.push(new rh.Polygon({segmentIgnoreThreshold:1,shape:{points:t}}));for(n=0;n<(e.interiors?e.interiors.length:0);++n){for(var a=e.interiors[n],r=(t=[],0);r<a.length;++r)t.push(T(a[r]));i.shape.paths.push(new rh.Polygon({segmentIgnoreThreshold:1,shape:{points:t}}))}}})),i.setStyle(f),i.style.strokeNoScale=!0,i.culling=!0;var I=w.get("show"),A=S.get("show"),D=o&&isNaN(o.get(o.mapDimension("value"),a)),C=o&&o.getItemLayout(a);if(r||D&&(I||A)||C&&C.showLabel){var O,k=r?t.name:a;(!o||a>=0)&&(O=e);var L=new rh.Text({position:T(t.center.slice()),scale:[1/c.scale[0],1/c.scale[1]],z2:10,silent:!0});if(rh.setLabelStyle(L.style,L.hoverStyle={},w,S,{labelFetcher:O,labelDataIndex:k,defaultText:t.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),!d){var E=[1/l[0],1/l[1]];rh.updateProps(L,{scale:E},e)}n.add(L)}if(o)o.setItemGraphicEl(a,n);else{var N=e.getRegionModel(t.name);i.eventData={componentType:"geo",componentIndex:e.componentIndex,geoIndex:e.componentIndex,name:t.name,region:N&&N.option||{}}}(n.__regions||(n.__regions=[])).push(t),n.highDownSilentOnTouch=!!e.get("selectedMode"),rh.setHoverStyle(n,p),u.add(n)})),this._updateController(e,t,n),function(e,t,n,i,a){n.off("click"),n.off("mousedown"),t.get("selectedMode")&&(n.on("mousedown",(function(){e._mouseDownFlag=!0})),n.on("click",(function(r){if(e._mouseDownFlag){e._mouseDownFlag=!1;for(var o=r.target;!o.__regions;)o=o.parent;if(o){var s={type:("geo"===t.mainType?"geo":"map")+"ToggleSelect",batch:Ge.map(o.__regions,(function(e){return{name:e.name,from:a.uid}}))};s[t.mainType+"Id"]=t.id,i.dispatchAction(s),sI(t,n)}}})))}(this,e,u,n,i),sI(e,u)},remove:function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&NT.removeGraphic(this._mapName,this.uid),this._mapName=null,this._controllerHost={}},_updateBackground:function(e){var t=e.map;this._mapName!==t&&Ge.each(NT.makeGraphic(t,this.uid),(function(e){this._backgroundGroup.add(e)}),this),this._mapName=t},_updateController:function(e,t,n){var i=e.coordinateSystem,a=this._controller,r=this._controllerHost;r.zoomLimit=e.get("scaleLimit"),r.zoom=i.getZoom(),a.enable(e.get("roam")||!1);var o=e.mainType;function s(){var t={type:"geoRoam",componentType:o};return t[o+"Id"]=e.id,t}a.off("pan").on("pan",(function(e){this._mouseDownFlag=!1,eI.updateViewOnPan(r,e.dx,e.dy),n.dispatchAction(Ge.extend(s(),{dx:e.dx,dy:e.dy}))}),this),a.off("zoom").on("zoom",(function(e){if(this._mouseDownFlag=!1,eI.updateViewOnZoom(r,e.scale,e.originX,e.originY),n.dispatchAction(Ge.extend(s(),{zoom:e.scale,originX:e.originX,originY:e.originY})),this._updateGroup){var t=this.group.scale;this._regionsGroup.traverse((function(e){"text"===e.type&&e.attr("scale",[1/t[0],1/t[1]])}))}}),this),a.setPointerChecker((function(t,a,r){return i.getViewRectAfterRoam().contain(a,r)&&!aI(t,n,e)}))}};var uI=lI,cI="__seriesMapHighDown",hI="__seriesMapCallKey";function dI(e){var t=this[cI];t&&t.recordVersion===this[hI]&&fI(t,e)}function fI(e,t){var n=e.circle,i=e.labelModel,a=e.hoverLabelModel,r=e.emphasisText,o=e.normalText;t?(n.style.extendFrom(rh.setTextStyle({},a,{text:a.get("show")?r:null},{isRectText:!0,useInsideStyle:!1},!0)),n.__mapOriginalZ2=n.z2,n.z2+=rh.Z2_EMPHASIS_LIFT):(rh.setTextStyle(n.style,i,{text:i.get("show")?o:null,textPosition:i.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),n.dirty(!1),null!=n.__mapOriginalZ2&&(n.z2=n.__mapOriginalZ2,n.__mapOriginalZ2=null))}Qx.extendChartView({type:"map",render:function(e,t,n,i){if(!i||"mapToggleSelect"!==i.type||i.from!==this.uid){var a=this.group;if(a.removeAll(),!e.getHostGeoModel()){if(i&&"geoRoam"===i.type&&"series"===i.componentType&&i.seriesId===e.id)(r=this._mapDraw)&&a.add(r.group);else if(e.needsDrawMap){var r=this._mapDraw||new uI(n,!0);a.add(r.group),r.draw(e,t,n,this,i),this._mapDraw=r}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;e.get("showLegendSymbol")&&t.getComponent("legend")&&this._renderSymbols(e,t,n)}}},remove:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},dispose:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},_renderSymbols:function(e,t,n){var i=e.originalData,a=this.group;i.each(i.mapDimension("value"),(function(t,n){if(!isNaN(t)){var r=i.getItemLayout(n);if(r&&r.point){var o=r.point,s=r.offset,l=new rh.Circle({style:{fill:e.getData().getVisual("color")},shape:{cx:o[0]+9*s,cy:o[1],r:3},silent:!0,z2:8+(s?0:rh.Z2_EMPHASIS_LIFT+1)});if(!s){var u=e.mainSeries.getData(),c=i.getName(n),h=u.indexOfName(c),d=i.getItemModel(n),f=d.getModel("label"),p=d.getModel("emphasis.label"),g=u.getItemGraphicEl(h),m=Ge.retrieve2(e.getFormattedLabel(h,"normal"),c),v=Ge.retrieve2(e.getFormattedLabel(h,"emphasis"),m),y=g[cI],_=Math.random();if(!y){y=g[cI]={};var x=Ge.curry(dI,!0),b=Ge.curry(dI,!1);g.on("mouseover",x).on("mouseout",b).on("emphasis",x).on("normal",b)}g[hI]=_,Ge.extend(y,{recordVersion:_,circle:l,labelModel:f,hoverLabelModel:p,emphasisText:v,normalText:m}),fI(y,!1)}a.add(l)}}}))}});var pI=function(e,t,n){var i=e.getZoom(),a=e.getCenter(),r=t.zoom,o=e.dataToPoint(a);if(null!=t.dx&&null!=t.dy){o[0]-=t.dx,o[1]-=t.dy;a=e.pointToData(o);e.setCenter(a)}if(null!=r){if(n){var s=n.min||0,l=n.max||1/0;r=Math.max(Math.min(i*r,l),s)/i}e.scale[0]*=r,e.scale[1]*=r;var u=e.position,c=(t.originX-u[0])*(r-1),h=(t.originY-u[1])*(r-1);u[0]-=c,u[1]-=h,e.updateTransform();a=e.pointToData(o);e.setCenter(a),e.setZoom(r*i)}return{center:e.getCenter(),zoom:e.getZoom()}},gI={updateCenterAndZoom:pI},mI=gI.updateCenterAndZoom;Qx.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},(function(e,t){var n=e.componentType||"series";t.eachComponent({mainType:n,query:e},(function(t){var i=t.coordinateSystem;if("geo"===i.type){var a=mI(i,e,t.get("scaleLimit"));t.setCenter&&t.setCenter(a.center),t.setZoom&&t.setZoom(a.zoom),"series"===n&&Ge.each(t.seriesGroup,(function(e){e.setCenter(a.center),e.setZoom(a.zoom)}))}}))}));var vI=dt.applyTransform;function yI(){vn.call(this)}function _I(e){this.name=e,this.zoomLimit,vn.call(this),this._roamTransformable=new yI,this._rawTransformable=new yI,this._center,this._zoom}function xI(e,t,n,i){var a=n.seriesModel,r=a?a.coordinateSystem:null;return r===this?r[e](i):null}Ge.mixin(yI,vn),_I.prototype={constructor:_I,type:"view",dimensions:["x","y"],setBoundingRect:function(e,t,n,i){return this._rect=new Pi(e,t,n,i),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(e,t,n,i){this.transformTo(e,t,n,i),this._viewRect=new Pi(e,t,n,i)},transformTo:function(e,t,n,i){var a=this.getBoundingRect(),r=this._rawTransformable;r.transform=a.calculateTransform(new Pi(e,t,n,i)),r.decomposeTransform(),this._updateTransform()},setCenter:function(e){e&&(this._center=e,this._updateCenterAndZoom())},setZoom:function(e){e=e||1;var t=this.zoomLimit;t&&(null!=t.max&&(e=Math.min(t.max,e)),null!=t.min&&(e=Math.max(t.min,e))),this._zoom=e,this._updateCenterAndZoom()},getDefaultCenter:function(){var e=this.getBoundingRect();return[e.x+e.width/2,e.y+e.height/2]},getCenter:function(){return this._center||this.getDefaultCenter()},getZoom:function(){return this._zoom||1},getRoamTransform:function(){return this._roamTransformable.getLocalTransform()},_updateCenterAndZoom:function(){var e=this._rawTransformable.getLocalTransform(),t=this._roamTransformable,n=this.getDefaultCenter(),i=this.getCenter(),a=this.getZoom();i=dt.applyTransform([],i,e),n=dt.applyTransform([],n,e),t.origin=i,t.position=[n[0]-i[0],n[1]-i[1]],t.scale=[a,a],this._updateTransform()},_updateTransform:function(){var e=this._roamTransformable,t=this._rawTransformable;t.parent=e,e.updateTransform(),t.updateTransform(),ln.copy(this.transform||(this.transform=[]),t.transform||ln.create()),this._rawTransform=t.getLocalTransform(),this.invTransform=this.invTransform||[],ln.invert(this.invTransform,this.transform),this.decomposeTransform()},getTransformInfo:function(){var e=this._roamTransformable.transform,t=this._rawTransformable;return{roamTransform:e?Ge.slice(e):ln.create(),rawScale:Ge.slice(t.scale),rawPosition:Ge.slice(t.position)}},getViewRect:function(){return this._viewRect},getViewRectAfterRoam:function(){var e=this.getBoundingRect().clone();return e.applyTransform(this.transform),e},dataToPoint:function(e,t,n){var i=t?this._rawTransform:this.transform;return n=n||[],i?vI(n,e,i):dt.copy(n,e)},pointToData:function(e){var t=this.invTransform;return t?vI([],e,t):[e[0],e[1]]},convertToPixel:Ge.curry(xI,"dataToPoint"),convertFromPixel:Ge.curry(xI,"pointToData"),containPoint:function(e){return this.getViewRectAfterRoam().contain(e[0],e[1])}},Ge.mixin(_I,vn);var bI=_I;function wI(e,t,n,i){bI.call(this,e),this.map=t;var a=NT.load(t,n);this._nameCoordMap=a.nameCoordMap,this._regionsMap=a.regionsMap,this._invertLongitute=null==i||i,this.regions=a.regions,this._rect=a.boundingRect}function SI(e,t,n,i){var a=n.geoModel,r=n.seriesModel,o=a?a.coordinateSystem:r?r.coordinateSystem||(r.getReferringComponents("geo")[0]||{}).coordinateSystem:null;return o===this?o[e](i):null}wI.prototype={constructor:wI,type:"geo",dimensions:["lng","lat"],containCoord:function(e){for(var t=this.regions,n=0;n<t.length;n++)if(t[n].contain(e))return!0;return!1},transformTo:function(e,t,n,i){var a=this.getBoundingRect(),r=this._invertLongitute;a=a.clone(),r&&(a.y=-a.y-a.height);var o=this._rawTransformable;if(o.transform=a.calculateTransform(new Pi(e,t,n,i)),o.decomposeTransform(),r){var s=o.scale;s[1]=-s[1]}o.updateTransform(),this._updateTransform()},getRegion:function(e){return this._regionsMap.get(e)},getRegionByCoord:function(e){for(var t=this.regions,n=0;n<t.length;n++)if(t[n].contain(e))return t[n]},addGeoCoord:function(e,t){this._nameCoordMap.set(e,t)},getGeoCoord:function(e){return this._nameCoordMap.get(e)},getBoundingRect:function(){return this._rect},dataToPoint:function(e,t,n){if("string"==typeof e&&(e=this.getGeoCoord(e)),e)return bI.prototype.dataToPoint.call(this,e,t,n)},convertToPixel:Ge.curry(SI,"dataToPoint"),convertFromPixel:Ge.curry(SI,"pointToData")},Ge.mixin(wI,bI);var MI=wI;function TI(e,t){var n=e.get("boundingCoords");if(null!=n){var i=n[0],a=n[1];isNaN(i[0])||isNaN(i[1])||isNaN(a[0])||isNaN(a[1])||this.setBoundingRect(i[0],i[1],a[0]-i[0],a[1]-i[1])}var r,o=this.getBoundingRect(),s=e.get("layoutCenter"),l=e.get("layoutSize"),u=t.getWidth(),c=t.getHeight(),h=o.width/o.height*this.aspectScale,d=!1;if(s&&l&&(s=[Ph.parsePercent(s[0],u),Ph.parsePercent(s[1],c)],l=Ph.parsePercent(l,Math.min(u,c)),isNaN(s[0])||isNaN(s[1])||isNaN(l)||(d=!0)),d){var f={};h>1?(f.width=l,f.height=l/h):(f.height=l,f.width=l*h),f.y=s[1]-f.height/2,f.x=s[0]-f.width/2}else(r=e.getBoxLayoutParams()).aspect=h,f=sd.getLayoutRect(r,{width:u,height:c});this.setViewRect(f.x,f.y,f.width,f.height),this.setCenter(e.get("center")),this.setZoom(e.get("zoom"))}function II(e,t){Ge.each(t.get("geoCoord"),(function(t,n){e.addGeoCoord(n,t)}))}var AI={dimensions:MI.prototype.dimensions,create:function(e,t){var n=[];e.eachComponent("geo",(function(e,i){var a=e.get("map"),r=e.get("aspectScale"),o=!0,s=tv.retrieveMap(a);s&&s[0]&&"svg"===s[0].type?(null==r&&(r=1),o=!1):null==r&&(r=.75);var l=new MI(a+i,a,e.get("nameMap"),o);l.aspectScale=r,l.zoomLimit=e.get("scaleLimit"),n.push(l),II(l,e),e.coordinateSystem=l,l.model=e,l.resize=TI,l.resize(e,t)})),e.eachSeries((function(e){if("geo"===e.get("coordinateSystem")){var t=e.get("geoIndex")||0;e.coordinateSystem=n[t]}}));var i={};return e.eachSeriesByType("map",(function(e){if(!e.getHostGeoModel()){var t=e.getMapType();i[t]=i[t]||[],i[t].push(e)}})),Ge.each(i,(function(e,i){var a=Ge.map(e,(function(e){return e.get("nameMap")})),r=new MI(i,i,Ge.mergeAll(a));r.zoomLimit=Ge.retrieve.apply(null,Ge.map(e,(function(e){return e.get("scaleLimit")}))),n.push(r),r.resize=TI,r.aspectScale=e[0].get("aspectScale"),r.resize(e[0],t),Ge.each(e,(function(e){e.coordinateSystem=r,II(r,e)}))})),n},getFilledRegions:function(e,t,n){for(var i=(e||[]).slice(),a=Ge.createHashMap(),r=0;r<i.length;r++)a.set(i[r].name,i[r]);var o=NT.load(t,n);return Ge.each(o.regions,(function(e){var t=e.name;!a.get(t)&&i.push({name:t})})),i}};Qx.registerCoordinateSystem("geo",AI);var DI=AI;var CI=function(e){var t={};e.eachSeriesByType("map",(function(n){var i=n.getMapType();if(!n.getHostGeoModel()&&!t[i]){var a={};Ge.each(n.seriesGroup,(function(t){var n=t.coordinateSystem,i=t.originalData;t.get("showLegendSymbol")&&e.getComponent("legend")&&i.each(i.mapDimension("value"),(function(e,t){var r=i.getName(t),o=n.getRegion(r);if(o&&!isNaN(e)){var s=a[r]||0,l=n.dataToPoint(o.center);a[r]=s+1,i.setItemLayout(t,{point:l,offset:s})}}))}));var r=n.getData();r.each((function(e){var t=r.getName(e),n=r.getItemLayout(e)||{};n.showLabel=!a[t],r.setItemLayout(e,n)})),t[i]=!0}}))};var OI=function(e){e.eachSeriesByType("map",(function(e){var t=e.get("color"),n=e.getModel("itemStyle"),i=n.get("areaColor"),a=n.get("color")||t[e.seriesIndex%t.length];e.getData().setVisual({areaColor:i,color:a})}))};var kI=function(e){var t={};e.eachSeriesByType("map",(function(e){var n=e.getHostGeoModel(),i=n?"o"+n.id:"i"+e.getMapType();(t[i]=t[i]||[]).push(e)})),Ge.each(t,(function(e,t){for(var n,i,a,r=(n=Ge.map(e,(function(e){return e.getData()})),i=e[0].get("mapValueCalculation"),a={},Ge.each(n,(function(e){e.each(e.mapDimension("value"),(function(t,n){var i="ec-"+e.getName(n);a[i]=a[i]||[],isNaN(t)||a[i].push(t)}))})),n[0].map(n[0].mapDimension("value"),(function(e,t){for(var r="ec-"+n[0].getName(t),o=0,s=1/0,l=-1/0,u=a[r].length,c=0;c<u;c++)s=Math.min(s,a[r][c]),l=Math.max(l,a[r][c]),o+=a[r][c];return 0===u?NaN:"min"===i?s:"max"===i?l:"average"===i?o/u:o}))),o=0;o<e.length;o++)e[o].originalData=e[o].getData();for(o=0;o<e.length;o++)e[o].seriesGroup=e,e[o].needsDrawMap=0===o&&!e[o].getHostGeoModel(),e[o].setData(r.cloneShallow()),e[o].mainSeries=e[0]}))};var LI=function(e){Ge.each(e.series,(function(e){e&&"map"===e.type&&(e.map=e.map||e.mapType,Ge.defaults(e,e.mapLocation))}))};Qx.registerLayout(CI),Qx.registerVisual(OI),Qx.registerProcessor(Qx.PRIORITY.PROCESSOR.STATISTIC,kI),Qx.registerPreprocessor(LI),AM("map",[{type:"mapToggleSelect",event:"mapselectchanged",method:"toggleSelected"},{type:"mapSelect",event:"mapselected",method:"select"},{type:"mapUnSelect",event:"mapunselected",method:"unSelect"}]);var EI=Ge.each,NI="\0__link_datas",PI="\0__link_mainData";function RI(e,t){if((i=this)[PI]===i){var n=Ge.extend({},this[NI]);n[this.dataType]=t,HI(t,n,e)}else YI(t,this.dataType,this[PI],e);var i;return t}function zI(e,t){return e.struct&&e.struct.update(this),t}function BI(e,t){return EI(t[NI],(function(n,i){n!==t&&YI(n.cloneShallow(),i,t,e)})),t}function VI(e){var t=this[PI];return null==e||null==t?t:t[NI][e]}function HI(e,t,n){e[NI]={},EI(t,(function(t,i){YI(t,i,e,n)}))}function YI(e,t,n,i){n[NI][t]=e,e[PI]=n,e.dataType=t,i.struct&&(e[i.structAttr]=i.struct,i.struct[i.datasAttr[t]]=e),e.getLinkedData=VI}var FI=function(e){var t=e.mainData,n=e.datas;n||(n={main:t},e.datasAttr={main:"data"}),e.datas=e.mainData=null,HI(t,n,e),EI(n,(function(n){EI(t.TRANSFERABLE_METHODS,(function(t){n.wrapMethod(t,Ge.curry(RI,e))}))})),t.wrapMethod("cloneShallow",Ge.curry(BI,e)),EI(t.CHANGABLE_METHODS,(function(n){t.wrapMethod(n,Ge.curry(zI,e))})),Ge.assert(n[t.dataType]===t)},GI=function(e,t){this.name=e||"",this.depth=0,this.height=0,this.parentNode=null,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.hostTree=t};function WI(e,t){this.root,this.data,this._nodes=[],this.hostModel=e,this.levelModels=Ge.map(t||[],(function(t){return new xh(t,e,e.ecModel)}))}GI.prototype={constructor:GI,isRemoved:function(){return this.dataIndex<0},eachNode:function(e,t,n){"function"==typeof e&&(n=t,t=e,e=null),e=e||{},Ge.isString(e)&&(e={order:e});var i,a=e.order||"preorder",r=this[e.attr||"children"];"preorder"===a&&(i=t.call(n,this));for(var o=0;!i&&o<r.length;o++)r[o].eachNode(e,t,n);"postorder"===a&&t.call(n,this)},updateDepthAndHeight:function(e){var t=0;this.depth=e;for(var n=0;n<this.children.length;n++){var i=this.children[n];i.updateDepthAndHeight(e+1),i.height>t&&(t=i.height)}this.height=t+1},getNodeById:function(e){if(this.getId()===e)return this;for(var t=0,n=this.children,i=n.length;t<i;t++){var a=n[t].getNodeById(e);if(a)return a}},contains:function(e){if(e===this)return!0;for(var t=0,n=this.children,i=n.length;t<i;t++){var a=n[t].contains(e);if(a)return a}},getAncestors:function(e){for(var t=[],n=e?this:this.parentNode;n;)t.push(n),n=n.parentNode;return t.reverse(),t},getValue:function(e){var t=this.hostTree.data;return t.get(t.getDimension(e||"value"),this.dataIndex)},setLayout:function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},getLayout:function(){return this.hostTree.data.getItemLayout(this.dataIndex)},getModel:function(e){if(!(this.dataIndex<0)){var t=this.hostTree.data.getItemModel(this.dataIndex),n=this.getLevelModel();return n?t.getModel(e,n.getModel(e)):t.getModel(e)}},getLevelModel:function(){return(this.hostTree.levelModels||[])[this.depth]},setVisual:function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},getVisual:function(e,t){return this.hostTree.data.getItemVisual(this.dataIndex,e,t)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)},getId:function(){return this.hostTree.data.getId(this.dataIndex)},isAncestorOf:function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},isDescendantOf:function(e){return e!==this&&e.isAncestorOf(this)}},WI.prototype={constructor:WI,type:"tree",eachNode:function(e,t,n){this.root.eachNode(e,t,n)},getNodeByDataIndex:function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},getNodeByName:function(e){return this.root.getNodeByName(e)},update:function(){for(var e=this.data,t=this._nodes,n=0,i=t.length;n<i;n++)t[n].dataIndex=-1;for(n=0,i=e.count();n<i;n++)t[e.getRawIndex(n)].dataIndex=n},clearLayouts:function(){this.data.clearItemLayouts()}},WI.createTree=function(e,t,n,i){var a=new WI(t,n&&n.levels),r=[],o=1;!function e(t,n){var i=t.value;o=Math.max(o,Ge.isArray(i)?i.length:1),r.push(t);var s=new GI(t.name,a);n?function(e,t){var n=t.children;if(e.parentNode===t)return;n.push(e),e.parentNode=t}(s,n):a.root=s,a._nodes.push(s);var l=t.children;if(l)for(var u=0;u<l.length;u++)e(l[u],s)}(e),a.root.updateDepthAndHeight(0);var s=Jv(r,{coordDimensions:["value"],dimensionsCount:o}),l=new Bv(s,t);return l.initData(r),i&&i(l),FI({mainData:l,struct:a,structAttr:"tree"}),a.update(),a};var jI=WI,UI=Xh.encodeHTML;function ZI(e){var t=e.children;return t.length&&e.isExpand?t[t.length-1]:e.hierNode.thread}function XI(e){var t=e.children;return t.length&&e.isExpand?t[0]:e.hierNode.thread}function qI(e,t,n){return e.hierNode.ancestor.parentNode===t.parentNode?e.hierNode.ancestor:n}function KI(e,t,n){var i=n/(t.hierNode.i-e.hierNode.i);t.hierNode.change-=i,t.hierNode.shift+=n,t.hierNode.modifier+=n,t.hierNode.prelim+=n,e.hierNode.change+=i}function $I(e,t){return e.parentNode===t.parentNode?1:2}cg.extend({type:"series.tree",layoutInfo:null,layoutMode:"box",getInitialData:function(e){var t={name:e.name,children:e.data},n=e.leaves||{},i=new xh(n,this,this.ecModel),a=jI.createTree(t,this,{},(function(e){e.wrapMethod("getItemModel",(function(e,t){var n=a.getNodeByDataIndex(t);return n.children.length&&n.isExpand||(e.parentModel=i),e}))}));var r=0;a.eachNode("preorder",(function(e){e.depth>r&&(r=e.depth)}));var o=e.expandAndCollapse&&e.initialTreeDepth>=0?e.initialTreeDepth:r;return a.root.eachNode("preorder",(function(e){var t=e.hostTree.data.getRawDataItem(e.dataIndex);e.isExpand=t&&null!=t.collapsed?!t.collapsed:e.depth<=o})),a.data},getOrient:function(){var e=this.get("orient");return"horizontal"===e?e="LR":"vertical"===e&&(e="TB"),e},setZoom:function(e){this.option.zoom=e},setCenter:function(e){this.option.center=e},formatTooltip:function(e){for(var t=this.getData().tree,n=t.root.children[0],i=t.getNodeByDataIndex(e),a=i.getValue(),r=i.name;i&&i!==n;)r=i.parentNode.name+"."+r,i=i.parentNode;return UI(r+(isNaN(a)||null==a?"":" : "+a))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}});var QI=function(e){e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var t,n,i=[e];t=i.pop();)if(n=t.children,t.isExpand&&n.length)for(var a=n.length-1;a>=0;a--){var r=n[a];r.hierNode={defaultAncestor:null,ancestor:r,prelim:0,modifier:0,change:0,shift:0,i:a,thread:null},i.push(r)}},JI=function(e,t){var n=e.isExpand?e.children:[],i=e.parentNode.children,a=e.hierNode.i?i[e.hierNode.i-1]:null;if(n.length){!function(e){var t=e.children,n=t.length,i=0,a=0;for(;--n>=0;){var r=t[n];r.hierNode.prelim+=i,r.hierNode.modifier+=i,a+=r.hierNode.change,i+=r.hierNode.shift+a}}(e);var r=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;a?(e.hierNode.prelim=a.hierNode.prelim+t(e,a),e.hierNode.modifier=e.hierNode.prelim-r):e.hierNode.prelim=r}else a&&(e.hierNode.prelim=a.hierNode.prelim+t(e,a));e.parentNode.hierNode.defaultAncestor=function(e,t,n,i){if(t){for(var a=e,r=e,o=r.parentNode.children[0],s=t,l=a.hierNode.modifier,u=r.hierNode.modifier,c=o.hierNode.modifier,h=s.hierNode.modifier;s=ZI(s),r=XI(r),s&&r;){a=ZI(a),o=XI(o),a.hierNode.ancestor=e;var d=s.hierNode.prelim+h-r.hierNode.prelim-u+i(s,r);d>0&&(KI(qI(s,e,n),e,d),u+=d,l+=d),h+=s.hierNode.modifier,u+=r.hierNode.modifier,l+=a.hierNode.modifier,c+=o.hierNode.modifier}s&&!ZI(a)&&(a.hierNode.thread=s,a.hierNode.modifier+=h-l),r&&!XI(o)&&(o.hierNode.thread=r,o.hierNode.modifier+=u-c,n=e)}return n}(e,a,e.parentNode.hierNode.defaultAncestor||i[0],t)},eA=function(e){return arguments.length?e:$I},tA={init:QI,firstWalk:JI,secondWalk:function(e){var t=e.hierNode.prelim+e.parentNode.hierNode.modifier;e.setLayout({x:t},!0),e.hierNode.modifier+=e.parentNode.hierNode.modifier},separation:eA,radialCoordinate:function(e,t){var n={};return e-=Math.PI/2,n.x=t*Math.cos(e),n.y=t*Math.sin(e),n},getViewRect:function(e,t){return sd.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}},nA=tA.radialCoordinate,iA=iI.onIrrelevantElement,aA=Ph.parsePercent,rA=rh.extendShape({shape:{parentPoint:[],childPoints:[],orient:"",forkPosition:""},style:{stroke:"#000",fill:null},buildPath:function(e,t){var n=t.childPoints,i=n.length,a=t.parentPoint,r=n[0],o=n[i-1];if(1===i)return e.moveTo(a[0],a[1]),void e.lineTo(r[0],r[1]);var s=t.orient,l="TB"===s||"BT"===s?0:1,u=1-l,c=aA(t.forkPosition,1),h=[];h[l]=a[l],h[u]=a[u]+(o[u]-a[u])*c,e.moveTo(a[0],a[1]),e.lineTo(h[0],h[1]),e.moveTo(r[0],r[1]),h[l]=r[l],e.lineTo(h[0],h[1]),h[l]=o[l],e.lineTo(h[0],h[1]),e.lineTo(o[0],o[1]);for(var d=1;d<i-1;d++){var f=n[d];e.moveTo(f[0],f[1]),h[l]=f[l],e.lineTo(h[0],h[1])}}});function oA(e,t){var n=e.getItemLayout(t);return n&&!isNaN(n.x)&&!isNaN(n.y)&&"none"!==e.getItemVisual(t,"symbol")}function sA(e,t,n){return n.itemModel=t,n.itemStyle=t.getModel("itemStyle").getItemStyle(),n.hoverItemStyle=t.getModel("emphasis.itemStyle").getItemStyle(),n.lineStyle=t.getModel("lineStyle").getLineStyle(),n.labelModel=t.getModel("label"),n.hoverLabelModel=t.getModel("emphasis.label"),!1===e.isExpand&&0!==e.children.length?n.symbolInnerColor=n.itemStyle.fill:n.symbolInnerColor="#fff",n}function lA(e,t,n,i,a,r){var o=!n,s=e.tree.getNodeByDataIndex(t),l=s.getModel(),u=(r=sA(s,l,r),e.tree.root),c=s.parentNode===u?s:s.parentNode||s,h=e.getItemGraphicEl(c.dataIndex),d=c.getLayout(),f=h?{x:h.position[0],y:h.position[1],rawX:h.__radialOldRawX,rawY:h.__radialOldRawY}:d,p=s.getLayout();o?(n=new gb(e,t,r)).attr("position",[f.x,f.y]):n.updateData(e,t,r),n.__radialOldRawX=n.__radialRawX,n.__radialOldRawY=n.__radialRawY,n.__radialRawX=p.rawX,n.__radialRawY=p.rawY,i.add(n),e.setItemGraphicEl(t,n),rh.updateProps(n,{position:[p.x,p.y]},a);var g=n.getSymbolPath();if("radial"===r.layout){var m,v,y=u.children[0],_=y.getLayout(),x=y.children.length;if(p.x===_.x&&!0===s.isExpand){var b={};b.x=(y.children[0].getLayout().x+y.children[x-1].getLayout().x)/2,b.y=(y.children[0].getLayout().y+y.children[x-1].getLayout().y)/2,(m=Math.atan2(b.y-_.y,b.x-_.x))<0&&(m=2*Math.PI+m),(v=b.x<_.x)&&(m-=Math.PI)}else(m=Math.atan2(p.y-_.y,p.x-_.x))<0&&(m=2*Math.PI+m),0===s.children.length||0!==s.children.length&&!1===s.isExpand?(v=p.x<_.x)&&(m-=Math.PI):(v=p.x>_.x)||(m-=Math.PI);var w=v?"left":"right",S=r.labelModel.get("rotate"),M=S*(Math.PI/180);g.setStyle({textPosition:r.labelModel.get("position")||w,textRotation:null==S?-m:M,textOrigin:"center",verticalAlign:"middle"})}!function(e,t,n,i,a,r,o,s,l){var u=l.edgeShape,c=i.__edge;if("curve"===u)t.parentNode&&t.parentNode!==n&&(c||(c=i.__edge=new rh.BezierCurve({shape:cA(l,a,a),style:Ge.defaults({opacity:0,strokeNoScale:!0},l.lineStyle)})),rh.updateProps(c,{shape:cA(l,r,o),style:{opacity:1}},e));else if("polyline"===u&&"orthogonal"===l.layout&&t!==n&&t.children&&0!==t.children.length&&!0===t.isExpand){for(var h=t.children,d=[],f=0;f<h.length;f++){var p=h[f].getLayout();d.push([p.x,p.y])}c||(c=i.__edge=new rA({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:l.orient,forkPosition:l.edgeForkPosition},style:Ge.defaults({opacity:0,strokeNoScale:!0},l.lineStyle)})),rh.updateProps(c,{shape:{parentPoint:[o.x,o.y],childPoints:d},style:{opacity:1}},e)}s.add(c)}(a,s,u,n,f,d,p,i,r)}function uA(e,t,n,i,a,r){for(var o,s=e.tree.getNodeByDataIndex(t),l=e.tree.root,u=s.getModel(),c=(r=sA(s,u,r),s.parentNode===l?s:s.parentNode||s),h=r.edgeShape;null==(o=c.getLayout());)c=c.parentNode===l?c:c.parentNode||c;rh.updateProps(n,{position:[o.x+1,o.y+1]},a,(function(){i.remove(n),e.setItemGraphicEl(t,null)})),n.fadeOut(null,{keepLabel:!0});var d=e.getItemGraphicEl(c.dataIndex).__edge,f=n.__edge||(!1===c.isExpand||1===c.children.length?d:void 0);h=r.edgeShape;f&&("curve"===h?rh.updateProps(f,{shape:cA(r,o,o),style:{opacity:0}},a,(function(){i.remove(f)})):"polyline"===h&&"orthogonal"===r.layout&&rh.updateProps(f,{shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]]},style:{opacity:0}},a,(function(){i.remove(f)})))}function cA(e,t,n){var i,a,r,o,s,l,u,c,h=e.orient;if("radial"===e.layout){s=t.rawX,u=t.rawY,l=n.rawX,c=n.rawY;var d=nA(s,u),f=nA(s,u+(c-u)*e.curvature),p=nA(l,c+(u-c)*e.curvature),g=nA(l,c);return{x1:d.x,y1:d.y,x2:g.x,y2:g.y,cpx1:f.x,cpy1:f.y,cpx2:p.x,cpy2:p.y}}return s=t.x,u=t.y,l=n.x,c=n.y,"LR"!==h&&"RL"!==h||(i=s+(l-s)*e.curvature,a=u,r=l+(s-l)*e.curvature,o=c),"TB"!==h&&"BT"!==h||(i=s,a=u+(c-u)*e.curvature,r=l,o=c+(u-c)*e.curvature),{x1:s,y1:u,x2:l,y2:c,cpx1:i,cpy1:a,cpx2:r,cpy2:o}}Qx.extendChartView({type:"tree",init:function(e,t){this._oldTree,this._mainGroup=new rh.Group,this._controller=new QT(t.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},render:function(e,t,n,i){var a=e.getData(),r=e.layoutInfo,o=this._mainGroup,s=e.get("layout");"radial"===s?o.attr("position",[r.x+r.width/2,r.y+r.height/2]):o.attr("position",[r.x,r.y]),this._updateViewCoordSys(e,r,s),this._updateController(e,t,n);var l=this._data,u={expandAndCollapse:e.get("expandAndCollapse"),layout:s,edgeShape:e.get("edgeShape"),edgeForkPosition:e.get("edgeForkPosition"),orient:e.getOrient(),curvature:e.get("lineStyle.curveness"),symbolRotate:e.get("symbolRotate"),symbolOffset:e.get("symbolOffset"),hoverAnimation:e.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};a.diff(l).add((function(t){oA(a,t)&&lA(a,t,null,o,e,u)})).update((function(t,n){var i=l.getItemGraphicEl(n);oA(a,t)?lA(a,t,i,o,e,u):i&&uA(l,n,i,o,e,u)})).remove((function(t){var n=l.getItemGraphicEl(t);n&&uA(l,t,n,o,e,u)})).execute(),this._nodeScaleRatio=e.get("nodeScaleRatio"),this._updateNodeAndLinkScale(e),!0===u.expandAndCollapse&&a.eachItemGraphicEl((function(t,i){t.off("click").on("click",(function(){n.dispatchAction({type:"treeExpandAndCollapse",seriesId:e.id,dataIndex:i})}))})),this._data=a},_updateViewCoordSys:function(e){var t=e.getData(),n=[];t.each((function(e){var i=t.getItemLayout(e);!i||isNaN(i.x)||isNaN(i.y)||n.push([+i.x,+i.y])}));var i=[],a=[];Bs.fromPoints(n,i,a);var r=this._min,o=this._max;a[0]-i[0]==0&&(i[0]=r?r[0]:i[0]-1,a[0]=o?o[0]:a[0]+1),a[1]-i[1]==0&&(i[1]=r?r[1]:i[1]-1,a[1]=o?o[1]:a[1]+1);var s=e.coordinateSystem=new bI;s.zoomLimit=e.get("scaleLimit"),s.setBoundingRect(i[0],i[1],a[0]-i[0],a[1]-i[1]),s.setCenter(e.get("center")),s.setZoom(e.get("zoom")),this.group.attr({position:s.position,scale:s.scale}),this._viewCoordSys=s,this._min=i,this._max=a},_updateController:function(e,t,n){var i=this._controller,a=this._controllerHost,r=this.group;i.setPointerChecker((function(t,i,a){var o=r.getBoundingRect();return o.applyTransform(r.transform),o.contain(i,a)&&!iA(t,n,e)})),i.enable(e.get("roam")),a.zoomLimit=e.get("scaleLimit"),a.zoom=e.coordinateSystem.getZoom(),i.off("pan").off("zoom").on("pan",(function(t){eI.updateViewOnPan(a,t.dx,t.dy),n.dispatchAction({seriesId:e.id,type:"treeRoam",dx:t.dx,dy:t.dy})}),this).on("zoom",(function(t){eI.updateViewOnZoom(a,t.scale,t.originX,t.originY),n.dispatchAction({seriesId:e.id,type:"treeRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),this._updateNodeAndLinkScale(e)}),this)},_updateNodeAndLinkScale:function(e){var t=e.getData(),n=this._getNodeGlobalScale(e),i=[n,n];t.eachItemGraphicEl((function(e,t){e.attr("scale",i)}))},_getNodeGlobalScale:function(e){var t=e.coordinateSystem;if("view"!==t.type)return 1;var n=this._nodeScaleRatio,i=t.scale,a=i&&i[0]||1;return((t.getZoom()-1)*n+1)/a},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},remove:function(){this._mainGroup.removeAll(),this._data=null}});var hA=gI.updateCenterAndZoom;Qx.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},(function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},(function(t){var n=e.dataIndex,i=t.getData().tree.getNodeByDataIndex(n);i.isExpand=!i.isExpand}))})),Qx.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},(function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},(function(t){var n=t.coordinateSystem,i=hA(n,e);t.setCenter&&t.setCenter(i.center),t.setZoom&&t.setZoom(i.zoom)}))}));var dA=function(e,t,n){for(var i,a=[e],r=[];i=a.pop();)if(r.push(i),i.isExpand){var o=i.children;if(o.length)for(var s=0;s<o.length;s++)a.push(o[s])}for(;i=r.pop();)t(i,n)},fA=function(e,t){for(var n,i=[e];n=i.pop();)if(t(n),n.isExpand){var a=n.children;if(a.length)for(var r=a.length-1;r>=0;r--)i.push(a[r])}},pA={eachAfter:dA,eachBefore:fA},gA=pA.eachAfter,mA=pA.eachBefore,vA=tA.init,yA=tA.firstWalk,_A=tA.secondWalk,xA=tA.separation,bA=tA.radialCoordinate,wA=tA.getViewRect;var SA=function(e,t){e.eachSeriesByType("tree",(function(e){!function(e,t){var n=wA(e,t);e.layoutInfo=n;var i=e.get("layout"),a=0,r=0,o=null;"radial"===i?(a=2*Math.PI,r=Math.min(n.height,n.width)/2,o=xA((function(e,t){return(e.parentNode===t.parentNode?1:2)/e.depth}))):(a=n.width,r=n.height,o=xA());var s=e.getData().tree.root,l=s.children[0];if(l){vA(s),gA(l,yA,o),s.hierNode.modifier=-l.hierNode.prelim,mA(l,_A);var u=l,c=l,h=l;mA(l,(function(e){var t=e.getLayout().x;t<u.getLayout().x&&(u=e),t>c.getLayout().x&&(c=e),e.depth>h.depth&&(h=e)}));var d=u===c?1:o(u,c)/2,f=d-u.getLayout().x,p=0,g=0,m=0,v=0;if("radial"===i)p=a/(c.getLayout().x+d+f),g=r/(h.depth-1||1),mA(l,(function(e){m=(e.getLayout().x+f)*p,v=(e.depth-1)*g;var t=bA(m,v);e.setLayout({x:t.x,y:t.y,rawX:m,rawY:v},!0)}));else{var y=e.getOrient();"RL"===y||"LR"===y?(g=r/(c.getLayout().x+d+f),p=a/(h.depth-1||1),mA(l,(function(e){v=(e.getLayout().x+f)*g,m="LR"===y?(e.depth-1)*p:a-(e.depth-1)*p,e.setLayout({x:m,y:v},!0)}))):"TB"!==y&&"BT"!==y||(p=a/(c.getLayout().x+d+f),g=r/(h.depth-1||1),mA(l,(function(e){m=(e.getLayout().x+f)*p,v="TB"===y?(e.depth-1)*g:r-(e.depth-1)*g,e.setLayout({x:m,y:v},!0)})))}}}(e,t)}))};function MA(e){for(var t=[];e;)(e=e.parentNode)&&t.push(e);return t.reverse()}Qx.registerVisual(lw("tree","circle")),Qx.registerLayout(SA);var TA={retrieveTargetInfo:function(e,t,n){if(e&&Ge.indexOf(t,e.type)>=0){var i=n.getData().tree.root,a=e.targetNode;if("string"==typeof a&&(a=i.getNodeById(a)),a&&i.contains(a))return{node:a};var r=e.targetNodeId;if(null!=r&&(a=i.getNodeById(r)))return{node:a}}},getPathToRoot:MA,aboveViewRoot:function(e,t){var n=MA(e);return Ge.indexOf(n,t)>=0},wrapTreePathInfo:function(e,t){for(var n=[];e;){var i=e.dataIndex;n.push({name:e.name,dataIndex:i,value:t.getRawValue(i)}),e=e.parentNode}return n.reverse(),n}},IA=Xh.encodeHTML,AA=Xh.addCommas,DA=TA.wrapTreePathInfo;function CA(e){var t=0;Ge.each(e.children,(function(e){CA(e);var n=e.value;Ge.isArray(n)&&(n=n[0]),t+=n}));var n=e.value;Ge.isArray(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=t),n<0&&(n=0),Ge.isArray(e.value)?e.value[0]=n:e.value=n}cg.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],preventUsingHoverLayer:!0,_viewRoot:null,defaultOption:{progressive:0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperLabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(e,t){var n={name:e.name,children:e.data};CA(n);var i=e.levels||[];i=e.levels=function(e,t){var n,i=t.get("color");if(!i)return;if(e=e||[],Ge.each(e,(function(e){var t=new xh(e),i=t.get("color");(t.get("itemStyle.color")||i&&"none"!==i)&&(n=!0)})),!n){(e[0]||(e[0]={})).color=i.slice()}return e}(i,t);var a=Ge.map(i||[],(function(e){return new xh(e,this,t)}),this),r=jI.createTree(n,this,null,(function(e){e.wrapMethod("getItemModel",(function(e,t){var n=r.getNodeByDataIndex(t),i=a[n.depth];return i&&(e.parentModel=i),e}))}));return r.data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(e){var t=this.getData(),n=this.getRawValue(e),i=Ge.isArray(n)?AA(n[0]):AA(n),a=t.getName(e);return IA(a+": "+i)},getDataParams:function(e){var t=cg.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return t.treePathInfo=DA(n,this),t},setLayoutInfo:function(e){this.layoutInfo=this.layoutInfo||{},Ge.extend(this.layoutInfo,e)},mapIdToIndex:function(e){var t=this._idIndexMap;t||(t=this._idIndexMap=Ge.createHashMap(),this._idIndexMapCount=0);var n=t.get(e);return null==n&&t.set(e,n=this._idIndexMapCount++),n},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;e&&(e===t||t.contains(e))||(this._viewRoot=t)}});var OA=TA.wrapTreePathInfo;function kA(e){this.group=new rh.Group,e.add(this.group)}function LA(e,t,n,i,a,r){var o=[[a?e:e-5,t],[e+n,t],[e+n,t+i],[a?e:e-5,t+i]];return!r&&o.splice(2,0,[e+n+5,t+i/2]),!a&&o.push([e,t+i/2]),o}function EA(e,t,n){e.eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.componentIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&OA(n,t)}}kA.prototype={constructor:kA,render:function(e,t,n,i){var a=e.getModel("breadcrumb"),r=this.group;if(r.removeAll(),a.get("show")&&n){var o=a.getModel("itemStyle"),s=o.getModel("textStyle"),l={pos:{left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,l,s),this._renderContent(e,l,o,s,i),sd.positionElement(r,l.pos,l.box)}},_prepare:function(e,t,n){for(var i=e;i;i=i.parentNode){var a=i.getModel().get("name"),r=n.getTextRect(a),o=Math.max(r.width+16,t.emptyItemWidth);t.totalWidth+=o+8,t.renderList.push({node:i,text:a,width:o})}},_renderContent:function(e,t,n,i,a){for(var r=0,o=t.emptyItemWidth,s=e.get("breadcrumb.height"),l=sd.getAvailableSize(t.pos,t.box),u=t.totalWidth,c=t.renderList,h=c.length-1;h>=0;h--){var d=c[h],f=d.node,p=d.width,g=d.text;u>l.width&&(u-=p-o,p=o,g=null);var m=new rh.Polygon({shape:{points:LA(r,0,p,s,h===c.length-1,0===h)},style:Ge.defaults(n.getItemStyle(),{lineJoin:"bevel",text:g,textFill:i.getTextColor(),textFont:i.getFont()}),z:10,onclick:Ge.curry(a,f)});this.group.add(m),EA(m,e,f),r+=p+8}},remove:function(){this.group.removeAll()}};var NA=kA;var PA=function(){var e,t=[],n={};return{add:function(e,i,a,r,o){return Ge.isString(r)&&(o=r,r=0),!n[e.id]&&(n[e.id]=1,t.push({el:e,target:i,time:a,delay:r,easing:o}),!0)},done:function(t){return e=t,this},start:function(){for(var i=t.length,a=0,r=t.length;a<r;a++){var o=t[a];o.el.animateTo(o.target,o.time,o.delay,o.easing,s)}return this;function s(){--i||(t.length=0,n={},e&&e())}}}},RA={createWrap:PA},zA=Xh.windowOpen,BA=Ge.bind,VA=rh.Group,HA=rh.Rect,YA=Ge.each,FA=["label"],GA=["emphasis","label"],WA=["upperLabel"],jA=["emphasis","upperLabel"],UA=10,ZA=Xo([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),XA=function(e){var t=ZA(e);return t.stroke=t.fill=t.lineWidth=null,t};function qA(e,t,n,i,a,r,o,s,l,u){if(o){var c=o.getLayout(),h=e.getData();if(h.setItemGraphicEl(o.dataIndex,null),c&&c.isInView){var d=c.width,f=c.height,p=c.borderWidth,g=c.invisible,m=o.getRawIndex(),v=s&&s.getRawIndex(),y=o.viewChildren,_=c.upperHeight,x=y&&y.length,b=o.getModel("itemStyle"),w=o.getModel("emphasis.itemStyle"),S=O("nodeGroup",VA);if(S){if(l.add(S),S.attr("position",[c.x||0,c.y||0]),S.__tmNodeWidth=d,S.__tmNodeHeight=f,c.isAboveViewRoot)return S;var M=o.getModel(),T=O("background",HA,u,1);if(T&&function(t,n,i){if(n.dataIndex=o.dataIndex,n.seriesIndex=e.seriesIndex,n.setShape({x:0,y:0,width:d,height:f}),g)A(n);else{n.invisible=!1;var a=o.getVisual("borderColor",!0),r=w.get("borderColor"),s=XA(b);s.fill=a;var l=ZA(w);if(l.fill=r,i){var u=d-2*p;D(s,l,a,u,_,{x:p,y:0,width:u,height:_})}else s.text=l.text=null;n.setStyle(s),rh.setElementHoverStyle(n,l)}t.add(n)}(S,T,x&&c.upperLabelHeight),x)rh.isHighDownDispatcher(S)&&rh.setAsHighDownDispatcher(S,!1),T&&(rh.setAsHighDownDispatcher(T,!0),h.setItemGraphicEl(o.dataIndex,T));else{var I=O("content",HA,u,2);I&&function(t,n){n.dataIndex=o.dataIndex,n.seriesIndex=e.seriesIndex;var i=Math.max(d-2*p,0),a=Math.max(f-2*p,0);if(n.culling=!0,n.setShape({x:p,y:p,width:i,height:a}),g)A(n);else{n.invisible=!1;var r=o.getVisual("color",!0),s=XA(b);s.fill=r;var l=ZA(w);D(s,l,r,i,a),n.setStyle(s),rh.setElementHoverStyle(n,l)}t.add(n)}(S,I),T&&rh.isHighDownDispatcher(T)&&rh.setAsHighDownDispatcher(T,!1),rh.setAsHighDownDispatcher(S,!0),h.setItemGraphicEl(o.dataIndex,S)}return S}}}function A(e){!e.invisible&&r.push(e)}function D(t,n,i,a,r,s){var l=M.get("name"),u=M.getModel(s?WA:FA),h=M.getModel(s?jA:GA),d=u.getShallow("show");rh.setLabelStyle(t,n,u,h,{defaultText:d?l:null,autoColor:i,isRectText:!0,labelFetcher:e,labelDataIndex:o.dataIndex,labelProp:s?"upperLabel":"label"}),C(t,s,c),C(n,s,c),s&&(t.textRect=Ge.clone(s)),t.truncate=d&&u.get("ellipsis")?{outerWidth:a,outerHeight:r,minChar:2}:null}function C(t,n,i){var a=t.text;if(!n&&i.isLeafRoot&&null!=a){var r=e.get("drillDownIcon",!0);t.text=r?r+" "+a:a}}function O(e,r,s,l){var u=null!=v&&n[e][v],c=a[e];return u?(n[e][v]=null,function(e,t,n){var i=e[m]={};i.old="nodeGroup"===n?t.position.slice():Ge.extend({},t.shape)}(c,u,e)):g||((u=new r({z:KA(s,l)})).__tmDepth=s,u.__tmStorageName=e,function(e,t,n){var r=e[m]={},s=o.parentNode;if(s&&(!i||"drillDown"===i.direction)){var l=0,u=0,c=a.background[s.getRawIndex()];!i&&c&&c.old&&(l=c.old.width,u=c.old.height),r.old="nodeGroup"===n?[0,u]:{x:l,y:u,width:0,height:0}}r.fadein="nodeGroup"!==n}(c,0,e)),t[e][m]=u}}function KA(e,t){var n=e*UA+t;return(n-1)/n}Qx.extendChartView({type:"treemap",init:function(e,t){this._containerGroup,this._storage={nodeGroup:[],background:[],content:[]},this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(e,t,n,i){var a=t.findComponents({mainType:"series",subType:"treemap",query:i});if(!(Ge.indexOf(a,e)<0)){this.seriesModel=e,this.api=n,this.ecModel=t;var r=TA.retrieveTargetInfo(i,["treemapZoomToNode","treemapRootToNode"],e),o=i&&i.type,s=e.layoutInfo,l=!this._oldTree,u=this._storage,c="treemapRootToNode"===o&&r&&u?{rootNodeGroup:u.nodeGroup[r.node.getRawIndex()],direction:i.direction}:null,h=this._giveContainerGroup(s),d=this._doRender(h,e,c);l||o&&"treemapZoomToNode"!==o&&"treemapRootToNode"!==o?d.renderFinally():this._doAnimation(h,d,e,c),this._resetController(n),this._renderBreadcrumb(e,n,r)}},_giveContainerGroup:function(e){var t=this._containerGroup;return t||(t=this._containerGroup=new VA,this._initEvents(t),this.group.add(t)),t.attr("position",[e.x,e.y]),t},_doRender:function(e,t,n){var i=t.getData().tree,a=this._oldTree,r={nodeGroup:[],background:[],content:[]},o={nodeGroup:[],background:[],content:[]},s=this._storage,l=[],u=Ge.curry(qA,t,o,s,n,r,l);!function e(t,n,i,a,r){a?(n=t,YA(t,(function(e,t){!e.isRemoved()&&s(t,t)}))):new rv(n,t,o,o).add(s).update(s).remove(Ge.curry(s,null)).execute();function o(e){return e.getId()}function s(o,s){var l=null!=o?t[o]:null,c=null!=s?n[s]:null,h=u(l,c,i,r);h&&e(l&&l.viewChildren||[],c&&c.viewChildren||[],h,a,r+1)}}(i.root?[i.root]:[],a&&a.root?[a.root]:[],e,i===a||!a,0);var c=function(e){var t={nodeGroup:[],background:[],content:[]};return e&&YA(e,(function(e,n){var i=t[n];YA(e,(function(e){e&&(i.push(e),e.__tmWillDelete=1)}))})),t}(s);return this._oldTree=i,this._storage=o,{lastsForAnimation:r,willDeleteEls:c,renderFinally:function(){YA(c,(function(e){YA(e,(function(e){e.parent&&e.parent.remove(e)}))})),YA(l,(function(e){e.invisible=!0,e.dirty()}))}}},_doAnimation:function(e,t,n,i){if(n.get("animation")){var a=n.get("animationDurationUpdate"),r=n.get("animationEasing"),o=RA.createWrap();YA(t.willDeleteEls,(function(e,t){YA(e,(function(e,n){if(!e.invisible){var s,l=e.parent;if(i&&"drillDown"===i.direction)s=l===i.rootNodeGroup?{shape:{x:0,y:0,width:l.__tmNodeWidth,height:l.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var u=0,c=0;l.__tmWillDelete||(u=l.__tmNodeWidth/2,c=l.__tmNodeHeight/2),s="nodeGroup"===t?{position:[u,c],style:{opacity:0}}:{shape:{x:u,y:c,width:0,height:0},style:{opacity:0}}}s&&o.add(e,s,a,r)}}))})),YA(this._storage,(function(e,n){YA(e,(function(e,i){var s=t.lastsForAnimation[n][i],l={};s&&("nodeGroup"===n?s.old&&(l.position=e.position.slice(),e.attr("position",s.old)):(s.old&&(l.shape=Ge.extend({},e.shape),e.setShape(s.old)),s.fadein?(e.setStyle("opacity",0),l.style={opacity:1}):1!==e.style.opacity&&(l.style={opacity:1})),o.add(e,l,a,r))}))}),this),this._state="animating",o.done(BA((function(){this._state="ready",t.renderFinally()}),this)).start()}},_resetController:function(e){var t=this._controller;t||((t=this._controller=new QT(e.getZr())).enable(this.seriesModel.get("roam")),t.on("pan",BA(this._onPan,this)),t.on("zoom",BA(this._onZoom,this)));var n=new Pi(0,0,e.getWidth(),e.getHeight());t.setPointerChecker((function(e,t,i){return n.contain(t,i)}))},_clearController:function(){var e=this._controller;e&&(e.dispose(),e=null)},_onPan:function(e){if("animating"!==this._state&&(Math.abs(e.dx)>3||Math.abs(e.dy)>3)){var t=this.seriesModel.getData().tree.root;if(!t)return;var n=t.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+e.dx,y:n.y+e.dy,width:n.width,height:n.height}})}},_onZoom:function(e){var t=e.originX,n=e.originY;if("animating"!==this._state){var i=this.seriesModel.getData().tree.root;if(!i)return;var a=i.getLayout();if(!a)return;var r=new Pi(a.x,a.y,a.width,a.height),o=this.seriesModel.layoutInfo;t-=o.x,n-=o.y;var s=ln.create();ln.translate(s,s,[-t,-n]),ln.scale(s,s,[e.scale,e.scale]),ln.translate(s,s,[t,n]),r.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:r.x,y:r.y,width:r.width,height:r.height}})}},_initEvents:function(e){e.on("click",(function(e){if("ready"===this._state){var t=this.seriesModel.get("nodeClick",!0);if(t){var n=this.findTarget(e.offsetX,e.offsetY);if(n){var i=n.node;if(i.getLayout().isLeafRoot)this._rootToNode(n);else if("zoomToNode"===t)this._zoomToNode(n);else if("link"===t){var a=i.hostTree.data.getItemModel(i.dataIndex),r=a.get("link",!0),o=a.get("target",!0)||"blank";r&&zA(r,o)}}}}}),this)},_renderBreadcrumb:function(e,t,n){n||(n=null!=e.get("leafDepth",!0)?{node:e.getViewRoot()}:this.findTarget(t.getWidth()/2,t.getHeight()/2))||(n={node:e.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new NA(this.group))).render(e,t,n.node,BA((function(t){"animating"!==this._state&&(TA.aboveViewRoot(e.getViewRoot(),t)?this._rootToNode({node:t}):this._zoomToNode({node:t}))}),this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function(e){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},_rootToNode:function(e){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},findTarget:function(e,t){var n;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},(function(i){var a=this._storage.background[i.getRawIndex()];if(a){var r=a.transformCoordToLocal(e,t),o=a.shape;if(!(o.x<=r[0]&&r[0]<=o.x+o.width&&o.y<=r[1]&&r[1]<=o.y+o.height))return!1;n={node:i,offsetX:r[0],offsetY:r[1]}}}),this),n}});for(var $A=function(){},QA=["treemapZoomToNode","treemapRender","treemapMove"],JA=0;JA<QA.length;JA++)Qx.registerAction({type:QA[JA],update:"updateView"},$A);Qx.registerAction({type:"treemapRootToNode",update:"updateView"},(function(e,t){t.eachComponent({mainType:"series",subType:"treemap",query:e},(function(t,n){var i=TA.retrieveTargetInfo(e,["treemapZoomToNode","treemapRootToNode"],t);if(i){var a=t.getViewRoot();a&&(e.direction=TA.aboveViewRoot(a,i.node)?"rollUp":"drillDown"),t.resetViewRoot(i.node)}}))}));var eD=Ph.linearMap,tD=Ge.each,nD=Ge.isObject,iD=-1,aD=function(e){var t=e.mappingMethod,n=e.type,i=this.option=Ge.clone(e);this.type=n,this.mappingMethod=t,this._normalizeData=gD[t];var a=rD[n];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._doMap=a._doMap[t],"piecewise"===t?(oD(i),function(e){var t=e.pieceList;e.hasSpecialVisual=!1,Ge.each(t,(function(t,n){t.originIndex=n,null!=t.visual&&(e.hasSpecialVisual=!0)}))}(i)):"category"===t?i.categories?function(e){var t=e.categories,n=e.visual,i=e.categoryMap={};if(tD(t,(function(e,t){i[e]=t})),!Ge.isArray(n)){var a=[];Ge.isObject(n)?tD(n,(function(e,t){var n=i[t];a[null!=n?n:iD]=e})):a[iD]=n,n=pD(e,a)}for(var r=t.length-1;r>=0;r--)null==n[r]&&(delete i[t[r]],t.pop())}(i):oD(i,!0):(Ge.assert("linear"!==t||i.dataExtent),oD(i))};aD.prototype={constructor:aD,mapValueToVisual:function(e){var t=this._normalizeData(e);return this._doMap(t,e)},getNormalizer:function(){return Ge.bind(this._normalizeData,this)}};var rD=aD.visualHandlers={color:{applyVisual:uD("color"),getColorMapper:function(){var e=this.option;return Ge.bind("category"===e.mappingMethod?function(e,t){return!t&&(e=this._normalizeData(e)),cD.call(this,e)}:function(t,n,i){var a=!!i;return!n&&(t=this._normalizeData(t)),i=qn.fastLerp(t,e.parsedVisual,i),a?i:qn.stringify(i,"rgba")},this)},_doMap:{linear:function(e){return qn.stringify(qn.fastLerp(e,this.option.parsedVisual),"rgba")},category:cD,piecewise:function(e,t){var n=fD.call(this,t);return null==n&&(n=qn.stringify(qn.fastLerp(e,this.option.parsedVisual),"rgba")),n},fixed:hD}},colorHue:sD((function(e,t){return qn.modifyHSL(e,t)})),colorSaturation:sD((function(e,t){return qn.modifyHSL(e,null,t)})),colorLightness:sD((function(e,t){return qn.modifyHSL(e,null,null,t)})),colorAlpha:sD((function(e,t){return qn.modifyAlpha(e,t)})),opacity:{applyVisual:uD("opacity"),_doMap:dD([0,1])},liftZ:{applyVisual:uD("liftZ"),_doMap:{linear:hD,category:hD,piecewise:hD,fixed:hD}},symbol:{applyVisual:function(e,t,n){var i=this.mapValueToVisual(e);if(Ge.isString(i))n("symbol",i);else if(nD(i))for(var a in i)i.hasOwnProperty(a)&&n(a,i[a])},_doMap:{linear:lD,category:cD,piecewise:function(e,t){var n=fD.call(this,t);return null==n&&(n=lD.call(this,e)),n},fixed:hD}},symbolSize:{applyVisual:uD("symbolSize"),_doMap:dD([0,1])}};function oD(e,t){var n=e.visual,i=[];Ge.isObject(n)?tD(n,(function(e){i.push(e)})):null!=n&&i.push(n);t||1!==i.length||{color:1,symbol:1}.hasOwnProperty(e.type)||(i[1]=i[0]),pD(e,i)}function sD(e){return{applyVisual:function(t,n,i){t=this.mapValueToVisual(t),i("color",e(n("color"),t))},_doMap:dD([0,1])}}function lD(e){var t=this.option.visual;return t[Math.round(eD(e,[0,1],[0,t.length-1],!0))]||{}}function uD(e){return function(t,n,i){i(e,this.mapValueToVisual(t))}}function cD(e){var t=this.option.visual;return t[this.option.loop&&e!==iD?e%t.length:e]}function hD(){return this.option.visual[0]}function dD(e){return{linear:function(t){return eD(t,e,this.option.visual,!0)},category:cD,piecewise:function(t,n){var i=fD.call(this,n);return null==i&&(i=eD(t,e,this.option.visual,!0)),i},fixed:hD}}function fD(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var i=n[aD.findPieceIndex(e,n)];if(i&&i.visual)return i.visual[this.type]}}function pD(e,t){return e.visual=t,"color"===e.type&&(e.parsedVisual=Ge.map(t,(function(e){return qn.parse(e)}))),t}var gD={linear:function(e){return eD(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=aD.findPieceIndex(e,t,!0);if(null!=n)return eD(n,[0,t.length-1],[0,1],!0)},category:function(e){var t=this.option.categories?this.option.categoryMap[e]:e;return null==t?iD:t},fixed:Ge.noop};function mD(e,t,n){return e?t<=n:t<n}aD.listVisualTypes=function(){var e=[];return Ge.each(rD,(function(t,n){e.push(n)})),e},aD.addVisualHandler=function(e,t){rD[e]=t},aD.isValidType=function(e){return rD.hasOwnProperty(e)},aD.eachVisual=function(e,t,n){Ge.isObject(e)?Ge.each(e,t,n):t.call(n,e)},aD.mapVisual=function(e,t,n){var i,a=Ge.isArray(e)?[]:Ge.isObject(e)?{}:(i=!0,null);return aD.eachVisual(e,(function(e,r){var o=t.call(n,e,r);i?a=o:a[r]=o})),a},aD.retrieveVisuals=function(e){var t,n={};return e&&tD(rD,(function(i,a){e.hasOwnProperty(a)&&(n[a]=e[a],t=!0)})),t?n:null},aD.prepareVisualTypes=function(e){if(nD(e)){var t=[];tD(e,(function(e,n){t.push(n)})),e=t}else{if(!Ge.isArray(e))return[];e=e.slice()}return e.sort((function(e,t){return"color"===t&&"color"!==e&&0===e.indexOf("color")?1:-1})),e},aD.dependsOn=function(e,t){return"color"===t?!(!e||0!==e.indexOf(t)):e===t},aD.findPieceIndex=function(e,t,n){for(var i,a=1/0,r=0,o=t.length;r<o;r++){var s=t[r].value;if(null!=s){if(s===e||"string"==typeof s&&s===e+"")return r;n&&h(s,r)}}for(r=0,o=t.length;r<o;r++){var l=t[r],u=l.interval,c=l.close;if(u){if(u[0]===-1/0){if(mD(c[1],e,u[1]))return r}else if(u[1]===1/0){if(mD(c[0],u[0],e))return r}else if(mD(c[0],u[0],e)&&mD(c[1],e,u[1]))return r;n&&h(u[0],r),n&&h(u[1],r)}}if(n)return e===1/0?t.length-1:e===-1/0?0:i;function h(t,n){var r=Math.abs(t-e);r<a&&(a=r,i=n)}};var vD=aD,yD=Ge.isArray,_D="itemStyle";function xD(e,t,n,i,a,r){var o=e.getModel(),s=e.getLayout();if(s&&!s.invisible&&s.isInView){var l,u=e.getModel(_D),c=function(e,t,n,i){var a=Ge.extend({},t);return Ge.each(["color","colorAlpha","colorSaturation"],(function(r){var o=e.get(r,!0);null==o&&n&&(o=n[r]),null==o&&(o=t[r]),null==o&&(o=i.get(r)),null!=o&&(a[r]=o)})),a}(u,t,n[e.depth],i),h=u.get("borderColor"),d=u.get("borderColorSaturation");null!=d&&(h=function(e,t){return null!=t?qn.modifyHSL(t,null,null,e):null}(d,l=bD(c))),e.setVisual("borderColor",h);var f=e.viewChildren;if(f&&f.length){var p=function(e,t,n,i,a,r){if(!r||!r.length)return;var o=SD(t,"color")||null!=a.color&&"none"!==a.color&&(SD(t,"colorAlpha")||SD(t,"colorSaturation"));if(!o)return;var s=t.get("visualMin"),l=t.get("visualMax"),u=n.dataExtent.slice();null!=s&&s<u[0]&&(u[0]=s),null!=l&&l>u[1]&&(u[1]=l);var c=t.get("colorMappingBy"),h={type:o.name,dataExtent:u,visual:o.range};"color"!==h.type||"index"!==c&&"id"!==c?h.mappingMethod="linear":(h.mappingMethod="category",h.loop=!0);var d=new vD(h);return d.__drColorMappingBy=c,d}(0,o,s,0,c,f);Ge.each(f,(function(e,t){if(e.depth>=a.length||e===a[e.depth]){var s=function(e,t,n,i,a,r){var o=Ge.extend({},t);if(a){var s=a.type,l="color"===s&&a.__drColorMappingBy,u="index"===l?i:"id"===l?r.mapIdToIndex(n.getId()):n.getValue(e.get("visualDimension"));o[s]=a.mapValueToVisual(u)}return o}(o,c,e,t,p,r);xD(e,s,n,i,a,r)}}))}else l=bD(c),e.setVisual("color",l)}}function bD(e){var t=wD(e,"color");if(t){var n=wD(e,"colorAlpha"),i=wD(e,"colorSaturation");return i&&(t=qn.modifyHSL(t,null,null,i)),n&&(t=qn.modifyAlpha(t,n)),t}}function wD(e,t){var n=e[t];if(null!=n&&"none"!==n)return n}function SD(e,t){var n=e.get(t);return yD(n)&&n.length?{name:t,range:n}:null}var MD={seriesType:"treemap",reset:function(e,t,n,i){var a=e.getData().tree,r=a.root,o=e.getModel(_D);r.isRemoved()||xD(r,{},Ge.map(a.levelModels,(function(e){return e?e.get(_D):null})),o,e.getViewRoot().getAncestors(),e)}},TD=Ph.parsePercent,ID=Ph.MAX_SAFE_INTEGER,AD=Math.max,DD=Math.min,CD=Ge.retrieve,OD=Ge.each,kD=["itemStyle","borderWidth"],LD=["itemStyle","gapWidth"],ED=["upperLabel","show"],ND=["upperLabel","height"],PD={seriesType:"treemap",reset:function(e,t,n,i){var a=n.getWidth(),r=n.getHeight(),o=e.option,s=sd.getLayoutRect(e.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),l=o.size||[],u=TD(CD(s.width,l[0]),a),c=TD(CD(s.height,l[1]),r),h=i&&i.type,d=TA.retrieveTargetInfo(i,["treemapZoomToNode","treemapRootToNode"],e),f="treemapRender"===h||"treemapMove"===h?i.rootRect:null,p=e.getViewRoot(),g=TA.getPathToRoot(p);if("treemapMove"!==h){var m="treemapZoomToNode"===h?function(e,t,n,i,a){var r,o=(t||{}).node,s=[i,a];if(!o||o===n)return s;var l=i*a,u=l*e.option.zoomToNodeRatio;for(;r=o.parentNode;){for(var c=0,h=r.children,d=0,f=h.length;d<f;d++)c+=h[d].getValue();var p=o.getValue();if(0===p)return s;u*=c/p;var g=r.getModel(),m=g.get(kD);(u+=4*m*m+(3*m+Math.max(m,HD(g)))*Math.pow(u,.5))>ID&&(u=ID),o=r}u<l&&(u=l);var v=Math.pow(u/l,.5);return[i*v,a*v]}(e,d,p,u,c):f?[f.width,f.height]:[u,c],v=o.sort;v&&"asc"!==v&&"desc"!==v&&(v="desc");var y={squareRatio:o.squareRatio,sort:v,leafDepth:o.leafDepth};p.hostTree.clearLayouts();var _={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};p.setLayout(_),RD(p,y,!1,0);_=p.getLayout();OD(g,(function(e,t){var n=(g[t+1]||p).getValue();e.setLayout(Ge.extend({dataExtent:[n,n],borderWidth:0,upperHeight:0},_))}))}var x=e.getData().tree.root;x.setLayout(function(e,t,n){if(t)return{x:t.x,y:t.y};var i={x:0,y:0};if(!n)return i;var a=n.node,r=a.getLayout();if(!r)return i;var o=[r.width/2,r.height/2],s=a;for(;s;){var l=s.getLayout();o[0]+=l.x,o[1]+=l.y,s=s.parentNode}return{x:e.width/2-o[0],y:e.height/2-o[1]}}(s,f,d),!0),e.setLayoutInfo(s),VD(x,new Pi(-s.x,-s.y,a,r),g,p,0)}};function RD(e,t,n,i){var a,r;if(!e.isRemoved()){var o=e.getLayout();a=o.width,r=o.height;var s=(f=e.getModel()).get(kD),l=f.get(LD)/2,u=HD(f),c=Math.max(s,u),h=s-l,d=c-l,f=e.getModel();e.setLayout({borderWidth:s,upperHeight:c,upperLabelHeight:u},!0);var p=(a=AD(a-2*h,0))*(r=AD(r-h-d,0)),g=function(e,t,n,i,a,r){var o=e.children||[],s=i.sort;"asc"!==s&&"desc"!==s&&(s=null);var l=null!=i.leafDepth&&i.leafDepth<=r;if(a&&!l)return e.viewChildren=[];o=Ge.filter(o,(function(e){return!e.isRemoved()})),function(e,t){t&&e.sort((function(e,n){var i="asc"===t?e.getValue()-n.getValue():n.getValue()-e.getValue();return 0===i?"asc"===t?e.dataIndex-n.dataIndex:n.dataIndex-e.dataIndex:i}))}(o,s);var u=function(e,t,n){for(var i=0,a=0,r=t.length;a<r;a++)i+=t[a].getValue();var o=e.get("visualDimension");if(t&&t.length)if("value"===o&&n)s=[t[t.length-1].getValue(),t[0].getValue()],"asc"===n&&s.reverse();else{var s=[1/0,-1/0];OD(t,(function(e){var t=e.getValue(o);t<s[0]&&(s[0]=t),t>s[1]&&(s[1]=t)}))}else s=[NaN,NaN];return{sum:i,dataExtent:s}}(t,o,s);if(0===u.sum)return e.viewChildren=[];if(u.sum=function(e,t,n,i,a){if(!i)return n;for(var r=e.get("visibleMin"),o=a.length,s=o,l=o-1;l>=0;l--){var u=a["asc"===i?o-l-1:l].getValue();u/n*t<r&&(s=l,n-=u)}return"asc"===i?a.splice(0,o-s):a.splice(s,o-s),n}(t,n,u.sum,s,o),0===u.sum)return e.viewChildren=[];for(var c=0,h=o.length;c<h;c++){var d=o[c].getValue()/u.sum*n;o[c].setLayout({area:d})}l&&(o.length&&e.setLayout({isLeafRoot:!0},!0),o.length=0);return e.viewChildren=o,e.setLayout({dataExtent:u.dataExtent},!0),o}(e,f,p,t,n,i);if(g.length){var m={x:h,y:d,width:a,height:r},v=DD(a,r),y=1/0,_=[];_.area=0;for(var x=0,b=g.length;x<b;){var w=g[x];_.push(w),_.area+=w.getLayout().area;var S=zD(_,v,t.squareRatio);S<=y?(x++,y=S):(_.area-=_.pop().getLayout().area,BD(_,v,m,l,!1),v=DD(m.width,m.height),_.length=_.area=0,y=1/0)}if(_.length&&BD(_,v,m,l,!0),!n){var M=f.get("childrenVisibleMin");null!=M&&p<M&&(n=!0)}for(x=0,b=g.length;x<b;x++)RD(g[x],t,n,i+1)}}}function zD(e,t,n){for(var i,a=0,r=1/0,o=0,s=e.length;o<s;o++)(i=e[o].getLayout().area)&&(i<r&&(r=i),i>a&&(a=i));var l=e.area*e.area,u=t*t*n;return l?AD(u*a/l,l/(u*r)):1/0}function BD(e,t,n,i,a){var r=t===n.width?0:1,o=1-r,s=["x","y"],l=["width","height"],u=n[s[r]],c=t?e.area/t:0;(a||c>n[l[o]])&&(c=n[l[o]]);for(var h=0,d=e.length;h<d;h++){var f=e[h],p={},g=c?f.getLayout().area/c:0,m=p[l[o]]=AD(c-2*i,0),v=n[s[r]]+n[l[r]]-u,y=h===d-1||v<g?v:g,_=p[l[r]]=AD(y-2*i,0);p[s[o]]=n[s[o]]+DD(i,m/2),p[s[r]]=u+DD(i,_/2),u+=y,f.setLayout(p,!0)}n[s[o]]+=c,n[l[o]]-=c}function VD(e,t,n,i,a){var r=e.getLayout(),o=n[a],s=o&&o===e;if(!(o&&!s||a===n.length&&e!==i)){e.setLayout({isInView:!0,invisible:!s&&!t.intersect(r),isAboveViewRoot:s},!0);var l=new Pi(t.x-r.x,t.y-r.y,t.width,t.height);OD(e.viewChildren||[],(function(e){VD(e,l,n,i,a+1)}))}}function HD(e){return e.get(ED)?e.get(ND):0}var YD=PD;Qx.registerVisual(MD),Qx.registerLayout(YD);var FD=Zo.enableClassCheck;function GD(e){return"_EC_"+e}var WD=function(e){this._directed=e||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData},jD=WD.prototype;function UD(e,t){this.id=null==e?"":e,this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=null==t?-1:t}function ZD(e,t,n){this.node1=e,this.node2=t,this.dataIndex=null==n?-1:n}jD.type="graph",jD.isDirected=function(){return this._directed},jD.addNode=function(e,t){e=null==e?""+t:""+e;var n=this._nodesMap;if(!n[GD(e)]){var i=new UD(e,t);return i.hostGraph=this,this.nodes.push(i),n[GD(e)]=i,i}},jD.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},jD.getNodeById=function(e){return this._nodesMap[GD(e)]},jD.addEdge=function(e,t,n){var i=this._nodesMap,a=this._edgesMap;if("number"==typeof e&&(e=this.nodes[e]),"number"==typeof t&&(t=this.nodes[t]),UD.isInstance(e)||(e=i[GD(e)]),UD.isInstance(t)||(t=i[GD(t)]),e&&t){var r=e.id+"-"+t.id;if(!a[r]){var o=new ZD(e,t,n);return o.hostGraph=this,this._directed&&(e.outEdges.push(o),t.inEdges.push(o)),e.edges.push(o),e!==t&&t.edges.push(o),this.edges.push(o),a[r]=o,o}}},jD.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},jD.getEdge=function(e,t){UD.isInstance(e)&&(e=e.id),UD.isInstance(t)&&(t=t.id);var n=this._edgesMap;return this._directed?n[e+"-"+t]:n[e+"-"+t]||n[t+"-"+e]},jD.eachNode=function(e,t){for(var n=this.nodes,i=n.length,a=0;a<i;a++)n[a].dataIndex>=0&&e.call(t,n[a],a)},jD.eachEdge=function(e,t){for(var n=this.edges,i=n.length,a=0;a<i;a++)n[a].dataIndex>=0&&n[a].node1.dataIndex>=0&&n[a].node2.dataIndex>=0&&e.call(t,n[a],a)},jD.breadthFirstTraverse=function(e,t,n,i){if(UD.isInstance(t)||(t=this._nodesMap[GD(t)]),t){for(var a="out"===n?"outEdges":"in"===n?"inEdges":"edges",r=0;r<this.nodes.length;r++)this.nodes[r].__visited=!1;if(!e.call(i,t,null))for(var o=[t];o.length;){var s=o.shift(),l=s[a];for(r=0;r<l.length;r++){var u=l[r],c=u.node1===s?u.node2:u.node1;if(!c.__visited){if(e.call(i,c,s))return;o.push(c),c.__visited=!0}}}}},jD.update=function(){for(var e=this.data,t=this.edgeData,n=this.nodes,i=this.edges,a=0,r=n.length;a<r;a++)n[a].dataIndex=-1;for(a=0,r=e.count();a<r;a++)n[e.getRawIndex(a)].dataIndex=a;t.filterSelf((function(e){var n=i[t.getRawIndex(e)];return n.node1.dataIndex>=0&&n.node2.dataIndex>=0}));for(a=0,r=i.length;a<r;a++)i[a].dataIndex=-1;for(a=0,r=t.count();a<r;a++)i[t.getRawIndex(a)].dataIndex=a},jD.clone=function(){for(var e=new WD(this._directed),t=this.nodes,n=this.edges,i=0;i<t.length;i++)e.addNode(t[i].id,t[i].dataIndex);for(i=0;i<n.length;i++){var a=n[i];e.addEdge(a.node1.id,a.node2.id,a.dataIndex)}return e},UD.prototype={constructor:UD,degree:function(){return this.edges.length},inDegree:function(){return this.inEdges.length},outDegree:function(){return this.outEdges.length},getModel:function(e){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(e)}},ZD.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(e)};var XD=function(e,t){return{getValue:function(n){var i=this[e][t];return i.get(i.getDimension(n||"value"),this.dataIndex)},setVisual:function(n,i){this.dataIndex>=0&&this[e][t].setItemVisual(this.dataIndex,n,i)},getVisual:function(n,i){return this[e][t].getItemVisual(this.dataIndex,n,i)},setLayout:function(n,i){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,n,i)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}};Ge.mixin(UD,XD("hostGraph","data")),Ge.mixin(ZD,XD("hostGraph","edgeData")),WD.Node=UD,WD.Edge=ZD,FD(UD),FD(ZD);var qD=WD;var KD=function(e,t,n,i,a){for(var r=new qD(i),o=0;o<e.length;o++)r.addNode(Ge.retrieve(e[o].id,e[o].name,o),o);var s=[],l=[],u=0;for(o=0;o<t.length;o++){var c=t[o],h=c.source,d=c.target;r.addEdge(h,d,u)&&(l.push(c),s.push(Ge.retrieve(c.id,h+" > "+d)),u++)}var f,p=n.get("coordinateSystem");if("cartesian2d"===p||"polar"===p)f=vy(e,n);else{var g=kf.get(p),m=g&&"view"!==g.type&&g.dimensions||[];Ge.indexOf(m,"value")<0&&m.concat(["value"]);var v=Jv(e,{coordDimensions:m});(f=new Bv(v,n)).initData(e)}var y=new Bv(["value"],n);return y.initData(l,s),a&&a(f,y),FI({mainData:f,struct:r,structAttr:"graph",datas:{node:f,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),r.update(),r},$D=Bo.defaultEmphasis,QD=Xh.encodeHTML,JD=Qx.extendSeriesModel({type:"series.graph",init:function(e){JD.superApply(this,"init",arguments);var t=this;function n(){return t._categoriesData}this.legendVisualProvider=new yM(n,n),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},mergeOption:function(e){JD.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(e){JD.superApply(this,"mergeDefaultAndTheme",arguments),$D(e,["edgeLabel"],["show"])},getInitialData:function(e,t){var n=e.edges||e.links||[],i=e.data||e.nodes||[],a=this;if(i&&n)return KD(i,n,this,!0,(function(e,n){e.wrapMethod("getItemModel",(function(e){var t=a._categoriesModels[e.getShallow("category")];return t&&(t.parentModel=e.parentModel,e.parentModel=t),e}));var i=a.getModel("edgeLabel"),r=new xh({label:i.option},i.parentModel,t),o=a.getModel("emphasis.edgeLabel"),s=new xh({emphasis:{label:o.option}},o.parentModel,t);function l(e){return(e=this.parsePath(e))&&"label"===e[0]?r:e&&"emphasis"===e[0]&&"label"===e[1]?s:this.parentModel}n.wrapMethod("getItemModel",(function(e){return e.customizeGetParent(l),e}))})).data},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(e,t,n){if("edge"===n){var i=this.getData(),a=this.getDataParams(e,n),r=i.graph.getEdgeByIndex(e),o=i.getName(r.node1.dataIndex),s=i.getName(r.node2.dataIndex),l=[];return null!=o&&l.push(o),null!=s&&l.push(s),l=QD(l.join(" > ")),a.value&&(l+=" : "+QD(a.value)),l}return JD.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var e=Ge.map(this.option.categories||[],(function(e){return null!=e.value?e:Ge.extend({value:0},e)})),t=new Bv(["value"],this);t.initData(e),this._categoriesData=t,this._categoriesModels=t.mapArray((function(e){return t.getItemModel(e,!0)}))},setZoom:function(e){this.option.zoom=e},setCenter:function(e){this.option.center=e},isAnimationEnabled:function(){return JD.superCall(this,"isAnimationEnabled")&&!("force"===this.get("layout")&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{label:{show:!0}}}}),eC=rh.Line.prototype,tC=rh.BezierCurve.prototype;function nC(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}var iC=rh.extendShape({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(e,t){this[nC(t)?"_buildPathLine":"_buildPathCurve"](e,t)},_buildPathLine:eC.buildPath,_buildPathCurve:tC.buildPath,pointAt:function(e){return this[nC(this.shape)?"_pointAtLine":"_pointAtCurve"](e)},_pointAtLine:eC.pointAt,_pointAtCurve:tC.pointAt,tangentAt:function(e){var t=this.shape,n=nC(t)?[t.x2-t.x1,t.y2-t.y1]:this._tangentAtCurve(e);return dt.normalize(n,n)},_tangentAtCurve:tC.tangentAt}),aC=Ph.round,rC=["fromSymbol","toSymbol"];function oC(e){return"_"+e+"Type"}function sC(e,t,n){var i=t.getItemVisual(n,"color"),a=t.getItemVisual(n,e),r=t.getItemVisual(n,e+"Size");if(a&&"none"!==a){Ge.isArray(r)||(r=[r,r]);var o=X_.createSymbol(a,-r[0]/2,-r[1]/2,r[0],r[1],i);return o.name=e,o}}function lC(e,t){e.x1=t[0][0],e.y1=t[0][1],e.x2=t[1][0],e.y2=t[1][1],e.percent=1;var n=t[2];n?(e.cpx1=n[0],e.cpy1=n[1]):(e.cpx1=NaN,e.cpy1=NaN)}function uC(e,t,n){rh.Group.call(this),this._createLine(e,t,n)}var cC=uC.prototype;cC.beforeUpdate=function(){var e=this,t=e.childOfName("fromSymbol"),n=e.childOfName("toSymbol"),i=e.childOfName("label");if(t||n||!i.ignore){for(var a=1,r=this.parent;r;)r.scale&&(a/=r.scale[0]),r=r.parent;var o=e.childOfName("line");if(this.__dirty||o.__dirty){var s=o.shape.percent,l=o.pointAt(0),u=o.pointAt(s),c=dt.sub([],u,l);if(dt.normalize(c,c),t){t.attr("position",l);var h=o.tangentAt(0);t.attr("rotation",Math.PI/2-Math.atan2(h[1],h[0])),t.attr("scale",[a*s,a*s])}if(n){n.attr("position",u);h=o.tangentAt(1);n.attr("rotation",-Math.PI/2-Math.atan2(h[1],h[0])),n.attr("scale",[a*s,a*s])}if(!i.ignore){var d,f,p,g;i.attr("position",u);var m=i.__labelDistance,v=m[0]*a,y=m[1]*a,_=s/2,x=[(h=o.tangentAt(_))[1],-h[0]],b=o.pointAt(_);x[1]>0&&(x[0]=-x[0],x[1]=-x[1]);var w,S=h[0]<0?-1:1;if("start"!==i.__position&&"end"!==i.__position){var M=-Math.atan2(h[1],h[0]);u[0]<l[0]&&(M=Math.PI+M),i.attr("rotation",M)}switch(i.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":w=-y,p="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":w=y,p="top";break;default:w=0,p="middle"}switch(i.__position){case"end":d=[c[0]*v+u[0],c[1]*y+u[1]],f=c[0]>.8?"left":c[0]<-.8?"right":"center",p=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";break;case"start":d=[-c[0]*v+l[0],-c[1]*y+l[1]],f=c[0]>.8?"right":c[0]<-.8?"left":"center",p=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":d=[v*S+l[0],l[1]+w],f=h[0]<0?"right":"left",g=[-v*S,-w];break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":d=[b[0],b[1]+w],f="center",g=[0,-w];break;case"insideEndTop":case"insideEnd":case"insideEndBottom":d=[-v*S+u[0],u[1]+w],f=h[0]>=0?"right":"left",g=[v*S,-w]}i.attr({style:{textVerticalAlign:i.__verticalAlign||p,textAlign:i.__textAlign||f},position:d,scale:[a,a],origin:g})}}}},cC._createLine=function(e,t,n){var i=e.hostModel,a=function(e){var t=new iC({name:"line",subPixelOptimize:!0});return lC(t.shape,e),t}(e.getItemLayout(t));a.shape.percent=0,rh.initProps(a,{shape:{percent:1}},i,t),this.add(a);var r=new rh.Text({name:"label",lineLabelOriginalOpacity:1});this.add(r),Ge.each(rC,(function(n){var i=sC(n,e,t);this.add(i),this[oC(n)]=e.getItemVisual(t,n)}),this),this._updateCommonStl(e,t,n)},cC.updateData=function(e,t,n){var i=e.hostModel,a=this.childOfName("line"),r=e.getItemLayout(t),o={shape:{}};lC(o.shape,r),rh.updateProps(a,o,i,t),Ge.each(rC,(function(n){var i=e.getItemVisual(t,n),a=oC(n);if(this[a]!==i){this.remove(this.childOfName(n));var r=sC(n,e,t);this.add(r)}this[a]=i}),this),this._updateCommonStl(e,t,n)},cC._updateCommonStl=function(e,t,n){var i=e.hostModel,a=this.childOfName("line"),r=n&&n.lineStyle,o=n&&n.hoverLineStyle,s=n&&n.labelModel,l=n&&n.hoverLabelModel;if(!n||e.hasItemOption){var u=e.getItemModel(t);r=u.getModel("lineStyle").getLineStyle(),o=u.getModel("emphasis.lineStyle").getLineStyle(),s=u.getModel("label"),l=u.getModel("emphasis.label")}var c=e.getItemVisual(t,"color"),h=Ge.retrieve3(e.getItemVisual(t,"opacity"),r.opacity,1);a.useStyle(Ge.defaults({strokeNoScale:!0,fill:"none",stroke:c,opacity:h},r)),a.hoverStyle=o,Ge.each(rC,(function(e){var t=this.childOfName(e);t&&(t.setColor(c),t.setStyle({opacity:h}))}),this);var d,f,p=s.getShallow("show"),g=l.getShallow("show"),m=this.childOfName("label");if((p||g)&&(d=c||"#000",null==(f=i.getFormattedLabel(t,"normal",e.dataType)))){var v=i.getRawValue(t);f=null==v?e.getName(t):isFinite(v)?aC(v):v}var y=p?f:null,_=g?Ge.retrieve2(i.getFormattedLabel(t,"emphasis",e.dataType),f):null,x=m.style;if(null!=y||null!=_){rh.setTextStyle(m.style,s,{text:y},{autoColor:d}),m.__textAlign=x.textAlign,m.__verticalAlign=x.textVerticalAlign,m.__position=s.get("position")||"middle";var b=s.get("distance");Ge.isArray(b)||(b=[b,b]),m.__labelDistance=b}m.hoverStyle=null!=_?{text:_,textFill:l.getTextColor(!0),fontStyle:l.getShallow("fontStyle"),fontWeight:l.getShallow("fontWeight"),fontSize:l.getShallow("fontSize"),fontFamily:l.getShallow("fontFamily")}:{text:null},m.ignore=!p&&!g,rh.setHoverStyle(this)},cC.highlight=function(){this.trigger("emphasis")},cC.downplay=function(){this.trigger("normal")},cC.updateLayout=function(e,t){this.setLinePoints(e.getItemLayout(t))},cC.setLinePoints=function(e){var t=this.childOfName("line");lC(t.shape,e),t.dirty()},Ge.inherits(uC,rh.Group);var hC=uC;function dC(e){this._ctor=e||hC,this.group=new rh.Group}var fC=dC.prototype;function pC(e){var t=e.hostModel;return{lineStyle:t.getModel("lineStyle").getLineStyle(),hoverLineStyle:t.getModel("emphasis.lineStyle").getLineStyle(),labelModel:t.getModel("label"),hoverLabelModel:t.getModel("emphasis.label")}}function gC(e){return isNaN(e[0])||isNaN(e[1])}function mC(e){return!gC(e[0])&&!gC(e[1])}fC.isPersistent=function(){return!0},fC.updateData=function(e){var t=this,n=t.group,i=t._lineData;t._lineData=e,i||n.removeAll();var a=pC(e);e.diff(i).add((function(n){!function(e,t,n,i){var a=t.getItemLayout(n);if(!mC(a))return;var r=new e._ctor(t,n,i);t.setItemGraphicEl(n,r),e.group.add(r)}(t,e,n,a)})).update((function(n,r){!function(e,t,n,i,a,r){var o=t.getItemGraphicEl(i);if(!mC(n.getItemLayout(a)))return void e.group.remove(o);o?o.updateData(n,a,r):o=new e._ctor(n,a,r);n.setItemGraphicEl(a,o),e.group.add(o)}(t,i,e,r,n,a)})).remove((function(e){n.remove(i.getItemGraphicEl(e))})).execute()},fC.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl((function(t,n){t.updateLayout(e,n)}),this)},fC.incrementalPrepareUpdate=function(e){this._seriesScope=pC(e),this._lineData=null,this.group.removeAll()},fC.incrementalUpdate=function(e,t){function n(e){e.isGroup||function(e){return e.animators&&e.animators.length>0}(e)||(e.incremental=e.useHoverLayer=!0)}for(var i=e.start;i<e.end;i++){if(mC(t.getItemLayout(i))){var a=new this._ctor(t,i,this._seriesScope);a.traverse(n),this.group.add(a),t.setItemGraphicEl(i,a)}}},fC.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},fC._clearIncremental=function(){var e=this._incremental;e&&e.clearDisplaybles()};var vC=dC;var yC={getNodeGlobalScale:function(e){var t=e.coordinateSystem;if("view"!==t.type)return 1;var n=e.option.nodeScaleRatio,i=t.scale,a=i&&i[0]||1;return((t.getZoom()-1)*n+1)/a},getSymbolSize:function(e){var t=e.getVisual("symbolSize");return t instanceof Array&&(t=(t[0]+t[1])/2),+t}},_C=yC.getSymbolSize,xC=[],bC=[],wC=[],SC=ws.quadraticAt,MC=dt.distSquare,TC=Math.abs;function IC(e,t,n){for(var i,a=e[0],r=e[1],o=e[2],s=1/0,l=n*n,u=.1,c=.1;c<=.9;c+=.1){xC[0]=SC(a[0],r[0],o[0],c),xC[1]=SC(a[1],r[1],o[1],c),(f=TC(MC(xC,t)-l))<s&&(s=f,i=c)}for(var h=0;h<32;h++){var d=i+u;bC[0]=SC(a[0],r[0],o[0],i),bC[1]=SC(a[1],r[1],o[1],i),wC[0]=SC(a[0],r[0],o[0],d),wC[1]=SC(a[1],r[1],o[1],d);var f=MC(bC,t)-l;if(TC(f)<.01)break;var p=MC(wC,t)-l;u/=2,f<0?p>=0?i+=u:i-=u:p>=0?i-=u:i+=u}return i}var AC=function(e,t){var n=[],i=ws.quadraticSubdivide,a=[[],[],[]],r=[[],[]],o=[];t/=2,e.eachEdge((function(e,s){var l=e.getLayout(),u=e.getVisual("fromSymbol"),c=e.getVisual("toSymbol");l.__original||(l.__original=[dt.clone(l[0]),dt.clone(l[1])],l[2]&&l.__original.push(dt.clone(l[2])));var h=l.__original;if(null!=l[2]){if(dt.copy(a[0],h[0]),dt.copy(a[1],h[2]),dt.copy(a[2],h[1]),u&&"none"!==u){var d=_C(e.node1),f=IC(a,h[0],d*t);i(a[0][0],a[1][0],a[2][0],f,n),a[0][0]=n[3],a[1][0]=n[4],i(a[0][1],a[1][1],a[2][1],f,n),a[0][1]=n[3],a[1][1]=n[4]}if(c&&"none"!==c){d=_C(e.node2),f=IC(a,h[1],d*t);i(a[0][0],a[1][0],a[2][0],f,n),a[1][0]=n[1],a[2][0]=n[2],i(a[0][1],a[1][1],a[2][1],f,n),a[1][1]=n[1],a[2][1]=n[2]}dt.copy(l[0],a[0]),dt.copy(l[1],a[2]),dt.copy(l[2],a[1])}else{if(dt.copy(r[0],h[0]),dt.copy(r[1],h[1]),dt.sub(o,r[1],r[0]),dt.normalize(o,o),u&&"none"!==u){d=_C(e.node1);dt.scaleAndAdd(r[0],r[0],o,d*t)}if(c&&"none"!==c){d=_C(e.node2);dt.scaleAndAdd(r[1],r[1],o,-d*t)}dt.copy(l[0],r[0]),dt.copy(l[1],r[1])}}))},DC=iI.onIrrelevantElement,CC=yC.getNodeGlobalScale,OC="__focusNodeAdjacency",kC="__unfocusNodeAdjacency",LC=["itemStyle","opacity"],EC=["lineStyle","opacity"];function NC(e,t){var n=e.getVisual("opacity");return null!=n?n:e.getModel().get(t)}function PC(e,t,n){var i=e.getGraphicEl(),a=NC(e,t);null!=n&&(null==a&&(a=1),a*=n),i.downplay&&i.downplay(),i.traverse((function(e){if(!e.isGroup){var t=e.lineLabelOriginalOpacity;null!=t&&null==n||(t=a),e.setStyle("opacity",t)}}))}function RC(e,t){var n=NC(e,t),i=e.getGraphicEl();i.traverse((function(e){!e.isGroup&&e.setStyle("opacity",n)})),i.highlight&&i.highlight()}Qx.extendChartView({type:"graph",init:function(e,t){var n=new wb,i=new vC,a=this.group;this._controller=new QT(t.getZr()),this._controllerHost={target:a},a.add(n.group),a.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},render:function(e,t,n){var i=this,a=e.coordinateSystem;this._model=e;var r=this._symbolDraw,o=this._lineDraw,s=this.group;if("view"===a.type){var l={position:a.position,scale:a.scale};this._firstRender?s.attr(l):rh.updateProps(s,l,e)}AC(e.getGraph(),CC(e));var u=e.getData();r.updateData(u);var c=e.getEdgeData();o.updateData(c),this._updateNodeAndLinkScale(),this._updateController(e,t,n),clearTimeout(this._layoutTimeout);var h=e.forceLayout,d=e.get("force.layoutAnimation");h&&this._startForceLayoutIteration(h,d),u.eachItemGraphicEl((function(t,a){var r=u.getItemModel(a);t.off("drag").off("dragend");var o=r.get("draggable");o&&t.on("drag",(function(){h&&(h.warmUp(),!this._layouting&&this._startForceLayoutIteration(h,d),h.setFixed(a),u.setItemLayout(a,t.position))}),this).on("dragend",(function(){h&&h.setUnfixed(a)}),this),t.setDraggable(o&&h),t[OC]&&t.off("mouseover",t[OC]),t[kC]&&t.off("mouseout",t[kC]),r.get("focusNodeAdjacency")&&(t.on("mouseover",t[OC]=function(){i._clearTimer(),n.dispatchAction({type:"focusNodeAdjacency",seriesId:e.id,dataIndex:t.dataIndex})}),t.on("mouseout",t[kC]=function(){i._dispatchUnfocus(n)}))}),this),u.graph.eachEdge((function(t){var a=t.getGraphicEl();a[OC]&&a.off("mouseover",a[OC]),a[kC]&&a.off("mouseout",a[kC]),t.getModel().get("focusNodeAdjacency")&&(a.on("mouseover",a[OC]=function(){i._clearTimer(),n.dispatchAction({type:"focusNodeAdjacency",seriesId:e.id,edgeDataIndex:t.dataIndex})}),a.on("mouseout",a[kC]=function(){i._dispatchUnfocus(n)}))}));var f="circular"===e.get("layout")&&e.get("circular.rotateLabel"),p=u.getLayout("cx"),g=u.getLayout("cy");u.eachItemGraphicEl((function(e,t){var n=u.getItemModel(t).get("label.rotate")||0,i=e.getSymbolPath();if(f){var a=u.getItemLayout(t),r=Math.atan2(a[1]-g,a[0]-p);r<0&&(r=2*Math.PI+r);var o=a[0]<p;o&&(r-=Math.PI);var s=o?"left":"right";rh.modifyLabelStyle(i,{textRotation:-r,textPosition:s,textOrigin:"center"},{textPosition:s})}else rh.modifyLabelStyle(i,{textRotation:n*=Math.PI/180})})),this._firstRender=!1},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={},this._clearTimer()},_dispatchUnfocus:function(e,t){var n=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout((function(){n._unfocusDelayTimer=null,e.dispatchAction({type:"unfocusNodeAdjacency",seriesId:n._model.id})}),500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(e,t,n,i){var a=e.getData().graph,r=i.dataIndex,o=i.edgeDataIndex,s=a.getNodeByIndex(r),l=a.getEdgeByIndex(o);(s||l)&&(a.eachNode((function(e){PC(e,LC,.1)})),a.eachEdge((function(e){PC(e,EC,.1)})),s&&(RC(s,LC),Ge.each(s.edges,(function(e){e.dataIndex<0||(RC(e,EC),RC(e.node1,LC),RC(e.node2,LC))}))),l&&(RC(l,EC),RC(l.node1,LC),RC(l.node2,LC)))},unfocusNodeAdjacency:function(e,t,n,i){var a=e.getData().graph;a.eachNode((function(e){PC(e,LC)})),a.eachEdge((function(e){PC(e,EC)}))},_startForceLayoutIteration:function(e,t){var n=this;!function i(){e.step((function(e){n.updateLayout(n._model),(n._layouting=!e)&&(t?n._layoutTimeout=setTimeout(i,16):i())}))}()},_updateController:function(e,t,n){var i=this._controller,a=this._controllerHost,r=this.group;i.setPointerChecker((function(t,i,a){var o=r.getBoundingRect();return o.applyTransform(r.transform),o.contain(i,a)&&!DC(t,n,e)})),"view"===e.coordinateSystem.type?(i.enable(e.get("roam")),a.zoomLimit=e.get("scaleLimit"),a.zoom=e.coordinateSystem.getZoom(),i.off("pan").off("zoom").on("pan",(function(t){eI.updateViewOnPan(a,t.dx,t.dy),n.dispatchAction({seriesId:e.id,type:"graphRoam",dx:t.dx,dy:t.dy})})).on("zoom",(function(t){eI.updateViewOnZoom(a,t.scale,t.originX,t.originY),n.dispatchAction({seriesId:e.id,type:"graphRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),this._updateNodeAndLinkScale(),AC(e.getGraph(),CC(e)),this._lineDraw.updateLayout()}),this)):i.disable()},_updateNodeAndLinkScale:function(){var e=this._model,t=e.getData(),n=CC(e),i=[n,n];t.eachItemGraphicEl((function(e,t){e.attr("scale",i)}))},updateLayout:function(e){AC(e.getGraph(),CC(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},remove:function(e,t){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()}}),Qx.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},(function(){})),Qx.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},(function(){}));var zC=gI.updateCenterAndZoom;Qx.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},(function(e,t){t.eachComponent({mainType:"series",query:e},(function(t){var n=t.coordinateSystem,i=zC(n,e);t.setCenter&&t.setCenter(i.center),t.setZoom&&t.setZoom(i.zoom)}))}));var BC=function(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.eachSeriesByType("graph",(function(e){var n=e.getCategoriesData(),i=e.getGraph().data,a=n.mapArray(n.getName);i.filterSelf((function(e){var n=i.getItemModel(e).getShallow("category");if(null!=n){"number"==typeof n&&(n=a[n]);for(var r=0;r<t.length;r++)if(!t[r].isSelected(n))return!1}return!0}))}),this)};var VC=function(e){var t={};e.eachSeriesByType("graph",(function(e){var n=e.getCategoriesData(),i=e.getData(),a={};n.each((function(i){var r=n.getName(i);a["ec-"+r]=i;var o=n.getItemModel(i),s=o.get("itemStyle.color")||e.getColorFromPalette(r,t);n.setItemVisual(i,"color",s);for(var l=["opacity","symbol","symbolSize","symbolKeepAspect"],u=0;u<l.length;u++){var c=o.getShallow(l[u],!0);null!=c&&n.setItemVisual(i,l[u],c)}})),n.count()&&i.each((function(e){var t=i.getItemModel(e).getShallow("category");if(null!=t){"string"==typeof t&&(t=a["ec-"+t]);for(var r=["color","opacity","symbol","symbolSize","symbolKeepAspect"],o=0;o<r.length;o++)null==i.getItemVisual(e,r[o],!0)&&i.setItemVisual(e,r[o],n.getItemVisual(t,r[o]))}}))}))};function HC(e){return e instanceof Array||(e=[e,e]),e}var YC=function(e){e.eachSeriesByType("graph",(function(e){var t=e.getGraph(),n=e.getEdgeData(),i=HC(e.get("edgeSymbol")),a=HC(e.get("edgeSymbolSize")),r="lineStyle.color".split("."),o="lineStyle.opacity".split(".");n.setVisual("fromSymbol",i&&i[0]),n.setVisual("toSymbol",i&&i[1]),n.setVisual("fromSymbolSize",a&&a[0]),n.setVisual("toSymbolSize",a&&a[1]),n.setVisual("color",e.get(r)),n.setVisual("opacity",e.get(o)),n.each((function(e){var i=n.getItemModel(e),a=t.getEdgeByIndex(e),s=HC(i.getShallow("symbol",!0)),l=HC(i.getShallow("symbolSize",!0)),u=i.get(r),c=i.get(o);switch(u){case"source":u=a.node1.getVisual("color");break;case"target":u=a.node2.getVisual("color")}s[0]&&a.setVisual("fromSymbol",s[0]),s[1]&&a.setVisual("toSymbol",s[1]),l[0]&&a.setVisual("fromSymbolSize",l[0]),l[1]&&a.setVisual("toSymbolSize",l[1]),a.setVisual("color",u),a.setVisual("opacity",c)}))}))};function FC(e){e.eachEdge((function(e){var t=e.getModel().get("lineStyle.curveness")||0,n=dt.clone(e.node1.getLayout()),i=dt.clone(e.node2.getLayout()),a=[n,i];+t&&a.push([(n[0]+i[0])/2-(n[1]-i[1])*t,(n[1]+i[1])/2-(i[0]-n[0])*t]),e.setLayout(a)}))}var GC=function(e){var t=e.coordinateSystem;if(!t||"view"===t.type){var n=e.getGraph();n.eachNode((function(e){var t=e.getModel();e.setLayout([+t.get("x"),+t.get("y")])})),FC(n)}},WC={simpleLayout:GC,simpleLayoutEdge:FC},jC=Ge.each,UC=WC.simpleLayout,ZC=WC.simpleLayoutEdge;var XC=function(e,t){e.eachSeriesByType("graph",(function(e){var t=e.get("layout"),n=e.coordinateSystem;if(n&&"view"!==n.type){var i=e.getData(),a=[];jC(n.dimensions,(function(e){a=a.concat(i.mapDimension(e,!0))}));for(var r=0;r<i.count();r++){for(var o=[],s=!1,l=0;l<a.length;l++){var u=i.get(a[l],r);isNaN(u)||(s=!0),o.push(u)}s?i.setItemLayout(r,n.dataToPoint(o)):i.setItemLayout(r,[NaN,NaN])}ZC(i.graph)}else t&&"none"!==t||UC(e)}))},qC=yC.getSymbolSize,KC=yC.getNodeGlobalScale,$C=Math.PI,QC=[];var JC={value:function(e,t,n,i,a,r,o,s){var l=0,u=i.getSum("value"),c=2*Math.PI/(u||s);n.eachNode((function(e){var t=e.getValue("value"),n=c*(u?t:1)/2;l+=n,e.setLayout([a*Math.cos(l)+r,a*Math.sin(l)+o]),l+=n}))},symbolSize:function(e,t,n,i,a,r,o,s){var l=0;QC.length=s;var u=KC(e);n.eachNode((function(e){var t=qC(e);isNaN(t)&&(t=2),t<0&&(t=0),t*=u;var n=Math.asin(t/2/a);isNaN(n)&&(n=$C/2),QC[e.dataIndex]=n,l+=2*n}));var c=(2*$C-l)/s/2,h=0;n.eachNode((function(e){var t=c+QC[e.dataIndex];h+=t,e.setLayout([a*Math.cos(h)+r,a*Math.sin(h)+o]),h+=t}))}},eO=function(e,t){var n=e.coordinateSystem;if(!n||"view"===n.type){var i=n.getBoundingRect(),a=e.getData(),r=a.graph,o=i.width/2+i.x,s=i.height/2+i.y,l=Math.min(i.width,i.height)/2,u=a.count();a.setLayout({cx:o,cy:s}),u&&(JC[t](e,n,r,a,l,o,s,u),r.eachEdge((function(e){var t,n=e.getModel().get("lineStyle.curveness")||0,i=dt.clone(e.node1.getLayout()),a=dt.clone(e.node2.getLayout()),r=(i[0]+a[0])/2,l=(i[1]+a[1])/2;+n&&(t=[o*(n*=3)+r*(1-n),s*n+l*(1-n)]),e.setLayout([i,a,t])})))}},tO={circularLayout:eO},nO=tO.circularLayout;var iO=function(e){e.eachSeriesByType("graph",(function(e){"circular"===e.get("layout")&&nO(e,"symbolSize")}))},aO=dt.scaleAndAdd;var rO=function(e,t,n){for(var i=n.rect,a=i.width,r=i.height,o=[i.x+a/2,i.y+r/2],s=null==n.gravity?.1:n.gravity,l=0;l<e.length;l++){var u=e[l];u.p||(u.p=dt.create(a*(Math.random()-.5)+o[0],r*(Math.random()-.5)+o[1])),u.pp=dt.clone(u.p),u.edges=null}var c=null==n.friction?.6:n.friction,h=c;return{warmUp:function(){h=.8*c},setFixed:function(t){e[t].fixed=!0},setUnfixed:function(t){e[t].fixed=!1},step:function(n){for(var i=[],a=e.length,r=0;r<t.length;r++){var l=t[r];if(!l.ignoreForceLayout){var u=l.n1,c=l.n2;dt.sub(i,c.p,u.p);var d=dt.len(i)-l.d,f=c.w/(u.w+c.w);isNaN(f)&&(f=0),dt.normalize(i,i),!u.fixed&&aO(u.p,u.p,i,f*d*h),!c.fixed&&aO(c.p,c.p,i,-(1-f)*d*h)}}for(r=0;r<a;r++){(v=e[r]).fixed||(dt.sub(i,o,v.p),aO(v.p,v.p,i,s*h))}for(r=0;r<a;r++){u=e[r];for(var p=r+1;p<a;p++){c=e[p];dt.sub(i,c.p,u.p),0===(d=dt.len(i))&&(dt.set(i,Math.random()-.5,Math.random()-.5),d=1);var g=(u.rep+c.rep)/d/d;!u.fixed&&aO(u.pp,u.pp,i,g),!c.fixed&&aO(c.pp,c.pp,i,-g)}}var m=[];for(r=0;r<a;r++){var v;(v=e[r]).fixed||(dt.sub(m,v.p,v.pp),aO(v.p,v.p,m,h),dt.copy(v.pp,v.p))}h*=.992,n&&n(e,t,h<.01)}}},oO={forceLayout:rO}.forceLayout,sO=WC.simpleLayout,lO=tO.circularLayout,uO=Ph.linearMap;var cO=function(e){e.eachSeriesByType("graph",(function(e){if(!(h=e.coordinateSystem)||"view"===h.type)if("force"===e.get("layout")){var t=e.preservedPoints||{},n=e.getGraph(),i=n.data,a=n.edgeData,r=e.getModel("force"),o=r.get("initLayout");e.preservedPoints?i.each((function(e){var n=i.getId(e);i.setItemLayout(e,t[n]||[NaN,NaN])})):o&&"none"!==o?"circular"===o&&lO(e,"value"):sO(e);var s=i.getDataExtent("value"),l=a.getDataExtent("value"),u=r.get("repulsion"),c=r.get("edgeLength");Ge.isArray(u)||(u=[u,u]),Ge.isArray(c)||(c=[c,c]),c=[c[1],c[0]];var h,d=i.mapArray("value",(function(e,t){var n=i.getItemLayout(t),a=uO(e,s,u);return isNaN(a)&&(a=(u[0]+u[1])/2),{w:a,rep:a,fixed:i.getItemModel(t).get("fixed"),p:!n||isNaN(n[0])||isNaN(n[1])?null:n}})),f=a.mapArray("value",(function(e,t){var i=n.getEdgeByIndex(t),a=uO(e,l,c);isNaN(a)&&(a=(c[0]+c[1])/2);var r=i.getModel();return{n1:d[i.node1.dataIndex],n2:d[i.node2.dataIndex],d:a,curveness:r.get("lineStyle.curveness")||0,ignoreForceLayout:r.get("ignoreForceLayout")}})),p=(h=e.coordinateSystem).getBoundingRect(),g=oO(d,f,{rect:p,gravity:r.get("gravity"),friction:r.get("friction")}),m=g.step;g.step=function(e){for(var a=0,r=d.length;a<r;a++)d[a].fixed&&dt.copy(d[a].p,n.getNodeByIndex(a).getLayout());m((function(a,r,o){for(var s=0,l=a.length;s<l;s++)a[s].fixed||n.getNodeByIndex(s).setLayout(a[s].p),t[i.getId(s)]=a[s].p;for(s=0,l=r.length;s<l;s++){var u=r[s],c=n.getEdgeByIndex(s),h=u.n1.p,d=u.n2.p,f=c.getLayout();(f=f?f.slice():[])[0]=f[0]||[],f[1]=f[1]||[],dt.copy(f[0],h),dt.copy(f[1],d),+u.curveness&&(f[2]=[(h[0]+d[0])/2-(h[1]-d[1])*u.curveness,(h[1]+d[1])/2-(d[0]-h[0])*u.curveness]),c.setLayout(f)}e&&e(o)}))},e.forceLayout=g,e.preservedPoints=t,g.step()}else e.forceLayout=null}))},hO=sd.getLayoutRect;var dO=function(e,t){var n=[];return e.eachSeriesByType("graph",(function(e){var i=e.get("coordinateSystem");if(!i||"view"===i){var a=e.getData(),r=a.mapArray((function(e){var t=a.getItemModel(e);return[+t.get("x"),+t.get("y")]})),o=[],s=[];Bs.fromPoints(r,o,s),s[0]-o[0]==0&&(s[0]+=1,o[0]-=1),s[1]-o[1]==0&&(s[1]+=1,o[1]-=1);var l=(s[0]-o[0])/(s[1]-o[1]),u=function(e,t,n){var i=e.getBoxLayoutParams();return i.aspect=n,hO(i,{width:t.getWidth(),height:t.getHeight()})}(e,t,l);isNaN(l)&&(o=[u.x,u.y],s=[u.x+u.width,u.y+u.height]);var c=s[0]-o[0],h=s[1]-o[1],d=u.width,f=u.height,p=e.coordinateSystem=new bI;p.zoomLimit=e.get("scaleLimit"),p.setBoundingRect(o[0],o[1],c,h),p.setViewRect(u.x,u.y,d,f),p.setCenter(e.get("center")),p.setZoom(e.get("zoom")),n.push(p)}})),n};Qx.registerProcessor(BC),Qx.registerVisual(lw("graph","circle",null)),Qx.registerVisual(VC),Qx.registerVisual(YC),Qx.registerLayout(XC),Qx.registerLayout(Qx.PRIORITY.VISUAL.POST_CHART_LAYOUT,iO),Qx.registerLayout(cO),Qx.registerCoordinateSystem("graphView",{create:dO}),cg.extend({type:"series.gauge",getInitialData:function(e,t){return mM(this,["value"])},defaultOption:{zlevel:0,z:2,center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,lineStyle:{color:[[.2,"#91c7ae"],[.8,"#63869e"],[1,"#c23531"]],width:30}},splitLine:{show:!0,length:30,lineStyle:{color:"#eee",width:2,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:8,lineStyle:{color:"#eee",width:1,type:"solid"}},axisLabel:{show:!0,distance:5,color:"auto"},pointer:{show:!0,length:"80%",width:8},itemStyle:{color:"auto"},title:{show:!0,offsetCenter:[0,"-40%"],color:"#333",fontSize:15},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"auto",fontSize:30}}});var fO=Tl.extend({type:"echartsGaugePointer",shape:{angle:0,width:10,r:10,x:0,y:0},buildPath:function(e,t){var n=Math.cos,i=Math.sin,a=t.r,r=t.width,o=t.angle,s=t.x-n(o)*r*(r>=a/3?1:2),l=t.y-i(o)*r*(r>=a/3?1:2);o=t.angle-Math.PI/2,e.moveTo(s,l),e.lineTo(t.x+n(o)*r,t.y+i(o)*r),e.lineTo(t.x+n(t.angle)*a,t.y+i(t.angle)*a),e.lineTo(t.x-n(o)*r,t.y-i(o)*r),e.lineTo(s,l)}}),pO=fO,gO=Ph.parsePercent,mO=Ph.round,vO=Ph.linearMap;function yO(e,t){return t&&("string"==typeof t?e=t.replace("{value}",null!=e?e:""):"function"==typeof t&&(e=t(e))),e}var _O=2*Math.PI;Ag.extend({type:"gauge",render:function(e,t,n){this.group.removeAll();var i=e.get("axisLine.lineStyle.color"),a=function(e,t){var n=e.get("center"),i=t.getWidth(),a=t.getHeight(),r=Math.min(i,a);return{cx:gO(n[0],t.getWidth()),cy:gO(n[1],t.getHeight()),r:gO(e.get("radius"),r/2)}}(e,n);this._renderMain(e,t,n,i,a)},dispose:function(){},_renderMain:function(e,t,n,i,a){for(var r=this.group,o=e.getModel("axisLine"),s=o.getModel("lineStyle"),l=e.get("clockwise"),u=-e.get("startAngle")/180*Math.PI,c=((g=-e.get("endAngle")/180*Math.PI)-u)%_O,h=u,d=s.get("width"),f=o.get("show"),p=0;f&&p<i.length;p++){var g=u+c*Math.min(Math.max(i[p][0],0),1),m=new rh.Sector({shape:{startAngle:h,endAngle:g,cx:a.cx,cy:a.cy,clockwise:l,r0:a.r-d,r:a.r},silent:!0});m.setStyle({fill:i[p][1]}),m.setStyle(s.getLineStyle(["color","borderWidth","borderColor"])),r.add(m),h=g}var v=function(e){if(e<=0)return i[0][1];for(var t=0;t<i.length;t++)if(i[t][0]>=e&&(0===t?0:i[t-1][0])<e)return i[t][1];return i[t-1][1]};if(!l){var y=u;u=g,g=y}this._renderTicks(e,t,n,v,a,u,g,l),this._renderPointer(e,t,n,v,a,u,g,l),this._renderTitle(e,t,n,v,a),this._renderDetail(e,t,n,v,a)},_renderTicks:function(e,t,n,i,a,r,o,s){for(var l=this.group,u=a.cx,c=a.cy,h=a.r,d=+e.get("min"),f=+e.get("max"),p=e.getModel("splitLine"),g=e.getModel("axisTick"),m=e.getModel("axisLabel"),v=e.get("splitNumber"),y=g.get("splitNumber"),_=gO(p.get("length"),h),x=gO(g.get("length"),h),b=r,w=(o-r)/v,S=w/y,M=p.getModel("lineStyle").getLineStyle(),T=g.getModel("lineStyle").getLineStyle(),I=0;I<=v;I++){var A=Math.cos(b),D=Math.sin(b);if(p.get("show")){var C=new rh.Line({shape:{x1:A*h+u,y1:D*h+c,x2:A*(h-_)+u,y2:D*(h-_)+c},style:M,silent:!0});"auto"===M.stroke&&C.setStyle({stroke:i(I/v)}),l.add(C)}if(m.get("show")){var O=yO(mO(I/v*(f-d)+d),m.get("formatter")),k=m.get("distance"),L=i(I/v);l.add(new rh.Text({style:rh.setTextStyle({},m,{text:O,x:A*(h-_-k)+u,y:D*(h-_-k)+c,textVerticalAlign:D<-.4?"top":D>.4?"bottom":"middle",textAlign:A<-.4?"left":A>.4?"right":"center"},{autoColor:L}),silent:!0}))}if(g.get("show")&&I!==v){for(var E=0;E<=y;E++){A=Math.cos(b),D=Math.sin(b);var N=new rh.Line({shape:{x1:A*h+u,y1:D*h+c,x2:A*(h-x)+u,y2:D*(h-x)+c},silent:!0,style:T});"auto"===T.stroke&&N.setStyle({stroke:i((I+E/y)/v)}),l.add(N),b+=S}b-=S}else b+=w}},_renderPointer:function(e,t,n,i,a,r,o,s){var l=this.group,u=this._data;if(e.get("pointer.show")){var c=[+e.get("min"),+e.get("max")],h=[r,o],d=e.getData(),f=d.mapDimension("value");d.diff(u).add((function(t){var n=new pO({shape:{angle:r}});rh.initProps(n,{shape:{angle:vO(d.get(f,t),c,h,!0)}},e),l.add(n),d.setItemGraphicEl(t,n)})).update((function(t,n){var i=u.getItemGraphicEl(n);rh.updateProps(i,{shape:{angle:vO(d.get(f,t),c,h,!0)}},e),l.add(i),d.setItemGraphicEl(t,i)})).remove((function(e){var t=u.getItemGraphicEl(e);l.remove(t)})).execute(),d.eachItemGraphicEl((function(e,t){var n=d.getItemModel(t),r=n.getModel("pointer");e.setShape({x:a.cx,y:a.cy,width:gO(r.get("width"),a.r),r:gO(r.get("length"),a.r)}),e.useStyle(n.getModel("itemStyle").getItemStyle()),"auto"===e.style.fill&&e.setStyle("fill",i(vO(d.get(f,t),c,[0,1],!0))),rh.setHoverStyle(e,n.getModel("emphasis.itemStyle").getItemStyle())})),this._data=d}else u&&u.eachItemGraphicEl((function(e){l.remove(e)}))},_renderTitle:function(e,t,n,i,a){var r=e.getData(),o=r.mapDimension("value"),s=e.getModel("title");if(s.get("show")){var l=s.get("offsetCenter"),u=a.cx+gO(l[0],a.r),c=a.cy+gO(l[1],a.r),h=+e.get("min"),d=+e.get("max"),f=e.getData().get(o,0),p=i(vO(f,[h,d],[0,1],!0));this.group.add(new rh.Text({silent:!0,style:rh.setTextStyle({},s,{x:u,y:c,text:r.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:p,forceRich:!0})}))}},_renderDetail:function(e,t,n,i,a){var r=e.getModel("detail"),o=+e.get("min"),s=+e.get("max");if(r.get("show")){var l=r.get("offsetCenter"),u=a.cx+gO(l[0],a.r),c=a.cy+gO(l[1],a.r),h=gO(r.get("width"),a.r),d=gO(r.get("height"),a.r),f=e.getData(),p=f.get(f.mapDimension("value"),0),g=i(vO(p,[o,s],[0,1],!0));this.group.add(new rh.Text({silent:!0,style:rh.setTextStyle({},r,{x:u,y:c,text:yO(p,r.get("formatter")),textWidth:isNaN(h)?null:h,textHeight:isNaN(d)?null:d,textAlign:"center",textVerticalAlign:"middle"},{autoColor:g,forceRich:!0})}))}}});var xO=Bo.defaultEmphasis,bO=of.makeSeriesEncodeForNameBased,wO=Qx.extendSeriesModel({type:"series.funnel",init:function(e){wO.superApply(this,"init",arguments),this.legendVisualProvider=new yM(Ge.bind(this.getData,this),Ge.bind(this.getRawData,this)),this._defaultLabelLine(e)},getInitialData:function(e,t){return mM(this,{coordDimensions:["value"],encodeDefaulter:Ge.curry(bO,this)})},_defaultLabelLine:function(e){xO(e,"labelLine",["show"]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},getDataParams:function(e){var t=this.getData(),n=wO.superCall(this,"getDataParams",e),i=t.mapDimension("value"),a=t.getSum(i);return n.percent=a?+(t.get(i,e)/a*100).toFixed(2):0,n.$vars.push("percent"),n},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}}}});function SO(e,t){rh.Group.call(this);var n=new rh.Polygon,i=new rh.Polyline,a=new rh.Text;this.add(n),this.add(i),this.add(a),this.highDownOnUpdate=function(e,t){"emphasis"===t?(i.ignore=i.hoverIgnore,a.ignore=a.hoverIgnore):(i.ignore=i.normalIgnore,a.ignore=a.normalIgnore)},this.updateData(e,t,!0)}var MO=SO.prototype,TO=["itemStyle","opacity"];MO.updateData=function(e,t,n){var i=this.childAt(0),a=e.hostModel,r=e.getItemModel(t),o=e.getItemLayout(t),s=e.getItemModel(t).get(TO);s=null==s?1:s,i.useStyle({}),n?(i.setShape({points:o.points}),i.setStyle({opacity:0}),rh.initProps(i,{style:{opacity:s}},a,t)):rh.updateProps(i,{style:{opacity:s},shape:{points:o.points}},a,t);var l=r.getModel("itemStyle"),u=e.getItemVisual(t,"color");i.setStyle(Ge.defaults({lineJoin:"round",fill:u},l.getItemStyle(["opacity"]))),i.hoverStyle=l.getModel("emphasis").getItemStyle(),this._updateLabel(e,t),rh.setHoverStyle(this)},MO._updateLabel=function(e,t){var n=this.childAt(1),i=this.childAt(2),a=e.hostModel,r=e.getItemModel(t),o=e.getItemLayout(t).label,s=e.getItemVisual(t,"color");rh.updateProps(n,{shape:{points:o.linePoints||o.linePoints}},a,t),rh.updateProps(i,{style:{x:o.x,y:o.y}},a,t),i.attr({rotation:o.rotation,origin:[o.x,o.y],z2:10});var l=r.getModel("label"),u=r.getModel("emphasis.label"),c=r.getModel("labelLine"),h=r.getModel("emphasis.labelLine");s=e.getItemVisual(t,"color");rh.setLabelStyle(i.style,i.hoverStyle={},l,u,{labelFetcher:e.hostModel,labelDataIndex:t,defaultText:e.getName(t),autoColor:s,useInsideStyle:!!o.inside},{textAlign:o.textAlign,textVerticalAlign:o.verticalAlign}),i.ignore=i.normalIgnore=!l.get("show"),i.hoverIgnore=!u.get("show"),n.ignore=n.normalIgnore=!c.get("show"),n.hoverIgnore=!h.get("show"),n.setStyle({stroke:s}),n.setStyle(c.getModel("lineStyle").getLineStyle()),n.hoverStyle=h.getModel("lineStyle").getLineStyle()},Ge.inherits(SO,rh.Group),Ag.extend({type:"funnel",render:function(e,t,n){var i=e.getData(),a=this._data,r=this.group;i.diff(a).add((function(e){var t=new SO(i,e);i.setItemGraphicEl(e,t),r.add(t)})).update((function(e,t){var n=a.getItemGraphicEl(t);n.updateData(i,e),r.add(n),i.setItemGraphicEl(e,n)})).remove((function(e){var t=a.getItemGraphicEl(e);r.remove(t)})).execute(),this._data=i},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});var IO=Ph.parsePercent,AO=Ph.linearMap;var DO=function(e,t,n){e.eachSeriesByType("funnel",(function(e){var n=e.getData(),i=n.mapDimension("value"),a=e.get("sort"),r=function(e,t){return sd.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,t),o=function(e,t){for(var n=e.mapDimension("value"),i=e.mapArray(n,(function(e){return e})),a=[],r="ascending"===t,o=0,s=e.count();o<s;o++)a[o]=o;return"function"==typeof t?a.sort(t):"none"!==t&&a.sort((function(e,t){return r?i[e]-i[t]:i[t]-i[e]})),a}(n,a),s=[IO(e.get("minSize"),r.width),IO(e.get("maxSize"),r.width)],l=n.getDataExtent(i),u=e.get("min"),c=e.get("max");null==u&&(u=Math.min(l[0],0)),null==c&&(c=l[1]);var h=e.get("funnelAlign"),d=e.get("gap"),f=(r.height-d*(n.count()-1))/n.count(),p=r.y,g=function(e,t){var a,o=n.get(i,e)||0,l=AO(o,[u,c],s,!0);switch(h){case"left":a=r.x;break;case"center":a=r.x+(r.width-l)/2;break;case"right":a=r.x+r.width-l}return[[a,t],[a+l,t]]};"ascending"===a&&(f=-f,d=-d,p+=r.height,o=o.reverse());for(var m=0;m<o.length;m++){var v=o[m],y=o[m+1],_=n.getItemModel(v).get("itemStyle.height");null==_?_=f:(_=IO(_,r.height),"ascending"===a&&(_=-_));var x=g(v,p),b=g(y,p+_);p+=_+d,n.setItemLayout(v,{points:x.concat(b.slice().reverse())})}!function(e){e.each((function(t){var n,i,a,r,o=e.getItemModel(t),s=o.getModel("label").get("position"),l=o.getModel("labelLine"),u=e.getItemLayout(t),c=u.points,h="inner"===s||"inside"===s||"center"===s||"insideLeft"===s||"insideRight"===s;if(h)"insideLeft"===s?(i=(c[0][0]+c[3][0])/2+5,a=(c[0][1]+c[3][1])/2,n="left"):"insideRight"===s?(i=(c[1][0]+c[2][0])/2-5,a=(c[1][1]+c[2][1])/2,n="right"):(i=(c[0][0]+c[1][0]+c[2][0]+c[3][0])/4,a=(c[0][1]+c[1][1]+c[2][1]+c[3][1])/4,n="center"),r=[[i,a],[i,a]];else{var d,f,p,g=l.get("length");"left"===s?(d=(c[3][0]+c[0][0])/2,f=(c[3][1]+c[0][1])/2,i=(p=d-g)-5,n="right"):"right"===s?(d=(c[1][0]+c[2][0])/2,f=(c[1][1]+c[2][1])/2,i=(p=d+g)+5,n="left"):"rightTop"===s?(d=c[1][0],f=c[1][1],i=(p=d+g)+5,n="top"):"rightBottom"===s?(d=c[2][0],f=c[2][1],i=(p=d+g)+5,n="bottom"):"leftTop"===s?(d=c[0][0],f=c[1][1],i=(p=d-g)-5,n="right"):"leftBottom"===s?(d=c[3][0],f=c[2][1],i=(p=d-g)-5,n="right"):(d=(c[1][0]+c[2][0])/2,f=(c[1][1]+c[2][1])/2,i=(p=d+g)+5,n="left"),r=[[d,f],[p,f]],a=f}u.label={linePoints:r,x:i,y:a,verticalAlign:"middle",textAlign:n,inside:h}}))}(n)}))};Qx.registerVisual(CM("funnel")),Qx.registerLayout(DO),Qx.registerProcessor(HM("funnel"));var CO=function(e){!function(e){if(e.parallel)return;var t=!1;Ge.each(e.series,(function(e){e&&"parallel"===e.type&&(t=!0)})),t&&(e.parallel=[{}])}(e),function(e){var t=Bo.normalizeToArray(e.parallelAxis);Ge.each(t,(function(t){if(Ge.isObject(t)){var n=t.parallelIndex||0,i=Bo.normalizeToArray(e.parallel)[n];i&&i.parallelAxisDefault&&Ge.merge(t,i.parallelAxisDefault,!1)}}))}(e)},OO=function(e,t,n,i,a){Nx.call(this,e,t,n),this.type=i||"value",this.axisIndex=a};OO.prototype={constructor:OO,model:null,isHorizontal:function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")}},Ge.inherits(OO,Nx);var kO=OO;function LO(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function EO(e,t){return Math.min(null!=t[1]?t[1]:1/0,Math.max(null!=t[0]?t[0]:-1/0,e))}var NO=function(e,t,n,i,a,r){e=e||0;var o=n[1]-n[0];if(null!=a&&(a=EO(a,[0,o])),null!=r&&(r=Math.max(r,null!=a?a:0)),"all"===i){var s=Math.abs(t[1]-t[0]);s=EO(s,[0,o]),a=r=EO(s,[a,r]),i=0}t[0]=EO(t[0],n),t[1]=EO(t[1],n);var l=LO(t,i);t[i]+=e;var u=a||0,c=n.slice();l.sign<0?c[0]+=u:c[1]-=u,t[i]=EO(t[i],c);var h=LO(t,i);return null!=a&&(h.sign!==l.sign||h.span<a)&&(t[1-i]=t[i]+l.sign*a),h=LO(t,i),null!=r&&h.span>r&&(t[1-i]=t[i]+h.sign*r),t},PO=Ge.each,RO=Math.min,zO=Math.max,BO=Math.floor,VO=Math.ceil,HO=Ph.round,YO=Math.PI;function FO(e,t,n){this._axesMap=Ge.createHashMap(),this._axesLayout={},this.dimensions=e.dimensions,this._rect,this._model=e,this._init(e,t,n)}function GO(e,t){return RO(zO(e,t[0]),t[1])}function WO(e,t){var n=t.layoutLength/(t.axisCount-1);return{position:n*e,axisNameAvailableWidth:n,axisLabelShow:!0}}function jO(e,t){var n,i,a=t.layoutLength,r=t.axisExpandWidth,o=t.axisCount,s=t.axisCollapseWidth,l=t.winInnerIndices,u=s,c=!1;return e<l[0]?(n=e*s,i=s):e<=l[1]?(n=t.axisExpandWindow0Pos+e*r-t.axisExpandWindow[0],u=r,c=!0):(n=a-(o-1-e)*s,i=s),{position:n,axisNameAvailableWidth:u,axisLabelShow:c,nameTruncateMaxWidth:i}}FO.prototype={type:"parallel",constructor:FO,_init:function(e,t,n){var i=e.dimensions,a=e.parallelAxisIndex;PO(i,(function(e,n){var i=a[n],r=t.getComponent("parallelAxis",i),o=this._axesMap.set(e,new kO(e,N_.createScaleByModel(r),[0,0],r.get("type"),i)),s="category"===o.type;o.onBand=s&&r.get("boundaryGap"),o.inverse=r.get("inverse"),r.axis=o,o.model=r,o.coordinateSystem=r.coordinateSystem=this}),this)},update:function(e,t){this._updateAxesFromSeries(this._model,e)},containPoint:function(e){var t=this._makeLayoutInfo(),n=t.axisBase,i=t.layoutBase,a=t.pixelDimIndex,r=e[1-a],o=e[a];return r>=n&&r<=n+t.axisLength&&o>=i&&o<=i+t.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(e,t){t.eachSeries((function(n){if(e.contains(n,t)){var i=n.getData();PO(this.dimensions,(function(e){var t=this._axesMap.get(e);t.scale.unionExtentFromData(i,i.mapDimension(e)),N_.niceScaleExtent(t.scale,t.model)}),this)}}),this)},resize:function(e,t){this._rect=sd.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},getRect:function(){return this._rect},_makeLayoutInfo:function(){var e,t=this._model,n=this._rect,i=["x","y"],a=["width","height"],r=t.get("layout"),o="horizontal"===r?0:1,s=n[a[o]],l=[0,s],u=this.dimensions.length,c=GO(t.get("axisExpandWidth"),l),h=GO(t.get("axisExpandCount")||0,[0,u]),d=t.get("axisExpandable")&&u>3&&u>h&&h>1&&c>0&&s>0,f=t.get("axisExpandWindow");f?(e=GO(f[1]-f[0],l),f[1]=f[0]+e):(e=GO(c*(h-1),l),(f=[c*(t.get("axisExpandCenter")||BO(u/2))-e/2])[1]=f[0]+e);var p=(s-e)/(u-h);p<3&&(p=0);var g=[BO(HO(f[0]/c,1))+1,VO(HO(f[1]/c,1))-1],m=p/c*f[0];return{layout:r,pixelDimIndex:o,layoutBase:n[i[o]],layoutLength:s,axisBase:n[i[1-o]],axisLength:n[a[1-o]],axisExpandable:d,axisExpandWidth:c,axisCollapseWidth:p,axisExpandWindow:f,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:m}},_layoutAxes:function(){var e=this._rect,t=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),a=i.layout;t.each((function(e){var t=[0,i.axisLength],n=e.inverse?1:0;e.setExtent(t[n],t[1-n])})),PO(n,(function(t,n){var r=(i.axisExpandable?jO:WO)(n,i),o={horizontal:{x:r.position,y:i.axisLength},vertical:{x:0,y:r.position}},s={horizontal:YO/2,vertical:0},l=[o[a].x+e.x,o[a].y+e.y],u=s[a],c=ln.create();ln.rotate(c,c,u),ln.translate(c,c,l),this._axesLayout[t]={position:l,rotation:u,transform:c,axisNameAvailableWidth:r.axisNameAvailableWidth,axisLabelShow:r.axisLabelShow,nameTruncateMaxWidth:r.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}}),this)},getAxis:function(e){return this._axesMap.get(e)},dataToPoint:function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},eachActiveState:function(e,t,n,i){null==n&&(n=0),null==i&&(i=e.count());var a=this._axesMap,r=this.dimensions,o=[],s=[];Ge.each(r,(function(t){o.push(e.mapDimension(t)),s.push(a.get(t).model)}));for(var l=this.hasAxisBrushed(),u=n;u<i;u++){var c;if(l){c="active";for(var h=e.getValues(o,u),d=0,f=r.length;d<f;d++){if("inactive"===s[d].getActiveState(h[d])){c="inactive";break}}}else c="normal";t(c,u)}},hasAxisBrushed:function(){for(var e=this.dimensions,t=this._axesMap,n=!1,i=0,a=e.length;i<a;i++)"normal"!==t.get(e[i]).model.getActiveState()&&(n=!0);return n},axisCoordToPoint:function(e,t){var n=this._axesLayout[t];return rh.applyTransform([e,0],n.transform)},getAxisLayout:function(e){return Ge.clone(this._axesLayout[e])},getSlidedAxisExpandWindow:function(e){var t=this._makeLayoutInfo(),n=t.pixelDimIndex,i=t.axisExpandWindow.slice(),a=i[1]-i[0],r=[0,t.axisExpandWidth*(t.axisCount-1)];if(!this.containPoint(e))return{behavior:"none",axisExpandWindow:i};var o,s=e[n]-t.layoutBase-t.axisExpandWindow0Pos,l="slide",u=t.axisCollapseWidth,c=this._model.get("axisExpandSlideTriggerArea"),h=null!=c[0];if(u)h&&u&&s<a*c[0]?(l="jump",o=s-a*c[2]):h&&u&&s>a*(1-c[0])?(l="jump",o=s-a*(1-c[2])):(o=s-a*c[1])>=0&&(o=s-a*(1-c[1]))<=0&&(o=0),(o*=t.axisExpandWidth/u)?NO(o,i,r,"all"):l="none";else{a=i[1]-i[0];(i=[zO(0,r[1]*s/a-a/2)])[1]=RO(r[1],i[0]+a),i[0]=i[1]-a}return{axisExpandWindow:i,behavior:l}}};var UO=FO;kf.register("parallel",{create:function(e,t){var n=[];return e.eachComponent("parallel",(function(i,a){var r=new UO(i,e,t);r.name="parallel_"+a,r.resize(i,t),i.coordinateSystem=r,r.model=i,n.push(r)})),e.eachSeries((function(t){if("parallel"===t.get("coordinateSystem")){var n=e.queryComponents({mainType:"parallel",index:t.get("parallelIndex"),id:t.get("parallelId")})[0];t.coordinateSystem=n.coordinateSystem}})),n}});var ZO=fd.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return Xo([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(e){var t=this.activeIntervals=Ge.clone(e);if(t)for(var n=t.length-1;n>=0;n--)Ph.asc(t[n])},getActiveState:function(e){var t=this.activeIntervals;if(!t.length)return"normal";if(null==e||isNaN(e))return"inactive";if(1===t.length){var n=t[0];if(n[0]<=e&&e<=n[1])return"active"}else for(var i=0,a=t.length;i<a;i++)if(t[i][0]<=e&&e<=t[i][1])return"active";return"inactive"}});Ge.merge(ZO.prototype,R_),Dw("parallel",ZO,(function(e,t){return t.type||(t.data?"category":"value")}),{type:"value",dim:null,areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10}),fd.extend({type:"parallel",dependencies:["parallelAxis"],coordinateSystem:null,dimensions:null,parallelAxisIndex:null,layoutMode:"box",defaultOption:{zlevel:0,z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},init:function(){fd.prototype.init.apply(this,arguments),this.mergeOption({})},mergeOption:function(e){var t=this.option;e&&Ge.merge(t,e,!0),this._initDimensions()},contains:function(e,t){var n=e.get("parallelIndex");return null!=n&&t.getComponent("parallel",n)===this},setAxisExpand:function(e){Ge.each(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],(function(t){e.hasOwnProperty(t)&&(this.option[t]=e[t])}),this)},_initDimensions:function(){var e=this.dimensions=[],t=this.parallelAxisIndex=[],n=Ge.filter(this.dependentModels.parallelAxis,(function(e){return(e.get("parallelIndex")||0)===this.componentIndex}),this);Ge.each(n,(function(n){e.push("dim"+n.get("dim")),t.push(n.componentIndex)}))}});Qx.registerAction({type:"axisAreaSelect",event:"axisAreaSelected"},(function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},(function(t){t.axis.model.setActiveIntervals(e.intervals)}))})),Qx.registerAction("parallelAxisExpand",(function(e,t){t.eachComponent({mainType:"parallel",query:e},(function(t){t.setAxisExpand(e)}))}));var XO=Ge.curry,qO=Ge.each,KO=Ge.map,$O=Math.min,QO=Math.max,JO=Math.pow,ek=1e4,tk=6,nk=6,ik="globalPan",ak={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},rk={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},ok={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},sk=0;function lk(e){_t.call(this),this._zr=e,this.group=new rh.Group,this._brushType,this._brushOption,this._panels,this._track=[],this._dragging,this._covers=[],this._creatingCover,this._creatingPanel,this._enableGlobalPan,this._uid="brushController_"+sk++,this._handlers={},qO(Pk,(function(e,t){this._handlers[t]=Ge.bind(e,this)}),this)}function uk(e,t){var n=zk[t.brushType].createCover(e,t);return n.__brushOption=t,dk(n,t),e.group.add(n),n}function ck(e,t){var n=pk(t);return n.endCreating&&(n.endCreating(e,t),dk(t,t.__brushOption)),t}function hk(e,t){var n=t.__brushOption;pk(t).updateCoverShape(e,t,n.range,n)}function dk(e,t){var n=t.z;null==n&&(n=ek),e.traverse((function(e){e.z=n,e.z2=n}))}function fk(e,t){pk(t).updateCommon(e,t),hk(e,t)}function pk(e){return zk[e.__brushOption.brushType]}function gk(e,t,n){var i,a=e._panels;if(!a)return!0;var r=e._transform;return qO(a,(function(e){e.isTargetByCursor(t,n,r)&&(i=e)})),i}function mk(e,t){var n=e._panels;if(!n)return!0;var i=t.__brushOption.panelId;return null==i||n[i]}function vk(e){var t=e._covers,n=t.length;return qO(t,(function(t){e.group.remove(t)}),e),t.length=0,!!n}function yk(e,t){var n=KO(e._covers,(function(e){var t=e.__brushOption,n=Ge.clone(t.range);return{brushType:t.brushType,panelId:t.panelId,range:n}}));e.trigger("brush",n,{isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function _k(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function xk(e,t,n,i){var a=new rh.Group;return a.add(new rh.Rect({name:"main",style:Mk(n),silent:!0,draggable:!0,cursor:"move",drift:XO(e,t,a,"nswe"),ondragend:XO(yk,t,{isEnd:!0})})),qO(i,(function(n){a.add(new rh.Rect({name:n,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:XO(e,t,a,n),ondragend:XO(yk,t,{isEnd:!0})}))})),a}function bk(e,t,n,i){var a=i.brushStyle.lineWidth||0,r=QO(a,nk),o=n[0][0],s=n[1][0],l=o-a/2,u=s-a/2,c=n[0][1],h=n[1][1],d=c-r+a/2,f=h-r+a/2,p=c-o,g=h-s,m=p+a,v=g+a;Sk(e,t,"main",o,s,p,g),i.transformable&&(Sk(e,t,"w",l,u,r,v),Sk(e,t,"e",d,u,r,v),Sk(e,t,"n",l,u,m,r),Sk(e,t,"s",l,f,m,r),Sk(e,t,"nw",l,u,r,r),Sk(e,t,"ne",d,u,r,r),Sk(e,t,"sw",l,f,r,r),Sk(e,t,"se",d,f,r,r))}function wk(e,t){var n=t.__brushOption,i=n.transformable,a=t.childAt(0);a.useStyle(Mk(n)),a.attr({silent:!i,cursor:i?"move":"default"}),qO(["w","e","n","s","se","sw","ne","nw"],(function(n){var a=t.childOfName(n),r=Ik(e,n);a&&a.attr({silent:!i,invisible:!i,cursor:i?rk[r]+"-resize":null})}))}function Sk(e,t,n,i,a,r,o){var s=t.childOfName(n);s&&s.setShape(function(e){var t=$O(e[0][0],e[1][0]),n=$O(e[0][1],e[1][1]),i=QO(e[0][0],e[1][0]),a=QO(e[0][1],e[1][1]);return{x:t,y:n,width:i-t,height:a-n}}(Ok(e,t,[[i,a],[i+r,a+o]])))}function Mk(e){return Ge.defaults({strokeNoScale:!0},e.brushStyle)}function Tk(e,t,n,i){var a=[$O(e,n),$O(t,i)],r=[QO(e,n),QO(t,i)];return[[a[0],r[0]],[a[1],r[1]]]}function Ik(e,t){if(t.length>1)return("e"===(n=[Ik(e,(t=t.split(""))[0]),Ik(e,t[1])])[0]||"w"===n[0])&&n.reverse(),n.join("");var n=rh.transformDirection({w:"left",e:"right",n:"top",s:"bottom"}[t],function(e){return rh.getTransform(e.group)}(e));return{left:"w",right:"e",top:"n",bottom:"s"}[n]}function Ak(e,t,n,i,a,r,o,s){var l=i.__brushOption,u=e(l.range),c=Ck(n,r,o);qO(a.split(""),(function(e){var t=ak[e];u[t[0]][t[1]]+=c[t[0]]})),l.range=t(Tk(u[0][0],u[1][0],u[0][1],u[1][1])),fk(n,i),yk(n,{isEnd:!1})}function Dk(e,t,n,i,a){var r=t.__brushOption.range,o=Ck(e,n,i);qO(r,(function(e){e[0]+=o[0],e[1]+=o[1]})),fk(e,t),yk(e,{isEnd:!1})}function Ck(e,t,n){var i=e.group,a=i.transformCoordToLocal(t,n),r=i.transformCoordToLocal(0,0);return[a[0]-r[0],a[1]-r[1]]}function Ok(e,t,n){var i=mk(e,t);return i&&!0!==i?i.clipPath(n,e._transform):Ge.clone(n)}function kk(e){var t=e.event;t.preventDefault&&t.preventDefault()}function Lk(e,t,n){return e.childOfName("main").contain(t,n)}function Ek(e,t,n,i){var a,r=e._creatingCover,o=e._creatingPanel,s=e._brushOption;if(e._track.push(n.slice()),function(e){var t=e._track;if(!t.length)return!1;var n=t[t.length-1],i=t[0],a=n[0]-i[0],r=n[1]-i[1];return JO(a*a+r*r,.5)>tk}(e)||r){if(o&&!r){"single"===s.brushMode&&vk(e);var l=Ge.clone(s);l.brushType=Nk(l.brushType,o),l.panelId=!0===o?null:o.panelId,r=e._creatingCover=uk(e,l),e._covers.push(r)}if(r){var u=zk[Nk(e._brushType,o)];r.__brushOption.range=u.getCreatingRange(Ok(e,r,e._track)),i&&(ck(e,r),u.updateCommon(e,r)),hk(e,r),a={isEnd:i}}}else i&&"single"===s.brushMode&&s.removeOnClick&&gk(e,t,n)&&vk(e)&&(a={isEnd:i,removeOnClick:!0});return a}function Nk(e,t){return"auto"===e?t.defaultBrushType:e}lk.prototype={constructor:lk,enableBrush:function(e){var t,n;return this._brushType&&(n=(t=this)._zr,FT.release(n,ik,t._uid),function(e,t){qO(t,(function(t,n){e.off(n,t)}))}(n,t._handlers),t._brushType=t._brushOption=null),e.brushType&&function(e,t){var n=e._zr;e._enableGlobalPan||FT.take(n,ik,e._uid);(function(e,t){qO(t,(function(t,n){e.on(n,t)}))})(n,e._handlers),e._brushType=t.brushType,e._brushOption=Ge.merge(Ge.clone(ok),t,!0)}(this,e),this},setPanels:function(e){if(e&&e.length){var t=this._panels={};Ge.each(e,(function(e){t[e.panelId]=Ge.clone(e)}))}else this._panels=null;return this},mount:function(e){e=e||{},this._enableGlobalPan=e.enableGlobalPan;var t=this.group;return this._zr.add(t),t.attr({position:e.position||[0,0],rotation:e.rotation||0,scale:e.scale||[1,1]}),this._transform=t.getLocalTransform(),this},eachCover:function(e,t){qO(this._covers,e,t)},updateCovers:function(e){e=Ge.map(e,(function(e){return Ge.merge(Ge.clone(ok),e,!0)}));var t="\0-brush-index-",n=this._covers,i=this._covers=[],a=this,r=this._creatingCover;return new rv(n,e,(function(e,t){return o(e.__brushOption,t)}),o).add(s).update(s).remove((function(e){n[e]!==r&&a.group.remove(n[e])})).execute(),this;function o(e,n){return(null!=e.id?e.id:t+n)+"-"+e.brushType}function s(t,o){var s=e[t];if(null!=o&&n[o]===r)i[t]=n[o];else{var l=i[t]=null!=o?(n[o].__brushOption=s,n[o]):ck(a,uk(a,s));fk(a,l)}}},unmount:function(){return this.enableBrush(!1),vk(this),this._zr.remove(this.group),this},dispose:function(){this.unmount(),this.off()}},Ge.mixin(lk,_t);var Pk={mousedown:function(e){if(this._dragging)Rk(this,e);else if(!e.target||!e.target.draggable){kk(e);var t=this.group.transformCoordToLocal(e.offsetX,e.offsetY);this._creatingCover=null,(this._creatingPanel=gk(this,e,t))&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(e){var t=e.offsetX,n=e.offsetY,i=this.group.transformCoordToLocal(t,n);if(function(e,t,n){if(e._brushType&&!function(e,t,n){var i=e._zr;return t<0||t>i.getWidth()||n<0||n>i.getHeight()}(e,t)){var i=e._zr,a=e._covers,r=gk(e,t,n);if(!e._dragging)for(var o=0;o<a.length;o++){var s=a[o].__brushOption;if(r&&(!0===r||s.panelId===r.panelId)&&zk[s.brushType].contain(a[o],n[0],n[1]))return}r&&i.setCursorStyle("crosshair")}}(this,e,i),this._dragging){kk(e);var a=Ek(this,e,i,!1);a&&yk(this,a)}},mouseup:function(e){Rk(this,e)}};function Rk(e,t){if(e._dragging){kk(t);var n=t.offsetX,i=t.offsetY,a=e.group.transformCoordToLocal(n,i),r=Ek(e,t,a,!0);e._dragging=!1,e._track=[],e._creatingCover=null,r&&yk(e,r)}}var zk={lineX:Bk(0),lineY:Bk(1),rect:{createCover:function(e,t){return xk(XO(Ak,(function(e){return e}),(function(e){return e})),e,t,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(e){var t=_k(e);return Tk(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,n,i){bk(e,t,n,i)},updateCommon:wk,contain:Lk},polygon:{createCover:function(e,t){var n=new rh.Group;return n.add(new rh.Polyline({name:"main",style:Mk(t),silent:!0})),n},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new rh.Polygon({name:"main",draggable:!0,drift:XO(Dk,e,t),ondragend:XO(yk,e,{isEnd:!0})}))},updateCoverShape:function(e,t,n,i){t.childAt(0).setShape({points:Ok(e,t,n)})},updateCommon:wk,contain:Lk}};function Bk(e){return{createCover:function(t,n){return xk(XO(Ak,(function(t){var n=[t,[0,100]];return e&&n.reverse(),n}),(function(t){return t[e]})),t,n,[["w","e"],["n","s"]][e])},getCreatingRange:function(t){var n=_k(t);return[$O(n[0][e],n[1][e]),QO(n[0][e],n[1][e])]},updateCoverShape:function(t,n,i,a){var r,o=mk(t,n);if(!0!==o&&o.getLinearBrushOtherExtent)r=o.getLinearBrushOtherExtent(e,t._transform);else{var s=t._zr;r=[0,[s.getWidth(),s.getHeight()][1-e]]}var l=[i,r];e&&l.reverse(),bk(t,n,l,a)},updateCommon:wk,contain:Lk}}var Vk=lk,Hk=iI.onIrrelevantElement;function Yk(e){return Pi.create(e)}var Fk=function(e,t){return e=Yk(e),function(n){var i=null!=t?t:n,a=i?e.width:e.height,r=i?e.x:e.y;return[r,r+(a||0)]}},Gk={makeRectPanelClipPath:function(e){return e=Yk(e),function(t,n){return rh.clipPointsByRect(t,e)}},makeLinearBrushOtherExtent:Fk,makeRectIsTargetByCursor:function(e,t,n){return e=Yk(e),function(i,a,r){return e.contain(a[0],a[1])&&!Hk(i,t,n)}}},Wk=["axisLine","axisTickLabel","axisName"],jk=Qx.extendComponentView({type:"parallelAxis",init:function(e,t){jk.superApply(this,"init",arguments),(this._brushController=new Vk(t.getZr())).on("brush",Ge.bind(this._onBrush,this))},render:function(e,t,n,i){if(!function(e,t,n){return n&&"axisAreaSelect"===n.type&&t.findComponents({mainType:"parallelAxis",query:n})[0]===e}(e,t,i)){this.axisModel=e,this.api=n,this.group.removeAll();var a=this._axisGroup;if(this._axisGroup=new rh.Group,this.group.add(this._axisGroup),e.get("show")){var r=function(e,t){return t.getComponent("parallel",e.get("parallelIndex"))}(e,t),o=r.coordinateSystem,s=e.getAreaSelectStyle(),l=s.width,u=e.axis.dim,c=o.getAxisLayout(u),h=Ge.extend({strokeContainThreshold:l},c),d=new gS(e,h);Ge.each(Wk,d.add,d),this._axisGroup.add(d.getGroup()),this._refreshBrushController(h,s,e,r,l,n);var f=i&&!1===i.animation?null:e;rh.groupTransition(a,this._axisGroup,f)}}},_refreshBrushController:function(e,t,n,i,a,r){var o=n.axis.getExtent(),s=o[1]-o[0],l=Math.min(30,.1*Math.abs(s)),u=rh.BoundingRect.create({x:o[0],y:-a/2,width:s,height:a});u.x-=l,u.width+=2*l,this._brushController.mount({enableGlobalPan:!0,rotation:e.rotation,position:e.position}).setPanels([{panelId:"pl",clipPath:Gk.makeRectPanelClipPath(u),isTargetByCursor:Gk.makeRectIsTargetByCursor(u,r,i),getLinearBrushOtherExtent:Gk.makeLinearBrushOtherExtent(u,0)}]).enableBrush({brushType:"lineX",brushStyle:t,removeOnClick:!0}).updateCovers(function(e){var t=e.axis;return Ge.map(e.activeIntervals,(function(e){return{brushType:"lineX",panelId:"pl",range:[t.dataToCoord(e[0],!0),t.dataToCoord(e[1],!0)]}}))}(n))},_onBrush:function(e,t){var n=this.axisModel,i=n.axis,a=Ge.map(e,(function(e){return[i.coordToData(e.range[0],!0),i.coordToData(e.range[1],!0)]}));(!n.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:a})},dispose:function(){this._brushController.dispose()}});Qx.extendComponentView({type:"parallel",render:function(e,t,n){this._model=e,this._api=n,this._handlers||(this._handlers={},Ge.each(Uk,(function(e,t){n.getZr().on(t,this._handlers[t]=Ge.bind(e,this))}),this)),Lg.createOrUpdate(this,"_throttledDispatchExpand",e.get("axisExpandRate"),"fixRate")},dispose:function(e,t){Ge.each(this._handlers,(function(e,n){t.getZr().off(n,e)})),this._handlers=null},_throttledDispatchExpand:function(e){this._dispatchExpand(e)},_dispatchExpand:function(e){e&&this._api.dispatchAction(Ge.extend({type:"parallelAxisExpand"},e))}});var Uk={mousedown:function(e){Zk(this,"click")&&(this._mouseDownPoint=[e.offsetX,e.offsetY])},mouseup:function(e){var t=this._mouseDownPoint;if(Zk(this,"click")&&t){var n=[e.offsetX,e.offsetY];if(Math.pow(t[0]-n[0],2)+Math.pow(t[1]-n[1],2)>5)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]);"none"!==i.behavior&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(e){if(!this._mouseDownPoint&&Zk(this,"mousemove")){var t=this._model,n=t.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]),i=n.behavior;"jump"===i&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===i?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===i&&null})}}};function Zk(e,t){var n=e._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===t}Qx.registerPreprocessor(CO);var Xk=Ge.each,qk=Ge.createHashMap;cg.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(e,t){var n=this.getSource();return function(e,t){if(e.encodeDefine)return;var n=t.ecModel.getComponent("parallel",t.get("parallelIndex"));if(!n)return;var i=e.encodeDefine=qk();Xk(n.dimensions,(function(e){var t=+e.replace("dim","");i.set(e,t)}))}(n,this),vy(n,this)},getRawIndicesByActiveState:function(e){var t=this.coordinateSystem,n=this.getData(),i=[];return t.eachActiveState(n,(function(t,a){e===t&&i.push(n.getRawIndex(a))})),i},defaultOption:{zlevel:0,z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"}});function Kk(e,t,n,i){for(var a,r=[],o=0;o<n.length;o++){var s=n[o],l=e.get(e.mapDimension(s),t);a=l,("category"===i.getAxis(s).type?null==a:null==a||isNaN(a))||r.push(i.dataToPoint(l,s))}return r}function $k(e,t,n,i,a){var r=Kk(e,n,i,a),o=new rh.Polyline({shape:{points:r},silent:!0,z2:10});return t.add(o),e.setItemGraphicEl(n,o),o}function Qk(e){var t=e.get("smooth",!0);return!0===t&&(t=.3),{lineStyle:e.getModel("lineStyle").getLineStyle(),smooth:null!=t?t:.3}}function Jk(e,t,n,i){var a=i.lineStyle;t.hasItemOption&&(a=t.getItemModel(n).getModel("lineStyle").getLineStyle());e.useStyle(a);var r=e.style;r.fill=null,r.stroke=t.getItemVisual(n,"color"),r.opacity=t.getItemVisual(n,"opacity"),i.smooth&&(e.shape.smooth=i.smooth)}Ag.extend({type:"parallel",init:function(){this._dataGroup=new rh.Group,this.group.add(this._dataGroup),this._data,this._initialized},render:function(e,t,n,i){var a=this._dataGroup,r=e.getData(),o=this._data,s=e.coordinateSystem,l=s.dimensions,u=Qk(e);if(r.diff(o).add((function(e){var t=$k(r,a,e,l,s);Jk(t,r,e,u)})).update((function(t,n){var a=o.getItemGraphicEl(n),c=Kk(r,t,l,s);r.setItemGraphicEl(t,a);var h=i&&!1===i.animation?null:e;rh.updateProps(a,{shape:{points:c}},h,t),Jk(a,r,t,u)})).remove((function(e){var t=o.getItemGraphicEl(e);a.remove(t)})).execute(),!this._initialized){this._initialized=!0;var c=function(e,t,n){var i=e.model,a=e.getRect(),r=new rh.Rect({shape:{x:a.x,y:a.y,width:a.width,height:a.height}}),o="horizontal"===i.get("layout")?"width":"height";return r.setShape(o,0),rh.initProps(r,{shape:{width:a.width,height:a.height}},t,n),r}(s,e,(function(){setTimeout((function(){a.removeClipPath()}))}));a.setClipPath(c)}this._data=r},incrementalPrepareRender:function(e,t,n){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},incrementalRender:function(e,t,n){for(var i=t.getData(),a=t.coordinateSystem,r=a.dimensions,o=Qk(t),s=e.start;s<e.end;s++){var l=$k(i,this._dataGroup,s,r,a);l.incremental=!0,Jk(l,i,s,o)}},dispose:function(){},remove:function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null}});var eL=["lineStyle","normal","opacity"],tL={seriesType:"parallel",reset:function(e,t,n){var i=e.getModel("itemStyle"),a=e.getModel("lineStyle"),r=t.get("color"),o=a.get("color")||i.get("color")||r[e.seriesIndex%r.length],s=e.get("inactiveOpacity"),l=e.get("activeOpacity"),u=e.getModel("lineStyle").getLineStyle(),c=e.coordinateSystem,h=e.getData(),d={normal:u.opacity,active:l,inactive:s};return h.setVisual("color",o),{progress:function(e,t){c.eachActiveState(t,(function(e,n){var i=d[e];if("normal"===e&&t.hasItemOption){var a=t.getItemModel(n).get(eL,!0);null!=a&&(i=a)}t.setItemVisual(n,"opacity",i)}),e.start,e.end)}}}},nL=tL;Qx.registerVisual(nL);var iL=Xh.encodeHTML,aL=cg.extend({type:"series.sankey",layoutInfo:null,levelModels:null,getInitialData:function(e,t){for(var n=e.edges||e.links,i=e.data||e.nodes,a=e.levels,r=this.levelModels={},o=0;o<a.length;o++)null!=a[o].depth&&a[o].depth>=0&&(r[a[o].depth]=new xh(a[o],this,t));if(i&&n){var s=KD(i,n,this,!0,(function(e,t){e.wrapMethod("getItemModel",(function(e,t){return e.customizeGetParent((function(e){var n=this.parentModel,i=n.getData().getItemLayout(t).depth;return n.levelModels[i]||this.parentModel})),e})),t.wrapMethod("getItemModel",(function(e,t){return e.customizeGetParent((function(e){var n=this.parentModel,i=n.getGraph().getEdgeByIndex(t).node1.getLayout().depth;return n.levelModels[i]||this.parentModel})),e}))}));return s.data}},setNodePosition:function(e,t){var n=this.option.data[e];n.localX=t[0],n.localY=t[1]},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},formatTooltip:function(e,t,n){if("edge"===n){var i=this.getDataParams(e,n),a=i.data,r=a.source+" -- "+a.target;return i.value&&(r+=" : "+i.value),iL(r)}if("node"===n){var o=this.getGraph().getNodeByIndex(e).getLayout().value,s=this.getDataParams(e,n).data.name;if(o)r=s+" : "+o;return iL(r)}return aL.superCall(this,"formatTooltip",e,t)},optionUpdated:function(){var e=this.option;!0===e.focusNodeAdjacency&&(e.focusNodeAdjacency="allEdges")},getDataParams:function(e,t){var n=aL.superCall(this,"getDataParams",e,t);if(null==n.value&&"node"===t){var i=this.getGraph().getNodeByIndex(e).getLayout().value;n.value=i}return n},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,focusNodeAdjacency:!1,layoutIterations:32,label:{show:!0,position:"right",color:"#000",fontSize:12},levels:[],nodeAlign:"justify",itemStyle:{borderWidth:1,borderColor:"#333"},lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},animationEasing:"linear",animationDuration:1e3}}),rL=["itemStyle","opacity"],oL=["emphasis","itemStyle","opacity"],sL=["lineStyle","opacity"],lL=["emphasis","lineStyle","opacity"];function uL(e,t){return e.getVisual("opacity")||e.getModel().get(t)}function cL(e,t,n){var i=e.getGraphicEl(),a=uL(e,t);null!=n&&(null==a&&(a=1),a*=n),i.downplay&&i.downplay(),i.traverse((function(e){"group"!==e.type&&e.setStyle("opacity",a)}))}function hL(e,t){var n=uL(e,t),i=e.getGraphicEl();i.traverse((function(e){"group"!==e.type&&e.setStyle("opacity",n)})),i.highlight&&i.highlight()}var dL=rh.extendShape({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0,orient:""},buildPath:function(e,t){var n=t.extent;e.moveTo(t.x1,t.y1),e.bezierCurveTo(t.cpx1,t.cpy1,t.cpx2,t.cpy2,t.x2,t.y2),"vertical"===t.orient?(e.lineTo(t.x2+n,t.y2),e.bezierCurveTo(t.cpx2+n,t.cpy2,t.cpx1+n,t.cpy1,t.x1+n,t.y1)):(e.lineTo(t.x2,t.y2+n),e.bezierCurveTo(t.cpx2,t.cpy2+n,t.cpx1,t.cpy1+n,t.x1,t.y1+n)),e.closePath()},highlight:function(){this.trigger("emphasis")},downplay:function(){this.trigger("normal")}});Qx.extendChartView({type:"sankey",_model:null,_focusAdjacencyDisabled:!1,render:function(e,t,n){var i=this,a=e.getGraph(),r=this.group,o=e.layoutInfo,s=o.width,l=o.height,u=e.getData(),c=e.getData("edge"),h=e.get("orient");this._model=e,r.removeAll(),r.attr("position",[o.x,o.y]),a.eachEdge((function(t){var n=new dL;n.dataIndex=t.dataIndex,n.seriesIndex=e.seriesIndex,n.dataType="edge";var i,a,o,u,d,f,p,g,m=t.getModel("lineStyle"),v=m.get("curveness"),y=t.node1.getLayout(),_=t.node1.getModel(),x=_.get("localX"),b=_.get("localY"),w=t.node2.getLayout(),S=t.node2.getModel(),M=S.get("localX"),T=S.get("localY"),I=t.getLayout();switch(n.shape.extent=Math.max(1,I.dy),n.shape.orient=h,"vertical"===h?(i=(null!=x?x*s:y.x)+I.sy,a=(null!=b?b*l:y.y)+y.dy,o=(null!=M?M*s:w.x)+I.ty,d=i,f=a*(1-v)+(u=null!=T?T*l:w.y)*v,p=o,g=a*v+u*(1-v)):(i=(null!=x?x*s:y.x)+y.dx,a=(null!=b?b*l:y.y)+I.sy,d=i*(1-v)+(o=null!=M?M*s:w.x)*v,f=a,p=i*v+o*(1-v),g=u=(null!=T?T*l:w.y)+I.ty),n.setShape({x1:i,y1:a,x2:o,y2:u,cpx1:d,cpy1:f,cpx2:p,cpy2:g}),n.setStyle(m.getItemStyle()),n.style.fill){case"source":n.style.fill=t.node1.getVisual("color");break;case"target":n.style.fill=t.node2.getVisual("color")}rh.setHoverStyle(n,t.getModel("emphasis.lineStyle").getItemStyle()),r.add(n),c.setItemGraphicEl(t.dataIndex,n)})),a.eachNode((function(t){var n=t.getLayout(),i=t.getModel(),a=i.get("localX"),o=i.get("localY"),c=i.getModel("label"),h=i.getModel("emphasis.label"),d=new rh.Rect({shape:{x:null!=a?a*s:n.x,y:null!=o?o*l:n.y,width:n.dx,height:n.dy},style:i.getModel("itemStyle").getItemStyle()}),f=t.getModel("emphasis.itemStyle").getItemStyle();rh.setLabelStyle(d.style,f,c,h,{labelFetcher:e,labelDataIndex:t.dataIndex,defaultText:t.id,isRectText:!0}),d.setStyle("fill",t.getVisual("color")),rh.setHoverStyle(d,f),r.add(d),u.setItemGraphicEl(t.dataIndex,d),d.dataType="node"})),u.eachItemGraphicEl((function(t,a){var r=u.getItemModel(a);r.get("draggable")&&(t.drift=function(t,r){i._focusAdjacencyDisabled=!0,this.shape.x+=t,this.shape.y+=r,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:e.id,dataIndex:u.getRawIndex(a),localX:this.shape.x/s,localY:this.shape.y/l})},t.ondragend=function(){i._focusAdjacencyDisabled=!1},t.draggable=!0,t.cursor="move"),t.highlight=function(){this.trigger("emphasis")},t.downplay=function(){this.trigger("normal")},t.focusNodeAdjHandler&&t.off("mouseover",t.focusNodeAdjHandler),t.unfocusNodeAdjHandler&&t.off("mouseout",t.unfocusNodeAdjHandler),r.get("focusNodeAdjacency")&&(t.on("mouseover",t.focusNodeAdjHandler=function(){i._focusAdjacencyDisabled||(i._clearTimer(),n.dispatchAction({type:"focusNodeAdjacency",seriesId:e.id,dataIndex:t.dataIndex}))}),t.on("mouseout",t.unfocusNodeAdjHandler=function(){i._focusAdjacencyDisabled||i._dispatchUnfocus(n)}))})),c.eachItemGraphicEl((function(t,a){var r=c.getItemModel(a);t.focusNodeAdjHandler&&t.off("mouseover",t.focusNodeAdjHandler),t.unfocusNodeAdjHandler&&t.off("mouseout",t.unfocusNodeAdjHandler),r.get("focusNodeAdjacency")&&(t.on("mouseover",t.focusNodeAdjHandler=function(){i._focusAdjacencyDisabled||(i._clearTimer(),n.dispatchAction({type:"focusNodeAdjacency",seriesId:e.id,edgeDataIndex:t.dataIndex}))}),t.on("mouseout",t.unfocusNodeAdjHandler=function(){i._focusAdjacencyDisabled||i._dispatchUnfocus(n)}))})),!this._data&&e.get("animation")&&r.setClipPath(function(e,t,n){var i=new rh.Rect({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return rh.initProps(i,{shape:{width:e.width+20}},t,n),i}(r.getBoundingRect(),e,(function(){r.removeClipPath()}))),this._data=e.getData()},dispose:function(){this._clearTimer()},_dispatchUnfocus:function(e){var t=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout((function(){t._unfocusDelayTimer=null,e.dispatchAction({type:"unfocusNodeAdjacency",seriesId:t._model.id})}),500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(e,t,n,i){var a=e.getData(),r=a.graph,o=i.dataIndex,s=a.getItemModel(o),l=i.edgeDataIndex;if(null!=o||null!=l){var u=r.getNodeByIndex(o),c=r.getEdgeByIndex(l);if(r.eachNode((function(e){cL(e,rL,.1)})),r.eachEdge((function(e){cL(e,sL,.1)})),u){hL(u,oL);var h=s.get("focusNodeAdjacency");"outEdges"===h?Ge.each(u.outEdges,(function(e){e.dataIndex<0||(hL(e,lL),hL(e.node2,oL))})):"inEdges"===h?Ge.each(u.inEdges,(function(e){e.dataIndex<0||(hL(e,lL),hL(e.node1,oL))})):"allEdges"===h&&Ge.each(u.edges,(function(e){e.dataIndex<0||(hL(e,lL),e.node1!==u&&hL(e.node1,oL),e.node2!==u&&hL(e.node2,oL))}))}c&&(hL(c,lL),hL(c.node1,oL),hL(c.node2,oL))}},unfocusNodeAdjacency:function(e,t,n,i){var a=e.getGraph();a.eachNode((function(e){cL(e,rL)})),a.eachEdge((function(e){cL(e,sL)}))}}),Qx.registerAction({type:"dragNode",event:"dragnode",update:"update"},(function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},(function(t){t.setNodePosition(e.dataIndex,[e.localX,e.localY])}))}));var fL=Bo.groupData;function pL(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return null!=t.depth&&t.depth>=0}function gL(e,t,n,i,a){var r="vertical"===a?"x":"y";Ge.each(e,(function(e){var o,s,l;e.sort((function(e,t){return e.getLayout()[r]-t.getLayout()[r]}));for(var u=0,c=e.length,h="vertical"===a?"dx":"dy",d=0;d<c;d++)(l=u-(s=e[d]).getLayout()[r])>0&&(o=s.getLayout()[r]+l,"vertical"===a?s.setLayout({x:o},!0):s.setLayout({y:o},!0)),u=s.getLayout()[r]+s.getLayout()[h]+t;if((l=u-t-("vertical"===a?i:n))>0)for(o=s.getLayout()[r]-l,"vertical"===a?s.setLayout({x:o},!0):s.setLayout({y:o},!0),u=o,d=c-2;d>=0;--d)(l=(s=e[d]).getLayout()[r]+s.getLayout()[h]+t-u)>0&&(o=s.getLayout()[r]-l,"vertical"===a?s.setLayout({x:o},!0):s.setLayout({y:o},!0)),u=s.getLayout()[r]}))}function mL(e,t,n){Ge.each(e.slice().reverse(),(function(e){Ge.each(e,(function(e){if(e.outEdges.length){var i=SL(e.outEdges,vL,n)/SL(e.outEdges,wL,n);if(isNaN(i)){var a=e.outEdges.length;i=a?SL(e.outEdges,yL,n)/a:0}if("vertical"===n){var r=e.getLayout().x+(i-bL(e,n))*t;e.setLayout({x:r},!0)}else{var o=e.getLayout().y+(i-bL(e,n))*t;e.setLayout({y:o},!0)}}}))}))}function vL(e,t){return bL(e.node2,t)*e.getValue()}function yL(e,t){return bL(e.node2,t)}function _L(e,t){return bL(e.node1,t)*e.getValue()}function xL(e,t){return bL(e.node1,t)}function bL(e,t){return"vertical"===t?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function wL(e){return e.getValue()}function SL(e,t,n){for(var i=0,a=e.length,r=-1;++r<a;){var o=+t.call(e,e[r],n);isNaN(o)||(i+=o)}return i}function ML(e,t,n){Ge.each(e,(function(e){Ge.each(e,(function(e){if(e.inEdges.length){var i=SL(e.inEdges,_L,n)/SL(e.inEdges,wL,n);if(isNaN(i)){var a=e.inEdges.length;i=a?SL(e.inEdges,xL,n)/a:0}if("vertical"===n){var r=e.getLayout().x+(i-bL(e,n))*t;e.setLayout({x:r},!0)}else{var o=e.getLayout().y+(i-bL(e,n))*t;e.setLayout({y:o},!0)}}}))}))}var TL=function(e,t,n){e.eachSeriesByType("sankey",(function(e){var n=e.get("nodeWidth"),i=e.get("nodeGap"),a=function(e,t){return sd.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,t);e.layoutInfo=a;var r=a.width,o=a.height,s=e.getGraph(),l=s.nodes,u=s.edges;!function(e){Ge.each(e,(function(e){var t=SL(e.outEdges,wL),n=SL(e.inEdges,wL),i=e.getValue()||0,a=Math.max(t,n,i);e.setLayout({value:a},!0)}))}(l),function(e,t,n,i,a,r,o,s,l){(function(e,t,n,i,a,r,o){for(var s=[],l=[],u=[],c=[],h=0,d=0,f=0;f<t.length;f++)s[f]=1;for(f=0;f<e.length;f++)l[f]=e[f].inEdges.length,0===l[f]&&u.push(e[f]);var p=-1;for(;u.length;){for(var g=0;g<u.length;g++){var m=u[g],v=m.hostGraph.data.getRawDataItem(m.dataIndex),y=null!=v.depth&&v.depth>=0;y&&v.depth>p&&(p=v.depth),m.setLayout({depth:y?v.depth:h},!0),"vertical"===r?m.setLayout({dy:n},!0):m.setLayout({dx:n},!0);for(var _=0;_<m.outEdges.length;_++){var x=m.outEdges[_];s[t.indexOf(x)]=0;var b=x.node2;0==--l[e.indexOf(b)]&&c.indexOf(b)<0&&c.push(b)}}++h,u=c,c=[]}for(f=0;f<s.length;f++)if(1===s[f])throw new Error("Sankey is a DAG, the original data has cycle!");var w=p>h-1?p:h-1;o&&"left"!==o&&function(e,t,n,i){if("right"===t){for(var a=[],r=e,o=0;r.length;){for(var s=0;s<r.length;s++){var l=r[s];l.setLayout({skNodeHeight:o},!0);for(var u=0;u<l.inEdges.length;u++){var c=l.inEdges[u];a.indexOf(c.node1)<0&&a.push(c.node1)}}r=a,a=[],++o}Ge.each(e,(function(e){pL(e)||e.setLayout({depth:Math.max(0,i-e.getLayout().skNodeHeight)},!0)}))}else"justify"===t&&function(e,t){Ge.each(e,(function(e){pL(e)||e.outEdges.length||e.setLayout({depth:t},!0)}))}(e,i)}(e,o,0,w);d="vertical"===r?(a-n)/w:(i-n)/w;!function(e,t,n){Ge.each(e,(function(e){var i=e.getLayout().depth*t;"vertical"===n?e.setLayout({y:i},!0):e.setLayout({x:i},!0)}))}(e,d,r)})(e,t,n,a,r,s,l),function(e,t,n,i,a,r,o){var s=function(e,t){var n=[],i="vertical"===t?"y":"x",a=fL(e,(function(e){return e.getLayout()[i]}));return a.keys.sort((function(e,t){return e-t})),Ge.each(a.keys,(function(e){n.push(a.buckets.get(e))})),n}(e,o);(function(e,t,n,i,a,r){var o=1/0;Ge.each(e,(function(e){var t=e.length,s=0;Ge.each(e,(function(e){s+=e.getLayout().value}));var l="vertical"===r?(i-(t-1)*a)/s:(n-(t-1)*a)/s;l<o&&(o=l)})),Ge.each(e,(function(e){Ge.each(e,(function(e,t){var n=e.getLayout().value*o;"vertical"===r?(e.setLayout({x:t},!0),e.setLayout({dx:n},!0)):(e.setLayout({y:t},!0),e.setLayout({dy:n},!0))}))})),Ge.each(t,(function(e){var t=+e.getValue()*o;e.setLayout({dy:t},!0)}))})(s,t,n,i,a,o),gL(s,a,n,i,o);for(var l=1;r>0;r--)mL(s,l*=.99,o),gL(s,a,n,i,o),ML(s,l,o),gL(s,a,n,i,o)}(e,t,r,a,i,o,s),function(e,t){var n="vertical"===t?"x":"y";Ge.each(e,(function(e){e.outEdges.sort((function(e,t){return e.node2.getLayout()[n]-t.node2.getLayout()[n]})),e.inEdges.sort((function(e,t){return e.node1.getLayout()[n]-t.node1.getLayout()[n]}))})),Ge.each(e,(function(e){var t=0,n=0;Ge.each(e.outEdges,(function(e){e.setLayout({sy:t},!0),t+=e.getLayout().dy})),Ge.each(e.inEdges,(function(e){e.setLayout({ty:n},!0),n+=e.getLayout().dy}))}))}(e,s)}(l,u,n,i,r,o,0!==Ge.filter(l,(function(e){return 0===e.getLayout().value})).length?0:e.get("layoutIterations"),e.get("orient"),e.get("nodeAlign"))}))};var IL=function(e,t){e.eachSeriesByType("sankey",(function(e){var t=e.getGraph().nodes;if(t.length){var n=1/0,i=-1/0;Ge.each(t,(function(e){var t=e.getLayout().value;t<n&&(n=t),t>i&&(i=t)})),Ge.each(t,(function(t){var a=new vD({type:"color",mappingMethod:"linear",dataExtent:[n,i],visual:e.get("color")}).mapValueToVisual(t.getLayout().value),r=t.getModel().get("itemStyle.color");null!=r?t.setVisual("color",r):t.setVisual("color",a)}))}}))};Qx.registerLayout(TL),Qx.registerVisual(IL);var AL=cv.getDimensionTypeByAxis,DL=of.makeSeriesEncodeForAxisCoordSys,CL={seriesModelMixin:{_baseAxisDim:null,getInitialData:function(e,t){var n,i,a=t.getComponent("xAxis",this.get("xAxisIndex")),r=t.getComponent("yAxis",this.get("yAxisIndex")),o=a.get("type"),s=r.get("type");"category"===o?(e.layout="horizontal",n=a.getOrdinalMeta(),i=!0):"category"===s?(e.layout="vertical",n=r.getOrdinalMeta(),i=!0):e.layout=e.layout||"horizontal";var l=["x","y"],u="horizontal"===e.layout?0:1,c=this._baseAxisDim=l[u],h=l[1-u],d=[a,r],f=d[u].get("type"),p=d[1-u].get("type"),g=e.data;if(g&&i){var m=[];Ge.each(g,(function(e,t){var n;e.value&&Ge.isArray(e.value)?(n=e.value.slice(),e.value.unshift(t)):Ge.isArray(e)?(n=e.slice(),e.unshift(t)):n=e,m.push(n)})),e.data=m}var v=this.defaultValueDimensions,y=[{name:c,type:AL(f),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:AL(p),dimsDef:v.slice()}];return mM(this,{coordDimensions:y,dimensionsCount:v.length+1,encodeDefaulter:Ge.curry(DL,y,this)})},getBaseAxis:function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis}}},OL=CL.seriesModelMixin,kL=cg.extend({type:"series.boxplot",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:2,shadowOffsetY:2,shadowColor:"rgba(0,0,0,0.4)"}},animationEasing:"elasticOut",animationDuration:800}});Ge.mixin(kL,OL,!0);var LL=["itemStyle"],EL=["emphasis","itemStyle"];Ag.extend({type:"boxplot",render:function(e,t,n){var i=e.getData(),a=this.group,r=this._data;this._data||a.removeAll();var o="horizontal"===e.get("layout")?1:0;i.diff(r).add((function(e){if(i.hasValue(e)){var t=PL(i.getItemLayout(e),i,e,o,!0);i.setItemGraphicEl(e,t),a.add(t)}})).update((function(e,t){var n=r.getItemGraphicEl(t);if(i.hasValue(e)){var s=i.getItemLayout(e);n?RL(s,n,i,e):n=PL(s,i,e,o),a.add(n),i.setItemGraphicEl(e,n)}else a.remove(n)})).remove((function(e){var t=r.getItemGraphicEl(e);t&&a.remove(t)})).execute(),this._data=i},remove:function(e){var t=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl((function(e){e&&t.remove(e)}))},dispose:Ge.noop});var NL=Tl.extend({type:"boxplotBoxPath",shape:{},buildPath:function(e,t){var n=t.points,i=0;for(e.moveTo(n[i][0],n[i][1]),i++;i<4;i++)e.lineTo(n[i][0],n[i][1]);for(e.closePath();i<n.length;i++)e.moveTo(n[i][0],n[i][1]),i++,e.lineTo(n[i][0],n[i][1])}});function PL(e,t,n,i,a){var r=e.ends,o=new NL({shape:{points:a?zL(r,i,e):r}});return RL(e,o,t,n,a),o}function RL(e,t,n,i,a){var r=n.hostModel;(0,rh[a?"initProps":"updateProps"])(t,{shape:{points:e.ends}},r,i);var o=n.getItemModel(i),s=o.getModel(LL),l=n.getItemVisual(i,"color"),u=s.getItemStyle(["borderColor"]);u.stroke=l,u.strokeNoScale=!0,t.useStyle(u),t.z2=100;var c=o.getModel(EL).getItemStyle();rh.setHoverStyle(t,c)}function zL(e,t,n){return Ge.map(e,(function(e){return(e=e.slice())[t]=n.initBaseline,e}))}var BL=["itemStyle","borderColor"];var VL=function(e,t){var n=e.get("color");e.eachRawSeriesByType("boxplot",(function(t){var i=n[t.seriesIndex%n.length],a=t.getData();a.setVisual({legendSymbol:"roundRect",color:t.get(BL)||i}),e.isSeriesFiltered(t)||a.each((function(e){var t=a.getItemModel(e);a.setItemVisual(e,{color:t.get(BL,!0)})}))}))},HL=Ph.parsePercent,YL=Ge.each;var FL=function(e){var t=function(e){var t=[],n=[];return e.eachSeriesByType("boxplot",(function(e){var i=e.getBaseAxis(),a=Ge.indexOf(n,i);a<0&&(a=n.length,n[a]=i,t[a]={axis:i,seriesModels:[]}),t[a].seriesModels.push(e)})),t}(e);YL(t,(function(e){var t=e.seriesModels;t.length&&(!function(e){var t,n,i=e.axis,a=e.seriesModels,r=a.length,o=e.boxWidthList=[],s=e.boxOffsetList=[],l=[];if("category"===i.type)n=i.getBandWidth();else{var u=0;YL(a,(function(e){u=Math.max(u,e.getData().count())})),t=i.getExtent(),Math.abs(t[1]-t[0])}YL(a,(function(e){var t=e.get("boxWidth");Ge.isArray(t)||(t=[t,t]),l.push([HL(t[0],n)||0,HL(t[1],n)||0])}));var c=.8*n-2,h=c/r*.3,d=(c-h*(r-1))/r,f=d/2-c/2;YL(a,(function(e,t){s.push(f),f+=h+d,o.push(Math.min(Math.max(d,l[t][0]),l[t][1]))}))}(e),YL(t,(function(t,n){!function(e,t,n){var i=e.coordinateSystem,a=e.getData(),r=n/2,o="horizontal"===e.get("layout")?0:1,s=1-o,l=["x","y"],u=a.mapDimension(l[o]),c=a.mapDimension(l[s],!0);if(null==u||c.length<5)return;for(var h=0;h<a.count();h++){var d=a.get(u,h),f=_(d,c[2],h),p=_(d,c[0],h),g=_(d,c[1],h),m=_(d,c[3],h),v=_(d,c[4],h),y=[];x(y,g,0),x(y,m,1),y.push(p,g,v,m),b(y,p),b(y,v),b(y,f),a.setItemLayout(h,{initBaseline:f[s],ends:y})}function _(e,n,r){var l,u=a.get(n,r),c=[];return c[o]=e,c[s]=u,isNaN(e)||isNaN(u)?l=[NaN,NaN]:(l=i.dataToPoint(c))[o]+=t,l}function x(e,t,n){var i=t.slice(),a=t.slice();i[o]+=r,a[o]-=r,n?e.push(i,a):e.push(a,i)}function b(e,t){var n=t.slice(),i=t.slice();n[o]-=r,i[o]+=r,e.push(n,i)}}(t,e.boxOffsetList[n],e.boxWidthList[n])})))}))};Qx.registerVisual(VL),Qx.registerLayout(FL);var GL=CL.seriesModelMixin,WL=cg.extend({type:"series.candlestick",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,clip:!0,itemStyle:{color:"#c23531",color0:"#314656",borderWidth:1,borderColor:"#c23531",borderColor0:"#314656"},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationUpdate:!1,animationEasing:"linear",animationDuration:300},getShadowDim:function(){return"open"},brushSelector:function(e,t,n){var i=t.getItemLayout(e);return i&&n.rect(i.brushRect)}});Ge.mixin(WL,GL,!0);var jL=Zb.createClipPath,UL=["itemStyle"],ZL=["emphasis","itemStyle"],XL=["color","color0","borderColor","borderColor0"];Ag.extend({type:"candlestick",render:function(e,t,n){this.group.removeClipPath(),this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},incrementalPrepareRender:function(e,t,n){this._clear(),this._updateDrawMode(e)},incrementalRender:function(e,t,n,i){this._isLargeDraw?this._incrementalRenderLarge(e,t):this._incrementalRenderNormal(e,t)},_updateDrawMode:function(e){var t=e.pipelineContext.large;(null==this._isLargeDraw||t^this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},_renderNormal:function(e){var t=e.getData(),n=this._data,i=this.group,a=t.getLayout("isSimpleBox"),r=e.get("clip",!0),o=e.coordinateSystem,s=o.getArea&&o.getArea();this._data||i.removeAll(),t.diff(n).add((function(n){if(t.hasValue(n)){var o,l=t.getItemLayout(n);if(r&&$L(s,l))return;o=KL(l,n,!0),rh.initProps(o,{shape:{points:l.ends}},e,n),QL(o,t,n,a),i.add(o),t.setItemGraphicEl(n,o)}})).update((function(o,l){var u=n.getItemGraphicEl(l);if(t.hasValue(o)){var c=t.getItemLayout(o);r&&$L(s,c)?i.remove(u):(u?rh.updateProps(u,{shape:{points:c.ends}},e,o):u=KL(c),QL(u,t,o,a),i.add(u),t.setItemGraphicEl(o,u))}else i.remove(u)})).remove((function(e){var t=n.getItemGraphicEl(e);t&&i.remove(t)})).execute(),this._data=t},_renderLarge:function(e){this._clear(),tE(e,this.group);var t=e.get("clip",!0)?jL(e.coordinateSystem,!1,e):null;t?this.group.setClipPath(t):this.group.removeClipPath()},_incrementalRenderNormal:function(e,t){for(var n,i=t.getData(),a=i.getLayout("isSimpleBox");null!=(n=e.next());){var r;QL(r=KL(i.getItemLayout(n)),i,n,a),r.incremental=!0,this.group.add(r)}},_incrementalRenderLarge:function(e,t){tE(t,this.group,!0)},remove:function(e){this._clear()},_clear:function(){this.group.removeAll(),this._data=null},dispose:Ge.noop});var qL=Tl.extend({type:"normalCandlestickBox",shape:{},buildPath:function(e,t){var n=t.points;this.__simpleBox?(e.moveTo(n[4][0],n[4][1]),e.lineTo(n[6][0],n[6][1])):(e.moveTo(n[0][0],n[0][1]),e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]),e.lineTo(n[3][0],n[3][1]),e.closePath(),e.moveTo(n[4][0],n[4][1]),e.lineTo(n[5][0],n[5][1]),e.moveTo(n[6][0],n[6][1]),e.lineTo(n[7][0],n[7][1]))}});function KL(e,t,n){var i=e.ends;return new qL({shape:{points:n?JL(i,e):i},z2:100})}function $L(e,t){for(var n=!0,i=0;i<t.ends.length;i++)if(e.contain(t.ends[i][0],t.ends[i][1])){n=!1;break}return n}function QL(e,t,n,i){var a=t.getItemModel(n),r=a.getModel(UL),o=t.getItemVisual(n,"color"),s=t.getItemVisual(n,"borderColor")||o,l=r.getItemStyle(XL);e.useStyle(l),e.style.strokeNoScale=!0,e.style.fill=o,e.style.stroke=s,e.__simpleBox=i;var u=a.getModel(ZL).getItemStyle();rh.setHoverStyle(e,u)}function JL(e,t){return Ge.map(e,(function(e){return(e=e.slice())[1]=t.initBaseline,e}))}var eE=Tl.extend({type:"largeCandlestickBox",shape:{},buildPath:function(e,t){for(var n=t.points,i=0;i<n.length;)if(this.__sign===n[i++]){var a=n[i++];e.moveTo(a,n[i++]),e.lineTo(a,n[i++])}else i+=3}});function tE(e,t,n){var i=e.getData(),a=i.getLayout("largePoints"),r=new eE({shape:{points:a},__sign:1});t.add(r);var o=new eE({shape:{points:a},__sign:-1});t.add(o),nE(1,r,e,i),nE(-1,o,e,i),n&&(r.incremental=!0,o.incremental=!0)}function nE(e,t,n,i){var a=e>0?"P":"N",r=i.getVisual("borderColor"+a)||i.getVisual("color"+a),o=n.getModel(UL).getItemStyle(XL);t.useStyle(o),t.style.fill=null,t.style.stroke=r}var iE=function(e){e&&Ge.isArray(e.series)&&Ge.each(e.series,(function(e){Ge.isObject(e)&&"k"===e.type&&(e.type="candlestick")}))},aE=["itemStyle","borderColor"],rE=["itemStyle","borderColor0"],oE=["itemStyle","color"],sE=["itemStyle","color0"],lE={seriesType:"candlestick",plan:gg(),performRawSeries:!0,reset:function(e,t){if(e.getData().setVisual({legendSymbol:"roundRect",colorP:n(1,e),colorN:n(-1,e),borderColorP:i(1,e),borderColorN:i(-1,e)}),!t.isSeriesFiltered(e))return!e.pipelineContext.large&&{progress:function(e,t){var a;for(;null!=(a=e.next());){var r=t.getItemModel(a),o=t.getItemLayout(a).sign;t.setItemVisual(a,{color:n(o,r),borderColor:i(o,r)})}}};function n(e,t){return t.get(e>0?oE:sE)}function i(e,t){return t.get(e>0?aE:rE)}}},uE=lE,cE=rh.subPixelOptimize,hE=Ph.parsePercent,dE=Ge.retrieve2,fE="undefined"!=typeof Float32Array?Float32Array:Array,pE={seriesType:"candlestick",plan:gg(),reset:function(e){var t=e.coordinateSystem,n=e.getData(),i=function(e,t){var n,i=e.getBaseAxis(),a="category"===i.type?i.getBandWidth():(n=i.getExtent(),Math.abs(n[1]-n[0])/t.count()),r=hE(dE(e.get("barMaxWidth"),a),a),o=hE(dE(e.get("barMinWidth"),1),a),s=e.get("barWidth");return null!=s?hE(s,a):Math.max(Math.min(a/2,r),o)}(e,n),a=["x","y"],r=n.mapDimension(a[0]),o=n.mapDimension(a[1],!0),s=o[0],l=o[1],u=o[2],c=o[3];if(n.setLayout({candleWidth:i,isSimpleBox:i<=1.3}),!(null==r||o.length<4))return{progress:e.pipelineContext.large?function(e,n){var i,a,o=new fE(4*e.count),h=0,d=[],f=[];for(;null!=(a=e.next());){var p=n.get(r,a),g=n.get(s,a),m=n.get(l,a),v=n.get(u,a),y=n.get(c,a);isNaN(p)||isNaN(v)||isNaN(y)?(o[h++]=NaN,h+=3):(o[h++]=gE(n,a,g,m,l),d[0]=p,d[1]=v,i=t.dataToPoint(d,null,f),o[h++]=i?i[0]:NaN,o[h++]=i?i[1]:NaN,d[1]=y,i=t.dataToPoint(d,null,f),o[h++]=i?i[1]:NaN)}n.setLayout("largePoints",o)}:function(e,n){var a;for(;null!=(a=e.next());){var o=n.get(r,a),h=n.get(s,a),d=n.get(l,a),f=n.get(u,a),p=n.get(c,a),g=Math.min(h,d),m=Math.max(h,d),v=w(g,o),y=w(m,o),_=w(f,o),x=w(p,o),b=[];S(b,y,0),S(b,v,1),b.push(T(x),T(y),T(_),T(v)),n.setItemLayout(a,{sign:gE(n,a,h,d,l),initBaseline:h>d?y[1]:v[1],ends:b,brushRect:M(f,p,o)})}function w(e,n){var i=[];return i[0]=n,i[1]=e,isNaN(n)||isNaN(e)?[NaN,NaN]:t.dataToPoint(i)}function S(e,t,n){var a=t.slice(),r=t.slice();a[0]=cE(a[0]+i/2,1,!1),r[0]=cE(r[0]-i/2,1,!0),n?e.push(a,r):e.push(r,a)}function M(e,t,n){var a=w(e,n),r=w(t,n);return a[0]-=i/2,r[0]-=i/2,{x:a[0],y:a[1],width:i,height:r[1]-a[1]}}function T(e){return e[0]=cE(e[0],1),e}}}}};function gE(e,t,n,i,a){return n>i?-1:n<i?1:t>0?e.get(a,t-1)<=i?1:-1:1}var mE=pE;Qx.registerPreprocessor(iE),Qx.registerVisual(uE),Qx.registerLayout(mE),cg.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(e,t){return vy(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",rippleEffect:{period:4,scale:2.5,brushType:"fill"},symbolSize:10}});var vE=X_.createSymbol,yE=rh.Group,_E=Ph.parsePercent;function xE(e,t){var n=t.rippleEffectColor||t.color;e.eachChild((function(e){e.attr({z:t.z,zlevel:t.zlevel,style:{stroke:"stroke"===t.brushType?n:null,fill:"fill"===t.brushType?n:null}})}))}function bE(e,t){yE.call(this);var n=new gb(e,t),i=new yE;this.add(n),this.add(i),i.beforeUpdate=function(){this.attr(n.getScale())},this.updateData(e,t)}var wE=bE.prototype;wE.stopEffectAnimation=function(){this.childAt(1).removeAll()},wE.startEffectAnimation=function(e){for(var t=e.symbolType,n=e.color,i=this.childAt(1),a=0;a<3;a++){var r=vE(t,-1,-1,2,2,n);r.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scale:[.5,.5]});var o=-a/3*e.period+e.effectOffset;r.animate("",!0).when(e.period,{scale:[e.rippleScale/2,e.rippleScale/2]}).delay(o).start(),r.animateStyle(!0).when(e.period,{opacity:0}).delay(o).start(),i.add(r)}xE(i,e)},wE.updateEffectAnimation=function(e){for(var t=this._effectCfg,n=this.childAt(1),i=["symbolType","period","rippleScale"],a=0;a<i.length;a++){var r=i[a];if(t[r]!==e[r])return this.stopEffectAnimation(),void this.startEffectAnimation(e)}xE(n,e)},wE.highlight=function(){this.trigger("emphasis")},wE.downplay=function(){this.trigger("normal")},wE.updateData=function(e,t){var n=e.hostModel;this.childAt(0).updateData(e,t);var i=this.childAt(1),a=e.getItemModel(t),r=e.getItemVisual(t,"symbol"),o=function(e){return Ge.isArray(e)||(e=[+e,+e]),e}(e.getItemVisual(t,"symbolSize")),s=e.getItemVisual(t,"color");i.attr("scale",o),i.traverse((function(e){e.attr({fill:s})}));var l=a.getShallow("symbolOffset");if(l){var u=i.position;u[0]=_E(l[0],o[0]),u[1]=_E(l[1],o[1])}var c=e.getItemVisual(t,"symbolRotate");i.rotation=(c||0)*Math.PI/180||0;var h={};if(h.showEffectOn=n.get("showEffectOn"),h.rippleScale=a.get("rippleEffect.scale"),h.brushType=a.get("rippleEffect.brushType"),h.period=1e3*a.get("rippleEffect.period"),h.effectOffset=t/e.count(),h.z=a.getShallow("z")||0,h.zlevel=a.getShallow("zlevel")||0,h.symbolType=r,h.color=s,h.rippleEffectColor=a.get("rippleEffect.color"),this.off("mouseover").off("mouseout").off("emphasis").off("normal"),"render"===h.showEffectOn)this._effectCfg?this.updateEffectAnimation(h):this.startEffectAnimation(h),this._effectCfg=h;else{this._effectCfg=null,this.stopEffectAnimation();var d=this.childAt(0),f=function(){d.highlight(),"render"!==h.showEffectOn&&this.startEffectAnimation(h)},p=function(){d.downplay(),"render"!==h.showEffectOn&&this.stopEffectAnimation()};this.on("mouseover",f,this).on("mouseout",p,this).on("emphasis",f,this).on("normal",p,this)}this._effectCfg=h},wE.fadeOut=function(e){this.off("mouseover").off("mouseout").off("emphasis").off("normal"),e&&e()},Ge.inherits(bE,yE);var SE=bE;Qx.extendChartView({type:"effectScatter",init:function(){this._symbolDraw=new wb(SE)},render:function(e,t,n){var i=e.getData(),a=this._symbolDraw;a.updateData(i),this.group.add(a.group)},updateTransform:function(e,t,n){var i=e.getData();this.group.dirty();var a=hw().reset(e);a.progress&&a.progress({start:0,end:i.count()},i),this._symbolDraw.updateLayout(i)},_updateGroupTransform:function(e){var t=e.coordinateSystem;t&&t.getRoamTransform&&(this.group.transform=ln.clone(t.getRoamTransform()),this.group.decomposeTransform())},remove:function(e,t){this._symbolDraw&&this._symbolDraw.remove(t)},dispose:function(){}}),Qx.registerVisual(lw("effectScatter","circle")),Qx.registerLayout(hw("effectScatter"));var ME=Ge.concatArray,TE=Ge.mergeAll,IE=Ge.map,AE=Xh.encodeHTML,DE="undefined"==typeof Uint32Array?Array:Uint32Array,CE="undefined"==typeof Float64Array?Array:Float64Array;function OE(e){var t=e.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(e.data=IE(t,(function(e){var t={coords:[e[0].coord,e[1].coord]};return e[0].name&&(t.fromName=e[0].name),e[1].name&&(t.toName=e[1].name),TE([t,e[0],e[1]])})))}var kE=cg.extend({type:"series.lines",dependencies:["grid","polar"],visualColorAccessPath:"lineStyle.color",init:function(e){e.data=e.data||[],OE(e);var t=this._processFlatCoordsArray(e.data);this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset,t.flatCoords&&(e.data=new Float32Array(t.count)),kE.superApply(this,"init",arguments)},mergeOption:function(e){if(e.data=e.data||[],OE(e),e.data){var t=this._processFlatCoordsArray(e.data);this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset,t.flatCoords&&(e.data=new Float32Array(t.count))}kE.superApply(this,"mergeOption",arguments)},appendData:function(e){var t=this._processFlatCoordsArray(e.data);t.flatCoords&&(this._flatCoords?(this._flatCoords=ME(this._flatCoords,t.flatCoords),this._flatCoordsOffset=ME(this._flatCoordsOffset,t.flatCoordsOffset)):(this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset),e.data=new Float32Array(t.count)),this.getRawData().appendData(e.data)},_getCoordsFromItemModel:function(e){var t=this.getData().getItemModel(e);return t.option instanceof Array?t.option:t.getShallow("coords")},getLineCoordsCount:function(e){return this._flatCoordsOffset?this._flatCoordsOffset[2*e+1]:this._getCoordsFromItemModel(e).length},getLineCoords:function(e,t){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[2*e],i=this._flatCoordsOffset[2*e+1],a=0;a<i;a++)t[a]=t[a]||[],t[a][0]=this._flatCoords[n+2*a],t[a][1]=this._flatCoords[n+2*a+1];return i}var r=this._getCoordsFromItemModel(e);for(a=0;a<r.length;a++)t[a]=t[a]||[],t[a][0]=r[a][0],t[a][1]=r[a][1];return r.length},_processFlatCoordsArray:function(e){var t=0;if(this._flatCoords&&(t=this._flatCoords.length),"number"==typeof e[0]){for(var n=e.length,i=new DE(n),a=new CE(n),r=0,o=0,s=0,l=0;l<n;){s++;var u=e[l++];i[o++]=r+t,i[o++]=u;for(var c=0;c<u;c++){var h=e[l++],d=e[l++];a[r++]=h,a[r++]=d}}return{flatCoordsOffset:new Uint32Array(i.buffer,0,o),flatCoords:a,count:s}}return{flatCoordsOffset:null,flatCoords:null,count:e.length}},getInitialData:function(e,t){var n=new Bv(["value"],this);return n.hasItemOption=!1,n.initData(e.data,[],(function(e,t,i,a){if(e instanceof Array)return NaN;n.hasItemOption=!0;var r=e.value;return null!=r?r instanceof Array?r[a]:r:void 0})),n},formatTooltip:function(e){var t=this.getData().getItemModel(e),n=t.get("name");if(n)return n;var i=t.get("fromName"),a=t.get("toName"),r=[];return null!=i&&r.push(i),null!=a&&r.push(a),AE(r.join(" > "))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var e=this.option.progressive;return null==e?this.option.large?1e4:this.get("progressive"):e},getProgressiveThreshold:function(){var e=this.option.progressiveThreshold;return null==e?this.option.large?2e4:this.get("progressiveThreshold"):e},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}}}),LE=X_.createSymbol;function EE(e,t,n){rh.Group.call(this),this.add(this.createLine(e,t,n)),this._updateEffectSymbol(e,t)}var NE=EE.prototype;NE.createLine=function(e,t,n){return new hC(e,t,n)},NE._updateEffectSymbol=function(e,t){var n=e.getItemModel(t).getModel("effect"),i=n.get("symbolSize"),a=n.get("symbol");Ge.isArray(i)||(i=[i,i]);var r=n.get("color")||e.getItemVisual(t,"color"),o=this.childAt(1);this._symbolType!==a&&(this.remove(o),(o=LE(a,-.5,-.5,1,1,r)).z2=100,o.culling=!0,this.add(o)),o&&(o.setStyle("shadowColor",r),o.setStyle(n.getItemStyle(["color"])),o.attr("scale",i),o.setColor(r),o.attr("scale",i),this._symbolType=a,this._symbolScale=i,this._updateEffectAnimation(e,n,t))},NE._updateEffectAnimation=function(e,t,n){var i=this.childAt(1);if(i){var a=this,r=e.getItemLayout(n),o=1e3*t.get("period"),s=t.get("loop"),l=t.get("constantSpeed"),u=Ge.retrieve(t.get("delay"),(function(t){return t/e.count()*o/3})),c="function"==typeof u;if(i.ignore=!0,this.updateAnimationPoints(i,r),l>0&&(o=this.getLineLength(i)/l*1e3),o!==this._period||s!==this._loop){i.stopAnimation();var h=u;c&&(h=u(n)),i.__t>0&&(h=-o*i.__t),i.__t=0;var d=i.animate("",s).when(o,{__t:1}).delay(h).during((function(){a.updateSymbolPosition(i)}));s||d.done((function(){a.remove(i)})),d.start()}this._period=o,this._loop=s}},NE.getLineLength=function(e){return dt.dist(e.__p1,e.__cp1)+dt.dist(e.__cp1,e.__p2)},NE.updateAnimationPoints=function(e,t){e.__p1=t[0],e.__p2=t[1],e.__cp1=t[2]||[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]},NE.updateData=function(e,t,n){this.childAt(0).updateData(e,t,n),this._updateEffectSymbol(e,t)},NE.updateSymbolPosition=function(e){var t=e.__p1,n=e.__p2,i=e.__cp1,a=e.__t,r=e.position,o=[r[0],r[1]],s=ws.quadraticAt,l=ws.quadraticDerivativeAt;r[0]=s(t[0],i[0],n[0],a),r[1]=s(t[1],i[1],n[1],a);var u=l(t[0],i[0],n[0],a),c=l(t[1],i[1],n[1],a);if(e.rotation=-Math.atan2(c,u)-Math.PI/2,"line"===this._symbolType||"rect"===this._symbolType||"roundRect"===this._symbolType)if(void 0!==e.__lastT&&e.__lastT<e.__t){var h=1.05*dt.dist(o,r);e.attr("scale",[e.scale[0],h]),1===a&&(r[0]=o[0]+(r[0]-o[0])/2,r[1]=o[1]+(r[1]-o[1])/2)}else if(1===e.__lastT){h=2*dt.dist(t,r);e.attr("scale",[e.scale[0],h])}else e.attr("scale",this._symbolScale);e.__lastT=e.__t,e.ignore=!1},NE.updateLayout=function(e,t){this.childAt(0).updateLayout(e,t);var n=e.getItemModel(t).getModel("effect");this._updateEffectAnimation(e,n,t)},Ge.inherits(EE,rh.Group);var PE=EE;function RE(e,t,n){rh.Group.call(this),this._createPolyline(e,t,n)}var zE=RE.prototype;zE._createPolyline=function(e,t,n){var i=e.getItemLayout(t),a=new rh.Polyline({shape:{points:i}});this.add(a),this._updateCommonStl(e,t,n)},zE.updateData=function(e,t,n){var i=e.hostModel,a=this.childAt(0),r={shape:{points:e.getItemLayout(t)}};rh.updateProps(a,r,i,t),this._updateCommonStl(e,t,n)},zE._updateCommonStl=function(e,t,n){var i=this.childAt(0),a=e.getItemModel(t),r=e.getItemVisual(t,"color"),o=n&&n.lineStyle,s=n&&n.hoverLineStyle;n&&!e.hasItemOption||(o=a.getModel("lineStyle").getLineStyle(),s=a.getModel("emphasis.lineStyle").getLineStyle()),i.useStyle(Ge.defaults({strokeNoScale:!0,fill:"none",stroke:r},o)),i.hoverStyle=s,rh.setHoverStyle(this)},zE.updateLayout=function(e,t){this.childAt(0).setShape("points",e.getItemLayout(t))},Ge.inherits(RE,rh.Group);var BE=RE;function VE(e,t,n){PE.call(this,e,t,n),this._lastFrame=0,this._lastFramePercent=0}var HE=VE.prototype;HE.createLine=function(e,t,n){return new BE(e,t,n)},HE.updateAnimationPoints=function(e,t){this._points=t;for(var n=[0],i=0,a=1;a<t.length;a++){var r=t[a-1],o=t[a];i+=dt.dist(r,o),n.push(i)}if(0!==i){for(a=0;a<n.length;a++)n[a]/=i;this._offsets=n,this._length=i}},HE.getLineLength=function(e){return this._length},HE.updateSymbolPosition=function(e){var t=e.__t,n=this._points,i=this._offsets,a=n.length;if(i){var r=this._lastFrame;if(t<this._lastFramePercent){for(o=Math.min(r+1,a-1);o>=0&&!(i[o]<=t);o--);o=Math.min(o,a-2)}else{for(var o=r;o<a&&!(i[o]>t);o++);o=Math.min(o-1,a-2)}dt.lerp(e.position,n[o],n[o+1],(t-i[o])/(i[o+1]-i[o]));var s=n[o+1][0]-n[o][0],l=n[o+1][1]-n[o][1];e.rotation=-Math.atan2(l,s)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=t,e.ignore=!1}},Ge.inherits(VE,PE);var YE=VE,FE=rh.extendShape({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(e,t){var n=t.segs,i=t.curveness;if(t.polyline)for(var a=0;a<n.length;){var r=n[a++];if(r>0){e.moveTo(n[a++],n[a++]);for(var o=1;o<r;o++)e.lineTo(n[a++],n[a++])}}else for(a=0;a<n.length;){var s=n[a++],l=n[a++],u=n[a++],c=n[a++];if(e.moveTo(s,l),i>0){var h=(s+u)/2-(l-c)*i,d=(l+c)/2-(u-s)*i;e.quadraticCurveTo(h,d,u,c)}else e.lineTo(u,c)}},findDataIndex:function(e,t){var n=this.shape,i=n.segs,a=n.curveness;if(n.polyline)for(var r=0,o=0;o<i.length;){var s=i[o++];if(s>0)for(var l=i[o++],u=i[o++],c=1;c<s;c++){var h=i[o++],d=i[o++];if(el.containStroke(l,u,h,d))return r}r++}else for(r=0,o=0;o<i.length;){l=i[o++],u=i[o++],h=i[o++],d=i[o++];if(a>0){var f=(l+h)/2-(u-d)*a,p=(u+d)/2-(h-l)*a;if(il.containStroke(l,u,f,p,h,d))return r}else if(el.containStroke(l,u,h,d))return r;r++}return-1}});function GE(){this.group=new rh.Group}var WE=GE.prototype;WE.isPersistent=function(){return!this._incremental},WE.updateData=function(e){this.group.removeAll();var t=new FE({rectHover:!0,cursor:"default"});t.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(t,e),this.group.add(t),this._incremental=null},WE.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clearIncremental(),e.count()>5e5?(this._incremental||(this._incremental=new Zu({silent:!0})),this.group.add(this._incremental)):this._incremental=null},WE.incrementalUpdate=function(e,t){var n=new FE;n.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(n,t,!!this._incremental),this._incremental?this._incremental.addDisplayable(n,!0):(n.rectHover=!0,n.cursor="default",n.__startIndex=e.start,this.group.add(n))},WE.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},WE._setCommon=function(e,t,n){var i=t.hostModel;e.setShape({polyline:i.get("polyline"),curveness:i.get("lineStyle.curveness")}),e.useStyle(i.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0;var a=t.getVisual("color");a&&e.setStyle("stroke",a),e.setStyle("fill"),n||(e.seriesIndex=i.seriesIndex,e.on("mousemove",(function(t){e.dataIndex=null;var n=e.findDataIndex(t.offsetX,t.offsetY);n>0&&(e.dataIndex=n+e.__startIndex)})))},WE._clearIncremental=function(){var e=this._incremental;e&&e.clearDisplaybles()};var jE=GE,UE={seriesType:"lines",plan:gg(),reset:function(e){var t=e.coordinateSystem,n=e.get("polyline"),i=e.pipelineContext.large;return{progress:function(a,r){var o=[];if(i){var s,l=a.end-a.start;if(n){for(var u=0,c=a.start;c<a.end;c++)u+=e.getLineCoordsCount(c);s=new Float32Array(l+2*u)}else s=new Float32Array(4*l);var h=0,d=[];for(c=a.start;c<a.end;c++){var f=e.getLineCoords(c,o);n&&(s[h++]=f);for(var p=0;p<f;p++)d=t.dataToPoint(o[p],!1,d),s[h++]=d[0],s[h++]=d[1]}r.setLayout("linesPoints",s)}else for(c=a.start;c<a.end;c++){var g=r.getItemModel(c),m=(f=e.getLineCoords(c,o),[]);if(n)for(var v=0;v<f;v++)m.push(t.dataToPoint(o[v]));else{m[0]=t.dataToPoint(o[0]),m[1]=t.dataToPoint(o[1]);var y=g.get("lineStyle.curveness");+y&&(m[2]=[(m[0][0]+m[1][0])/2-(m[0][1]-m[1][1])*y,(m[0][1]+m[1][1])/2-(m[1][0]-m[0][0])*y])}r.setItemLayout(c,m)}}}}},ZE=UE,XE=Zb.createClipPath;function qE(e){return e instanceof Array||(e=[e,e]),e}Qx.extendChartView({type:"lines",init:function(){},render:function(e,t,n){var i=e.getData(),a=this._updateLineDraw(i,e),r=e.get("zlevel"),o=e.get("effect.trailLength"),s=n.getZr(),l="svg"===s.painter.getType();l||s.painter.getLayer(r).clear(!0),null==this._lastZlevel||l||s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(e)&&o&&(l||s.configLayer(r,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(o/10+.9,1),0)})),a.updateData(i);var u=e.get("clip",!0)&&XE(e.coordinateSystem,!1,e);u?this.group.setClipPath(u):this.group.removeClipPath(),this._lastZlevel=r,this._finished=!0},incrementalPrepareRender:function(e,t,n){var i=e.getData();this._updateLineDraw(i,e).incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},incrementalRender:function(e,t,n){this._lineDraw.incrementalUpdate(e,t.getData()),this._finished=e.end===t.getData().count()},updateTransform:function(e,t,n){var i=e.getData(),a=e.pipelineContext;if(!this._finished||a.large||a.progressiveRender)return{update:!0};var r=ZE.reset(e);r.progress&&r.progress({start:0,end:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},_updateLineDraw:function(e,t){var n=this._lineDraw,i=this._showEffect(t),a=!!t.get("polyline"),r=t.pipelineContext.large;return n&&i===this._hasEffet&&a===this._isPolyline&&r===this._isLargeDraw||(n&&n.remove(),n=this._lineDraw=r?new jE:new vC(a?i?YE:BE:i?PE:hC),this._hasEffet=i,this._isPolyline=a,this._isLargeDraw=r,this.group.removeAll()),this.group.add(n.group),n},_showEffect:function(e){return!!e.get("effect.show")},_clearLayer:function(e){var t=e.getZr();"svg"===t.painter.getType()||null==this._lastZlevel||t.painter.getLayer(this._lastZlevel).clear(!0)},remove:function(e,t){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(t)},dispose:function(){}});var KE="lineStyle.opacity".split("."),$E={seriesType:"lines",reset:function(e,t,n){var i=qE(e.get("symbol")),a=qE(e.get("symbolSize")),r=e.getData();return r.setVisual("fromSymbol",i&&i[0]),r.setVisual("toSymbol",i&&i[1]),r.setVisual("fromSymbolSize",a&&a[0]),r.setVisual("toSymbolSize",a&&a[1]),r.setVisual("opacity",e.get(KE)),{dataEach:r.hasItemOption?function(e,t){var n=e.getItemModel(t),i=qE(n.getShallow("symbol",!0)),a=qE(n.getShallow("symbolSize",!0)),r=n.get(KE);i[0]&&e.setItemVisual(t,"fromSymbol",i[0]),i[1]&&e.setItemVisual(t,"toSymbol",i[1]),a[0]&&e.setItemVisual(t,"fromSymbolSize",a[0]),a[1]&&e.setItemVisual(t,"toSymbolSize",a[1]),e.setItemVisual(t,"opacity",r)}:null}}};Qx.registerLayout(ZE),Qx.registerVisual($E),cg.extend({type:"series.heatmap",getInitialData:function(e,t){return vy(this.getSource(),this,{generateCoord:"value"})},preventIncremental:function(){var e=kf.get(this.get("coordinateSystem"));if(e&&e.dimensions)return"lng"===e.dimensions[0]&&"lat"===e.dimensions[1]},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0}});function QE(){var e=Ge.createCanvas();this.canvas=e,this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={}}QE.prototype={update:function(e,t,n,i,a,r){var o=this._getBrush(),s=this._getGradient(e,a,"inRange"),l=this._getGradient(e,a,"outOfRange"),u=this.pointSize+this.blurSize,c=this.canvas,h=c.getContext("2d"),d=e.length;c.width=t,c.height=n;for(var f=0;f<d;++f){var p=e[f],g=p[0],m=p[1],v=i(p[2]);h.globalAlpha=v,h.drawImage(o,g-u,m-u)}if(!c.width||!c.height)return c;for(var y=h.getImageData(0,0,c.width,c.height),_=y.data,x=0,b=_.length,w=this.minOpacity,S=this.maxOpacity-w;x<b;){v=_[x+3]/256;var M=4*Math.floor(255*v);if(v>0){var T=r(v)?s:l;v>0&&(v=v*S+w),_[x++]=T[M],_[x++]=T[M+1],_[x++]=T[M+2],_[x++]=T[M+3]*v*256}else x+=4}return h.putImageData(y,0,0),c},_getBrush:function(){var e=this._brushCanvas||(this._brushCanvas=Ge.createCanvas()),t=this.pointSize+this.blurSize,n=2*t;e.width=n,e.height=n;var i=e.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-t,t,this.pointSize,0,2*Math.PI,!0),i.closePath(),i.fill(),e},_getGradient:function(e,t,n){for(var i=this._gradientPixels,a=i[n]||(i[n]=new Uint8ClampedArray(1024)),r=[0,0,0,0],o=0,s=0;s<256;s++)t[n](s/255,!0,r),a[o++]=r[0],a[o++]=r[1],a[o++]=r[2],a[o++]=r[3];return a}};var JE=QE;Qx.extendChartView({type:"heatmap",render:function(e,t,n){var i;t.eachComponent("visualMap",(function(t){t.eachTargetSeries((function(n){n===e&&(i=t)}))})),this.group.removeAll(),this._incrementalDisplayable=null;var a=e.coordinateSystem;"cartesian2d"===a.type||"calendar"===a.type?this._renderOnCartesianAndCalendar(e,n,0,e.getData().count()):function(e){var t=e.dimensions;return"lng"===t[0]&&"lat"===t[1]}(a)&&this._renderOnGeo(a,e,i,n)},incrementalPrepareRender:function(e,t,n){this.group.removeAll()},incrementalRender:function(e,t,n,i){t.coordinateSystem&&this._renderOnCartesianAndCalendar(t,i,e.start,e.end,!0)},_renderOnCartesianAndCalendar:function(e,t,n,i,a){var r,o,s=e.coordinateSystem;if("cartesian2d"===s.type){var l=s.getAxis("x"),u=s.getAxis("y");r=l.getBandWidth(),o=u.getBandWidth()}for(var c=this.group,h=e.getData(),d="itemStyle",f="emphasis.itemStyle",p="label",g="emphasis.label",m=e.getModel(d).getItemStyle(["color"]),v=e.getModel(f).getItemStyle(),y=e.getModel(p),_=e.getModel(g),x=s.type,b="cartesian2d"===x?[h.mapDimension("x"),h.mapDimension("y"),h.mapDimension("value")]:[h.mapDimension("time"),h.mapDimension("value")],w=n;w<i;w++){var S;if("cartesian2d"===x){if(isNaN(h.get(b[2],w)))continue;var M=s.dataToPoint([h.get(b[0],w),h.get(b[1],w)]);S=new rh.Rect({shape:{x:Math.floor(Math.round(M[0])-r/2),y:Math.floor(Math.round(M[1])-o/2),width:Math.ceil(r),height:Math.ceil(o)},style:{fill:h.getItemVisual(w,"color"),opacity:h.getItemVisual(w,"opacity")}})}else{if(isNaN(h.get(b[1],w)))continue;S=new rh.Rect({z2:1,shape:s.dataToRect([h.get(b[0],w)]).contentShape,style:{fill:h.getItemVisual(w,"color"),opacity:h.getItemVisual(w,"opacity")}})}var T=h.getItemModel(w);h.hasItemOption&&(m=T.getModel(d).getItemStyle(["color"]),v=T.getModel(f).getItemStyle(),y=T.getModel(p),_=T.getModel(g));var I=e.getRawValue(w),A="-";I&&null!=I[2]&&(A=I[2]),rh.setLabelStyle(m,v,y,_,{labelFetcher:e,labelDataIndex:w,defaultText:A,isRectText:!0}),S.setStyle(m),rh.setHoverStyle(S,h.hasItemOption?v:Ge.extend({},v)),S.incremental=a,a&&(S.useHoverLayer=!0),c.add(S),h.setItemGraphicEl(w,S)}},_renderOnGeo:function(e,t,n,i){var a=n.targetVisuals.inRange,r=n.targetVisuals.outOfRange,o=t.getData(),s=this._hmLayer||this._hmLayer||new JE;s.blurSize=t.get("blurSize"),s.pointSize=t.get("pointSize"),s.minOpacity=t.get("minOpacity"),s.maxOpacity=t.get("maxOpacity");var l=e.getViewRect().clone(),u=e.getRoamTransform();l.applyTransform(u);var c=Math.max(l.x,0),h=Math.max(l.y,0),d=Math.min(l.width+l.x,i.getWidth()),f=Math.min(l.height+l.y,i.getHeight()),p=d-c,g=f-h,m=[o.mapDimension("lng"),o.mapDimension("lat"),o.mapDimension("value")],v=o.mapArray(m,(function(t,n,i){var a=e.dataToPoint([t,n]);return a[0]-=c,a[1]-=h,a.push(i),a})),y=n.getExtent(),_="visualMap.continuous"===n.type?function(e,t){var n=e[1]-e[0];return t=[(t[0]-e[0])/n,(t[1]-e[0])/n],function(e){return e>=t[0]&&e<=t[1]}}(y,n.option.range):function(e,t,n){var i=e[1]-e[0],a=(t=Ge.map(t,(function(t){return{interval:[(t.interval[0]-e[0])/i,(t.interval[1]-e[0])/i]}}))).length,r=0;return function(e){for(var i=r;i<a;i++)if((o=t[i].interval)[0]<=e&&e<=o[1]){r=i;break}if(i===a)for(i=r-1;i>=0;i--){var o;if((o=t[i].interval)[0]<=e&&e<=o[1]){r=i;break}}return i>=0&&i<a&&n[i]}}(y,n.getPieceList(),n.option.selected);s.update(v,p,g,a.color.getNormalizer(),{inRange:a.color.getColorMapper(),outOfRange:r.color.getColorMapper()},_);var x=new rh.Image({style:{width:p,height:g,x:c,y:h,image:s.canvas},silent:!0});this.group.add(x)},dispose:function(){}});var eN=VS.extend({type:"series.pictorialBar",dependencies:["grid"],defaultOption:{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,hoverAnimation:!1},getInitialData:function(e){return e.stack=null,eN.superApply(this,"getInitialData",arguments)}}),tN=X_.createSymbol,nN=Ph.parsePercent,iN=Ph.isNumeric,aN=GS.setLabel,rN=["itemStyle","borderWidth"],oN=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],sN=new rh.Circle;function lN(e,t,n,i){var a=e.getItemLayout(t),r=n.get("symbolRepeat"),o=n.get("symbolClip"),s=n.get("symbolPosition")||"start",l=(n.get("symbolRotate")||0)*Math.PI/180||0,u=n.get("symbolPatternSize")||2,c=n.isAnimationEnabled(),h={dataIndex:t,layout:a,itemModel:n,symbolType:e.getItemVisual(t,"symbol")||"circle",color:e.getItemVisual(t,"color"),symbolClip:o,symbolRepeat:r,symbolRepeatDirection:n.get("symbolRepeatDirection"),symbolPatternSize:u,rotation:l,animationModel:c?n:null,hoverAnimation:c&&n.get("hoverAnimation"),z2:n.getShallow("z",!0)||0};!function(e,t,n,i,a){var r,o=i.valueDim,s=e.get("symbolBoundingData"),l=i.coordSys.getOtherAxis(i.coordSys.getBaseAxis()),u=l.toGlobalCoord(l.dataToCoord(0)),c=1-+(n[o.wh]<=0);if(Ge.isArray(s)){var h=[uN(l,s[0])-u,uN(l,s[1])-u];h[1]<h[0]&&h.reverse(),r=h[c]}else r=null!=s?uN(l,s)-u:t?i.coordSysExtent[o.index][c]-u:n[o.wh];a.boundingLength=r,t&&(a.repeatCutLength=n[o.wh]);a.pxSign=r>0?1:r<0?-1:0}(n,r,a,i,h),function(e,t,n,i,a,r,o,s,l,u){var c=l.valueDim,h=l.categoryDim,d=Math.abs(n[h.wh]),f=e.getItemVisual(t,"symbolSize");Ge.isArray(f)?f=f.slice():(null==f&&(f="100%"),f=[f,f]);f[h.index]=nN(f[h.index],d),f[c.index]=nN(f[c.index],i?d:Math.abs(r)),u.symbolSize=f;var p=u.symbolScale=[f[0]/s,f[1]/s];p[c.index]*=(l.isHorizontal?-1:1)*o}(e,t,a,r,0,h.boundingLength,h.pxSign,u,i,h),function(e,t,n,i,a){var r=e.get(rN)||0;r&&(sN.attr({scale:t.slice(),rotation:n}),sN.updateTransform(),r/=sN.getLineScale(),r*=t[i.valueDim.index]);a.valueLineWidth=r}(n,h.symbolScale,l,i,h);var d=h.symbolSize,f=n.get("symbolOffset");return Ge.isArray(f)&&(f=[nN(f[0],d[0]),nN(f[1],d[1])]),function(e,t,n,i,a,r,o,s,l,u,c,h){var d=c.categoryDim,f=c.valueDim,p=h.pxSign,g=Math.max(t[f.index]+s,0),m=g;if(i){var v=Math.abs(l),y=Ge.retrieve(e.get("symbolMargin"),"15%")+"",_=!1;y.lastIndexOf("!")===y.length-1&&(_=!0,y=y.slice(0,y.length-1)),y=nN(y,t[f.index]);var x=Math.max(g+2*y,0),b=_?0:2*y,w=iN(i),S=w?i:TN((v+b)/x);x=g+2*(y=(v-S*g)/2/(_?S:S-1)),b=_?0:2*y,w||"fixed"===i||(S=u?TN((Math.abs(u)+b)/x):0),m=S*x-b,h.repeatTimes=S,h.symbolMargin=y}var M=p*(m/2),T=h.pathPosition=[];T[d.index]=n[d.wh]/2,T[f.index]="start"===o?M:"end"===o?l-M:l/2,r&&(T[0]+=r[0],T[1]+=r[1]);var I=h.bundlePosition=[];I[d.index]=n[d.xy],I[f.index]=n[f.xy];var A=h.barRectShape=Ge.extend({},n);A[f.wh]=p*Math.max(Math.abs(n[f.wh]),Math.abs(T[f.index]+M)),A[d.wh]=n[d.wh];var D=h.clipShape={};D[d.xy]=-n[d.xy],D[d.wh]=c.ecSize[d.wh],D[f.xy]=0,D[f.wh]=n[f.wh]}(n,d,a,r,0,f,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,i,h),h}function uN(e,t){return e.toGlobalCoord(e.dataToCoord(e.scale.parse(t)))}function cN(e){var t=e.symbolPatternSize,n=tN(e.symbolType,-t/2,-t/2,t,t,e.color);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function hN(e,t,n,i){var a=e.__pictorialBundle,r=n.symbolSize,o=n.valueLineWidth,s=n.pathPosition,l=t.valueDim,u=n.repeatTimes||0,c=0,h=r[t.valueDim.index]+o+2*n.symbolMargin;for(wN(e,(function(e){e.__pictorialAnimationIndex=c,e.__pictorialRepeatTimes=u,c<u?SN(e,null,p(c),n,i):SN(e,null,{scale:[0,0]},n,i,(function(){a.remove(e)})),yN(e,n),c++}));c<u;c++){var d=cN(n);d.__pictorialAnimationIndex=c,d.__pictorialRepeatTimes=u,a.add(d);var f=p(c);SN(d,{position:f.position,scale:[0,0]},{scale:f.scale,rotation:f.rotation},n,i),d.on("mouseover",g).on("mouseout",m),yN(d,n)}function p(e){var t=s.slice(),i=n.pxSign,a=e;return("start"===n.symbolRepeatDirection?i>0:i<0)&&(a=u-1-e),t[l.index]=h*(a-u/2+.5)+s[l.index],{position:t,scale:n.symbolScale.slice(),rotation:n.rotation}}function g(){wN(e,(function(e){e.trigger("emphasis")}))}function m(){wN(e,(function(e){e.trigger("normal")}))}}function dN(e,t,n,i){var a=e.__pictorialBundle,r=e.__pictorialMainPath;r?SN(r,null,{position:n.pathPosition.slice(),scale:n.symbolScale.slice(),rotation:n.rotation},n,i):(r=e.__pictorialMainPath=cN(n),a.add(r),SN(r,{position:n.pathPosition.slice(),scale:[0,0],rotation:n.rotation},{scale:n.symbolScale.slice()},n,i),r.on("mouseover",(function(){this.trigger("emphasis")})).on("mouseout",(function(){this.trigger("normal")}))),yN(r,n)}function fN(e,t,n){var i=Ge.extend({},t.barRectShape),a=e.__pictorialBarRect;a?SN(a,null,{shape:i},t,n):(a=e.__pictorialBarRect=new rh.Rect({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),e.add(a))}function pN(e,t,n,i){if(n.symbolClip){var a=e.__pictorialClipPath,r=Ge.extend({},n.clipShape),o=t.valueDim,s=n.animationModel,l=n.dataIndex;if(a)rh.updateProps(a,{shape:r},s,l);else{r[o.wh]=0,a=new rh.Rect({shape:r}),e.__pictorialBundle.setClipPath(a),e.__pictorialClipPath=a;var u={};u[o.wh]=n.clipShape[o.wh],rh[i?"updateProps":"initProps"](a,{shape:u},s,l)}}}function gN(e,t){var n=e.getItemModel(t);return n.getAnimationDelayParams=mN,n.isAnimationEnabled=vN,n}function mN(e){return{index:e.__pictorialAnimationIndex,count:e.__pictorialRepeatTimes}}function vN(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function yN(e,t){e.off("emphasis").off("normal");var n=t.symbolScale.slice();t.hoverAnimation&&e.on("emphasis",(function(){this.animateTo({scale:[1.1*n[0],1.1*n[1]]},400,"elasticOut")})).on("normal",(function(){this.animateTo({scale:n.slice()},400,"elasticOut")}))}function _N(e,t,n,i){var a=new rh.Group,r=new rh.Group;return a.add(r),a.__pictorialBundle=r,r.attr("position",n.bundlePosition.slice()),n.symbolRepeat?hN(a,t,n):dN(a,0,n),fN(a,n,i),pN(a,t,n,i),a.__pictorialShapeStr=bN(e,n),a.__pictorialSymbolMeta=n,a}function xN(e,t,n,i){var a=i.__pictorialBarRect;a&&(a.style.text=null);var r=[];wN(i,(function(e){r.push(e)})),i.__pictorialMainPath&&r.push(i.__pictorialMainPath),i.__pictorialClipPath&&(n=null),Ge.each(r,(function(e){rh.updateProps(e,{scale:[0,0]},n,t,(function(){i.parent&&i.parent.remove(i)}))})),e.setItemGraphicEl(t,null)}function bN(e,t){return[e.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function wN(e,t,n){Ge.each(e.__pictorialBundle.children(),(function(i){i!==e.__pictorialBarRect&&t.call(n,i)}))}function SN(e,t,n,i,a,r){t&&e.attr(t),i.symbolClip&&!a?n&&e.attr(n):n&&rh[a?"updateProps":"initProps"](e,n,i.animationModel,i.dataIndex,r)}function MN(e,t,n){var i=n.color,a=n.dataIndex,r=n.itemModel,o=r.getModel("itemStyle").getItemStyle(["color"]),s=r.getModel("emphasis.itemStyle").getItemStyle(),l=r.getShallow("cursor");wN(e,(function(e){e.setColor(i),e.setStyle(Ge.defaults({fill:i,opacity:n.opacity},o)),rh.setHoverStyle(e,s),l&&(e.cursor=l),e.z2=n.z2}));var u={},c=t.valueDim.posDesc[+(n.boundingLength>0)],h=e.__pictorialBarRect;aN(h.style,u,r,i,t.seriesModel,a,c),rh.setHoverStyle(h,u)}function TN(e){var t=Math.round(e);return Math.abs(e-t)<1e-4?t:Math.ceil(e)}Qx.extendChartView({type:"pictorialBar",render:function(e,t,n){var i=this.group,a=e.getData(),r=this._data,o=e.coordinateSystem,s=!!o.getBaseAxis().isHorizontal(),l=o.grid.getRect(),u={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:e,coordSys:o,coordSysExtent:[[l.x,l.x+l.width],[l.y,l.y+l.height]],isHorizontal:s,valueDim:oN[+s],categoryDim:oN[1-s]};return a.diff(r).add((function(e){if(a.hasValue(e)){var t=gN(a,e),n=lN(a,e,t,u),r=_N(a,u,n);a.setItemGraphicEl(e,r),i.add(r),MN(r,u,n)}})).update((function(e,t){var n=r.getItemGraphicEl(t);if(a.hasValue(e)){var o=gN(a,e),s=lN(a,e,o,u),l=bN(a,s);n&&l!==n.__pictorialShapeStr&&(i.remove(n),a.setItemGraphicEl(e,null),n=null),n?function(e,t,n){var i=n.animationModel,a=n.dataIndex,r=e.__pictorialBundle;rh.updateProps(r,{position:n.bundlePosition.slice()},i,a),n.symbolRepeat?hN(e,t,n,!0):dN(e,t,n,!0);fN(e,n,!0),pN(e,t,n,!0)}(n,u,s):n=_N(a,u,s,!0),a.setItemGraphicEl(e,n),n.__pictorialSymbolMeta=s,i.add(n),MN(n,u,s)}else i.remove(n)})).remove((function(e){var t=r.getItemGraphicEl(e);t&&xN(r,e,t.__pictorialSymbolMeta.animationModel,t)})).execute(),this._data=a,this.group},dispose:Ge.noop,remove:function(e,t){var n=this.group,i=this._data;e.get("animation")?i&&i.eachItemGraphicEl((function(t){xN(i,t.dataIndex,e,t)})):n.removeAll()}});var IN=t_.layout;Qx.registerLayout(Ge.curry(IN,"pictorialBar")),Qx.registerVisual(lw("pictorialBar","roundRect"));var AN=function(e,t,n,i,a){Nx.call(this,e,t,n),this.type=i||"value",this.position=a||"bottom",this.orient=null};AN.prototype={constructor:AN,model:null,isHorizontal:function(){var e=this.position;return"top"===e||"bottom"===e},pointToData:function(e,t){return this.coordinateSystem.pointToData(e,t)[0]},toGlobalCoord:null,toLocalCoord:null},Ge.inherits(AN,Nx);var DN=AN,CN=sd.getLayoutRect,ON=Ge.each;function kN(e,t,n){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(e,t,n),this.model=e}kN.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:kN,_init:function(e,t,n){var i=this.dimension,a=new DN(i,N_.createScaleByModel(e),[0,0],e.get("type"),e.get("position")),r="category"===a.type;a.onBand=r&&e.get("boundaryGap"),a.inverse=e.get("inverse"),a.orient=e.get("orient"),e.axis=a,a.model=e,a.coordinateSystem=this,this._axis=a},update:function(e,t){e.eachSeries((function(e){if(e.coordinateSystem===this){var t=e.getData();ON(t.mapDimension(this.dimension,!0),(function(e){this._axis.scale.unionExtentFromData(t,e)}),this),N_.niceScaleExtent(this._axis.scale,this._axis.model)}}),this)},resize:function(e,t){this._rect=CN({left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")},{width:t.getWidth(),height:t.getHeight()}),this._adjustAxis()},getRect:function(){return this._rect},_adjustAxis:function(){var e=this._rect,t=this._axis,n=t.isHorizontal(),i=n?[0,e.width]:[0,e.height],a=t.reverse?1:0;t.setExtent(i[a],i[1-a]),this._updateAxisTransform(t,n?e.x:e.y)},_updateAxisTransform:function(e,t){var n=e.getExtent(),i=n[0]+n[1],a=e.isHorizontal();e.toGlobalCoord=a?function(e){return e+t}:function(e){return i-e+t},e.toLocalCoord=a?function(e){return e-t}:function(e){return i-e+t}},getAxis:function(){return this._axis},getBaseAxis:function(){return this._axis},getAxes:function(){return[this._axis]},getTooltipAxes:function(){return{baseAxes:[this.getAxis()]}},containPoint:function(e){var t=this.getRect(),n=this.getAxis();return"horizontal"===n.orient?n.contain(n.toLocalCoord(e[0]))&&e[1]>=t.y&&e[1]<=t.y+t.height:n.contain(n.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},pointToData:function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e["horizontal"===t.orient?0:1]))]},dataToPoint:function(e){var t=this.getAxis(),n=this.getRect(),i=[],a="horizontal"===t.orient?0:1;return e instanceof Array&&(e=e[0]),i[a]=t.toGlobalCoord(t.dataToCoord(+e)),i[1-a]=0===a?n.y+n.height/2:n.x+n.width/2,i}};var LN=kN;kf.register("single",{create:function(e,t){var n=[];return e.eachComponent("singleAxis",(function(i,a){var r=new LN(i,e,t);r.name="single_"+a,r.resize(i,t),i.coordinateSystem=r,n.push(r)})),e.eachSeries((function(t){if("singleAxis"===t.get("coordinateSystem")){var n=e.queryComponents({mainType:"singleAxis",index:t.get("singleAxisIndex"),id:t.get("singleAxisId")})[0];t.coordinateSystem=n&&n.coordinateSystem}})),n},dimensions:LN.prototype.dimensions});var EN=function(e,t){t=t||{};var n=e.coordinateSystem,i=e.axis,a={},r=i.position,o=i.orient,s=n.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};a.position=["vertical"===o?u.vertical[r]:l[0],"horizontal"===o?u.horizontal[r]:l[3]],a.rotation=Math.PI/2*{horizontal:0,vertical:1}[o],a.labelDirection=a.tickDirection=a.nameDirection={top:-1,bottom:1,right:1,left:-1}[r],e.get("axisTick.inside")&&(a.tickDirection=-a.tickDirection),Ge.retrieve(t.labelInside,e.get("axisLabel.inside"))&&(a.labelDirection=-a.labelDirection);var c=t.rotate;return null==c&&(c=e.get("axisLabel.rotate")),a.labelRotation="top"===r?-c:c,a.z2=1,a},NN={layout:EN},PN=ES.rectCoordAxisBuildSplitArea,RN=ES.rectCoordAxisHandleRemove,zN=["axisLine","axisTickLabel","axisName"],BN=["splitArea","splitLine"],VN=CS.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(e,t,n,i){var a=this.group;a.removeAll();var r=this._axisGroup;this._axisGroup=new rh.Group;var o=NN.layout(e),s=new gS(e,o);Ge.each(zN,s.add,s),a.add(this._axisGroup),a.add(s.getGroup()),Ge.each(BN,(function(t){e.get(t+".show")&&this["_"+t](e)}),this),rh.groupTransition(r,this._axisGroup,e),VN.superCall(this,"render",e,t,n,i)},remove:function(){RN(this)},_splitLine:function(e){var t=e.axis;if(!t.scale.isBlank()){var n=e.getModel("splitLine"),i=n.getModel("lineStyle"),a=i.get("width"),r=i.get("color");r=r instanceof Array?r:[r];for(var o=e.coordinateSystem.getRect(),s=t.isHorizontal(),l=[],u=0,c=t.getTicksCoords({tickModel:n}),h=[],d=[],f=0;f<c.length;++f){var p=t.toGlobalCoord(c[f].coord);s?(h[0]=p,h[1]=o.y,d[0]=p,d[1]=o.y+o.height):(h[0]=o.x,h[1]=p,d[0]=o.x+o.width,d[1]=p);var g=u++%r.length;l[g]=l[g]||[],l[g].push(new rh.Line({subPixelOptimize:!0,shape:{x1:h[0],y1:h[1],x2:d[0],y2:d[1]},style:{lineWidth:a},silent:!0}))}for(f=0;f<l.length;++f)this.group.add(rh.mergePath(l[f],{style:{stroke:r[f%r.length],lineDash:i.getLineDash(a),lineWidth:a},silent:!0}))}},_splitArea:function(e){PN(this,this._axisGroup,e,e)}}),HN=fd.extend({type:"singleAxis",layoutMode:"box",axis:null,coordinateSystem:null,getCoordSysModel:function(){return this}});Ge.merge(HN.prototype,R_),Dw("single",HN,(function(e,t){return t.type||(t.data?"category":"value")}),{left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}});var YN=function(e,t){var n,i=[],a=e.seriesIndex;if(null==a||!(n=t.getSeriesByIndex(a)))return{point:[]};var r=n.getData(),o=Bo.queryDataIndex(r,e);if(null==o||o<0||Ge.isArray(o))return{point:[]};var s=r.getItemGraphicEl(o),l=n.coordinateSystem;if(n.getTooltipPosition)i=n.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)i=l.dataToPoint(r.getValues(Ge.map(l.dimensions,(function(e){return r.mapDimension(e)})),o,!0))||[];else if(s){var u=s.getBoundingRect().clone();u.applyTransform(s.transform),i=[u.x+u.width/2,u.y+u.height/2]}return{point:i,el:s}},FN=Bo.makeInner,GN=Ge.each,WN=Ge.curry,jN=FN();function UN(e,t,n,i,a){var r=e.axis;if(!r.scale.isBlank()&&r.containData(t))if(e.involveSeries){var o=function(e,t){var n=t.axis,i=n.dim,a=e,r=[],o=Number.MAX_VALUE,s=-1;return GN(t.seriesModels,(function(t,l){var u,c,h=t.getData().mapDimension(i,!0);if(t.getAxisTooltipData){var d=t.getAxisTooltipData(h,e,n);c=d.dataIndices,u=d.nestestValue}else{if(!(c=t.getData().indicesOfNearest(h[0],e,"category"===n.type?.5:null)).length)return;u=t.getData().get(h[0],c[0])}if(null!=u&&isFinite(u)){var f=e-u,p=Math.abs(f);p<=o&&((p<o||f>=0&&s<0)&&(o=p,s=f,a=u,r.length=0),GN(c,(function(e){r.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})})))}})),{payloadBatch:r,snapToValue:a}}(t,e),s=o.payloadBatch,l=o.snapToValue;s[0]&&null==a.seriesIndex&&Ge.extend(a,s[0]),!i&&e.snap&&r.containData(l)&&null!=l&&(t=l),n.showPointer(e,t,s,a),n.showTooltip(e,o,l)}else n.showPointer(e,t)}function ZN(e,t,n,i){e[t.key]={value:n,payloadBatch:i}}function XN(e,t,n,i){var a=n.payloadBatch,r=t.axis,o=r.model,s=t.axisPointerModel;if(t.triggerTooltip&&a.length){var l=t.coordSys.model,u=MS.makeKey(l),c=e.map[u];c||(c=e.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},e.list.push(c)),c.dataByAxis.push({axisDim:r.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:i,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:a.slice()})}}function qN(e){var t=e.axis.model,n={},i=n.axisDim=e.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=t.componentIndex,n.axisName=n[i+"AxisName"]=t.name,n.axisId=n[i+"AxisId"]=t.id,n}function KN(e){return!e||null==e[0]||isNaN(e[0])||null==e[1]||isNaN(e[1])}var $N=function(e,t,n){var i=e.currTrigger,a=[e.x,e.y],r=e,o=e.dispatchAction||Ge.bind(n.dispatchAction,n),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){KN(a)&&(a=YN({seriesIndex:r.seriesIndex,dataIndex:r.dataIndex},t).point);var l=KN(a),u=r.axesInfo,c=s.axesInfo,h="leave"===i||KN(a),d={},f={},p={list:[],map:{}},g={showPointer:WN(ZN,f),showTooltip:WN(XN,p)};GN(s.coordSysMap,(function(e,t){var n=l||e.containPoint(a);GN(s.coordSysAxesInfo[t],(function(e,t){var i=e.axis,r=function(e,t){for(var n=0;n<(e||[]).length;n++){var i=e[n];if(t.axis.dim===i.axisDim&&t.axis.model.componentIndex===i.axisIndex)return i}}(u,e);if(!h&&n&&(!u||r)){var o=r&&r.value;null!=o||l||(o=i.pointToData(a)),null!=o&&UN(e,o,g,!1,d)}}))}));var m={};return GN(c,(function(e,t){var n=e.linkGroup;n&&!f[t]&&GN(n.axesInfo,(function(t,i){var a=f[i];if(t!==e&&a){var r=a.value;n.mapper&&(r=e.axis.scale.parse(n.mapper(r,qN(t),qN(e)))),m[e.key]=r}}))})),GN(m,(function(e,t){UN(c[t],e,g,!0,d)})),function(e,t,n){var i=n.axesInfo=[];GN(t,(function(t,n){var a=t.axisPointerModel.option,r=e[n];r?(!t.useHandle&&(a.status="show"),a.value=r.value,a.seriesDataIndices=(r.payloadBatch||[]).slice()):!t.useHandle&&(a.status="hide"),"show"===a.status&&i.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:a.value})}))}(f,c,d),function(e,t,n,i){if(KN(t)||!e.list.length)return void i({type:"hideTip"});var a=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:a.dataIndexInside,dataIndex:a.dataIndex,seriesIndex:a.seriesIndex,dataByCoordSys:e.list})}(p,a,e,o),function(e,t,n){var i=n.getZr(),a="axisPointerLastHighlights",r=jN(i)[a]||{},o=jN(i)[a]={};GN(e,(function(e,t){var n=e.axisPointerModel.option;"show"===n.status&&GN(n.seriesDataIndices,(function(e){var t=e.seriesIndex+" | "+e.dataIndex;o[t]=e}))}));var s=[],l=[];Ge.each(r,(function(e,t){!o[t]&&l.push(e)})),Ge.each(o,(function(e,t){!r[t]&&s.push(e)})),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,batch:s})}(c,0,n),d}};Qx.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 QN=(0,Bo.makeInner)(),JN=Ge.each;function eP(e,t,n){e.handler("leave",null,n)}function tP(e,t,n,i){t.handler(e,n,i)}var nP=function(e,t,n){if(!oe.node){var i=t.getZr();QN(i).records||(QN(i).records={}),function(e,t){if(QN(e).initialized)return;function n(n,i){e.on(n,(function(n){var a=function(e){var t={showTip:[],hideTip:[]},n=function(i){var a=t[i.type];a?a.push(i):(i.dispatchAction=n,e.dispatchAction(i))};return{dispatchAction:n,pendings:t}}(t);JN(QN(e).records,(function(e){e&&i(e,n,a.dispatchAction)})),function(e,t){var n,i=e.showTip.length,a=e.hideTip.length;i?n=e.showTip[i-1]:a&&(n=e.hideTip[a-1]);n&&(n.dispatchAction=null,t.dispatchAction(n))}(a.pendings,t)}))}QN(e).initialized=!0,n("click",Ge.curry(tP,"click")),n("mousemove",Ge.curry(tP,"mousemove")),n("globalout",eP)}(i,t),(QN(i).records[e]||(QN(i).records[e]={})).handler=n}},iP={register:nP,unregister:function(e,t){if(!oe.node){var n=t.getZr();(QN(n).records||{})[e]&&(QN(n).records[e]=null)}}},aP=Qx.extendComponentView({type:"axisPointer",render:function(e,t,n){var i=t.getComponent("tooltip"),a=e.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";iP.register("axisPointer",n,(function(e,t,n){"none"!==a&&("leave"===e||a.indexOf(e)>=0)&&n({type:"updateAxisPointer",currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})}))},remove:function(e,t){iP.unregister(t.getZr(),"axisPointer"),aP.superApply(this._model,"remove",arguments)},dispose:function(e,t){iP.unregister("axisPointer",t),aP.superApply(this._model,"dispose",arguments)}}),rP=(0,Bo.makeInner)(),oP=Ge.clone,sP=Ge.bind;function lP(){}function uP(e,t,n,i){cP(rP(n).lastProp,i)||(rP(n).lastProp=i,t?rh.updateProps(n,i,e):(n.stopAnimation(),n.attr(i)))}function cP(e,t){if(Ge.isObject(e)&&Ge.isObject(t)){var n=!0;return Ge.each(t,(function(t,i){n=n&&cP(e[i],t)})),!!n}return e===t}function hP(e,t){e[t.get("label.show")?"show":"hide"]()}function dP(e){return{position:e.position.slice(),rotation:e.rotation||0}}function fP(e,t,n){var i=t.get("z"),a=t.get("zlevel");e&&e.traverse((function(e){"group"!==e.type&&(null!=i&&(e.z=i),null!=a&&(e.zlevel=a),e.silent=n)}))}lP.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(e,t,n,i){var a=t.get("value"),r=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,i||this._lastValue!==a||this._lastStatus!==r){this._lastValue=a,this._lastStatus=r;var o=this._group,s=this._handle;if(!r||"hide"===r)return o&&o.hide(),void(s&&s.hide());o&&o.show(),s&&s.show();var l={};this.makeElOption(l,a,e,t,n);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=u;var c=this._moveAnimation=this.determineAnimation(e,t);if(o){var h=Ge.curry(uP,t,c);this.updatePointerEl(o,l,h,t),this.updateLabelEl(o,l,h,t)}else o=this._group=new rh.Group,this.createPointerEl(o,l,e,t),this.createLabelEl(o,l,e,t),n.getZr().add(o);fP(o,t,!0),this._renderHandle(a)}},remove:function(e){this.clear(e)},dispose:function(e){this.clear(e)},determineAnimation:function(e,t){var n=t.get("animation"),i=e.axis,a="category"===i.type,r=t.get("snap");if(!r&&!a)return!1;if("auto"===n||null==n){var o=this.animationThreshold;if(a&&i.getBandWidth()>o)return!0;if(r){var s=MS.getAxisInfo(e).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>o}return!1}return!0===n},makeElOption:function(e,t,n,i,a){},createPointerEl:function(e,t,n,i){var a=t.pointer;if(a){var r=rP(e).pointerEl=new rh[a.type](oP(t.pointer));e.add(r)}},createLabelEl:function(e,t,n,i){if(t.label){var a=rP(e).labelEl=new rh.Rect(oP(t.label));e.add(a),hP(a,i)}},updatePointerEl:function(e,t,n){var i=rP(e).pointerEl;i&&t.pointer&&(i.setStyle(t.pointer.style),n(i,{shape:t.pointer.shape}))},updateLabelEl:function(e,t,n,i){var a=rP(e).labelEl;a&&(a.setStyle(t.label.style),n(a,{shape:t.label.shape,position:t.label.position}),hP(a,i))},_renderHandle:function(e){if(!this._dragging&&this.updateHandleTransform){var t,n=this._axisPointerModel,i=this._api.getZr(),a=this._handle,r=n.getModel("handle"),o=n.get("status");if(!r.get("show")||!o||"hide"===o)return a&&i.remove(a),void(this._handle=null);this._handle||(t=!0,a=this._handle=rh.createIcon(r.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(e){Vt.stop(e.event)},onmousedown:sP(this._onHandleDragMove,this,0,0),drift:sP(this._onHandleDragMove,this),ondragend:sP(this._onHandleDragEnd,this)}),i.add(a)),fP(a,n,!1);a.setStyle(r.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=r.get("size");Ge.isArray(s)||(s=[s,s]),a.attr("scale",[s[0]/2,s[1]/2]),Lg.createOrUpdate(this,"_doDispatchAxisPointer",r.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,t)}},_moveHandleToValue:function(e,t){uP(this._axisPointerModel,!t&&this._moveAnimation,this._handle,dP(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(e,t){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(dP(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(dP(i)),rP(n).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},_onHandleDragEnd:function(e){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,i=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),i&&t.remove(i),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(e,t,n){return{x:e[n=n||0],y:e[1-n],width:t[n],height:t[1-n]}}},lP.prototype.constructor=lP,Zo.enableClassExtend(lP);var pP=lP;function gP(e,t,n,i,a){var r=mP(n.get("value"),t.axis,t.ecModel,n.get("seriesDataIndices"),{precision:n.get("label.precision"),formatter:n.get("label.formatter")}),o=n.getModel("label"),s=Xh.normalizeCssArray(o.get("padding")||0),l=o.getFont(),u=Za.getBoundingRect(r,l),c=a.position,h=u.width+s[1]+s[3],d=u.height+s[0]+s[2],f=a.align;"right"===f&&(c[0]-=h),"center"===f&&(c[0]-=h/2);var p=a.verticalAlign;"bottom"===p&&(c[1]-=d),"middle"===p&&(c[1]-=d/2),function(e,t,n,i){var a=i.getWidth(),r=i.getHeight();e[0]=Math.min(e[0]+t,a)-t,e[1]=Math.min(e[1]+n,r)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}(c,h,d,i);var g=o.get("backgroundColor");g&&"auto"!==g||(g=t.get("axisLine.lineStyle.color")),e.label={shape:{x:0,y:0,width:h,height:d,r:o.get("borderRadius")},position:c.slice(),style:{text:r,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 mP(e,t,n,i,a){e=t.scale.parse(e);var r=t.scale.getLabel(e,{precision:a.precision}),o=a.formatter;if(o){var s={value:N_.getAxisRawValue(t,e),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};Ge.each(i,(function(e){var t=n.getSeriesByIndex(e.seriesIndex),i=e.dataIndexInside,a=t&&t.getDataParams(i);a&&s.seriesData.push(a)})),Ge.isString(o)?r=o.replace("{value}",r):Ge.isFunction(o)&&(r=o(s))}return r}function vP(e,t,n){var i=ln.create();return ln.rotate(i,i,n.rotation),ln.translate(i,i,n.position),rh.applyTransform([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}var yP=function(e){var t,n=e.get("type"),i=e.getModel(n+"Style");return"line"===n?(t=i.getLineStyle()).fill=null:"shadow"===n&&((t=i.getAreaStyle()).stroke=null),t},_P={buildElStyle:yP,buildLabelElOption:gP,getValueLabel:mP,getTransformedPosition:vP,buildCartesianSingleLabelElOption:function(e,t,n,i,a,r){var o=gS.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=a.get("label.margin"),gP(t,i,a,r,{position:vP(i.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})},makeLineShape:function(e,t,n){return{x1:e[n=n||0],y1:e[1-n],x2:t[n],y2:t[1-n]}},makeRectShape:function(e,t,n){return{x:e[n=n||0],y:e[1-n],width:t[n],height:t[1-n]}},makeSectorShape:function(e,t,n,i,a,r){return{cx:e,cy:t,r0:n,r:i,startAngle:a,endAngle:r,clockwise:!0}}},xP=pP.extend({makeElOption:function(e,t,n,i,a){var r=n.axis,o=r.grid,s=i.get("type"),l=bP(o,r).getOtherAxis(r).getGlobalExtent(),u=r.toGlobalCoord(r.dataToCoord(t,!0));if(s&&"none"!==s){var c=_P.buildElStyle(i),h=wP[s](r,u,l);h.style=c,e.graphicKey=h.type,e.pointer=h}var d=kS.layout(o.model,n);_P.buildCartesianSingleLabelElOption(t,e,d,n,i,a)},getHandleTransform:function(e,t,n){var i=kS.layout(t.axis.grid.model,t,{labelInside:!1});return i.labelMargin=n.get("handle.margin"),{position:_P.getTransformedPosition(t.axis,e,i),rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(e,t,n,i){var a=n.axis,r=a.grid,o=a.getGlobalExtent(!0),s=bP(r,a).getOtherAxis(a).getGlobalExtent(),l="x"===a.dim?0:1,u=e.position;u[l]+=t[l],u[l]=Math.min(o[1],u[l]),u[l]=Math.max(o[0],u[l]);var c=(s[1]+s[0])/2,h=[c,c];h[l]=u[l];return{position:u,rotation:e.rotation,cursorPoint:h,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}}});function bP(e,t){var n={};return n[t.dim+"AxisIndex"]=t.index,e.getCartesian(n)}var wP={line:function(e,t,n){return{type:"Line",subPixelOptimize:!0,shape:_P.makeLineShape([t,n[0]],[t,n[1]],SP(e))}},shadow:function(e,t,n){var i=Math.max(1,e.getBandWidth()),a=n[1]-n[0];return{type:"Rect",shape:_P.makeRectShape([t-i/2,n[0]],[i,a],SP(e))}}};function SP(e){return"x"===e.dim?0:1}CS.registerAxisPointerClass("CartesianAxisPointer",xP),Qx.registerPreprocessor((function(e){if(e){(!e.axisPointer||0===e.axisPointer.length)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!Ge.isArray(t)&&(e.axisPointer.link=[t])}})),Qx.registerProcessor(Qx.PRIORITY.PROCESSOR.STATISTIC,(function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=MS.collect(e,t)})),Qx.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},$N);var MP=["x","y"],TP=["width","height"],IP=pP.extend({makeElOption:function(e,t,n,i,a){var r=n.axis,o=r.coordinateSystem,s=CP(o,1-DP(r)),l=o.dataToPoint(t)[0],u=i.get("type");if(u&&"none"!==u){var c=_P.buildElStyle(i),h=AP[u](r,l,s);h.style=c,e.graphicKey=h.type,e.pointer=h}var d=NN.layout(n);_P.buildCartesianSingleLabelElOption(t,e,d,n,i,a)},getHandleTransform:function(e,t,n){var i=NN.layout(t,{labelInside:!1});return i.labelMargin=n.get("handle.margin"),{position:_P.getTransformedPosition(t.axis,e,i),rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(e,t,n,i){var a=n.axis,r=a.coordinateSystem,o=DP(a),s=CP(r,o),l=e.position;l[o]+=t[o],l[o]=Math.min(s[1],l[o]),l[o]=Math.max(s[0],l[o]);var u=CP(r,1-o),c=(u[1]+u[0])/2,h=[c,c];return h[o]=l[o],{position:l,rotation:e.rotation,cursorPoint:h,tooltipOption:{verticalAlign:"middle"}}}}),AP={line:function(e,t,n){return{type:"Line",subPixelOptimize:!0,shape:_P.makeLineShape([t,n[0]],[t,n[1]],DP(e))}},shadow:function(e,t,n){var i=e.getBandWidth(),a=n[1]-n[0];return{type:"Rect",shape:_P.makeRectShape([t-i/2,n[0]],[i,a],DP(e))}}};function DP(e){return e.isHorizontal()?0:1}function CP(e,t){var n=e.getRect();return[n[MP[t]],n[MP[t]]+n[TP[t]]]}CS.registerAxisPointerClass("SingleAxisPointer",IP),Qx.extendComponentView({type:"single"});var OP=cv.getDimensionTypeByAxis,kP=Bo.groupData,LP=Xh.encodeHTML,EP=cg.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(e){EP.superApply(this,"init",arguments),this.legendVisualProvider=new yM(Ge.bind(this.getData,this),Ge.bind(this.getRawData,this))},fixData:function(e){var t=e.length,n=kP(e,(function(e){return e[2]})),i=[];n.buckets.each((function(e,t){i.push({name:t,dataList:e})}));for(var a=i.length,r=-1,o=-1,s=0;s<a;++s){var l=i[s].dataList.length;l>r&&(r=l,o=s)}for(var u=0;u<a;++u)if(u!==o)for(var c=i[u].name,h=0;h<r;++h){for(var d=i[o].dataList[h][0],f=i[u].dataList.length,p=-1,g=0;g<f;++g){if(i[u].dataList[g][0]===d){p=g;break}}-1===p&&(e[t]=[],e[t][0]=d,e[t][1]=0,e[t][2]=c,t++)}return e},getInitialData:function(e,t){for(var n=t.queryComponents({mainType:"singleAxis",index:this.get("singleAxisIndex"),id:this.get("singleAxisId")})[0].get("type"),i=Ge.filter(e.data,(function(e){return void 0!==e[2]})),a=this.fixData(i||[]),r=[],o=this.nameMap=Ge.createHashMap(),s=0,l=0;l<a.length;++l)r.push(a[l][2]),o.get(a[l][2])||(o.set(a[l][2],s),s++);var u=Jv(a,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:OP(n)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}),c=new Bv(u,this);return c.initData(a),c},getLayerSeries:function(){for(var e=this.getData(),t=e.count(),n=[],i=0;i<t;++i)n[i]=i;var a=e.mapDimension("single"),r=kP(n,(function(t){return e.get("name",t)})),o=[];return r.buckets.each((function(t,n){t.sort((function(t,n){return e.get(a,t)-e.get(a,n)})),o.push({name:n,indices:t})})),o},getAxisTooltipData:function(e,t,n){Ge.isArray(e)||(e=e?[e]:[]);for(var i,a=this.getData(),r=this.getLayerSeries(),o=[],s=r.length,l=0;l<s;++l){for(var u=Number.MAX_VALUE,c=-1,h=r[l].indices.length,d=0;d<h;++d){var f=a.get(e[0],r[l].indices[d]),p=Math.abs(f-t);p<=u&&(i=f,u=p,c=r[l].indices[d])}o.push(c)}return{dataIndices:o,nestestValue:i}},formatTooltip:function(e){var t=this.getData(),n=t.getName(e),i=t.get(t.mapDimension("value"),e);return(isNaN(i)||null==i)&&(i="-"),LP(n+" : "+i)},defaultOption:{zlevel:0,z:2,coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",color:"#000",fontSize:11},emphasis:{label:{show:!0}}}}),NP=Gb.Polygon,PP=Ge.bind,RP=Ge.extend;function zP(e,t,n){if(e.count())for(var i,a=t.coordinateSystem,r=t.getLayerSeries(),o=e.mapDimension("single"),s=e.mapDimension("value"),l=Ge.map(r,(function(t){return Ge.map(t.indices,(function(t){var n=a.dataToPoint(e.get(o,t));return n[1]=e.get(s,t),n}))})),u=function(e){for(var t=e.length,n=e[0].length,i=[],a=[],r=0,o={},s=0;s<n;++s){for(var l=0,u=0;l<t;++l)u+=e[l][s][1];u>r&&(r=u),i.push(u)}for(var c=0;c<n;++c)a[c]=(r-i[c])/2;r=0;for(var h=0;h<n;++h){var d=i[h]+a[h];d>r&&(r=d)}return o.y0=a,o.max=r,o}(l),c=u.y0,h=n/u.max,d=r.length,f=r[0].indices.length,p=0;p<f;++p){i=c[p]*h,e.setItemLayout(r[0].indices[p],{layerIndex:0,x:l[0][p][0],y0:i,y:l[0][p][1]*h});for(var g=1;g<d;++g)i+=l[g-1][p][1]*h,e.setItemLayout(r[g].indices[p],{layerIndex:g,x:l[g][p][0],y0:i,y:l[g][p][1]*h})}}Qx.extendChartView({type:"themeRiver",init:function(){this._layers=[]},render:function(e,t,n){var i=e.getData(),a=this.group,r=e.getLayerSeries(),o=i.getLayout("layoutInfo"),s=o.rect,l=o.boundaryGap;function u(e){return e.name}a.attr("position",[0,s.y+l[0]]);var c=new rv(this._layersSeries||[],r,u,u),h={};function d(t,n,o){var s=this._layers;if("remove"!==t){for(var l,u,c,d=[],f=[],p=r[n].indices,g=0;g<p.length;g++){var m=i.getItemLayout(p[g]),v=m.x,y=m.y0,_=m.y;d.push([v,y]),f.push([v,y+_]),l=i.getItemVisual(p[g],"color")}var x=i.getItemLayout(p[0]),b=i.getItemModel(p[g-1]),w=b.getModel("label"),S=w.get("margin");if("add"===t){var M=h[n]=new rh.Group;u=new NP({shape:{points:d,stackedOnPoints:f,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),c=new rh.Text({style:{x:x.x-S,y:x.y0+x.y/2}}),M.add(u),M.add(c),a.add(M),u.setClipPath(function(e,t,n){var i=new rh.Rect({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return rh.initProps(i,{shape:{width:e.width+20,height:e.height+20}},t,n),i}(u.getBoundingRect(),e,(function(){u.removeClipPath()})))}else{M=s[o];u=M.childAt(0),c=M.childAt(1),a.add(M),h[n]=M,rh.updateProps(u,{shape:{points:d,stackedOnPoints:f}},e),rh.updateProps(c,{style:{x:x.x-S,y:x.y0+x.y/2}},e)}var T=b.getModel("emphasis.itemStyle"),I=b.getModel("itemStyle");rh.setTextStyle(c.style,w,{text:w.get("show")?e.getFormattedLabel(p[g-1],"normal")||i.getName(p[g-1]):null,textVerticalAlign:"middle"}),u.setStyle(RP({fill:l},I.getItemStyle(["color"]))),rh.setHoverStyle(u,T.getItemStyle())}else a.remove(s[n])}c.add(PP(d,this,"add")).update(PP(d,this,"update")).remove(PP(d,this,"remove")).execute(),this._layersSeries=r,this._layers=h},dispose:function(){}});var BP=function(e,t){e.eachSeriesByType("themeRiver",(function(e){var t=e.getData(),n=e.coordinateSystem,i={},a=n.getRect();i.rect=a;var r=e.get("boundaryGap"),o=n.getAxis();(i.boundaryGap=r,"horizontal"===o.orient)?(r[0]=Ph.parsePercent(r[0],a.height),r[1]=Ph.parsePercent(r[1],a.height),zP(t,e,a.height-r[0]-r[1])):(r[0]=Ph.parsePercent(r[0],a.width),r[1]=Ph.parsePercent(r[1],a.width),zP(t,e,a.width-r[0]-r[1]));t.setLayout("layoutInfo",i)}))},VP=Ge.createHashMap;var HP=function(e){e.eachSeriesByType("themeRiver",(function(e){var t=e.getData(),n=e.getRawData(),i=e.get("color"),a=VP();t.each((function(e){a.set(t.getRawIndex(e),e)})),n.each((function(r){var o=n.getName(r),s=i[(e.nameMap.get(o)-1)%i.length];n.setItemVisual(r,"color",s);var l=a.get(r);null!=l&&t.setItemVisual(l,"color",s)}))}))};Qx.registerLayout(BP),Qx.registerVisual(HP),Qx.registerProcessor(HM("themeRiver"));var YP=TA.wrapTreePathInfo;function FP(e){var t=0;Ge.each(e.children,(function(e){FP(e);var n=e.value;Ge.isArray(n)&&(n=n[0]),t+=n}));var n=e.value;Ge.isArray(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=t),n<0&&(n=0),Ge.isArray(e.value)?e.value[0]=n:e.value=n}cg.extend({type:"series.sunburst",_viewRoot:null,getInitialData:function(e,t){var n={name:e.name,children:e.data};FP(n);var i=e.levels||[],a={};return a.levels=i,jI.createTree(n,this,a).data},optionUpdated:function(){this.resetViewRoot()},getDataParams:function(e){var t=cg.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return t.treePathInfo=YP(n,this),t},defaultOption:{zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,percentPrecision:2,stillShowZeroSum:!0,highlightPolicy:"descendant",nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},highlight:{itemStyle:{opacity:1}},downplay:{itemStyle:{opacity:.5},label:{opacity:.6}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicOut",data:[],levels:[],sort:"desc"},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;e&&(e===t||t.contains(e))||(this._viewRoot=t)}});var GP="none",WP="ancestor",jP="self";function UP(e,t,n){rh.Group.call(this);var i=new rh.Sector({z2:2});i.seriesIndex=t.seriesIndex;var a=new rh.Text({z2:4,silent:e.getModel("label").get("silent")});function r(){a.ignore=a.hoverIgnore}function o(){a.ignore=a.normalIgnore}this.add(i),this.add(a),this.updateData(!0,e,"normal",t,n),this.on("emphasis",r).on("normal",o).on("mouseover",r).on("mouseout",o)}var ZP=UP.prototype;ZP.updateData=function(e,t,n,i,a){this.node=t,t.piece=this,i=i||this._seriesModel,a=a||this._ecModel;var r=this.childAt(0);r.dataIndex=t.dataIndex;var o=t.getModel(),s=t.getLayout(),l=Ge.extend({},s);l.label=null;var u=function(e,t,n){var i=e.getVisual("color"),a=e.getVisual("visualMeta");a&&0!==a.length||(i=null);var r=e.getModel("itemStyle").get("color");if(r)return r;if(i)return i;if(0===e.depth)return n.option.color[0];var o=n.option.color.length;r=n.option.color[function(e){var t=e;for(;t.depth>1;)t=t.parentNode;var n=e.getAncestors()[0];return Ge.indexOf(n.children,t)}(e)%o];return r}(t,0,a);!function(e,t,n){var i=t.getData();i.setItemVisual(e.dataIndex,"color",n)}(t,i,u);var c,h=o.getModel("itemStyle").getItemStyle();if("normal"===n)c=h;else{var d=o.getModel(n+".itemStyle").getItemStyle();c=Ge.merge(d,h)}c=Ge.defaults({lineJoin:"bevel",fill:c.fill||u},c),e?(r.setShape(l),r.shape.r=s.r0,rh.updateProps(r,{shape:{r:s.r}},i,t.dataIndex),r.useStyle(c)):"object"==typeof c.fill&&c.fill.type||"object"==typeof r.style.fill&&r.style.fill.type?(rh.updateProps(r,{shape:l},i),r.useStyle(c)):rh.updateProps(r,{shape:l,style:c},i),this._updateLabel(i,u,n);var f=o.getShallow("cursor");if(f&&r.attr("cursor",f),e){var p=i.getShallow("highlightPolicy");this._initEvents(r,t,i,p)}this._seriesModel=i||this._seriesModel,this._ecModel=a||this._ecModel,rh.setHoverStyle(this)},ZP.onEmphasis=function(e){var t=this;this.node.hostTree.root.eachNode((function(n){var i,a,r;n.piece&&(t.node===n?n.piece.updateData(!1,n,"emphasis"):(i=n,a=t.node,(r=e)!==GP&&(r===jP?i===a:r===WP?i===a||i.isAncestorOf(a):i===a||i.isDescendantOf(a))?n.piece.childAt(0).trigger("highlight"):e!==GP&&n.piece.childAt(0).trigger("downplay")))}))},ZP.onNormal=function(){this.node.hostTree.root.eachNode((function(e){e.piece&&e.piece.updateData(!1,e,"normal")}))},ZP.onHighlight=function(){this.updateData(!1,this.node,"highlight")},ZP.onDownplay=function(){this.updateData(!1,this.node,"downplay")},ZP._updateLabel=function(e,t,n){var i=this.node.getModel(),a=i.getModel("label"),r="normal"===n||"emphasis"===n?a:i.getModel(n+".label"),o=i.getModel("emphasis.label"),s=Ge.retrieve(e.getFormattedLabel(this.node.dataIndex,n,null,null,"label"),this.node.name);!1===S("show")&&(s="");var l=this.node.getLayout(),u=r.get("minAngle");null==u&&(u=a.get("minAngle")),u=u/180*Math.PI;var c=l.endAngle-l.startAngle;null!=u&&Math.abs(c)<u&&(s="");var h=this.childAt(1);rh.setLabelStyle(h.style,h.hoverStyle||{},a,o,{defaultText:r.getShallow("show")?s:null,autoColor:t,useInsideStyle:!0});var d,f=(l.startAngle+l.endAngle)/2,p=Math.cos(f),g=Math.sin(f),m=S("position"),v=S("distance")||0,y=S("align");"outside"===m?(d=l.r+v,y=f>Math.PI/2?"right":"left"):y&&"center"!==y?"left"===y?(d=l.r0+v,f>Math.PI/2&&(y="right")):"right"===y&&(d=l.r-v,f>Math.PI/2&&(y="left")):(d=(l.r+l.r0)/2,y="center"),h.attr("style",{text:s,textAlign:y,textVerticalAlign:S("verticalAlign")||"middle",opacity:S("opacity")});var _=d*p+l.cx,x=d*g+l.cy;h.attr("position",[_,x]);var b=S("rotate"),w=0;function S(e){var t=r.get(e);return null==t?a.get(e):t}"radial"===b?(w=-f)<-Math.PI/2&&(w+=Math.PI):"tangential"===b?(w=Math.PI/2-f)>Math.PI/2?w-=Math.PI:w<-Math.PI/2&&(w+=Math.PI):"number"==typeof b&&(w=b*Math.PI/180),h.attr("rotation",w)},ZP._initEvents=function(e,t,n,i){e.off("mouseover").off("mouseout").off("emphasis").off("normal");var a=this,r=function(){a.onEmphasis(i)},o=function(){a.onNormal()};n.isAnimationEnabled()&&e.on("mouseover",r).on("mouseout",o).on("emphasis",r).on("normal",o).on("downplay",(function(){a.onDownplay()})).on("highlight",(function(){a.onHighlight()}))},Ge.inherits(UP,rh.Group);var XP=UP,qP=Xh.windowOpen;Ag.extend({type:"sunburst",init:function(){},render:function(e,t,n,i){var a=this;this.seriesModel=e,this.api=n,this.ecModel=t;var r=e.getData(),o=r.tree.root,s=e.getViewRoot(),l=this.group,u=e.get("renderLabelForZeroData"),c=[];s.eachNode((function(e){c.push(e)}));var h=this._oldChildren||[];if(function(n,i){if(0===n.length&&0===i.length)return;function a(e){return e.getId()}function s(a,s){!function(n,i){u||!n||n.getValue()||(n=null);if(n!==o&&i!==o)if(i&&i.piece)n?(i.piece.updateData(!1,n,"normal",e,t),r.setItemGraphicEl(n.dataIndex,i.piece)):function(e){if(!e)return;e.piece&&(l.remove(e.piece),e.piece=null)}(i);else if(n){var a=new XP(n,e,t);l.add(a),r.setItemGraphicEl(n.dataIndex,a)}}(null==a?null:n[a],null==s?null:i[s])}new rv(i,n,a,a).add(s).update(s).remove(Ge.curry(s,null)).execute()}(c,h),function(n,i){if(i.depth>0){a.virtualPiece?a.virtualPiece.updateData(!1,n,"normal",e,t):(a.virtualPiece=new XP(n,e,t),l.add(a.virtualPiece)),i.piece._onclickEvent&&i.piece.off("click",i.piece._onclickEvent);var r=function(e){a._rootToNode(i.parentNode)};i.piece._onclickEvent=r,a.virtualPiece.on("click",r)}else a.virtualPiece&&(l.remove(a.virtualPiece),a.virtualPiece=null)}(o,s),i&&i.highlight&&i.highlight.piece){var d=e.getShallow("highlightPolicy");i.highlight.piece.onEmphasis(d)}else if(i&&i.unhighlight){var f=this.virtualPiece;!f&&o.children.length&&(f=o.children[0].piece),f&&f.onNormal()}this._initEvents(),this._oldChildren=c},dispose:function(){},_initEvents:function(){var e=this,t=function(t){var n=!1;e.seriesModel.getViewRoot().eachNode((function(i){if(!n&&i.piece&&i.piece.childAt(0)===t.target){var a=i.getModel().get("nodeClick");if("rootToNode"===a)e._rootToNode(i);else if("link"===a){var r=i.getModel(),o=r.get("link");if(o){var s=r.get("target",!0)||"_blank";qP(o,s)}}n=!0}}))};this.group._onclickEvent&&this.group.off("click",this.group._onclickEvent),this.group.on("click",t),this.group._onclickEvent=t},_rootToNode:function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:"sunburstRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},containPoint:function(e,t){var n=t.getData().getItemLayout(0);if(n){var i=e[0]-n.cx,a=e[1]-n.cy,r=Math.sqrt(i*i+a*a);return r<=n.r&&r>=n.r0}}});var KP="sunburstRootToNode";Qx.registerAction({type:KP,update:"updateView"},(function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},(function(t,n){var i=TA.retrieveTargetInfo(e,[KP],t);if(i){var a=t.getViewRoot();a&&(e.direction=TA.aboveViewRoot(a,i.node)?"rollUp":"drillDown"),t.resetViewRoot(i.node)}}))}));var $P="sunburstHighlight";Qx.registerAction({type:$P,update:"updateView"},(function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},(function(t,n){var i=TA.retrieveTargetInfo(e,[$P],t);i&&(e.highlight=i.node)}))}));Qx.registerAction({type:"sunburstUnhighlight",update:"updateView"},(function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},(function(t,n){e.unhighlight=!0}))}));var QP=Ph.parsePercent,JP=Math.PI/180;function eR(e,t){var n=e.children||[];e.children=function(e,t){if("function"==typeof t)return e.sort(t);var n="asc"===t;return e.sort((function(e,t){var i=(e.getValue()-t.getValue())*(n?1:-1);return 0===i?(e.dataIndex-t.dataIndex)*(n?-1:1):i}))}(n,t),n.length&&Ge.each(e.children,(function(e){eR(e,t)}))}var tR=function(e,t,n,i){t.eachSeriesByType(e,(function(e){var t=e.get("center"),i=e.get("radius");Ge.isArray(i)||(i=[0,i]),Ge.isArray(t)||(t=[t,t]);var a=n.getWidth(),r=n.getHeight(),o=Math.min(a,r),s=QP(t[0],a),l=QP(t[1],r),u=QP(i[0],o/2),c=QP(i[1],o/2),h=-e.get("startAngle")*JP,d=e.get("minAngle")*JP,f=e.getData().tree.root,p=e.getViewRoot(),g=p.depth,m=e.get("sort");null!=m&&eR(p,m);var v=0;Ge.each(p.children,(function(e){!isNaN(e.getValue())&&v++}));var y=p.getValue(),_=Math.PI/(y||v)*2,x=p.depth>0,b=p.height-(x?-1:1),w=(c-u)/(b||1),S=e.get("clockwise"),M=e.get("stillShowZeroSum"),T=S?1:-1,I=function(e,t){if(e){var n=t;if(e!==f){var i=e.getValue(),a=0===y&&M?_:i*_;a<d&&(a=d),n=t+T*a;var r=e.depth-g-(x?-1:1),c=u+w*r,h=u+w*(r+1),p=e.getModel();null!=p.get("r0")&&(c=QP(p.get("r0"),o/2)),null!=p.get("r")&&(h=QP(p.get("r"),o/2)),e.setLayout({angle:a,startAngle:t,endAngle:n,clockwise:S,cx:s,cy:l,r0:c,r:h})}if(e.children&&e.children.length){var m=0;Ge.each(e.children,(function(e){m+=I(e,t+m)}))}return n-t}};if(x){var A=u,D=u+w,C=2*Math.PI;f.setLayout({angle:C,startAngle:h,endAngle:h+C,clockwise:S,cx:s,cy:l,r0:A,r:D})}I(p,h)}))};function nR(e,t){return t=t||[0,0],Ge.map(["x","y"],(function(n,i){var a=this.getAxis(n),r=t[i],o=e[i]/2;return"category"===a.type?a.getBandWidth():Math.abs(a.dataToCoord(r-o)-a.dataToCoord(r+o))}),this)}Qx.registerVisual(Ge.curry(CM,"sunburst")),Qx.registerLayout(Ge.curry(tR,"sunburst")),Qx.registerProcessor(Ge.curry(HM,"sunburst"));var iR=function(e){var t=e.grid.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:Ge.bind(nR,e)}}};function aR(e,t){return t=t||[0,0],Ge.map([0,1],(function(n){var i=t[n],a=e[n]/2,r=[],o=[];return r[n]=i-a,o[n]=i+a,r[1-n]=o[1-n]=t[1-n],Math.abs(this.dataToPoint(r)[n]-this.dataToPoint(o)[n])}),this)}var rR=function(e){var t=e.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:e.getZoom()},api:{coord:function(t){return e.dataToPoint(t)},size:Ge.bind(aR,e)}}};function oR(e,t){var n=this.getAxis(),i=t instanceof Array?t[0]:t,a=(e instanceof Array?e[0]:e)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(i-a)-n.dataToCoord(i+a))}var sR=function(e){var t=e.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:Ge.bind(oR,e)}}};function lR(e,t){return Ge.map(["Radius","Angle"],(function(n,i){var a=this["get"+n+"Axis"](),r=t[i],o=e[i]/2,s="dataTo"+n,l="category"===a.type?a.getBandWidth():Math.abs(a[s](r-o)-a[s](r+o));return"Angle"===n&&(l=l*Math.PI/180),l}),this)}var uR=function(e){var t=e.getRadiusAxis(),n=e.getAngleAxis(),i=t.getExtent();return i[0]>i[1]&&i.reverse(),{coordSys:{type:"polar",cx:e.cx,cy:e.cy,r:i[1],r0:i[0]},api:{coord:Ge.bind((function(i){var a=t.dataToRadius(i[0]),r=n.dataToAngle(i[1]),o=e.coordToPoint([a,r]);return o.push(a,r*Math.PI/180),o})),size:Ge.bind(lR,e)}}};var cR=function(e){var t=e.getRect(),n=e.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(t,n){return e.dataToPoint(t,n)}}}},hR=tb.getDefaultLabel,dR=t_.getLayoutOnAxis,fR=Zb.createClipPath,pR=rh.CACHED_LABEL_STYLE_PROPERTIES,gR=["itemStyle"],mR=["emphasis","itemStyle"],vR=["label"],yR=["emphasis","label"],_R="e\0\0",xR={cartesian2d:iR,geo:rR,singleAxis:sR,polar:uR,calendar:cR};function bR(e,t,n,i,a){null==n[e]||a||(t[e]=n[e],n[e]=i[e])}function wR(e,t,n,i){var a=e.get("renderItem"),r=e.coordinateSystem,o={};r&&(o=r.prepareCustoms?r.prepareCustoms():xR[r.type](r));var s,l,u,c,h,d=Ge.defaults({getWidth:i.getWidth,getHeight:i.getHeight,getZr:i.getZr,getDevicePixelRatio:i.getDevicePixelRatio,value:function(e,n){return null==n&&(n=s),t.get(t.getDimension(e||0),n)},style:function(n,i){null==i&&(i=s),g(i);var a=l.getModel(gR).getItemStyle();null!=h&&(a.fill=h);var r=t.getItemVisual(i,"opacity");null!=r&&(a.opacity=r);var o=n?DR(n,u):u;return rh.setTextStyle(a,o,null,{autoColor:h,isRectText:!0}),a.text=o.getShallow("show")?Ge.retrieve2(e.getFormattedLabel(i,"normal"),hR(t,i)):null,n&&CR(a,n),a},styleEmphasis:function(n,i){null==i&&(i=s),g(i);var a=l.getModel(mR).getItemStyle(),r=n?DR(n,c):c;return rh.setTextStyle(a,r,null,{isRectText:!0},!0),a.text=r.getShallow("show")?Ge.retrieve3(e.getFormattedLabel(i,"emphasis"),e.getFormattedLabel(i,"normal"),hR(t,i)):null,n&&CR(a,n),a},visual:function(e,n){return null==n&&(n=s),t.getItemVisual(n,e)},barLayout:function(e){if(r.getBaseAxis){var t=r.getBaseAxis();return dR(Ge.defaults({axis:t},e),i)}},currentSeriesIndices:function(){return n.getCurrentSeriesIndices()},font:function(e){return rh.getFont(e,n)}},o.api||{}),f={context:{},seriesId:e.id,seriesName:e.name,seriesIndex:e.seriesIndex,coordSys:o.coordSys,dataInsideLength:t.count(),encode:SR(e.getData())},p=!0;return function(e,n){return s=e,p=!0,a&&a(Ge.defaults({dataIndexInside:e,dataIndex:t.getRawIndex(e),actionType:n?n.type:null},f),d)};function g(e){null==e&&(e=s),p&&(l=t.getItemModel(e),u=l.getModel(vR),c=l.getModel(yR),h=t.getItemVisual(e,"color"),p=!1)}}function SR(e){var t={};return Ge.each(e.dimensions,(function(n,i){var a=e.getDimensionInfo(n);if(!a.isExtraCoord){var r=a.coordDim;(t[r]=t[r]||[])[a.coordDimIndex]=i}})),t}function MR(e,t,n,i,a,r){return(e=TR(e,t,n,i,a,r,!0))&&r.setItemGraphicEl(t,e),e}function TR(e,t,n,i,a,r,o){var s,l=!n,u=(n=n||{}).type,c=n.shape,h=n.style;if(e&&(l||null!=u&&u!==e.__customGraphicType||"path"===u&&((s=c)&&(s.hasOwnProperty("pathData")||s.hasOwnProperty("d")))&&kR(c)!==e.__customPathData||"image"===u&&LR(h,"image")&&h.image!==e.__customImagePath||"text"===u&&LR(c,"text")&&h.text!==e.__customText)&&(a.remove(e),e=null),!l){var d=!e;return!e&&(e=function(e){var t,n=e.type;if("path"===n){var i=e.shape,a=null!=i.width&&null!=i.height?{x:i.x||0,y:i.y||0,width:i.width,height:i.height}:null,r=kR(i);(t=rh.makePath(r,null,a,i.layout||"center")).__customPathData=r}else if("image"===n)(t=new rh.Image({})).__customImagePath=e.style.image;else if("text"===n)(t=new rh.Text({})).__customText=e.style.text;else if("group"===n)t=new rh.Group;else{if("compoundPath"===n)throw new Error('"compoundPath" is not supported yet.');t=new(rh.getShapeClass(n))}return t.__customGraphicType=n,t.name=e.name,t}(n)),function(e,t,n,i,a,r,o){var s={},l=n.style||{};if(n.shape&&(s.shape=Ge.clone(n.shape)),n.position&&(s.position=n.position.slice()),n.scale&&(s.scale=n.scale.slice()),n.origin&&(s.origin=n.origin.slice()),n.rotation&&(s.rotation=n.rotation),"image"===e.type&&n.style){var u=s.style={};Ge.each(["x","y","width","height"],(function(t){bR(t,u,l,e.style,r)}))}"text"===e.type&&n.style&&(u=s.style={},Ge.each(["x","y"],(function(t){bR(t,u,l,e.style,r)})),!l.hasOwnProperty("textFill")&&l.fill&&(l.textFill=l.fill),!l.hasOwnProperty("textStroke")&&l.stroke&&(l.textStroke=l.stroke));if("group"!==e.type&&(e.useStyle(l),r)){e.style.opacity=0;var c=l.opacity;null==c&&(c=1),rh.initProps(e,{style:{opacity:c}},i,t)}r?e.attr(s):rh.updateProps(e,s,i,t),n.hasOwnProperty("z2")&&e.attr("z2",n.z2||0),n.hasOwnProperty("silent")&&e.attr("silent",n.silent),n.hasOwnProperty("invisible")&&e.attr("invisible",n.invisible),n.hasOwnProperty("ignore")&&e.attr("ignore",n.ignore),n.hasOwnProperty("info")&&e.attr("info",n.info);var h=n.styleEmphasis;rh.setElementHoverStyle(e,h),o&&rh.setAsHighDownDispatcher(e,!1!==h)}(e,t,n,i,0,d,o),"group"===u&&function(e,t,n,i,a){var r=n.children,o=r?r.length:0,s=n.$mergeChildren,l="byName"===s||n.diffChildrenByName,u=!1===s;if(!o&&!l&&!u)return;if(l)return c={oldChildren:e.children()||[],newChildren:r||[],dataIndex:t,animatableModel:i,group:e,data:a},void new rv(c.oldChildren,c.newChildren,IR,IR,c).add(AR).update(AR).remove(OR).execute();var c;u&&e.removeAll();for(var h=0;h<o;h++)r[h]&&TR(e.childAt(h),t,r[h],i,e,a)}(e,t,n,i,r),a.add(e),e}}function IR(e,t){var n=e&&e.name;return null!=n?n:_R+t}function AR(e,t){var n=this.context,i=null!=e?n.newChildren[e]:null;TR(null!=t?n.oldChildren[t]:null,n.dataIndex,i,n.animatableModel,n.group,n.data)}function DR(e,t){var n=new xh({},t);return Ge.each(pR,(function(t,i){e.hasOwnProperty(t)&&(n.option[i]=e[t])})),n}function CR(e,t){for(var n in t)!t.hasOwnProperty(n)&&pR.hasOwnProperty(n)||(e[n]=t[n])}function OR(e){var t=this.context,n=t.oldChildren[e];n&&t.group.remove(n)}function kR(e){return e&&(e.pathData||e.d)}function LR(e,t){return e&&e.hasOwnProperty(t)}cg.extend({type:"series.custom",dependencies:["grid","polar","geo","singleAxis","calendar"],defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,useTransform:!0,clip:!1},getInitialData:function(e,t){return vy(this.getSource(),this)},getDataParams:function(e,t,n){var i=cg.prototype.getDataParams.apply(this,arguments);return n&&(i.info=n.info),i}}),Ag.extend({type:"custom",_data:null,render:function(e,t,n,i){var a=this._data,r=e.getData(),o=this.group,s=wR(e,r,t,n);r.diff(a).add((function(t){MR(null,t,s(t,i),e,o,r)})).update((function(t,n){MR(a.getItemGraphicEl(n),t,s(t,i),e,o,r)})).remove((function(e){var t=a.getItemGraphicEl(e);t&&o.remove(t)})).execute();var l=e.get("clip",!0)?fR(e.coordinateSystem,!1,e):null;l?o.setClipPath(l):o.removeClipPath(),this._data=r},incrementalPrepareRender:function(e,t,n){this.group.removeAll(),this._data=null},incrementalRender:function(e,t,n,i,a){var r=t.getData(),o=wR(t,r,n,i);function s(e){e.isGroup||(e.incremental=!0,e.useHoverLayer=!0)}for(var l=e.start;l<e.end;l++){MR(null,l,o(l,a),t,this.group,r).traverse(s)}},dispose:Ge.noop,filterForExposedEvent:function(e,t,n,i){var a=t.element;if(null==a||n.name===a)return!0;for(;(n=n.parent)&&n!==this.group;)if(n.name===a)return!0;return!1}});var ER=Ph.parsePercent,NR=uy.isDimensionStacked;function PR(e){return e.get("stack")||"__ec_stack_"+e.seriesIndex}function RR(e,t){return t.dim+e.model.componentIndex}var zR=function(e,t,n){var i={},a=function(e,t){var n={};Ge.each(e,(function(e,t){var i=e.getData(),a=e.coordinateSystem,r=a.getBaseAxis(),o=RR(a,r),s=r.getExtent(),l="category"===r.type?r.getBandWidth():Math.abs(s[1]-s[0])/i.count(),u=n[o]||{bandWidth:l,remainedWidth:l,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},c=u.stacks;n[o]=u;var h=PR(e);c[h]||u.autoWidthCount++,c[h]=c[h]||{width:0,maxWidth:0};var d=ER(e.get("barWidth"),l),f=ER(e.get("barMaxWidth"),l),p=e.get("barGap"),g=e.get("barCategoryGap");d&&!c[h].width&&(d=Math.min(u.remainedWidth,d),c[h].width=d,u.remainedWidth-=d),f&&(c[h].maxWidth=f),null!=p&&(u.gap=p),null!=g&&(u.categoryGap=g)}));var i={};return Ge.each(n,(function(e,t){i[t]={};var n=e.stacks,a=e.bandWidth,r=ER(e.categoryGap,a),o=ER(e.gap,1),s=e.remainedWidth,l=e.autoWidthCount,u=(s-r)/(l+(l-1)*o);u=Math.max(u,0),Ge.each(n,(function(e,t){var n=e.maxWidth;n&&n<u&&(n=Math.min(n,s),e.width&&(n=Math.min(n,e.width)),s-=n,e.width=n,l--)})),u=(s-r)/(l+(l-1)*o),u=Math.max(u,0);var c,h=0;Ge.each(n,(function(e,t){e.width||(e.width=u),c=e,h+=e.width*(1+o)})),c&&(h-=c.width*o);var d=-h/2;Ge.each(n,(function(e,n){i[t][n]=i[t][n]||{offset:d,width:e.width},d+=e.width*(1+o)}))})),i}(Ge.filter(t.getSeriesByType(e),(function(e){return!t.isSeriesFiltered(e)&&e.coordinateSystem&&"polar"===e.coordinateSystem.type})));t.eachSeriesByType(e,(function(e){if("polar"===e.coordinateSystem.type){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),o=RR(n,r),s=PR(e),l=a[o][s],u=l.offset,c=l.width,h=n.getOtherAxis(r),d=e.coordinateSystem.cx,f=e.coordinateSystem.cy,p=e.get("barMinHeight")||0,g=e.get("barMinAngle")||0;i[s]=i[s]||[];for(var m=t.mapDimension(h.dim),v=t.mapDimension(r.dim),y=NR(t,m),_="radius"!==r.dim||!e.get("roundCap",!0),x=h.getExtent()[0],b=0,w=t.count();b<w;b++){var S,M,T,I,A=t.get(m,b),D=t.get(v,b),C=A>=0?"p":"n",O=x;if(y&&(i[s][D]||(i[s][D]={p:x,n:x}),O=i[s][D][C]),"radius"===h.dim){var k=h.dataToRadius(A)-x,L=r.dataToAngle(D);Math.abs(k)<p&&(k=(k<0?-1:1)*p),S=O,M=O+k,I=(T=L-u)-c,y&&(i[s][D][C]=M)}else{var E=h.dataToAngle(A,_)-x,N=r.dataToRadius(D);Math.abs(E)<g&&(E=(E<0?-1:1)*g),M=(S=N+u)+c,T=O,I=O+E,y&&(i[s][D][C]=I)}t.setItemLayout(b,{cx:d,cy:f,r0:S,r:M,startAngle:-T*Math.PI/180,endAngle:-I*Math.PI/180})}}}),this)},BR=zR;function VR(e,t){Nx.call(this,"radius",e,t),this.type="category"}VR.prototype={constructor:VR,pointToData:function(e,t){return this.polar.pointToData(e,t)["radius"===this.dim?0:1]},dataToRadius:Nx.prototype.dataToCoord,radiusToData:Nx.prototype.coordToData},Ge.inherits(VR,Nx);var HR=VR,YR=(0,Bo.makeInner)();function FR(e,t){t=t||[0,360],Nx.call(this,"angle",e,t),this.type="category"}FR.prototype={constructor:FR,pointToData:function(e,t){return this.polar.pointToData(e,t)["radius"===this.dim?0:1]},dataToAngle:Nx.prototype.dataToCoord,angleToData:Nx.prototype.coordToData,calculateCategoryInterval:function(){var e=this,t=e.getLabelModel(),n=e.scale,i=n.getExtent(),a=n.count();if(i[1]-i[0]<1)return 0;var r=i[0],o=e.dataToCoord(r+1)-e.dataToCoord(r),s=Math.abs(o),l=Za.getBoundingRect(r,t.getFont(),"center","top"),u=Math.max(l.height,7)/s;isNaN(u)&&(u=1/0);var c=Math.max(0,Math.floor(u)),h=YR(e.model),d=h.lastAutoInterval,f=h.lastTickCount;return null!=d&&null!=f&&Math.abs(d-c)<=1&&Math.abs(f-a)<=1&&d>c?c=d:(h.lastTickCount=a,h.lastAutoInterval=c),c}},Ge.inherits(FR,Nx);var GR=FR,WR=function(e){this.name=e||"",this.cx=0,this.cy=0,this._radiusAxis=new HR,this._angleAxis=new GR,this._radiusAxis.polar=this._angleAxis.polar=this};WR.prototype={type:"polar",axisPointerEnabled:!0,constructor:WR,dimensions:["radius","angle"],model:null,containPoint:function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},containData:function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},getAxis:function(e){return this["_"+e+"Axis"]},getAxes:function(){return[this._radiusAxis,this._angleAxis]},getAxesByScale:function(e){var t=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===e&&t.push(n),i.scale.type===e&&t.push(i),t},getAngleAxis:function(){return this._angleAxis},getRadiusAxis:function(){return this._radiusAxis},getOtherAxis:function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},getTooltipAxes:function(e){var t=null!=e&&"auto"!==e?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},dataToPoint:function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},pointToData:function(e,t){var n=this.pointToCoord(e);return[this._radiusAxis.radiusToData(n[0],t),this._angleAxis.angleToData(n[1],t)]},pointToCoord:function(e){var t=e[0]-this.cx,n=e[1]-this.cy,i=this.getAngleAxis(),a=i.getExtent(),r=Math.min(a[0],a[1]),o=Math.max(a[0],a[1]);i.inverse?r=o-360:o=r+360;var s=Math.sqrt(t*t+n*n);t/=s,n/=s;for(var l=Math.atan2(-n,t)/Math.PI*180,u=l<r?1:-1;l<r||l>o;)l+=360*u;return[s,l]},coordToPoint:function(e){var t=e[0],n=e[1]/180*Math.PI;return[Math.cos(n)*t+this.cx,-Math.sin(n)*t+this.cy]},getArea:function(){var e=this.getAngleAxis(),t=this.getRadiusAxis().getExtent().slice();t[0]>t[1]&&t.reverse();var n=e.getExtent(),i=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:t[0],r:t[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:e.inverse,contain:function(e,t){var n=e-this.cx,i=t-this.cy,a=n*n+i*i,r=this.r,o=this.r0;return a<=r*r&&a>=o*o}}}};var jR=WR,UR=fd.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});Ge.merge(UR.prototype,R_);var ZR={splitNumber:5};function XR(e,t){return t.type||(t.data?"category":"value")}Dw("angle",UR,XR,{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}}),Dw("radius",UR,XR,ZR),Qx.extendComponentModel({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(e){var t;return this.ecModel.eachComponent(e,(function(e){e.getCoordSysModel()===this&&(t=e)}),this),t},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}});var qR=Ph.parsePercent,KR=N_.createScaleByModel,$R=N_.niceScaleExtent,QR=uy.getStackedDimension;function JR(e,t){var n=this,i=n.getAngleAxis(),a=n.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),a.scale.setExtent(1/0,-1/0),e.eachSeries((function(e){if(e.coordinateSystem===n){var t=e.getData();Ge.each(t.mapDimension("radius",!0),(function(e){a.scale.unionExtentFromData(t,QR(t,e))})),Ge.each(t.mapDimension("angle",!0),(function(e){i.scale.unionExtentFromData(t,QR(t,e))}))}})),$R(i.scale,i.model),$R(a.scale,a.model),"category"===i.type&&!i.onBand){var r=i.getExtent(),o=360/i.scale.count();i.inverse?r[1]+=o:r[1]-=o,i.setExtent(r[0],r[1])}}function ez(e,t){if(e.type=t.get("type"),e.scale=KR(t),e.onBand=t.get("boundaryGap")&&"category"===e.type,e.inverse=t.get("inverse"),"angleAxis"===t.mainType){e.inverse^=t.get("clockwise");var n=t.get("startAngle");e.setExtent(n,n+(e.inverse?-360:360))}t.axis=e,e.model=t}var tz={dimensions:jR.prototype.dimensions,create:function(e,t){var n=[];return e.eachComponent("polar",(function(e,i){var a=new jR(i);a.update=JR;var r=a.getRadiusAxis(),o=a.getAngleAxis(),s=e.findAxisModel("radiusAxis"),l=e.findAxisModel("angleAxis");ez(r,s),ez(o,l),function(e,t,n){var i=t.get("center"),a=n.getWidth(),r=n.getHeight();e.cx=qR(i[0],a),e.cy=qR(i[1],r);var o=e.getRadiusAxis(),s=Math.min(a,r)/2,l=t.get("radius");null==l?l=[0,"100%"]:Ge.isArray(l)||(l=[0,l]),l=[qR(l[0],s),qR(l[1],s)],o.inverse?o.setExtent(l[1],l[0]):o.setExtent(l[0],l[1])}(a,e,t),n.push(a),e.coordinateSystem=a,a.model=e})),e.eachSeries((function(t){if("polar"===t.get("coordinateSystem")){var n=e.queryComponents({mainType:"polar",index:t.get("polarIndex"),id:t.get("polarId")})[0];t.coordinateSystem=n.coordinateSystem}})),n}};kf.register("polar",tz);var nz=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function iz(e,t,n){t[1]>t[0]&&(t=t.slice().reverse());var i=e.coordToPoint([t[0],n]),a=e.coordToPoint([t[1],n]);return{x1:i[0],y1:i[1],x2:a[0],y2:a[1]}}function az(e){return e.getRadiusAxis().inverse?0:1}function rz(e){var t=e[0],n=e[e.length-1];t&&n&&Math.abs(Math.abs(t.coord-n.coord)-360)<1e-4&&e.pop()}CS.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(e,t){if(this.group.removeAll(),e.get("show")){var n=e.axis,i=n.polar,a=i.getRadiusAxis().getExtent(),r=n.getTicksCoords(),o=n.getMinorTicksCoords(),s=Ge.map(n.getViewLabels(),(function(e){return(e=Ge.clone(e)).coord=n.dataToCoord(e.tickValue),e}));rz(s),rz(r),Ge.each(nz,(function(t){!e.get(t+".show")||n.scale.isBlank()&&"axisLine"!==t||this["_"+t](e,i,r,o,a,s)}),this)}},_axisLine:function(e,t,n,i,a){var r,o=e.getModel("axisLine.lineStyle"),s=az(t),l=s?0:1;(r=0===a[l]?new rh.Circle({shape:{cx:t.cx,cy:t.cy,r:a[s]},style:o.getLineStyle(),z2:1,silent:!0}):new rh.Ring({shape:{cx:t.cx,cy:t.cy,r:a[s],r0:a[l]},style:o.getLineStyle(),z2:1,silent:!0})).style.fill=null,this.group.add(r)},_axisTick:function(e,t,n,i,a){var r=e.getModel("axisTick"),o=(r.get("inside")?-1:1)*r.get("length"),s=a[az(t)],l=Ge.map(n,(function(e){return new rh.Line({shape:iz(t,[s,s+o],e.coord)})}));this.group.add(rh.mergePath(l,{style:Ge.defaults(r.getModel("lineStyle").getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")})}))},_minorTick:function(e,t,n,i,a){if(i.length){for(var r=e.getModel("axisTick"),o=e.getModel("minorTick"),s=(r.get("inside")?-1:1)*o.get("length"),l=a[az(t)],u=[],c=0;c<i.length;c++)for(var h=0;h<i[c].length;h++)u.push(new rh.Line({shape:iz(t,[l,l+s],i[c][h].coord)}));this.group.add(rh.mergePath(u,{style:Ge.defaults(o.getModel("lineStyle").getLineStyle(),Ge.defaults(r.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}))}))}},_axisLabel:function(e,t,n,i,a,r){var o=e.getCategories(!0),s=e.getModel("axisLabel"),l=s.get("margin"),u=e.get("triggerEvent");Ge.each(r,(function(n,i){var r=s,c=n.tickValue,h=a[az(t)],d=t.coordToPoint([h+l,n.coord]),f=t.cx,p=t.cy,g=Math.abs(d[0]-f)/h<.3?"center":d[0]>f?"left":"right",m=Math.abs(d[1]-p)/h<.3?"middle":d[1]>p?"top":"bottom";o&&o[c]&&o[c].textStyle&&(r=new xh(o[c].textStyle,s,s.ecModel));var v=new rh.Text({silent:gS.isLabelSilent(e)});this.group.add(v),rh.setTextStyle(v.style,r,{x:d[0],y:d[1],textFill:r.getTextColor()||e.get("axisLine.lineStyle.color"),text:n.formattedLabel,textAlign:g,textVerticalAlign:m}),u&&(v.eventData=gS.makeAxisEventDataBase(e),v.eventData.targetType="axisLabel",v.eventData.value=n.rawLabel)}),this)},_splitLine:function(e,t,n,i,a){var r=e.getModel("splitLine").getModel("lineStyle"),o=r.get("color"),s=0;o=o instanceof Array?o:[o];for(var l=[],u=0;u<n.length;u++){var c=s++%o.length;l[c]=l[c]||[],l[c].push(new rh.Line({shape:iz(t,a,n[u].coord)}))}for(u=0;u<l.length;u++)this.group.add(rh.mergePath(l[u],{style:Ge.defaults({stroke:o[u%o.length]},r.getLineStyle()),silent:!0,z:e.get("z")}))},_minorSplitLine:function(e,t,n,i,a){if(i.length){for(var r=e.getModel("minorSplitLine").getModel("lineStyle"),o=[],s=0;s<i.length;s++)for(var l=0;l<i[s].length;l++)o.push(new rh.Line({shape:iz(t,a,i[s][l].coord)}));this.group.add(rh.mergePath(o,{style:r.getLineStyle(),silent:!0,z:e.get("z")}))}},_splitArea:function(e,t,n,i,a){if(n.length){var r=e.getModel("splitArea").getModel("areaStyle"),o=r.get("color"),s=0;o=o instanceof Array?o:[o];for(var l=[],u=Math.PI/180,c=-n[0].coord*u,h=Math.min(a[0],a[1]),d=Math.max(a[0],a[1]),f=e.get("clockwise"),p=1;p<n.length;p++){var g=s++%o.length;l[g]=l[g]||[],l[g].push(new rh.Sector({shape:{cx:t.cx,cy:t.cy,r0:h,r:d,startAngle:c,endAngle:-n[p].coord*u,clockwise:f},silent:!0})),c=-n[p].coord*u}for(p=0;p<l.length;p++)this.group.add(rh.mergePath(l[p],{style:Ge.defaults({fill:o[p%o.length]},r.getAreaStyle()),silent:!0}))}}});var oz=["axisLine","axisTickLabel","axisName"],sz=["splitLine","splitArea","minorSplitLine"];CS.extend({type:"radiusAxis",axisPointerClass:"PolarAxisPointer",render:function(e,t){if(this.group.removeAll(),e.get("show")){var n=e.axis,i=n.polar,a=i.getAngleAxis(),r=n.getTicksCoords(),o=n.getMinorTicksCoords(),s=a.getExtent()[0],l=n.getExtent(),u=function(e,t,n){return{position:[e.cx,e.cy],rotation:n/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:t.getModel("axisLabel").get("rotate"),z2:1}}(i,e,s),c=new gS(e,u);Ge.each(oz,c.add,c),this.group.add(c.getGroup()),Ge.each(sz,(function(t){e.get(t+".show")&&!n.scale.isBlank()&&this["_"+t](e,i,s,l,r,o)}),this)}},_splitLine:function(e,t,n,i,a){var r=e.getModel("splitLine").getModel("lineStyle"),o=r.get("color"),s=0;o=o instanceof Array?o:[o];for(var l=[],u=0;u<a.length;u++){var c=s++%o.length;l[c]=l[c]||[],l[c].push(new rh.Circle({shape:{cx:t.cx,cy:t.cy,r:a[u].coord}}))}for(u=0;u<l.length;u++)this.group.add(rh.mergePath(l[u],{style:Ge.defaults({stroke:o[u%o.length],fill:null},r.getLineStyle()),silent:!0}))},_minorSplitLine:function(e,t,n,i,a,r){if(r.length){for(var o=e.getModel("minorSplitLine").getModel("lineStyle"),s=[],l=0;l<r.length;l++)for(var u=0;u<r[l].length;u++)s.push(new rh.Circle({shape:{cx:t.cx,cy:t.cy,r:r[l][u].coord}}));this.group.add(rh.mergePath(s,{style:Ge.defaults({fill:null},o.getLineStyle()),silent:!0}))}},_splitArea:function(e,t,n,i,a){if(a.length){var r=e.getModel("splitArea").getModel("areaStyle"),o=r.get("color"),s=0;o=o instanceof Array?o:[o];for(var l=[],u=a[0].coord,c=1;c<a.length;c++){var h=s++%o.length;l[h]=l[h]||[],l[h].push(new rh.Sector({shape:{cx:t.cx,cy:t.cy,r0:u,r:a[c].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),u=a[c].coord}for(c=0;c<l.length;c++)this.group.add(rh.mergePath(l[c],{style:Ge.defaults({fill:o[c%o.length]},r.getAreaStyle()),silent:!0}))}}});var lz=pP.extend({makeElOption:function(e,t,n,i,a){var r=n.axis;"angle"===r.dim&&(this.animationThreshold=Math.PI/18);var o,s=r.polar,l=s.getOtherAxis(r).getExtent();o=r["dataTo"+Xh.capitalFirst(r.dim)](t);var u=i.get("type");if(u&&"none"!==u){var c=_P.buildElStyle(i),h=uz[u](r,s,o,l,c);h.style=c,e.graphicKey=h.type,e.pointer=h}var d=function(e,t,n,i,a){var r=t.axis,o=r.dataToCoord(e),s=i.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,c,h=i.getRadiusAxis().getExtent();if("radius"===r.dim){var d=ln.create();ln.rotate(d,d,s),ln.translate(d,d,[i.cx,i.cy]),l=rh.applyTransform([o,-a],d);var f=t.getModel("axisLabel").get("rotate")||0,p=gS.innerTextLayout(s,f*Math.PI/180,-1);u=p.textAlign,c=p.textVerticalAlign}else{var g=h[1];l=i.coordToPoint([g+a,o]);var m=i.cx,v=i.cy;u=Math.abs(l[0]-m)/g<.3?"center":l[0]>m?"left":"right",c=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:c}}(t,n,0,s,i.get("label.margin"));_P.buildLabelElOption(e,n,i,a,d)}});var uz={line:function(e,t,n,i,a){return"angle"===e.dim?{type:"Line",shape:_P.makeLineShape(t.coordToPoint([i[0],n]),t.coordToPoint([i[1],n]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r:n}}},shadow:function(e,t,n,i,a){var r=Math.max(1,e.getBandWidth()),o=Math.PI/180;return"angle"===e.dim?{type:"Sector",shape:_P.makeSectorShape(t.cx,t.cy,i[0],i[1],(-n-r/2)*o,(r/2-n)*o)}:{type:"Sector",shape:_P.makeSectorShape(t.cx,t.cy,n-r/2,n+r/2,0,2*Math.PI)}}};CS.registerAxisPointerClass("PolarAxisPointer",lz),Qx.registerLayout(Ge.curry(BR,"bar")),Qx.extendComponentView({type:"polar"});var cz=fd.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(e){fd.prototype.init.apply(this,arguments),Bo.defaultEmphasis(e,"label",["show"])},optionUpdated:function(){var e=this.option,t=this;e.regions=DI.getFilledRegions(e.regions,e.map,e.nameMap),this._optionModelMap=Ge.reduce(e.regions||[],(function(e,n){return n.name&&e.set(n.name,new xh(n,t)),e}),Ge.createHashMap()),this.updateSelectedMap(e.regions)},defaultOption:{zlevel:0,z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",color:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},getRegionModel:function(e){return this._optionModelMap.get(e)||new xh(null,this,this.ecModel)},getFormattedLabel:function(e,t){var n=this.getRegionModel(e).get("label"+("normal"===t?".":t+".")+"formatter"),i={name:e};return"function"==typeof n?(i.status=t,n(i)):"string"==typeof n?n.replace("{a}",null!=e?e:""):void 0},setZoom:function(e){this.option.zoom=e},setCenter:function(e){this.option.center=e}});function hz(e,t){t.update="updateView",Qx.registerAction(t,(function(t,n){var i={};return n.eachComponent({mainType:"geo",query:t},(function(n){n[e](t.name);var a=n.coordinateSystem;Ge.each(a.regions,(function(e){i[e.name]=n.isSelected(e.name)||!1}))})),{selected:i,name:t.name}}))}Ge.mixin(cz,vM),Qx.extendComponentView({type:"geo",init:function(e,t){var n=new uI(t,!0);this._mapDraw=n,this.group.add(n.group)},render:function(e,t,n,i){if(!i||"geoToggleSelect"!==i.type||i.from!==this.uid){var a=this._mapDraw;e.get("show")?a.draw(e,t,n,this,i):this._mapDraw.group.removeAll(),this.group.silent=e.get("silent")}},dispose:function(){this._mapDraw&&this._mapDraw.remove()}}),hz("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),hz("select",{type:"geoSelect",event:"geoselected"}),hz("unSelect",{type:"geoUnSelect",event:"geounselected"});var dz=864e5;function fz(e,t,n){this._model=e}function pz(e,t,n,i){var a=n.calendarModel,r=n.seriesModel,o=a?a.coordinateSystem:r?r.coordinateSystem:null;return o===this?o[e](i):null}fz.prototype={constructor:fz,type:"calendar",dimensions:["time","value"],getDimensionsInfo:function(){return[{name:"time",type:"time"},"value"]},getRangeInfo:function(){return this._rangeInfo},getModel:function(){return this._model},getRect:function(){return this._rect},getCellWidth:function(){return this._sw},getCellHeight:function(){return this._sh},getOrient:function(){return this._orient},getFirstDayOfWeek:function(){return this._firstDayOfWeek},getDateInfo:function(e){var t=(e=Ph.parseDate(e)).getFullYear(),n=e.getMonth()+1;n=n<10?"0"+n:n;var i=e.getDate();i=i<10?"0"+i:i;var a=e.getDay();return{y:t,m:n,d:i,day:a=Math.abs((a+7-this.getFirstDayOfWeek())%7),time:e.getTime(),formatedDate:t+"-"+n+"-"+i,date:e}},getNextNDay:function(e,t){return 0===(t=t||0)||(e=new Date(this.getDateInfo(e).time)).setDate(e.getDate()+t),this.getDateInfo(e)},update:function(e,t){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,i=["width","height"],a=this._model.get("cellSize").slice(),r=this._model.getBoxLayoutParams(),o="horizontal"===this._orient?[n,7]:[7,n];Ge.each([0,1],(function(e){u(a,e)&&(r[i[e]]=a[e]*o[e])}));var s={width:t.getWidth(),height:t.getHeight()},l=this._rect=sd.getLayoutRect(r,s);function u(e,t){return null!=e[t]&&"auto"!==e[t]}Ge.each([0,1],(function(e){u(a,e)||(a[e]=l[i[e]]/o[e])})),this._sw=a[0],this._sh=a[1]},dataToPoint:function(e,t){Ge.isArray(e)&&(e=e[0]),null==t&&(t=!0);var n=this.getDateInfo(e),i=this._rangeInfo,a=n.formatedDate;if(t&&!(n.time>=i.start.time&&n.time<i.end.time+dz))return[NaN,NaN];var r=n.day,o=this._getRangeInfo([i.start.time,a]).nthWeek;return"vertical"===this._orient?[this._rect.x+r*this._sw+this._sw/2,this._rect.y+o*this._sh+this._sh/2]:[this._rect.x+o*this._sw+this._sw/2,this._rect.y+r*this._sh+this._sh/2]},pointToData:function(e){var t=this.pointToDate(e);return t&&t.time},dataToRect:function(e,t){var n=this.dataToPoint(e,t);return{contentShape:{x:n[0]-(this._sw-this._lineWidth)/2,y:n[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:n,tl:[n[0]-this._sw/2,n[1]-this._sh/2],tr:[n[0]+this._sw/2,n[1]-this._sh/2],br:[n[0]+this._sw/2,n[1]+this._sh/2],bl:[n[0]-this._sw/2,n[1]+this._sh/2]}},pointToDate:function(e){var t=Math.floor((e[0]-this._rect.x)/this._sw)+1,n=Math.floor((e[1]-this._rect.y)/this._sh)+1,i=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(n,t-1,i):this._getDateByWeeksAndDay(t,n-1,i)},convertToPixel:Ge.curry(pz,"dataToPoint"),convertFromPixel:Ge.curry(pz,"pointToData"),_initRangeOption:function(){var e=this._model.get("range"),t=e;if(Ge.isArray(t)&&1===t.length&&(t=t[0]),/^\d{4}$/.test(t)&&(e=[t+"-01-01",t+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(t)){var n=this.getDateInfo(t),i=n.date;i.setMonth(i.getMonth()+1);var a=this.getNextNDay(i,-1);e=[n.formatedDate,a.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(t)&&(e=[t,t]);var r=this._getRangeInfo(e);return r.start.time>r.end.time&&e.reverse(),e},_getRangeInfo:function(e){var t;(e=[this.getDateInfo(e[0]),this.getDateInfo(e[1])])[0].time>e[1].time&&(t=!0,e.reverse());var n=Math.floor(e[1].time/dz)-Math.floor(e[0].time/dz)+1,i=new Date(e[0].time),a=i.getDate(),r=e[1].date.getDate();i.setDate(a+n-1);var o=i.getDate();if(o!==r)for(var s=i.getTime()-e[1].time>0?1:-1;(o=i.getDate())!==r&&(i.getTime()-e[1].time)*s>0;)n-=s,i.setDate(o-s);var l=Math.floor((n+e[0].day+6)/7),u=t?1-l:l-1;return t&&e.reverse(),{range:[e[0].formatedDate,e[1].formatedDate],start:e[0],end:e[1],allDay:n,weeks:l,nthWeek:u,fweek:e[0].day,lweek:e[1].day}},_getDateByWeeksAndDay:function(e,t,n){var i=this._getRangeInfo(n);if(e>i.weeks||0===e&&t<i.fweek||e===i.weeks&&t>i.lweek)return!1;var a=7*(e-1)-i.fweek+t,r=new Date(i.start.time);return r.setDate(i.start.d+a),this.getDateInfo(r)}},fz.dimensions=fz.prototype.dimensions,fz.getDimensionsInfo=fz.prototype.getDimensionsInfo,fz.create=function(e,t){var n=[];return e.eachComponent("calendar",(function(e){var t=new fz(e);n.push(t),e.coordinateSystem=t})),e.eachSeries((function(e){"calendar"===e.get("coordinateSystem")&&(e.coordinateSystem=n[e.get("calendarIndex")||0])})),n},kf.register("calendar",fz);var gz=sd.getLayoutParams,mz=sd.sizeCalculable,vz=sd.mergeLayoutParam,yz=fd.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(e,t,n,i){var a=gz(e);yz.superApply(this,"init",arguments),_z(e,a)},mergeOption:function(e,t){yz.superApply(this,"mergeOption",arguments),_z(this.option,e)}});function _z(e,t){var n=e.cellSize;Ge.isArray(n)?1===n.length&&(n[1]=n[0]):n=e.cellSize=[n,n];var i=Ge.map([0,1],(function(e){return mz(t,e)&&(n[e]="auto"),null!=n[e]&&"auto"!==n[e]}));vz(e,t,{type:"box",ignoreSize:i})}var xz={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},bz={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]};Qx.extendComponentView({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(e,t,n){var i=this.group;i.removeAll();var a=e.coordinateSystem,r=a.getRangeInfo(),o=a.getOrient();this._renderDayRect(e,r,i),this._renderLines(e,r,o,i),this._renderYearText(e,r,o,i),this._renderMonthText(e,o,i),this._renderWeekText(e,r,o,i)},_renderDayRect:function(e,t,n){for(var i=e.coordinateSystem,a=e.getModel("itemStyle").getItemStyle(),r=i.getCellWidth(),o=i.getCellHeight(),s=t.start.time;s<=t.end.time;s=i.getNextNDay(s,1).time){var l=i.dataToRect([s],!1).tl,u=new rh.Rect({shape:{x:l[0],y:l[1],width:r,height:o},cursor:"default",style:a});n.add(u)}},_renderLines:function(e,t,n,i){var a=this,r=e.coordinateSystem,o=e.getModel("splitLine.lineStyle").getLineStyle(),s=e.get("splitLine.show"),l=o.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=t.start,c=0;u.time<=t.end.time;c++){d(u.formatedDate),0===c&&(u=r.getDateInfo(t.start.y+"-"+t.start.m));var h=u.date;h.setMonth(h.getMonth()+1),u=r.getDateInfo(h)}function d(t){a._firstDayOfMonth.push(r.getDateInfo(t)),a._firstDayPoints.push(r.dataToRect([t],!1).tl);var l=a._getLinePointsOfOneWeek(e,t,n);a._tlpoints.push(l[0]),a._blpoints.push(l[l.length-1]),s&&a._drawSplitline(l,o,i)}d(r.getNextNDay(t.end.time,1).formatedDate),s&&this._drawSplitline(a._getEdgesPoints(a._tlpoints,l,n),o,i),s&&this._drawSplitline(a._getEdgesPoints(a._blpoints,l,n),o,i)},_getEdgesPoints:function(e,t,n){var i=[e[0].slice(),e[e.length-1].slice()],a="horizontal"===n?0:1;return i[0][a]=i[0][a]-t/2,i[1][a]=i[1][a]+t/2,i},_drawSplitline:function(e,t,n){var i=new rh.Polyline({z2:20,shape:{points:e},style:t});n.add(i)},_getLinePointsOfOneWeek:function(e,t,n){var i=e.coordinateSystem;t=i.getDateInfo(t);for(var a=[],r=0;r<7;r++){var o=i.getNextNDay(t.time,r),s=i.dataToRect([o.time],!1);a[2*o.day]=s.tl,a[2*o.day+1]=s["horizontal"===n?"bl":"tr"]}return a},_formatterLabel:function(e,t){return"string"==typeof e&&e?Xh.formatTplSimple(e,t):"function"==typeof e?e(t):t.nameMap},_yearTextPositionControl:function(e,t,n,i,a){t=t.slice();var r=["center","bottom"];"bottom"===i?(t[1]+=a,r=["center","top"]):"left"===i?t[0]-=a:"right"===i?(t[0]+=a,r=["center","top"]):t[1]-=a;var o=0;return"left"!==i&&"right"!==i||(o=Math.PI/2),{rotation:o,position:t,style:{textAlign:r[0],textVerticalAlign:r[1]}}},_renderYearText:function(e,t,n,i){var a=e.getModel("yearLabel");if(a.get("show")){var r=a.get("margin"),o=a.get("position");o||(o="horizontal"!==n?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,c="horizontal"===n?0:1,h={top:[l,s[c][1]],bottom:[l,s[1-c][1]],left:[s[1-c][0],u],right:[s[c][0],u]},d=t.start.y;+t.end.y>+t.start.y&&(d=d+"-"+t.end.y);var f=a.get("formatter"),p={start:t.start.y,end:t.end.y,nameMap:d},g=this._formatterLabel(f,p),m=new rh.Text({z2:30});rh.setTextStyle(m.style,a,{text:g}),m.attr(this._yearTextPositionControl(m,h[o],n,o,r)),i.add(m)}},_monthTextPositionControl:function(e,t,n,i,a){var r="left",o="top",s=e[0],l=e[1];return"horizontal"===n?(l+=a,t&&(r="center"),"start"===i&&(o="bottom")):(s+=a,t&&(o="middle"),"start"===i&&(r="right")),{x:s,y:l,textAlign:r,textVerticalAlign:o}},_renderMonthText:function(e,t,n){var i=e.getModel("monthLabel");if(i.get("show")){var a=i.get("nameMap"),r=i.get("margin"),o=i.get("position"),s=i.get("align"),l=[this._tlpoints,this._blpoints];Ge.isString(a)&&(a=xz[a.toUpperCase()]||[]);var u="start"===o?0:1,c="horizontal"===t?0:1;r="start"===o?-r:r;for(var h="center"===s,d=0;d<l[u].length-1;d++){var f=l[u][d].slice(),p=this._firstDayOfMonth[d];if(h){var g=this._firstDayPoints[d];f[c]=(g[c]+l[0][d+1][c])/2}var m=i.get("formatter"),v=a[+p.m-1],y={yyyy:p.y,yy:(p.y+"").slice(2),MM:p.m,M:+p.m,nameMap:v},_=this._formatterLabel(m,y),x=new rh.Text({z2:30});Ge.extend(rh.setTextStyle(x.style,i,{text:_}),this._monthTextPositionControl(f,h,t,o,r)),n.add(x)}}},_weekTextPositionControl:function(e,t,n,i,a){var r="center",o="middle",s=e[0],l=e[1],u="start"===n;return"horizontal"===t?(s=s+i+(u?1:-1)*a[0]/2,r=u?"right":"left"):(l=l+i+(u?1:-1)*a[1]/2,o=u?"bottom":"top"),{x:s,y:l,textAlign:r,textVerticalAlign:o}},_renderWeekText:function(e,t,n,i){var a=e.getModel("dayLabel");if(a.get("show")){var r=e.coordinateSystem,o=a.get("position"),s=a.get("nameMap"),l=a.get("margin"),u=r.getFirstDayOfWeek();Ge.isString(s)&&(s=bz[s.toUpperCase()]||[]);var c=r.getNextNDay(t.end.time,7-t.lweek).time,h=[r.getCellWidth(),r.getCellHeight()];l=Ph.parsePercent(l,h["horizontal"===n?0:1]),"start"===o&&(c=r.getNextNDay(t.start.time,-(7+t.fweek)).time,l=-l);for(var d=0;d<7;d++){var f,p=r.getNextNDay(c,d),g=r.dataToRect([p.time],!1).center;f=Math.abs((d+u)%7);var m=new rh.Text({z2:30});Ge.extend(rh.setTextStyle(m.style,a,{text:s[f]}),this._weekTextPositionControl(g,n,o,l,h)),i.add(m)}}}});var wz=Ph.parsePercent,Sz={path:null,compoundPath:null,group:rh.Group,image:rh.Image,text:rh.Text};Qx.registerPreprocessor((function(e){var t=e.graphic;Ge.isArray(t)?t[0]&&t[0].elements?e.graphic=[e.graphic[0]]:e.graphic=[{elements:t}]:t&&!t.elements&&(e.graphic=[{elements:[t]}])}));var Mz=Qx.extendComponentModel({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(e){var t=this.option.elements;this.option.elements=null,Mz.superApply(this,"mergeOption",arguments),this.option.elements=t},optionUpdated:function(e,t){var n=this.option,i=(t?n:e).elements,a=n.elements=t?[]:n.elements,r=[];this._flatten(i,r);var o=Bo.mappingToExists(a,r);Bo.makeIdAndName(o);var s=this._elOptionsToUpdate=[];Ge.each(o,(function(e,t){var n=e.option;n&&(s.push(n),function(e,t){var n=e.exist;if(t.id=e.keyInfo.id,!t.type&&n&&(t.type=n.type),null==t.parentId){var i=t.parentOption;i?t.parentId=i.id:n&&(t.parentId=n.parentId)}t.parentOption=null}(e,n),function(e,t,n){var i=Ge.extend({},n),a=e[t],r=n.$action||"merge";"merge"===r?a?(Ge.merge(a,i,!0),sd.mergeLayoutParam(a,i,{ignoreSize:!0}),sd.copyLayoutParams(n,a)):e[t]=i:"replace"===r?e[t]=i:"remove"===r&&a&&(e[t]=null)}(a,t,n),function(e,t){if(!e)return;e.hv=t.hv=[Az(t,["left","right"]),Az(t,["top","bottom"])],"group"===e.type&&(null==e.width&&(e.width=t.width=0),null==e.height&&(e.height=t.height=0))}(a[t],n))}),this);for(var l=a.length-1;l>=0;l--)null==a[l]?a.splice(l,1):delete a[l].$action},_flatten:function(e,t,n){Ge.each(e,(function(e){if(e){n&&(e.parentOption=n),t.push(e);var i=e.children;"group"===e.type&&i&&this._flatten(i,t,e),delete e.children}}),this)},useElOptionsToUpdate:function(){var e=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,e}});function Tz(e,t,n,i){var a=n.type,r=new(Sz.hasOwnProperty(a)?Sz[a]:rh.getShapeClass(a))(n);t.add(r),i.set(e,r),r.__ecGraphicId=e}function Iz(e,t){var n=e&&e.parent;n&&("group"===e.type&&e.traverse((function(e){Iz(e,t)})),t.removeKey(e.__ecGraphicId),n.remove(e))}function Az(e,t){var n;return Ge.each(t,(function(t){null!=e[t]&&"auto"!==e[t]&&(n=!0)})),n}Qx.extendComponentView({type:"graphic",init:function(e,t){this._elMap=Ge.createHashMap(),this._lastGraphicModel},render:function(e,t,n){e!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=e,this._updateElements(e),this._relocate(e,n)},_updateElements:function(e){var t=e.useElOptionsToUpdate();if(t){var n=this._elMap,i=this.group;Ge.each(t,(function(t){var a=t.$action,r=t.id,o=n.get(r),s=t.parentId,l=null!=s?n.get(s):i,u=t.style;"text"===t.type&&u&&(t.hv&&t.hv[1]&&(u.textVerticalAlign=u.textBaseline=null),!u.hasOwnProperty("textFill")&&u.fill&&(u.textFill=u.fill),!u.hasOwnProperty("textStroke")&&u.stroke&&(u.textStroke=u.stroke));var c=function(e){return e=Ge.extend({},e),Ge.each(["id","parentId","$action","hv","bounding"].concat(sd.LOCATION_PARAMS),(function(t){delete e[t]})),e}(t);a&&"merge"!==a?"replace"===a?(Iz(o,n),Tz(r,l,c,n)):"remove"===a&&Iz(o,n):o?o.attr(c):Tz(r,l,c,n);var h=n.get(r);h&&(h.__ecGraphicWidthOption=t.width,h.__ecGraphicHeightOption=t.height,function(e,t,n){var i=e.eventData;e.silent||e.ignore||i||(i=e.eventData={componentType:"graphic",componentIndex:t.componentIndex,name:e.name});i&&(i.info=e.info)}(h,e))}))}},_relocate:function(e,t){for(var n=e.option.elements,i=this.group,a=this._elMap,r=t.getWidth(),o=t.getHeight(),s=0;s<n.length;s++){var l=n[s];if((c=a.get(l.id))&&c.isGroup){var u=(h=c.parent)===i;c.__ecGraphicWidth=wz(c.__ecGraphicWidthOption,u?r:h.__ecGraphicWidth)||0,c.__ecGraphicHeight=wz(c.__ecGraphicHeightOption,u?o:h.__ecGraphicHeight)||0}}for(s=n.length-1;s>=0;s--){var c;l=n[s];if(c=a.get(l.id)){var h,d=(h=c.parent)===i?{width:r,height:o}:{width:h.__ecGraphicWidth,height:h.__ecGraphicHeight};sd.positionElement(c,l,d,null,{hv:l.hv,boundingMode:l.bounding})}}},_clear:function(){var e=this._elMap;e.each((function(t){Iz(t,e)})),this._elMap=Ge.createHashMap()},dispose:function(){this._clear()}});var Dz={};var Cz={register:function(e,t){Dz[e]=t},get:function(e){return Dz[e]}},Oz=Qx.extendComponentModel({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){Oz.superApply(this,"optionUpdated",arguments),Ge.each(this.option.feature,(function(e,t){var n=Cz.get(t);n&&Ge.merge(e,n.defaultOption)}))},defaultOption:{show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1}}}),kz=sd.getLayoutRect,Lz=sd.box,Ez=sd.positionElement;var Nz=function(e,t){var n=Xh.normalizeCssArray(t.get("padding")),i=t.getItemStyle(["color","opacity"]);return i.fill=t.get("backgroundColor"),e=new rh.Rect({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get("borderRadius")},style:i,silent:!0,z2:-1})},Pz={layout:function(e,t,n){var i=t.getBoxLayoutParams(),a=t.get("padding"),r={width:n.getWidth(),height:n.getHeight()},o=kz(i,r,a);Lz(t.get("orient"),e,t.get("itemGap"),o.width,o.height),Ez(e,i,r,a)},makeBackground:Nz};Qx.extendComponentView({type:"toolbox",render:function(e,t,n,i){var a=this.group;if(a.removeAll(),e.get("show")){var r=+e.get("itemSize"),o=e.get("feature")||{},s=this._features||(this._features={}),l=[];Ge.each(o,(function(e,t){l.push(t)})),new rv(this._featureNames||[],l).add(u).update(u).remove(Ge.curry(u,null)).execute(),this._featureNames=l,Pz.layout(a,e,n),a.add(Pz.makeBackground(a.getBoundingRect(),e)),a.eachChild((function(e){var t=e.__title,i=e.hoverStyle;if(i&&t){var o=Za.getBoundingRect(t,Za.makeFont(i)),s=e.position[0]+a.position[0],l=!1;e.position[1]+a.position[1]+r+o.height>n.getHeight()&&(i.textPosition="top",l=!0);var u=l?-5-o.height:r+8;s+o.width/2>n.getWidth()?(i.textPosition=["100%",u],i.textAlign="right"):s-o.width/2<0&&(i.textPosition=[0,u],i.textAlign="left")}}))}function u(u,c){var h,d=l[u],f=l[c],p=o[d],g=new xh(p,e,e.ecModel);if(i&&null!=i.newTitle&&i.featureName===d&&(p.title=i.newTitle),d&&!f){if(function(e){return 0===e.indexOf("my")}(d))h={model:g,onclick:g.option.onclick,featureName:d};else{var m=Cz.get(d);if(!m)return;h=new m(g,t,n)}s[d]=h}else{if(!(h=s[f]))return;h.model=g,h.ecModel=t,h.api=n}d||!f?g.get("show")&&!h.unusable?(!function(i,o,s){var l=i.getModel("iconStyle"),u=i.getModel("emphasis.iconStyle"),c=o.getIcons?o.getIcons():i.get("icon"),h=i.get("title")||{};if("string"==typeof c){var d=c,f=h;h={},(c={})[s]=d,h[s]=f}var p=i.iconPaths={};Ge.each(c,(function(s,c){var d=rh.createIcon(s,{},{x:-r/2,y:-r/2,width:r,height:r});d.setStyle(l.getItemStyle()),d.hoverStyle=u.getItemStyle(),d.setStyle({text:h[c],textAlign:u.get("textAlign"),textBorderRadius:u.get("textBorderRadius"),textPadding:u.get("textPadding"),textFill:null});var f=e.getModel("tooltip");f&&f.get("show")&&d.attr("tooltip",Ge.extend({content:h[c],formatter:f.get("formatter",!0)||function(){return h[c]},formatterParams:{componentType:"toolbox",name:c,title:h[c],$vars:["name","title"]},position:f.get("position",!0)||"bottom"},f.option)),rh.setHoverStyle(d),e.get("showTitle")&&(d.__title=h[c],d.on("mouseover",(function(){var t=u.getItemStyle(),n="vertical"===e.get("orient")?null==e.get("right")?"right":"left":null==e.get("bottom")?"bottom":"top";d.setStyle({textFill:u.get("textFill")||t.fill||t.stroke||"#000",textBackgroundColor:u.get("textBackgroundColor"),textPosition:u.get("textPosition")||n})})).on("mouseout",(function(){d.setStyle({textFill:null,textBackgroundColor:null})}))),d.trigger(i.get("iconStatus."+c)||"normal"),a.add(d),d.on("click",Ge.bind(o.onclick,o,t,n,c)),p[c]=d}))}(g,h,d),g.setIconStatus=function(e,t){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[e]=t,i[e]&&i[e].trigger(t)},h.render&&h.render(g,t,n,i)):h.remove&&h.remove(t,n):h.dispose&&h.dispose(t,n)}},updateView:function(e,t,n,i){Ge.each(this._features,(function(e){e.updateView&&e.updateView(e.model,t,n,i)}))},remove:function(e,t){Ge.each(this._features,(function(n){n.remove&&n.remove(e,t)})),this.group.removeAll()},dispose:function(e,t){Ge.each(this._features,(function(n){n.dispose&&n.dispose(e,t)}))}});var Rz=Rg.toolbox.saveAsImage;function zz(e){this.model=e}zz.defaultOption={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:Rz.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:Rz.lang.slice()},zz.prototype.unusable=!oe.canvasSupported,zz.prototype.onclick=function(e,t){var n=this.model,i=n.get("name")||e.get("title.0.text")||"echarts",a="svg"===t.getZr().painter.getType()?"svg":n.get("type",!0)||"png",r=t.getConnectedDataURL({type:a,backgroundColor:n.get("backgroundColor",!0)||e.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")});if("function"!=typeof MouseEvent||oe.browser.ie||oe.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var o=atob(r.split(",")[1]),s=o.length,l=new Uint8Array(s);s--;)l[s]=o.charCodeAt(s);var u=new Blob([l]);window.navigator.msSaveOrOpenBlob(u,i+"."+a)}else{var c=n.get("lang"),h='<body style="margin:0;"><img src="'+r+'" style="max-width:100%;" title="'+(c&&c[0]||"")+'" /></body>';window.open().document.write(h)}else{var d=document.createElement("a");d.download=i+"."+a,d.target="_blank",d.href=r;var f=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});d.dispatchEvent(f)}},Cz.register("saveAsImage",zz);var Bz=Rg.toolbox.magicType,Vz="__ec_magicType_stack__";function Hz(e){this.model=e}Hz.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:Ge.clone(Bz.title),option:{},seriesIndex:{}};var Yz=Hz.prototype;Yz.getIcons=function(){var e=this.model,t=e.get("icon"),n={};return Ge.each(e.get("type"),(function(e){t[e]&&(n[e]=t[e])})),n};var Fz={line:function(e,t,n,i){if("bar"===e)return Ge.merge({id:t,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get("option.line")||{},!0)},bar:function(e,t,n,i){if("line"===e)return Ge.merge({id:t,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get("option.bar")||{},!0)},stack:function(e,t,n,i){var a=n.get("stack")===Vz;if("line"===e||"bar"===e)return i.setIconStatus("stack",a?"normal":"emphasis"),Ge.merge({id:t,stack:a?"":Vz},i.get("option.stack")||{},!0)}},Gz=[["line","bar"],["stack"]];Yz.onclick=function(e,t,n){var i=this.model,a=i.get("seriesIndex."+n);if(Fz[n]){var r,o={series:[]};if(Ge.each(Gz,(function(e){Ge.indexOf(e,n)>=0&&Ge.each(e,(function(e){i.setIconStatus(e,"normal")}))})),i.setIconStatus(n,"emphasis"),e.eachComponent({mainType:"series",query:null==a?null:{seriesIndex:a}},(function(t){var a=t.subType,r=t.id,s=Fz[n](a,r,t,i);s&&(Ge.defaults(s,t.option),o.series.push(s));var l=t.coordinateSystem;if(l&&"cartesian2d"===l.type&&("line"===n||"bar"===n)){var u=l.getAxesByScale("ordinal")[0];if(u){var c=u.dim+"Axis",h=e.queryComponents({mainType:c,index:t.get(name+"Index"),id:t.get(name+"Id")})[0].componentIndex;o[c]=o[c]||[];for(var d=0;d<=h;d++)o[c][h]=o[c][h]||{};o[c][h].boundaryGap="bar"===n}}})),"stack"===n)r=o.series&&o.series[0]&&o.series[0].stack===Vz?Ge.merge({stack:Bz.title.tiled},Bz.title):Ge.clone(Bz.title);t.dispatchAction({type:"changeMagicType",currentType:n,newOption:o,newTitle:r,featureName:"magicType"})}},Qx.registerAction({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(e,t){t.mergeOption(e.newOption)})),Cz.register("magicType",Hz);var Wz=Rg.toolbox.dataView,jz=new Array(60).join("-"),Uz="\t";function Zz(e){return Ge.map(e,(function(e){var t=e.getRawData(),n=[e.name],i=[];return t.each(t.dimensions,(function(){for(var e=arguments.length,a=arguments[e-1],r=t.getName(a),o=0;o<e-1;o++)i[o]=arguments[o];n.push((r?r+Uz:"")+i.join(Uz))})),n.join("\n")})).join("\n\n"+jz+"\n\n")}function Xz(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var qz=new RegExp("["+Uz+"]+","g");function Kz(e,t){var n=e.split(new RegExp("\n*"+jz+"\n*","g")),i={series:[]};return Ge.each(n,(function(e,n){if(function(e){if(e.slice(0,e.indexOf("\n")).indexOf(Uz)>=0)return!0}(e)){var a=function(e){for(var t=e.split(/\n+/g),n=Xz(t.shift()).split(qz),i=[],a=Ge.map(n,(function(e){return{name:e,data:[]}})),r=0;r<t.length;r++){var o=Xz(t[r]).split(qz);i.push(o.shift());for(var s=0;s<o.length;s++)a[s]&&(a[s].data[r]=o[s])}return{series:a,categories:i}}(e),r=t[n],o=r.axisDim+"Axis";r&&(i[o]=i[o]||[],i[o][r.axisIndex]={data:a.categories},i.series=i.series.concat(a.series))}else{a=function(e){for(var t=e.split(/\n+/g),n=Xz(t.shift()),i=[],a=0;a<t.length;a++){var r,o=Xz(t[a]).split(qz),s="",l=!1;isNaN(o[0])?(l=!0,s=o[0],o=o.slice(1),i[a]={name:s,value:[]},r=i[a].value):r=i[a]=[];for(var u=0;u<o.length;u++)r.push(+o[u]);1===r.length&&(l?i[a].value=r[0]:i[a]=r[0])}return{name:n,data:i}}(e);i.series.push(a)}})),i}function $z(e){this._dom=null,this.model=e}function Qz(e,t){return Ge.map(e,(function(e,n){var i=t&&t[n];return Ge.isObject(i)&&!Ge.isArray(i)?(Ge.isObject(e)&&!Ge.isArray(e)&&(e=e.value),Ge.defaults({value:e},i)):e}))}$z.defaultOption={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:Ge.clone(Wz.title),lang:Ge.clone(Wz.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},$z.prototype.onclick=function(e,t){var n=t.getDom(),i=this.model;this._dom&&n.removeChild(this._dom);var a=document.createElement("div");a.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",a.style.backgroundColor=i.get("backgroundColor")||"#fff";var r=document.createElement("h4"),o=i.get("lang")||[];r.innerHTML=o[0]||i.get("title"),r.style.cssText="margin: 10px 20px;",r.style.color=i.get("textColor");var s=document.createElement("div"),l=document.createElement("textarea");s.style.cssText="display:block;width:100%;overflow:auto;";var u=i.get("optionToContent"),c=i.get("contentToOption"),h=function(e){var t,n,i=function(e){var t={},n=[],i=[];return e.eachRawSeries((function(e){var a=e.coordinateSystem;if(!a||"cartesian2d"!==a.type&&"polar"!==a.type)n.push(e);else{var r=a.getBaseAxis();if("category"===r.type){var o=r.dim+"_"+r.index;t[o]||(t[o]={categoryAxis:r,valueAxis:a.getOtherAxis(r),series:[]},i.push({axisDim:r.dim,axisIndex:r.index})),t[o].series.push(e)}else n.push(e)}})),{seriesGroupByCategoryAxis:t,other:n,meta:i}}(e);return{value:Ge.filter([(t=i.seriesGroupByCategoryAxis,n=[],Ge.each(t,(function(e,t){var i=e.categoryAxis,a=e.valueAxis.dim,r=[" "].concat(Ge.map(e.series,(function(e){return e.name}))),o=[i.model.getCategories()];Ge.each(e.series,(function(e){o.push(e.getRawData().mapArray(a,(function(e){return e})))}));for(var s=[r.join(Uz)],l=0;l<o[0].length;l++){for(var u=[],c=0;c<o.length;c++)u.push(o[c][l]);s.push(u.join(Uz))}n.push(s.join("\n"))})),n.join("\n\n"+jz+"\n\n")),Zz(i.other)],(function(e){return e.replace(/[\n\t\s]/g,"")})).join("\n\n"+jz+"\n\n"),meta:i.meta}}(e);if("function"==typeof u){var d=u(t.getOption());"string"==typeof d?s.innerHTML=d:Ge.isDom(d)&&s.appendChild(d)}else s.appendChild(l),l.readOnly=i.get("readOnly"),l.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",l.style.color=i.get("textColor"),l.style.borderColor=i.get("textareaBorderColor"),l.style.backgroundColor=i.get("textareaColor"),l.value=h.value;var f=h.meta,p=document.createElement("div");p.style.cssText="position:absolute;bottom:0;left:0;right:0;";var g="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",m=document.createElement("div"),v=document.createElement("div");g+=";background-color:"+i.get("buttonColor"),g+=";color:"+i.get("buttonTextColor");var y=this;function _(){n.removeChild(a),y._dom=null}Vt.addEventListener(m,"click",_),Vt.addEventListener(v,"click",(function(){var e;try{e="function"==typeof c?c(s,t.getOption()):Kz(l.value,f)}catch(e){throw _(),new Error("Data view format error "+e)}e&&t.dispatchAction({type:"changeDataView",newOption:e}),_()})),m.innerHTML=o[1],v.innerHTML=o[2],v.style.cssText=g,m.style.cssText=g,!i.get("readOnly")&&p.appendChild(v),p.appendChild(m),a.appendChild(r),a.appendChild(s),a.appendChild(p),s.style.height=n.clientHeight-80+"px",n.appendChild(a),this._dom=a},$z.prototype.remove=function(e,t){this._dom&&t.getDom().removeChild(this._dom)},$z.prototype.dispose=function(e,t){this.remove(e,t)},Cz.register("dataView",$z),Qx.registerAction({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},(function(e,t){var n=[];Ge.each(e.newOption.series,(function(e){var i=t.getSeriesByName(e.name)[0];if(i){var a=i.get("data");n.push({name:e.name,data:Qz(e.data,a)})}else n.push(Ge.extend({type:"scatter"},e))})),t.mergeOption(Ge.defaults({series:n},e.newOption))}));var Jz=Ge.each,eB=Ge.indexOf,tB=Ge.curry,nB=["dataToPoint","pointToData"],iB=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"];function aB(e,t,n){var i=this._targetInfoList=[],a={},r=sB(t,e);Jz(lB,(function(e,t){(!n||!n.include||eB(n.include,t)>=0)&&e(r,i,a)}))}var rB=aB.prototype;function oB(e){return e[0]>e[1]&&e.reverse(),e}function sB(e,t){return Bo.parseFinder(e,t,{includeMainTypes:iB})}rB.setOutputRanges=function(e,t){this.matchOutputRanges(e,t,(function(e,t,n){if((e.coordRanges||(e.coordRanges=[])).push(t),!e.coordRange){e.coordRange=t;var i=hB[e.brushType](0,n,t);e.__rangeOffset={offset:fB[e.brushType](i.values,e.range,[1,1]),xyMinMax:i.xyMinMax}}}))},rB.matchOutputRanges=function(e,t,n){Jz(e,(function(e){var i=this.findTargetInfo(e,t);i&&!0!==i&&Ge.each(i.coordSyses,(function(i){var a=hB[e.brushType](1,i,e.range);n(e,a.values,i,t)}))}),this)},rB.setInputRanges=function(e,t){Jz(e,(function(e){var n,i,a,r,o,s=this.findTargetInfo(e,t);if(e.range=e.range||[],s&&!0!==s){e.panelId=s.panelId;var l=hB[e.brushType](0,s.coordSys,e.coordRange),u=e.__rangeOffset;e.range=u?fB[e.brushType](l.values,u.offset,(n=l.xyMinMax,i=u.xyMinMax,a=gB(n),r=gB(i),o=[a[0]/r[0],a[1]/r[1]],isNaN(o[0])&&(o[0]=1),isNaN(o[1])&&(o[1]=1),o)):l.values}}),this)},rB.makePanelOpts=function(e,t){return Ge.map(this._targetInfoList,(function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t&&t(n),clipPath:Gk.makeRectPanelClipPath(i),isTargetByCursor:Gk.makeRectIsTargetByCursor(i,e,n.coordSysModel),getLinearBrushOtherExtent:Gk.makeLinearBrushOtherExtent(i)}}))},rB.controlSeries=function(e,t,n){var i=this.findTargetInfo(e,n);return!0===i||i&&eB(i.coordSyses,t.coordinateSystem)>=0},rB.findTargetInfo=function(e,t){for(var n=this._targetInfoList,i=sB(t,e),a=0;a<n.length;a++){var r=n[a],o=e.panelId;if(o){if(r.panelId===o)return r}else for(a=0;a<uB.length;a++)if(uB[a](i,r))return r}return!0};var lB={grid:function(e,t){var n=e.xAxisModels,i=e.yAxisModels,a=e.gridModels,r=Ge.createHashMap(),o={},s={};(n||i||a)&&(Jz(n,(function(e){var t=e.axis.grid.model;r.set(t.id,t),o[t.id]=!0})),Jz(i,(function(e){var t=e.axis.grid.model;r.set(t.id,t),s[t.id]=!0})),Jz(a,(function(e){r.set(e.id,e),o[e.id]=!0,s[e.id]=!0})),r.each((function(e){var a=e.coordinateSystem,r=[];Jz(a.getCartesians(),(function(e,t){(eB(n,e.getAxis("x").model)>=0||eB(i,e.getAxis("y").model)>=0)&&r.push(e)})),t.push({panelId:"grid--"+e.id,gridModel:e,coordSysModel:e,coordSys:r[0],coordSyses:r,getPanelRect:cB.grid,xAxisDeclared:o[e.id],yAxisDeclared:s[e.id]})})))},geo:function(e,t){Jz(e.geoModels,(function(e){var n=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:cB.geo})}))}},uB=[function(e,t){var n=e.xAxisModel,i=e.yAxisModel,a=e.gridModel;return!a&&n&&(a=n.axis.grid.model),!a&&i&&(a=i.axis.grid.model),a&&a===t.gridModel},function(e,t){var n=e.geoModel;return n&&n===t.geoModel}],cB={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform(rh.getTransform(e)),t}},hB={lineX:tB(dB,0),lineY:tB(dB,1),rect:function(e,t,n){var i=t[nB[e]]([n[0][0],n[1][0]]),a=t[nB[e]]([n[0][1],n[1][1]]),r=[oB([i[0],a[0]]),oB([i[1],a[1]])];return{values:r,xyMinMax:r}},polygon:function(e,t,n){var i=[[1/0,-1/0],[1/0,-1/0]];return{values:Ge.map(n,(function(n){var a=t[nB[e]](n);return i[0][0]=Math.min(i[0][0],a[0]),i[1][0]=Math.min(i[1][0],a[1]),i[0][1]=Math.max(i[0][1],a[0]),i[1][1]=Math.max(i[1][1],a[1]),a})),xyMinMax:i}}};function dB(e,t,n,i){var a=n.getAxis(["x","y"][e]),r=oB(Ge.map([0,1],(function(e){return t?a.coordToData(a.toLocalCoord(i[e])):a.toGlobalCoord(a.dataToCoord(i[e]))}))),o=[];return o[e]=r,o[1-e]=[NaN,NaN],{values:r,xyMinMax:o}}var fB={lineX:tB(pB,0),lineY:tB(pB,1),rect:function(e,t,n){return[[e[0][0]-n[0]*t[0][0],e[0][1]-n[0]*t[0][1]],[e[1][0]-n[1]*t[1][0],e[1][1]-n[1]*t[1][1]]]},polygon:function(e,t,n){return Ge.map(e,(function(e,i){return[e[0]-n[0]*t[i][0],e[1]-n[1]*t[i][1]]}))}};function pB(e,t,n,i){return[t[0]-i[e]*n[0],t[1]-i[e]*n[1]]}function gB(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var mB=aB,vB=Ge.each,yB="\0_ec_hist_store";function _B(e){var t=e[yB];return t||(t=e[yB]=[{}]),t}var xB=function(e,t){var n=_B(e);vB(t,(function(t,i){for(var a=n.length-1;a>=0;a--){if(n[a][i])break}if(a<0){var r=e.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(r){var o=r.getPercentRange();n[0][i]={dataZoomId:i,start:o[0],end:o[1]}}}})),n.push(t)},bB=function(e){var t=_B(e),n=t[t.length-1];t.length>1&&t.pop();var i={};return vB(n,(function(e,n){for(var a=t.length-1;a>=0;a--){if(e=t[a][n]){i[n]=e;break}}})),i},wB={push:xB,pop:bB,clear:function(e){e[yB]=null},count:function(e){return _B(e).length}};fd.registerSubTypeDefaulter("dataZoom",(function(){return"slider"}));var SB=["cartesian2d","polar","singleAxis"];function MB(e,t){e=e.slice();var n=Ge.map(e,Xh.capitalFirst);t=(t||[]).slice();var i=Ge.map(t,Xh.capitalFirst);return function(a,r){Ge.each(e,(function(e,o){for(var s={name:e,capital:n[o]},l=0;l<t.length;l++)s[t[l]]=e+i[l];a.call(r,s)}))}}var TB=MB(["x","y","z","radius","angle","single"],["axisIndex","axis","index","id"]);var IB={isCoordSupported:function(e){return Ge.indexOf(SB,e)>=0},createNameEach:MB,eachAxisDim:TB,createLinkedNodesFinder:function(e,t,n){return function(a){var r,o={nodes:[],records:{}};if(t((function(e){o.records[e.name]={}})),!a)return o;i(a,o);do{r=!1,e(s)}while(r);function s(e){!function(e,t){return Ge.indexOf(t.nodes,e)>=0}(e,o)&&function(e,i){var a=!1;return t((function(t){Ge.each(n(e,t)||[],(function(e){i.records[t.name][e]&&(a=!0)}))})),a}(e,o)&&(i(e,o),r=!0)}return o};function i(e,i){i.nodes.push(e),t((function(t){Ge.each(n(e,t)||[],(function(e){i.records[t.name][e]=!0}))}))}}},AB=Ge.each,DB=Ph.asc,CB=function(e,t,n,i){this._dimName=e,this._axisIndex=t,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=i,this._dataZoomModel=n};function OB(e,t){var n=e.getAxisModel(),i=e._percentWindow,a=e._valueWindow;if(i){var r=Ph.getPixelPrecision(a,[0,500]);r=Math.min(r,20);var o=t||0===i[0]&&100===i[1];n.setRange(o?null:+a[0].toFixed(r),o?null:+a[1].toFixed(r))}}CB.prototype={constructor:CB,hostedBy:function(e){return this._dataZoomModel===e},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var e=[],t=this.ecModel;return t.eachSeries((function(n){if(IB.isCoordSupported(n.get("coordinateSystem"))){var i=this._dimName,a=t.queryComponents({mainType:i+"Axis",index:n.get(i+"AxisIndex"),id:n.get(i+"AxisId")})[0];this._axisIndex===(a&&a.componentIndex)&&e.push(n)}}),this),e},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var e,t,n,i=this._dimName,a=this.ecModel,r=this.getAxisModel();return"x"===i||"y"===i?(t="gridIndex",e="x"===i?"y":"x"):(t="polarIndex",e="angle"===i?"radius":"angle"),a.eachComponent(e+"Axis",(function(e){(e.get(t)||0)===(r.get(t)||0)&&(n=e)})),n},getMinMaxSpan:function(){return Ge.clone(this._minMaxSpan)},calculateDataWindow:function(e){var t,n=this._dataExtent,i=this.getAxisModel().axis.scale,a=this._dataZoomModel.getRangePropMode(),r=[0,100],o=[],s=[];AB(["start","end"],(function(l,u){var c=e[l],h=e[l+"Value"];"percent"===a[u]?(null==c&&(c=r[u]),h=i.parse(Ph.linearMap(c,r,n))):(t=!0,h=null==h?n[u]:i.parse(h),c=Ph.linearMap(h,n,r)),s[u]=h,o[u]=c})),DB(s),DB(o);var l=this._minMaxSpan;function u(e,t,n,a,r){var o=r?"Span":"ValueSpan";NO(0,e,n,"all",l["min"+o],l["max"+o]);for(var s=0;s<2;s++)t[s]=Ph.linearMap(e[s],n,a,!0),r&&(t[s]=i.parse(t[s]))}return t?u(s,o,n,r,!1):u(o,s,r,n,!0),{valueWindow:s,percentWindow:o}},reset:function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=function(e,t,n){var i=[1/0,-1/0];AB(n,(function(e){var n=e.getData();n&&AB(n.mapDimension(t,!0),(function(e){var t=n.getApproximateExtent(e);t[0]<i[0]&&(i[0]=t[0]),t[1]>i[1]&&(i[1]=t[1])}))})),i[1]<i[0]&&(i=[NaN,NaN]);return function(e,t){var n=e.getAxisModel(),i=n.getMin(!0),a="category"===n.get("type"),r=a&&n.getCategories().length;null!=i&&"dataMin"!==i&&"function"!=typeof i?t[0]=i:a&&(t[0]=r>0?0:NaN);var o=n.getMax(!0);null!=o&&"dataMax"!==o&&"function"!=typeof o?t[1]=o:a&&(t[1]=r>0?r-1:NaN);n.get("scale",!0)||(t[0]>0&&(t[0]=0),t[1]<0&&(t[1]=0))}(e,i),i}(this,this._dimName,t),function(e){var t=e._minMaxSpan={},n=e._dataZoomModel,i=e._dataExtent;AB(["min","max"],(function(a){var r=n.get(a+"Span"),o=n.get(a+"ValueSpan");null!=o&&(o=e.getAxisModel().axis.scale.parse(o)),null!=o?r=Ph.linearMap(i[0]+o,i,[0,100],!0):null!=r&&(o=Ph.linearMap(r,[0,100],i,!0)-i[0]),t[a+"Span"]=r,t[a+"ValueSpan"]=o}))}(this);var n=this.calculateDataWindow(e.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,OB(this)}},restore:function(e){e===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,OB(this,!0))},filterData:function(e,t){if(e===this._dataZoomModel){var n=this._dimName,i=this.getTargetSeriesModels(),a=e.get("filterMode"),r=this._valueWindow;"none"!==a&&AB(i,(function(e){var t=e.getData(),i=t.mapDimension(n,!0);i.length&&("weakFilter"===a?t.filterSelf((function(e){for(var n,a,o,s=0;s<i.length;s++){var l=t.get(i[s],e),u=!isNaN(l),c=l<r[0],h=l>r[1];if(u&&!c&&!h)return!0;u&&(o=!0),c&&(n=!0),h&&(a=!0)}return o&&n&&a})):AB(i,(function(n){if("empty"===a)e.setData(t=t.map(n,(function(e){return function(e){return e>=r[0]&&e<=r[1]}(e)?e:NaN})));else{var i={};i[n]=r,t.selectRange(i)}})),AB(i,(function(e){t.setApproximateExtent(r,e)})))}))}}};var kB=CB,LB=Ge.each,EB=IB.eachAxisDim,NB=Qx.extendComponentModel({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(e,t,n){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var i=PB(e);this.settledOption=i,this.mergeDefaultAndTheme(e,n),this.doInit(i)},mergeOption:function(e){var t=PB(e);Ge.merge(this.option,e,!0),Ge.merge(this.settledOption,t,!0),this.doInit(t)},doInit:function(e){var t=this.option;oe.canvasSupported||(t.realtime=!1),this._setDefaultThrottle(e),RB(this,e);var n=this.settledOption;LB([["start","startValue"],["end","endValue"]],(function(e,i){"value"===this._rangePropMode[i]&&(t[e[0]]=n[e[0]]=null)}),this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var e=this._axisProxies;this.eachTargetAxis((function(t,n,i,a){var r=this.dependentModels[t.axis][n],o=r.__dzAxisProxy||(r.__dzAxisProxy=new kB(t.name,n,this,a));e[t.name+"_"+n]=o}),this)},_resetTarget:function(){var e=this.option,t=this._judgeAutoMode();EB((function(t){var n=t.axisIndex;e[n]=Bo.normalizeToArray(e[n])}),this),"axisIndex"===t?this._autoSetAxisIndex():"orient"===t&&this._autoSetOrient()},_judgeAutoMode:function(){var e=this.option,t=!1;EB((function(n){null!=e[n.axisIndex]&&(t=!0)}),this);var n=e.orient;return null==n&&t?"orient":t?void 0:(null==n&&(e.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var e=!0,t=this.get("orient",!0),n=this.option,i=this.dependentModels;if(e){var a="vertical"===t?"y":"x";i[a+"Axis"].length?(n[a+"AxisIndex"]=[0],e=!1):LB(i.singleAxis,(function(i){e&&i.get("orient",!0)===t&&(n.singleAxisIndex=[i.componentIndex],e=!1)}))}e&&EB((function(t){if(e){var i=[],a=this.dependentModels[t.axis];if(a.length&&!i.length)for(var r=0,o=a.length;r<o;r++)"category"===a[r].get("type")&&i.push(r);n[t.axisIndex]=i,i.length&&(e=!1)}}),this),e&&this.ecModel.eachSeries((function(e){this._isSeriesHasAllAxesTypeOf(e,"value")&&EB((function(t){var i=n[t.axisIndex],a=e.get(t.axisIndex),r=e.get(t.axisId);a=e.ecModel.queryComponents({mainType:t.axis,index:a,id:r})[0].componentIndex,Ge.indexOf(i,a)<0&&i.push(a)}))}),this)},_autoSetOrient:function(){var e;this.eachTargetAxis((function(t){!e&&(e=t.name)}),this),this.option.orient="y"===e?"vertical":"horizontal"},_isSeriesHasAllAxesTypeOf:function(e,t){var n=!0;return EB((function(i){var a=e.get(i.axisIndex),r=this.dependentModels[i.axis][a];r&&r.get("type")===t||(n=!1)}),this),n},_setDefaultThrottle:function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var t=this.ecModel.option;this.option.throttle=t.animation&&t.animationDurationUpdate>0?100:20}},getFirstTargetAxisModel:function(){var e;return EB((function(t){if(null==e){var n=this.get(t.axisIndex);n.length&&(e=this.dependentModels[t.axis][n[0]])}}),this),e},eachTargetAxis:function(e,t){var n=this.ecModel;EB((function(i){LB(this.get(i.axisIndex),(function(a){e.call(t,i,a,this,n)}),this)}),this)},getAxisProxy:function(e,t){return this._axisProxies[e+"_"+t]},getAxisModel:function(e,t){var n=this.getAxisProxy(e,t);return n&&n.getAxisModel()},setRawRange:function(e){var t=this.option,n=this.settledOption;LB([["start","startValue"],["end","endValue"]],(function(i){null==e[i[0]]&&null==e[i[1]]||(t[i[0]]=n[i[0]]=e[i[0]],t[i[1]]=n[i[1]]=e[i[1]])}),this),RB(this,e)},setCalculatedRange:function(e){var t=this.option;LB(["start","startValue","end","endValue"],(function(n){t[n]=e[n]}))},getPercentRange:function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},getValueRange:function(e,t){if(null!=e||null!=t)return this.getAxisProxy(e,t).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(e){if(e)return e.__dzAxisProxy;var t=this._axisProxies;for(var n in t)if(t.hasOwnProperty(n)&&t[n].hostedBy(this))return t[n];for(var n in t)if(t.hasOwnProperty(n)&&!t[n].hostedBy(this))return t[n]},getRangePropMode:function(){return this._rangePropMode.slice()}});function PB(e){var t={};return LB(["start","end","startValue","endValue","throttle"],(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t}function RB(e,t){var n=e._rangePropMode,i=e.get("rangeMode");LB([["start","startValue"],["end","endValue"]],(function(e,a){var r=null!=t[e[0]],o=null!=t[e[1]];r&&!o?n[a]="percent":!r&&o?n[a]="value":i?n[a]=i[a]:r&&(n[a]="percent")}))}var zB=NB,BB=fg.extend({type:"dataZoom",render:function(e,t,n,i){this.dataZoomModel=e,this.ecModel=t,this.api=n},getTargetCoordInfo:function(){var e=this.dataZoomModel,t=this.ecModel,n={};return e.eachTargetAxis((function(e,i){var a=t.getComponent(e.axis,i);if(a){var r=a.getCoordSysModel();r&&function(e,t,n,i){for(var a,r=0;r<n.length;r++)if(n[r].model===e){a=n[r];break}a||n.push(a={model:e,axisModels:[],coordIndex:i});a.axisModels.push(t)}(r,a,n[r.mainType]||(n[r.mainType]=[]),r.componentIndex)}}),this),n}}),VB=BB;zB.extend({type:"dataZoom.select"}),VB.extend({type:"dataZoom.select"});var HB=Ge.createHashMap,YB=Ge.each;Qx.registerProcessor({getTargetSeries:function(e){var t=HB();return e.eachComponent("dataZoom",(function(e){e.eachTargetAxis((function(e,n,i){var a=i.getAxisProxy(e.name,n);YB(a.getTargetSeriesModels(),(function(e){t.set(e.uid,e)}))}))})),t},modifyOutputEnd:!0,overallReset:function(e,t){e.eachComponent("dataZoom",(function(e){e.eachTargetAxis((function(e,n,i){i.getAxisProxy(e.name,n).reset(i,t)})),e.eachTargetAxis((function(e,n,i){i.getAxisProxy(e.name,n).filterData(i,t)}))})),e.eachComponent("dataZoom",(function(e){var t=e.findRepresentativeAxisProxy(),n=t.getDataPercentWindow(),i=t.getDataValueWindow();e.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}))}}),Qx.registerAction("dataZoom",(function(e,t){var n=IB.createLinkedNodesFinder(Ge.bind(t.eachComponent,t,"dataZoom"),IB.eachAxisDim,(function(e,t){return e.get(t.axisIndex)})),i=[];t.eachComponent({mainType:"dataZoom",query:e},(function(e,t){i.push.apply(i,n(e).nodes)})),Ge.each(i,(function(t,n){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})}))}));var FB=Rg.toolbox.dataZoom,GB=Ge.each;function WB(e,t,n){(this._brushController=new Vk(n.getZr())).on("brush",Ge.bind(this._onBrush,this)).mount(),this._isZoomActive}WB.defaultOption={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:Ge.clone(FB.title)};var jB=WB.prototype;jB.render=function(e,t,n,i){this.model=e,this.ecModel=t,this.api=n,function(e,t,n,i,a){var r=n._isZoomActive;i&&"takeGlobalCursor"===i.type&&(r="dataZoomSelect"===i.key&&i.dataZoomSelectActive);n._isZoomActive=r,e.setIconStatus("zoom",r?"emphasis":"normal");var o=new mB(ZB(e.option),t,{include:["grid"]});n._brushController.setPanels(o.makePanelOpts(a,(function(e){return e.xAxisDeclared&&!e.yAxisDeclared?"lineX":!e.xAxisDeclared&&e.yAxisDeclared?"lineY":"rect"}))).enableBrush(!!r&&{brushType:"auto",brushStyle:{lineWidth:0,fill:"rgba(0,0,0,0.2)"}})}(e,t,this,i,n),function(e,t){e.setIconStatus("back",wB.count(t)>1?"emphasis":"normal")}(e,t)},jB.onclick=function(e,t,n){UB[n].call(this)},jB.remove=function(e,t){this._brushController.unmount()},jB.dispose=function(e,t){this._brushController.dispose()};var UB={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:e})},back:function(){this._dispatchZoomAction(wB.pop(this.ecModel))}};function ZB(e){var t={};return Ge.each(["xAxisIndex","yAxisIndex"],(function(n){t[n]=e[n],null==t[n]&&(t[n]="all"),(!1===t[n]||"none"===t[n])&&(t[n]=[])})),t}jB._onBrush=function(e,t){if(t.isEnd&&e.length){var n={},i=this.ecModel;this._brushController.updateCovers([]),new mB(ZB(this.model.option),i,{include:["grid"]}).matchOutputRanges(e,i,(function(e,t,n){if("cartesian2d"===n.type){var i=e.brushType;"rect"===i?(a("x",n,t[0]),a("y",n,t[1])):a({lineX:"x",lineY:"y"}[i],n,t)}})),wB.push(i,n),this._dispatchZoomAction(n)}function a(e,t,a){var r=t.getAxis(e),o=r.model,s=function(e,t,n){var i;return n.eachComponent({mainType:"dataZoom",subType:"select"},(function(n){n.getAxisModel(e,t.componentIndex)&&(i=n)})),i}(e,o,i),l=s.findRepresentativeAxisProxy(o).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(a=NO(0,a.slice(),r.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(n[s.id]={dataZoomId:s.id,startValue:a[0],endValue:a[1]})}},jB._dispatchZoomAction=function(e){var t=[];GB(e,(function(e,n){t.push(Ge.clone(e))})),t.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:t})},Cz.register("dataZoom",WB),Qx.registerPreprocessor((function(e){if(e){var t=e.dataZoom||(e.dataZoom=[]);Ge.isArray(t)||(e.dataZoom=t=[t]);var n=e.toolbox;if(n&&(Ge.isArray(n)&&(n=n[0]),n&&n.feature)){var i=n.feature.dataZoom;a("xAxis",i),a("yAxis",i)}}function a(n,i){if(i){var a=n+"Index",r=i[a];null==r||"all"===r||Ge.isArray(r)||(r=!1===r||"none"===r?[]:[r]),function(t,n){var i=e[t];Ge.isArray(i)||(i=i?[i]:[]);GB(i,n)}(n,(function(e,o){if(null==r||"all"===r||-1!==Ge.indexOf(r,o)){var s={type:"select",$fromToolbox:!0,filterMode:i.filterMode||"filter",id:"\0_ec_\0toolbox-dataZoom_"+n+o};s[a]=o,t.push(s)}}))}}}));var XB=Rg.toolbox.restore;function qB(e){this.model=e}qB.defaultOption={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:XB.title},qB.prototype.onclick=function(e,t,n){wB.clear(e),t.dispatchAction({type:"restore",from:this.uid})},Cz.register("restore",qB),Qx.registerAction({type:"restore",event:"restore",update:"prepareAndUpdate"},(function(e,t){t.resetOption("recreate")})),Qx.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 KB=Ge.each,$B=Xh.toCamelCase,QB=["","-webkit-","-moz-","-o-"];function JB(e){var t,n,i,a=[],r=e.get("transitionDuration"),o=e.get("backgroundColor"),s=e.getModel("textStyle"),l=e.get("padding");return r&&a.push((i="left "+(t=r)+"s "+(n="cubic-bezier(0.23, 1, 0.32, 1)")+",top "+t+"s "+n,Ge.map(QB,(function(e){return e+"transition:"+i})).join(";"))),o&&(oe.canvasSupported?a.push("background-Color:"+o):(a.push("background-Color:#"+qn.toHex(o)),a.push("filter:alpha(opacity=70)"))),KB(["width","color","radius"],(function(t){var n="border-"+t,i=$B(n),r=e.get(i);null!=r&&a.push(n+":"+r+("color"===t?"":"px"))})),a.push(function(e){var t=[],n=e.get("fontSize"),i=e.getTextColor();return i&&t.push("color:"+i),t.push("font:"+e.getFont()),n&&t.push("line-height:"+Math.round(3*n/2)+"px"),KB(["decoration","align"],(function(n){var i=e.get(n);i&&t.push("text-"+n+":"+i)})),t.join(";")}(s)),null!=l&&a.push("padding:"+Xh.normalizeCssArray(l).join("px ")+"px"),a.join(";")+";"}function eV(e,t,n,i,a){var r=t&&t.painter;if(n){var o=r&&r.getViewportRoot();o&&Ct.transformLocalCoord(e,o,document.body,i,a)}else{e[0]=i,e[1]=a;var s=r&&r.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}}function tV(e,t,n){if(oe.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var a=this._zr=t.getZr(),r=this._appendToBody=n&&n.appendToBody;this._styleCoord=[0,0],eV(this._styleCoord,a,r,t.getWidth()/2,t.getHeight()/2),r?document.body.appendChild(i):e.appendChild(i),this._container=e,this._show=!1,this._hideTimeout;var o=this;i.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},i.onmousemove=function(e){if(e=e||window.event,!o._enterable){var t=a.handler,n=a.painter.getViewportRoot();Vt.normalizeEvent(n,e,!0),t.dispatch("mousemove",e)}},i.onmouseleave=function(){o._enterable&&o._show&&o.hideLater(o._hideDelay),o._inContent=!1}}tV.prototype={constructor:tV,_enterable:!0,update:function(){var e=this._container,t=e.currentStyle||document.defaultView.getComputedStyle(e),n=e.style;"absolute"!==n.position&&"absolute"!==t.position&&(n.position="relative")},show:function(e){clearTimeout(this._hideTimeout);var t=this.el,n=this._styleCoord;t.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+JB(e)+";left:"+n[0]+"px;top:"+n[1]+"px;"+(e.get("extraCssText")||""),t.style.display=t.innerHTML?"block":"none",t.style.pointerEvents=this._enterable?"auto":"none",this._show=!0},setContent:function(e){this.el.innerHTML=null==e?"":e},setEnterable:function(e){this._enterable=e},getSize:function(){var e=this.el;return[e.clientWidth,e.clientHeight]},moveTo:function(e,t){var n=this._styleCoord;eV(n,this._zr,this._appendToBody,e,t);var i=this.el.style;i.left=n[0]+"px",i.top=n[1]+"px"},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(e){!this._show||this._inContent&&this._enterable||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(Ge.bind(this.hide,this),e)):this.hide())},isShow:function(){return this._show},dispose:function(){this.el.parentNode.removeChild(this.el)},getOuterSize:function(){var e=this.el.clientWidth,t=this.el.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var n=document.defaultView.getComputedStyle(this.el);n&&(e+=parseInt(n.borderLeftWidth,10)+parseInt(n.borderRightWidth,10),t+=parseInt(n.borderTopWidth,10)+parseInt(n.borderBottomWidth,10))}return{width:e,height:t}}};var nV=tV;function iV(e){this._zr=e.getZr(),this._show=!1,this._hideTimeout}iV.prototype={constructor:iV,_enterable:!0,update:function(){},show:function(e){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(e,t,n){this.el&&this._zr.remove(this.el);for(var i={},a=e,r="{marker",o=a.indexOf(r);o>=0;){var s=a.indexOf("|}"),l=a.substr(o+7,s-o-7);l.indexOf("sub")>-1?i["marker"+l]={textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:t[l],textOffset:[3,0]}:i["marker"+l]={textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:t[l]},o=(a=a.substr(s+1)).indexOf("{marker")}this.el=new Zl({style:{rich:i,text:e,textLineHeight:20,textBackgroundColor:n.get("backgroundColor"),textBorderRadius:n.get("borderRadius"),textFill:n.get("textStyle.color"),textPadding:n.get("padding")},z:n.get("z")}),this._zr.add(this.el);var u=this;this.el.on("mouseover",(function(){u._enterable&&(clearTimeout(u._hideTimeout),u._show=!0),u._inContent=!0})),this.el.on("mouseout",(function(){u._enterable&&u._show&&u.hideLater(u._hideDelay),u._inContent=!1}))},setEnterable:function(e){this._enterable=e},getSize:function(){var e=this.el.getBoundingRect();return[e.width,e.height]},moveTo:function(e,t){this.el&&this.el.attr("position",[e,t])},hide:function(){this.el&&this.el.hide(),this._show=!1},hideLater:function(e){!this._show||this._inContent&&this._enterable||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(Ge.bind(this.hide,this),e)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){var e=this.getSize();return{width:e[0],height:e[1]}}};var aV=iV,rV=Bo.getTooltipRenderMode,oV=Ge.bind,sV=Ge.each,lV=Ph.parsePercent,uV=new rh.Rect({shape:{x:-1,y:-1,width:2,height:2}});function cV(e){for(var t=e.pop();e.length;){var n=e.pop();n&&(xh.isInstance(n)&&(n=n.get("tooltip",!0)),"string"==typeof n&&(n={formatter:n}),t=new xh(n,t,t.ecModel))}return t}function hV(e,t){return e.dispatchAction||Ge.bind(t.dispatchAction,t)}function dV(e){return"center"===e||"middle"===e}Qx.extendComponentView({type:"tooltip",init:function(e,t){if(!oe.node){var n,i=e.getComponent("tooltip"),a=i.get("renderMode");this._renderMode=rV(a),"html"===this._renderMode?(n=new nV(t.getDom(),t,{appendToBody:i.get("appendToBody",!0)}),this._newLine="<br/>"):(n=new aV(t),this._newLine="\n"),this._tooltipContent=n}},render:function(e,t,n){if(!oe.node){this.group.removeAll(),this._tooltipModel=e,this._ecModel=t,this._api=n,this._lastDataByCoordSys=null,this._alwaysShowContent=e.get("alwaysShowContent");var i=this._tooltipContent;i.update(),i.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var e=this._tooltipModel.get("triggerOn");iP.register("itemTooltip",this._api,oV((function(t,n,i){"none"!==e&&(e.indexOf(t)>=0?this._tryShow(n,i):"leave"===t&&this._hide(i))}),this))},_keepShow:function(){var e=this._tooltipModel,t=this._ecModel,n=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==e.get("triggerOn")){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY})}))}},manuallyShowTip:function(e,t,n,i){if(i.from!==this.uid&&!oe.node){var a=hV(i,n);this._ticket="";var r=i.dataByCoordSys;if(i.tooltip&&null!=i.x&&null!=i.y){var o=uV;o.position=[i.x,i.y],o.update(),o.tooltip=i.tooltip,this._tryShow({offsetX:i.x,offsetY:i.y,target:o},a)}else if(r)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:i.dataByCoordSys,tooltipOption:i.tooltipOption},a);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(e,t,n,i))return;var s=YN(i,t),l=s.point[0],u=s.point[1];null!=l&&null!=u&&this._tryShow({offsetX:l,offsetY:u,position:i.position,target:s.el},a)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},a))}},manuallyHideTip:function(e,t,n,i){var a=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&a.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,i.from!==this.uid&&this._hide(hV(i,n))},_manuallyAxisShowTip:function(e,t,n,i){var a=i.seriesIndex,r=i.dataIndex,o=t.getComponent("axisPointer").coordSysAxesInfo;if(null!=a&&null!=r&&null!=o){var s=t.getSeriesByIndex(a);if(s)if("axis"===(e=cV([s.getData().getItemModel(r),s,(s.coordinateSystem||{}).model,e])).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:a,dataIndex:r,position:i.position}),!0}},_tryShow:function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var i=e.dataByCoordSys;i&&i.length?this._showAxisTooltip(i,e):n&&null!=n.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(e,n,t)):n&&n.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(e,n,t)):(this._lastDataByCoordSys=null,this._hide(t))}},_showOrMove:function(e,t){var n=e.get("showDelay");t=Ge.bind(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},_showAxisTooltip:function(e,t){var n=this._ecModel,i=this._tooltipModel,a=[t.offsetX,t.offsetY],r=[],o=[],s=cV([t.tooltipOption,i]),l=this._renderMode,u=this._newLine,c={};sV(e,(function(e){sV(e.dataByAxis,(function(e){var t=n.getComponent(e.axisDim+"Axis",e.axisIndex),i=e.value,a=[];if(t&&null!=i){var s=_P.getValueLabel(i,t.axis,n,e.seriesDataIndices,e.valueLabelOpt);Ge.each(e.seriesDataIndices,(function(r){var u=n.getSeriesByIndex(r.seriesIndex),h=r.dataIndexInside,d=u&&u.getDataParams(h);if(d.axisDim=e.axisDim,d.axisIndex=e.axisIndex,d.axisType=e.axisType,d.axisId=e.axisId,d.axisValue=N_.getAxisRawValue(t.axis,i),d.axisValueLabel=s,d){o.push(d);var f,p=u.formatTooltip(h,!0,null,l);if(Ge.isObject(p)){f=p.html;var g=p.markers;Ge.merge(c,g)}else f=p;a.push(f)}}));var h=s;"html"!==l?r.push(a.join(u)):r.push((h?Xh.encodeHTML(h)+u:"")+a.join(u))}}))}),this),r.reverse(),r=r.join(this._newLine+this._newLine);var h=t.position;this._showOrMove(s,(function(){this._updateContentNotChangedOnAxis(e)?this._updatePosition(s,h,a[0],a[1],this._tooltipContent,o):this._showTooltipContent(s,r,o,Math.random(),a[0],a[1],h,void 0,c)}))},_showSeriesItemTooltip:function(e,t,n){var i=this._ecModel,a=t.seriesIndex,r=i.getSeriesByIndex(a),o=t.dataModel||r,s=t.dataIndex,l=t.dataType,u=o.getData(l),c=cV([u.getItemModel(s),o,r&&(r.coordinateSystem||{}).model,this._tooltipModel]),h=c.get("trigger");if(null==h||"item"===h){var d,f,p=o.getDataParams(s,l),g=o.formatTooltip(s,!1,l,this._renderMode);Ge.isObject(g)?(d=g.html,f=g.markers):(d=g,f=null);var m="item_"+o.name+"_"+s;this._showOrMove(c,(function(){this._showTooltipContent(c,d,p,m,e.offsetX,e.offsetY,e.position,e.target,f)})),n({type:"showTip",dataIndexInside:s,dataIndex:u.getRawIndex(s),seriesIndex:a,from:this.uid})}},_showComponentItemTooltip:function(e,t,n){var i=t.tooltip;if("string"==typeof i){i={content:i,formatter:i}}var a=new xh(i,this._tooltipModel,this._ecModel),r=a.get("content"),o=Math.random();this._showOrMove(a,(function(){this._showTooltipContent(a,r,a.get("formatterParams")||{},o,e.offsetX,e.offsetY,e.position,t)})),n({type:"showTip",from:this.uid})},_showTooltipContent:function(e,t,n,i,a,r,o,s,l){if(this._ticket="",e.get("showContent")&&e.get("show")){var u=this._tooltipContent,c=e.get("formatter");o=o||e.get("position");var h=t;if(c&&"string"==typeof c)h=Xh.formatTpl(c,n,!0);else if("function"==typeof c){var d=oV((function(t,i){t===this._ticket&&(u.setContent(i,l,e),this._updatePosition(e,o,a,r,u,n,s))}),this);this._ticket=i,h=c(n,i,d)}u.setContent(h,l,e),u.show(e),this._updatePosition(e,o,a,r,u,n,s)}},_updatePosition:function(e,t,n,i,a,r,o){var s=this._api.getWidth(),l=this._api.getHeight();t=t||e.get("position");var u=a.getSize(),c=e.get("align"),h=e.get("verticalAlign"),d=o&&o.getBoundingRect().clone();if(o&&d.applyTransform(o.transform),"function"==typeof t&&(t=t([n,i],r,a.el,d,{viewSize:[s,l],contentSize:u.slice()})),Ge.isArray(t))n=lV(t[0],s),i=lV(t[1],l);else if(Ge.isObject(t)){t.width=u[0],t.height=u[1];var f=sd.getLayoutRect(t,{width:s,height:l});n=f.x,i=f.y,c=null,h=null}else if("string"==typeof t&&o){var p=function(e,t,n){var i=n[0],a=n[1],r=5,o=0,s=0,l=t.width,u=t.height;switch(e){case"inside":o=t.x+l/2-i/2,s=t.y+u/2-a/2;break;case"top":o=t.x+l/2-i/2,s=t.y-a-r;break;case"bottom":o=t.x+l/2-i/2,s=t.y+u+r;break;case"left":o=t.x-i-r,s=t.y+u/2-a/2;break;case"right":o=t.x+l+r,s=t.y+u/2-a/2}return[o,s]}(t,d,u);n=p[0],i=p[1]}else{p=function(e,t,n,i,a,r,o){var s=n.getOuterSize(),l=s.width,u=s.height;null!=r&&(e+l+r>i?e-=l+r:e+=r);null!=o&&(t+u+o>a?t-=u+o:t+=o);return[e,t]}(n,i,a,s,l,c?null:20,h?null:20);n=p[0],i=p[1]}if(c&&(n-=dV(c)?u[0]/2:"right"===c?u[0]:0),h&&(i-=dV(h)?u[1]/2:"bottom"===h?u[1]:0),e.get("confine")){p=function(e,t,n,i,a){var r=n.getOuterSize(),o=r.width,s=r.height;return e=Math.min(e+o,i)-o,t=Math.min(t+s,a)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}(n,i,a,s,l);n=p[0],i=p[1]}a.moveTo(n,i)},_updateContentNotChangedOnAxis:function(e){var t=this._lastDataByCoordSys,n=!!t&&t.length===e.length;return n&&sV(t,(function(t,i){var a=t.dataByAxis||{},r=(e[i]||{}).dataByAxis||[];(n&=a.length===r.length)&&sV(a,(function(e,t){var i=r[t]||{},a=e.seriesDataIndices||[],o=i.seriesDataIndices||[];(n&=e.value===i.value&&e.axisType===i.axisType&&e.axisId===i.axisId&&a.length===o.length)&&sV(a,(function(e,t){var i=o[t];n&=e.seriesIndex===i.seriesIndex&&e.dataIndex===i.dataIndex}))}))})),this._lastDataByCoordSys=e,!!n},_hide:function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},dispose:function(e,t){oe.node||(this._tooltipContent.dispose(),iP.unregister("itemTooltip",t))}}),Qx.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},(function(){})),Qx.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},(function(){}));var fV=["rect","polygon","keep","clear"];var pV=function(e,t){var n=e&&e.brush;if(Ge.isArray(n)||(n=n?[n]:[]),n.length){var i=[];Ge.each(n,(function(e){var t=e.hasOwnProperty("toolbox")?e.toolbox:[];t instanceof Array&&(i=i.concat(t))}));var a=e&&e.toolbox;Ge.isArray(a)&&(a=a[0]),a||(a={feature:{}},e.toolbox=[a]);var r=a.feature||(a.feature={}),o=r.brush||(r.brush={}),s=o.type||(o.type=[]);s.push.apply(s,i),function(e){var t={};Ge.each(e,(function(e){t[e]=1})),e.length=0,Ge.each(t,(function(t,n){e.push(n)}))}(s),t&&!s.length&&s.push.apply(s,fV)}},gV=Ge.each;function mV(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!0}var vV=function(e,t,n){var i;Ge.each(n,(function(e){t.hasOwnProperty(e)&&mV(t[e])&&(i=!0)})),i&&Ge.each(n,(function(n){t.hasOwnProperty(n)&&mV(t[n])?e[n]=Ge.clone(t[n]):delete e[n]}))},yV=function(e,t,n,i,a,r){var o,s={};function l(e){return n.getItemVisual(o,e)}function u(e,t){n.setItemVisual(o,e,t)}function c(e,c){o=null==r?e:c;var h=n.getRawDataItem(o);if(!h||!1!==h.visualMap)for(var d=i.call(a,e),f=t[d],p=s[d],g=0,m=p.length;g<m;g++){var v=p[g];f[v]&&f[v].applyVisual(e,l,u)}}Ge.each(e,(function(e){var n=vD.prepareVisualTypes(t[e]);s[e]=n})),null==r?n.each(c):n.each([r],c)},_V=function(e,t,n,i){var a={};return Ge.each(e,(function(e){var n=vD.prepareVisualTypes(t[e]);a[e]=n})),{progress:function(e,r){function o(e){return r.getItemVisual(l,e)}function s(e,t){r.setItemVisual(l,e,t)}var l;for(null!=i&&(i=r.getDimension(i));null!=(l=e.next());){var u=r.getRawDataItem(l);if(!u||!1!==u.visualMap)for(var c=null!=i?r.get(i,l,!0):l,h=n(c),d=t[h],f=a[h],p=0,g=f.length;p<g;p++){var m=f[p];d[m]&&d[m].applyVisual(c,o,s)}}}}},xV={createVisualMappings:function(e,t,n){var i={};return gV(t,(function(t){var a,r=i[t]=((a=function(){}).prototype.__hidden=a.prototype,new a);gV(e[t],(function(e,i){if(vD.isValidType(i)){var a={type:i,visual:e};n&&n(a,t),r[i]=new vD(a),"opacity"===i&&((a=Ge.clone(a)).type="colorAlpha",r.__hidden.__alphaForOpacity=new vD(a))}}))})),i},replaceVisualOption:vV,applyVisual:yV,incrementalApplyVisual:_V},bV=rh.linePolygonIntersect,wV={lineX:SV(0),lineY:SV(1),rect:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])},rect:function(e,t,n){return e&&n.boundingRect.intersect(e)}},polygon:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])&&rx.contain(n.range,e[0],e[1])},rect:function(e,t,n){var i=n.range;if(!e||i.length<=1)return!1;var a=e.x,r=e.y,o=e.width,s=e.height,l=i[0];return!!(rx.contain(i,a,r)||rx.contain(i,a+o,r)||rx.contain(i,a,r+s)||rx.contain(i,a+o,r+s)||Pi.create(e).contain(l[0],l[1])||bV(a,r,a+o,r,i)||bV(a,r,a,r+s,i)||bV(a+o,r,a+o,r+s,i)||bV(a,r+s,a+o,r+s,i))||void 0}}};function SV(e){var t=["x","y"],n=["width","height"];return{point:function(t,n,i){if(t){var a=i.range;return MV(t[e],a)}},rect:function(i,a,r){if(i){var o=r.range,s=[i[t[e]],i[t[e]]+i[n[e]]];return s[1]<s[0]&&s.reverse(),MV(s[0],o)||MV(s[1],o)||MV(o[0],s)||MV(o[1],s)}}}}function MV(e,t){return t[0]<=e&&e<=t[1]}var TV=wV,IV=["inBrush","outOfBrush"],AV="__ecBrushSelect",DV="__ecInBrushSelectEvent",CV=Qx.PRIORITY.VISUAL.BRUSH;function OV(e){e.eachComponent({mainType:"brush"},(function(t){(t.brushTargetManager=new mB(t.option,e)).setInputRanges(t.areas,e)}))}function kV(e,t){if(!e.isDisposed()){var n=e.getZr();n[DV]=!0,e.dispatchAction({type:"brushSelect",batch:t}),n[DV]=!1}}function LV(e,t,n,i){for(var a=0,r=t.length;a<r;a++){var o=t[a];if(e[o.brushType](i,n,o.selectors,o))return!0}}function EV(e){var t=e.brushSelector;if(Ge.isString(t)){var n=[];return Ge.each(TV,(function(e,i){n[i]=function(n,i,a,r){var o=i.getItemLayout(n);return e[t](o,a,r)}})),n}if(Ge.isFunction(t)){var i={};return Ge.each(TV,(function(e,n){i[n]=t})),i}return t}Qx.registerLayout(CV,(function(e,t,n){e.eachComponent({mainType:"brush"},(function(e){n&&"takeGlobalCursor"===n.type&&e.setBrushOption("brush"===n.key?n.brushOption:{brushType:!1})})),OV(e)})),Qx.registerVisual(CV,(function(e,t,n){var i,a,r=[];e.eachComponent({mainType:"brush"},(function(t,n){var o={brushId:t.id,brushIndex:n,brushName:t.name,areas:Ge.clone(t.areas),selected:[]};r.push(o);var s=t.option,l=s.brushLink,u=[],c=[],h=[],d=0;n||(i=s.throttleType,a=s.throttleDelay);var f=Ge.map(t.areas,(function(e){return function(e){var t=e.selectors={};return Ge.each(TV[e.brushType],(function(n,i){t[i]=function(i){return n(i,t,e)}})),e}(Ge.defaults({boundingRect:NV[e.brushType](e)},e))})),p=xV.createVisualMappings(t.option,IV,(function(e){e.mappingMethod="fixed"}));function g(e){return"all"===l||u[e]}function m(e){return!!e.length}Ge.isArray(l)&&Ge.each(l,(function(e){u[e]=1})),e.eachSeries((function(n,i){var a=h[i]=[];"parallel"===n.subType?function(e,t){var n=e.coordinateSystem;d|=n.hasAxisBrushed(),g(t)&&n.eachActiveState(e.getData(),(function(e,t){"active"===e&&(c[t]=1)}))}(n,i):function(n,i,a){var r=EV(n);if(!r||function(e,t){var n=e.option.seriesIndex;return null!=n&&"all"!==n&&(Ge.isArray(n)?Ge.indexOf(n,t)<0:t!==n)}(t,i))return;if(Ge.each(f,(function(i){r[i.brushType]&&t.brushTargetManager.controlSeries(i,n,e)&&a.push(i),d|=m(a)})),g(i)&&m(a)){var o=n.getData();o.each((function(e){LV(r,a,o,e)&&(c[e]=1)}))}}(n,i,a)})),e.eachSeries((function(e,t){var n={seriesId:e.id,seriesIndex:t,seriesName:e.name,dataIndex:[]};o.selected.push(n);var i=EV(e),a=h[t],r=e.getData(),s=g(t)?function(e){return c[e]?(n.dataIndex.push(r.getRawIndex(e)),"inBrush"):"outOfBrush"}:function(e){return LV(i,a,r,e)?(n.dataIndex.push(r.getRawIndex(e)),"inBrush"):"outOfBrush"};(g(t)?d:m(a))&&xV.applyVisual(IV,p,r,s)}))})),function(e,t,n,i,a){if(!a)return;var r=e.getZr();if(r[DV])return;r[AV]||(r[AV]=kV);var o=Lg.createOrUpdate(r,AV,n,t);o(e,i)}(t,i,a,r,n)}));var NV={lineX:Ge.noop,lineY:Ge.noop,rect:function(e){return PV(e.range)},polygon:function(e){for(var t,n=e.range,i=0,a=n.length;i<a;i++){t=t||[[1/0,-1/0],[1/0,-1/0]];var r=n[i];r[0]<t[0][0]&&(t[0][0]=r[0]),r[0]>t[0][1]&&(t[0][1]=r[0]),r[1]<t[1][0]&&(t[1][0]=r[1]),r[1]>t[1][1]&&(t[1][1]=r[1])}return t&&PV(t)}};function PV(e){return new Pi(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var RV={layoutCovers:OV},zV=["#ddd"];function BV(e,t){return Ge.merge({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new xh(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}Qx.extendComponentModel({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(e,t){var n=this.option;!t&&xV.replaceVisualOption(n,e,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:zV},i.hasOwnProperty("liftZ")||(i.liftZ=5)},setAreas:function(e){e&&(this.areas=Ge.map(e,(function(e){return BV(this.option,e)}),this))},setBrushOption:function(e){this.brushOption=BV(this.option,e),this.brushType=this.brushOption.brushType}});var VV=RV.layoutCovers;function HV(e,t,n,i){(!i||i.$from!==e.id)&&this._brushController.setPanels(e.brushTargetManager.makePanelOpts(n)).enableBrush(e.brushOption).updateCovers(e.areas.slice())}Qx.extendComponentView({type:"brush",init:function(e,t){this.ecModel=e,this.api=t,this.model,(this._brushController=new Vk(t.getZr())).on("brush",Ge.bind(this._onBrush,this)).mount()},render:function(e){return this.model=e,HV.apply(this,arguments)},updateTransform:function(e,t){return VV(t),HV.apply(this,arguments)},updateView:HV,dispose:function(){this._brushController.dispose()},_onBrush:function(e,t){var n=this.model.id;this.model.brushTargetManager.setOutputRanges(e,this.ecModel),(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:Ge.clone(e),$from:n}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:Ge.clone(e),$from:n})}}),Qx.registerAction({type:"brush",event:"brush"},(function(e,t){t.eachComponent({mainType:"brush",query:e},(function(t){t.setAreas(e.areas)}))})),Qx.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},(function(){})),Qx.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},(function(){}));var YV=Rg.toolbox.brush;function FV(e,t,n){this.model=e,this.ecModel=t,this.api=n,this._brushType,this._brushMode}FV.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:Ge.clone(YV.title)};var GV=FV.prototype;GV.render=GV.updateView=function(e,t,n){var i,a,r;t.eachComponent({mainType:"brush"},(function(e){i=e.brushType,a=e.brushOption.brushMode||"single",r|=e.areas.length})),this._brushType=i,this._brushMode=a,Ge.each(e.get("type",!0),(function(t){e.setIconStatus(t,("keep"===t?"multiple"===a:"clear"===t?r:t===i)?"emphasis":"normal")}))},GV.getIcons=function(){var e=this.model,t=e.get("icon",!0),n={};return Ge.each(e.get("type",!0),(function(e){t[e]&&(n[e]=t[e])})),n},GV.onclick=function(e,t,n){var i=this._brushType,a=this._brushMode;"clear"===n?(t.dispatchAction({type:"axisAreaSelect",intervals:[]}),t.dispatchAction({type:"brush",command:"clear",areas:[]})):t.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?i:i!==n&&n,brushMode:"keep"===n?"multiple"===a?"single":"multiple":a}})},Cz.register("brush",FV),Qx.registerPreprocessor(pV);var WV=sd.getLayoutRect,jV=Xh.windowOpen;function UV(e){var t=e.itemStyle||(e.itemStyle={}),n=t.emphasis||(t.emphasis={}),i=e.label||e.label||{},a=i.normal||(i.normal={}),r={normal:1,emphasis:1};Ge.each(i,(function(e,t){r[t]||ZV(a,t)||(a[t]=e)})),n.label&&!ZV(i,"emphasis")&&(i.emphasis=n.label,delete n.label)}function ZV(e,t){return e.hasOwnProperty(t)}Qx.extendComponentModel({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),Qx.extendComponentView({type:"title",render:function(e,t,n){if(this.group.removeAll(),e.get("show")){var i=this.group,a=e.getModel("textStyle"),r=e.getModel("subtextStyle"),o=e.get("textAlign"),s=Ge.retrieve2(e.get("textBaseline"),e.get("textVerticalAlign")),l=new rh.Text({style:rh.setTextStyle({},a,{text:e.get("text"),textFill:a.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),c=e.get("subtext"),h=new rh.Text({style:rh.setTextStyle({},r,{text:c,textFill:r.getTextColor(),y:u.height+e.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),d=e.get("link"),f=e.get("sublink"),p=e.get("triggerEvent",!0);l.silent=!d&&!p,h.silent=!f&&!p,d&&l.on("click",(function(){jV(d,"_"+e.get("target"))})),f&&h.on("click",(function(){jV(d,"_"+e.get("subtarget"))})),l.eventData=h.eventData=p?{componentType:"title",componentIndex:e.componentIndex}:null,i.add(l),c&&i.add(h);var g=i.getBoundingRect(),m=e.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=WV(m,{width:n.getWidth(),height:n.getHeight()},e.get("padding"));o||("middle"===(o=e.get("left")||e.get("right"))&&(o="center"),"right"===o?v.x+=v.width:"center"===o&&(v.x+=v.width/2)),s||("center"===(s=e.get("top")||e.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),i.attr("position",[v.x,v.y]);var y={textAlign:o,textVerticalAlign:s};l.setStyle(y),h.setStyle(y),g=i.getBoundingRect();var _=v.margin,x=e.getItemStyle(["color","opacity"]);x.fill=e.get("backgroundColor");var b=new rh.Rect({shape:{x:g.x-_[3],y:g.y-_[0],width:g.width+_[1]+_[3],height:g.height+_[0]+_[2],r:e.get("borderRadius")},style:x,subPixelOptimize:!0,silent:!0});i.add(b)}}});var XV=function(e){var t=e&&e.timeline;Ge.isArray(t)||(t=t?[t]:[]),Ge.each(t,(function(e){e&&function(e){var t=e.type,n={number:"value",time:"time"};n[t]&&(e.axisType=n[t],delete e.type);if(UV(e),ZV(e,"controlPosition")){var i=e.controlStyle||(e.controlStyle={});ZV(i,"position")||(i.position=e.controlPosition),"none"!==i.position||ZV(i,"show")||(i.show=!1,delete i.position),delete e.controlPosition}Ge.each(e.data||[],(function(e){Ge.isObject(e)&&!Ge.isArray(e)&&(!ZV(e,"value")&&ZV(e,"name")&&(e.value=e.name),UV(e))}))}(e)}))};fd.registerSubTypeDefaulter("timeline",(function(){return"slider"})),Qx.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},(function(e,t){var n=t.getComponent("timeline");return n&&null!=e.currentIndex&&(n.setCurrentIndex(e.currentIndex),!n.get("loop",!0)&&n.isIndexMax()&&n.setPlayState(!1)),t.resetOption("timeline"),Ge.defaults({currentIndex:n.option.currentIndex},e)})),Qx.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},(function(e,t){var n=t.getComponent("timeline");n&&null!=e.playState&&n.setPlayState(e.playState)}));var qV=fd.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},init:function(e,t,n){this._data,this._names,this.mergeDefaultAndTheme(e,n),this._initData()},mergeOption:function(e){qV.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(e){null==e&&(e=this.option.currentIndex);var t=this._data.count();this.option.loop?e=(e%t+t)%t:(e>=t&&(e=t-1),e<0&&(e=0)),this.option.currentIndex=e},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(e){this.option.autoPlay=!!e},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var e=this.option,t=e.data||[],n=e.axisType,i=this._names=[];if("category"===n){var a=[];Ge.each(t,(function(e,t){var n,r=Bo.getDataItemValue(e);Ge.isObject(e)?(n=Ge.clone(e)).value=t:n=t,a.push(n),Ge.isString(r)||null!=r&&!isNaN(r)||(r=""),i.push(r+"")})),t=a}var r={category:"ordinal",time:"time"}[n]||"number";(this._data=new Bv([{name:"value",type:r}],this)).initData(t,i)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}}),KV=qV.extend({type:"timeline.slider",defaultOption:{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptyCircle",symbolSize:10,lineStyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#304654"},itemStyle:{color:"#304654",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:13,color:"#c23531",borderWidth:5,borderColor:"rgba(194,53,49, 0.5)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:22,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",prevIcon:"path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{label:{show:!0,color:"#c23531"},itemStyle:{color:"#c23531"},controlStyle:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}});Ge.mixin(KV,Bp);var $V=fg.extend({type:"timeline"}),QV=function(e,t,n,i){Nx.call(this,e,t,n),this.type=i||"value",this.model=null};QV.prototype={constructor:QV,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},Ge.inherits(QV,Nx);var JV=QV,eH=X_.createSymbol,tH=Xh.encodeHTML,nH=Ge.bind,iH=Ge.each,aH=Math.PI;function rH(e,t,n,i,a,r){var o=t.get("color");if(a)a.setColor(o),n.add(a),r&&r.onUpdate(a);else{var s=e.get("symbol");(a=eH(s,-1,-1,2,2,o)).setStyle("strokeNoScale",!0),n.add(a),r&&r.onCreate(a)}var l=t.getItemStyle(["color","symbol","symbolSize"]);a.setStyle(l),i=Ge.merge({rectHover:!0,z2:100},i,!0);var u=e.get("symbolSize");(u=u instanceof Array?u.slice():[+u,+u])[0]/=2,u[1]/=2,i.scale=u;var c=e.get("symbolOffset");if(c){var h=i.position=i.position||[0,0];h[0]+=Ph.parsePercent(c[0],u[0]),h[1]+=Ph.parsePercent(c[1],u[1])}var d=e.get("symbolRotate");return i.rotation=(d||0)*Math.PI/180||0,a.attr(i),a.updateTransform(),a}function oH(e,t,n,i,a){if(!e.dragging){var r=i.getModel("checkpointStyle"),o=n.dataToCoord(i.getData().get(["value"],t));a||!r.get("animation",!0)?e.attr({position:[o,0]}):(e.stopAnimation(!0),e.animateTo({position:[o,0]},r.get("animationDuration",!0),r.get("animationEasing",!0)))}}$V.extend({type:"timeline.slider",init:function(e,t){this.api=t,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(e,t,n,i){if(this.model=e,this.api=n,this.ecModel=t,this.group.removeAll(),e.get("show",!0)){var a=this._layout(e,n),r=this._createGroup("mainGroup"),o=this._createGroup("labelGroup"),s=this._axis=this._createAxis(a,e);e.formatTooltip=function(e){return tH(s.scale.getLabel(e))},iH(["AxisLine","AxisTick","Control","CurrentPointer"],(function(t){this["_render"+t](a,r,s,e)}),this),this._renderAxisLabel(a,o,s,e),this._position(a,e)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(e,t){var n=e.get("label.position"),i=e.get("orient"),a=function(e,t){return sd.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()},e.get("padding"))}(e,t);null==n||"auto"===n?n="horizontal"===i?a.y+a.height/2<t.getHeight()/2?"-":"+":a.x+a.width/2<t.getWidth()/2?"+":"-":isNaN(n)&&(n={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[i][n]);var r,o,s,l,u={horizontal:"center",vertical:n>=0||"+"===n?"left":"right"},c={horizontal:n>=0||"+"===n?"top":"bottom",vertical:"middle"},h={horizontal:0,vertical:aH/2},d="vertical"===i?a.height:a.width,f=e.getModel("controlStyle"),p=f.get("show",!0),g=p?f.get("itemSize"):0,m=p?f.get("itemGap"):0,v=g+m,y=e.get("label.rotate")||0;y=y*aH/180;var _=f.get("position",!0),x=p&&f.get("showPlayBtn",!0),b=p&&f.get("showPrevBtn",!0),w=p&&f.get("showNextBtn",!0),S=0,M=d;return"left"===_||"bottom"===_?(x&&(r=[0,0],S+=v),b&&(o=[S,0],S+=v),w&&(s=[M-g,0],M-=v)):(x&&(r=[M-g,0],M-=v),b&&(o=[0,0],S+=v),w&&(s=[M-g,0],M-=v)),l=[S,M],e.get("inverse")&&l.reverse(),{viewRect:a,mainLength:d,orient:i,rotation:h[i],labelRotation:y,labelPosOpt:n,labelAlign:e.get("label.align")||u[i],labelBaseline:e.get("label.verticalAlign")||e.get("label.baseline")||c[i],playPosition:r,prevBtnPosition:o,nextBtnPosition:s,axisExtent:l,controlSize:g,controlGap:m}},_position:function(e,t){var n=this._mainGroup,i=this._labelGroup,a=e.viewRect;if("vertical"===e.orient){var r=ln.create(),o=a.x,s=a.y+a.height;ln.translate(r,r,[-o,-s]),ln.rotate(r,r,-aH/2),ln.translate(r,r,[o,s]),(a=a.clone()).applyTransform(r)}var l=m(a),u=m(n.getBoundingRect()),c=m(i.getBoundingRect()),h=n.position,d=i.position;d[0]=h[0]=l[0][0];var f,p=e.labelPosOpt;isNaN(p)?(v(h,u,l,1,f="+"===p?0:1),v(d,c,l,1,1-f)):(v(h,u,l,1,f=p>=0?0:1),d[1]=h[1]+p);function g(e){var t=e.position;e.origin=[l[0][0]-t[0],l[1][0]-t[1]]}function m(e){return[[e.x,e.x+e.width],[e.y,e.y+e.height]]}function v(e,t,n,i,a){e[i]+=n[i][a]-t[i][a]}n.attr("position",h),i.attr("position",d),n.rotation=i.rotation=e.rotation,g(n),g(i)},_createAxis:function(e,t){var n=t.getData(),i=t.get("axisType"),a=N_.createScaleByModel(t,i);a.getTicks=function(){return n.mapArray(["value"],(function(e){return e}))};var r=n.getDataExtent("value");a.setExtent(r[0],r[1]),a.niceTicks();var o=new JV("value",a,e.axisExtent,i);return o.model=t,o},_createGroup:function(e){var t=this["_"+e]=new rh.Group;return this.group.add(t),t},_renderAxisLine:function(e,t,n,i){var a=n.getExtent();i.get("lineStyle.show")&&t.add(new rh.Line({shape:{x1:a[0],y1:0,x2:a[1],y2:0},style:Ge.extend({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(e,t,n,i){var a=i.getData(),r=n.scale.getTicks();iH(r,(function(e){var r=n.dataToCoord(e),o=a.getItemModel(e),s=o.getModel("itemStyle"),l=o.getModel("emphasis.itemStyle"),u={position:[r,0],onclick:nH(this._changeTimeline,this,e)},c=rH(o,s,t,u);rh.setHoverStyle(c,l.getItemStyle()),o.get("tooltip")?(c.dataIndex=e,c.dataModel=i):c.dataIndex=c.dataModel=null}),this)},_renderAxisLabel:function(e,t,n,i){if(n.getLabelModel().get("show")){var a=i.getData(),r=n.getViewLabels();iH(r,(function(i){var r=i.tickValue,o=a.getItemModel(r),s=o.getModel("label"),l=o.getModel("emphasis.label"),u=n.dataToCoord(i.tickValue),c=new rh.Text({position:[u,0],rotation:e.labelRotation-e.rotation,onclick:nH(this._changeTimeline,this,r),silent:!1});rh.setTextStyle(c.style,s,{text:i.formattedLabel,textAlign:e.labelAlign,textVerticalAlign:e.labelBaseline}),t.add(c),rh.setHoverStyle(c,rh.setTextStyle({},l))}),this)}},_renderControl:function(e,t,n,i){var a=e.controlSize,r=e.rotation,o=i.getModel("controlStyle").getItemStyle(),s=i.getModel("emphasis.controlStyle").getItemStyle(),l=[0,-a/2,a,a],u=i.getPlayState(),c=i.get("inverse",!0);function h(e,n,u,c){if(e){var h=function(e,t,n,i){var a=rh.makePath(e.get(t).replace(/^path:\/\//,""),Ge.clone(i||{}),new Pi(n[0],n[1],n[2],n[3]),"center");return a}(i,n,l,{position:e,origin:[a/2,0],rotation:c?-r:0,rectHover:!0,style:o,onclick:u});t.add(h),rh.setHoverStyle(h,s)}}h(e.nextBtnPosition,"controlStyle.nextIcon",nH(this._changeTimeline,this,c?"-":"+")),h(e.prevBtnPosition,"controlStyle.prevIcon",nH(this._changeTimeline,this,c?"+":"-")),h(e.playPosition,"controlStyle."+(u?"stopIcon":"playIcon"),nH(this._handlePlayClick,this,!u),!0)},_renderCurrentPointer:function(e,t,n,i){var a=i.getData(),r=i.getCurrentIndex(),o=a.getItemModel(r).getModel("checkpointStyle"),s=this,l={onCreate:function(e){e.draggable=!0,e.drift=nH(s._handlePointerDrag,s),e.ondragend=nH(s._handlePointerDragend,s),oH(e,r,n,i,!0)},onUpdate:function(e){oH(e,r,n,i)}};this._currentPointer=rH(o,o,this._mainGroup,{},this._currentPointer,l)},_handlePlayClick:function(e){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:e,from:this.uid})},_handlePointerDrag:function(e,t,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},_handlePointerDragend:function(e){this._pointerChangeTimeline([e.offsetX,e.offsetY],!0)},_pointerChangeTimeline:function(e,t){var n=this._toAxisCoord(e)[0],i=this._axis,a=Ph.asc(i.getExtent().slice());n>a[1]&&(n=a[1]),n<a[0]&&(n=a[0]),this._currentPointer.position[0]=n,this._currentPointer.dirty();var r=this._findNearestTick(n),o=this.model;(t||r!==o.getCurrentIndex()&&o.get("realtime"))&&this._changeTimeline(r)},_doPlayStop:function(){this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(nH((function(){var e=this.model;this._changeTimeline(e.getCurrentIndex()+(e.get("rewind",!0)?-1:1))}),this),this.model.get("playInterval")))},_toAxisCoord:function(e){var t=this._mainGroup.getLocalTransform();return rh.applyTransform(e,t,!0)},_findNearestTick:function(e){var t,n=this.model.getData(),i=1/0,a=this._axis;return n.each(["value"],(function(n,r){var o=a.dataToCoord(n),s=Math.abs(o-e);s<i&&(i=s,t=r)})),t},_clearTimer:function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},_changeTimeline:function(e){var t=this.model.getCurrentIndex();"+"===e?e=t+1:"-"===e&&(e=t-1),this.api.dispatchAction({type:"timelineChange",currentIndex:e,from:this.uid})}}),Qx.registerPreprocessor(XV);var sH=Xh.addCommas,lH=Xh.encodeHTML;function uH(e){Bo.defaultEmphasis(e,"label",["show"])}var cH=Qx.extendComponentModel({type:"marker",dependencies:["series","grid","polar","geo"],init:function(e,t,n){this.mergeDefaultAndTheme(e,n),this._mergeOption(e,n,!1,!0)},isAnimationEnabled:function(){if(oe.node)return!1;var e=this.__hostSeries;return this.getShallow("animation")&&e&&e.isAnimationEnabled()},mergeOption:function(e,t){this._mergeOption(e,t,!1,!1)},_mergeOption:function(e,t,n,i){var a=this.constructor,r=this.mainType+"Model";n||t.eachSeries((function(e){var n=e.get(this.mainType,!0),o=e[r];n&&n.data?(o?o._mergeOption(n,t,!0):(i&&uH(n),Ge.each(n.data,(function(e){e instanceof Array?(uH(e[0]),uH(e[1])):uH(e)})),o=new a(n,this,t),Ge.extend(o,{mainType:this.mainType,seriesIndex:e.seriesIndex,name:e.name,createdBySelf:!0}),o.__hostSeries=e),e[r]=o):e[r]=null}),this)},formatTooltip:function(e){var t=this.getData(),n=this.getRawValue(e),i=Ge.isArray(n)?Ge.map(n,sH).join(", "):sH(n),a=t.getName(e),r=lH(this.name);return(null!=n||a)&&(r+="<br />"),a&&(r+=lH(a),null!=n&&(r+=" : ")),null!=n&&(r+=lH(i)),r},getData:function(){return this._data},setData:function(e){this._data=e}});Ge.mixin(cH,Bp);var hH=cH;hH.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}});var dH=uy.isDimensionStacked,fH=Ge.indexOf;function pH(e,t,n,i,a,r){var o=[],s=dH(t,i)?t.getCalculationInfo("stackResultDimension"):i,l=yH(t,s,e),u=t.indicesOfNearest(s,l)[0];o[a]=t.get(n,u),o[r]=t.get(s,u);var c=t.get(i,u),h=Ph.getPrecision(t.get(i,u));return(h=Math.min(h,20))>=0&&(o[r]=+o[r].toFixed(h)),[o,c]}var gH=Ge.curry,mH={min:gH(pH,"min"),max:gH(pH,"max"),average:gH(pH,"average")};function vH(e,t,n,i){var a={};return null!=e.valueIndex||null!=e.valueDim?(a.valueDataDim=null!=e.valueIndex?t.getDimension(e.valueIndex):e.valueDim,a.valueAxis=n.getAxis(function(e,t){var n=e.getData(),i=n.dimensions;t=n.getDimension(t);for(var a=0;a<i.length;a++){var r=n.getDimensionInfo(i[a]);if(r.name===t)return r.coordDim}}(i,a.valueDataDim)),a.baseAxis=n.getOtherAxis(a.valueAxis),a.baseDataDim=t.mapDimension(a.baseAxis.dim)):(a.baseAxis=i.getBaseAxis(),a.valueAxis=n.getOtherAxis(a.baseAxis),a.baseDataDim=t.mapDimension(a.baseAxis.dim),a.valueDataDim=t.mapDimension(a.valueAxis.dim)),a}function yH(e,t,n){if("average"===n){var i=0,a=0;return e.each(t,(function(e,t){isNaN(e)||(i+=e,a++)})),i/a}return"median"===n?e.getMedian(t):e.getDataExtent(t,!0)["max"===n?1:0]}var _H=function(e,t){var n=e.getData(),i=e.coordinateSystem;if(t&&!function(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}(t)&&!Ge.isArray(t.coord)&&i){var a=i.dimensions,r=vH(t,n,i,e);if((t=Ge.clone(t)).type&&mH[t.type]&&r.baseAxis&&r.valueAxis){var o=fH(a,r.baseAxis.dim),s=fH(a,r.valueAxis.dim),l=mH[t.type](n,r.baseDataDim,r.valueDataDim,o,s);t.coord=l[0],t.value=l[1]}else{for(var u=[null!=t.xAxis?t.xAxis:t.radiusAxis,null!=t.yAxis?t.yAxis:t.angleAxis],c=0;c<2;c++)mH[u[c]]&&(u[c]=yH(n,n.mapDimension(a[c]),u[c]));t.coord=u}}return t},xH={dataTransform:_H,getAxisInfo:vH,dataFilter:function(e,t){return!(e&&e.containData&&t.coord&&!function(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}(t))||e.containData(t.coord)},dimValueGetter:function(e,t,n,i){return i<2?e.coord&&e.coord[i]:e.value},numCalculate:yH},bH=Qx.extendComponentView({type:"marker",init:function(){this.markerGroupMap=Ge.createHashMap()},render:function(e,t,n){var i=this.markerGroupMap;i.each((function(e){e.__keep=!1}));var a=this.type+"Model";t.eachSeries((function(e){var i=e[a];i&&this.renderSeries(e,i,t,n)}),this),i.each((function(e){!e.__keep&&this.group.remove(e.group)}),this)},renderSeries:function(){}});function wH(e,t,n){var i=t.coordinateSystem;e.each((function(a){var r,o=e.getItemModel(a),s=Ph.parsePercent(o.get("x"),n.getWidth()),l=Ph.parsePercent(o.get("y"),n.getHeight());if(isNaN(s)||isNaN(l)){if(t.getMarkerPosition)r=t.getMarkerPosition(e.getValues(e.dimensions,a));else if(i){var u=e.get(i.dimensions[0],a),c=e.get(i.dimensions[1],a);r=i.dataToPoint([u,c])}}else r=[s,l];isNaN(s)||(r[0]=s),isNaN(l)||(r[1]=l),e.setItemLayout(a,r)}))}bH.extend({type:"markPoint",updateTransform:function(e,t,n){t.eachSeries((function(e){var t=e.markPointModel;t&&(wH(t.getData(),e,n),this.markerGroupMap.get(e.id).updateLayout(t))}),this)},renderSeries:function(e,t,n,i){var a=e.coordinateSystem,r=e.id,o=e.getData(),s=this.markerGroupMap,l=s.get(r)||s.set(r,new wb),u=function(e,t,n){var i;i=e?Ge.map(e&&e.dimensions,(function(e){var n=t.getData().getDimensionInfo(t.getData().mapDimension(e))||{};return Ge.defaults({name:e},n)})):[{name:"value",type:"float"}];var a=new Bv(i,n),r=Ge.map(n.get("data"),Ge.curry(xH.dataTransform,t));e&&(r=Ge.filter(r,Ge.curry(xH.dataFilter,e)));return a.initData(r,null,e?xH.dimValueGetter:function(e){return e.value}),a}(a,e,t);t.setData(u),wH(t.getData(),e,i),u.each((function(e){var n=u.getItemModel(e),i=n.getShallow("symbol"),a=n.getShallow("symbolSize"),r=Ge.isFunction(i),s=Ge.isFunction(a);if(r||s){var l=t.getRawValue(e),c=t.getDataParams(e);r&&(i=i(l,c)),s&&(a=a(l,c))}u.setItemVisual(e,{symbol:i,symbolSize:a,color:n.get("itemStyle.color")||o.getVisual("color")})})),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl((function(e){e.traverse((function(e){e.dataModel=t}))})),l.__keep=!0,l.group.silent=t.get("silent")||e.get("silent")}}),Qx.registerPreprocessor((function(e){e.markPoint=e.markPoint||{}})),hH.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"}});var SH=uy.getStackedDimension,MH=function(e,t,n,i){var a=e.getData(),r=i.type;if(!Ge.isArray(i)&&("min"===r||"max"===r||"average"===r||"median"===r||null!=i.xAxis||null!=i.yAxis)){var o,s;if(null!=i.yAxis||null!=i.xAxis)o=t.getAxis(null!=i.yAxis?"y":"x"),s=Ge.retrieve(i.yAxis,i.xAxis);else{var l=xH.getAxisInfo(i,a,t,e);o=l.valueAxis;var u=SH(a,l.valueDataDim);s=xH.numCalculate(a,u,r)}var c="x"===o.dim?0:1,h=1-c,d=Ge.clone(i),f={};d.type=null,d.coord=[],f.coord=[],d.coord[h]=-1/0,f.coord[h]=1/0;var p=n.get("precision");p>=0&&"number"==typeof s&&(s=+s.toFixed(Math.min(p,20))),d.coord[c]=f.coord[c]=s,i=[d,f,{type:r,valueIndex:i.valueIndex,value:s}]}return(i=[xH.dataTransform(e,i[0]),xH.dataTransform(e,i[1]),Ge.extend({},i[2])])[2].type=i[2].type||"",Ge.merge(i[2],i[0]),Ge.merge(i[2],i[1]),i};function TH(e){return!isNaN(e)&&!isFinite(e)}function IH(e,t,n,i){var a=1-e,r=i.dimensions[e];return TH(t[a])&&TH(n[a])&&t[e]===n[e]&&i.getAxis(r).containData(t[e])}function AH(e,t){if("cartesian2d"===e.type){var n=t[0].coord,i=t[1].coord;if(n&&i&&(IH(1,n,i,e)||IH(0,n,i,e)))return!0}return xH.dataFilter(e,t[0])&&xH.dataFilter(e,t[1])}function DH(e,t,n,i,a){var r,o=i.coordinateSystem,s=e.getItemModel(t),l=Ph.parsePercent(s.get("x"),a.getWidth()),u=Ph.parsePercent(s.get("y"),a.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)r=i.getMarkerPosition(e.getValues(e.dimensions,t));else{var c=o.dimensions,h=e.get(c[0],t),d=e.get(c[1],t);r=o.dataToPoint([h,d])}if("cartesian2d"===o.type){var f=o.getAxis("x"),p=o.getAxis("y");c=o.dimensions;TH(e.get(c[0],t))?r[0]=f.toGlobalCoord(f.getExtent()[n?0:1]):TH(e.get(c[1],t))&&(r[1]=p.toGlobalCoord(p.getExtent()[n?0:1]))}isNaN(l)||(r[0]=l),isNaN(u)||(r[1]=u)}else r=[l,u];e.setItemLayout(t,r)}bH.extend({type:"markLine",updateTransform:function(e,t,n){t.eachSeries((function(e){var t=e.markLineModel;if(t){var i=t.getData(),a=t.__from,r=t.__to;a.each((function(t){DH(a,t,!0,e,n),DH(r,t,!1,e,n)})),i.each((function(e){i.setItemLayout(e,[a.getItemLayout(e),r.getItemLayout(e)])})),this.markerGroupMap.get(e.id).updateLayout()}}),this)},renderSeries:function(e,t,n,i){var a=e.coordinateSystem,r=e.id,o=e.getData(),s=this.markerGroupMap,l=s.get(r)||s.set(r,new vC);this.group.add(l.group);var u=function(e,t,n){var i;i=e?Ge.map(e&&e.dimensions,(function(e){var n=t.getData().getDimensionInfo(t.getData().mapDimension(e))||{};return Ge.defaults({name:e},n)})):[{name:"value",type:"float"}];var a=new Bv(i,n),r=new Bv(i,n),o=new Bv([],n),s=Ge.map(n.get("data"),Ge.curry(MH,t,e,n));e&&(s=Ge.filter(s,Ge.curry(AH,e)));var l=e?xH.dimValueGetter:function(e){return e.value};return a.initData(Ge.map(s,(function(e){return e[0]})),null,l),r.initData(Ge.map(s,(function(e){return e[1]})),null,l),o.initData(Ge.map(s,(function(e){return e[2]}))),o.hasItemOption=!0,{from:a,to:r,line:o}}(a,e,t),c=u.from,h=u.to,d=u.line;t.__from=c,t.__to=h,t.setData(d);var f=t.get("symbol"),p=t.get("symbolSize");function g(t,n,a){var r=t.getItemModel(n);DH(t,n,a,e,i),t.setItemVisual(n,{symbolSize:r.get("symbolSize")||p[a?0:1],symbol:r.get("symbol",!0)||f[a?0:1],color:r.get("itemStyle.color")||o.getVisual("color")})}Ge.isArray(f)||(f=[f,f]),"number"==typeof p&&(p=[p,p]),u.from.each((function(e){g(c,e,!0),g(h,e,!1)})),d.each((function(e){var t=d.getItemModel(e).get("lineStyle.color");d.setItemVisual(e,{color:t||c.getItemVisual(e,"color")}),d.setItemLayout(e,[c.getItemLayout(e),h.getItemLayout(e)]),d.setItemVisual(e,{fromSymbolSize:c.getItemVisual(e,"symbolSize"),fromSymbol:c.getItemVisual(e,"symbol"),toSymbolSize:h.getItemVisual(e,"symbolSize"),toSymbol:h.getItemVisual(e,"symbol")})})),l.updateData(d),u.line.eachItemGraphicEl((function(e,n){e.traverse((function(e){e.dataModel=t}))})),l.__keep=!0,l.group.silent=t.get("silent")||e.get("silent")}}),Qx.registerPreprocessor((function(e){e.markLine=e.markLine||{}})),hH.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}}});var CH=function(e,t,n,i){var a=xH.dataTransform(e,i[0]),r=xH.dataTransform(e,i[1]),o=Ge.retrieve,s=a.coord,l=r.coord;s[0]=o(s[0],-1/0),s[1]=o(s[1],-1/0),l[0]=o(l[0],1/0),l[1]=o(l[1],1/0);var u=Ge.mergeAll([{},a,r]);return u.coord=[a.coord,r.coord],u.x0=a.x,u.y0=a.y,u.x1=r.x,u.y1=r.y,u};function OH(e){return!isNaN(e)&&!isFinite(e)}function kH(e,t,n,i){var a=1-e;return OH(t[a])&&OH(n[a])}function LH(e,t){var n=t.coord[0],i=t.coord[1];return!("cartesian2d"!==e.type||!n||!i||!kH(1,n,i)&&!kH(0,n,i))||(xH.dataFilter(e,{coord:n,x:t.x0,y:t.y0})||xH.dataFilter(e,{coord:i,x:t.x1,y:t.y1}))}function EH(e,t,n,i,a){var r,o=i.coordinateSystem,s=e.getItemModel(t),l=Ph.parsePercent(s.get(n[0]),a.getWidth()),u=Ph.parsePercent(s.get(n[1]),a.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)r=i.getMarkerPosition(e.getValues(n,t));else{var c=[f=e.get(n[0],t),p=e.get(n[1],t)];o.clampData&&o.clampData(c,c),r=o.dataToPoint(c,!0)}if("cartesian2d"===o.type){var h=o.getAxis("x"),d=o.getAxis("y"),f=e.get(n[0],t),p=e.get(n[1],t);OH(f)?r[0]=h.toGlobalCoord(h.getExtent()["x0"===n[0]?0:1]):OH(p)&&(r[1]=d.toGlobalCoord(d.getExtent()["y0"===n[1]?0:1]))}isNaN(l)||(r[0]=l),isNaN(u)||(r[1]=u)}else r=[l,u];return r}var NH=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];bH.extend({type:"markArea",updateTransform:function(e,t,n){t.eachSeries((function(e){var t=e.markAreaModel;if(t){var i=t.getData();i.each((function(t){var a=Ge.map(NH,(function(a){return EH(i,t,a,e,n)}));i.setItemLayout(t,a),i.getItemGraphicEl(t).setShape("points",a)}))}}),this)},renderSeries:function(e,t,n,i){var a=e.coordinateSystem,r=e.id,o=e.getData(),s=this.markerGroupMap,l=s.get(r)||s.set(r,{group:new rh.Group});this.group.add(l.group),l.__keep=!0;var u=function(e,t,n){var i,a,r=["x0","y0","x1","y1"];e?(i=Ge.map(e&&e.dimensions,(function(e){var n=t.getData(),i=n.getDimensionInfo(n.mapDimension(e))||{};return Ge.defaults({name:e},i)})),a=new Bv(Ge.map(r,(function(e,t){return{name:e,type:i[t%2].type}})),n)):a=new Bv(i=[{name:"value",type:"float"}],n);var o=Ge.map(n.get("data"),Ge.curry(CH,t,e,n));e&&(o=Ge.filter(o,Ge.curry(LH,e)));var s=e?function(e,t,n,i){return e.coord[Math.floor(i/2)][i%2]}:function(e){return e.value};return a.initData(o,null,s),a.hasItemOption=!0,a}(a,e,t);t.setData(u),u.each((function(t){u.setItemLayout(t,Ge.map(NH,(function(n){return EH(u,t,n,e,i)}))),u.setItemVisual(t,{color:o.getVisual("color")})})),u.diff(l.__data).add((function(e){var t=new rh.Polygon({shape:{points:u.getItemLayout(e)}});u.setItemGraphicEl(e,t),l.group.add(t)})).update((function(e,n){var i=l.__data.getItemGraphicEl(n);rh.updateProps(i,{shape:{points:u.getItemLayout(e)}},t,e),l.group.add(i),u.setItemGraphicEl(e,i)})).remove((function(e){var t=l.__data.getItemGraphicEl(e);l.group.remove(t)})).execute(),u.eachItemGraphicEl((function(e,n){var i=u.getItemModel(n),a=i.getModel("label"),r=i.getModel("emphasis.label"),o=u.getItemVisual(n,"color");e.useStyle(Ge.defaults(i.getModel("itemStyle").getItemStyle(),{fill:qn.modifyAlpha(o,.4),stroke:o})),e.hoverStyle=i.getModel("emphasis.itemStyle").getItemStyle(),rh.setLabelStyle(e.style,e.hoverStyle,a,r,{labelFetcher:t,labelDataIndex:n,defaultText:u.getName(n)||"",isRectText:!0,autoColor:o}),rh.setHoverStyle(e,{}),e.dataModel=t})),l.__data=u,l.group.silent=t.get("silent")||e.get("silent")}}),Qx.registerPreprocessor((function(e){e.markArea=e.markArea||{}}));var PH=Bo.isNameSpecified,RH=Rg.legend.selector,zH={all:{type:"all",title:Ge.clone(RH.all)},inverse:{type:"inverse",title:Ge.clone(RH.inverse)}},BH=Qx.extendComponentModel({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},mergeOption:function(e){BH.superCall(this,"mergeOption",e),this._updateSelector(e)},_updateSelector:function(e){var t=e.selector;!0===t&&(t=e.selector=["all","inverse"]),Ge.isArray(t)&&Ge.each(t,(function(e,n){Ge.isString(e)&&(e={type:e}),t[n]=Ge.merge(e,zH[e.type])}))},optionUpdated:function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&"single"===this.get("selectedMode")){for(var t=!1,n=0;n<e.length;n++){var i=e[n].get("name");if(this.isSelected(i)){this.select(i),t=!0;break}}!t&&this.select(e[0].get("name"))}},_updateData:function(e){var t=[],n=[];e.eachRawSeries((function(i){var a,r=i.name;if(n.push(r),i.legendVisualProvider){var o=i.legendVisualProvider.getAllNames();e.isSeriesFiltered(i)||(n=n.concat(o)),o.length?t=t.concat(o):a=!0}else a=!0;a&&PH(i)&&t.push(i.name)})),this._availableNames=n;var i=this.get("data")||t,a=Ge.map(i,(function(e){return"string"!=typeof e&&"number"!=typeof e||(e={name:e}),new xh(e,this,this.ecModel)}),this);this._data=a},getData:function(){return this._data},select:function(e){var t=this.option.selected;if("single"===this.get("selectedMode")){var n=this._data;Ge.each(n,(function(e){t[e.get("name")]=!1}))}t[e]=!0},unSelect:function(e){"single"!==this.get("selectedMode")&&(this.option.selected[e]=!1)},toggleSelected:function(e){var t=this.option.selected;t.hasOwnProperty(e)||(t[e]=!0),this[t[e]?"unSelect":"select"](e)},allSelect:function(){var e=this._data,t=this.option.selected;Ge.each(e,(function(e){t[e.get("name",!0)]=!0}))},inverseSelect:function(){var e=this._data,t=this.option.selected;Ge.each(e,(function(e){var n=e.get("name",!0);t.hasOwnProperty(n)||(t[n]=!0),t[n]=!t[n]}))},isSelected:function(e){var t=this.option.selected;return!(t.hasOwnProperty(e)&&!t[e])&&Ge.indexOf(this._availableNames,e)>=0},getOrient:function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},defaultOption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",itemStyle:{borderWidth:0},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:" sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}}}),VH=BH;function HH(e,t,n){var i,a={},r="toggleSelected"===e;return n.eachComponent("legend",(function(n){r&&null!=i?n[i?"select":"unSelect"](t.name):"allSelect"===e||"inverseSelect"===e?n[e]():(n[e](t.name),i=n.isSelected(t.name));var o=n.getData();Ge.each(o,(function(e){var t=e.get("name");if("\n"!==t&&""!==t){var i=n.isSelected(t);a.hasOwnProperty(t)?a[t]=a[t]&&i:a[t]=i}}))})),"allSelect"===e||"inverseSelect"===e?{selected:a}:{name:t.name,selected:a}}Qx.registerAction("legendToggleSelect","legendselectchanged",Ge.curry(HH,"toggleSelected")),Qx.registerAction("legendAllSelect","legendselectall",Ge.curry(HH,"allSelect")),Qx.registerAction("legendInverseSelect","legendinverseselect",Ge.curry(HH,"inverseSelect")),Qx.registerAction("legendSelect","legendselected",Ge.curry(HH,"select")),Qx.registerAction("legendUnSelect","legendunselected",Ge.curry(HH,"unSelect"));var YH=X_.createSymbol,FH=Pz.makeBackground,GH=Ge.curry,WH=Ge.each,jH=rh.Group,UH=Qx.extendComponentView({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new jH),this._backgroundEl,this.group.add(this._selectorGroup=new jH),this._isFirstRender=!0},getContentGroup:function(){return this._contentGroup},getSelectorGroup:function(){return this._selectorGroup},render:function(e,t,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get("show",!0)){var a=e.get("align"),r=e.get("orient");a&&"auto"!==a||(a="right"===e.get("left")&&"vertical"===r?"right":"left");var o=e.get("selector",!0),s=e.get("selectorPosition",!0);!o||s&&"auto"!==s||(s="horizontal"===r?"end":"start"),this.renderInner(a,e,t,n,o,r,s);var l=e.getBoxLayoutParams(),u={width:n.getWidth(),height:n.getHeight()},c=e.get("padding"),h=sd.getLayoutRect(l,u,c),d=this.layoutInner(e,a,h,i,o,s),f=sd.getLayoutRect(Ge.defaults({width:d.width,height:d.height},l),u,c);this.group.attr("position",[f.x-d.x,f.y-d.y]),this.group.add(this._backgroundEl=FH(d,e))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},renderInner:function(e,t,n,i,a,r,o){var s=this.getContentGroup(),l=Ge.createHashMap(),u=t.get("selectedMode"),c=[];n.eachRawSeries((function(e){!e.get("legendHoverLink")&&c.push(e.id)})),WH(t.getData(),(function(a,r){var o=a.get("name");if(this.newlineDisabled||""!==o&&"\n"!==o){var h=n.getSeriesByName(o)[0];if(!l.get(o))if(h){var d=h.getData(),f=d.getVisual("color"),p=d.getVisual("borderColor");"function"==typeof f&&(f=f(h.getDataParams(0))),"function"==typeof p&&(p=p(h.getDataParams(0)));var g=d.getVisual("legendSymbol")||"roundRect",m=d.getVisual("symbol");this._createItem(o,r,a,t,g,m,e,f,p,u).on("click",GH(XH,o,null,i,c)).on("mouseover",GH(qH,h.name,null,i,c)).on("mouseout",GH(KH,h.name,null,i,c)),l.set(o,!0)}else n.eachRawSeries((function(n){if(!l.get(o)&&n.legendVisualProvider){var s=n.legendVisualProvider;if(!s.containName(o))return;var h=s.indexOfName(o),d=s.getItemVisual(h,"color"),f=s.getItemVisual(h,"borderColor");this._createItem(o,r,a,t,"roundRect",null,e,d,f,u).on("click",GH(XH,null,o,i,c)).on("mouseover",GH(qH,null,o,i,c)).on("mouseout",GH(KH,null,o,i,c)),l.set(o,!0)}}),this)}else s.add(new jH({newline:!0}))}),this),a&&this._createSelector(a,t,i,r,o)},_createSelector:function(e,t,n,i,a){var r=this.getSelectorGroup();WH(e,(function(e){!function(e){var i=e.type,a=new rh.Text({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===i?"legendAllSelect":"legendInverseSelect"})}});r.add(a);var o=t.getModel("selectorLabel"),s=t.getModel("emphasis.selectorLabel");rh.setLabelStyle(a.style,a.hoverStyle={},o,s,{defaultText:e.title,isRectText:!1}),rh.setHoverStyle(a)}(e)}))},_createItem:function(e,t,n,i,a,r,o,s,l,u){var c=i.get("itemWidth"),h=i.get("itemHeight"),d=i.get("inactiveColor"),f=i.get("inactiveBorderColor"),p=i.get("symbolKeepAspect"),g=i.getModel("itemStyle"),m=i.isSelected(e),v=new jH,y=n.getModel("textStyle"),_=n.get("icon"),x=n.getModel("tooltip"),b=x.parentModel,w=YH(a=_||a,0,0,c,h,m?s:d,null==p||p);if(v.add(ZH(w,a,g,l,f,m)),!_&&r&&(r!==a||"none"===r)){var S=.8*h;"none"===r&&(r="circle");var M=YH(r,(c-S)/2,(h-S)/2,S,S,m?s:d,null==p||p);v.add(ZH(M,r,g,l,f,m))}var T="left"===o?c+5:-5,I=o,A=i.get("formatter"),D=e;"string"==typeof A&&A?D=A.replace("{name}",null!=e?e:""):"function"==typeof A&&(D=A(e)),v.add(new rh.Text({style:rh.setTextStyle({},y,{text:D,x:T,y:h/2,textFill:m?y.getTextColor():d,textAlign:I,textVerticalAlign:"middle"})}));var C=new rh.Rect({shape:v.getBoundingRect(),invisible:!0,tooltip:x.get("show")?Ge.extend({content:e,formatter:b.get("formatter",!0)||function(){return e},formatterParams:{componentType:"legend",legendIndex:i.componentIndex,name:e,$vars:["name"]}},x.option):null});return v.add(C),v.eachChild((function(e){e.silent=!0})),C.silent=!u,this.getContentGroup().add(v),rh.setHoverStyle(v),v.__legendDataIndex=t,v},layoutInner:function(e,t,n,i,a,r){var o=this.getContentGroup(),s=this.getSelectorGroup();sd.box(e.get("orient"),o,e.get("itemGap"),n.width,n.height);var l=o.getBoundingRect(),u=[-l.x,-l.y];if(a){sd.box("horizontal",s,e.get("selectorItemGap",!0));var c=s.getBoundingRect(),h=[-c.x,-c.y],d=e.get("selectorButtonGap",!0),f=e.getOrient().index,p=0===f?"width":"height",g=0===f?"height":"width",m=0===f?"y":"x";"end"===r?h[f]+=l[p]+d:u[f]+=c[p]+d,h[1-f]+=l[g]/2-c[g]/2,s.attr("position",h),o.attr("position",u);var v={x:0,y:0};return v[p]=l[p]+d+c[p],v[g]=Math.max(l[g],c[g]),v[m]=Math.min(0,c[m]+h[1-f]),v}return o.attr("position",u),this.group.getBoundingRect()},remove:function(){this.getContentGroup().removeAll(),this._isFirstRender=!0}});function ZH(e,t,n,i,a,r){var o;return"line"!==t&&t.indexOf("empty")<0?(o=n.getItemStyle(),e.style.stroke=i,r||(o.stroke=a)):o=n.getItemStyle(["borderWidth","borderColor"]),e.setStyle(o)}function XH(e,t,n,i){KH(e,t,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=e?e:t}),qH(e,t,n,i)}function qH(e,t,n,i){var a=n.getZr().storage.getDisplayList()[0];a&&a.useHoverLayer||n.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:i})}function KH(e,t,n,i){var a=n.getZr().storage.getDisplayList()[0];a&&a.useHoverLayer||n.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:i})}var $H=UH;var QH=function(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.filterSeries((function(e){for(var n=0;n<t.length;n++)if(!t[n].isSelected(e.name))return!1;return!0}))};Qx.registerProcessor(Qx.PRIORITY.PROCESSOR.SERIES_FILTER,QH),fd.registerSubTypeDefaulter("legend",(function(){return"plain"}));var JH=sd.mergeLayoutParam,eY=sd.getLayoutParams,tY=VH.extend({type:"legend.scroll",setScrollDataIndex:function(e){this.option.scrollDataIndex=e},defaultOption:{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800},init:function(e,t,n,i){var a=eY(e);tY.superCall(this,"init",e,t,n,i),nY(this,e,a)},mergeOption:function(e,t){tY.superCall(this,"mergeOption",e,t),nY(this,this.option,e)}});function nY(e,t,n){var i=[1,1];i[e.getOrient().index]=0,JH(t,n,{type:"box",ignoreSize:i})}var iY=rh.Group,aY=["width","height"],rY=["x","y"],oY=$H.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){oY.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new iY),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new iY),this._showController},resetInner:function(){oY.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(e,t,n,i,a,r,o){var s=this;oY.superCall(this,"renderInner",e,t,n,i,a,r,o);var l=this._controllerGroup,u=t.get("pageIconSize",!0);Ge.isArray(u)||(u=[u,u]),h("pagePrev",0);var c=t.getModel("pageTextStyle");function h(e,n){var a=e+"DataIndex",r=rh.createIcon(t.get("pageIcons",!0)[t.getOrient().name][n],{onclick:Ge.bind(s._pageGo,s,a,t,i)},{x:-u[0]/2,y:-u[1]/2,width:u[0],height:u[1]});r.name=e,l.add(r)}l.add(new rh.Text({name:"pageText",style:{textFill:c.getTextColor(),font:c.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),h("pageNext",1)},layoutInner:function(e,t,n,i,a,r){var o=this.getSelectorGroup(),s=e.getOrient().index,l=aY[s],u=rY[s],c=aY[1-s],h=rY[1-s];a&&sd.box("horizontal",o,e.get("selectorItemGap",!0));var d=e.get("selectorButtonGap",!0),f=o.getBoundingRect(),p=[-f.x,-f.y],g=Ge.clone(n);a&&(g[l]=n[l]-f[l]-d);var m=this._layoutContentAndController(e,i,g,s,l,c,h);if(a){if("end"===r)p[s]+=m[l]+d;else{var v=f[l]+d;p[s]-=v,m[u]-=v}m[l]+=f[l]+d,p[1-s]+=m[h]+m[c]/2-f[c]/2,m[c]=Math.max(m[c],f[c]),m[h]=Math.min(m[h],f[h]+p[1-s]),o.attr("position",p)}return m},_layoutContentAndController:function(e,t,n,i,a,r,o){var s=this.getContentGroup(),l=this._containerGroup,u=this._controllerGroup;sd.box(e.get("orient"),s,e.get("itemGap"),i?n.width:null,i?null:n.height),sd.box("horizontal",u,e.get("pageButtonItemGap",!0));var c=s.getBoundingRect(),h=u.getBoundingRect(),d=this._showController=c[a]>n[a],f=[-c.x,-c.y];t||(f[i]=s.position[i]);var p=[0,0],g=[-h.x,-h.y],m=Ge.retrieve2(e.get("pageButtonGap",!0),e.get("itemGap",!0));d&&("end"===e.get("pageButtonPosition",!0)?g[i]+=n[a]-h[a]:p[i]+=h[a]+m);g[1-i]+=c[r]/2-h[r]/2,s.attr("position",f),l.attr("position",p),u.attr("position",g);var v={x:0,y:0};if(v[a]=d?n[a]:c[a],v[r]=Math.max(c[r],h[r]),v[o]=Math.min(0,h[o]+g[1-i]),l.__rectSize=n[a],d){var y={x:0,y:0};y[a]=Math.max(n[a]-h[a]-m,0),y[r]=v[r],l.setClipPath(new rh.Rect({shape:y})),l.__rectSize=y[a]}else u.eachChild((function(e){e.attr({invisible:!0,silent:!0})}));var _=this._getPageInfo(e);return null!=_.pageIndex&&rh.updateProps(s,{position:_.contentPosition},!!d&&e),this._updatePageInfoView(e,_),v},_pageGo:function(e,t,n){var i=this._getPageInfo(t)[e];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:t.id})},_updatePageInfoView:function(e,t){var n=this._controllerGroup;Ge.each(["pagePrev","pageNext"],(function(i){var a=null!=t[i+"DataIndex"],r=n.childOfName(i);r&&(r.setStyle("fill",a?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),r.cursor=a?"pointer":"default")}));var i=n.childOfName("pageText"),a=e.get("pageFormatter"),r=t.pageIndex,o=null!=r?r+1:0,s=t.pageCount;i&&a&&i.setStyle("text",Ge.isString(a)?a.replace("{current}",o).replace("{total}",s):a({current:o,total:s}))},_getPageInfo:function(e){var t=e.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,a=e.getOrient().index,r=aY[a],o=rY[a],s=this._findTargetItemIndex(t),l=n.children(),u=l[s],c=l.length,h=c?1:0,d={contentPosition:n.position.slice(),pageCount:h,pageIndex:h-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return d;var f=y(u);d.contentPosition[a]=-f.s;for(var p=s+1,g=f,m=f,v=null;p<=c;++p)(!(v=y(l[p]))&&m.e>g.s+i||v&&!_(v,g.s))&&(g=m.i>g.i?m:v)&&(null==d.pageNextDataIndex&&(d.pageNextDataIndex=g.i),++d.pageCount),m=v;for(p=s-1,g=f,m=f,v=null;p>=-1;--p)(v=y(l[p]))&&_(m,v.s)||!(g.i<m.i)||(m=g,null==d.pagePrevDataIndex&&(d.pagePrevDataIndex=g.i),++d.pageCount,++d.pageIndex),g=v;return d;function y(e){if(e){var t=e.getBoundingRect(),n=t[o]+e.position[a];return{s:n,e:n+t[r],i:e.__legendDataIndex}}}function _(e,t){return e.e>=t&&e.s<=t+i}},_findTargetItemIndex:function(e){return this._showController?(this.getContentGroup().eachChild((function(i,a){var r=i.__legendDataIndex;null==n&&null!=r&&(n=a),r===e&&(t=a)})),null!=t?t:n):0;var t,n}});Qx.registerAction("legendScroll","legendscroll",(function(e,t){var n=e.scrollDataIndex;null!=n&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},(function(e){e.setScrollDataIndex(n)}))})),zB.extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#2f4554",width:.5,opacity:.3},areaStyle:{color:"rgba(47,69,84,0.3)",opacity:.3}},borderColor:"#ddd",fillerColor:"rgba(167,183,204,0.4)",handleIcon:"M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",handleSize:"100%",handleStyle:{color:"#a7b7cc"},labelPrecision:null,labelFormatter:null,showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#333"}}});var sY=rh.Rect,lY=Ph.linearMap,uY=Ph.asc,cY=Ge.bind,hY=Ge.each,dY="horizontal",fY="vertical",pY=["line","bar","candlestick","scatter"],gY=VB.extend({type:"dataZoom.slider",init:function(e,t){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=t},render:function(e,t,n,i){gY.superApply(this,"render",arguments),Lg.createOrUpdate(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=e.get("orient"),!1!==this.dataZoomModel.get("show")?(i&&"dataZoom"===i.type&&i.from===this.uid||this._buildView(),this._updateView()):this.group.removeAll()},remove:function(){gY.superApply(this,"remove",arguments),Lg.clear(this,"_dispatchZoomAction")},dispose:function(){gY.superApply(this,"dispose",arguments),Lg.clear(this,"_dispatchZoomAction")},_buildView:function(){var e=this.group;e.removeAll(),this._resetLocation(),this._resetInterval();var t=this._displayables.barGroup=new rh.Group;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},_resetLocation:function(){var e=this.dataZoomModel,t=this.api,n=this._findCoordRect(),i={width:t.getWidth(),height:t.getHeight()},a=this._orient===dY?{right:i.width-n.x-n.width,top:i.height-30-7,width:n.width,height:30}:{right:7,top:n.y,width:30,height:n.height},r=sd.getLayoutParams(e.option);Ge.each(["right","top","width","height"],(function(e){"ph"===r[e]&&(r[e]=a[e])}));var o=sd.getLayoutRect(r,i,e.padding);this._location={x:o.x,y:o.y},this._size=[o.width,o.height],this._orient===fY&&this._size.reverse()},_positionGroup:function(){var e=this.group,t=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),a=i&&i.get("inverse"),r=this._displayables.barGroup,o=(this._dataShadowInfo||{}).otherAxisInverse;r.attr(n!==dY||a?n===dY&&a?{scale:o?[-1,1]:[-1,-1]}:n!==fY||a?{scale:o?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:o?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:o?[1,1]:[1,-1]});var s=e.getBoundingRect([r]);e.attr("position",[t.x-s.x,t.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var e=this.dataZoomModel,t=this._size,n=this._displayables.barGroup;n.add(new sY({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get("backgroundColor")},z2:-40})),n.add(new sY({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:"transparent"},z2:0,onclick:Ge.bind(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(e){var t=this._size,n=e.series,i=n.getRawData(),a=n.getShadowDim?n.getShadowDim():e.otherDim;if(null!=a){var r=i.getDataExtent(a),o=.3*(r[1]-r[0]);r=[r[0]-o,r[1]+o];var s,l=[0,t[1]],u=[0,t[0]],c=[[t[0],0],[0,0]],h=[],d=u[1]/(i.count()-1),f=0,p=Math.round(i.count()/t[0]);i.each([a],(function(e,t){if(p>0&&t%p)f+=d;else{var n=null==e||isNaN(e)||""===e,i=n?0:lY(e,r,l,!0);n&&!s&&t?(c.push([c[c.length-1][0],0]),h.push([h[h.length-1][0],0])):!n&&s&&(c.push([f,0]),h.push([f,0])),c.push([f,i]),h.push([f,i]),f+=d,s=n}}));var g=this.dataZoomModel;this._displayables.barGroup.add(new rh.Polygon({shape:{points:c},style:Ge.defaults({fill:g.get("dataBackgroundColor")},g.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new rh.Polyline({shape:{points:h},style:g.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var e=this.dataZoomModel,t=e.get("showDataShadow");if(!1!==t){var n,i=this.ecModel;return e.eachTargetAxis((function(a,r){var o=e.getAxisProxy(a.name,r).getTargetSeriesModels();Ge.each(o,(function(e){if(!(n||!0!==t&&Ge.indexOf(pY,e.get("type"))<0)){var o,s=i.getComponent(a.axis,r).axis,l=function(e){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[e]}(a.name),u=e.coordinateSystem;null!=l&&u.getOtherAxis&&(o=u.getOtherAxis(s).inverse),l=e.getData().mapDimension(l),n={thisAxis:s,series:e,thisDim:a.name,otherDim:l,otherAxisInverse:o}}}),this)}),this),n}},_renderHandle:function(){var e=this._displayables,t=e.handles=[],n=e.handleLabels=[],i=this._displayables.barGroup,a=this._size,r=this.dataZoomModel;i.add(e.filler=new sY({draggable:!0,cursor:mY(this._orient),drift:cY(this._onDragMove,this,"all"),ondragstart:cY(this._showDataInfo,this,!0),ondragend:cY(this._onDragEnd,this),onmouseover:cY(this._showDataInfo,this,!0),onmouseout:cY(this._showDataInfo,this,!1),style:{fill:r.get("fillerColor"),textPosition:"inside"}})),i.add(new sY({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{stroke:r.get("dataBackgroundColor")||r.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),hY([0,1],(function(e){var a=rh.createIcon(r.get("handleIcon"),{cursor:mY(this._orient),draggable:!0,drift:cY(this._onDragMove,this,e),ondragend:cY(this._onDragEnd,this),onmouseover:cY(this._showDataInfo,this,!0),onmouseout:cY(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),o=a.getBoundingRect();this._handleHeight=Ph.parsePercent(r.get("handleSize"),this._size[1]),this._handleWidth=o.width/o.height*this._handleHeight,a.setStyle(r.getModel("handleStyle").getItemStyle());var s=r.get("handleColor");null!=s&&(a.style.fill=s),i.add(t[e]=a);var l=r.textStyleModel;this.group.add(n[e]=new rh.Text({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:l.getTextColor(),textFont:l.getFont()},z2:10}))}),this)},_resetInterval:function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[lY(e[0],[0,100],t,!0),lY(e[1],[0,100],t,!0)]},_updateInterval:function(e,t){var n=this.dataZoomModel,i=this._handleEnds,a=this._getViewExtent(),r=n.findRepresentativeAxisProxy().getMinMaxSpan(),o=[0,100];NO(t,i,a,n.get("zoomLock")?"all":e,null!=r.minSpan?lY(r.minSpan,o,a,!0):null,null!=r.maxSpan?lY(r.maxSpan,o,a,!0):null);var s=this._range,l=this._range=uY([lY(i[0],a,o,!0),lY(i[1],a,o,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},_updateView:function(e){var t=this._displayables,n=this._handleEnds,i=uY(n.slice()),a=this._size;hY([0,1],(function(e){var i=t.handles[e],r=this._handleHeight;i.attr({scale:[r/2,r/2],position:[n[e],a[1]/2-r/2]})}),this),t.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:a[1]}),this._updateDataInfo(e)},_updateDataInfo:function(e){var t=this.dataZoomModel,n=this._displayables,i=n.handleLabels,a=this._orient,r=["",""];if(t.get("showDetail")){var o=t.findRepresentativeAxisProxy();if(o){var s=o.getAxisModel().axis,l=this._range,u=e?o.calculateDataWindow({start:l[0],end:l[1]}).valueWindow:o.getDataValueWindow();r=[this._formatLabel(u[0],s),this._formatLabel(u[1],s)]}}var c=uY(this._handleEnds.slice());function h(e){var t=rh.getTransform(n.handles[e].parent,this.group),o=rh.transformDirection(0===e?"right":"left",t),s=this._handleWidth/2+5,l=rh.applyTransform([c[e]+(0===e?-s:s),this._size[1]/2],t);i[e].setStyle({x:l[0],y:l[1],textVerticalAlign:a===dY?"middle":o,textAlign:a===dY?o:"center",text:r[e]})}h.call(this,0),h.call(this,1)},_formatLabel:function(e,t){var n=this.dataZoomModel,i=n.get("labelFormatter"),a=n.get("labelPrecision");null!=a&&"auto"!==a||(a=t.getPixelPrecision());var r=null==e||isNaN(e)?"":"category"===t.type||"time"===t.type?t.scale.getLabel(Math.round(e)):e.toFixed(Math.min(a,20));return Ge.isFunction(i)?i(e,r):Ge.isString(i)?i.replace("{value}",r):r},_showDataInfo:function(e){e=this._dragging||e;var t=this._displayables.handleLabels;t[0].attr("invisible",!e),t[1].attr("invisible",!e)},_onDragMove:function(e,t,n,i){this._dragging=!0,Vt.stop(i.event);var a=this._displayables.barGroup.getLocalTransform(),r=rh.applyTransform([t,n],a,!0),o=this._updateInterval(e,r[0]),s=this.dataZoomModel.get("realtime");this._updateView(!s),o&&s&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),!this.dataZoomModel.get("realtime")&&this._dispatchZoomAction()},_onClickPanelClick:function(e){var t=this._size,n=this._displayables.barGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(n[0]<0||n[0]>t[0]||n[1]<0||n[1]>t[1])){var i=this._handleEnds,a=(i[0]+i[1])/2,r=this._updateInterval("all",n[0]-a);this._updateView(),r&&this._dispatchZoomAction()}},_dispatchZoomAction:function(){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:e[0],end:e[1]})},_findCoordRect:function(){var e;if(hY(this.getTargetCoordInfo(),(function(t){if(!e&&t.length){var n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}})),!e){var t=this.api.getWidth(),n=this.api.getHeight();e={x:.2*t,y:.2*n,width:.6*t,height:.6*n}}return e}});function mY(e){return"vertical"===e?"ns-resize":"ew-resize"}zB.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var vY="\0_ec_dataZoom_roams";function yY(e){var t=e.getZr();return t[vY]||(t[vY]={})}function _Y(e){Ge.each(e,(function(t,n){t.count||(t.controller.dispose(),delete e[n])}))}function xY(e,t){e.dispatchAction({type:"dataZoom",batch:t})}var bY=function(e,t){var n=yY(e),i=t.dataZoomId,a=t.coordId;Ge.each(n,(function(e,n){var r=e.dataZoomInfos;r[i]&&Ge.indexOf(t.allCoordIds,a)<0&&(delete r[i],e.count--)})),_Y(n);var r=n[a];r||((r=n[a]={coordId:a,dataZoomInfos:{},count:0}).controller=function(e,t){var n=new QT(e.getZr());return Ge.each(["pan","zoom","scrollMove"],(function(e){n.on(e,(function(n){var i=[];Ge.each(t.dataZoomInfos,(function(a){if(n.isAvailableBehavior(a.dataZoomModel.option)){var r=(a.getRange||{})[e],o=r&&r(t.controller,n);!a.dataZoomModel.get("disabled",!0)&&o&&i.push({dataZoomId:a.dataZoomId,start:o[0],end:o[1]})}})),i.length&&t.dispatchAction(i)}))})),n}(e,r),r.dispatchAction=Ge.curry(xY,e)),!r.dataZoomInfos[i]&&r.count++,r.dataZoomInfos[i]=t;var o,s,l,u,c,h=(o=r.dataZoomInfos,l="type_",u={type_true:2,type_move:1,type_false:0,type_undefined:-1},c=!0,Ge.each(o,(function(e){var t=e.dataZoomModel,n=!t.get("disabled",!0)&&(!t.get("zoomLock",!0)||"move");u[l+n]>u[l+s]&&(s=n),c&=t.get("preventDefaultMouseMove",!0)})),{controlType:s,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!c}});r.controller.enable(h.controlType,h.opt),r.controller.setPointerChecker(t.containsPoint),Lg.createOrUpdate(r,"dispatchAction",t.dataZoomModel.get("throttle",!0),"fixRate")},wY={register:bY,unregister:function(e,t){var n=yY(e);Ge.each(n,(function(e){e.controller.dispose();var n=e.dataZoomInfos;n[t]&&(delete n[t],e.count--)})),_Y(n)},generateCoordId:function(e){return e.type+"\0_"+e.id}},SY=Ge.bind,MY=VB.extend({type:"dataZoom.inside",init:function(e,t){this._range},render:function(e,t,n,i){MY.superApply(this,"render",arguments),this._range=e.getPercentRange(),Ge.each(this.getTargetCoordInfo(),(function(t,i){var a=Ge.map(t,(function(e){return wY.generateCoordId(e.model)}));Ge.each(t,(function(t){var r=t.model,o={};Ge.each(["pan","zoom","scrollMove"],(function(e){o[e]=SY(TY[e],this,t,i)}),this),wY.register(n,{coordId:wY.generateCoordId(r),allCoordIds:a,containsPoint:function(e,t,n){return r.coordinateSystem.containPoint([t,n])},dataZoomId:e.id,dataZoomModel:e,getRange:o})}),this)}),this)},dispose:function(){wY.unregister(this.api,this.dataZoomModel.id),MY.superApply(this,"dispose",arguments),this._range=null}}),TY={zoom:function(e,t,n,i){var a=this._range,r=a.slice(),o=e.axisModels[0];if(o){var s=AY[t](null,[i.originX,i.originY],o,n,e),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(r[1]-r[0])+r[0],u=Math.max(1/i.scale,0);r[0]=(r[0]-l)*u+l,r[1]=(r[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return NO(0,r,[0,100],0,c.minSpan,c.maxSpan),this._range=r,a[0]!==r[0]||a[1]!==r[1]?r:void 0}},pan:IY((function(e,t,n,i,a,r){var o=AY[i]([r.oldX,r.oldY],[r.newX,r.newY],t,a,n);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength})),scrollMove:IY((function(e,t,n,i,a,r){return AY[i]([0,0],[r.scrollDelta,r.scrollDelta],t,a,n).signal*(e[1]-e[0])*r.scrollDelta}))};function IY(e){return function(t,n,i,a){var r=this._range,o=r.slice(),s=t.axisModels[0];if(s){var l=e(o,s,t,n,i,a);return NO(l,o,[0,100],"all"),this._range=o,r[0]!==o[0]||r[1]!==o[1]?o:void 0}}}var AY={grid:function(e,t,n,i,a){var r=n.axis,o={},s=a.model.coordinateSystem.getRect();return e=e||[0,0],"x"===r.dim?(o.pixel=t[0]-e[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=r.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=r.inverse?-1:1),o},polar:function(e,t,n,i,a){var r=n.axis,o={},s=a.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),"radiusAxis"===n.mainType?(o.pixel=t[0]-e[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=r.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=r.inverse?-1:1),o},singleAxis:function(e,t,n,i,a){var r=n.axis,o=a.model.coordinateSystem.getRect(),s={};return e=e||[0,0],"horizontal"===r.orient?(s.pixel=t[0]-e[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=r.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=r.inverse?-1:1),s}},DY=Ge.each;function CY(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}var OY=function(e){var t=e&&e.visualMap;Ge.isArray(t)||(t=t?[t]:[]),DY(t,(function(e){if(e){CY(e,"splitList")&&!CY(e,"pieces")&&(e.pieces=e.splitList,delete e.splitList);var t=e.pieces;t&&Ge.isArray(t)&&DY(t,(function(e){Ge.isObject(e)&&(CY(e,"start")&&!CY(e,"min")&&(e.min=e.start),CY(e,"end")&&!CY(e,"max")&&(e.max=e.end))}))}}))};fd.registerSubTypeDefaulter("visualMap",(function(e){return e.categories||(e.pieces?e.pieces.length>0:e.splitNumber>0)&&!e.calculable?"piecewise":"continuous"}));var kY=Qx.PRIORITY.VISUAL.COMPONENT;function LY(e,t,n,i){for(var a=t.targetVisuals[i],r=vD.prepareVisualTypes(a),o={color:e.getData().getVisual("color")},s=0,l=r.length;s<l;s++){var u=r[s],c=a["opacity"===u?"__alphaForOpacity":u];c&&c.applyVisual(n,h,d)}return o.color;function h(e){return o[e]}function d(e,t){o[e]=t}}Qx.registerVisual(kY,{createOnAllSeries:!0,reset:function(e,t){var n=[];return t.eachComponent("visualMap",(function(t){var i=e.pipelineContext;!t.isTargetSeries(e)||i&&i.large||n.push(xV.incrementalApplyVisual(t.stateList,t.targetVisuals,Ge.bind(t.getValueState,t),t.getDataDimension(e.getData())))})),n}}),Qx.registerVisual(kY,{createOnAllSeries:!0,reset:function(e,t){var n=e.getData(),i=[];t.eachComponent("visualMap",(function(t){if(t.isTargetSeries(e)){var a=t.getVisualMeta(Ge.bind(LY,null,e,t))||{stops:[],outerColors:[]},r=t.getDataDimension(n),o=n.getDimensionInfo(r);null!=o&&(a.dimension=o.index,i.push(a))}})),e.getData().setVisual("visualMeta",i)}});var EY={get:function(e,t,n){var i=Ge.clone((NY[e]||{})[t]);return n&&Ge.isArray(i)?i[i.length-1]:i}},NY={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},PY=EY,RY=vD.mapVisual,zY=vD.eachVisual,BY=Ge.isArray,VY=Ge.each,HY=Ph.asc,YY=Ph.linearMap,FY=Ge.noop,GY=Qx.extendComponentModel({type:"visualMap",dependencies:["series"],stateList:["inRange","outOfRange"],replacableOptionKeys:["inRange","outOfRange","target","controller","color"],dataBound:[-1/0,1/0],layoutMode:{type:"box",ignoreSize:!0},defaultOption:{show:!0,zlevel:0,z:4,seriesIndex:"all",min:0,max:200,dimension:null,inRange:null,outOfRange:null,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,color:null,formatter:null,text:null,textStyle:{color:"#333"}},init:function(e,t,n){this._dataExtent,this.targetVisuals={},this.controllerVisuals={},this.textStyleModel,this.itemSize,this.mergeDefaultAndTheme(e,n)},optionUpdated:function(e,t){var n=this.option;oe.canvasSupported||(n.realtime=!1),!t&&xV.replaceVisualOption(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(e){var t=this.stateList;e=Ge.bind(e,this),this.controllerVisuals=xV.createVisualMappings(this.option.controller,t,e),this.targetVisuals=xV.createVisualMappings(this.option.target,t,e)},getTargetSeriesIndices:function(){var e=this.option.seriesIndex,t=[];return null==e||"all"===e?this.ecModel.eachSeries((function(e,n){t.push(n)})):t=Bo.normalizeToArray(e),t},eachTargetSeries:function(e,t){Ge.each(this.getTargetSeriesIndices(),(function(n){e.call(t,this.ecModel.getSeriesByIndex(n))}),this)},isTargetSeries:function(e){var t=!1;return this.eachTargetSeries((function(n){n===e&&(t=!0)})),t},formatValueText:function(e,t,n){var i,a,r=this.option,o=r.precision,s=this.dataBound,l=r.formatter;return n=n||["<",">"],Ge.isArray(e)&&(e=e.slice(),i=!0),a=t?e:i?[u(e[0]),u(e[1])]:u(e),Ge.isString(l)?l.replace("{value}",i?a[0]:a).replace("{value2}",i?a[1]:a):Ge.isFunction(l)?i?l(e[0],e[1]):l(e):i?e[0]===s[0]?n[0]+" "+a[1]:e[1]===s[1]?n[1]+" "+a[0]:a[0]+" - "+a[1]:a;function u(e){return e===s[0]?"min":e===s[1]?"max":(+e).toFixed(Math.min(o,20))}},resetExtent:function(){var e=this.option,t=HY([e.min,e.max]);this._dataExtent=t},getDataDimension:function(e){var t=this.option.dimension,n=e.dimensions;if(null!=t||n.length){if(null!=t)return e.getDimension(t);for(var i=e.dimensions,a=i.length-1;a>=0;a--){var r=i[a];if(!e.getDimensionInfo(r).isCalculationCoord)return r}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},i=t.target||(t.target={}),a=t.controller||(t.controller={});Ge.merge(i,n),Ge.merge(a,n);var r=this.isCategory();function o(n){BY(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get("gradientColor")},VY(this.stateList,(function(e){var t=n[e];if(Ge.isString(t)){var i=PY.get(t,"active",r);i?(n[e]={},n[e][t]=i):delete n[e]}}),this)}o.call(this,i),o.call(this,a),function(e,t,n){var i=e[t],a=e[n];i&&!a&&(a=e[n]={},VY(i,(function(e,t){if(vD.isValidType(t)){var n=PY.get(t,"inactive",r);null!=n&&(a[t]=n,"color"!==t||a.hasOwnProperty("opacity")||a.hasOwnProperty("colorAlpha")||(a.opacity=[0,0]))}})))}.call(this,i,"inRange","outOfRange"),function(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,i=this.get("inactiveColor");VY(this.stateList,(function(a){var o=this.itemSize,s=e[a];s||(s=e[a]={color:r?i:[i]}),null==s.symbol&&(s.symbol=t&&Ge.clone(t)||(r?"roundRect":["roundRect"])),null==s.symbolSize&&(s.symbolSize=n&&Ge.clone(n)||(r?o[0]:[o[0],o[0]])),s.symbol=RY(s.symbol,(function(e){return"none"===e||"square"===e?"roundRect":e}));var l=s.symbolSize;if(null!=l){var u=-1/0;zY(l,(function(e){e>u&&(u=e)})),s.symbolSize=RY(l,(function(e){return YY(e,[0,u],[0,o[0]],!0)}))}}),this)}.call(this,a)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:FY,getValueState:FY,getVisualMeta:FY}),WY=GY,jY=[20,140],UY=WY.extend({type:"visualMap.continuous",defaultOption:{align:"auto",calculable:!1,range:null,realtime:!0,itemHeight:null,itemWidth:null,hoverLink:!0,hoverLinkDataSize:null,hoverLinkOnHandle:null},optionUpdated:function(e,t){UY.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual((function(e){e.mappingMethod="linear",e.dataExtent=this.getExtent()})),this._resetRange()},resetItemSize:function(){UY.superApply(this,"resetItemSize",arguments);var e=this.itemSize;"horizontal"===this._orient&&e.reverse(),(null==e[0]||isNaN(e[0]))&&(e[0]=jY[0]),(null==e[1]||isNaN(e[1]))&&(e[1]=jY[1])},_resetRange:function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):Ge.isArray(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},completeVisualOption:function(){WY.prototype.completeVisualOption.apply(this,arguments),Ge.each(this.stateList,(function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=0)}),this)},setSelected:function(e){this.option.range=e.slice(),this._resetRange()},getSelected:function(){var e=this.getExtent(),t=Ph.asc((this.get("range")||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]<e[0]&&(t[0]=e[0]),t[1]<e[0]&&(t[1]=e[0]),t},getValueState:function(e){var t=this.option.range,n=this.getExtent();return(t[0]<=n[0]||t[0]<=e)&&(t[1]>=n[1]||e<=t[1])?"inRange":"outOfRange"},findTargetDataIndices:function(e){var t=[];return this.eachTargetSeries((function(n){var i=[],a=n.getData();a.each(this.getDataDimension(a),(function(t,n){e[0]<=t&&t<=e[1]&&i.push(n)}),this),t.push({seriesId:n.id,dataIndex:i})}),this),t},getVisualMeta:function(e){var t=ZY(this,"outOfRange",this.getExtent()),n=ZY(this,"inRange",this.option.range.slice()),i=[];function a(t,n){i.push({value:t,color:e(t,n)})}for(var r=0,o=0,s=n.length,l=t.length;o<l&&(!n.length||t[o]<=n[0]);o++)t[o]<n[r]&&a(t[o],"outOfRange");for(var u=1;r<s;r++,u=0)u&&i.length&&a(n[r],"outOfRange"),a(n[r],"inRange");for(u=1;o<l;o++)(!n.length||n[n.length-1]<t[o])&&(u&&(i.length&&a(i[i.length-1].value,"outOfRange"),u=0),a(t[o],"outOfRange"));var c=i.length;return{stops:i,outerColors:[c?i[0].color:"transparent",c?i[c-1].color:"transparent"]}}});function ZY(e,t,n){if(n[0]===n[1])return n.slice();for(var i=(n[1]-n[0])/200,a=n[0],r=[],o=0;o<=200&&a<n[1];o++)r.push(a),a+=i;return r.push(n[1]),r}var XY=Qx.extendComponentView({type:"visualMap",autoPositionValues:{left:1,right:1,top:1,bottom:1},init:function(e,t){this.ecModel=e,this.api=t,this.visualMapModel},render:function(e,t,n,i){this.visualMapModel=e,!1!==e.get("show")?this.doRender.apply(this,arguments):this.group.removeAll()},renderBackground:function(e){var t=this.visualMapModel,n=Xh.normalizeCssArray(t.get("padding")||0),i=e.getBoundingRect();e.add(new rh.Rect({z2:-1,silent:!0,shape:{x:i.x-n[3],y:i.y-n[0],width:i.width+n[3]+n[1],height:i.height+n[0]+n[2]},style:{fill:t.get("backgroundColor"),stroke:t.get("borderColor"),lineWidth:t.get("borderWidth")}}))},getControllerVisual:function(e,t,n){var i=(n=n||{}).forceState,a=this.visualMapModel,r={};if("symbol"===t&&(r.symbol=a.get("itemSymbol")),"color"===t){var o=a.get("contentColor");r.color=o}function s(e){return r[e]}function l(e,t){r[e]=t}var u=a.controllerVisuals[i||a.getValueState(e)],c=vD.prepareVisualTypes(u);return Ge.each(c,(function(i){var a=u[i];n.convertOpacityToAlpha&&"opacity"===i&&(i="colorAlpha",a=u.__alphaForOpacity),vD.dependsOn(i,t)&&a&&a.applyVisual(e,s,l)})),r[t]},positionGroup:function(e){var t=this.visualMapModel,n=this.api;sd.positionElement(e,t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})},doRender:Ge.noop}),qY=XY,KY=sd.getLayoutRect;var $Y=function(e,t,n){var i=e.option,a=i.align;if(null!=a&&"auto"!==a)return a;for(var r={width:t.getWidth(),height:t.getHeight()},o="horizontal"===i.orient?1:0,s=[["left","right","width"],["top","bottom","height"]],l=s[o],u=[0,null,10],c={},h=0;h<3;h++)c[s[1-o][h]]=u[h],c[l[h]]=2===h?n[0]:i[l[h]];var d=[["x","width",3],["y","height",0]][o],f=KY(c,r,i.padding);return l[(f.margin[d[2]]||0)+f[d[0]]+.5*f[d[1]]<.5*r[d[1]]?0:1]},QY={getItemAlign:$Y,makeHighDownBatch:function(e,t){return Ge.each(e||[],(function(e){null!=e.dataIndex&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey="visualMap"+(t?t.componentIndex:"")})),e}},JY=Ph.linearMap,eF=Ge.each,tF=Math.min,nF=Math.max,iF=qY.extend({type:"visualMap.continuous",init:function(){iF.superApply(this,"init",arguments),this._shapes={},this._dataInterval=[],this._handleEnds=[],this._orient,this._useHandle,this._hoverLinkDataIndices=[],this._dragging,this._hovering},doRender:function(e,t,n,i){i&&"selectDataRange"===i.type&&i.from===this.uid||this._buildView()},_buildView:function(){this.group.removeAll();var e=this.visualMapModel,t=this.group;this._orient=e.get("orient"),this._useHandle=e.get("calculable"),this._resetInterval(),this._renderBar(t);var n=e.get("text");this._renderEndsText(t,n,0),this._renderEndsText(t,n,1),this._updateView(!0),this.renderBackground(t),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(t)},_renderEndsText:function(e,t,n){if(t){var i=t[1-n];i=null!=i?i+"":"";var a=this.visualMapModel,r=a.get("textGap"),o=a.itemSize,s=this._shapes.barGroup,l=this._applyTransform([o[0]/2,0===n?-r:o[1]+r],s),u=this._applyTransform(0===n?"bottom":"top",s),c=this._orient,h=this.visualMapModel.textStyleModel;this.group.add(new rh.Text({style:{x:l[0],y:l[1],textVerticalAlign:"horizontal"===c?"middle":u,textAlign:"horizontal"===c?u:"center",text:i,textFont:h.getFont(),textFill:h.getTextColor()}}))}},_renderBar:function(e){var t=this.visualMapModel,n=this._shapes,i=t.itemSize,a=this._orient,r=this._useHandle,o=QY.getItemAlign(t,this.api,i),s=n.barGroup=this._createBarGroup(o);s.add(n.outOfRange=aF()),s.add(n.inRange=aF(null,r?oF(this._orient):null,Ge.bind(this._dragHandle,this,"all",!1),Ge.bind(this._dragHandle,this,"all",!0)));var l=t.textStyleModel.getTextRect("国"),u=nF(l.width,l.height);r&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(s,0,i,u,a,o),this._createHandle(s,1,i,u,a,o)),this._createIndicator(s,i,u,a),e.add(s)},_createHandle:function(e,t,n,i,a){var r=Ge.bind(this._dragHandle,this,t,!1),o=Ge.bind(this._dragHandle,this,t,!0),s=aF(function(e,t){return 0===e?[[0,0],[t,0],[t,-t]]:[[0,0],[t,0],[t,t]]}(t,i),oF(this._orient),r,o);s.position[0]=n[0],e.add(s);var l=this.visualMapModel.textStyleModel,u=new rh.Text({draggable:!0,drift:r,onmousemove:function(e){Vt.stop(e.event)},ondragend:o,style:{x:0,y:0,text:"",textFont:l.getFont(),textFill:l.getTextColor()}});this.group.add(u);var c=["horizontal"===a?i/2:1.5*i,"horizontal"===a?0===t?-1.5*i:1.5*i:0===t?-i/2:i/2],h=this._shapes;h.handleThumbs[t]=s,h.handleLabelPoints[t]=c,h.handleLabels[t]=u},_createIndicator:function(e,t,n,i){var a=aF([[0,0]],"move");a.position[0]=t[0],a.attr({invisible:!0,silent:!0}),e.add(a);var r=this.visualMapModel.textStyleModel,o=new rh.Text({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textFont:r.getFont(),textFill:r.getTextColor()}});this.group.add(o);var s=["horizontal"===i?n/2:9,0],l=this._shapes;l.indicator=a,l.indicatorLabel=o,l.indicatorLabelPoint=s},_dragHandle:function(e,t,n,i){if(this._useHandle){if(this._dragging=!t,!t){var a=this._applyTransform([n,i],this._shapes.barGroup,!0);this._updateInterval(e,a[1]),this._updateView()}t===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),t?!this._hovering&&this._clearHoverLinkToSeries():rF(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[e],!1)}},_resetInterval:function(){var e=this.visualMapModel,t=this._dataInterval=e.getSelected(),n=e.getExtent(),i=[0,e.itemSize[1]];this._handleEnds=[JY(t[0],n,i,!0),JY(t[1],n,i,!0)]},_updateInterval:function(e,t){t=t||0;var n=this.visualMapModel,i=this._handleEnds,a=[0,n.itemSize[1]];NO(t,i,a,e,0);var r=n.getExtent();this._dataInterval=[JY(i[0],a,r,!0),JY(i[1],a,r,!0)]},_updateView:function(e){var t=this.visualMapModel,n=t.getExtent(),i=this._shapes,a=[0,t.itemSize[1]],r=e?a:this._handleEnds,o=this._createBarVisual(this._dataInterval,n,r,"inRange"),s=this._createBarVisual(n,n,a,"outOfRange");i.inRange.setStyle({fill:o.barColor,opacity:o.opacity}).setShape("points",o.barPoints),i.outOfRange.setStyle({fill:s.barColor,opacity:s.opacity}).setShape("points",s.barPoints),this._updateHandle(r,o)},_createBarVisual:function(e,t,n,i){var a={forceState:i,convertOpacityToAlpha:!0},r=this._makeColorGradient(e,a),o=[this.getControllerVisual(e[0],"symbolSize",a),this.getControllerVisual(e[1],"symbolSize",a)],s=this._createBarPoints(n,o);return{barColor:new Yu(0,0,0,1,r),barPoints:s,handlesColor:[r[0].color,r[r.length-1].color]}},_makeColorGradient:function(e,t){var n=[],i=(e[1]-e[0])/100;n.push({color:this.getControllerVisual(e[0],"color",t),offset:0});for(var a=1;a<100;a++){var r=e[0]+i*a;if(r>e[1])break;n.push({color:this.getControllerVisual(r,"color",t),offset:a/100})}return n.push({color:this.getControllerVisual(e[1],"color",t),offset:1}),n},_createBarPoints:function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},_createBarGroup:function(e){var t=this._orient,n=this.visualMapModel.get("inverse");return new rh.Group("horizontal"!==t||n?"horizontal"===t&&n?{scale:"bottom"===e?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==t||n?{scale:"left"===e?[1,1]:[-1,1]}:{scale:"left"===e?[1,-1]:[-1,-1]}:{scale:"bottom"===e?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(e,t){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,a=n.handleThumbs,r=n.handleLabels;eF([0,1],(function(o){var s=a[o];s.setStyle("fill",t.handlesColor[o]),s.position[1]=e[o];var l=rh.applyTransform(n.handleLabelPoints[o],rh.getTransform(s,this.group));r[o].setStyle({x:l[0],y:l[1],text:i.formatValueText(this._dataInterval[o]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===o?"bottom":"top":"left",n.barGroup)})}),this)}},_showIndicator:function(e,t,n,i){var a=this.visualMapModel,r=a.getExtent(),o=a.itemSize,s=[0,o[1]],l=JY(e,r,s,!0),u=this._shapes,c=u.indicator;if(c){c.position[1]=l,c.attr("invisible",!1),c.setShape("points",function(e,t,n,i){return e?[[0,-tF(t,nF(n,0))],[6,0],[0,tF(t,nF(i-n,0))]]:[[0,0],[5,-5],[5,5]]}(!!n,i,l,o[1]));var h=this.getControllerVisual(e,"color",{convertOpacityToAlpha:!0});c.setStyle("fill",h);var d=rh.applyTransform(u.indicatorLabelPoint,rh.getTransform(c,this.group)),f=u.indicatorLabel;f.attr("invisible",!1);var p=this._applyTransform("left",u.barGroup),g=this._orient;f.setStyle({text:(n||"")+a.formatValueText(t),textVerticalAlign:"horizontal"===g?p:"middle",textAlign:"horizontal"===g?"center":p,x:d[0],y:d[1]})}},_enableHoverLinkToSeries:function(){var e=this;this._shapes.barGroup.on("mousemove",(function(t){if(e._hovering=!0,!e._dragging){var n=e.visualMapModel.itemSize,i=e._applyTransform([t.offsetX,t.offsetY],e._shapes.barGroup,!0,!0);i[1]=tF(nF(0,i[1]),n[1]),e._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=n[0])}})).on("mouseout",(function(){e._hovering=!1,!e._dragging&&e._clearHoverLinkToSeries()}))},_enableHoverLinkFromSeries:function(){var e=this.api.getZr();this.visualMapModel.option.hoverLink?(e.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),e.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(e,t){var n=this.visualMapModel,i=n.itemSize;if(n.option.hoverLink){var a=[0,i[1]],r=n.getExtent();e=tF(nF(a[0],e),a[1]);var o=function(e,t,n){var i=6,a=e.get("hoverLinkDataSize");a&&(i=JY(a,t,n,!0)/2);return i}(n,r,a),s=[e-o,e+o],l=JY(e,a,r,!0),u=[JY(s[0],a,r,!0),JY(s[1],a,r,!0)];s[0]<a[0]&&(u[0]=-1/0),s[1]>a[1]&&(u[1]=1/0),t&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",o):u[1]===1/0?this._showIndicator(l,u[0],"> ",o):this._showIndicator(l,l,"≈ ",o));var c=this._hoverLinkDataIndices,h=[];(t||rF(n))&&(h=this._hoverLinkDataIndices=n.findTargetDataIndices(u));var d=Bo.compressBatches(c,h);this._dispatchHighDown("downplay",QY.makeHighDownBatch(d[0],n)),this._dispatchHighDown("highlight",QY.makeHighDownBatch(d[1],n))}},_hoverLinkFromSeriesMouseOver:function(e){var t=e.target,n=this.visualMapModel;if(t&&null!=t.dataIndex){var i=this.ecModel.getSeriesByIndex(t.seriesIndex);if(n.isTargetSeries(i)){var a=i.getData(t.dataType),r=a.get(n.getDataDimension(a),t.dataIndex,!0);isNaN(r)||this._showIndicator(r,r)}}},_hideIndicator:function(){var e=this._shapes;e.indicator&&e.indicator.attr("invisible",!0),e.indicatorLabel&&e.indicatorLabel.attr("invisible",!0)},_clearHoverLinkToSeries:function(){this._hideIndicator();var e=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",QY.makeHighDownBatch(e,this.visualMapModel)),e.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var e=this.api.getZr();e.off("mouseover",this._hoverLinkFromSeriesMouseOver),e.off("mouseout",this._hideIndicator)},_applyTransform:function(e,t,n,i){var a=rh.getTransform(t,i?null:this.group);return rh[Ge.isArray(e)?"applyTransform":"transformDirection"](e,a,n)},_dispatchHighDown:function(e,t){t&&t.length&&this.api.dispatchAction({type:e,batch:t})},dispose:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()}});function aF(e,t,n,i){return new rh.Polygon({shape:{points:e},draggable:!!n,cursor:t,drift:n,onmousemove:function(e){Vt.stop(e.event)},ondragend:i})}function rF(e){var t=e.get("hoverLinkOnHandle");return!!(null==t?e.get("realtime"):t)}function oF(e){return"vertical"===e?"ns-resize":"ew-resize"}Qx.registerAction({type:"selectDataRange",event:"dataRangeSelected",update:"update"},(function(e,t){t.eachComponent({mainType:"visualMap",query:e},(function(t){t.setSelected(e.selected)}))})),Qx.registerPreprocessor(OY);var sF=Ph.reformIntervals,lF=WY.extend({type:"visualMap.piecewise",defaultOption:{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieceList:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0,showLabel:null},optionUpdated:function(e,t){lF.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var n=this._mode=this._determineMode();uF[this._mode].call(this),this._resetSelected(e,t);var i=this.option.categories;this.resetVisual((function(e,t){"categories"===n?(e.mappingMethod="category",e.categories=Ge.clone(i)):(e.dataExtent=this.getExtent(),e.mappingMethod="piecewise",e.pieceList=Ge.map(this._pieceList,(function(e){e=Ge.clone(e);return"inRange"!==t&&(e.visual=null),e})))}))},completeVisualOption:function(){var e=this.option,t={},n=vD.listVisualTypes(),i=this.isCategory();function a(e,t,n){return e&&e[t]&&(Ge.isObject(e[t])?e[t].hasOwnProperty(n):e[t]===n)}Ge.each(e.pieces,(function(e){Ge.each(n,(function(n){e.hasOwnProperty(n)&&(t[n]=1)}))})),Ge.each(t,(function(t,n){var r=0;Ge.each(this.stateList,(function(t){r|=a(e,t,n)||a(e.target,t,n)}),this),!r&&Ge.each(this.stateList,(function(t){(e[t]||(e[t]={}))[n]=PY.get(n,"inRange"===t?"active":"inactive",i)}))}),this),WY.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(e,t){var n=this.option,i=this._pieceList,a=(t?n:e).selected||{};if(n.selected=a,Ge.each(i,(function(e,t){var n=this.getSelectedMapKey(e);a.hasOwnProperty(n)||(a[n]=!0)}),this),"single"===n.selectedMode){var r=!1;Ge.each(i,(function(e,t){var n=this.getSelectedMapKey(e);a[n]&&(r?a[n]=!1:r=!0)}),this)}},getSelectedMapKey:function(e){return"categories"===this._mode?e.value+"":e.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(e){this.option.selected=Ge.clone(e)},getValueState:function(e){var t=vD.findPieceIndex(e,this._pieceList);return null!=t&&this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?"inRange":"outOfRange"},findTargetDataIndices:function(e){var t=[];return this.eachTargetSeries((function(n){var i=[],a=n.getData();a.each(this.getDataDimension(a),(function(t,n){vD.findPieceIndex(t,this._pieceList)===e&&i.push(n)}),this),t.push({seriesId:n.id,dataIndex:i})}),this),t},getRepresentValue:function(e){var t;if(this.isCategory())t=e.value;else if(null!=e.value)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},getVisualMeta:function(e){if(!this.isCategory()){var t=[],n=[],i=this,a=this._pieceList.slice();if(a.length){var r=a[0].interval[0];r!==-1/0&&a.unshift({interval:[-1/0,r]}),(r=a[a.length-1].interval[1])!==1/0&&a.push({interval:[r,1/0]})}else a.push({interval:[-1/0,1/0]});var o=-1/0;return Ge.each(a,(function(e){var t=e.interval;t&&(t[0]>o&&s([o,t[0]],"outOfRange"),s(t.slice()),o=t[1])}),this),{stops:t,outerColors:n}}function s(a,r){var o=i.getRepresentValue({interval:a});r||(r=i.getValueState(o));var s=e(o,r);a[0]===-1/0?n[0]=s:a[1]===1/0?n[1]=s:t.push({value:a[0],color:s},{value:a[1],color:s})}}}),uF={splitNumber:function(){var e=this.option,t=this._pieceList,n=Math.min(e.precision,20),i=this.getExtent(),a=e.splitNumber;a=Math.max(parseInt(a,10),1),e.splitNumber=a;for(var r=(i[1]-i[0])/a;+r.toFixed(n)!==r&&n<5;)n++;e.precision=n,r=+r.toFixed(n),e.minOpen&&t.push({interval:[-1/0,i[0]],close:[0,0]});for(var o=0,s=i[0];o<a;s+=r,o++){var l=o===a-1?i[1]:s+r;t.push({interval:[s,l],close:[1,1]})}e.maxOpen&&t.push({interval:[i[1],1/0],close:[0,0]}),sF(t),Ge.each(t,(function(e,t){e.index=t,e.text=this.formatValueText(e.interval)}),this)},categories:function(){var e=this.option;Ge.each(e.categories,(function(e){this._pieceList.push({text:this.formatValueText(e,!0),value:e})}),this),cF(e,this._pieceList)},pieces:function(){var e=this.option,t=this._pieceList;Ge.each(e.pieces,(function(e,n){Ge.isObject(e)||(e={value:e});var i={text:"",index:n};if(null!=e.label&&(i.text=e.label),e.hasOwnProperty("value")){var a=i.value=e.value;i.interval=[a,a],i.close=[1,1]}else{for(var r=i.interval=[],o=i.close=[0,0],s=[1,0,1],l=[-1/0,1/0],u=[],c=0;c<2;c++){for(var h=[["gte","gt","min"],["lte","lt","max"]][c],d=0;d<3&&null==r[c];d++)r[c]=e[h[d]],o[c]=s[d],u[c]=2===d;null==r[c]&&(r[c]=l[c])}u[0]&&r[1]===1/0&&(o[0]=0),u[1]&&r[0]===-1/0&&(o[1]=0),r[0]===r[1]&&o[0]&&o[1]&&(i.value=r[0])}i.visual=vD.retrieveVisuals(e),t.push(i)}),this),cF(e,t),sF(t),Ge.each(t,(function(e){var t=e.close,n=[["<","≤"][t[1]],[">","≥"][t[0]]];e.text=e.text||this.formatValueText(null!=e.value?e.value:e.interval,!1,n)}),this)}};function cF(e,t){var n=e.inverse;("vertical"===e.orient?!n:n)&&t.reverse()}var hF=X_.createSymbol;qY.extend({type:"visualMap.piecewise",doRender:function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get("textGap"),i=t.textStyleModel,a=i.getFont(),r=i.getTextColor(),o=this._getItemAlign(),s=t.itemSize,l=this._getViewData(),u=l.endsText,c=Ge.retrieve(t.get("showLabel",!0),!u);u&&this._renderEndsText(e,u[0],s,c,o),Ge.each(l.viewPieceList,(function(i){var l=i.piece,u=new rh.Group;u.onclick=Ge.bind(this._onItemClick,this,l),this._enableHoverLink(u,i.indexInModelPieceList);var h=t.getRepresentValue(l);if(this._createItemSymbol(u,h,[0,0,s[0],s[1]]),c){var d=this.visualMapModel.getValueState(h);u.add(new rh.Text({style:{x:"right"===o?-n:s[0]+n,y:s[1]/2,text:l.text,textVerticalAlign:"middle",textAlign:o,textFont:a,textFill:r,opacity:"outOfRange"===d?.5:1}}))}e.add(u)}),this),u&&this._renderEndsText(e,u[1],s,c,o),sd.box(t.get("orient"),e,t.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},_enableHoverLink:function(e,t){function n(e){var n=this.visualMapModel;n.option.hoverLink&&this.api.dispatchAction({type:e,batch:QY.makeHighDownBatch(n.findTargetDataIndices(t),n)})}e.on("mouseover",Ge.bind(n,this,"highlight")).on("mouseout",Ge.bind(n,this,"downplay"))},_getItemAlign:function(){var e=this.visualMapModel,t=e.option;if("vertical"===t.orient)return QY.getItemAlign(e,this.api,e.itemSize);var n=t.align;return n&&"auto"!==n||(n="left"),n},_renderEndsText:function(e,t,n,i,a){if(t){var r=new rh.Group,o=this.visualMapModel.textStyleModel;r.add(new rh.Text({style:{x:i?"right"===a?n[0]:0:n[0]/2,y:n[1]/2,textVerticalAlign:"middle",textAlign:i?a:"center",text:t,textFont:o.getFont(),textFill:o.getTextColor()}})),e.add(r)}},_getViewData:function(){var e=this.visualMapModel,t=Ge.map(e.getPieceList(),(function(e,t){return{piece:e,indexInModelPieceList:t}})),n=e.get("text"),i=e.get("orient"),a=e.get("inverse");return("horizontal"===i?a:!a)?t.reverse():n&&(n=n.slice().reverse()),{viewPieceList:t,endsText:n}},_createItemSymbol:function(e,t,n){e.add(hF(this.getControllerVisual(t,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(t,"color")))},_onItemClick:function(e){var t=this.visualMapModel,n=t.option,i=Ge.clone(n.selected),a=t.getSelectedMapKey(e);"single"===n.selectedMode?(i[a]=!0,Ge.each(i,(function(e,t){i[t]=t===a}))):i[a]=!i[a],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}}),Qx.registerPreprocessor(OY);var dF,fF="urn:schemas-microsoft-com:vml",pF="undefined"==typeof window?null:window,gF=!1,mF=pF&&pF.document;if(mF&&!oe.canvasSupported)try{!mF.namespaces.zrvml&&mF.namespaces.add("zrvml",fF),dF=function(e){return mF.createElement("<zrvml:"+e+' class="zrvml">')}}catch(e){dF=function(e){return mF.createElement("<"+e+' xmlns="'+fF+'" class="zrvml">')}}var vF={doc:mF,createNode:function(e){return dF(e)},initVML:function(){if(!gF&&mF){gF=!0;var e=mF.styleSheets;e.length<31?mF.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):e[0].addRule(".zrvml","behavior:url(#default#VML)")}}},yF=dt.applyTransform,_F=Js.CMD,xF=Math.round,bF=Math.sqrt,wF=Math.abs,SF=Math.cos,MF=Math.sin,TF=Math.max;if(!oe.canvasSupported){var IF=",",AF="progid:DXImageTransform.Microsoft",DF=21600,CF=DF/2,OF=function(e){e.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",e.coordsize=DF+","+DF,e.coordorigin="0,0"},kF=function(e,t,n){return"rgb("+[e,t,n].join(",")+")"},LF=function(e,t){t&&e&&t.parentNode!==e&&e.appendChild(t)},EF=function(e,t){t&&e&&t.parentNode===e&&e.removeChild(t)},NF=function(e,t,n){return 1e5*(parseFloat(e)||0)+1e3*(parseFloat(t)||0)+n},PF=Mr.parsePercent,RF=function(e,t,n){var i=qn.parse(t);n=+n,isNaN(n)&&(n=1),i&&(e.color=kF(i[0],i[1],i[2]),e.opacity=n*i[3])},zF=function(e){var t=qn.parse(e);return[kF(t[0],t[1],t[2]),t[3]]},BF=function(e,t,n,i){var a="fill"===t,r=e.getElementsByTagName(t)[0];null!=n[t]&&"none"!==n[t]&&(a||!a&&n.lineWidth)?(e[a?"filled":"stroked"]="true",n[t]instanceof Vu&&EF(e,r),r||(r=vF.createNode(t)),a?function(e,t,n){var i=t.fill;if(null!=i)if(i instanceof Vu){var a,r=0,o=[0,0],s=0,l=1,u=n.getBoundingRect(),c=u.width,h=u.height;if("linear"===i.type){a="gradient";var d=n.transform,f=[i.x*c,i.y*h],p=[i.x2*c,i.y2*h];d&&(yF(f,f,d),yF(p,p,d));var g=p[0]-f[0],m=p[1]-f[1];(r=180*Math.atan2(g,m)/Math.PI)<0&&(r+=360),r<1e-6&&(r=0)}else{a="gradientradial",f=[i.x*c,i.y*h],d=n.transform;var v=n.scale,y=c,_=h;o=[(f[0]-u.x)/y,(f[1]-u.y)/_],d&&yF(f,f,d),y/=v[0]*DF,_/=v[1]*DF;var x=TF(y,_);s=0/x,l=2*i.r/x-s}var b=i.colorStops.slice();b.sort((function(e,t){return e.offset-t.offset}));for(var w=b.length,S=[],M=[],T=0;T<w;T++){var I=b[T],A=zF(I.color);M.push(I.offset*l+s+" "+A[0]),0!==T&&T!==w-1||S.push(A)}if(w>=2){var D=S[0][0],C=S[1][0],O=S[0][1]*t.opacity,k=S[1][1]*t.opacity;e.type=a,e.method="none",e.focus="100%",e.angle=r,e.color=D,e.color2=C,e.colors=M.join(","),e.opacity=k,e.opacity2=O}"radial"===a&&(e.focusposition=o.join(","))}else RF(e,i,t.opacity)}(r,n,i):function(e,t){t.lineDash&&(e.dashstyle=t.lineDash.join(" ")),null==t.stroke||t.stroke instanceof Vu||RF(e,t.stroke,t.opacity)}(r,n),LF(e,r)):(e[a?"filled":"stroked"]="false",EF(e,r))},VF=[[],[],[]];Tl.prototype.brushVML=function(e){var t=this.style,n=this._vmlEl;n||(n=vF.createNode("shape"),OF(n),this._vmlEl=n),BF(n,"fill",t,this),BF(n,"stroke",t,this);var i=this.transform,a=null!=i,r=n.getElementsByTagName("stroke")[0];if(r){var o=t.lineWidth;if(a&&!t.strokeNoScale){var s=i[0]*i[3]-i[1]*i[2];o*=bF(wF(s))}r.weight=o+"px"}var l=this.path||(this.path=new Js);this.__dirtyPath&&(l.beginPath(),l.subPixelOptimize=!1,this.buildPath(l,this.shape),l.toStatic(),this.__dirtyPath=!1),n.path=function(e,t){var n,i,a,r,o,s,l=_F.M,u=_F.C,c=_F.L,h=_F.A,d=_F.Q,f=[],p=e.data,g=e.len();for(r=0;r<g;){switch(i="",n=0,a=p[r++]){case l:i=" m ",n=1,o=p[r++],s=p[r++],VF[0][0]=o,VF[0][1]=s;break;case c:i=" l ",n=1,o=p[r++],s=p[r++],VF[0][0]=o,VF[0][1]=s;break;case d:case u:i=" c ",n=3;var m,v,y=p[r++],_=p[r++],x=p[r++],b=p[r++];a===d?(m=x,v=b,x=(x+2*y)/3,b=(b+2*_)/3,y=(o+2*y)/3,_=(s+2*_)/3):(m=p[r++],v=p[r++]),VF[0][0]=y,VF[0][1]=_,VF[1][0]=x,VF[1][1]=b,VF[2][0]=m,VF[2][1]=v,o=m,s=v;break;case h:var w=0,S=0,M=1,T=1,I=0;t&&(w=t[4],S=t[5],M=bF(t[0]*t[0]+t[1]*t[1]),T=bF(t[2]*t[2]+t[3]*t[3]),I=Math.atan2(-t[1]/T,t[0]/M));var A=p[r++],D=p[r++],C=p[r++],O=p[r++],k=p[r++]+I,L=p[r++]+k+I;r++;var E=p[r++],N=A+SF(k)*C,P=D+MF(k)*O,R=(y=A+SF(L)*C,_=D+MF(L)*O,E?" wa ":" at ");Math.abs(N-y)<1e-4&&(Math.abs(L-k)>.01?E&&(N+=270/DF):Math.abs(P-D)<1e-4?E&&N<A||!E&&N>A?_-=270/DF:_+=270/DF:E&&P<D||!E&&P>D?y+=270/DF:y-=270/DF),f.push(R,xF(((A-C)*M+w)*DF-CF),IF,xF(((D-O)*T+S)*DF-CF),IF,xF(((A+C)*M+w)*DF-CF),IF,xF(((D+O)*T+S)*DF-CF),IF,xF((N*M+w)*DF-CF),IF,xF((P*T+S)*DF-CF),IF,xF((y*M+w)*DF-CF),IF,xF((_*T+S)*DF-CF)),o=y,s=_;break;case _F.R:var z=VF[0],B=VF[1];z[0]=p[r++],z[1]=p[r++],B[0]=z[0]+p[r++],B[1]=z[1]+p[r++],t&&(yF(z,z,t),yF(B,B,t)),z[0]=xF(z[0]*DF-CF),B[0]=xF(B[0]*DF-CF),z[1]=xF(z[1]*DF-CF),B[1]=xF(B[1]*DF-CF),f.push(" m ",z[0],IF,z[1]," l ",B[0],IF,z[1]," l ",B[0],IF,B[1]," l ",z[0],IF,B[1]);break;case _F.Z:f.push(" x ")}if(n>0){f.push(i);for(var V=0;V<n;V++){var H=VF[V];t&&yF(H,H,t),f.push(xF(H[0]*DF-CF),IF,xF(H[1]*DF-CF),V<n-1?IF:"")}}}return f.join("")}(l,this.transform),n.style.zIndex=NF(this.zlevel,this.z,this.z2),LF(e,n),null!=t.text?this.drawRectText(e,this.getBoundingRect()):this.removeRectText(e)},Tl.prototype.onRemove=function(e){EF(e,this._vmlEl),this.removeRectText(e)},Tl.prototype.onAdd=function(e){LF(e,this._vmlEl),this.appendRectText(e)};Lr.prototype.brushVML=function(e){var t,n,i,a=this.style,r=a.image;if("object"==typeof(i=r)&&i.tagName&&"IMG"===i.tagName.toUpperCase()){var o=r.src;if(o===this._imageSrc)t=this._imageWidth,n=this._imageHeight;else{var s=r.runtimeStyle,l=s.width,u=s.height;s.width="auto",s.height="auto",t=r.width,n=r.height,s.width=l,s.height=u,this._imageSrc=o,this._imageWidth=t,this._imageHeight=n}r=o}else r===this._imageSrc&&(t=this._imageWidth,n=this._imageHeight);if(r){var c=a.x||0,h=a.y||0,d=a.width,f=a.height,p=a.sWidth,g=a.sHeight,m=a.sx||0,v=a.sy||0,y=p&&g,_=this._vmlEl;_||(_=vF.doc.createElement("div"),OF(_),this._vmlEl=_);var x,b=_.style,w=!1,S=1,M=1;if(this.transform&&(x=this.transform,S=bF(x[0]*x[0]+x[1]*x[1]),M=bF(x[2]*x[2]+x[3]*x[3]),w=x[1]||x[2]),w){var T=[c,h],I=[c+d,h],A=[c,h+f],D=[c+d,h+f];yF(T,T,x),yF(I,I,x),yF(A,A,x),yF(D,D,x);var C=TF(T[0],I[0],A[0],D[0]),O=TF(T[1],I[1],A[1],D[1]),k=[];k.push("M11=",x[0]/S,IF,"M12=",x[2]/M,IF,"M21=",x[1]/S,IF,"M22=",x[3]/M,IF,"Dx=",xF(c*S+x[4]),IF,"Dy=",xF(h*M+x[5])),b.padding="0 "+xF(C)+"px "+xF(O)+"px 0",b.filter=AF+".Matrix("+k.join("")+", SizingMethod=clip)"}else x&&(c=c*S+x[4],h=h*M+x[5]),b.filter="",b.left=xF(c)+"px",b.top=xF(h)+"px";var L=this._imageEl,E=this._cropEl;L||(L=vF.doc.createElement("div"),this._imageEl=L);var N=L.style;if(y){if(t&&n)N.width=xF(S*t*d/p)+"px",N.height=xF(M*n*f/g)+"px";else{var P=new Image,R=this;P.onload=function(){P.onload=null,t=P.width,n=P.height,N.width=xF(S*t*d/p)+"px",N.height=xF(M*n*f/g)+"px",R._imageWidth=t,R._imageHeight=n,R._imageSrc=r},P.src=r}E||((E=vF.doc.createElement("div")).style.overflow="hidden",this._cropEl=E);var z=E.style;z.width=xF((d+m*d/p)*S),z.height=xF((f+v*f/g)*M),z.filter=AF+".Matrix(Dx="+-m*d/p*S+",Dy="+-v*f/g*M+")",E.parentNode||_.appendChild(E),L.parentNode!==E&&E.appendChild(L)}else N.width=xF(S*d)+"px",N.height=xF(M*f)+"px",_.appendChild(L),E&&E.parentNode&&(_.removeChild(E),this._cropEl=null);var B="",V=a.opacity;V<1&&(B+=".Alpha(opacity="+xF(100*V)+") "),B+=AF+".AlphaImageLoader(src="+r+", SizingMethod=scale)",N.filter=B,_.style.zIndex=NF(this.zlevel,this.z,this.z2),LF(e,_),null!=a.text&&this.drawRectText(e,this.getBoundingRect())}},Lr.prototype.onRemove=function(e){EF(e,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(e)},Lr.prototype.onAdd=function(e){LF(e,this._vmlEl),this.appendRectText(e)};var HF,YF="normal",FF={},GF=0,WF=document.createElement("div");Za.$override("measureText",(function(e,t){var n=vF.doc;HF||((HF=n.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",vF.doc.body.appendChild(HF));try{HF.style.font=t}catch(e){}return HF.innerHTML="",HF.appendChild(n.createTextNode(e)),{width:HF.offsetWidth}}));for(var jF=new Pi,UF=function(e,t,n,i){var a=this.style;this.__dirty&&Mr.normalizeTextStyle(a,!0);var r=a.text;if(null!=r&&(r+=""),r){if(a.rich){var o=Za.parseRichText(r,a);r=[];for(var s=0;s<o.lines.length;s++){for(var l=o.lines[s].tokens,u=[],c=0;c<l.length;c++)u.push(l[c].text);r.push(u.join(""))}r=r.join("\n")}var h,d,f=a.textAlign,p=a.textVerticalAlign,g=function(e){var t=FF[e];if(!t){GF>100&&(GF=0,FF={});var n,i=WF.style;try{i.font=e,n=i.fontFamily.split(",")[0]}catch(e){}t={style:i.fontStyle||YF,variant:i.fontVariant||YF,weight:i.fontWeight||YF,size:0|parseFloat(i.fontSize||12),family:n||"Microsoft YaHei"},FF[e]=t,GF++}return t}(a.font),m=g.style+" "+g.variant+" "+g.weight+" "+g.size+'px "'+g.family+'"';n=n||Za.getBoundingRect(r,m,f,p,a.textPadding,a.textLineHeight);var v=this.transform;if(v&&!i&&(jF.copy(t),jF.applyTransform(v),t=jF),i)h=t.x,d=t.y;else{var y=a.textPosition;if(y instanceof Array)h=t.x+PF(y[0],t.width),d=t.y+PF(y[1],t.height),f=f||"left";else{var _=this.calculateTextPosition?this.calculateTextPosition({},a,t):Za.calculateTextPosition({},a,t);h=_.x,d=_.y,f=f||_.textAlign,p=p||_.textVerticalAlign}}h=Za.adjustTextX(h,n.width,f),d=Za.adjustTextY(d,n.height,p),d+=n.height/2;var x,b,w,S=vF.createNode,M=this._textVmlEl;M?b=(x=(w=M.firstChild).nextSibling).nextSibling:(M=S("line"),x=S("path"),b=S("textpath"),w=S("skew"),b.style["v-text-align"]="left",OF(M),x.textpathok=!0,b.on=!0,M.from="0 0",M.to="1000 0.05",LF(M,w),LF(M,x),LF(M,b),this._textVmlEl=M);var T=[h,d],I=M.style;v&&i?(yF(T,T,v),w.on=!0,w.matrix=v[0].toFixed(3)+IF+v[2].toFixed(3)+IF+v[1].toFixed(3)+IF+v[3].toFixed(3)+",0,0",w.offset=(xF(T[0])||0)+","+(xF(T[1])||0),w.origin="0 0",I.left="0px",I.top="0px"):(w.on=!1,I.left=xF(h)+"px",I.top=xF(d)+"px"),b.string=String(r).replace(/&/g,"&amp;").replace(/"/g,"&quot;");try{b.style.font=m}catch(e){}BF(M,"fill",{fill:a.textFill,opacity:a.opacity},this),BF(M,"stroke",{stroke:a.textStroke,opacity:a.opacity,lineDash:a.lineDash||null},this),M.style.zIndex=NF(this.zlevel,this.z,this.z2),LF(e,M)}},ZF=function(e){EF(e,this._textVmlEl),this._textVmlEl=null},XF=function(e){LF(e,this._textVmlEl)},qF=[Dr,Or,Lr,Tl,Zl],KF=0;KF<qF.length;KF++){var $F=qF[KF].prototype;$F.drawRectText=UF,$F.removeRectText=ZF,$F.appendRectText=XF}Zl.prototype.brushVML=function(e){var t=this.style;null!=t.text?this.drawRectText(e,{x:t.x||0,y:t.y||0,width:0,height:0},this.getBoundingRect(),!0):this.removeRectText(e)},Zl.prototype.onRemove=function(e){this.removeRectText(e)},Zl.prototype.onAdd=function(e){this.appendRectText(e)}}var QF=Ge.each;function JF(e){return parseInt(e,10)}function eG(e,t){vF.initVML(),this.root=e,this.storage=t;var n=document.createElement("div"),i=document.createElement("div");n.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",i.style.cssText="position:absolute;left:0;top:0;",e.appendChild(n),this._vmlRoot=i,this._vmlViewport=n,this.resize();var a=t.delFromStorage,r=t.addToStorage;t.delFromStorage=function(e){a.call(t,e),e&&e.onRemove&&e.onRemove(i)},t.addToStorage=function(e){e.onAdd&&e.onAdd(i),r.call(t,e)},this._firstPaint=!0}eG.prototype={constructor:eG,getType:function(){return"vml"},getViewportRoot:function(){return this._vmlViewport},getViewportRootOffset:function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},refresh:function(){var e=this.storage.getDisplayList(!0,!0);this._paintList(e)},_paintList:function(e){for(var t=this._vmlRoot,n=0;n<e.length;n++){var i=e[n];i.invisible||i.ignore?(i.__alreadyNotVisible||i.onRemove(t),i.__alreadyNotVisible=!0):(i.__alreadyNotVisible&&i.onAdd(t),i.__alreadyNotVisible=!1,i.__dirty&&(i.beforeBrush&&i.beforeBrush(),(i.brushVML||i.brush).call(i,t),i.afterBrush&&i.afterBrush())),i.__dirty=!1}this._firstPaint&&(this._vmlViewport.appendChild(t),this._firstPaint=!1)},resize:function(e,t){e=null==e?this._getWidth():e,t=null==t?this._getHeight():t;if(this._width!==e||this._height!==t){this._width=e,this._height=t;var n=this._vmlViewport.style;n.width=e+"px",n.height=t+"px"}},dispose:function(){this.root.innerHTML="",this._vmlRoot=this._vmlViewport=this.storage=null},getWidth:function(){return this._width},getHeight:function(){return this._height},clear:function(){this._vmlViewport&&this.root.removeChild(this._vmlViewport)},_getWidth:function(){var e=this.root,t=e.currentStyle;return(e.clientWidth||JF(t.width))-JF(t.paddingLeft)-JF(t.paddingRight)|0},_getHeight:function(){var e=this.root,t=e.currentStyle;return(e.clientHeight||JF(t.height))-JF(t.paddingTop)-JF(t.paddingBottom)|0}},QF(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],(function(e){eG.prototype[e]=function(){}}));var tG=eG;(0,So.registerPainter)("vml",tG);var nG={createElement:function(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}},iG=nG.createElement,aG=Js.CMD,rG=Array.prototype.join,oG="none",sG=Math.round,lG=Math.sin,uG=Math.cos,cG=Math.PI,hG=2*Math.PI,dG=180/cG,fG=1e-4;function pG(e){return sG(1e4*e)/1e4}function gG(e){return e<fG&&e>-fG}function mG(e,t){t&&vG(e,"transform","matrix("+rG.call(t,",")+")")}function vG(e,t,n){(!n||"linear"!==n.type&&"radial"!==n.type)&&e.setAttribute(t,n)}function yG(e,t,n,i){if(function(e,t){var n=t?e.textFill:e.fill;return null!=n&&n!==oG}(t,n)){var a=n?t.textFill:t.fill;vG(e,"fill",a="transparent"===a?oG:a),vG(e,"fill-opacity",null!=t.fillOpacity?t.fillOpacity*t.opacity:t.opacity)}else vG(e,"fill",oG);if(function(e,t){var n=t?e.textStroke:e.stroke;return null!=n&&n!==oG}(t,n)){var r=n?t.textStroke:t.stroke;vG(e,"stroke",r="transparent"===r?oG:r),vG(e,"stroke-width",(n?t.textStrokeWidth:t.lineWidth)/(!n&&t.strokeNoScale?i.getLineScale():1)),vG(e,"paint-order",n?"stroke":"fill"),vG(e,"stroke-opacity",null!=t.strokeOpacity?t.strokeOpacity:t.opacity),t.lineDash?(vG(e,"stroke-dasharray",t.lineDash.join(",")),vG(e,"stroke-dashoffset",sG(t.lineDashOffset||0))):vG(e,"stroke-dasharray",""),t.lineCap&&vG(e,"stroke-linecap",t.lineCap),t.lineJoin&&vG(e,"stroke-linejoin",t.lineJoin),t.miterLimit&&vG(e,"stroke-miterlimit",t.miterLimit)}else vG(e,"stroke",oG)}var _G={};_G.brush=function(e){var t=e.style,n=e.__svgEl;n||(n=iG("path"),e.__svgEl=n),e.path||e.createPathProxy();var i=e.path;if(e.__dirtyPath){i.beginPath(),i.subPixelOptimize=!1,e.buildPath(i,e.shape),e.__dirtyPath=!1;var a=function(e){for(var t=[],n=e.data,i=e.len(),a=0;a<i;){var r="",o=0;switch(n[a++]){case aG.M:r="M",o=2;break;case aG.L:r="L",o=2;break;case aG.Q:r="Q",o=4;break;case aG.C:r="C",o=6;break;case aG.A:var s=n[a++],l=n[a++],u=n[a++],c=n[a++],h=n[a++],d=n[a++],f=n[a++],p=n[a++],g=Math.abs(d),m=gG(g-hG)||(p?d>=hG:-d>=hG),v=d>0?d%hG:d%hG+hG,y=!1;y=!!m||!gG(g)&&v>=cG==!!p;var _=pG(s+u*uG(h)),x=pG(l+c*lG(h));m&&(d=p?hG-1e-4:1e-4-hG,y=!0,9===a&&t.push("M",_,x));var b=pG(s+u*uG(h+d)),w=pG(l+c*lG(h+d));t.push("A",pG(u),pG(c),sG(f*dG),+y,+p,b,w);break;case aG.Z:r="Z";break;case aG.R:b=pG(n[a++]),w=pG(n[a++]);var S=pG(n[a++]),M=pG(n[a++]);t.push("M",b,w,"L",b+S,w,"L",b+S,w+M,"L",b,w+M,"L",b,w)}r&&t.push(r);for(var T=0;T<o;T++)t.push(pG(n[a++]))}return t.join(" ")}(i);a.indexOf("NaN")<0&&vG(n,"d",a)}yG(n,t,!1,e),mG(n,e.transform),null!=t.text?IG(e,e.getBoundingRect()):DG(e)};var xG={brush:function(e){var t=e.style,n=t.image;n instanceof HTMLImageElement&&(n=n.src);if(n){var i=t.x||0,a=t.y||0,r=t.width,o=t.height,s=e.__svgEl;s||(s=iG("image"),e.__svgEl=s),n!==e.__imageSrc&&(!function(e,t,n){e.setAttributeNS("http://www.w3.org/1999/xlink",t,n)}(s,"href",n),e.__imageSrc=n),vG(s,"width",r),vG(s,"height",o),vG(s,"x",i),vG(s,"y",a),mG(s,e.transform),null!=t.text?IG(e,e.getBoundingRect()):DG(e)}}},bG={},wG=new Pi,SG={},MG=[],TG={left:"start",right:"end",center:"middle",middle:"middle"},IG=function(e,t){var n=e.style,i=e.transform,a=e instanceof Zl||n.transformText;e.__dirty&&Mr.normalizeTextStyle(n,!0);var r=n.text;if(null!=r&&(r+=""),Mr.needDrawText(r,n)){null==r&&(r=""),!a&&i&&(wG.copy(t),wG.applyTransform(i),t=wG);var o=e.__textSvgEl;o||(o=iG("text"),e.__textSvgEl=o);var s=o.style,l=n.font||Za.DEFAULT_FONT,u=o.__computedFont;l!==o.__styleFont&&(s.font=o.__styleFont=l,u=o.__computedFont=s.font);var c=n.textPadding,h=n.textLineHeight,d=e.__textCotentBlock;d&&!e.__dirtyText||(d=e.__textCotentBlock=Za.parsePlainText(r,u,c,h,n.truncate));var f=d.outerHeight,p=d.lineHeight;Mr.getBoxPosition(SG,e,n,t);var g=SG.baseX,m=SG.baseY,v=SG.textAlign||"left",y=SG.textVerticalAlign;!function(e,t,n,i,a,r,o){ln.identity(MG),t&&n&&ln.copy(MG,n);var s=i.textRotation;if(a&&s){var l=i.textOrigin;"center"===l?(r=a.width/2+a.x,o=a.height/2+a.y):l&&(r=l[0]+a.x,o=l[1]+a.y),MG[4]-=r,MG[5]-=o,ln.rotate(MG,MG,s),MG[4]+=r,MG[5]+=o}mG(e,MG)}(o,a,i,n,t,g,m);var _=g,x=Za.adjustTextY(m,f,y);c&&(_=function(e,t,n){return"right"===t?e-n[1]:"center"===t?e+n[3]/2-n[1]/2:e+n[3]}(g,v,c),x+=c[0]),x+=p/2,yG(o,n,!0,e);var b=d.canCacheByTextString,w=e.__tspanList||(e.__tspanList=[]),S=w.length;if(b&&e.__canCacheByTextString&&e.__text===r){if(e.__dirtyText&&S)for(var M=0;M<S;++M)AG(w[M],v,_,x+M*p)}else{e.__text=r,e.__canCacheByTextString=b;var T=d.lines,I=T.length;for(M=0;M<I;M++){var A=w[M],D=T[M];A?A.__zrText!==D&&(A.innerHTML="",A.appendChild(document.createTextNode(D))):(A=w[M]=iG("tspan"),o.appendChild(A),A.appendChild(document.createTextNode(D))),AG(A,v,_,x+M*p)}if(S>I){for(;M<S;M++)o.removeChild(w[M]);w.length=I}}}};function AG(e,t,n,i){vG(e,"dominant-baseline","middle"),vG(e,"text-anchor",TG[t]),vG(e,"x",n),vG(e,"y",i)}function DG(e){e&&e.__textSvgEl&&(e.__textSvgEl.parentNode&&e.__textSvgEl.parentNode.removeChild(e.__textSvgEl),e.__textSvgEl=null,e.__tspanList=[],e.__text=null)}bG.drawRectText=IG,bG.brush=function(e){null!=e.style.text?IG(e,!1):DG(e)};var CG={path:_G,image:xG,text:bG};function OG(){}function kG(e,t,n,i){for(var a=0,r=t.length,o=0,s=0;a<r;a++){var l=t[a];if(l.removed){for(u=[],c=s;c<s+l.count;c++)u.push(c);l.indices=u,s+=l.count}else{for(var u=[],c=o;c<o+l.count;c++)u.push(c);l.indices=u,o+=l.count,l.added||(s+=l.count)}}return t}function LG(e){return{newPos:e.newPos,components:e.components.slice(0)}}OG.prototype={diff:function(e,t,n){n||(n=function(e,t){return e===t}),this.equals=n;var i=this;e=e.slice();var a=(t=t.slice()).length,r=e.length,o=1,s=a+r,l=[{newPos:-1,components:[]}],u=this.extractCommon(l[0],t,e,0);if(l[0].newPos+1>=a&&u+1>=r){for(var c=[],h=0;h<t.length;h++)c.push(h);return[{indices:c,count:t.length}]}function d(){for(var n=-1*o;n<=o;n+=2){var s,u=l[n-1],c=l[n+1],h=(c?c.newPos:0)-n;u&&(l[n-1]=void 0);var d=u&&u.newPos+1<a,f=c&&0<=h&&h<r;if(d||f){if(!d||f&&u.newPos<c.newPos?(s=LG(c),i.pushComponent(s.components,void 0,!0)):((s=u).newPos++,i.pushComponent(s.components,!0,void 0)),h=i.extractCommon(s,t,e,n),s.newPos+1>=a&&h+1>=r)return kG(i,s.components);l[n]=s}else l[n]=void 0}o++}for(;o<=s;){var f=d();if(f)return f}},pushComponent:function(e,t,n){var i=e[e.length-1];i&&i.added===t&&i.removed===n?e[e.length-1]={count:i.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,i){for(var a=t.length,r=n.length,o=e.newPos,s=o-i,l=0;o+1<a&&s+1<r&&this.equals(t[o+1],n[s+1]);)o++,s++,l++;return l&&e.components.push({count:l}),e.newPos=o,s},tokenize:function(e){return e.slice()},join:function(e){return e.slice()}};var EG=new OG;var NG=function(e,t,n){return EG.diff(e,t,n)},PG=nG.createElement,RG=CG.path,zG=CG.image,BG=CG.text;function VG(e,t,n,i,a){this._zrId=e,this._svgRoot=t,this._tagNames="string"==typeof n?[n]:n,this._markLabel=i,this._domName=a||"_dom",this.nextId=0}VG.prototype.createElement=PG,VG.prototype.getDefs=function(e){var t=this._svgRoot,n=this._svgRoot.getElementsByTagName("defs");return 0===n.length?e?((n=t.insertBefore(this.createElement("defs"),t.firstChild)).contains||(n.contains=function(e){var t=n.children;if(!t)return!1;for(var i=t.length-1;i>=0;--i)if(t[i]===e)return!0;return!1}),n):null:n[0]},VG.prototype.update=function(e,t){if(e){var n=this.getDefs(!1);if(e[this._domName]&&n.contains(e[this._domName]))"function"==typeof t&&t(e);else{var i=this.add(e);i&&(e[this._domName]=i)}}},VG.prototype.addDom=function(e){this.getDefs(!0).appendChild(e)},VG.prototype.removeDom=function(e){var t=this.getDefs(!1);t&&e[this._domName]&&(t.removeChild(e[this._domName]),e[this._domName]=null)},VG.prototype.getDoms=function(){var e=this.getDefs(!1);if(!e)return[];var t=[];return Ge.each(this._tagNames,(function(n){var i=e.getElementsByTagName(n);t=t.concat([].slice.call(i))})),t},VG.prototype.markAllUnused=function(){var e=this.getDoms(),t=this;Ge.each(e,(function(e){e[t._markLabel]="0"}))},VG.prototype.markUsed=function(e){e&&(e[this._markLabel]="1")},VG.prototype.removeUnused=function(){var e=this.getDefs(!1);if(e){var t=this.getDoms(),n=this;Ge.each(t,(function(t){"1"!==t[n._markLabel]&&e.removeChild(t)}))}},VG.prototype.getSvgProxy=function(e){return e instanceof Tl?RG:e instanceof Lr?zG:e instanceof Zl?BG:RG},VG.prototype.getTextSvgElement=function(e){return e.__textSvgEl},VG.prototype.getSvgElement=function(e){return e.__svgEl};var HG=VG;function YG(e,t){HG.call(this,e,t,["linearGradient","radialGradient"],"__gradient_in_use__")}Ge.inherits(YG,HG),YG.prototype.addWithoutUpdate=function(e,t){if(t&&t.style){var n=this;Ge.each(["fill","stroke"],(function(i){if(t.style[i]&&("linear"===t.style[i].type||"radial"===t.style[i].type)){var a,r=t.style[i],o=n.getDefs(!0);r._dom?(a=r._dom,o.contains(r._dom)||n.addDom(a)):a=n.add(r),n.markUsed(t);var s=a.getAttribute("id");e.setAttribute(i,"url(#"+s+")")}}))}},YG.prototype.add=function(e){var t;if("linear"===e.type)t=this.createElement("linearGradient");else{if("radial"!==e.type)return null;t=this.createElement("radialGradient")}return e.id=e.id||this.nextId++,t.setAttribute("id","zr"+this._zrId+"-gradient-"+e.id),this.updateDom(e,t),this.addDom(t),t},YG.prototype.update=function(e){var t=this;HG.prototype.update.call(this,e,(function(){var n=e.type,i=e._dom.tagName;"linear"===n&&"linearGradient"===i||"radial"===n&&"radialGradient"===i?t.updateDom(e,e._dom):(t.removeDom(e),t.add(e))}))},YG.prototype.updateDom=function(e,t){if("linear"===e.type)t.setAttribute("x1",e.x),t.setAttribute("y1",e.y),t.setAttribute("x2",e.x2),t.setAttribute("y2",e.y2);else{if("radial"!==e.type)return;t.setAttribute("cx",e.x),t.setAttribute("cy",e.y),t.setAttribute("r",e.r)}e.global?t.setAttribute("gradientUnits","userSpaceOnUse"):t.setAttribute("gradientUnits","objectBoundingBox"),t.innerHTML="";for(var n=e.colorStops,i=0,a=n.length;i<a;++i){var r=this.createElement("stop");r.setAttribute("offset",100*n[i].offset+"%");var o=n[i].color;if(o.indexOf(!1)){var s=qn.parse(o)[3],l=qn.toHex(o);r.setAttribute("stop-color","#"+l),r.setAttribute("stop-opacity",s)}else r.setAttribute("stop-color",n[i].color);t.appendChild(r)}e._dom=t},YG.prototype.markUsed=function(e){if(e.style){var t=e.style.fill;t&&t._dom&&HG.prototype.markUsed.call(this,t._dom),(t=e.style.stroke)&&t._dom&&HG.prototype.markUsed.call(this,t._dom)}};var FG=YG;function GG(e,t){HG.call(this,e,t,"clipPath","__clippath_in_use__")}Ge.inherits(GG,HG),GG.prototype.update=function(e){var t=this.getSvgElement(e);t&&this.updateDom(t,e.__clipPaths,!1);var n=this.getTextSvgElement(e);n&&this.updateDom(n,e.__clipPaths,!0),this.markUsed(e)},GG.prototype.updateDom=function(e,t,n){if(t&&t.length>0){var i,a,r=this.getDefs(!0),o=t[0],s=n?"_textDom":"_dom";o[s]?(a=o[s].getAttribute("id"),i=o[s],r.contains(i)||r.appendChild(i)):(a="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(i=this.createElement("clipPath")).setAttribute("id",a),r.appendChild(i),o[s]=i);var l=this.getSvgProxy(o);if(o.transform&&o.parent.invTransform&&!n){var u=Array.prototype.slice.call(o.transform);ln.mul(o.transform,o.parent.invTransform,o.transform),l.brush(o),o.transform=u}else l.brush(o);var c=this.getSvgElement(o);i.innerHTML="",i.appendChild(c.cloneNode()),e.setAttribute("clip-path","url(#"+a+")"),t.length>1&&this.updateDom(i,t.slice(1),n)}else e&&e.setAttribute("clip-path","none")},GG.prototype.markUsed=function(e){var t=this;e.__clipPaths&&Ge.each(e.__clipPaths,(function(e){e._dom&&HG.prototype.markUsed.call(t,e._dom),e._textDom&&HG.prototype.markUsed.call(t,e._textDom)}))};var WG=GG;function jG(e,t){HG.call(this,e,t,["filter"],"__filter_in_use__","_shadowDom")}function UG(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY||e.textShadowBlur||e.textShadowOffsetX||e.textShadowOffsetY)}Ge.inherits(jG,HG),jG.prototype.addWithoutUpdate=function(e,t){if(t&&UG(t.style)){var n;if(t._shadowDom)n=t._shadowDom,this.getDefs(!0).contains(t._shadowDom)||this.addDom(n);else n=this.add(t);this.markUsed(t);var i=n.getAttribute("id");e.style.filter="url(#"+i+")"}},jG.prototype.add=function(e){var t=this.createElement("filter");return e._shadowDomId=e._shadowDomId||this.nextId++,t.setAttribute("id","zr"+this._zrId+"-shadow-"+e._shadowDomId),this.updateDom(e,t),this.addDom(t),t},jG.prototype.update=function(e,t){if(UG(t.style)){var n=this;HG.prototype.update.call(this,t,(function(){n.updateDom(t,t._shadowDom)}))}else this.remove(e,t)},jG.prototype.remove=function(e,t){null!=t._shadowDomId&&(this.removeDom(e),e.style.filter="")},jG.prototype.updateDom=function(e,t){var n=t.getElementsByTagName("feDropShadow");n=0===n.length?this.createElement("feDropShadow"):n[0];var i,a,r,o,s=e.style,l=e.scale&&e.scale[0]||1,u=e.scale&&e.scale[1]||1;if(s.shadowBlur||s.shadowOffsetX||s.shadowOffsetY)i=s.shadowOffsetX||0,a=s.shadowOffsetY||0,r=s.shadowBlur,o=s.shadowColor;else{if(!s.textShadowBlur)return void this.removeDom(t,s);i=s.textShadowOffsetX||0,a=s.textShadowOffsetY||0,r=s.textShadowBlur,o=s.textShadowColor}n.setAttribute("dx",i/l),n.setAttribute("dy",a/u),n.setAttribute("flood-color",o);var c=r/2/l+" "+r/2/u;n.setAttribute("stdDeviation",c),t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width",Math.ceil(r/2*200)+"%"),t.setAttribute("height",Math.ceil(r/2*200)+"%"),t.appendChild(n),e._shadowDom=t},jG.prototype.markUsed=function(e){e._shadowDom&&HG.prototype.markUsed.call(this,e._shadowDom)};var ZG=jG,XG=nG.createElement,qG=CG.path,KG=CG.image,$G=CG.text;function QG(e){return parseInt(e,10)}function JG(e,t){return t&&e&&t.parentNode!==e}function eW(e,t,n){if(JG(e,t)&&n){var i=n.nextSibling;i?e.insertBefore(t,i):e.appendChild(t)}}function tW(e,t){if(JG(e,t)){var n=e.firstChild;n?e.insertBefore(t,n):e.appendChild(t)}}function nW(e,t){t&&e&&t.parentNode===e&&e.removeChild(t)}function iW(e){return e.__textSvgEl}function aW(e){return e.__svgEl}var rW=function(e,t,n,i){this.root=e,this.storage=t,this._opts=n=Ge.extend({},n||{});var a=XG("svg");a.setAttribute("xmlns","http://www.w3.org/2000/svg"),a.setAttribute("version","1.1"),a.setAttribute("baseProfile","full"),a.style.cssText="user-select:none;position:absolute;left:0;top:0;";var r=XG("g");a.appendChild(r);var o=XG("g");a.appendChild(o),this.gradientManager=new FG(i,o),this.clipPathManager=new WG(i,o),this.shadowManager=new ZG(i,o);var s=document.createElement("div");s.style.cssText="overflow:hidden;position:relative",this._svgDom=a,this._svgRoot=o,this._backgroundRoot=r,this._viewport=s,e.appendChild(s),s.appendChild(a),this.resize(n.width,n.height),this._visibleList=[]};rW.prototype={constructor:rW,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getSvgDom:function(){return this._svgDom},getSvgRoot:function(){return this._svgRoot},getViewportRootOffset:function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},refresh:function(){var e=this.storage.getDisplayList(!0);this._paintList(e)},setBackgroundColor:function(e){this._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var t=XG("rect");t.setAttribute("width",this.getWidth()),t.setAttribute("height",this.getHeight()),t.setAttribute("x",0),t.setAttribute("y",0),t.setAttribute("id",0),t.style.fill=e,this._backgroundRoot.appendChild(t),this._backgroundNode=t},_paintList:function(e){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var t,n,i=this._svgRoot,a=this._visibleList,r=e.length,o=[];for(t=0;t<r;t++){var s=e[t],l=(n=s)instanceof Tl?qG:n instanceof Lr?KG:n instanceof Zl?$G:qG,u=aW(s)||iW(s);s.invisible||(s.__dirty&&(l&&l.brush(s),this.clipPathManager.update(s),s.style&&(this.gradientManager.update(s.style.fill),this.gradientManager.update(s.style.stroke),this.shadowManager.update(u,s)),s.__dirty=!1),o.push(s))}var c,h=NG(a,o);for(t=0;t<h.length;t++){if((p=h[t]).removed)for(var d=0;d<p.count;d++){u=aW(s=a[p.indices[d]]);var f=iW(s);nW(i,u),nW(i,f)}}for(t=0;t<h.length;t++){var p;if((p=h[t]).added)for(d=0;d<p.count;d++){u=aW(s=o[p.indices[d]]),f=iW(s);c?eW(i,u,c):tW(i,u),u?eW(i,f,u):c?eW(i,f,c):tW(i,f),eW(i,f,u),c=f||u||c,this.gradientManager.addWithoutUpdate(u||f,s),this.shadowManager.addWithoutUpdate(u||f,s),this.clipPathManager.markUsed(s)}else if(!p.removed)for(d=0;d<p.count;d++){u=aW(s=o[p.indices[d]]),f=iW(s),u=aW(s),f=iW(s);this.gradientManager.markUsed(s),this.gradientManager.addWithoutUpdate(u||f,s),this.shadowManager.markUsed(s),this.shadowManager.addWithoutUpdate(u||f,s),this.clipPathManager.markUsed(s),f&&eW(i,f,u),c=u||f||c}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this.shadowManager.removeUnused(),this._visibleList=o},_getDefs:function(e){var t,n=this._svgDom;return 0===(t=n.getElementsByTagName("defs")).length?e?((t=n.insertBefore(XG("defs"),n.firstChild)).contains||(t.contains=function(e){var n=t.children;if(!n)return!1;for(var i=n.length-1;i>=0;--i)if(n[i]===e)return!0;return!1}),t):null:t[0]},resize:function(e,t){var n=this._viewport;n.style.display="none";var i=this._opts;if(null!=e&&(i.width=e),null!=t&&(i.height=t),e=this._getSize(0),t=this._getSize(1),n.style.display="",this._width!==e||this._height!==t){this._width=e,this._height=t;var a=n.style;a.width=e+"px",a.height=t+"px";var r=this._svgDom;r.setAttribute("width",e),r.setAttribute("height",t)}this._backgroundNode&&(this._backgroundNode.setAttribute("width",e),this._backgroundNode.setAttribute("height",t))},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(e){var t=this._opts,n=["width","height"][e],i=["clientWidth","clientHeight"][e],a=["paddingLeft","paddingTop"][e],r=["paddingRight","paddingBottom"][e];if(null!=t[n]&&"auto"!==t[n])return parseFloat(t[n]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[i]||QG(s[n])||QG(o.style[n]))-(QG(s[a])||0)-(QG(s[r])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._backgroundRoot=this._svgDom=this._backgroundNode=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},toDataURL:function(){return this.refresh(),"data:image/svg+xml;charset=UTF-8,"+encodeURIComponent(this._svgDom.outerHTML.replace(/></g,">\n\r<"))}},Ge.each(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","pathToImage"],(function(e){rW.prototype[e]=function(){}}));var oW=rW;(0,So.registerPainter)("svg",oW);var sW,lW,uW=te(ne((function(e,t){!function(){for(var e in Qx){if(null==Qx||!Qx.hasOwnProperty(e)||"default"===e||"__esModule"===e)return;t[e]=Qx[e]}}(),function(){for(var e in $x){if(null==$x||!$x.hasOwnProperty(e)||"default"===e||"__esModule"===e)return;t[e]=$x[e]}}()}))),cW=ne((function(e,t){var n;n=function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var a=t[i]={exports:{},id:i,loaded:!1};return e[i].call(a.exports,a,a.exports,n),a.loaded=!0,a.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){var i=n(2),a=n(3),r=n(4),o=n(22);function s(e){var t=new r(e),n=a(r.prototype.request,t);return i.extend(n,r.prototype,t),i.extend(n,t),n}var l=s(n(10));l.Axios=r,l.create=function(e){return s(o(l.defaults,e))},l.Cancel=n(23),l.CancelToken=n(24),l.isCancel=n(9),l.all=function(e){return Promise.all(e)},l.spread=n(25),e.exports=l,e.exports.default=l},function(e,t,n){var i=n(3),a=Object.prototype.toString;function r(e){return"[object Array]"===a.call(e)}function o(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function l(e){return"[object Function]"===a.call(e)}function u(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),r(e))for(var n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.call(null,e[a],a,e)}e.exports={isArray:r,isArrayBuffer:function(e){return"[object ArrayBuffer]"===a.call(e)},isBuffer:function(e){return null!==e&&!o(e)&&null!==e.constructor&&!o(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isUndefined:o,isDate:function(e){return"[object Date]"===a.call(e)},isFile:function(e){return"[object File]"===a.call(e)},isBlob:function(e){return"[object Blob]"===a.call(e)},isFunction:l,isStream:function(e){return s(e)&&l(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:u,merge:function e(){var t={};function n(n,i){"object"==typeof t[i]&&"object"==typeof n?t[i]=e(t[i],n):t[i]=n}for(var i=0,a=arguments.length;i<a;i++)u(arguments[i],n);return t},deepMerge:function e(){var t={};function n(n,i){"object"==typeof t[i]&&"object"==typeof n?t[i]=e(t[i],n):t[i]="object"==typeof n?e({},n):n}for(var i=0,a=arguments.length;i<a;i++)u(arguments[i],n);return t},extend:function(e,t,n){return u(t,(function(t,a){e[a]=n&&"function"==typeof t?i(t,n):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(e,t){e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),i=0;i<n.length;i++)n[i]=arguments[i];return e.apply(t,n)}}},function(e,t,n){var i=n(2),a=n(5),r=n(6),o=n(7),s=n(22);function l(e){this.defaults=e,this.interceptors={request:new r,response:new r}}l.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[o,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)n=n.then(t.shift(),t.shift());return n},l.prototype.getUri=function(e){return e=s(this.defaults,e),a(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},i.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,n){return this.request(i.merge(n||{},{method:e,url:t}))}})),i.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,n,a){return this.request(i.merge(a||{},{method:e,url:t,data:n}))}})),e.exports=l},function(e,t,n){var i=n(2);function a(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var r;if(n)r=n(t);else if(i.isURLSearchParams(t))r=t.toString();else{var o=[];i.forEach(t,(function(e,t){null!=e&&(i.isArray(e)?t+="[]":e=[e],i.forEach(e,(function(e){i.isDate(e)?e=e.toISOString():i.isObject(e)&&(e=JSON.stringify(e)),o.push(a(t)+"="+a(e))})))})),r=o.join("&")}if(r){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e}},function(e,t,n){var i=n(2);function a(){this.handlers=[]}a.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},a.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},a.prototype.forEach=function(e){i.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=a},function(e,t,n){var i=n(2),a=n(8),r=n(9),o=n(10);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=a(e.data,e.headers,e.transformRequest),e.headers=i.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),i.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||o.adapter)(e).then((function(t){return s(e),t.data=a(t.data,t.headers,e.transformResponse),t}),(function(t){return r(t)||(s(e),t&&t.response&&(t.response.data=a(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,n){var i=n(2);e.exports=function(e,t,n){return i.forEach(n,(function(n){e=n(e,t)})),e}},function(e,t){e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){var i=n(2),a=n(11),r={"Content-Type":"application/x-www-form-urlencoded"};function o(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var s,l={adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(s=n(12)),s),transformRequest:[function(e,t){return a(t,"Accept"),a(t,"Content-Type"),i.isFormData(e)||i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e)?e:i.isArrayBufferView(e)?e.buffer:i.isURLSearchParams(e)?(o(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):i.isObject(e)?(o(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};i.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),i.forEach(["post","put","patch"],(function(e){l.headers[e]=i.merge(r)})),e.exports=l},function(e,t,n){var i=n(2);e.exports=function(e,t){i.forEach(e,(function(n,i){i!==t&&i.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[i])}))}},function(e,t,n){var i=n(2),a=n(13),r=n(5),o=n(16),s=n(19),l=n(20),u=n(14);e.exports=function(e){return new Promise((function(t,c){var h=e.data,d=e.headers;i.isFormData(h)&&delete d["Content-Type"];var f=new XMLHttpRequest;if(e.auth){var p=e.auth.username||"",g=e.auth.password||"";d.Authorization="Basic "+btoa(p+":"+g)}var m=o(e.baseURL,e.url);if(f.open(e.method.toUpperCase(),r(m,e.params,e.paramsSerializer),!0),f.timeout=e.timeout,f.onreadystatechange=function(){if(f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in f?s(f.getAllResponseHeaders()):null,i={data:e.responseType&&"text"!==e.responseType?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:n,config:e,request:f};a(t,c,i),f=null}},f.onabort=function(){f&&(c(u("Request aborted",e,"ECONNABORTED",f)),f=null)},f.onerror=function(){c(u("Network Error",e,null,f)),f=null},f.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),c(u(t,e,"ECONNABORTED",f)),f=null},i.isStandardBrowserEnv()){var v=n(21),y=(e.withCredentials||l(m))&&e.xsrfCookieName?v.read(e.xsrfCookieName):void 0;y&&(d[e.xsrfHeaderName]=y)}if("setRequestHeader"in f&&i.forEach(d,(function(e,t){void 0===h&&"content-type"===t.toLowerCase()?delete d[t]:f.setRequestHeader(t,e)})),i.isUndefined(e.withCredentials)||(f.withCredentials=!!e.withCredentials),e.responseType)try{f.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&f.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){f&&(f.abort(),c(e),f=null)})),void 0===h&&(h=null),f.send(h)}))}},function(e,t,n){var i=n(14);e.exports=function(e,t,n){var a=n.config.validateStatus;!a||a(n.status)?e(n):t(i("Request failed with status code "+n.status,n.config,null,n.request,n))}},function(e,t,n){var i=n(15);e.exports=function(e,t,n,a,r){var o=new Error(e);return i(o,t,n,a,r)}},function(e,t){e.exports=function(e,t,n,i,a){return e.config=t,n&&(e.code=n),e.request=i,e.response=a,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,n){var i=n(17),a=n(18);e.exports=function(e,t){return e&&!i(t)?a(e,t):t}},function(e,t){e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t){e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){var i=n(2),a=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,r,o={};return e?(i.forEach(e.split("\n"),(function(e){if(r=e.indexOf(":"),t=i.trim(e.substr(0,r)).toLowerCase(),n=i.trim(e.substr(r+1)),t){if(o[t]&&a.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([n]):o[t]?o[t]+", "+n:n}})),o):o}},function(e,t,n){var i=n(2);e.exports=i.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function a(e){var i=e;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=a(window.location.href),function(t){var n=i.isString(t)?a(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){var i=n(2);e.exports=i.isStandardBrowserEnv()?{write:function(e,t,n,a,r,o){var s=[];s.push(e+"="+encodeURIComponent(t)),i.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),i.isString(a)&&s.push("path="+a),i.isString(r)&&s.push("domain="+r),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){var i=n(2);e.exports=function(e,t){t=t||{};var n={},a=["url","method","params","data"],r=["headers","auth","proxy"],o=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];i.forEach(a,(function(e){void 0!==t[e]&&(n[e]=t[e])})),i.forEach(r,(function(a){i.isObject(t[a])?n[a]=i.deepMerge(e[a],t[a]):void 0!==t[a]?n[a]=t[a]:i.isObject(e[a])?n[a]=i.deepMerge(e[a]):void 0!==e[a]&&(n[a]=e[a])})),i.forEach(o,(function(i){void 0!==t[i]?n[i]=t[i]:void 0!==e[i]&&(n[i]=e[i])}));var s=a.concat(r).concat(o),l=Object.keys(t).filter((function(e){return-1===s.indexOf(e)}));return i.forEach(l,(function(i){void 0!==t[i]?n[i]=t[i]:void 0!==e[i]&&(n[i]=e[i])})),n}},function(e,t){function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,n){var i=n(23);function a(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new i(e),t(n.reason))}))}a.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},a.source=function(){var e;return{token:new a((function(t){e=t})),cancel:e}},e.exports=a},function(e,t){e.exports=function(e){return function(t){return e.apply(null,t)}}}])},e.exports=n()}));!function(e){e.DIMENSION="dimension",e.MAP="map",e.INDICATOR="indicator",e.DETAIL="detail"}(sW||(sW={})),function(e){e.TABLE="table",e.PIE="pie",e.HISTOGRAM_LINE="histogram-line",e.HISTOGRAM_BAR="histogram-bar",e.BAR="bar",e.HISTOGRAM_MIX="histogram-mix",e.GAUGE="gauge",e.INDICATOR_CARD="indicator_card",e.MAP="map",e.DETAIL="detail"}(lW||(lW={})),Object.freeze({[lW.TABLE]:Object.freeze({key:lW.TABLE,name:"表格",iconfont:"icon-table02",iconColor:"#2b9f7f",dataConfigMode:sW.DIMENSION}),[lW.PIE]:Object.freeze({key:lW.PIE,name:"饼图",iconfont:"icon-pie_chart",iconColor:"#11c5d4",dataConfigMode:sW.DIMENSION}),[lW.HISTOGRAM_LINE]:Object.freeze({key:lW.HISTOGRAM_LINE,name:"线图",iconfont:"icon-line_chart",iconColor:"#0091ff",dataConfigMode:sW.DIMENSION}),[lW.HISTOGRAM_BAR]:Object.freeze({key:lW.HISTOGRAM_BAR,name:"柱状图",iconfont:"icon-bar_chart",iconColor:"#ff822f",dataConfigMode:sW.DIMENSION}),[lW.INDICATOR_CARD]:Object.freeze({key:lW.INDICATOR_CARD,name:"指标卡",iconfont:"icon-indicator-card",iconColor:"#efce30",dataConfigMode:sW.INDICATOR}),[lW.BAR]:Object.freeze({key:lW.BAR,name:"条形图",iconfont:"icon-list",iconColor:"#ff5c31",dataConfigMode:sW.DIMENSION}),[lW.HISTOGRAM_MIX]:Object.freeze({key:lW.HISTOGRAM_MIX,name:"柱线混合图",iconfont:"icon-chart",iconColor:"#2b9f7f",dataConfigMode:sW.DIMENSION}),[lW.GAUGE]:Object.freeze({key:lW.GAUGE,name:"仪表盘",iconfont:"icon-dash-board",iconColor:"#5071f0",dataConfigMode:sW.DIMENSION}),[lW.MAP]:Object.freeze({key:lW.MAP,name:"地图",iconfont:"icon-thermal-map",iconColor:"#2b9f7f",dataConfigMode:sW.MAP}),[lW.DETAIL]:Object.freeze({key:lW.DETAIL,name:"明细表",iconfont:"icon-detail-list",iconColor:"#2b9f7f",dataConfigMode:sW.DETAIL})});var hW,dW,fW,pW=ne((function(e,t){e.exports=function(){var t,n;function i(){return t.apply(null,arguments)}function a(e){t=e}function r(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function o(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(s(e,t))return!1;return!0}function u(e){return void 0===e}function c(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function h(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){var n,i=[];for(n=0;n<e.length;++n)i.push(t(e[n],n));return i}function f(e,t){for(var n in t)s(t,n)&&(e[n]=t[n]);return s(t,"toString")&&(e.toString=t.toString),s(t,"valueOf")&&(e.valueOf=t.valueOf),e}function p(e,t,n,i){return Xn(e,t,n,i,!0).utc()}function g(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function m(e){return null==e._pf&&(e._pf=g()),e._pf}function v(e){if(null==e._isValid){var t=m(e),i=n.call(t.parsedDateParts,(function(e){return null!=e})),a=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&i);if(e._strict&&(a=a&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return a;e._isValid=a}return e._isValid}function y(e){var t=p(NaN);return null!=e?f(m(t),e):m(t).userInvalidated=!0,t}n=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),i=n.length>>>0;for(t=0;t<i;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var _=i.momentProperties=[],x=!1;function b(e,t){var n,i,a;if(u(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),u(t._i)||(e._i=t._i),u(t._f)||(e._f=t._f),u(t._l)||(e._l=t._l),u(t._strict)||(e._strict=t._strict),u(t._tzm)||(e._tzm=t._tzm),u(t._isUTC)||(e._isUTC=t._isUTC),u(t._offset)||(e._offset=t._offset),u(t._pf)||(e._pf=m(t)),u(t._locale)||(e._locale=t._locale),_.length>0)for(n=0;n<_.length;n++)u(a=t[i=_[n]])||(e[i]=a);return e}function w(e){b(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===x&&(x=!0,i.updateOffset(this),x=!1)}function S(e){return e instanceof w||null!=e&&null!=e._isAMomentObject}function M(e){!1===i.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function T(e,t){var n=!0;return f((function(){if(null!=i.deprecationHandler&&i.deprecationHandler(null,e),n){var a,r,o,l=[];for(r=0;r<arguments.length;r++){if(a="","object"==typeof arguments[r]){for(o in a+="\n["+r+"] ",arguments[0])s(arguments[0],o)&&(a+=o+": "+arguments[0][o]+", ");a=a.slice(0,-2)}else a=arguments[r];l.push(a)}M(e+"\nArguments: "+Array.prototype.slice.call(l).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var I,A={};function D(e,t){null!=i.deprecationHandler&&i.deprecationHandler(e,t),A[e]||(M(t),A[e]=!0)}function C(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function O(e){var t,n;for(n in e)s(e,n)&&(C(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function k(e,t){var n,i=f({},e);for(n in t)s(t,n)&&(o(e[n])&&o(t[n])?(i[n]={},f(i[n],e[n]),f(i[n],t[n])):null!=t[n]?i[n]=t[n]:delete i[n]);for(n in e)s(e,n)&&!s(t,n)&&o(e[n])&&(i[n]=f({},i[n]));return i}function L(e){null!=e&&this.set(e)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null,I=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)s(e,t)&&n.push(t);return n};var E={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function N(e,t,n){var i=this._calendar[e]||this._calendar.sameElse;return C(i)?i.call(t,n):i}function P(e,t,n){var i=""+Math.abs(e),a=t-i.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+i}var R=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,z=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,B={},V={};function H(e,t,n,i){var a=i;"string"==typeof i&&(a=function(){return this[i]()}),e&&(V[e]=a),t&&(V[t[0]]=function(){return P(a.apply(this,arguments),t[1],t[2])}),n&&(V[n]=function(){return this.localeData().ordinal(a.apply(this,arguments),e)})}function Y(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function F(e){var t,n,i=e.match(R);for(t=0,n=i.length;t<n;t++)V[i[t]]?i[t]=V[i[t]]:i[t]=Y(i[t]);return function(t){var a,r="";for(a=0;a<n;a++)r+=C(i[a])?i[a].call(t,e):i[a];return r}}function G(e,t){return e.isValid()?(t=W(t,e.localeData()),B[t]=B[t]||F(t),B[t](e)):e.localeData().invalidDate()}function W(e,t){var n=5;function i(e){return t.longDateFormat(e)||e}for(z.lastIndex=0;n>=0&&z.test(e);)e=e.replace(z,i),z.lastIndex=0,n-=1;return e}var j={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function U(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(R).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])}var Z="Invalid date";function X(){return this._invalidDate}var q="%d",K=/\d{1,2}/;function $(e){return this._ordinal.replace("%d",e)}var Q={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function J(e,t,n,i){var a=this._relativeTime[n];return C(a)?a(e,t,n,i):a.replace(/%d/i,e)}function ee(e,t){var n=this._relativeTime[e>0?"future":"past"];return C(n)?n(t):n.replace(/%s/i,t)}var te={};function ne(e,t){var n=e.toLowerCase();te[n]=te[n+"s"]=te[t]=e}function ae(e){return"string"==typeof e?te[e]||te[e.toLowerCase()]:void 0}function re(e){var t,n,i={};for(n in e)s(e,n)&&(t=ae(n))&&(i[t]=e[n]);return i}var oe={};function se(e,t){oe[e]=t}function le(e){var t,n=[];for(t in e)s(e,t)&&n.push({unit:t,priority:oe[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}function ue(e){return e%4==0&&e%100!=0||e%400==0}function ce(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function he(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=ce(t)),n}function de(e,t){return function(n){return null!=n?(pe(this,e,n),i.updateOffset(this,t),this):fe(this,e)}}function fe(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function pe(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&ue(e.year())&&1===e.month()&&29===e.date()?(n=he(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),et(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function ge(e){return C(this[e=ae(e)])?this[e]():this}function me(e,t){if("object"==typeof e){var n,i=le(e=re(e));for(n=0;n<i.length;n++)this[i[n].unit](e[i[n].unit])}else if(C(this[e=ae(e)]))return this[e](t);return this}var ve,ye=/\d/,_e=/\d\d/,xe=/\d{3}/,be=/\d{4}/,we=/[+-]?\d{6}/,Se=/\d\d?/,Me=/\d\d\d\d?/,Te=/\d\d\d\d\d\d?/,Ie=/\d{1,3}/,Ae=/\d{1,4}/,De=/[+-]?\d{1,6}/,Ce=/\d+/,Oe=/[+-]?\d+/,ke=/Z|[+-]\d\d:?\d\d/gi,Le=/Z|[+-]\d\d(?::?\d\d)?/gi,Ee=/[+-]?\d+(\.\d{1,3})?/,Ne=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function Pe(e,t,n){ve[e]=C(t)?t:function(e,i){return e&&n?n:t}}function Re(e,t){return s(ve,e)?ve[e](t._strict,t._locale):new RegExp(ze(e))}function ze(e){return Be(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,i,a){return t||n||i||a})))}function Be(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}ve={};var Ve={};function He(e,t){var n,i=t;for("string"==typeof e&&(e=[e]),c(t)&&(i=function(e,n){n[t]=he(e)}),n=0;n<e.length;n++)Ve[e[n]]=i}function Ye(e,t){He(e,(function(e,n,i,a){i._w=i._w||{},t(e,i._w,i,a)}))}function Fe(e,t,n){null!=t&&s(Ve,e)&&Ve[e](t,n._a,n,e)}var Ge,We=0,je=1,Ue=2,Ze=3,Xe=4,qe=5,Ke=6,$e=7,Qe=8;function Je(e,t){return(e%t+t)%t}function et(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=Je(t,12);return e+=(t-n)/12,1===n?ue(e)?29:28:31-n%7%2}Ge=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},H("M",["MM",2],"Mo",(function(){return this.month()+1})),H("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),H("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),ne("month","M"),se("month",8),Pe("M",Se),Pe("MM",Se,_e),Pe("MMM",(function(e,t){return t.monthsShortRegex(e)})),Pe("MMMM",(function(e,t){return t.monthsRegex(e)})),He(["M","MM"],(function(e,t){t[je]=he(e)-1})),He(["MMM","MMMM"],(function(e,t,n,i){var a=n._locale.monthsParse(e,i,n._strict);null!=a?t[je]=a:m(n).invalidMonth=e}));var tt="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),nt="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),it=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,at=Ne,rt=Ne;function ot(e,t){return e?r(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||it).test(t)?"format":"standalone"][e.month()]:r(this._months)?this._months:this._months.standalone}function st(e,t){return e?r(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[it.test(t)?"format":"standalone"][e.month()]:r(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function lt(e,t,n){var i,a,r,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)r=p([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(r,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(a=Ge.call(this._shortMonthsParse,o))?a:null:-1!==(a=Ge.call(this._longMonthsParse,o))?a:null:"MMM"===t?-1!==(a=Ge.call(this._shortMonthsParse,o))||-1!==(a=Ge.call(this._longMonthsParse,o))?a:null:-1!==(a=Ge.call(this._longMonthsParse,o))||-1!==(a=Ge.call(this._shortMonthsParse,o))?a:null}function ut(e,t,n){var i,a,r;if(this._monthsParseExact)return lt.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(a=p([2e3,i]),n&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),n||this._monthsParse[i]||(r="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[i]=new RegExp(r.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[i].test(e))return i;if(n&&"MMM"===t&&this._shortMonthsParse[i].test(e))return i;if(!n&&this._monthsParse[i].test(e))return i}}function ct(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=he(t);else if(!c(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),et(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function ht(e){return null!=e?(ct(this,e),i.updateOffset(this,!0),this):fe(this,"Month")}function dt(){return et(this.year(),this.month())}function ft(e){return this._monthsParseExact?(s(this,"_monthsRegex")||gt.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(s(this,"_monthsShortRegex")||(this._monthsShortRegex=at),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function pt(e){return this._monthsParseExact?(s(this,"_monthsRegex")||gt.call(this),e?this._monthsStrictRegex:this._monthsRegex):(s(this,"_monthsRegex")||(this._monthsRegex=rt),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function gt(){function e(e,t){return t.length-e.length}var t,n,i=[],a=[],r=[];for(t=0;t<12;t++)n=p([2e3,t]),i.push(this.monthsShort(n,"")),a.push(this.months(n,"")),r.push(this.months(n,"")),r.push(this.monthsShort(n,""));for(i.sort(e),a.sort(e),r.sort(e),t=0;t<12;t++)i[t]=Be(i[t]),a[t]=Be(a[t]);for(t=0;t<24;t++)r[t]=Be(r[t]);this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function mt(e){return ue(e)?366:365}H("Y",0,0,(function(){var e=this.year();return e<=9999?P(e,4):"+"+e})),H(0,["YY",2],0,(function(){return this.year()%100})),H(0,["YYYY",4],0,"year"),H(0,["YYYYY",5],0,"year"),H(0,["YYYYYY",6,!0],0,"year"),ne("year","y"),se("year",1),Pe("Y",Oe),Pe("YY",Se,_e),Pe("YYYY",Ae,be),Pe("YYYYY",De,we),Pe("YYYYYY",De,we),He(["YYYYY","YYYYYY"],We),He("YYYY",(function(e,t){t[We]=2===e.length?i.parseTwoDigitYear(e):he(e)})),He("YY",(function(e,t){t[We]=i.parseTwoDigitYear(e)})),He("Y",(function(e,t){t[We]=parseInt(e,10)})),i.parseTwoDigitYear=function(e){return he(e)+(he(e)>68?1900:2e3)};var vt=de("FullYear",!0);function yt(){return ue(this.year())}function _t(e,t,n,i,a,r,o){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,i,a,r,o),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,i,a,r,o),s}function xt(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function bt(e,t,n){var i=7+t-n;return-(7+xt(e,0,i).getUTCDay()-t)%7+i-1}function wt(e,t,n,i,a){var r,o,s=1+7*(t-1)+(7+n-i)%7+bt(e,i,a);return s<=0?o=mt(r=e-1)+s:s>mt(e)?(r=e+1,o=s-mt(e)):(r=e,o=s),{year:r,dayOfYear:o}}function St(e,t,n){var i,a,r=bt(e.year(),t,n),o=Math.floor((e.dayOfYear()-r-1)/7)+1;return o<1?i=o+Mt(a=e.year()-1,t,n):o>Mt(e.year(),t,n)?(i=o-Mt(e.year(),t,n),a=e.year()+1):(a=e.year(),i=o),{week:i,year:a}}function Mt(e,t,n){var i=bt(e,t,n),a=bt(e+1,t,n);return(mt(e)-i+a)/7}function Tt(e){return St(e,this._week.dow,this._week.doy).week}H("w",["ww",2],"wo","week"),H("W",["WW",2],"Wo","isoWeek"),ne("week","w"),ne("isoWeek","W"),se("week",5),se("isoWeek",5),Pe("w",Se),Pe("ww",Se,_e),Pe("W",Se),Pe("WW",Se,_e),Ye(["w","ww","W","WW"],(function(e,t,n,i){t[i.substr(0,1)]=he(e)}));var It={dow:0,doy:6};function At(){return this._week.dow}function Dt(){return this._week.doy}function Ct(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Ot(e){var t=St(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function kt(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function Lt(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Et(e,t){return e.slice(t,7).concat(e.slice(0,t))}H("d",0,"do","day"),H("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),H("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),H("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),H("e",0,0,"weekday"),H("E",0,0,"isoWeekday"),ne("day","d"),ne("weekday","e"),ne("isoWeekday","E"),se("day",11),se("weekday",11),se("isoWeekday",11),Pe("d",Se),Pe("e",Se),Pe("E",Se),Pe("dd",(function(e,t){return t.weekdaysMinRegex(e)})),Pe("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),Pe("dddd",(function(e,t){return t.weekdaysRegex(e)})),Ye(["dd","ddd","dddd"],(function(e,t,n,i){var a=n._locale.weekdaysParse(e,i,n._strict);null!=a?t.d=a:m(n).invalidWeekday=e})),Ye(["d","e","E"],(function(e,t,n,i){t[i]=he(e)}));var Nt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Pt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Rt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),zt=Ne,Bt=Ne,Vt=Ne;function Ht(e,t){var n=r(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Et(n,this._week.dow):e?n[e.day()]:n}function Yt(e){return!0===e?Et(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Ft(e){return!0===e?Et(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Gt(e,t,n){var i,a,r,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)r=p([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(a=Ge.call(this._weekdaysParse,o))?a:null:"ddd"===t?-1!==(a=Ge.call(this._shortWeekdaysParse,o))?a:null:-1!==(a=Ge.call(this._minWeekdaysParse,o))?a:null:"dddd"===t?-1!==(a=Ge.call(this._weekdaysParse,o))||-1!==(a=Ge.call(this._shortWeekdaysParse,o))||-1!==(a=Ge.call(this._minWeekdaysParse,o))?a:null:"ddd"===t?-1!==(a=Ge.call(this._shortWeekdaysParse,o))||-1!==(a=Ge.call(this._weekdaysParse,o))||-1!==(a=Ge.call(this._minWeekdaysParse,o))?a:null:-1!==(a=Ge.call(this._minWeekdaysParse,o))||-1!==(a=Ge.call(this._weekdaysParse,o))||-1!==(a=Ge.call(this._shortWeekdaysParse,o))?a:null}function Wt(e,t,n){var i,a,r;if(this._weekdaysParseExact)return Gt.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(a=p([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(a,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(a,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(a,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(r="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[i]=new RegExp(r.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[i].test(e))return i;if(n&&"ddd"===t&&this._shortWeekdaysParse[i].test(e))return i;if(n&&"dd"===t&&this._minWeekdaysParse[i].test(e))return i;if(!n&&this._weekdaysParse[i].test(e))return i}}function jt(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=kt(e,this.localeData()),this.add(e-t,"d")):t}function Ut(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Zt(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Lt(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Xt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||$t.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=zt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function qt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||$t.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Bt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Kt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||$t.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Vt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function $t(){function e(e,t){return t.length-e.length}var t,n,i,a,r,o=[],s=[],l=[],u=[];for(t=0;t<7;t++)n=p([2e3,1]).day(t),i=Be(this.weekdaysMin(n,"")),a=Be(this.weekdaysShort(n,"")),r=Be(this.weekdays(n,"")),o.push(i),s.push(a),l.push(r),u.push(i),u.push(a),u.push(r);o.sort(e),s.sort(e),l.sort(e),u.sort(e),this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Qt(){return this.hours()%12||12}function Jt(){return this.hours()||24}function en(e,t){H(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function tn(e,t){return t._meridiemParse}function nn(e){return"p"===(e+"").toLowerCase().charAt(0)}H("H",["HH",2],0,"hour"),H("h",["hh",2],0,Qt),H("k",["kk",2],0,Jt),H("hmm",0,0,(function(){return""+Qt.apply(this)+P(this.minutes(),2)})),H("hmmss",0,0,(function(){return""+Qt.apply(this)+P(this.minutes(),2)+P(this.seconds(),2)})),H("Hmm",0,0,(function(){return""+this.hours()+P(this.minutes(),2)})),H("Hmmss",0,0,(function(){return""+this.hours()+P(this.minutes(),2)+P(this.seconds(),2)})),en("a",!0),en("A",!1),ne("hour","h"),se("hour",13),Pe("a",tn),Pe("A",tn),Pe("H",Se),Pe("h",Se),Pe("k",Se),Pe("HH",Se,_e),Pe("hh",Se,_e),Pe("kk",Se,_e),Pe("hmm",Me),Pe("hmmss",Te),Pe("Hmm",Me),Pe("Hmmss",Te),He(["H","HH"],Ze),He(["k","kk"],(function(e,t,n){var i=he(e);t[Ze]=24===i?0:i})),He(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),He(["h","hh"],(function(e,t,n){t[Ze]=he(e),m(n).bigHour=!0})),He("hmm",(function(e,t,n){var i=e.length-2;t[Ze]=he(e.substr(0,i)),t[Xe]=he(e.substr(i)),m(n).bigHour=!0})),He("hmmss",(function(e,t,n){var i=e.length-4,a=e.length-2;t[Ze]=he(e.substr(0,i)),t[Xe]=he(e.substr(i,2)),t[qe]=he(e.substr(a)),m(n).bigHour=!0})),He("Hmm",(function(e,t,n){var i=e.length-2;t[Ze]=he(e.substr(0,i)),t[Xe]=he(e.substr(i))})),He("Hmmss",(function(e,t,n){var i=e.length-4,a=e.length-2;t[Ze]=he(e.substr(0,i)),t[Xe]=he(e.substr(i,2)),t[qe]=he(e.substr(a))}));var an=/[ap]\.?m?\.?/i,rn=de("Hours",!0);function on(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var sn,ln={calendar:E,longDateFormat:j,invalidDate:Z,ordinal:q,dayOfMonthOrdinalParse:K,relativeTime:Q,months:tt,monthsShort:nt,week:It,weekdays:Nt,weekdaysMin:Rt,weekdaysShort:Pt,meridiemParse:an},un={},cn={};function hn(e,t){var n,i=Math.min(e.length,t.length);for(n=0;n<i;n+=1)if(e[n]!==t[n])return n;return i}function dn(e){return e?e.toLowerCase().replace("_","-"):e}function fn(e){for(var t,n,i,a,r=0;r<e.length;){for(t=(a=dn(e[r]).split("-")).length,n=(n=dn(e[r+1]))?n.split("-"):null;t>0;){if(i=pn(a.slice(0,t).join("-")))return i;if(n&&n.length>=t&&hn(a,n)>=t-1)break;t--}r++}return sn}function pn(t){var n=null;if(void 0===un[t]&&e&&e.exports)try{n=sn._abbr,ie("./locale/"+t),gn(n)}catch(e){un[t]=null}return un[t]}function gn(e,t){var n;return e&&((n=u(t)?yn(e):mn(e,t))?sn=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),sn._abbr}function mn(e,t){if(null!==t){var n,i=ln;if(t.abbr=e,null!=un[e])D("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=un[e]._config;else if(null!=t.parentLocale)if(null!=un[t.parentLocale])i=un[t.parentLocale]._config;else{if(null==(n=pn(t.parentLocale)))return cn[t.parentLocale]||(cn[t.parentLocale]=[]),cn[t.parentLocale].push({name:e,config:t}),null;i=n._config}return un[e]=new L(k(i,t)),cn[e]&&cn[e].forEach((function(e){mn(e.name,e.config)})),gn(e),un[e]}return delete un[e],null}function vn(e,t){if(null!=t){var n,i,a=ln;null!=un[e]&&null!=un[e].parentLocale?un[e].set(k(un[e]._config,t)):(null!=(i=pn(e))&&(a=i._config),t=k(a,t),null==i&&(t.abbr=e),(n=new L(t)).parentLocale=un[e],un[e]=n),gn(e)}else null!=un[e]&&(null!=un[e].parentLocale?(un[e]=un[e].parentLocale,e===gn()&&gn(e)):null!=un[e]&&delete un[e]);return un[e]}function yn(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return sn;if(!r(e)){if(t=pn(e))return t;e=[e]}return fn(e)}function _n(){return I(un)}function xn(e){var t,n=e._a;return n&&-2===m(e).overflow&&(t=n[je]<0||n[je]>11?je:n[Ue]<1||n[Ue]>et(n[We],n[je])?Ue:n[Ze]<0||n[Ze]>24||24===n[Ze]&&(0!==n[Xe]||0!==n[qe]||0!==n[Ke])?Ze:n[Xe]<0||n[Xe]>59?Xe:n[qe]<0||n[qe]>59?qe:n[Ke]<0||n[Ke]>999?Ke:-1,m(e)._overflowDayOfYear&&(t<We||t>Ue)&&(t=Ue),m(e)._overflowWeeks&&-1===t&&(t=$e),m(e)._overflowWeekday&&-1===t&&(t=Qe),m(e).overflow=t),e}var bn=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wn=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Sn=/Z|[+-]\d\d(?::?\d\d)?/,Mn=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Tn=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],In=/^\/?Date\((-?\d+)/i,An=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Dn={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Cn(e){var t,n,i,a,r,o,s=e._i,l=bn.exec(s)||wn.exec(s);if(l){for(m(e).iso=!0,t=0,n=Mn.length;t<n;t++)if(Mn[t][1].exec(l[1])){a=Mn[t][0],i=!1!==Mn[t][2];break}if(null==a)return void(e._isValid=!1);if(l[3]){for(t=0,n=Tn.length;t<n;t++)if(Tn[t][1].exec(l[3])){r=(l[2]||" ")+Tn[t][0];break}if(null==r)return void(e._isValid=!1)}if(!i&&null!=r)return void(e._isValid=!1);if(l[4]){if(!Sn.exec(l[4]))return void(e._isValid=!1);o="Z"}e._f=a+(r||"")+(o||""),Yn(e)}else e._isValid=!1}function On(e,t,n,i,a,r){var o=[kn(e),nt.indexOf(t),parseInt(n,10),parseInt(i,10),parseInt(a,10)];return r&&o.push(parseInt(r,10)),o}function kn(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Ln(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function En(e,t,n){return!e||Pt.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(m(n).weekdayMismatch=!0,n._isValid=!1,!1)}function Nn(e,t,n){if(e)return Dn[e];if(t)return 0;var i=parseInt(n,10),a=i%100;return(i-a)/100*60+a}function Pn(e){var t,n=An.exec(Ln(e._i));if(n){if(t=On(n[4],n[3],n[2],n[5],n[6],n[7]),!En(n[1],t,e))return;e._a=t,e._tzm=Nn(n[8],n[9],n[10]),e._d=xt.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),m(e).rfc2822=!0}else e._isValid=!1}function Rn(e){var t=In.exec(e._i);null===t?(Cn(e),!1===e._isValid&&(delete e._isValid,Pn(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:i.createFromInputFallback(e)))):e._d=new Date(+t[1])}function zn(e,t,n){return null!=e?e:null!=t?t:n}function Bn(e){var t=new Date(i.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Vn(e){var t,n,i,a,r,o=[];if(!e._d){for(i=Bn(e),e._w&&null==e._a[Ue]&&null==e._a[je]&&Hn(e),null!=e._dayOfYear&&(r=zn(e._a[We],i[We]),(e._dayOfYear>mt(r)||0===e._dayOfYear)&&(m(e)._overflowDayOfYear=!0),n=xt(r,0,e._dayOfYear),e._a[je]=n.getUTCMonth(),e._a[Ue]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=o[t]=i[t];for(;t<7;t++)e._a[t]=o[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Ze]&&0===e._a[Xe]&&0===e._a[qe]&&0===e._a[Ke]&&(e._nextDay=!0,e._a[Ze]=0),e._d=(e._useUTC?xt:_t).apply(null,o),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ze]=24),e._w&&void 0!==e._w.d&&e._w.d!==a&&(m(e).weekdayMismatch=!0)}}function Hn(e){var t,n,i,a,r,o,s,l,u;null!=(t=e._w).GG||null!=t.W||null!=t.E?(r=1,o=4,n=zn(t.GG,e._a[We],St(qn(),1,4).year),i=zn(t.W,1),((a=zn(t.E,1))<1||a>7)&&(l=!0)):(r=e._locale._week.dow,o=e._locale._week.doy,u=St(qn(),r,o),n=zn(t.gg,e._a[We],u.year),i=zn(t.w,u.week),null!=t.d?((a=t.d)<0||a>6)&&(l=!0):null!=t.e?(a=t.e+r,(t.e<0||t.e>6)&&(l=!0)):a=r),i<1||i>Mt(n,r,o)?m(e)._overflowWeeks=!0:null!=l?m(e)._overflowWeekday=!0:(s=wt(n,i,a,r,o),e._a[We]=s.year,e._dayOfYear=s.dayOfYear)}function Yn(e){if(e._f!==i.ISO_8601)if(e._f!==i.RFC_2822){e._a=[],m(e).empty=!0;var t,n,a,r,o,s,l=""+e._i,u=l.length,c=0;for(a=W(e._f,e._locale).match(R)||[],t=0;t<a.length;t++)r=a[t],(n=(l.match(Re(r,e))||[])[0])&&((o=l.substr(0,l.indexOf(n))).length>0&&m(e).unusedInput.push(o),l=l.slice(l.indexOf(n)+n.length),c+=n.length),V[r]?(n?m(e).empty=!1:m(e).unusedTokens.push(r),Fe(r,n,e)):e._strict&&!n&&m(e).unusedTokens.push(r);m(e).charsLeftOver=u-c,l.length>0&&m(e).unusedInput.push(l),e._a[Ze]<=12&&!0===m(e).bigHour&&e._a[Ze]>0&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[Ze]=Fn(e._locale,e._a[Ze],e._meridiem),null!==(s=m(e).era)&&(e._a[We]=e._locale.erasConvertYear(s,e._a[We])),Vn(e),xn(e)}else Pn(e);else Cn(e)}function Fn(e,t,n){var i;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((i=e.isPM(n))&&t<12&&(t+=12),i||12!==t||(t=0),t):t}function Gn(e){var t,n,i,a,r,o,s=!1;if(0===e._f.length)return m(e).invalidFormat=!0,void(e._d=new Date(NaN));for(a=0;a<e._f.length;a++)r=0,o=!1,t=b({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[a],Yn(t),v(t)&&(o=!0),r+=m(t).charsLeftOver,r+=10*m(t).unusedTokens.length,m(t).score=r,s?r<i&&(i=r,n=t):(null==i||r<i||o)&&(i=r,n=t,o&&(s=!0));f(e,n||t)}function Wn(e){if(!e._d){var t=re(e._i),n=void 0===t.day?t.date:t.day;e._a=d([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),Vn(e)}}function jn(e){var t=new w(xn(Un(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Un(e){var t=e._i,n=e._f;return e._locale=e._locale||yn(e._l),null===t||void 0===n&&""===t?y({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),S(t)?new w(xn(t)):(h(t)?e._d=t:r(n)?Gn(e):n?Yn(e):Zn(e),v(e)||(e._d=null),e))}function Zn(e){var t=e._i;u(t)?e._d=new Date(i.now()):h(t)?e._d=new Date(t.valueOf()):"string"==typeof t?Rn(e):r(t)?(e._a=d(t.slice(0),(function(e){return parseInt(e,10)})),Vn(e)):o(t)?Wn(e):c(t)?e._d=new Date(t):i.createFromInputFallback(e)}function Xn(e,t,n,i,a){var s={};return!0!==t&&!1!==t||(i=t,t=void 0),!0!==n&&!1!==n||(i=n,n=void 0),(o(e)&&l(e)||r(e)&&0===e.length)&&(e=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=a,s._l=n,s._i=e,s._f=t,s._strict=i,jn(s)}function qn(e,t,n,i){return Xn(e,t,n,i,!1)}i.createFromInputFallback=T("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),i.ISO_8601=function(){},i.RFC_2822=function(){};var Kn=T("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=qn.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:y()})),$n=T("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=qn.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:y()}));function Qn(e,t){var n,i;if(1===t.length&&r(t[0])&&(t=t[0]),!t.length)return qn();for(n=t[0],i=1;i<t.length;++i)t[i].isValid()&&!t[i][e](n)||(n=t[i]);return n}function Jn(){return Qn("isBefore",[].slice.call(arguments,0))}function ei(){return Qn("isAfter",[].slice.call(arguments,0))}var ti=function(){return Date.now?Date.now():+new Date},ni=["year","quarter","month","week","day","hour","minute","second","millisecond"];function ii(e){var t,n,i=!1;for(t in e)if(s(e,t)&&(-1===Ge.call(ni,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<ni.length;++n)if(e[ni[n]]){if(i)return!1;parseFloat(e[ni[n]])!==he(e[ni[n]])&&(i=!0)}return!0}function ai(){return this._isValid}function ri(){return Di(NaN)}function oi(e){var t=re(e),n=t.year||0,i=t.quarter||0,a=t.month||0,r=t.week||t.isoWeek||0,o=t.day||0,s=t.hour||0,l=t.minute||0,u=t.second||0,c=t.millisecond||0;this._isValid=ii(t),this._milliseconds=+c+1e3*u+6e4*l+1e3*s*60*60,this._days=+o+7*r,this._months=+a+3*i+12*n,this._data={},this._locale=yn(),this._bubble()}function si(e){return e instanceof oi}function li(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function ui(e,t,n){var i,a=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),o=0;for(i=0;i<a;i++)(n&&e[i]!==t[i]||!n&&he(e[i])!==he(t[i]))&&o++;return o+r}function ci(e,t){H(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+P(~~(e/60),2)+t+P(~~e%60,2)}))}ci("Z",":"),ci("ZZ",""),Pe("Z",Le),Pe("ZZ",Le),He(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=di(Le,e)}));var hi=/([\+\-]|\d\d)/gi;function di(e,t){var n,i,a=(t||"").match(e);return null===a?null:0===(i=60*(n=((a[a.length-1]||[])+"").match(hi)||["-",0,0])[1]+he(n[2]))?0:"+"===n[0]?i:-i}function fi(e,t){var n,a;return t._isUTC?(n=t.clone(),a=(S(e)||h(e)?e.valueOf():qn(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+a),i.updateOffset(n,!1),n):qn(e).local()}function pi(e){return-Math.round(e._d.getTimezoneOffset())}function gi(e,t,n){var a,r=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=di(Le,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(a=pi(this)),this._offset=e,this._isUTC=!0,null!=a&&this.add(a,"m"),r!==e&&(!t||this._changeInProgress?Ei(this,Di(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?r:pi(this)}function mi(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function vi(e){return this.utcOffset(0,e)}function yi(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(pi(this),"m")),this}function _i(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=di(ke,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function xi(e){return!!this.isValid()&&(e=e?qn(e).utcOffset():0,(this.utcOffset()-e)%60==0)}function bi(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function wi(){if(!u(this._isDSTShifted))return this._isDSTShifted;var e,t={};return b(t,this),(t=Un(t))._a?(e=t._isUTC?p(t._a):qn(t._a),this._isDSTShifted=this.isValid()&&ui(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Si(){return!!this.isValid()&&!this._isUTC}function Mi(){return!!this.isValid()&&this._isUTC}function Ti(){return!!this.isValid()&&this._isUTC&&0===this._offset}i.updateOffset=function(){};var Ii=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Ai=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Di(e,t){var n,i,a,r=e,o=null;return si(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:c(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(o=Ii.exec(e))?(n="-"===o[1]?-1:1,r={y:0,d:he(o[Ue])*n,h:he(o[Ze])*n,m:he(o[Xe])*n,s:he(o[qe])*n,ms:he(li(1e3*o[Ke]))*n}):(o=Ai.exec(e))?(n="-"===o[1]?-1:1,r={y:Ci(o[2],n),M:Ci(o[3],n),w:Ci(o[4],n),d:Ci(o[5],n),h:Ci(o[6],n),m:Ci(o[7],n),s:Ci(o[8],n)}):null==r?r={}:"object"==typeof r&&("from"in r||"to"in r)&&(a=ki(qn(r.from),qn(r.to)),(r={}).ms=a.milliseconds,r.M=a.months),i=new oi(r),si(e)&&s(e,"_locale")&&(i._locale=e._locale),si(e)&&s(e,"_isValid")&&(i._isValid=e._isValid),i}function Ci(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Oi(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function ki(e,t){var n;return e.isValid()&&t.isValid()?(t=fi(t,e),e.isBefore(t)?n=Oi(e,t):((n=Oi(t,e)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Li(e,t){return function(n,i){var a;return null===i||isNaN(+i)||(D(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=n,n=i,i=a),Ei(this,Di(n,i),e),this}}function Ei(e,t,n,a){var r=t._milliseconds,o=li(t._days),s=li(t._months);e.isValid()&&(a=null==a||a,s&&ct(e,fe(e,"Month")+s*n),o&&pe(e,"Date",fe(e,"Date")+o*n),r&&e._d.setTime(e._d.valueOf()+r*n),a&&i.updateOffset(e,o||s))}Di.fn=oi.prototype,Di.invalid=ri;var Ni=Li(1,"add"),Pi=Li(-1,"subtract");function Ri(e){return"string"==typeof e||e instanceof String}function zi(e){return S(e)||h(e)||Ri(e)||c(e)||Vi(e)||Bi(e)||null==e}function Bi(e){var t,n,i=o(e)&&!l(e),a=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"];for(t=0;t<r.length;t+=1)n=r[t],a=a||s(e,n);return i&&a}function Vi(e){var t=r(e),n=!1;return t&&(n=0===e.filter((function(t){return!c(t)&&Ri(e)})).length),t&&n}function Hi(e){var t,n,i=o(e)&&!l(e),a=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<r.length;t+=1)n=r[t],a=a||s(e,n);return i&&a}function Yi(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function Fi(e,t){1===arguments.length&&(arguments[0]?zi(arguments[0])?(e=arguments[0],t=void 0):Hi(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||qn(),a=fi(n,this).startOf("day"),r=i.calendarFormat(this,a)||"sameElse",o=t&&(C(t[r])?t[r].call(this,n):t[r]);return this.format(o||this.localeData().calendar(r,this,qn(n)))}function Gi(){return new w(this)}function Wi(e,t){var n=S(e)?e:qn(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=ae(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())}function ji(e,t){var n=S(e)?e:qn(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=ae(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())}function Ui(e,t,n,i){var a=S(e)?e:qn(e),r=S(t)?t:qn(t);return!!(this.isValid()&&a.isValid()&&r.isValid())&&("("===(i=i||"()")[0]?this.isAfter(a,n):!this.isBefore(a,n))&&(")"===i[1]?this.isBefore(r,n):!this.isAfter(r,n))}function Zi(e,t){var n,i=S(e)?e:qn(e);return!(!this.isValid()||!i.isValid())&&("millisecond"===(t=ae(t)||"millisecond")?this.valueOf()===i.valueOf():(n=i.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))}function Xi(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function qi(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Ki(e,t,n){var i,a,r;if(!this.isValid())return NaN;if(!(i=fi(e,this)).isValid())return NaN;switch(a=6e4*(i.utcOffset()-this.utcOffset()),t=ae(t)){case"year":r=$i(this,i)/12;break;case"month":r=$i(this,i);break;case"quarter":r=$i(this,i)/3;break;case"second":r=(this-i)/1e3;break;case"minute":r=(this-i)/6e4;break;case"hour":r=(this-i)/36e5;break;case"day":r=(this-i-a)/864e5;break;case"week":r=(this-i-a)/6048e5;break;default:r=this-i}return n?r:ce(r)}function $i(e,t){if(e.date()<t.date())return-$i(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),i=e.clone().add(n,"months");return-(n+(t-i<0?(t-i)/(i-e.clone().add(n-1,"months")):(t-i)/(e.clone().add(n+1,"months")-i)))||0}function Qi(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Ji(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?G(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):C(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",G(n,"Z")):G(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function ea(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,i,a="moment",r="";return this.isLocal()||(a=0===this.utcOffset()?"moment.utc":"moment.parseZone",r="Z"),e="["+a+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",i=r+'[")]',this.format(e+t+n+i)}function ta(e){e||(e=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var t=G(this,e);return this.localeData().postformat(t)}function na(e,t){return this.isValid()&&(S(e)&&e.isValid()||qn(e).isValid())?Di({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ia(e){return this.from(qn(),e)}function aa(e,t){return this.isValid()&&(S(e)&&e.isValid()||qn(e).isValid())?Di({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ra(e){return this.to(qn(),e)}function oa(e){var t;return void 0===e?this._locale._abbr:(null!=(t=yn(e))&&(this._locale=t),this)}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var sa=T("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function la(){return this._locale}var ua=1e3,ca=60*ua,ha=60*ca,da=3506328*ha;function fa(e,t){return(e%t+t)%t}function pa(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-da:new Date(e,t,n).valueOf()}function ga(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-da:Date.UTC(e,t,n)}function ma(e){var t,n;if(void 0===(e=ae(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?ga:pa,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=fa(t+(this._isUTC?0:this.utcOffset()*ca),ha);break;case"minute":t=this._d.valueOf(),t-=fa(t,ca);break;case"second":t=this._d.valueOf(),t-=fa(t,ua)}return this._d.setTime(t),i.updateOffset(this,!0),this}function va(e){var t,n;if(void 0===(e=ae(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?ga:pa,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=ha-fa(t+(this._isUTC?0:this.utcOffset()*ca),ha)-1;break;case"minute":t=this._d.valueOf(),t+=ca-fa(t,ca)-1;break;case"second":t=this._d.valueOf(),t+=ua-fa(t,ua)-1}return this._d.setTime(t),i.updateOffset(this,!0),this}function ya(){return this._d.valueOf()-6e4*(this._offset||0)}function _a(){return Math.floor(this.valueOf()/1e3)}function xa(){return new Date(this.valueOf())}function ba(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function wa(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Sa(){return this.isValid()?this.toISOString():null}function Ma(){return v(this)}function Ta(){return f({},m(this))}function Ia(){return m(this).overflow}function Aa(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Da(e,t){var n,a,r,o=this._eras||yn("en")._eras;for(n=0,a=o.length;n<a;++n)switch("string"==typeof o[n].since&&(r=i(o[n].since).startOf("day"),o[n].since=r.valueOf()),typeof o[n].until){case"undefined":o[n].until=1/0;break;case"string":r=i(o[n].until).startOf("day").valueOf(),o[n].until=r.valueOf()}return o}function Ca(e,t,n){var i,a,r,o,s,l=this.eras();for(e=e.toUpperCase(),i=0,a=l.length;i<a;++i)if(r=l[i].name.toUpperCase(),o=l[i].abbr.toUpperCase(),s=l[i].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(o===e)return l[i];break;case"NNNN":if(r===e)return l[i];break;case"NNNNN":if(s===e)return l[i]}else if([r,o,s].indexOf(e)>=0)return l[i]}function Oa(e,t){var n=e.since<=e.until?1:-1;return void 0===t?i(e.since).year():i(e.since).year()+(t-e.offset)*n}function ka(){var e,t,n,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),i[e].since<=n&&n<=i[e].until)return i[e].name;if(i[e].until<=n&&n<=i[e].since)return i[e].name}return""}function La(){var e,t,n,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),i[e].since<=n&&n<=i[e].until)return i[e].narrow;if(i[e].until<=n&&n<=i[e].since)return i[e].narrow}return""}function Ea(){var e,t,n,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),i[e].since<=n&&n<=i[e].until)return i[e].abbr;if(i[e].until<=n&&n<=i[e].since)return i[e].abbr}return""}function Na(){var e,t,n,a,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=r[e].since<=r[e].until?1:-1,a=this.clone().startOf("day").valueOf(),r[e].since<=a&&a<=r[e].until||r[e].until<=a&&a<=r[e].since)return(this.year()-i(r[e].since).year())*n+r[e].offset;return this.year()}function Pa(e){return s(this,"_erasNameRegex")||Fa.call(this),e?this._erasNameRegex:this._erasRegex}function Ra(e){return s(this,"_erasAbbrRegex")||Fa.call(this),e?this._erasAbbrRegex:this._erasRegex}function za(e){return s(this,"_erasNarrowRegex")||Fa.call(this),e?this._erasNarrowRegex:this._erasRegex}function Ba(e,t){return t.erasAbbrRegex(e)}function Va(e,t){return t.erasNameRegex(e)}function Ha(e,t){return t.erasNarrowRegex(e)}function Ya(e,t){return t._eraYearOrdinalRegex||Ce}function Fa(){var e,t,n=[],i=[],a=[],r=[],o=this.eras();for(e=0,t=o.length;e<t;++e)i.push(Be(o[e].name)),n.push(Be(o[e].abbr)),a.push(Be(o[e].narrow)),r.push(Be(o[e].name)),r.push(Be(o[e].abbr)),r.push(Be(o[e].narrow));this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+i.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+a.join("|")+")","i")}function Ga(e,t){H(0,[e,e.length],0,t)}function Wa(e){return Ka.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function ja(e){return Ka.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Ua(){return Mt(this.year(),1,4)}function Za(){return Mt(this.isoWeekYear(),1,4)}function Xa(){var e=this.localeData()._week;return Mt(this.year(),e.dow,e.doy)}function qa(){var e=this.localeData()._week;return Mt(this.weekYear(),e.dow,e.doy)}function Ka(e,t,n,i,a){var r;return null==e?St(this,i,a).year:(t>(r=Mt(e,i,a))&&(t=r),$a.call(this,e,t,n,i,a))}function $a(e,t,n,i,a){var r=wt(e,t,n,i,a),o=xt(r.year,0,r.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}function Qa(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}H("N",0,0,"eraAbbr"),H("NN",0,0,"eraAbbr"),H("NNN",0,0,"eraAbbr"),H("NNNN",0,0,"eraName"),H("NNNNN",0,0,"eraNarrow"),H("y",["y",1],"yo","eraYear"),H("y",["yy",2],0,"eraYear"),H("y",["yyy",3],0,"eraYear"),H("y",["yyyy",4],0,"eraYear"),Pe("N",Ba),Pe("NN",Ba),Pe("NNN",Ba),Pe("NNNN",Va),Pe("NNNNN",Ha),He(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,i){var a=n._locale.erasParse(e,i,n._strict);a?m(n).era=a:m(n).invalidEra=e})),Pe("y",Ce),Pe("yy",Ce),Pe("yyy",Ce),Pe("yyyy",Ce),Pe("yo",Ya),He(["y","yy","yyy","yyyy"],We),He(["yo"],(function(e,t,n,i){var a;n._locale._eraYearOrdinalRegex&&(a=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[We]=n._locale.eraYearOrdinalParse(e,a):t[We]=parseInt(e,10)})),H(0,["gg",2],0,(function(){return this.weekYear()%100})),H(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Ga("gggg","weekYear"),Ga("ggggg","weekYear"),Ga("GGGG","isoWeekYear"),Ga("GGGGG","isoWeekYear"),ne("weekYear","gg"),ne("isoWeekYear","GG"),se("weekYear",1),se("isoWeekYear",1),Pe("G",Oe),Pe("g",Oe),Pe("GG",Se,_e),Pe("gg",Se,_e),Pe("GGGG",Ae,be),Pe("gggg",Ae,be),Pe("GGGGG",De,we),Pe("ggggg",De,we),Ye(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,i){t[i.substr(0,2)]=he(e)})),Ye(["gg","GG"],(function(e,t,n,a){t[a]=i.parseTwoDigitYear(e)})),H("Q",0,"Qo","quarter"),ne("quarter","Q"),se("quarter",7),Pe("Q",ye),He("Q",(function(e,t){t[je]=3*(he(e)-1)})),H("D",["DD",2],"Do","date"),ne("date","D"),se("date",9),Pe("D",Se),Pe("DD",Se,_e),Pe("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),He(["D","DD"],Ue),He("Do",(function(e,t){t[Ue]=he(e.match(Se)[0])}));var Ja=de("Date",!0);function er(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}H("DDD",["DDDD",3],"DDDo","dayOfYear"),ne("dayOfYear","DDD"),se("dayOfYear",4),Pe("DDD",Ie),Pe("DDDD",xe),He(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=he(e)})),H("m",["mm",2],0,"minute"),ne("minute","m"),se("minute",14),Pe("m",Se),Pe("mm",Se,_e),He(["m","mm"],Xe);var tr=de("Minutes",!1);H("s",["ss",2],0,"second"),ne("second","s"),se("second",15),Pe("s",Se),Pe("ss",Se,_e),He(["s","ss"],qe);var nr,ir,ar=de("Seconds",!1);for(H("S",0,0,(function(){return~~(this.millisecond()/100)})),H(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),H(0,["SSS",3],0,"millisecond"),H(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),H(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),H(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),H(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),H(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),H(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),ne("millisecond","ms"),se("millisecond",16),Pe("S",Ie,ye),Pe("SS",Ie,_e),Pe("SSS",Ie,xe),nr="SSSS";nr.length<=9;nr+="S")Pe(nr,Ce);function rr(e,t){t[Ke]=he(1e3*("0."+e))}for(nr="S";nr.length<=9;nr+="S")He(nr,rr);function or(){return this._isUTC?"UTC":""}function sr(){return this._isUTC?"Coordinated Universal Time":""}ir=de("Milliseconds",!1),H("z",0,0,"zoneAbbr"),H("zz",0,0,"zoneName");var lr=w.prototype;function ur(e){return qn(1e3*e)}function cr(){return qn.apply(null,arguments).parseZone()}function hr(e){return e}lr.add=Ni,lr.calendar=Fi,lr.clone=Gi,lr.diff=Ki,lr.endOf=va,lr.format=ta,lr.from=na,lr.fromNow=ia,lr.to=aa,lr.toNow=ra,lr.get=ge,lr.invalidAt=Ia,lr.isAfter=Wi,lr.isBefore=ji,lr.isBetween=Ui,lr.isSame=Zi,lr.isSameOrAfter=Xi,lr.isSameOrBefore=qi,lr.isValid=Ma,lr.lang=sa,lr.locale=oa,lr.localeData=la,lr.max=$n,lr.min=Kn,lr.parsingFlags=Ta,lr.set=me,lr.startOf=ma,lr.subtract=Pi,lr.toArray=ba,lr.toObject=wa,lr.toDate=xa,lr.toISOString=Ji,lr.inspect=ea,"undefined"!=typeof Symbol&&null!=Symbol.for&&(lr[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),lr.toJSON=Sa,lr.toString=Qi,lr.unix=_a,lr.valueOf=ya,lr.creationData=Aa,lr.eraName=ka,lr.eraNarrow=La,lr.eraAbbr=Ea,lr.eraYear=Na,lr.year=vt,lr.isLeapYear=yt,lr.weekYear=Wa,lr.isoWeekYear=ja,lr.quarter=lr.quarters=Qa,lr.month=ht,lr.daysInMonth=dt,lr.week=lr.weeks=Ct,lr.isoWeek=lr.isoWeeks=Ot,lr.weeksInYear=Xa,lr.weeksInWeekYear=qa,lr.isoWeeksInYear=Ua,lr.isoWeeksInISOWeekYear=Za,lr.date=Ja,lr.day=lr.days=jt,lr.weekday=Ut,lr.isoWeekday=Zt,lr.dayOfYear=er,lr.hour=lr.hours=rn,lr.minute=lr.minutes=tr,lr.second=lr.seconds=ar,lr.millisecond=lr.milliseconds=ir,lr.utcOffset=gi,lr.utc=vi,lr.local=yi,lr.parseZone=_i,lr.hasAlignedHourOffset=xi,lr.isDST=bi,lr.isLocal=Si,lr.isUtcOffset=Mi,lr.isUtc=Ti,lr.isUTC=Ti,lr.zoneAbbr=or,lr.zoneName=sr,lr.dates=T("dates accessor is deprecated. Use date instead.",Ja),lr.months=T("months accessor is deprecated. Use month instead",ht),lr.years=T("years accessor is deprecated. Use year instead",vt),lr.zone=T("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",mi),lr.isDSTShifted=T("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",wi);var dr=L.prototype;function fr(e,t,n,i){var a=yn(),r=p().set(i,t);return a[n](r,e)}function pr(e,t,n){if(c(e)&&(t=e,e=void 0),e=e||"",null!=t)return fr(e,t,n,"month");var i,a=[];for(i=0;i<12;i++)a[i]=fr(e,i,n,"month");return a}function gr(e,t,n,i){"boolean"==typeof e?(c(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,c(t)&&(n=t,t=void 0),t=t||"");var a,r=yn(),o=e?r._week.dow:0,s=[];if(null!=n)return fr(t,(n+o)%7,i,"day");for(a=0;a<7;a++)s[a]=fr(t,(a+o)%7,i,"day");return s}function mr(e,t){return pr(e,t,"months")}function vr(e,t){return pr(e,t,"monthsShort")}function yr(e,t,n){return gr(e,t,n,"weekdays")}function _r(e,t,n){return gr(e,t,n,"weekdaysShort")}function xr(e,t,n){return gr(e,t,n,"weekdaysMin")}dr.calendar=N,dr.longDateFormat=U,dr.invalidDate=X,dr.ordinal=$,dr.preparse=hr,dr.postformat=hr,dr.relativeTime=J,dr.pastFuture=ee,dr.set=O,dr.eras=Da,dr.erasParse=Ca,dr.erasConvertYear=Oa,dr.erasAbbrRegex=Ra,dr.erasNameRegex=Pa,dr.erasNarrowRegex=za,dr.months=ot,dr.monthsShort=st,dr.monthsParse=ut,dr.monthsRegex=pt,dr.monthsShortRegex=ft,dr.week=Tt,dr.firstDayOfYear=Dt,dr.firstDayOfWeek=At,dr.weekdays=Ht,dr.weekdaysMin=Ft,dr.weekdaysShort=Yt,dr.weekdaysParse=Wt,dr.weekdaysRegex=Xt,dr.weekdaysShortRegex=qt,dr.weekdaysMinRegex=Kt,dr.isPM=nn,dr.meridiem=on,gn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===he(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),i.lang=T("moment.lang is deprecated. Use moment.locale instead.",gn),i.langData=T("moment.langData is deprecated. Use moment.localeData instead.",yn);var br=Math.abs;function wr(){var e=this._data;return this._milliseconds=br(this._milliseconds),this._days=br(this._days),this._months=br(this._months),e.milliseconds=br(e.milliseconds),e.seconds=br(e.seconds),e.minutes=br(e.minutes),e.hours=br(e.hours),e.months=br(e.months),e.years=br(e.years),this}function Sr(e,t,n,i){var a=Di(t,n);return e._milliseconds+=i*a._milliseconds,e._days+=i*a._days,e._months+=i*a._months,e._bubble()}function Mr(e,t){return Sr(this,e,t,1)}function Tr(e,t){return Sr(this,e,t,-1)}function Ir(e){return e<0?Math.floor(e):Math.ceil(e)}function Ar(){var e,t,n,i,a,r=this._milliseconds,o=this._days,s=this._months,l=this._data;return r>=0&&o>=0&&s>=0||r<=0&&o<=0&&s<=0||(r+=864e5*Ir(Cr(s)+o),o=0,s=0),l.milliseconds=r%1e3,e=ce(r/1e3),l.seconds=e%60,t=ce(e/60),l.minutes=t%60,n=ce(t/60),l.hours=n%24,o+=ce(n/24),s+=a=ce(Dr(o)),o-=Ir(Cr(a)),i=ce(s/12),s%=12,l.days=o,l.months=s,l.years=i,this}function Dr(e){return 4800*e/146097}function Cr(e){return 146097*e/4800}function Or(e){if(!this.isValid())return NaN;var t,n,i=this._milliseconds;if("month"===(e=ae(e))||"quarter"===e||"year"===e)switch(t=this._days+i/864e5,n=this._months+Dr(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Cr(this._months)),e){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return 24*t+i/36e5;case"minute":return 1440*t+i/6e4;case"second":return 86400*t+i/1e3;case"millisecond":return Math.floor(864e5*t)+i;default:throw new Error("Unknown unit "+e)}}function kr(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*he(this._months/12):NaN}function Lr(e){return function(){return this.as(e)}}var Er=Lr("ms"),Nr=Lr("s"),Pr=Lr("m"),Rr=Lr("h"),zr=Lr("d"),Br=Lr("w"),Vr=Lr("M"),Hr=Lr("Q"),Yr=Lr("y");function Fr(){return Di(this)}function Gr(e){return e=ae(e),this.isValid()?this[e+"s"]():NaN}function Wr(e){return function(){return this.isValid()?this._data[e]:NaN}}var jr=Wr("milliseconds"),Ur=Wr("seconds"),Zr=Wr("minutes"),Xr=Wr("hours"),qr=Wr("days"),Kr=Wr("months"),$r=Wr("years");function Qr(){return ce(this.days()/7)}var Jr=Math.round,eo={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function to(e,t,n,i,a){return a.relativeTime(t||1,!!n,e,i)}function no(e,t,n,i){var a=Di(e).abs(),r=Jr(a.as("s")),o=Jr(a.as("m")),s=Jr(a.as("h")),l=Jr(a.as("d")),u=Jr(a.as("M")),c=Jr(a.as("w")),h=Jr(a.as("y")),d=r<=n.ss&&["s",r]||r<n.s&&["ss",r]||o<=1&&["m"]||o<n.m&&["mm",o]||s<=1&&["h"]||s<n.h&&["hh",s]||l<=1&&["d"]||l<n.d&&["dd",l];return null!=n.w&&(d=d||c<=1&&["w"]||c<n.w&&["ww",c]),(d=d||u<=1&&["M"]||u<n.M&&["MM",u]||h<=1&&["y"]||["yy",h])[2]=t,d[3]=+e>0,d[4]=i,to.apply(null,d)}function io(e){return void 0===e?Jr:"function"==typeof e&&(Jr=e,!0)}function ao(e,t){return void 0!==eo[e]&&(void 0===t?eo[e]:(eo[e]=t,"s"===e&&(eo.ss=t-1),!0))}function ro(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,i,a=!1,r=eo;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(a=e),"object"==typeof t&&(r=Object.assign({},eo,t),null!=t.s&&null==t.ss&&(r.ss=t.s-1)),i=no(this,!a,r,n=this.localeData()),a&&(i=n.pastFuture(+this,i)),n.postformat(i)}var oo=Math.abs;function so(e){return(e>0)-(e<0)||+e}function lo(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,i,a,r,o,s,l=oo(this._milliseconds)/1e3,u=oo(this._days),c=oo(this._months),h=this.asSeconds();return h?(e=ce(l/60),t=ce(e/60),l%=60,e%=60,n=ce(c/12),c%=12,i=l?l.toFixed(3).replace(/\.?0+$/,""):"",a=h<0?"-":"",r=so(this._months)!==so(h)?"-":"",o=so(this._days)!==so(h)?"-":"",s=so(this._milliseconds)!==so(h)?"-":"",a+"P"+(n?r+n+"Y":"")+(c?r+c+"M":"")+(u?o+u+"D":"")+(t||e||l?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(l?s+i+"S":"")):"P0D"}var uo=oi.prototype;return uo.isValid=ai,uo.abs=wr,uo.add=Mr,uo.subtract=Tr,uo.as=Or,uo.asMilliseconds=Er,uo.asSeconds=Nr,uo.asMinutes=Pr,uo.asHours=Rr,uo.asDays=zr,uo.asWeeks=Br,uo.asMonths=Vr,uo.asQuarters=Hr,uo.asYears=Yr,uo.valueOf=kr,uo._bubble=Ar,uo.clone=Fr,uo.get=Gr,uo.milliseconds=jr,uo.seconds=Ur,uo.minutes=Zr,uo.hours=Xr,uo.days=qr,uo.weeks=Qr,uo.months=Kr,uo.years=$r,uo.humanize=ro,uo.toISOString=lo,uo.toString=lo,uo.toJSON=lo,uo.locale=oa,uo.localeData=la,uo.toIsoString=T("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",lo),uo.lang=sa,H("X",0,0,"unix"),H("x",0,0,"valueOf"),Pe("x",Oe),Pe("X",Ee),He("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),He("x",(function(e,t,n){n._d=new Date(he(e))})),
//! moment.js
i.version="2.29.1",a(qn),i.fn=lr,i.min=Jn,i.max=ei,i.now=ti,i.utc=p,i.unix=ur,i.months=mr,i.isDate=h,i.locale=gn,i.invalid=y,i.duration=Di,i.isMoment=S,i.weekdays=yr,i.parseZone=cr,i.localeData=yn,i.isDuration=si,i.monthsShort=vr,i.weekdaysMin=xr,i.defineLocale=mn,i.updateLocale=vn,i.locales=_n,i.weekdaysShort=_r,i.normalizeUnits=ae,i.relativeTimeRounding=io,i.relativeTimeThreshold=ao,i.calendarFormat=Yi,i.prototype=lr,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},i}()}));!function(e){e.CONTAIN="contain",e.NOT_CONTAIN="not-contain",e.STARTWITH="startwidth",e.NOT_STARTWITH="not_startwith",e.ENDWITH="endwith",e.NOT_ENDWITH="not_endwith",e.EQUAL="equal",e.NOT_EQUAL="not_equal",e.NULL_STR="null_str",e.NOT_NULL_STR="not_null_str",e.NULL="null",e.NOT_NULL="not_null"}(hW||(hW={})),Object.freeze({[hW.CONTAIN]:Object.freeze({key:hW.CONTAIN,name:"包含"}),[hW.NOT_CONTAIN]:Object.freeze({key:hW.NOT_CONTAIN,name:"不包含"}),[hW.STARTWITH]:Object.freeze({key:hW.STARTWITH,name:"开头是"}),[hW.NOT_STARTWITH]:Object.freeze({key:hW.NOT_STARTWITH,name:"开头不是"}),[hW.ENDWITH]:Object.freeze({key:hW.ENDWITH,name:"结尾是"}),[hW.NOT_ENDWITH]:Object.freeze({key:hW.NOT_ENDWITH,name:"结尾不是"}),[hW.EQUAL]:Object.freeze({key:hW.EQUAL,name:"等于"}),[hW.NOT_EQUAL]:Object.freeze({key:hW.NOT_EQUAL,name:"不等于"}),[hW.NULL_STR]:Object.freeze({key:hW.NULL_STR,name:"内容为空"}),[hW.NOT_NULL_STR]:Object.freeze({key:hW.NOT_NULL_STR,name:"内容非空"}),[hW.NULL]:Object.freeze({key:hW.NULL,name:"为NULL"}),[hW.NOT_NULL]:Object.freeze({key:hW.NOT_NULL,name:"不为NULL"})}),function(e){e.EQUAL="equal",e.NOT_EQUAL="not_equal",e.GREAT_THAN="great_than",e.GREAT_EQUAL="great_equal",e.LESS_THAN="less_than",e.LESS_EQUAL="less_equal",e.NULL="null",e.NOT_NULL="not_null"}(dW||(dW={})),Object.freeze({[dW.EQUAL]:Object.freeze({key:dW.EQUAL,name:"等于"}),[dW.NOT_EQUAL]:Object.freeze({key:dW.NOT_EQUAL,name:"不等于"}),[dW.GREAT_THAN]:Object.freeze({key:dW.GREAT_THAN,name:"大于"}),[dW.GREAT_EQUAL]:Object.freeze({key:dW.GREAT_EQUAL,name:"大于等于"}),[dW.LESS_THAN]:Object.freeze({key:dW.LESS_THAN,name:"小于"}),[dW.LESS_EQUAL]:Object.freeze({key:dW.LESS_EQUAL,name:"小于等于"}),[dW.NULL]:Object.freeze({key:dW.NULL,name:"为NULL"}),[dW.NOT_NULL]:Object.freeze({key:dW.NOT_NULL,name:"不为NULL"})}),function(e){e.YEAR="year",e.MONTH="month",e.DAY="day",e.TIME="time"}(fW||(fW={}));const gW=Object.freeze({[fW.YEAR]:Object.freeze({key:fW.YEAR,name:"年",sqltype:"time-only_year",sqldformat:"only_year"}),[fW.MONTH]:Object.freeze({key:fW.MONTH,name:"月",sqltype:"time-only_month",sqldformat:"only_month"}),[fW.DAY]:Object.freeze({key:fW.DAY,name:"日",sqltype:"time-only_day",sqldformat:"only_day"}),[fW.TIME]:Object.freeze({key:fW.TIME,name:"时间",sqltype:"time-time",sqldformat:"only_time"})});var mW,vW;!function(e){e.STRING="string",e.TIME="time",e.INT="int",e.FLOAT="float",e.DOUBLE="double"}(mW||(mW={})),Object.freeze({[mW.STRING]:Object.freeze({key:mW.STRING,name:"文本",iconfont:"icon-word"}),[mW.TIME]:Object.freeze({key:mW.TIME,name:"时间",iconfont:"icon-calendar"}),[mW.INT]:Object.freeze({key:mW.INT,name:"数值",iconfont:"icon-number"}),[mW.FLOAT]:Object.freeze({key:mW.FLOAT,name:"小数",iconfont:"icon-decimal"}),[mW.DOUBLE]:Object.freeze({key:mW.DOUBLE,name:"小数",iconfont:"icon-decimal"})}),function(e){e.NONE="none",e.FIRST_TAG="first_tag"}(vW||(vW={}));const yW=Object.freeze({[vW.NONE]:Object.freeze({key:vW.NONE,name:"无",getDefault:()=>({type:vW.NONE})}),[vW.FIRST_TAG]:Object.freeze({key:vW.FIRST_TAG,name:"选中第一项",getDefault:()=>({type:vW.FIRST_TAG})})});var _W;!function(e){e.ALL="all",e.BEFORE="before",e.CUSTOM="custom"}(_W||(_W={}));const xW=Object.freeze({[_W.ALL]:Object.freeze({key:_W.ALL,name:"全选",getDefault:()=>({type:_W.ALL})}),[_W.BEFORE]:Object.freeze({key:_W.BEFORE,name:"选中前N项",getDefault:()=>({type:_W.BEFORE,index:1})}),[_W.CUSTOM]:Object.freeze({key:_W.CUSTOM,name:"自定义",getDefault:()=>({type:_W.CUSTOM,val:[]})})});var bW;!function(e){e.INPUT="input",e.SELECT="select",e.CONDITION="condition",e.TAG="tag",e.TREE="tree"}(bW||(bW={}));const wW=Object.freeze({[bW.INPUT]:Object.freeze({key:bW.INPUT,name:"输入框",getDefault:()=>({default:null})}),[bW.SELECT]:Object.freeze({key:bW.SELECT,name:"下拉框",searchMode:[hW.CONTAIN,hW.STARTWITH,hW.EQUAL],getDefault:({isMultiple:e=!1}={})=>({isMultiple:e,searchMode:hW.CONTAIN,default:e?[]:null})}),[bW.CONDITION]:Object.freeze({key:bW.CONDITION,name:"条件",getDefault:({searchMode:e=hW.CONTAIN,value:t=null}={})=>({default:{searchMode:e,val:t}})}),[bW.TAG]:Object.freeze({key:bW.TAG,name:"标签",showTagCount:[10,30,50],getDefault:({isMultiple:e=!1}={})=>{const t={isMultiple:e,showTagCount:30};return e?Object.assign({},t,{selectedTagCount:null,default:xW[_W.ALL].getDefault()}):Object.assign({},t,{default:yW[vW.NONE].getDefault()})}}),[bW.TREE]:Object.freeze({key:bW.TREE,name:"树",getDefault:()=>({isMultiple:!1,treeCheckStrictly:!1,defaultExpandLevel:1,default:[]})})});var SW,MW;!function(e){e.CONDITION="condition",e.RANGE="num_range"}(SW||(SW={})),Object.freeze({[SW.CONDITION]:Object.freeze({key:SW.CONDITION,name:"条件",getDefault:({searchMode:e=dW.EQUAL,value:t=null}={})=>({default:{searchMode:e,val:t}})}),[SW.RANGE]:Object.freeze({key:SW.RANGE,name:"范围",getDefault:()=>({default:[null,null]})})}),function(e){e.NONE="none",e.CURRENT="current",e.CUSTOM="custom"}(MW||(MW={}));const TW=Object.freeze({[MW.NONE]:Object.freeze({key:MW.NONE,name:"无",getDefault:()=>({type:MW.NONE})}),[MW.CURRENT]:Object.freeze({key:MW.CURRENT,name:"当前时间",getDefault:()=>({type:MW.CURRENT})}),[MW.CUSTOM]:Object.freeze({key:MW.CUSTOM,name:"自定义",getDefault:()=>({type:MW.CUSTOM,val:null})})});var IW;!function(e){e.NONE="none",e.TODAY="today",e.YESTERDAY="yesterday",e.THIS_WEEK="this_week",e.LAST_WEEK="last_week",e.THIS_MONTH="this_month",e.LAST_MONTH="last_month",e.THIS_QUARTER="this_quarter",e.LAST_QUARTER="last_quarter",e.THIS_YEAR="this_year",e.LAST_YEAR="last_year",e.NEARLY_A_WEEK="nearly_a_week",e.NEARLY_A_MONTH="nearly_a_month",e.NEARLY_A_YEAR="nearly_a_year",e.CUSTOM="custom"}(IW||(IW={}));const AW=Object.freeze({[IW.NONE]:Object.freeze({key:IW.NONE,name:"无",getDefault:()=>({type:IW.NONE})}),[IW.TODAY]:Object.freeze({key:IW.TODAY,name:"当天",getDefault:()=>({type:IW.TODAY})}),[IW.YESTERDAY]:Object.freeze({key:IW.YESTERDAY,name:"昨天",getDefault:()=>({type:IW.YESTERDAY})}),[IW.THIS_WEEK]:Object.freeze({key:IW.THIS_WEEK,name:"本周",getDefault:()=>({type:IW.THIS_WEEK})}),[IW.LAST_WEEK]:Object.freeze({key:IW.LAST_WEEK,name:"上周",getDefault:()=>({type:IW.LAST_WEEK})}),[IW.THIS_MONTH]:Object.freeze({key:IW.THIS_MONTH,name:"本月",getDefault:()=>({type:IW.THIS_MONTH})}),[IW.LAST_MONTH]:Object.freeze({key:IW.LAST_MONTH,name:"上月",getDefault:()=>({type:IW.LAST_MONTH})}),[IW.THIS_QUARTER]:Object.freeze({key:IW.THIS_QUARTER,name:"本季度",getDefault:()=>({type:IW.THIS_QUARTER})}),[IW.LAST_QUARTER]:Object.freeze({key:IW.LAST_QUARTER,name:"上季度",getDefault:()=>({type:IW.LAST_QUARTER})}),[IW.THIS_YEAR]:Object.freeze({key:IW.THIS_YEAR,name:"今年",getDefault:()=>({type:IW.THIS_YEAR})}),[IW.LAST_YEAR]:Object.freeze({key:IW.LAST_YEAR,name:"去年",getDefault:()=>({type:IW.LAST_YEAR})}),[IW.NEARLY_A_WEEK]:Object.freeze({key:IW.NEARLY_A_WEEK,name:"最近一周",getDefault:()=>({type:IW.NEARLY_A_WEEK})}),[IW.NEARLY_A_MONTH]:Object.freeze({key:IW.NEARLY_A_MONTH,name:"最近一月",getDefault:()=>({type:IW.NEARLY_A_MONTH})}),[IW.NEARLY_A_YEAR]:Object.freeze({key:IW.NEARLY_A_YEAR,name:"最近一年",getDefault:()=>({type:IW.NEARLY_A_YEAR})}),[IW.CUSTOM]:Object.freeze({key:IW.CUSTOM,name:"自定义",getDefault:()=>({type:IW.CUSTOM,val:[null,null]})})});var DW,CW,OW,kW,LW,EW,NW,PW,RW,zW,BW,VW,HW,YW;function FW({dformat:e,tformat:t}){const n=[];return e&&e!==NW.DEFAULT?e!==NW.NONE&&n.push(e):n.push(NW.MIDDLE_DASH_YYYYMMDD),t&&t!==PW.DEFAULT?t!==NW.NONE&&n.push(t):n.push(PW.HMS),n.join(" ")}!function(e){e.DATE="date",e.DATE_RANGE="date_range",e.DATETIME="datetime",e.DATETIME_RANGE="datetime_range",e.TIME="time",e.TIME_RANGE="time_range",e.YEAR="year",e.MONTH="month",e.DAY="day"}(DW||(DW={})),Object.freeze({[DW.DATE]:Object.freeze({key:DW.DATE,name:"日期选择",getDefault:()=>({default:TW[MW.NONE].getDefault()})}),[DW.DATE_RANGE]:Object.freeze({key:DW.DATE_RANGE,name:"日期范围",getDefault:()=>({default:AW[IW.NONE].getDefault()})}),[DW.DATETIME]:Object.freeze({key:DW.DATETIME,name:"日期时间选择",getDefault:()=>({default:TW[MW.NONE].getDefault()})}),[DW.DATETIME_RANGE]:Object.freeze({key:DW.DATETIME_RANGE,name:"日期时间范围",getDefault:()=>({default:AW[IW.NONE].getDefault()})}),[DW.TIME]:Object.freeze({key:DW.TIME,name:"时间选择",getDefault:()=>({default:TW[MW.NONE].getDefault()})}),[DW.TIME_RANGE]:Object.freeze({key:DW.TIME_RANGE,name:"时间范围",getDefault:()=>({default:AW[IW.NONE].getDefault()})}),[DW.YEAR]:Object.freeze({key:DW.YEAR,name:"年",getDefault:()=>({default:TW[MW.NONE].getDefault()})}),[DW.MONTH]:Object.freeze({key:DW.MONTH,name:"月",getDefault:()=>({default:TW[MW.NONE].getDefault()})}),[DW.DAY]:Object.freeze({key:DW.DAY,name:"日",getDefault:()=>({default:TW[MW.NONE].getDefault()})})}),function(e){e.NONE="none",e.COMPAREWITH_YEAR="comparewith_year",e.COMPAREWITH="comparewith",e.COMPAREWITH_YEAR_NUM="comparewith_year_num",e.COMPAREWITH_NUM="comparewith_num"}(CW||(CW={})),Object.freeze({[CW.NONE]:Object.freeze({key:CW.NONE,name:"不对比",label:"不对比"}),[CW.COMPAREWITH_YEAR]:Object.freeze({key:CW.COMPAREWITH_YEAR,name:"同比增长率",label:"同比增长率"}),[CW.COMPAREWITH]:Object.freeze({key:CW.COMPAREWITH,name:"环比增长率",label:"环比增长率"}),[CW.COMPAREWITH_YEAR_NUM]:Object.freeze({key:CW.COMPAREWITH_YEAR_NUM,name:"同比增长值",label:"同比增长值"}),[CW.COMPAREWITH_NUM]:Object.freeze({key:CW.COMPAREWITH_NUM,name:"环比增长值",label:"环比增长值"})}),function(e){e.NONE="none",e.DATA="data",e.TIME="time",e.PERCENT="percent"}(OW||(OW={})),Object.freeze({[OW.NONE]:Object.freeze({key:OW.NONE,label:"默认"}),[OW.DATA]:Object.freeze({key:OW.DATA,label:"数值"}),[OW.TIME]:Object.freeze({key:OW.TIME,label:"时间"}),[OW.PERCENT]:Object.freeze({key:OW.PERCENT,label:"百分比"})}),function(e){e.NONE="none",e.CN_K="k-cn",e.CN_10K="10k-cn",e.CN_100K="100k-cn",e.CN_M="m-cn",e.CN_10M="10m-cn",e.CN_100M="100m-cn",e.EN_K="k-en",e.EN_M="m-en",e.EN_B="b-en"}(kW||(kW={})),Object.freeze({[kW.NONE]:Object.freeze({key:kW.NONE,label:"无",value:1}),[kW.CN_K]:Object.freeze({key:kW.CN_K,label:"千",value:Math.pow(10,3)}),[kW.CN_10K]:Object.freeze({key:kW.CN_10K,label:"万",value:Math.pow(10,4)}),[kW.CN_100K]:Object.freeze({key:kW.CN_100K,label:"十万",value:Math.pow(10,5)}),[kW.CN_M]:Object.freeze({key:kW.CN_M,label:"百万",value:Math.pow(10,6)}),[kW.CN_10M]:Object.freeze({key:kW.CN_10M,label:"千万",value:Math.pow(10,7)}),[kW.CN_100M]:Object.freeze({key:kW.CN_100M,label:"亿",value:Math.pow(10,8)}),[kW.EN_K]:Object.freeze({key:kW.EN_K,label:"K",value:Math.pow(10,3)}),[kW.EN_M]:Object.freeze({key:kW.EN_M,label:"M",value:Math.pow(10,6)}),[kW.EN_B]:Object.freeze({key:kW.EN_B,label:"B",value:Math.pow(10,9)})}),function(e){e.YEAR="year",e.MONTH="month",e.DAY="day",e.HOUR="hour",e.MINUTE="minute",e.SECOND="second",e.MILLISECOND="millisecond"}(LW||(LW={})),Object.freeze({[LW.YEAR]:Object.freeze({key:LW.YEAR,label:"年",value:31536e6}),[LW.MONTH]:Object.freeze({key:LW.MONTH,label:"月",value:2592e6}),[LW.DAY]:Object.freeze({key:LW.DAY,label:"日",value:864e5}),[LW.HOUR]:Object.freeze({key:LW.HOUR,label:"小时",value:36e5}),[LW.MINUTE]:Object.freeze({key:LW.MINUTE,label:"分钟",value:6e4}),[LW.SECOND]:Object.freeze({key:LW.SECOND,label:"秒",value:1e3}),[LW.MILLISECOND]:Object.freeze({key:LW.MILLISECOND,label:"毫秒",value:1})}),function(e){e.ZERO="0",e.ONE="1",e.TWO="2",e.THREE="3",e.FOUR="4",e.FIVE="5",e.SIX="6"}(EW||(EW={})),function(e){e.DEFAULT="default",e.NONE="none",e.CN_YYYYMMDD="%Y年%m月%d日",e.MIDDLE_DASH_YYYYMMDD="%Y-%m-%d",e.SLASH_YYYYMMDD="%y/%m/%d",e.CN_YYYYMM="%Y年%m月",e.MIDDLE_DASH_YYYYMM="%Y-%m",e.SLASH_YYYYMM="%y/%m",e.CN_YYYY="%Y年",e.YYYY="%Y",e.CN_MM="%m月",e.MM="%m",e.CN_DD="%d日",e.DD="%d"}(NW||(NW={})),Object.freeze({[NW.DEFAULT]:Object.freeze({key:NW.DEFAULT,label:"默认"}),[NW.NONE]:Object.freeze({key:NW.NONE,label:"隐藏"}),[NW.CN_YYYYMMDD]:Object.freeze({key:NW.CN_YYYYMMDD,label:"2019年03月01日(yyyy年mm月dd日)"}),[NW.MIDDLE_DASH_YYYYMMDD]:Object.freeze({key:NW.MIDDLE_DASH_YYYYMMDD,label:"2019-03-01(yyyy-mm-dd)"}),[NW.SLASH_YYYYMMDD]:Object.freeze({key:NW.SLASH_YYYYMMDD,label:"19/03/01(yy/mm/dd)"}),[NW.CN_YYYYMM]:Object.freeze({key:NW.CN_YYYYMM,label:"2019年03月(yyyy年mm月)"}),[NW.MIDDLE_DASH_YYYYMM]:Object.freeze({key:NW.MIDDLE_DASH_YYYYMM,label:"2019-03(yyyy-mm)"}),[NW.SLASH_YYYYMM]:Object.freeze({key:NW.SLASH_YYYYMM,label:"2019/03(yyyy/mm)"}),[NW.CN_YYYY]:Object.freeze({key:NW.CN_YYYY,label:"2019年(yyyy年)"}),[NW.YYYY]:Object.freeze({key:NW.YYYY,label:"2019(yyyy)"}),[NW.CN_MM]:Object.freeze({key:NW.CN_MM,label:"03月(mm月)"}),[NW.MM]:Object.freeze({key:NW.MM,label:"03(mm)"}),[NW.CN_DD]:Object.freeze({key:NW.CN_DD,label:"01日(dd日)"}),[NW.DD]:Object.freeze({key:NW.DD,label:"01(dd)"})}),function(e){e.DEFAULT="default",e.NONE="none",e.HMS="%H:%i:%s",e.HM="%H:%i",e.CN_HMS="%H时%i分%s秒",e.CN_HM="%H时%i",e.CN_H="%H时",e.RISP="%r:%i:%s %p",e.RIP="%r:%i %p"}(PW||(PW={})),Object.freeze({[PW.DEFAULT]:Object.freeze({key:PW.DEFAULT,label:"默认"}),[NW.NONE]:Object.freeze({key:NW.NONE,label:"隐藏"}),[PW.HMS]:Object.freeze({key:PW.HMS,label:"12:00:00"}),[PW.HM]:Object.freeze({key:PW.HM,label:"12:00"}),[PW.CN_HMS]:Object.freeze({key:PW.CN_HMS,label:"12时00分00秒"}),[PW.CN_HM]:Object.freeze({key:PW.CN_HM,label:"12时00"}),[PW.CN_H]:Object.freeze({key:PW.CN_H,label:"12时"}),[PW.RISP]:Object.freeze({key:PW.RISP,label:"12:00:00 AM"}),[PW.RIP]:Object.freeze({key:PW.RIP,label:"12:00 AM"})}),function(e){e.NONE="none",e.DRILL="drill",e.DETAIL="detail"}(RW||(RW={})),Object.freeze({[RW.NONE]:Object.freeze({key:RW.NONE,label:"无点击事件"}),[RW.DRILL]:Object.freeze({key:RW.DRILL,label:"下钻"}),[RW.DETAIL]:Object.freeze({key:RW.DETAIL,label:"显示详细表"})}),function(e){e.DIALOG="dialog"}(zW||(zW={})),Object.freeze({[zW.DIALOG]:Object.freeze({key:zW.DIALOG,label:"通过弹窗显示",getDefaultConfig:()=>({mode:zW.DIALOG,condition:{targetSetId:void 0,filter:[]}}),getDefaultFilerItem:()=>({sourceFieldId:null,sourceFieldScope:null,targetFieldId:null,targetFieldScope:null})})}),function(e){e.NONE="none",e.SUM="sum",e.COUNT="count",e.DISTINCT="count_distinct",e.AVG="avg",e.MAX="max",e.MIN="min"}(BW||(BW={})),Object.freeze({[BW.NONE]:Object.freeze({key:BW.NONE,name:"不计算",label:"不计算"}),[BW.SUM]:Object.freeze({key:BW.SUM,name:"求和",label:"求和"}),[BW.COUNT]:Object.freeze({key:BW.COUNT,name:"计次",label:"计次"}),[BW.DISTINCT]:Object.freeze({key:BW.DISTINCT,name:"计数",label:"计数"}),[BW.AVG]:Object.freeze({key:BW.AVG,name:"平均",label:"平均"}),[BW.MAX]:Object.freeze({key:BW.MAX,name:"最大值",label:"最大值"}),[BW.MIN]:Object.freeze({key:BW.MIN,name:"最小值",label:"最小值"})}),function(e){e.NONE="none",e.SHOW_NULL="null",e.SHOW_ZERO="zero",e.SHOW_STRIKETHROUGH="strikethrough"}(VW||(VW={})),Object.freeze({[VW.NONE]:Object.freeze({key:VW.NONE,label:"默认"}),[VW.SHOW_NULL]:Object.freeze({key:VW.SHOW_NULL,label:"显示为 null"}),[VW.SHOW_ZERO]:Object.freeze({key:VW.SHOW_ZERO,label:"显示为 0"}),[VW.SHOW_STRIKETHROUGH]:Object.freeze({key:VW.SHOW_STRIKETHROUGH,label:"显示为-"})}),function(e){e.NONE="none",e.ASC="asc",e.DESC="desc"}(HW||(HW={})),Object.freeze({[HW.NONE]:Object.freeze({key:HW.NONE,name:"默认",label:"默认"}),[HW.ASC]:Object.freeze({key:HW.ASC,name:"↑",label:"升序 ↑"}),[HW.DESC]:Object.freeze({key:HW.DESC,name:"↓",label:"降序 ↓"})}),function(e){e.NAME="rename",e.EXPR="expr",e.ORDER_BY="orderBy",e.FILTER="filter",e.EVENT="event",e.COMPARE="compare",e.DATA_FORMAT="data-format",e.DATE_FORMAT="date-format",e.TIME_FORMAT="time-format",e.NULL_VAL="nullVal",e.EARLY_WARNING="earlyWarning",e.DELETE="delete"}(YW||(YW={}));const GW=({value:e})=>0===e.length||e.findIndex((e=>e||0===e))<0,WW=({filter:e})=>!["empty","null","nn","ne"].includes(e.op)&&(GW({value:e.value})&&GW({value:e.options})),jW=({value:e,dateFormat:t})=>{switch(e.type){case MW.NONE:return null;case MW.CURRENT:return pW().format(t);case MW.CUSTOM:return e.val}},UW=({value:e,dateFormat:t})=>{switch(e.type){case IW.NONE:return[null,null];case IW.TODAY:const n=pW().startOf("d"),i=pW().endOf("d");return[n.format(t),i.format(t)];case IW.YESTERDAY:const a=pW().add(-1,"days").startOf("d"),r=pW().add(-1,"days").endOf("d");return[a.format(t),r.format(t)];case IW.THIS_WEEK:const o=pW().startOf("isoWeeks").startOf("d"),s=pW().endOf("isoWeeks").endOf("d");return[o.format(t),s.format(t)];case IW.LAST_WEEK:const l=pW().add(-7,"day").startOf("isoWeeks").startOf("d"),u=pW().add(-7,"day").endOf("isoWeeks").endOf("d");return[l.format(t),u.format(t)];case IW.THIS_MONTH:const c=pW().startOf("month").startOf("d"),h=pW().endOf("month").endOf("d");return[c.format(t),h.format(t)];case IW.LAST_MONTH:const d=pW().add(-1,"month").startOf("month").startOf("d"),f=pW().add(-1,"month").endOf("month").endOf("d");return[d.format(t),f.format(t)];case IW.THIS_QUARTER:const p=pW().startOf("quarter").startOf("d"),g=pW().endOf("quarter").endOf("d");return[p.format(t),g.format(t)];case IW.LAST_QUARTER:const m=pW().add(-1,"quarter").startOf("quarter").startOf("d"),v=pW().add(-1,"quarter").endOf("quarter").endOf("d");return[m.format(t),v.format(t)];case IW.THIS_YEAR:const y=pW().startOf("year").startOf("d"),_=pW().endOf("year").endOf("d");return[y.format(t),_.format(t)];case IW.LAST_YEAR:const x=pW().add(-1,"year").startOf("year").startOf("d"),b=pW().add(-1,"year").endOf("year").endOf("d");return[x.format(t),b.format(t)];case IW.NEARLY_A_WEEK:const w=pW().add(1,"day").add(-1,"week"),S=pW();return[w.format(t),S.format(t)];case IW.NEARLY_A_MONTH:const M=pW().add(1,"day").add(-1,"month"),T=pW();return[M.format(t),T.format(t)];case IW.NEARLY_A_YEAR:const I=pW().add(1,"day").add(-1,"year"),A=pW();return[I.format(t),A.format(t)];case IW.CUSTOM:return e.val||[null,null]}},ZW={},XW=({shareId:e,field:t,getTableColumnValueFunc:n})=>u(void 0,void 0,void 0,(function*(){if("string"==typeof t.filter)return{op:"=",value:[t.filter],options:[]};let i=null;const a=Reflect.has(t.filter.params,"value");switch(t.type){case mW.STRING:switch(t.filter.type){case bW.INPUT:i={op:"**",value:a?[t.filter.params.value]:[t.filter.params.default],options:[]};break;case bW.SELECT:let r=a?t.filter.params.value:t.filter.params.default;t.filter.params.isMultiple||(r=[r]),i={op:"=",value:[],options:r};break;case bW.CONDITION:let o,s,l;switch(a?(o=t.filter.params.value.val,l=t.filter.params.value.searchMode):(o=t.filter.params.default.val,l=t.filter.params.default.searchMode),l){case hW.CONTAIN:s="**";break;case hW.NOT_CONTAIN:s="!**";break;case hW.STARTWITH:s="*=";break;case hW.NOT_STARTWITH:s="!*=";break;case hW.ENDWITH:s="=*";break;case hW.NOT_ENDWITH:s="!=*";break;case hW.EQUAL:s="=";break;case hW.NOT_EQUAL:s="<>";break;case hW.NULL_STR:s="empty";break;case hW.NOT_NULL_STR:s="ne";break;case hW.NULL:s="null";break;case hW.NOT_NULL:s="nn"}i={op:s,value:[o],options:[]};break;case bW.TAG:let u,c="=";if(a)t.filter.params.isMultiple?(c=t.filter.params.value.exclude?"!=":"=",u=t.filter.params.value.val):u=[t.filter.params.value];else if(t.filter.params.isMultiple)switch(t.filter.params.default.type){case _W.ALL:u=[];break;case _W.BEFORE:let i=[];i=ZW[t.key]?ZW[t.key]:yield n({share_id:e,field:t.key,pp:Math.max(...wW[bW.TAG].showTagCount),pg:1}),u=i.slice(0,t.filter.params.default.index);break;case _W.CUSTOM:u=t.filter.params.default.val}else switch(t.filter.params.default.type){case vW.NONE:u=[];break;case vW.FIRST_TAG:let e=[];e=ZW[t.key]?ZW[t.key]:yield n({field:t.key,pp:Math.max(...wW[bW.TAG].showTagCount),pg:1}),u=e.length>0?[e[0]]:[]}i={op:c,value:[],options:u};break;case bW.TREE:if(t.filter.params.isMultiple){r=(a?t.filter.params.value:t.filter.params.default).map((e=>e.split(">",1)[0]))}else{r=[(t.filter.params.value||t.filter.params.default).split(">",1)[0]]}i={op:"=",value:[],options:r},t.filter.params.treeCheckStrictly&&(i.level="mutil")}break;case mW.TIME:switch(t.filter.type){case DW.DATE:let e;e=a?t.filter.params.value:jW({value:t.filter.params.default,dateFormat:"YYYY-MM-DD"}),i={op:"between",value:e?[e+" 00:00:00",e+" 23:59:59"]:[],options:[]};break;case DW.DATE_RANGE:let n;n=a?t.filter.params.value:UW({value:t.filter.params.default,dateFormat:"YYYY-MM-DD"}),i={op:"between",value:[n[0]&&n[0]+" 00:00:00",n[1]&&n[1]+" 23:59:59"],options:[]};break;case DW.DATETIME:let r;r=a?t.filter.params.value:jW({value:t.filter.params.default,dateFormat:"YYYY-MM-DD HH:mm:ss"}),i={op:"=",value:[r],options:[]};break;case DW.DATETIME_RANGE:let o;o=a?t.filter.params.value:UW({value:t.filter.params.default,dateFormat:"YYYY-MM-DD HH:mm:ss"}),i={op:"between",value:o,options:[]};break;case DW.TIME:let s;s=a?t.filter.params.value:jW({value:t.filter.params.default,dateFormat:"HH:mm:ss"}),i={op:"=",dformat:"only_time",value:[s],options:[]};break;case DW.TIME_RANGE:let l;l=a?t.filter.params.value:UW({value:t.filter.params.default,dateFormat:"HH:mm:ss"}),i={op:"between",dformat:"only_time",value:l,options:[]};break;case DW.YEAR:let u;u=a?t.filter.params.value:jW({value:t.filter.params.default,dateFormat:"YYYY"}),i={op:"@only_year",value:[],options:[u]};break;case DW.MONTH:let c;c=a?t.filter.params.value:jW({value:t.filter.params.default,dateFormat:"MM"}),i={op:"@only_month",value:[],options:[c]};break;case DW.DAY:let h;h=a?t.filter.params.value:jW({value:t.filter.params.default,dateFormat:"DD"}),i={op:"@only_day",value:[],options:[h]}}break;case mW.INT:case mW.FLOAT:case mW.DOUBLE:switch(t.filter.type){case SW.CONDITION:let e,n,r;switch(a?(e=t.filter.params.value.val,r=t.filter.params.value.searchMode):(e=t.filter.params.default.val,r=t.filter.params.default.searchMode),r){case dW.EQUAL:n="=";break;case dW.NOT_EQUAL:n="!=";break;case dW.GREAT_EQUAL:n=">=";break;case dW.GREAT_THAN:n=">";break;case dW.LESS_EQUAL:n="<=";break;case dW.LESS_THAN:n="<";break;case dW.NULL:n="null";break;case dW.NOT_NULL:n="nn"}i={op:n,value:[e],options:[]};break;case SW.RANGE:i={op:"between",value:a?t.filter.params.value:t.filter.params.default,options:[]}}}return i}));function qW({shareId:e,criteria:t,getTableColumnValueFunc:n}){return u(this,void 0,void 0,(function*(){const i=Array.from({length:t.length});return yield Promise.all(t.map(((t,a)=>u(this,void 0,void 0,(function*(){const r={key:t.key,type:t.type,expr:t.expr},o=yield XW({shareId:e,field:t,getTableColumnValueFunc:n});o&&!WW({filter:o})?(r.filter=[o],o.level&&(r.level=o.level)):r.filter=[],i[a]=r}))))),i}))}function KW({value:e}){return e.map((e=>{const t={alias:e.alias,key:e.key,type:e.type,expr:e.expr,orderBy:e.orderBy,compare:e.compare};if(e.type===mW.TIME)if(e.subtype){const n=gW[e.subtype];t.type=n.sqltype,t.dformat=n.sqldformat}else{const n=FW({dformat:e.dformat,tformat:e.tformat});n&&(t.dformat=n)}return t}))}function $W({customFields:e}){let t=[];return Object.values(e.calc).forEach((e=>{t=t.concat(e)})),t}const QW=({drillDown:e,group:t})=>{const n={group:[],drillDown:[]};return n.group=t.map((e=>{const t={alias:e.alias,key:e.key,type:e.type,expr:e.expr,orderBy:e.orderBy,filter:[]};if(e.type===mW.TIME)if(e.subtype){const n=gW[e.subtype];t.type=n.sqltype,t.dformat=n.sqldformat}else{const n=FW({dformat:e.dformat,tformat:e.tformat});n&&(t.dformat=n)}return t})),Object.entries(e).forEach((([e,i])=>{if(!i.current)return;const a=t.find((t=>t.id===e));n.group.splice(a,1,{alias:i.current.alias,key:i.current.key,type:i.current.type,filter:[]});const r=[],o=[];i.path.forEach((e=>{r.push({alias:e.alias,key:e.key,type:e.type,filter:[]}),o.push(e.value)})),r.push({alias:i.current.alias,key:i.current.key,type:i.current.type,filter:[]}),n.drillDown.push({items:r,itemValues:o,currentItem:i.path.length+1,isDrill:!0})})),n};var JW,ej,tj,nj;function ij({timeRangeConfig:e}){let t=[null,null];switch(e.type){case tj.SHORTCUTS:const n=e.params,i=pW();switch(n.value){case JW.ALL:t=[null,null];break;case JW.TODAY:const e=i.format("YYYY-MM-DD");t=[`${e} 00:00:00`,`${e} 23:59:59`];break;case JW.YESTERDAY:const n=i.add(-1,"days").format("YYYY-MM-DD");t=[`${n} 00:00:00`,`${n} 23:59:59`];break;case JW.THIS_WEEK_TO_NOW:t=[pW().startOf("week").format("YYYY-MM-DD 00:00:00"),i.format("YYYY-MM-DD 23:59:59")];break;case JW.LAST_WEEK:t=[pW().add(-1,"week").startOf("week").format("YYYY-MM-DD 00:00:00"),i.format("YYYY-MM-DD 23:59:59")];break;case JW.THIS_MONTH_TO_NOW:t=[pW().startOf("month").format("YYYY-MM-DD 00:00:00"),i.format("YYYY-MM-DD 23:59:59")];break;case JW.LAST_MONTH:const a=pW().add(-1,"month").startOf("month").startOf("d"),r=pW().add(-1,"month").endOf("month").endOf("d");t=[a.format("YYYY-MM-DD 00:00:00"),r.format("YYYY-MM-DD 23:59:59")];break;case JW.THIS_QUARTER_TO_NOW:t=[i.startOf("quarter").format("YYYY-MM-DD 00:00:00"),i.format("YYYY-MM-DD 23:59:59")];break;case JW.LAST_QUARTER:const o=pW().add(-1,"quarter").startOf("quarter"),s=pW().add(-1,"quarter").endOf("quarter");t=[o.format("YYYY-MM-DD 00:00:00"),s.format("YYYY-MM-DD 23:59:59")];break;case JW.THIS_YEAR_TO_NOW:t=[pW().startOf("year").format("YYYY-MM-DD 00:00:00"),i.format("YYYY-MM-DD 23:59:59")];break;case JW.LAST_YEAR:const l=pW().add(-1,"year").startOf("year"),u=pW().add(-1,"year").endOf("year");t=[l.format("YYYY-MM-DD 00:00:00"),u.format("YYYY-MM-DD 23:59:59")]}break;case tj.CUSTOM_TIME:const a=e.params;t=[`${a.startDate} ${a.startTime.value}`,`${a.endDate} ${a.endTime.value}`];break;case tj.DYNAMIC_TIME:const r=e.params,o=pW(),s=pW();switch(r.type){case ej.SOME_DAY:s.add(0-r.value,"days");break;case ej.SOME_WEEK:s.add(0-r.value,"week");break;case ej.SOME_MONTH:s.add(0-r.value,"month");break;case ej.SOME_YEAR:s.add(0-r.value,"year")}t=[s.format("YYYY-MM-DD 00:00:00"),o.format("YYYY-MM-DD 23:59:59")]}return t}!function(e){e.ALL="all",e.TODAY="today",e.YESTERDAY="yesterday",e.THIS_WEEK_TO_NOW="this_week_to_now",e.LAST_WEEK="last_week",e.THIS_MONTH_TO_NOW="this_month_to_now",e.LAST_MONTH="last_month",e.THIS_QUARTER_TO_NOW="this_quarter_to_now",e.LAST_QUARTER="last_quarter",e.THIS_YEAR_TO_NOW="this_year_to_now",e.LAST_YEAR="last_year"}(JW||(JW={})),Object.freeze({[JW.ALL]:Object.freeze({key:JW.ALL,name:"全部"}),[JW.TODAY]:Object.freeze({key:JW.TODAY,name:"当天"}),[JW.YESTERDAY]:Object.freeze({key:JW.YESTERDAY,name:"昨天"}),[JW.THIS_WEEK_TO_NOW]:Object.freeze({key:JW.THIS_WEEK_TO_NOW,name:"本周至今"}),[JW.LAST_WEEK]:Object.freeze({key:JW.LAST_WEEK,name:"上周"}),[JW.THIS_MONTH_TO_NOW]:Object.freeze({key:JW.THIS_MONTH_TO_NOW,name:"本月至今"}),[JW.LAST_MONTH]:Object.freeze({key:JW.LAST_MONTH,name:"上月"}),[JW.THIS_QUARTER_TO_NOW]:Object.freeze({key:JW.THIS_QUARTER_TO_NOW,name:"本季度至今"}),[JW.LAST_QUARTER]:Object.freeze({key:JW.LAST_QUARTER,name:"上季度"}),[JW.THIS_YEAR_TO_NOW]:Object.freeze({key:JW.THIS_YEAR_TO_NOW,name:"本年至今"}),[JW.LAST_YEAR]:Object.freeze({key:JW.LAST_YEAR,name:"去年"})}),function(e){e.SOME_DAY="some_day",e.SOME_WEEK="some_week",e.SOME_MONTH="some_month",e.SOME_YEAR="some_year"}(ej||(ej={})),Object.freeze({[ej.SOME_DAY]:Object.freeze({key:ej.SOME_DAY,name:"前N天"}),[ej.SOME_WEEK]:Object.freeze({key:ej.SOME_WEEK,name:"前N周"}),[ej.SOME_MONTH]:Object.freeze({key:ej.SOME_MONTH,name:"前N月"}),[ej.SOME_YEAR]:Object.freeze({key:ej.SOME_YEAR,name:"前N年"})}),function(e){e.SHORTCUTS="shortcuts",e.CUSTOM_TIME="custom_time",e.DYNAMIC_TIME="dynamic_time"}(tj||(tj={})),Object.freeze({[tj.SHORTCUTS]:Object.freeze({key:tj.SHORTCUTS,name:"快捷选择",getDefault:()=>({value:JW.ALL})}),[tj.CUSTOM_TIME]:Object.freeze({key:tj.CUSTOM_TIME,name:"自定义时间",getDefault:()=>({startDate:null,startTime:{enable:!1,value:"00:00:00"},endDate:null,endTime:{enable:!1,value:"23:59:59"}})}),[tj.DYNAMIC_TIME]:Object.freeze({key:tj.DYNAMIC_TIME,name:"动态时间",getDefault:()=>({type:ej.SOME_DAY,value:null})})}),function(e){e.YEAR="year",e.QUARTER="quarter",e.MONTH="month",e.WEEK="week"}(nj||(nj={})),Object.freeze({[nj.YEAR]:Object.freeze({key:nj.YEAR,name:"年"}),[nj.QUARTER]:Object.freeze({key:nj.QUARTER,name:"季"}),[nj.MONTH]:Object.freeze({key:nj.MONTH,name:"月"}),[nj.WEEK]:Object.freeze({key:nj.WEEK,name:"周"})});const aj=({groupField:e,timeRange:t})=>({id:e.id,alias:e.alias,key:e.key,compareIndex:1,type:e.type,filter:[{op:"between",value:t||ij({timeRangeConfig:e.timeRange}),options:[]}]}),rj=({timeRange:e,groupField:t,value:n})=>{const i=[];return n.forEach((n=>{const a={id:n.id,alias:n.alias,key:n.key,type:n.type,expr:n.expr};if(i.push(a),t.compare.yoy_ratio.enable){const n=Object.assign({},a,{alias:`${a.alias}%%同比率`});switch(t.compare.yoy_ratio.dimension){case nj.WEEK:n.compare={type:"ratio",value:[pW(e[0]).add(-1,"week").format("YYYY-MM-DD HH:mm:ss"),pW(e[1]).add(-1,"week").format("YYYY-MM-DD HH:mm:ss")]};break;case nj.MONTH:n.compare={type:"ratio",value:[pW(e[0]).add(-1,"month").format("YYYY-MM-DD HH:mm:ss"),pW(e[1]).add(-1,"month").format("YYYY-MM-DD HH:mm:ss")]};break;case nj.QUARTER:n.compare={type:"ratio",value:[pW(e[0]).add(-1,"quarter").format("YYYY-MM-DD HH:mm:ss"),pW(e[1]).add(-1,"quarter").format("YYYY-MM-DD HH:mm:ss")]};break;case nj.YEAR:n.compare={type:"ratio",value:[pW(e[0]).add(-1,"year").format("YYYY-MM-DD HH:mm:ss"),pW(e[1]).add(-1,"year").format("YYYY-MM-DD HH:mm:ss")]}}i.push(n)}if(t.compare.yoy_value.enable){const n=Object.assign({},a,{alias:`${a.alias}%%同比值`});switch(t.compare.yoy_value.dimension){case nj.WEEK:n.compare={type:"num",value:[pW(e[0]).add(-1,"week").format("YYYY-MM-DD HH:mm:ss"),pW(e[1]).add(-1,"week").format("YYYY-MM-DD HH:mm:ss")]};break;case nj.MONTH:n.compare={type:"num",value:[pW(e[0]).add(-1,"month").format("YYYY-MM-DD HH:mm:ss"),pW(e[1]).add(-1,"month").format("YYYY-MM-DD HH:mm:ss")]};break;case nj.QUARTER:n.compare={type:"num",value:[pW(e[0]).add(-1,"quarter").format("YYYY-MM-DD HH:mm:ss"),pW(e[1]).add(-1,"quarter").format("YYYY-MM-DD HH:mm:ss")]};break;case nj.YEAR:n.compare={type:"num",value:[pW(e[0]).add(-1,"year").format("YYYY-MM-DD HH:mm:ss"),pW(e[1]).add(-1,"year").format("YYYY-MM-DD HH:mm:ss")]}}i.push(n)}if(t.compare.mom_ratio.enable){const t=Object.assign({},a,{alias:`${a.alias}%%环比率`}),n=pW(e[0]),r=pW(e[1]),o=n.diff(r)-1e3;t.compare={type:"ratio",value:[n.add(o,"ms").format("YYYY-MM-DD HH:mm:ss"),r.add(o,"ms").format("YYYY-MM-DD HH:mm:ss")]},i.push(t)}if(t.compare.mom_value.enable){const t=Object.assign({},a,{alias:`${a.alias}%%环比值`}),n=pW(e[0]),r=pW(e[1]),o=n.diff(r)-1e3;t.compare={type:"num",value:[n.add(o,"ms").format("YYYY-MM-DD HH:mm:ss"),r.add(o,"ms").format("YYYY-MM-DD HH:mm:ss")]},i.push(t)}})),i};function oj({shareId:e=null,setConfig:t,getTableColumnValueFunc:n}){return u(this,void 0,void 0,(function*(){let i={};const{data:a}=t;switch(t.render){case lW.TABLE:case lW.PIE:case lW.HISTOGRAM_LINE:case lW.HISTOGRAM_BAR:case lW.BAR:case lW.HISTOGRAM_MIX:i=yield function({shareId:e,setConfig:t,getTableColumnValueFunc:n}){return u(this,void 0,void 0,(function*(){const i=yield qW({shareId:e,criteria:t.data.criteria,getTableColumnValueFunc:n}),{group:a,drillDown:r}=QW({drillDown:t.data.drillDown,group:t.data.group});return{criteria:i,group:a,value:KW({value:t.data.value}),drillDown:r,rule:$W({customFields:t.customFields})}}))}({shareId:e,setConfig:t,getTableColumnValueFunc:n});break;case lW.GAUGE:break;case lW.INDICATOR_CARD:i=yield function({shareId:e,setConfig:t,timeRange:n,getTableColumnValueFunc:i}){return u(this,void 0,void 0,(function*(){const a=yield qW({shareId:e,criteria:t.data.criteria,getTableColumnValueFunc:i}),r=t.data.group[0],o=yield aj({groupField:r,timeRange:n});return{criteria:[o,...a],group:[],value:rj({timeRange:o.filter[0].value,groupField:r,value:t.data.value}),drillDown:[],rule:$W({customFields:t.customFields})}}))}({shareId:e,setConfig:t,getTableColumnValueFunc:n});break;case lW.MAP:break;case lW.DETAIL:i=yield function({shareId:e,setConfig:t,getTableColumnValueFunc:n}){return u(this,void 0,void 0,(function*(){return{criteria:yield qW({shareId:e,criteria:t.data.criteria,getTableColumnValueFunc:n}),group:[],value:KW({value:t.data.value}),drillDown:[],rule:$W({customFields:t.customFields})}}))}({shareId:e,setConfig:t,getTableColumnValueFunc:n});break;default:throw new Error(`未知的图标渲染类型: ${a.render}`)}return i}))}var sj,lj,uj,cj,hj,dj;!function(e){e.NORMAL="normal",e.CENTRAL_CONTROL="center-control",e.DOOR_PLATE="door-plate"}(sj||(sj={})),Object.freeze({[sj.NORMAL]:Object.freeze({key:sj.NORMAL,name:"普通模式"}),[sj.CENTRAL_CONTROL]:Object.freeze({key:sj.CENTRAL_CONTROL,name:"中控大屏"}),[sj.DOOR_PLATE]:Object.freeze({key:sj.DOOR_PLATE,name:"电子门牌"})}),function(e){e.SIZE8="8",e.SIZE10="10",e.SIZE12="12",e.SIZE13="13",e.SIZE14="14",e.SIZE16="16",e.SIZE18="18",e.SIZE20="20",e.SIZE24="24",e.SIZE26="26",e.SIZE28="28",e.SIZE30="30",e.SIZE32="32",e.SIZE34="34",e.SIZE36="36",e.SIZE38="38",e.SIZE40="40",e.SIZE48="48",e.SIZE64="64",e.SIZE72="72",e.SIZE128="128"}(lj||(lj={})),function(e){e.SIZE400="400",e.SIZE600="600"}(uj||(uj={})),Object.freeze({[uj.SIZE400]:Object.freeze({key:uj.SIZE400,name:"正常"}),[uj.SIZE600]:Object.freeze({key:uj.SIZE600,name:"加粗"})}),function(e){e.NORMAL="normal",e.ITALIC="italic"}(cj||(cj={})),Object.freeze({[cj.NORMAL]:Object.freeze({key:cj.NORMAL,name:"正常"}),[cj.ITALIC]:Object.freeze({key:cj.ITALIC,name:"斜体"})}),function(e){e.LEFT="left",e.CENTER="center",e.RIGHT="right"}(hj||(hj={})),Object.freeze({[hj.LEFT]:Object.freeze({key:hj.LEFT,iconfont:"icon-text_left",name:"左对齐"}),[hj.CENTER]:Object.freeze({key:hj.CENTER,iconfont:"icon-text_center",name:"居中对齐"}),[hj.RIGHT]:Object.freeze({key:hj.RIGHT,iconfont:"icon-text_right",name:"右对齐"})}),function(e){e.TOP="top",e.MIDDLE="middle",e.BOTTOM="bottom"}(dj||(dj={})),Object.freeze({[dj.TOP]:Object.freeze({key:dj.TOP,iconfont:"icon-top",name:"头部对齐"}),[dj.MIDDLE]:Object.freeze({key:dj.MIDDLE,iconfont:"icon-center",name:"居中对齐"}),[dj.BOTTOM]:Object.freeze({key:dj.BOTTOM,iconfont:"icon-bottom",name:"底部对齐"})});const fj=Object.freeze(["#4499fa","#59d4d9","#4cd964","#ff9500","#ff3b30","#c894f6","#8c6fde","#767aee","#52c41a","#ff2d55","#ffcc00","#5ac8fa","#f478b8","#fae34c","#59d9a4"]),pj="#2b9f7f";var gj;!function(e){e.PURE="pure",e.LINEAR="linear",e.RADIAL="radial"}(gj||(gj={}));const mj=Object.freeze({[gj.PURE]:Object.freeze({key:gj.PURE,name:"纯色",getDefault:(e=pj)=>({type:gj.PURE,color:e})}),[gj.LINEAR]:Object.freeze({key:gj.LINEAR,name:"线性渐变",getDefault:(e=pj)=>({type:gj.LINEAR,startColor:e,endColor:e})}),[gj.RADIAL]:Object.freeze({key:gj.RADIAL,name:"径向渐变",getDefault:(e=pj)=>({type:gj.RADIAL,startColor:e,endColor:e,radius:5})})});var vj;!function(e){e.CONTINUOUS="continuous",e.PIECEWISE="piecewise"}(vj||(vj={}));const yj=Object.freeze({[vj.CONTINUOUS]:Object.freeze({key:vj.CONTINUOUS,name:"连续渐变",getDefault:(e=pj)=>({type:vj.CONTINUOUS,startColor:e,endColor:e})}),[vj.PIECEWISE]:Object.freeze({key:vj.PIECEWISE,name:"区间渐变",getDefault:(e=pj)=>({type:vj.PIECEWISE,startColor:e,endColor:e,splitNumber:5})})});var _j,xj,bj,wj,Sj,Mj,Tj;!function(e){e.TOP="top",e.BOTTOM="bottom",e.LEFT="left",e.RIGHT="right",e.INSIDE_LEFT="insideLeft",e.INSIDE_RIGHT="insideRight",e.INSIDE_TOP="insideTop",e.INSIDE_CENTER="inside",e.INSIDE_BOTTOM="insideBottom"}(_j||(_j={})),Object.freeze({[_j.TOP]:Object.freeze({key:_j.TOP,name:"上方"}),[_j.BOTTOM]:Object.freeze({key:_j.BOTTOM,name:"下方"}),[_j.LEFT]:Object.freeze({key:_j.LEFT,name:"左边"}),[_j.RIGHT]:Object.freeze({key:_j.RIGHT,name:"右边"}),[_j.INSIDE_CENTER]:Object.freeze({key:_j.INSIDE_CENTER,name:"内部居中"}),[_j.INSIDE_LEFT]:Object.freeze({key:_j.INSIDE_LEFT,name:"内部左边"}),[_j.INSIDE_RIGHT]:Object.freeze({key:_j.INSIDE_RIGHT,name:"内部右边"}),[_j.INSIDE_TOP]:Object.freeze({key:_j.INSIDE_TOP,name:"内部上方"}),[_j.INSIDE_BOTTOM]:Object.freeze({key:_j.INSIDE_BOTTOM,name:"内部下方"})}),function(e){e.GROUP="group",e.SERIES="series",e.VALUE="value",e.PERCENT="percent"}(xj||(xj={})),Object.freeze({[xj.GROUP]:Object.freeze({key:xj.GROUP,name:"维度项"}),[xj.SERIES]:Object.freeze({key:xj.SERIES,name:"数值标题"}),[xj.VALUE]:Object.freeze({key:xj.VALUE,name:"值"}),[xj.PERCENT]:Object.freeze({key:xj.PERCENT,name:"百分比"})}),function(e){e.PERCENT="percent",e.INDEX="index"}(bj||(bj={})),Object.freeze({[bj.PERCENT]:Object.freeze({key:bj.PERCENT,name:"%"}),[bj.INDEX]:Object.freeze({key:bj.INDEX,name:"项"})}),function(e){e.BT="bt",e.E="e",e.NE="ne",e.GT="gt",e.GE="ge",e.LT="lt",e.LE="le",e.BEFORE="before",e.AFTER="after",e.INDEX="index"}(wj||(wj={})),Object.freeze({[wj.BT]:Object.freeze({key:wj.BT,name:"介于",getDefault:()=>({op:wj.BT,value:[null,null]})}),[wj.E]:Object.freeze({key:wj.E,name:"等于",getDefault:()=>({op:wj.E,value:null})}),[wj.NE]:Object.freeze({key:wj.NE,name:"不等于",getDefault:()=>({op:wj.NE,value:null})}),[wj.GT]:Object.freeze({key:wj.GT,name:"大于",getDefault:()=>({op:wj.GT,value:null})}),[wj.GE]:Object.freeze({key:wj.GE,name:"大于等于",getDefault:()=>({op:wj.GE,value:null})}),[wj.LT]:Object.freeze({key:wj.LT,name:"小于",getDefault:()=>({op:wj.LT,value:null})}),[wj.LE]:Object.freeze({key:wj.LE,name:"小于等于",getDefault:()=>({op:wj.LE,value:null})}),[wj.BEFORE]:Object.freeze({key:wj.BEFORE,name:"前",getDefault:()=>({op:wj.BEFORE,value:null,unit:bj.INDEX})}),[wj.AFTER]:Object.freeze({key:wj.AFTER,name:"后",getDefault:()=>({op:wj.AFTER,value:null,unit:bj.INDEX})}),[wj.INDEX]:Object.freeze({key:wj.INDEX,name:"第",getDefault:()=>({op:wj.INDEX,value:null})})}),function(e){e.SHOW="show",e.HIDDEN="hidden",e.DEFAULT="default"}(Sj||(Sj={})),Object.freeze({[Sj.SHOW]:Object.freeze({key:Sj.SHOW,name:"显示"}),[Sj.HIDDEN]:Object.freeze({key:Sj.HIDDEN,name:"隐藏"}),[Sj.DEFAULT]:Object.freeze({key:Sj.DEFAULT,name:"默认"})}),function(e){e.BAR="bar",e.LINE="line"}(Mj||(Mj={})),Object.freeze({[Mj.BAR]:Object.freeze({key:Mj.BAR,name:"柱"}),[Mj.LINE]:Object.freeze({key:Mj.LINE,name:"线"})}),function(e){e.ITEM_STYLE="itemStyle",e.VISUAL_MAP="visualMap"}(Tj||(Tj={}));const Ij=Object.freeze({[Tj.ITEM_STYLE]:Object.freeze({key:Tj.ITEM_STYLE,name:"颜色填充",getDefaultConfig:()=>({type:Tj.ITEM_STYLE,params:mj[gj.PURE].getDefault()})}),[Tj.VISUAL_MAP]:Object.freeze({key:Tj.VISUAL_MAP,name:"视觉映射",getDefaultConfig:()=>({type:Tj.VISUAL_MAP,params:yj[vj.CONTINUOUS].getDefault()})})});function Aj({seriesType:e,axisPosition:t,dataLabelPosition:n}){return{type:e,axisPosition:t,width:null,radius:0,colorFill:Ij[Tj.ITEM_STYLE].getDefaultConfig(),label:{show:!1,params:{position:n,fontSize:lj.SIZE12,color:{enable:!1,value:pj},fontWeight:uj.SIZE400,showTooltip:Object.values(xj)}},conditionalFormatting:[]}}var Dj,Cj,Oj,kj,Lj;function Ej({position:e}){return{name:"",position:e,unit:"",min:null,max:null,nameLocation:kj.START,nameGap:15,nameRotate:0,inverse:!1,nameTextStyle:{fontSize:lj.SIZE12,color:"#333333",fontWeight:uj.SIZE400,fontStyle:cj.NORMAL,padding:[0,0,0,0]},axisLabel:{show:!1,params:{fontSize:lj.SIZE14,color:"#333333",fontWeight:uj.SIZE400,fontStyle:cj.NORMAL,rotate:Dj.NONE}},axisLine:{show:!1,params:{width:1,color:"#333333",type:Cj.SOLID}},axisTick:{show:!1,params:{length:5,width:1,color:"#333333",type:Cj.SOLID}},splitLine:{show:!1,params:{width:1,color:"#333333",type:Cj.SOLID}}}}function Nj(){return{show:!1,width:20,right:10,filterColor:pj,borderColor:pj}}function Pj(){return{position:Lj.NONE}}function Rj({styleConfig:e,setConfig:t,dataLabelPosition:n,getSeriesTypeFunc:i,getAxisPositionFunc:a}){e.enable&&(function({stack:e,setConfig:t}){if(e.enable){const n=t.data.value.map((e=>e.id));e.params.forEach((e=>{e.fields=e.fields.filter((e=>n.includes(e)))})),e.params=e.params.filter((e=>e.fields.length>0))}}({stack:e.params.stack,setConfig:t}),function({seriesCustomConfig:e,setConfig:t,dataLabelPosition:n,getSeriesTypeFunc:i,getAxisPositionFunc:a}){Object.keys(e).forEach((n=>{t.data.value.find((e=>e.id===n))||delete e[n]})),t.data.value.forEach(((t,r)=>{e[t.id]||(e[t.id]=Aj({seriesType:i({index:r}),axisPosition:a({index:r}),dataLabelPosition:n}))}))}({seriesCustomConfig:e.params.seriesCustom,setConfig:t,dataLabelPosition:n,getSeriesTypeFunc:i,getAxisPositionFunc:a}))}!function(e){e.NONE="0",e.Rotate30="30",e.Rotate45="45",e.Rotate60="60",e.Rotate90="90"}(Dj||(Dj={})),Object.freeze({[Dj.NONE]:Object.freeze({key:Dj.NONE,name:"默认"}),[Dj.Rotate30]:Object.freeze({key:Dj.Rotate30,name:"30"}),[Dj.Rotate45]:Object.freeze({key:Dj.Rotate45,name:"45"}),[Dj.Rotate60]:Object.freeze({key:Dj.Rotate60,name:"60"}),[Dj.Rotate90]:Object.freeze({key:Dj.Rotate90,name:"90"})}),function(e){e.SOLID="solid",e.DASHED="dashed",e.DOTTED="dotted"}(Cj||(Cj={})),Object.freeze({[Cj.SOLID]:Object.freeze({key:Cj.SOLID,name:"————"}),[Cj.DASHED]:Object.freeze({key:Cj.DASHED,name:"----"}),[Cj.DOTTED]:Object.freeze({key:Cj.DOTTED,name:"...."})}),function(e){e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom"}(Oj||(Oj={})),Object.freeze({[Oj.LEFT]:Object.freeze({key:Oj.LEFT,name:"左"}),[Oj.RIGHT]:Object.freeze({key:Oj.RIGHT,name:"右"}),[Oj.TOP]:Object.freeze({key:Oj.TOP,name:"上"}),[Oj.BOTTOM]:Object.freeze({key:Oj.BOTTOM,name:"下"})}),function(e){e.START="start",e.CENTER="center",e.END="end"}(kj||(kj={})),Object.freeze({[kj.START]:Object.freeze({key:kj.START,name:"起始"}),[kj.CENTER]:Object.freeze({key:kj.CENTER,name:"中间"}),[kj.END]:Object.freeze({key:kj.END,name:"结尾"})}),function(e){e.NONE="none",e.LEFT="left",e.TOP="top",e.RIGHT="right",e.BOTTOM="bottom"}(Lj||(Lj={})),Object.freeze({[Lj.NONE]:Object.freeze({key:Lj.NONE,name:"无",iconfont:"icon-align_center"}),[Lj.TOP]:Object.freeze({key:Lj.TOP,name:"上",iconfont:"icon-align_top"}),[Lj.BOTTOM]:Object.freeze({key:Lj.BOTTOM,name:"下",iconfont:"icon-align_bottom"}),[Lj.LEFT]:Object.freeze({key:Lj.LEFT,name:"左",iconfont:"icon-align_left"}),[Lj.RIGHT]:Object.freeze({key:Lj.RIGHT,name:"右",iconfont:"icon-align_right"})});var zj,Bj=Object.freeze({__proto__:null,reactStyleConfig:function({styleConfig:e,setConfig:t}){Rj({styleConfig:e,setConfig:t,dataLabelPosition:_j.RIGHT,getSeriesTypeFunc:()=>Mj.BAR,getAxisPositionFunc:()=>Oj.TOP})},getDefaultConfigParams:function({setConfig:e}){return{dataRange:{start:null,end:null},grid:{top:50,bottom:30,left:70,right:50},legend:Pj(),dataZoom:Nj(),stack:{enable:!1,params:[]},axisY:Ej({position:Oj.LEFT}),topAxis:Ej({position:Oj.TOP}),bottomAxis:Ej({position:Oj.BOTTOM}),seriesCustom:(()=>{const t={};return e.data.value.forEach((e=>{t[e.id]=Aj({dataLabelPosition:_j.RIGHT,seriesType:Mj.BAR,axisPosition:Oj.TOP})})),t})()}}}),Vj=(()=>{const e={};return e[sj.NORMAL]=Bj,e})();!function(e){e.SIZE10="10",e.SIZE20="20",e.SIZE30="30",e.SIZE50="50"}(zj||(zj={}));function Hj({styleConfig:e,setConfig:t}){e.enable&&((({cell:e,setConfig:t})=>{const n=t.data.group.length+t.data.value.length;e.fixed.left>n&&(e.fixed.left=n),e.fixed.right>n&&(e.fixed.right=null)})({cell:e.params.cell,setConfig:t}),(({summary:e,setConfig:t})=>{if(e.show){const n={};t.data.value.forEach((t=>{n[t.id]=e.expr[t.id]||BW.NONE})),e.expr=n}})({summary:e.params.summary,setConfig:t}),(({stack:e,setConfig:t})=>{if(e.enable){const n=t.data.value.map((e=>e.id));e.params.forEach((e=>{e.fields=e.fields.filter((e=>n.includes(e)))})),e.params=e.params.filter((e=>e.fields.length>0))}})({stack:e.params.stack,setConfig:t}))}function Yj({hasMerged:e=!1}){const t={fixed:{left:null,right:null}};return e&&(t.merge=!1),t}function Fj(){return{pageSize:zj.SIZE20,showPageSize:!1,showTotal:!1,showTotalPage:!1}}function Gj(){return{bgColor:"#fafafa",fontSize:lj.SIZE12,fontWeight:uj.SIZE400,color:"#606266",textAlign:hj.LEFT}}function Wj(){return{fontSize:lj.SIZE12,fontWeight:uj.SIZE400,color:"#606266",textAlign:hj.LEFT,verticalAlign:dj.MIDDLE,oddColor:"#ffffff",evenColor:"#fafbfc"}}var jj=Object.freeze({__proto__:null,getDefaultConfigParams:function(){return{dataRange:{start:null,end:null},cell:Yj({}),stack:{enable:!1,params:[]},summary:{show:!1,name:"",expr:{}},pagination:Fj(),showIndex:!0,header:Gj(),body:Wj(),border:{hasVerticalBorder:!1,hasHorizontalBorder:!0,borderColor:"#ebeef5"}}},reactStyleConfig:Hj}),Uj=(()=>{const e={};return e[sj.NORMAL]=jj,e})();var Zj=Object.freeze({__proto__:null,reactStyleConfig:function({styleConfig:e,setConfig:t}){Rj({styleConfig:e,setConfig:t,dataLabelPosition:_j.TOP,getSeriesTypeFunc:()=>Mj.BAR,getAxisPositionFunc:()=>Oj.LEFT})},getDefaultConfigParams:function({setConfig:e}){return{dataRange:{start:null,end:null},grid:{top:50,bottom:30,left:70,right:50},legend:Pj(),dataZoom:Nj(),stack:{enable:!1,params:[]},axisX:Ej({position:Oj.BOTTOM}),leftAxis:Ej({position:Oj.LEFT}),rightAxis:Ej({position:Oj.RIGHT}),seriesCustom:(()=>{const t={};return e.data.value.forEach((e=>{t[e.id]=Aj({dataLabelPosition:_j.TOP,seriesType:Mj.BAR,axisPosition:Oj.LEFT})})),t})()}}}),Xj=(()=>{const e={};return e[sj.NORMAL]=Zj,e})();var qj=Object.freeze({__proto__:null,reactStyleConfig:function({styleConfig:e,setConfig:t}){Rj({styleConfig:e,setConfig:t,dataLabelPosition:_j.TOP,getSeriesTypeFunc:()=>Mj.BAR,getAxisPositionFunc:()=>Oj.LEFT})},getDefaultConfigParams:function({setConfig:e}){return{dataRange:{start:null,end:null},grid:{top:50,bottom:30,left:70,right:50},legend:Pj(),dataZoom:Nj(),stack:{enable:!1,params:[]},axisX:Ej({position:Oj.BOTTOM}),leftAxis:Ej({position:Oj.LEFT}),rightAxis:Ej({position:Oj.RIGHT}),seriesCustom:(()=>{const t={};return e.data.value.forEach((e=>{t[e.id]=Aj({dataLabelPosition:_j.TOP,seriesType:Mj.LINE,axisPosition:Oj.LEFT})})),t})()}}}),Kj=(()=>{const e={};return e[sj.NORMAL]=qj,e})();var $j,Qj=Object.freeze({__proto__:null,reactStyleConfig:function({styleConfig:e,setConfig:t}){Rj({styleConfig:e,setConfig:t,dataLabelPosition:_j.TOP,getSeriesTypeFunc:()=>Mj.BAR,getAxisPositionFunc:()=>Oj.LEFT})},getDefaultConfigParams:function({setConfig:e}){return{dataRange:{start:null,end:null},grid:{top:50,bottom:30,left:70,right:50},legend:Pj(),dataZoom:Nj(),stack:{enable:!1,params:[]},axisX:Ej({position:Oj.BOTTOM}),leftAxis:Ej({position:Oj.LEFT}),rightAxis:Ej({position:Oj.RIGHT}),seriesCustom:(()=>{const t={};return e.data.value.forEach(((e,n)=>{t[e.id]=Aj({dataLabelPosition:_j.TOP,seriesType:n%2==0?Mj.BAR:Mj.LINE,axisPosition:Oj.LEFT})})),t})()}}}),Jj=(()=>{const e={};return e[sj.NORMAL]=Qj,e})();!function(e){e.ZERO="0",e.ONE="1",e.TWO="2",e.THREE="3",e.FOUR="4",e.FIVE="5",e.SIX="6"}($j||($j={}));var eU,tU=Object.freeze({__proto__:null,reactStyleConfig:function({styleConfig:e,setConfig:t}){},get PrecisionType(){return $j},getDefaultConfigParams:function(){return{background:"#ffffff",title:{fontSize:lj.SIZE12,color:"#333333"},value:{fontSize:lj.SIZE12,color:"#333333"},compareValue:{positive:{precision:$j.TWO,fontSize:lj.SIZE12,color:"#333333"},negative:{precision:$j.TWO,fontSize:lj.SIZE12,color:"#333333"}}}}}),nU=(()=>{const e={};return e[sj.NORMAL]=tU,e})();!function(e){e.PERCENT="%",e.PX="px"}(eU||(eU={}));const iU=Object.freeze({[eU.PERCENT]:Object.freeze({key:eU.PERCENT,name:"%"}),[eU.PX]:Object.freeze({key:eU.PX,name:"px"})});var aU;!function(e){e.AREA="area",e.RADIUS="radius"}(aU||(aU={}));const rU=Object.freeze({[aU.AREA]:Object.freeze({key:aU.AREA,name:"面积模式"}),[aU.RADIUS]:Object.freeze({key:aU.RADIUS,name:"半径模式"})});var oU;!function(e){e.INSIDE="inside",e.OUTSIDE="outside"}(oU||(oU={}));const sU=Object.freeze({[oU.INSIDE]:Object.freeze({key:oU.INSIDE,name:"圈内"}),[oU.OUTSIDE]:Object.freeze({key:oU.OUTSIDE,name:"圈外"})});var lU=Object.freeze({__proto__:null,reactStyleConfig:function({shareId:e,styleConfig:t,setConfig:n,getTableColumnValueFunc:i,getDataFunc:a}){return u(this,void 0,void 0,(function*(){if(t.enable){let r=[];if(i&&a){const o={config:yield oj({shareId:e,setConfig:n,getTableColumnValueFunc:i}),data_start:null!==t.params.dataRange.start?t.params.dataRange.start-1:0};null!==t.params.dataRange.end&&(o.data_count=t.params.dataRange.end-o.data_start);const[{data:s}]=yield a(o);s.length<100&&(r=s)}const o={},s=n.data.group[0];r.forEach(((e,n)=>{const i=e.group[s.alias];o[i]=t.params.customGroupValues[i]||mj[gj.PURE].getDefault(fj[n%fj.length])})),t.params.customGroupValues=o}}))},get ChartCenterUnitType(){return eU},ChartCenterUnitTypeMesage:iU,get RoseType(){return aU},RoseTypeMesage:rU,get LabelPosition(){return oU},LabelPositionMesage:sU,getDefaultConfigParams:function({shareId:e,setConfig:t,getTableColumnValueFunc:n,getDataFunc:i}){return u(this,void 0,void 0,(function*(){let a=[];if(n&&i){const r={config:yield oj({shareId:e,setConfig:t,getTableColumnValueFunc:n})};if(t.style[lW.PIE][sj.NORMAL].enable){const e=t.style[lW.PIE][sj.NORMAL].params,n=e.dataRange.start||1;r.data_start=n,null!==e.dataRange.end&&(r.data_count=e.dataRange.end-r.data_start)}const[{data:o}]=yield i(r);a=o}return{dataRange:{start:null,end:null},legend:Pj(),chart:{center:{x:{value:50,unit:eU.PERCENT},y:{value:50,unit:eU.PERCENT}},radius:{inner:0,outer:80},startAngle:90,clockwise:!0,minShowLabelAngle:null},customGroupValues:(()=>{const e={},n=t.data.group[0];return a.forEach(((t,i)=>{const a=t.group[n.alias];e[a]=mj[gj.PURE].getDefault(fj[i%fj.length])})),e})(),roseType:{enable:!1,type:aU.AREA},label:{show:!1,params:{position:oU.INSIDE,fontSize:lj.SIZE12,fontWeight:uj.SIZE400,color:{enable:!1,value:"#ffffff"},showTooltip:Object.values(xj)}},labelLine:{show:!1,params:{color:{enable:!1,value:"#ffffff"},length:4,length2:8}}}}))}}),uU=(()=>{const e={};return e[sj.NORMAL]=lU,e})();var cU=Object.freeze({__proto__:null,getDefaultConfigParams:function(){return{dataRange:{start:null,end:null},cell:Yj({hasMerged:!0}),stack:{enable:!1,params:[]},summary:{show:!1,name:"",expr:{}},pagination:Fj(),showIndex:!0,header:Gj(),body:Wj(),border:{hasVerticalBorder:!1,hasHorizontalBorder:!0,borderColor:"#ebeef5"}}},reactStyleConfig:Hj}),hU=(()=>{const e={};return e[sj.NORMAL]=cU,e})(),dU=(()=>{const e={};return e[lW.BAR]=Vj,e[lW.DETAIL]=Uj,e[lW.HISTOGRAM_BAR]=Xj,e[lW.HISTOGRAM_LINE]=Kj,e[lW.HISTOGRAM_MIX]=Jj,e[lW.INDICATOR_CARD]=nU,e[lW.PIE]=uU,e[lW.TABLE]=hU,e})();let fU=class extends s.Component{constructor(e){super(e),this.chartRef=s.createRef(),this.padding="10vh 4vh 4vh",this.total={},this.renderChart=()=>u(this,void 0,void 0,(function*(){const{base_url:e,set_id:t,deviceToken:n}=this.props.gpui.params;if(e&&t&&n){this.timer&&(clearTimeout(this.timer),this.timer=null);try{const{data:i}=yield cW.get(`${e}/set/${t}`,{headers:{"X-Gini-Token":n}}),a=JSON.parse(i.config),r=this.props.gpui.params["@theme"];let o;o=a.style.table[r].enable?a.style[a.render][r].params:yield function({api:e,chartType:t,themeMode:n,setConfig:i}){return u(this,void 0,void 0,(function*(){if(dU[t]&&dU[t][n])return yield dU[t][n].getDefaultConfigParams({setConfig:i,api:e});throw new Error(`style.ts(getDefaultConfigParams): 请检查图表类型和主题风格: ${t}, ${n}`)}))}({chartType:a.render,themeMode:r,setConfig:a,api:null});const s=yield oj({shareId:i.shareId,setConfig:a,getTableColumnValueFunc:()=>{}}),{data:l}=yield cW.post(`${e}/sql`,{config:s,set_id:t,data_start:o.dataRange.start,data_count:o.dataRange.end},{headers:{"X-Gini-Token":n}});this.total=this.generateTotal(l[0].data),this.chart.setOption(this.generateChartOption(l[0].data),{notMerge:!0})}catch(e){console.error("@components:wall-iharbour/analysis-of-startup-use: 组件渲染时发生错误",e)}this.props.gpui.params.interval>0&&(this.timer=setTimeout(this.renderChart,this.props.gpui.params.interval))}})),this.generateTotal=e=>{let t=e.reduce(((e,t)=>e+parseFloat(t.data["使用时长"])),0);if(t/=3600,t>Math.pow(10,8)){return{value:(t/Math.pow(10,8)).toFixed(2),unit:"亿"}}if(t>Math.pow(10,4)){return{value:(t/Math.pow(10,4)).toFixed(2),unit:"万"}}if(t>Math.pow(10,3)){return{value:(t/Math.pow(10,3)).toFixed(2),unit:"千"}}return{value:t,unit:""}},this.generateChartOption=e=>({tooltip:{show:!0,formatter:({seriesName:e,data:t})=>`${e}<br/>${t.name}: ${t.value}`},color:["#4499fa","#59d4d9","#4cd964","#ff9500","#ff3b30","#c894f6","#8c6fde","#767aee","#52c41a","#ff2d55","#ffcc00","#5ac8fa","#f478b8","#fae34c","#59d9a4"],series:[{name:"服务机时",type:"pie",radius:["38%","48%"],center:["50%","50%"],startAngle:0,minAngle:5,data:e.map((e=>({name:e.group["使用类型"]||"其他",value:Math.round(100*e.data["使用时长"]/3600)/100}))),label:{normal:{alignTo:"labelLine",formatter:({data:e,percent:t})=>`${e.name} ${t.toFixed(1)}%`,color:"#cde0ff"}}}]}),n.reaction((()=>e.gpui.params.padding),(e=>{this.padding=e||"10vh 4vh 4vh"}),{fireImmediately:!0})}componentDidMount(){this.chart=this.chart||uW.init(this.chartRef.current),window.addEventListener("resize",(()=>{this.chart.resize()})),n.reaction((()=>({baseURL:this.props.gpui.params.base_url,setId:this.props.gpui.params.set_id,deviceToken:this.props.gpui.params.deviceToken,interval:this.props.gpui.params.interval})),(()=>{this.renderChart()}),{fireImmediately:!0})}render(){return s.createElement("div",{className:"g__index",style:{padding:this.padding}},s.createElement("div",{className:c},s.createElement("div",{ref:this.chartRef,className:h}),s.createElement("div",{className:d},s.createElement("span",{className:f},"总机时"),s.createElement("span",{className:p,"data-text":this.total},this.total.value,s.createElement("span",null,this.total.unit)))))}};return l([n.observable],fU.prototype,"padding",void 0),l([n.observable],fU.prototype,"total",void 0),fU=l([function(e){if(!0===e.isMobxInjector&&console.warn("Mobx observer: You are trying to use 'observer' on a component that already has 'inject'. Please apply 'observer' before applying 'inject'"),J&&e.$$typeof===J)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&&e.$$typeof===Q){var n=e.render;if("function"!=typeof n)throw new Error("render property of ForwardRef was not a function");return t.forwardRef((function(){var e=arguments;return t.createElement(C,null,(function(){return n.apply(void 0,e)}))}))}return"function"!=typeof e||e.prototype&&e.prototype.render||e.isReactClass||Object.prototype.isPrototypeOf.call(t.Component,e)?Z(e):A(e)}],fU),fU}));
