define(["gpui-style-inject","react","mobx"],(function(e,t,i){"use strict";e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e;var n="default"in t?t.default:t,a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,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 r(e,t,i,n){var a,r=arguments.length,o=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(o=(r<3?a(o):r>3?a(t,i,o):a(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o}e("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 o="index-module_main__2HGM_",s="index-module_chart__DLm0K",l="index-module_name__3Tak8";if(e(".index-module_main__2HGM_ {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  width: 100%;\n  height: 100%; }\n  .index-module_main__2HGM_ .index-module_chart__DLm0K {\n    width: 60vw;\n    height: 60vw;\n    overflow: hidden; }\n  .index-module_main__2HGM_ .index-module_name__3Tak8 {\n    margin-top: 7vh;\n    line-height: 7vh;\n    font-size: 7vh;\n    color: #cde0ff; }\n"),!t.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!i.spy)throw new Error("mobx-react-lite requires mobx at least version 4 to be available");function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(this,arguments)}function h(){var e=t.useState(0)[1];return t.useCallback((function(){e((function(e){return e+1}))}),[])}function c(e){return i.getDependencyTree(e)}var d,p=1e4,f=new Set;function g(){void 0===d&&(d=setTimeout(m,1e4))}function m(){d=void 0;var e=Date.now();f.forEach((function(t){var i=t.current;i&&e>=i.cleanAt&&(i.reaction.dispose(),t.current=null,f.delete(t))})),f.size>0&&g()}var v={};function y(e){return"observer"+e}function x(e,t,a){void 0===t&&(t="observed"),void 0===a&&(a=v);var r,o=(a.useForceUpdate||h)(),s=n.useRef(null);if(!s.current){var l=new i.Reaction(y(t),(function(){u.mounted?o():(l.dispose(),s.current=null)})),u=function(e){return{cleanAt:Date.now()+p,reaction:e}}(l);s.current=u,r=s,f.add(r),g()}var d,m,x=s.current.reaction;if(n.useDebugValue(x,c),n.useEffect((function(){var e;return e=s,f.delete(e),s.current?s.current.mounted=!0:(s.current={reaction:new i.Reaction(y(t),(function(){o()})),cleanAt:1/0},o()),function(){s.current.reaction.dispose(),s.current=null}}),[]),x.track((function(){try{d=e()}catch(e){m=e}})),m)throw m;return d}function _(e,i){var n,a=u({forwardRef:!1},i),r=e.displayName||e.name,o=function(t,i){return x((function(){return e(t,i)}),r)};return o.displayName=r,n=a.forwardRef?t.memo(t.forwardRef(o)):t.memo(o),function(e,t){Object.keys(e).forEach((function(i){b[i]||Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))}))}(e,n),n.displayName=r,n}var b={$$typeof:!0,render:!0,compare:!0,type:!0};function w(e){var t=e.children,i=e.render,n=t||i;return"function"!=typeof n?null:x(n)}function S(e,t,i,n,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`"+i):o||s?null:new Error("Invalid prop `"+a+"` of type `"+typeof e[t]+"` supplied to `"+i+"`, expected `function`.")}w.propTypes={children:S,render:S},w.displayName="Observer";var M=0;var I={};function T(e){return I[e]||(I[e]=function(e){if("function"==typeof Symbol)return Symbol(e);var t="__$mobx-react "+e+" ("+M+")";return M++,t}(e)),I[e]}function A(e,t){if(C(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var i=Object.keys(e),n=Object.keys(t);if(i.length!==n.length)return!1;for(var a=0;a<i.length;a++)if(!Object.hasOwnProperty.call(t,i[a])||!C(e[i[a]],t[i[a]]))return!1;return!0}function C(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function D(e,t,i){Object.hasOwnProperty.call(e,t)?e[t]=i:Object.defineProperty(e,t,{enumerable:!1,configurable:!0,writable:!0,value:i})}var L=T("patchMixins"),P=T("patchedDefinition");function k(e,t){for(var i=this,n=arguments.length,a=new Array(n>2?n-2:0),r=2;r<n;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(i,a)}))}}function O(e,t){return function(){for(var i=arguments.length,n=new Array(i),a=0;a<i;a++)n[a]=arguments[a];k.call.apply(k,[this,e,t].concat(n))}}function R(e,t,i){var n=function(e,t){var i=e[L]=e[L]||{},n=i[t]=i[t]||{};return n.locks=n.locks||0,n.methods=n.methods||[],n}(e,t);n.methods.indexOf(i)<0&&n.methods.push(i);var a=Object.getOwnPropertyDescriptor(e,t);if(!a||!a[P]){var r=e[t],o=function e(t,i,n,a,r){var o,s=O(r,a);return(o={})[P]=!0,o.get=function(){return s},o.set=function(r){if(this===t)s=O(r,a);else{var o=e(this,i,n,a,r);Object.defineProperty(this,i,o)}},o.configurable=!0,o.enumerable=n,o}(e,t,a?a.enumerable:void 0,n,r);Object.defineProperty(e,t,o)}}var N=i.$mobx||"$mobx",E=T("isUnmounted"),z=T("skipRender"),B=T("isForcingUpdate");function V(e){var i=e.prototype;if(i.componentWillReact)throw new Error("The componentWillReact life-cycle event is no longer supported");if(e.__proto__!==t.PureComponent)if(i.shouldComponentUpdate){if(i.shouldComponentUpdate!==F)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}else i.shouldComponentUpdate=F;H(i,"props"),H(i,"state");var n=i.render;return i.render=function(){return G.call(this,n)},R(i,"componentWillUnmount",(function(){this.render[N]&&this.render[N].dispose(),this[E]=!0})),e}function G(e){var n=this;D(this,z,!1),D(this,B,!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 i.Reaction(r+".render()",(function(){if(!s&&(s=!0,!0!==n[E])){var e=!0;try{D(n,B,!0),n[z]||t.Component.prototype.forceUpdate.call(n),e=!1}finally{D(n,B,!1),e&&l.dispose()}}}));function u(){s=!1;var e=void 0,t=void 0;if(l.track((function(){try{t=i._allowStateChanges(!1,o)}catch(t){e=t}})),e)throw e;return t}return l.reactComponent=this,u[N]=l,this.render=u,u.call(this)}function F(e,t){return this.state!==t||!A(this.props,e)}function H(e,t){var n=T("reactProp_"+t+"_valueHolder"),a=T("reactProp_"+t+"_atomHolder");function r(){return this[a]||D(this,a,i.createAtom("reactive "+t)),this[a]}Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){var e=!1;return i._allowStateReadsStart&&i._allowStateReadsEnd&&(e=i._allowStateReadsStart(!0)),r.call(this).reportObserved(),i._allowStateReadsStart&&i._allowStateReadsEnd&&i._allowStateReadsEnd(e),this[n]},set:function(e){this[B]||A(this[n],e)?D(this,n,e):(D(this,n,e),D(this,z,!0),r.call(this).reportChanged(),D(this,z,!1))}})}var W="function"==typeof Symbol&&Symbol.for,U=W?Symbol.for("react.forward_ref"):"function"==typeof t.forwardRef&&t.forwardRef((function(e){return null})).$$typeof,Z=W?Symbol.for("react.memo"):"function"==typeof t.memo&&t.memo((function(e){return null})).$$typeof;function j(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'"),Z&&e.$$typeof===Z)throw new Error("Mobx observer: You are trying to use 'observer' on a function component wrapped in either another observer or 'React.memo'. The observer already applies 'React.memo' for you.");if(U&&e.$$typeof===U){var i=e.render;if("function"!=typeof i)throw new Error("render property of ForwardRef was not a function");return t.forwardRef((function(){var e=arguments;return t.createElement(w,null,(function(){return i.apply(void 0,e)}))}))}return"function"!=typeof e||e.prototype&&e.prototype.render||e.isReactClass||Object.prototype.isPrototypeOf.call(t.Component,e)?V(e):_(e)}if(!t.Component)throw new Error("mobx-react requires React to be available");if(!i.observable)throw new Error("mobx-react requires mobx to be available");function Y(e,t,i){return e(i={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&i.path)}},i.exports),i.exports}var X=2311;var q=function(){return X++};var K="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={},i=e.match(/Firefox\/([\d.]+)/),n=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge\/([\d.]+)/),r=/micromessenger/i.test(e);i&&(t.firefox=!0,t.version=i[1]);n&&(t.ie=!0,t.version=n[1]);a&&(t.edge=!0,t.version=a[1]);r&&(t.weChat=!0);return{browser:t,os:{},node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!t.ie&&!t.edge,pointerEventsSupported:"onpointerdown"in window&&(t.edge||t.ie&&t.version>=11),domSupported:"undefined"!=typeof document}}(navigator.userAgent),$={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},J={"[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},Q=Object.prototype.toString,ee=Array.prototype,te=ee.forEach,ie=ee.filter,ne=ee.slice,ae=ee.map,re=ee.reduce,oe={};function se(e){if(null==e||"object"!=typeof e)return e;var t=e,i=Q.call(e);if("[object Array]"===i){if(!ye(e)){t=[];for(var n=0,a=e.length;n<a;n++)t[n]=se(e[n])}}else if(J[i]){if(!ye(e)){var r=e.constructor;if(e.constructor.from)t=r.from(e);else{t=new r(e.length);for(n=0,a=e.length;n<a;n++)t[n]=se(e[n])}}}else if(!$[i]&&!ye(e)&&!ve(e))for(var o in t={},e)e.hasOwnProperty(o)&&(t[o]=se(e[o]));return t}function le(e,t,i){if(!ge(t)||!ge(e))return i?se(t):e;for(var n in t)if(t.hasOwnProperty(n)){var a=e[n],r=t[n];!ge(r)||!ge(a)||fe(r)||fe(a)||ve(r)||ve(a)||me(r)||me(a)||ye(r)||ye(a)?!i&&n in e||(e[n]=se(t[n])):le(a,r,i)}return e}function ue(e,t,i){for(var n in t)t.hasOwnProperty(n)&&(i?null!=t[n]:null==e[n])&&(e[n]=t[n]);return e}var he,ce=function(){return oe.createCanvas()};function de(e,t,i){if(e&&t)if(e.forEach&&e.forEach===te)e.forEach(t,i);else if(e.length===+e.length)for(var n=0,a=e.length;n<a;n++)t.call(i,e[n],n,e);else for(var r in e)e.hasOwnProperty(r)&&t.call(i,e[r],r,e)}function pe(e,t){var i=ne.call(arguments,2);return function(){return e.apply(t,i.concat(ne.call(arguments)))}}function fe(e){return"[object Array]"===Q.call(e)}function ge(e){var t=typeof e;return"function"===t||!!e&&"object"===t}function me(e){return!!$[Q.call(e)]}function ve(e){return"object"==typeof e&&"number"==typeof e.nodeType&&"object"==typeof e.ownerDocument}oe.createCanvas=function(){return document.createElement("canvas")};function ye(e){return e.__ec_primitive__}function xe(e){var t=fe(e);this.data={};var i=this;function n(e,n){t?i.set(e,n):i.set(n,e)}e instanceof xe?e.each(n):e&&de(e,n)}xe.prototype={constructor:xe,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 i in void 0!==t&&(e=pe(e,t)),this.data)this.data.hasOwnProperty(i)&&e(this.data[i],i)},removeKey:function(e){delete this.data[e]}};var _e={$override:function(e,t){"createCanvas"===e&&(he=null),oe[e]=t},clone:se,merge:le,mergeAll:function(e,t){for(var i=e[0],n=1,a=e.length;n<a;n++)i=le(i,e[n],t);return i},extend:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e},defaults:ue,createCanvas:ce,getContext:function(){return he||(he=ce().getContext("2d")),he},indexOf:function(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i}return-1},inherits:function(e,t){var i=e.prototype;function n(){}for(var a in n.prototype=t.prototype,e.prototype=new n,i)i.hasOwnProperty(a)&&(e.prototype[a]=i[a]);e.prototype.constructor=e,e.superClass=t},mixin:function(e,t,i){ue(e="prototype"in e?e.prototype:e,t="prototype"in t?t.prototype:t,i)},isArrayLike:function(e){if(e)return"string"!=typeof e&&"number"==typeof e.length},each:de,map:function(e,t,i){if(e&&t){if(e.map&&e.map===ae)return e.map(t,i);for(var n=[],a=0,r=e.length;a<r;a++)n.push(t.call(i,e[a],a,e));return n}},reduce:function(e,t,i,n){if(e&&t){if(e.reduce&&e.reduce===re)return e.reduce(t,i,n);for(var a=0,r=e.length;a<r;a++)i=t.call(n,i,e[a],a,e);return i}},filter:function(e,t,i){if(e&&t){if(e.filter&&e.filter===ie)return e.filter(t,i);for(var n=[],a=0,r=e.length;a<r;a++)t.call(i,e[a],a,e)&&n.push(e[a]);return n}},find:function(e,t,i){if(e&&t)for(var n=0,a=e.length;n<a;n++)if(t.call(i,e[n],n,e))return e[n]},bind:pe,curry:function(e){var t=ne.call(arguments,1);return function(){return e.apply(this,t.concat(ne.call(arguments)))}},isArray:fe,isFunction:function(e){return"function"==typeof e},isString:function(e){return"[object String]"===Q.call(e)},isObject:ge,isBuiltInObject:me,isTypedArray:function(e){return!!J[Q.call(e)]},isDom:ve,eqNaN:function(e){return e!=e},retrieve:function(e){for(var t=0,i=arguments.length;t<i;t++)if(null!=arguments[t])return arguments[t]},retrieve2:function(e,t){return null!=e?e:t},retrieve3:function(e,t,i){return null!=e?e:null!=t?t:i},slice:function(){return Function.call.apply(ne,arguments)},normalizeCssArray: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},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.__ec_primitive__=!0},isPrimitive:ye,createHashMap:function(e){return new xe(e)},concatArray:function(e,t){for(var i=new e.constructor(e.length+t.length),n=0;n<e.length;n++)i[n]=e[n];var a=e.length;for(n=0;n<t.length;n++)i[n+a]=t[n];return i},noop:function(){}},be="undefined"==typeof Float32Array?Array:Float32Array;function we(e){return Math.sqrt(Se(e))}function Se(e){return e[0]*e[0]+e[1]*e[1]}function Me(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}function Ie(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var Te={create:function(e,t){var i=new be(2);return null==e&&(e=0),null==t&&(t=0),i[0]=e,i[1]=t,i},copy:function(e,t){return e[0]=t[0],e[1]=t[1],e},clone:function(e){var t=new be(2);return t[0]=e[0],t[1]=e[1],t},set:function(e,t,i){return e[0]=t,e[1]=i,e},add:function(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e},scaleAndAdd:function(e,t,i,n){return e[0]=t[0]+i[0]*n,e[1]=t[1]+i[1]*n,e},sub:function(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e},len:we,length:we,lenSquare:Se,lengthSquare:Se,mul:function(e,t,i){return e[0]=t[0]*i[0],e[1]=t[1]*i[1],e},div:function(e,t,i){return e[0]=t[0]/i[0],e[1]=t[1]/i[1],e},dot:function(e,t){return e[0]*t[0]+e[1]*t[1]},scale:function(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e},normalize:function(e,t){var i=we(t);return 0===i?(e[0]=0,e[1]=0):(e[0]=t[0]/i,e[1]=t[1]/i),e},distance:Me,dist:Me,distanceSquare:Ie,distSquare:Ie,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e},lerp:function(e,t,i,n){return e[0]=t[0]+n*(i[0]-t[0]),e[1]=t[1]+n*(i[1]-t[1]),e},applyTransform:function(e,t,i){var n=t[0],a=t[1];return e[0]=i[0]*n+i[2]*a+i[4],e[1]=i[1]*n+i[3]*a+i[5],e},min:function(e,t,i){return e[0]=Math.min(t[0],i[0]),e[1]=Math.min(t[1],i[1]),e},max:function(e,t,i){return e[0]=Math.max(t[0],i[0]),e[1]=Math.max(t[1],i[1]),e}};function Ae(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}function Ce(e,t){return{target:e,topTarget:t&&t.topTarget}}Ae.prototype={constructor:Ae,_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(Ce(t,e),"dragstart",e.event))},_drag:function(e){var t=this._draggingTarget;if(t){var i=e.offsetX,n=e.offsetY,a=i-this._x,r=n-this._y;this._x=i,this._y=n,t.drift(a,r,e),this.dispatchToElement(Ce(t,e),"drag",e.event);var o=this.findHover(i,n,t).target,s=this._dropTarget;this._dropTarget=o,t!==o&&(s&&o!==s&&this.dispatchToElement(Ce(s,e),"dragleave",e.event),o&&o!==s&&this.dispatchToElement(Ce(o,e),"dragenter",e.event))}},_dragEnd:function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.dispatchToElement(Ce(t,e),"dragend",e.event),this._dropTarget&&this.dispatchToElement(Ce(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null}};var De=Ae,Le=Array.prototype.slice,Pe=function(e){this._$handlers={},this._$eventProcessor=e};function ke(e,t,i,n,a,r){var o=e._$handlers;if("function"==typeof i&&(a=n,n=i,i=null),!n||!t)return e;i=function(e,t){var i=e._$eventProcessor;return null!=t&&i&&i.normalizeQuery&&(t=i.normalizeQuery(t)),t}(e,i),o[t]||(o[t]=[]);for(var s=0;s<o[t].length;s++)if(o[t][s].h===n)return e;var l={h:n,one:r,query:i,ctx:a||e,callAtLast:n.zrEventfulCallAtLast},u=o[t].length-1,h=o[t][u];return h&&h.callAtLast?o[t].splice(u,0,l):o[t].push(l),e}Pe.prototype={constructor:Pe,one:function(e,t,i,n){return ke(this,e,t,i,n,!0)},on:function(e,t,i,n){return ke(this,e,t,i,n,!1)},isSilent:function(e){var t=this._$handlers;return!t[e]||!t[e].length},off:function(e,t){var i=this._$handlers;if(!e)return this._$handlers={},this;if(t){if(i[e]){for(var n=[],a=0,r=i[e].length;a<r;a++)i[e][a].h!==t&&n.push(i[e][a]);i[e]=n}i[e]&&0===i[e].length&&delete i[e]}else delete i[e];return this},trigger:function(e){var t=this._$handlers[e],i=this._$eventProcessor;if(t){var n=arguments,a=n.length;a>3&&(n=Le.call(n,1));for(var r=t.length,o=0;o<r;){var s=t[o];if(i&&i.filter&&null!=s.query&&!i.filter(e,s.query))o++;else{switch(a){case 1:s.h.call(s.ctx);break;case 2:s.h.call(s.ctx,n[1]);break;case 3:s.h.call(s.ctx,n[1],n[2]);break;default:s.h.apply(s.ctx,n)}s.one?(t.splice(o,1),r--):o++}}}return i&&i.afterTrigger&&i.afterTrigger(e),this},triggerWithContext:function(e){var t=this._$handlers[e],i=this._$eventProcessor;if(t){var n=arguments,a=n.length;a>4&&(n=Le.call(n,1,n.length-1));for(var r=n[n.length-1],o=t.length,s=0;s<o;){var l=t[s];if(i&&i.filter&&null!=l.query&&!i.filter(e,l.query))s++;else{switch(a){case 1:l.h.call(r);break;case 2:l.h.call(r,n[1]);break;case 3:l.h.call(r,n[1],n[2]);break;default:l.h.apply(r,n)}l.one?(t.splice(s,1),o--):s++}}}return i&&i.afterTrigger&&i.afterTrigger(e),this}};var Oe=Pe,Re=Math.log(2);function Ne(e,t,i,n,a,r){var o=n+"-"+a,s=e.length;if(r.hasOwnProperty(o))return r[o];if(1===t){var l=Math.round(Math.log((1<<s)-1&~a)/Re);return e[i][l]}for(var u=n|1<<i,h=i+1;n&1<<h;)h++;for(var c=0,d=0,p=0;d<s;d++){var f=1<<d;f&a||(c+=(p%2?-1:1)*e[i][d]*Ne(e,t-1,h,u,a|f,r),p++)}return r[o]=c,c}var Ee={buildTransformer:function(e,t){var i=[[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]]],n={},a=Ne(i,8,0,0,0,n);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)*Ne(i,7,0===o?1:0,1<<o,1<<s,n)/a*t[o];return function(e,t,i){var n=t*r[6]+i*r[7]+1;e[0]=(t*r[0]+i*r[1]+r[2])/n,e[1]=(t*r[3]+i*r[4]+r[5])/n}}}}.buildTransformer,ze=[];function Be(e,t,i,n,a){if(t.getBoundingClientRect&&K.domSupported&&!Ve(t)){var r=t.___zrEVENTSAVED||(t.___zrEVENTSAVED={}),o=function(e,t,i){for(var n=i?"invTrans":"trans",a=t[n],r=t.srcCoords,o=!0,s=[],l=[],u=0;u<4;u++){var h=e[u].getBoundingClientRect(),c=2*u,d=h.left,p=h.top;s.push(d,p),o=o&&r&&d===r[c]&&p===r[c+1],l.push(e[u].offsetLeft,e[u].offsetTop)}return o&&a?a:(t.srcCoords=s,t[n]=i?Ee(l,s):Ee(s,l))}(function(e,t){var i=t.markers;if(i)return i;i=t.markers=[];for(var n=["left","right"],a=["top","bottom"],r=0;r<4;r++){var o=document.createElement("div"),s=o.style,l=r%2,u=(r>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",a[u]+":0",n[1-l]+":auto",a[1-u]+":auto",""].join("!important;"),e.appendChild(o),i.push(o)}return i}(t,r),r,a);if(o)return o(e,i,n),!0}return!1}function Ve(e){return"CANVAS"===e.nodeName.toUpperCase()}var Ge={transformLocalCoord:function(e,t,i,n,a){return Be(ze,t,n,a,!0)&&Be(e,i,ze[0],ze[1])},transformCoordWithViewport:Be,isCanvasEl:Ve},Fe=Oe,He=Ge.isCanvasEl,We=Ge.transformCoordWithViewport,Ue="undefined"!=typeof window&&!!window.addEventListener,Ze=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,je=[];function Ye(e,t,i,n){return i=i||{},n||!K.canvasSupported?Xe(e,t,i):K.browser.firefox&&null!=t.layerX&&t.layerX!==t.offsetX?(i.zrX=t.layerX,i.zrY=t.layerY):null!=t.offsetX?(i.zrX=t.offsetX,i.zrY=t.offsetY):Xe(e,t,i),i}function Xe(e,t,i){if(K.domSupported&&e.getBoundingClientRect){var n=t.clientX,a=t.clientY;if(He(e)){var r=e.getBoundingClientRect();return i.zrX=n-r.left,void(i.zrY=a-r.top)}if(We(je,e,n,a))return i.zrX=je[0],void(i.zrY=je[1])}i.zrX=i.zrY=0}function qe(e){return e||window.event}var Ke={Dispatcher:Fe,clientToLocal:Ye,getNativeEvent:qe,normalizeEvent:function(e,t,i){if(null!=(t=qe(t)).zrX)return t;var n=t.type;if(n&&n.indexOf("touch")>=0){var a="touchend"!==n?t.targetTouches[0]:t.changedTouches[0];a&&Ye(e,a,t,i)}else Ye(e,t,t,i),t.zrDelta=t.wheelDelta?t.wheelDelta/120:-(t.detail||0)/3;var r=t.button;return null==t.which&&void 0!==r&&Ze.test(t.type)&&(t.which=1&r?1:2&r?3:4&r?2:0),t},addEventListener:function(e,t,i,n){Ue?e.addEventListener(t,i,n):e.attachEvent("on"+t,i)},removeEventListener:function(e,t,i,n){Ue?e.removeEventListener(t,i,n):e.detachEvent("on"+t,i)},stop:Ue?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}},$e=function(){this._track=[]};function Je(e){var t=e[1][0]-e[0][0],i=e[1][1]-e[0][1];return Math.sqrt(t*t+i*i)}$e.prototype={constructor:$e,recognize:function(e,t,i){return this._doTrack(e,t,i),this._recognize(e)},clear:function(){return this._track.length=0,this},_doTrack:function(e,t,i){var n=e.touches;if(n){for(var a={points:[],touches:[],target:t,event:e},r=0,o=n.length;r<o;r++){var s=n[r],l=Ke.clientToLocal(i,s,{});a.points.push([l.zrX,l.zrY]),a.touches.push(s)}this._track.push(a)}},_recognize:function(e){for(var t in Qe)if(Qe.hasOwnProperty(t)){var i=Qe[t](this._track,e);if(i)return i}}};var Qe={pinch:function(e,t){var i=e.length;if(i){var n,a=(e[i-1]||{}).points,r=(e[i-2]||{}).points||a;if(r&&r.length>1&&a&&a.length>1){var o=Je(a)/Je(r);!isFinite(o)&&(o=1),t.pinchScale=o;var s=[((n=a)[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2];return t.pinchX=s[0],t.pinchY=s[1],{type:"pinch",target:e[0].target,event:t}}}}},et=$e;function tt(){Ke.stop(this.event)}function it(){}it.prototype.dispose=function(){};var nt=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],at=function(e,t,i,n){Oe.call(this),this.storage=e,this.painter=t,this.painterRoot=n,i=i||new it,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,De.call(this),this.setHandlerProxy(i)};function rt(e,t,i){if(e[e.rectHover?"rectContain":"contain"](t,i)){for(var n,a=e;a;){if(a.clipPath&&!a.clipPath.contain(t,i))return!1;a.silent&&(n=!0),a=a.parent}return!n||"silent"}return!1}function ot(e,t,i){var n=e.painter;return t<0||t>n.getWidth()||i<0||i>n.getHeight()}at.prototype={constructor:at,setHandlerProxy:function(e){this.proxy&&this.proxy.dispose(),e&&(_e.each(nt,(function(t){e.on&&e.on(t,this[t],this)}),this),e.handler=this),this.proxy=e},mousemove:function(e){var t=e.zrX,i=e.zrY,n=ot(this,t,i),a=this._hovered,r=a.target;r&&!r.__zr&&(r=(a=this.findHover(a.x,a.y)).target);var o=this._hovered=n?{x:t,y:i}:this.findHover(t,i),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,i=e.zrIsToLocalDOM;"only_globalout"!==t&&this.dispatchToElement(this._hovered,"mouseout",e),"no_globalout"!==t&&!i&&this.trigger("globalout",{type:"globalout",event:e})},resize:function(e){this._hovered={}},dispatch:function(e,t){var i=this[e];i&&i.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,i){var n=(e=e||{}).target;if(!n||!n.silent){for(var a="on"+t,r=function(e,t,i){return{type:e,event:i,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:i.zrX,offsetY:i.zrY,gestureEvent:i.gestureEvent,pinchX:i.pinchX,pinchY:i.pinchY,pinchScale:i.pinchScale,wheelDelta:i.zrDelta,zrByTouch:i.zrByTouch,which:i.which,stop:tt}}(t,e,i);n&&(n[a]&&(r.cancelBubble=n[a].call(n,r)),n.trigger(t,r),n=n.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,i){for(var n=this.storage.getDisplayList(),a={x:e,y:t},r=n.length-1;r>=0;r--){var o;if(n[r]!==i&&!n[r].ignore&&(o=rt(n[r],e,t))&&(!a.topTarget&&(a.topTarget=n[r]),"silent"!==o)){a.target=n[r];break}}return a},processGesture:function(e,t){this._gestureMgr||(this._gestureMgr=new et);var i=this._gestureMgr;"start"===t&&i.clear();var n=i.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if("end"===t&&i.clear(),n){var a=n.type;e.gestureEvent=a,this.dispatchToElement({target:n.target},a,n.event)}}},_e.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(e){at.prototype[e]=function(t){var i,n,a=t.zrX,r=t.zrY,o=ot(this,a,r);if("mouseup"===e&&o||(n=(i=this.findHover(a,r)).target),"mousedown"===e)this._downEl=n,this._downPoint=[t.zrX,t.zrY],this._upEl=n;else if("mouseup"===e)this._upEl=n;else if("click"===e){if(this._downEl!==this._upEl||!this._downPoint||Te.dist(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,e,t)}})),_e.mixin(at,Oe),_e.mixin(at,De);var st=at,lt="undefined"==typeof Float32Array?Array:Float32Array;function ut(){var e=new lt(6);return ht(e),e}function ht(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function ct(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 dt={create:ut,identity:ht,copy:ct,mul:function(e,t,i){var n=t[0]*i[0]+t[2]*i[1],a=t[1]*i[0]+t[3]*i[1],r=t[0]*i[2]+t[2]*i[3],o=t[1]*i[2]+t[3]*i[3],s=t[0]*i[4]+t[2]*i[5]+t[4],l=t[1]*i[4]+t[3]*i[5]+t[5];return e[0]=n,e[1]=a,e[2]=r,e[3]=o,e[4]=s,e[5]=l,e},translate:function(e,t,i){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+i[0],e[5]=t[5]+i[1],e},rotate:function(e,t,i){var n=t[0],a=t[2],r=t[4],o=t[1],s=t[3],l=t[5],u=Math.sin(i),h=Math.cos(i);return e[0]=n*h+o*u,e[1]=-n*u+o*h,e[2]=a*h+s*u,e[3]=-a*u+h*s,e[4]=h*r+u*l,e[5]=h*l-u*r,e},scale:function(e,t,i){var n=i[0],a=i[1];return e[0]=t[0]*n,e[1]=t[1]*a,e[2]=t[2]*n,e[3]=t[3]*a,e[4]=t[4]*n,e[5]=t[5]*a,e},invert:function(e,t){var i=t[0],n=t[2],a=t[4],r=t[1],o=t[3],s=t[5],l=i*o-r*n;return l?(l=1/l,e[0]=o*l,e[1]=-r*l,e[2]=-n*l,e[3]=i*l,e[4]=(n*s-o*a)*l,e[5]=(r*a-i*s)*l,e):null},clone:function(e){var t=ut();return ct(t,e),t}},pt=dt.identity;function ft(e){return e>5e-5||e<-5e-5}var gt=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},mt=gt.prototype;mt.transform=null,mt.needLocalTransform=function(){return ft(this.rotation)||ft(this.position[0])||ft(this.position[1])||ft(this.scale[0]-1)||ft(this.scale[1]-1)};var vt=[];mt.updateTransform=function(){var e=this.parent,t=e&&e.transform,i=this.needLocalTransform(),n=this.transform;if(i||t){n=n||dt.create(),i?this.getLocalTransform(n):pt(n),t&&(i?dt.mul(n,e.transform,n):dt.copy(n,e.transform)),this.transform=n;var a=this.globalScaleRatio;if(null!=a&&1!==a){this.getGlobalScale(vt);var r=vt[0]<0?-1:1,o=vt[1]<0?-1:1,s=((vt[0]-r)*a+r)/vt[0]||0,l=((vt[1]-o)*a+o)/vt[1]||0;n[0]*=s,n[1]*=s,n[2]*=l,n[3]*=l}this.invTransform=this.invTransform||dt.create(),dt.invert(this.invTransform,n)}else n&&pt(n)},mt.getLocalTransform=function(e){return gt.getLocalTransform(this,e)},mt.setTransform=function(e){var t=this.transform,i=e.dpr||1;t?e.setTransform(i*t[0],i*t[1],i*t[2],i*t[3],i*t[4],i*t[5]):e.setTransform(i,0,0,i,0,0)},mt.restoreTransform=function(e){var t=e.dpr||1;e.setTransform(t,0,0,t,0,0)};var yt=[],xt=dt.create();mt.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],i=e[2]*e[2]+e[3]*e[3],n=this.position,a=this.scale;ft(t-1)&&(t=Math.sqrt(t)),ft(i-1)&&(i=Math.sqrt(i)),e[0]<0&&(t=-t),e[3]<0&&(i=-i),n[0]=e[4],n[1]=e[5],a[0]=t,a[1]=i,this.rotation=Math.atan2(-e[1]/i,e[0]/t)}},mt.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(dt.mul(yt,e.invTransform,t),t=yt);var i=this.origin;i&&(i[0]||i[1])&&(xt[4]=i[0],xt[5]=i[1],dt.mul(yt,t,xt),yt[4]-=i[0],yt[5]-=i[1],t=yt),this.setLocalTransform(t)}},mt.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)},mt.transformCoordToLocal=function(e,t){var i=[e,t],n=this.invTransform;return n&&Te.applyTransform(i,i,n),i},mt.transformCoordToGlobal=function(e,t){var i=[e,t],n=this.transform;return n&&Te.applyTransform(i,i,n),i},gt.getLocalTransform=function(e,t){pt(t=t||[]);var i=e.origin,n=e.scale||[1,1],a=e.rotation||0,r=e.position||[0,0];return i&&(t[4]-=i[0],t[5]-=i[1]),dt.scale(t,t,n),a&&dt.rotate(t,t,a),i&&(t[4]+=i[0],t[5]+=i[1]),t[4]+=r[0],t[5]+=r[1],t};var _t=gt,bt={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,i=.1;return 0===e?0:1===e?1:(!i||i<1?(i=1,t=.1):t=.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4))},elasticOut:function(e){var t,i=.1;return 0===e?0:1===e?1:(!i||i<1?(i=1,t=.1):t=.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/.4)+1)},elasticInOut:function(e){var t,i=.1,n=.4;return 0===e?0:1===e?1:(!i||i<1?(i=1,t=.1):t=n*Math.asin(1/i)/(2*Math.PI),(e*=2)<1?i*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*.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-bt.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*bt.bounceIn(2*e):.5*bt.bounceOut(2*e-1)+.5}},wt=bt;function St(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}St.prototype={constructor:St,step:function(e,t){if(this._initialized||(this._startTime=e+this._delay,this._initialized=!0),this._paused)this._pausedTime+=t;else{var i=(e-this._startTime-this._pausedTime)/this._life;if(!(i<0)){i=Math.min(i,1);var n=this.easing,a="string"==typeof n?wt[n]:n,r="function"==typeof a?a(i):i;return this.fire("frame",r),1===i?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 Mt=St,It=function(){this.head=null,this.tail=null,this._len=0},Tt=It.prototype;Tt.insert=function(e){var t=new At(e);return this.insertEntry(t),t},Tt.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++},Tt.remove=function(e){var t=e.prev,i=e.next;t?t.next=i:this.head=i,i?i.prev=t:this.tail=t,e.next=e.prev=null,this._len--},Tt.len=function(){return this._len},Tt.clear=function(){this.head=this.tail=null,this._len=0};var At=function(e){this.value=e,this.next,this.prev},Ct=function(e){this._list=new It,this._map={},this._maxSize=e||10,this._lastRemovedEntry=null},Dt=Ct.prototype;Dt.put=function(e,t){var i=this._list,n=this._map,a=null;if(null==n[e]){var r=i.len(),o=this._lastRemovedEntry;if(r>=this._maxSize&&r>0){var s=i.head;i.remove(s),delete n[s.key],a=s.value,this._lastRemovedEntry=s}o?o.value=t:o=new At(t),o.key=e,i.insertEntry(o),n[e]=o}return a},Dt.get=function(e){var t=this._map[e],i=this._list;if(null!=t)return t!==i.tail&&(i.remove(t),i.insertEntry(t)),t.value},Dt.clear=function(){this._list.clear(),this._map={}};var Lt=Ct,Pt={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 kt(e){return(e=Math.round(e))<0?0:e>255?255:e}function Ot(e){return e<0?0:e>1?1:e}function Rt(e){return e.length&&"%"===e.charAt(e.length-1)?kt(parseFloat(e)/100*255):kt(parseInt(e,10))}function Nt(e){return e.length&&"%"===e.charAt(e.length-1)?Ot(parseFloat(e)/100):Ot(parseFloat(e))}function Et(e,t,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?e+(t-e)*i*6:2*i<1?t:3*i<2?e+(t-e)*(2/3-i)*6:e}function zt(e,t,i){return e+(t-e)*i}function Bt(e,t,i,n,a){return e[0]=t,e[1]=i,e[2]=n,e[3]=a,e}function Vt(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Gt=new Lt(20),Ft=null;function Ht(e,t){Ft&&Vt(Ft,t),Ft=Gt.put(e,Ft||t.slice())}function Wt(e,t){if(e){t=t||[];var i=Gt.get(e);if(i)return Vt(t,i);var n,a=(e+="").replace(/ /g,"").toLowerCase();if(a in Pt)return Vt(t,Pt[a]),Ht(e,t),t;if("#"===a.charAt(0))return 4===a.length?(n=parseInt(a.substr(1),16))>=0&&n<=4095?(Bt(t,(3840&n)>>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,1),Ht(e,t),t):void Bt(t,0,0,0,1):7===a.length?(n=parseInt(a.substr(1),16))>=0&&n<=16777215?(Bt(t,(16711680&n)>>16,(65280&n)>>8,255&n,1),Ht(e,t),t):void Bt(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 Bt(t,0,0,0,1);u=Nt(l.pop());case"rgb":return 3!==l.length?void Bt(t,0,0,0,1):(Bt(t,Rt(l[0]),Rt(l[1]),Rt(l[2]),u),Ht(e,t),t);case"hsla":return 4!==l.length?void Bt(t,0,0,0,1):(l[3]=Nt(l[3]),Ut(l,t),Ht(e,t),t);case"hsl":return 3!==l.length?void Bt(t,0,0,0,1):(Ut(l,t),Ht(e,t),t);default:return}}Bt(t,0,0,0,1)}}function Ut(e,t){var i=(parseFloat(e[0])%360+360)%360/360,n=Nt(e[1]),a=Nt(e[2]),r=a<=.5?a*(n+1):a+n-a*n,o=2*a-r;return Bt(t=t||[],kt(255*Et(o,r,i+1/3)),kt(255*Et(o,r,i)),kt(255*Et(o,r,i-1/3)),1),4===e.length&&(t[3]=e[3]),t}function Zt(e,t,i){if(t&&t.length&&e>=0&&e<=1){i=i||[];var n=e*(t.length-1),a=Math.floor(n),r=Math.ceil(n),o=t[a],s=t[r],l=n-a;return i[0]=kt(zt(o[0],s[0],l)),i[1]=kt(zt(o[1],s[1],l)),i[2]=kt(zt(o[2],s[2],l)),i[3]=Ot(zt(o[3],s[3],l)),i}}function jt(e,t,i){if(t&&t.length&&e>=0&&e<=1){var n=e*(t.length-1),a=Math.floor(n),r=Math.ceil(n),o=Wt(t[a]),s=Wt(t[r]),l=n-a,u=Yt([kt(zt(o[0],s[0],l)),kt(zt(o[1],s[1],l)),kt(zt(o[2],s[2],l)),Ot(zt(o[3],s[3],l))],"rgba");return i?{color:u,leftIndex:a,rightIndex:r,value:n}:u}}function Yt(e,t){if(e&&e.length){var i=e[0]+","+e[1]+","+e[2];return"rgba"!==t&&"hsva"!==t&&"hsla"!==t||(i+=","+e[3]),t+"("+i+")"}}var Xt={parse:Wt,lift:function(e,t){var i=Wt(e);if(i){for(var n=0;n<3;n++)i[n]=t<0?i[n]*(1-t)|0:(255-i[n])*t+i[n]|0,i[n]>255?i[n]=255:e[n]<0&&(i[n]=0);return Yt(i,4===i.length?"rgba":"rgb")}},toHex:function(e){var t=Wt(e);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)},fastLerp:Zt,fastMapToColor:Zt,lerp:jt,mapToColor:jt,modifyHSL:function(e,t,i,n){if(e=Wt(e))return e=function(e){if(e){var t,i,n=e[0]/255,a=e[1]/255,r=e[2]/255,o=Math.min(n,a,r),s=Math.max(n,a,r),l=s-o,u=(s+o)/2;if(0===l)t=0,i=0;else{i=u<.5?l/(s+o):l/(2-s-o);var h=((s-n)/6+l/2)/l,c=((s-a)/6+l/2)/l,d=((s-r)/6+l/2)/l;n===s?t=d-c:a===s?t=1/3+h-d:r===s&&(t=2/3+c-h),t<0&&(t+=1),t>1&&(t-=1)}var p=[360*t,i,u];return null!=e[3]&&p.push(e[3]),p}}(e),null!=t&&(e[0]=function(e){return(e=Math.round(e))<0?0:e>360?360:e}(t)),null!=i&&(e[1]=Nt(i)),null!=n&&(e[2]=Nt(n)),Yt(Ut(e),"rgba")},modifyAlpha:function(e,t){if((e=Wt(e))&&null!=t)return e[3]=Ot(t),Yt(e,"rgba")},stringify:Yt},qt=_e.isArrayLike,Kt=Array.prototype.slice;function $t(e,t){return e[t]}function Jt(e,t,i){e[t]=i}function Qt(e,t,i){return(t-e)*i+e}function ei(e,t,i){return i>.5?t:e}function ti(e,t,i,n,a){var r=e.length;if(1===a)for(var o=0;o<r;o++)n[o]=Qt(e[o],t[o],i);else{var s=r&&e[0].length;for(o=0;o<r;o++)for(var l=0;l<s;l++)n[o][l]=Qt(e[o][l],t[o][l],i)}}function ii(e,t,i){var n=e.length,a=t.length;if(n!==a)if(n>a)e.length=a;else for(var r=n;r<a;r++)e.push(1===i?t[r]:Kt.call(t[r]));var o=e[0]&&e[0].length;for(r=0;r<e.length;r++)if(1===i)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 ni(e,t,i){if(e===t)return!0;var n=e.length;if(n!==t.length)return!1;if(1===i){for(var a=0;a<n;a++)if(e[a]!==t[a])return!1}else{var r=e[0].length;for(a=0;a<n;a++)for(var o=0;o<r;o++)if(e[a][o]!==t[a][o])return!1}return!0}function ai(e,t,i,n,a,r,o,s,l){var u=e.length;if(1===l)for(var h=0;h<u;h++)s[h]=ri(e[h],t[h],i[h],n[h],a,r,o);else{var c=e[0].length;for(h=0;h<u;h++)for(var d=0;d<c;d++)s[h][d]=ri(e[h][d],t[h][d],i[h][d],n[h][d],a,r,o)}}function ri(e,t,i,n,a,r,o){var s=.5*(i-e),l=.5*(n-t);return(2*(t-i)+s+l)*o+(-3*(t-i)-2*s-l)*r+s*a+t}function oi(e){if(qt(e)){var t=e.length;if(qt(e[0])){for(var i=[],n=0;n<t;n++)i.push(Kt.call(e[n]));return i}return Kt.call(e)}return e}function si(e){return e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.floor(e[2]),"rgba("+e.join(",")+")"}function li(e,t,i,n,a,r){var o=e._getter,s=e._setter,l="spline"===t,u=n.length;if(u){var h,c=n[0].value,d=qt(c),p=!1,f=!1,g=d?function(e){var t=e[e.length-1].value;return qt(t&&t[0])?2:1}(n):0;n.sort((function(e,t){return e.time-t.time})),h=n[u-1].time;for(var m=[],v=[],y=n[0].value,x=!0,_=0;_<u;_++){m.push(n[_].time/h);var b=n[_].value;if(d&&ni(b,y,g)||!d&&b===y||(x=!1),y=b,"string"==typeof b){var w=Xt.parse(b);w?(b=w,p=!0):f=!0}v.push(b)}if(r||!x){var S=v[u-1];for(_=0;_<u-1;_++)d?ii(v[_],S,g):!isNaN(v[_])||isNaN(S)||f||p||(v[_]=S);d&&ii(o(e._target,a),S,g);var M,I,T,A,C,D=0,L=0;if(p)var P=[0,0,0,0];var k=new Mt({target:e._target,life:h,loop:e._loop,delay:e._delay,onframe:function(e,t){var i;if(t<0)i=0;else if(t<L){for(i=Math.min(D+1,u-1);i>=0&&!(m[i]<=t);i--);i=Math.min(i,u-2)}else{for(i=D;i<u&&!(m[i]>t);i++);i=Math.min(i-1,u-2)}D=i,L=t;var n=m[i+1]-m[i];if(0!==n)if(M=(t-m[i])/n,l)if(T=v[i],I=v[0===i?i:i-1],A=v[i>u-2?u-1:i+1],C=v[i>u-3?u-1:i+2],d)ai(I,T,A,C,M,M*M,M*M*M,o(e,a),g);else{if(p)r=ai(I,T,A,C,M,M*M,M*M*M,P,1),r=si(P);else{if(f)return ei(T,A,M);r=ri(I,T,A,C,M,M*M,M*M*M)}s(e,a,r)}else if(d)ti(v[i],v[i+1],M,o(e,a),g);else{var r;if(p)ti(v[i],v[i+1],M,P,1),r=si(P);else{if(f)return ei(v[i],v[i+1],M);r=Qt(v[i],v[i+1],M)}s(e,a,r)}},ondestroy:i});return t&&"spline"!==t&&(k.easing=t),k}}}var ui=function(e,t,i,n){this._tracks={},this._target=e,this._loop=t||!1,this._getter=i||$t,this._setter=n||Jt,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};ui.prototype={when:function(e,t){var i=this._tracks;for(var n in t)if(t.hasOwnProperty(n)){if(!i[n]){i[n]=[];var a=this._getter(this._target,n);if(null==a)continue;0!==e&&i[n].push({time:0,value:oi(a)})}i[n].push({time:e,value:t[n]})}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,i=0;i<t;i++)e[i].call(this)},start:function(e,t){var i,n=this,a=0,r=function(){--a||n._doneCallback()};for(var o in this._tracks)if(this._tracks.hasOwnProperty(o)){var s=li(this,e,r,this._tracks[o],o,t);s&&(this._clipList.push(s),a++,this.animation&&this.animation.addClip(s),i=s)}if(i){var l=i.onframe;i.onframe=function(e,t){l(e,t);for(var i=0;i<n._onframeList.length;i++)n._onframeList[i](e,t)}}return a||this._doneCallback(),this},stop:function(e){for(var t=this._clipList,i=this.animation,n=0;n<t.length;n++){var a=t[n];e&&a.onframe(this._target,1),i&&i.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=ui,ci=1;"undefined"!=typeof window&&(ci=Math.max(window.devicePixelRatio||1,1));var di={debugMode:0,devicePixelRatio:ci},pi=function(){},fi=_e.isString,gi=_e.isFunction,mi=_e.isObject,vi=_e.isArrayLike,yi=_e.indexOf,xi=function(){this.animators=[]};function _i(e,t,i,n,a,r,o,s){fi(n)?(r=a,a=n,n=0):gi(a)?(r=a,a="linear",n=0):gi(n)?(r=n,n=0):gi(i)?(r=i,i=500):i||(i=500),e.stopAnimation(),function e(t,i,n,a,r,o,s){var l={},u=0;for(var h in a)a.hasOwnProperty(h)&&(null!=n[h]?mi(a[h])&&!vi(a[h])?e(t,i?i+"."+h:h,n[h],a[h],r,o,s):(s?(l[h]=n[h],bi(t,i,h,a[h])):l[h]=a[h],u++):null==a[h]||s||bi(t,i,h,a[h]));u>0&&t.animate(i,!1).when(null==r?500:r,l).delay(o||0)}(e,"",e,t,i,n,s);var l=e.animators.slice(),u=l.length;function h(){--u||r&&r()}u||r&&r();for(var c=0;c<l.length;c++)l[c].done(h).start(a,o)}function bi(e,t,i,n){if(t){var a={};a[t]={},a[t][i]=n,e.attr(a)}else e.attr(i,n)}xi.prototype={constructor:xi,animate:function(e,t){var i,n=!1,a=this,r=this.__zr;if(e){var o=e.split("."),s=a;n="shape"===o[0];for(var l=0,u=o.length;l<u;l++)s&&(s=s[o[l]]);s&&(i=s)}else i=a;if(i){var h=a.animators,c=new hi(i,t);return c.during((function(e){a.dirty(n)})).done((function(){h.splice(yi(h,c),1)})),h.push(c),r&&r.animation.addAnimator(c),c}pi('Property "'+e+'" is not existed in element '+a.id)},stopAnimation:function(e){for(var t=this.animators,i=t.length,n=0;n<i;n++)t[n].stop(e);return t.length=0,this},animateTo:function(e,t,i,n,a,r){_i(this,e,t,i,n,a,r)},animateFrom:function(e,t,i,n,a,r){_i(this,e,t,i,n,a,r,!0)}};var wi=xi,Si=function(e){_t.call(this,e),Oe.call(this,e),wi.call(this,e),this.id=e.id||q()};Si.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 i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=e,i[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 i=this[e];i||(i=this[e]=[]),i[0]=t[0],i[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(_e.isObject(e))for(var i in e)e.hasOwnProperty(i)&&this.attrKV(i,e[i]);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 i=0;i<t.length;i++)e.animation.addAnimator(t[i]);this.clipPath&&this.clipPath.addSelfToZr(e)},removeSelfFromZr:function(e){this.__zr=null;var t=this.animators;if(t)for(var i=0;i<t.length;i++)e.animation.removeAnimator(t[i]);this.clipPath&&this.clipPath.removeSelfFromZr(e)}},_e.mixin(Si,wi),_e.mixin(Si,_t),_e.mixin(Si,Oe);var Mi,Ii,Ti,Ai,Ci=Si,Di=Te.applyTransform,Li=Math.min,Pi=Math.max;function ki(e,t,i,n){i<0&&(e+=i,i=-i),n<0&&(t+=n,n=-n),this.x=e,this.y=t,this.width=i,this.height=n}ki.prototype={constructor:ki,union:function(e){var t=Li(e.x,this.x),i=Li(e.y,this.y);this.width=Pi(e.x+e.width,this.x+this.width)-t,this.height=Pi(e.y+e.height,this.y+this.height)-i,this.x=t,this.y=i},applyTransform:(Mi=[],Ii=[],Ti=[],Ai=[],function(e){if(e){Mi[0]=Ti[0]=this.x,Mi[1]=Ai[1]=this.y,Ii[0]=Ai[0]=this.x+this.width,Ii[1]=Ti[1]=this.y+this.height,Di(Mi,Mi,e),Di(Ii,Ii,e),Di(Ti,Ti,e),Di(Ai,Ai,e),this.x=Li(Mi[0],Ii[0],Ti[0],Ai[0]),this.y=Li(Mi[1],Ii[1],Ti[1],Ai[1]);var t=Pi(Mi[0],Ii[0],Ti[0],Ai[0]),i=Pi(Mi[1],Ii[1],Ti[1],Ai[1]);this.width=t-this.x,this.height=i-this.y}}),calculateTransform:function(e){var t=this,i=e.width/t.width,n=e.height/t.height,a=dt.create();return dt.translate(a,a,[-t.x,-t.y]),dt.scale(a,a,[i,n]),dt.translate(a,a,[e.x,e.y]),a},intersect:function(e){if(!e)return!1;e instanceof ki||(e=ki.create(e));var t=this,i=t.x,n=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!(n<o||s<i||r<l||u<a)},contain:function(e,t){return e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height},clone:function(){return new ki(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}}},ki.create=function(e){return new ki(e.x,e.y,e.width,e.height)};var Oi=ki,Ri=function(e){for(var t in e=e||{},Ci.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,i=0;i<t.length;i++)if(t[i].name===e)return t[i]},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 i=this._children,n=i.indexOf(t);n>=0&&(i.splice(n,0,e),this._doAdd(e))}return this},_doAdd:function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__storage,i=this.__zr;t&&t!==e.__storage&&(t.addToStorage(e),e instanceof Ri&&e.addChildrenToStorage(t)),i&&i.refresh()},remove:function(e){var t=this.__zr,i=this.__storage,n=this._children,a=_e.indexOf(n,e);return a<0||(n.splice(a,1),e.parent=null,i&&(i.delFromStorage(e),e instanceof Ri&&e.delChildrenFromStorage(i)),t&&t.refresh()),this},removeAll:function(){var e,t,i=this._children,n=this.__storage;for(t=0;t<i.length;t++)e=i[t],n&&(n.delFromStorage(e),e instanceof Ri&&e.delChildrenFromStorage(n)),e.parent=null;return i.length=0,this},eachChild:function(e,t){for(var i=this._children,n=0;n<i.length;n++){var a=i[n];e.call(t,a,n)}return this},traverse:function(e,t){for(var i=0;i<this._children.length;i++){var n=this._children[i];e.call(t,n),"group"===n.type&&n.traverse(e,t)}return this},addChildrenToStorage:function(e){for(var t=0;t<this._children.length;t++){var i=this._children[t];e.addToStorage(i),i instanceof Ri&&i.addChildrenToStorage(e)}},delChildrenFromStorage:function(e){for(var t=0;t<this._children.length;t++){var i=this._children[t];e.delFromStorage(i),i instanceof Ri&&i.delChildrenFromStorage(e)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(e){for(var t=null,i=new Oi(0,0,0,0),n=e||this._children,a=[],r=0;r<n.length;r++){var o=n[r];if(!o.ignore&&!o.invisible){var s=o.getBoundingRect(),l=o.getLocalTransform(a);l?(i.copy(s),i.applyTransform(l),(t=t||i.clone()).union(i)):(t=t||s.clone()).union(s)}}return t||i}},_e.inherits(Ri,Ci);var Ni=Ri;function Ei(e,t,i,n){var a=t+1;if(a===i)return 1;if(n(e[a++],e[t])<0){for(;a<i&&n(e[a],e[a-1])<0;)a++;!function(e,t,i){i--;for(;t<i;){var n=e[t];e[t++]=e[i],e[i--]=n}}(e,t,a)}else for(;a<i&&n(e[a],e[a-1])>=0;)a++;return a-t}function zi(e,t,i,n,a){for(n===t&&n++;n<i;n++){for(var r,o=e[n],s=t,l=n;s<l;)a(o,e[r=s+l>>>1])<0?l=r:s=r+1;var u=n-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 Bi(e,t,i,n,a,r){var o=0,s=0,l=1;if(r(e,t[i+a])>0){for(s=n-a;l<s&&r(e,t[i+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[i+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 h=o+(l-o>>>1);r(e,t[i+h])>0?o=h+1:l=h}return l}function Vi(e,t,i,n,a,r){var o=0,s=0,l=1;if(r(e,t[i+a])<0){for(s=a+1;l<s&&r(e,t[i+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=n-a;l<s&&r(e,t[i+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 h=o+(l-o>>>1);r(e,t[i+h])<0?l=h:o=h+1}return l}function Gi(e,t){var i,n,a=7,r=0;e.length;var o=[];function s(s){var l=i[s],u=n[s],h=i[s+1],c=n[s+1];n[s]=u+c,s===r-3&&(i[s+1]=i[s+2],n[s+1]=n[s+2]),r--;var d=Vi(e[h],e,l,u,0,t);l+=d,0!==(u-=d)&&0!==(c=Bi(e[l+u-1],e,h,c,c-1,t))&&(u<=c?function(i,n,r,s){var l=0;for(l=0;l<n;l++)o[l]=e[i+l];var u=0,h=r,c=i;if(e[c++]=e[h++],0==--s){for(l=0;l<n;l++)e[c+l]=o[u+l];return}if(1===n){for(l=0;l<s;l++)e[c+l]=e[h+l];return void(e[c+s]=o[u])}var d,p,f,g=a;for(;;){d=0,p=0,f=!1;do{if(t(e[h],o[u])<0){if(e[c++]=e[h++],p++,d=0,0==--s){f=!0;break}}else if(e[c++]=o[u++],d++,p=0,1==--n){f=!0;break}}while((d|p)<g);if(f)break;do{if(0!==(d=Vi(e[h],o,u,n,0,t))){for(l=0;l<d;l++)e[c+l]=o[u+l];if(c+=d,u+=d,(n-=d)<=1){f=!0;break}}if(e[c++]=e[h++],0==--s){f=!0;break}if(0!==(p=Bi(o[u],e,h,s,0,t))){for(l=0;l<p;l++)e[c+l]=e[h+l];if(c+=p,h+=p,0===(s-=p)){f=!0;break}}if(e[c++]=o[u++],1==--n){f=!0;break}g--}while(d>=7||p>=7);if(f)break;g<0&&(g=0),g+=2}if((a=g)<1&&(a=1),1===n){for(l=0;l<s;l++)e[c+l]=e[h+l];e[c+s]=o[u]}else{if(0===n)throw new Error;for(l=0;l<n;l++)e[c+l]=o[u+l]}}(l,u,h,c):function(i,n,r,s){var l=0;for(l=0;l<s;l++)o[l]=e[r+l];var u=i+n-1,h=s-1,c=r+s-1,d=0,p=0;if(e[c--]=e[u--],0==--n){for(d=c-(s-1),l=0;l<s;l++)e[d+l]=o[l];return}if(1===s){for(p=(c-=n)+1,d=(u-=n)+1,l=n-1;l>=0;l--)e[p+l]=e[d+l];return void(e[c]=o[h])}var f=a;for(;;){var g=0,m=0,v=!1;do{if(t(o[h],e[u])<0){if(e[c--]=e[u--],g++,m=0,0==--n){v=!0;break}}else if(e[c--]=o[h--],m++,g=0,1==--s){v=!0;break}}while((g|m)<f);if(v)break;do{if(0!==(g=n-Vi(o[h],e,i,n,n-1,t))){for(n-=g,p=(c-=g)+1,d=(u-=g)+1,l=g-1;l>=0;l--)e[p+l]=e[d+l];if(0===n){v=!0;break}}if(e[c--]=o[h--],1==--s){v=!0;break}if(0!==(m=s-Bi(e[u],o,0,s,s-1,t))){for(s-=m,p=(c-=m)+1,d=(h-=m)+1,l=0;l<m;l++)e[p+l]=o[d+l];if(s<=1){v=!0;break}}if(e[c--]=e[u--],0==--n){v=!0;break}f--}while(g>=7||m>=7);if(v)break;f<0&&(f=0),f+=2}(a=f)<1&&(a=1);if(1===s){for(p=(c-=n)+1,d=(u-=n)+1,l=n-1;l>=0;l--)e[p+l]=e[d+l];e[c]=o[h]}else{if(0===s)throw new Error;for(d=c-(s-1),l=0;l<s;l++)e[d+l]=o[l]}}(l,u,h,c))}i=[],n=[],this.mergeRuns=function(){for(;r>1;){var e=r-2;if(e>=1&&n[e-1]<=n[e]+n[e+1]||e>=2&&n[e-2]<=n[e]+n[e-1])n[e-1]<n[e+1]&&e--;else if(n[e]>n[e+1])break;s(e)}},this.forceMergeRuns=function(){for(;r>1;){var e=r-2;e>0&&n[e-1]<n[e+1]&&e--,s(e)}},this.pushRun=function(e,t){i[r]=e,n[r]=t,r+=1}}var Fi=function(e,t,i,n){i||(i=0),n||(n=e.length);var a=n-i;if(!(a<2)){var r=0;if(a<32)zi(e,i,n,i+(r=Ei(e,i,n,t)),t);else{var o=new Gi(e,t),s=function(e){for(var t=0;e>=32;)t|=1&e,e>>=1;return e+t}(a);do{if((r=Ei(e,i,n,t))<s){var l=a;l>s&&(l=s),zi(e,i,i+l,i+r,t),r=l}o.pushRun(i,r),o.mergeRuns(),a-=r,i+=r}while(0!==a);o.forceMergeRuns()}}};function Hi(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var Wi=function(){this._roots=[],this._displayList=[],this._displayListLen=0};Wi.prototype={constructor:Wi,traverse:function(e,t){for(var i=0;i<this._roots.length;i++)this._roots[i].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,i=this._displayList,n=0,a=t.length;n<a;n++)this._updateAndAddDisplayable(t[n],null,e);i.length=this._displayListLen,K.canvasSupported&&Fi(i,Hi)},_updateAndAddDisplayable:function(e,t,i){if(!e.ignore||i){e.beforeUpdate(),e.__dirty&&e.update(),e.afterUpdate();var n=e.clipPath;if(n){t=t?t.slice():[];for(var a=n,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,i)}e.__dirty=!1}else e.__clipPaths=t,this._displayList[this._displayListLen++]=e}},addRoot:function(e){e.__storage!==this&&(e instanceof Ni&&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 i=this._roots[t];i instanceof Ni&&i.delChildrenFromStorage(this)}return this._roots=[],this._displayList=[],void(this._displayListLen=0)}if(e instanceof Array){t=0;for(var n=e.length;t<n;t++)this.delRoot(e[t])}else{var a=_e.indexOf(this._roots,e);a>=0&&(this.delFromStorage(e),this._roots.splice(a,1),e instanceof Ni&&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:Hi};var Ui=Wi,Zi={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1};var ji=function(e,t,i){return Zi.hasOwnProperty(t)?i*e.dpr:i},Yi={ContextCachedBy:{NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},WILL_BE_RESTORED:9},Xi=Yi.ContextCachedBy,qi=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],Ki=function(e){this.extendFrom(e,!1)};function $i(e,t,i){var n=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||(n=n*i.width+i.x,a=a*i.width+i.x,r=r*i.height+i.y,o=o*i.height+i.y),n=isNaN(n)?0:n,a=isNaN(a)?1:a,r=isNaN(r)?0:r,o=isNaN(o)?0:o,e.createLinearGradient(n,r,a,o)}function Ji(e,t,i){var n=i.width,a=i.height,r=Math.min(n,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*n+i.x,s=s*a+i.y,l*=r),e.createRadialGradient(o,s,0,o,s,l)}for(var Qi=Ki.prototype={constructor:Ki,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,i){var n=i&&i.style,a=!n||e.__attrCachedBy!==Xi.STYLE_BIND;e.__attrCachedBy=Xi.STYLE_BIND;for(var r=0;r<qi.length;r++){var o=qi[r],s=o[0];(a||this[s]!==n[s])&&(e[s]=ji(e,s,this[s]||o[1]))}if((a||this.fill!==n.fill)&&(e.fillStyle=this.fill),(a||this.stroke!==n.stroke)&&(e.strokeStyle=this.stroke),(a||this.opacity!==n.opacity)&&(e.globalAlpha=null==this.opacity?1:this.opacity),(a||this.blend!==n.blend)&&(e.globalCompositeOperation=this.blend||"source-over"),this.hasStroke()){var l=this.lineWidth;e.lineWidth=l/(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 i in e)!e.hasOwnProperty(i)||!0!==t&&(!1===t?this.hasOwnProperty(i):null==e[i])||(this[i]=e[i])},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,i){for(var n=("radial"===t.type?Ji:$i)(e,t,i),a=t.colorStops,r=0;r<a.length;r++)n.addColorStop(a[r].offset,a[r].color);return n}},en=0;en<qi.length;en++){var tn=qi[en];tn[0]in Qi||(Qi[tn[0]]=tn[1])}Ki.getGradient=Qi.getGradient;var nn=Ki,an=function(e,t){this.image=e,this.repeat=t,this.type="pattern"};an.prototype.getCanvasPattern=function(e){return e.createPattern(this.image,this.repeat||"repeat")};var rn=an,on=di.devicePixelRatio;function sn(){return!1}function ln(e,t,i){var n=_e.createCanvas(),a=t.getWidth(),r=t.getHeight(),o=n.style;return o&&(o.position="absolute",o.left=0,o.top=0,o.width=a+"px",o.height=r+"px",n.setAttribute("data-zr-dom-id",e)),n.width=a*i,n.height=r*i,n}var un=function(e,t,i){var n;i=i||on,"string"==typeof e?n=ln(e,t,i):_e.isObject(e)&&(e=(n=e).id),this.id=e,this.dom=n;var a=n.style;a&&(n.onselectstart=sn,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=i};un.prototype={constructor:un,__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=ln("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),1!==e&&this.ctxBack.scale(e,e)},resize:function(e,t){var i=this.dpr,n=this.dom,a=n.style,r=this.domBack;a&&(a.width=e+"px",a.height=t+"px"),n.width=e*i,n.height=t*i,r&&(r.width=e*i,r.height=t*i,1!==i&&this.ctxBack.scale(i,i))},clear:function(e,t){var i,n=this.dom,a=this.ctx,r=n.width,o=n.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(n,0,0,r/u,o/u)),a.clearRect(0,0,r,o),t&&"transparent"!==t)&&(t.colorStops?(i=t.__canvasGradient||nn.getGradient(a,t,{x:0,y:0,width:r,height:o}),t.__canvasGradient=i):t.image&&(i=rn.prototype.getCanvasPattern.call(t,a)),a.save(),a.fillStyle=i||t,a.fillRect(0,0,r,o),a.restore());if(s){var h=this.domBack;a.save(),a.globalAlpha=l,a.drawImage(h,0,0,r,o),a.restore()}}};var hn=un,cn="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){setTimeout(e,16)},dn=new Lt(50);function pn(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var i=e.pending[t],n=i.cb;n&&n(this,i.cbPayload),i.hostEl.dirty()}e.pending.length=0}function fn(e){return e&&e.width&&e.height}var gn={findExistImage:function(e){if("string"==typeof e){var t=dn.get(e);return t&&t.image}return e},createOrUpdateImage:function(e,t,i,n,a){if(e){if("string"==typeof e){if(t&&t.__zrImageSrc===e||!i)return t;var r=dn.get(e),o={hostEl:i,cb:n,cbPayload:a};return r?!fn(t=r.image)&&r.pending.push(o):((t=new Image).onload=t.onerror=pn,dn.put(e,t.__cachedImgObj={image:t,pending:[o]}),t.src=t.__zrImageSrc=e),t}return e}return t},isImageReady:fn},mn=_e.getContext,vn=_e.extend,yn=_e.retrieve2,xn=_e.retrieve3,_n=_e.trim,bn={},wn=0,Sn=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,Mn={};function In(e,t){var i=e+":"+(t=t||"12px sans-serif");if(bn[i])return bn[i];for(var n=(e+"").split("\n"),a=0,r=0,o=n.length;r<o;r++)a=Math.max(Rn(n[r],t).width,a);return wn>5e3&&(wn=0,bn={}),wn++,bn[i]=a,a}function Tn(e,t,i){return"right"===i?e-=t:"center"===i&&(e-=t/2),e}function An(e,t,i){return"middle"===i?e-=t/2:"bottom"===i&&(e-=t),e}function Cn(e,t,i){var n=t.textPosition,a=t.textDistance,r=i.x,o=i.y;a=a||0;var s=i.height,l=i.width,u=s/2,h="left",c="top";switch(n){case"left":r-=a,o+=u,h="right",c="middle";break;case"right":r+=a+l,o+=u,c="middle";break;case"top":r+=l/2,o-=a,h="center",c="bottom";break;case"bottom":r+=l/2,o+=s+a,h="center";break;case"inside":r+=l/2,o+=u,h="center",c="middle";break;case"insideLeft":r+=a,o+=u,c="middle";break;case"insideRight":r+=l-a,o+=u,h="right",c="middle";break;case"insideTop":r+=l/2,o+=a,h="center";break;case"insideBottom":r+=l/2,o+=s-a,h="center",c="bottom";break;case"insideTopLeft":r+=a,o+=a;break;case"insideTopRight":r+=l-a,o+=a,h="right";break;case"insideBottomLeft":r+=a,o+=s-a,c="bottom";break;case"insideBottomRight":r+=l-a,o+=s-a,h="right",c="bottom"}return(e=e||{}).x=r,e.y=o,e.textAlign=h,e.textVerticalAlign=c,e}function Dn(e,t,i,n,a){if(!t)return"";var r=(e+"").split("\n");a=Ln(t,i,n,a);for(var o=0,s=r.length;o<s;o++)r[o]=Pn(r[o],a);return r.join("\n")}function Ln(e,t,i,n){(n=vn({},n)).font=t;i=yn(i,"...");n.maxIterations=yn(n.maxIterations,2);var a=n.minChar=yn(n.minChar,0);n.cnCharWidth=In("国",t);var r=n.ascCharWidth=In("a",t);n.placeholder=yn(n.placeholder,"");for(var o=e=Math.max(0,e-1),s=0;s<a&&o>=r;s++)o-=r;var l=In(i,t);return l>o&&(i="",l=0),o=e-l,n.ellipsis=i,n.ellipsisWidth=l,n.contentWidth=o,n.containerWidth=e,n}function Pn(e,t){var i=t.containerWidth,n=t.font,a=t.contentWidth;if(!i)return"";var r=In(e,n);if(r<=i)return e;for(var o=0;;o++){if(r<=a||o>=t.maxIterations){e+=t.ellipsis;break}var s=0===o?kn(e,a,t.ascCharWidth,t.cnCharWidth):r>0?Math.floor(e.length*a/r):0;r=In(e=e.substr(0,s),n)}return""===e&&(e=t.placeholder),e}function kn(e,t,i,n){for(var a=0,r=0,o=e.length;r<o&&a<t;r++){var s=e.charCodeAt(r);a+=0<=s&&s<=127?i:n}return r}function On(e){return In("国",e)}function Rn(e,t){return Mn.measureText(e,t)}function Nn(e,t,i,n,a){null!=e&&(e+="");var r=yn(n,On(t)),o=e?e.split("\n"):[],s=o.length*r,l=s,u=!0;if(i&&(l+=i[0]+i[2]),e&&a){u=!1;var h=a.outerHeight,c=a.outerWidth;if(null!=h&&l>h)e="",o=[];else if(null!=c)for(var d=Ln(c-(i?i[1]+i[3]:0),t,a.ellipsis,{minChar:a.minChar,placeholder:a.placeholder}),p=0,f=o.length;p<f;p++)o[p]=Pn(o[p],d)}return{lines:o,height:s,outerHeight:l,lineHeight:r,canCacheByTextString:u}}function En(e,t){var i={lines:[],width:0,height:0};if(null!=e&&(e+=""),!e)return i;for(var n,a=Sn.lastIndex=0;null!=(n=Sn.exec(e));){var r=n.index;r>a&&zn(i,e.substring(a,r)),zn(i,n[2],n[1]),a=Sn.lastIndex}a<e.length&&zn(i,e.substring(a,e.length));var o=i.lines,s=0,l=0,u=[],h=t.textPadding,c=t.truncate,d=c&&c.outerWidth,p=c&&c.outerHeight;h&&(null!=d&&(d-=h[1]+h[3]),null!=p&&(p-=h[0]+h[2]));for(var f=0;f<o.length;f++){for(var g=o[f],m=0,v=0,y=0;y<g.tokens.length;y++){var x=(D=g.tokens[y]).styleName&&t.rich[D.styleName]||{},_=D.textPadding=x.textPadding,b=D.font=x.font||t.font,w=D.textHeight=yn(x.textHeight,On(b));if(_&&(w+=_[0]+_[2]),D.height=w,D.lineHeight=xn(x.textLineHeight,t.textLineHeight,w),D.textAlign=x&&x.textAlign||t.textAlign,D.textVerticalAlign=x&&x.textVerticalAlign||"middle",null!=p&&s+D.lineHeight>p)return{lines:[],width:0,height:0};D.textWidth=In(D.text,b);var S=x.textWidth,M=null==S||"auto"===S;if("string"==typeof S&&"%"===S.charAt(S.length-1))D.percentWidth=S,u.push(D),S=0;else{if(M){S=D.textWidth;var I=x.textBackgroundColor,T=I&&I.image;T&&(T=gn.findExistImage(T),gn.isImageReady(T)&&(S=Math.max(S,T.width*w/T.height)))}var A=_?_[1]+_[3]:0;S+=A;var C=null!=d?d-v:null;null!=C&&C<S&&(!M||C<A?(D.text="",D.textWidth=S=0):(D.text=Dn(D.text,C-A,b,c.ellipsis,{minChar:c.minChar}),D.textWidth=In(D.text,b),S=D.textWidth+A))}v+=D.width=S,x&&(m=Math.max(m,D.lineHeight))}g.width=v,g.lineHeight=m,s+=m,l=Math.max(l,v)}i.outerWidth=i.width=yn(t.textWidth,l),i.outerHeight=i.height=yn(t.textHeight,s),h&&(i.outerWidth+=h[1]+h[3],i.outerHeight+=h[0]+h[2]);for(f=0;f<u.length;f++){var D,L=(D=u[f]).percentWidth;D.width=parseInt(L,10)/100*l}return i}function zn(e,t,i){for(var n=""===t,a=t.split("\n"),r=e.lines,o=0;o<a.length;o++){var s=a[o],l={styleName:i,text:s,isLineHolder:!s&&!n};if(o)r.push({tokens:[l]});else{var u=(r[r.length-1]||(r[0]={tokens:[]})).tokens,h=u.length;1===h&&u[0].isLineHolder?u[0]=l:(s||!h||n)&&u.push(l)}}}Mn.measureText=function(e,t){var i=mn();return i.font=t||"12px sans-serif",i.measureText(e)};var Bn={DEFAULT_FONT:"12px sans-serif",$override:function(e,t){Mn[e]=t},getWidth:In,getBoundingRect:function(e,t,i,n,a,r,o,s){return o?function(e,t,i,n,a,r,o,s){var l=En(e,{rich:o,truncate:s,font:t,textAlign:i,textPadding:a,textLineHeight:r}),u=l.outerWidth,h=l.outerHeight,c=Tn(0,u,i),d=An(0,h,n);return new Oi(c,d,u,h)}(e,t,i,n,a,r,o,s):function(e,t,i,n,a,r,o){var s=Nn(e,t,a,r,o),l=In(e,t);a&&(l+=a[1]+a[3]);var u=s.outerHeight,h=Tn(0,l,i),c=An(0,u,n),d=new Oi(h,c,l,u);return d.lineHeight=s.lineHeight,d}(e,t,i,n,a,r,s)},adjustTextX:Tn,adjustTextY:An,calculateTextPosition:Cn,adjustTextPositionOnRect:function(e,t,i){return Cn({},{textPosition:e,textDistance:i},t)},truncateText:Dn,getLineHeight:On,measureText:Rn,parsePlainText:Nn,parseRichText:En,makeFont:function(e){var t=(e.fontSize||e.fontFamily)&&[e.fontStyle,e.fontWeight,(e.fontSize||12)+"px",e.fontFamily||"sans-serif"].join(" ");return t&&_n(t)||e.textFont||e.font}};var Vn={buildPath:function(e,t){var i,n,a,r,o,s=t.x,l=t.y,u=t.width,h=t.height,c=t.r;u<0&&(s+=u,u=-u),h<0&&(l+=h,h=-h),"number"==typeof c?i=n=a=r=c:c instanceof Array?1===c.length?i=n=a=r=c[0]:2===c.length?(i=a=c[0],n=r=c[1]):3===c.length?(i=c[0],n=r=c[1],a=c[2]):(i=c[0],n=c[1],a=c[2],r=c[3]):i=n=a=r=0,i+n>u&&(i*=u/(o=i+n),n*=u/o),a+r>u&&(a*=u/(o=a+r),r*=u/o),n+a>h&&(n*=h/(o=n+a),a*=h/o),i+r>h&&(i*=h/(o=i+r),r*=h/o),e.moveTo(s+i,l),e.lineTo(s+u-n,l),0!==n&&e.arc(s+u-n,l+n,n,-Math.PI/2,0),e.lineTo(s+u,l+h-a),0!==a&&e.arc(s+u-a,l+h-a,a,0,Math.PI/2),e.lineTo(s+r,l+h),0!==r&&e.arc(s+r,l+h-r,r,Math.PI/2,Math.PI),e.lineTo(s,l+i),0!==i&&e.arc(s+i,l+i,i,Math.PI,1.5*Math.PI)}},Gn=_e.retrieve2,Fn=_e.retrieve3,Hn=_e.each,Wn=_e.normalizeCssArray,Un=_e.isString,Zn=_e.isObject,jn=Yi.ContextCachedBy,Yn=Yi.WILL_BE_RESTORED,Xn=Bn.DEFAULT_FONT,qn={left:1,right:1,center:1},Kn={top:1,bottom:1,middle:1},$n=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],Jn={},Qn={};function ea(e){if(e){e.font=Bn.makeFont(e);var t=e.textAlign;"middle"===t&&(t="center"),e.textAlign=null==t||qn[t]?t:"left";var i=e.textVerticalAlign||e.textBaseline;"center"===i&&(i="middle"),e.textVerticalAlign=null==i||Kn[i]?i:"top",e.textPadding&&(e.textPadding=Wn(e.textPadding))}}function ta(e,t,i,n,a,r){var o,s=ra(n),l=!1,u=t.__attrCachedBy===jn.PLAIN_TEXT;r!==Yn?(r&&(o=r.style,l=!s&&u&&o),t.__attrCachedBy=s?jn.NONE:jn.PLAIN_TEXT):u&&(t.__attrCachedBy=jn.NONE);var h=n.font||Xn;l&&h===(o.font||Xn)||(t.font=h);var c=e.__computedFont;e.__styleFont!==h&&(e.__styleFont=h,c=e.__computedFont=t.font);var d=n.textPadding,p=n.textLineHeight,f=e.__textCotentBlock;f&&!e.__dirtyText||(f=e.__textCotentBlock=Bn.parsePlainText(i,c,d,p,n.truncate));var g=f.outerHeight,m=f.lines,v=f.lineHeight,y=la(Qn,e,n,a),x=y.baseX,_=y.baseY,b=y.textAlign||"left",w=y.textVerticalAlign;na(t,n,a,x,_);var S=Bn.adjustTextY(_,g,w),M=x,I=S;if(s||d){var T=Bn.getWidth(i,c);d&&(T+=d[1]+d[3]);var A=Bn.adjustTextX(x,T,b);s&&oa(e,t,n,A,S,T,g),d&&(M=pa(x,b,d),I+=d[0])}t.textAlign=b,t.textBaseline="middle",t.globalAlpha=n.opacity||1;for(var C=0;C<$n.length;C++){var D=$n[C],L=D[0],P=D[1],k=n[L];l&&k===o[L]||(t[P]=ji(t,P,k||D[2]))}I+=v/2;var O=n.textStrokeWidth,R=l?o.textStrokeWidth:null,N=!l||O!==R,E=!l||N||n.textStroke!==o.textStroke,z=ha(n.textStroke,O),B=ca(n.textFill);if(z&&(N&&(t.lineWidth=O),E&&(t.strokeStyle=z)),B&&(l&&n.textFill===o.textFill||(t.fillStyle=B)),1===m.length)z&&t.strokeText(m[0],M,I),B&&t.fillText(m[0],M,I);else for(C=0;C<m.length;C++)z&&t.strokeText(m[C],M,I),B&&t.fillText(m[C],M,I),I+=v}function ia(e,t,i,n,a,r){r!==Yn&&(t.__attrCachedBy=jn.NONE);var o=e.__textCotentBlock;o&&!e.__dirtyText||(o=e.__textCotentBlock=Bn.parseRichText(i,n)),function(e,t,i,n,a){var r=i.width,o=i.outerWidth,s=i.outerHeight,l=n.textPadding,u=la(Qn,e,n,a),h=u.baseX,c=u.baseY,d=u.textAlign,p=u.textVerticalAlign;na(t,n,a,h,c);var f=Bn.adjustTextX(h,o,d),g=Bn.adjustTextY(c,s,p),m=f,v=g;l&&(m+=l[3],v+=l[0]);var y=m+r;ra(n)&&oa(e,t,n,f,g,o,s);for(var x=0;x<i.lines.length;x++){for(var _,b=i.lines[x],w=b.tokens,S=w.length,M=b.lineHeight,I=b.width,T=0,A=m,C=y,D=S-1;T<S&&(!(_=w[T]).textAlign||"left"===_.textAlign);)aa(e,t,_,n,M,v,A,"left"),I-=_.width,A+=_.width,T++;for(;D>=0&&"right"===(_=w[D]).textAlign;)aa(e,t,_,n,M,v,C,"right"),I-=_.width,C-=_.width,D--;for(A+=(r-(A-m)-(y-C)-I)/2;T<=D;)_=w[T],aa(e,t,_,n,M,v,A+_.width/2,"center"),A+=_.width,T++;v+=M}}(e,t,o,n,a)}function na(e,t,i,n,a){if(i&&t.textRotation){var r=t.textOrigin;"center"===r?(n=i.width/2+i.x,a=i.height/2+i.y):r&&(n=r[0]+i.x,a=r[1]+i.y),e.translate(n,a),e.rotate(-t.textRotation),e.translate(-n,-a)}}function aa(e,t,i,n,a,r,o,s){var l=n.rich[i.styleName]||{};l.text=i.text;var u=i.textVerticalAlign,h=r+a/2;"top"===u?h=r+i.height/2:"bottom"===u&&(h=r+a-i.height/2),!i.isLineHolder&&ra(l)&&oa(e,t,l,"right"===s?o-i.width:"center"===s?o-i.width/2:o,h-i.height/2,i.width,i.height);var c=i.textPadding;c&&(o=pa(o,s,c),h-=i.height/2-c[2]-i.textHeight/2),ua(t,"shadowBlur",Fn(l.textShadowBlur,n.textShadowBlur,0)),ua(t,"shadowColor",l.textShadowColor||n.textShadowColor||"transparent"),ua(t,"shadowOffsetX",Fn(l.textShadowOffsetX,n.textShadowOffsetX,0)),ua(t,"shadowOffsetY",Fn(l.textShadowOffsetY,n.textShadowOffsetY,0)),ua(t,"textAlign",s),ua(t,"textBaseline","middle"),ua(t,"font",i.font||Xn);var d=ha(l.textStroke||n.textStroke,f),p=ca(l.textFill||n.textFill),f=Gn(l.textStrokeWidth,n.textStrokeWidth);d&&(ua(t,"lineWidth",f),ua(t,"strokeStyle",d),t.strokeText(i.text,o,h)),p&&(ua(t,"fillStyle",p),t.fillText(i.text,o,h))}function ra(e){return!!(e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor)}function oa(e,t,i,n,a,r,o){var s=i.textBackgroundColor,l=i.textBorderWidth,u=i.textBorderColor,h=Un(s);if(ua(t,"shadowBlur",i.textBoxShadowBlur||0),ua(t,"shadowColor",i.textBoxShadowColor||"transparent"),ua(t,"shadowOffsetX",i.textBoxShadowOffsetX||0),ua(t,"shadowOffsetY",i.textBoxShadowOffsetY||0),h||l&&u){t.beginPath();var c=i.textBorderRadius;c?Vn.buildPath(t,{x:n,y:a,width:r,height:o,r:c}):t.rect(n,a,r,o),t.closePath()}if(h)if(ua(t,"fillStyle",s),null!=i.fillOpacity){var d=t.globalAlpha;t.globalAlpha=i.fillOpacity*i.opacity,t.fill(),t.globalAlpha=d}else t.fill();else if(Zn(s)){var p=s.image;(p=gn.createOrUpdateImage(p,null,e,sa,s))&&gn.isImageReady(p)&&t.drawImage(p,n,a,r,o)}if(l&&u)if(ua(t,"lineWidth",l),ua(t,"strokeStyle",u),null!=i.strokeOpacity){d=t.globalAlpha;t.globalAlpha=i.strokeOpacity*i.opacity,t.stroke(),t.globalAlpha=d}else t.stroke()}function sa(e,t){t.image=e}function la(e,t,i,n){var a=i.x||0,r=i.y||0,o=i.textAlign,s=i.textVerticalAlign;if(n){var l=i.textPosition;if(l instanceof Array)a=n.x+da(l[0],n.width),r=n.y+da(l[1],n.height);else{var u=t&&t.calculateTextPosition?t.calculateTextPosition(Jn,i,n):Bn.calculateTextPosition(Jn,i,n);a=u.x,r=u.y,o=o||u.textAlign,s=s||u.textVerticalAlign}var h=i.textOffset;h&&(a+=h[0],r+=h[1])}return(e=e||{}).baseX=a,e.baseY=r,e.textAlign=o,e.textVerticalAlign=s,e}function ua(e,t,i){return e[t]=ji(e,t,i),e[t]}function ha(e,t){return null==e||t<=0||"transparent"===e||"none"===e?null:e.image||e.colorStops?"#000":e}function ca(e){return null==e||"none"===e?null:e.image||e.colorStops?"#000":e}function da(e,t){return"string"==typeof e?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function pa(e,t,i){return"right"===t?e-i[1]:"center"===t?e+i[3]/2-i[1]/2:e+i[3]}var fa={normalizeTextStyle:function(e){return ea(e),Hn(e.rich,ea),e},renderText:function(e,t,i,n,a,r){n.rich?ia(e,t,i,n,a,r):ta(e,t,i,n,a,r)},getBoxPosition:la,getStroke:ha,getFill:ca,parsePercent:da,needDrawText:function(e,t){return null!=e&&(e||t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor||t.textPadding)}},ga=Yi.WILL_BE_RESTORED,ma=new Oi,va=function(){};va.prototype={constructor:va,drawRectText:function(e,t){var i=this.style;t=i.textRect||t,this.__dirty&&fa.normalizeTextStyle(i,!0);var n=i.text;if(null!=n&&(n+=""),fa.needDrawText(n,i)){e.save();var a=this.transform;i.transformText?this.setTransform(e):a&&(ma.copy(t),ma.applyTransform(a),t=ma),fa.renderText(this,e,n,i,t,ga),e.restore()}}};var ya=va;function xa(e){for(var t in e=e||{},Ci.call(this,e),e)e.hasOwnProperty(t)&&"style"!==t&&(this[t]=e[t]);this.style=new nn(e.style,this),this._rect=null,this.__clipPaths=null}xa.prototype={constructor:xa,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,globalScaleRatio:1,beforeBrush:function(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 i=this.transformCoordToLocal(e,t);return this.getBoundingRect().contain(i[0],i[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(e){return this.animate("style",e)},attrKV:function(e,t){"style"!==e?Ci.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 nn(e,this),this.dirty(!1),this},calculateTextPosition:null},_e.inherits(xa,Ci),_e.mixin(xa,ya);var _a=xa;function ba(e){_a.call(this,e)}ba.prototype={constructor:ba,type:"image",brush:function(e,t){var i=this.style,n=i.image;i.bind(e,this,t);var a=this._image=gn.createOrUpdateImage(n,this._image,this,this.onload);if(a&&gn.isImageReady(a)){var r=i.x||0,o=i.y||0,s=i.width,l=i.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),i.sWidth&&i.sHeight){var h=i.sx||0,c=i.sy||0;e.drawImage(a,h,c,i.sWidth,i.sHeight,r,o,s,l)}else if(i.sx&&i.sy){var d=s-(h=i.sx),p=l-(c=i.sy);e.drawImage(a,h,c,d,p,r,o,s,l)}else e.drawImage(a,r,o,s,l);null!=i.text&&(this.restoreTransform(e),this.drawRectText(e,this.getBoundingRect()))}},getBoundingRect:function(){var e=this.style;return this._rect||(this._rect=new Oi(e.x||0,e.y||0,e.width||0,e.height||0)),this._rect}},_e.inherits(ba,_a);var wa=ba,Sa=di.devicePixelRatio;function Ma(e){return parseInt(e,10)}var Ia=new Oi(0,0,0,0),Ta=new Oi(0,0,0,0);var Aa=function(e,t,i){this.type="canvas";var n=!e.nodeName||"CANVAS"===e.nodeName.toUpperCase();this._opts=i=_e.extend({},i||{}),this.dpr=i.devicePixelRatio||Sa,this._singleCanvas=n,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,n){var s=e.width,l=e.height;null!=i.width&&(s=i.width),null!=i.height&&(l=i.height),this.dpr=i.devicePixelRatio||1,e.width=s*this.dpr,e.height=l*this.dpr,this._width=s,this._height=l;var u=new hn(e,this,this.dpr);u.__builtin__=!0,u.initContext(),o[314159]=u,u.zlevel=314159,r.push(314159),this._domRoot=e}else{this._width=this._getSize(0),this._height=this._getSize(1);var h=this._domRoot=function(e,t){var i=document.createElement("div");return i.style.cssText=["position:relative","width:"+e+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",i}(this._width,this._height);e.appendChild(h)}this._hoverlayer=null,this._hoverElements=[]};Aa.prototype={constructor:Aa,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),i=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,e,this._redrawId);for(var n=0;n<i.length;n++){var a=i[n],r=this._layers[a];if(!r.__builtin__&&r.refresh){var o=0===n?this._backgroundColor:null;r.refresh(o)}}return this.refreshHover(),this},addHover:function(e,t){if(!e.__hoverMir){var i=new e.constructor({style:e.style,shape:e.shape,z:e.z,z2:e.z2,silent:e.silent});return i.__from=e,e.__hoverMir=i,t&&i.setStyle(t),this._hoverElements.push(i),i}},removeHover:function(e){var t=e.__hoverMir,i=this._hoverElements,n=_e.indexOf(i,t);n>=0&&i.splice(n,1),e.__hoverMir=null},clearHover:function(e){for(var t=this._hoverElements,i=0;i<t.length;i++){var n=t[i].__from;n&&(n.__hoverMir=null)}t.length=0},refreshHover:function(){var e=this._hoverElements,t=e.length,i=this._hoverlayer;if(i&&i.clear(),t){Fi(e,this.storage.displayableSortFunc),i||(i=this._hoverlayer=this.getLayer(1e5));var n={};i.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,i,!0,n))):(e.splice(a,1),o.__hoverMir=null,t--)}i.ctx.restore()}},getHoverLayer:function(){return this.getLayer(1e5)},_paintList:function(e,t,i){if(this._redrawId===i){t=t||!1,this._updateLayerStatus(e);var n=this._doPaintList(e,t);if(this._needsManuallyCompositing&&this._compositeManually(),!n){var a=this;cn((function(){a._paintList(e,t,i)}))}}},_compositeManually:function(){var e=this.getLayer(314159).ctx,t=this._domRoot.width,i=this._domRoot.height;e.clearRect(0,0,t,i),this.eachBuiltinLayer((function(n){n.virtual&&e.drawImage(n.dom,0,0,t,i)}))},_doPaintList:function(e,t){for(var i=[],n=0;n<this._zlevelList.length;n++){var a=this._zlevelList[n];(s=this._layers[a]).__builtin__&&s!==this._hoverlayer&&(s.__dirty||t)&&i.push(s)}for(var r=!0,o=0;o<i.length;o++){var s,l=(s=i[o]).ctx,u={};l.save();var h=t?s.__startIndex:s.__drawIndex,c=!t&&s.incremental&&Date.now,d=c&&Date.now(),p=s.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(s.__startIndex===s.__endIndex)s.clear(!1,p);else if(h===s.__startIndex){var f=e[h];f.incremental&&f.notClear&&!t||s.clear(!1,p)}-1===h&&(console.error("For some unknown reason. drawIndex is -1"),h=s.__startIndex);for(var g=h;g<s.__endIndex;g++){var m=e[g];if(this._doPaintEl(m,s,t,u),m.__dirty=m.__dirtyText=!1,c)if(Date.now()-d>15)break}s.__drawIndex=g,s.__drawIndex<s.__endIndex&&(r=!1),u.prevElClipPaths&&l.restore(),l.restore()}return K.wxa&&_e.each(this._layers,(function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()})),r},_doPaintEl:function(e,t,i,n){var a=t.ctx,r=e.transform;if((t.__dirty||i)&&!e.invisible&&0!==e.style.opacity&&(!r||r[0]||r[3])&&(!e.culling||!function(e,t,i){return Ia.copy(e.getBoundingRect()),e.transform&&Ia.applyTransform(e.transform),Ta.width=t,Ta.height=i,!Ia.intersect(Ta)}(e,this._width,this._height))){var o=e.__clipPaths,s=n.prevElClipPaths;s&&!function(e,t){if(e===t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var i=0;i<e.length;i++)if(e[i]!==t[i])return!0;return!1}(o,s)||(s&&(a.restore(),n.prevElClipPaths=null,n.prevEl=null),o&&(a.save(),function(e,t){for(var i=0;i<e.length;i++){var n=e[i];n.setTransform(t),t.beginPath(),n.buildPath(t,n.shape),t.clip(),n.restoreTransform(t)}}(o,a),n.prevElClipPaths=o)),e.beforeBrush&&e.beforeBrush(a),e.brush(a,n.prevEl||null),n.prevEl=e,e.afterBrush&&e.afterBrush(a)}},getLayer:function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=314159);var i=this._layers[e];return i||((i=new hn("zr_"+e,this,this.dpr)).zlevel=e,i.__builtin__=!0,this._layerConfig[e]?_e.merge(i,this._layerConfig[e],!0):this._layerConfig[e-.01]&&_e.merge(i,this._layerConfig[e-.01],!0),t&&(i.virtual=t),this.insertLayer(e,i),i.initContext()),i},insertLayer:function(e,t){var i=this._layers,n=this._zlevelList,a=n.length,r=null,o=-1,s=this._domRoot;if(!i[e]&&function(e){return!!e&&(!!e.__builtin__||"function"==typeof e.resize&&"function"==typeof e.refresh)}(t)){if(a>0&&e>n[0]){for(o=0;o<a-1&&!(n[o]<e&&n[o+1]>e);o++);r=i[n[o]]}if(n.splice(o+1,0,e),i[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 i,n,a=this._zlevelList;for(n=0;n<a.length;n++)i=a[n],e.call(t,this._layers[i],i)},eachBuiltinLayer:function(e,t){var i,n,a,r=this._zlevelList;for(a=0;a<r.length;a++)n=r[a],(i=this._layers[n]).__builtin__&&e.call(t,i,n)},eachOtherLayer:function(e,t){var i,n,a,r=this._zlevelList;for(a=0;a<r.length;a++)n=r[a],(i=this._layers[n]).__builtin__||e.call(t,i,n)},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 i=1;i<e.length;i++){if((o=e[i]).zlevel!==e[i-1].zlevel||o.incremental){this._needsManuallyCompositing=!0;break}}var n,a=null,r=0;for(i=0;i<e.length;i++){var o,s,l=(o=e[i]).zlevel;n!==l&&(n=l,r=0),o.incremental?((s=this.getLayer(l+.001,this._needsManuallyCompositing)).incremental=!0,r=1):s=this.getLayer(l+(r>0?.01:0),this._needsManuallyCompositing),s.__builtin__||pi("ZLevel "+l+" has been used by unkown layer "+s.id),s!==a&&(s.__used=!0,s.__startIndex!==i&&(s.__dirty=!0),s.__startIndex=i,s.incremental?s.__drawIndex=-1:s.__drawIndex=i,t(i),a=s),o.__dirty&&(s.__dirty=!0,s.incremental&&s.__drawIndex<0&&(s.__drawIndex=i))}t(i),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 i=this._layerConfig;i[e]?_e.merge(i[e],t,!0):i[e]=t;for(var n=0;n<this._zlevelList.length;n++){var a=this._zlevelList[n];if(a===e||a===e+.01){var r=this._layers[a];_e.merge(r,i[e],!0)}}}},delLayer:function(e){var t=this._layers,i=this._zlevelList,n=t[e];n&&(n.dom.parentNode.removeChild(n.dom),delete t[e],i.splice(_e.indexOf(i,e),1))},resize:function(e,t){if(this._domRoot.style){var i=this._domRoot;i.style.display="none";var n=this._opts;if(null!=e&&(n.width=e),null!=t&&(n.height=t),e=this._getSize(0),t=this._getSize(1),i.style.display="",this._width!==e||t!==this._height){for(var a in i.style.width=e+"px",i.style.height=t+"px",this._layers)this._layers.hasOwnProperty(a)&&this._layers[a].resize(e,t);_e.each(this._progressiveLayers,(function(i){i.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(314159).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 hn("image",this,e.pixelRatio||this.dpr);if(t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor),e.pixelRatio<=this.dpr){this.refresh();var i=t.dom.width,n=t.dom.height,a=t.ctx;this.eachLayer((function(e){e.__builtin__?a.drawImage(e.dom,0,0,i,n):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,i=["width","height"][e],n=["clientWidth","clientHeight"][e],a=["paddingLeft","paddingTop"][e],r=["paddingRight","paddingBottom"][e];if(null!=t[i]&&"auto"!==t[i])return parseFloat(t[i]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[n]||Ma(s[i])||Ma(o.style[i]))-(Ma(s[a])||0)-(Ma(s[r])||0)|0},pathToImage:function(e,t){t=t||this.dpr;var i=document.createElement("canvas"),n=i.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,h=Math.max(u/2,-s+o),c=Math.max(u/2,s+o),d=Math.max(u/2,-l+o),p=Math.max(u/2,l+o),f=a.width+h+c,g=a.height+d+p;i.width=f*t,i.height=g*t,n.scale(t,t),n.clearRect(0,0,f,g),n.dpr=t;var m={position:e.position,rotation:e.rotation,scale:e.scale};e.position=[h-a.x,d-a.y],e.rotation=0,e.scale=[1,1],e.updateTransform(),e&&e.brush(n);var v=new wa({style:{x:0,y:0,image:i}});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 Ca=Aa,Da=Ke.Dispatcher,La=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,Da.call(this)};La.prototype={constructor:La,addClip:function(e){this._clips.push(e)},addAnimator:function(e){e.animation=this;for(var t=e.getClips(),i=0;i<t.length;i++)this.addClip(t[i])},removeClip:function(e){var t=_e.indexOf(this._clips,e);t>=0&&this._clips.splice(t,1)},removeAnimator:function(e){for(var t=e.getClips(),i=0;i<t.length;i++)this.removeClip(t[i]);e.animation=null},_update:function(){for(var e=(new Date).getTime()-this._pausedTime,t=e-this._time,i=this._clips,n=i.length,a=[],r=[],o=0;o<n;o++){var s=i[o],l=s.step(e,t);l&&(a.push(l),r.push(s))}for(o=0;o<n;)i[o]._needsRemove?(i[o]=i[n-1],i.pop(),n--):o++;n=a.length;for(o=0;o<n;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,cn((function t(){e._running&&(cn(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 i=new hi(e,(t=t||{}).loop,t.getter,t.setter);return this.addAnimator(i),i}},_e.mixin(La,Da);var Pa,ka,Oa=La,Ra=Ke.addEventListener,Na=Ke.removeEventListener,Ea=Ke.normalizeEvent,za=Ke.getNativeEvent,Ba=K.domSupported,Va=(ka={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:Pa=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:_e.map(Pa,(function(e){var t=e.replace("mouse","pointer");return ka.hasOwnProperty(t)?t:e}))}),Ga=["mousemove","mouseup"],Fa=["pointermove","pointerup"];function Ha(e){return"mousewheel"===e&&K.browser.firefox?"DOMMouseScroll":e}function Wa(e){var t=e.pointerType;return"pen"===t||"touch"===t}function Ua(e){e&&(e.zrByTouch=!0)}function Za(e,t){for(var i=t,n=!1;i&&9!==i.nodeType&&!(n=i.domBelongToZr||i!==t&&i===e.painterRoot);)i=i.parentNode;return n}function ja(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 Ya=ja.prototype;Ya.stopPropagation=Ya.stopImmediatePropagation=Ya.preventDefault=_e.noop;var Xa={mousedown:function(e){e=Ea(this.dom,e),this._mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=Ea(this.dom,e);var t=this._mayPointerCapture;!t||e.zrX===t[0]&&e.zrY===t[1]||er(this,!0),this.trigger("mousemove",e)},mouseup:function(e){e=Ea(this.dom,e),er(this,!1),this.trigger("mouseup",e)},mouseout:function(e){e=Ea(this.dom,e),this._pointerCapturing&&(e.zrEventControl="no_globalout");var t=e.toElement||e.relatedTarget;e.zrIsToLocalDOM=Za(this,t),this.trigger("mouseout",e)},touchstart:function(e){Ua(e=Ea(this.dom,e)),this._lastTouchMoment=new Date,this.handler.processGesture(e,"start"),Xa.mousemove.call(this,e),Xa.mousedown.call(this,e)},touchmove:function(e){Ua(e=Ea(this.dom,e)),this.handler.processGesture(e,"change"),Xa.mousemove.call(this,e)},touchend:function(e){Ua(e=Ea(this.dom,e)),this.handler.processGesture(e,"end"),Xa.mouseup.call(this,e),+new Date-this._lastTouchMoment<300&&Xa.click.call(this,e)},pointerdown:function(e){Xa.mousedown.call(this,e)},pointermove:function(e){Wa(e)||Xa.mousemove.call(this,e)},pointerup:function(e){Xa.mouseup.call(this,e)},pointerout:function(e){Wa(e)||Xa.mouseout.call(this,e)}};_e.each(["click","mousewheel","dblclick","contextmenu"],(function(e){Xa[e]=function(t){t=Ea(this.dom,t),this.trigger(e,t)}}));var qa={pointermove:function(e){Wa(e)||qa.mousemove.call(this,e)},pointerup:function(e){qa.mouseup.call(this,e)},mousemove:function(e){this.trigger("mousemove",e)},mouseup:function(e){var t=this._pointerCapturing;er(this,!1),this.trigger("mouseup",e),t&&(e.zrEventControl="only_globalout",this.trigger("mouseout",e))}};function Ka(e,t){var i=t.domHandlers;K.pointerEventsSupported?_e.each(Va.pointer,(function(n){Ja(t,n,(function(t){i[n].call(e,t)}))})):(K.touchEventsSupported&&_e.each(Va.touch,(function(n){Ja(t,n,(function(a){i[n].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)}))})),_e.each(Va.mouse,(function(n){Ja(t,n,(function(a){a=za(a),t.touching||i[n].call(e,a)}))})))}function $a(e,t){function i(i){Ja(t,i,(function(n){n=za(n),Za(e,n.target)||(n=function(e,t){return Ea(e.dom,new ja(e,t),!0)}(e,n),t.domHandlers[i].call(e,n))}),{capture:!0})}K.pointerEventsSupported?_e.each(Fa,i):K.touchEventsSupported||_e.each(Ga,i)}function Ja(e,t,i,n){e.mounted[t]=i,e.listenerOpts[t]=n,Ra(e.domTarget,Ha(t),i,n)}function Qa(e){var t=e.mounted;for(var i in t)t.hasOwnProperty(i)&&Na(e.domTarget,Ha(i),t[i],e.listenerOpts[i]);e.mounted={}}function er(e,t){if(e._mayPointerCapture=null,Ba&&e._pointerCapturing^t){e._pointerCapturing=t;var i=e._globalHandlerScope;t?$a(e,i):Qa(i)}}function tr(e,t){this.domTarget=e,this.domHandlers=t,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function ir(e,t){Oe.call(this),this.dom=e,this.painterRoot=t,this._localHandlerScope=new tr(e,Xa),Ba&&(this._globalHandlerScope=new tr(document,qa)),this._pointerCapturing=!1,this._mayPointerCapture=null,Ka(this,this._localHandlerScope)}var nr=ir.prototype;nr.dispose=function(){Qa(this._localHandlerScope),Ba&&Qa(this._globalHandlerScope)},nr.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||"default")},_e.mixin(ir,Oe);var ar=ir,rr=!K.canvasSupported,or={canvas:Ca},sr={};var lr=function(e,t,i){i=i||{},this.dom=t,this.id=e;var n=this,a=new Ui,r=i.renderer;if(rr){if(!or.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");r="vml"}else r&&or[r]||(r="canvas");var o=new or[r](t,a,i,e);this.storage=a,this.painter=o;var s=K.node||K.worker?null:new ar(o.getViewportRoot(),o.root);this.handler=new st(a,o,s,o.root),this.animation=new Oa({stage:{update:_e.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(n)},a.addToStorage=function(e){u.call(a,e),e.addSelfToZr(n)}};lr.prototype={constructor:lr,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 i=this.painter.addHover(e,t);return this.refreshHover(),i}},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,i){this.handler.on(e,t,i)},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 sr[e]}};var ur={version:"4.3.1",init:function(e,t){var i=new lr(q(),e,t);return sr[i.id]=i,i},dispose:function(e){if(e)e.dispose();else{for(var t in sr)sr.hasOwnProperty(t)&&sr[t].dispose();sr={}}return this},getInstance:function(e){return sr[e]},registerPainter:function(e,t){or[e]=t}},hr=_e.each,cr=_e.isObject,dr=_e.isArray;function pr(e){return e instanceof Array?e:null==e?[]:[e]}function fr(e){return cr(e)&&e.id&&0===(e.id+"").indexOf("\0_ec_\0")}var gr=0;function mr(e,t){return e&&e.hasOwnProperty(t)}var vr={normalizeToArray:pr,defaultEmphasis:function(e,t,i){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var n=0,a=i.length;n<a;n++){var r=i[n];!e.emphasis[t].hasOwnProperty(r)&&e[t].hasOwnProperty(r)&&(e.emphasis[t][r]=e[t][r])}}},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!cr(e)||dr(e)||e instanceof Date?e:e.value},isDataItemOption:function(e){return cr(e)&&!(e instanceof Array)},mappingToExists:function(e,t){t=(t||[]).slice();var i=_e.map(e||[],(function(e,t){return{exist:e}}));return hr(t,(function(e,n){if(cr(e)){for(var a=0;a<i.length;a++)if(!i[a].option&&null!=e.id&&i[a].exist.id===e.id+"")return i[a].option=e,void(t[n]=null);for(a=0;a<i.length;a++){var r=i[a].exist;if(!(i[a].option||null!=r.id&&null!=e.id||null==e.name||fr(e)||fr(r)||r.name!==e.name+""))return i[a].option=e,void(t[n]=null)}}})),hr(t,(function(e,t){if(cr(e)){for(var n=0;n<i.length;n++){var a=i[n].exist;if(!i[n].option&&!fr(a)&&null==e.id){i[n].option=e;break}}n>=i.length&&i.push({option:e})}})),i},makeIdAndName:function(e){var t=_e.createHashMap();hr(e,(function(e,i){var n=e.exist;n&&t.set(n.id,e)})),hr(e,(function(e,i){var n=e.option;_e.assert(!n||null==n.id||!t.get(n.id)||t.get(n.id)===e,"id duplicates: "+(n&&n.id)),n&&null!=n.id&&t.set(n.id,e),!e.keyInfo&&(e.keyInfo={})})),hr(e,(function(e,i){var n=e.exist,a=e.option,r=e.keyInfo;if(cr(a)){if(r.name=null!=a.name?a.name+"":n?n.name:"series\0"+i,n)r.id=n.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("series\0"))},isIdInner:fr,compressBatches:function(e,t){var i={},n={};return a(e||[],i),a(t||[],n,i),[r(i),r(n)];function a(e,t,i){for(var n=0,a=e.length;n<a;n++)for(var r=e[n].seriesId,o=pr(e[n].dataIndex),s=i&&i[r],l=0,u=o.length;l<u;l++){var h=o[l];s&&s[h]?s[h]=null:(t[r]||(t[r]={}))[h]=1}}function r(e,t){var i=[];for(var n in e)if(e.hasOwnProperty(n)&&null!=e[n])if(t)i.push(+n);else{var a=r(e[n],!0);a.length&&i.push({seriesId:n,dataIndex:a})}return i}},queryDataIndex:function(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?_e.isArray(t.dataIndex)?_e.map(t.dataIndex,(function(t){return e.indexOfRawIndex(t)})):e.indexOfRawIndex(t.dataIndex):null!=t.name?_e.isArray(t.name)?_e.map(t.name,(function(t){return e.indexOfName(t)})):e.indexOfName(t.name):void 0},makeInner:function(){var e="__\0ec_inner_"+gr+++"_"+Math.random().toFixed(5);return function(t){return t[e]||(t[e]={})}},parseFinder:function(e,t,i){if(_e.isString(t)){var n={};n[t+"Index"]=0,t=n}var a=i&&i.defaultMainType;!a||mr(t,a+"Index")||mr(t,a+"Id")||mr(t,a+"Name")||(t[a+"Index"]=0);var r={};return hr(t,(function(n,a){n=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==n||"index"===l&&"none"===n||i&&i.includeMainTypes&&_e.indexOf(i.includeMainTypes,s)<0)){var u={mainType:s};"index"===l&&"all"===n||(u[l]=n);var h=e.queryComponents(u);r[s+"Models"]=h,r[s+"Model"]=h[0]}}else r[a]=n})),r},setAttribute:function(e,t,i){e.setAttribute?e.setAttribute(t,i):e[t]=i},getAttribute:function(e,t){return e.getAttribute?e.getAttribute(t):e[t]},getTooltipRenderMode:function(e){return"auto"===e?K.domSupported?"html":"richText":e||"html"},groupData:function(e,t){var i=_e.createHashMap(),n=[];return _e.each(e,(function(e){var a=t(e);(i.get(a)||(n.push(a),i.set(a,[]))).push(e)})),{keys:n,buckets:i}}},yr="___EC__COMPONENT__CONTAINER___";function xr(e){var t={main:"",sub:""};return e&&(e=e.split("."),t.main=e[0]||"",t.sub=e[1]||""),t}var _r=0;function br(e,t){var i=_e.slice(arguments,2);return this.superClass.prototype[t].apply(e,i)}function wr(e,t,i){return this.superClass.prototype[t].apply(e,i)}var Sr={parseClassType:xr,enableClassExtend:function(e,t){e.$constructor=e,e.extend=function(e){var t=this,i=function(){e.$constructor?e.$constructor.apply(this,arguments):t.apply(this,arguments)};return _e.extend(i.prototype,e),i.extend=this.extend,i.superCall=br,i.superApply=wr,_e.inherits(i,this),i.superClass=t,i}},enableClassCheck:function(e){var t=["__\0is_clz",_r++,Math.random().toFixed(3)].join("_");e.prototype[t]=!0,e.isInstance=function(e){return!(!e||!e[t])}},enableClassManagement:function(e,t){t=t||{};var i={};if(e.registerClass=function(e,t){if(t)if(function(e){_e.assert(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),'componentType "'+e+'" illegal')}(t),(t=xr(t)).sub){if(t.sub!==yr){(function(e){var t=i[e.main];t&&t[yr]||((t=i[e.main]={})[yr]=!0);return t}(t))[t.sub]=e}}else i[t.main]=e;return e},e.getClass=function(e,t,n){var a=i[e];if(a&&a[yr]&&(a=t?a[t]:null),n&&!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=xr(e);var t=[],n=i[e.main];return n&&n[yr]?_e.each(n,(function(e,i){i!==yr&&t.push(e)})):t.push(n),t},e.hasClass=function(e){return e=xr(e),!!i[e.main]},e.getAllClassMainTypes=function(){var e=[];return _e.each(i,(function(t,i){e.push(i)})),e},e.hasSubTypes=function(e){e=xr(e);var t=i[e.main];return t&&t[yr]},e.parseClassType=xr,t.registerWhenExtend){var n=e.extend;n&&(e.extend=function(t){var i=n.call(this,t);return e.registerClass(i,t.type)})}return e},setReadOnly:function(e,t){}};var Mr=function(e){for(var t=0;t<e.length;t++)e[t][1]||(e[t][1]=e[t][0]);return function(t,i,n){for(var a={},r=0;r<e.length;r++){var o=e[r][1];if(!(i&&_e.indexOf(i,o)>=0||n&&_e.indexOf(n,o)<0)){var s=t.getShallow(o);null!=s&&(a[e[r][0]]=s)}}return a}},Ir=Mr([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Tr={getLineStyle:function(e){var t=Ir(this,e);return t.lineDash=this.getLineDash(t.lineWidth),t},getLineDash:function(e){null==e&&(e=1);var t=this.get("type"),i=Math.max(e,2),n=4*e;return"solid"!==t&&null!=t&&("dashed"===t?[n,n]:[i,i])}},Ar=Mr([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Cr={getAreaStyle:function(e,t){return Ar(this,e,t)}},Dr=Te.create,Lr=Te.distSquare,Pr=Math.pow,kr=Math.sqrt,Or=kr(3),Rr=Dr(),Nr=Dr(),Er=Dr();function zr(e){return e>-1e-8&&e<1e-8}function Br(e){return e>1e-8||e<-1e-8}function Vr(e,t,i,n,a){var r=1-a;return r*r*(r*e+3*a*t)+a*a*(a*n+3*r*i)}function Gr(e,t,i,n){var a=1-n;return a*(a*e+2*n*t)+n*n*i}var Fr={cubicAt:Vr,cubicDerivativeAt:function(e,t,i,n,a){var r=1-a;return 3*(((t-e)*r+2*(i-t)*a)*r+(n-i)*a*a)},cubicRootAt:function(e,t,i,n,a,r){var o=n+3*(t-i)-e,s=3*(i-2*t+e),l=3*(t-e),u=e-a,h=s*s-3*o*l,c=s*l-9*o*u,d=l*l-3*s*u,p=0;if(zr(h)&&zr(c)){if(zr(s))r[0]=0;else(M=-l/s)>=0&&M<=1&&(r[p++]=M)}else{var f=c*c-4*h*d;if(zr(f)){var g=c/h,m=-g/2;(M=-s/o+g)>=0&&M<=1&&(r[p++]=M),m>=0&&m<=1&&(r[p++]=m)}else if(f>0){var v=kr(f),y=h*s+1.5*o*(-c+v),x=h*s+1.5*o*(-c-v);(M=(-s-((y=y<0?-Pr(-y,1/3):Pr(y,1/3))+(x=x<0?-Pr(-x,1/3):Pr(x,1/3))))/(3*o))>=0&&M<=1&&(r[p++]=M)}else{var _=(2*h*s-3*o*c)/(2*kr(h*h*h)),b=Math.acos(_)/3,w=kr(h),S=Math.cos(b),M=(-s-2*w*S)/(3*o),I=(m=(-s+w*(S+Or*Math.sin(b)))/(3*o),(-s+w*(S-Or*Math.sin(b)))/(3*o));M>=0&&M<=1&&(r[p++]=M),m>=0&&m<=1&&(r[p++]=m),I>=0&&I<=1&&(r[p++]=I)}}return p},cubicExtrema:function(e,t,i,n,a){var r=6*i-12*t+6*e,o=9*t+3*n-3*e-9*i,s=3*t-3*e,l=0;if(zr(o)){if(Br(r))(h=-s/r)>=0&&h<=1&&(a[l++]=h)}else{var u=r*r-4*o*s;if(zr(u))a[0]=-r/(2*o);else if(u>0){var h,c=kr(u),d=(-r-c)/(2*o);(h=(-r+c)/(2*o))>=0&&h<=1&&(a[l++]=h),d>=0&&d<=1&&(a[l++]=d)}}return l},cubicSubdivide:function(e,t,i,n,a,r){var o=(t-e)*a+e,s=(i-t)*a+t,l=(n-i)*a+i,u=(s-o)*a+o,h=(l-s)*a+s,c=(h-u)*a+u;r[0]=e,r[1]=o,r[2]=u,r[3]=c,r[4]=c,r[5]=h,r[6]=l,r[7]=n},cubicProjectPoint:function(e,t,i,n,a,r,o,s,l,u,h){var c,d,p,f,g,m=.005,v=1/0;Rr[0]=l,Rr[1]=u;for(var y=0;y<1;y+=.05)Nr[0]=Vr(e,i,a,o,y),Nr[1]=Vr(t,n,r,s,y),(f=Lr(Rr,Nr))<v&&(c=y,v=f);v=1/0;for(var x=0;x<32&&!(m<1e-4);x++)d=c-m,p=c+m,Nr[0]=Vr(e,i,a,o,d),Nr[1]=Vr(t,n,r,s,d),f=Lr(Nr,Rr),d>=0&&f<v?(c=d,v=f):(Er[0]=Vr(e,i,a,o,p),Er[1]=Vr(t,n,r,s,p),g=Lr(Er,Rr),p<=1&&g<v?(c=p,v=g):m*=.5);return h&&(h[0]=Vr(e,i,a,o,c),h[1]=Vr(t,n,r,s,c)),kr(v)},quadraticAt:Gr,quadraticDerivativeAt:function(e,t,i,n){return 2*((1-n)*(t-e)+n*(i-t))},quadraticRootAt:function(e,t,i,n,a){var r=e-2*t+i,o=2*(t-e),s=e-n,l=0;if(zr(r)){if(Br(o))(h=-s/o)>=0&&h<=1&&(a[l++]=h)}else{var u=o*o-4*r*s;if(zr(u))(h=-o/(2*r))>=0&&h<=1&&(a[l++]=h);else if(u>0){var h,c=kr(u),d=(-o-c)/(2*r);(h=(-o+c)/(2*r))>=0&&h<=1&&(a[l++]=h),d>=0&&d<=1&&(a[l++]=d)}}return l},quadraticExtremum:function(e,t,i){var n=e+i-2*t;return 0===n?.5:(e-t)/n},quadraticSubdivide:function(e,t,i,n,a){var r=(t-e)*n+e,o=(i-t)*n+t,s=(o-r)*n+r;a[0]=e,a[1]=r,a[2]=s,a[3]=s,a[4]=o,a[5]=i},quadraticProjectPoint:function(e,t,i,n,a,r,o,s,l){var u,h=.005,c=1/0;Rr[0]=o,Rr[1]=s;for(var d=0;d<1;d+=.05){Nr[0]=Gr(e,i,a,d),Nr[1]=Gr(t,n,r,d),(m=Lr(Rr,Nr))<c&&(u=d,c=m)}c=1/0;for(var p=0;p<32&&!(h<1e-4);p++){var f=u-h,g=u+h;Nr[0]=Gr(e,i,a,f),Nr[1]=Gr(t,n,r,f);var m=Lr(Nr,Rr);if(f>=0&&m<c)u=f,c=m;else{Er[0]=Gr(e,i,a,g),Er[1]=Gr(t,n,r,g);var v=Lr(Er,Rr);g<=1&&v<c?(u=g,c=v):h*=.5}}return l&&(l[0]=Gr(e,i,a,u),l[1]=Gr(t,n,r,u)),kr(c)}},Hr=Math.min,Wr=Math.max,Ur=Math.sin,Zr=Math.cos,jr=2*Math.PI,Yr=Te.create(),Xr=Te.create(),qr=Te.create();var Kr=[],$r=[];var Jr={fromPoints:function(e,t,i){if(0!==e.length){var n,a=e[0],r=a[0],o=a[0],s=a[1],l=a[1];for(n=1;n<e.length;n++)a=e[n],r=Hr(r,a[0]),o=Wr(o,a[0]),s=Hr(s,a[1]),l=Wr(l,a[1]);t[0]=r,t[1]=s,i[0]=o,i[1]=l}},fromLine:function(e,t,i,n,a,r){a[0]=Hr(e,i),a[1]=Hr(t,n),r[0]=Wr(e,i),r[1]=Wr(t,n)},fromCubic:function(e,t,i,n,a,r,o,s,l,u){var h,c=Fr.cubicExtrema,d=Fr.cubicAt,p=c(e,i,a,o,Kr);for(l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0,h=0;h<p;h++){var f=d(e,i,a,o,Kr[h]);l[0]=Hr(f,l[0]),u[0]=Wr(f,u[0])}for(p=c(t,n,r,s,$r),h=0;h<p;h++){var g=d(t,n,r,s,$r[h]);l[1]=Hr(g,l[1]),u[1]=Wr(g,u[1])}l[0]=Hr(e,l[0]),u[0]=Wr(e,u[0]),l[0]=Hr(o,l[0]),u[0]=Wr(o,u[0]),l[1]=Hr(t,l[1]),u[1]=Wr(t,u[1]),l[1]=Hr(s,l[1]),u[1]=Wr(s,u[1])},fromQuadratic:function(e,t,i,n,a,r,o,s){var l=Fr.quadraticExtremum,u=Fr.quadraticAt,h=Wr(Hr(l(e,i,a),1),0),c=Wr(Hr(l(t,n,r),1),0),d=u(e,i,a,h),p=u(t,n,r,c);o[0]=Hr(e,a,d),o[1]=Hr(t,r,p),s[0]=Wr(e,a,d),s[1]=Wr(t,r,p)},fromArc:function(e,t,i,n,a,r,o,s,l){var u=Te.min,h=Te.max,c=Math.abs(a-r);if(c%jr<1e-4&&c>1e-4)return s[0]=e-i,s[1]=t-n,l[0]=e+i,void(l[1]=t+n);if(Yr[0]=Zr(a)*i+e,Yr[1]=Ur(a)*n+t,Xr[0]=Zr(r)*i+e,Xr[1]=Ur(r)*n+t,u(s,Yr,Xr),h(l,Yr,Xr),(a%=jr)<0&&(a+=jr),(r%=jr)<0&&(r+=jr),a>r&&!o?r+=jr:a<r&&o&&(a+=jr),o){var d=r;r=a,a=d}for(var p=0;p<r;p+=Math.PI/2)p>a&&(qr[0]=Zr(p)*i+e,qr[1]=Ur(p)*n+t,u(s,qr,s),h(l,qr,l))}},Qr=di.devicePixelRatio,eo={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},to=[],io=[],no=[],ao=[],ro=Math.min,oo=Math.max,so=Math.cos,lo=Math.sin,uo=Math.sqrt,ho=Math.abs,co="undefined"!=typeof Float32Array,po=function(e){this._saveData=!e,this._saveData&&(this.data=[]),this._ctx=null};po.prototype={constructor:po,_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,i){i=i||0,this._ux=ho(i/Qr/e)||0,this._uy=ho(i/Qr/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(eo.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 i=ho(e-this._xi)>this._ux||ho(t-this._yi)>this._uy||this._len<5;return this.addData(eo.L,e,t),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(e,t):this._ctx.lineTo(e,t)),i&&(this._xi=e,this._yi=t),this},bezierCurveTo:function(e,t,i,n,a,r){return this.addData(eo.C,e,t,i,n,a,r),this._ctx&&(this._needsDash()?this._dashedBezierTo(e,t,i,n,a,r):this._ctx.bezierCurveTo(e,t,i,n,a,r)),this._xi=a,this._yi=r,this},quadraticCurveTo:function(e,t,i,n){return this.addData(eo.Q,e,t,i,n),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(e,t,i,n):this._ctx.quadraticCurveTo(e,t,i,n)),this._xi=i,this._yi=n,this},arc:function(e,t,i,n,a,r){return this.addData(eo.A,e,t,i,i,n,a-n,0,r?0:1),this._ctx&&this._ctx.arc(e,t,i,n,a,r),this._xi=so(a)*i+e,this._yi=lo(a)*i+t,this},arcTo:function(e,t,i,n,a){return this._ctx&&this._ctx.arcTo(e,t,i,n,a),this},rect:function(e,t,i,n){return this._ctx&&this._ctx.rect(e,t,i,n),this.addData(eo.R,e,t,i,n),this},closePath:function(){this.addData(eo.Z);var e=this._ctx,t=this._x0,i=this._y0;return e&&(this._needsDash()&&this._dashedLineTo(t,i),e.closePath()),this._xi=t,this._yi=i,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,i=0;i<e.length;i++)t+=e[i];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||!co||(this.data=new Float32Array(t));for(var i=0;i<t;i++)this.data[i]=e[i];this._len=t},appendPath:function(e){e instanceof Array||(e=[e]);for(var t=e.length,i=0,n=this._len,a=0;a<t;a++)i+=e[a].len();co&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i));for(a=0;a<t;a++)for(var r=e[a].data,o=0;o<r.length;o++)this.data[n++]=r[o];this._len=n},addData:function(e){if(this._saveData){var t=this.data;this._len+arguments.length>t.length&&(this._expandData(),t=this.data);for(var i=0;i<arguments.length;i++)t[this._len++]=arguments[i];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 i,n,a=this._dashSum,r=this._dashOffset,o=this._lineDash,s=this._ctx,l=this._xi,u=this._yi,h=e-l,c=t-u,d=uo(h*h+c*c),p=l,f=u,g=o.length;for(r<0&&(r=a+r),p-=(r%=a)*(h/=d),f-=r*(c/=d);h>0&&p<=e||h<0&&p>=e||0===h&&(c>0&&f<=t||c<0&&f>=t);)p+=h*(i=o[n=this._dashIdx]),f+=c*i,this._dashIdx=(n+1)%g,h>0&&p<l||h<0&&p>l||c>0&&f<u||c<0&&f>u||s[n%2?"moveTo":"lineTo"](h>=0?ro(p,e):oo(p,e),c>=0?ro(f,t):oo(f,t));h=p-e,c=f-t,this._dashOffset=-uo(h*h+c*c)},_dashedBezierTo:function(e,t,i,n,a,r){var o,s,l,u,h,c=this._dashSum,d=this._dashOffset,p=this._lineDash,f=this._ctx,g=this._xi,m=this._yi,v=Fr.cubicAt,y=0,x=this._dashIdx,_=p.length,b=0;for(d<0&&(d=c+d),d%=c,o=0;o<1;o+=.1)s=v(g,e,i,a,o+.1)-v(g,e,i,a,o),l=v(m,t,n,r,o+.1)-v(m,t,n,r,o),y+=uo(s*s+l*l);for(;x<_&&!((b+=p[x])>d);x++);for(o=(b-d)/y;o<=1;)u=v(g,e,i,a,o),h=v(m,t,n,r,o),x%2?f.moveTo(u,h):f.lineTo(u,h),o+=p[x]/y,x=(x+1)%_;x%2!=0&&f.lineTo(a,r),s=a-u,l=r-h,this._dashOffset=-uo(s*s+l*l)},_dashedQuadraticTo:function(e,t,i,n){var a=i,r=n;i=(i+2*e)/3,n=(n+2*t)/3,e=(this._xi+2*e)/3,t=(this._yi+2*t)/3,this._dashedBezierTo(e,t,i,n,a,r)},toStatic:function(){var e=this.data;e instanceof Array&&(e.length=this._len,co&&(this.data=new Float32Array(e)))},getBoundingRect:function(){to[0]=to[1]=no[0]=no[1]=Number.MAX_VALUE,io[0]=io[1]=ao[0]=ao[1]=-Number.MAX_VALUE;for(var e=this.data,t=0,i=0,n=0,a=0,r=0;r<e.length;){var o=e[r++];switch(1===r&&(n=t=e[r],a=i=e[r+1]),o){case eo.M:t=n=e[r++],i=a=e[r++],no[0]=n,no[1]=a,ao[0]=n,ao[1]=a;break;case eo.L:Jr.fromLine(t,i,e[r],e[r+1],no,ao),t=e[r++],i=e[r++];break;case eo.C:Jr.fromCubic(t,i,e[r++],e[r++],e[r++],e[r++],e[r],e[r+1],no,ao),t=e[r++],i=e[r++];break;case eo.Q:Jr.fromQuadratic(t,i,e[r++],e[r++],e[r],e[r+1],no,ao),t=e[r++],i=e[r++];break;case eo.A:var s=e[r++],l=e[r++],u=e[r++],h=e[r++],c=e[r++],d=e[r++]+c;r+=1;var p=1-e[r++];1===r&&(n=so(c)*u+s,a=lo(c)*h+l),Jr.fromArc(s,l,u,h,c,d,p,no,ao),t=so(d)*u+s,i=lo(d)*h+l;break;case eo.R:n=t=e[r++],a=i=e[r++];var f=e[r++],g=e[r++];Jr.fromLine(n,a,n+f,a+g,no,ao);break;case eo.Z:t=n,i=a}Te.min(to,to,no),Te.max(io,io,ao)}return 0===r&&(to[0]=to[1]=io[0]=io[1]=0),new Oi(to[0],to[1],io[0]-to[0],io[1]-to[1])},rebuildPath:function(e){for(var t,i,n,a,r,o,s=this.data,l=this._ux,u=this._uy,h=this._len,c=0;c<h;){var d=s[c++];switch(1===c&&(t=n=s[c],i=a=s[c+1]),d){case eo.M:t=n=s[c++],i=a=s[c++],e.moveTo(n,a);break;case eo.L:r=s[c++],o=s[c++],(ho(r-n)>l||ho(o-a)>u||c===h-1)&&(e.lineTo(r,o),n=r,a=o);break;case eo.C:e.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],a=s[c-1];break;case eo.Q:e.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],a=s[c-1];break;case eo.A:var p=s[c++],f=s[c++],g=s[c++],m=s[c++],v=s[c++],y=s[c++],x=s[c++],_=s[c++],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(p,f),e.rotate(x),e.scale(w,S),e.arc(0,0,b,v,M,1-_),e.scale(1/w,1/S),e.rotate(-x),e.translate(-p,-f)):e.arc(p,f,b,v,M,1-_),1===c&&(t=so(v)*g+p,i=lo(v)*m+f),n=so(M)*g+p,a=lo(M)*m+f;break;case eo.R:t=n=s[c],i=a=s[c+1],e.rect(s[c++],s[c++],s[c++],s[c++]);break;case eo.Z:e.closePath(),n=t,a=i}}}},po.CMD=eo;var fo=po;var go={containStroke:function(e,t,i,n,a,r,o){if(0===a)return!1;var s=a,l=0;if(o>t+s&&o>n+s||o<t-s&&o<n-s||r>e+s&&r>i+s||r<e-s&&r<i-s)return!1;if(e===i)return Math.abs(r-e)<=s/2;var u=(l=(t-n)/(e-i))*r-o+(e*n-i*t)/(e-i);return u*u/(l*l+1)<=s/2*s/2}};var mo={containStroke:function(e,t,i,n,a,r,o,s,l,u,h){if(0===l)return!1;var c=l;return!(h>t+c&&h>n+c&&h>r+c&&h>s+c||h<t-c&&h<n-c&&h<r-c&&h<s-c||u>e+c&&u>i+c&&u>a+c&&u>o+c||u<e-c&&u<i-c&&u<a-c&&u<o-c)&&Fr.cubicProjectPoint(e,t,i,n,a,r,o,s,u,h,null)<=c/2}},vo=Fr.quadraticProjectPoint;var yo={containStroke:function(e,t,i,n,a,r,o,s,l){if(0===o)return!1;var u=o;return!(l>t+u&&l>n+u&&l>r+u||l<t-u&&l<n-u&&l<r-u||s>e+u&&s>i+u&&s>a+u||s<e-u&&s<i-u&&s<a-u)&&vo(e,t,i,n,a,r,s,l,null)<=u/2}},xo=2*Math.PI;var _o={normalizeRadian:function(e){return(e%=xo)<0&&(e+=xo),e}},bo=_o.normalizeRadian,wo=2*Math.PI;var So={containStroke:function(e,t,i,n,a,r,o,s,l){if(0===o)return!1;var u=o;s-=e,l-=t;var h=Math.sqrt(s*s+l*l);if(h-u>i||h+u<i)return!1;if(Math.abs(n-a)%wo<1e-4)return!0;if(r){var c=n;n=bo(a),a=bo(c)}else n=bo(n),a=bo(a);n>a&&(a+=wo);var d=Math.atan2(l,s);return d<0&&(d+=wo),d>=n&&d<=a||d+wo>=n&&d+wo<=a}};var Mo=function(e,t,i,n,a,r){if(r>t&&r>n||r<t&&r<n)return 0;if(n===t)return 0;var o=n<t?1:-1,s=(r-t)/(n-t);1!==s&&0!==s||(o=n<t?.5:-.5);var l=s*(i-e)+e;return l===a?1/0:l>a?o:0},Io=_o.normalizeRadian,To=fo.CMD,Ao=2*Math.PI;var Co=[-1,-1,-1],Do=[-1,-1];function Lo(e,t,i,n,a,r,o,s,l,u){if(u>t&&u>n&&u>r&&u>s||u<t&&u<n&&u<r&&u<s)return 0;var h,c=Fr.cubicRootAt(t,n,r,s,u,Co);if(0===c)return 0;for(var d,p,f=0,g=-1,m=0;m<c;m++){var v=Co[m],y=0===v||1===v?.5:1;Fr.cubicAt(e,i,a,o,v)<l||(g<0&&(g=Fr.cubicExtrema(t,n,r,s,Do),Do[1]<Do[0]&&g>1&&(h=void 0,h=Do[0],Do[0]=Do[1],Do[1]=h),d=Fr.cubicAt(t,n,r,s,Do[0]),g>1&&(p=Fr.cubicAt(t,n,r,s,Do[1]))),2===g?v<Do[0]?f+=d<t?y:-y:v<Do[1]?f+=p<d?y:-y:f+=s<p?y:-y:v<Do[0]?f+=d<t?y:-y:f+=s<d?y:-y)}return f}function Po(e,t,i,n,a,r,o,s){if(s>t&&s>n&&s>r||s<t&&s<n&&s<r)return 0;var l=Fr.quadraticRootAt(t,n,r,s,Co);if(0===l)return 0;var u=Fr.quadraticExtremum(t,n,r);if(u>=0&&u<=1){for(var h=0,c=Fr.quadraticAt(t,n,r,u),d=0;d<l;d++){var p=0===Co[d]||1===Co[d]?.5:1;Fr.quadraticAt(e,i,a,Co[d])<o||(Co[d]<u?h+=c<t?p:-p:h+=r<c?p:-p)}return h}p=0===Co[0]||1===Co[0]?.5:1;return Fr.quadraticAt(e,i,a,Co[0])<o?0:r<t?p:-p}function ko(e,t,i,n,a,r,o,s){if((s-=t)>i||s<-i)return 0;var l=Math.sqrt(i*i-s*s);Co[0]=-l,Co[1]=l;var u=Math.abs(n-a);if(u<1e-4)return 0;if(u%Ao<1e-4){n=0,a=Ao;var h=r?1:-1;return o>=Co[0]+e&&o<=Co[1]+e?h:0}if(r){l=n;n=Io(a),a=Io(l)}else n=Io(n),a=Io(a);n>a&&(a+=Ao);for(var c=0,d=0;d<2;d++){var p=Co[d];if(p+e>o){var f=Math.atan2(s,p);h=r?1:-1;f<0&&(f=Ao+f),(f>=n&&f<=a||f+Ao>=n&&f+Ao<=a)&&(f>Math.PI/2&&f<1.5*Math.PI&&(h=-h),c+=h)}}return c}function Oo(e,t,i,n,a){for(var r,o,s=0,l=0,u=0,h=0,c=0,d=0;d<e.length;){var p=e[d++];switch(p===To.M&&d>1&&(i||(s+=Mo(l,u,h,c,n,a))),1===d&&(h=l=e[d],c=u=e[d+1]),p){case To.M:l=h=e[d++],u=c=e[d++];break;case To.L:if(i){if(go.containStroke(l,u,e[d],e[d+1],t,n,a))return!0}else s+=Mo(l,u,e[d],e[d+1],n,a)||0;l=e[d++],u=e[d++];break;case To.C:if(i){if(mo.containStroke(l,u,e[d++],e[d++],e[d++],e[d++],e[d],e[d+1],t,n,a))return!0}else s+=Lo(l,u,e[d++],e[d++],e[d++],e[d++],e[d],e[d+1],n,a)||0;l=e[d++],u=e[d++];break;case To.Q:if(i){if(yo.containStroke(l,u,e[d++],e[d++],e[d],e[d+1],t,n,a))return!0}else s+=Po(l,u,e[d++],e[d++],e[d],e[d+1],n,a)||0;l=e[d++],u=e[d++];break;case To.A:var f=e[d++],g=e[d++],m=e[d++],v=e[d++],y=e[d++],x=e[d++];d+=1;var _=1-e[d++],b=Math.cos(y)*m+f,w=Math.sin(y)*v+g;d>1?s+=Mo(l,u,b,w,n,a):(h=b,c=w);var S=(n-f)*v/m+f;if(i){if(So.containStroke(f,g,v,y,y+x,_,t,S,a))return!0}else s+=ko(f,g,v,y,y+x,_,S,a);l=Math.cos(y+x)*m+f,u=Math.sin(y+x)*v+g;break;case To.R:h=l=e[d++],c=u=e[d++];b=h+e[d++],w=c+e[d++];if(i){if(go.containStroke(h,c,b,c,t,n,a)||go.containStroke(b,c,b,w,t,n,a)||go.containStroke(b,w,h,w,t,n,a)||go.containStroke(h,w,h,c,t,n,a))return!0}else s+=Mo(b,c,b,w,n,a),s+=Mo(h,w,h,c,n,a);break;case To.Z:if(i){if(go.containStroke(l,u,h,c,t,n,a))return!0}else s+=Mo(l,u,h,c,n,a);l=h,u=c}}return i||(r=u,o=c,Math.abs(r-o)<1e-4)||(s+=Mo(l,u,h,c,n,a)||0),0!==s}var Ro={contain:function(e,t,i){return Oo(e,0,!1,t,i)},containStroke:function(e,t,i,n){return Oo(e,t,!0,i,n)}},No=rn.prototype.getCanvasPattern,Eo=Math.abs,zo=new fo(!0);function Bo(e){_a.call(this,e),this.path=null}Bo.prototype={constructor:Bo,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(e,t){var i,n=this.style,a=this.path||zo,r=n.hasStroke(),o=n.hasFill(),s=n.fill,l=n.stroke,u=o&&!!s.colorStops,h=r&&!!l.colorStops,c=o&&!!s.image,d=r&&!!l.image;(n.bind(e,this,t),this.setTransform(e),this.__dirty)&&(u&&(i=i||this.getBoundingRect(),this._fillGradient=n.getGradient(e,s,i)),h&&(i=i||this.getBoundingRect(),this._strokeGradient=n.getGradient(e,l,i)));u?e.fillStyle=this._fillGradient:c&&(e.fillStyle=No.call(s,e)),h?e.strokeStyle=this._strokeGradient:d&&(e.strokeStyle=No.call(l,e));var p=n.lineDash,f=n.lineDashOffset,g=!!e.setLineDash,m=this.getGlobalScale();if(a.setScale(m[0],m[1],this.segmentIgnoreThreshold),this.__dirtyPath||p&&!g&&r?(a.beginPath(e),p&&!g&&(a.setLineDash(p),a.setLineDashOffset(f)),this.buildPath(a,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(e.beginPath(),this.path.rebuildPath(e)),o)if(null!=n.fillOpacity){var v=e.globalAlpha;e.globalAlpha=n.fillOpacity*n.opacity,a.fill(e),e.globalAlpha=v}else a.fill(e);if(p&&g&&(e.setLineDash(p),e.lineDashOffset=f),r)if(null!=n.strokeOpacity){v=e.globalAlpha;e.globalAlpha=n.strokeOpacity*n.opacity,a.stroke(e),e.globalAlpha=v}else a.stroke(e);p&&g&&e.setLineDash([]),null!=n.text&&(this.restoreTransform(e),this.drawRectText(e,this.getBoundingRect()))},buildPath:function(e,t,i){},createPathProxy:function(){this.path=new fo},getBoundingRect:function(){var e=this._rect,t=this.style,i=!e;if(i){var n=this.path;n||(n=this.path=new fo),this.__dirtyPath&&(n.beginPath(),this.buildPath(n,this.shape,!1)),e=n.getBoundingRect()}if(this._rect=e,t.hasStroke()){var a=this._rectWithStroke||(this._rectWithStroke=e.clone());if(this.__dirty||i){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 i=this.transformCoordToLocal(e,t),n=this.getBoundingRect(),a=this.style;if(e=i[0],t=i[1],n.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)),Ro.containStroke(r,o/s,e,t)))return!0}if(a.hasFill())return Ro.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):_a.prototype.attrKV.call(this,e,t)},setShape:function(e,t){var i=this.shape;if(i){if(_e.isObject(e))for(var n in e)e.hasOwnProperty(n)&&(i[n]=e[n]);else i[e]=t;this.dirty(!0)}return this},getLineScale:function(){var e=this.transform;return e&&Eo(e[0]-1)>1e-10&&Eo(e[3]-1)>1e-10?Math.sqrt(Eo(e[0]*e[3]-e[2]*e[1])):1}},Bo.extend=function(e){var t=function(t){Bo.call(this,t),e.style&&this.style.extendFrom(e.style,!1);var i=e.shape;if(i){this.shape=this.shape||{};var n=this.shape;for(var a in i)!n.hasOwnProperty(a)&&i.hasOwnProperty(a)&&(n[a]=i[a])}e.init&&e.init.call(this,t)};for(var i in _e.inherits(t,Bo),e)"style"!==i&&"shape"!==i&&(t.prototype[i]=e[i]);return t},_e.inherits(Bo,_a);var Vo=Bo,Go=Te.applyTransform,Fo=fo.CMD,Ho=[[],[],[]],Wo=Math.sqrt,Uo=Math.atan2;var Zo=function(e,t){var i,n,a,r,o,s=e.data,l=Fo.M,u=Fo.C,h=Fo.L,c=Fo.R,d=Fo.A,p=Fo.Q;for(a=0,r=0;a<s.length;){switch(i=s[a++],r=a,n=0,i){case l:case h:n=1;break;case u:n=3;break;case p:n=2;break;case d:var f=t[4],g=t[5],m=Wo(t[0]*t[0]+t[1]*t[1]),v=Wo(t[2]*t[2]+t[3]*t[3]),y=Uo(-t[1]/v,t[0]/m);s[a]*=m,s[a++]+=f,s[a]*=v,s[a++]+=g,s[a++]*=m,s[a++]*=v,s[a++]+=y,s[a++]+=y,r=a+=2;break;case c:x[0]=s[a++],x[1]=s[a++],Go(x,x,t),s[r++]=x[0],s[r++]=x[1],x[0]+=s[a++],x[1]+=s[a++],Go(x,x,t),s[r++]=x[0],s[r++]=x[1]}for(o=0;o<n;o++){var x;(x=Ho[o])[0]=s[a++],x[1]=s[a++],Go(x,x,t),s[r++]=x[0],s[r++]=x[1]}}},jo=Math.sqrt,Yo=Math.sin,Xo=Math.cos,qo=Math.PI,Ko=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])},$o=function(e,t){return(e[0]*t[0]+e[1]*t[1])/(Ko(e)*Ko(t))},Jo=function(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos($o(e,t))};function Qo(e,t,i,n,a,r,o,s,l,u,h){var c=l*(qo/180),d=Xo(c)*(e-i)/2+Yo(c)*(t-n)/2,p=-1*Yo(c)*(e-i)/2+Xo(c)*(t-n)/2,f=d*d/(o*o)+p*p/(s*s);f>1&&(o*=jo(f),s*=jo(f));var g=(a===r?-1:1)*jo((o*o*(s*s)-o*o*(p*p)-s*s*(d*d))/(o*o*(p*p)+s*s*(d*d)))||0,m=g*o*p/s,v=g*-s*d/o,y=(e+i)/2+Xo(c)*m-Yo(c)*v,x=(t+n)/2+Yo(c)*m+Xo(c)*v,_=Jo([1,0],[(d-m)/o,(p-v)/s]),b=[(d-m)/o,(p-v)/s],w=[(-1*d-m)/o,(-1*p-v)/s],S=Jo(b,w);$o(b,w)<=-1&&(S=qo),$o(b,w)>=1&&(S=0),0===r&&S>0&&(S-=2*qo),1===r&&S<0&&(S+=2*qo),h.addData(u,y,x,o,s,_,S,c,r)}var es=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,ts=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function is(e,t){var i=function(e){if(!e)return new fo;for(var t,i=0,n=0,a=i,r=n,o=new fo,s=fo.CMD,l=e.match(es),u=0;u<l.length;u++){for(var h,c=l[u],d=c.charAt(0),p=c.match(ts)||[],f=p.length,g=0;g<f;g++)p[g]=parseFloat(p[g]);for(var m=0;m<f;){var v,y,x,_,b,w,S,M=i,I=n;switch(d){case"l":i+=p[m++],n+=p[m++],h=s.L,o.addData(h,i,n);break;case"L":i=p[m++],n=p[m++],h=s.L,o.addData(h,i,n);break;case"m":i+=p[m++],n+=p[m++],h=s.M,o.addData(h,i,n),a=i,r=n,d="l";break;case"M":i=p[m++],n=p[m++],h=s.M,o.addData(h,i,n),a=i,r=n,d="L";break;case"h":i+=p[m++],h=s.L,o.addData(h,i,n);break;case"H":i=p[m++],h=s.L,o.addData(h,i,n);break;case"v":n+=p[m++],h=s.L,o.addData(h,i,n);break;case"V":n=p[m++],h=s.L,o.addData(h,i,n);break;case"C":h=s.C,o.addData(h,p[m++],p[m++],p[m++],p[m++],p[m++],p[m++]),i=p[m-2],n=p[m-1];break;case"c":h=s.C,o.addData(h,p[m++]+i,p[m++]+n,p[m++]+i,p[m++]+n,p[m++]+i,p[m++]+n),i+=p[m-2],n+=p[m-1];break;case"S":v=i,y=n;var T=o.len(),A=o.data;t===s.C&&(v+=i-A[T-4],y+=n-A[T-3]),h=s.C,M=p[m++],I=p[m++],i=p[m++],n=p[m++],o.addData(h,v,y,M,I,i,n);break;case"s":v=i,y=n;T=o.len(),A=o.data;t===s.C&&(v+=i-A[T-4],y+=n-A[T-3]),h=s.C,M=i+p[m++],I=n+p[m++],i+=p[m++],n+=p[m++],o.addData(h,v,y,M,I,i,n);break;case"Q":M=p[m++],I=p[m++],i=p[m++],n=p[m++],h=s.Q,o.addData(h,M,I,i,n);break;case"q":M=p[m++]+i,I=p[m++]+n,i+=p[m++],n+=p[m++],h=s.Q,o.addData(h,M,I,i,n);break;case"T":v=i,y=n;T=o.len(),A=o.data;t===s.Q&&(v+=i-A[T-4],y+=n-A[T-3]),i=p[m++],n=p[m++],h=s.Q,o.addData(h,v,y,i,n);break;case"t":v=i,y=n;T=o.len(),A=o.data;t===s.Q&&(v+=i-A[T-4],y+=n-A[T-3]),i+=p[m++],n+=p[m++],h=s.Q,o.addData(h,v,y,i,n);break;case"A":x=p[m++],_=p[m++],b=p[m++],w=p[m++],S=p[m++],Qo(M=i,I=n,i=p[m++],n=p[m++],w,S,x,_,b,h=s.A,o);break;case"a":x=p[m++],_=p[m++],b=p[m++],w=p[m++],S=p[m++],Qo(M=i,I=n,i+=p[m++],n+=p[m++],w,S,x,_,b,h=s.A,o)}}"z"!==d&&"Z"!==d||(h=s.Z,o.addData(h),i=a,n=r),t=h}return o.toStatic(),o}(e);return(t=t||{}).buildPath=function(e){if(e.setData){e.setData(i.data),(t=e.getContext())&&e.rebuildPath(t)}else{var t=e;i.rebuildPath(t)}},t.applyTransform=function(e){Zo(i,e),this.dirty(!0)},t}var ns={createFromString:function(e,t){return new Vo(is(e,t))},extendFromString:function(e,t){return Vo.extend(is(e,t))},mergePath:function(e,t){for(var i=[],n=e.length,a=0;a<n;a++){var r=e[a];r.path||r.createPathProxy(),r.__dirtyPath&&r.buildPath(r.path,r.shape,!0),i.push(r.path)}var o=new Vo(t);return o.createPathProxy(),o.buildPath=function(e){e.appendPath(i);var t=e.getContext();t&&e.rebuildPath(t)},o}},as=Yi.ContextCachedBy,rs=function(e){_a.call(this,e)};rs.prototype={constructor:rs,type:"text",brush:function(e,t){var i=this.style;this.__dirty&&fa.normalizeTextStyle(i,!0),i.fill=i.stroke=i.shadowBlur=i.shadowColor=i.shadowOffsetX=i.shadowOffsetY=null;var n=i.text;null!=n&&(n+=""),fa.needDrawText(n,i)?(this.setTransform(e),fa.renderText(this,e,n,i,null,t),this.restoreTransform(e)):e.__attrCachedBy=as.NONE},getBoundingRect:function(){var e=this.style;if(this.__dirty&&fa.normalizeTextStyle(e,!0),!this._rect){var t=e.text;null!=t?t+="":t="";var i=Bn.getBoundingRect(e.text+"",e.font,e.textAlign,e.textVerticalAlign,e.textPadding,e.textLineHeight,e.rich);if(i.x+=e.x||0,i.y+=e.y||0,fa.getStroke(e.textStroke,e.textStrokeWidth)){var n=e.textStrokeWidth;i.x-=n/2,i.y-=n/2,i.width+=n,i.height+=n}this._rect=i}return this._rect}},_e.inherits(rs,_a);var os=rs,ss=Vo.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(e,t,i){i&&e.moveTo(t.cx+t.r,t.cy),e.arc(t.cx,t.cy,t.r,0,2*Math.PI,!0)}}),ls=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]];var us=function(e){return K.browser.ie&&K.browser.version>=11?function(){var t,i=this.__clipPaths,n=this.style;if(i)for(var a=0;a<i.length;a++){var r=i[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<ls.length;l++)ls[l][2]=n[ls[l][0]],n[ls[l][0]]=ls[l][1];t=!0;break}}if(e.apply(this,arguments),t)for(l=0;l<ls.length;l++)n[ls[l][0]]=ls[l][2]}:e},hs=Vo.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:us(Vo.prototype.brush),buildPath:function(e,t){var i=t.cx,n=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),h=Math.sin(o);e.moveTo(u*a+i,h*a+n),e.lineTo(u*r+i,h*r+n),e.arc(i,n,r,o,s,!l),e.lineTo(Math.cos(s)*a+i,Math.sin(s)*a+n),0!==a&&e.arc(i,n,a,s,o,l),e.closePath()}}),cs=Vo.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(e,t){var i=t.cx,n=t.cy,a=2*Math.PI;e.moveTo(i+t.r,n),e.arc(i,n,t.r,0,a,!1),e.moveTo(i+t.r0,n),e.arc(i,n,t.r0,0,a,!0)}}),ds=Te.distance;function ps(e,t,i,n,a,r,o){var s=.5*(i-e),l=.5*(n-t);return(2*(t-i)+s+l)*o+(-3*(t-i)-2*s-l)*r+s*a+t}var fs=function(e,t){for(var i=e.length,n=[],a=0,r=1;r<i;r++)a+=ds(e[r-1],e[r]);var o=a/2;for(o=o<i?i:o,r=0;r<o;r++){var s,l,u,h=r/(o-1)*(t?i:i-1),c=Math.floor(h),d=h-c,p=e[c%i];t?(s=e[(c-1+i)%i],l=e[(c+1)%i],u=e[(c+2)%i]):(s=e[0===c?c:c-1],l=e[c>i-2?i-1:c+1],u=e[c>i-3?i-1:c+2]);var f=d*d,g=d*f;n.push([ps(s[0],p[0],l[0],u[0],d,f,g),ps(s[1],p[1],l[1],u[1],d,f,g)])}return n},gs=Te.min,ms=Te.max,vs=Te.scale,ys=Te.distance,xs=Te.add,_s=Te.clone,bs=Te.sub;var ws=function(e,t,i,n){var a,r,o,s,l=[],u=[],h=[],c=[];if(n){o=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,p=e.length;d<p;d++)gs(o,o,e[d]),ms(s,s,e[d]);gs(o,o,n[0]),ms(s,s,n[1])}for(d=0,p=e.length;d<p;d++){var f=e[d];if(i)a=e[d?d-1:p-1],r=e[(d+1)%p];else{if(0===d||d===p-1){l.push(_s(e[d]));continue}a=e[d-1],r=e[d+1]}bs(u,r,a),vs(u,u,t);var g=ys(f,a),m=ys(f,r),v=g+m;0!==v&&(g/=v,m/=v),vs(h,u,-g),vs(c,u,m);var y=xs([],f,h),x=xs([],f,c);n&&(ms(y,y,o),gs(y,y,s),ms(x,x,o),gs(x,x,s)),l.push(y),l.push(x)}return i&&l.push(l.shift()),l};var Ss={buildPath:function(e,t,i){var n=t.points,a=t.smooth;if(n&&n.length>=2){if(a&&"spline"!==a){var r=ws(n,a,i,t.smoothConstraint);e.moveTo(n[0][0],n[0][1]);for(var o=n.length,s=0;s<(i?o:o-1);s++){var l=r[2*s],u=r[2*s+1],h=n[(s+1)%o];e.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{"spline"===a&&(n=fs(n,i)),e.moveTo(n[0][0],n[0][1]);s=1;for(var c=n.length;s<c;s++)e.lineTo(n[s][0],n[s][1])}i&&e.closePath()}}},Ms=Vo.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(e,t){Ss.buildPath(e,t,!0)}}),Is=Vo.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(e,t){Ss.buildPath(e,t,!1)}}),Ts=Math.round;function As(e,t,i){if(!t)return e;var n=Ts(2*e);return(n+Ts(t))%2==0?n/2:(n+(i?1:-1))/2}var Cs={subPixelOptimizeLine:function(e,t,i){if(t){var n=t.x1,a=t.x2,r=t.y1,o=t.y2;e.x1=n,e.x2=a,e.y1=r,e.y2=o;var s=i&&i.lineWidth;s&&(Ts(2*n)===Ts(2*a)&&(e.x1=e.x2=As(n,s,!0)),Ts(2*r)===Ts(2*o)&&(e.y1=e.y2=As(r,s,!0)))}},subPixelOptimizeRect:function(e,t,i){if(t){var n=t.x,a=t.y,r=t.width,o=t.height;e.x=n,e.y=a,e.width=r,e.height=o;var s=i&&i.lineWidth;s&&(e.x=As(n,s,!0),e.y=As(a,s,!0),e.width=Math.max(As(n+r,s,!1)-e.x,0===r?0:1),e.height=Math.max(As(a+o,s,!1)-e.y,0===o?0:1))}},subPixelOptimize:As},Ds=Cs.subPixelOptimizeRect,Ls={},Ps=Vo.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(e,t){var i,n,a,r;this.subPixelOptimize?(Ds(Ls,t,this.style),i=Ls.x,n=Ls.y,a=Ls.width,r=Ls.height,Ls.r=t.r,t=Ls):(i=t.x,n=t.y,a=t.width,r=t.height),t.r?Vn.buildPath(e,t):e.rect(i,n,a,r),e.closePath()}}),ks=Cs.subPixelOptimizeLine,Os={},Rs=Vo.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(e,t){var i,n,a,r;this.subPixelOptimize?(ks(Os,t,this.style),i=Os.x1,n=Os.y1,a=Os.x2,r=Os.y2):(i=t.x1,n=t.y1,a=t.x2,r=t.y2);var o=t.percent;0!==o&&(e.moveTo(i,n),o<1&&(a=i*(1-o)+a*o,r=n*(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]}}),Ns=Fr.quadraticSubdivide,Es=Fr.cubicSubdivide,zs=Fr.quadraticAt,Bs=Fr.cubicAt,Vs=Fr.quadraticDerivativeAt,Gs=Fr.cubicDerivativeAt,Fs=[];function Hs(e,t,i){var n=e.cpx2,a=e.cpy2;return null===n||null===a?[(i?Gs:Bs)(e.x1,e.cpx1,e.cpx2,e.x2,t),(i?Gs:Bs)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(i?Vs:zs)(e.x1,e.cpx1,e.x2,t),(i?Vs:zs)(e.y1,e.cpy1,e.y2,t)]}var Ws=Vo.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 i=t.x1,n=t.y1,a=t.x2,r=t.y2,o=t.cpx1,s=t.cpy1,l=t.cpx2,u=t.cpy2,h=t.percent;0!==h&&(e.moveTo(i,n),null==l||null==u?(h<1&&(Ns(i,o,a,h,Fs),o=Fs[1],a=Fs[2],Ns(n,s,r,h,Fs),s=Fs[1],r=Fs[2]),e.quadraticCurveTo(o,s,a,r)):(h<1&&(Es(i,o,l,a,h,Fs),o=Fs[1],l=Fs[2],a=Fs[3],Es(n,s,u,r,h,Fs),s=Fs[1],u=Fs[2],r=Fs[3]),e.bezierCurveTo(o,s,l,u,a,r)))},pointAt:function(e){return Hs(this.shape,e,!1)},tangentAt:function(e){var t=Hs(this.shape,e,!0);return Te.normalize(t,t)}}),Us=Vo.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 i=t.cx,n=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+i,u*a+n),e.arc(i,n,a,r,o,!s)}}),Zs=Vo.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var e=this.__dirtyPath,t=this.shape.paths,i=0;i<t.length;i++)e=e||t[i].__dirtyPath;this.__dirtyPath=e,this.__dirty=this.__dirty||e},beforeBrush:function(){this._updatePathDirty();for(var e=this.shape.paths||[],t=this.getGlobalScale(),i=0;i<e.length;i++)e[i].path||e[i].createPathProxy(),e[i].path.setScale(t[0],t[1],e[i].segmentIgnoreThreshold)},buildPath:function(e,t){for(var i=t.paths||[],n=0;n<i.length;n++)i[n].buildPath(e,i[n].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(),Vo.prototype.getBoundingRect.call(this)}}),js=function(e){this.colorStops=e||[]};js.prototype={constructor:js,addColorStop:function(e,t){this.colorStops.push({offset:e,color:t})}};var Ys=js,Xs=function(e,t,i,n,a,r){this.x=null==e?0:e,this.y=null==t?0:t,this.x2=null==i?1:i,this.y2=null==n?0:n,this.type="linear",this.global=r||!1,Ys.call(this,a)};Xs.prototype={constructor:Xs},_e.inherits(Xs,Ys);var qs=Xs,Ks=function(e,t,i,n,a){this.x=null==e?.5:e,this.y=null==t?.5:t,this.r=null==i?.5:i,this.type="radial",this.global=a||!1,Ys.call(this,n)};Ks.prototype={constructor:Ks},_e.inherits(Ks,Ys);var $s=Ks,Js=_e.inherits;function Qs(e){_a.call(this,e),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}Qs.prototype.incremental=!0,Qs.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},Qs.prototype.addDisplayable=function(e,t){t?this._temporaryDisplayables.push(e):this._displayables.push(e),this.dirty()},Qs.prototype.addDisplayables=function(e,t){t=t||!1;for(var i=0;i<e.length;i++)this.addDisplayable(e[i],t)},Qs.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])},Qs.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}},Qs.prototype.brush=function(e,t){for(var i=this._cursor;i<this._displayables.length;i++){(n=this._displayables[i]).beforeBrush&&n.beforeBrush(e),n.brush(e,i===this._cursor?null:this._displayables[i-1]),n.afterBrush&&n.afterBrush(e)}this._cursor=i;for(i=0;i<this._temporaryDisplayables.length;i++){var n;(n=this._temporaryDisplayables[i]).beforeBrush&&n.beforeBrush(e),n.brush(e,0===i?null:this._temporaryDisplayables[i-1]),n.afterBrush&&n.afterBrush(e)}this._temporaryDisplayables=[],this.notClear=!0};var el=[];Qs.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new Oi(1/0,1/0,-1/0,-1/0),t=0;t<this._displayables.length;t++){var i=this._displayables[t],n=i.getBoundingRect().clone();i.needLocalTransform()&&n.applyTransform(i.getLocalTransform(el)),e.union(n)}this._rect=e}return this._rect},Qs.prototype.contain=function(e,t){var i=this.transformCoordToLocal(e,t);if(this.getBoundingRect().contain(i[0],i[1]))for(var n=0;n<this._displayables.length;n++){if(this._displayables[n].contain(e,t))return!0}return!1},Js(Qs,_a);var tl=Qs,il=wa,nl=Ni,al=os,rl=ss,ol=hs,sl=cs,ll=Ms,ul=Is,hl=Ps,cl=Rs,dl=Ws,pl=Us,fl=Zs,gl=qs,ml=$s,vl=Oi,yl=tl,xl=Math.max,_l=Math.min,bl={},wl=1,Sl={},Ml={};function Il(e,t){Ml[e]=t}function Tl(e,t,i,n){var a=ns.createFromString(e,t);return i&&("center"===n&&(i=Al(i,a.getBoundingRect())),Dl(a,i)),a}function Al(e,t){var i,n=t.width/t.height,a=e.height*n;return i=a<=e.width?e.height:(a=e.width)/n,{x:e.x+e.width/2-a/2,y:e.y+e.height/2-i/2,width:a,height:i}}var Cl=ns.mergePath;function Dl(e,t){if(e.applyTransform){var i=e.getBoundingRect().calculateTransform(t);e.applyTransform(i)}}var Ll=Cs.subPixelOptimize;function Pl(e){return null!=e&&"none"!==e}var kl=_e.createHashMap(),Ol=0;function Rl(e){var t=e.__hoverStl;if(t&&!e.__highlighted){var i=e.__zr,n=e.useHoverLayer&&i&&"canvas"===i.painter.type;if(e.__highlighted=n?"layer":"plain",!(e.isGroup||!i&&e.useHoverLayer)){var a=e,r=e.style;n&&(r=(a=i.addHover(e)).style),Kl(r),n||function(e){if(e.__hoverStlDirty){e.__hoverStlDirty=!1;var t=e.__hoverStl;if(t){var i=e.__cachedNormalStl={};e.__cachedNormalZ2=e.z2;var n=e.style;for(var a in t)null!=t[a]&&(i[a]=n[a]);i.fill=n.fill,i.stroke=n.stroke}else e.__cachedNormalStl=e.__cachedNormalZ2=null}}(a),r.extendFrom(t),Nl(r,t,"fill"),Nl(r,t,"stroke"),ql(r),n||(e.dirty(!1),e.z2+=1)}}}function Nl(e,t,i){!Pl(t[i])&&Pl(e[i])&&(e[i]=function(e){if("string"!=typeof e)return e;var t=kl.get(e);return t||(t=Xt.lift(e,-.1),Ol<1e4&&(kl.set(e,t),Ol++)),t}(e[i]))}function El(e){var t=e.__highlighted;if(t&&(e.__highlighted=!1,!e.isGroup))if("layer"===t)e.__zr&&e.__zr.removeHover(e);else{var i=e.style,n=e.__cachedNormalStl;n&&(Kl(i),e.setStyle(n),ql(i));var a=e.__cachedNormalZ2;null!=a&&e.z2-a==1&&(e.z2=a)}}function zl(e,t,i){var n,a="normal",r="normal";e.__highlighted&&(a="emphasis",n=!0),t(e,i),e.__highlighted&&(r="emphasis",n=!0),e.isGroup&&e.traverse((function(e){!e.isGroup&&t(e,i)})),n&&e.__highDownOnUpdate&&e.__highDownOnUpdate(a,r)}function Bl(e,t){t=e.__hoverStl=!1!==t&&(e.hoverStyle||t||{}),e.__hoverStlDirty=!0,e.__highlighted&&(e.__cachedNormalStl=null,El(e),Rl(e))}function Vl(e){!Wl(this,e)&&!this.__highByOuter&&zl(this,Rl)}function Gl(e){!Wl(this,e)&&!this.__highByOuter&&zl(this,El)}function Fl(e){this.__highByOuter|=1<<(e||0),zl(this,Rl)}function Hl(e){!(this.__highByOuter&=~(1<<(e||0)))&&zl(this,El)}function Wl(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function Ul(e,t){var i=!1===t;if(e.__highDownSilentOnTouch=e.highDownSilentOnTouch,e.__highDownOnUpdate=e.highDownOnUpdate,!i||e.__highDownDispatcher){var n=i?"off":"on";e[n]("mouseover",Vl)[n]("mouseout",Gl),e[n]("emphasis",Fl)[n]("normal",Hl),e.__highByOuter=e.__highByOuter||0,e.__highDownDispatcher=!i}}function Zl(e,t,i,n,a){return jl(e,t,n,a),i&&_e.extend(e,i),e}function jl(e,t,i,n){if((i=i||bl).isRectText){var a;i.getTextPosition?a=i.getTextPosition(t,n):"outside"===(a=t.getShallow("position")||(n?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=_e.retrieve2(t.getShallow("distance"),n?null:5)}var o,s=t.ecModel,l=s&&s.option.textStyle,u=function(e){var t;for(;e&&e!==e.ecModel;){var i=(e.option||bl).rich;if(i)for(var n in t=t||{},i)i.hasOwnProperty(n)&&(t[n]=1);e=e.parentModel}return t}(t);if(u)for(var h in o={},u)if(u.hasOwnProperty(h)){var c=t.getModel(["rich",h]);Yl(o[h]={},c,l,i,n)}return e.rich=o,Yl(e,t,l,i,n,!0),i.forceRich&&!i.textStyle&&(i.textStyle={}),e}function Yl(e,t,i,n,a,r){i=!a&&i||bl,e.textFill=Xl(t.getShallow("color"),n)||i.color,e.textStroke=Xl(t.getShallow("textBorderColor"),n)||i.textBorderColor,e.textStrokeWidth=_e.retrieve2(t.getShallow("textBorderWidth"),i.textBorderWidth),a||(r&&(e.insideRollbackOpt=n,ql(e)),null==e.textFill&&(e.textFill=n.autoColor)),e.fontStyle=t.getShallow("fontStyle")||i.fontStyle,e.fontWeight=t.getShallow("fontWeight")||i.fontWeight,e.fontSize=t.getShallow("fontSize")||i.fontSize,e.fontFamily=t.getShallow("fontFamily")||i.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&&n.disableBox||(e.textBackgroundColor=Xl(t.getShallow("backgroundColor"),n),e.textPadding=t.getShallow("padding"),e.textBorderColor=Xl(t.getShallow("borderColor"),n),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")||i.textShadowColor,e.textShadowBlur=t.getShallow("textShadowBlur")||i.textShadowBlur,e.textShadowOffsetX=t.getShallow("textShadowOffsetX")||i.textShadowOffsetX,e.textShadowOffsetY=t.getShallow("textShadowOffsetY")||i.textShadowOffsetY}function Xl(e,t){return"auto"!==e?e:t&&t.autoColor?t.autoColor:null}function ql(e){var t,i=e.textPosition,n=e.insideRollbackOpt;if(n&&null==e.textFill){var a=n.autoColor,r=n.isRectText,o=n.useInsideStyle,s=!1!==o&&(!0===o||r&&i&&"string"==typeof i&&i.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 Kl(e){var t=e.insideRollback;t&&(e.textFill=t.textFill,e.textStroke=t.textStroke,e.textStrokeWidth=t.textStrokeWidth,e.insideRollback=null)}function $l(e,t,i,n,a,r){if("function"==typeof a&&(r=a,a=null),n&&n.isAnimationEnabled()){var o=e?"Update":"",s=n.getShallow("animationDuration"+o),l=n.getShallow("animationEasing"+o),u=n.getShallow("animationDelay"+o);"function"==typeof u&&(u=u(a,n.getAnimationDelayParams?n.getAnimationDelayParams(t,a):null)),"function"==typeof s&&(s=s(a)),s>0?t.animateTo(i,s,u||0,l,r,!!r):(t.stopAnimation(),t.attr(i),r&&r())}else t.stopAnimation(),t.attr(i),r&&r()}function Jl(e,t,i,n,a){$l(!0,e,t,i,n,a)}function Ql(e,t,i){return t&&!_e.isArrayLike(t)&&(t=_t.getLocalTransform(t)),i&&(t=dt.invert([],t)),Te.applyTransform([],e,t)}function eu(e,t,i,n,a,r,o,s){var l,u=i-e,h=n-t,c=o-a,d=s-r,p=tu(c,d,u,h);if((l=p)<=1e-6&&l>=-1e-6)return!1;var f=e-a,g=t-r,m=tu(f,g,u,h)/p;if(m<0||m>1)return!1;var v=tu(f,g,c,d)/p;return!(v<0||v>1)}function tu(e,t,i,n){return e*n-i*t}Il("circle",ss),Il("sector",hs),Il("ring",cs),Il("polygon",Ms),Il("polyline",Is),Il("rect",Ps),Il("line",Rs),Il("bezierCurve",Ws),Il("arc",Us);var iu={Image:il,Group:nl,Text:al,Circle:rl,Sector:ol,Ring:sl,Polygon:ll,Polyline:ul,Rect:hl,Line:cl,BezierCurve:dl,Arc:pl,CompoundPath:fl,LinearGradient:gl,RadialGradient:ml,BoundingRect:vl,IncrementalDisplayable:yl,Z2_EMPHASIS_LIFT:1,CACHED_LABEL_STYLE_PROPERTIES:{color:"textFill",textBorderColor:"textStroke",textBorderWidth:"textStrokeWidth"},extendShape:function(e){return Vo.extend(e)},extendPath:function(e,t){return ns.extendFromString(e,t)},registerShape:Il,getShapeClass:function(e){if(Ml.hasOwnProperty(e))return Ml[e]},makePath:Tl,makeImage:function(e,t,i){var n=new wa({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if("center"===i){var a={width:e.width,height:e.height};n.setStyle(Al(t,a))}}});return n},mergePath:Cl,resizePath:Dl,subPixelOptimizeLine:function(e){return Cs.subPixelOptimizeLine(e.shape,e.shape,e.style),e},subPixelOptimizeRect:function(e){return Cs.subPixelOptimizeRect(e.shape,e.shape,e.style),e},subPixelOptimize:Ll,setElementHoverStyle:Bl,setHoverStyle:function(e,t){Ul(e,!0),zl(e,Bl,t)},setAsHighDownDispatcher:Ul,isHighDownDispatcher:function(e){return!(!e||!e.__highDownDispatcher)},getHighlightDigit:function(e){var t=Sl[e];return null==t&&wl<=32&&(t=Sl[e]=wl++),t},setLabelStyle:function(e,t,i,n,a,r,o){var s,l=(a=a||bl).labelFetcher,u=a.labelDataIndex,h=a.labelDimIndex,c=a.labelProp,d=i.getShallow("show"),p=n.getShallow("show");(d||p)&&(l&&(s=l.getFormattedLabel(u,"normal",null,h,c)),null==s&&(s=_e.isFunction(a.defaultText)?a.defaultText(u,a):a.defaultText));var f=d?s:null,g=p?_e.retrieve2(l?l.getFormattedLabel(u,"emphasis",null,h,c):null,s):null;null==f&&null==g||(Zl(e,i,r,a),Zl(t,n,o,a,!0)),e.text=f,t.text=g},modifyLabelStyle:function(e,t,i){var n=e.style;t&&(Kl(n),e.setStyle(t),ql(n)),n=e.__hoverStl,i&&n&&(Kl(n),_e.extend(n,i),ql(n))},setTextStyle:Zl,setText:function(e,t,i){var n,a={isRectText:!0};!1===i?n=!0:a.autoColor=i,jl(e,t,a,n)},getFont:function(e,t){var i=t&&t.getModel("textStyle");return _e.trim([e.fontStyle||i&&i.getShallow("fontStyle")||"",e.fontWeight||i&&i.getShallow("fontWeight")||"",(e.fontSize||i&&i.getShallow("fontSize")||12)+"px",e.fontFamily||i&&i.getShallow("fontFamily")||"sans-serif"].join(" "))},updateProps:Jl,initProps:function(e,t,i,n,a){$l(!1,e,t,i,n,a)},getTransform:function(e,t){for(var i=dt.identity([]);e&&e!==t;)dt.mul(i,e.getLocalTransform(),i),e=e.parent;return i},applyTransform:Ql,transformDirection:function(e,t,i){var n=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?-n:"right"===e?n:0,"top"===e?-a:"bottom"===e?a:0];return r=Ql(r,t,i),Math.abs(r[0])>Math.abs(r[1])?r[0]>0?"right":"left":r[1]>0?"bottom":"top"},groupTransition:function(e,t,i,n){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 n=o(e);e.attr(o(t)),Jl(e,n,i,e.dataIndex)}}}))}function o(e){var t={position:Te.clone(e.position),rotation:e.rotation};return e.shape&&(t.shape=_e.extend({},e.shape)),t}},clipPointsByRect:function(e,t){return _e.map(e,(function(e){var i=e[0];i=xl(i,t.x),i=_l(i,t.x+t.width);var n=e[1];return n=xl(n,t.y),[i,n=_l(n,t.y+t.height)]}))},clipRectByRect:function(e,t){var i=xl(e.x,t.x),n=_l(e.x+e.width,t.x+t.width),a=xl(e.y,t.y),r=_l(e.y+e.height,t.y+t.height);if(n>=i&&r>=a)return{x:i,y:a,width:n-i,height:r-a}},createIcon:function(e,t,i){var n=(t=_e.extend({rectHover:!0},t)).style={strokeNoScale:!0};if(i=i||{x:-1,y:-1,width:2,height:2},e)return 0===e.indexOf("image://")?(n.image=e.slice(8),_e.defaults(n,i),new wa(t)):Tl(e.replace("path://",""),t,i,"center")},linePolygonIntersect:function(e,t,i,n,a){for(var r=0,o=a[a.length-1];r<a.length;r++){var s=a[r];if(eu(e,t,i,n,s[0],s[1],o[0],o[1]))return!0;o=s}},lineLineIntersect:eu},nu=["textStyle","color"],au={getTextColor:function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(nu):null)},getFont:function(){return iu.getFont({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(e){return Bn.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"))}},ru=Mr([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),ou={getItemStyle:function(e,t){var i=ru(this,e,t),n=this.getBorderLineDash();return n&&(i.lineDash=n),i},getBorderLineDash:function(){var e=this.get("borderType");return"solid"===e||null==e?null:"dashed"===e?[5,5]:[1,1]}},su=vr.makeInner,lu=Sr.enableClassExtend,uu=Sr.enableClassCheck,hu=_e.mixin,cu=su();function du(e,t,i){this.parentModel=t,this.ecModel=i,this.option=e}function pu(e,t,i){for(var n=0;n<t.length&&(!t[n]||null!=(e=e&&"object"==typeof e?e[t[n]]:null));n++);return null==e&&i&&(e=i.get(t)),e}function fu(e,t){var i=cu(e).getParent;return i?i.call(e,t):e.parentModel}du.prototype={constructor:du,init:null,mergeOption:function(e){_e.merge(this.option,e,!0)},get:function(e,t){return null==e?this.option:pu(this.option,this.parsePath(e),!t&&fu(this,e))},getShallow:function(e,t){var i=this.option,n=null==i?i:i[e],a=!t&&fu(this,e);return null==n&&a&&(n=a.getShallow(e)),n},getModel:function(e,t){var i;return new du(null==e?this.option:pu(this.option,e=this.parsePath(e)),t=t||(i=fu(this,e))&&i.getModel(e),this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new(0,this.constructor)(_e.clone(this.option))},setReadOnly:function(e){},parsePath:function(e){return"string"==typeof e&&(e=e.split(".")),e},customizeGetParent:function(e){cu(this).getParent=e},isAnimationEnabled:function(){if(!K.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},lu(du),uu(du),hu(du,Tr),hu(du,Cr),hu(du,au),hu(du,ou);var gu=du,mu=Sr.parseClassType,vu=0;var yu={getUID:function(e){return[e||"",vu++,Math.random().toFixed(5)].join("_")},enableSubTypeDefaulter:function(e){var t={};return e.registerSubTypeDefaulter=function(e,i){e=mu(e),t[e.main]=i},e.determineSubType=function(i,n){var a=n.type;if(!a){var r=mu(i).main;e.hasSubTypes(i)&&t[r]&&(a=t[r](n))}return a},e},enableTopologicalTravel:function(e,t){function i(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}e.topologicalTravel=function(e,n,a,r){if(e.length){var o=function(e){var n={},a=[];return _e.each(e,(function(r){var o=i(n,r),s=function(e,t){var i=[];return _e.each(e,(function(e){_e.indexOf(t,e)>=0&&i.push(e)})),i}(o.originalDeps=t(r),e);o.entryCount=s.length,0===o.entryCount&&a.push(r),_e.each(s,(function(e){_e.indexOf(o.predecessor,e)<0&&o.predecessor.push(e);var t=i(n,e);_e.indexOf(t.successor,e)<0&&t.successor.push(r)}))})),{graph:n,noEntryList:a}}(n),s=o.graph,l=o.noEntryList,u={};for(_e.each(e,(function(e){u[e]=!0}));l.length;){var h=l.pop(),c=s[h],d=!!u[h];d&&(a.call(r,h,c.originalDeps.slice()),delete u[h]),_e.each(c.successor,d?f:p)}_e.each(u,(function(){throw new Error("Circle dependency may exists")}))}function p(e){s[e].entryCount--,0===s[e].entryCount&&l.push(e)}function f(e){u[e]=!0,p(e)}}}};var xu=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function _u(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 bu={linearMap:function(e,t,i,n){var a=t[1]-t[0],r=i[1]-i[0];if(0===a)return 0===r?i[0]:(i[0]+i[1])/2;if(n)if(a>0){if(e<=t[0])return i[0];if(e>=t[1])return i[1]}else{if(e>=t[0])return i[0];if(e<=t[1])return i[1]}else{if(e===t[0])return i[0];if(e===t[1])return i[1]}return(e-t[0])/a*r+i[0]},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?(i=e,i.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):null==e?NaN:+e;var i},round:function(e,t,i){return null==t&&(t=10),t=Math.min(Math.max(0,t),20),e=(+e).toFixed(t),i?e:+e},asc:function(e){return e.sort((function(e,t){return e-t})),e},getPrecision:function(e){if(e=+e,isNaN(e))return 0;for(var t=1,i=0;Math.round(e*t)/t!==e;)t*=10,i++;return i},getPrecisionSafe:function(e){var t=e.toString(),i=t.indexOf("e");if(i>0){var n=+t.slice(i+1);return n<0?-n:0}var a=t.indexOf(".");return a<0?0:t.length-1-a},getPixelPrecision:function(e,t){var i=Math.log,n=Math.LN10,a=Math.floor(i(e[1]-e[0])/n),r=Math.round(i(Math.abs(t[1]-t[0]))/n),o=Math.min(Math.max(-a+r,0),20);return isFinite(o)?o:20},getPercentWithPrecision:function(e,t,i){if(!e[t])return 0;var n=_e.reduce(e,(function(e,t){return e+(isNaN(t)?0:t)}),0);if(0===n)return 0;for(var a=Math.pow(10,i),r=_e.map(e,(function(e){return(isNaN(e)?0:e)/n*a*100})),o=100*a,s=_e.map(r,(function(e){return Math.floor(e)})),l=_e.reduce(s,(function(e,t){return e+t}),0),u=_e.map(r,(function(e,t){return e-s[t]}));l<o;){for(var h=Number.NEGATIVE_INFINITY,c=null,d=0,p=u.length;d<p;++d)u[d]>h&&(h=u[d],c=d);++s[c],u[c]=0,++l}return s[t]/a},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<1e-4},parseDate:function(e){if(e instanceof Date)return e;if("string"==typeof e){var t=xu.exec(e);if(!t)return new Date(NaN);if(t[8]){var i=+t[4]||0;return"Z"!==t[8].toUpperCase()&&(i-=t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,i,+(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,_u(e))},quantityExponent:_u,nice:function(e,t){var i=_u(e),n=Math.pow(10,i),a=e/n;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)*n,i>=-20?+e.toFixed(i<0?-i:0):e},quantile:function(e,t){var i=(e.length-1)*t+1,n=Math.floor(i),a=+e[n-1],r=i-n;return r?a+r*(e[n]-a):a},reformIntervals:function(e){e.sort((function(e,t){return function e(t,i,n){return t.interval[n]<i.interval[n]||t.interval[n]===i.interval[n]&&(t.close[n]-i.close[n]==(n?-1:1)||!n&&e(t,i,1))}(e,t,0)?-1:1}));for(var t=-1/0,i=1,n=0;n<e.length;){for(var a=e[n].interval,r=e[n].close,o=0;o<2;o++)a[o]<=t&&(a[o]=t,r[o]=o?1:1-i),t=a[o],i=r[o];a[0]===a[1]&&r[0]*r[1]!=1?e.splice(n,1):n++}return e},isNumeric:function(e){return e-parseFloat(e)>=0}};var wu=_e.normalizeCssArray,Su=/([&<>"'])/g,Mu={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Iu(e){return null==e?"":(e+"").replace(Su,(function(e,t){return Mu[t]}))}var Tu=["a","b","c","d","e","f","g"],Au=function(e,t){return"{"+e+(null==t?"":t)+"}"};function Cu(e,t){return"0000".substr(0,t-(e+="").length)+e}var Du={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:wu,encodeHTML:Iu,formatTpl:function(e,t,i){_e.isArray(t)||(t=[t]);var n=t.length;if(!n)return"";for(var a=t[0].$vars||[],r=0;r<a.length;r++){var o=Tu[r];e=e.replace(Au(o),Au(o,0))}for(var s=0;s<n;s++)for(var l=0;l<a.length;l++){var u=t[s][a[l]];e=e.replace(Au(Tu[l],s),i?Iu(u):u)}return e},formatTplSimple:function(e,t,i){return _e.each(t,(function(t,n){e=e.replace("{"+n+"}",i?Iu(t):t)})),e},getTooltipMarker:function(e,t){var i=(e=_e.isString(e)?{color:e,extraCssText:t}:e||{}).color,n=e.type,a=(t=e.extraCssText,e.renderMode||"html"),r=e.markerId||"X";return i?"html"===a?"subItem"===n?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Iu(i)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+Iu(i)+";"+(t||"")+'"></span>':{renderMode:a,content:"{marker"+r+"|}  ",style:{color:i}}:""},formatTime:function(e,t,i){"week"!==e&&"month"!==e&&"quarter"!==e&&"half-year"!==e&&"year"!==e||(e="MM-dd\nyyyy");var n=bu.parseDate(t),a=i?"UTC":"",r=n["get"+a+"FullYear"](),o=n["get"+a+"Month"]()+1,s=n["get"+a+"Date"](),l=n["get"+a+"Hours"](),u=n["get"+a+"Minutes"](),h=n["get"+a+"Seconds"](),c=n["get"+a+"Milliseconds"]();return e=e.replace("MM",Cu(o,2)).replace("M",o).replace("yyyy",r).replace("yy",r%100).replace("dd",Cu(s,2)).replace("d",s).replace("hh",Cu(l,2)).replace("h",l).replace("mm",Cu(u,2)).replace("m",u).replace("ss",Cu(h,2)).replace("s",h).replace("SSS",Cu(c,3))},capitalFirst:function(e){return e?e.charAt(0).toUpperCase()+e.substr(1):e},truncateText:Bn.truncateText,getTextBoundingRect:function(e){return Bn.getBoundingRect(e.text,e.font,e.textAlign,e.textVerticalAlign,e.textPadding,e.textLineHeight,e.rich,e.truncate)},getTextRect:function(e,t,i,n,a,r,o,s){return Bn.getBoundingRect(e,t,i,n,a,s,r,o)},windowOpen:function(e,t){if("_blank"===t||"blank"===t){var i=window.open();i.opener=null,i.location=e}else window.open(e,t)}},Lu=bu.parsePercent,Pu=_e.each,ku=["left","right","top","bottom","width","height"],Ou=[["width","left","right"],["height","top","bottom"]];function Ru(e,t,i,n,a){var r=0,o=0;null==n&&(n=1/0),null==a&&(a=1/0);var s=0;t.eachChild((function(l,u){var h,c,d=l.position,p=l.getBoundingRect(),f=t.childAt(u+1),g=f&&f.getBoundingRect();if("horizontal"===e){var m=p.width+(g?-g.x+p.x:0);(h=r+m)>n||l.newline?(r=0,h=m,o+=s+i,s=p.height):s=Math.max(s,p.height)}else{var v=p.height+(g?-g.y+p.y:0);(c=o+v)>a||l.newline?(r+=s+i,o=0,c=v,s=p.width):s=Math.max(s,p.width)}l.newline||(d[0]=r,d[1]=o,"horizontal"===e?r=h+i:o=c+i)}))}var Nu=Ru,Eu=_e.curry(Ru,"vertical"),zu=_e.curry(Ru,"horizontal");function Bu(e,t,i){i=Du.normalizeCssArray(i||0);var n=t.width,a=t.height,r=Lu(e.left,n),o=Lu(e.top,a),s=Lu(e.right,n),l=Lu(e.bottom,a),u=Lu(e.width,n),h=Lu(e.height,a),c=i[2]+i[0],d=i[1]+i[3],p=e.aspect;switch(isNaN(u)&&(u=n-s-d-r),isNaN(h)&&(h=a-l-c-o),null!=p&&(isNaN(u)&&isNaN(h)&&(p>n/a?u=.8*n:h=.8*a),isNaN(u)&&(u=p*h),isNaN(h)&&(h=u/p)),isNaN(r)&&(r=n-s-u-d),isNaN(o)&&(o=a-l-h-c),e.left||e.right){case"center":r=n/2-u/2-i[3];break;case"right":r=n-u-d}switch(e.top||e.bottom){case"middle":case"center":o=a/2-h/2-i[0];break;case"bottom":o=a-h-c}r=r||0,o=o||0,isNaN(u)&&(u=n-d-r-(s||0)),isNaN(h)&&(h=a-c-o-(l||0));var f=new Oi(r+i[3],o+i[0],u,h);return f.margin=i,f}function Vu(e,t){return t&&e&&Pu(ku,(function(i){t.hasOwnProperty(i)&&(e[i]=t[i])})),e}var Gu={LOCATION_PARAMS:ku,HV_NAMES:Ou,box:Nu,vbox:Eu,hbox:zu,getAvailableSize:function(e,t,i){var n=t.width,a=t.height,r=Lu(e.x,n),o=Lu(e.y,a),s=Lu(e.x2,n),l=Lu(e.y2,a);return(isNaN(r)||isNaN(parseFloat(e.x)))&&(r=0),(isNaN(s)||isNaN(parseFloat(e.x2)))&&(s=n),(isNaN(o)||isNaN(parseFloat(e.y)))&&(o=0),(isNaN(l)||isNaN(parseFloat(e.y2)))&&(l=a),i=Du.normalizeCssArray(i||0),{width:Math.max(s-r-i[1]-i[3],0),height:Math.max(l-o-i[0]-i[2],0)}},getLayoutRect:Bu,positionElement:function(e,t,i,n,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 Oi(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=Bu(_e.defaults({width:l.width,height:l.height},t),i,n);var h=e.position,c=r?t.x-l.x:0,d=o?t.y-l.y:0;e.attr("position","raw"===s?[c,d]:[h[0]+c,h[1]+d])}},sizeCalculable:function(e,t){return null!=e[Ou[t][0]]||null!=e[Ou[t][1]]&&null!=e[Ou[t][2]]},mergeLayoutParam:function(e,t,i){!_e.isObject(i)&&(i={});var n=i.ignoreSize;!_e.isArray(n)&&(n=[n,n]);var a=o(Ou[0],0),r=o(Ou[1],1);function o(i,a){var r={},o=0,u={},h=0;if(Pu(i,(function(t){u[t]=e[t]})),Pu(i,(function(e){s(t,e)&&(r[e]=u[e]=t[e]),l(r,e)&&o++,l(u,e)&&h++})),n[a])return l(t,i[1])?u[i[2]]=null:l(t,i[2])&&(u[i[1]]=null),u;if(2!==h&&o){if(o>=2)return r;for(var c=0;c<i.length;c++){var d=i[c];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,i){Pu(e,(function(e){t[e]=i[e]}))}u(Ou[0],e,a),u(Ou[1],e,r)},getLayoutParams:function(e){return Vu({},e)},copyLayoutParams:Vu},Fu={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")}}},Hu=Sr.enableClassManagement,Wu=Sr.parseClassType,Uu=(0,vr.makeInner)(),Zu=gu.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(e,t,i,n){gu.call(this,e,t,i,n),this.uid=yu.getUID("ec_cpt_model")},init:function(e,t,i,n){this.mergeDefaultAndTheme(e,i)},mergeDefaultAndTheme:function(e,t){var i=this.layoutMode,n=i?Gu.getLayoutParams(e):{},a=t.getTheme();_e.merge(e,a.get(this.mainType)),_e.merge(e,this.getDefaultOption()),i&&Gu.mergeLayoutParam(e,n,i)},mergeOption:function(e,t){_e.merge(this.option,e,!0);var i=this.layoutMode;i&&Gu.mergeLayoutParam(this.option,e,i)},optionUpdated:function(e,t){},getDefaultOption:function(){var e=Uu(this);if(!e.defaultOption){for(var t=[],i=this.constructor;i;){var n=i.prototype.defaultOption;n&&t.push(n),i=i.superClass}for(var a={},r=t.length-1;r>=0;r--)a=_e.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)})}});Hu(Zu,{registerWhenExtend:!0}),yu.enableSubTypeDefaulter(Zu),yu.enableTopologicalTravel(Zu,(function(e){var t=[];_e.each(Zu.getClassesByMainType(e),(function(e){t=t.concat(e.prototype.dependencies||[])})),t=_e.map(t,(function(e){return Wu(e).main})),"dataset"!==e&&_e.indexOf(t,"dataset")<=0&&t.unshift("dataset");return t})),_e.mixin(Zu,Fu);var ju=Zu,Yu="";"undefined"!=typeof navigator&&(Yu=navigator.platform||"");var Xu={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:Yu.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},qu=vr.makeInner,Ku=vr.normalizeToArray,$u=qu();var Ju={clearColorPalette:function(){$u(this).colorIdx=0,$u(this).colorNameMap={}},getColorFromPalette:function(e,t,i){var n=$u(t=t||this),a=n.colorIdx||0,r=n.colorNameMap=n.colorNameMap||{};if(r.hasOwnProperty(e))return r[e];var o=Ku(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=i&&s?function(e,t){for(var i=e.length,n=0;n<i;n++)if(e[n].length>t)return e[n];return e[i-1]}(s,i):o;if((l=l||o)&&l.length){var u=l[a];return e&&(r[e]=u),n.colorIdx=(a+1)%l.length,u}}},Qu={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"},eh=_e.createHashMap,th=_e.isTypedArray,ih=Sr.enableClassCheck,nh=Qu.SOURCE_FORMAT_ORIGINAL,ah=Qu.SERIES_LAYOUT_BY_COLUMN,rh=Qu.SOURCE_FORMAT_UNKNOWN,oh=Qu.SOURCE_FORMAT_TYPED_ARRAY,sh=Qu.SOURCE_FORMAT_KEYED_COLUMNS;function lh(e){this.fromDataset=e.fromDataset,this.data=e.data||(e.sourceFormat===sh?{}:[]),this.sourceFormat=e.sourceFormat||rh,this.seriesLayoutBy=e.seriesLayoutBy||ah,this.dimensionsDefine=e.dimensionsDefine,this.encodeDefine=e.encodeDefine&&eh(e.encodeDefine),this.startIndex=e.startIndex||0,this.dimensionsDetectCount=e.dimensionsDetectCount}lh.seriesDataToSource=function(e){return new lh({data:e,sourceFormat:th(e)?oh:nh,fromDataset:!1})},ih(lh);var uh=lh,hh=vr.makeInner,ch=vr.getDataItemValue,dh=_e.createHashMap,ph=_e.each,fh=_e.map,gh=_e.isArray,mh=_e.isString,vh=_e.isObject,yh=_e.isTypedArray,xh=_e.isArrayLike,_h=_e.extend,bh=Qu.SOURCE_FORMAT_ORIGINAL,wh=Qu.SOURCE_FORMAT_ARRAY_ROWS,Sh=Qu.SOURCE_FORMAT_OBJECT_ROWS,Mh=Qu.SOURCE_FORMAT_KEYED_COLUMNS,Ih=Qu.SOURCE_FORMAT_UNKNOWN,Th=Qu.SOURCE_FORMAT_TYPED_ARRAY,Ah=Qu.SERIES_LAYOUT_BY_ROW,Ch={Must:1,Might:2,Not:3},Dh=hh();function Lh(e){if(e){var t=dh();return fh(e,(function(e,i){if(null==(e=_h({},vh(e)?e:{name:e})).name)return e;e.name+="",null==e.displayName&&(e.displayName=e.name);var n=t.get(e.name);return n?e.name+="-"+n.count++:t.set(e.name,{count:1}),e}))}}function Ph(e,t,i,n){if(null==n&&(n=1/0),t===Ah)for(var a=0;a<i.length&&a<n;a++)e(i[a]?i[a][0]:null,a);else{var r=i[0]||[];for(a=0;a<r.length&&a<n;a++)e(r[a],a)}}function kh(e){var t=e.option;if(!t.data)return e.ecModel.getComponent("dataset",t.datasetIndex||0)}function Oh(e,t,i,n,a,r){var o,s,l;if(yh(e))return Ch.Not;if(n){var u=n[r];vh(u)?(s=u.name,l=u.type):mh(u)&&(s=u)}if(null!=l)return"ordinal"===l?Ch.Must:Ch.Not;if(t===wh)if(i===Ah){for(var h=e[r],c=0;c<(h||[]).length&&c<5;c++)if(null!=(o=g(h[a+c])))return o}else for(c=0;c<e.length&&c<5;c++){var d=e[a+c];if(d&&null!=(o=g(d[r])))return o}else if(t===Sh){if(!s)return Ch.Not;for(c=0;c<e.length&&c<5;c++){if((p=e[c])&&null!=(o=g(p[s])))return o}}else if(t===Mh){if(!s)return Ch.Not;if(!(h=e[s])||yh(h))return Ch.Not;for(c=0;c<h.length&&c<5;c++)if(null!=(o=g(h[c])))return o}else if(t===bh)for(c=0;c<e.length&&c<5;c++){var p=e[c],f=ch(p);if(!gh(f))return Ch.Not;if(null!=(o=g(f[r])))return o}function g(e){var t=mh(e);return null!=e&&isFinite(e)&&""!==e?t?Ch.Might:Ch.Not:t&&"-"!==e?Ch.Must:void 0}return Ch.Not}var Rh={BE_ORDINAL:Ch,detectSourceFormat:function(e){var t=e.option.source,i=Ih;if(yh(t))i=Th;else if(gh(t)){0===t.length&&(i=wh);for(var n=0,a=t.length;n<a;n++){var r=t[n];if(null!=r){if(gh(r)){i=wh;break}if(vh(r)){i=Sh;break}}}}else if(vh(t)){for(var o in t)if(t.hasOwnProperty(o)&&xh(t[o])){i=Mh;break}}else if(null!=t)throw new Error("Invalid data");Dh(e).sourceFormat=i},getSource:function(e){return Dh(e).source},resetSourceDefaulter:function(e){Dh(e).datasetMap=dh()},prepareSource:function(e){var t=e.option,i=t.data,n=yh(i)?Th:bh,a=!1,r=t.seriesLayoutBy,o=t.sourceHeader,s=t.dimensions,l=kh(e);if(l){var u=l.option;i=u.source,n=Dh(l).sourceFormat,a=!0,r=r||u.seriesLayoutBy,null==o&&(o=u.sourceHeader),s=s||u.dimensions}var h=function(e,t,i,n,a){if(!e)return{dimensionsDefine:Lh(a)};var r,o;if(t===wh)"auto"===n||null==n?Ph((function(e){null!=e&&"-"!==e&&(mh(e)?null==o&&(o=1):o=0)}),i,e,10):o=n?1:0,a||1!==o||(a=[],Ph((function(e,t){a[t]=null!=e?e:""}),i,e)),r=a?a.length:i===Ah?e.length:e[0]?e[0].length:null;else if(t===Sh)a||(a=function(e){var t,i=0;for(;i<e.length&&!(t=e[i++]););if(t){var n=[];return ph(t,(function(e,t){n.push(t)})),n}}(e));else if(t===Mh)a||(a=[],ph(e,(function(e,t){a.push(t)})));else if(t===bh){var s=ch(e[0]);r=gh(s)&&s.length||1}return{startIndex:o,dimensionsDefine:Lh(a),dimensionsDetectCount:r}}(i,n,r,o,s);Dh(e).source=new uh({data:i,fromDataset:a,seriesLayoutBy:r,sourceFormat:n,dimensionsDefine:h.dimensionsDefine,startIndex:h.startIndex,dimensionsDetectCount:h.dimensionsDetectCount,encodeDefine:t.encode})},makeSeriesEncodeForAxisCoordSys:function(e,t,i){var n={},a=kh(t);if(!a||!e)return n;var r,o,s=[],l=[],u=t.ecModel,h=Dh(u).datasetMap,c=a.uid+"_"+i.seriesLayoutBy;e=e.slice(),ph(e,(function(t,i){!vh(t)&&(e[i]={name:t}),"ordinal"===t.type&&null==r&&(r=i,o=f(e[i])),n[t.name]=[]}));var d=h.get(c)||h.set(c,{categoryWayDim:o,valueWayDim:0});function p(e,t,i){for(var n=0;n<i;n++)e.push(t+n)}function f(e){var t=e.dimsDef;return t?t.length:1}return ph(e,(function(e,t){var i=e.name,a=f(e);if(null==r){var o=d.valueWayDim;p(n[i],o,a),p(l,o,a),d.valueWayDim+=a}else if(r===t)p(n[i],0,a),p(s,0,a);else{o=d.categoryWayDim;p(n[i],o,a),p(l,o,a),d.categoryWayDim+=a}})),s.length&&(n.itemName=s),l.length&&(n.seriesName=l),n},makeSeriesEncodeForNameBased:function(e,t,i){var n={};if(!kh(e))return n;var a,r=t.sourceFormat,o=t.dimensionsDefine;r!==Sh&&r!==Mh||ph(o,(function(e,t){"name"===(vh(e)?e.name:e)&&(a=t)}));var s=function(){for(var e={},n={},s=[],l=0,u=Math.min(5,i);l<u;l++){var h=Oh(t.data,r,t.seriesLayoutBy,o,t.startIndex,l);s.push(h);var c=h===Ch.Not;if(c&&null==e.v&&l!==a&&(e.v=l),(null==e.n||e.n===e.v||!c&&s[e.n]===Ch.Not)&&(e.n=l),d(e)&&s[e.n]!==Ch.Not)return e;c||(h===Ch.Might&&null==n.v&&l!==a&&(n.v=l),null!=n.n&&n.n!==n.v||(n.n=l))}function d(e){return null!=e.v&&null!=e.n}return d(e)?e:d(n)?n:null}();if(s){n.value=s.v;var l=null!=a?a:s.n;n.itemName=[l],n.seriesName=[l]}return n},guessOrdinal:function(e,t){return Oh(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}},Nh=_e.each,Eh=_e.filter,zh=_e.map,Bh=_e.isArray,Vh=_e.indexOf,Gh=_e.isObject,Fh=_e.isString,Hh=_e.createHashMap,Wh=_e.assert,Uh=_e.clone,Zh=_e.merge,jh=_e.extend,Yh=_e.mixin,Xh=Rh.resetSourceDefaulter,qh=gu.extend({init:function(e,t,i,n){i=i||{},this.option=null,this._theme=new gu(i),this._optionManager=n},setOption:function(e,t){Wh(!("\0_ec_inner"in e),"please use chart.getOption()"),this._optionManager.setOption(e,t),this.resetOption(null)},resetOption:function(e){var t=!1,i=this._optionManager;if(!e||"recreate"===e){var n=i.mountOption("recreate"===e);this.option&&"recreate"!==e?(this.restoreData(),this.mergeOption(n)):Kh.call(this,n),t=!0}if("timeline"!==e&&"media"!==e||this.restoreData(),!e||"recreate"===e||"timeline"===e){var a=i.getTimelineOption(this);a&&(this.mergeOption(a),t=!0)}if(!e||"recreate"===e||"media"===e){var r=i.getMediaOption(this,this._api);r.length&&Nh(r,(function(e){this.mergeOption(e,t=!0)}),this)}return t},mergeOption:function(e){var t=this.option,i=this._componentsMap,n=[];Xh(this),Nh(e,(function(e,i){null!=e&&(ju.hasClass(i)?i&&n.push(i):t[i]=null==t[i]?Uh(e):Zh(t[i],e,!0))})),ju.topologicalTravel(n,ju.getAllClassMainTypes(),(function(n,a){var r=vr.normalizeToArray(e[n]),o=vr.mappingToExists(i.get(n),r);vr.makeIdAndName(o),Nh(o,(function(e,t){var i=e.option;Gh(i)&&(e.keyInfo.mainType=n,e.keyInfo.subType=function(e,t,i){return t.type?t.type:i?i.subType:ju.determineSubType(e,t)}(n,i,e.exist))}));var s=function(e,t){Bh(t)||(t=t?[t]:[]);var i={};return Nh(t,(function(t){i[t]=(e.get(t)||[]).slice()})),i}(i,a);t[n]=[],i.set(n,[]),Nh(o,(function(e,a){var r=e.exist,o=e.option;if(Wh(Gh(o)||r,"Empty component definition"),o){var l=ju.getClass(n,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=jh({dependentModels:s,componentIndex:a},e.keyInfo);r=new l(o,this,this,u),jh(r,u),r.init(o,this,this,u),r.optionUpdated(null,!0)}}else r.mergeOption({},this),r.optionUpdated({},!1);i.get(n)[a]=r,t[n][a]=r.option}),this),"series"===n&&$h(this,i.get("series"))}),this),this._seriesIndicesMap=Hh(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var e=Uh(this.option);return Nh(e,(function(t,i){if(ju.hasClass(i)){for(var n=(t=vr.normalizeToArray(t)).length-1;n>=0;n--)vr.isIdInner(t[n])&&t.splice(n,1);e[i]=t}})),delete e["\0_ec_inner"],e},getTheme:function(){return this._theme},getComponent:function(e,t){var i=this._componentsMap.get(e);if(i)return i[t||0]},queryComponents:function(e){var t=e.mainType;if(!t)return[];var i,n=e.index,a=e.id,r=e.name,o=this._componentsMap.get(t);if(!o||!o.length)return[];if(null!=n)Bh(n)||(n=[n]),i=Eh(zh(n,(function(e){return o[e]})),(function(e){return!!e}));else if(null!=a){var s=Bh(a);i=Eh(o,(function(e){return s&&Vh(a,e.id)>=0||!s&&e.id===a}))}else if(null!=r){var l=Bh(r);i=Eh(o,(function(e){return l&&Vh(r,e.name)>=0||!l&&e.name===r}))}else i=o.slice();return Jh(i,e)},findComponents:function(e){var t,i,n,a,r,o=e.query,s=e.mainType,l=(i=s+"Index",n=s+"Id",a=s+"Name",!(t=o)||null==t[i]&&null==t[n]&&null==t[a]?null:{mainType:s,index:t[i],id:t[n],name:t[a]}),u=l?this.queryComponents(l):this._componentsMap.get(s);return r=Jh(u,e),e.filter?Eh(r,e.filter):r},eachComponent:function(e,t,i){var n=this._componentsMap;if("function"==typeof e)i=t,t=e,n.each((function(e,n){Nh(e,(function(e,a){t.call(i,n,e,a)}))}));else if(Fh(e))Nh(n.get(e),t,i);else if(Gh(e)){var a=this.findComponents(e);Nh(a,t,i)}},getSeriesByName:function(e){var t=this._componentsMap.get("series");return Eh(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 Eh(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){Nh(this._seriesIndices,(function(i){var n=this._componentsMap.get("series")[i];e.call(t,n,i)}),this)},eachRawSeries:function(e,t){Nh(this._componentsMap.get("series"),e,t)},eachSeriesByType:function(e,t,i){Nh(this._seriesIndices,(function(n){var a=this._componentsMap.get("series")[n];a.subType===e&&t.call(i,a,n)}),this)},eachRawSeriesByType:function(e,t,i){return Nh(this.getSeriesByType(e),t,i)},isSeriesFiltered:function(e){return null==this._seriesIndicesMap.get(e.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(e,t){$h(this,Eh(this._componentsMap.get("series"),e,t))},restoreData:function(e){var t=this._componentsMap;$h(this,t.get("series"));var i=[];t.each((function(e,t){i.push(t)})),ju.topologicalTravel(i,ju.getAllClassMainTypes(),(function(i,n){Nh(t.get(i),(function(t){("series"!==i||!function(e,t){if(t){var i=t.seiresIndex,n=t.seriesId,a=t.seriesName;return null!=i&&e.componentIndex!==i||null!=n&&e.id!==n||null!=a&&e.name!==a}}(t,e))&&t.restoreData()}))}))}});function Kh(e){e=e,this.option={},this.option["\0_ec_inner"]=1,this._componentsMap=Hh({series:[]}),this._seriesIndices,this._seriesIndicesMap,function(e,t){var i=e.color&&!e.colorLayer;Nh(t,(function(t,n){"colorLayer"===n&&i||ju.hasClass(n)||("object"==typeof t?e[n]=e[n]?Zh(e[n],t,!1):Uh(t):null==e[n]&&(e[n]=t))}))}(e,this._theme.option),Zh(e,Xu,!1),this.mergeOption(e)}function $h(e,t){e._seriesIndicesMap=Hh(e._seriesIndices=zh(t,(function(e){return e.componentIndex}))||[])}function Jh(e,t){return t.hasOwnProperty("subType")?Eh(e,(function(e){return e.subType===t.subType})):e}Yh(qh,Ju);var Qh=qh,ec=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];var tc=function(e){_e.each(ec,(function(t){this[t]=_e.bind(e[t],e)}),this)},ic={};function nc(){this._coordinateSystems=[]}nc.prototype={constructor:nc,create:function(e,t){var i=[];_e.each(ic,(function(n,a){var r=n.create(e,t);i=i.concat(r||[])})),this._coordinateSystems=i},update:function(e,t){_e.each(this._coordinateSystems,(function(i){i.update&&i.update(e,t)}))},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},nc.register=function(e,t){ic[e]=t},nc.get=function(e){return ic[e]};var ac=nc,rc=_e.each,oc=_e.clone,sc=_e.map,lc=_e.merge,uc=/^(min|max)?(.+)$/;function hc(e){this._api=e,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function cc(e,t,i){var n,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;rc(l,(function(e){e&&e.option&&(e.query?o.push(e):n||(n=e))}))}return a||(a=e),a.timeline||(a.timeline=s),rc([a].concat(r).concat(_e.map(o,(function(e){return e.option}))),(function(e){rc(t,(function(t){t(e,i)}))})),{baseOption:a,timelineOptions:r,mediaDefault:n,mediaList:o}}function dc(e,t,i){var n={width:t,height:i,aspectratio:t/i},a=!0;return _e.each(e,(function(e,t){var i=t.match(uc);if(i&&i[1]&&i[2]){var r=i[1],o=i[2].toLowerCase();(function(e,t,i){return"min"===i?e>=t:"max"===i?e<=t:e===t})(n[o],e,r)||(a=!1)}})),a}hc.prototype={constructor:hc,setOption:function(e,t){e&&_e.each(vr.normalizeToArray(e.series),(function(e){e&&e.data&&_e.isTypedArray(e.data)&&_e.setAsPrimitive(e.data)})),e=oc(e);var i,n,a=this._optionBackup,r=cc.call(this,e,t,!a);this._newBaseOption=r.baseOption,a?(i=a.baseOption,n=r.baseOption,rc(n=n||{},(function(e,t){if(null!=e){var n=i[t];if(ju.hasClass(t)){e=vr.normalizeToArray(e),n=vr.normalizeToArray(n);var a=vr.mappingToExists(n,e);i[t]=sc(a,(function(e){return e.option&&e.exist?lc(e.exist,e.option,!0):e.exist||e.option}))}else i[t]=lc(n,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=sc(t.timelineOptions,oc),this._mediaList=sc(t.mediaList,oc),this._mediaDefault=oc(t.mediaDefault),this._currentMediaIndices=[],oc(e?t.baseOption:this._newBaseOption)},getTimelineOption:function(e){var t,i=this._timelineOptions;if(i.length){var n=e.getComponent("timeline");n&&(t=oc(i[n.getCurrentIndex()],!0))}return t},getMediaOption:function(e){var t,i,n=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,h=r.length;u<h;u++)dc(r[u].query,n,a)&&s.push(u);return!s.length&&o&&(s=[-1]),s.length&&(t=s,i=this._currentMediaIndices,t.join(",")!==i.join(","))&&(l=sc(s,(function(e){return oc(-1===e?o.option:r[e].option)}))),this._currentMediaIndices=s,l}};var pc=hc,fc=_e.each,gc=_e.isObject,mc=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function vc(e){var t=e&&e.itemStyle;if(t)for(var i=0,n=mc.length;i<n;i++){var a=mc[i],r=t.normal,o=t.emphasis;r&&r[a]&&(e[a]=e[a]||{},e[a].normal?_e.merge(e[a].normal,r[a]):e[a].normal=r[a],r[a]=null),o&&o[a]&&(e[a]=e[a]||{},e[a].emphasis?_e.merge(e[a].emphasis,o[a]):e[a].emphasis=o[a],o[a]=null)}}function yc(e,t,i){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var n=e[t].normal,a=e[t].emphasis;n&&(i?(e[t].normal=e[t].emphasis=null,_e.defaults(e[t],n)):e[t]=n),a&&(e.emphasis=e.emphasis||{},e.emphasis[t]=a)}}function xc(e){yc(e,"itemStyle"),yc(e,"lineStyle"),yc(e,"areaStyle"),yc(e,"label"),yc(e,"labelLine"),yc(e,"upperLabel"),yc(e,"edgeLabel")}function _c(e,t){var i=gc(e)&&e[t],n=gc(i)&&i.textStyle;if(n)for(var a=0,r=vr.TEXT_STYLE_OPTIONS.length;a<r;a++){t=vr.TEXT_STYLE_OPTIONS[a];n.hasOwnProperty(t)&&(i[t]=n[t])}}function bc(e){e&&(xc(e),_c(e,"label"),e.emphasis&&_c(e.emphasis,"label"))}function wc(e){return _e.isArray(e)?e:e?[e]:[]}function Sc(e){return(_e.isArray(e)?e[0]:e)||{}}var Mc=function(e,t){fc(wc(e.series),(function(e){gc(e)&&function(e){if(gc(e)){vc(e),xc(e),_c(e,"label"),_c(e,"upperLabel"),_c(e,"edgeLabel"),e.emphasis&&(_c(e.emphasis,"label"),_c(e.emphasis,"upperLabel"),_c(e.emphasis,"edgeLabel")),(i=e.markPoint)&&(vc(i),bc(i)),(n=e.markLine)&&(vc(n),bc(n));var t=e.markArea;t&&bc(t);var i,n,a=e.data;if("graph"===e.type){a=a||e.nodes;var r=e.links||e.edges;if(r&&!_e.isTypedArray(r))for(var o=0;o<r.length;o++)bc(r[o]);_e.each(e.categories,(function(e){xc(e)}))}if(a&&!_e.isTypedArray(a))for(o=0;o<a.length;o++)bc(a[o]);if((i=e.markPoint)&&i.data){var s=i.data;for(o=0;o<s.length;o++)bc(s[o])}if((n=e.markLine)&&n.data){var l=n.data;for(o=0;o<l.length;o++)_e.isArray(l[o])?(bc(l[o][0]),bc(l[o][1])):bc(l[o])}"gauge"===e.type?(_c(e,"axisLabel"),_c(e,"title"),_c(e,"detail")):"treemap"===e.type?(yc(e.breadcrumb,"itemStyle"),_e.each(e.levels,(function(e){xc(e)}))):"tree"===e.type&&xc(e.leaves)}}(e)}));var i=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&i.push("valueAxis","categoryAxis","logAxis","timeAxis"),fc(i,(function(t){fc(wc(e[t]),(function(e){e&&(_c(e,"axisLabel"),_c(e.axisPointer,"label"))}))})),fc(wc(e.parallel),(function(e){var t=e&&e.parallelAxisDefault;_c(t,"axisLabel"),_c(t&&t.axisPointer,"label")})),fc(wc(e.calendar),(function(e){yc(e,"itemStyle"),_c(e,"dayLabel"),_c(e,"monthLabel"),_c(e,"yearLabel")})),fc(wc(e.radar),(function(e){_c(e,"name")})),fc(wc(e.geo),(function(e){gc(e)&&(bc(e),fc(wc(e.regions),(function(e){bc(e)})))})),fc(wc(e.timeline),(function(e){bc(e),yc(e,"label"),yc(e,"itemStyle"),yc(e,"controlStyle",!0);var t=e.data;_e.isArray(t)&&_e.each(t,(function(e){_e.isObject(e)&&(yc(e,"label"),yc(e,"itemStyle"))}))})),fc(wc(e.toolbox),(function(e){yc(e,"iconStyle"),fc(e.feature,(function(e){yc(e,"iconStyle")}))})),_c(Sc(e.axisPointer),"label"),_c(Sc(e.tooltip).axisPointer,"label")},Ic=_e.each,Tc=_e.isArray,Ac=_e.isObject,Cc=vr.normalizeToArray;function Dc(e){Ic(Lc,(function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])}))}var Lc=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],Pc=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"];var kc=function(e,t){Mc(e,t),e.series=Cc(e.series),Ic(e.series,(function(e){if(Ac(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 i=function(e,t){t=t.split(",");for(var i=e,n=0;n<t.length&&null!=(i=i&&i[t[n]]);n++);return i}(e,"pointer.color");null!=i&&function(e,t,i,n){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];(n||null==r[t[o]])&&(r[t[o]]=i)}(e,"itemStyle.color",i)}Dc(e)}})),e.dataRange&&(e.visualMap=e.dataRange),Ic(Pc,(function(t){var i=e[t];i&&(Tc(i)||(i=[i]),Ic(i,(function(e){Dc(e)})))}))},Oc=_e.createHashMap,Rc=_e.each;function Nc(e){Rc(e,(function(t,i){var n=[],a=[NaN,NaN],r=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,l=o.map(r,(function(r,l,u){var h,c,d=o.get(t.stackedDimension,u);if(isNaN(d))return a;s?c=o.getRawIndex(u):h=o.get(t.stackedByDimension,u);for(var p=NaN,f=i-1;f>=0;f--){var g=e[f];if(s||(c=g.data.rawIndexOf(g.stackedByDimension,h)),c>=0){var m=g.data.getByRawIndex(g.stackResultDimension,c);if(d>=0&&m>0||d<=0&&m<0){d+=m,p=m;break}}}return n[0]=d,n[1]=p,n}));o.hostModel.setData(l),t.data=l}))}var Ec=function(e){var t=Oc();e.eachSeries((function(e){var i=e.get("stack");if(i){var n=t.get(i)||t.set(i,[]),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;n.length&&a.setCalculationInfo("stackedOnSeries",n[n.length-1].seriesModel),n.push(r)}})),t.each(Nc)},zc=_e.extend,Bc=_e.each,Vc=_e.isObject,Gc=vr.getDataItemValue,Fc=vr.isDataItemOption,Hc=bu.parseDate,Wc=Qu.SOURCE_FORMAT_TYPED_ARRAY,Uc=Qu.SOURCE_FORMAT_ARRAY_ROWS,Zc=Qu.SOURCE_FORMAT_ORIGINAL,jc=Qu.SOURCE_FORMAT_OBJECT_ROWS;function Yc(e,t){uh.isInstance(e)||(e=uh.seriesDataToSource(e)),this._source=e;var i=this._data=e.data,n=e.sourceFormat;n===Wc&&(this._offset=0,this._dimSize=t,this._data=i);var a=qc[n===Uc?n+"_"+e.seriesLayoutBy:n];zc(this,a)}var Xc=Yc.prototype;Xc.pure=!1,Xc.persistent=!0,Xc.getSource=function(){return this._source};var qc={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:Jc},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=[],i=this._data,n=0;n<i.length;n++){var a=i[n];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:Kc,getItem:$c,appendData:Jc},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=[],i=this._source.dimensionsDefine,n=0;n<i.length;n++){var a=this._data[i[n].name];t.push(a?a[e]:null)}return t},appendData:function(e){var t=this._data;Bc(e,(function(e,i){for(var n=t[i]||(t[i]=[]),a=0;a<(e||[]).length;a++)n.push(e[a])}))}},original:{count:Kc,getItem:$c,appendData:Jc},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 i=this._dimSize*e,n=0;n<this._dimSize;n++)t[n]=this._data[i+n];return t},appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}}};function Kc(){return this._data.length}function $c(e){return this._data[e]}function Jc(e){for(var t=0;t<e.length;t++)this._data.push(e[t])}var Qc={arrayRows:ed,objectRows:function(e,t,i,n){return null!=i?e[n]:e},keyedColumns:ed,original:function(e,t,i,n){var a=Gc(e);return null!=i&&a instanceof Array?a[i]:a},typedArray:ed};function ed(e,t,i,n){return null!=i?e[i]:e}function td(e,t,i,n){return id(e[n],this._dimensionInfos[t])}function id(e,t){var i=t&&t.type;if("ordinal"===i){var n=t&&t.ordinalMeta;return n?n.parseAndCollect(e):e}return"time"===i&&"number"!=typeof e&&null!=e&&"-"!==e&&(e=+Hc(e)),null==e||""===e?NaN:+e}var nd={DefaultDataProvider:Yc,defaultDimValueGetters:{arrayRows:td,objectRows:function(e,t,i,n){return id(e[t],this._dimensionInfos[t])},keyedColumns:td,original:function(e,t,i,n){var a=e&&(null==e.value?e:e.value);return!this._rawData.pure&&Fc(e)&&(this.hasItemOption=!0),id(a instanceof Array?a[n]:a,this._dimensionInfos[t])},typedArray:function(e,t,i,n){return e[n]}},retrieveRawValue:function(e,t,i){if(e){var n=e.getRawDataItem(t);if(null!=n){var a,r,o=e.getProvider().getSource().sourceFormat,s=e.getDimensionInfo(i);return s&&(a=s.name,r=s.index),Qc[o](n,t,r,a)}}},retrieveRawAttr:function(e,t,i){if(e){var n=e.getProvider().getSource().sourceFormat;if(n===Zc||n===jc){var a=e.getRawDataItem(t);return n!==Zc||Vc(a)||(a=null),a?a[i]:void 0}}}},ad=nd.retrieveRawValue,rd=Du.getTooltipMarker,od=Du.formatTpl,sd=vr.getTooltipRenderMode,ld=/\{@(.+?)\}/g,ud={getDataParams:function(e,t){var i=this.getData(t),n=this.getRawValue(e,t),a=i.getRawIndex(e),r=i.getName(e),o=i.getRawDataItem(e),s=i.getItemVisual(e,"color"),l=i.getItemVisual(e,"borderColor"),u=this.ecModel.getComponent("tooltip"),h=u&&u.get("renderMode"),c=sd(h),d=this.mainType,p="series"===d,f=i.userOutput;return{componentType:d,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:p?this.subType:null,seriesIndex:this.seriesIndex,seriesId:p?this.id:null,seriesName:p?this.name:null,name:r,dataIndex:a,data:o,dataType:t,value:n,color:s,borderColor:l,dimensionNames:f?f.dimensionNames:null,encode:f?f.encode:null,marker:rd({color:s,renderMode:c}),$vars:["seriesName","name","value"]}},getFormattedLabel:function(e,t,i,n,a){t=t||"normal";var r=this.getData(i),o=r.getItemModel(e),s=this.getDataParams(e,i);null!=n&&s.value instanceof Array&&(s.value=s.value[n]);var l=o.get("normal"===t?[a||"label","formatter"]:[t,a||"label","formatter"]);return"function"==typeof l?(s.status=t,s.dimensionIndex=n,l(s)):"string"==typeof l?od(l,s).replace(ld,(function(t,i){var n=i.length;return"["===i.charAt(0)&&"]"===i.charAt(n-1)&&(i=+i.slice(1,n-1)),ad(r,e,i)})):void 0},getRawValue:function(e,t){return ad(this.getData(t),e)},formatTooltip:function(){}},hd=_e.isArray;function cd(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 dd=cd.prototype;dd.perform=function(e){var t,i=this._upstream,n=e&&e.skip;if(this._dirty&&i){var a=this.context;a.data=a.outputData=i.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!n&&(t=this._plan(this.context));var r,o=h(this._modBy),s=this._modDataCount||0,l=h(e&&e.modBy),u=e&&e.modDataCount||0;function h(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 i,n;e._dueIndex=e._outputDueEnd=e._dueEnd=0,e._settedOutputEnd=null,!t&&e._reset&&((i=e._reset(e.context))&&i.progress&&(n=i.forceFirstProgress,i=i.progress),hd(i)&&!i.length&&(i=null));e._progress=i,e._modBy=e._modDataCount=null;var a=e._downstream;return a&&a.dirty(),n}(this,n)),this._modBy=l,this._modDataCount=u;var c=e&&e.step;if(this._dueEnd=i?i._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,p=Math.min(null!=c?this._dueIndex+c:1/0,this._dueEnd);if(!n&&(r||d<p)){var f=this._progress;if(hd(f))for(var g=0;g<f.length;g++)fd(this,f[g],d,p,l,u);else fd(this,f,d,p,l,u)}this._dueIndex=p;var m=null!=this._settedOutputEnd?this._settedOutputEnd:p;this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()};var pd=function(){var e,t,i,n,a,r={reset:function(l,u,h,c){t=l,e=u,i=h,n=c,a=Math.ceil(n/i),r.next=i>1&&n>0?s:o}};return r;function o(){return t<e?t++:null}function s(){var r=t%a*i+Math.ceil(t/a),o=t>=e?null:r<n?r:t;return t++,o}}();function fd(e,t,i,n,a,r){pd.reset(i,n,a,r),e._callingProgress=t,e._callingProgress({start:i,end:n,count:n-i,next:pd.next},e.context)}dd.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},dd.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},dd.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},dd.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},dd.getUpstream=function(){return this._upstream},dd.getDownstream=function(){return this._downstream},dd.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e};var gd={createTask:function(e){return new cd(e)}},md=Du.formatTime,vd=Du.encodeHTML,yd=Du.addCommas,xd=Du.getTooltipMarker,_d=Gu.getLayoutParams,bd=Gu.mergeLayoutParam,wd=gd.createTask,Sd=Rh.prepareSource,Md=Rh.getSource,Id=nd.retrieveRawValue,Td=vr.makeInner(),Ad=ju.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendVisualProvider:null,visualColorAccessPath:"itemStyle.color",visualBorderColorAccessPath:"itemStyle.borderColor",layoutMode:null,init:function(e,t,i,n){this.seriesIndex=this.componentIndex,this.dataTask=wd({count:Dd,reset:Ld}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,i),Sd(this);var a=this.getInitialData(e,i);kd(a,this),this.dataTask.context.data=a,Td(this).dataBeforeProcessed=a,Cd(this)},mergeDefaultAndTheme:function(e,t){var i=this.layoutMode,n=i?_d(e):{},a=this.subType;ju.hasClass(a)&&(a+="Series"),_e.merge(e,t.getTheme().get(this.subType)),_e.merge(e,this.getDefaultOption()),vr.defaultEmphasis(e,"label",["show"]),this.fillDataTextStyle(e.data),i&&bd(e,n,i)},mergeOption:function(e,t){e=_e.merge(this.option,e,!0),this.fillDataTextStyle(e.data);var i=this.layoutMode;i&&bd(this.option,e,i),Sd(this);var n=this.getInitialData(e,t);kd(n,this),this.dataTask.dirty(),this.dataTask.context.data=n,Td(this).dataBeforeProcessed=n,Cd(this)},fillDataTextStyle:function(e){if(e&&!_e.isTypedArray(e))for(var t=["show"],i=0;i<e.length;i++)e[i]&&e[i].label&&vr.defaultEmphasis(e[i],"label",t)},getInitialData:function(){},appendData:function(e){this.getRawData().appendData(e.data)},getData:function(e){var t=Rd(this);if(t){var i=t.context.data;return null==e?i:i.getLinkedData(e)}return Td(this).data},setData:function(e){var t=Rd(this);if(t){var i=t.context;i.data!==e&&t.modifyOutputEnd&&t.setOutputEnd(e.count()),i.outputData=e,t!==this.dataTask&&(i.data=e)}Td(this).data=e},getSource:function(){return Md(this)},getRawData:function(){return Td(this).dataBeforeProcessed},getBaseAxis:function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},formatTooltip:function(e,t,i,n){var a=this,r="html"===(n=n||"html")?"<br/>":"\n",o="richText"===n,s={},l=0;function u(e){return{renderMode:n,content:vd(yd(e)),style:s}}var h=this.getData(),c=h.mapDimension("defaultedTooltip",!0),d=c.length,p=this.getRawValue(e),f=_e.isArray(p),g=h.getItemVisual(e,"color");_e.isObject(g)&&g.colorStops&&(g=(g.colorStops[0]||{}).color),g=g||"transparent";var m=(d>1||f&&!d?function(i){var r=_e.reduce(i,(function(e,t,i){var n=h.getDimensionInfo(i);return e|(n&&!1!==n.tooltip&&null!=n.displayName)}),0),u=[];function d(e,i){var c=h.getDimensionInfo(i);if(c&&!1!==c.otherDims.tooltip){var d=c.type,p="sub"+a.seriesIndex+"at"+l,f=xd({color:g,type:"subItem",renderMode:n,markerId:p}),m="string"==typeof f?f:f.content,v=(r?m+vd(c.displayName||"-")+": ":"")+vd("ordinal"===d?e+"":"time"===d?t?"":md("yyyy/MM/dd hh:mm:ss",e):yd(e));v&&u.push(v),o&&(s[p]=g,++l)}}c.length?_e.each(c,(function(t){d(Id(h,e,t),t)})):_e.each(i,d);var p=r?o?"\n":"<br/>":"",f=p+u.join(p||", ");return{renderMode:n,content:f,style:s}}(p):u(d?Id(h,e,c[0]):f?p[0]:p)).content,v=a.seriesIndex+"at"+l,y=xd({color:g,type:"item",renderMode:n,markerId:v});s[v]=g,++l;var x=h.getName(e),_=this.name;vr.isNameSpecified(this)||(_=""),_=_?vd(_)+(t?": ":r):"";var b="string"==typeof y?y:y.content;return{html:t?b+_+m:_+b+(x?vd(x)+": "+m:m),markers:s}},isAnimationEnabled:function(){if(K.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,i){var n=this.ecModel,a=Ju.getColorFromPalette.call(this,e,t,i);return a||(a=n.getColorFromPalette(e,t,i)),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 Cd(e){var t=e.name;vr.isNameSpecified(e)||(e.name=function(e){var t=e.getRawData(),i=t.mapDimension("seriesName",!0),n=[];return _e.each(i,(function(e){var i=t.getDimensionInfo(e);i.displayName&&n.push(i.displayName)})),n.join(" ")}(e)||t)}function Dd(e){return e.model.getRawData().count()}function Ld(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),Pd}function Pd(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function kd(e,t){_e.each(e.CHANGABLE_METHODS,(function(i){e.wrapMethod(i,_e.curry(Od,t))}))}function Od(e){var t=Rd(e);t&&t.setOutputEnd(this.count())}function Rd(e){var t=(e.ecModel||{}).scheduler,i=t&&t.getPipeline(e.uid);if(i){var n=i.currentTask;if(n){var a=n.agentStubMap;a&&(n=a.get(e.uid))}return n}}_e.mixin(Ad,ud),_e.mixin(Ad,Ju);var Nd=Ad,Ed=function(){this.group=new Ni,this.uid=yu.getUID("viewComponent")},zd=Ed.prototype={constructor:Ed,init:function(e,t){},render:function(e,t,i,n){},dispose:function(){},filterForExposedEvent:null};zd.updateView=zd.updateLayout=zd.updateVisual=function(e,t,i,n){},Sr.enableClassExtend(Ed),Sr.enableClassManagement(Ed,{registerWhenExtend:!0});var Bd=Ed,Vd=vr.makeInner;var Gd=function(){var e=Vd();return function(t){var i=e(t),n=t.pipelineContext,a=i.large,r=i.progressiveRender,o=i.large=n&&n.large,s=i.progressiveRender=n&&n.progressiveRender;return!!(a^o||r^s)&&"reset"}},Fd=_e.each,Hd=gd.createTask,Wd=vr.makeInner(),Ud=Gd();function Zd(){this.group=new Ni,this.uid=yu.getUID("viewChart"),this.renderTask=Hd({plan:qd,reset:Kd}),this.renderTask.context={view:this}}Zd.prototype={type:"chart",init:function(e,t){},render:function(e,t,i,n){},highlight:function(e,t,i,n){Xd(e.getData(),n,"emphasis")},downplay:function(e,t,i,n){Xd(e.getData(),n,"normal")},remove:function(e,t){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var jd=Zd.prototype;function Yd(e,t,i){if(e&&(e.trigger(t,i),e.isGroup&&!iu.isHighDownDispatcher(e)))for(var n=0,a=e.childCount();n<a;n++)Yd(e.childAt(n),t,i)}function Xd(e,t,i){var n=vr.queryDataIndex(e,t),a=t&&null!=t.highlightKey?iu.getHighlightDigit(t.highlightKey):null;null!=n?Fd(vr.normalizeToArray(n),(function(t){Yd(e.getItemGraphicEl(t),i,a)})):e.eachItemGraphicEl((function(e){Yd(e,i,a)}))}function qd(e){return Ud(e.model)}function Kd(e){var t=e.model,i=e.ecModel,n=e.api,a=e.payload,r=t.pipelineContext.progressiveRender,o=e.view,s=a&&Wd(a).updateMethod,l=r?"incrementalPrepareRender":s&&o[s]?s:"render";return"render"!==l&&o[l](t,i,n,a),$d[l]}jd.updateView=jd.updateLayout=jd.updateVisual=function(e,t,i,n){this.render(e,t,i,n)},Sr.enableClassExtend(Zd,["dispose"]),Sr.enableClassManagement(Zd,{registerWhenExtend:!0}),Zd.markUpdateMethod=function(e,t){Wd(e).updateMethod=t};var $d={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)}}},Jd=Zd,Qd="\0__throttleOriginMethod",ep="\0__throttleRate";function tp(e,t,i){var n,a,r,o,s,l=0,u=0,h=null;function c(){u=(new Date).getTime(),h=null,e.apply(r,o||[])}t=t||0;var d=function(){n=(new Date).getTime(),r=this,o=arguments;var e=s||t,d=s||i;s=null,a=n-(d?l:u)-e,clearTimeout(h),d?h=setTimeout(c,e):a>=0?c():h=setTimeout(c,-a),l=n};return d.clear=function(){h&&(clearTimeout(h),h=null)},d.debounceNextCall=function(e){s=e},d}var ip={throttle:tp,createOrUpdate:function(e,t,i,n){var a=e[t];if(a){var r=a[Qd]||a,o=a["\0__throttleType"];if(a[ep]!==i||o!==n){if(null==i||!n)return e[t]=r;(a=e[t]=tp(r,i,"debounce"===n))[Qd]=r,a["\0__throttleType"]=n,a[ep]=i}return a}},clear:function(e,t){var i=e[t];i&&i[Qd]&&(e[t]=i[Qd])}},np=_e.isFunction,ap={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var i=e.getData(),n=(e.visualColorAccessPath||"itemStyle.color").split("."),a=e.get(n),r=!np(a)||a instanceof Ys?null:a;a&&!r||(a=e.getColorFromPalette(e.name,null,t.getSeriesCount())),i.setVisual("color",a);var o=(e.visualBorderColorAccessPath||"itemStyle.borderColor").split("."),s=e.get(o);if(i.setVisual("borderColor",s),!t.isSeriesFiltered(e)){r&&i.each((function(t){i.setItemVisual(t,"color",r(e.getDataParams(t)))}));return{dataEach:i.hasItemOption?function(e,t){var i=e.getItemModel(t),a=i.get(n,!0),r=i.get(o,!0);null!=a&&e.setItemVisual(t,"color",a),null!=r&&e.setItemVisual(t,"borderColor",r)}:null}}}},rp={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:""}}}},op=nd.retrieveRawValue;var sp=function(e,t){var i=t.getModel("aria");if(i.get("show"))if(i.get("description"))e.setAttribute("aria-label",i.get("description"));else{var n=0;t.eachSeries((function(e,t){++n}),this);var a,r=i.get("data.maxCount")||10,o=i.get("series.maxCount")||10,s=Math.min(n,o);if(!(n<1)){var l=function(){var e=t.getModel("title").option;e&&e.length&&(e=e[0]);return e&&e.text}();a=l?h(c("general.withTitle"),{title:l}):c("general.withoutTitle");var u=[];a+=h(c(n>1?"series.multiple.prefix":"series.single.prefix"),{seriesCount:n}),t.eachSeries((function(e,t){if(t<s){var i,a=e.get("name"),o="series."+(n>1?"multiple":"single")+".";i=h(i=c(a?o+"withName":o+"withoutName"),{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:(m=e.subType,rp.series.typeNames[m]||"自定义图")});var l=e.getData();window.data=l,l.count()>r?i+=h(c("data.partialData"),{displayCnt:r}):i+=c("data.allData");for(var d=[],p=0;p<l.count();p++)if(p<r){var f=l.getName(p),g=op(l,p);d.push(h(c(f?"data.withName":"data.withoutName"),{name:f,value:g}))}i+=d.join(c("data.separator.middle"))+c("data.separator.end"),u.push(i)}var m})),a+=u.join(c("series.multiple.separator.middle"))+c("series.multiple.separator.end"),e.setAttribute("aria-label",a)}}function h(e,t){if("string"!=typeof e)return e;var i=e;return _e.each(t,(function(e,t){i=i.replace(new RegExp("\\{\\s*"+t+"\\s*\\}","g"),e)})),i}function c(e){var t=i.get(e);if(null==t){for(var n=e.split("."),a=rp.aria,r=0;r<n.length;++r)a=a[n[r]];return a}return t}},lp=Math.PI;var up=function(e,t){t=t||{},_e.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 i=new iu.Group,n=new iu.Rect({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});i.add(n);var a=t.fontSize+" sans-serif",r=new iu.Rect({style:{fill:"none",text:t.text,font:a,textPosition:"right",textDistance:10,textFill:t.textColor},zlevel:t.zlevel,z:10001});if(i.add(r),t.showSpinner){var o=new iu.Arc({shape:{startAngle:-lp/2,endAngle:-lp/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*lp/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:3*lp/2}).delay(300).start("circularInOut"),i.add(o)}return i.resize=function(){var i=Bn.getWidth(t.text,a),s=t.showSpinner?t.spinnerRadius:0,l=(e.getWidth()-2*s-(t.showSpinner&&i?10:0)-i)/2-(t.showSpinner?0:i/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}),n.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},i.resize(),i},hp=_e.each,cp=_e.map,dp=_e.isFunction,pp=_e.createHashMap,fp=_e.noop,gp=gd.createTask,mp=yu.getUID,vp=vr.normalizeToArray;function yp(e,t,i,n){this.ecInstance=e,this.api=t,this.unfinished;i=this._dataProcessorHandlers=i.slice(),n=this._visualHandlers=n.slice();this._allHandlers=i.concat(n),this._stageTaskMap=pp()}var xp=yp.prototype;function _p(e,t,i,n,a){var r;function o(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}a=a||{},hp(t,(function(t,s){if(!a.visualType||a.visualType===t.visualType){var l=e._stageTaskMap.get(t.uid),u=l.seriesTaskMap,h=l.overallTask;if(h){var c,d=h.agentStubMap;d.each((function(e){o(a,e)&&(e.dirty(),c=!0)})),c&&h.dirty(),bp(h,n);var p=e.getPerformArgs(h,a.block);d.each((function(e){e.perform(p)})),r|=h.perform(p)}else u&&u.each((function(s,l){o(a,s)&&s.dirty();var u=e.getPerformArgs(s,a.block);u.skip=!t.performRawSeries&&i.isSeriesFiltered(s.context.model),bp(s,n),r|=s.perform(u)}))}})),e.unfinished|=r}xp.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each((function(e){var t=e.overallTask;t&&t.dirty()}))},xp.getPerformArgs=function(e,t){if(e.__pipeline){var i=this._pipelineMap.get(e.__pipeline.id),n=i.context,a=!t&&i.progressiveEnabled&&(!n||n.progressiveRender)&&e.__idxInPipeline>i.blockIndex?i.step:null,r=n&&n.modDataCount;return{step:a,modBy:null!=r?Math.ceil(r/a):null,modDataCount:r}}},xp.getPipeline=function(e){return this._pipelineMap.get(e)},xp.updateStreamModes=function(e,t){var i=this._pipelineMap.get(e.uid),n=e.getData().count(),a=i.progressiveEnabled&&t.incrementalPrepareRender&&n>=i.threshold,r=e.get("large")&&n>=e.get("largeThreshold"),o="mod"===e.get("progressiveChunkMode")?n:null;e.pipelineContext=i.context={progressiveRender:a,modDataCount:o,large:r}},xp.restorePipelines=function(e){var t=this,i=t._pipelineMap=pp();e.eachSeries((function(e){var n=e.getProgressive(),a=e.uid;i.set(a,{id:a,head:null,tail:null,threshold:e.getProgressiveThreshold(),progressiveEnabled:n&&!(e.preventIncremental&&e.preventIncremental()),blockIndex:-1,step:Math.round(n||700),count:0}),Pp(t,e,e.dataTask)}))},xp.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.ecInstance.getModel(),i=this.api;hp(this._allHandlers,(function(n){var a=e.get(n.uid)||e.set(n.uid,[]);n.reset&&function(e,t,i,n,a){var r=i.seriesTaskMap||(i.seriesTaskMap=pp()),o=t.seriesType,s=t.getTargetSeries;t.createOnAllSeries?n.eachRawSeries(l):o?n.eachRawSeriesByType(o,l):s&&s(n,a).each(l);function l(i){var o=i.uid,s=r.get(o)||r.set(o,gp({plan:Tp,reset:Ap,count:Lp}));s.context={model:i,ecModel:n,api:a,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:e},Pp(e,i,s)}var u=e._pipelineMap;r.each((function(e,t){u.get(t)||(e.dispose(),r.removeKey(t))}))}(this,n,a,t,i),n.overallReset&&function(e,t,i,n,a){var r=i.overallTask=i.overallTask||gp({reset:wp});r.context={ecModel:n,api:a,overallReset:t.overallReset,scheduler:e};var o=r.agentStubMap=r.agentStubMap||pp(),s=t.seriesType,l=t.getTargetSeries,u=!0,h=t.modifyOutputEnd;s?n.eachRawSeriesByType(s,c):l?l(n,a).each(c):(u=!1,hp(n.getSeries(),c));function c(t){var i=t.uid,n=o.get(i);n||(n=o.set(i,gp({reset:Sp,onDirty:Ip})),r.dirty()),n.context={model:t,overallProgress:u,modifyOutputEnd:h},n.agent=r,n.__block=u,Pp(e,t,n)}var d=e._pipelineMap;o.each((function(e,t){d.get(t)||(e.dispose(),r.dirty(),o.removeKey(t))}))}(this,n,a,t,i)}),this)},xp.prepareView=function(e,t,i,n){var a=e.renderTask,r=a.context;r.model=t,r.ecModel=i,r.api=n,a.__block=!e.incrementalPrepareRender,Pp(this,t,a)},xp.performDataProcessorTasks=function(e,t){_p(this,this._dataProcessorHandlers,e,t,{block:!0})},xp.performVisualTasks=function(e,t,i){_p(this,this._visualHandlers,e,t,i)},xp.performSeriesTasks=function(e){var t;e.eachSeries((function(e){t|=e.dataTask.perform()})),this.unfinished|=t},xp.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 bp=xp.updatePayload=function(e,t){"remain"!==t&&(e.context.payload=t)};function wp(e){e.overallReset(e.ecModel,e.api,e.payload)}function Sp(e,t){return e.overallProgress&&Mp}function Mp(){this.agent.dirty(),this.getDownstream().dirty()}function Ip(){this.agent&&this.agent.dirty()}function Tp(e){return e.plan&&e.plan(e.model,e.ecModel,e.api,e.payload)}function Ap(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=vp(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?cp(t,(function(e,t){return Dp(t)})):Cp}var Cp=Dp(0);function Dp(e){return function(t,i){var n=i.data,a=i.resetDefines[e];if(a&&a.dataEach)for(var r=t.start;r<t.end;r++)a.dataEach(n,r);else a&&a.progress&&a.progress(t,n)}}function Lp(e){return e.data.count()}function Pp(e,t,i){var n=t.uid,a=e._pipelineMap.get(n);!a.head&&(a.head=i),a.tail&&a.tail.pipe(i),a.tail=i,i.__idxInPipeline=a.count++,i.__pipeline=a}function kp(e){Op=null;try{e(Rp,Np)}catch(e){}return Op}yp.wrapStageHandler=function(e,t){return dp(e)&&(e={overallReset:e,seriesType:kp(e)}),e.uid=mp("stageHandler"),t&&(e.visualType=t),e};var Op,Rp={},Np={};function Ep(e,t){for(var i in t.prototype)e[i]=fp}Ep(Rp,Qh),Ep(Np,tc),Rp.eachSeriesByType=Rp.eachRawSeriesByType=function(e){Op=e},Rp.eachComponent=function(e){"series"===e.mainType&&e.subType&&(Op=e.subType)};var zp=yp,Bp=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],Vp={color:Bp,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],Bp]},Gp=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],Fp={color:Gp,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:"#eee"},crossStyle:{color:"#eee"},label:{color:"#000"}}},legend:{textStyle:{color:"#eee"}},textStyle:{color:"#eee"},title:{textStyle:{color:"#eee"}},toolbox:{iconStyle:{normal:{borderColor:"#eee"}}},dataZoom:{textStyle:{color:"#eee"}},visualMap:{textStyle:{color:"#eee"}},timeline:{lineStyle:{color:"#eee"},itemStyle:{normal:{color:Gp[1]}},label:{normal:{textStyle:{color:"#eee"}}},controlStyle:{normal:{color:"#eee",borderColor:"#eee"}}},timeAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},logAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},valueAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},categoryAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},line:{symbol:"circle"},graph:{color:Gp},gauge:{title:{textStyle:{color:"#eee"}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};Fp.categoryAxis.splitLine.show=!1;var Hp=Fp,Wp=Rh.detectSourceFormat,Up=Qu.SERIES_LAYOUT_BY_COLUMN;ju.extend({type:"dataset",defaultOption:{seriesLayoutBy:Up,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){Wp(this)}}),Bd.extend({type:"dataset"});var Zp=Vo.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(e,t){var i=.5522848,n=t.cx,a=t.cy,r=t.rx,o=t.ry,s=r*i,l=o*i;e.moveTo(n-r,a),e.bezierCurveTo(n-r,a-l,n-s,a-o,n,a-o),e.bezierCurveTo(n+s,a-o,n+r,a-l,n+r,a),e.bezierCurveTo(n+r,a+l,n+s,a+o,n,a+o),e.bezierCurveTo(n-s,a+o,n-r,a+l,n-r,a),e.closePath()}}),jp=ns.createFromString,Yp=_e.isString,Xp=_e.extend,qp=_e.defaults,Kp=_e.trim,$p=_e.each,Jp=/[\s,]+/;function Qp(e){Yp(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 ef(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}ef.prototype.parse=function(e,t){t=t||{};var i=Qp(e);if(!i)throw new Error("Illegal svg");var n=new Ni;this._root=n;var a=i.getAttribute("viewBox")||"",r=parseFloat(i.getAttribute("width")||t.width),o=parseFloat(i.getAttribute("height")||t.height);isNaN(r)&&(r=null),isNaN(o)&&(o=null),sf(i,n,null,!0);for(var s,l,u=i.firstChild;u;)this._parseNode(u,n),u=u.nextSibling;if(a){var h=Kp(a).split(Jp);h.length>=4&&(s={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(s&&null!=r&&null!=o&&(l=df(s,r,o),!t.ignoreViewBox)){var c=n;(n=new Ni).add(c),c.scale=l.scale.slice(),c.position=l.position.slice()}return t.ignoreRootClip||null==r||null==o||n.setClipPath(new Ps({shape:{x:0,y:0,width:r,height:o}})),{root:n,width:r,height:o,viewBoxRect:s,viewBoxTransform:l}},ef.prototype._parseNode=function(e,t){var i,n,a=e.nodeName.toLowerCase();if("defs"===a?this._isDefine=!0:"text"===a&&(this._isText=!0),this._isDefine){if(n=nf[a]){var r=n.call(this,e),o=e.getAttribute("id");o&&(this._defs[o]=r)}}else(n=tf[a])&&(i=n.call(this,e,t),t.add(i));for(var s=e.firstChild;s;)1===s.nodeType&&this._parseNode(s,i),3===s.nodeType&&this._isText&&this._parseText(s,i),s=s.nextSibling;"defs"===a?this._isDefine=!1:"text"===a&&(this._isText=!1)},ef.prototype._parseText=function(e,t){if(1===e.nodeType){var i=e.getAttribute("dx")||0,n=e.getAttribute("dy")||0;this._textX+=parseFloat(i),this._textY+=parseFloat(n)}var a=new os({style:{text:e.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});af(t,a),sf(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 tf={g:function(e,t){var i=new Ni;return af(t,i),sf(e,i,this._defs),i},rect:function(e,t){var i=new Ps;return af(t,i),sf(e,i,this._defs),i.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)}),i},circle:function(e,t){var i=new ss;return af(t,i),sf(e,i,this._defs),i.setShape({cx:parseFloat(e.getAttribute("cx")||0),cy:parseFloat(e.getAttribute("cy")||0),r:parseFloat(e.getAttribute("r")||0)}),i},line:function(e,t){var i=new Rs;return af(t,i),sf(e,i,this._defs),i.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)}),i},ellipse:function(e,t){var i=new Zp;return af(t,i),sf(e,i,this._defs),i.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)}),i},polygon:function(e,t){var i=e.getAttribute("points");i&&(i=rf(i));var n=new Ms({shape:{points:i||[]}});return af(t,n),sf(e,n,this._defs),n},polyline:function(e,t){var i=new Vo;af(t,i),sf(e,i,this._defs);var n=e.getAttribute("points");return n&&(n=rf(n)),new Is({shape:{points:n||[]}})},image:function(e,t){var i=new wa;return af(t,i),sf(e,i,this._defs),i.setStyle({image:e.getAttribute("xlink:href"),x:e.getAttribute("x"),y:e.getAttribute("y"),width:e.getAttribute("width"),height:e.getAttribute("height")}),i},text:function(e,t){var i=e.getAttribute("x")||0,n=e.getAttribute("y")||0,a=e.getAttribute("dx")||0,r=e.getAttribute("dy")||0;this._textX=parseFloat(i)+parseFloat(a),this._textY=parseFloat(n)+parseFloat(r);var o=new Ni;return af(t,o),sf(e,o,this._defs),o},tspan:function(e,t){var i=e.getAttribute("x"),n=e.getAttribute("y");null!=i&&(this._textX=parseFloat(i)),null!=n&&(this._textY=parseFloat(n));var a=e.getAttribute("dx")||0,r=e.getAttribute("dy")||0,o=new Ni;return af(t,o),sf(e,o,this._defs),this._textX+=a,this._textY+=r,o},path:function(e,t){var i=e.getAttribute("d")||"",n=jp(i);return af(t,n),sf(e,n,this._defs),n}},nf={lineargradient:function(e){var t=parseInt(e.getAttribute("x1")||0,10),i=parseInt(e.getAttribute("y1")||0,10),n=parseInt(e.getAttribute("x2")||10,10),a=parseInt(e.getAttribute("y2")||0,10),r=new qs(t,i,n,a);return function(e,t){var i=e.firstChild;for(;i;){if(1===i.nodeType){var n=i.getAttribute("offset");n=n.indexOf("%")>0?parseInt(n,10)/100:n?parseFloat(n):0;var a=i.getAttribute("stop-color")||"#000000";t.addColorStop(n,a)}i=i.nextSibling}}(e,r),r},radialgradient:function(e){}};function af(e,t){e&&e.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),qp(t.__inheritedStyle,e.__inheritedStyle))}function rf(e){for(var t=Kp(e).split(Jp),i=[],n=0;n<t.length;n+=2){var a=parseFloat(t[n]),r=parseFloat(t[n+1]);i.push([a,r])}return i}var of={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 sf(e,t,i,n){var a=t.__inheritedStyle||{},r="text"===t.type;if(1===e.nodeType&&(function(e,t){var i=e.getAttribute("transform");if(i){i=i.replace(/,/g," ");var n=null,a=[];i.replace(hf,(function(e,t,i){a.push(t,i)}));for(var r=a.length-1;r>0;r-=2){var o=a[r],s=a[r-1];switch(n=n||dt.create(),s){case"translate":o=Kp(o).split(Jp),dt.translate(n,n,[parseFloat(o[0]),parseFloat(o[1]||0)]);break;case"scale":o=Kp(o).split(Jp),dt.scale(n,n,[parseFloat(o[0]),parseFloat(o[1]||o[0])]);break;case"rotate":o=Kp(o).split(Jp),dt.rotate(n,n,parseFloat(o[0]));break;case"skew":o=Kp(o).split(Jp),console.warn("Skew transform is not supported yet");break;case"matrix":o=Kp(o).split(Jp);n[0]=parseFloat(o[0]),n[1]=parseFloat(o[1]),n[2]=parseFloat(o[2]),n[3]=parseFloat(o[3]),n[4]=parseFloat(o[4]),n[5]=parseFloat(o[5])}}t.setLocalTransform(n)}}(e,t),Xp(a,function(e){var t=e.getAttribute("style"),i={};if(!t)return i;var n,a={};cf.lastIndex=0;for(;null!=(n=cf.exec(t));)a[n[1]]=n[2];for(var r in of)of.hasOwnProperty(r)&&null!=a[r]&&(i[of[r]]=a[r]);return i}(e)),!n))for(var o in of)if(of.hasOwnProperty(o)){var s=e.getAttribute(o);null!=s&&(a[of[o]]=s)}var l=r?"textFill":"fill",u=r?"textStroke":"stroke";t.style=t.style||new nn;var h=t.style;null!=a.fill&&h.set(l,uf(a.fill,i)),null!=a.stroke&&h.set(u,uf(a.stroke,i)),$p(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],(function(e){var t="lineWidth"===e&&r?"textStrokeWidth":e;null!=a[e]&&h.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"),$p(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],(function(e){null!=a[e]&&h.set(e,a[e])})),a.lineDash&&(t.style.lineDash=Kp(a.lineDash).split(Jp)),h[u]&&"none"!==h[u]&&(t[u]=!0),t.__inheritedStyle=a}var lf=/url\(\s*#(.*?)\)/;function uf(e,t){var i=t&&e&&e.match(lf);return i?t[Kp(i[1])]:e}var hf=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;var cf=/([^\s:;]+)\s*:\s*([^:;]+)/g;function df(e,t,i){var n=t/e.width,a=i/e.height,r=Math.min(n,a);return{scale:[r,r],position:[-(e.x+e.width/2)*r+t/2,-(e.y+e.height/2)*r+i/2]}}var pf={parseXML:Qp,makeViewBoxTransform:df,parseSVG:function(e,t){return(new ef).parse(e,t)}},ff=_e.createHashMap,gf=_e.isString,mf=_e.isArray,vf=_e.each,yf=pf.parseXML,xf=ff(),_f={registerMap:function(e,t,i){var n;return mf(t)?n=t:t.svg?n=[{type:"svg",source:t.svg,specialAreas:t.specialAreas}]:(t.geoJson&&!t.features&&(i=t.specialAreas,t=t.geoJson),n=[{type:"geoJSON",source:t,specialAreas:i}]),vf(n,(function(e){var t=e.type;"geoJson"===t&&(t=e.type="geoJSON"),(0,bf[t])(e)})),xf.set(e,n)},retrieveMap:function(e){return xf.get(e)}},bf={geoJSON:function(e){var t=e.source;e.geoJSON=gf(t)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(t):new Function("return ("+t+");")():t},svg:function(e){e.svgXML=yf(e.source)}},wf=_f;function Sf(e){return e}function Mf(e,t,i,n,a){this._old=e,this._new=t,this._oldKeyGetter=i||Sf,this._newKeyGetter=n||Sf,this.context=a}function If(e,t,i,n,a){for(var r=0;r<e.length;r++){var o="_ec_"+a[n](e[r],r),s=t[o];null==s?(i.push(o),t[o]=r):(s.length||(t[o]=s=[s]),s.push(r))}}Mf.prototype={constructor:Mf,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,i={},n=[],a=[];for(If(e,{},n,"_oldKeyGetter",this),If(t,i,a,"_newKeyGetter",this),r=0;r<e.length;r++){if(null!=(s=i[o=n[r]]))(u=s.length)?(1===u&&(i[o]=null),s=s.shift()):i[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(i.hasOwnProperty(o)){var s;if(null==(s=i[o]))continue;if(s.length)for(var l=0,u=s.length;l<u;l++)this._add&&this._add(s[l]);else this._add&&this._add(s)}}}};var Tf=Mf,Af=_e.each,Cf=_e.createHashMap,Df=Cf(["tooltip","label","itemName","itemId","seriesName"]);function Lf(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}var Pf={OTHER_DIMENSIONS:Df,summarizeDimensions:function(e){var t={},i=t.encode={},n=Cf(),a=[],r=[],o=t.userOutput={dimensionNames:e.dimensions.slice(),encode:{}};Af(e.dimensions,(function(t){var s,l=e.getDimensionInfo(t),u=l.coordDim;if(u){var h=l.coordDimIndex;Lf(i,u)[h]=t,l.isExtraCoord||(n.set(u,1),"ordinal"!==(s=l.type)&&"time"!==s&&(a[0]=t),Lf(o.encode,u)[h]=l.index),l.defaultTooltip&&r.push(t)}Df.each((function(e,t){var n=Lf(i,t),a=l.otherDims[t];null!=a&&!1!==a&&(n[a]=l.name)}))}));var s=[],l={};n.each((function(e,t){var n=i[t];l[t]=n[0],s=s.concat(n)})),t.dataDimsOnCoord=s,t.encodeFirstDimNotExtra=l;var u=i.label;u&&u.length&&(a=u.slice());var h=i.tooltip;return h&&h.length?r=h.slice():r.length||(r=a.slice()),i.defaultedLabel=a,i.defaultedTooltip=r,t},getDimensionTypeByAxis:function(e){return"category"===e?"ordinal":"time"===e?"time":"float"}};var kf=function(e){null!=e&&_e.extend(this,e),this.otherDims={}},Of=nd.defaultDimValueGetters,Rf=nd.DefaultDataProvider,Nf=Pf.summarizeDimensions,Ef=_e.isObject,zf={float:"undefined"==typeof Float64Array?Array:Float64Array,int:"undefined"==typeof Int32Array?Array:Int32Array,ordinal:Array,number:Array,time:Array},Bf="undefined"==typeof Uint32Array?Array:Uint32Array,Vf="undefined"==typeof Int32Array?Array:Int32Array,Gf="undefined"==typeof Uint16Array?Array:Uint16Array;function Ff(e){return e._rawCount>65535?Bf:Gf}var Hf=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],Wf=["_extent","_approximateExtent","_rawExtent"];function Uf(e,t){_e.each(Hf.concat(t.__wrappedMethods||[]),(function(i){t.hasOwnProperty(i)&&(e[i]=t[i])})),e.__wrappedMethods=t.__wrappedMethods,_e.each(Wf,(function(i){e[i]=_e.clone(t[i])})),e._calculationInfo=_e.extend(t._calculationInfo)}var Zf=function(e,t){e=e||["x","y"];for(var i={},n=[],a={},r=0;r<e.length;r++){var o=e[r];_e.isString(o)?o=new kf({name:o}):o instanceof kf||(o=new kf(o));var s=o.name;o.type=o.type||"float",o.coordDim||(o.coordDim=s,o.coordDimIndex=0),o.otherDims=o.otherDims||{},n.push(s),i[s]=o,o.index=r,o.createInvertedIndices&&(a[s]=[])}this.dimensions=n,this._dimensionInfos=i,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=Nf(this),this._invertedIndicesMap=a,this._calculationInfo={},this.userOutput=this._dimensionsSummary.userOutput},jf=Zf.prototype;function Yf(e,t,i,n,a){var r=zf[t.type],o=n-1,s=t.name,l=e[s][o];if(l&&l.length<i){for(var u=new r(Math.min(a-o*i,i)),h=0;h<l.length;h++)u[h]=l[h];e[s][o]=u}for(var c=n*i;c<a;c+=i)e[s].push(new r(Math.min(a-c,i)))}function Xf(e){var t=e._invertedIndicesMap;_e.each(t,(function(i,n){var a=e._dimensionInfos[n].ordinalMeta;if(a){i=t[n]=new Vf(a.categories.length);for(var r=0;r<i.length;r++)i[r]=-1;for(r=0;r<e._count;r++)i[e.get(n,r)]=r}}))}function qf(e,t,i){var n;if(null!=t){var a=e._chunkSize,r=Math.floor(i/a),o=i%a,s=e.dimensions[t],l=e._storage[s][r];if(l){n=l[o];var u=e._dimensionInfos[s].ordinalMeta;u&&u.categories.length&&(n=u.categories[n])}}return n}function Kf(e){return e}function $f(e){return e<this._count&&e>=0?this._indices[e]:-1}function Jf(e,t){var i=e._idList[t];return null==i&&(i=qf(e,e._idDimIdx,t)),null==i&&(i="e\0\0"+t),i}function Qf(e){return _e.isArray(e)||(e=[e]),e}function eg(e,t){var i=e.dimensions,n=new Zf(_e.map(i,e.getDimensionInfo,e),e.hostModel);Uf(n,e);for(var a=n._storage={},r=e._storage,o=0;o<i.length;o++){var s=i[o];r[s]&&(_e.indexOf(t,s)>=0?(a[s]=tg(r[s]),n._rawExtent[s]=ig(),n._extent[s]=null):a[s]=r[s])}return n}function tg(e){for(var t,i,n=new Array(e.length),a=0;a<e.length;a++)n[a]=(t=e[a],i=void 0,(i=t.constructor)===Array?t.slice():new i(t));return n}function ig(){return[1/0,-1/0]}jf.type="list",jf.hasItemOption=!0,jf.getDimension=function(e){return"number"!=typeof e&&(isNaN(e)||this._dimensionInfos.hasOwnProperty(e))||(e=this.dimensions[e]),e},jf.getDimensionInfo=function(e){return this._dimensionInfos[this.getDimension(e)]},jf.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},jf.mapDimension=function(e,t){var i=this._dimensionsSummary;if(null==t)return i.encodeFirstDimNotExtra[e];var n=i.encode[e];return!0===t?(n||[]).slice():n&&n[t]},jf.initData=function(e,t,i){(uh.isInstance(e)||_e.isArrayLike(e))&&(e=new Rf(e,this.dimensions.length)),this._rawData=e,this._storage={},this._indices=null,this._nameList=t||[],this._idList=[],this._nameRepeatCount={},i||(this.hasItemOption=!1),this.defaultDimValueGetter=Of[this._rawData.getSource().sourceFormat],this._dimValueGetter=i=i||this.defaultDimValueGetter,this._dimValueGetterArrayRows=Of.arrayRows,this._rawExtent={},this._initDataFromProvider(0,e.count()),e.pure&&(this.hasItemOption=!1)},jf.getProvider=function(){return this._rawData},jf.appendData=function(e){var t=this._rawData,i=this.count();t.appendData(e);var n=t.count();t.persistent||(n+=i),this._initDataFromProvider(i,n)},jf.appendValues=function(e,t){for(var i=this._chunkSize,n=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,h=0;h<r;h++){o[v=a[h]]||(o[v]=ig()),n[v]||(n[v]=[]),Yf(n,this._dimensionInfos[v],i,u,l),this._chunkCount=n[v].length}for(var c=new Array(r),d=s;d<l;d++){for(var p=d-s,f=Math.floor(d/i),g=d%i,m=0;m<r;m++){var v=a[m],y=this._dimValueGetterArrayRows(e[p]||c,v,p,m);n[v][f][g]=y;var x=o[v];y<x[0]&&(x[0]=y),y>x[1]&&(x[1]=y)}t&&(this._nameList[d]=t[p])}this._rawCount=this._count=l,this._extent={},Xf(this)},jf._initDataFromProvider=function(e,t){if(!(e>=t)){for(var i,n=this._chunkSize,a=this._rawData,r=this._storage,o=this.dimensions,s=o.length,l=this._dimensionInfos,u=this._nameList,h=this._idList,c=this._rawExtent,d=this._nameRepeatCount={},p=this._chunkCount,f=0;f<s;f++){c[b=o[f]]||(c[b]=ig());var g=l[b];0===g.otherDims.itemName&&(i=this._nameDimIdx=f),0===g.otherDims.itemId&&(this._idDimIdx=f),r[b]||(r[b]=[]),Yf(r,g,n,p,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/n),x=v%n,_=0;_<s;_++){var b,w=r[b=o[_]][y],S=this._dimValueGetter(m,b,v,_);w[x]=S;var M=c[b];S<M[0]&&(M[0]=S),S>M[1]&&(M[1]=S)}if(!a.pure){var I=u[v];if(m&&null==I)if(null!=m.name)u[v]=I=m.name;else if(null!=i){var T=o[i],A=r[T][y];if(A){I=A[x];var C=l[T].ordinalMeta;C&&C.categories.length&&(I=C.categories[I])}}var D=null==m?null:m.id;null==D&&null!=I&&(d[I]=d[I]||0,D=I,d[I]>0&&(D+="__ec__"+d[I]),d[I]++),null!=D&&(h[v]=D)}}!a.persistent&&a.clean&&a.clean(),this._rawCount=this._count=t,this._extent={},Xf(this)}},jf.count=function(){return this._count},jf.getIndices=function(){var e=this._indices;if(e){var t=e.constructor,i=this._count;if(t===Array){a=new t(i);for(var n=0;n<i;n++)a[n]=e[n]}else a=new t(e.buffer,0,i)}else{var a=new(t=Ff(this))(this.count());for(n=0;n<a.length;n++)a[n]=n}return a},jf.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var i=this._storage;if(!i[e])return NaN;t=this.getRawIndex(t);var n=Math.floor(t/this._chunkSize),a=t%this._chunkSize;return i[e][n][a]},jf.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var i=this._storage[e];if(!i)return NaN;var n=Math.floor(t/this._chunkSize),a=t%this._chunkSize;return i[n][a]},jf._getFast=function(e,t){var i=Math.floor(t/this._chunkSize),n=t%this._chunkSize;return this._storage[e][i][n]},jf.getValues=function(e,t){var i=[];_e.isArray(e)||(t=e,e=this.dimensions);for(var n=0,a=e.length;n<a;n++)i.push(this.get(e[n],t));return i},jf.hasValue=function(e){for(var t=this._dimensionsSummary.dataDimsOnCoord,i=0,n=t.length;i<n;i++)if(isNaN(this.get(t[i],e)))return!1;return!0},jf.getDataExtent=function(e){e=this.getDimension(e);var t=this._storage[e],i=ig();if(!t)return i;var n,a=this.count();if(!this._indices)return this._rawExtent[e].slice();if(n=this._extent[e])return n.slice();for(var r=(n=i)[0],o=n[1],s=0;s<a;s++){var l=this._getFast(e,this.getRawIndex(s));l<r&&(r=l),l>o&&(o=l)}return n=[r,o],this._extent[e]=n,n},jf.getApproximateExtent=function(e){return e=this.getDimension(e),this._approximateExtent[e]||this.getDataExtent(e)},jf.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},jf.getCalculationInfo=function(e){return this._calculationInfo[e]},jf.setCalculationInfo=function(e,t){Ef(e)?_e.extend(this._calculationInfo,e):this._calculationInfo[e]=t},jf.getSum=function(e){var t=0;if(this._storage[e])for(var i=0,n=this.count();i<n;i++){var a=this.get(e,i);isNaN(a)||(t+=a)}return t},jf.getMedian=function(e){var t=[];this.each(e,(function(e,i){isNaN(e)||t.push(e)}));var i=[].concat(t).sort((function(e,t){return e-t})),n=this.count();return 0===n?0:n%2==1?i[(n-1)/2]:(i[n/2]+i[n/2-1])/2},jf.rawIndexOf=function(e,t){var i=(e&&this._invertedIndicesMap[e])[t];return null==i||isNaN(i)?-1:i},jf.indexOfName=function(e){for(var t=0,i=this.count();t<i;t++)if(this.getName(t)===e)return t;return-1},jf.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,i=t[e];if(null!=i&&i<this._count&&i===e)return e;for(var n=0,a=this._count-1;n<=a;){var r=(n+a)/2|0;if(t[r]<e)n=r+1;else{if(!(t[r]>e))return r;a=r-1}}return-1},jf.indicesOfNearest=function(e,t,i){var n=[];if(!this._storage[e])return n;null==i&&(i=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),h=Math.abs(u);h<=i&&((h<a||h===a&&u>=0&&r<0)&&(a=h,r=u,o=0),u===r&&(n[o++]=s))}return n.length=o,n},jf.getRawIndex=Kf,jf.getRawDataItem=function(e){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(e));for(var t=[],i=0;i<this.dimensions.length;i++){var n=this.dimensions[i];t.push(this.get(n,e))}return t},jf.getName=function(e){var t=this.getRawIndex(e);return this._nameList[t]||qf(this,this._nameDimIdx,t)||""},jf.getId=function(e){return Jf(this,this.getRawIndex(e))},jf.each=function(e,t,i,n){if(this._count){"function"==typeof e&&(n=i,i=t,t=e,e=[]),i=i||n||this;for(var a=(e=_e.map(Qf(e),this.getDimension,this)).length,r=0;r<this.count();r++)switch(a){case 0:t.call(i,r);break;case 1:t.call(i,this.get(e[0],r),r);break;case 2:t.call(i,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(i,s)}}},jf.filterSelf=function(e,t,i,n){if(this._count){"function"==typeof e&&(n=i,i=t,t=e,e=[]),i=i||n||this,e=_e.map(Qf(e),this.getDimension,this);for(var a=this.count(),r=new(Ff(this))(a),o=[],s=e.length,l=0,u=e[0],h=0;h<a;h++){var c,d=this.getRawIndex(h);if(0===s)c=t.call(i,h);else if(1===s){var p=this._getFast(u,d);c=t.call(i,p,h)}else{for(var f=0;f<s;f++)o[f]=this._getFast(u,d);o[f]=h,c=t.apply(i,o)}c&&(r[l++]=d)}return l<a&&(this._indices=r),this._count=l,this._extent={},this.getRawIndex=this._indices?$f:Kf,this}},jf.selectRange=function(e){if(this._count){var t=[];for(var i in e)e.hasOwnProperty(i)&&t.push(i);var n=t.length;if(n){var a=this.count(),r=new(Ff(this))(a),o=0,s=t[0],l=e[s][0],u=e[s][1],h=!1;if(!this._indices){var c=0;if(1===n){for(var d=this._storage[t[0]],p=0;p<this._chunkCount;p++)for(var f=d[p],g=Math.min(this._count-p*this._chunkSize,this._chunkSize),m=0;m<g;m++){((b=f[m])>=l&&b<=u||isNaN(b))&&(r[o++]=c),c++}h=!0}else if(2===n){d=this._storage[s];var v=this._storage[t[1]],y=e[t[1]][0],x=e[t[1]][1];for(p=0;p<this._chunkCount;p++){f=d[p];var _=v[p];for(g=Math.min(this._count-p*this._chunkSize,this._chunkSize),m=0;m<g;m++){var b=f[m],w=_[m];(b>=l&&b<=u||isNaN(b))&&(w>=y&&w<=x||isNaN(w))&&(r[o++]=c),c++}}h=!0}}if(!h)if(1===n)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),p=0;p<n;p++){var I=t[p];((b=this._getFast(i,S))<e[I][0]||b>e[I][1])&&(M=!1)}M&&(r[o++]=this.getRawIndex(m))}return o<a&&(this._indices=r),this._count=o,this._extent={},this.getRawIndex=this._indices?$f:Kf,this}}},jf.mapArray=function(e,t,i,n){"function"==typeof e&&(n=i,i=t,t=e,e=[]),i=i||n||this;var a=[];return this.each(e,(function(){a.push(t&&t.apply(this,arguments))}),i),a},jf.map=function(e,t,i,n){i=i||n||this;var a=eg(this,e=_e.map(Qf(e),this.getDimension,this));a._indices=this._indices,a.getRawIndex=a._indices?$f:Kf;for(var r=a._storage,o=[],s=this._chunkSize,l=e.length,u=this.count(),h=[],c=a._rawExtent,d=0;d<u;d++){for(var p=0;p<l;p++)h[p]=this.get(e[p],d);h[l]=d;var f=t&&t.apply(i,h);if(null!=f){"object"!=typeof f&&(o[0]=f,f=o);for(var g=this.getRawIndex(d),m=Math.floor(g/s),v=g%s,y=0;y<f.length;y++){var x=e[y],_=f[y],b=c[x],w=r[x];w&&(w[m][v]=_),_<b[0]&&(b[0]=_),_>b[1]&&(b[1]=_)}}}return a},jf.downSample=function(e,t,i,n){for(var a=eg(this,[e]),r=a._storage,o=[],s=Math.floor(1/t),l=r[e],u=this.count(),h=this._chunkSize,c=a._rawExtent[e],d=new(Ff(this))(u),p=0,f=0;f<u;f+=s){s>u-f&&(s=u-f,o.length=s);for(var g=0;g<s;g++){var m=this.getRawIndex(f+g),v=Math.floor(m/h),y=m%h;o[g]=l[v][y]}var x=i(o),_=this.getRawIndex(Math.min(f+n(o,x)||0,u-1)),b=_%h;l[Math.floor(_/h)][b]=x,x<c[0]&&(c[0]=x),x>c[1]&&(c[1]=x),d[p++]=_}return a._count=p,a._indices=d,a.getRawIndex=$f,a},jf.getItemModel=function(e){var t=this.hostModel;return new gu(this.getRawDataItem(e),t,t&&t.ecModel)},jf.diff=function(e){var t=this;return new Tf(e?e.getIndices():[],this.getIndices(),(function(t){return Jf(e,t)}),(function(e){return Jf(t,e)}))},jf.getVisual=function(e){var t=this._visual;return t&&t[e]},jf.setVisual=function(e,t){if(Ef(e))for(var i in e)e.hasOwnProperty(i)&&this.setVisual(i,e[i]);else this._visual=this._visual||{},this._visual[e]=t},jf.setLayout=function(e,t){if(Ef(e))for(var i in e)e.hasOwnProperty(i)&&this.setLayout(i,e[i]);else this._layout[e]=t},jf.getLayout=function(e){return this._layout[e]},jf.getItemLayout=function(e){return this._itemLayouts[e]},jf.setItemLayout=function(e,t,i){this._itemLayouts[e]=i?_e.extend(this._itemLayouts[e]||{},t):t},jf.clearItemLayouts=function(){this._itemLayouts.length=0},jf.getItemVisual=function(e,t,i){var n=this._itemVisuals[e],a=n&&n[t];return null!=a||i?a:this.getVisual(t)},jf.setItemVisual=function(e,t,i){var n=this._itemVisuals[e]||{},a=this.hasItemVisual;if(this._itemVisuals[e]=n,Ef(t))for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r],a[r]=!0);else n[t]=i,a[t]=!0},jf.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var ng=function(e){e.seriesIndex=this.seriesIndex,e.dataIndex=this.dataIndex,e.dataType=this.dataType};jf.setItemGraphicEl=function(e,t){var i=this.hostModel;t&&(t.dataIndex=e,t.dataType=this.dataType,t.seriesIndex=i&&i.seriesIndex,"group"===t.type&&t.traverse(ng,t)),this._graphicEls[e]=t},jf.getItemGraphicEl=function(e){return this._graphicEls[e]},jf.eachItemGraphicEl=function(e,t){_e.each(this._graphicEls,(function(i,n){i&&e&&e.call(t,i,n)}))},jf.cloneShallow=function(e){if(!e){var t=_e.map(this.dimensions,this.getDimensionInfo,this);e=new Zf(t,this.hostModel)}if(e._storage=this._storage,Uf(e,this),this._indices){var i=this._indices.constructor;e._indices=new i(this._indices)}else e._indices=null;return e.getRawIndex=e._indices?$f:Kf,e},jf.wrapMethod=function(e,t){var i=this[e];"function"==typeof i&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=i.apply(this,arguments);return t.apply(this,[e].concat(_e.slice(arguments)))})},jf.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],jf.CHANGABLE_METHODS=["filterSelf","selectRange"];var ag=Zf,rg=_e.createHashMap,og=_e.each,sg=_e.isString,lg=_e.defaults,ug=_e.extend,hg=_e.isObject,cg=_e.clone,dg=vr.normalizeToArray,pg=Rh.guessOrdinal,fg=Rh.BE_ORDINAL,gg=Pf.OTHER_DIMENSIONS;function mg(e,t,i){if(i||null!=t.get(e)){for(var n=0;null!=t.get(e+n);)n++;e+=n}return t.set(e,!0),e}var vg=function(e,t,i){uh.isInstance(t)||(t=uh.seriesDataToSource(t)),i=i||{},e=(e||[]).slice();for(var n=(i.dimsDef||[]).slice(),a=rg(),r=rg(),o=[],s=function(e,t,i,n){var a=Math.max(e.dimensionsDetectCount||1,t.length,i.length,n||0);return og(t,(function(e){var t=e.dimsDef;t&&(a=Math.max(a,t.length))})),a}(t,e,n,i.dimCount),l=0;l<s;l++){var u=n[l]=ug({},hg(n[l])?n[l]:{name:n[l]}),h=u.name,c=o[l]=new kf;null!=h&&null==a.get(h)&&(c.name=c.displayName=h,a.set(h,l)),null!=u.type&&(c.type=u.type),null!=u.displayName&&(c.displayName=u.displayName)}var d=i.encodeDef;!d&&i.encodeDefaulter&&(d=i.encodeDefaulter(t,s)),(d=rg(d)).each((function(e,t){if(1===(e=dg(e).slice()).length&&!sg(e[0])&&e[0]<0)d.set(t,!1);else{var i=d.set(t,[]);og(e,(function(e,n){sg(e)&&(e=a.get(e)),null!=e&&e<s&&(i[n]=e,f(o[e],t,n))}))}}));var p=0;function f(e,t,i){null!=gg.get(t)?e.otherDims[t]=i:(e.coordDim=t,e.coordDimIndex=i,r.set(t,!0))}og(e,(function(e,t){var i,n,a;if(sg(e))i=e,e={};else{i=e.name;var r=e.ordinalMeta;e.ordinalMeta=null,(e=cg(e)).ordinalMeta=r,n=e.dimsDef,a=e.otherDims,e.name=e.coordDim=e.coordDimIndex=e.dimsDef=e.otherDims=null}if(!1!==(s=d.get(i))){var s;if(!(s=dg(s)).length)for(var l=0;l<(n&&n.length||1);l++){for(;p<o.length&&null!=o[p].coordDim;)p++;p<o.length&&s.push(p++)}og(s,(function(t,r){var s=o[t];if(f(lg(s,e),i,r),null==s.name&&n){var l=n[r];!hg(l)&&(l={name:l}),s.name=s.displayName=l.name,s.defaultTooltip=l.defaultTooltip}a&&lg(s.otherDims,a)}))}}));var g=i.generateCoord,m=i.generateCoordCount,v=null!=m;m=g?m||1:0;for(var y=g||"value",x=0;x<s;x++){null==(c=o[x]=o[x]||new kf).coordDim&&(c.coordDim=mg(y,r,v),c.coordDimIndex=0,(!g||m<=0)&&(c.isExtraCoord=!0),m--),null==c.name&&(c.name=mg(c.coordDim,a)),null!=c.type||pg(t,x,c.name)!==fg.Must&&(!c.isExtraCoord||null==c.otherDims.itemName&&null==c.otherDims.seriesName)||(c.type="ordinal")}return o};var yg=function(e,t){return vg((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})},xg=_e.createHashMap,_g=_e.each;function bg(e){this.coordSysName=e,this.coordSysDims=[],this.axisMap=xg(),this.categoryAxisMap=xg(),this.firstCategoryDimIndex=null}var wg={cartesian2d:function(e,t,i,n){var a=e.getReferringComponents("xAxis")[0],r=e.getReferringComponents("yAxis")[0];t.coordSysDims=["x","y"],i.set("x",a),i.set("y",r),Sg(a)&&(n.set("x",a),t.firstCategoryDimIndex=0),Sg(r)&&(n.set("y",r),t.firstCategoryDimIndex,t.firstCategoryDimIndex=1)},singleAxis:function(e,t,i,n){var a=e.getReferringComponents("singleAxis")[0];t.coordSysDims=["single"],i.set("single",a),Sg(a)&&(n.set("single",a),t.firstCategoryDimIndex=0)},polar:function(e,t,i,n){var a=e.getReferringComponents("polar")[0],r=a.findAxisModel("radiusAxis"),o=a.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],i.set("radius",r),i.set("angle",o),Sg(r)&&(n.set("radius",r),t.firstCategoryDimIndex=0),Sg(o)&&(n.set("angle",o),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},geo:function(e,t,i,n){t.coordSysDims=["lng","lat"]},parallel:function(e,t,i,n){var a=e.ecModel,r=a.getComponent("parallel",e.get("parallelIndex")),o=t.coordSysDims=r.dimensions.slice();_g(r.parallelAxisIndex,(function(e,r){var s=a.getComponent("parallelAxis",e),l=o[r];i.set(l,s),Sg(s)&&null==t.firstCategoryDimIndex&&(n.set(l,s),t.firstCategoryDimIndex=r)}))}};function Sg(e){return"category"===e.get("type")}var Mg={getCoordSysInfoBySeries:function(e){var t=e.get("coordinateSystem"),i=new bg(t),n=wg[t];if(n)return n(e,i,i.axisMap,i.categoryAxisMap),i}},Ig=_e.each,Tg=_e.isString;function Ag(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}var Cg={enableDataStack:function(e,t,i){var n,a,r,o,s=(i=i||{}).byIndex,l=i.stackedCoordDimension,u=!(!e||!e.get("stack"));if(Ig(t,(function(e,i){Tg(e)&&(t[i]=e={name:e}),u&&!e.isExtraCoord&&(s||n||!e.ordinalMeta||(n=e),a||"ordinal"===e.type||"time"===e.type||l&&l!==e.coordDim||(a=e))})),!a||s||n||(s=!0),a){r="__\0ecstackresult",o="__\0ecstackedover",n&&(n.createInvertedIndices=!0);var h=a.coordDim,c=a.type,d=0;Ig(t,(function(e){e.coordDim===h&&d++})),t.push({name:r,coordDim:h,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0}),d++,t.push({name:o,coordDim:o,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:a&&a.name,stackedByDimension:n&&n.name,isStackedByIndex:s,stackedOverDimension:o,stackResultDimension:r}},isDimensionStacked:Ag,getStackedDimension:function(e,t){return Ag(e,t)?e.getCalculationInfo("stackResultDimension"):t}},Dg=Qu.SOURCE_FORMAT_ORIGINAL,Lg=Pf.getDimensionTypeByAxis,Pg=vr.getDataItemValue,kg=Mg.getCoordSysInfoBySeries,Og=Cg.enableDataStack,Rg=Rh.makeSeriesEncodeForAxisCoordSys;var Ng=function(e,t,i){i=i||{},uh.isInstance(e)||(e=uh.seriesDataToSource(e));var n,a=t.get("coordinateSystem"),r=ac.get(a),o=kg(t);o&&(n=_e.map(o.coordSysDims,(function(e){var t={name:e},i=o.axisMap.get(e);if(i){var n=i.get("type");t.type=Lg(n)}return t}))),n||(n=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||["x","y"]);var s,l,u=yg(e,{coordDimensions:n,generateCoord:i.generateCoord,encodeDefaulter:i.useEncodeDefaulter?_e.curry(Rg,n,t):null});o&&_e.each(u,(function(e,t){var i=e.coordDim,n=o.categoryAxisMap.get(i);n&&(null==s&&(s=t),e.ordinalMeta=n.getOrdinalMeta()),null!=e.otherDims.itemName&&(l=!0)})),l||null==s||(u[s].otherDims.itemName=0);var h=Og(t,u),c=new ag(u,t);c.setCalculationInfo(h);var d=null!=s&&function(e){if(e.sourceFormat===Dg){var t=function(e){var t=0;for(;t<e.length&&null==e[t];)t++;return e[t]}(e.data||[]);return null!=t&&!_e.isArray(Pg(t))}}(e)?function(e,t,i,n){return n===s?i:this.defaultDimValueGetter(e,t,i,n)}:null;return c.hasItemOption=!1,c.initData(e,null,d),c};function Eg(e){this._setting=e||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}Eg.prototype.parse=function(e){return e},Eg.prototype.getSetting=function(e){return this._setting[e]},Eg.prototype.contain=function(e){var t=this._extent;return e>=t[0]&&e<=t[1]},Eg.prototype.normalize=function(e){var t=this._extent;return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])},Eg.prototype.scale=function(e){var t=this._extent;return e*(t[1]-t[0])+t[0]},Eg.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1])},Eg.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},Eg.prototype.getExtent=function(){return this._extent.slice()},Eg.prototype.setExtent=function(e,t){var i=this._extent;isNaN(e)||(i[0]=e),isNaN(t)||(i[1]=t)},Eg.prototype.isBlank=function(){return this._isBlank},Eg.prototype.setBlank=function(e){this._isBlank=e},Eg.prototype.getLabel=null,Sr.enableClassExtend(Eg),Sr.enableClassManagement(Eg,{registerWhenExtend:!0});var zg=Eg,Bg=_e.createHashMap,Vg=_e.isObject,Gg=_e.map;function Fg(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this._map}Fg.createByAxisModel=function(e){var t=e.option,i=t.data,n=i&&Gg(i,Ug);return new Fg({categories:n,needCollect:!n,deduplication:!1!==t.dedplication})};var Hg=Fg.prototype;function Wg(e){return e._map||(e._map=Bg(e.categories))}function Ug(e){return Vg(e)&&null!=e.value?e.value:e+""}Hg.getOrdinal=function(e){return Wg(this).get(e)},Hg.parseAndCollect=function(e){var t,i=this._needCollect;if("string"!=typeof e&&!i)return e;if(i&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var n=Wg(this);return null==(t=n.get(e))&&(i?(t=this.categories.length,this.categories[t]=e,n.set(e,t)):t=NaN),t};var Zg=Fg,jg=zg.prototype,Yg=zg.extend({type:"ordinal",init:function(e,t){e&&!_e.isArray(e)||(e=new Zg({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),jg.contain.call(this,e)&&null!=this._ordinalMeta.categories[e]},normalize:function(e){return jg.normalize.call(this,this.parse(e))},scale:function(e){return Math.round(jg.scale.call(this,e))},getTicks:function(){for(var e=[],t=this._extent,i=t[0];i<=t[1];)e.push(i),i++;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:_e.noop,niceExtent:_e.noop});Yg.create=function(){return new Yg};var Xg=Yg,qg=bu.round;function Kg(e){return bu.getPrecisionSafe(e)+2}function $g(e,t,i){e[t]=Math.max(Math.min(e[t],i[1]),i[0])}function Jg(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),$g(e,0,t),$g(e,1,t),e[0]>e[1]&&(e[0]=e[1])}var Qg={intervalScaleNiceTicks:function(e,t,i,n){var a={},r=e[1]-e[0],o=a.interval=bu.nice(r/t,!0);null!=i&&o<i&&(o=a.interval=i),null!=n&&o>n&&(o=a.interval=n);var s=a.intervalPrecision=Kg(o);return Jg(a.niceTickExtent=[qg(Math.ceil(e[0]/o)*o,s),qg(Math.floor(e[1]/o)*o,s)],e),a},getIntervalPrecision:Kg,fixExtent:Jg},em=bu.round,tm=zg.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(e,t){var i=this._extent;isNaN(e)||(i[0]=parseFloat(e)),isNaN(t)||(i[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]),tm.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=Qg.getIntervalPrecision(e)},getTicks:function(e){var t=this._interval,i=this._extent,n=this._niceExtent,a=this._intervalPrecision,r=[];if(!t)return r;i[0]<n[0]&&(e?r.push(em(n[0]-t,a)):r.push(i[0]));for(var o=n[0];o<=n[1]&&(r.push(o),(o=em(o+t,a))!==r[r.length-1]);)if(r.length>1e4)return[];var s=r.length?r[r.length-1]:n[1];return i[1]>s&&(e?r.push(em(s+t,a)):r.push(i[1])),r},getMinorTicks:function(e){for(var t=this.getTicks(!0),i=[],n=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 h=bu.round(o+(s+1)*u);h>n[0]&&h<n[1]&&l.push(h),s++}i.push(l)}return i},getLabel:function(e,t){if(null==e)return"";var i=t&&t.precision;return null==i?i=bu.getPrecisionSafe(e)||0:"auto"===i&&(i=this._intervalPrecision),e=em(e,i,!0),Du.addCommas(e)},niceTicks:function(e,t,i){e=e||5;var n=this._extent,a=n[1]-n[0];if(isFinite(a)){a<0&&(a=-a,n.reverse());var r=Qg.intervalScaleNiceTicks(n,e,t,i);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 i=t[0];e.fixMax||(t[1]+=i/2),t[0]-=i/2}else t[1]=1;var n=t[1]-t[0];isFinite(n)||(t[0]=0,t[1]=1),this.niceTicks(e.splitNumber,e.minInterval,e.maxInterval);var a=this._interval;e.fixMin||(t[0]=em(Math.floor(t[0]/a)*a)),e.fixMax||(t[1]=em(Math.ceil(t[1]/a)*a))}});tm.create=function(){return new tm};var im=tm,nm=bu.parsePercent,am=Cg.isDimensionStacked,rm="undefined"!=typeof Float32Array?Float32Array:Array;function om(e){return e.get("stack")||"__ec_stack_"+e.seriesIndex}function sm(e){return e.dim+e.index}function lm(e,t){var i=[];return t.eachSeriesByType(e,(function(e){pm(e)&&!fm(e)&&i.push(e)})),i}function um(e){var t=function(e){var t={};_e.each(e,(function(e){var i=e.coordinateSystem.getBaseAxis();if("time"===i.type||"value"===i.type)for(var n=e.getData(),a=i.dim+"_"+i.index,r=n.mapDimension(i.dim),o=0,s=n.count();o<s;++o){var l=n.get(r,o);t[a]?t[a].push(l):t[a]=[l]}}));var i=[];for(var n in t)if(t.hasOwnProperty(n)){var a=t[n];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))}i[n]=r}}return i}(e),i=[];return _e.each(e,(function(e){var n,a=e.coordinateSystem.getBaseAxis(),r=a.getExtent();if("category"===a.type)n=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(),h=Math.abs(u[1]-u[0]);n=s?l/h*s:l}else{var c=e.getData();n=Math.abs(r[1]-r[0])/c.count()}var d=nm(e.get("barWidth"),n),p=nm(e.get("barMaxWidth"),n),f=nm(e.get("barMinWidth")||1,n),g=e.get("barGap"),m=e.get("barCategoryGap");i.push({bandWidth:n,barWidth:d,barMaxWidth:p,barMinWidth:f,barGap:g,barCategoryGap:m,axisKey:sm(a),stackId:om(e)})})),hm(i)}function hm(e){var t={};_e.each(e,(function(e,i){var n=e.axisKey,a=e.bandWidth,r=t[n]||{bandWidth:a,remainedWidth:a,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},o=r.stacks;t[n]=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 h=e.barMinWidth;h&&(o[s].minWidth=h);var c=e.barGap;null!=c&&(r.gap=c);var d=e.barCategoryGap;null!=d&&(r.categoryGap=d)}));var i={};return _e.each(t,(function(e,t){i[t]={};var n=e.stacks,a=e.bandWidth,r=nm(e.categoryGap,a),o=nm(e.gap,1),s=e.remainedWidth,l=e.autoWidthCount,u=(s-r)/(l+(l-1)*o);u=Math.max(u,0),_e.each(n,(function(e){var t=e.maxWidth,i=e.minWidth;if(e.width){n=e.width;t&&(n=Math.min(n,t)),i&&(n=Math.max(n,i)),e.width=n,s-=n+o*n,l--}else{var n=u;t&&t<n&&(n=Math.min(t,s)),i&&i>n&&(n=i),n!==u&&(e.width=n,s-=n+o*n,l--)}})),u=(s-r)/(l+(l-1)*o),u=Math.max(u,0);var h,c=0;_e.each(n,(function(e,t){e.width||(e.width=u),h=e,c+=e.width*(1+o)})),h&&(c-=h.width*o);var d=-c/2;_e.each(n,(function(e,n){i[t][n]=i[t][n]||{bandWidth:a,offset:d,width:e.width},d+=e.width*(1+o)}))})),i}function cm(e,t,i){if(e&&t){var n=e[sm(t)];return null!=n&&null!=i&&(n=n[om(i)]),n}}var dm={seriesType:"bar",plan:Gd(),reset:function(e){if(pm(e)&&fm(e)){var t=e.getData(),i=e.coordinateSystem,n=i.grid.getRect(),a=i.getBaseAxis(),r=i.getOtherAxis(a),o=t.mapDimension(r.dim),s=t.mapDimension(a.dim),l=r.isHorizontal(),u=l?0:1,h=cm(um([e]),a,e).width;return h>.5||(h=.5),{progress:function(e,t){var c,d=e.count,p=new rm(2*d),f=new rm(2*d),g=new rm(d),m=[],v=[],y=0,x=0;for(;null!=(c=e.next());)v[u]=t.get(o,c),v[1-u]=t.get(s,c),m=i.dataToPoint(v,null,m),f[y]=l?n.x+n.width:m[0],p[y++]=m[0],f[y]=l?m[1]:n.y+n.height,p[y++]=m[1],g[x++]=c;t.setLayout({largePoints:p,largeDataIndices:g,largeBackgroundPoints:f,barWidth:h,valueAxisStart:gm(a,r),backgroundStart:l?n.x:n.y,valueAxisHorizontal:l})}}}}};function pm(e){return e.coordinateSystem&&"cartesian2d"===e.coordinateSystem.type}function fm(e){return e.pipelineContext&&e.pipelineContext.large}function gm(e,t,i){return t.toGlobalCoord(t.dataToCoord("log"===t.type?1:0))}var mm={getLayoutOnAxis:function(e){var t=[],i=e.axis;if("category"===i.type){for(var n=i.getBandWidth(),a=0;a<e.count;a++)t.push(_e.defaults({bandWidth:n,axisKey:"axis0",stackId:"__ec_stack_"+a},e));var r=hm(t),o=[];for(a=0;a<e.count;a++){var s=r.axis0["__ec_stack_"+a];s.offsetCenter=s.offset+s.width/2,o.push(s)}return o}},prepareLayoutBarSeries:lm,makeColumnLayout:um,retrieveColumnLayout:cm,layout:function(e,t){var i=lm(e,t),n=um(i),a={};_e.each(i,(function(e){var t=e.getData(),i=e.coordinateSystem,r=i.getBaseAxis(),o=om(e),s=n[sm(r)][o],l=s.offset,u=s.width,h=i.getOtherAxis(r),c=e.get("barMinHeight")||0;a[o]=a[o]||[],t.setLayout({bandWidth:s.bandWidth,offset:l,size:u});for(var d=t.mapDimension(h.dim),p=t.mapDimension(r.dim),f=am(t,d),g=h.isHorizontal(),m=gm(r,h),v=0,y=t.count();v<y;v++){var x,_,b,w,S,M=t.get(d,v),I=t.get(p,v),T=M>=0?"p":"n",A=m;if(f&&(a[o][I]||(a[o][I]={p:m,n:m}),A=a[o][I][T]),g)x=A,_=(S=i.dataToPoint([M,I]))[1]+l,b=S[0]-m,w=u,Math.abs(b)<c&&(b=(b<0?-1:1)*c),isNaN(b)||f&&(a[o][I][T]+=b);else x=(S=i.dataToPoint([I,M]))[0]+l,_=A,b=u,w=S[1]-m,Math.abs(w)<c&&(w=(w<=0?-1:1)*c),isNaN(w)||f&&(a[o][I][T]+=w);t.setItemLayout(v,{x:x,y:_,width:b,height:w})}}),this)},largeLayout:dm},vm=im.prototype,ym=Math.ceil,xm=Math.floor,_m=864e5,bm=im.extend({type:"time",getLabel:function(e){var t=this._stepLvl,i=new Date(e);return Du.formatTime(t[0],i,this.getSetting("useUTC"))},niceExtent:function(e){var t=this._extent;if(t[0]===t[1]&&(t[0]-=_m,t[1]+=_m),t[1]===-1/0&&t[0]===1/0){var i=new Date;t[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),t[0]=t[1]-_m}this.niceTicks(e.splitNumber,e.minInterval,e.maxInterval);var n=this._interval;e.fixMin||(t[0]=bu.round(xm(t[0]/n)*n)),e.fixMax||(t[1]=bu.round(ym(t[1]/n)*n))},niceTicks:function(e,t,i){e=e||10;var n=this._extent,a=n[1]-n[0],r=a/e;null!=t&&r<t&&(r=t),null!=i&&r>i&&(r=i);var o=wm.length,s=function(e,t,i,n){for(;i<n;){var a=i+n>>>1;e[a][1]<t?i=a+1:n=a}return i}(wm,r,0,o),l=wm[Math.min(s,o-1)],u=l[1];if("year"===l[0]){var h=a/u;u*=bu.nice(h/e,!0)}var c=this.getSetting("useUTC")?0:60*new Date(+n[0]||+n[1]).getTimezoneOffset()*1e3,d=[Math.round(ym((n[0]-c)/u)*u+c),Math.round(xm((n[1]-c)/u)*u+c)];Qg.fixExtent(d,n),this._stepLvl=l,this._interval=u,this._niceExtent=d},parse:function(e){return+bu.parseDate(e)}});_e.each(["contain","normalize"],(function(e){bm.prototype[e]=function(t){return vm[e].call(this,this.parse(t))}}));var wm=[["hh:mm:ss",1e3],["hh:mm:ss",5e3],["hh:mm:ss",1e4],["hh:mm:ss",15e3],["hh:mm:ss",3e4],["hh:mm\nMM-dd",6e4],["hh:mm\nMM-dd",3e5],["hh:mm\nMM-dd",6e5],["hh:mm\nMM-dd",9e5],["hh:mm\nMM-dd",18e5],["hh:mm\nMM-dd",36e5],["hh:mm\nMM-dd",72e5],["hh:mm\nMM-dd",216e5],["hh:mm\nMM-dd",432e5],["MM-dd\nyyyy",_m],["MM-dd\nyyyy",2*_m],["MM-dd\nyyyy",3*_m],["MM-dd\nyyyy",4*_m],["MM-dd\nyyyy",5*_m],["MM-dd\nyyyy",6*_m],["week",7*_m],["MM-dd\nyyyy",10*_m],["week",14*_m],["week",21*_m],["month",31*_m],["week",42*_m],["month",62*_m],["week",70*_m],["quarter",95*_m],["month",31*_m*4],["month",31*_m*5],["half-year",380*_m/2],["month",31*_m*8],["month",31*_m*10],["year",380*_m]];bm.create=function(e){return new bm({useUTC:e.ecModel.get("useUTC")})};var Sm=zg.prototype,Mm=im.prototype,Im=bu.getPrecisionSafe,Tm=bu.round,Am=Math.floor,Cm=Math.ceil,Dm=Math.pow,Lm=Math.log,Pm=zg.extend({type:"log",base:10,$constructor:function(){zg.apply(this,arguments),this._originalScale=new im},getTicks:function(e){var t=this._originalScale,i=this._extent,n=t.getExtent();return _e.map(Mm.getTicks.call(this,e),(function(e){var a=bu.round(Dm(this.base,e));return a=e===i[0]&&t.__fixMin?km(a,n[0]):a,a=e===i[1]&&t.__fixMax?km(a,n[1]):a}),this)},getMinorTicks:Mm.getMinorTicks,getLabel:Mm.getLabel,scale:function(e){return e=Sm.scale.call(this,e),Dm(this.base,e)},setExtent:function(e,t){var i=this.base;e=Lm(e)/Lm(i),t=Lm(t)/Lm(i),Mm.setExtent.call(this,e,t)},getExtent:function(){var e=this.base,t=Sm.getExtent.call(this);t[0]=Dm(e,t[0]),t[1]=Dm(e,t[1]);var i=this._originalScale,n=i.getExtent();return i.__fixMin&&(t[0]=km(t[0],n[0])),i.__fixMax&&(t[1]=km(t[1],n[1])),t},unionExtent:function(e){this._originalScale.unionExtent(e);var t=this.base;e[0]=Lm(e[0])/Lm(t),e[1]=Lm(e[1])/Lm(t),Sm.unionExtent.call(this,e)},unionExtentFromData:function(e,t){this.unionExtent(e.getApproximateExtent(t))},niceTicks:function(e){e=e||10;var t=this._extent,i=t[1]-t[0];if(!(i===1/0||i<=0)){var n=bu.quantity(i);for(e/i*n<=.5&&(n*=10);!isNaN(n)&&Math.abs(n)<1&&Math.abs(n)>0;)n*=10;var a=[bu.round(Cm(t[0]/n)*n),bu.round(Am(t[1]/n)*n)];this._interval=n,this._niceExtent=a}},niceExtent:function(e){Mm.niceExtent.call(this,e);var t=this._originalScale;t.__fixMin=e.fixMin,t.__fixMax=e.fixMax}});function km(e,t){return Tm(e,Im(t))}_e.each(["contain","normalize"],(function(e){Pm.prototype[e]=function(t){return t=Lm(t)/Lm(this.base),Sm[e].call(this,t)}})),Pm.create=function(){return new Pm};var Om=Pm,Rm=mm.prepareLayoutBarSeries,Nm=mm.makeColumnLayout,Em=mm.retrieveColumnLayout;function zm(e,t){var i,n,a,r=e.type,o=t.getMin(),s=t.getMax(),l=e.getExtent();"ordinal"===r?i=t.getCategories().length:(n=t.get("boundaryGap"),_e.isArray(n)||(n=[n||0,n||0]),"boolean"==typeof n[0]&&(n=[0,0]),n[0]=bu.parsePercent(n[0],1),n[1]=bu.parsePercent(n[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,h=null!=s;null==o&&(o="ordinal"===r?i?0:NaN:l[0]-n[0]*a),null==s&&(s="ordinal"===r?i?i-1:NaN:l[1]+n[1]*a),(null==o||!isFinite(o))&&(o=NaN),(null==s||!isFinite(s))&&(s=NaN),e.setBlank(_e.eqNaN(o)||_e.eqNaN(s)||"ordinal"===r&&!e.getOrdinalMeta().categories.length),t.getNeedCrossZero()&&(o>0&&s>0&&!u&&(o=0),o<0&&s<0&&!h&&(s=0));var c=t.ecModel;if(c&&"time"===r){var d,p=Rm("bar",c);if(_e.each(p,(function(e){d|=e.getBaseAxis()===t.axis})),d){var f=Nm(p),g=function(e,t,i,n){var a=i.axis.getExtent(),r=a[1]-a[0],o=Em(n,i.axis);if(void 0===o)return{min:e,max:t};var s=1/0;_e.each(o,(function(e){s=Math.min(e.offset,s)}));var l=-1/0;_e.each(o,(function(e){l=Math.max(e.offset+e.width,l)})),s=Math.abs(s),l=Math.abs(l);var u=s+l,h=t-e,c=h/(1-(s+l)/r)-h;return{min:e-=c*(s/u),max:t+=c*(l/u)}}(o,s,t,f);o=g.min,s=g.max}}return{extent:[o,s],fixMin:u,fixMax:h}}function Bm(e){var t,i=e.getLabelModel().get("formatter"),n="category"===e.type?e.scale.getExtent()[0]:null;return"string"==typeof i?(t=i,i=function(i){return i=e.scale.getLabel(i),t.replace("{value}",null!=i?i:"")}):"function"==typeof i?function(t,a){return null!=n&&(a=t-n),i(Vm(e,t),a)}:function(t){return e.scale.getLabel(t)}}function Vm(e,t){return"category"===e.type?e.scale.getLabel(t):t}function Gm(e,t){var i=t*Math.PI/180,n=e.plain(),a=n.width,r=n.height,o=a*Math.cos(i)+r*Math.sin(i),s=a*Math.sin(i)+r*Math.cos(i);return new Oi(n.x,n.y,o,s)}function Fm(e){var t=e.get("interval");return null==t?"auto":t}var Hm={getScaleExtent:zm,niceScaleExtent:function(e,t){var i=zm(e,t),n=i.extent,a=t.get("splitNumber");"log"===e.type&&(e.base=t.get("logBase"));var r=e.type;e.setExtent(n[0],n[1]),e.niceExtent({splitNumber:a,fixMin:i.fixMin,fixMax:i.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)},createScaleByModel:function(e,t){if(t=t||e.get("type"))switch(t){case"category":return new Xg(e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),[1/0,-1/0]);case"value":return new im;default:return(zg.getClass(t)||im).create(e)}},ifAxisCrossZero:function(e){var t=e.scale.getExtent(),i=t[0],n=t[1];return!(i>0&&n>0||i<0&&n<0)},makeLabelFormatter:Bm,getAxisRawValue:Vm,estimateLabelUnionRect:function(e){var t=e.model,i=e.scale;if(t.get("axisLabel.show")&&!i.isBlank()){var n,a,r="category"===e.type,o=i.getExtent();a=r?i.count():(n=i.getTicks()).length;var s,l=e.getLabelModel(),u=Bm(e),h=1;a>40&&(h=Math.ceil(a/40));for(var c=0;c<a;c+=h){var d=u(n?n[c]:o[0]+c),p=Gm(l.getTextRect(d),l.get("rotate")||0);s?s.union(p):s=p}return s}},getOptionCategoryInterval:Fm,shouldShowAllLabels:function(e){return"category"===e.type&&0===Fm(e.getLabelModel())}},Wm={getMin:function(e){var t=this.option,i=e||null==t.rangeStart?t.min:t.rangeStart;return this.axis&&null!=i&&"dataMin"!==i&&"function"!=typeof i&&!_e.eqNaN(i)&&(i=this.axis.scale.parse(i)),i},getMax:function(e){var t=this.option,i=e||null==t.rangeEnd?t.max:t.rangeEnd;return this.axis&&null!=i&&"dataMax"!==i&&"function"!=typeof i&&!_e.eqNaN(i)&&(i=this.axis.scale.parse(i)),i},getNeedCrossZero:function(){var e=this.option;return null==e.rangeStart&&null==e.rangeEnd&&!e.scale},getCoordSysModel:_e.noop,setRange:function(e,t){this.option.rangeStart=e,this.option.rangeEnd=t},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},Um=Bn.calculateTextPosition,Zm=iu.extendShape({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var i=t.cx,n=t.cy,a=t.width/2,r=t.height/2;e.moveTo(i,n-r),e.lineTo(i+a,n+r),e.lineTo(i-a,n+r),e.closePath()}}),jm=iu.extendShape({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var i=t.cx,n=t.cy,a=t.width/2,r=t.height/2;e.moveTo(i,n-r),e.lineTo(i+a,n),e.lineTo(i,n+r),e.lineTo(i-a,n),e.closePath()}}),Ym=iu.extendShape({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var i=t.x,n=t.y,a=t.width/5*3,r=Math.max(a,t.height),o=a/2,s=o*o/(r-o),l=n-r+o+s,u=Math.asin(s/o),h=Math.cos(u)*o,c=Math.sin(u),d=Math.cos(u),p=.6*o,f=.7*o;e.moveTo(i-h,l+s),e.arc(i,l,o,Math.PI-u,2*Math.PI+u),e.bezierCurveTo(i+h-c*p,l+s+d*p,i,n-f,i,n),e.bezierCurveTo(i,n-f,i-h+c*p,l+s+d*p,i-h,l+s),e.closePath()}}),Xm=iu.extendShape({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var i=t.height,n=t.width,a=t.x,r=t.y,o=n/3*2;e.moveTo(a,r),e.lineTo(a+o,r+i),e.lineTo(a,r+i/4*3),e.lineTo(a-o,r+i),e.lineTo(a,r),e.closePath()}}),qm={line:iu.Line,rect:iu.Rect,roundRect:iu.Rect,square:iu.Rect,circle:iu.Circle,diamond:jm,pin:Ym,arrow:Xm,triangle:Zm},Km={line:function(e,t,i,n,a){a.x1=e,a.y1=t+n/2,a.x2=e+i,a.y2=t+n/2},rect:function(e,t,i,n,a){a.x=e,a.y=t,a.width=i,a.height=n},roundRect:function(e,t,i,n,a){a.x=e,a.y=t,a.width=i,a.height=n,a.r=Math.min(i,n)/4},square:function(e,t,i,n,a){var r=Math.min(i,n);a.x=e,a.y=t,a.width=r,a.height=r},circle:function(e,t,i,n,a){a.cx=e+i/2,a.cy=t+n/2,a.r=Math.min(i,n)/2},diamond:function(e,t,i,n,a){a.cx=e+i/2,a.cy=t+n/2,a.width=i,a.height=n},pin:function(e,t,i,n,a){a.x=e+i/2,a.y=t+n/2,a.width=i,a.height=n},arrow:function(e,t,i,n,a){a.x=e+i/2,a.y=t+n/2,a.width=i,a.height=n},triangle:function(e,t,i,n,a){a.cx=e+i/2,a.cy=t+n/2,a.width=i,a.height=n}},$m={};_e.each(qm,(function(e,t){$m[t]=new e}));var Jm=iu.extendShape({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,i){var n=Um(e,t,i),a=this.shape;return a&&"pin"===a.symbolType&&"inside"===t.textPosition&&(n.y=i.y+.4*i.height),n},buildPath:function(e,t,i){var n=t.symbolType;if("none"!==n){var a=$m[n];a||(a=$m[n="rect"]),Km[n](t.x,t.y,t.width,t.height,a.shape),a.buildPath(e,a.shape,i)}}});function Qm(e,t){if("image"!==this.type){var i=this.style,n=this.shape;n&&"line"===n.symbolType?i.stroke=e:this.__isEmptyBrush?(i.stroke=e,i.fill=t||"#fff"):(i.fill&&(i.fill=e),i.stroke&&(i.stroke=e)),this.dirty(!1)}}var ev={createSymbol:function(e,t,i,n,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://")?iu.makeImage(e.slice(8),new Oi(t,i,n,a),o?"center":"cover"):0===e.indexOf("path://")?iu.makePath(e.slice(7),{},new Oi(t,i,n,a),o?"center":"cover"):new Jm({shape:{symbolType:e,x:t,y:i,width:n,height:a}})).__isEmptyBrush=l,s.setColor=Qm,s.setColor(r),s}},tv=Gu.getLayoutRect,iv=Cg.enableDataStack,nv=Cg.isDimensionStacked,av=Cg.getStackedDimension;var rv={getLayoutRect:tv,completeDimensions:vg,createDimensions:yg,createSymbol:ev.createSymbol,createList:function(e){return Ng(e.getSource(),e)},dataStack:{isDimensionStacked:nv,enableDataStack:iv,getStackedDimension:av},createScale:function(e,t){var i=t;gu.isInstance(t)||(i=new gu(t),_e.mixin(i,Wm));var n=Hm.createScaleByModel(i);return n.setExtent(e[0],e[1]),Hm.niceScaleExtent(n,i),n},mixinAxisModelCommonMethods:function(e){_e.mixin(e,Wm)}};function ov(e,t){return Math.abs(e-t)<1e-8}var sv={contain:function(e,t,i){var n=0,a=e[0];if(!a)return!1;for(var r=1;r<e.length;r++){var o=e[r];n+=Mo(a[0],a[1],o[0],o[1],t,i),a=o}var s=e[0];return ov(a[0],s[0])&&ov(a[1],s[1])||(n+=Mo(a[0],a[1],s[0],s[1],t,i)),0!==n}};function lv(e,t,i){if(this.name=e,this.geometries=t,i)i=[i[0],i[1]];else{var n=this.getBoundingRect();i=[n.x+n.width/2,n.y+n.height/2]}this.center=i}lv.prototype={constructor:lv,properties:null,getBoundingRect:function(){var e=this._rect;if(e)return e;for(var t=Number.MAX_VALUE,i=[t,t],n=[-t,-t],a=[],r=[],o=this.geometries,s=0;s<o.length;s++)if("polygon"===o[s].type){var l=o[s].exterior;Jr.fromPoints(l,a,r),Te.min(i,i,a),Te.max(n,n,r)}return 0===s&&(i[0]=i[1]=n[0]=n[1]=0),this._rect=new Oi(i[0],i[1],n[0]-i[0],n[1]-i[1])},contain:function(e){var t=this.getBoundingRect(),i=this.geometries;if(!t.contain(e[0],e[1]))return!1;e:for(var n=0,a=i.length;n<a;n++)if("polygon"===i[n].type){var r=i[n].exterior,o=i[n].interiors;if(sv.contain(r,e[0],e[1])){for(var s=0;s<(o?o.length:0);s++)if(sv.contain(o[s]))continue e;return!0}}return!1},transformTo:function(e,t,i,n){var a=this.getBoundingRect(),r=a.width/a.height;i?n||(n=i/r):i=r*n;for(var o=new Oi(e,t,i,n),s=a.calculateTransform(o),l=this.geometries,u=0;u<l.length;u++)if("polygon"===l[u].type){for(var h=l[u].exterior,c=l[u].interiors,d=0;d<h.length;d++)Te.applyTransform(h[d],h[d],s);for(var p=0;p<(c?c.length:0);p++)for(d=0;d<c[p].length;d++)Te.applyTransform(c[p][d],c[p][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 lv(e,this.geometries,this.center);return t._rect=this._rect,t.transformTo=null,t}};var uv=lv;function hv(e,t,i){for(var n=[],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,n.push([s/i,l/i])}return n}var cv=function(e,t){return function(e){if(!e.UTF8Encoding)return e;var t=e.UTF8Scale;null==t&&(t=1024);for(var i=e.features,n=0;n<i.length;n++)for(var a=i[n].geometry,r=a.coordinates,o=a.encodeOffsets,s=0;s<r.length;s++){var l=r[s];if("Polygon"===a.type)r[s]=hv(l,o[s],t);else if("MultiPolygon"===a.type)for(var u=0;u<l.length;u++){var h=l[u];l[u]=hv(h,o[s][u],t)}}e.UTF8Encoding=!1}(e),_e.map(_e.filter(e.features,(function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0})),(function(e){var i=e.properties,n=e.geometry,a=n.coordinates,r=[];"Polygon"===n.type&&r.push({type:"polygon",exterior:a[0],interiors:a.slice(1)}),"MultiPolygon"===n.type&&_e.each(a,(function(e){e[0]&&r.push({type:"polygon",exterior:e[0],interiors:e.slice(1)})}));var o=new uv(i[t||"name"],r,i.cp);return o.properties=i,o}))},dv=vr.makeInner,pv=Hm.makeLabelFormatter,fv=Hm.getOptionCategoryInterval,gv=Hm.shouldShowAllLabels,mv=dv();function vv(e,t){var i,n,a=yv(e,"labels"),r=fv(t),o=xv(a,r);return o||(_e.isFunction(r)?i=wv(e,r):(n="auto"===r?function(e){var t=mv(e).autoInterval;return null!=t?t:mv(e).autoInterval=e.calculateCategoryInterval()}(e):r,i=bv(e,n)),_v(a,r,{labels:i,labelCategoryInterval:n}))}function yv(e,t){return mv(e)[t]||(mv(e)[t]=[])}function xv(e,t){for(var i=0;i<e.length;i++)if(e[i].key===t)return e[i].value}function _v(e,t,i){return e.push({key:t,value:i}),i}function bv(e,t,i){var n=pv(e),a=e.scale,r=a.getExtent(),o=e.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=r[0],h=a.count();0!==u&&l>1&&h/l>2&&(u=Math.round(Math.ceil(u/l)*l));var c=gv(e),d=o.get("showMinLabel")||c,p=o.get("showMaxLabel")||c;d&&u!==r[0]&&g(r[0]);for(var f=u;f<=r[1];f+=l)g(f);function g(e){s.push(i?e:{formattedLabel:n(e),rawLabel:a.getLabel(e),tickValue:e})}return p&&f-l!==r[1]&&g(r[1]),s}function wv(e,t,i){var n=e.scale,a=pv(e),r=[];return _e.each(n.getTicks(),(function(e){var o=n.getLabel(e);t(e,o)&&r.push(i?e:{formattedLabel:a(e),rawLabel:o,tickValue:e})})),r}var Sv={createAxisLabels:function(e){return"category"===e.type?function(e){var t=e.getLabelModel(),i=vv(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:i.labelCategoryInterval}:i}(e):function(e){var t=e.scale.getTicks(),i=pv(e);return{labels:_e.map(t,(function(t,n){return{formattedLabel:i(t,n),rawLabel:e.scale.getLabel(t),tickValue:t}}))}}(e)},createAxisTicks:function(e,t){return"category"===e.type?function(e,t){var i,n,a=yv(e,"ticks"),r=fv(t),o=xv(a,r);if(o)return o;t.get("show")&&!e.scale.isBlank()||(i=[]);if(_e.isFunction(r))i=wv(e,r,!0);else if("auto"===r){var s=vv(e,e.getLabelModel());n=s.labelCategoryInterval,i=_e.map(s.labels,(function(e){return e.tickValue}))}else i=bv(e,n=r,!0);return _v(a,r,{ticks:i,tickCategoryInterval:n})}(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),i=pv(e),n=(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),h=Math.abs(u*Math.cos(n)),c=Math.abs(u*Math.sin(n)),d=0,p=0;l<=r[1];l+=s){var f,g,m=Bn.getBoundingRect(i(l),t.font,"center","top");f=1.3*m.width,g=1.3*m.height,d=Math.max(d,f,7),p=Math.max(p,g,7)}var v=d/h,y=p/c;isNaN(v)&&(v=1/0),isNaN(y)&&(y=1/0);var x=Math.max(0,Math.floor(Math.min(v,y))),_=mv(e.model),b=e.getExtent(),w=_.lastAutoInterval,S=_.lastTickCount;return null!=w&&null!=S&&Math.abs(w-x)<=1&&Math.abs(S-o)<=1&&w>x&&_.axisExtend0===b[0]&&_.axisExtend1===b[1]?x=w:(_.lastTickCount=o,_.lastAutoInterval=x,_.axisExtend0=b[0],_.axisExtend1=b[1]),x}},Mv=_e.each,Iv=_e.map,Tv=bu.linearMap,Av=bu.getPixelPrecision,Cv=bu.round,Dv=Sv.createAxisTicks,Lv=Sv.createAxisLabels,Pv=Sv.calculateCategoryInterval,kv=[0,1],Ov=function(e,t,i){this.dim=e,this.scale=t,this._extent=i||[0,0],this.inverse=!1,this.onBand=!1};function Rv(e,t){var i=(e[1]-e[0])/t/2;e[0]+=i,e[1]-=i}Ov.prototype={constructor:Ov,contain:function(e){var t=this._extent,i=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]);return e>=i&&e<=n},containData:function(e){return this.scale.contain(e)},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(e){return Av(e||this.scale.getExtent(),this._extent)},setExtent:function(e,t){var i=this._extent;i[0]=e,i[1]=t},dataToCoord:function(e,t){var i=this._extent,n=this.scale;return e=n.normalize(e),this.onBand&&"ordinal"===n.type&&Rv(i=i.slice(),n.count()),Tv(e,kv,i,t)},coordToData:function(e,t){var i=this._extent,n=this.scale;this.onBand&&"ordinal"===n.type&&Rv(i=i.slice(),n.count());var a=Tv(e,i,kv,t);return this.scale.scale(a)},pointToData:function(e,t){},getTicksCoords:function(e){var t=(e=e||{}).tickModel||this.getTickModel(),i=Dv(this,t).ticks,n=Iv(i,(function(e){return{coord:this.dataToCoord(e),tickValue:e}}),this);return function(e,t,i,n){var a=t.length;if(!e.onBand||i||!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;Mv(t,(function(e){e.coord-=u/2}));var h=e.scale.getExtent();o=1+h[1]-t[a-1].tickValue,r={coord:t[a-1].coord+u*o},t.push(r)}var c=s[0]>s[1];d(t[0].coord,s[0])&&(n?t[0].coord=s[0]:t.shift());n&&d(s[0],t[0].coord)&&t.unshift({coord:s[0]});d(s[1],r.coord)&&(n?r.coord=s[1]:t.pop());n&&d(r.coord,s[1])&&t.push({coord:s[1]});function d(e,t){return e=Cv(e),t=Cv(t),c?e>t:e<t}}(this,n,t.get("alignWithLabel"),e.clamp),n},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 Iv(t,(function(e){return Iv(e,(function(e){return{coord:this.dataToCoord(e),tickValue:e}}),this)}),this)},getViewLabels:function(){return Lv(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(),i=t[1]-t[0]+(this.onBand?1:0);0===i&&(i=1);var n=Math.abs(e[1]-e[0]);return Math.abs(n)/i},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return Pv(this)}};var Nv=Ov,Ev=ur,zv=dt,Bv=Te,Vv=Xt,Gv=bu,Fv=Du,Hv=ip.throttle,Wv=rv,Uv=cv,Zv=ag,jv=gu,Yv=Nv,Xv=K,qv=cv,Kv={};_e.each(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],(function(e){Kv[e]=_e[e]}));var $v={};_e.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){$v[e]=iu[e]}));var Jv={zrender:Ev,matrix:zv,vector:Bv,color:Vv,number:Gv,format:Fv,throttle:Hv,helper:Wv,parseGeoJSON:Uv,List:Zv,Model:jv,Axis:Yv,env:Xv,parseGeoJson:qv,util:Kv,graphic:$v},Qv=Y((function(e,t){var i=ip.throttle,n=_e.assert,a=_e.each,r=_e.isFunction,o=_e.isObject,s=ju.parseClassType,l={PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:2e3,CHART:3e3,POST_CHART_LAYOUT:3500,COMPONENT:4e3,BRUSH:5e3}},u="__flagInMainProcess",h=/^[a-zA-Z0-9_]+$/;function c(e,t){return function(i,n,a){t||!this._disposed?(i=i&&i.toLowerCase(),Oe.prototype[e].call(this,i,n,a)):this.id}}function d(){Oe.call(this)}function p(e,t,n){n=n||{},"string"==typeof t&&(t=z[t]),this.id,this.group,this._dom=e;var a=this._zr=ur.init(e,{renderer:n.renderer||"canvas",devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height});this._throttledZrFlush=i(_e.bind(a.flush,a),17),(t=_e.clone(t))&&kc(t,!0),this._theme=t,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new ac;var r,o,s=this._api=(o=(r=this)._coordSysMgr,_e.extend(new tc(r),{getCoordinateSystems:_e.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}Fi(E,l),Fi(O,l),this._scheduler=new zp(this,s,O,E),Oe.call(this,this._ecEventProcessor=new L),this._messageCenter=new d,this._initEvents(),this.resize=_e.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.__optionUpdated||t._scheduler.unfinished||t._pendingActions.length||t.trigger("finished")}))}(a,this),_e.setAsPrimitive(this)}d.prototype.on=c("on",!0),d.prototype.off=c("off",!0),d.prototype.one=c("one",!0),_e.mixin(d,Oe);var f=p.prototype;function g(e,t,i){if(this._disposed)this.id;else{var n,a=this._model,r=this._coordSysMgr.getCoordinateSystems();t=vr.parseFinder(a,t);for(var o=0;o<r.length;o++){var s=r[o];if(s[e]&&null!=(n=s[e](a,t,i)))return n}}}f._onframe=function(){if(!this._disposed){var e=this._scheduler;if(this.__optionUpdated){var t=this.__optionUpdated.silent;this[u]=!0,v(this),m.update.call(this),this[u]=!1,this.__optionUpdated=!1,b.call(this,t),w.call(this,t)}else if(e.unfinished){var i=1,n=this._model,a=this._api;e.unfinished=!1;do{var r=+new Date;e.performSeriesTasks(n),e.performDataProcessorTasks(n),x(this,n),e.performVisualTasks(n),T(this,this._model,a,"remain"),i-=+new Date-r}while(i>0&&e.unfinished);e.unfinished||this._zr.flush()}}},f.getDom=function(){return this._dom},f.getZr=function(){return this._zr},f.setOption=function(e,t,i){if(this._disposed)this.id;else{var n;if(o(t)&&(i=t.lazyUpdate,n=t.silent,t=t.notMerge),this[u]=!0,!this._model||t){var a=new pc(this._api),r=this._theme,s=this._model=new Qh;s.scheduler=this._scheduler,s.init(null,null,r,a)}this._model.setOption(e,R),i?(this.__optionUpdated={silent:n},this[u]=!1):(v(this),m.update.call(this),this._zr.flush(),this.__optionUpdated=!1,this[u]=!1,b.call(this,n),w.call(this,n))}},f.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},f.getModel=function(){return this._model},f.getOption=function(){return this._model&&this._model.getOption()},f.getWidth=function(){return this._zr.getWidth()},f.getHeight=function(){return this._zr.getHeight()},f.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},f.getRenderedCanvas=function(e){if(K.canvasSupported)return(e=e||{}).pixelRatio=e.pixelRatio||1,e.backgroundColor=e.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(e)},f.getSvgDataURL=function(){if(K.svgSupported){var e=this._zr,t=e.storage.getDisplayList();return _e.each(t,(function(e){e.stopAnimation(!0)})),e.painter.toDataURL()}},f.getDataURL=function(e){if(!this._disposed){var t=(e=e||{}).excludeComponents,i=this._model,n=[],r=this;a(t,(function(e){i.eachComponent({mainType:e},(function(e){var t=r._componentsMap[e.__viewId];t.group.ignore||(n.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(n,(function(e){e.group.ignore=!1})),o}this.id},f.getConnectedDataURL=function(e){if(this._disposed)this.id;else if(K.canvasSupported){var t="svg"===e.type,i=this.group,n=Math.min,r=Math.max;if(G[i]){var o=1/0,s=1/0,l=-1/0,u=-1/0,h=[],c=e&&e.pixelRatio||1;_e.each(V,(function(a,c){if(a.group===i){var d=t?a.getZr().painter.getSvgDom().innerHTML:a.getRenderedCanvas(_e.clone(e)),p=a.getDom().getBoundingClientRect();o=n(p.left,o),s=n(p.top,s),l=r(p.right,l),u=r(p.bottom,u),h.push({dom:d,left:p.left,top:p.top})}}));var d=(l*=c)-(o*=c),p=(u*=c)-(s*=c),f=_e.createCanvas(),g=ur.init(f,{renderer:t?"svg":"canvas"});if(g.resize({width:d,height:p}),t){var m="";return a(h,(function(e){var t=e.left-o,i=e.top-s;m+='<g transform="translate('+t+","+i+')">'+e.dom+"</g>"})),g.painter.getSvgRoot().innerHTML=m,e.connectedBackgroundColor&&g.painter.setBackgroundColor(e.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}return e.connectedBackgroundColor&&g.add(new iu.Rect({shape:{x:0,y:0,width:d,height:p},style:{fill:e.connectedBackgroundColor}})),a(h,(function(e){var t=new iu.Image({style:{x:e.left*c-o,y:e.top*c-s,image:e.dom}});g.add(t)})),g.refreshImmediately(),f.toDataURL("image/"+(e&&e.type||"png"))}return this.getDataURL(e)}},f.convertToPixel=_e.curry(g,"convertToPixel"),f.convertFromPixel=_e.curry(g,"convertFromPixel"),f.containPixel=function(e,t){if(!this._disposed){var i,n=this._model;return e=vr.parseFinder(n,e),_e.each(e,(function(e,n){n.indexOf("Models")>=0&&_e.each(e,(function(e){var a=e.coordinateSystem;if(a&&a.containPoint)i|=!!a.containPoint(t);else if("seriesModels"===n){var r=this._chartsMap[e.__viewId];r&&r.containPoint&&(i|=r.containPoint(t,e))}}),this)}),this),!!i}this.id},f.getVisual=function(e,t){var i=this._model,n=(e=vr.parseFinder(i,e,{defaultMainType:"series"})).seriesModel.getData(),a=e.hasOwnProperty("dataIndexInside")?e.dataIndexInside:e.hasOwnProperty("dataIndex")?n.indexOfRawIndex(e.dataIndex):null;return null!=a?n.getItemVisual(a,t):n.getVisual(t)},f.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},f.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]};var m={prepareAndUpdate:function(e){v(this),m.update.call(this,e)},update:function(e){var t=this._model,i=this._api,n=this._zr,a=this._coordSysMgr,r=this._scheduler;if(t){r.restoreData(t,e),r.performSeriesTasks(t),a.create(t,i),r.performDataProcessorTasks(t,e),x(this,t),a.update(t,i),M(t),r.performVisualTasks(t,e),I(this,t,i,e);var o=t.get("backgroundColor")||"transparent";if(K.canvasSupported)n.setBackgroundColor(o);else{var s=Xt.parse(o);o=Xt.stringify(s,"rgb"),0===s[3]&&(o="transparent")}A(t,i)}},updateTransform:function(e){var t=this._model,i=this,n=this._api;if(t){var a=[];t.eachComponent((function(r,o){var s=i.getViewOfComponentModel(o);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(o,t,n,e);l&&l.update&&a.push(s)}else a.push(s)}));var r=_e.createHashMap();t.eachSeries((function(a){var o=i._chartsMap[a.__viewId];if(o.updateTransform){var s=o.updateTransform(a,t,n,e);s&&s.update&&r.set(a.uid,1)}else r.set(a.uid,1)})),M(t),this._scheduler.performVisualTasks(t,e,{setDirty:!0,dirtyMap:r}),T(i,t,n,e,r),A(t,this._api)}},updateView:function(e){var t=this._model;t&&(Jd.markUpdateMethod(e,"updateView"),M(t),this._scheduler.performVisualTasks(t,e,{setDirty:!0}),I(this,this._model,this._api,e),A(t,this._api))},updateVisual:function(e){m.update.call(this,e)},updateLayout:function(e){m.update.call(this,e)}};function v(e){var t=e._model,i=e._scheduler;i.restorePipelines(t),i.prepareStageTasks(),S(e,"component",t,i),S(e,"chart",t,i),i.plan()}function y(e,t,i,n,r){var o=e._model;if(n){var s={};s[n+"Id"]=i[n+"Id"],s[n+"Index"]=i[n+"Index"],s[n+"Name"]=i[n+"Name"];var l={mainType:n,query:s};r&&(l.subType=r);var u=i.excludeSeriesId;null!=u&&(u=_e.createHashMap(vr.normalizeToArray(u))),o&&o.eachComponent(l,(function(t){u&&null!=u.get(t.id)||h(e["series"===n?"_chartsMap":"_componentsMap"][t.__viewId])}),e)}else a(e._componentsViews.concat(e._chartsViews),h);function h(n){n&&n.__alive&&n[t]&&n[t](n.__model,o,e._api,i)}}function x(e,t){var i=e._chartsMap,n=e._scheduler;t.eachSeries((function(e){n.updateStreamModes(e,i[e.__viewId])}))}function _(e,t){var i=e.type,n=e.escapeConnect,r=P[i],o=r.actionInfo,l=(o.update||"update").split(":"),h=l.pop();l=null!=l[0]&&s(l[0]),this[u]=!0;var c=[e],d=!1;e.batch&&(d=!0,c=_e.map(e.batch,(function(t){return(t=_e.defaults(_e.extend({},t),e)).batch=null,t})));var p,f=[],g="highlight"===i||"downplay"===i;a(c,(function(e){(p=(p=r.action(e,this._model,this._api))||_e.extend({},e)).type=o.event||p.type,f.push(p),g?y(this,h,e,"series"):l&&y(this,h,e,l.main,l.sub)}),this),"none"===h||g||l||(this.__optionUpdated?(v(this),m.update.call(this,e),this.__optionUpdated=!1):m[h].call(this,e)),p=d?{type:o.event||i,escapeConnect:n,batch:f}:f[0],this[u]=!1,!t&&this._messageCenter.trigger(p.type,p)}function b(e){for(var t=this._pendingActions;t.length;){var i=t.shift();_.call(this,i,e)}}function w(e){!e&&this.trigger("updated")}function S(e,t,i,n){for(var a="component"===t,r=a?e._componentsViews:e._chartsViews,o=a?e._componentsMap:e._chartsMap,l=e._zr,u=e._api,h=0;h<r.length;h++)r[h].__alive=!1;function c(e){var t="_ec_"+e.id+"_"+e.type,h=o[t];if(!h){var c=s(e.type);(h=new(a?Bd.getClass(c.main,c.sub):Jd.getClass(c.sub))).init(i,u),o[t]=h,r.push(h),l.add(h.group)}e.__viewId=h.__id=t,h.__alive=!0,h.__model=e,h.group.__ecComponentInfo={mainType:e.mainType,index:e.componentIndex},!a&&n.prepareView(h,e,i,u)}a?i.eachComponent((function(e,t){"series"!==e&&c(t)})):i.eachSeries(c);for(h=0;h<r.length;){var d=r[h];d.__alive?h++:(!a&&d.renderTask.dispose(),l.remove(d.group),d.dispose(i,u),r.splice(h,1),delete o[d.__id],d.__id=d.group.__ecComponentInfo=null)}}function M(e){e.clearColorPalette(),e.eachSeries((function(e){e.clearColorPalette()}))}function I(e,t,i,n){!function(e,t,i,n,r){a(r||e._componentsViews,(function(e){var a=e.__model;e.render(a,t,i,n),D(a,e)}))}(e,t,i,n),a(e._chartsViews,(function(e){e.__alive=!1})),T(e,t,i,n),a(e._chartsViews,(function(e){e.__alive||e.remove(t,i)}))}function T(e,t,i,n,a){var r,o=e._scheduler;t.eachSeries((function(t){var i=e._chartsMap[t.__viewId];i.__alive=!0;var s=i.renderTask;o.updatePayload(s,n),a&&a.get(t.uid)&&s.dirty(),r|=s.perform(o.getPerformArgs(s)),i.group.silent=!!t.get("silent"),D(t,i),function(e,t){var i=e.get("blendMode")||null;t.group.traverse((function(e){e.isGroup||e.style.blend!==i&&e.setStyle("blend",i),e.eachPendingDisplayable&&e.eachPendingDisplayable((function(e){e.setStyle("blend",i)}))}))}(t,i)})),o.unfinished|=r,function(e,t){var i=e._zr.storage,n=0;i.traverse((function(e){n++})),n>t.get("hoverLayerThreshold")&&!K.node&&t.eachSeries((function(t){if(!t.preventUsingHoverLayer){var i=e._chartsMap[t.__viewId];i.__alive&&i.group.traverse((function(e){e.useHoverLayer=!0}))}}))}(e,t),sp(e._zr.dom,t)}function A(e,t){a(N,(function(i){i(e,t)}))}f.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 i=t.resetOption("media"),n=e&&e.silent;this[u]=!0,i&&v(this),m.update.call(this),this[u]=!1,b.call(this,n),w.call(this,n)}}},f.showLoading=function(e,t){if(this._disposed)this.id;else if(o(e)&&(t=e,e=""),e=e||"default",this.hideLoading(),B[e]){var i=B[e](this._api,t),n=this._zr;this._loadingFX=i,n.add(i)}},f.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},f.makeActionFromEvent=function(e){var t=_e.extend({},e);return t.type=k[e.type],t},f.dispatchAction=function(e,t){this._disposed?this.id:(o(t)||(t={silent:!!t}),P[e.type]&&this._model&&(this[u]?this._pendingActions.push(e):(_.call(this,e,t.silent),t.flush?this._zr.flush(!0):!1!==t.flush&&K.browser.weChat&&this._throttledZrFlush(),b.call(this,t.silent),w.call(this,t.silent))))},f.appendData=function(e){if(this._disposed)this.id;else{var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0}},f.on=c("on",!1),f.off=c("off",!1),f.one=c("one",!1);var C=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function D(e,t){var i=e.get("z"),n=e.get("zlevel");t.group.traverse((function(e){"group"!==e.type&&(null!=i&&(e.z=i),null!=n&&(e.zlevel=n))}))}function L(){this.eventInfo}f._initEvents=function(){a(C,(function(e){var t=function(t){var i,n=this.getModel(),a=t.target;if("globalout"===e)i={};else if(a&&null!=a.dataIndex){var r=a.dataModel||n.getSeriesByIndex(a.seriesIndex);i=r&&r.getDataParams(a.dataIndex,a.dataType,a)||{}}else a&&a.eventData&&(i=_e.extend({},a.eventData));if(i){var o=i.componentType,s=i.componentIndex;"markLine"!==o&&"markPoint"!==o&&"markArea"!==o||(o="series",s=i.seriesIndex);var l=o&&null!=s&&n.getComponent(o,s),u=l&&this["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];i.event=t,i.type=e,this._ecEventProcessor.eventInfo={targetEl:a,packedEvent:i,model:l,view:u},this.trigger(e,i)}};t.zrEventfulCallAtLast=!0,this._zr.on(e,t,this)}),this),a(k,(function(e,t){this._messageCenter.on(t,(function(e){this.trigger(t,e)}),this)}),this)},f.isDisposed=function(){return this._disposed},f.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},f.dispose=function(){if(this._disposed)this.id;else{this._disposed=!0,vr.setAttribute(this.getDom(),W,"");var e=this._api,t=this._model;a(this._componentsViews,(function(i){i.dispose(t,e)})),a(this._chartsViews,(function(i){i.dispose(t,e)})),this._zr.dispose(),delete V[this.id]}},_e.mixin(p,Oe),L.prototype={constructor:L,normalizeQuery:function(e){var t={},i={},n={};if(_e.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};_e.each(e,(function(e,a){for(var s=!1,l=0;l<r.length;l++){var u=r[l],h=a.lastIndexOf(u);if(h>0&&h===a.length-u.length){var c=a.slice(0,h);"data"!==c&&(t.mainType=c,t[u.toLowerCase()]=e,s=!0)}}o.hasOwnProperty(a)&&(i[a]=e,s=!0),s||(n[a]=e)}))}return{cptQuery:t,dataQuery:i,otherQuery:n}},filter:function(e,t,i){var n=this.eventInfo;if(!n)return!0;var a=n.targetEl,r=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=t.cptQuery,u=t.dataQuery;return h(l,o,"mainType")&&h(l,o,"subType")&&h(l,o,"index","componentIndex")&&h(l,o,"name")&&h(l,o,"id")&&h(u,r,"name")&&h(u,r,"dataIndex")&&h(u,r,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,t.otherQuery,a,r));function h(e,t,i,n){return null==e[i]||t[n||i]===e[i]}},afterTrigger:function(){this.eventInfo=null}};var P={},k={},O=[],R=[],N=[],E=[],z={},B={},V={},G={},F=new Date-0,H=new Date-0,W="_echarts_instance_";function U(e){G[e]=!1}var Z=U;function j(e){return V[vr.getAttribute(e,W)]}function Y(e,t){z[e]=t}function X(e){R.push(e)}function q(e,t){Q(O,e,t,1e3)}function $(e,t,i){"function"==typeof t&&(i=t,t="");var a=o(e)?e.type:[e,e={event:t}][0];e.event=(e.event||a).toLowerCase(),t=e.event,n(h.test(a)&&h.test(t)),P[a]||(P[a]={action:i,actionInfo:e}),k[t]=a}function J(e,t){Q(E,e,t,3e3,"visual")}function Q(e,t,i,n,a){(r(t)||o(t))&&(i=t,t=n);var s=zp.wrapStageHandler(i,a);return s.__prio=t,s.__raw=i,e.push(s),s}function ee(e,t){B[e]=t}J(2e3,ap),X(kc),q(900,Ec),ee("default",up),$({type:"highlight",event:"highlight",update:"highlight"},_e.noop),$({type:"downplay",event:"downplay",update:"downplay"},_e.noop),Y("light",Vp),Y("dark",Hp);t.version="4.8.0",t.dependencies={zrender:"4.3.1"},t.PRIORITY=l,t.init=function(e,t,i){var n=j(e);if(n)return n;var r=new p(e,t,i);return r.id="ec_"+F++,V[r.id]=r,vr.setAttribute(e,W,r.id),function(e){var t="__connectUpdateStatus";function i(e,i){for(var n=0;n<e.length;n++){e[n][t]=i}}a(k,(function(n,r){e._messageCenter.on(r,(function(n){if(G[e.group]&&0!==e[t]){if(n&&n.escapeConnect)return;var r=e.makeActionFromEvent(n),o=[];a(V,(function(t){t!==e&&t.group===e.group&&o.push(t)})),i(o,0),a(o,(function(e){1!==e[t]&&e.dispatchAction(r)})),i(o,2)}}))}))}(r),r},t.connect=function(e){if(_e.isArray(e)){var t=e;e=null,a(t,(function(t){null!=t.group&&(e=t.group)})),e=e||"g_"+H++,a(t,(function(t){t.group=e}))}return G[e]=!0,e},t.disConnect=U,t.disconnect=Z,t.dispose=function(e){"string"==typeof e?e=V[e]:e instanceof p||(e=j(e)),e instanceof p&&!e.isDisposed()&&e.dispose()},t.getInstanceByDom=j,t.getInstanceById=function(e){return V[e]},t.registerTheme=Y,t.registerPreprocessor=X,t.registerProcessor=q,t.registerPostUpdate=function(e){N.push(e)},t.registerAction=$,t.registerCoordinateSystem=function(e,t){ac.register(e,t)},t.getCoordinateSystemDimensions=function(e){var t=ac.get(e);if(t)return t.getDimensionsInfo?t.getDimensionsInfo():t.dimensions.slice()},t.registerLayout=function(e,t){Q(E,e,t,1e3,"layout")},t.registerVisual=J,t.registerLoading=ee,t.extendComponentModel=function(e){return ju.extend(e)},t.extendComponentView=function(e){return Bd.extend(e)},t.extendSeriesModel=function(e){return Nd.extend(e)},t.extendChartView=function(e){return Jd.extend(e)},t.setCanvasCreator=function(e){_e.$override("createCanvas",e)},t.registerMap=function(e,t,i){wf.registerMap(e,t,i)},t.getMap=function(e){var t=wf.retrieveMap(e);return t&&t[0]&&{geoJson:t[0].geoJSON,specialAreas:t[0].specialAreas}},t.dataTool={},function(){for(var e in Jv)Jv.hasOwnProperty(e)&&(t[e]=Jv[e])}()})),ey=(Qv.version,Qv.dependencies,Qv.PRIORITY,Qv.init,Qv.connect,Qv.disConnect,Qv.disconnect,Qv.dispose,Qv.getInstanceByDom,Qv.getInstanceById,Qv.registerTheme,Qv.registerPreprocessor,Qv.registerProcessor,Qv.registerPostUpdate,Qv.registerAction,Qv.registerCoordinateSystem,Qv.getCoordinateSystemDimensions,Qv.registerLayout,Qv.registerVisual,Qv.registerLoading,Qv.extendComponentModel,Qv.extendComponentView,Qv.extendSeriesModel,Qv.extendChartView,Qv.setCanvasCreator,Qv.registerMap,Qv.getMap,Qv.dataTool,Nd.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(e,t){return Ng(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}}),nd.retrieveRawValue);var ty={getDefaultLabel:function(e,t){var i=e.mapDimension("defaultedLabel",!0),n=i.length;if(1===n)return ey(e,t,i[0]);if(n){for(var a=[],r=0;r<i.length;r++){var o=ey(e,t,i[r]);a.push(o)}return a.join(" ")}}},iy=ev.createSymbol,ny=bu.parsePercent,ay=ty.getDefaultLabel;function ry(e,t,i){iu.Group.call(this),this.updateData(e,t,i)}var oy=ry.prototype,sy=ry.getSymbolSize=function(e,t){var i=e.getItemVisual(t,"symbolSize");return i instanceof Array?i.slice():[+i,+i]};function ly(e){return[e[0]/2,e[1]/2]}function uy(e,t){this.parent.drift(e,t)}oy._createSymbol=function(e,t,i,n,a){this.removeAll();var r=t.getItemVisual(i,"color"),o=iy(e,-1,-1,2,2,r,a);o.attr({z2:100,culling:!0,scale:ly(n)}),o.drift=uy,this._symbolType=e,this.add(o)},oy.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(e)},oy.getSymbolPath=function(){return this.childAt(0)},oy.getScale=function(){return this.childAt(0).scale},oy.highlight=function(){this.childAt(0).trigger("emphasis")},oy.downplay=function(){this.childAt(0).trigger("normal")},oy.setZ=function(e,t){var i=this.childAt(0);i.zlevel=e,i.z=t},oy.setDraggable=function(e){var t=this.childAt(0);t.draggable=e,t.cursor=e?"move":t.cursor},oy.updateData=function(e,t,i){this.silent=!1;var n=e.getItemVisual(t,"symbol")||"circle",a=e.hostModel,r=sy(e,t),o=n!==this._symbolType;if(o){var s=e.getItemVisual(t,"symbolKeepAspect");this._createSymbol(n,e,t,r,s)}else{(l=this.childAt(0)).silent=!1,iu.updateProps(l,{scale:ly(r)},a,t)}if(this._updateCommon(e,t,r,i),o){var l=this.childAt(0),u=i&&i.fadeIn,h={scale:l.scale.slice()};u&&(h.style={opacity:l.style.opacity}),l.scale=[0,0],u&&(l.style.opacity=0),iu.initProps(l,h,a,t)}this._seriesModel=a};var hy=["itemStyle"],cy=["emphasis","itemStyle"],dy=["label"],py=["emphasis","label"];function fy(e,t){if(!this.incremental&&!this.useHoverLayer)if("emphasis"===t){var i=this.__symbolOriginalScale,n=i[1]/i[0],a={scale:[Math.max(1.1*i[0],i[0]+3),Math.max(1.1*i[1],i[1]+3*n)]};this.animateTo(a,400,"elasticOut")}else"normal"===t&&this.animateTo({scale:this.__symbolOriginalScale},400,"elasticOut")}oy._updateCommon=function(e,t,i,n){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=n&&n.itemStyle,l=n&&n.hoverItemStyle,u=n&&n.symbolOffset,h=n&&n.labelModel,c=n&&n.hoverLabelModel,d=n&&n.hoverAnimation,p=n&&n.cursorStyle;if(!n||e.hasItemOption){var f=n&&n.itemModel?n.itemModel:e.getItemModel(t);s=f.getModel(hy).getItemStyle(["color"]),l=f.getModel(cy).getItemStyle(),u=f.getShallow("symbolOffset"),h=f.getModel(dy),c=f.getModel(py),d=f.getShallow("hoverAnimation"),p=f.getShallow("cursor")}else l=_e.extend({},l);var g=a.style,m=e.getItemVisual(t,"symbolRotate");a.attr("rotation",(m||0)*Math.PI/180||0),u&&a.attr("position",[ny(u[0],i[0]),ny(u[1],i[1])]),p&&a.attr("cursor",p),a.setColor(o,n&&n.symbolInnerColor),a.setStyle(s);var v=e.getItemVisual(t,"opacity");null!=v&&(g.opacity=v);var y=e.getItemVisual(t,"liftZ"),x=a.__z2Origin;null!=y?null==x&&(a.__z2Origin=a.z2,a.z2+=y):null!=x&&(a.z2=x,a.__z2Origin=null);var _=n&&n.useNameLabel;iu.setLabelStyle(g,l,h,c,{labelFetcher:r,labelDataIndex:t,defaultText:function(t,i){return _?e.getName(t):ay(e,t)},isRectText:!0,autoColor:o}),a.__symbolOriginalScale=ly(i),a.hoverStyle=l,a.highDownOnUpdate=d&&r.isAnimationEnabled()?fy:null,iu.setHoverStyle(a)},oy.fadeOut=function(e,t){var i=this.childAt(0);this.silent=i.silent=!0,(!t||!t.keepLabel)&&(i.style.text=null),iu.updateProps(i,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,e)},_e.inherits(ry,iu.Group);var gy=ry,my=_e.isObject;function vy(e){this.group=new iu.Group,this._symbolCtor=e||gy}var yy=vy.prototype;function xy(e,t,i,n){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(n.isIgnore&&n.isIgnore(i))&&!(n.clipShape&&!n.clipShape.contain(t[0],t[1]))&&"none"!==e.getItemVisual(i,"symbol")}function _y(e){return null==e||my(e)||(e={isIgnore:e}),e||{}}function by(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")}}yy.updateData=function(e,t){t=_y(t);var i=this.group,n=e.hostModel,a=this._data,r=this._symbolCtor,o=by(e);a||i.removeAll(),e.diff(a).add((function(n){var a=e.getItemLayout(n);if(xy(e,a,n,t)){var s=new r(e,n,o);s.attr("position",a),e.setItemGraphicEl(n,s),i.add(s)}})).update((function(s,l){var u=a.getItemGraphicEl(l),h=e.getItemLayout(s);xy(e,h,s,t)?(u?(u.updateData(e,s,o),iu.updateProps(u,{position:h},n)):(u=new r(e,s)).attr("position",h),i.add(u),e.setItemGraphicEl(s,u)):i.remove(u)})).remove((function(e){var t=a.getItemGraphicEl(e);t&&t.fadeOut((function(){i.remove(t)}))})).execute(),this._data=e},yy.isPersistent=function(){return!0},yy.updateLayout=function(){var e=this._data;e&&e.eachItemGraphicEl((function(t,i){var n=e.getItemLayout(i);t.attr("position",n)}))},yy.incrementalPrepareUpdate=function(e){this._seriesScope=by(e),this._data=null,this.group.removeAll()},yy.incrementalUpdate=function(e,t,i){function n(e){e.isGroup||(e.incremental=e.useHoverLayer=!0)}i=_y(i);for(var a=e.start;a<e.end;a++){var r=t.getItemLayout(a);if(xy(t,r,a,i)){var o=new this._symbolCtor(t,a,this._seriesScope);o.traverse(n),o.attr("position",r),this.group.add(o),t.setItemGraphicEl(a,o)}}},yy.remove=function(e){var t=this.group,i=this._data;i&&e?i.eachItemGraphicEl((function(e){e.fadeOut((function(){t.remove(e)}))})):t.removeAll()};var wy=vy,Sy=Cg.isDimensionStacked,My=_e.map;var Iy={prepareDataCoordInfo:function(e,t,i){var n,a=e.getBaseAxis(),r=e.getOtherAxis(a),o=function(e,t){var i=0,n=e.scale.getExtent();"start"===t?i=n[0]:"end"===t?i=n[1]:n[0]>0?i=n[0]:n[1]<0&&(i=n[1]);return i}(r,i),s=a.dim,l=r.dim,u=t.mapDimension(l),h=t.mapDimension(s),c="x"===l||"radius"===l?1:0,d=My(e.dimensions,(function(e){return t.mapDimension(e)})),p=t.getCalculationInfo("stackResultDimension");return(n|=Sy(t,d[0]))&&(d[0]=p),(n|=Sy(t,d[1]))&&(d[1]=p),{dataDimsForPoint:d,valueStart:o,valueAxisDim:l,baseAxisDim:s,stacked:!!n,valueDim:u,baseDim:h,baseDataOffset:c,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}},getStackedOnPoint:function(e,t,i,n){var a=NaN;e.stacked&&(a=i.get(i.getCalculationInfo("stackedOverDimension"),n)),isNaN(a)&&(a=e.valueStart);var r=e.baseDataOffset,o=[];return o[r]=i.get(e.baseDim,n),o[1-r]=a,t.dataToPoint(o)}},Ty=Iy.prepareDataCoordInfo,Ay=Iy.getStackedOnPoint;var Cy=function(e,t,i,n,a,r,o,s){for(var l=function(e,t){var i=[];return t.diff(e).add((function(e){i.push({cmd:"+",idx:e})})).update((function(e,t){i.push({cmd:"=",idx:t,idx1:e})})).remove((function(e){i.push({cmd:"-",idx:e})})).execute(),i}(e,t),u=[],h=[],c=[],d=[],p=[],f=[],g=[],m=Ty(a,t,o),v=Ty(r,e,s),y=0;y<l.length;y++){var x=l[y],_=!0;switch(x.cmd){case"=":var b=e.getItemLayout(x.idx),w=t.getItemLayout(x.idx1);(isNaN(b[0])||isNaN(b[1]))&&(b=w.slice()),u.push(b),h.push(w),c.push(i[x.idx]),d.push(n[x.idx1]),g.push(t.getRawIndex(x.idx1));break;case"+":var S=x.idx;u.push(a.dataToPoint([t.get(m.dataDimsForPoint[0],S),t.get(m.dataDimsForPoint[1],S)])),h.push(t.getItemLayout(S).slice()),c.push(Ay(m,a,t,S)),d.push(n[S]),g.push(t.getRawIndex(S));break;case"-":S=x.idx;var M=e.getRawIndex(S);M!==S?(u.push(e.getItemLayout(S)),h.push(r.dataToPoint([e.get(v.dataDimsForPoint[0],S),e.get(v.dataDimsForPoint[1],S)])),c.push(i[S]),d.push(Ay(v,r,e,S)),g.push(M)):_=!1}_&&(p.push(x),f.push(f.length))}f.sort((function(e,t){return g[e]-g[t]}));var I=[],T=[],A=[],C=[],D=[];for(y=0;y<f.length;y++){S=f[y];I[y]=u[S],T[y]=h[S],A[y]=c[S],C[y]=d[S],D[y]=p[S]}return{current:I,next:T,stackedOnCurrent:A,stackedOnNext:C,status:D}},Dy=Te.min,Ly=Te.max,Py=Te.scaleAndAdd,ky=Te.copy,Oy=[],Ry=[],Ny=[];function Ey(e){return isNaN(e[0])||isNaN(e[1])}function zy(e,t,i,n,a,r,o,s,l,u,h){return"none"!==u&&u?By.apply(this,arguments):Vy.apply(this,arguments)}function By(e,t,i,n,a,r,o,s,l,u,h){for(var c=0,d=i,p=0;p<n;p++){var f=t[d];if(d>=a||d<0)break;if(Ey(f)){if(h){d+=r;continue}break}if(d===i)e[r>0?"moveTo":"lineTo"](f[0],f[1]);else if(l>0){var g=t[c],m="y"===u?1:0,v=(f[m]-g[m])*l;ky(Ry,g),Ry[m]=g[m]+v,ky(Ny,f),Ny[m]=f[m]-v,e.bezierCurveTo(Ry[0],Ry[1],Ny[0],Ny[1],f[0],f[1])}else e.lineTo(f[0],f[1]);c=d,d+=r}return p}function Vy(e,t,i,n,a,r,o,s,l,u,h){for(var c=0,d=i,p=0;p<n;p++){var f=t[d];if(d>=a||d<0)break;if(Ey(f)){if(h){d+=r;continue}break}if(d===i)e[r>0?"moveTo":"lineTo"](f[0],f[1]),ky(Ry,f);else if(l>0){var g=d+r,m=t[g];if(h)for(;m&&Ey(t[g]);)m=t[g+=r];var v=.5,y=t[c];if(!(m=t[g])||Ey(m))ky(Ny,f);else{var x,_;if(Ey(m)&&!h&&(m=f),Te.sub(Oy,m,y),"x"===u||"y"===u){var b="x"===u?0:1;x=Math.abs(f[b]-y[b]),_=Math.abs(f[b]-m[b])}else x=Te.dist(f,y),_=Te.dist(f,m);Py(Ny,f,Oy,-l*(1-(v=_/(_+x))))}Dy(Ry,Ry,s),Ly(Ry,Ry,o),Dy(Ny,Ny,s),Ly(Ny,Ny,o),e.bezierCurveTo(Ry[0],Ry[1],Ny[0],Ny[1],f[0],f[1]),Py(Ry,f,Oy,l*v)}else e.lineTo(f[0],f[1]);c=d,d+=r}return p}function Gy(e,t){var i=[1/0,1/0],n=[-1/0,-1/0];if(t)for(var a=0;a<e.length;a++){var r=e[a];r[0]<i[0]&&(i[0]=r[0]),r[1]<i[1]&&(i[1]=r[1]),r[0]>n[0]&&(n[0]=r[0]),r[1]>n[1]&&(n[1]=r[1])}return{min:t?i:n,max:t?n:i}}var Fy={Polyline:Vo.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:us(Vo.prototype.brush),buildPath:function(e,t){var i=t.points,n=0,a=i.length,r=Gy(i,t.smoothConstraint);if(t.connectNulls){for(;a>0&&Ey(i[a-1]);a--);for(;n<a&&Ey(i[n]);n++);}for(;n<a;)n+=zy(e,i,n,a,a,1,r.min,r.max,t.smooth,t.smoothMonotone,t.connectNulls)+1}}),Polygon:Vo.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:us(Vo.prototype.brush),buildPath:function(e,t){var i=t.points,n=t.stackedOnPoints,a=0,r=i.length,o=t.smoothMonotone,s=Gy(i,t.smoothConstraint),l=Gy(n,t.smoothConstraint);if(t.connectNulls){for(;r>0&&Ey(i[r-1]);r--);for(;a<r&&Ey(i[a]);a++);}for(;a<r;){var u=zy(e,i,a,r,r,1,s.min,s.max,t.smooth,o,t.connectNulls);zy(e,n,a+u-1,u,r,-1,l.min,l.max,t.stackedOnSmooth,o,t.connectNulls),a+=u+1,e.closePath()}}})},Hy=bu.round;function Wy(e,t,i){var n=e.getArea(),a=e.getBaseAxis().isHorizontal(),r=n.x,o=n.y,s=n.width,l=n.height,u=i.get("lineStyle.width")||2;r-=u/2,o-=u/2,s+=u,l+=u,r=Math.floor(r),s=Math.round(s);var h=new iu.Rect({shape:{x:r,y:o,width:s,height:l}});return t&&(h.shape[a?"width":"height"]=0,iu.initProps(h,{shape:{width:s,height:l}},i)),h}function Uy(e,t,i){var n=e.getArea(),a=new iu.Sector({shape:{cx:Hy(e.cx,1),cy:Hy(e.cy,1),r0:Hy(n.r0,1),r:Hy(n.r,1),startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});return t&&(a.shape.endAngle=n.startAngle,iu.initProps(a,{shape:{endAngle:n.endAngle}},i)),a}var Zy={createGridClipPath:Wy,createPolarClipPath:Uy,createClipPath:function(e,t,i){return e?"polar"===e.type?Uy(e,t,i):"cartesian2d"===e.type?Wy(e,t,i):null:null}},jy=Jr.fromPoints,Yy=Fy.Polyline,Xy=Fy.Polygon,qy=Iy.prepareDataCoordInfo,Ky=Iy.getStackedOnPoint,$y=Zy.createGridClipPath,Jy=Zy.createPolarClipPath;function Qy(e,t){if(e.length===t.length){for(var i=0;i<e.length;i++){var n=e[i],a=t[i];if(n[0]!==a[0]||n[1]!==a[1])return}return!0}}function ex(e,t){var i=[],n=[],a=[],r=[];return jy(e,i,n),jy(t,a,r),Math.max(Math.abs(i[0]-a[0]),Math.abs(i[1]-a[1]),Math.abs(n[0]-r[0]),Math.abs(n[1]-r[1]))}function tx(e){return"number"==typeof e?e:e?.5:0}function ix(e,t,i){for(var n=t.getBaseAxis(),a="x"===n.dim||"radius"===n.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(i){case"end":u[a]=s[a],u[1-a]=l[1-a],r.push(u);break;case"middle":var h=(l[a]+s[a])/2,c=[];u[a]=c[a]=h,u[1-a]=l[1-a],c[1-a]=s[1-a],r.push(u),r.push(c);break;default:u[a]=l[a],u[1-a]=s[1-a],r.push(u)}}return e[o]&&r.push(e[o]),r}function nx(e,t,i){var n=e.get("showAllSymbol"),a="auto"===n;if(!n||a){var r=i.getAxesByScale("ordinal")[0];if(r&&(!a||!function(e,t){var i=e.getExtent(),n=Math.abs(i[1]-i[0])/e.scale.count();isNaN(n)&&(n=0);for(var a=t.count(),r=Math.max(1,Math.round(a/5)),o=0;o<a;o+=r)if(1.5*gy.getSymbolSize(t,o)[e.isHorizontal()?1:0]>n)return!1;return!0}(r,t))){var o=t.mapDimension(r.dim),s={};return _e.each(r.getViewLabels(),(function(e){s[e.tickValue]=1})),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function ax(e,t,i){if("cartesian2d"===e.type){var n=e.getBaseAxis().isHorizontal(),a=$y(e,t,i);if(!i.get("clip",!0)){var r=a.shape,o=Math.max(r.width,r.height);n?(r.y-=o,r.height+=2*o):(r.x-=o,r.width+=2*o)}return a}return Jy(e,t,i)}Jd.extend({type:"line",init:function(){var e=new iu.Group,t=new wy;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e},render:function(e,t,i){var n=e.coordinateSystem,a=this.group,r=e.getData(),o=e.getModel("lineStyle"),s=e.getModel("areaStyle"),l=r.mapArray(r.getItemLayout),u="polar"===n.type,h=this._coordSys,c=this._symbolDraw,d=this._polyline,p=this._polygon,f=this._lineGroup,g=e.get("animation"),m=!s.isEmpty(),v=s.get("origin"),y=function(e,t,i){if(!i.valueDim)return[];for(var n=[],a=0,r=t.count();a<r;a++)n.push(Ky(i,e,t,a));return n}(n,r,qy(n,r,v)),x=e.get("showSymbol"),_=x&&!u&&nx(e,r,n),b=this._data;b&&b.eachItemGraphicEl((function(e,t){e.__temp&&(a.remove(e),b.setItemGraphicEl(t,null))})),x||c.remove(),a.add(f);var w,S=!u&&e.get("step");n&&n.getArea&&e.get("clip",!0)&&(null!=(w=n.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&&h.type===n.type&&S===this._step?(m&&!p?p=this._newPolygon(l,y,n,g):p&&!m&&(f.remove(p),p=this._polygon=null),f.setClipPath(ax(n,!1,e)),x&&c.updateData(r,{isIgnore:_,clipShape:w}),r.eachItemGraphicEl((function(e){e.stopAnimation(!0)})),Qy(this._stackedOnPoints,y)&&Qy(this._points,l)||(g?this._updateAnimation(r,y,n,i,S,v):(S&&(l=ix(l,n,S),y=ix(y,n,S)),d.setShape({points:l}),p&&p.setShape({points:l,stackedOnPoints:y})))):(x&&c.updateData(r,{isIgnore:_,clipShape:w}),S&&(l=ix(l,n,S),y=ix(y,n,S)),d=this._newPolyline(l,n,g),m&&(p=this._newPolygon(l,y,n,g)),f.setClipPath(ax(n,!0,e)));var M=function(e,t){var i=e.getVisual("visualMeta");if(i&&i.length&&e.count()&&"cartesian2d"===t.type){for(var n,a,r=i.length-1;r>=0;r--){var o=i[r].dimension,s=e.dimensions[o],l=e.getDimensionInfo(s);if("x"===(n=l&&l.coordDim)||"y"===n){a=i[r];break}}if(a){var u=t.getAxis(n),h=_e.map(a.stops,(function(e){return{coord:u.toGlobalCoord(u.dataToCoord(e.value)),color:e.color}})),c=h.length,d=a.outerColors.slice();c&&h[0].coord>h[c-1].coord&&(h.reverse(),d.reverse());var p=h[0].coord-10,f=h[c-1].coord+10,g=f-p;if(g<.001)return"transparent";_e.each(h,(function(e){e.offset=(e.coord-p)/g})),h.push({offset:c?h[c-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:c?h[0].offset:.5,color:d[0]||"transparent"});var m=new iu.LinearGradient(0,0,0,0,h,!0);return m[n]=p,m[n+"2"]=f,m}}}(r,n)||r.getVisual("color");d.useStyle(_e.defaults(o.getLineStyle(),{fill:"none",stroke:M,lineJoin:"bevel"}));var I=e.get("smooth");if(I=tx(e.get("smooth")),d.setShape({smooth:I,smoothMonotone:e.get("smoothMonotone"),connectNulls:e.get("connectNulls")}),p){var T=r.getCalculationInfo("stackedOnSeries"),A=0;p.useStyle(_e.defaults(s.getAreaStyle(),{fill:M,opacity:.7,lineJoin:"bevel"})),T&&(A=tx(T.get("smooth"))),p.setShape({smooth:I,stackedOnSmooth:A,smoothMonotone:e.get("smoothMonotone"),connectNulls:e.get("connectNulls")})}this._data=r,this._coordSys=n,this._stackedOnPoints=y,this._points=l,this._step=S,this._valueOrigin=v},dispose:function(){},highlight:function(e,t,i,n){var a=e.getData(),r=vr.queryDataIndex(a,n);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 gy(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 Jd.prototype.highlight.call(this,e,t,i,n)},downplay:function(e,t,i,n){var a=e.getData(),r=vr.queryDataIndex(a,n);if(null!=r&&r>=0){var o=a.getItemGraphicEl(r);o&&(o.__temp?(a.setItemGraphicEl(r,null),this.group.remove(o)):o.downplay())}else Jd.prototype.downplay.call(this,e,t,i,n)},_newPolyline:function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new Yy({shape:{points:e},silent:!0,z2:10}),this._lineGroup.add(t),this._polyline=t,t},_newPolygon:function(e,t){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new Xy({shape:{points:e,stackedOnPoints:t},silent:!0}),this._lineGroup.add(i),this._polygon=i,i},_updateAnimation:function(e,t,i,n,a,r){var o=this._polyline,s=this._polygon,l=e.hostModel,u=Cy(this._data,e,this._stackedOnPoints,t,this._coordSys,i,this._valueOrigin,r),h=u.current,c=u.stackedOnCurrent,d=u.next,p=u.stackedOnNext;if(a&&(h=ix(u.current,i,a),c=ix(u.stackedOnCurrent,i,a),d=ix(u.next,i,a),p=ix(u.stackedOnNext,i,a)),ex(h,d)>3e3||s&&ex(c,p)>3e3)return o.setShape({points:d}),void(s&&s.setShape({points:d,stackedOnPoints:p}));o.shape.__points=u.current,o.shape.points=h,iu.updateProps(o,{shape:{points:d}},l),s&&(s.setShape({points:h,stackedOnPoints:c}),iu.updateProps(s,{shape:{points:d,stackedOnPoints:p}},l));for(var f=[],g=u.status,m=0;m<g.length;m++){if("="===g[m].cmd){var v=e.getItemGraphicEl(g[m].idx1);v&&f.push({el:v,ptIdx:m})}}o.animators&&o.animators.length&&o.animators[0].during((function(){for(var e=0;e<f.length;e++){f[e].el.attr("position",o.shape.__points[f[e].ptIdx])}}))},remove:function(e){var t=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl((function(e,n){e.__temp&&(t.remove(e),i.setItemGraphicEl(n,null))})),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._data=null}});var rx=_e.isFunction;var ox=function(e,t,i){return{seriesType:e,performRawSeries:!0,reset:function(e,n,a){var r=e.getData(),o=e.get("symbol"),s=e.get("symbolSize"),l=e.get("symbolKeepAspect"),u=e.get("symbolRotate"),h=rx(o),c=rx(s),d=rx(u),p=h||c||d,f=!h&&o?o:t,g=c?null:s;if(r.setVisual({legendSymbol:i||f,symbol:f,symbolSize:g,symbolKeepAspect:l,symbolRotate:u}),!n.isSeriesFiltered(e))return{dataEach:r.hasItemOption||p?function(t,i){if(p){var n=e.getRawValue(i),a=e.getDataParams(i);h&&t.setItemVisual(i,"symbol",o(n,a)),c&&t.setItemVisual(i,"symbolSize",s(n,a)),d&&t.setItemVisual(i,"symbolRotate",u(n,a))}if(t.hasItemOption){var r=t.getItemModel(i),l=r.getShallow("symbol",!0),f=r.getShallow("symbolSize",!0),g=r.getShallow("symbolRotate",!0),m=r.getShallow("symbolKeepAspect",!0);null!=l&&t.setItemVisual(i,"symbol",l),null!=f&&t.setItemVisual(i,"symbolSize",f),null!=g&&t.setItemVisual(i,"symbolRotate",g),null!=m&&t.setItemVisual(i,"symbolKeepAspect",m)}}:null}}}},sx=_e.map,lx=Cg.isDimensionStacked;var ux=function(e){return{seriesType:e,plan:Gd(),reset:function(e){var t=e.getData(),i=e.coordinateSystem,n=e.pipelineContext.large;if(i){var a=sx(i.dimensions,(function(e){return t.mapDimension(e)})).slice(0,2),r=a.length,o=t.getCalculationInfo("stackResultDimension");return lx(t,a[0])&&(a[0]=o),lx(t,a[1])&&(a[1]=o),r&&{progress:function(e,t){for(var o=e.end-e.start,s=n&&new Float32Array(o*r),l=e.start,u=0,h=[],c=[];l<e.end;l++){var d;if(1===r){var p=t.get(a[0],l);d=!isNaN(p)&&i.dataToPoint(p,null,c)}else{p=h[0]=t.get(a[0],l);var f=h[1]=t.get(a[1],l);d=!isNaN(p)&&!isNaN(f)&&i.dataToPoint(h,null,c)}n?(s[u++]=d?d[0]:NaN,s[u++]=d?d[1]:NaN):t.setItemLayout(l,d&&d.slice()||[NaN,NaN])}n&&t.setLayout("symbolPoints",s)}}}}}},hx={average:function(e){for(var t=0,i=0,n=0;n<e.length;n++)isNaN(e[n])||(t+=e[n],i++);return 0===i?NaN:t/i},sum:function(e){for(var t=0,i=0;i<e.length;i++)t+=e[i]||0;return t},max:function(e){for(var t=-1/0,i=0;i<e.length;i++)e[i]>t&&(t=e[i]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,i=0;i<e.length;i++)e[i]<t&&(t=e[i]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},cx=function(e,t){return Math.round(e.length/2)};var dx=function(e){return{seriesType:e,modifyOutputEnd:!0,reset:function(e,t,i){var n=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(),h=u[1]-u[0],c=Math.round(n.count()/h);if(c>1)"string"==typeof a?o=hx[a]:"function"==typeof a&&(o=a),o&&e.setData(n.downSample(n.mapDimension(l.dim),1/c,o,cx))}}}};function px(e){return this._axes[e]}var fx=function(e){this._axes={},this._dimList=[],this.name=e||""};fx.prototype={constructor:fx,type:"cartesian",getAxis:function(e){return this._axes[e]},getAxes:function(){return _e.map(this._dimList,px,this)},getAxesByScale:function(e){return e=e.toLowerCase(),_e.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 i=this._dimList,n=e instanceof Array?[]:{},a=0;a<i.length;a++){var r=i[a],o=this._axes[r];n[r]=o[t](e[r])}return n}};var gx=fx;function mx(e){gx.call(this,e)}mx.prototype={constructor:mx,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"),i=this.getAxis("y");return t.contain(t.toLocalCoord(e[0]))&&i.contain(i.toLocalCoord(e[1]))},containData:function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},dataToPoint:function(e,t,i){var n=this.getAxis("x"),a=this.getAxis("y");return(i=i||[])[0]=n.toGlobalCoord(n.dataToCoord(e[0])),i[1]=a.toGlobalCoord(a.dataToCoord(e[1])),i},clampData:function(e,t){var i=this.getAxis("x").scale,n=this.getAxis("y").scale,a=i.getExtent(),r=n.getExtent(),o=i.parse(e[0]),s=n.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 i=this.getAxis("x"),n=this.getAxis("y");return(t=t||[])[0]=i.coordToData(i.toLocalCoord(e[0])),t[1]=n.coordToData(n.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(),i=Math.min(e[0],e[1]),n=Math.min(t[0],t[1]),a=Math.max(e[0],e[1])-i,r=Math.max(t[0],t[1])-n;return new Oi(i,n,a,r)}},_e.inherits(mx,gx);var vx=mx,yx=function(e,t,i,n,a){Nv.call(this,e,t,i),this.type=n||"value",this.position=a||"bottom"};yx.prototype={constructor:yx,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},_e.inherits(yx,Nv);var xx=yx,_x={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)"]}}},bx={};bx.categoryAxis=_e.merge({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},_x),bx.valueAxis=_e.merge({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},_x),bx.timeAxis=_e.defaults({scale:!0,min:"dataMin",max:"dataMax"},bx.valueAxis),bx.logAxis=_e.defaults({scale:!0,logBase:10},bx.valueAxis);var Sx=bx,Mx=Gu.getLayoutParams,Ix=Gu.mergeLayoutParam,Tx=["value","category","time","log"];var Ax=function(e,t,i,n){_e.each(Tx,(function(a){t.extend({type:e+"Axis."+a,mergeDefaultAndTheme:function(t,n){var r=this.layoutMode,o=r?Mx(t):{},s=n.getTheme();_e.merge(t,s.get(a+"Axis")),_e.merge(t,this.getDefaultOption()),t.type=i(e,t),r&&Ix(t,o,r)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=Zg.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:_e.mergeAll([{},Sx[a+"Axis"],n],!0)})})),ju.registerSubTypeDefaulter(e+"Axis",_e.curry(i,e))},Cx=ju.extend({type:"cartesian2dAxis",axis:null,init:function(){Cx.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){Cx.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){Cx.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function Dx(e,t){return t.type||(t.data?"category":"value")}_e.merge(Cx.prototype,Wm);var Lx={offset:0};Ax("x",Cx,Dx,Lx),Ax("y",Cx,Dx,Lx);ju.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 Px=_e.isObject,kx=_e.each,Ox=_e.map,Rx=_e.indexOf,Nx=Gu.getLayoutRect,Ex=Hm.createScaleByModel,zx=Hm.ifAxisCrossZero,Bx=Hm.niceScaleExtent,Vx=Hm.estimateLabelUnionRect,Gx=Cg.getStackedDimension;function Fx(e,t,i){return e.getCoordSysModel()===t}function Hx(e,t,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(e,t,i),this.model=e}var Wx=Hx.prototype;function Ux(e,t,i,n){i.getAxesOnZeroOf=function(){return a?[a]:[]};var a,r=e[t],o=i.model,s=o.get("axisLine.onZero"),l=o.get("axisLine.onZeroAxisIndex");if(s){if(null!=l)Zx(r[l])&&(a=r[l]);else for(var u in r)if(r.hasOwnProperty(u)&&Zx(r[u])&&!n[h(r[u])]){a=r[u];break}a&&(n[h(a)]=!0)}function h(e){return e.dim+"_"+e.index}}function Zx(e){return e&&"category"!==e.type&&"time"!==e.type&&zx(e)}Wx.type="grid",Wx.axisPointerEnabled=!0,Wx.getRect=function(){return this._rect},Wx.update=function(e,t){var i=this._axesMap;this._updateScale(e,this.model),kx(i.x,(function(e){Bx(e.scale,e.model)})),kx(i.y,(function(e){Bx(e.scale,e.model)}));var n={};kx(i.x,(function(e){Ux(i,"y",e,n)})),kx(i.y,(function(e){Ux(i,"x",e,n)})),this.resize(this.model,t)},Wx.resize=function(e,t,i){var n=Nx(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()});this._rect=n;var a=this._axesList;function r(){kx(a,(function(e){var t=e.isHorizontal(),i=t?[0,n.width]:[0,n.height],a=e.inverse?1:0;e.setExtent(i[a],i[1-a]),function(e,t){var i=e.getExtent(),n=i[0]+i[1];e.toGlobalCoord="x"===e.dim?function(e){return e+t}:function(e){return n-e+t},e.toLocalCoord="x"===e.dim?function(e){return e-t}:function(e){return n-e+t}}(e,t?n.x:n.y)}))}r(),!i&&e.get("containLabel")&&(kx(a,(function(e){if(!e.model.get("axisLabel.inside")){var t=Vx(e);if(t){var i=e.isHorizontal()?"height":"width",a=e.model.get("axisLabel.margin");n[i]-=t[i]+a,"top"===e.position?n.y+=t.height+a:"left"===e.position&&(n.x+=t.width+a)}}})),r())},Wx.getAxis=function(e,t){var i=this._axesMap[e];if(null!=i){if(null==t)for(var n in i)if(i.hasOwnProperty(n))return i[n];return i[t]}},Wx.getAxes=function(){return this._axesList.slice()},Wx.getCartesian=function(e,t){if(null!=e&&null!=t){var i="x"+e+"y"+t;return this._coordsMap[i]}Px(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var n=0,a=this._coordsList;n<a.length;n++)if(a[n].getAxis("x").index===e||a[n].getAxis("y").index===t)return a[n]},Wx.getCartesians=function(){return this._coordsList.slice()},Wx.convertToPixel=function(e,t,i){var n=this._findConvertTarget(e,t);return n.cartesian?n.cartesian.dataToPoint(i):n.axis?n.axis.toGlobalCoord(n.axis.dataToCoord(i)):null},Wx.convertFromPixel=function(e,t,i){var n=this._findConvertTarget(e,t);return n.cartesian?n.cartesian.pointToData(i):n.axis?n.axis.coordToData(n.axis.toLocalCoord(i)):null},Wx._findConvertTarget=function(e,t){var i,n,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)i=a.coordinateSystem,Rx(l,i)<0&&(i=null);else if(r&&o)i=this.getCartesian(r.componentIndex,o.componentIndex);else if(r)n=this.getAxis("x",r.componentIndex);else if(o)n=this.getAxis("y",o.componentIndex);else if(s){s.coordinateSystem===this&&(i=this._coordsList[0])}return{cartesian:i,axis:n}},Wx.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},Wx._initCartesian=function(e,t,i){var n={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(i,o){if(Fx(i,e)){var s=i.get("position");"x"===t?"top"!==s&&"bottom"!==s&&(s=n.bottom?"top":"bottom"):"left"!==s&&"right"!==s&&(s=n.left?"right":"left"),n[s]=!0;var l=new xx(t,Ex(i),[0,0],i.get("type"),s),u="category"===l.type;l.onBand=u&&i.get("boundaryGap"),l.inverse=i.get("inverse"),i.axis=l,l.model=i,l.grid=this,l.index=o,this._axesList.push(l),a[t][o]=l,r[t]++}}}this._axesMap=a,kx(a.x,(function(t,i){kx(a.y,(function(n,a){var r="x"+i+"y"+a,o=new vx(r);o.grid=this,o.model=e,this._coordsMap[r]=o,this._coordsList.push(o),o.addAxis(t),o.addAxis(n)}),this)}),this)},Wx._updateScale=function(e,t){function i(e,t,i){kx(e.mapDimension(t.dim,!0),(function(i){t.scale.unionExtentFromData(e,Gx(e,i))}))}kx(this._axesList,(function(e){e.scale.setExtent(1/0,-1/0)})),e.eachSeries((function(e){if(Xx(e)){var n=Yx(e),a=n[0],r=n[1];if(!Fx(a,t)||!Fx(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&&(i(s,l),i(s,u))}}),this)},Wx.getTooltipAxes=function(e){var t=[],i=[];return kx(this.getCartesians(),(function(n){var a=null!=e&&"auto"!==e?n.getAxis(e):n.getBaseAxis(),r=n.getOtherAxis(a);Rx(t,a)<0&&t.push(a),Rx(i,r)<0&&i.push(r)})),{baseAxes:t,otherAxes:i}};var jx=["xAxis","yAxis"];function Yx(e,t){return Ox(jx,(function(t){return e.getReferringComponents(t)[0]}))}function Xx(e){return"cartesian2d"===e.get("coordinateSystem")}Hx.create=function(e,t){var i=[];return e.eachComponent("grid",(function(n,a){var r=new Hx(n,e,t);r.name="grid_"+a,r.resize(n,t,!0),n.coordinateSystem=r,i.push(r)})),e.eachSeries((function(e){if(Xx(e)){var t=Yx(e),i=t[0],n=t[1],a=i.getCoordSysModel().coordinateSystem;e.coordinateSystem=a.getCartesian(i.componentIndex,n.componentIndex)}})),i},Hx.dimensions=Hx.prototype.dimensions=vx.prototype.dimensions,ac.register("cartesian2d",Hx);var qx=_e.retrieve,Kx=_e.defaults,$x=_e.extend,Jx=_e.each,Qx=bu.isRadianAroundZero,e_=bu.remRadian,t_=ev.createSymbol,i_=Te.applyTransform,n_=Hm.shouldShowAllLabels,a_=Math.PI,r_=function(e,t){this.opt=t,this.axisModel=e,Kx(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new iu.Group;var i=new iu.Group({position:t.position.slice(),rotation:t.rotation});i.updateTransform(),this._transform=i.transform,this._dumbGroup=i};r_.prototype={constructor:r_,hasBuilder:function(e){return!!o_[e]},add:function(e){o_[e].call(this)},getGroup:function(){return this.group}};var o_={axisLine:function(){var e=this.opt,t=this.axisModel;if(t.get("axisLine.show")){var i=this.axisModel.axis.getExtent(),n=this._transform,a=[i[0],0],r=[i[1],0];n&&(i_(a,a,n),i_(r,r,n));var o=$x({lineCap:"round"},t.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new iu.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 h=l[0],c=l[1];Jx([{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,i){if("none"!==s[i]&&null!=s[i]){var n=t_(s[i],-h/2,-c/2,h,c,o.stroke,!0),r=t.r+t.offset,l=[a[0]+r*Math.cos(e.rotation),a[1]-r*Math.sin(e.rotation)];n.attr({rotation:t.rotate,position:l,silent:!0,z2:11}),this.group.add(n)}}),this)}}},axisTickLabel:function(){var e=this.axisModel,t=this.opt,i=function(e,t,i){var n=t.axis,a=t.getModel("axisTick");if(!a.get("show")||n.scale.isBlank())return;for(var r=a.getModel("lineStyle"),o=i.tickDirection*a.get("length"),s=p_(n.getTicksCoords(),e._transform,o,Kx(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),n=function(e,t,i){var n=t.axis;if(!qx(i.axisLabelShow,t.get("axisLabel.show"))||n.scale.isBlank())return;var a=t.getModel("axisLabel"),r=a.get("margin"),o=n.getViewLabels(),s=(qx(i.labelRotate,a.get("rotate"))||0)*a_/180,l=l_(i.rotation,s,i.labelDirection),u=t.getCategories&&t.getCategories(!0),h=[],c=u_(t),d=t.get("triggerEvent");return Jx(o,(function(o,s){var p=o.tickValue,f=o.formattedLabel,g=o.rawLabel,m=a;u&&u[p]&&u[p].textStyle&&(m=new gu(u[p].textStyle,a,t.ecModel));var v=m.getTextColor()||t.get("axisLine.lineStyle.color"),y=[n.dataToCoord(p),i.labelOffset+i.labelDirection*r],x=new iu.Text({anid:"label_"+p,position:y,rotation:l.rotation,silent:c,z2:10});iu.setTextStyle(x.style,m,{text:f,textAlign:m.getShallow("align",!0)||l.textAlign,textVerticalAlign:m.getShallow("verticalAlign",!0)||m.getShallow("baseline",!0)||l.textVerticalAlign,textFill:"function"==typeof v?v("category"===n.type?g:"value"===n.type?p+"":p,s):v}),d&&(x.eventData=s_(t),x.eventData.targetType="axisLabel",x.eventData.value=g),e._dumbGroup.add(x),x.updateTransform(),h.push(x),e.group.add(x),x.decomposeTransform()})),h}(this,e,t);!function(e,t,i){if(n_(e.axis))return;var n=e.get("axisLabel.showMinLabel"),a=e.get("axisLabel.showMaxLabel");i=i||[];var r=(t=t||[])[0],o=t[1],s=t[t.length-1],l=t[t.length-2],u=i[0],h=i[1],c=i[i.length-1],d=i[i.length-2];!1===n?(h_(r),h_(u)):c_(r,o)&&(n?(h_(o),h_(h)):(h_(r),h_(u)));!1===a?(h_(s),h_(c)):c_(l,s)&&(a?(h_(l),h_(d)):(h_(s),h_(c)))}(e,n,i),function(e,t,i){var n=t.axis,a=t.getModel("minorTick");if(!a.get("show")||n.scale.isBlank())return;var r=n.getMinorTicksCoords();if(!r.length)return;for(var o=a.getModel("lineStyle"),s=i.tickDirection*a.get("length"),l=Kx(o.getLineStyle(),Kx(t.getModel("axisTick").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})),u=0;u<r.length;u++)for(var h=p_(r[u],e._transform,s,l,"minorticks_"+u),c=0;c<h.length;c++)e.group.add(h[c])}(this,e,t)},axisName:function(){var e=this.opt,t=this.axisModel,i=qx(e.axisName,t.get("name"));if(i){var n,a,r=t.get("nameLocation"),o=e.nameDirection,s=t.getModel("nameTextStyle"),l=t.get("nameGap")||0,u=this.axisModel.axis.getExtent(),h=u[0]>u[1]?-1:1,c=["start"===r?u[0]-h*l:"end"===r?u[1]+h*l:(u[0]+u[1])/2,d_(r)?e.labelOffset+o*l:0],d=t.get("nameRotate");null!=d&&(d=d*a_/180),d_(r)?n=l_(e.rotation,null!=d?d:e.rotation,o):(n=function(e,t,i,n){var a,r,o=e_(i-e.rotation),s=n[0]>n[1],l="start"===t&&!s||"start"!==t&&s;Qx(o-a_/2)?(r=l?"bottom":"top",a="center"):Qx(o-1.5*a_)?(r=l?"top":"bottom",a="center"):(r="middle",a=o<1.5*a_&&o>a_/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(n.rotation)),!isFinite(a)&&(a=null)));var p=s.getFont(),f=t.get("nameTruncate",!0)||{},g=f.ellipsis,m=qx(e.nameTruncateMaxWidth,f.maxWidth,a),v=null!=g&&null!=m?Du.truncateText(i,m,p,g,{minChar:2,placeholder:f.placeholder}):i,y=t.get("tooltip",!0),x=t.mainType,_={componentType:x,name:i,$vars:["name"]};_[x+"Index"]=t.componentIndex;var b=new iu.Text({anid:"name",__fullText:i,__truncatedText:v,position:c,rotation:n.rotation,silent:u_(t),z2:1,tooltip:y&&y.show?$x({content:i,formatter:function(){return i},formatterParams:_},y):null});iu.setTextStyle(b.style,s,{text:v,textFont:p,textFill:s.getTextColor()||t.get("axisLine.lineStyle.color"),textAlign:s.get("align")||n.textAlign,textVerticalAlign:s.get("verticalAlign")||n.textVerticalAlign}),t.get("triggerEvent")&&(b.eventData=s_(t),b.eventData.targetType="axisName",b.eventData.name=i),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},s_=r_.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},l_=r_.innerTextLayout=function(e,t,i){var n,a,r=e_(t-e);return Qx(r)?(a=i>0?"top":"bottom",n="center"):Qx(r-a_)?(a=i>0?"bottom":"top",n="center"):(a="middle",n=r>0&&r<a_?i>0?"right":"left":i>0?"left":"right"),{rotation:r,textAlign:n,textVerticalAlign:a}};var u_=r_.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)};function h_(e){e&&(e.ignore=!0)}function c_(e,t,i){var n=e&&e.getBoundingRect().clone(),a=t&&t.getBoundingRect().clone();if(n&&a){var r=dt.identity([]);return dt.rotate(r,r,-e.rotation),n.applyTransform(dt.mul([],r,e.getLocalTransform())),a.applyTransform(dt.mul([],r,t.getLocalTransform())),n.intersect(a)}}function d_(e){return"middle"===e||"center"===e}function p_(e,t,i,n,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]=i,t&&(i_(o,o,t),i_(s,s,t));var h=new iu.Line({anid:a+"_"+e[l].tickValue,subPixelOptimize:!0,shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:n,z2:2,silent:!0});r.push(h)}return r}var f_=r_,g_=_e.each,m_=_e.curry;function v_(e,t){return"all"===e||_e.isArray(e)&&_e.indexOf(e,t)>=0||e===t}function y_(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[__(e)]}function x_(e){return!!e.get("handle.show")}function __(e){return e.type+"||"+e.id}var b_={collect:function(e,t){var i={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(e,t,i){var n=t.getComponent("tooltip"),a=t.getComponent("axisPointer"),r=a.get("link",!0)||[],o=[];g_(i.getCoordinateSystems(),(function(i){if(i.axisPointerEnabled){var s=__(i.model),l=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=i;var u=i.model.getModel("tooltip",n);if(g_(i.getAxes(),m_(p,!1,null)),i.getTooltipAxes&&n&&u.get("show")){var h="axis"===u.get("trigger"),c="cross"===u.get("axisPointer.type"),d=i.getTooltipAxes(u.get("axisPointer.axis"));(h||c)&&g_(d.baseAxes,m_(p,!c||"cross",h)),c&&g_(d.otherAxes,m_(p,"cross",!1))}}function p(n,s,h){var c=h.model.getModel("axisPointer",a),d=c.get("show");if(d&&("auto"!==d||n||x_(c))){null==s&&(s=c.get("triggerTooltip"));var p=(c=n?function(e,t,i,n,a,r){var o=t.getModel("axisPointer"),s={};g_(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],(function(e){s[e]=_e.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 h=s.lineStyle=o.get("crossStyle");h&&_e.defaults(l,h.textStyle)}}return e.model.getModel("axisPointer",new gu(s,i,n))}(h,u,a,t,n,s):c).get("snap"),f=__(h.model),g=s||p||"category"===h.type,m=e.axesInfo[f]={key:f,axis:h,coordSys:i,axisPointerModel:c,triggerTooltip:s,involveSeries:g,snap:p,useHandle:x_(c),seriesModels:[]};l[f]=m,e.seriesInvolved|=g;var v=function(e,t){for(var i=t.model,n=t.dim,a=0;a<e.length;a++){var r=e[a]||{};if(v_(r[n+"AxisId"],i.id)||v_(r[n+"AxisIndex"],i.componentIndex)||v_(r[n+"AxisName"],i.name))return a}}(r,h);if(null!=v){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[f]=m,y.mapper=r[v].mapper,m.linkGroup=y}}}}))}(i,e,t),i.seriesInvolved&&function(e,t){t.eachSeries((function(t){var i=t.coordinateSystem,n=t.get("tooltip.trigger",!0),a=t.get("tooltip.show",!0);i&&"none"!==n&&!1!==n&&"item"!==n&&!1!==a&&!1!==t.get("axisPointer.show",!0)&&g_(e.coordSysAxesInfo[__(i.model)],(function(e){var n=e.axis;i.getAxis(n.dim)===n&&(e.seriesModels.push(t),null==e.seriesDataCount&&(e.seriesDataCount=0),e.seriesDataCount+=t.getData().count())}))}),this)}(i,e),i},fixValue:function(e){var t=y_(e);if(t){var i=t.axisPointerModel,n=t.axis.scale,a=i.option,r=i.get("status"),o=i.get("value");null!=o&&(o=n.parse(o));var s=x_(i);null==r&&(a.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==o||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),a.value=o,s&&(a.status=t.axis.scale.isBlank()?"hide":"show")}},getAxisInfo:y_,getAxisPointerModel:function(e){var t=y_(e);return t&&t.axisPointerModel},makeKey:__},w_=Qv.extendComponentView({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(e,t,i,n){this.axisPointerClass&&b_.fixValue(e),w_.superApply(this,"render",arguments),S_(this,e,t,i,n,!0)},updateAxisPointer:function(e,t,i,n,a){S_(this,e,t,i,n,!1)},remove:function(e,t){var i=this._axisPointer;i&&i.remove(t),w_.superApply(this,"remove",arguments)},dispose:function(e,t){M_(this,t),w_.superApply(this,"dispose",arguments)}});function S_(e,t,i,n,a,r){var o=w_.getAxisPointerClass(e.axisPointerClass);if(o){var s=b_.getAxisPointerModel(t);s?(e._axisPointer||(e._axisPointer=new o)).render(t,s,n,r):M_(e,n)}}function M_(e,t,i){var n=e._axisPointer;n&&n.dispose(t,i),e._axisPointer=null}var I_=[];w_.registerAxisPointerClass=function(e,t){I_[e]=t},w_.getAxisPointerClass=function(e){return e&&I_[e]};var T_=w_;var A_={layout:function(e,t,i){i=i||{};var n=e.coordinateSystem,a=t.axis,r={},o=a.getAxesOnZeroOf()[0],s=a.position,l=o?"onZero":s,u=a.dim,h=n.getRect(),c=[h.x,h.x+h.width,h.y,h.y+h.height],d={left:0,right:1,top:0,bottom:1,onZero:2},p=t.get("offset")||0,f="x"===u?[c[2]-p,c[3]+p]:[c[0]-p,c[1]+p];if(o){var g=o.toGlobalCoord(o.dataToCoord(0));f[d.onZero]=Math.max(Math.min(g,f[1]),f[0])}r.position=["y"===u?f[d[l]]:c[0],"x"===u?f[d[l]]:c[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?f[d[s]]-f[d.onZero]:0,t.get("axisTick.inside")&&(r.tickDirection=-r.tickDirection),_e.retrieve(i.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}};var C_={rectCoordAxisBuildSplitArea:function(e,t,i,n){var a=i.axis;if(!a.scale.isBlank()){var r=i.getModel("splitArea"),o=r.getModel("areaStyle"),s=o.get("color"),l=n.coordinateSystem.getRect(),u=a.getTicksCoords({tickModel:r,clamp:!0});if(u.length){var h=s.length,c=e.__splitAreaColors,d=_e.createHashMap(),p=0;if(c)for(var f=0;f<u.length;f++){var g=c.get(u[f].tickValue);if(null!=g){p=(g+(h-1)*f)%h;break}}var m=a.toGlobalCoord(u[0].coord),v=o.getAreaStyle();s=_e.isArray(s)?s:[s];for(f=1;f<u.length;f++){var y,x,_,b,w=a.toGlobalCoord(u[f].coord);a.isHorizontal()?(y=m,x=l.y,_=w-y,b=l.height,m=y+_):(y=l.x,x=m,_=l.width,m=x+(b=w-x));var S=u[f-1].tickValue;null!=S&&d.set(S,p),t.add(new iu.Rect({anid:null!=S?"area_"+S:null,shape:{x:y,y:x,width:_,height:b},style:_e.defaults({fill:s[p]},v),silent:!0})),p=(p+1)%h}e.__splitAreaColors=d}}},rectCoordAxisHandleRemove:function(e){e.__splitAreaColors=null}},D_=C_.rectCoordAxisBuildSplitArea,L_=C_.rectCoordAxisHandleRemove,P_=["axisLine","axisTickLabel","axisName"],k_=["splitArea","splitLine","minorSplitLine"],O_=T_.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(e,t,i,n){this.group.removeAll();var a=this._axisGroup;if(this._axisGroup=new iu.Group,this.group.add(this._axisGroup),e.get("show")){var r=e.getCoordSysModel(),o=A_.layout(r,e),s=new f_(e,o);_e.each(P_,s.add,s),this._axisGroup.add(s.getGroup()),_e.each(k_,(function(t){e.get(t+".show")&&this["_"+t](e,r)}),this),iu.groupTransition(a,this._axisGroup,e),O_.superCall(this,"render",e,t,i,n)}},remove:function(){L_(this)},_splitLine:function(e,t){var i=e.axis;if(!i.scale.isBlank()){var n=e.getModel("splitLine"),a=n.getModel("lineStyle"),r=a.get("color");r=_e.isArray(r)?r:[r];for(var o=t.coordinateSystem.getRect(),s=i.isHorizontal(),l=0,u=i.getTicksCoords({tickModel:n}),h=[],c=[],d=a.getLineStyle(),p=0;p<u.length;p++){var f=i.toGlobalCoord(u[p].coord);s?(h[0]=f,h[1]=o.y,c[0]=f,c[1]=o.y+o.height):(h[0]=o.x,h[1]=f,c[0]=o.x+o.width,c[1]=f);var g=l++%r.length,m=u[p].tickValue;this._axisGroup.add(new iu.Line({anid:null!=m?"line_"+u[p].tickValue:null,subPixelOptimize:!0,shape:{x1:h[0],y1:h[1],x2:c[0],y2:c[1]},style:_e.defaults({stroke:r[g]},d),silent:!0}))}}},_minorSplitLine:function(e,t){var i=e.axis,n=e.getModel("minorSplitLine").getModel("lineStyle"),a=t.coordinateSystem.getRect(),r=i.isHorizontal(),o=i.getMinorTicksCoords();if(o.length)for(var s=[],l=[],u=n.getLineStyle(),h=0;h<o.length;h++)for(var c=0;c<o[h].length;c++){var d=i.toGlobalCoord(o[h][c].coord);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 iu.Line({anid:"minor_line_"+o[h][c].tickValue,subPixelOptimize:!0,shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:u,silent:!0}))}},_splitArea:function(e,t){D_(this,this._axisGroup,e,t)}});O_.extend({type:"xAxis"}),O_.extend({type:"yAxis"}),Qv.extendComponentView({type:"grid",render:function(e,t){this.group.removeAll(),e.get("show")&&this.group.add(new iu.Rect({shape:e.coordinateSystem.getRect(),style:_e.defaults({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))}}),Qv.registerPreprocessor((function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})),Qv.registerVisual(ox("line","circle","line")),Qv.registerLayout(ux("line")),Qv.registerProcessor(Qv.PRIORITY.PROCESSOR.STATISTIC,dx("line"));var R_=Nd.extend({type:"series.__base_bar__",getInitialData:function(e,t){return Ng(this.getSource(),this,{useEncodeDefaulter:!0})},getMarkerPosition:function(e){var t=this.coordinateSystem;if(t){var i=t.dataToPoint(t.clampData(e)),n=this.getData(),a=n.getLayout("offset"),r=n.getLayout("size");return i[t.getBaseAxis().isHorizontal()?0:1]+=a+r/2,i}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:{}}}),N_=(R_.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}}}),ty.getDefaultLabel);function E_(e,t){"outside"===e.textPosition&&(e.textPosition=t)}var z_={setLabel:function(e,t,i,n,a,r,o){var s=i.getModel("label"),l=i.getModel("emphasis.label");iu.setLabelStyle(e,t,s,l,{labelFetcher:a,labelDataIndex:r,defaultText:N_(a.getData(),r),isRectText:!0,autoColor:n}),E_(e),E_(t)}},B_=Mr([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),V_={getBarItemStyle:function(e){var t=B_(this,e);if(this.getBorderLineDash){var i=this.getBorderLineDash();i&&(t.lineDash=i)}return t}},G_=(0,iu.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 i=t.cx,n=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,h=t.clockwise,c=Math.cos(l),d=Math.sin(l),p=Math.cos(u),f=Math.sin(u);(h?u-l<2*Math.PI:l-u<2*Math.PI)&&(e.moveTo(c*a+i,d*a+n),e.arc(c*s+i,d*s+n,o,-Math.PI+l,l,!h)),e.arc(i,n,r,l,u,!h),e.moveTo(p*r+i,f*r+n),e.arc(p*s+i,f*s+n,o,u-2*Math.PI,u-Math.PI,!h),0!==a&&(e.arc(i,n,a,u,l,h),e.moveTo(c*a+i,f*a+n)),e.closePath()}}),F_=z_.setLabel,H_=ip.throttle,W_=Zy.createClipPath,U_=["itemStyle","barBorderWidth"],Z_=[0,0];_e.extend(gu.prototype,V_);Qv.extendChartView({type:"bar",render:function(e,t,i){this._updateDrawMode(e);var n=e.get("coordinateSystem");return"cartesian2d"!==n&&"polar"!==n||(this._isLargeDraw?this._renderLarge(e,t,i):this._renderNormal(e,t,i)),this.group},incrementalPrepareRender:function(e,t,i){this._clear(),this._updateDrawMode(e)},incrementalRender:function(e,t,i,n){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,i){var n,a=this.group,r=e.getData(),o=this._data,s=e.coordinateSystem,l=s.getBaseAxis();"cartesian2d"===s.type?n=l.isHorizontal():"polar"===s.type&&(n="angle"===l.dim);var u=e.isAnimationEnabled()?e:null,h=e.get("clip",!0),c=function(e,t){var i=e.getArea&&e.getArea();if("cartesian2d"===e.type){var n=e.getBaseAxis();if("category"!==n.type||!n.onBand){var a=t.getLayout("bandWidth");n.isHorizontal()?(i.x-=a,i.width+=2*a):(i.y-=a,i.height+=2*a)}}return i}(s,r);a.removeClipPath();var d=e.get("roundCap",!0),p=e.get("showBackground",!0),f=e.getModel("backgroundStyle"),g=f.get("barBorderRadius")||0,m=[],v=this._backgroundEls||[];r.diff(o).add((function(t){var i=r.getItemModel(t),o=J_[s.type](r,t,i);if(p){var l=J_[s.type](r,t),v=function(e,t,i){return new("polar"===e.type?iu.Sector:iu.Rect)({shape:ab(t,i,e),silent:!0,z2:0})}(s,n,l);v.useStyle(f.getBarItemStyle()),"cartesian2d"===s.type&&v.setShape("r",g),m[t]=v}if(r.hasValue(t)){if(h)if(X_[s.type](c,o))return void a.remove(y);var y=q_[s.type](t,o,n,u,!1,d);r.setItemGraphicEl(t,y),a.add(y),eb(y,r,t,i,o,e,n,"polar"===s.type)}})).update((function(t,i){var l=r.getItemModel(t),y=J_[s.type](r,t,l);if(p){var x=v[i];x.useStyle(f.getBarItemStyle()),"cartesian2d"===s.type&&x.setShape("r",g),m[t]=x;var _=J_[s.type](r,t),b=ab(n,_,s);iu.updateProps(x,{shape:b},u,t)}var w=o.getItemGraphicEl(i);if(r.hasValue(t)){if(h)if(X_[s.type](c,y))return void a.remove(w);w?iu.updateProps(w,{shape:y},u,t):w=q_[s.type](t,y,n,u,!0,d),r.setItemGraphicEl(t,w),a.add(w),eb(w,r,t,l,y,e,n,"polar"===s.type)}else a.remove(w)})).remove((function(e){var t=o.getItemGraphicEl(e);"cartesian2d"===s.type?t&&K_(e,u,t):t&&$_(e,u,t)})).execute();var y=this._backgroundGroup||(this._backgroundGroup=new Ni);y.removeAll();for(var x=0;x<m.length;++x)y.add(m[x]);a.add(y),this._backgroundEls=m,this._data=r},_renderLarge:function(e,t,i){this._clear(),ib(e,this.group);var n=e.get("clip",!0)?W_(e.coordinateSystem,!1,e):null;n?this.group.setClipPath(n):this.group.removeClipPath()},_incrementalRenderLarge:function(e,t){this._removeBackground(),ib(t,this.group,!0)},dispose:_e.noop,remove:function(e){this._clear(e)},_clear:function(e){var t=this.group,i=this._data;e&&e.get("animation")&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl((function(t){"sector"===t.type?$_(t.dataIndex,e,t):K_(t.dataIndex,e,t)}))):t.removeAll(),this._data=null},_removeBackground:function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null}});var j_=Math.max,Y_=Math.min,X_={cartesian2d:function(e,t){var i=t.width<0?-1:1,n=t.height<0?-1:1;i<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height);var a=j_(t.x,e.x),r=Y_(t.x+t.width,e.x+e.width),o=j_(t.y,e.y),s=Y_(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 i<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height),l},polar:function(e){return!1}},q_={cartesian2d:function(e,t,i,n,a){var r=new iu.Rect({shape:_e.extend({},t),z2:1});if(r.name="item",n){var o=i?"height":"width",s={};r.shape[o]=0,s[o]=t[o],iu[a?"updateProps":"initProps"](r,{shape:s},n,e)}return r},polar:function(e,t,i,n,a,r){var o=t.startAngle<t.endAngle,s=new(!i&&r?G_:iu.Sector)({shape:_e.defaults({clockwise:o},t),z2:1});if(s.name="item",n){var l=i?"r":"endAngle",u={};s.shape[l]=i?0:t.startAngle,u[l]=t[l],iu[a?"updateProps":"initProps"](s,{shape:u},n,e)}return s}};function K_(e,t,i){i.style.text=null,iu.updateProps(i,{shape:{width:0}},t,e,(function(){i.parent&&i.parent.remove(i)}))}function $_(e,t,i){i.style.text=null,iu.updateProps(i,{shape:{r:i.shape.r0}},t,e,(function(){i.parent&&i.parent.remove(i)}))}var J_={cartesian2d:function(e,t,i){var n=e.getItemLayout(t),a=i?function(e,t){var i=e.get(U_)||0,n=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(i,n,a)}(i,n):0,r=n.width>0?1:-1,o=n.height>0?1:-1;return{x:n.x+r*a/2,y:n.y+o*a/2,width:n.width-r*a,height:n.height-o*a}},polar:function(e,t,i){var n=e.getItemLayout(t);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle}}};function Q_(e){return null!=e.startAngle&&null!=e.endAngle&&e.startAngle===e.endAngle}function eb(e,t,i,n,a,r,o,s){var l=t.getItemVisual(i,"color"),u=t.getItemVisual(i,"opacity"),h=t.getVisual("borderColor"),c=n.getModel("itemStyle"),d=n.getModel("emphasis.itemStyle").getBarItemStyle();s||e.setShape("r",c.get("barBorderRadius")||0),e.useStyle(_e.defaults({stroke:Q_(a)?"none":h,fill:Q_(a)?"none":l,opacity:u},c.getBarItemStyle()));var p=n.getShallow("cursor");p&&e.attr("cursor",p);var f=o?a.height>0?"bottom":"top":a.width>0?"left":"right";s||F_(e.style,d,n,l,r,i,f),Q_(a)&&(d.fill=d.stroke="none"),iu.setHoverStyle(e,d)}var tb=Vo.extend({type:"largeBar",shape:{points:[]},buildPath:function(e,t){for(var i=t.points,n=this.__startPoint,a=this.__baseDimIdx,r=0;r<i.length;r+=2)n[a]=i[r+a],e.moveTo(n[0],n[1]),e.lineTo(i[r],i[r+1])}});function ib(e,t,i){var n=e.getData(),a=[],r=n.getLayout("valueAxisHorizontal")?1:0;a[1-r]=n.getLayout("valueAxisStart");var o=n.getLayout("largeDataIndices"),s=n.getLayout("barWidth"),l=e.getModel("backgroundStyle");if(e.get("showBackground",!0)){var u=n.getLayout("largeBackgroundPoints"),h=[];h[1-r]=n.getLayout("backgroundStart");var c=new tb({shape:{points:u},incremental:!!i,__startPoint:h,__baseDimIdx:r,__largeDataIndices:o,__barWidth:s,silent:!0,z2:0});!function(e,t,i){var n=t.get("borderColor")||t.get("color"),a=t.getItemStyle(["color","borderColor"]);e.useStyle(a),e.style.fill=null,e.style.stroke=n,e.style.lineWidth=i.getLayout("barWidth")}(c,l,n),t.add(c)}var d=new tb({shape:{points:n.getLayout("largePoints")},incremental:!!i,__startPoint:a,__baseDimIdx:r,__largeDataIndices:o,__barWidth:s});t.add(d),function(e,t,i){var n=i.getVisual("borderColor")||i.getVisual("color"),a=t.getModel("itemStyle").getItemStyle(["color","borderColor"]);e.useStyle(a),e.style.fill=null,e.style.stroke=n,e.style.lineWidth=i.getLayout("barWidth")}(d,e,n),d.seriesIndex=e.seriesIndex,e.get("silent")||(d.on("mousedown",nb),d.on("mousemove",nb))}var nb=H_((function(e){var t=function(e,t,i){var n=e.__baseDimIdx,a=1-n,r=e.shape.points,o=e.__largeDataIndices,s=Math.abs(e.__barWidth/2),l=e.__startPoint[a];Z_[0]=t,Z_[1]=i;for(var u=Z_[n],h=Z_[1-n],c=u-s,d=u+s,p=0,f=r.length/2;p<f;p++){var g=2*p,m=r[g+n],v=r[g+a];if(m>=c&&m<=d&&(l<=v?h>=l&&h<=v:h>=v&&h<=l))return o[p]}return-1}(this,e.offsetX,e.offsetY);this.dataIndex=t>=0?t:null}),30,!1);function ab(e,t,i){var n,a="polar"===i.type;return n=a?i.getArea():i.grid.getRect(),a?{cx:n.cx,cy:n.cy,r0:e?n.r0:t.r0,r:e?n.r:t.r,startAngle:e?t.startAngle:0,endAngle:e?t.endAngle:2*Math.PI}:{x:e?t.x:n.x,y:e?n.y:t.y,width:e?t.width:n.width,height:e?n.height:t.height}}var rb=mm.layout,ob=mm.largeLayout;Qv.registerLayout(Qv.PRIORITY.VISUAL.LAYOUT,_e.curry(rb,"bar")),Qv.registerLayout(Qv.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,ob),Qv.registerVisual({seriesType:"bar",reset:function(e){e.getData().setVisual("legendSymbol","roundRect")}});var sb=_e.extend,lb=_e.isArray;var ub=function(e,t,i){t=lb(t)&&{coordDimensions:t}||sb({},t);var n=e.getSource(),a=yg(n,t),r=new ag(a,e);return r.initData(n,i),r},hb={updateSelectedMap:function(e){this._targetList=_e.isArray(e)?e.slice():[],this._selectTargetMap=_e.reduce(e||[],(function(e,t){return e.set(t.name,t),e}),_e.createHashMap())},select:function(e,t){var i=null!=t?this._targetList[t]:this._selectTargetMap.get(e);"single"===this.get("selectedMode")&&this._selectTargetMap.each((function(e){e.selected=!1})),i&&(i.selected=!0)},unSelect:function(e,t){var i=null!=t?this._targetList[t]:this._selectTargetMap.get(e);i&&(i.selected=!1)},toggleSelected:function(e,t){var i=null!=t?this._targetList[t]:this._selectTargetMap.get(e);if(null!=i)return this[i.selected?"unSelect":"select"](e,t),i.selected},isSelected:function(e,t){var i=null!=t?this._targetList[t]:this._selectTargetMap.get(e);return i&&i.selected}};var cb=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,i){return e().getItemVisual(t,i)}},db=bu.getPercentWithPrecision,pb=nd.retrieveRawAttr,fb=Rh.makeSeriesEncodeForNameBased,gb=Qv.extendSeriesModel({type:"series.pie",init:function(e){gb.superApply(this,"init",arguments),this.legendVisualProvider=new cb(_e.bind(this.getData,this),_e.bind(this.getRawData,this)),this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(e)},mergeOption:function(e){gb.superCall(this,"mergeOption",e),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(e,t){return ub(this,{coordDimensions:["value"],encodeDefaulter:_e.curry(fb,this)})},_createSelectableList:function(){for(var e=this.getRawData(),t=e.mapDimension("value"),i=[],n=0,a=e.count();n<a;n++)i.push({name:e.getName(n),value:e.get(t,n),selected:pb(e,n,"selected")});return i},getDataParams:function(e){var t=this.getData(),i=gb.superCall(this,"getDataParams",e),n=[];return t.each(t.mapDimension("value"),(function(e){n.push(e)})),i.percent=db(n,e,t.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},_defaultLabelLine:function(e){vr.defaultEmphasis(e,"labelLine",["show"]);var t=e.labelLine,i=e.emphasis.labelLine;t.show=t.show&&e.label.show,i.show=i.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 mb(e,t,i,n){var a=t.getData(),r=this.dataIndex,o=a.getName(r),s=t.get("selectedOffset");n.dispatchAction({type:"pieToggleSelect",from:e,name:o,seriesId:t.id}),a.each((function(e){vb(a.getItemGraphicEl(e),a.getItemLayout(e),t.isSelected(a.getName(e)),s,i)}))}function vb(e,t,i,n,a){var r=(t.startAngle+t.endAngle)/2,o=i?n:0,s=[Math.cos(r)*o,Math.sin(r)*o];a?e.animate().when(200,{position:s}).start("bounceOut"):e.attr("position",s)}function yb(e,t){iu.Group.call(this);var i=new iu.Sector({z2:2}),n=new iu.Polyline,a=new iu.Text;this.add(i),this.add(n),this.add(a),this.updateData(e,t,!0)}_e.mixin(gb,hb);var xb=yb.prototype;xb.updateData=function(e,t,i){var n=this.childAt(0),a=this.childAt(1),r=this.childAt(2),o=e.hostModel,s=e.getItemModel(t),l=e.getItemLayout(t),u=_e.extend({},l);u.label=null;var h=o.getShallow("animationTypeUpdate");i?(n.setShape(u),"scale"===o.getShallow("animationType")?(n.shape.r=l.r0,iu.initProps(n,{shape:{r:l.r}},o,t)):(n.shape.endAngle=l.startAngle,iu.updateProps(n,{shape:{endAngle:l.endAngle}},o,t))):"expansion"===h?n.setShape(u):iu.updateProps(n,{shape:u},o,t);var c=e.getItemVisual(t,"color");n.useStyle(_e.defaults({lineJoin:"bevel",fill:c},s.getModel("itemStyle").getItemStyle())),n.hoverStyle=s.getModel("emphasis.itemStyle").getItemStyle();var d=s.getShallow("cursor");d&&n.attr("cursor",d),vb(this,e.getItemLayout(t),o.isSelected(e.getName(t)),o.get("selectedOffset"),o.get("animation"));var p=!i&&"transition"===h;this._updateLabel(e,t,p),this.highDownOnUpdate=o.get("silent")?null:function(e,t){var i=o.isAnimationEnabled()&&s.get("hoverAnimation");"emphasis"===t?(a.ignore=a.hoverIgnore,r.ignore=r.hoverIgnore,i&&(n.stopAnimation(!0),n.animateTo({shape:{r:l.r+o.get("hoverOffset")}},300,"elasticOut"))):(a.ignore=a.normalIgnore,r.ignore=r.normalIgnore,i&&(n.stopAnimation(!0),n.animateTo({shape:{r:l.r}},300,"elasticOut")))},iu.setHoverStyle(this)},xb._updateLabel=function(e,t,i){var n=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=n.ignore=n.normalIgnore=n.hoverIgnore=!0;else{var u={points:s.linePoints||[[s.x,s.y],[s.x,s.y],[s.x,s.y]]},h={x:s.x,y:s.y};i?(iu.updateProps(n,{shape:u},r,t),iu.updateProps(a,{style:h},r,t)):(n.attr({shape:u}),a.attr({style:h})),a.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var c=o.getModel("label"),d=o.getModel("emphasis.label"),p=o.getModel("labelLine"),f=o.getModel("emphasis.labelLine");l=e.getItemVisual(t,"color");iu.setLabelStyle(a.style,a.hoverStyle={},c,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=!c.get("show"),a.hoverIgnore=!d.get("show"),n.ignore=n.normalIgnore=!p.get("show"),n.hoverIgnore=!f.get("show"),n.setStyle({stroke:l,opacity:e.getItemVisual(t,"opacity")}),n.setStyle(p.getModel("lineStyle").getLineStyle()),n.hoverStyle=f.getModel("lineStyle").getLineStyle();var g=p.get("smooth");g&&!0===g&&(g=.4),n.setShape({smooth:g})}},_e.inherits(yb,iu.Group);Jd.extend({type:"pie",init:function(){var e=new iu.Group;this._sectorGroup=e},render:function(e,t,i,n){if(!n||n.from!==this.uid){var a=e.getData(),r=this._data,o=this.group,s=t.get("animation"),l=!r,u=e.get("animationType"),h=e.get("animationTypeUpdate"),c=_e.curry(mb,this.uid,e,s,i),d=e.get("selectedMode");if(a.diff(r).add((function(e){var t=new yb(a,e);l&&"scale"!==u&&t.eachChild((function(e){e.stopAnimation(!0)})),d&&t.on("click",c),a.setItemGraphicEl(e,t),o.add(t)})).update((function(e,t){var i=r.getItemGraphicEl(t);l||"transition"===h||i.eachChild((function(e){e.stopAnimation(!0)})),i.updateData(a,e),i.off("click"),d&&i.on("click",c),o.add(i),a.setItemGraphicEl(e,i)})).remove((function(e){var t=r.getItemGraphicEl(e);o.remove(t)})).execute(),s&&a.count()>0&&(l?"scale"!==u:"transition"!==h)){for(var p=a.getItemLayout(0),f=1;isNaN(p.startAngle)&&f<a.count();++f)p=a.getItemLayout(f);var g=Math.max(i.getWidth(),i.getHeight())/2,m=_e.bind(o.removeClipPath,o);o.setClipPath(this._createClipPath(p.cx,p.cy,g,p.startAngle,p.clockwise,m,e,l))}else o.removeClipPath();this._data=a}},dispose:function(){},_createClipPath:function(e,t,i,n,a,r,o,s){var l=new iu.Sector({shape:{cx:e,cy:t,r0:0,r:i,startAngle:n,endAngle:n,clockwise:a}});return(s?iu.initProps:iu.updateProps)(l,{shape:{endAngle:n+(a?1:-1)*Math.PI*2}},o,r),l},containPoint:function(e,t){var i=t.getData().getItemLayout(0);if(i){var n=e[0]-i.cx,a=e[1]-i.cy,r=Math.sqrt(n*n+a*a);return r<=i.r&&r>=i.r0}}});var _b=function(e,t){_e.each(t,(function(t){t.update="updateView",Qv.registerAction(t,(function(i,n){var a={};return n.eachComponent({mainType:"series",subType:e,query:i},(function(e){e[t.method]&&e[t.method](i.name,i.dataIndex);var n=e.getData();n.each((function(t){var i=n.getName(t);a[i]=e.isSelected(i)||!1}))})),{name:i.name,selected:a,seriesId:i.seriesId}}))}))},bb=_e.createHashMap;var wb=function(e){return{getTargetSeries:function(t){var i={},n=bb();return t.eachSeriesByType(e,(function(e){e.__paletteScope=i,n.set(e.uid,e)})),n},reset:function(e,t){var i=e.getRawData(),n={},a=e.getData();a.each((function(e){var t=a.getRawIndex(e);n[t]=e})),i.each((function(t){var r,o=n[t],s=null!=o&&a.getItemVisual(o,"color",!0),l=null!=o&&a.getItemVisual(o,"borderColor",!0);if(s&&l||(r=i.getItemModel(t)),!s){var u=r.get("itemStyle.color")||e.getColorFromPalette(i.getName(t)||t+"",e.__paletteScope,i.count());null!=o&&a.setItemVisual(o,"color",u)}if(!l){var h=r.get("itemStyle.borderColor");null!=o&&a.setItemVisual(o,"borderColor",h)}}))}}},Sb=bu.parsePercent,Mb=Math.PI/180;function Ib(e,t,i,n,a,r,o,s,l,u){function h(t,i,n,a){for(var r=t;r<i&&!(e[r].y+n>l+o);r++)if(e[r].y+=n,r>t&&r+1<i&&e[r+1].y>e[r].y+e[r].height)return void c(r,n/2);c(i-1,n/2)}function c(t,i){for(var n=t;n>=0&&!(e[n].y-i<l)&&(e[n].y-=i,!(n>0&&e[n].y>e[n-1].y+e[n-1].height));n--);}function d(e,t,i,n,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-n),h=e[s].len,c=e[s].len2,d=u<a+h?Math.sqrt((a+h+c)*(a+h+c)-u*u):Math.abs(e[s].x-i);t&&d>=o&&(d=o-10),!t&&d<=o&&(d=o+10),e[s].x=i+d*r,o=d}}e.sort((function(e,t){return e.y-t.y}));for(var p,f=0,g=e.length,m=[],v=[],y=0;y<g;y++){if("outer"===e[y].position&&"labelLine"===e[y].labelAlignTo){var x=e[y].x-u;e[y].linePoints[1][0]+=x,e[y].x=u}(p=e[y].y-f)<0&&h(y,g,-p),f=e[y].y+e[y].height}o-f<0&&c(g-1,f-o);for(y=0;y<g;y++)e[y].y>=i?v.push(e[y]):m.push(e[y]);d(m,!1,t,i,n,a),d(v,!0,t,i,n,a)}function Tb(e){return"center"===e.position}var Ab=function(e,t,i,n,a,r){var o,s,l=e.getData(),u=[],h=!1,c=(e.get("minShowLabelAngle")||0)*Mb;l.each((function(n){var r=l.getItemLayout(n),d=l.getItemModel(n),p=d.getModel("label"),f=p.get("position")||d.get("emphasis.label.position"),g=p.get("distanceToLabelLine"),m=p.get("alignTo"),v=Sb(p.get("margin"),i),y=p.get("bleedMargin"),x=p.getFont(),_=d.getModel("labelLine"),b=_.get("length");b=Sb(b,i);var w=_.get("length2");if(w=Sb(w,i),!(r.angle<c)){var S,M,I,T,A=(r.startAngle+r.endAngle)/2,C=Math.cos(A),D=Math.sin(A);o=r.cx,s=r.cy;var L,P=e.getFormattedLabel(n,"normal")||l.getName(n),k=Bn.getBoundingRect(P,x,T,"top"),O="inside"===f||"inner"===f;if("center"===f)S=r.cx,M=r.cy,T="center";else{var R=(O?(r.r+r.r0)/2*C:r.r*C)+o,N=(O?(r.r+r.r0)/2*D:r.r*D)+s;if(S=R+3*C,M=N+3*D,!O){var E=R+C*(b+t-r.r),z=N+D*(b+t-r.r),B=E+(C<0?-1:1)*w;S="edge"===m?C<0?a+v:a+i-v:B+(C<0?-g:g),M=z,I=[[R,N],[E,z],[B,z]]}T=O?"center":"edge"===m?C>0?"right":"left":C>0?"left":"right"}var V=p.get("rotate");L="number"==typeof V?V*(Math.PI/180):V?C<0?-A+Math.PI:-A:0,h=!!L,r.label={x:S,y:M,position:f,height:k.height,len:b,len2:w,linePoints:I,textAlign:T,verticalAlign:"middle",rotation:L,inside:O,labelDistance:g,labelAlignTo:m,labelMargin:v,bleedMargin:y,textRect:k,text:P,font:x},O||u.push(r.label)}})),!h&&e.get("avoidLabelOverlap")&&function(e,t,i,n,a,r,o,s){for(var l=[],u=[],h=Number.MAX_VALUE,c=-Number.MAX_VALUE,d=0;d<e.length;d++)Tb(e[d])||(e[d].x<t?(h=Math.min(h,e[d].x),l.push(e[d])):(c=Math.max(c,e[d].x),u.push(e[d])));for(Ib(u,t,i,n,1,0,r,0,s,c),Ib(l,t,i,n,-1,0,r,0,s,h),d=0;d<e.length;d++){var p=e[d];if(!Tb(p)){var f=p.linePoints;if(f){var g,m="edge"===p.labelAlignTo,v=p.textRect.width;(g=m?p.x<t?f[2][0]-p.labelDistance-o-p.labelMargin:o+a-p.labelMargin-f[2][0]-p.labelDistance:p.x<t?p.x-o-p.bleedMargin:o+a-p.x-p.bleedMargin)<p.textRect.width&&(p.text=Bn.truncateText(p.text,g,p.font),"edge"===p.labelAlignTo&&(v=Bn.getWidth(p.text,p.font)));var y=f[1][0]-f[2][0];m?p.x<t?f[2][0]=o+p.labelMargin+v+p.labelDistance:f[2][0]=o+a-p.labelMargin-v-p.labelDistance:(p.x<t?f[2][0]=p.x+p.labelDistance:f[2][0]=p.x-p.labelDistance,f[1][0]=f[2][0]+y),f[1][1]=f[2][1]=p.y}}}}(u,o,s,t,i,n,a,r)},Cb=bu.parsePercent,Db=bu.linearMap,Lb=2*Math.PI,Pb=Math.PI/180;var kb=function(e,t,i,n){t.eachSeriesByType(e,(function(e){var t=e.getData(),n=t.mapDimension("value"),a=function(e,t){return Gu.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,i),r=e.get("center"),o=e.get("radius");_e.isArray(o)||(o=[0,o]),_e.isArray(r)||(r=[r,r]);var s=Cb(a.width,i.getWidth()),l=Cb(a.height,i.getHeight()),u=Math.min(s,l),h=Cb(r[0],s)+a.x,c=Cb(r[1],l)+a.y,d=Cb(o[0],u/2),p=Cb(o[1],u/2),f=-e.get("startAngle")*Pb,g=e.get("minAngle")*Pb,m=0;t.each(n,(function(e){!isNaN(e)&&m++}));var v=t.getSum(n),y=Math.PI/(v||m)*2,x=e.get("clockwise"),_=e.get("roseType"),b=e.get("stillShowZeroSum"),w=t.getDataExtent(n);w[0]=0;var S=Lb,M=0,I=f,T=x?1:-1;if(t.each(n,(function(e,i){var n;if(isNaN(e))t.setItemLayout(i,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:x,cx:h,cy:c,r0:d,r:_?NaN:p,viewRect:a});else{(n="area"!==_?0===v&&b?y:e*y:Lb/m)<g?(n=g,S-=g):M+=e;var r=I+T*n;t.setItemLayout(i,{angle:n,startAngle:I,endAngle:r,clockwise:x,cx:h,cy:c,r0:d,r:_?Db(e,w,[d,p]):p,viewRect:a}),I=r}})),S<Lb&&m)if(S<=.001){var A=Lb/m;t.each(n,(function(e,i){if(!isNaN(e)){var n=t.getItemLayout(i);n.angle=A,n.startAngle=f+T*i*A,n.endAngle=f+T*(i+1)*A}}))}else y=S/M,I=f,t.each(n,(function(e,i){if(!isNaN(e)){var n=t.getItemLayout(i),a=n.angle===g?g:e*y;n.startAngle=I,n.endAngle=I+T*a,I+=T*a}}));Ab(e,p,a.width,a.height,a.x,a.y)}))};var Ob=function(e){return{seriesType:e,reset:function(e,t){var i=t.findComponents({mainType:"legend"});if(i&&i.length){var n=e.getData();n.filterSelf((function(e){for(var t=n.getName(e),a=0;a<i.length;a++)if(!i[a].isSelected(t))return!1;return!0}))}}}};_b("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),Qv.registerVisual(wb("pie")),Qv.registerLayout(_e.curry(kb,"pie")),Qv.registerProcessor(Ob("pie"));Nd.extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(e,t){return Ng(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 Rb=ev.createSymbol,Nb=iu.extendShape({shape:{points:null},symbolProxy:null,softClipShape:null,buildPath:function(e,t){var i=t.points,n=t.size,a=this.symbolProxy,r=a.shape;if(!((e.getContext?e.getContext():e)&&n[0]<4))for(var o=0;o<i.length;){var s=i[o++],l=i[o++];isNaN(s)||isNaN(l)||(this.softClipShape&&!this.softClipShape.contain(s,l)||(r.x=s-n[0]/2,r.y=l-n[1]/2,r.width=n[0],r.height=n[1],a.buildPath(e,r,!0)))}},afterBrush:function(e){var t=this.shape,i=t.points,n=t.size;if(n[0]<4){this.setTransform(e);for(var a=0;a<i.length;){var r=i[a++],o=i[a++];isNaN(r)||isNaN(o)||(this.softClipShape&&!this.softClipShape.contain(r,o)||e.fillRect(r-n[0]/2,o-n[1]/2,n[0],n[1]))}this.restoreTransform(e)}},findDataIndex:function(e,t){for(var i=this.shape,n=i.points,a=i.size,r=Math.max(a[0],4),o=Math.max(a[1],4),s=n.length/2-1;s>=0;s--){var l=2*s,u=n[l]-r/2,h=n[l+1]-o/2;if(e>=u&&t>=h&&e<=u+r&&t<=h+o)return s}return-1}});function Eb(){this.group=new iu.Group}var zb=Eb.prototype;zb.isPersistent=function(){return!this._incremental},zb.updateData=function(e,t){this.group.removeAll();var i=new Nb({rectHover:!0,cursor:"default"});i.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(i,e,!1,t),this.group.add(i),this._incremental=null},zb.updateLayout=function(e){if(!this._incremental){var t=e.getLayout("symbolPoints");this.group.eachChild((function(e){if(null!=e.startIndex){var i=2*(e.endIndex-e.startIndex),n=4*e.startIndex*2;t=new Float32Array(t.buffer,n,i)}e.setShape("points",t)}))}},zb.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clearIncremental(),e.count()>2e6?(this._incremental||(this._incremental=new tl({silent:!0})),this.group.add(this._incremental)):this._incremental=null},zb.incrementalUpdate=function(e,t,i){var n;this._incremental?(n=new Nb,this._incremental.addDisplayable(n,!0)):((n=new Nb({rectHover:!0,cursor:"default",startIndex:e.start,endIndex:e.end})).incremental=!0,this.group.add(n)),n.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(n,t,!!this._incremental,i)},zb._setCommon=function(e,t,i,n){var a=t.hostModel;n=n||{};var r=t.getVisual("symbolSize");e.setShape("size",r instanceof Array?r:[r,r]),e.softClipShape=n.clipShape||null,e.symbolProxy=Rb(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),i||(e.seriesIndex=a.seriesIndex,e.on("mousemove",(function(t){e.dataIndex=null;var i=e.findDataIndex(t.offsetX,t.offsetY);i>=0&&(e.dataIndex=i+(e.startIndex||0))})))},zb.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},zb._clearIncremental=function(){var e=this._incremental;e&&e.clearDisplaybles()};var Bb=Eb;function Vb(e,t,i){Nv.call(this,e,t,i),this.type="value",this.angle=0,this.name="",this.model}Qv.extendChartView({type:"scatter",render:function(e,t,i){var n=e.getData();this._updateSymbolDraw(n,e).updateData(n,{clipShape:this._getClipShape(e)}),this._finished=!0},incrementalPrepareRender:function(e,t,i){var n=e.getData();this._updateSymbolDraw(n,e).incrementalPrepareUpdate(n),this._finished=!1},incrementalRender:function(e,t,i){this._symbolDraw.incrementalUpdate(e,t.getData(),{clipShape:this._getClipShape(t)}),this._finished=e.end===t.getData().count()},updateTransform:function(e,t,i){var n=e.getData();if(this.group.dirty(),!this._finished||n.count()>1e4||!this._symbolDraw.isPersistent())return{update:!0};var a=ux().reset(e);a.progress&&a.progress({start:0,end:n.count()},n),this._symbolDraw.updateLayout(n)},_getClipShape:function(e){var t=e.coordinateSystem,i=t&&t.getArea&&t.getArea();return e.get("clip",!0)?i:null},_updateSymbolDraw:function(e,t){var i=this._symbolDraw,n=t.pipelineContext.large;return i&&n===this._isLargeDraw||(i&&i.remove(),i=this._symbolDraw=n?new Bb:new wy,this._isLargeDraw=n,this.group.removeAll()),this.group.add(i.group),i},remove:function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}}),Qv.registerVisual(ox("scatter","circle")),Qv.registerLayout(ux("scatter")),_e.inherits(Vb,Nv);var Gb=Vb,Fb=Hm.getScaleExtent,Hb=Hm.niceScaleExtent;function Wb(e,t,i){this._model=e,this.dimensions=[],this._indicatorAxes=_e.map(e.getIndicatorModels(),(function(e,t){var i="indicator_"+t,n=new Gb(i,"log"===e.get("axisType")?new Om:new im);return n.name=e.get("name"),n.model=e,e.axis=n,this.dimensions.push(i),n}),this),this.resize(e,i),this.cx,this.cy,this.r,this.r0,this.startAngle}Wb.prototype.getIndicatorAxes=function(){return this._indicatorAxes},Wb.prototype.dataToPoint=function(e,t){var i=this._indicatorAxes[t];return this.coordToPoint(i.dataToCoord(e),t)},Wb.prototype.coordToPoint=function(e,t){var i=this._indicatorAxes[t].angle;return[this.cx+e*Math.cos(i),this.cy-e*Math.sin(i)]},Wb.prototype.pointToData=function(e){var t=e[0]-this.cx,i=e[1]-this.cy,n=Math.sqrt(t*t+i*i);t/=n,i/=n;for(var a,r=Math.atan2(-i,t),o=1/0,s=-1,l=0;l<this._indicatorAxes.length;l++){var u=this._indicatorAxes[l],h=Math.abs(r-u.angle);h<o&&(a=u,s=l,o=h)}return[s,+(a&&a.coordToData(n))]},Wb.prototype.resize=function(e,t){var i=e.get("center"),n=t.getWidth(),a=t.getHeight(),r=Math.min(n,a)/2;this.cx=bu.parsePercent(i[0],n),this.cy=bu.parsePercent(i[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=bu.parsePercent(o[0],r),this.r=bu.parsePercent(o[1],r),_e.each(this._indicatorAxes,(function(e,t){e.setExtent(this.r0,this.r);var i=this.startAngle+t*Math.PI*2/this._indicatorAxes.length;i=Math.atan2(Math.sin(i),Math.cos(i)),e.angle=i}),this)},Wb.prototype.update=function(e,t){var i=this._indicatorAxes,n=this._model;_e.each(i,(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"))===n){var r=t.getData();_e.each(i,(function(e){e.scale.unionExtentFromData(r,r.mapDimension(e.dim))}))}}),this);var a=n.get("splitNumber");function r(e){var t=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),i=e/t;return 2===i?i=5:i*=2,i*t}_e.each(i,(function(e,t){var i=Fb(e.scale,e.model).extent;Hb(e.scale,e.model);var n=e.model,o=e.scale,s=n.getMin(),l=n.getMax(),u=o.getInterval();if(null!=s&&null!=l)o.setExtent(+s,+l),o.setInterval((l-s)/a);else if(null!=s){do{h=s+u*a,o.setExtent(+s,h),o.setInterval(u),u=r(u)}while(h<i[1]&&isFinite(h)&&isFinite(i[1]))}else if(null!=l){do{c=l-u*a,o.setExtent(c,+l),o.setInterval(u),u=r(u)}while(c>i[0]&&isFinite(c)&&isFinite(i[0]))}else{o.getTicks().length-1>a&&(u=r(u));var h=Math.ceil(i[1]/u)*u,c=bu.round(h-u*a);o.setExtent(c,h),o.setInterval(u)}}))},Wb.dimensions=[],Wb.create=function(e,t){var i=[];return e.eachComponent("radar",(function(n){var a=new Wb(n,e,t);i.push(a),n.coordinateSystem=a})),e.eachSeriesByType("radar",(function(e){"radar"===e.get("coordinateSystem")&&(e.coordinateSystem=i[e.get("radarIndex")||0])})),i},ac.register("radar",Wb);var Ub=Sx.valueAxis;function Zb(e,t){return _e.defaults({show:t},e)}Qv.extendComponentModel({type:"radar",optionUpdated:function(){var e=this.get("boundaryGap"),t=this.get("splitNumber"),i=this.get("scale"),n=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"),h=this.get("nameGap"),c=this.get("triggerEvent"),d=_e.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 p=s;if(null!=d.color&&(p=_e.defaults({color:d.color},s)),d=_e.merge(_e.clone(d),{boundaryGap:e,splitNumber:t,scale:i,axisLine:n,axisTick:a,axisType:r,axisLabel:o,name:d.text,nameLocation:"end",nameGap:h,nameTextStyle:p,triggerEvent:c},!1),l||(d.name=""),"string"==typeof u){var f=d.name;d.name=u.replace("{value}",null!=f?f:"")}else"function"==typeof u&&(d.name=u(d.name,d));var g=_e.extend(new gu(d,null,this.ecModel),Wm);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:_e.merge({lineStyle:{color:"#bbb"}},Ub.axisLine),axisLabel:Zb(Ub.axisLabel,!1),axisTick:Zb(Ub.axisTick,!1),axisType:"interval",splitLine:Zb(Ub.splitLine,!0),splitArea:Zb(Ub.splitArea,!0),indicator:[]}});var jb=["axisLine","axisTickLabel","axisName"],Yb=(Qv.extendComponentView({type:"radar",render:function(e,t,i){this.group.removeAll(),this._buildAxes(e),this._buildSplitLineAndArea(e)},_buildAxes:function(e){var t=e.coordinateSystem,i=t.getIndicatorAxes(),n=_e.map(i,(function(e){return new f_(e.model,{position:[t.cx,t.cy],rotation:e.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}));_e.each(n,(function(e){_e.each(jb,e.add,e),this.group.add(e.getGroup())}),this)},_buildSplitLineAndArea:function(e){var t=e.coordinateSystem,i=t.getIndicatorAxes();if(i.length){var n=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"),h=o.get("color"),c=s.get("color");h=_e.isArray(h)?h:[h],c=_e.isArray(c)?c:[c];var d=[],p=[];if("circle"===n)for(var f=i[0].getTicksCoords(),g=t.cx,m=t.cy,v=0;v<f.length;v++){if(l)d[I(d,h,v)].push(new iu.Circle({shape:{cx:g,cy:m,r:f[v].coord}}));if(u&&v<f.length-1)p[I(p,c,v)].push(new iu.Ring({shape:{cx:g,cy:m,r0:f[v].coord,r:f[v+1].coord}}))}else{var y,x=_e.map(i,(function(e,i){var n=e.getTicksCoords();return y=null==y?n.length-1:Math.min(n.length-1,y),_e.map(n,(function(e){return t.coordToPoint(e.coord,i)}))})),_=[];for(v=0;v<=y;v++){for(var b=[],w=0;w<i.length;w++)b.push(x[w][v]);if(b[0]&&b.push(b[0].slice()),l)d[I(d,h,v)].push(new iu.Polyline({shape:{points:b}}));if(u&&_)p[I(p,c,v-1)].push(new iu.Polygon({shape:{points:b.concat(_)}}));_=b.slice().reverse()}}var S=o.getLineStyle(),M=s.getAreaStyle();_e.each(p,(function(e,t){this.group.add(iu.mergePath(e,{style:_e.defaults({stroke:"none",fill:c[t%c.length]},M),silent:!0}))}),this),_e.each(d,(function(e,t){this.group.add(iu.mergePath(e,{style:_e.defaults({fill:"none",stroke:h[t%h.length]},S),silent:!0}))}),this)}function I(e,t,i){var n=i%t.length;return e[n]=e[n]||[],n}}}),Du.encodeHTML),Xb=Nd.extend({type:"series.radar",dependencies:["radar"],init:function(e){Xb.superApply(this,"init",arguments),this.legendVisualProvider=new cb(_e.bind(this.getData,this),_e.bind(this.getRawData,this))},getInitialData:function(e,t){return ub(this,{generateCoord:"indicator_",generateCoordCount:1/0})},formatTooltip:function(e){var t=this.getData(),i=this.coordinateSystem.getIndicatorAxes(),n=this.getData().getName(e);return Yb(""===n?this.name:n)+"<br/>"+_e.map(i,(function(i,n){var a=t.get(t.mapDimension(i.dim),e);return Yb(i.name+" : "+a)})).join("<br />")},getTooltipPosition:function(e){if(null!=e)for(var t=this.getData(),i=this.coordinateSystem,n=t.getValues(_e.map(i.dimensions,(function(e){return t.mapDimension(e)})),e,!0),a=0,r=n.length;a<r;a++)if(!isNaN(n[a])){var o=i.getIndicatorAxes();return i.coordToPoint(o[a].dataToCoord(n[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}});Qv.extendChartView({type:"radar",render:function(e,t,i){var n=e.coordinateSystem,a=this.group,r=e.getData(),o=this._data;function s(e,t){var i=e.getItemVisual(t,"symbol")||"circle",n=e.getItemVisual(t,"color");if("none"!==i){var a=function(e){return _e.isArray(e)||(e=[+e,+e]),e}(e.getItemVisual(t,"symbolSize")),r=ev.createSymbol(i,-1,-1,2,2,n);return r.attr({style:{strokeNoScale:!0},z2:100,scale:[a[0]/2,a[1]/2]}),r}}function l(t,i,n,a,r,o){n.removeAll();for(var l=0;l<i.length-1;l++){var u=s(a,r);u&&(u.__dimIdx=l,t[l]?(u.attr("position",t[l]),iu[o?"initProps":"updateProps"](u,{position:i[l]},e,r)):u.attr("position",i[l]),n.add(u))}}function u(e){return _e.map(e,(function(e){return[n.cx,n.cy]}))}r.diff(o).add((function(t){var i=r.getItemLayout(t);if(i){var n=new iu.Polygon,a=new iu.Polyline,o={shape:{points:i}};n.shape.points=u(i),a.shape.points=u(i),iu.initProps(n,o,e,t),iu.initProps(a,o,e,t);var s=new iu.Group,h=new iu.Group;s.add(a),s.add(n),s.add(h),l(a.shape.points,i,h,r,t,!0),r.setItemGraphicEl(t,s)}})).update((function(t,i){var n=o.getItemGraphicEl(i),a=n.childAt(0),s=n.childAt(1),u=n.childAt(2),h={shape:{points:r.getItemLayout(t)}};h.shape.points&&(l(a.shape.points,h.shape.points,u,r,t,!1),iu.updateProps(a,h,e),iu.updateProps(s,h,e),r.setItemGraphicEl(t,n))})).remove((function(e){a.remove(o.getItemGraphicEl(e))})).execute(),r.eachItemGraphicEl((function(e,t){var i=r.getItemModel(t),n=e.childAt(0),o=e.childAt(1),s=e.childAt(2),l=r.getItemVisual(t,"color");a.add(e),n.useStyle(_e.defaults(i.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:l})),n.hoverStyle=i.getModel("emphasis.lineStyle").getLineStyle();var u=i.getModel("areaStyle"),h=i.getModel("emphasis.areaStyle"),c=u.isEmpty()&&u.parentModel.isEmpty(),d=h.isEmpty()&&h.parentModel.isEmpty();d=d&&c,o.ignore=c,o.useStyle(_e.defaults(u.getAreaStyle(),{fill:l,opacity:.7})),o.hoverStyle=h.getAreaStyle();var p=i.getModel("itemStyle").getItemStyle(["color"]),f=i.getModel("emphasis.itemStyle").getItemStyle(),g=i.getModel("label"),m=i.getModel("emphasis.label");s.eachChild((function(e){e.setStyle(p),e.hoverStyle=_e.clone(f);var i=r.get(r.dimensions[e.__dimIdx],t);(null==i||isNaN(i))&&(i=""),iu.setLabelStyle(e.style,e.hoverStyle,g,m,{labelFetcher:r.hostModel,labelDataIndex:t,labelDimIndex:e.__dimIdx,defaultText:i,autoColor:l,isRectText:!0})})),e.highDownOnUpdate=function(e,t){o.attr("ignore","emphasis"===t?d:c)},iu.setHoverStyle(e)})),this._data=r},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});function qb(e){return!isNaN(e[0])&&!isNaN(e[1])}function Kb(e){return[e.cx,e.cy]}var $b=function(e){e.eachSeriesByType("radar",(function(e){var t=e.getData(),i=[],n=e.coordinateSystem;if(n){var a=n.getIndicatorAxes();_e.each(a,(function(e,r){t.each(t.mapDimension(a[r].dim),(function(e,t){i[t]=i[t]||[];var a=n.dataToPoint(e,r);i[t][r]=qb(a)?a:Kb(n)}))})),t.each((function(e){var a=_e.find(i[e],(function(e){return qb(e)}))||Kb(n);i[e].push(a.slice()),t.setItemLayout(e,i[e])}))}}))};var Jb=function(e){var t=e.polar;if(t){_e.isArray(t)||(t=[t]);var i=[];_e.each(t,(function(t,n){t.indicator?(t.type&&!t.shape&&(t.shape=t.type),e.radar=e.radar||[],_e.isArray(e.radar)||(e.radar=[e.radar]),e.radar.push(t)):i.push(t)})),e.polar=i}_e.each(e.series,(function(e){e&&"radar"===e.type&&e.polarIndex&&(e.radarIndex=e.polarIndex)}))};Qv.registerVisual(wb("radar")),Qv.registerVisual(ox("radar","circle")),Qv.registerLayout($b),Qv.registerProcessor(Ob("radar")),Qv.registerPreprocessor(Jb);for(var Qb=[126,25],ew=[[[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]]],tw=0;tw<ew.length;tw++)for(var iw=0;iw<ew[tw].length;iw++)ew[tw][iw][0]/=10.5,ew[tw][iw][1]/=-14,ew[tw][iw][0]+=Qb[0],ew[tw][iw][1]+=Qb[1];var nw=function(e,t){"china"===e&&t.push(new uv("南海诸岛",_e.map(ew,(function(e){return{type:"polygon",exterior:e}})),Qb))},aw={"南海诸岛":[32,80],"广东":[0,-10],"香港":[10,5],"澳门":[-10,10],"天津":[5,5]};var rw=function(e,t){if("china"===e){var i=aw[t.name];if(i){var n=t.center;n[0]+=i[0]/10.5,n[1]+=-i[1]/14}}},ow={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]};var sw=function(e,t){if("world"===e){var i=ow[t.name];if(i){var n=t.center;n[0]=i[0],n[1]=i[1]}}},lw=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];var uw=function(e,t){"china"===e&&"台湾"===t.name&&t.geometries.push({type:"polygon",exterior:lw[0]})},hw=_e.each,cw=(0,vr.makeInner)();function dw(e){for(var t,i=0;i<e.length;i++){var n=e[i].getBoundingRect();(t=t||n.clone()).union(n)}return t}var pw={load:function(e,t,i){var n=cw(t).parsed;if(n)return n;var a,r=t.specialAreas||{},o=t.geoJSON;try{a=o?cv(o,i):[]}catch(e){throw new Error("Invalid geoJson format\n"+e.message)}return nw(e,a),hw(a,(function(t){var i=t.name;rw(e,t),sw(e,t),uw(e,t);var n=r[i];n&&t.transformTo(n.left,n.top,n.width,n.height)})),cw(t).parsed={regions:a,boundingRect:dw(a)}}},fw=pf.parseSVG,gw=pf.makeViewBoxTransform,mw=_e.assert,vw=_e.createHashMap,yw=(0,vr.makeInner)();function xw(e,t){var i,n,a=e.svgXML;try{n=(i=a&&fw(a,{ignoreViewBox:!0,ignoreRootClip:!0})||{}).root,mw(null!=n)}catch(e){throw new Error("Invalid svg format\n"+e.message)}var r=i.width,o=i.height,s=i.viewBoxRect;if(t||(t=null==r||null==o?n.getBoundingRect():new Oi(0,0,0,0),null!=r&&(t.width=r),null!=o&&(t.height=o)),s){var l=gw(s,t.width,t.height),u=n;(n=new Ni).add(u),u.scale=l.scale,u.position=l.position}return n.setClipPath(new Ps({shape:t.plain()})),{root:n,boundingRect:t}}var _w={load:function(e,t){var i=yw(t).originRoot;if(i)return{root:i,boundingRect:yw(t).boundingRect};var n=xw(t);return yw(t).originRoot=n.root,yw(t).boundingRect=n.boundingRect,n},makeGraphic:function(e,t,i){var n=yw(t),a=n.rootMap||(n.rootMap=vw()),r=a.get(i);if(r)return r;var o=n.originRoot,s=n.boundingRect;return n.originRootHostKey?r=xw(t,s).root:(n.originRootHostKey=i,r=o),a.set(i,r)},removeGraphic:function(e,t,i){var n=yw(t),a=n.rootMap;a&&a.removeKey(i),i===n.originRootHostKey&&(n.originRootHostKey=null)}},bw=_e.each,ww=_e.createHashMap,Sw={geoJSON:pw,svg:_w};function Mw(e){return function(t,i){var n=Iw(t),a=[];return bw(n,(function(n){var r=Sw[n.type][e];r&&a.push(r(t,n,i))})),a}}function Iw(e){return wf.retrieveMap(e)||[]}var Tw={load:function(e,t,i){var n,a=[],r=ww(),o=ww(),s=Iw(e);return bw(s,(function(s){var l=Sw[s.type].load(e,s,i);bw(l.regions,(function(e){var i=e.name;t&&t.hasOwnProperty(i)&&(e=e.cloneShallow(i=t[i])),a.push(e),r.set(i,e),o.set(i,e.center)}));var u=l.boundingRect;u&&(n?n.union(u):n=u.clone())})),{regions:a,regionsMap:r,nameCoordMap:o,boundingRect:n||new Oi(0,0,0,0)}},makeGraphic:Mw("makeGraphic"),removeGraphic:Mw("removeGraphic")},Aw=Du.encodeHTML,Cw=Du.addCommas,Dw=nd.retrieveRawAttr,Lw=Rh.makeSeriesEncodeForNameBased,Pw=Nd.extend({type:"series.map",dependencies:["geo"],layoutMode:"box",needsDrawMap:!1,seriesGroup:[],getInitialData:function(e){for(var t=ub(this,{coordDimensions:["value"],encodeDefaulter:_e.curry(Lw,this)}),i=t.mapDimension("value"),n=_e.createHashMap(),a=[],r=[],o=0,s=t.count();o<s;o++){var l=t.getName(o);n.set(l,!0),a.push({name:l,value:t.get(i,o),selected:Dw(t,o,"selected")})}var u=Tw.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return _e.each(u.regions,(function(e){var t=e.name;n.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(),i=Cw(this.getRawValue(e)),n=t.getName(e),a=this.seriesGroup,r=[],o=0;o<a.length;o++){var s=a[o].originalData.indexOfName(n),l=t.mapDimension("value");isNaN(a[o].originalData.get(l,s))||r.push(Aw(a[o].name))}return r.join(", ")+"<br />"+Aw(n+" : "+i)},getTooltipPosition:function(e){if(null!=e){var t=this.getData().getName(e),i=this.coordinateSystem,n=i.getRegion(t);return n&&i.dataToPoint(n.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"}});_e.mixin(Pw,hb);var kw="\0_ec_interaction_mutex";function Ow(e){return e[kw]||(e[kw]={})}Qv.registerAction({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},(function(){}));var Rw={take:function(e,t,i){Ow(e)[t]=i},release:function(e,t,i){var n=Ow(e);n[t]===i&&(n[t]=null)},isTaken:function(e,t){return!!Ow(e)[t]}};function Nw(e){this.pointerChecker,this._zr=e,this._opt={};var t=_e.bind,i=t(Ew,this),n=t(zw,this),a=t(Bw,this),r=t(Vw,this),o=t(Gw,this);Oe.call(this),this.setPointerChecker=function(e){this.pointerChecker=e},this.enable=function(t,s){this.disable(),this._opt=_e.defaults(_e.clone(s)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(e.on("mousedown",i),e.on("mousemove",n),e.on("mouseup",a)),!0!==t&&"scale"!==t&&"zoom"!==t||(e.on("mousewheel",r),e.on("pinch",o))},this.disable=function(){e.off("mousedown",i),e.off("mousemove",n),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 Ew(e){if(!(Ke.isMiddleOrRightButtonOnMouseUpDown(e)||e.target&&e.target.draggable)){var t=e.offsetX,i=e.offsetY;this.pointerChecker&&this.pointerChecker(e,t,i)&&(this._x=t,this._y=i,this._dragging=!0)}}function zw(e){if(this._dragging&&Ww("moveOnMouseMove",e,this._opt)&&"pinch"!==e.gestureEvent&&!Rw.isTaken(this._zr,"globalPan")){var t=e.offsetX,i=e.offsetY,n=this._x,a=this._y,r=t-n,o=i-a;this._x=t,this._y=i,this._opt.preventDefaultMouseMove&&Ke.stop(e.event),Hw(this,"pan","moveOnMouseMove",e,{dx:r,dy:o,oldX:n,oldY:a,newX:t,newY:i})}}function Bw(e){Ke.isMiddleOrRightButtonOnMouseUpDown(e)||(this._dragging=!1)}function Vw(e){var t=Ww("zoomOnMouseWheel",e,this._opt),i=Ww("moveOnMouseWheel",e,this._opt),n=e.wheelDelta,a=Math.abs(n),r=e.offsetX,o=e.offsetY;if(0!==n&&(t||i)){if(t){var s=a>3?1.4:a>1?1.2:1.1;Fw(this,"zoom","zoomOnMouseWheel",e,{scale:n>0?s:1/s,originX:r,originY:o})}if(i){var l=Math.abs(n);Fw(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:(n>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:r,originY:o})}}}function Gw(e){Rw.isTaken(this._zr,"globalPan")||Fw(this,"zoom",null,e,{scale:e.pinchScale>1?1.1:1/1.1,originX:e.pinchX,originY:e.pinchY})}function Fw(e,t,i,n,a){e.pointerChecker&&e.pointerChecker(n,a.originX,a.originY)&&(Ke.stop(n.event),Hw(e,t,i,n,a))}function Hw(e,t,i,n,a){a.isAvailableBehavior=_e.bind(Ww,null,i,n),e.trigger(t,a)}function Ww(e,t,i){var n=i[e];return!e||n&&(!_e.isString(n)||t.event[n+"Key"])}_e.mixin(Nw,Oe);var Uw=Nw;var Zw={updateViewOnPan:function(e,t,i){var n=e.target,a=n.position;a[0]+=t,a[1]+=i,n.dirty()},updateViewOnZoom:function(e,t,i,n){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,h=r.max||1/0;l=Math.max(Math.min(h,l),u)}var c=l/e.zoom;e.zoom=l,o[0]-=(i-o[0])*(c-1),o[1]-=(n-o[1])*(c-1),s[0]*=c,s[1]*=c,a.dirty()}},jw={axisPointer:1,tooltip:1,brush:1};var Yw={onIrrelevantElement:function(e,t,i){var n=t.getComponentByElement(e.topTarget),a=n&&n.coordinateSystem;return n&&n!==i&&!jw[n.mainType]&&a&&a.model!==i}},Xw=Yw.onIrrelevantElement,qw=yu.getUID;function Kw(e){var t=e.getItemStyle(),i=e.get("areaColor");return null!=i&&(t.fill=i),t}function $w(e,t){t.eachChild((function(t){_e.each(t.__regions,(function(i){t.trigger(e.isSelected(i.name)?"emphasis":"normal")}))}))}function Jw(e,t){var i=new iu.Group;this.uid=qw("ec_map_draw"),this._controller=new Uw(e.getZr()),this._controllerHost={target:t?i:null},this.group=i,this._updateGroup=t,this._mouseDownFlag,this._mapName,this._initialized,i.add(this._regionsGroup=new iu.Group),i.add(this._backgroundGroup=new iu.Group)}Jw.prototype={constructor:Jw,draw:function(e,t,i,n,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,h=this.group,c=s.getTransformInfo(),d=!u.childAt(0)||a;if(d)h.transform=c.roamTransform,h.decomposeTransform(),h.dirty();else{var p=new _t;p.transform=c.roamTransform,p.decomposeTransform();var f={scale:p.scale,position:p.position};l=p.scale,iu.updateProps(h,f,e)}var g=c.rawScale,m=c.rawPosition;u.removeAll();var v=["itemStyle"],y=["emphasis","itemStyle"],x=["label"],_=["emphasis","label"],b=_e.createHashMap();_e.each(s.regions,(function(t){var i=b.get(t.name)||b.set(t.name,new iu.Group),n=new iu.CompoundPath({segmentIgnoreThreshold:1,shape:{paths:[]}});i.add(n);var a,s=(R=e.getRegionModel(t.name)||e).getModel(v),c=R.getModel(y),p=Kw(s),f=Kw(c),w=R.getModel(x),S=R.getModel(_);if(o){a=o.indexOfName(t.name);var M=o.getItemVisual(a,"color",!0);M&&(p.fill=M)}var I=function(e){return[e[0]*g[0]+m[0],e[1]*g[1]+m[1]]};_e.each(t.geometries,(function(e){if("polygon"===e.type){for(var t=[],i=0;i<e.exterior.length;++i)t.push(I(e.exterior[i]));n.shape.paths.push(new iu.Polygon({segmentIgnoreThreshold:1,shape:{points:t}}));for(i=0;i<(e.interiors?e.interiors.length:0);++i){for(var a=e.interiors[i],r=(t=[],0);r<a.length;++r)t.push(I(a[r]));n.shape.paths.push(new iu.Polygon({segmentIgnoreThreshold:1,shape:{points:t}}))}}})),n.setStyle(p),n.style.strokeNoScale=!0,n.culling=!0;var T=w.get("show"),A=S.get("show"),C=o&&isNaN(o.get(o.mapDimension("value"),a)),D=o&&o.getItemLayout(a);if(r||C&&(T||A)||D&&D.showLabel){var L,P=r?t.name:a;(!o||a>=0)&&(L=e);var k=new iu.Text({position:I(t.center.slice()),scale:[1/h.scale[0],1/h.scale[1]],z2:10,silent:!0});if(iu.setLabelStyle(k.style,k.hoverStyle={},w,S,{labelFetcher:L,labelDataIndex:P,defaultText:t.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),!d){var O=[1/l[0],1/l[1]];iu.updateProps(k,{scale:O},e)}i.add(k)}if(o)o.setItemGraphicEl(a,i);else{var R=e.getRegionModel(t.name);n.eventData={componentType:"geo",componentIndex:e.componentIndex,geoIndex:e.componentIndex,name:t.name,region:R&&R.option||{}}}(i.__regions||(i.__regions=[])).push(t),i.highDownSilentOnTouch=!!e.get("selectedMode"),iu.setHoverStyle(i,f),u.add(i)})),this._updateController(e,t,i),function(e,t,i,n,a){i.off("click"),i.off("mousedown"),t.get("selectedMode")&&(i.on("mousedown",(function(){e._mouseDownFlag=!0})),i.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:_e.map(o.__regions,(function(e){return{name:e.name,from:a.uid}}))};s[t.mainType+"Id"]=t.id,n.dispatchAction(s),$w(t,i)}}})))}(this,e,u,i,n),$w(e,u)},remove:function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&Tw.removeGraphic(this._mapName,this.uid),this._mapName=null,this._controllerHost={}},_updateBackground:function(e){var t=e.map;this._mapName!==t&&_e.each(Tw.makeGraphic(t,this.uid),(function(e){this._backgroundGroup.add(e)}),this),this._mapName=t},_updateController:function(e,t,i){var n=e.coordinateSystem,a=this._controller,r=this._controllerHost;r.zoomLimit=e.get("scaleLimit"),r.zoom=n.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,Zw.updateViewOnPan(r,e.dx,e.dy),i.dispatchAction(_e.extend(s(),{dx:e.dx,dy:e.dy}))}),this),a.off("zoom").on("zoom",(function(e){if(this._mouseDownFlag=!1,Zw.updateViewOnZoom(r,e.scale,e.originX,e.originY),i.dispatchAction(_e.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 n.getViewRectAfterRoam().contain(a,r)&&!Xw(t,i,e)}))}};var Qw=Jw;Qv.extendChartView({type:"map",render:function(e,t,i,n){if(!n||"mapToggleSelect"!==n.type||n.from!==this.uid){var a=this.group;if(a.removeAll(),!e.getHostGeoModel()){if(n&&"geoRoam"===n.type&&"series"===n.componentType&&n.seriesId===e.id)(r=this._mapDraw)&&a.add(r.group);else if(e.needsDrawMap){var r=this._mapDraw||new Qw(i,!0);a.add(r.group),r.draw(e,t,i,this,n),this._mapDraw=r}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;e.get("showLegendSymbol")&&t.getComponent("legend")&&this._renderSymbols(e,t,i)}}},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,i){var n=e.originalData,a=this.group;n.each(n.mapDimension("value"),(function(t,i){if(!isNaN(t)){var r=n.getItemLayout(i);if(r&&r.point){var o=r.point,s=r.offset,l=new iu.Circle({style:{fill:e.getData().getVisual("color")},shape:{cx:o[0]+9*s,cy:o[1],r:3},silent:!0,z2:8+(s?0:iu.Z2_EMPHASIS_LIFT+1)});if(!s){var u=e.mainSeries.getData(),h=n.getName(i),c=u.indexOfName(h),d=n.getItemModel(i),p=d.getModel("label"),f=d.getModel("emphasis.label"),g=u.getItemGraphicEl(c),m=_e.retrieve2(e.getFormattedLabel(c,"normal"),h),v=_e.retrieve2(e.getFormattedLabel(c,"emphasis"),m),y=g.__seriesMapHighDown,x=Math.random();if(!y){y=g.__seriesMapHighDown={};var _=_e.curry(eS,!0),b=_e.curry(eS,!1);g.on("mouseover",_).on("mouseout",b).on("emphasis",_).on("normal",b)}g.__seriesMapCallKey=x,_e.extend(y,{recordVersion:x,circle:l,labelModel:p,hoverLabelModel:f,emphasisText:v,normalText:m}),tS(y,!1)}a.add(l)}}}))}});function eS(e){var t=this.__seriesMapHighDown;t&&t.recordVersion===this.__seriesMapCallKey&&tS(t,e)}function tS(e,t){var i=e.circle,n=e.labelModel,a=e.hoverLabelModel,r=e.emphasisText,o=e.normalText;t?(i.style.extendFrom(iu.setTextStyle({},a,{text:a.get("show")?r:null},{isRectText:!0,useInsideStyle:!1},!0)),i.__mapOriginalZ2=i.z2,i.z2+=iu.Z2_EMPHASIS_LIFT):(iu.setTextStyle(i.style,n,{text:n.get("show")?o:null,textPosition:n.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),i.dirty(!1),null!=i.__mapOriginalZ2&&(i.z2=i.__mapOriginalZ2,i.__mapOriginalZ2=null))}var iS={updateCenterAndZoom:function(e,t,i){var n=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(i){var s=i.min||0,l=i.max||1/0;r=Math.max(Math.min(n*r,l),s)/n}e.scale[0]*=r,e.scale[1]*=r;var u=e.position,h=(t.originX-u[0])*(r-1),c=(t.originY-u[1])*(r-1);u[0]-=h,u[1]-=c,e.updateTransform();a=e.pointToData(o);e.setCenter(a),e.setZoom(r*n)}return{center:e.getCenter(),zoom:e.getZoom()}}},nS=iS.updateCenterAndZoom;Qv.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},(function(e,t){var i=e.componentType||"series";t.eachComponent({mainType:i,query:e},(function(t){var n=t.coordinateSystem;if("geo"===n.type){var a=nS(n,e,t.get("scaleLimit"));t.setCenter&&t.setCenter(a.center),t.setZoom&&t.setZoom(a.zoom),"series"===i&&_e.each(t.seriesGroup,(function(e){e.setCenter(a.center),e.setZoom(a.zoom)}))}}))}));var aS=Te.applyTransform;function rS(){_t.call(this)}function oS(e){this.name=e,this.zoomLimit,_t.call(this),this._roamTransformable=new rS,this._rawTransformable=new rS,this._center,this._zoom}function sS(e,t,i,n){var a=i.seriesModel,r=a?a.coordinateSystem:null;return r===this?r[e](n):null}_e.mixin(rS,_t),oS.prototype={constructor:oS,type:"view",dimensions:["x","y"],setBoundingRect:function(e,t,i,n){return this._rect=new Oi(e,t,i,n),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(e,t,i,n){this.transformTo(e,t,i,n),this._viewRect=new Oi(e,t,i,n)},transformTo:function(e,t,i,n){var a=this.getBoundingRect(),r=this._rawTransformable;r.transform=a.calculateTransform(new Oi(e,t,i,n)),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,i=this.getDefaultCenter(),n=this.getCenter(),a=this.getZoom();n=Te.applyTransform([],n,e),i=Te.applyTransform([],i,e),t.origin=n,t.position=[i[0]-n[0],i[1]-n[1]],t.scale=[a,a],this._updateTransform()},_updateTransform:function(){var e=this._roamTransformable,t=this._rawTransformable;t.parent=e,e.updateTransform(),t.updateTransform(),dt.copy(this.transform||(this.transform=[]),t.transform||dt.create()),this._rawTransform=t.getLocalTransform(),this.invTransform=this.invTransform||[],dt.invert(this.invTransform,this.transform),this.decomposeTransform()},getTransformInfo:function(){var e=this._roamTransformable.transform,t=this._rawTransformable;return{roamTransform:e?_e.slice(e):dt.create(),rawScale:_e.slice(t.scale),rawPosition:_e.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,i){var n=t?this._rawTransform:this.transform;return i=i||[],n?aS(i,e,n):Te.copy(i,e)},pointToData:function(e){var t=this.invTransform;return t?aS([],e,t):[e[0],e[1]]},convertToPixel:_e.curry(sS,"dataToPoint"),convertFromPixel:_e.curry(sS,"pointToData"),containPoint:function(e){return this.getViewRectAfterRoam().contain(e[0],e[1])}},_e.mixin(oS,_t);var lS=oS;function uS(e,t,i,n){lS.call(this,e),this.map=t;var a=Tw.load(t,i);this._nameCoordMap=a.nameCoordMap,this._regionsMap=a.regionsMap,this._invertLongitute=null==n||n,this.regions=a.regions,this._rect=a.boundingRect}function hS(e,t,i,n){var a=i.geoModel,r=i.seriesModel,o=a?a.coordinateSystem:r?r.coordinateSystem||(r.getReferringComponents("geo")[0]||{}).coordinateSystem:null;return o===this?o[e](n):null}uS.prototype={constructor:uS,type:"geo",dimensions:["lng","lat"],containCoord:function(e){for(var t=this.regions,i=0;i<t.length;i++)if(t[i].contain(e))return!0;return!1},transformTo:function(e,t,i,n){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 Oi(e,t,i,n)),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,i=0;i<t.length;i++)if(t[i].contain(e))return t[i]},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,i){if("string"==typeof e&&(e=this.getGeoCoord(e)),e)return lS.prototype.dataToPoint.call(this,e,t,i)},convertToPixel:_e.curry(hS,"dataToPoint"),convertFromPixel:_e.curry(hS,"pointToData")},_e.mixin(uS,lS);var cS=uS;function dS(e,t){var i=e.get("boundingCoords");if(null!=i){var n=i[0],a=i[1];isNaN(n[0])||isNaN(n[1])||isNaN(a[0])||isNaN(a[1])||this.setBoundingRect(n[0],n[1],a[0]-n[0],a[1]-n[1])}var r,o=this.getBoundingRect(),s=e.get("layoutCenter"),l=e.get("layoutSize"),u=t.getWidth(),h=t.getHeight(),c=o.width/o.height*this.aspectScale,d=!1;if(s&&l&&(s=[bu.parsePercent(s[0],u),bu.parsePercent(s[1],h)],l=bu.parsePercent(l,Math.min(u,h)),isNaN(s[0])||isNaN(s[1])||isNaN(l)||(d=!0)),d){var p={};c>1?(p.width=l,p.height=l/c):(p.height=l,p.width=l*c),p.y=s[1]-p.height/2,p.x=s[0]-p.width/2}else(r=e.getBoxLayoutParams()).aspect=c,p=Gu.getLayoutRect(r,{width:u,height:h});this.setViewRect(p.x,p.y,p.width,p.height),this.setCenter(e.get("center")),this.setZoom(e.get("zoom"))}function pS(e,t){_e.each(t.get("geoCoord"),(function(t,i){e.addGeoCoord(i,t)}))}var fS={dimensions:cS.prototype.dimensions,create:function(e,t){var i=[];e.eachComponent("geo",(function(e,n){var a=e.get("map"),r=e.get("aspectScale"),o=!0,s=wf.retrieveMap(a);s&&s[0]&&"svg"===s[0].type?(null==r&&(r=1),o=!1):null==r&&(r=.75);var l=new cS(a+n,a,e.get("nameMap"),o);l.aspectScale=r,l.zoomLimit=e.get("scaleLimit"),i.push(l),pS(l,e),e.coordinateSystem=l,l.model=e,l.resize=dS,l.resize(e,t)})),e.eachSeries((function(e){if("geo"===e.get("coordinateSystem")){var t=e.get("geoIndex")||0;e.coordinateSystem=i[t]}}));var n={};return e.eachSeriesByType("map",(function(e){if(!e.getHostGeoModel()){var t=e.getMapType();n[t]=n[t]||[],n[t].push(e)}})),_e.each(n,(function(e,n){var a=_e.map(e,(function(e){return e.get("nameMap")})),r=new cS(n,n,_e.mergeAll(a));r.zoomLimit=_e.retrieve.apply(null,_e.map(e,(function(e){return e.get("scaleLimit")}))),i.push(r),r.resize=dS,r.aspectScale=e[0].get("aspectScale"),r.resize(e[0],t),_e.each(e,(function(e){e.coordinateSystem=r,pS(r,e)}))})),i},getFilledRegions:function(e,t,i){for(var n=(e||[]).slice(),a=_e.createHashMap(),r=0;r<n.length;r++)a.set(n[r].name,n[r]);var o=Tw.load(t,i);return _e.each(o.regions,(function(e){var t=e.name;!a.get(t)&&n.push({name:t})})),n}};Qv.registerCoordinateSystem("geo",fS);var gS=fS;var mS=function(e){var t={};e.eachSeriesByType("map",(function(i){var n=i.getMapType();if(!i.getHostGeoModel()&&!t[n]){var a={};_e.each(i.seriesGroup,(function(t){var i=t.coordinateSystem,n=t.originalData;t.get("showLegendSymbol")&&e.getComponent("legend")&&n.each(n.mapDimension("value"),(function(e,t){var r=n.getName(t),o=i.getRegion(r);if(o&&!isNaN(e)){var s=a[r]||0,l=i.dataToPoint(o.center);a[r]=s+1,n.setItemLayout(t,{point:l,offset:s})}}))}));var r=i.getData();r.each((function(e){var t=r.getName(e),i=r.getItemLayout(e)||{};i.showLabel=!a[t],r.setItemLayout(e,i)})),t[n]=!0}}))};var vS=function(e){e.eachSeriesByType("map",(function(e){var t=e.get("color"),i=e.getModel("itemStyle"),n=i.get("areaColor"),a=i.get("color")||t[e.seriesIndex%t.length];e.getData().setVisual({areaColor:n,color:a})}))};var yS=function(e){var t={};e.eachSeriesByType("map",(function(e){var i=e.getHostGeoModel(),n=i?"o"+i.id:"i"+e.getMapType();(t[n]=t[n]||[]).push(e)})),_e.each(t,(function(e,t){for(var i,n,a,r=(i=_e.map(e,(function(e){return e.getData()})),n=e[0].get("mapValueCalculation"),a={},_e.each(i,(function(e){e.each(e.mapDimension("value"),(function(t,i){var n="ec-"+e.getName(i);a[n]=a[n]||[],isNaN(t)||a[n].push(t)}))})),i[0].map(i[0].mapDimension("value"),(function(e,t){for(var r,o="ec-"+i[0].getName(t),s=0,l=1/0,u=-1/0,h=a[o].length,c=0;c<h;c++)l=Math.min(l,a[o][c]),u=Math.max(u,a[o][c]),s+=a[o][c];return r="min"===n?l:"max"===n?u:"average"===n?s/h:s,0===h?NaN:r}))),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 xS=function(e){_e.each(e.series,(function(e){e&&"map"===e.type&&(e.map=e.map||e.mapType,_e.defaults(e,e.mapLocation))}))};Qv.registerLayout(mS),Qv.registerVisual(vS),Qv.registerProcessor(Qv.PRIORITY.PROCESSOR.STATISTIC,yS),Qv.registerPreprocessor(xS),_b("map",[{type:"mapToggleSelect",event:"mapselectchanged",method:"toggleSelected"},{type:"mapSelect",event:"mapselected",method:"select"},{type:"mapUnSelect",event:"mapunselected",method:"unSelect"}]);var _S=_e.each,bS="\0__link_datas",wS="\0__link_mainData";function SS(e,t){if((n=this)[wS]===n){var i=_e.extend({},this[bS]);i[this.dataType]=t,AS(t,i,e)}else CS(t,this.dataType,this[wS],e);var n;return t}function MS(e,t){return e.struct&&e.struct.update(this),t}function IS(e,t){return _S(t[bS],(function(i,n){i!==t&&CS(i.cloneShallow(),n,t,e)})),t}function TS(e){var t=this[wS];return null==e||null==t?t:t[bS][e]}function AS(e,t,i){e[bS]={},_S(t,(function(t,n){CS(t,n,e,i)}))}function CS(e,t,i,n){i[bS][t]=e,e[wS]=i,e.dataType=t,n.struct&&(e[n.structAttr]=n.struct,n.struct[n.datasAttr[t]]=e),e.getLinkedData=TS}var DS=function(e){var t=e.mainData,i=e.datas;i||(i={main:t},e.datasAttr={main:"data"}),e.datas=e.mainData=null,AS(t,i,e),_S(i,(function(i){_S(t.TRANSFERABLE_METHODS,(function(t){i.wrapMethod(t,_e.curry(SS,e))}))})),t.wrapMethod("cloneShallow",_e.curry(IS,e)),_S(t.CHANGABLE_METHODS,(function(i){t.wrapMethod(i,_e.curry(MS,e))})),_e.assert(i[t.dataType]===t)},LS=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 PS(e,t){this.root,this.data,this._nodes=[],this.hostModel=e,this.levelModels=_e.map(t||[],(function(t){return new gu(t,e,e.ecModel)}))}LS.prototype={constructor:LS,isRemoved:function(){return this.dataIndex<0},eachNode:function(e,t,i){"function"==typeof e&&(i=t,t=e,e=null),e=e||{},_e.isString(e)&&(e={order:e});var n,a=e.order||"preorder",r=this[e.attr||"children"];"preorder"===a&&(n=t.call(i,this));for(var o=0;!n&&o<r.length;o++)r[o].eachNode(e,t,i);"postorder"===a&&t.call(i,this)},updateDepthAndHeight:function(e){var t=0;this.depth=e;for(var i=0;i<this.children.length;i++){var n=this.children[i];n.updateDepthAndHeight(e+1),n.height>t&&(t=n.height)}this.height=t+1},getNodeById:function(e){if(this.getId()===e)return this;for(var t=0,i=this.children,n=i.length;t<n;t++){var a=i[t].getNodeById(e);if(a)return a}},contains:function(e){if(e===this)return!0;for(var t=0,i=this.children,n=i.length;t<n;t++){var a=i[t].contains(e);if(a)return a}},getAncestors:function(e){for(var t=[],i=e?this:this.parentNode;i;)t.push(i),i=i.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),i=this.getLevelModel();return i?t.getModel(e,i.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)}},PS.prototype={constructor:PS,type:"tree",eachNode:function(e,t,i){this.root.eachNode(e,t,i)},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,i=0,n=t.length;i<n;i++)t[i].dataIndex=-1;for(i=0,n=e.count();i<n;i++)t[e.getRawIndex(i)].dataIndex=i},clearLayouts:function(){this.data.clearItemLayouts()}},PS.createTree=function(e,t,i,n){var a=new PS(t,i&&i.levels),r=[],o=1;!function e(t,i){var n=t.value;o=Math.max(o,_e.isArray(n)?n.length:1),r.push(t);var s=new LS(t.name,a);i?function(e,t){var i=t.children;if(e.parentNode===t)return;i.push(e),e.parentNode=t}(s,i):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=yg(r,{coordDimensions:["value"],dimensionsCount:o}),l=new ag(s,t);return l.initData(r),n&&n(l),DS({mainData:l,struct:a,structAttr:"tree"}),a.update(),a};var kS=PS,OS=Du.encodeHTML;Nd.extend({type:"series.tree",layoutInfo:null,layoutMode:"box",getInitialData:function(e){var t={name:e.name,children:e.data},i=e.leaves||{},n=new gu(i,this,this.ecModel),a=kS.createTree(t,this,{},(function(e){e.wrapMethod("getItemModel",(function(e,t){var i=a.getNodeByDataIndex(t);return i.children.length&&i.isExpand||(e.parentModel=n),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,i=t.root.children[0],n=t.getNodeByDataIndex(e),a=n.getValue(),r=n.name;n&&n!==i;)r=n.parentNode.name+"."+r,n=n.parentNode;return OS(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}});function RS(e){var t=e.children;return t.length&&e.isExpand?t[t.length-1]:e.hierNode.thread}function NS(e){var t=e.children;return t.length&&e.isExpand?t[0]:e.hierNode.thread}function ES(e,t,i){return e.hierNode.ancestor.parentNode===t.parentNode?e.hierNode.ancestor:i}function zS(e,t,i){var n=i/(t.hierNode.i-e.hierNode.i);t.hierNode.change-=n,t.hierNode.shift+=i,t.hierNode.modifier+=i,t.hierNode.prelim+=i,e.hierNode.change+=n}function BS(e,t){return e.parentNode===t.parentNode?1:2}var VS={init:function(e){e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var t,i,n=[e];t=n.pop();)if(i=t.children,t.isExpand&&i.length)for(var a=i.length-1;a>=0;a--){var r=i[a];r.hierNode={defaultAncestor:null,ancestor:r,prelim:0,modifier:0,change:0,shift:0,i:a,thread:null},n.push(r)}},firstWalk:function(e,t){var i=e.isExpand?e.children:[],n=e.parentNode.children,a=e.hierNode.i?n[e.hierNode.i-1]:null;if(i.length){!function(e){var t=e.children,i=t.length,n=0,a=0;for(;--i>=0;){var r=t[i];r.hierNode.prelim+=n,r.hierNode.modifier+=n,a+=r.hierNode.change,n+=r.hierNode.shift+a}}(e);var r=(i[0].hierNode.prelim+i[i.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,i,n){if(t){for(var a=e,r=e,o=r.parentNode.children[0],s=t,l=a.hierNode.modifier,u=r.hierNode.modifier,h=o.hierNode.modifier,c=s.hierNode.modifier;s=RS(s),r=NS(r),s&&r;){a=RS(a),o=NS(o),a.hierNode.ancestor=e;var d=s.hierNode.prelim+c-r.hierNode.prelim-u+n(s,r);d>0&&(zS(ES(s,e,i),e,d),u+=d,l+=d),c+=s.hierNode.modifier,u+=r.hierNode.modifier,l+=a.hierNode.modifier,h+=o.hierNode.modifier}s&&!RS(a)&&(a.hierNode.thread=s,a.hierNode.modifier+=c-l),r&&!NS(o)&&(o.hierNode.thread=r,o.hierNode.modifier+=u-h,i=e)}return i}(e,a,e.parentNode.hierNode.defaultAncestor||n[0],t)},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:function(e){return arguments.length?e:BS},radialCoordinate:function(e,t){var i={};return e-=Math.PI/2,i.x=t*Math.cos(e),i.y=t*Math.sin(e),i},getViewRect:function(e,t){return Gu.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}},GS=VS.radialCoordinate,FS=Yw.onIrrelevantElement,HS=bu.parsePercent,WS=iu.extendShape({shape:{parentPoint:[],childPoints:[],orient:"",forkPosition:""},style:{stroke:"#000",fill:null},buildPath:function(e,t){var i=t.childPoints,n=i.length,a=t.parentPoint,r=i[0],o=i[n-1];if(1===n)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,h=HS(t.forkPosition,1),c=[];c[l]=a[l],c[u]=a[u]+(o[u]-a[u])*h,e.moveTo(a[0],a[1]),e.lineTo(c[0],c[1]),e.moveTo(r[0],r[1]),c[l]=r[l],e.lineTo(c[0],c[1]),c[l]=o[l],e.lineTo(c[0],c[1]),e.lineTo(o[0],o[1]);for(var d=1;d<n-1;d++){var p=i[d];e.moveTo(p[0],p[1]),c[l]=p[l],e.lineTo(c[0],c[1])}}});Qv.extendChartView({type:"tree",init:function(e,t){this._oldTree,this._mainGroup=new iu.Group,this._controller=new Uw(t.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},render:function(e,t,i,n){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,i);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){US(a,t)&&jS(a,t,null,o,e,u)})).update((function(t,i){var n=l.getItemGraphicEl(i);US(a,t)?jS(a,t,n,o,e,u):n&&YS(l,i,n,o,e,u)})).remove((function(t){var i=l.getItemGraphicEl(t);i&&YS(l,t,i,o,e,u)})).execute(),this._nodeScaleRatio=e.get("nodeScaleRatio"),this._updateNodeAndLinkScale(e),!0===u.expandAndCollapse&&a.eachItemGraphicEl((function(t,n){t.off("click").on("click",(function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:e.id,dataIndex:n})}))})),this._data=a},_updateViewCoordSys:function(e){var t=e.getData(),i=[];t.each((function(e){var n=t.getItemLayout(e);!n||isNaN(n.x)||isNaN(n.y)||i.push([+n.x,+n.y])}));var n=[],a=[];Jr.fromPoints(i,n,a);var r=this._min,o=this._max;a[0]-n[0]==0&&(n[0]=r?r[0]:n[0]-1,a[0]=o?o[0]:a[0]+1),a[1]-n[1]==0&&(n[1]=r?r[1]:n[1]-1,a[1]=o?o[1]:a[1]+1);var s=e.coordinateSystem=new lS;s.zoomLimit=e.get("scaleLimit"),s.setBoundingRect(n[0],n[1],a[0]-n[0],a[1]-n[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=n,this._max=a},_updateController:function(e,t,i){var n=this._controller,a=this._controllerHost,r=this.group;n.setPointerChecker((function(t,n,a){var o=r.getBoundingRect();return o.applyTransform(r.transform),o.contain(n,a)&&!FS(t,i,e)})),n.enable(e.get("roam")),a.zoomLimit=e.get("scaleLimit"),a.zoom=e.coordinateSystem.getZoom(),n.off("pan").off("zoom").on("pan",(function(t){Zw.updateViewOnPan(a,t.dx,t.dy),i.dispatchAction({seriesId:e.id,type:"treeRoam",dx:t.dx,dy:t.dy})}),this).on("zoom",(function(t){Zw.updateViewOnZoom(a,t.scale,t.originX,t.originY),i.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(),i=this._getNodeGlobalScale(e),n=[i,i];t.eachItemGraphicEl((function(e,t){e.attr("scale",n)}))},_getNodeGlobalScale:function(e){var t=e.coordinateSystem;if("view"!==t.type)return 1;var i=this._nodeScaleRatio,n=t.scale,a=n&&n[0]||1;return((t.getZoom()-1)*i+1)/a},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},remove:function(){this._mainGroup.removeAll(),this._data=null}});function US(e,t){var i=e.getItemLayout(t);return i&&!isNaN(i.x)&&!isNaN(i.y)&&"none"!==e.getItemVisual(t,"symbol")}function ZS(e,t,i){return i.itemModel=t,i.itemStyle=t.getModel("itemStyle").getItemStyle(),i.hoverItemStyle=t.getModel("emphasis.itemStyle").getItemStyle(),i.lineStyle=t.getModel("lineStyle").getLineStyle(),i.labelModel=t.getModel("label"),i.hoverLabelModel=t.getModel("emphasis.label"),!1===e.isExpand&&0!==e.children.length?i.symbolInnerColor=i.itemStyle.fill:i.symbolInnerColor="#fff",i}function jS(e,t,i,n,a,r){var o=!i,s=e.tree.getNodeByDataIndex(t),l=s.getModel(),u=(r=ZS(s,l,r),e.tree.root),h=s.parentNode===u?s:s.parentNode||s,c=e.getItemGraphicEl(h.dataIndex),d=h.getLayout(),p=c?{x:c.position[0],y:c.position[1],rawX:c.__radialOldRawX,rawY:c.__radialOldRawY}:d,f=s.getLayout();o?(i=new gy(e,t,r)).attr("position",[p.x,p.y]):i.updateData(e,t,r),i.__radialOldRawX=i.__radialRawX,i.__radialOldRawY=i.__radialRawY,i.__radialRawX=f.rawX,i.__radialRawY=f.rawY,n.add(i),e.setItemGraphicEl(t,i),iu.updateProps(i,{position:[f.x,f.y]},a);var g=i.getSymbolPath();if("radial"===r.layout){var m,v,y=u.children[0],x=y.getLayout(),_=y.children.length;if(f.x===x.x&&!0===s.isExpand){var b={};b.x=(y.children[0].getLayout().x+y.children[_-1].getLayout().x)/2,b.y=(y.children[0].getLayout().y+y.children[_-1].getLayout().y)/2,(m=Math.atan2(b.y-x.y,b.x-x.x))<0&&(m=2*Math.PI+m),(v=b.x<x.x)&&(m-=Math.PI)}else(m=Math.atan2(f.y-x.y,f.x-x.x))<0&&(m=2*Math.PI+m),0===s.children.length||0!==s.children.length&&!1===s.isExpand?(v=f.x<x.x)&&(m-=Math.PI):(v=f.x>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,i,n,a,r,o,s,l){var u=l.edgeShape,h=n.__edge;if("curve"===u)t.parentNode&&t.parentNode!==i&&(h||(h=n.__edge=new iu.BezierCurve({shape:XS(l,a,a),style:_e.defaults({opacity:0,strokeNoScale:!0},l.lineStyle)})),iu.updateProps(h,{shape:XS(l,r,o),style:{opacity:1}},e));else if("polyline"===u&&"orthogonal"===l.layout&&t!==i&&t.children&&0!==t.children.length&&!0===t.isExpand){for(var c=t.children,d=[],p=0;p<c.length;p++){var f=c[p].getLayout();d.push([f.x,f.y])}h||(h=n.__edge=new WS({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:l.orient,forkPosition:l.edgeForkPosition},style:_e.defaults({opacity:0,strokeNoScale:!0},l.lineStyle)})),iu.updateProps(h,{shape:{parentPoint:[o.x,o.y],childPoints:d},style:{opacity:1}},e)}s.add(h)}(a,s,u,i,p,d,f,n,r)}function YS(e,t,i,n,a,r){for(var o,s=e.tree.getNodeByDataIndex(t),l=e.tree.root,u=s.getModel(),h=(r=ZS(s,u,r),s.parentNode===l?s:s.parentNode||s),c=r.edgeShape;null==(o=h.getLayout());)h=h.parentNode===l?h:h.parentNode||h;iu.updateProps(i,{position:[o.x+1,o.y+1]},a,(function(){n.remove(i),e.setItemGraphicEl(t,null)})),i.fadeOut(null,{keepLabel:!0});var d=e.getItemGraphicEl(h.dataIndex).__edge,p=i.__edge||(!1===h.isExpand||1===h.children.length?d:void 0);c=r.edgeShape;p&&("curve"===c?iu.updateProps(p,{shape:XS(r,o,o),style:{opacity:0}},a,(function(){n.remove(p)})):"polyline"===c&&"orthogonal"===r.layout&&iu.updateProps(p,{shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]]},style:{opacity:0}},a,(function(){n.remove(p)})))}function XS(e,t,i){var n,a,r,o,s,l,u,h,c=e.orient;if("radial"===e.layout){s=t.rawX,u=t.rawY,l=i.rawX,h=i.rawY;var d=GS(s,u),p=GS(s,u+(h-u)*e.curvature),f=GS(l,h+(u-h)*e.curvature),g=GS(l,h);return{x1:d.x,y1:d.y,x2:g.x,y2:g.y,cpx1:p.x,cpy1:p.y,cpx2:f.x,cpy2:f.y}}return s=t.x,u=t.y,l=i.x,h=i.y,"LR"!==c&&"RL"!==c||(n=s+(l-s)*e.curvature,a=u,r=l+(s-l)*e.curvature,o=h),"TB"!==c&&"BT"!==c||(n=s,a=u+(h-u)*e.curvature,r=l,o=h+(u-h)*e.curvature),{x1:s,y1:u,x2:l,y2:h,cpx1:n,cpy1:a,cpx2:r,cpy2:o}}var qS=iS.updateCenterAndZoom;Qv.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},(function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},(function(t){var i=e.dataIndex,n=t.getData().tree.getNodeByDataIndex(i);n.isExpand=!n.isExpand}))})),Qv.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},(function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},(function(t){var i=t.coordinateSystem,n=qS(i,e);t.setCenter&&t.setCenter(n.center),t.setZoom&&t.setZoom(n.zoom)}))}));var KS={eachAfter:function(e,t,i){for(var n,a=[e],r=[];n=a.pop();)if(r.push(n),n.isExpand){var o=n.children;if(o.length)for(var s=0;s<o.length;s++)a.push(o[s])}for(;n=r.pop();)t(n,i)},eachBefore:function(e,t){for(var i,n=[e];i=n.pop();)if(t(i),i.isExpand){var a=i.children;if(a.length)for(var r=a.length-1;r>=0;r--)n.push(a[r])}}},$S=KS.eachAfter,JS=KS.eachBefore,QS=VS.init,eM=VS.firstWalk,tM=VS.secondWalk,iM=VS.separation,nM=VS.radialCoordinate,aM=VS.getViewRect;var rM=function(e,t){e.eachSeriesByType("tree",(function(e){!function(e,t){var i=aM(e,t);e.layoutInfo=i;var n=e.get("layout"),a=0,r=0,o=null;"radial"===n?(a=2*Math.PI,r=Math.min(i.height,i.width)/2,o=iM((function(e,t){return(e.parentNode===t.parentNode?1:2)/e.depth}))):(a=i.width,r=i.height,o=iM());var s=e.getData().tree.root,l=s.children[0];if(l){QS(s),$S(l,eM,o),s.hierNode.modifier=-l.hierNode.prelim,JS(l,tM);var u=l,h=l,c=l;JS(l,(function(e){var t=e.getLayout().x;t<u.getLayout().x&&(u=e),t>h.getLayout().x&&(h=e),e.depth>c.depth&&(c=e)}));var d=u===h?1:o(u,h)/2,p=d-u.getLayout().x,f=0,g=0,m=0,v=0;if("radial"===n)f=a/(h.getLayout().x+d+p),g=r/(c.depth-1||1),JS(l,(function(e){m=(e.getLayout().x+p)*f,v=(e.depth-1)*g;var t=nM(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/(h.getLayout().x+d+p),f=a/(c.depth-1||1),JS(l,(function(e){v=(e.getLayout().x+p)*g,m="LR"===y?(e.depth-1)*f:a-(e.depth-1)*f,e.setLayout({x:m,y:v},!0)}))):"TB"!==y&&"BT"!==y||(f=a/(h.getLayout().x+d+p),g=r/(c.depth-1||1),JS(l,(function(e){m=(e.getLayout().x+p)*f,v="TB"===y?(e.depth-1)*g:r-(e.depth-1)*g,e.setLayout({x:m,y:v},!0)})))}}}(e,t)}))};function oM(e){for(var t=[];e;)(e=e.parentNode)&&t.push(e);return t.reverse()}Qv.registerVisual(ox("tree","circle")),Qv.registerLayout(rM);var sM={retrieveTargetInfo:function(e,t,i){if(e&&_e.indexOf(t,e.type)>=0){var n=i.getData().tree.root,a=e.targetNode;if("string"==typeof a&&(a=n.getNodeById(a)),a&&n.contains(a))return{node:a};var r=e.targetNodeId;if(null!=r&&(a=n.getNodeById(r)))return{node:a}}},getPathToRoot:oM,aboveViewRoot:function(e,t){var i=oM(e);return _e.indexOf(i,t)>=0},wrapTreePathInfo:function(e,t){for(var i=[];e;){var n=e.dataIndex;i.push({name:e.name,dataIndex:n,value:t.getRawValue(n)}),e=e.parentNode}return i.reverse(),i}},lM=Du.encodeHTML,uM=Du.addCommas,hM=sM.wrapTreePathInfo;Nd.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 i={name:e.name,children:e.data};!function e(t){var i=0;_e.each(t.children,(function(t){e(t);var n=t.value;_e.isArray(n)&&(n=n[0]),i+=n}));var n=t.value;_e.isArray(n)&&(n=n[0]);(null==n||isNaN(n))&&(n=i);n<0&&(n=0);_e.isArray(t.value)?t.value[0]=n:t.value=n}(i);var n=e.levels||[];n=e.levels=function(e,t){var i,n=t.get("color");if(!n)return;if(e=e||[],_e.each(e,(function(e){var t=new gu(e),n=t.get("color");(t.get("itemStyle.color")||n&&"none"!==n)&&(i=!0)})),!i){(e[0]||(e[0]={})).color=n.slice()}return e}(n,t);var a=_e.map(n||[],(function(e){return new gu(e,this,t)}),this),r=kS.createTree(i,this,null,(function(e){e.wrapMethod("getItemModel",(function(e,t){var i=r.getNodeByDataIndex(t),n=a[i.depth];return n&&(e.parentModel=n),e}))}));return r.data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(e){var t=this.getData(),i=this.getRawValue(e),n=_e.isArray(i)?uM(i[0]):uM(i),a=t.getName(e);return lM(a+": "+n)},getDataParams:function(e){var t=Nd.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return t.treePathInfo=hM(i,this),t},setLayoutInfo:function(e){this.layoutInfo=this.layoutInfo||{},_e.extend(this.layoutInfo,e)},mapIdToIndex:function(e){var t=this._idIndexMap;t||(t=this._idIndexMap=_e.createHashMap(),this._idIndexMapCount=0);var i=t.get(e);return null==i&&t.set(e,i=this._idIndexMapCount++),i},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 cM=sM.wrapTreePathInfo;function dM(e){this.group=new iu.Group,e.add(this.group)}function pM(e,t,i,n,a,r){var o=[[a?e:e-5,t],[e+i,t],[e+i,t+n],[a?e:e-5,t+n]];return!r&&o.splice(2,0,[e+i+5,t+n/2]),!a&&o.push([e,t+n/2]),o}function fM(e,t,i){e.eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.componentIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:i&&i.dataIndex,name:i&&i.name},treePathInfo:i&&cM(i,t)}}dM.prototype={constructor:dM,render:function(e,t,i,n){var a=e.getModel("breadcrumb"),r=this.group;if(r.removeAll(),a.get("show")&&i){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(i,l,s),this._renderContent(e,l,o,s,n),Gu.positionElement(r,l.pos,l.box)}},_prepare:function(e,t,i){for(var n=e;n;n=n.parentNode){var a=n.getModel().get("name"),r=i.getTextRect(a),o=Math.max(r.width+16,t.emptyItemWidth);t.totalWidth+=o+8,t.renderList.push({node:n,text:a,width:o})}},_renderContent:function(e,t,i,n,a){for(var r=0,o=t.emptyItemWidth,s=e.get("breadcrumb.height"),l=Gu.getAvailableSize(t.pos,t.box),u=t.totalWidth,h=t.renderList,c=h.length-1;c>=0;c--){var d=h[c],p=d.node,f=d.width,g=d.text;u>l.width&&(u-=f-o,f=o,g=null);var m=new iu.Polygon({shape:{points:pM(r,0,f,s,c===h.length-1,0===c)},style:_e.defaults(i.getItemStyle(),{lineJoin:"bevel",text:g,textFill:n.getTextColor(),textFont:n.getFont()}),z:10,onclick:_e.curry(a,p)});this.group.add(m),fM(m,e,p),r+=f+8}},remove:function(){this.group.removeAll()}};var gM=dM;var mM={createWrap:function(){var e,t=[],i={};return{add:function(e,n,a,r,o){return _e.isString(r)&&(o=r,r=0),!i[e.id]&&(i[e.id]=1,t.push({el:e,target:n,time:a,delay:r,easing:o}),!0)},done:function(t){return e=t,this},start:function(){for(var n=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(){--n||(t.length=0,i={},e&&e())}}}}},vM=Du.windowOpen,yM=_e.bind,xM=iu.Group,_M=iu.Rect,bM=_e.each,wM=["label"],SM=["emphasis","label"],MM=["upperLabel"],IM=["emphasis","upperLabel"],TM=Mr([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),AM=function(e){var t=TM(e);return t.stroke=t.fill=t.lineWidth=null,t};Qv.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,i,n){var a=t.findComponents({mainType:"series",subType:"treemap",query:n});if(!(_e.indexOf(a,e)<0)){this.seriesModel=e,this.api=i,this.ecModel=t;var r=sM.retrieveTargetInfo(n,["treemapZoomToNode","treemapRootToNode"],e),o=n&&n.type,s=e.layoutInfo,l=!this._oldTree,u=this._storage,h="treemapRootToNode"===o&&r&&u?{rootNodeGroup:u.nodeGroup[r.node.getRawIndex()],direction:n.direction}:null,c=this._giveContainerGroup(s),d=this._doRender(c,e,h);l||o&&"treemapZoomToNode"!==o&&"treemapRootToNode"!==o?d.renderFinally():this._doAnimation(c,d,e,h),this._resetController(i),this._renderBreadcrumb(e,i,r)}},_giveContainerGroup:function(e){var t=this._containerGroup;return t||(t=this._containerGroup=new xM,this._initEvents(t),this.group.add(t)),t.attr("position",[e.x,e.y]),t},_doRender:function(e,t,i){var n=t.getData().tree,a=this._oldTree,r={nodeGroup:[],background:[],content:[]},o={nodeGroup:[],background:[],content:[]},s=this._storage,l=[],u=_e.curry(CM,t,o,s,i,r,l);!function e(t,i,n,a,r){a?(i=t,bM(t,(function(e,t){!e.isRemoved()&&s(t,t)}))):new Tf(i,t,o,o).add(s).update(s).remove(_e.curry(s,null)).execute();function o(e){return e.getId()}function s(o,s){var l=null!=o?t[o]:null,h=null!=s?i[s]:null,c=u(l,h,n,r);c&&e(l&&l.viewChildren||[],h&&h.viewChildren||[],c,a,r+1)}}(n.root?[n.root]:[],a&&a.root?[a.root]:[],e,n===a||!a,0);var h=function(e){var t={nodeGroup:[],background:[],content:[]};return e&&bM(e,(function(e,i){var n=t[i];bM(e,(function(e){e&&(n.push(e),e.__tmWillDelete=1)}))})),t}(s);return this._oldTree=n,this._storage=o,{lastsForAnimation:r,willDeleteEls:h,renderFinally:function(){bM(h,(function(e){bM(e,(function(e){e.parent&&e.parent.remove(e)}))})),bM(l,(function(e){e.invisible=!0,e.dirty()}))}}},_doAnimation:function(e,t,i,n){if(i.get("animation")){var a=i.get("animationDurationUpdate"),r=i.get("animationEasing"),o=mM.createWrap();bM(t.willDeleteEls,(function(e,t){bM(e,(function(e,i){if(!e.invisible){var s,l=e.parent;if(n&&"drillDown"===n.direction)s=l===n.rootNodeGroup?{shape:{x:0,y:0,width:l.__tmNodeWidth,height:l.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var u=0,h=0;l.__tmWillDelete||(u=l.__tmNodeWidth/2,h=l.__tmNodeHeight/2),s="nodeGroup"===t?{position:[u,h],style:{opacity:0}}:{shape:{x:u,y:h,width:0,height:0},style:{opacity:0}}}s&&o.add(e,s,a,r)}}))})),bM(this._storage,(function(e,i){bM(e,(function(e,n){var s=t.lastsForAnimation[i][n],l={};s&&("nodeGroup"===i?s.old&&(l.position=e.position.slice(),e.attr("position",s.old)):(s.old&&(l.shape=_e.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(yM((function(){this._state="ready",t.renderFinally()}),this)).start()}},_resetController:function(e){var t=this._controller;t||((t=this._controller=new Uw(e.getZr())).enable(this.seriesModel.get("roam")),t.on("pan",yM(this._onPan,this)),t.on("zoom",yM(this._onZoom,this)));var i=new Oi(0,0,e.getWidth(),e.getHeight());t.setPointerChecker((function(e,t,n){return i.contain(t,n)}))},_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 i=t.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+e.dx,y:i.y+e.dy,width:i.width,height:i.height}})}},_onZoom:function(e){var t=e.originX,i=e.originY;if("animating"!==this._state){var n=this.seriesModel.getData().tree.root;if(!n)return;var a=n.getLayout();if(!a)return;var r=new Oi(a.x,a.y,a.width,a.height),o=this.seriesModel.layoutInfo;t-=o.x,i-=o.y;var s=dt.create();dt.translate(s,s,[-t,-i]),dt.scale(s,s,[e.scale,e.scale]),dt.translate(s,s,[t,i]),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 i=this.findTarget(e.offsetX,e.offsetY);if(i){var n=i.node;if(n.getLayout().isLeafRoot)this._rootToNode(i);else if("zoomToNode"===t)this._zoomToNode(i);else if("link"===t){var a=n.hostTree.data.getItemModel(n.dataIndex),r=a.get("link",!0),o=a.get("target",!0)||"blank";r&&vM(r,o)}}}}}),this)},_renderBreadcrumb:function(e,t,i){i||(i=null!=e.get("leafDepth",!0)?{node:e.getViewRoot()}:this.findTarget(t.getWidth()/2,t.getHeight()/2))||(i={node:e.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new gM(this.group))).render(e,t,i.node,yM((function(t){"animating"!==this._state&&(sM.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 i;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},(function(n){var a=this._storage.background[n.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;i={node:n,offsetX:r[0],offsetY:r[1]}}}),this),i}});function CM(e,t,i,n,a,r,o,s,l,u){if(o){var h=o.getLayout(),c=e.getData();if(c.setItemGraphicEl(o.dataIndex,null),h&&h.isInView){var d=h.width,p=h.height,f=h.borderWidth,g=h.invisible,m=o.getRawIndex(),v=s&&s.getRawIndex(),y=o.viewChildren,x=h.upperHeight,_=y&&y.length,b=o.getModel("itemStyle"),w=o.getModel("emphasis.itemStyle"),S=L("nodeGroup",xM);if(S){if(l.add(S),S.attr("position",[h.x||0,h.y||0]),S.__tmNodeWidth=d,S.__tmNodeHeight=p,h.isAboveViewRoot)return S;var M=o.getModel(),I=L("background",_M,u,1);if(I&&function(t,i,n){if(i.dataIndex=o.dataIndex,i.seriesIndex=e.seriesIndex,i.setShape({x:0,y:0,width:d,height:p}),g)A(i);else{i.invisible=!1;var a=o.getVisual("borderColor",!0),r=w.get("borderColor"),s=AM(b);s.fill=a;var l=TM(w);if(l.fill=r,n){var u=d-2*f;C(s,l,a,u,x,{x:f,y:0,width:u,height:x})}else s.text=l.text=null;i.setStyle(s),iu.setElementHoverStyle(i,l)}t.add(i)}(S,I,_&&h.upperLabelHeight),_)iu.isHighDownDispatcher(S)&&iu.setAsHighDownDispatcher(S,!1),I&&(iu.setAsHighDownDispatcher(I,!0),c.setItemGraphicEl(o.dataIndex,I));else{var T=L("content",_M,u,2);T&&function(t,i){i.dataIndex=o.dataIndex,i.seriesIndex=e.seriesIndex;var n=Math.max(d-2*f,0),a=Math.max(p-2*f,0);if(i.culling=!0,i.setShape({x:f,y:f,width:n,height:a}),g)A(i);else{i.invisible=!1;var r=o.getVisual("color",!0),s=AM(b);s.fill=r;var l=TM(w);C(s,l,r,n,a),i.setStyle(s),iu.setElementHoverStyle(i,l)}t.add(i)}(S,T),I&&iu.isHighDownDispatcher(I)&&iu.setAsHighDownDispatcher(I,!1),iu.setAsHighDownDispatcher(S,!0),c.setItemGraphicEl(o.dataIndex,S)}return S}}}function A(e){!e.invisible&&r.push(e)}function C(t,i,n,a,r,s){var l=M.get("name"),u=M.getModel(s?MM:wM),c=M.getModel(s?IM:SM),d=u.getShallow("show");iu.setLabelStyle(t,i,u,c,{defaultText:d?l:null,autoColor:n,isRectText:!0,labelFetcher:e,labelDataIndex:o.dataIndex,labelProp:s?"upperLabel":"label"}),D(t,s,h),D(i,s,h),s&&(t.textRect=_e.clone(s)),t.truncate=d&&u.get("ellipsis")?{outerWidth:a,outerHeight:r,minChar:2}:null}function D(t,i,n){var a=t.text;if(!i&&n.isLeafRoot&&null!=a){var r=e.get("drillDownIcon",!0);t.text=r?r+" "+a:a}}function L(e,r,s,l){var u=null!=v&&i[e][v],h=a[e];return u?(i[e][v]=null,function(e,t,i){(e[m]={}).old="nodeGroup"===i?t.position.slice():_e.extend({},t.shape)}(h,u,e)):g||((u=new r({z:DM(s,l)})).__tmDepth=s,u.__tmStorageName=e,function(e,t,i){var r=e[m]={},s=o.parentNode;if(s&&(!n||"drillDown"===n.direction)){var l=0,u=0,h=a.background[s.getRawIndex()];!n&&h&&h.old&&(l=h.old.width,u=h.old.height),r.old="nodeGroup"===i?[0,u]:{x:l,y:u,width:0,height:0}}r.fadein="nodeGroup"!==i}(h,0,e)),t[e][m]=u}}function DM(e,t){var i=10*e+t;return(i-1)/i}for(var LM=function(){},PM=["treemapZoomToNode","treemapRender","treemapMove"],kM=0;kM<PM.length;kM++)Qv.registerAction({type:PM[kM],update:"updateView"},LM);Qv.registerAction({type:"treemapRootToNode",update:"updateView"},(function(e,t){t.eachComponent({mainType:"series",subType:"treemap",query:e},(function(t,i){var n=sM.retrieveTargetInfo(e,["treemapZoomToNode","treemapRootToNode"],t);if(n){var a=t.getViewRoot();a&&(e.direction=sM.aboveViewRoot(a,n.node)?"rollUp":"drillDown"),t.resetViewRoot(n.node)}}))}));var OM=bu.linearMap,RM=_e.each,NM=_e.isObject,EM=function(e){var t=e.mappingMethod,i=e.type,n=this.option=_e.clone(e);this.type=i,this.mappingMethod=t,this._normalizeData=YM[t];var a=zM[i];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._doMap=a._doMap[t],"piecewise"===t?(BM(n),function(e){var t=e.pieceList;e.hasSpecialVisual=!1,_e.each(t,(function(t,i){t.originIndex=i,null!=t.visual&&(e.hasSpecialVisual=!0)}))}(n)):"category"===t?n.categories?function(e){var t=e.categories,i=e.visual,n=e.categoryMap={};if(RM(t,(function(e,t){n[e]=t})),!_e.isArray(i)){var a=[];_e.isObject(i)?RM(i,(function(e,t){var i=n[t];a[null!=i?i:-1]=e})):a[-1]=i,i=jM(e,a)}for(var r=t.length-1;r>=0;r--)null==i[r]&&(delete n[t[r]],t.pop())}(n):BM(n,!0):(_e.assert("linear"!==t||n.dataExtent),BM(n))};EM.prototype={constructor:EM,mapValueToVisual:function(e){var t=this._normalizeData(e);return this._doMap(t,e)},getNormalizer:function(){return _e.bind(this._normalizeData,this)}};var zM=EM.visualHandlers={color:{applyVisual:FM("color"),getColorMapper:function(){var e=this.option;return _e.bind("category"===e.mappingMethod?function(e,t){return!t&&(e=this._normalizeData(e)),HM.call(this,e)}:function(t,i,n){var a=!!n;return!i&&(t=this._normalizeData(t)),n=Xt.fastLerp(t,e.parsedVisual,n),a?n:Xt.stringify(n,"rgba")},this)},_doMap:{linear:function(e){return Xt.stringify(Xt.fastLerp(e,this.option.parsedVisual),"rgba")},category:HM,piecewise:function(e,t){var i=ZM.call(this,t);return null==i&&(i=Xt.stringify(Xt.fastLerp(e,this.option.parsedVisual),"rgba")),i},fixed:WM}},colorHue:VM((function(e,t){return Xt.modifyHSL(e,t)})),colorSaturation:VM((function(e,t){return Xt.modifyHSL(e,null,t)})),colorLightness:VM((function(e,t){return Xt.modifyHSL(e,null,null,t)})),colorAlpha:VM((function(e,t){return Xt.modifyAlpha(e,t)})),opacity:{applyVisual:FM("opacity"),_doMap:UM([0,1])},liftZ:{applyVisual:FM("liftZ"),_doMap:{linear:WM,category:WM,piecewise:WM,fixed:WM}},symbol:{applyVisual:function(e,t,i){var n=this.mapValueToVisual(e);if(_e.isString(n))i("symbol",n);else if(NM(n))for(var a in n)n.hasOwnProperty(a)&&i(a,n[a])},_doMap:{linear:GM,category:HM,piecewise:function(e,t){var i=ZM.call(this,t);return null==i&&(i=GM.call(this,e)),i},fixed:WM}},symbolSize:{applyVisual:FM("symbolSize"),_doMap:UM([0,1])}};function BM(e,t){var i=e.visual,n=[];_e.isObject(i)?RM(i,(function(e){n.push(e)})):null!=i&&n.push(i);t||1!==n.length||{color:1,symbol:1}.hasOwnProperty(e.type)||(n[1]=n[0]),jM(e,n)}function VM(e){return{applyVisual:function(t,i,n){t=this.mapValueToVisual(t),n("color",e(i("color"),t))},_doMap:UM([0,1])}}function GM(e){var t=this.option.visual;return t[Math.round(OM(e,[0,1],[0,t.length-1],!0))]||{}}function FM(e){return function(t,i,n){n(e,this.mapValueToVisual(t))}}function HM(e){var t=this.option.visual;return t[this.option.loop&&-1!==e?e%t.length:e]}function WM(){return this.option.visual[0]}function UM(e){return{linear:function(t){return OM(t,e,this.option.visual,!0)},category:HM,piecewise:function(t,i){var n=ZM.call(this,i);return null==n&&(n=OM(t,e,this.option.visual,!0)),n},fixed:WM}}function ZM(e){var t=this.option,i=t.pieceList;if(t.hasSpecialVisual){var n=i[EM.findPieceIndex(e,i)];if(n&&n.visual)return n.visual[this.type]}}function jM(e,t){return e.visual=t,"color"===e.type&&(e.parsedVisual=_e.map(t,(function(e){return Xt.parse(e)}))),t}var YM={linear:function(e){return OM(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,i=EM.findPieceIndex(e,t,!0);if(null!=i)return OM(i,[0,t.length-1],[0,1],!0)},category:function(e){var t=this.option.categories?this.option.categoryMap[e]:e;return null==t?-1:t},fixed:_e.noop};function XM(e,t,i){return e?t<=i:t<i}EM.listVisualTypes=function(){var e=[];return _e.each(zM,(function(t,i){e.push(i)})),e},EM.addVisualHandler=function(e,t){zM[e]=t},EM.isValidType=function(e){return zM.hasOwnProperty(e)},EM.eachVisual=function(e,t,i){_e.isObject(e)?_e.each(e,t,i):t.call(i,e)},EM.mapVisual=function(e,t,i){var n,a=_e.isArray(e)?[]:_e.isObject(e)?{}:(n=!0,null);return EM.eachVisual(e,(function(e,r){var o=t.call(i,e,r);n?a=o:a[r]=o})),a},EM.retrieveVisuals=function(e){var t,i={};return e&&RM(zM,(function(n,a){e.hasOwnProperty(a)&&(i[a]=e[a],t=!0)})),t?i:null},EM.prepareVisualTypes=function(e){if(NM(e)){var t=[];RM(e,(function(e,i){t.push(i)})),e=t}else{if(!_e.isArray(e))return[];e=e.slice()}return e.sort((function(e,t){return"color"===t&&"color"!==e&&0===e.indexOf("color")?1:-1})),e},EM.dependsOn=function(e,t){return"color"===t?!(!e||0!==e.indexOf(t)):e===t},EM.findPieceIndex=function(e,t,i){for(var n,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;i&&c(s,r)}}for(r=0,o=t.length;r<o;r++){var l=t[r],u=l.interval,h=l.close;if(u){if(u[0]===-1/0){if(XM(h[1],e,u[1]))return r}else if(u[1]===1/0){if(XM(h[0],u[0],e))return r}else if(XM(h[0],u[0],e)&&XM(h[1],e,u[1]))return r;i&&c(u[0],r),i&&c(u[1],r)}}if(i)return e===1/0?t.length-1:e===-1/0?0:n;function c(t,i){var r=Math.abs(t-e);r<a&&(a=r,n=i)}};var qM=EM,KM=_e.isArray;function $M(e){var t=JM(e,"color");if(t){var i=JM(e,"colorAlpha"),n=JM(e,"colorSaturation");return n&&(t=Xt.modifyHSL(t,null,null,n)),i&&(t=Xt.modifyAlpha(t,i)),t}}function JM(e,t){var i=e[t];if(null!=i&&"none"!==i)return i}function QM(e,t){var i=e.get(t);return KM(i)&&i.length?{name:t,range:i}:null}var eI={seriesType:"treemap",reset:function(e,t,i,n){var a=e.getData().tree,r=a.root,o=e.getModel("itemStyle");r.isRemoved()||function e(t,i,n,a,r,o){var s=t.getModel(),l=t.getLayout();if(!l||l.invisible||!l.isInView)return;var u,h=t.getModel("itemStyle"),c=n[t.depth],d=function(e,t,i,n){var a=_e.extend({},t);return _e.each(["color","colorAlpha","colorSaturation"],(function(r){var o=e.get(r,!0);null==o&&i&&(o=i[r]),null==o&&(o=t[r]),null==o&&(o=n.get(r)),null!=o&&(a[r]=o)})),a}(h,i,c,a),p=h.get("borderColor"),f=h.get("borderColorSaturation");null!=f&&(u=$M(d),p=function(e,t){return null!=t?Xt.modifyHSL(t,null,null,e):null}(f,u));t.setVisual("borderColor",p);var g=t.viewChildren;if(g&&g.length){var m=function(e,t,i,n,a,r){if(!r||!r.length)return;var o=QM(t,"color")||null!=a.color&&"none"!==a.color&&(QM(t,"colorAlpha")||QM(t,"colorSaturation"));if(!o)return;var s=t.get("visualMin"),l=t.get("visualMax"),u=i.dataExtent.slice();null!=s&&s<u[0]&&(u[0]=s),null!=l&&l>u[1]&&(u[1]=l);var h=t.get("colorMappingBy"),c={type:o.name,dataExtent:u,visual:o.range};"color"!==c.type||"index"!==h&&"id"!==h?c.mappingMethod="linear":(c.mappingMethod="category",c.loop=!0);var d=new qM(c);return d.__drColorMappingBy=h,d}(0,s,l,0,d,g);_e.each(g,(function(t,i){if(t.depth>=r.length||t===r[t.depth]){var l=function(e,t,i,n,a,r){var o=_e.extend({},t);if(a){var s=a.type,l="color"===s&&a.__drColorMappingBy,u="index"===l?n:"id"===l?r.mapIdToIndex(i.getId()):i.getValue(e.get("visualDimension"));o[s]=a.mapValueToVisual(u)}return o}(s,d,t,i,m,o);e(t,l,n,a,r,o)}}))}else u=$M(d),t.setVisual("color",u)}(r,{},_e.map(a.levelModels,(function(e){return e?e.get("itemStyle"):null})),o,e.getViewRoot().getAncestors(),e)}},tI=bu.parsePercent,iI=bu.MAX_SAFE_INTEGER,nI=Math.max,aI=Math.min,rI=_e.retrieve,oI=_e.each,sI=["itemStyle","borderWidth"],lI=["itemStyle","gapWidth"],uI=["upperLabel","show"],hI=["upperLabel","height"];function cI(e,t,i){for(var n,a=0,r=1/0,o=0,s=e.length;o<s;o++)(n=e[o].getLayout().area)&&(n<r&&(r=n),n>a&&(a=n));var l=e.area*e.area,u=t*t*i;return l?nI(u*a/l,l/(u*r)):1/0}function dI(e,t,i,n,a){var r=t===i.width?0:1,o=1-r,s=["x","y"],l=["width","height"],u=i[s[r]],h=t?e.area/t:0;(a||h>i[l[o]])&&(h=i[l[o]]);for(var c=0,d=e.length;c<d;c++){var p=e[c],f={},g=h?p.getLayout().area/h:0,m=f[l[o]]=nI(h-2*n,0),v=i[s[r]]+i[l[r]]-u,y=c===d-1||v<g?v:g,x=f[l[r]]=nI(y-2*n,0);f[s[o]]=i[s[o]]+aI(n,m/2),f[s[r]]=u+aI(n,x/2),u+=y,p.setLayout(f,!0)}i[s[o]]+=h,i[l[o]]-=h}function pI(e){return e.get(uI)?e.get(hI):0}var fI={seriesType:"treemap",reset:function(e,t,i,n){var a=i.getWidth(),r=i.getHeight(),o=e.option,s=Gu.getLayoutRect(e.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()}),l=o.size||[],u=tI(rI(s.width,l[0]),a),h=tI(rI(s.height,l[1]),r),c=n&&n.type,d=sM.retrieveTargetInfo(n,["treemapZoomToNode","treemapRootToNode"],e),p="treemapRender"===c||"treemapMove"===c?n.rootRect:null,f=e.getViewRoot(),g=sM.getPathToRoot(f);if("treemapMove"!==c){var m="treemapZoomToNode"===c?function(e,t,i,n,a){var r,o=(t||{}).node,s=[n,a];if(!o||o===i)return s;var l=n*a,u=l*e.option.zoomToNodeRatio;for(;r=o.parentNode;){for(var h=0,c=r.children,d=0,p=c.length;d<p;d++)h+=c[d].getValue();var f=o.getValue();if(0===f)return s;u*=h/f;var g=r.getModel(),m=g.get(sI),v=Math.max(m,pI(g));(u+=4*m*m+(3*m+v)*Math.pow(u,.5))>iI&&(u=iI),o=r}u<l&&(u=l);var y=Math.pow(u/l,.5);return[n*y,a*y]}(e,d,f,u,h):p?[p.width,p.height]:[u,h],v=o.sort;v&&"asc"!==v&&"desc"!==v&&(v="desc");var y={squareRatio:o.squareRatio,sort:v,leafDepth:o.leafDepth};f.hostTree.clearLayouts();var x={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};f.setLayout(x),function e(t,i,n,a){var r,o;if(t.isRemoved())return;var s=t.getLayout();r=s.width,o=s.height;var l=(f=t.getModel()).get(sI),u=f.get(lI)/2,h=pI(f),c=Math.max(l,h),d=l-u,p=c-u,f=t.getModel();t.setLayout({borderWidth:l,upperHeight:c,upperLabelHeight:h},!0),r=nI(r-2*d,0),o=nI(o-d-p,0);var g=r*o,m=function(e,t,i,n,a,r){var o=e.children||[],s=n.sort;"asc"!==s&&"desc"!==s&&(s=null);var l=null!=n.leafDepth&&n.leafDepth<=r;if(a&&!l)return e.viewChildren=[];!function(e,t){t&&e.sort((function(e,i){var n="asc"===t?e.getValue()-i.getValue():i.getValue()-e.getValue();return 0===n?"asc"===t?e.dataIndex-i.dataIndex:i.dataIndex-e.dataIndex:n}))}(o=_e.filter(o,(function(e){return!e.isRemoved()})),s);var u=function(e,t,i){for(var n=0,a=0,r=t.length;a<r;a++)n+=t[a].getValue();var o=e.get("visualDimension");if(t&&t.length)if("value"===o&&i)s=[t[t.length-1].getValue(),t[0].getValue()],"asc"===i&&s.reverse();else{var s=[1/0,-1/0];oI(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:n,dataExtent:s}}(t,o,s);if(0===u.sum)return e.viewChildren=[];if(u.sum=function(e,t,i,n,a){if(!n)return i;for(var r=e.get("visibleMin"),o=a.length,s=o,l=o-1;l>=0;l--){var u=a["asc"===n?o-l-1:l].getValue();u/i*t<r&&(s=l,i-=u)}return"asc"===n?a.splice(0,o-s):a.splice(s,o-s),i}(t,i,u.sum,s,o),0===u.sum)return e.viewChildren=[];for(var h=0,c=o.length;h<c;h++){var d=o[h].getValue()/u.sum*i;o[h].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}(t,f,g,i,n,a);if(!m.length)return;var v={x:d,y:p,width:r,height:o},y=aI(r,o),x=1/0,_=[];_.area=0;for(var b=0,w=m.length;b<w;){var S=m[b];_.push(S),_.area+=S.getLayout().area;var M=cI(_,y,i.squareRatio);M<=x?(b++,x=M):(_.area-=_.pop().getLayout().area,dI(_,y,v,u,!1),y=aI(v.width,v.height),_.length=_.area=0,x=1/0)}_.length&&dI(_,y,v,u,!0);if(!n){var I=f.get("childrenVisibleMin");null!=I&&g<I&&(n=!0)}for(b=0,w=m.length;b<w;b++)e(m[b],i,n,a+1)}(f,y,!1,0);x=f.getLayout();oI(g,(function(e,t){var i=(g[t+1]||f).getValue();e.setLayout(_e.extend({dataExtent:[i,i],borderWidth:0,upperHeight:0},x))}))}var _=e.getData().tree.root;_.setLayout(function(e,t,i){if(t)return{x:t.x,y:t.y};var n={x:0,y:0};if(!i)return n;var a=i.node,r=a.getLayout();if(!r)return n;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,p,d),!0),e.setLayoutInfo(s),function e(t,i,n,a,r){var o=t.getLayout(),s=n[r],l=s&&s===t;if(s&&!l||r===n.length&&t!==a)return;t.setLayout({isInView:!0,invisible:!l&&!i.intersect(o),isAboveViewRoot:l},!0);var u=new Oi(i.x-o.x,i.y-o.y,i.width,i.height);oI(t.viewChildren||[],(function(t){e(t,u,n,a,r+1)}))}(_,new Oi(-s.x,-s.y,a,r),g,f,0)}};Qv.registerVisual(eI),Qv.registerLayout(fI);var gI=Sr.enableClassCheck;function mI(e){return"_EC_"+e}var vI=function(e){this._directed=e||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData},yI=vI.prototype;function xI(e,t){this.id=null==e?"":e,this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=null==t?-1:t}function _I(e,t,i){this.node1=e,this.node2=t,this.dataIndex=null==i?-1:i}yI.type="graph",yI.isDirected=function(){return this._directed},yI.addNode=function(e,t){e=null==e?""+t:""+e;var i=this._nodesMap;if(!i[mI(e)]){var n=new xI(e,t);return n.hostGraph=this,this.nodes.push(n),i[mI(e)]=n,n}},yI.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},yI.getNodeById=function(e){return this._nodesMap[mI(e)]},yI.addEdge=function(e,t,i){var n=this._nodesMap,a=this._edgesMap;if("number"==typeof e&&(e=this.nodes[e]),"number"==typeof t&&(t=this.nodes[t]),xI.isInstance(e)||(e=n[mI(e)]),xI.isInstance(t)||(t=n[mI(t)]),e&&t){var r=e.id+"-"+t.id;if(!a[r]){var o=new _I(e,t,i);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}}},yI.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},yI.getEdge=function(e,t){xI.isInstance(e)&&(e=e.id),xI.isInstance(t)&&(t=t.id);var i=this._edgesMap;return this._directed?i[e+"-"+t]:i[e+"-"+t]||i[t+"-"+e]},yI.eachNode=function(e,t){for(var i=this.nodes,n=i.length,a=0;a<n;a++)i[a].dataIndex>=0&&e.call(t,i[a],a)},yI.eachEdge=function(e,t){for(var i=this.edges,n=i.length,a=0;a<n;a++)i[a].dataIndex>=0&&i[a].node1.dataIndex>=0&&i[a].node2.dataIndex>=0&&e.call(t,i[a],a)},yI.breadthFirstTraverse=function(e,t,i,n){if(xI.isInstance(t)||(t=this._nodesMap[mI(t)]),t){for(var a="out"===i?"outEdges":"in"===i?"inEdges":"edges",r=0;r<this.nodes.length;r++)this.nodes[r].__visited=!1;if(!e.call(n,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],h=u.node1===s?u.node2:u.node1;if(!h.__visited){if(e.call(n,h,s))return;o.push(h),h.__visited=!0}}}}},yI.update=function(){for(var e=this.data,t=this.edgeData,i=this.nodes,n=this.edges,a=0,r=i.length;a<r;a++)i[a].dataIndex=-1;for(a=0,r=e.count();a<r;a++)i[e.getRawIndex(a)].dataIndex=a;t.filterSelf((function(e){var i=n[t.getRawIndex(e)];return i.node1.dataIndex>=0&&i.node2.dataIndex>=0}));for(a=0,r=n.length;a<r;a++)n[a].dataIndex=-1;for(a=0,r=t.count();a<r;a++)n[t.getRawIndex(a)].dataIndex=a},yI.clone=function(){for(var e=new vI(this._directed),t=this.nodes,i=this.edges,n=0;n<t.length;n++)e.addNode(t[n].id,t[n].dataIndex);for(n=0;n<i.length;n++){var a=i[n];e.addEdge(a.node1.id,a.node2.id,a.dataIndex)}return e},xI.prototype={constructor:xI,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)}},_I.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(e)};var bI=function(e,t){return{getValue:function(i){var n=this[e][t];return n.get(n.getDimension(i||"value"),this.dataIndex)},setVisual:function(i,n){this.dataIndex>=0&&this[e][t].setItemVisual(this.dataIndex,i,n)},getVisual:function(i,n){return this[e][t].getItemVisual(this.dataIndex,i,n)},setLayout:function(i,n){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,i,n)},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)}}};_e.mixin(xI,bI("hostGraph","data")),_e.mixin(_I,bI("hostGraph","edgeData")),vI.Node=xI,vI.Edge=_I,gI(xI),gI(_I);var wI=vI;var SI=function(e,t,i,n,a){for(var r=new wI(n),o=0;o<e.length;o++)r.addNode(_e.retrieve(e[o].id,e[o].name,o),o);var s=[],l=[],u=0;for(o=0;o<t.length;o++){var h=t[o],c=h.source,d=h.target;r.addEdge(c,d,u)&&(l.push(h),s.push(_e.retrieve(h.id,c+" > "+d)),u++)}var p,f=i.get("coordinateSystem");if("cartesian2d"===f||"polar"===f)p=Ng(e,i);else{var g=ac.get(f),m=g&&"view"!==g.type&&g.dimensions||[];_e.indexOf(m,"value")<0&&m.concat(["value"]);var v=yg(e,{coordDimensions:m});(p=new ag(v,i)).initData(e)}var y=new ag(["value"],i);return y.initData(l,s),a&&a(p,y),DS({mainData:p,struct:r,structAttr:"graph",datas:{node:p,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),r.update(),r},MI=vr.defaultEmphasis,II=Du.encodeHTML,TI=Qv.extendSeriesModel({type:"series.graph",init:function(e){TI.superApply(this,"init",arguments);var t=this;function i(){return t._categoriesData}this.legendVisualProvider=new cb(i,i),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},mergeOption:function(e){TI.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(e){TI.superApply(this,"mergeDefaultAndTheme",arguments),MI(e,["edgeLabel"],["show"])},getInitialData:function(e,t){var i=e.edges||e.links||[],n=e.data||e.nodes||[],a=this;if(n&&i)return SI(n,i,this,!0,(function(e,i){e.wrapMethod("getItemModel",(function(e){var t=a._categoriesModels[e.getShallow("category")];return t&&(t.parentModel=e.parentModel,e.parentModel=t),e}));var n=a.getModel("edgeLabel"),r=new gu({label:n.option},n.parentModel,t),o=a.getModel("emphasis.edgeLabel"),s=new gu({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}i.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,i){if("edge"===i){var n=this.getData(),a=this.getDataParams(e,i),r=n.graph.getEdgeByIndex(e),o=n.getName(r.node1.dataIndex),s=n.getName(r.node2.dataIndex),l=[];return null!=o&&l.push(o),null!=s&&l.push(s),l=II(l.join(" > ")),a.value&&(l+=" : "+II(a.value)),l}return TI.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var e=_e.map(this.option.categories||[],(function(e){return null!=e.value?e:_e.extend({value:0},e)})),t=new ag(["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 TI.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}}}}),AI=iu.Line.prototype,CI=iu.BezierCurve.prototype;function DI(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}var LI=iu.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[DI(t)?"_buildPathLine":"_buildPathCurve"](e,t)},_buildPathLine:AI.buildPath,_buildPathCurve:CI.buildPath,pointAt:function(e){return this[DI(this.shape)?"_pointAtLine":"_pointAtCurve"](e)},_pointAtLine:AI.pointAt,_pointAtCurve:CI.pointAt,tangentAt:function(e){var t=this.shape,i=DI(t)?[t.x2-t.x1,t.y2-t.y1]:this._tangentAtCurve(e);return Te.normalize(i,i)},_tangentAtCurve:CI.tangentAt}),PI=bu.round,kI=["fromSymbol","toSymbol"];function OI(e){return"_"+e+"Type"}function RI(e,t,i){var n=t.getItemVisual(i,"color"),a=t.getItemVisual(i,e),r=t.getItemVisual(i,e+"Size");if(a&&"none"!==a){_e.isArray(r)||(r=[r,r]);var o=ev.createSymbol(a,-r[0]/2,-r[1]/2,r[0],r[1],n);return o.name=e,o}}function NI(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 i=t[2];i?(e.cpx1=i[0],e.cpy1=i[1]):(e.cpx1=NaN,e.cpy1=NaN)}function EI(e,t,i){iu.Group.call(this),this._createLine(e,t,i)}var zI=EI.prototype;zI.beforeUpdate=function(){var e=this.childOfName("fromSymbol"),t=this.childOfName("toSymbol"),i=this.childOfName("label");if(e||t||!i.ignore){for(var n=1,a=this.parent;a;)a.scale&&(n/=a.scale[0]),a=a.parent;var r=this.childOfName("line");if(this.__dirty||r.__dirty){var o=r.shape.percent,s=r.pointAt(0),l=r.pointAt(o),u=Te.sub([],l,s);if(Te.normalize(u,u),e){e.attr("position",s);var h=r.tangentAt(0);e.attr("rotation",Math.PI/2-Math.atan2(h[1],h[0])),e.attr("scale",[n*o,n*o])}if(t){t.attr("position",l);h=r.tangentAt(1);t.attr("rotation",-Math.PI/2-Math.atan2(h[1],h[0])),t.attr("scale",[n*o,n*o])}if(!i.ignore){var c,d,p,f;i.attr("position",l);var g=i.__labelDistance,m=g[0]*n,v=g[1]*n,y=o/2,x=[(h=r.tangentAt(y))[1],-h[0]],_=r.pointAt(y);x[1]>0&&(x[0]=-x[0],x[1]=-x[1]);var b,w=h[0]<0?-1:1;if("start"!==i.__position&&"end"!==i.__position){var S=-Math.atan2(h[1],h[0]);l[0]<s[0]&&(S=Math.PI+S),i.attr("rotation",S)}switch(i.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":b=-v,p="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":b=v,p="top";break;default:b=0,p="middle"}switch(i.__position){case"end":c=[u[0]*m+l[0],u[1]*v+l[1]],d=u[0]>.8?"left":u[0]<-.8?"right":"center",p=u[1]>.8?"top":u[1]<-.8?"bottom":"middle";break;case"start":c=[-u[0]*m+s[0],-u[1]*v+s[1]],d=u[0]>.8?"right":u[0]<-.8?"left":"center",p=u[1]>.8?"bottom":u[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":c=[m*w+s[0],s[1]+b],d=h[0]<0?"right":"left",f=[-m*w,-b];break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":c=[_[0],_[1]+b],d="center",f=[0,-b];break;case"insideEndTop":case"insideEnd":case"insideEndBottom":c=[-m*w+l[0],l[1]+b],d=h[0]>=0?"right":"left",f=[m*w,-b]}i.attr({style:{textVerticalAlign:i.__verticalAlign||p,textAlign:i.__textAlign||d},position:c,scale:[n,n],origin:f})}}}},zI._createLine=function(e,t,i){var n=e.hostModel,a=function(e){var t=new LI({name:"line",subPixelOptimize:!0});return NI(t.shape,e),t}(e.getItemLayout(t));a.shape.percent=0,iu.initProps(a,{shape:{percent:1}},n,t),this.add(a);var r=new iu.Text({name:"label",lineLabelOriginalOpacity:1});this.add(r),_e.each(kI,(function(i){var n=RI(i,e,t);this.add(n),this[OI(i)]=e.getItemVisual(t,i)}),this),this._updateCommonStl(e,t,i)},zI.updateData=function(e,t,i){var n=e.hostModel,a=this.childOfName("line"),r=e.getItemLayout(t),o={shape:{}};NI(o.shape,r),iu.updateProps(a,o,n,t),_e.each(kI,(function(i){var n=e.getItemVisual(t,i),a=OI(i);if(this[a]!==n){this.remove(this.childOfName(i));var r=RI(i,e,t);this.add(r)}this[a]=n}),this),this._updateCommonStl(e,t,i)},zI._updateCommonStl=function(e,t,i){var n=e.hostModel,a=this.childOfName("line"),r=i&&i.lineStyle,o=i&&i.hoverLineStyle,s=i&&i.labelModel,l=i&&i.hoverLabelModel;if(!i||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 h=e.getItemVisual(t,"color"),c=_e.retrieve3(e.getItemVisual(t,"opacity"),r.opacity,1);a.useStyle(_e.defaults({strokeNoScale:!0,fill:"none",stroke:h,opacity:c},r)),a.hoverStyle=o,_e.each(kI,(function(e){var t=this.childOfName(e);t&&(t.setColor(h),t.setStyle({opacity:c}))}),this);var d,p,f=s.getShallow("show"),g=l.getShallow("show"),m=this.childOfName("label");if((f||g)&&(d=h||"#000",null==(p=n.getFormattedLabel(t,"normal",e.dataType)))){var v=n.getRawValue(t);p=null==v?e.getName(t):isFinite(v)?PI(v):v}var y=f?p:null,x=g?_e.retrieve2(n.getFormattedLabel(t,"emphasis",e.dataType),p):null,_=m.style;if(null!=y||null!=x){iu.setTextStyle(m.style,s,{text:y},{autoColor:d}),m.__textAlign=_.textAlign,m.__verticalAlign=_.textVerticalAlign,m.__position=s.get("position")||"middle";var b=s.get("distance");_e.isArray(b)||(b=[b,b]),m.__labelDistance=b}m.hoverStyle=null!=x?{text:x,textFill:l.getTextColor(!0),fontStyle:l.getShallow("fontStyle"),fontWeight:l.getShallow("fontWeight"),fontSize:l.getShallow("fontSize"),fontFamily:l.getShallow("fontFamily")}:{text:null},m.ignore=!f&&!g,iu.setHoverStyle(this)},zI.highlight=function(){this.trigger("emphasis")},zI.downplay=function(){this.trigger("normal")},zI.updateLayout=function(e,t){this.setLinePoints(e.getItemLayout(t))},zI.setLinePoints=function(e){var t=this.childOfName("line");NI(t.shape,e),t.dirty()},_e.inherits(EI,iu.Group);var BI=EI;function VI(e){this._ctor=e||BI,this.group=new iu.Group}var GI=VI.prototype;function FI(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 HI(e){return isNaN(e[0])||isNaN(e[1])}function WI(e){return!HI(e[0])&&!HI(e[1])}GI.isPersistent=function(){return!0},GI.updateData=function(e){var t=this,i=t.group,n=t._lineData;t._lineData=e,n||i.removeAll();var a=FI(e);e.diff(n).add((function(i){!function(e,t,i,n){if(!WI(t.getItemLayout(i)))return;var a=new e._ctor(t,i,n);t.setItemGraphicEl(i,a),e.group.add(a)}(t,e,i,a)})).update((function(i,r){!function(e,t,i,n,a,r){var o=t.getItemGraphicEl(n);if(!WI(i.getItemLayout(a)))return void e.group.remove(o);o?o.updateData(i,a,r):o=new e._ctor(i,a,r);i.setItemGraphicEl(a,o),e.group.add(o)}(t,n,e,r,i,a)})).remove((function(e){i.remove(n.getItemGraphicEl(e))})).execute()},GI.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl((function(t,i){t.updateLayout(e,i)}),this)},GI.incrementalPrepareUpdate=function(e){this._seriesScope=FI(e),this._lineData=null,this.group.removeAll()},GI.incrementalUpdate=function(e,t){function i(e){e.isGroup||function(e){return e.animators&&e.animators.length>0}(e)||(e.incremental=e.useHoverLayer=!0)}for(var n=e.start;n<e.end;n++){if(WI(t.getItemLayout(n))){var a=new this._ctor(t,n,this._seriesScope);a.traverse(i),this.group.add(a),t.setItemGraphicEl(n,a)}}},GI.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},GI._clearIncremental=function(){var e=this._incremental;e&&e.clearDisplaybles()};var UI=VI;var ZI={getNodeGlobalScale:function(e){var t=e.coordinateSystem;if("view"!==t.type)return 1;var i=e.option.nodeScaleRatio,n=t.scale,a=n&&n[0]||1;return((t.getZoom()-1)*i+1)/a},getSymbolSize:function(e){var t=e.getVisual("symbolSize");return t instanceof Array&&(t=(t[0]+t[1])/2),+t}},jI=ZI.getSymbolSize,YI=[],XI=[],qI=[],KI=Fr.quadraticAt,$I=Te.distSquare,JI=Math.abs;function QI(e,t,i){for(var n,a=e[0],r=e[1],o=e[2],s=1/0,l=i*i,u=.1,h=.1;h<=.9;h+=.1){YI[0]=KI(a[0],r[0],o[0],h),YI[1]=KI(a[1],r[1],o[1],h),(p=JI($I(YI,t)-l))<s&&(s=p,n=h)}for(var c=0;c<32;c++){var d=n+u;XI[0]=KI(a[0],r[0],o[0],n),XI[1]=KI(a[1],r[1],o[1],n),qI[0]=KI(a[0],r[0],o[0],d),qI[1]=KI(a[1],r[1],o[1],d);var p=$I(XI,t)-l;if(JI(p)<.01)break;var f=$I(qI,t)-l;u/=2,p<0?f>=0?n+=u:n-=u:f>=0?n-=u:n+=u}return n}var eT=function(e,t){var i=[],n=Fr.quadraticSubdivide,a=[[],[],[]],r=[[],[]],o=[];t/=2,e.eachEdge((function(e,s){var l=e.getLayout(),u=e.getVisual("fromSymbol"),h=e.getVisual("toSymbol");l.__original||(l.__original=[Te.clone(l[0]),Te.clone(l[1])],l[2]&&l.__original.push(Te.clone(l[2])));var c=l.__original;if(null!=l[2]){if(Te.copy(a[0],c[0]),Te.copy(a[1],c[2]),Te.copy(a[2],c[1]),u&&"none"!==u){var d=jI(e.node1),p=QI(a,c[0],d*t);n(a[0][0],a[1][0],a[2][0],p,i),a[0][0]=i[3],a[1][0]=i[4],n(a[0][1],a[1][1],a[2][1],p,i),a[0][1]=i[3],a[1][1]=i[4]}if(h&&"none"!==h){d=jI(e.node2),p=QI(a,c[1],d*t);n(a[0][0],a[1][0],a[2][0],p,i),a[1][0]=i[1],a[2][0]=i[2],n(a[0][1],a[1][1],a[2][1],p,i),a[1][1]=i[1],a[2][1]=i[2]}Te.copy(l[0],a[0]),Te.copy(l[1],a[2]),Te.copy(l[2],a[1])}else{if(Te.copy(r[0],c[0]),Te.copy(r[1],c[1]),Te.sub(o,r[1],r[0]),Te.normalize(o,o),u&&"none"!==u){d=jI(e.node1);Te.scaleAndAdd(r[0],r[0],o,d*t)}if(h&&"none"!==h){d=jI(e.node2);Te.scaleAndAdd(r[1],r[1],o,-d*t)}Te.copy(l[0],r[0]),Te.copy(l[1],r[1])}}))},tT=Yw.onIrrelevantElement,iT=ZI.getNodeGlobalScale,nT="__focusNodeAdjacency",aT=["itemStyle","opacity"],rT=["lineStyle","opacity"];function oT(e,t){var i=e.getVisual("opacity");return null!=i?i:e.getModel().get(t)}function sT(e,t,i){var n=e.getGraphicEl(),a=oT(e,t);null!=i&&(null==a&&(a=1),a*=i),n.downplay&&n.downplay(),n.traverse((function(e){if(!e.isGroup){var t=e.lineLabelOriginalOpacity;null!=t&&null==i||(t=a),e.setStyle("opacity",t)}}))}function lT(e,t){var i=oT(e,t),n=e.getGraphicEl();n.traverse((function(e){!e.isGroup&&e.setStyle("opacity",i)})),n.highlight&&n.highlight()}Qv.extendChartView({type:"graph",init:function(e,t){var i=new wy,n=new UI,a=this.group;this._controller=new Uw(t.getZr()),this._controllerHost={target:a},a.add(i.group),a.add(n.group),this._symbolDraw=i,this._lineDraw=n,this._firstRender=!0},render:function(e,t,i){var n=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):iu.updateProps(s,l,e)}eT(e.getGraph(),iT(e));var u=e.getData();r.updateData(u);var h=e.getEdgeData();o.updateData(h),this._updateNodeAndLinkScale(),this._updateController(e,t,i),clearTimeout(this._layoutTimeout);var c=e.forceLayout,d=e.get("force.layoutAnimation");c&&this._startForceLayoutIteration(c,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(){c&&(c.warmUp(),!this._layouting&&this._startForceLayoutIteration(c,d),c.setFixed(a),u.setItemLayout(a,t.position))}),this).on("dragend",(function(){c&&c.setUnfixed(a)}),this),t.setDraggable(o&&c),t[nT]&&t.off("mouseover",t[nT]),t.__unfocusNodeAdjacency&&t.off("mouseout",t.__unfocusNodeAdjacency),r.get("focusNodeAdjacency")&&(t.on("mouseover",t[nT]=function(){n._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:e.id,dataIndex:t.dataIndex})}),t.on("mouseout",t.__unfocusNodeAdjacency=function(){n._dispatchUnfocus(i)}))}),this),u.graph.eachEdge((function(t){var a=t.getGraphicEl();a[nT]&&a.off("mouseover",a[nT]),a.__unfocusNodeAdjacency&&a.off("mouseout",a.__unfocusNodeAdjacency),t.getModel().get("focusNodeAdjacency")&&(a.on("mouseover",a[nT]=function(){n._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:e.id,edgeDataIndex:t.dataIndex})}),a.on("mouseout",a.__unfocusNodeAdjacency=function(){n._dispatchUnfocus(i)}))}));var p="circular"===e.get("layout")&&e.get("circular.rotateLabel"),f=u.getLayout("cx"),g=u.getLayout("cy");u.eachItemGraphicEl((function(e,t){var i=u.getItemModel(t).get("label.rotate")||0,n=e.getSymbolPath();if(p){var a=u.getItemLayout(t),r=Math.atan2(a[1]-g,a[0]-f);r<0&&(r=2*Math.PI+r);var o=a[0]<f;o&&(r-=Math.PI);var s=o?"left":"right";iu.modifyLabelStyle(n,{textRotation:-r,textPosition:s,textOrigin:"center"},{textPosition:s})}else iu.modifyLabelStyle(n,{textRotation:i*=Math.PI/180})})),this._firstRender=!1},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={},this._clearTimer()},_dispatchUnfocus:function(e,t){var i=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout((function(){i._unfocusDelayTimer=null,e.dispatchAction({type:"unfocusNodeAdjacency",seriesId:i._model.id})}),500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(e,t,i,n){var a=e.getData().graph,r=n.dataIndex,o=n.edgeDataIndex,s=a.getNodeByIndex(r),l=a.getEdgeByIndex(o);(s||l)&&(a.eachNode((function(e){sT(e,aT,.1)})),a.eachEdge((function(e){sT(e,rT,.1)})),s&&(lT(s,aT),_e.each(s.edges,(function(e){e.dataIndex<0||(lT(e,rT),lT(e.node1,aT),lT(e.node2,aT))}))),l&&(lT(l,rT),lT(l.node1,aT),lT(l.node2,aT)))},unfocusNodeAdjacency:function(e,t,i,n){var a=e.getData().graph;a.eachNode((function(e){sT(e,aT)})),a.eachEdge((function(e){sT(e,rT)}))},_startForceLayoutIteration:function(e,t){var i=this;!function n(){e.step((function(e){i.updateLayout(i._model),(i._layouting=!e)&&(t?i._layoutTimeout=setTimeout(n,16):n())}))}()},_updateController:function(e,t,i){var n=this._controller,a=this._controllerHost,r=this.group;n.setPointerChecker((function(t,n,a){var o=r.getBoundingRect();return o.applyTransform(r.transform),o.contain(n,a)&&!tT(t,i,e)})),"view"===e.coordinateSystem.type?(n.enable(e.get("roam")),a.zoomLimit=e.get("scaleLimit"),a.zoom=e.coordinateSystem.getZoom(),n.off("pan").off("zoom").on("pan",(function(t){Zw.updateViewOnPan(a,t.dx,t.dy),i.dispatchAction({seriesId:e.id,type:"graphRoam",dx:t.dx,dy:t.dy})})).on("zoom",(function(t){Zw.updateViewOnZoom(a,t.scale,t.originX,t.originY),i.dispatchAction({seriesId:e.id,type:"graphRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),this._updateNodeAndLinkScale(),eT(e.getGraph(),iT(e)),this._lineDraw.updateLayout()}),this)):n.disable()},_updateNodeAndLinkScale:function(){var e=this._model,t=e.getData(),i=iT(e),n=[i,i];t.eachItemGraphicEl((function(e,t){e.attr("scale",n)}))},updateLayout:function(e){eT(e.getGraph(),iT(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},remove:function(e,t){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()}});Qv.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},(function(){})),Qv.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},(function(){}));var uT=iS.updateCenterAndZoom;Qv.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},(function(e,t){t.eachComponent({mainType:"series",query:e},(function(t){var i=t.coordinateSystem,n=uT(i,e);t.setCenter&&t.setCenter(n.center),t.setZoom&&t.setZoom(n.zoom)}))}));var hT=function(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.eachSeriesByType("graph",(function(e){var i=e.getCategoriesData(),n=e.getGraph().data,a=i.mapArray(i.getName);n.filterSelf((function(e){var i=n.getItemModel(e).getShallow("category");if(null!=i){"number"==typeof i&&(i=a[i]);for(var r=0;r<t.length;r++)if(!t[r].isSelected(i))return!1}return!0}))}),this)};var cT=function(e){var t={};e.eachSeriesByType("graph",(function(e){var i=e.getCategoriesData(),n=e.getData(),a={};i.each((function(n){var r=i.getName(n);a["ec-"+r]=n;var o=i.getItemModel(n),s=o.get("itemStyle.color")||e.getColorFromPalette(r,t);i.setItemVisual(n,"color",s);for(var l=["opacity","symbol","symbolSize","symbolKeepAspect"],u=0;u<l.length;u++){var h=o.getShallow(l[u],!0);null!=h&&i.setItemVisual(n,l[u],h)}})),i.count()&&n.each((function(e){var t=n.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==n.getItemVisual(e,r[o],!0)&&n.setItemVisual(e,r[o],i.getItemVisual(t,r[o]))}}))}))};function dT(e){return e instanceof Array||(e=[e,e]),e}var pT=function(e){e.eachSeriesByType("graph",(function(e){var t=e.getGraph(),i=e.getEdgeData(),n=dT(e.get("edgeSymbol")),a=dT(e.get("edgeSymbolSize")),r="lineStyle.color".split("."),o="lineStyle.opacity".split(".");i.setVisual("fromSymbol",n&&n[0]),i.setVisual("toSymbol",n&&n[1]),i.setVisual("fromSymbolSize",a&&a[0]),i.setVisual("toSymbolSize",a&&a[1]),i.setVisual("color",e.get(r)),i.setVisual("opacity",e.get(o)),i.each((function(e){var n=i.getItemModel(e),a=t.getEdgeByIndex(e),s=dT(n.getShallow("symbol",!0)),l=dT(n.getShallow("symbolSize",!0)),u=n.get(r),h=n.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",h)}))}))};function fT(e){e.eachEdge((function(e){var t=e.getModel().get("lineStyle.curveness")||0,i=Te.clone(e.node1.getLayout()),n=Te.clone(e.node2.getLayout()),a=[i,n];+t&&a.push([(i[0]+n[0])/2-(i[1]-n[1])*t,(i[1]+n[1])/2-(n[0]-i[0])*t]),e.setLayout(a)}))}var gT={simpleLayout:function(e){var t=e.coordinateSystem;if(!t||"view"===t.type){var i=e.getGraph();i.eachNode((function(e){var t=e.getModel();e.setLayout([+t.get("x"),+t.get("y")])})),fT(i)}},simpleLayoutEdge:fT},mT=_e.each,vT=gT.simpleLayout,yT=gT.simpleLayoutEdge;var xT=function(e,t){e.eachSeriesByType("graph",(function(e){var t=e.get("layout"),i=e.coordinateSystem;if(i&&"view"!==i.type){var n=e.getData(),a=[];mT(i.dimensions,(function(e){a=a.concat(n.mapDimension(e,!0))}));for(var r=0;r<n.count();r++){for(var o=[],s=!1,l=0;l<a.length;l++){var u=n.get(a[l],r);isNaN(u)||(s=!0),o.push(u)}s?n.setItemLayout(r,i.dataToPoint(o)):n.setItemLayout(r,[NaN,NaN])}yT(n.graph)}else t&&"none"!==t||vT(e)}))},_T=ZI.getSymbolSize,bT=ZI.getNodeGlobalScale,wT=Math.PI,ST=[];var MT={value:function(e,t,i,n,a,r,o,s){var l=0,u=n.getSum("value"),h=2*Math.PI/(u||s);i.eachNode((function(e){var t=e.getValue("value"),i=h*(u?t:1)/2;l+=i,e.setLayout([a*Math.cos(l)+r,a*Math.sin(l)+o]),l+=i}))},symbolSize:function(e,t,i,n,a,r,o,s){var l=0;ST.length=s;var u=bT(e);i.eachNode((function(e){var t=_T(e);isNaN(t)&&(t=2),t<0&&(t=0),t*=u;var i=Math.asin(t/2/a);isNaN(i)&&(i=wT/2),ST[e.dataIndex]=i,l+=2*i}));var h=(2*wT-l)/s/2,c=0;i.eachNode((function(e){var t=h+ST[e.dataIndex];c+=t,e.setLayout([a*Math.cos(c)+r,a*Math.sin(c)+o]),c+=t}))}},IT={circularLayout:function(e,t){var i=e.coordinateSystem;if(!i||"view"===i.type){var n=i.getBoundingRect(),a=e.getData(),r=a.graph,o=n.width/2+n.x,s=n.height/2+n.y,l=Math.min(n.width,n.height)/2,u=a.count();a.setLayout({cx:o,cy:s}),u&&(MT[t](e,i,r,a,l,o,s,u),r.eachEdge((function(e){var t,i=e.getModel().get("lineStyle.curveness")||0,n=Te.clone(e.node1.getLayout()),a=Te.clone(e.node2.getLayout()),r=(n[0]+a[0])/2,l=(n[1]+a[1])/2;+i&&(t=[o*(i*=3)+r*(1-i),s*i+l*(1-i)]),e.setLayout([n,a,t])})))}}},TT=IT.circularLayout;var AT=function(e){e.eachSeriesByType("graph",(function(e){"circular"===e.get("layout")&&TT(e,"symbolSize")}))},CT=Te.scaleAndAdd;var DT={forceLayout:function(e,t,i){for(var n=i.rect,a=n.width,r=n.height,o=[n.x+a/2,n.y+r/2],s=null==i.gravity?.1:i.gravity,l=0;l<e.length;l++){var u=e[l];u.p||(u.p=Te.create(a*(Math.random()-.5)+o[0],r*(Math.random()-.5)+o[1])),u.pp=Te.clone(u.p),u.edges=null}var h=null==i.friction?.6:i.friction,c=h;return{warmUp:function(){c=.8*h},setFixed:function(t){e[t].fixed=!0},setUnfixed:function(t){e[t].fixed=!1},step:function(i){for(var n=[],a=e.length,r=0;r<t.length;r++){var l=t[r];if(!l.ignoreForceLayout){var u=l.n1,h=l.n2;Te.sub(n,h.p,u.p);var d=Te.len(n)-l.d,p=h.w/(u.w+h.w);isNaN(p)&&(p=0),Te.normalize(n,n),!u.fixed&&CT(u.p,u.p,n,p*d*c),!h.fixed&&CT(h.p,h.p,n,-(1-p)*d*c)}}for(r=0;r<a;r++){(v=e[r]).fixed||(Te.sub(n,o,v.p),CT(v.p,v.p,n,s*c))}for(r=0;r<a;r++){u=e[r];for(var f=r+1;f<a;f++){h=e[f];Te.sub(n,h.p,u.p),0===(d=Te.len(n))&&(Te.set(n,Math.random()-.5,Math.random()-.5),d=1);var g=(u.rep+h.rep)/d/d;!u.fixed&&CT(u.pp,u.pp,n,g),!h.fixed&&CT(h.pp,h.pp,n,-g)}}var m=[];for(r=0;r<a;r++){var v;(v=e[r]).fixed||(Te.sub(m,v.p,v.pp),CT(v.p,v.p,m,c),Te.copy(v.pp,v.p))}c*=.992,i&&i(e,t,c<.01)}}}}.forceLayout,LT=gT.simpleLayout,PT=IT.circularLayout,kT=bu.linearMap;var OT=function(e){e.eachSeriesByType("graph",(function(e){if(!(c=e.coordinateSystem)||"view"===c.type)if("force"===e.get("layout")){var t=e.preservedPoints||{},i=e.getGraph(),n=i.data,a=i.edgeData,r=e.getModel("force"),o=r.get("initLayout");e.preservedPoints?n.each((function(e){var i=n.getId(e);n.setItemLayout(e,t[i]||[NaN,NaN])})):o&&"none"!==o?"circular"===o&&PT(e,"value"):LT(e);var s=n.getDataExtent("value"),l=a.getDataExtent("value"),u=r.get("repulsion"),h=r.get("edgeLength");_e.isArray(u)||(u=[u,u]),_e.isArray(h)||(h=[h,h]),h=[h[1],h[0]];var c,d=n.mapArray("value",(function(e,t){var i=n.getItemLayout(t),a=kT(e,s,u);return isNaN(a)&&(a=(u[0]+u[1])/2),{w:a,rep:a,fixed:n.getItemModel(t).get("fixed"),p:!i||isNaN(i[0])||isNaN(i[1])?null:i}})),p=a.mapArray("value",(function(e,t){var n=i.getEdgeByIndex(t),a=kT(e,l,h);isNaN(a)&&(a=(h[0]+h[1])/2);var r=n.getModel();return{n1:d[n.node1.dataIndex],n2:d[n.node2.dataIndex],d:a,curveness:r.get("lineStyle.curveness")||0,ignoreForceLayout:r.get("ignoreForceLayout")}})),f=(c=e.coordinateSystem).getBoundingRect(),g=DT(d,p,{rect:f,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&&Te.copy(d[a].p,i.getNodeByIndex(a).getLayout());m((function(a,r,o){for(var s=0,l=a.length;s<l;s++)a[s].fixed||i.getNodeByIndex(s).setLayout(a[s].p),t[n.getId(s)]=a[s].p;for(s=0,l=r.length;s<l;s++){var u=r[s],h=i.getEdgeByIndex(s),c=u.n1.p,d=u.n2.p,p=h.getLayout();(p=p?p.slice():[])[0]=p[0]||[],p[1]=p[1]||[],Te.copy(p[0],c),Te.copy(p[1],d),+u.curveness&&(p[2]=[(c[0]+d[0])/2-(c[1]-d[1])*u.curveness,(c[1]+d[1])/2-(d[0]-c[0])*u.curveness]),h.setLayout(p)}e&&e(o)}))},e.forceLayout=g,e.preservedPoints=t,g.step()}else e.forceLayout=null}))},RT=Gu.getLayoutRect;var NT=function(e,t){var i=[];return e.eachSeriesByType("graph",(function(e){var n=e.get("coordinateSystem");if(!n||"view"===n){var a=e.getData(),r=a.mapArray((function(e){var t=a.getItemModel(e);return[+t.get("x"),+t.get("y")]})),o=[],s=[];Jr.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,i){var n=e.getBoxLayoutParams();return n.aspect=i,RT(n,{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 h=s[0]-o[0],c=s[1]-o[1],d=u.width,p=u.height,f=e.coordinateSystem=new lS;f.zoomLimit=e.get("scaleLimit"),f.setBoundingRect(o[0],o[1],h,c),f.setViewRect(u.x,u.y,d,p),f.setCenter(e.get("center")),f.setZoom(e.get("zoom")),i.push(f)}})),i};Qv.registerProcessor(hT),Qv.registerVisual(ox("graph","circle",null)),Qv.registerVisual(cT),Qv.registerVisual(pT),Qv.registerLayout(xT),Qv.registerLayout(Qv.PRIORITY.VISUAL.POST_CHART_LAYOUT,AT),Qv.registerLayout(OT),Qv.registerCoordinateSystem("graphView",{create:NT});Nd.extend({type:"series.gauge",getInitialData:function(e,t){return ub(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 ET=Vo.extend({type:"echartsGaugePointer",shape:{angle:0,width:10,r:10,x:0,y:0},buildPath:function(e,t){var i=Math.cos,n=Math.sin,a=t.r,r=t.width,o=t.angle,s=t.x-i(o)*r*(r>=a/3?1:2),l=t.y-n(o)*r*(r>=a/3?1:2);o=t.angle-Math.PI/2,e.moveTo(s,l),e.lineTo(t.x+i(o)*r,t.y+n(o)*r),e.lineTo(t.x+i(t.angle)*a,t.y+n(t.angle)*a),e.lineTo(t.x-i(o)*r,t.y-n(o)*r),e.lineTo(s,l)}}),zT=bu.parsePercent,BT=bu.round,VT=bu.linearMap;function GT(e,t){return t&&("string"==typeof t?e=t.replace("{value}",null!=e?e:""):"function"==typeof t&&(e=t(e))),e}var FT=2*Math.PI,HT=(Jd.extend({type:"gauge",render:function(e,t,i){this.group.removeAll();var n=e.get("axisLine.lineStyle.color"),a=function(e,t){var i=e.get("center"),n=t.getWidth(),a=t.getHeight(),r=Math.min(n,a);return{cx:zT(i[0],t.getWidth()),cy:zT(i[1],t.getHeight()),r:zT(e.get("radius"),r/2)}}(e,i);this._renderMain(e,t,i,n,a)},dispose:function(){},_renderMain:function(e,t,i,n,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,h=((g=-e.get("endAngle")/180*Math.PI)-u)%FT,c=u,d=s.get("width"),p=o.get("show"),f=0;p&&f<n.length;f++){var g=u+h*Math.min(Math.max(n[f][0],0),1),m=new iu.Sector({shape:{startAngle:c,endAngle:g,cx:a.cx,cy:a.cy,clockwise:l,r0:a.r-d,r:a.r},silent:!0});m.setStyle({fill:n[f][1]}),m.setStyle(s.getLineStyle(["color","borderWidth","borderColor"])),r.add(m),c=g}var v=function(e){if(e<=0)return n[0][1];for(var t=0;t<n.length;t++)if(n[t][0]>=e&&(0===t?0:n[t-1][0])<e)return n[t][1];return n[t-1][1]};if(!l){var y=u;u=g,g=y}this._renderTicks(e,t,i,v,a,u,g,l),this._renderPointer(e,t,i,v,a,u,g,l),this._renderTitle(e,t,i,v,a),this._renderDetail(e,t,i,v,a)},_renderTicks:function(e,t,i,n,a,r,o,s){for(var l=this.group,u=a.cx,h=a.cy,c=a.r,d=+e.get("min"),p=+e.get("max"),f=e.getModel("splitLine"),g=e.getModel("axisTick"),m=e.getModel("axisLabel"),v=e.get("splitNumber"),y=g.get("splitNumber"),x=zT(f.get("length"),c),_=zT(g.get("length"),c),b=r,w=(o-r)/v,S=w/y,M=f.getModel("lineStyle").getLineStyle(),I=g.getModel("lineStyle").getLineStyle(),T=0;T<=v;T++){var A=Math.cos(b),C=Math.sin(b);if(f.get("show")){var D=new iu.Line({shape:{x1:A*c+u,y1:C*c+h,x2:A*(c-x)+u,y2:C*(c-x)+h},style:M,silent:!0});"auto"===M.stroke&&D.setStyle({stroke:n(T/v)}),l.add(D)}if(m.get("show")){var L=GT(BT(T/v*(p-d)+d),m.get("formatter")),P=m.get("distance"),k=n(T/v);l.add(new iu.Text({style:iu.setTextStyle({},m,{text:L,x:A*(c-x-P)+u,y:C*(c-x-P)+h,textVerticalAlign:C<-.4?"top":C>.4?"bottom":"middle",textAlign:A<-.4?"left":A>.4?"right":"center"},{autoColor:k}),silent:!0}))}if(g.get("show")&&T!==v){for(var O=0;O<=y;O++){A=Math.cos(b),C=Math.sin(b);var R=new iu.Line({shape:{x1:A*c+u,y1:C*c+h,x2:A*(c-_)+u,y2:C*(c-_)+h},silent:!0,style:I});"auto"===I.stroke&&R.setStyle({stroke:n((T+O/y)/v)}),l.add(R),b+=S}b-=S}else b+=w}},_renderPointer:function(e,t,i,n,a,r,o,s){var l=this.group,u=this._data;if(e.get("pointer.show")){var h=[+e.get("min"),+e.get("max")],c=[r,o],d=e.getData(),p=d.mapDimension("value");d.diff(u).add((function(t){var i=new ET({shape:{angle:r}});iu.initProps(i,{shape:{angle:VT(d.get(p,t),h,c,!0)}},e),l.add(i),d.setItemGraphicEl(t,i)})).update((function(t,i){var n=u.getItemGraphicEl(i);iu.updateProps(n,{shape:{angle:VT(d.get(p,t),h,c,!0)}},e),l.add(n),d.setItemGraphicEl(t,n)})).remove((function(e){var t=u.getItemGraphicEl(e);l.remove(t)})).execute(),d.eachItemGraphicEl((function(e,t){var i=d.getItemModel(t),r=i.getModel("pointer");e.setShape({x:a.cx,y:a.cy,width:zT(r.get("width"),a.r),r:zT(r.get("length"),a.r)}),e.useStyle(i.getModel("itemStyle").getItemStyle()),"auto"===e.style.fill&&e.setStyle("fill",n(VT(d.get(p,t),h,[0,1],!0))),iu.setHoverStyle(e,i.getModel("emphasis.itemStyle").getItemStyle())})),this._data=d}else u&&u.eachItemGraphicEl((function(e){l.remove(e)}))},_renderTitle:function(e,t,i,n,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+zT(l[0],a.r),h=a.cy+zT(l[1],a.r),c=+e.get("min"),d=+e.get("max"),p=e.getData().get(o,0),f=n(VT(p,[c,d],[0,1],!0));this.group.add(new iu.Text({silent:!0,style:iu.setTextStyle({},s,{x:u,y:h,text:r.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:f,forceRich:!0})}))}},_renderDetail:function(e,t,i,n,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+zT(l[0],a.r),h=a.cy+zT(l[1],a.r),c=zT(r.get("width"),a.r),d=zT(r.get("height"),a.r),p=e.getData(),f=p.get(p.mapDimension("value"),0),g=n(VT(f,[o,s],[0,1],!0));this.group.add(new iu.Text({silent:!0,style:iu.setTextStyle({},r,{x:u,y:h,text:GT(f,r.get("formatter")),textWidth:isNaN(c)?null:c,textHeight:isNaN(d)?null:d,textAlign:"center",textVerticalAlign:"middle"},{autoColor:g,forceRich:!0})}))}}}),vr.defaultEmphasis),WT=Rh.makeSeriesEncodeForNameBased,UT=Qv.extendSeriesModel({type:"series.funnel",init:function(e){UT.superApply(this,"init",arguments),this.legendVisualProvider=new cb(_e.bind(this.getData,this),_e.bind(this.getRawData,this)),this._defaultLabelLine(e)},getInitialData:function(e,t){return ub(this,{coordDimensions:["value"],encodeDefaulter:_e.curry(WT,this)})},_defaultLabelLine:function(e){HT(e,"labelLine",["show"]);var t=e.labelLine,i=e.emphasis.labelLine;t.show=t.show&&e.label.show,i.show=i.show&&e.emphasis.label.show},getDataParams:function(e){var t=this.getData(),i=UT.superCall(this,"getDataParams",e),n=t.mapDimension("value"),a=t.getSum(n);return i.percent=a?+(t.get(n,e)/a*100).toFixed(2):0,i.$vars.push("percent"),i},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 ZT(e,t){iu.Group.call(this);var i=new iu.Polygon,n=new iu.Polyline,a=new iu.Text;this.add(i),this.add(n),this.add(a),this.highDownOnUpdate=function(e,t){"emphasis"===t?(n.ignore=n.hoverIgnore,a.ignore=a.hoverIgnore):(n.ignore=n.normalIgnore,a.ignore=a.normalIgnore)},this.updateData(e,t,!0)}var jT=ZT.prototype,YT=["itemStyle","opacity"];jT.updateData=function(e,t,i){var n=this.childAt(0),a=e.hostModel,r=e.getItemModel(t),o=e.getItemLayout(t),s=e.getItemModel(t).get(YT);s=null==s?1:s,n.useStyle({}),i?(n.setShape({points:o.points}),n.setStyle({opacity:0}),iu.initProps(n,{style:{opacity:s}},a,t)):iu.updateProps(n,{style:{opacity:s},shape:{points:o.points}},a,t);var l=r.getModel("itemStyle"),u=e.getItemVisual(t,"color");n.setStyle(_e.defaults({lineJoin:"round",fill:u},l.getItemStyle(["opacity"]))),n.hoverStyle=l.getModel("emphasis").getItemStyle(),this._updateLabel(e,t),iu.setHoverStyle(this)},jT._updateLabel=function(e,t){var i=this.childAt(1),n=this.childAt(2),a=e.hostModel,r=e.getItemModel(t),o=e.getItemLayout(t).label,s=e.getItemVisual(t,"color");iu.updateProps(i,{shape:{points:o.linePoints||o.linePoints}},a,t),iu.updateProps(n,{style:{x:o.x,y:o.y}},a,t),n.attr({rotation:o.rotation,origin:[o.x,o.y],z2:10});var l=r.getModel("label"),u=r.getModel("emphasis.label"),h=r.getModel("labelLine"),c=r.getModel("emphasis.labelLine");s=e.getItemVisual(t,"color");iu.setLabelStyle(n.style,n.hoverStyle={},l,u,{labelFetcher:e.hostModel,labelDataIndex:t,defaultText:e.getName(t),autoColor:s,useInsideStyle:!!o.inside},{textAlign:o.textAlign,textVerticalAlign:o.verticalAlign}),n.ignore=n.normalIgnore=!l.get("show"),n.hoverIgnore=!u.get("show"),i.ignore=i.normalIgnore=!h.get("show"),i.hoverIgnore=!c.get("show"),i.setStyle({stroke:s}),i.setStyle(h.getModel("lineStyle").getLineStyle()),i.hoverStyle=c.getModel("lineStyle").getLineStyle()},_e.inherits(ZT,iu.Group);Jd.extend({type:"funnel",render:function(e,t,i){var n=e.getData(),a=this._data,r=this.group;n.diff(a).add((function(e){var t=new ZT(n,e);n.setItemGraphicEl(e,t),r.add(t)})).update((function(e,t){var i=a.getItemGraphicEl(t);i.updateData(n,e),r.add(i),n.setItemGraphicEl(e,i)})).remove((function(e){var t=a.getItemGraphicEl(e);r.remove(t)})).execute(),this._data=n},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});var XT=bu.parsePercent,qT=bu.linearMap;var KT=function(e,t,i){e.eachSeriesByType("funnel",(function(e){var i=e.getData(),n=i.mapDimension("value"),a=e.get("sort"),r=function(e,t){return Gu.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,t),o=function(e,t){for(var i=e.mapDimension("value"),n=e.mapArray(i,(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?n[e]-n[t]:n[t]-n[e]})),a}(i,a),s=[XT(e.get("minSize"),r.width),XT(e.get("maxSize"),r.width)],l=i.getDataExtent(n),u=e.get("min"),h=e.get("max");null==u&&(u=Math.min(l[0],0)),null==h&&(h=l[1]);var c=e.get("funnelAlign"),d=e.get("gap"),p=(r.height-d*(i.count()-1))/i.count(),f=r.y,g=function(e,t){var a,o=i.get(n,e)||0,l=qT(o,[u,h],s,!0);switch(c){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&&(p=-p,d=-d,f+=r.height,o=o.reverse());for(var m=0;m<o.length;m++){var v=o[m],y=o[m+1],x=i.getItemModel(v).get("itemStyle.height");null==x?x=p:(x=XT(x,r.height),"ascending"===a&&(x=-x));var _=g(v,f),b=g(y,f+x);f+=x+d,i.setItemLayout(v,{points:_.concat(b.slice().reverse())})}!function(e){e.each((function(t){var i,n,a,r,o=e.getItemModel(t),s=o.getModel("label").get("position"),l=o.getModel("labelLine"),u=e.getItemLayout(t),h=u.points,c="inner"===s||"inside"===s||"center"===s||"insideLeft"===s||"insideRight"===s;if(c)"insideLeft"===s?(n=(h[0][0]+h[3][0])/2+5,a=(h[0][1]+h[3][1])/2,i="left"):"insideRight"===s?(n=(h[1][0]+h[2][0])/2-5,a=(h[1][1]+h[2][1])/2,i="right"):(n=(h[0][0]+h[1][0]+h[2][0]+h[3][0])/4,a=(h[0][1]+h[1][1]+h[2][1]+h[3][1])/4,i="center"),r=[[n,a],[n,a]];else{var d,p,f,g=l.get("length");"left"===s?(d=(h[3][0]+h[0][0])/2,p=(h[3][1]+h[0][1])/2,n=(f=d-g)-5,i="right"):"right"===s?(d=(h[1][0]+h[2][0])/2,p=(h[1][1]+h[2][1])/2,n=(f=d+g)+5,i="left"):"rightTop"===s?(d=h[1][0],p=h[1][1],n=(f=d+g)+5,i="top"):"rightBottom"===s?(d=h[2][0],p=h[2][1],n=(f=d+g)+5,i="bottom"):"leftTop"===s?(d=h[0][0],p=h[1][1],n=(f=d-g)-5,i="right"):"leftBottom"===s?(d=h[3][0],p=h[2][1],n=(f=d-g)-5,i="right"):(d=(h[1][0]+h[2][0])/2,p=(h[1][1]+h[2][1])/2,n=(f=d+g)+5,i="left");r=[[d,p],[f,p]],a=p}u.label={linePoints:r,x:n,y:a,verticalAlign:"middle",textAlign:i,inside:c}}))}(i)}))};Qv.registerVisual(wb("funnel")),Qv.registerLayout(KT),Qv.registerProcessor(Ob("funnel"));var $T=function(e){!function(e){if(e.parallel)return;var t=!1;_e.each(e.series,(function(e){e&&"parallel"===e.type&&(t=!0)})),t&&(e.parallel=[{}])}(e),function(e){var t=vr.normalizeToArray(e.parallelAxis);_e.each(t,(function(t){if(_e.isObject(t)){var i=t.parallelIndex||0,n=vr.normalizeToArray(e.parallel)[i];n&&n.parallelAxisDefault&&_e.merge(t,n.parallelAxisDefault,!1)}}))}(e)},JT=function(e,t,i,n,a){Nv.call(this,e,t,i),this.type=n||"value",this.axisIndex=a};JT.prototype={constructor:JT,model:null,isHorizontal:function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")}},_e.inherits(JT,Nv);var QT=JT;function eA(e,t){var i=e[t]-e[1-t];return{span:Math.abs(i),sign:i>0?-1:i<0?1:t?-1:1}}function tA(e,t){return Math.min(null!=t[1]?t[1]:1/0,Math.max(null!=t[0]?t[0]:-1/0,e))}var iA=function(e,t,i,n,a,r){e=e||0;var o=i[1]-i[0];if(null!=a&&(a=tA(a,[0,o])),null!=r&&(r=Math.max(r,null!=a?a:0)),"all"===n){var s=Math.abs(t[1]-t[0]);s=tA(s,[0,o]),a=r=tA(s,[a,r]),n=0}t[0]=tA(t[0],i),t[1]=tA(t[1],i);var l=eA(t,n);t[n]+=e;var u=a||0,h=i.slice();l.sign<0?h[0]+=u:h[1]-=u,t[n]=tA(t[n],h);var c=eA(t,n);return null!=a&&(c.sign!==l.sign||c.span<a)&&(t[1-n]=t[n]+l.sign*a),c=eA(t,n),null!=r&&c.span>r&&(t[1-n]=t[n]+c.sign*r),t},nA=_e.each,aA=Math.min,rA=Math.max,oA=Math.floor,sA=Math.ceil,lA=bu.round,uA=Math.PI;function hA(e,t,i){this._axesMap=_e.createHashMap(),this._axesLayout={},this.dimensions=e.dimensions,this._rect,this._model=e,this._init(e,t,i)}function cA(e,t){return aA(rA(e,t[0]),t[1])}function dA(e,t){var i=t.layoutLength/(t.axisCount-1);return{position:i*e,axisNameAvailableWidth:i,axisLabelShow:!0}}function pA(e,t){var i,n,a=t.layoutLength,r=t.axisExpandWidth,o=t.axisCount,s=t.axisCollapseWidth,l=t.winInnerIndices,u=s,h=!1;return e<l[0]?(i=e*s,n=s):e<=l[1]?(i=t.axisExpandWindow0Pos+e*r-t.axisExpandWindow[0],u=r,h=!0):(i=a-(o-1-e)*s,n=s),{position:i,axisNameAvailableWidth:u,axisLabelShow:h,nameTruncateMaxWidth:n}}hA.prototype={type:"parallel",constructor:hA,_init:function(e,t,i){var n=e.dimensions,a=e.parallelAxisIndex;nA(n,(function(e,i){var n=a[i],r=t.getComponent("parallelAxis",n),o=this._axesMap.set(e,new QT(e,Hm.createScaleByModel(r),[0,0],r.get("type"),n)),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(),i=t.axisBase,n=t.layoutBase,a=t.pixelDimIndex,r=e[1-a],o=e[a];return r>=i&&r<=i+t.axisLength&&o>=n&&o<=n+t.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(e,t){t.eachSeries((function(i){if(e.contains(i,t)){var n=i.getData();nA(this.dimensions,(function(e){var t=this._axesMap.get(e);t.scale.unionExtentFromData(n,n.mapDimension(e)),Hm.niceScaleExtent(t.scale,t.model)}),this)}}),this)},resize:function(e,t){this._rect=Gu.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},getRect:function(){return this._rect},_makeLayoutInfo:function(){var e,t=this._model,i=this._rect,n=["x","y"],a=["width","height"],r=t.get("layout"),o="horizontal"===r?0:1,s=i[a[o]],l=[0,s],u=this.dimensions.length,h=cA(t.get("axisExpandWidth"),l),c=cA(t.get("axisExpandCount")||0,[0,u]),d=t.get("axisExpandable")&&u>3&&u>c&&c>1&&h>0&&s>0,p=t.get("axisExpandWindow");p?(e=cA(p[1]-p[0],l),p[1]=p[0]+e):(e=cA(h*(c-1),l),(p=[h*(t.get("axisExpandCenter")||oA(u/2))-e/2])[1]=p[0]+e);var f=(s-e)/(u-c);f<3&&(f=0);var g=[oA(lA(p[0]/h,1))+1,sA(lA(p[1]/h,1))-1],m=f/h*p[0];return{layout:r,pixelDimIndex:o,layoutBase:i[n[o]],layoutLength:s,axisBase:i[n[1-o]],axisLength:i[a[1-o]],axisExpandable:d,axisExpandWidth:h,axisCollapseWidth:f,axisExpandWindow:p,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:m}},_layoutAxes:function(){var e=this._rect,t=this._axesMap,i=this.dimensions,n=this._makeLayoutInfo(),a=n.layout;t.each((function(e){var t=[0,n.axisLength],i=e.inverse?1:0;e.setExtent(t[i],t[1-i])})),nA(i,(function(t,i){var r=(n.axisExpandable?pA:dA)(i,n),o={horizontal:{x:r.position,y:n.axisLength},vertical:{x:0,y:r.position}},s={horizontal:uA/2,vertical:0},l=[o[a].x+e.x,o[a].y+e.y],u=s[a],h=dt.create();dt.rotate(h,h,u),dt.translate(h,h,l),this._axesLayout[t]={position:l,rotation:u,transform:h,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,i,n){null==i&&(i=0),null==n&&(n=e.count());var a=this._axesMap,r=this.dimensions,o=[],s=[];_e.each(r,(function(t){o.push(e.mapDimension(t)),s.push(a.get(t).model)}));for(var l=this.hasAxisBrushed(),u=i;u<n;u++){var h;if(l){h="active";for(var c=e.getValues(o,u),d=0,p=r.length;d<p;d++){if("inactive"===s[d].getActiveState(c[d])){h="inactive";break}}}else h="normal";t(h,u)}},hasAxisBrushed:function(){for(var e=this.dimensions,t=this._axesMap,i=!1,n=0,a=e.length;n<a;n++)"normal"!==t.get(e[n]).model.getActiveState()&&(i=!0);return i},axisCoordToPoint:function(e,t){var i=this._axesLayout[t];return iu.applyTransform([e,0],i.transform)},getAxisLayout:function(e){return _e.clone(this._axesLayout[e])},getSlidedAxisExpandWindow:function(e){var t=this._makeLayoutInfo(),i=t.pixelDimIndex,n=t.axisExpandWindow.slice(),a=n[1]-n[0],r=[0,t.axisExpandWidth*(t.axisCount-1)];if(!this.containPoint(e))return{behavior:"none",axisExpandWindow:n};var o,s=e[i]-t.layoutBase-t.axisExpandWindow0Pos,l="slide",u=t.axisCollapseWidth,h=this._model.get("axisExpandSlideTriggerArea"),c=null!=h[0];if(u)c&&u&&s<a*h[0]?(l="jump",o=s-a*h[2]):c&&u&&s>a*(1-h[0])?(l="jump",o=s-a*(1-h[2])):(o=s-a*h[1])>=0&&(o=s-a*(1-h[1]))<=0&&(o=0),(o*=t.axisExpandWidth/u)?iA(o,n,r,"all"):l="none";else{a=n[1]-n[0];(n=[rA(0,r[1]*s/a-a/2)])[1]=aA(r[1],n[0]+a),n[0]=n[1]-a}return{axisExpandWindow:n,behavior:l}}};var fA=hA;ac.register("parallel",{create:function(e,t){var i=[];return e.eachComponent("parallel",(function(n,a){var r=new fA(n,e,t);r.name="parallel_"+a,r.resize(n,t),n.coordinateSystem=r,r.model=n,i.push(r)})),e.eachSeries((function(t){if("parallel"===t.get("coordinateSystem")){var i=e.queryComponents({mainType:"parallel",index:t.get("parallelIndex"),id:t.get("parallelId")})[0];t.coordinateSystem=i.coordinateSystem}})),i}});var gA=ju.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return Mr([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(e){var t=this.activeIntervals=_e.clone(e);if(t)for(var i=t.length-1;i>=0;i--)bu.asc(t[i])},getActiveState:function(e){var t=this.activeIntervals;if(!t.length)return"normal";if(null==e||isNaN(e))return"inactive";if(1===t.length){var i=t[0];if(i[0]<=e&&e<=i[1])return"active"}else for(var n=0,a=t.length;n<a;n++)if(t[n][0]<=e&&e<=t[n][1])return"active";return"inactive"}});_e.merge(gA.prototype,Wm),Ax("parallel",gA,(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});ju.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(){ju.prototype.init.apply(this,arguments),this.mergeOption({})},mergeOption:function(e){var t=this.option;e&&_e.merge(t,e,!0),this._initDimensions()},contains:function(e,t){var i=e.get("parallelIndex");return null!=i&&t.getComponent("parallel",i)===this},setAxisExpand:function(e){_e.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=[],i=_e.filter(this.dependentModels.parallelAxis,(function(e){return(e.get("parallelIndex")||0)===this.componentIndex}),this);_e.each(i,(function(i){e.push("dim"+i.get("dim")),t.push(i.componentIndex)}))}});Qv.registerAction({type:"axisAreaSelect",event:"axisAreaSelected"},(function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},(function(t){t.axis.model.setActiveIntervals(e.intervals)}))})),Qv.registerAction("parallelAxisExpand",(function(e,t){t.eachComponent({mainType:"parallel",query:e},(function(t){t.setAxisExpand(e)}))}));var mA=_e.curry,vA=_e.each,yA=_e.map,xA=Math.min,_A=Math.max,bA=Math.pow,wA={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},SA={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},MA={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},IA=0;function TA(e){Oe.call(this),this._zr=e,this.group=new iu.Group,this._brushType,this._brushOption,this._panels,this._track=[],this._dragging,this._covers=[],this._creatingCover,this._creatingPanel,this._enableGlobalPan,this._uid="brushController_"+IA++,this._handlers={},vA(JA,(function(e,t){this._handlers[t]=_e.bind(e,this)}),this)}function AA(e,t){var i=eC[t.brushType].createCover(e,t);return i.__brushOption=t,LA(i,t),e.group.add(i),i}function CA(e,t){var i=kA(t);return i.endCreating&&(i.endCreating(e,t),LA(t,t.__brushOption)),t}function DA(e,t){var i=t.__brushOption;kA(t).updateCoverShape(e,t,i.range,i)}function LA(e,t){var i=t.z;null==i&&(i=1e4),e.traverse((function(e){e.z=i,e.z2=i}))}function PA(e,t){kA(t).updateCommon(e,t),DA(e,t)}function kA(e){return eC[e.__brushOption.brushType]}function OA(e,t,i){var n,a=e._panels;if(!a)return!0;var r=e._transform;return vA(a,(function(e){e.isTargetByCursor(t,i,r)&&(n=e)})),n}function RA(e,t){var i=e._panels;if(!i)return!0;var n=t.__brushOption.panelId;return null==n||i[n]}function NA(e){var t=e._covers,i=t.length;return vA(t,(function(t){e.group.remove(t)}),e),t.length=0,!!i}function EA(e,t){var i=yA(e._covers,(function(e){var t=e.__brushOption,i=_e.clone(t.range);return{brushType:t.brushType,panelId:t.panelId,range:i}}));e.trigger("brush",i,{isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function zA(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function BA(e,t,i,n){var a=new iu.Group;return a.add(new iu.Rect({name:"main",style:HA(i),silent:!0,draggable:!0,cursor:"move",drift:mA(e,t,a,"nswe"),ondragend:mA(EA,t,{isEnd:!0})})),vA(n,(function(i){a.add(new iu.Rect({name:i,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:mA(e,t,a,i),ondragend:mA(EA,t,{isEnd:!0})}))})),a}function VA(e,t,i,n){var a=n.brushStyle.lineWidth||0,r=_A(a,6),o=i[0][0],s=i[1][0],l=o-a/2,u=s-a/2,h=i[0][1],c=i[1][1],d=h-r+a/2,p=c-r+a/2,f=h-o,g=c-s,m=f+a,v=g+a;FA(e,t,"main",o,s,f,g),n.transformable&&(FA(e,t,"w",l,u,r,v),FA(e,t,"e",d,u,r,v),FA(e,t,"n",l,u,m,r),FA(e,t,"s",l,p,m,r),FA(e,t,"nw",l,u,r,r),FA(e,t,"ne",d,u,r,r),FA(e,t,"sw",l,p,r,r),FA(e,t,"se",d,p,r,r))}function GA(e,t){var i=t.__brushOption,n=i.transformable,a=t.childAt(0);a.useStyle(HA(i)),a.attr({silent:!n,cursor:n?"move":"default"}),vA(["w","e","n","s","se","sw","ne","nw"],(function(i){var a=t.childOfName(i),r=function e(t,i){if(i.length>1)return i=i.split(""),("e"===(n=[e(t,i[0]),e(t,i[1])])[0]||"w"===n[0])&&n.reverse(),n.join("");var n;return{left:"w",right:"e",top:"n",bottom:"s"}[n=iu.transformDirection({w:"left",e:"right",n:"top",s:"bottom"}[i],function(e){return iu.getTransform(e.group)}(t))]}(e,i);a&&a.attr({silent:!n,invisible:!n,cursor:n?SA[r]+"-resize":null})}))}function FA(e,t,i,n,a,r,o){var s=t.childOfName(i);s&&s.setShape(function(e){var t=xA(e[0][0],e[1][0]),i=xA(e[0][1],e[1][1]),n=_A(e[0][0],e[1][0]),a=_A(e[0][1],e[1][1]);return{x:t,y:i,width:n-t,height:a-i}}(YA(e,t,[[n,a],[n+r,a+o]])))}function HA(e){return _e.defaults({strokeNoScale:!0},e.brushStyle)}function WA(e,t,i,n){var a=[xA(e,i),xA(t,n)],r=[_A(e,i),_A(t,n)];return[[a[0],r[0]],[a[1],r[1]]]}function UA(e,t,i,n,a,r,o,s){var l=n.__brushOption,u=e(l.range),h=jA(i,r,o);vA(a.split(""),(function(e){var t=wA[e];u[t[0]][t[1]]+=h[t[0]]})),l.range=t(WA(u[0][0],u[1][0],u[0][1],u[1][1])),PA(i,n),EA(i,{isEnd:!1})}function ZA(e,t,i,n,a){var r=t.__brushOption.range,o=jA(e,i,n);vA(r,(function(e){e[0]+=o[0],e[1]+=o[1]})),PA(e,t),EA(e,{isEnd:!1})}function jA(e,t,i){var n=e.group,a=n.transformCoordToLocal(t,i),r=n.transformCoordToLocal(0,0);return[a[0]-r[0],a[1]-r[1]]}function YA(e,t,i){var n=RA(e,t);return n&&!0!==n?n.clipPath(i,e._transform):_e.clone(i)}function XA(e){var t=e.event;t.preventDefault&&t.preventDefault()}function qA(e,t,i){return e.childOfName("main").contain(t,i)}function KA(e,t,i,n){var a,r=e._creatingCover,o=e._creatingPanel,s=e._brushOption;if(e._track.push(i.slice()),function(e){var t=e._track;if(!t.length)return!1;var i=t[t.length-1],n=t[0],a=i[0]-n[0],r=i[1]-n[1];return bA(a*a+r*r,.5)>6}(e)||r){if(o&&!r){"single"===s.brushMode&&NA(e);var l=_e.clone(s);l.brushType=$A(l.brushType,o),l.panelId=!0===o?null:o.panelId,r=e._creatingCover=AA(e,l),e._covers.push(r)}if(r){var u=eC[$A(e._brushType,o)];r.__brushOption.range=u.getCreatingRange(YA(e,r,e._track)),n&&(CA(e,r),u.updateCommon(e,r)),DA(e,r),a={isEnd:n}}}else n&&"single"===s.brushMode&&s.removeOnClick&&OA(e,t,i)&&NA(e)&&(a={isEnd:n,removeOnClick:!0});return a}function $A(e,t){return"auto"===e?t.defaultBrushType:e}TA.prototype={constructor:TA,enableBrush:function(e){var t,i;return this._brushType&&(i=(t=this)._zr,Rw.release(i,"globalPan",t._uid),function(e,t){vA(t,(function(t,i){e.off(i,t)}))}(i,t._handlers),t._brushType=t._brushOption=null),e.brushType&&function(e,t){var i=e._zr;e._enableGlobalPan||Rw.take(i,"globalPan",e._uid);(function(e,t){vA(t,(function(t,i){e.on(i,t)}))})(i,e._handlers),e._brushType=t.brushType,e._brushOption=_e.merge(_e.clone(MA),t,!0)}(this,e),this},setPanels:function(e){if(e&&e.length){var t=this._panels={};_e.each(e,(function(e){t[e.panelId]=_e.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){vA(this._covers,e,t)},updateCovers:function(e){e=_e.map(e,(function(e){return _e.merge(_e.clone(MA),e,!0)}));var t=this._covers,i=this._covers=[],n=this,a=this._creatingCover;return new Tf(t,e,(function(e,t){return r(e.__brushOption,t)}),r).add(o).update(o).remove((function(e){t[e]!==a&&n.group.remove(t[e])})).execute(),this;function r(e,t){return(null!=e.id?e.id:"\0-brush-index-"+t)+"-"+e.brushType}function o(r,o){var s=e[r];if(null!=o&&t[o]===a)i[r]=t[o];else{var l=i[r]=null!=o?(t[o].__brushOption=s,t[o]):CA(n,AA(n,s));PA(n,l)}}},unmount:function(){return this.enableBrush(!1),NA(this),this._zr.remove(this.group),this},dispose:function(){this.unmount(),this.off()}},_e.mixin(TA,Oe);var JA={mousedown:function(e){if(this._dragging)QA(this,e);else if(!e.target||!e.target.draggable){XA(e);var t=this.group.transformCoordToLocal(e.offsetX,e.offsetY);this._creatingCover=null,(this._creatingPanel=OA(this,e,t))&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(e){var t=e.offsetX,i=e.offsetY,n=this.group.transformCoordToLocal(t,i);if(function(e,t,i){if(e._brushType&&!function(e,t,i){var n=e._zr;return t<0||t>n.getWidth()||i<0||i>n.getHeight()}(e,t)){var n=e._zr,a=e._covers,r=OA(e,t,i);if(!e._dragging)for(var o=0;o<a.length;o++){var s=a[o].__brushOption;if(r&&(!0===r||s.panelId===r.panelId)&&eC[s.brushType].contain(a[o],i[0],i[1]))return}r&&n.setCursorStyle("crosshair")}}(this,e,n),this._dragging){XA(e);var a=KA(this,e,n,!1);a&&EA(this,a)}},mouseup:function(e){QA(this,e)}};function QA(e,t){if(e._dragging){XA(t);var i=t.offsetX,n=t.offsetY,a=e.group.transformCoordToLocal(i,n),r=KA(e,t,a,!0);e._dragging=!1,e._track=[],e._creatingCover=null,r&&EA(e,r)}}var eC={lineX:tC(0),lineY:tC(1),rect:{createCover:function(e,t){return BA(mA(UA,(function(e){return e}),(function(e){return e})),e,t,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(e){var t=zA(e);return WA(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,i,n){VA(e,t,i,n)},updateCommon:GA,contain:qA},polygon:{createCover:function(e,t){var i=new iu.Group;return i.add(new iu.Polyline({name:"main",style:HA(t),silent:!0})),i},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new iu.Polygon({name:"main",draggable:!0,drift:mA(ZA,e,t),ondragend:mA(EA,e,{isEnd:!0})}))},updateCoverShape:function(e,t,i,n){t.childAt(0).setShape({points:YA(e,t,i)})},updateCommon:GA,contain:qA}};function tC(e){return{createCover:function(t,i){return BA(mA(UA,(function(t){var i=[t,[0,100]];return e&&i.reverse(),i}),(function(t){return t[e]})),t,i,[["w","e"],["n","s"]][e])},getCreatingRange:function(t){var i=zA(t);return[xA(i[0][e],i[1][e]),_A(i[0][e],i[1][e])]},updateCoverShape:function(t,i,n,a){var r,o=RA(t,i);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=[n,r];e&&l.reverse(),VA(t,i,l,a)},updateCommon:GA,contain:qA}}var iC=TA,nC=Yw.onIrrelevantElement;function aC(e){return Oi.create(e)}var rC={makeRectPanelClipPath:function(e){return e=aC(e),function(t,i){return iu.clipPointsByRect(t,e)}},makeLinearBrushOtherExtent:function(e,t){return e=aC(e),function(i){var n=null!=t?t:i,a=n?e.width:e.height,r=n?e.x:e.y;return[r,r+(a||0)]}},makeRectIsTargetByCursor:function(e,t,i){return e=aC(e),function(n,a,r){return e.contain(a[0],a[1])&&!nC(n,t,i)}}},oC=["axisLine","axisTickLabel","axisName"],sC=Qv.extendComponentView({type:"parallelAxis",init:function(e,t){sC.superApply(this,"init",arguments),(this._brushController=new iC(t.getZr())).on("brush",_e.bind(this._onBrush,this))},render:function(e,t,i,n){if(!function(e,t,i){return i&&"axisAreaSelect"===i.type&&t.findComponents({mainType:"parallelAxis",query:i})[0]===e}(e,t,n)){this.axisModel=e,this.api=i,this.group.removeAll();var a=this._axisGroup;if(this._axisGroup=new iu.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,h=o.getAxisLayout(u),c=_e.extend({strokeContainThreshold:l},h),d=new f_(e,c);_e.each(oC,d.add,d),this._axisGroup.add(d.getGroup()),this._refreshBrushController(c,s,e,r,l,i);var p=n&&!1===n.animation?null:e;iu.groupTransition(a,this._axisGroup,p)}}},_refreshBrushController:function(e,t,i,n,a,r){var o=i.axis.getExtent(),s=o[1]-o[0],l=Math.min(30,.1*Math.abs(s)),u=iu.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:rC.makeRectPanelClipPath(u),isTargetByCursor:rC.makeRectIsTargetByCursor(u,r,n),getLinearBrushOtherExtent:rC.makeLinearBrushOtherExtent(u,0)}]).enableBrush({brushType:"lineX",brushStyle:t,removeOnClick:!0}).updateCovers(function(e){var t=e.axis;return _e.map(e.activeIntervals,(function(e){return{brushType:"lineX",panelId:"pl",range:[t.dataToCoord(e[0],!0),t.dataToCoord(e[1],!0)]}}))}(i))},_onBrush:function(e,t){var i=this.axisModel,n=i.axis,a=_e.map(e,(function(e){return[n.coordToData(e.range[0],!0),n.coordToData(e.range[1],!0)]}));(!i.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:a})},dispose:function(){this._brushController.dispose()}});Qv.extendComponentView({type:"parallel",render:function(e,t,i){this._model=e,this._api=i,this._handlers||(this._handlers={},_e.each(lC,(function(e,t){i.getZr().on(t,this._handlers[t]=_e.bind(e,this))}),this)),ip.createOrUpdate(this,"_throttledDispatchExpand",e.get("axisExpandRate"),"fixRate")},dispose:function(e,t){_e.each(this._handlers,(function(e,i){t.getZr().off(i,e)})),this._handlers=null},_throttledDispatchExpand:function(e){this._dispatchExpand(e)},_dispatchExpand:function(e){e&&this._api.dispatchAction(_e.extend({type:"parallelAxisExpand"},e))}});var lC={mousedown:function(e){uC(this,"click")&&(this._mouseDownPoint=[e.offsetX,e.offsetY])},mouseup:function(e){var t=this._mouseDownPoint;if(uC(this,"click")&&t){var i=[e.offsetX,e.offsetY];if(Math.pow(t[0]-i[0],2)+Math.pow(t[1]-i[1],2)>5)return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]);"none"!==n.behavior&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(e){if(!this._mouseDownPoint&&uC(this,"mousemove")){var t=this._model,i=t.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]),n=i.behavior;"jump"===n&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===n?null:{axisExpandWindow:i.axisExpandWindow,animation:"jump"===n&&null})}}};function uC(e,t){var i=e._model;return i.get("axisExpandable")&&i.get("axisExpandTriggerOn")===t}Qv.registerPreprocessor($T);var hC=_e.each,cC=_e.createHashMap;Nd.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(e,t){var i=this.getSource();return function(e,t){if(e.encodeDefine)return;var i=t.ecModel.getComponent("parallel",t.get("parallelIndex"));if(!i)return;var n=e.encodeDefine=cC();hC(i.dimensions,(function(e){var t=+e.replace("dim","");n.set(e,t)}))}(i,this),Ng(i,this)},getRawIndicesByActiveState:function(e){var t=this.coordinateSystem,i=this.getData(),n=[];return t.eachActiveState(i,(function(t,a){e===t&&n.push(i.getRawIndex(a))})),n},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"}});Jd.extend({type:"parallel",init:function(){this._dataGroup=new iu.Group,this.group.add(this._dataGroup),this._data,this._initialized},render:function(e,t,i,n){var a=this._dataGroup,r=e.getData(),o=this._data,s=e.coordinateSystem,l=s.dimensions,u=fC(e);if(r.diff(o).add((function(e){gC(pC(r,a,e,l,s),r,e,u)})).update((function(t,i){var a=o.getItemGraphicEl(i),h=dC(r,t,l,s);r.setItemGraphicEl(t,a);var c=n&&!1===n.animation?null:e;iu.updateProps(a,{shape:{points:h}},c,t),gC(a,r,t,u)})).remove((function(e){var t=o.getItemGraphicEl(e);a.remove(t)})).execute(),!this._initialized){this._initialized=!0;var h=function(e,t,i){var n=e.model,a=e.getRect(),r=new iu.Rect({shape:{x:a.x,y:a.y,width:a.width,height:a.height}}),o="horizontal"===n.get("layout")?"width":"height";return r.setShape(o,0),iu.initProps(r,{shape:{width:a.width,height:a.height}},t,i),r}(s,e,(function(){setTimeout((function(){a.removeClipPath()}))}));a.setClipPath(h)}this._data=r},incrementalPrepareRender:function(e,t,i){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},incrementalRender:function(e,t,i){for(var n=t.getData(),a=t.coordinateSystem,r=a.dimensions,o=fC(t),s=e.start;s<e.end;s++){var l=pC(n,this._dataGroup,s,r,a);l.incremental=!0,gC(l,n,s,o)}},dispose:function(){},remove:function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null}});function dC(e,t,i,n){for(var a,r=[],o=0;o<i.length;o++){var s=i[o],l=e.get(e.mapDimension(s),t);a=l,("category"===n.getAxis(s).type?null==a:null==a||isNaN(a))||r.push(n.dataToPoint(l,s))}return r}function pC(e,t,i,n,a){var r=dC(e,i,n,a),o=new iu.Polyline({shape:{points:r},silent:!0,z2:10});return t.add(o),e.setItemGraphicEl(i,o),o}function fC(e){var t=e.get("smooth",!0);return!0===t&&(t=.3),{lineStyle:e.getModel("lineStyle").getLineStyle(),smooth:null!=t?t:.3}}function gC(e,t,i,n){var a=n.lineStyle;t.hasItemOption&&(a=t.getItemModel(i).getModel("lineStyle").getLineStyle());e.useStyle(a);var r=e.style;r.fill=null,r.stroke=t.getItemVisual(i,"color"),r.opacity=t.getItemVisual(i,"opacity"),n.smooth&&(e.shape.smooth=n.smooth)}var mC=["lineStyle","normal","opacity"],vC={seriesType:"parallel",reset:function(e,t,i){var n=e.getModel("itemStyle"),a=e.getModel("lineStyle"),r=t.get("color"),o=a.get("color")||n.get("color")||r[e.seriesIndex%r.length],s=e.get("inactiveOpacity"),l=e.get("activeOpacity"),u=e.getModel("lineStyle").getLineStyle(),h=e.coordinateSystem,c=e.getData(),d={normal:u.opacity,active:l,inactive:s};return c.setVisual("color",o),{progress:function(e,t){h.eachActiveState(t,(function(e,i){var n=d[e];if("normal"===e&&t.hasItemOption){var a=t.getItemModel(i).get(mC,!0);null!=a&&(n=a)}t.setItemVisual(i,"opacity",n)}),e.start,e.end)}}}};Qv.registerVisual(vC);var yC=Du.encodeHTML,xC=Nd.extend({type:"series.sankey",layoutInfo:null,levelModels:null,getInitialData:function(e,t){for(var i=e.edges||e.links,n=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 gu(a[o],this,t));if(n&&i)return SI(n,i,this,!0,(function(e,t){e.wrapMethod("getItemModel",(function(e,t){return e.customizeGetParent((function(e){var i=this.parentModel,n=i.getData().getItemLayout(t).depth;return i.levelModels[n]||this.parentModel})),e})),t.wrapMethod("getItemModel",(function(e,t){return e.customizeGetParent((function(e){var i=this.parentModel,n=i.getGraph().getEdgeByIndex(t).node1.getLayout().depth;return i.levelModels[n]||this.parentModel})),e}))})).data},setNodePosition:function(e,t){var i=this.option.data[e];i.localX=t[0],i.localY=t[1]},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},formatTooltip:function(e,t,i){if("edge"===i){var n=this.getDataParams(e,i),a=n.data,r=a.source+" -- "+a.target;return n.value&&(r+=" : "+n.value),yC(r)}if("node"===i){var o=this.getGraph().getNodeByIndex(e).getLayout().value,s=this.getDataParams(e,i).data.name;if(o)r=s+" : "+o;return yC(r)}return xC.superCall(this,"formatTooltip",e,t)},optionUpdated:function(){var e=this.option;!0===e.focusNodeAdjacency&&(e.focusNodeAdjacency="allEdges")},getDataParams:function(e,t){var i=xC.superCall(this,"getDataParams",e,t);if(null==i.value&&"node"===t){var n=this.getGraph().getNodeByIndex(e).getLayout().value;i.value=n}return i},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}}),_C=["itemStyle","opacity"],bC=["emphasis","itemStyle","opacity"],wC=["lineStyle","opacity"],SC=["emphasis","lineStyle","opacity"];function MC(e,t){return e.getVisual("opacity")||e.getModel().get(t)}function IC(e,t,i){var n=e.getGraphicEl(),a=MC(e,t);null!=i&&(null==a&&(a=1),a*=i),n.downplay&&n.downplay(),n.traverse((function(e){"group"!==e.type&&e.setStyle("opacity",a)}))}function TC(e,t){var i=MC(e,t),n=e.getGraphicEl();n.traverse((function(e){"group"!==e.type&&e.setStyle("opacity",i)})),n.highlight&&n.highlight()}var AC=iu.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 i=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+i,t.y2),e.bezierCurveTo(t.cpx2+i,t.cpy2,t.cpx1+i,t.cpy1,t.x1+i,t.y1)):(e.lineTo(t.x2,t.y2+i),e.bezierCurveTo(t.cpx2,t.cpy2+i,t.cpx1,t.cpy1+i,t.x1,t.y1+i)),e.closePath()},highlight:function(){this.trigger("emphasis")},downplay:function(){this.trigger("normal")}});Qv.extendChartView({type:"sankey",_model:null,_focusAdjacencyDisabled:!1,render:function(e,t,i){var n=this,a=e.getGraph(),r=this.group,o=e.layoutInfo,s=o.width,l=o.height,u=e.getData(),h=e.getData("edge"),c=e.get("orient");this._model=e,r.removeAll(),r.attr("position",[o.x,o.y]),a.eachEdge((function(t){var i=new AC;i.dataIndex=t.dataIndex,i.seriesIndex=e.seriesIndex,i.dataType="edge";var n,a,o,u,d,p,f,g,m=t.getModel("lineStyle"),v=m.get("curveness"),y=t.node1.getLayout(),x=t.node1.getModel(),_=x.get("localX"),b=x.get("localY"),w=t.node2.getLayout(),S=t.node2.getModel(),M=S.get("localX"),I=S.get("localY"),T=t.getLayout();switch(i.shape.extent=Math.max(1,T.dy),i.shape.orient=c,"vertical"===c?(n=(null!=_?_*s:y.x)+T.sy,a=(null!=b?b*l:y.y)+y.dy,o=(null!=M?M*s:w.x)+T.ty,d=n,p=a*(1-v)+(u=null!=I?I*l:w.y)*v,f=o,g=a*v+u*(1-v)):(n=(null!=_?_*s:y.x)+y.dx,a=(null!=b?b*l:y.y)+T.sy,d=n*(1-v)+(o=null!=M?M*s:w.x)*v,p=a,f=n*v+o*(1-v),g=u=(null!=I?I*l:w.y)+T.ty),i.setShape({x1:n,y1:a,x2:o,y2:u,cpx1:d,cpy1:p,cpx2:f,cpy2:g}),i.setStyle(m.getItemStyle()),i.style.fill){case"source":i.style.fill=t.node1.getVisual("color");break;case"target":i.style.fill=t.node2.getVisual("color")}iu.setHoverStyle(i,t.getModel("emphasis.lineStyle").getItemStyle()),r.add(i),h.setItemGraphicEl(t.dataIndex,i)})),a.eachNode((function(t){var i=t.getLayout(),n=t.getModel(),a=n.get("localX"),o=n.get("localY"),h=n.getModel("label"),c=n.getModel("emphasis.label"),d=new iu.Rect({shape:{x:null!=a?a*s:i.x,y:null!=o?o*l:i.y,width:i.dx,height:i.dy},style:n.getModel("itemStyle").getItemStyle()}),p=t.getModel("emphasis.itemStyle").getItemStyle();iu.setLabelStyle(d.style,p,h,c,{labelFetcher:e,labelDataIndex:t.dataIndex,defaultText:t.id,isRectText:!0}),d.setStyle("fill",t.getVisual("color")),iu.setHoverStyle(d,p),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){n._focusAdjacencyDisabled=!0,this.shape.x+=t,this.shape.y+=r,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:e.id,dataIndex:u.getRawIndex(a),localX:this.shape.x/s,localY:this.shape.y/l})},t.ondragend=function(){n._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(){n._focusAdjacencyDisabled||(n._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:e.id,dataIndex:t.dataIndex}))}),t.on("mouseout",t.unfocusNodeAdjHandler=function(){n._focusAdjacencyDisabled||n._dispatchUnfocus(i)}))})),h.eachItemGraphicEl((function(t,a){var r=h.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(){n._focusAdjacencyDisabled||(n._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:e.id,edgeDataIndex:t.dataIndex}))}),t.on("mouseout",t.unfocusNodeAdjHandler=function(){n._focusAdjacencyDisabled||n._dispatchUnfocus(i)}))})),!this._data&&e.get("animation")&&r.setClipPath(function(e,t,i){var n=new iu.Rect({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return iu.initProps(n,{shape:{width:e.width+20}},t,i),n}(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,i,n){var a=e.getData(),r=a.graph,o=n.dataIndex,s=a.getItemModel(o),l=n.edgeDataIndex;if(null!=o||null!=l){var u=r.getNodeByIndex(o),h=r.getEdgeByIndex(l);if(r.eachNode((function(e){IC(e,_C,.1)})),r.eachEdge((function(e){IC(e,wC,.1)})),u){TC(u,bC);var c=s.get("focusNodeAdjacency");"outEdges"===c?_e.each(u.outEdges,(function(e){e.dataIndex<0||(TC(e,SC),TC(e.node2,bC))})):"inEdges"===c?_e.each(u.inEdges,(function(e){e.dataIndex<0||(TC(e,SC),TC(e.node1,bC))})):"allEdges"===c&&_e.each(u.edges,(function(e){e.dataIndex<0||(TC(e,SC),e.node1!==u&&TC(e.node1,bC),e.node2!==u&&TC(e.node2,bC))}))}h&&(TC(h,SC),TC(h.node1,bC),TC(h.node2,bC))}},unfocusNodeAdjacency:function(e,t,i,n){var a=e.getGraph();a.eachNode((function(e){IC(e,_C)})),a.eachEdge((function(e){IC(e,wC)}))}});Qv.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 CC=vr.groupData;function DC(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return null!=t.depth&&t.depth>=0}function LC(e,t,i,n,a){var r="vertical"===a?"x":"y";_e.each(e,(function(e){var o,s,l;e.sort((function(e,t){return e.getLayout()[r]-t.getLayout()[r]}));for(var u=0,h=e.length,c="vertical"===a?"dx":"dy",d=0;d<h;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()[c]+t;if((l=u-t-("vertical"===a?n:i))>0)for(o=s.getLayout()[r]-l,"vertical"===a?s.setLayout({x:o},!0):s.setLayout({y:o},!0),u=o,d=h-2;d>=0;--d)(l=(s=e[d]).getLayout()[r]+s.getLayout()[c]+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 PC(e,t,i){_e.each(e.slice().reverse(),(function(e){_e.each(e,(function(e){if(e.outEdges.length){var n=BC(e.outEdges,kC,i)/BC(e.outEdges,zC,i);if(isNaN(n)){var a=e.outEdges.length;n=a?BC(e.outEdges,OC,i)/a:0}if("vertical"===i){var r=e.getLayout().x+(n-EC(e,i))*t;e.setLayout({x:r},!0)}else{var o=e.getLayout().y+(n-EC(e,i))*t;e.setLayout({y:o},!0)}}}))}))}function kC(e,t){return EC(e.node2,t)*e.getValue()}function OC(e,t){return EC(e.node2,t)}function RC(e,t){return EC(e.node1,t)*e.getValue()}function NC(e,t){return EC(e.node1,t)}function EC(e,t){return"vertical"===t?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function zC(e){return e.getValue()}function BC(e,t,i){for(var n=0,a=e.length,r=-1;++r<a;){var o=+t.call(e,e[r],i);isNaN(o)||(n+=o)}return n}function VC(e,t,i){_e.each(e,(function(e){_e.each(e,(function(e){if(e.inEdges.length){var n=BC(e.inEdges,RC,i)/BC(e.inEdges,zC,i);if(isNaN(n)){var a=e.inEdges.length;n=a?BC(e.inEdges,NC,i)/a:0}if("vertical"===i){var r=e.getLayout().x+(n-EC(e,i))*t;e.setLayout({x:r},!0)}else{var o=e.getLayout().y+(n-EC(e,i))*t;e.setLayout({y:o},!0)}}}))}))}var GC=function(e,t,i){e.eachSeriesByType("sankey",(function(e){var i=e.get("nodeWidth"),n=e.get("nodeGap"),a=function(e,t){return Gu.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){_e.each(e,(function(e){var t=BC(e.outEdges,zC),i=BC(e.inEdges,zC),n=e.getValue()||0,a=Math.max(t,i,n);e.setLayout({value:a},!0)}))}(l),function(e,t,i,n,a,r,o,s,l){(function(e,t,i,n,a,r,o){for(var s=[],l=[],u=[],h=[],c=0,d=0;d<t.length;d++)s[d]=1;for(d=0;d<e.length;d++)l[d]=e[d].inEdges.length,0===l[d]&&u.push(e[d]);var p=-1;for(;u.length;){for(var f=0;f<u.length;f++){var g=u[f],m=g.hostGraph.data.getRawDataItem(g.dataIndex),v=null!=m.depth&&m.depth>=0;v&&m.depth>p&&(p=m.depth),g.setLayout({depth:v?m.depth:c},!0),"vertical"===r?g.setLayout({dy:i},!0):g.setLayout({dx:i},!0);for(var y=0;y<g.outEdges.length;y++){var x=g.outEdges[y],_=t.indexOf(x);s[_]=0;var b=x.node2,w=e.indexOf(b);0==--l[w]&&h.indexOf(b)<0&&h.push(b)}}++c,u=h,h=[]}for(d=0;d<s.length;d++)if(1===s[d])throw new Error("Sankey is a DAG, the original data has cycle!");var S=p>c-1?p:c-1;o&&"left"!==o&&function(e,t,i,n){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 h=l.inEdges[u];a.indexOf(h.node1)<0&&a.push(h.node1)}}r=a,a=[],++o}_e.each(e,(function(e){DC(e)||e.setLayout({depth:Math.max(0,n-e.getLayout().skNodeHeight)},!0)}))}else"justify"===t&&function(e,t){_e.each(e,(function(e){DC(e)||e.outEdges.length||e.setLayout({depth:t},!0)}))}(e,n)}(e,o,0,S);!function(e,t,i){_e.each(e,(function(e){var n=e.getLayout().depth*t;"vertical"===i?e.setLayout({y:n},!0):e.setLayout({x:n},!0)}))}(e,"vertical"===r?(a-i)/S:(n-i)/S,r)})(e,t,i,a,r,s,l),function(e,t,i,n,a,r,o){var s=function(e,t){var i=[],n="vertical"===t?"y":"x",a=CC(e,(function(e){return e.getLayout()[n]}));return a.keys.sort((function(e,t){return e-t})),_e.each(a.keys,(function(e){i.push(a.buckets.get(e))})),i}(e,o);(function(e,t,i,n,a,r){var o=1/0;_e.each(e,(function(e){var t=e.length,s=0;_e.each(e,(function(e){s+=e.getLayout().value}));var l="vertical"===r?(n-(t-1)*a)/s:(i-(t-1)*a)/s;l<o&&(o=l)})),_e.each(e,(function(e){_e.each(e,(function(e,t){var i=e.getLayout().value*o;"vertical"===r?(e.setLayout({x:t},!0),e.setLayout({dx:i},!0)):(e.setLayout({y:t},!0),e.setLayout({dy:i},!0))}))})),_e.each(t,(function(e){var t=+e.getValue()*o;e.setLayout({dy:t},!0)}))})(s,t,i,n,a,o),LC(s,a,i,n,o);for(var l=1;r>0;r--)PC(s,l*=.99,o),LC(s,a,i,n,o),VC(s,l,o),LC(s,a,i,n,o)}(e,t,r,a,n,o,s),function(e,t){var i="vertical"===t?"x":"y";_e.each(e,(function(e){e.outEdges.sort((function(e,t){return e.node2.getLayout()[i]-t.node2.getLayout()[i]})),e.inEdges.sort((function(e,t){return e.node1.getLayout()[i]-t.node1.getLayout()[i]}))})),_e.each(e,(function(e){var t=0,i=0;_e.each(e.outEdges,(function(e){e.setLayout({sy:t},!0),t+=e.getLayout().dy})),_e.each(e.inEdges,(function(e){e.setLayout({ty:i},!0),i+=e.getLayout().dy}))}))}(e,s)}(l,u,i,n,r,o,0!==_e.filter(l,(function(e){return 0===e.getLayout().value})).length?0:e.get("layoutIterations"),e.get("orient"),e.get("nodeAlign"))}))};var FC=function(e,t){e.eachSeriesByType("sankey",(function(e){var t=e.getGraph().nodes;if(t.length){var i=1/0,n=-1/0;_e.each(t,(function(e){var t=e.getLayout().value;t<i&&(i=t),t>n&&(n=t)})),_e.each(t,(function(t){var a=new qM({type:"color",mappingMethod:"linear",dataExtent:[i,n],visual:e.get("color")}).mapValueToVisual(t.getLayout().value),r=t.getModel().get("itemStyle.color");null!=r?t.setVisual("color",r):t.setVisual("color",a)}))}}))};Qv.registerLayout(GC),Qv.registerVisual(FC);var HC=Pf.getDimensionTypeByAxis,WC=Rh.makeSeriesEncodeForAxisCoordSys,UC={seriesModelMixin:{_baseAxisDim:null,getInitialData:function(e,t){var i,n,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",i=a.getOrdinalMeta(),n=!0):"category"===s?(e.layout="vertical",i=r.getOrdinalMeta(),n=!0):e.layout=e.layout||"horizontal";var l=["x","y"],u="horizontal"===e.layout?0:1,h=this._baseAxisDim=l[u],c=l[1-u],d=[a,r],p=d[u].get("type"),f=d[1-u].get("type"),g=e.data;if(g&&n){var m=[];_e.each(g,(function(e,t){var i;e.value&&_e.isArray(e.value)?(i=e.value.slice(),e.value.unshift(t)):_e.isArray(e)?(i=e.slice(),e.unshift(t)):i=e,m.push(i)})),e.data=m}var v=this.defaultValueDimensions,y=[{name:h,type:HC(p),ordinalMeta:i,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:c,type:HC(f),dimsDef:v.slice()}];return ub(this,{coordDimensions:y,dimensionsCount:v.length+1,encodeDefaulter:_e.curry(WC,y,this)})},getBaseAxis:function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis}}},ZC=UC.seriesModelMixin,jC=Nd.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}});_e.mixin(jC,ZC,!0);var YC=["itemStyle"],XC=["emphasis","itemStyle"],qC=(Jd.extend({type:"boxplot",render:function(e,t,i){var n=e.getData(),a=this.group,r=this._data;this._data||a.removeAll();var o="horizontal"===e.get("layout")?1:0;n.diff(r).add((function(e){if(n.hasValue(e)){var t=KC(n.getItemLayout(e),n,e,o,!0);n.setItemGraphicEl(e,t),a.add(t)}})).update((function(e,t){var i=r.getItemGraphicEl(t);if(n.hasValue(e)){var s=n.getItemLayout(e);i?$C(s,i,n,e):i=KC(s,n,e,o),a.add(i),n.setItemGraphicEl(e,i)}else a.remove(i)})).remove((function(e){var t=r.getItemGraphicEl(e);t&&a.remove(t)})).execute(),this._data=n},remove:function(e){var t=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl((function(e){e&&t.remove(e)}))},dispose:_e.noop}),Vo.extend({type:"boxplotBoxPath",shape:{},buildPath:function(e,t){var i=t.points,n=0;for(e.moveTo(i[n][0],i[n][1]),n++;n<4;n++)e.lineTo(i[n][0],i[n][1]);for(e.closePath();n<i.length;n++)e.moveTo(i[n][0],i[n][1]),n++,e.lineTo(i[n][0],i[n][1])}}));function KC(e,t,i,n,a){var r=e.ends,o=new qC({shape:{points:a?JC(r,n,e):r}});return $C(e,o,t,i,a),o}function $C(e,t,i,n,a){var r=i.hostModel;(0,iu[a?"initProps":"updateProps"])(t,{shape:{points:e.ends}},r,n);var o=i.getItemModel(n),s=o.getModel(YC),l=i.getItemVisual(n,"color"),u=s.getItemStyle(["borderColor"]);u.stroke=l,u.strokeNoScale=!0,t.useStyle(u),t.z2=100;var h=o.getModel(XC).getItemStyle();iu.setHoverStyle(t,h)}function JC(e,t,i){return _e.map(e,(function(e){return(e=e.slice())[t]=i.initBaseline,e}))}var QC=["itemStyle","borderColor"];var eD=function(e,t){var i=e.get("color");e.eachRawSeriesByType("boxplot",(function(t){var n=i[t.seriesIndex%i.length],a=t.getData();a.setVisual({legendSymbol:"roundRect",color:t.get(QC)||n}),e.isSeriesFiltered(t)||a.each((function(e){var t=a.getItemModel(e);a.setItemVisual(e,{color:t.get(QC,!0)})}))}))},tD=bu.parsePercent,iD=_e.each;var nD=function(e){var t=function(e){var t=[],i=[];return e.eachSeriesByType("boxplot",(function(e){var n=e.getBaseAxis(),a=_e.indexOf(i,n);a<0&&(a=i.length,i[a]=n,t[a]={axis:n,seriesModels:[]}),t[a].seriesModels.push(e)})),t}(e);iD(t,(function(e){var t=e.seriesModels;t.length&&(!function(e){var t,i,n=e.axis,a=e.seriesModels,r=a.length,o=e.boxWidthList=[],s=e.boxOffsetList=[],l=[];if("category"===n.type)i=n.getBandWidth();else{var u=0;iD(a,(function(e){u=Math.max(u,e.getData().count())})),t=n.getExtent(),Math.abs(t[1]-t[0])}iD(a,(function(e){var t=e.get("boxWidth");_e.isArray(t)||(t=[t,t]),l.push([tD(t[0],i)||0,tD(t[1],i)||0])}));var h=.8*i-2,c=h/r*.3,d=(h-c*(r-1))/r,p=d/2-h/2;iD(a,(function(e,t){s.push(p),p+=c+d,o.push(Math.min(Math.max(d,l[t][0]),l[t][1]))}))}(e),iD(t,(function(t,i){!function(e,t,i){var n=e.coordinateSystem,a=e.getData(),r=i/2,o="horizontal"===e.get("layout")?0:1,s=1-o,l=["x","y"],u=a.mapDimension(l[o]),h=a.mapDimension(l[s],!0);if(null==u||h.length<5)return;for(var c=0;c<a.count();c++){var d=a.get(u,c),p=x(d,h[2],c),f=x(d,h[0],c),g=x(d,h[1],c),m=x(d,h[3],c),v=x(d,h[4],c),y=[];_(y,g,0),_(y,m,1),y.push(f,g,v,m),b(y,f),b(y,v),b(y,p),a.setItemLayout(c,{initBaseline:p[s],ends:y})}function x(e,i,r){var l,u=a.get(i,r),h=[];return h[o]=e,h[s]=u,isNaN(e)||isNaN(u)?l=[NaN,NaN]:(l=n.dataToPoint(h))[o]+=t,l}function _(e,t,i){var n=t.slice(),a=t.slice();n[o]+=r,a[o]-=r,i?e.push(n,a):e.push(a,n)}function b(e,t){var i=t.slice(),n=t.slice();i[o]-=r,n[o]+=r,e.push(i,n)}}(t,e.boxOffsetList[i],e.boxWidthList[i])})))}))};Qv.registerVisual(eD),Qv.registerLayout(nD);var aD=UC.seriesModelMixin,rD=Nd.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,i){var n=t.getItemLayout(e);return n&&i.rect(n.brushRect)}});_e.mixin(rD,aD,!0);var oD=Zy.createClipPath,sD=["itemStyle"],lD=["emphasis","itemStyle"],uD=["color","color0","borderColor","borderColor0"],hD=(Jd.extend({type:"candlestick",render:function(e,t,i){this.group.removeClipPath(),this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},incrementalPrepareRender:function(e,t,i){this._clear(),this._updateDrawMode(e)},incrementalRender:function(e,t,i,n){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(),i=this._data,n=this.group,a=t.getLayout("isSimpleBox"),r=e.get("clip",!0),o=e.coordinateSystem,s=o.getArea&&o.getArea();this._data||n.removeAll(),t.diff(i).add((function(i){if(t.hasValue(i)){var o,l=t.getItemLayout(i);if(r&&dD(s,l))return;o=cD(l,i,!0),iu.initProps(o,{shape:{points:l.ends}},e,i),pD(o,t,i,a),n.add(o),t.setItemGraphicEl(i,o)}})).update((function(o,l){var u=i.getItemGraphicEl(l);if(t.hasValue(o)){var h=t.getItemLayout(o);r&&dD(s,h)?n.remove(u):(u?iu.updateProps(u,{shape:{points:h.ends}},e,o):u=cD(h),pD(u,t,o,a),n.add(u),t.setItemGraphicEl(o,u))}else n.remove(u)})).remove((function(e){var t=i.getItemGraphicEl(e);t&&n.remove(t)})).execute(),this._data=t},_renderLarge:function(e){this._clear(),mD(e,this.group);var t=e.get("clip",!0)?oD(e.coordinateSystem,!1,e):null;t?this.group.setClipPath(t):this.group.removeClipPath()},_incrementalRenderNormal:function(e,t){for(var i,n=t.getData(),a=n.getLayout("isSimpleBox");null!=(i=e.next());){var r;pD(r=cD(n.getItemLayout(i)),n,i,a),r.incremental=!0,this.group.add(r)}},_incrementalRenderLarge:function(e,t){mD(t,this.group,!0)},remove:function(e){this._clear()},_clear:function(){this.group.removeAll(),this._data=null},dispose:_e.noop}),Vo.extend({type:"normalCandlestickBox",shape:{},buildPath:function(e,t){var i=t.points;this.__simpleBox?(e.moveTo(i[4][0],i[4][1]),e.lineTo(i[6][0],i[6][1])):(e.moveTo(i[0][0],i[0][1]),e.lineTo(i[1][0],i[1][1]),e.lineTo(i[2][0],i[2][1]),e.lineTo(i[3][0],i[3][1]),e.closePath(),e.moveTo(i[4][0],i[4][1]),e.lineTo(i[5][0],i[5][1]),e.moveTo(i[6][0],i[6][1]),e.lineTo(i[7][0],i[7][1]))}}));function cD(e,t,i){var n=e.ends;return new hD({shape:{points:i?fD(n,e):n},z2:100})}function dD(e,t){for(var i=!0,n=0;n<t.ends.length;n++)if(e.contain(t.ends[n][0],t.ends[n][1])){i=!1;break}return i}function pD(e,t,i,n){var a=t.getItemModel(i),r=a.getModel(sD),o=t.getItemVisual(i,"color"),s=t.getItemVisual(i,"borderColor")||o,l=r.getItemStyle(uD);e.useStyle(l),e.style.strokeNoScale=!0,e.style.fill=o,e.style.stroke=s,e.__simpleBox=n;var u=a.getModel(lD).getItemStyle();iu.setHoverStyle(e,u)}function fD(e,t){return _e.map(e,(function(e){return(e=e.slice())[1]=t.initBaseline,e}))}var gD=Vo.extend({type:"largeCandlestickBox",shape:{},buildPath:function(e,t){for(var i=t.points,n=0;n<i.length;)if(this.__sign===i[n++]){var a=i[n++];e.moveTo(a,i[n++]),e.lineTo(a,i[n++])}else n+=3}});function mD(e,t,i){var n=e.getData(),a=n.getLayout("largePoints"),r=new gD({shape:{points:a},__sign:1});t.add(r);var o=new gD({shape:{points:a},__sign:-1});t.add(o),vD(1,r,e,n),vD(-1,o,e,n),i&&(r.incremental=!0,o.incremental=!0)}function vD(e,t,i,n){var a=e>0?"P":"N",r=n.getVisual("borderColor"+a)||n.getVisual("color"+a),o=i.getModel(sD).getItemStyle(uD);t.useStyle(o),t.style.fill=null,t.style.stroke=r}var yD=function(e){e&&_e.isArray(e.series)&&_e.each(e.series,(function(e){_e.isObject(e)&&"k"===e.type&&(e.type="candlestick")}))},xD=["itemStyle","borderColor"],_D=["itemStyle","borderColor0"],bD=["itemStyle","color"],wD=["itemStyle","color0"],SD={seriesType:"candlestick",plan:Gd(),performRawSeries:!0,reset:function(e,t){if(e.getData().setVisual({legendSymbol:"roundRect",colorP:i(1,e),colorN:i(-1,e),borderColorP:n(1,e),borderColorN:n(-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:i(o,r),borderColor:n(o,r)})}}};function i(e,t){return t.get(e>0?bD:wD)}function n(e,t){return t.get(e>0?xD:_D)}}},MD=iu.subPixelOptimize,ID=bu.parsePercent,TD=_e.retrieve2,AD="undefined"!=typeof Float32Array?Float32Array:Array;function CD(e,t,i,n,a){return i>n?-1:i<n?1:t>0?e.get(a,t-1)<=n?1:-1:1}var DD={seriesType:"candlestick",plan:Gd(),reset:function(e){var t=e.coordinateSystem,i=e.getData(),n=function(e,t){var i,n=e.getBaseAxis(),a="category"===n.type?n.getBandWidth():(i=n.getExtent(),Math.abs(i[1]-i[0])/t.count()),r=ID(TD(e.get("barMaxWidth"),a),a),o=ID(TD(e.get("barMinWidth"),1),a),s=e.get("barWidth");return null!=s?ID(s,a):Math.max(Math.min(a/2,r),o)}(e,i),a=["x","y"],r=i.mapDimension(a[0]),o=i.mapDimension(a[1],!0),s=o[0],l=o[1],u=o[2],h=o[3];if(i.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),!(null==r||o.length<4))return{progress:e.pipelineContext.large?function(e,i){var n,a,o=new AD(4*e.count),c=0,d=[],p=[];for(;null!=(a=e.next());){var f=i.get(r,a),g=i.get(s,a),m=i.get(l,a),v=i.get(u,a),y=i.get(h,a);isNaN(f)||isNaN(v)||isNaN(y)?(o[c++]=NaN,c+=3):(o[c++]=CD(i,a,g,m,l),d[0]=f,d[1]=v,n=t.dataToPoint(d,null,p),o[c++]=n?n[0]:NaN,o[c++]=n?n[1]:NaN,d[1]=y,n=t.dataToPoint(d,null,p),o[c++]=n?n[1]:NaN)}i.setLayout("largePoints",o)}:function(e,i){var a;for(;null!=(a=e.next());){var o=i.get(r,a),c=i.get(s,a),d=i.get(l,a),p=i.get(u,a),f=i.get(h,a),g=Math.min(c,d),m=Math.max(c,d),v=w(g,o),y=w(m,o),x=w(p,o),_=w(f,o),b=[];S(b,y,0),S(b,v,1),b.push(I(_),I(y),I(x),I(v)),i.setItemLayout(a,{sign:CD(i,a,c,d,l),initBaseline:c>d?y[1]:v[1],ends:b,brushRect:M(p,f,o)})}function w(e,i){var n=[];return n[0]=i,n[1]=e,isNaN(i)||isNaN(e)?[NaN,NaN]:t.dataToPoint(n)}function S(e,t,i){var a=t.slice(),r=t.slice();a[0]=MD(a[0]+n/2,1,!1),r[0]=MD(r[0]-n/2,1,!0),i?e.push(a,r):e.push(r,a)}function M(e,t,i){var a=w(e,i),r=w(t,i);return a[0]-=n/2,r[0]-=n/2,{x:a[0],y:a[1],width:n,height:r[1]-a[1]}}function I(e){return e[0]=MD(e[0],1),e}}}}};Qv.registerPreprocessor(yD),Qv.registerVisual(SD),Qv.registerLayout(DD);Nd.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(e,t){return Ng(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 LD=ev.createSymbol,PD=iu.Group,kD=bu.parsePercent;function OD(e,t){var i=t.rippleEffectColor||t.color;e.eachChild((function(e){e.attr({z:t.z,zlevel:t.zlevel,style:{stroke:"stroke"===t.brushType?i:null,fill:"fill"===t.brushType?i:null}})}))}function RD(e,t){PD.call(this);var i=new gy(e,t),n=new PD;this.add(i),this.add(n),n.beforeUpdate=function(){this.attr(i.getScale())},this.updateData(e,t)}var ND=RD.prototype;ND.stopEffectAnimation=function(){this.childAt(1).removeAll()},ND.startEffectAnimation=function(e){for(var t=e.symbolType,i=e.color,n=this.childAt(1),a=0;a<3;a++){var r=LD(t,-1,-1,2,2,i);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(),n.add(r)}OD(n,e)},ND.updateEffectAnimation=function(e){for(var t=this._effectCfg,i=this.childAt(1),n=["symbolType","period","rippleScale"],a=0;a<n.length;a++){var r=n[a];if(t[r]!==e[r])return this.stopEffectAnimation(),void this.startEffectAnimation(e)}OD(i,e)},ND.highlight=function(){this.trigger("emphasis")},ND.downplay=function(){this.trigger("normal")},ND.updateData=function(e,t){var i=e.hostModel;this.childAt(0).updateData(e,t);var n=this.childAt(1),a=e.getItemModel(t),r=e.getItemVisual(t,"symbol"),o=function(e){return _e.isArray(e)||(e=[+e,+e]),e}(e.getItemVisual(t,"symbolSize")),s=e.getItemVisual(t,"color");n.attr("scale",o),n.traverse((function(e){e.attr({fill:s})}));var l=a.getShallow("symbolOffset");if(l){var u=n.position;u[0]=kD(l[0],o[0]),u[1]=kD(l[1],o[1])}var h=e.getItemVisual(t,"symbolRotate");n.rotation=(h||0)*Math.PI/180||0;var c={};if(c.showEffectOn=i.get("showEffectOn"),c.rippleScale=a.get("rippleEffect.scale"),c.brushType=a.get("rippleEffect.brushType"),c.period=1e3*a.get("rippleEffect.period"),c.effectOffset=t/e.count(),c.z=a.getShallow("z")||0,c.zlevel=a.getShallow("zlevel")||0,c.symbolType=r,c.color=s,c.rippleEffectColor=a.get("rippleEffect.color"),this.off("mouseover").off("mouseout").off("emphasis").off("normal"),"render"===c.showEffectOn)this._effectCfg?this.updateEffectAnimation(c):this.startEffectAnimation(c),this._effectCfg=c;else{this._effectCfg=null,this.stopEffectAnimation();var d=this.childAt(0),p=function(){d.highlight(),"render"!==c.showEffectOn&&this.startEffectAnimation(c)},f=function(){d.downplay(),"render"!==c.showEffectOn&&this.stopEffectAnimation()};this.on("mouseover",p,this).on("mouseout",f,this).on("emphasis",p,this).on("normal",f,this)}this._effectCfg=c},ND.fadeOut=function(e){this.off("mouseover").off("mouseout").off("emphasis").off("normal"),e&&e()},_e.inherits(RD,PD);var ED=RD;Qv.extendChartView({type:"effectScatter",init:function(){this._symbolDraw=new wy(ED)},render:function(e,t,i){var n=e.getData(),a=this._symbolDraw;a.updateData(n),this.group.add(a.group)},updateTransform:function(e,t,i){var n=e.getData();this.group.dirty();var a=ux().reset(e);a.progress&&a.progress({start:0,end:n.count()},n),this._symbolDraw.updateLayout(n)},_updateGroupTransform:function(e){var t=e.coordinateSystem;t&&t.getRoamTransform&&(this.group.transform=dt.clone(t.getRoamTransform()),this.group.decomposeTransform())},remove:function(e,t){this._symbolDraw&&this._symbolDraw.remove(t)},dispose:function(){}});Qv.registerVisual(ox("effectScatter","circle")),Qv.registerLayout(ux("effectScatter"));var zD=_e.concatArray,BD=_e.mergeAll,VD=_e.map,GD=Du.encodeHTML,FD="undefined"==typeof Uint32Array?Array:Uint32Array,HD="undefined"==typeof Float64Array?Array:Float64Array;function WD(e){var t=e.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(e.data=VD(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),BD([t,e[0],e[1]])})))}var UD=Nd.extend({type:"series.lines",dependencies:["grid","polar"],visualColorAccessPath:"lineStyle.color",init:function(e){e.data=e.data||[],WD(e);var t=this._processFlatCoordsArray(e.data);this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset,t.flatCoords&&(e.data=new Float32Array(t.count)),UD.superApply(this,"init",arguments)},mergeOption:function(e){if(e.data=e.data||[],WD(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))}UD.superApply(this,"mergeOption",arguments)},appendData:function(e){var t=this._processFlatCoordsArray(e.data);t.flatCoords&&(this._flatCoords?(this._flatCoords=zD(this._flatCoords,t.flatCoords),this._flatCoordsOffset=zD(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 i=this._flatCoordsOffset[2*e],n=this._flatCoordsOffset[2*e+1],a=0;a<n;a++)t[a]=t[a]||[],t[a][0]=this._flatCoords[i+2*a],t[a][1]=this._flatCoords[i+2*a+1];return n}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 i=e.length,n=new FD(i),a=new HD(i),r=0,o=0,s=0,l=0;l<i;){s++;var u=e[l++];n[o++]=r+t,n[o++]=u;for(var h=0;h<u;h++){var c=e[l++],d=e[l++];a[r++]=c,a[r++]=d}}return{flatCoordsOffset:new Uint32Array(n.buffer,0,o),flatCoords:a,count:s}}return{flatCoordsOffset:null,flatCoords:null,count:e.length}},getInitialData:function(e,t){var i=new ag(["value"],this);return i.hasItemOption=!1,i.initData(e.data,[],(function(e,t,n,a){if(e instanceof Array)return NaN;i.hasItemOption=!0;var r=e.value;return null!=r?r instanceof Array?r[a]:r:void 0})),i},formatTooltip:function(e){var t=this.getData().getItemModel(e),i=t.get("name");if(i)return i;var n=t.get("fromName"),a=t.get("toName"),r=[];return null!=n&&r.push(n),null!=a&&r.push(a),GD(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}}}),ZD=ev.createSymbol;function jD(e,t,i){iu.Group.call(this),this.add(this.createLine(e,t,i)),this._updateEffectSymbol(e,t)}var YD=jD.prototype;YD.createLine=function(e,t,i){return new BI(e,t,i)},YD._updateEffectSymbol=function(e,t){var i=e.getItemModel(t).getModel("effect"),n=i.get("symbolSize"),a=i.get("symbol");_e.isArray(n)||(n=[n,n]);var r=i.get("color")||e.getItemVisual(t,"color"),o=this.childAt(1);this._symbolType!==a&&(this.remove(o),(o=ZD(a,-.5,-.5,1,1,r)).z2=100,o.culling=!0,this.add(o)),o&&(o.setStyle("shadowColor",r),o.setStyle(i.getItemStyle(["color"])),o.attr("scale",n),o.setColor(r),o.attr("scale",n),this._symbolType=a,this._symbolScale=n,this._updateEffectAnimation(e,i,t))},YD._updateEffectAnimation=function(e,t,i){var n=this.childAt(1);if(n){var a=this,r=e.getItemLayout(i),o=1e3*t.get("period"),s=t.get("loop"),l=t.get("constantSpeed"),u=_e.retrieve(t.get("delay"),(function(t){return t/e.count()*o/3})),h="function"==typeof u;if(n.ignore=!0,this.updateAnimationPoints(n,r),l>0&&(o=this.getLineLength(n)/l*1e3),o!==this._period||s!==this._loop){n.stopAnimation();var c=u;h&&(c=u(i)),n.__t>0&&(c=-o*n.__t),n.__t=0;var d=n.animate("",s).when(o,{__t:1}).delay(c).during((function(){a.updateSymbolPosition(n)}));s||d.done((function(){a.remove(n)})),d.start()}this._period=o,this._loop=s}},YD.getLineLength=function(e){return Te.dist(e.__p1,e.__cp1)+Te.dist(e.__cp1,e.__p2)},YD.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]},YD.updateData=function(e,t,i){this.childAt(0).updateData(e,t,i),this._updateEffectSymbol(e,t)},YD.updateSymbolPosition=function(e){var t=e.__p1,i=e.__p2,n=e.__cp1,a=e.__t,r=e.position,o=[r[0],r[1]],s=Fr.quadraticAt,l=Fr.quadraticDerivativeAt;r[0]=s(t[0],n[0],i[0],a),r[1]=s(t[1],n[1],i[1],a);var u=l(t[0],n[0],i[0],a),h=l(t[1],n[1],i[1],a);if(e.rotation=-Math.atan2(h,u)-Math.PI/2,"line"===this._symbolType||"rect"===this._symbolType||"roundRect"===this._symbolType)if(void 0!==e.__lastT&&e.__lastT<e.__t){var c=1.05*Te.dist(o,r);e.attr("scale",[e.scale[0],c]),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){c=2*Te.dist(t,r);e.attr("scale",[e.scale[0],c])}else e.attr("scale",this._symbolScale);e.__lastT=e.__t,e.ignore=!1},YD.updateLayout=function(e,t){this.childAt(0).updateLayout(e,t);var i=e.getItemModel(t).getModel("effect");this._updateEffectAnimation(e,i,t)},_e.inherits(jD,iu.Group);var XD=jD;function qD(e,t,i){iu.Group.call(this),this._createPolyline(e,t,i)}var KD=qD.prototype;KD._createPolyline=function(e,t,i){var n=e.getItemLayout(t),a=new iu.Polyline({shape:{points:n}});this.add(a),this._updateCommonStl(e,t,i)},KD.updateData=function(e,t,i){var n=e.hostModel,a=this.childAt(0),r={shape:{points:e.getItemLayout(t)}};iu.updateProps(a,r,n,t),this._updateCommonStl(e,t,i)},KD._updateCommonStl=function(e,t,i){var n=this.childAt(0),a=e.getItemModel(t),r=e.getItemVisual(t,"color"),o=i&&i.lineStyle,s=i&&i.hoverLineStyle;i&&!e.hasItemOption||(o=a.getModel("lineStyle").getLineStyle(),s=a.getModel("emphasis.lineStyle").getLineStyle()),n.useStyle(_e.defaults({strokeNoScale:!0,fill:"none",stroke:r},o)),n.hoverStyle=s,iu.setHoverStyle(this)},KD.updateLayout=function(e,t){this.childAt(0).setShape("points",e.getItemLayout(t))},_e.inherits(qD,iu.Group);var $D=qD;function JD(e,t,i){XD.call(this,e,t,i),this._lastFrame=0,this._lastFramePercent=0}var QD=JD.prototype;QD.createLine=function(e,t,i){return new $D(e,t,i)},QD.updateAnimationPoints=function(e,t){this._points=t;for(var i=[0],n=0,a=1;a<t.length;a++){var r=t[a-1],o=t[a];n+=Te.dist(r,o),i.push(n)}if(0!==n){for(a=0;a<i.length;a++)i[a]/=n;this._offsets=i,this._length=n}},QD.getLineLength=function(e){return this._length},QD.updateSymbolPosition=function(e){var t=e.__t,i=this._points,n=this._offsets,a=i.length;if(n){var r=this._lastFrame;if(t<this._lastFramePercent){for(o=Math.min(r+1,a-1);o>=0&&!(n[o]<=t);o--);o=Math.min(o,a-2)}else{for(var o=r;o<a&&!(n[o]>t);o++);o=Math.min(o-1,a-2)}Te.lerp(e.position,i[o],i[o+1],(t-n[o])/(n[o+1]-n[o]));var s=i[o+1][0]-i[o][0],l=i[o+1][1]-i[o][1];e.rotation=-Math.atan2(l,s)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=t,e.ignore=!1}},_e.inherits(JD,XD);var eL=JD,tL=iu.extendShape({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(e,t){var i=t.segs,n=t.curveness;if(t.polyline)for(var a=0;a<i.length;){var r=i[a++];if(r>0){e.moveTo(i[a++],i[a++]);for(var o=1;o<r;o++)e.lineTo(i[a++],i[a++])}}else for(a=0;a<i.length;){var s=i[a++],l=i[a++],u=i[a++],h=i[a++];if(e.moveTo(s,l),n>0){var c=(s+u)/2-(l-h)*n,d=(l+h)/2-(u-s)*n;e.quadraticCurveTo(c,d,u,h)}else e.lineTo(u,h)}},findDataIndex:function(e,t){var i=this.shape,n=i.segs,a=i.curveness;if(i.polyline)for(var r=0,o=0;o<n.length;){var s=n[o++];if(s>0)for(var l=n[o++],u=n[o++],h=1;h<s;h++){var c=n[o++],d=n[o++];if(go.containStroke(l,u,c,d))return r}r++}else for(r=0,o=0;o<n.length;){l=n[o++],u=n[o++],c=n[o++],d=n[o++];if(a>0){var p=(l+c)/2-(u-d)*a,f=(u+d)/2-(c-l)*a;if(yo.containStroke(l,u,p,f,c,d))return r}else if(go.containStroke(l,u,c,d))return r;r++}return-1}});function iL(){this.group=new iu.Group}var nL=iL.prototype;nL.isPersistent=function(){return!this._incremental},nL.updateData=function(e){this.group.removeAll();var t=new tL({rectHover:!0,cursor:"default"});t.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(t,e),this.group.add(t),this._incremental=null},nL.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clearIncremental(),e.count()>5e5?(this._incremental||(this._incremental=new tl({silent:!0})),this.group.add(this._incremental)):this._incremental=null},nL.incrementalUpdate=function(e,t){var i=new tL;i.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(i,t,!!this._incremental),this._incremental?this._incremental.addDisplayable(i,!0):(i.rectHover=!0,i.cursor="default",i.__startIndex=e.start,this.group.add(i))},nL.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},nL._setCommon=function(e,t,i){var n=t.hostModel;e.setShape({polyline:n.get("polyline"),curveness:n.get("lineStyle.curveness")}),e.useStyle(n.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0;var a=t.getVisual("color");a&&e.setStyle("stroke",a),e.setStyle("fill"),i||(e.seriesIndex=n.seriesIndex,e.on("mousemove",(function(t){e.dataIndex=null;var i=e.findDataIndex(t.offsetX,t.offsetY);i>0&&(e.dataIndex=i+e.__startIndex)})))},nL._clearIncremental=function(){var e=this._incremental;e&&e.clearDisplaybles()};var aL=iL,rL={seriesType:"lines",plan:Gd(),reset:function(e){var t=e.coordinateSystem,i=e.get("polyline"),n=e.pipelineContext.large;return{progress:function(a,r){var o=[];if(n){var s,l=a.end-a.start;if(i){for(var u=0,h=a.start;h<a.end;h++)u+=e.getLineCoordsCount(h);s=new Float32Array(l+2*u)}else s=new Float32Array(4*l);var c=0,d=[];for(h=a.start;h<a.end;h++){var p=e.getLineCoords(h,o);i&&(s[c++]=p);for(var f=0;f<p;f++)d=t.dataToPoint(o[f],!1,d),s[c++]=d[0],s[c++]=d[1]}r.setLayout("linesPoints",s)}else for(h=a.start;h<a.end;h++){var g=r.getItemModel(h),m=(p=e.getLineCoords(h,o),[]);if(i)for(var v=0;v<p;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(h,m)}}}}},oL=Zy.createClipPath;Qv.extendChartView({type:"lines",init:function(){},render:function(e,t,i){var n=e.getData(),a=this._updateLineDraw(n,e),r=e.get("zlevel"),o=e.get("effect.trailLength"),s=i.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(n);var u=e.get("clip",!0)&&oL(e.coordinateSystem,!1,e);u?this.group.setClipPath(u):this.group.removeClipPath(),this._lastZlevel=r,this._finished=!0},incrementalPrepareRender:function(e,t,i){var n=e.getData();this._updateLineDraw(n,e).incrementalPrepareUpdate(n),this._clearLayer(i),this._finished=!1},incrementalRender:function(e,t,i){this._lineDraw.incrementalUpdate(e,t.getData()),this._finished=e.end===t.getData().count()},updateTransform:function(e,t,i){var n=e.getData(),a=e.pipelineContext;if(!this._finished||a.large||a.progressiveRender)return{update:!0};var r=rL.reset(e);r.progress&&r.progress({start:0,end:n.count()},n),this._lineDraw.updateLayout(),this._clearLayer(i)},_updateLineDraw:function(e,t){var i=this._lineDraw,n=this._showEffect(t),a=!!t.get("polyline"),r=t.pipelineContext.large;return i&&n===this._hasEffet&&a===this._isPolyline&&r===this._isLargeDraw||(i&&i.remove(),i=this._lineDraw=r?new aL:new UI(a?n?eL:$D:n?XD:BI),this._hasEffet=n,this._isPolyline=a,this._isLargeDraw=r,this.group.removeAll()),this.group.add(i.group),i},_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(){}});function sL(e){return e instanceof Array||(e=[e,e]),e}var lL="lineStyle.opacity".split("."),uL={seriesType:"lines",reset:function(e,t,i){var n=sL(e.get("symbol")),a=sL(e.get("symbolSize")),r=e.getData();return r.setVisual("fromSymbol",n&&n[0]),r.setVisual("toSymbol",n&&n[1]),r.setVisual("fromSymbolSize",a&&a[0]),r.setVisual("toSymbolSize",a&&a[1]),r.setVisual("opacity",e.get(lL)),{dataEach:r.hasItemOption?function(e,t){var i=e.getItemModel(t),n=sL(i.getShallow("symbol",!0)),a=sL(i.getShallow("symbolSize",!0)),r=i.get(lL);n[0]&&e.setItemVisual(t,"fromSymbol",n[0]),n[1]&&e.setItemVisual(t,"toSymbol",n[1]),a[0]&&e.setItemVisual(t,"fromSymbolSize",a[0]),a[1]&&e.setItemVisual(t,"toSymbolSize",a[1]),e.setItemVisual(t,"opacity",r)}:null}}};Qv.registerLayout(rL),Qv.registerVisual(uL);Nd.extend({type:"series.heatmap",getInitialData:function(e,t){return Ng(this.getSource(),this,{generateCoord:"value"})},preventIncremental:function(){var e=ac.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 hL(){var e=_e.createCanvas();this.canvas=e,this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={}}hL.prototype={update:function(e,t,i,n,a,r){var o=this._getBrush(),s=this._getGradient(e,a,"inRange"),l=this._getGradient(e,a,"outOfRange"),u=this.pointSize+this.blurSize,h=this.canvas,c=h.getContext("2d"),d=e.length;h.width=t,h.height=i;for(var p=0;p<d;++p){var f=e[p],g=f[0],m=f[1],v=n(f[2]);c.globalAlpha=v,c.drawImage(o,g-u,m-u)}if(!h.width||!h.height)return h;for(var y=c.getImageData(0,0,h.width,h.height),x=y.data,_=0,b=x.length,w=this.minOpacity,S=this.maxOpacity-w;_<b;){v=x[_+3]/256;var M=4*Math.floor(255*v);if(v>0){var I=r(v)?s:l;v>0&&(v=v*S+w),x[_++]=I[M],x[_++]=I[M+1],x[_++]=I[M+2],x[_++]=I[M+3]*v*256}else _+=4}return c.putImageData(y,0,0),h},_getBrush:function(){var e=this._brushCanvas||(this._brushCanvas=_e.createCanvas()),t=this.pointSize+this.blurSize,i=2*t;e.width=i,e.height=i;var n=e.getContext("2d");return n.clearRect(0,0,i,i),n.shadowOffsetX=i,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-t,t,this.pointSize,0,2*Math.PI,!0),n.closePath(),n.fill(),e},_getGradient:function(e,t,i){for(var n=this._gradientPixels,a=n[i]||(n[i]=new Uint8ClampedArray(1024)),r=[0,0,0,0],o=0,s=0;s<256;s++)t[i](s/255,!0,r),a[o++]=r[0],a[o++]=r[1],a[o++]=r[2],a[o++]=r[3];return a}};var cL=hL;Qv.extendChartView({type:"heatmap",render:function(e,t,i){var n;t.eachComponent("visualMap",(function(t){t.eachTargetSeries((function(i){i===e&&(n=t)}))})),this.group.removeAll(),this._incrementalDisplayable=null;var a=e.coordinateSystem;"cartesian2d"===a.type||"calendar"===a.type?this._renderOnCartesianAndCalendar(e,i,0,e.getData().count()):function(e){var t=e.dimensions;return"lng"===t[0]&&"lat"===t[1]}(a)&&this._renderOnGeo(a,e,n,i)},incrementalPrepareRender:function(e,t,i){this.group.removeAll()},incrementalRender:function(e,t,i,n){t.coordinateSystem&&this._renderOnCartesianAndCalendar(t,n,e.start,e.end,!0)},_renderOnCartesianAndCalendar:function(e,t,i,n,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 h=this.group,c=e.getData(),d=e.getModel("itemStyle").getItemStyle(["color"]),p=e.getModel("emphasis.itemStyle").getItemStyle(),f=e.getModel("label"),g=e.getModel("emphasis.label"),m=s.type,v="cartesian2d"===m?[c.mapDimension("x"),c.mapDimension("y"),c.mapDimension("value")]:[c.mapDimension("time"),c.mapDimension("value")],y=i;y<n;y++){var x;if("cartesian2d"===m){if(isNaN(c.get(v[2],y)))continue;var _=s.dataToPoint([c.get(v[0],y),c.get(v[1],y)]);x=new iu.Rect({shape:{x:Math.floor(Math.round(_[0])-r/2),y:Math.floor(Math.round(_[1])-o/2),width:Math.ceil(r),height:Math.ceil(o)},style:{fill:c.getItemVisual(y,"color"),opacity:c.getItemVisual(y,"opacity")}})}else{if(isNaN(c.get(v[1],y)))continue;x=new iu.Rect({z2:1,shape:s.dataToRect([c.get(v[0],y)]).contentShape,style:{fill:c.getItemVisual(y,"color"),opacity:c.getItemVisual(y,"opacity")}})}var b=c.getItemModel(y);c.hasItemOption&&(d=b.getModel("itemStyle").getItemStyle(["color"]),p=b.getModel("emphasis.itemStyle").getItemStyle(),f=b.getModel("label"),g=b.getModel("emphasis.label"));var w=e.getRawValue(y),S="-";w&&null!=w[2]&&(S=w[2]),iu.setLabelStyle(d,p,f,g,{labelFetcher:e,labelDataIndex:y,defaultText:S,isRectText:!0}),x.setStyle(d),iu.setHoverStyle(x,c.hasItemOption?p:_e.extend({},p)),x.incremental=a,a&&(x.useHoverLayer=!0),h.add(x),c.setItemGraphicEl(y,x)}},_renderOnGeo:function(e,t,i,n){var a=i.targetVisuals.inRange,r=i.targetVisuals.outOfRange,o=t.getData(),s=this._hmLayer||this._hmLayer||new cL;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 h=Math.max(l.x,0),c=Math.max(l.y,0),d=Math.min(l.width+l.x,n.getWidth()),p=Math.min(l.height+l.y,n.getHeight()),f=d-h,g=p-c,m=[o.mapDimension("lng"),o.mapDimension("lat"),o.mapDimension("value")],v=o.mapArray(m,(function(t,i,n){var a=e.dataToPoint([t,i]);return a[0]-=h,a[1]-=c,a.push(n),a})),y=i.getExtent(),x="visualMap.continuous"===i.type?function(e,t){var i=e[1]-e[0];return t=[(t[0]-e[0])/i,(t[1]-e[0])/i],function(e){return e>=t[0]&&e<=t[1]}}(y,i.option.range):function(e,t,i){var n=e[1]-e[0],a=(t=_e.map(t,(function(t){return{interval:[(t.interval[0]-e[0])/n,(t.interval[1]-e[0])/n]}}))).length,r=0;return function(e){for(var n=r;n<a;n++){if((o=t[n].interval)[0]<=e&&e<=o[1]){r=n;break}}if(n===a)for(n=r-1;n>=0;n--){var o;if((o=t[n].interval)[0]<=e&&e<=o[1]){r=n;break}}return n>=0&&n<a&&i[n]}}(y,i.getPieceList(),i.option.selected);s.update(v,f,g,a.color.getNormalizer(),{inRange:a.color.getColorMapper(),outOfRange:r.color.getColorMapper()},x);var _=new iu.Image({style:{width:f,height:g,x:h,y:c,image:s.canvas},silent:!0});this.group.add(_)},dispose:function(){}});var dL=R_.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,dL.superApply(this,"getInitialData",arguments)}}),pL=ev.createSymbol,fL=bu.parsePercent,gL=bu.isNumeric,mL=z_.setLabel,vL=["itemStyle","borderWidth"],yL=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],xL=new iu.Circle;Qv.extendChartView({type:"pictorialBar",render:function(e,t,i){var n=this.group,a=e.getData(),r=this._data,o=e.coordinateSystem,s=!!o.getBaseAxis().isHorizontal(),l=o.grid.getRect(),u={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:e,coordSys:o,coordSysExtent:[[l.x,l.x+l.width],[l.y,l.y+l.height]],isHorizontal:s,valueDim:yL[+s],categoryDim:yL[1-s]};return a.diff(r).add((function(e){if(a.hasValue(e)){var t=AL(a,e),i=_L(a,e,t,u),r=PL(a,u,i);a.setItemGraphicEl(e,r),n.add(r),EL(r,u,i)}})).update((function(e,t){var i=r.getItemGraphicEl(t);if(a.hasValue(e)){var o=AL(a,e),s=_L(a,e,o,u),l=OL(a,s);i&&l!==i.__pictorialShapeStr&&(n.remove(i),a.setItemGraphicEl(e,null),i=null),i?function(e,t,i){var n=i.animationModel,a=i.dataIndex,r=e.__pictorialBundle;iu.updateProps(r,{position:i.bundlePosition.slice()},n,a),i.symbolRepeat?SL(e,t,i,!0):ML(e,t,i,!0);IL(e,i,!0),TL(e,t,i,!0)}(i,u,s):i=PL(a,u,s,!0),a.setItemGraphicEl(e,i),i.__pictorialSymbolMeta=s,n.add(i),EL(i,u,s)}else n.remove(i)})).remove((function(e){var t=r.getItemGraphicEl(e);t&&kL(r,e,t.__pictorialSymbolMeta.animationModel,t)})).execute(),this._data=a,this.group},dispose:_e.noop,remove:function(e,t){var i=this.group,n=this._data;e.get("animation")?n&&n.eachItemGraphicEl((function(t){kL(n,t.dataIndex,e,t)})):i.removeAll()}});function _L(e,t,i,n){var a=e.getItemLayout(t),r=i.get("symbolRepeat"),o=i.get("symbolClip"),s=i.get("symbolPosition")||"start",l=(i.get("symbolRotate")||0)*Math.PI/180||0,u=i.get("symbolPatternSize")||2,h=i.isAnimationEnabled(),c={dataIndex:t,layout:a,itemModel:i,symbolType:e.getItemVisual(t,"symbol")||"circle",color:e.getItemVisual(t,"color"),symbolClip:o,symbolRepeat:r,symbolRepeatDirection:i.get("symbolRepeatDirection"),symbolPatternSize:u,rotation:l,animationModel:h?i:null,hoverAnimation:h&&i.get("hoverAnimation"),z2:i.getShallow("z",!0)||0};!function(e,t,i,n,a){var r,o=n.valueDim,s=e.get("symbolBoundingData"),l=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),u=l.toGlobalCoord(l.dataToCoord(0)),h=1-+(i[o.wh]<=0);if(_e.isArray(s)){var c=[bL(l,s[0])-u,bL(l,s[1])-u];c[1]<c[0]&&c.reverse(),r=c[h]}else r=null!=s?bL(l,s)-u:t?n.coordSysExtent[o.index][h]-u:i[o.wh];a.boundingLength=r,t&&(a.repeatCutLength=i[o.wh]);a.pxSign=r>0?1:r<0?-1:0}(i,r,a,n,c),function(e,t,i,n,a,r,o,s,l,u){var h=l.valueDim,c=l.categoryDim,d=Math.abs(i[c.wh]),p=e.getItemVisual(t,"symbolSize");_e.isArray(p)?p=p.slice():(null==p&&(p="100%"),p=[p,p]);p[c.index]=fL(p[c.index],d),p[h.index]=fL(p[h.index],n?d:Math.abs(r)),u.symbolSize=p,(u.symbolScale=[p[0]/s,p[1]/s])[h.index]*=(l.isHorizontal?-1:1)*o}(e,t,a,r,0,c.boundingLength,c.pxSign,u,n,c),function(e,t,i,n,a){var r=e.get(vL)||0;r&&(xL.attr({scale:t.slice(),rotation:i}),xL.updateTransform(),r/=xL.getLineScale(),r*=t[n.valueDim.index]);a.valueLineWidth=r}(i,c.symbolScale,l,n,c);var d=c.symbolSize,p=i.get("symbolOffset");return _e.isArray(p)&&(p=[fL(p[0],d[0]),fL(p[1],d[1])]),function(e,t,i,n,a,r,o,s,l,u,h,c){var d=h.categoryDim,p=h.valueDim,f=c.pxSign,g=Math.max(t[p.index]+s,0),m=g;if(n){var v=Math.abs(l),y=_e.retrieve(e.get("symbolMargin"),"15%")+"",x=!1;y.lastIndexOf("!")===y.length-1&&(x=!0,y=y.slice(0,y.length-1)),y=fL(y,t[p.index]);var _=Math.max(g+2*y,0),b=x?0:2*y,w=gL(n),S=w?n:zL((v+b)/_);_=g+2*(y=(v-S*g)/2/(x?S:S-1)),b=x?0:2*y,w||"fixed"===n||(S=u?zL((Math.abs(u)+b)/_):0),m=S*_-b,c.repeatTimes=S,c.symbolMargin=y}var M=f*(m/2),I=c.pathPosition=[];I[d.index]=i[d.wh]/2,I[p.index]="start"===o?M:"end"===o?l-M:l/2,r&&(I[0]+=r[0],I[1]+=r[1]);var T=c.bundlePosition=[];T[d.index]=i[d.xy],T[p.index]=i[p.xy];var A=c.barRectShape=_e.extend({},i);A[p.wh]=f*Math.max(Math.abs(i[p.wh]),Math.abs(I[p.index]+M)),A[d.wh]=i[d.wh];var C=c.clipShape={};C[d.xy]=-i[d.xy],C[d.wh]=h.ecSize[d.wh],C[p.xy]=0,C[p.wh]=i[p.wh]}(i,d,a,r,0,p,s,c.valueLineWidth,c.boundingLength,c.repeatCutLength,n,c),c}function bL(e,t){return e.toGlobalCoord(e.dataToCoord(e.scale.parse(t)))}function wL(e){var t=e.symbolPatternSize,i=pL(e.symbolType,-t/2,-t/2,t,t,e.color);return i.attr({culling:!0}),"image"!==i.type&&i.setStyle({strokeNoScale:!0}),i}function SL(e,t,i,n){var a=e.__pictorialBundle,r=i.symbolSize,o=i.valueLineWidth,s=i.pathPosition,l=t.valueDim,u=i.repeatTimes||0,h=0,c=r[t.valueDim.index]+o+2*i.symbolMargin;for(RL(e,(function(e){e.__pictorialAnimationIndex=h,e.__pictorialRepeatTimes=u,h<u?NL(e,null,f(h),i,n):NL(e,null,{scale:[0,0]},i,n,(function(){a.remove(e)})),LL(e,i),h++}));h<u;h++){var d=wL(i);d.__pictorialAnimationIndex=h,d.__pictorialRepeatTimes=u,a.add(d);var p=f(h);NL(d,{position:p.position,scale:[0,0]},{scale:p.scale,rotation:p.rotation},i,n),d.on("mouseover",g).on("mouseout",m),LL(d,i)}function f(e){var t=s.slice(),n=i.pxSign,a=e;return("start"===i.symbolRepeatDirection?n>0:n<0)&&(a=u-1-e),t[l.index]=c*(a-u/2+.5)+s[l.index],{position:t,scale:i.symbolScale.slice(),rotation:i.rotation}}function g(){RL(e,(function(e){e.trigger("emphasis")}))}function m(){RL(e,(function(e){e.trigger("normal")}))}}function ML(e,t,i,n){var a=e.__pictorialBundle,r=e.__pictorialMainPath;r?NL(r,null,{position:i.pathPosition.slice(),scale:i.symbolScale.slice(),rotation:i.rotation},i,n):(r=e.__pictorialMainPath=wL(i),a.add(r),NL(r,{position:i.pathPosition.slice(),scale:[0,0],rotation:i.rotation},{scale:i.symbolScale.slice()},i,n),r.on("mouseover",(function(){this.trigger("emphasis")})).on("mouseout",(function(){this.trigger("normal")}))),LL(r,i)}function IL(e,t,i){var n=_e.extend({},t.barRectShape),a=e.__pictorialBarRect;a?NL(a,null,{shape:n},t,i):(a=e.__pictorialBarRect=new iu.Rect({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),e.add(a))}function TL(e,t,i,n){if(i.symbolClip){var a=e.__pictorialClipPath,r=_e.extend({},i.clipShape),o=t.valueDim,s=i.animationModel,l=i.dataIndex;if(a)iu.updateProps(a,{shape:r},s,l);else{r[o.wh]=0,a=new iu.Rect({shape:r}),e.__pictorialBundle.setClipPath(a),e.__pictorialClipPath=a;var u={};u[o.wh]=i.clipShape[o.wh],iu[n?"updateProps":"initProps"](a,{shape:u},s,l)}}}function AL(e,t){var i=e.getItemModel(t);return i.getAnimationDelayParams=CL,i.isAnimationEnabled=DL,i}function CL(e){return{index:e.__pictorialAnimationIndex,count:e.__pictorialRepeatTimes}}function DL(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function LL(e,t){e.off("emphasis").off("normal");var i=t.symbolScale.slice();t.hoverAnimation&&e.on("emphasis",(function(){this.animateTo({scale:[1.1*i[0],1.1*i[1]]},400,"elasticOut")})).on("normal",(function(){this.animateTo({scale:i.slice()},400,"elasticOut")}))}function PL(e,t,i,n){var a=new iu.Group,r=new iu.Group;return a.add(r),a.__pictorialBundle=r,r.attr("position",i.bundlePosition.slice()),i.symbolRepeat?SL(a,t,i):ML(a,0,i),IL(a,i,n),TL(a,t,i,n),a.__pictorialShapeStr=OL(e,i),a.__pictorialSymbolMeta=i,a}function kL(e,t,i,n){var a=n.__pictorialBarRect;a&&(a.style.text=null);var r=[];RL(n,(function(e){r.push(e)})),n.__pictorialMainPath&&r.push(n.__pictorialMainPath),n.__pictorialClipPath&&(i=null),_e.each(r,(function(e){iu.updateProps(e,{scale:[0,0]},i,t,(function(){n.parent&&n.parent.remove(n)}))})),e.setItemGraphicEl(t,null)}function OL(e,t){return[e.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function RL(e,t,i){_e.each(e.__pictorialBundle.children(),(function(n){n!==e.__pictorialBarRect&&t.call(i,n)}))}function NL(e,t,i,n,a,r){t&&e.attr(t),n.symbolClip&&!a?i&&e.attr(i):i&&iu[a?"updateProps":"initProps"](e,i,n.animationModel,n.dataIndex,r)}function EL(e,t,i){var n=i.color,a=i.dataIndex,r=i.itemModel,o=r.getModel("itemStyle").getItemStyle(["color"]),s=r.getModel("emphasis.itemStyle").getItemStyle(),l=r.getShallow("cursor");RL(e,(function(e){e.setColor(n),e.setStyle(_e.defaults({fill:n,opacity:i.opacity},o)),iu.setHoverStyle(e,s),l&&(e.cursor=l),e.z2=i.z2}));var u={},h=t.valueDim.posDesc[+(i.boundingLength>0)],c=e.__pictorialBarRect;mL(c.style,u,r,n,t.seriesModel,a,h),iu.setHoverStyle(c,u)}function zL(e){var t=Math.round(e);return Math.abs(e-t)<1e-4?t:Math.ceil(e)}var BL=mm.layout;Qv.registerLayout(_e.curry(BL,"pictorialBar")),Qv.registerVisual(ox("pictorialBar","roundRect"));var VL=function(e,t,i,n,a){Nv.call(this,e,t,i),this.type=n||"value",this.position=a||"bottom",this.orient=null};VL.prototype={constructor:VL,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},_e.inherits(VL,Nv);var GL=VL,FL=Gu.getLayoutRect,HL=_e.each;function WL(e,t,i){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(e,t,i),this.model=e}WL.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:WL,_init:function(e,t,i){var n=this.dimension,a=new GL(n,Hm.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();HL(t.mapDimension(this.dimension,!0),(function(e){this._axis.scale.unionExtentFromData(t,e)}),this),Hm.niceScaleExtent(this._axis.scale,this._axis.model)}}),this)},resize:function(e,t){this._rect=FL({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,i=t.isHorizontal(),n=i?[0,e.width]:[0,e.height],a=t.reverse?1:0;t.setExtent(n[a],n[1-a]),this._updateAxisTransform(t,i?e.x:e.y)},_updateAxisTransform:function(e,t){var i=e.getExtent(),n=i[0]+i[1],a=e.isHorizontal();e.toGlobalCoord=a?function(e){return e+t}:function(e){return n-e+t},e.toLocalCoord=a?function(e){return e-t}:function(e){return n-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(),i=this.getAxis();return"horizontal"===i.orient?i.contain(i.toLocalCoord(e[0]))&&e[1]>=t.y&&e[1]<=t.y+t.height:i.contain(i.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(),i=this.getRect(),n=[],a="horizontal"===t.orient?0:1;return e instanceof Array&&(e=e[0]),n[a]=t.toGlobalCoord(t.dataToCoord(+e)),n[1-a]=0===a?i.y+i.height/2:i.x+i.width/2,n}};var UL=WL;ac.register("single",{create:function(e,t){var i=[];return e.eachComponent("singleAxis",(function(n,a){var r=new UL(n,e,t);r.name="single_"+a,r.resize(n,t),n.coordinateSystem=r,i.push(r)})),e.eachSeries((function(t){if("singleAxis"===t.get("coordinateSystem")){var i=e.queryComponents({mainType:"singleAxis",index:t.get("singleAxisIndex"),id:t.get("singleAxisId")})[0];t.coordinateSystem=i&&i.coordinateSystem}})),i},dimensions:UL.prototype.dimensions});var ZL={layout:function(e,t){t=t||{};var i=e.coordinateSystem,n=e.axis,a={},r=n.position,o=n.orient,s=i.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),_e.retrieve(t.labelInside,e.get("axisLabel.inside"))&&(a.labelDirection=-a.labelDirection);var h=t.rotate;return null==h&&(h=e.get("axisLabel.rotate")),a.labelRotation="top"===r?-h:h,a.z2=1,a}},jL=C_.rectCoordAxisBuildSplitArea,YL=C_.rectCoordAxisHandleRemove,XL=["axisLine","axisTickLabel","axisName"],qL=["splitArea","splitLine"],KL=T_.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(e,t,i,n){var a=this.group;a.removeAll();var r=this._axisGroup;this._axisGroup=new iu.Group;var o=ZL.layout(e),s=new f_(e,o);_e.each(XL,s.add,s),a.add(this._axisGroup),a.add(s.getGroup()),_e.each(qL,(function(t){e.get(t+".show")&&this["_"+t](e)}),this),iu.groupTransition(r,this._axisGroup,e),KL.superCall(this,"render",e,t,i,n)},remove:function(){YL(this)},_splitLine:function(e){var t=e.axis;if(!t.scale.isBlank()){var i=e.getModel("splitLine"),n=i.getModel("lineStyle"),a=n.get("width"),r=n.get("color");r=r instanceof Array?r:[r];for(var o=e.coordinateSystem.getRect(),s=t.isHorizontal(),l=[],u=0,h=t.getTicksCoords({tickModel:i}),c=[],d=[],p=0;p<h.length;++p){var f=t.toGlobalCoord(h[p].coord);s?(c[0]=f,c[1]=o.y,d[0]=f,d[1]=o.y+o.height):(c[0]=o.x,c[1]=f,d[0]=o.x+o.width,d[1]=f);var g=u++%r.length;l[g]=l[g]||[],l[g].push(new iu.Line({subPixelOptimize:!0,shape:{x1:c[0],y1:c[1],x2:d[0],y2:d[1]},style:{lineWidth:a},silent:!0}))}for(p=0;p<l.length;++p)this.group.add(iu.mergePath(l[p],{style:{stroke:r[p%r.length],lineDash:n.getLineDash(a),lineWidth:a},silent:!0}))}},_splitArea:function(e){jL(this,this._axisGroup,e,e)}}),$L=ju.extend({type:"singleAxis",layoutMode:"box",axis:null,coordinateSystem:null,getCoordSysModel:function(){return this}});_e.merge($L.prototype,Wm),Ax("single",$L,(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 JL=function(e,t){var i,n=[],a=e.seriesIndex;if(null==a||!(i=t.getSeriesByIndex(a)))return{point:[]};var r=i.getData(),o=vr.queryDataIndex(r,e);if(null==o||o<0||_e.isArray(o))return{point:[]};var s=r.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)n=l.dataToPoint(r.getValues(_e.map(l.dimensions,(function(e){return r.mapDimension(e)})),o,!0))||[];else if(s){var u=s.getBoundingRect().clone();u.applyTransform(s.transform),n=[u.x+u.width/2,u.y+u.height/2]}return{point:n,el:s}},QL=vr.makeInner,eP=_e.each,tP=_e.curry,iP=QL();function nP(e,t,i,n,a){var r=e.axis;if(!r.scale.isBlank()&&r.containData(t))if(e.involveSeries){var o=function(e,t){var i=t.axis,n=i.dim,a=e,r=[],o=Number.MAX_VALUE,s=-1;return eP(t.seriesModels,(function(t,l){var u,h,c=t.getData().mapDimension(n,!0);if(t.getAxisTooltipData){var d=t.getAxisTooltipData(c,e,i);h=d.dataIndices,u=d.nestestValue}else{if(!(h=t.getData().indicesOfNearest(c[0],e,"category"===i.type?.5:null)).length)return;u=t.getData().get(c[0],h[0])}if(null!=u&&isFinite(u)){var p=e-u,f=Math.abs(p);f<=o&&((f<o||p>=0&&s<0)&&(o=f,s=p,a=u,r.length=0),eP(h,(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&&_e.extend(a,s[0]),!n&&e.snap&&r.containData(l)&&null!=l&&(t=l),i.showPointer(e,t,s,a),i.showTooltip(e,o,l)}else i.showPointer(e,t)}function aP(e,t,i,n){e[t.key]={value:i,payloadBatch:n}}function rP(e,t,i,n){var a=i.payloadBatch,r=t.axis,o=r.model,s=t.axisPointerModel;if(t.triggerTooltip&&a.length){var l=t.coordSys.model,u=b_.makeKey(l),h=e.map[u];h||(h=e.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},e.list.push(h)),h.dataByAxis.push({axisDim:r.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:a.slice()})}}function oP(e){var t=e.axis.model,i={},n=i.axisDim=e.axis.dim;return i.axisIndex=i[n+"AxisIndex"]=t.componentIndex,i.axisName=i[n+"AxisName"]=t.name,i.axisId=i[n+"AxisId"]=t.id,i}function sP(e){return!e||null==e[0]||isNaN(e[0])||null==e[1]||isNaN(e[1])}var lP=function(e,t,i){var n=e.currTrigger,a=[e.x,e.y],r=e,o=e.dispatchAction||_e.bind(i.dispatchAction,i),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){sP(a)&&(a=JL({seriesIndex:r.seriesIndex,dataIndex:r.dataIndex},t).point);var l=sP(a),u=r.axesInfo,h=s.axesInfo,c="leave"===n||sP(a),d={},p={},f={list:[],map:{}},g={showPointer:tP(aP,p),showTooltip:tP(rP,f)};eP(s.coordSysMap,(function(e,t){var i=l||e.containPoint(a);eP(s.coordSysAxesInfo[t],(function(e,t){var n=e.axis,r=function(e,t){for(var i=0;i<(e||[]).length;i++){var n=e[i];if(t.axis.dim===n.axisDim&&t.axis.model.componentIndex===n.axisIndex)return n}}(u,e);if(!c&&i&&(!u||r)){var o=r&&r.value;null!=o||l||(o=n.pointToData(a)),null!=o&&nP(e,o,g,!1,d)}}))}));var m={};return eP(h,(function(e,t){var i=e.linkGroup;i&&!p[t]&&eP(i.axesInfo,(function(t,n){var a=p[n];if(t!==e&&a){var r=a.value;i.mapper&&(r=e.axis.scale.parse(i.mapper(r,oP(t),oP(e)))),m[e.key]=r}}))})),eP(m,(function(e,t){nP(h[t],e,g,!0,d)})),function(e,t,i){var n=i.axesInfo=[];eP(t,(function(t,i){var a=t.axisPointerModel.option,r=e[i];r?(!t.useHandle&&(a.status="show"),a.value=r.value,a.seriesDataIndices=(r.payloadBatch||[]).slice()):!t.useHandle&&(a.status="hide"),"show"===a.status&&n.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:a.value})}))}(p,h,d),function(e,t,i,n){if(sP(t)||!e.list.length)return void n({type:"hideTip"});var a=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:i.tooltipOption,position:i.position,dataIndexInside:a.dataIndexInside,dataIndex:a.dataIndex,seriesIndex:a.seriesIndex,dataByCoordSys:e.list})}(f,a,e,o),function(e,t,i){var n=i.getZr(),a=iP(n).axisPointerLastHighlights||{},r=iP(n).axisPointerLastHighlights={};eP(e,(function(e,t){var i=e.axisPointerModel.option;"show"===i.status&&eP(i.seriesDataIndices,(function(e){var t=e.seriesIndex+" | "+e.dataIndex;r[t]=e}))}));var o=[],s=[];_e.each(a,(function(e,t){!r[t]&&s.push(e)})),_e.each(r,(function(e,t){!a[t]&&o.push(e)})),s.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,batch:s}),o.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,batch:o})}(h,0,i),d}},uP=(Qv.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}}}),(0,vr.makeInner)()),hP=_e.each;function cP(e,t,i){e.handler("leave",null,i)}function dP(e,t,i,n){t.handler(e,i,n)}var pP={register:function(e,t,i){if(!K.node){var n=t.getZr();uP(n).records||(uP(n).records={}),function(e,t){if(uP(e).initialized)return;function i(i,n){e.on(i,(function(i){var a=function(e){var t={showTip:[],hideTip:[]},i=function(n){var a=t[n.type];a?a.push(n):(n.dispatchAction=i,e.dispatchAction(n))};return{dispatchAction:i,pendings:t}}(t);hP(uP(e).records,(function(e){e&&n(e,i,a.dispatchAction)})),function(e,t){var i,n=e.showTip.length,a=e.hideTip.length;n?i=e.showTip[n-1]:a&&(i=e.hideTip[a-1]);i&&(i.dispatchAction=null,t.dispatchAction(i))}(a.pendings,t)}))}uP(e).initialized=!0,i("click",_e.curry(dP,"click")),i("mousemove",_e.curry(dP,"mousemove")),i("globalout",cP)}(n,t),(uP(n).records[e]||(uP(n).records[e]={})).handler=i}},unregister:function(e,t){if(!K.node){var i=t.getZr();(uP(i).records||{})[e]&&(uP(i).records[e]=null)}}},fP=Qv.extendComponentView({type:"axisPointer",render:function(e,t,i){var n=t.getComponent("tooltip"),a=e.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";pP.register("axisPointer",i,(function(e,t,i){"none"!==a&&("leave"===e||a.indexOf(e)>=0)&&i({type:"updateAxisPointer",currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})}))},remove:function(e,t){pP.unregister(t.getZr(),"axisPointer"),fP.superApply(this._model,"remove",arguments)},dispose:function(e,t){pP.unregister("axisPointer",t),fP.superApply(this._model,"dispose",arguments)}}),gP=(0,vr.makeInner)(),mP=_e.clone,vP=_e.bind;function yP(){}function xP(e,t,i,n){(function e(t,i){if(_e.isObject(t)&&_e.isObject(i)){var n=!0;return _e.each(i,(function(i,a){n=n&&e(t[a],i)})),!!n}return t===i})(gP(i).lastProp,n)||(gP(i).lastProp=n,t?iu.updateProps(i,n,e):(i.stopAnimation(),i.attr(n)))}function _P(e,t){e[t.get("label.show")?"show":"hide"]()}function bP(e){return{position:e.position.slice(),rotation:e.rotation||0}}function wP(e,t,i){var n=t.get("z"),a=t.get("zlevel");e&&e.traverse((function(e){"group"!==e.type&&(null!=n&&(e.z=n),null!=a&&(e.zlevel=a),e.silent=i)}))}yP.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(e,t,i,n){var a=t.get("value"),r=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=i,n||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,i);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=u;var h=this._moveAnimation=this.determineAnimation(e,t);if(o){var c=_e.curry(xP,t,h);this.updatePointerEl(o,l,c,t),this.updateLabelEl(o,l,c,t)}else o=this._group=new iu.Group,this.createPointerEl(o,l,e,t),this.createLabelEl(o,l,e,t),i.getZr().add(o);wP(o,t,!0),this._renderHandle(a)}},remove:function(e){this.clear(e)},dispose:function(e){this.clear(e)},determineAnimation:function(e,t){var i=t.get("animation"),n=e.axis,a="category"===n.type,r=t.get("snap");if(!r&&!a)return!1;if("auto"===i||null==i){var o=this.animationThreshold;if(a&&n.getBandWidth()>o)return!0;if(r){var s=b_.getAxisInfo(e).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>o}return!1}return!0===i},makeElOption:function(e,t,i,n,a){},createPointerEl:function(e,t,i,n){var a=t.pointer;if(a){var r=gP(e).pointerEl=new iu[a.type](mP(t.pointer));e.add(r)}},createLabelEl:function(e,t,i,n){if(t.label){var a=gP(e).labelEl=new iu.Rect(mP(t.label));e.add(a),_P(a,n)}},updatePointerEl:function(e,t,i){var n=gP(e).pointerEl;n&&t.pointer&&(n.setStyle(t.pointer.style),i(n,{shape:t.pointer.shape}))},updateLabelEl:function(e,t,i,n){var a=gP(e).labelEl;a&&(a.setStyle(t.label.style),i(a,{shape:t.label.shape,position:t.label.position}),_P(a,n))},_renderHandle:function(e){if(!this._dragging&&this.updateHandleTransform){var t,i=this._axisPointerModel,n=this._api.getZr(),a=this._handle,r=i.getModel("handle"),o=i.get("status");if(!r.get("show")||!o||"hide"===o)return a&&n.remove(a),void(this._handle=null);this._handle||(t=!0,a=this._handle=iu.createIcon(r.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(e){Ke.stop(e.event)},onmousedown:vP(this._onHandleDragMove,this,0,0),drift:vP(this._onHandleDragMove,this),ondragend:vP(this._onHandleDragEnd,this)}),n.add(a)),wP(a,i,!1);a.setStyle(r.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=r.get("size");_e.isArray(s)||(s=[s,s]),a.attr("scale",[s[0]/2,s[1]/2]),ip.createOrUpdate(this,"_doDispatchAxisPointer",r.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,t)}},_moveHandleToValue:function(e,t){xP(this._axisPointerModel,!t&&this._moveAnimation,this._handle,bP(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(e,t){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(bP(i),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(bP(n)),gP(i).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(),i=this._group,n=this._handle;t&&i&&(this._lastGraphicKey=null,i&&t.remove(i),n&&t.remove(n),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(e,t,i){return{x:e[i=i||0],y:e[1-i],width:t[i],height:t[1-i]}}},yP.prototype.constructor=yP,Sr.enableClassExtend(yP);var SP=yP;function MP(e,t,i,n,a){var r=IP(i.get("value"),t.axis,t.ecModel,i.get("seriesDataIndices"),{precision:i.get("label.precision"),formatter:i.get("label.formatter")}),o=i.getModel("label"),s=Du.normalizeCssArray(o.get("padding")||0),l=o.getFont(),u=Bn.getBoundingRect(r,l),h=a.position,c=u.width+s[1]+s[3],d=u.height+s[0]+s[2],p=a.align;"right"===p&&(h[0]-=c),"center"===p&&(h[0]-=c/2);var f=a.verticalAlign;"bottom"===f&&(h[1]-=d),"middle"===f&&(h[1]-=d/2),function(e,t,i,n){var a=n.getWidth(),r=n.getHeight();e[0]=Math.min(e[0]+t,a)-t,e[1]=Math.min(e[1]+i,r)-i,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}(h,c,d,n);var g=o.get("backgroundColor");g&&"auto"!==g||(g=t.get("axisLine.lineStyle.color")),e.label={shape:{x:0,y:0,width:c,height:d,r:o.get("borderRadius")},position:h.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 IP(e,t,i,n,a){e=t.scale.parse(e);var r=t.scale.getLabel(e,{precision:a.precision}),o=a.formatter;if(o){var s={value:Hm.getAxisRawValue(t,e),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};_e.each(n,(function(e){var t=i.getSeriesByIndex(e.seriesIndex),n=e.dataIndexInside,a=t&&t.getDataParams(n);a&&s.seriesData.push(a)})),_e.isString(o)?r=o.replace("{value}",r):_e.isFunction(o)&&(r=o(s))}return r}function TP(e,t,i){var n=dt.create();return dt.rotate(n,n,i.rotation),dt.translate(n,n,i.position),iu.applyTransform([e.dataToCoord(t),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],n)}var AP={buildElStyle:function(e){var t,i=e.get("type"),n=e.getModel(i+"Style");return"line"===i?(t=n.getLineStyle()).fill=null:"shadow"===i&&((t=n.getAreaStyle()).stroke=null),t},buildLabelElOption:MP,getValueLabel:IP,getTransformedPosition:TP,buildCartesianSingleLabelElOption:function(e,t,i,n,a,r){var o=f_.innerTextLayout(i.rotation,0,i.labelDirection);i.labelMargin=a.get("label.margin"),MP(t,n,a,r,{position:TP(n.axis,e,i),align:o.textAlign,verticalAlign:o.textVerticalAlign})},makeLineShape:function(e,t,i){return{x1:e[i=i||0],y1:e[1-i],x2:t[i],y2:t[1-i]}},makeRectShape:function(e,t,i){return{x:e[i=i||0],y:e[1-i],width:t[i],height:t[1-i]}},makeSectorShape:function(e,t,i,n,a,r){return{cx:e,cy:t,r0:i,r:n,startAngle:a,endAngle:r,clockwise:!0}}},CP=SP.extend({makeElOption:function(e,t,i,n,a){var r=i.axis,o=r.grid,s=n.get("type"),l=DP(o,r).getOtherAxis(r).getGlobalExtent(),u=r.toGlobalCoord(r.dataToCoord(t,!0));if(s&&"none"!==s){var h=AP.buildElStyle(n),c=LP[s](r,u,l);c.style=h,e.graphicKey=c.type,e.pointer=c}var d=A_.layout(o.model,i);AP.buildCartesianSingleLabelElOption(t,e,d,i,n,a)},getHandleTransform:function(e,t,i){var n=A_.layout(t.axis.grid.model,t,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:AP.getTransformedPosition(t.axis,e,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(e,t,i,n){var a=i.axis,r=a.grid,o=a.getGlobalExtent(!0),s=DP(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 h=(s[1]+s[0])/2,c=[h,h];c[l]=u[l];return{position:u,rotation:e.rotation,cursorPoint:c,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}}});function DP(e,t){var i={};return i[t.dim+"AxisIndex"]=t.index,e.getCartesian(i)}var LP={line:function(e,t,i){return{type:"Line",subPixelOptimize:!0,shape:AP.makeLineShape([t,i[0]],[t,i[1]],PP(e))}},shadow:function(e,t,i){var n=Math.max(1,e.getBandWidth()),a=i[1]-i[0];return{type:"Rect",shape:AP.makeRectShape([t-n/2,i[0]],[n,a],PP(e))}}};function PP(e){return"x"===e.dim?0:1}T_.registerAxisPointerClass("CartesianAxisPointer",CP),Qv.registerPreprocessor((function(e){if(e){(!e.axisPointer||0===e.axisPointer.length)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!_e.isArray(t)&&(e.axisPointer.link=[t])}})),Qv.registerProcessor(Qv.PRIORITY.PROCESSOR.STATISTIC,(function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=b_.collect(e,t)})),Qv.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},lP);var kP=["x","y"],OP=["width","height"],RP=SP.extend({makeElOption:function(e,t,i,n,a){var r=i.axis,o=r.coordinateSystem,s=zP(o,1-EP(r)),l=o.dataToPoint(t)[0],u=n.get("type");if(u&&"none"!==u){var h=AP.buildElStyle(n),c=NP[u](r,l,s);c.style=h,e.graphicKey=c.type,e.pointer=c}var d=ZL.layout(i);AP.buildCartesianSingleLabelElOption(t,e,d,i,n,a)},getHandleTransform:function(e,t,i){var n=ZL.layout(t,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:AP.getTransformedPosition(t.axis,e,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(e,t,i,n){var a=i.axis,r=a.coordinateSystem,o=EP(a),s=zP(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=zP(r,1-o),h=(u[1]+u[0])/2,c=[h,h];return c[o]=l[o],{position:l,rotation:e.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}}}),NP={line:function(e,t,i){return{type:"Line",subPixelOptimize:!0,shape:AP.makeLineShape([t,i[0]],[t,i[1]],EP(e))}},shadow:function(e,t,i){var n=e.getBandWidth(),a=i[1]-i[0];return{type:"Rect",shape:AP.makeRectShape([t-n/2,i[0]],[n,a],EP(e))}}};function EP(e){return e.isHorizontal()?0:1}function zP(e,t){var i=e.getRect();return[i[kP[t]],i[kP[t]]+i[OP[t]]]}T_.registerAxisPointerClass("SingleAxisPointer",RP),Qv.extendComponentView({type:"single"});var BP=Pf.getDimensionTypeByAxis,VP=vr.groupData,GP=Du.encodeHTML,FP=Nd.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(e){FP.superApply(this,"init",arguments),this.legendVisualProvider=new cb(_e.bind(this.getData,this),_e.bind(this.getRawData,this))},fixData:function(e){var t=e.length,i=VP(e,(function(e){return e[2]})),n=[];i.buckets.each((function(e,t){n.push({name:t,dataList:e})}));for(var a=n.length,r=-1,o=-1,s=0;s<a;++s){var l=n[s].dataList.length;l>r&&(r=l,o=s)}for(var u=0;u<a;++u)if(u!==o)for(var h=n[u].name,c=0;c<r;++c){for(var d=n[o].dataList[c][0],p=n[u].dataList.length,f=-1,g=0;g<p;++g){if(n[u].dataList[g][0]===d){f=g;break}}-1===f&&(e[t]=[],e[t][0]=d,e[t][1]=0,e[t][2]=h,t++)}return e},getInitialData:function(e,t){for(var i=t.queryComponents({mainType:"singleAxis",index:this.get("singleAxisIndex"),id:this.get("singleAxisId")})[0].get("type"),n=_e.filter(e.data,(function(e){return void 0!==e[2]})),a=this.fixData(n||[]),r=[],o=this.nameMap=_e.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=yg(a,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:BP(i)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}),h=new ag(u,this);return h.initData(a),h},getLayerSeries:function(){for(var e=this.getData(),t=e.count(),i=[],n=0;n<t;++n)i[n]=n;var a=e.mapDimension("single"),r=VP(i,(function(t){return e.get("name",t)})),o=[];return r.buckets.each((function(t,i){t.sort((function(t,i){return e.get(a,t)-e.get(a,i)})),o.push({name:i,indices:t})})),o},getAxisTooltipData:function(e,t,i){_e.isArray(e)||(e=e?[e]:[]);for(var n,a=this.getData(),r=this.getLayerSeries(),o=[],s=r.length,l=0;l<s;++l){for(var u=Number.MAX_VALUE,h=-1,c=r[l].indices.length,d=0;d<c;++d){var p=a.get(e[0],r[l].indices[d]),f=Math.abs(p-t);f<=u&&(n=p,u=f,h=r[l].indices[d])}o.push(h)}return{dataIndices:o,nestestValue:n}},formatTooltip:function(e){var t=this.getData(),i=t.getName(e),n=t.get(t.mapDimension("value"),e);return(isNaN(n)||null==n)&&(n="-"),GP(i+" : "+n)},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}}}}),HP=Fy.Polygon,WP=_e.bind,UP=_e.extend;Qv.extendChartView({type:"themeRiver",init:function(){this._layers=[]},render:function(e,t,i){var n=e.getData(),a=this.group,r=e.getLayerSeries(),o=n.getLayout("layoutInfo"),s=o.rect,l=o.boundaryGap;function u(e){return e.name}a.attr("position",[0,s.y+l[0]]);var h=new Tf(this._layersSeries||[],r,u,u),c={};function d(t,i,o){var s=this._layers;if("remove"!==t){for(var l,u,h,d=[],p=[],f=r[i].indices,g=0;g<f.length;g++){var m=n.getItemLayout(f[g]),v=m.x,y=m.y0,x=m.y;d.push([v,y]),p.push([v,y+x]),l=n.getItemVisual(f[g],"color")}var _=n.getItemLayout(f[0]),b=n.getItemModel(f[g-1]),w=b.getModel("label"),S=w.get("margin");if("add"===t){var M=c[i]=new iu.Group;u=new HP({shape:{points:d,stackedOnPoints:p,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),h=new iu.Text({style:{x:_.x-S,y:_.y0+_.y/2}}),M.add(u),M.add(h),a.add(M),u.setClipPath(function(e,t,i){var n=new iu.Rect({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return iu.initProps(n,{shape:{width:e.width+20,height:e.height+20}},t,i),n}(u.getBoundingRect(),e,(function(){u.removeClipPath()})))}else{M=s[o];u=M.childAt(0),h=M.childAt(1),a.add(M),c[i]=M,iu.updateProps(u,{shape:{points:d,stackedOnPoints:p}},e),iu.updateProps(h,{style:{x:_.x-S,y:_.y0+_.y/2}},e)}var I=b.getModel("emphasis.itemStyle"),T=b.getModel("itemStyle");iu.setTextStyle(h.style,w,{text:w.get("show")?e.getFormattedLabel(f[g-1],"normal")||n.getName(f[g-1]):null,textVerticalAlign:"middle"}),u.setStyle(UP({fill:l},T.getItemStyle(["color"]))),iu.setHoverStyle(u,I.getItemStyle())}else a.remove(s[i])}h.add(WP(d,this,"add")).update(WP(d,this,"update")).remove(WP(d,this,"remove")).execute(),this._layersSeries=r,this._layers=c},dispose:function(){}});function ZP(e,t,i){if(e.count())for(var n,a=t.coordinateSystem,r=t.getLayerSeries(),o=e.mapDimension("single"),s=e.mapDimension("value"),l=_e.map(r,(function(t){return _e.map(t.indices,(function(t){var i=a.dataToPoint(e.get(o,t));return i[1]=e.get(s,t),i}))})),u=function(e){for(var t=e.length,i=e[0].length,n=[],a=[],r=0,o={},s=0;s<i;++s){for(var l=0,u=0;l<t;++l)u+=e[l][s][1];u>r&&(r=u),n.push(u)}for(var h=0;h<i;++h)a[h]=(r-n[h])/2;r=0;for(var c=0;c<i;++c){var d=n[c]+a[c];d>r&&(r=d)}return o.y0=a,o.max=r,o}(l),h=u.y0,c=i/u.max,d=r.length,p=r[0].indices.length,f=0;f<p;++f){n=h[f]*c,e.setItemLayout(r[0].indices[f],{layerIndex:0,x:l[0][f][0],y0:n,y:l[0][f][1]*c});for(var g=1;g<d;++g)n+=l[g-1][f][1]*c,e.setItemLayout(r[g].indices[f],{layerIndex:g,x:l[g][f][0],y0:n,y:l[g][f][1]*c})}}var jP=function(e,t){e.eachSeriesByType("themeRiver",(function(e){var t=e.getData(),i=e.coordinateSystem,n={},a=i.getRect();n.rect=a;var r=e.get("boundaryGap"),o=i.getAxis();(n.boundaryGap=r,"horizontal"===o.orient)?(r[0]=bu.parsePercent(r[0],a.height),r[1]=bu.parsePercent(r[1],a.height),ZP(t,e,a.height-r[0]-r[1])):(r[0]=bu.parsePercent(r[0],a.width),r[1]=bu.parsePercent(r[1],a.width),ZP(t,e,a.width-r[0]-r[1]));t.setLayout("layoutInfo",n)}))},YP=_e.createHashMap;var XP=function(e){e.eachSeriesByType("themeRiver",(function(e){var t=e.getData(),i=e.getRawData(),n=e.get("color"),a=YP();t.each((function(e){a.set(t.getRawIndex(e),e)})),i.each((function(r){var o=i.getName(r),s=n[(e.nameMap.get(o)-1)%n.length];i.setItemVisual(r,"color",s);var l=a.get(r);null!=l&&t.setItemVisual(l,"color",s)}))}))};Qv.registerLayout(jP),Qv.registerVisual(XP),Qv.registerProcessor(Ob("themeRiver"));var qP=sM.wrapTreePathInfo;Nd.extend({type:"series.sunburst",_viewRoot:null,getInitialData:function(e,t){var i={name:e.name,children:e.data};!function e(t){var i=0;_e.each(t.children,(function(t){e(t);var n=t.value;_e.isArray(n)&&(n=n[0]),i+=n}));var n=t.value;_e.isArray(n)&&(n=n[0]);(null==n||isNaN(n))&&(n=i);n<0&&(n=0);_e.isArray(t.value)?t.value[0]=n:t.value=n}(i);var n=e.levels||[],a={};return a.levels=n,kS.createTree(i,this,a).data},optionUpdated:function(){this.resetViewRoot()},getDataParams:function(e){var t=Nd.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return t.treePathInfo=qP(i,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 KP="none",$P="ancestor",JP="self";function QP(e,t,i){iu.Group.call(this);var n=new iu.Sector({z2:2});n.seriesIndex=t.seriesIndex;var a=new iu.Text({z2:4,silent:e.getModel("label").get("silent")});function r(){a.ignore=a.hoverIgnore}function o(){a.ignore=a.normalIgnore}this.add(n),this.add(a),this.updateData(!0,e,"normal",t,i),this.on("emphasis",r).on("normal",o).on("mouseover",r).on("mouseout",o)}var ek=QP.prototype;ek.updateData=function(e,t,i,n,a){this.node=t,t.piece=this,n=n||this._seriesModel,a=a||this._ecModel;var r=this.childAt(0);r.dataIndex=t.dataIndex;var o=t.getModel(),s=t.getLayout(),l=_e.extend({},s);l.label=null;var u=function(e,t,i){var n=e.getVisual("color"),a=e.getVisual("visualMeta");a&&0!==a.length||(n=null);var r=e.getModel("itemStyle").get("color");if(r)return r;if(n)return n;if(0===e.depth)return i.option.color[0];var o=i.option.color.length;r=i.option.color[function(e){var t=e;for(;t.depth>1;)t=t.parentNode;var i=e.getAncestors()[0];return _e.indexOf(i.children,t)}(e)%o];return r}(t,0,a);!function(e,t,i){t.getData().setItemVisual(e.dataIndex,"color",i)}(t,n,u);var h,c=o.getModel("itemStyle").getItemStyle();if("normal"===i)h=c;else{var d=o.getModel(i+".itemStyle").getItemStyle();h=_e.merge(d,c)}h=_e.defaults({lineJoin:"bevel",fill:h.fill||u},h),e?(r.setShape(l),r.shape.r=s.r0,iu.updateProps(r,{shape:{r:s.r}},n,t.dataIndex),r.useStyle(h)):"object"==typeof h.fill&&h.fill.type||"object"==typeof r.style.fill&&r.style.fill.type?(iu.updateProps(r,{shape:l},n),r.useStyle(h)):iu.updateProps(r,{shape:l,style:h},n),this._updateLabel(n,u,i);var p=o.getShallow("cursor");if(p&&r.attr("cursor",p),e){var f=n.getShallow("highlightPolicy");this._initEvents(r,t,n,f)}this._seriesModel=n||this._seriesModel,this._ecModel=a||this._ecModel,iu.setHoverStyle(this)},ek.onEmphasis=function(e){var t=this;this.node.hostTree.root.eachNode((function(i){var n,a,r;i.piece&&(t.node===i?i.piece.updateData(!1,i,"emphasis"):(n=i,a=t.node,(r=e)!==KP&&(r===JP?n===a:r===$P?n===a||n.isAncestorOf(a):n===a||n.isDescendantOf(a))?i.piece.childAt(0).trigger("highlight"):e!==KP&&i.piece.childAt(0).trigger("downplay")))}))},ek.onNormal=function(){this.node.hostTree.root.eachNode((function(e){e.piece&&e.piece.updateData(!1,e,"normal")}))},ek.onHighlight=function(){this.updateData(!1,this.node,"highlight")},ek.onDownplay=function(){this.updateData(!1,this.node,"downplay")},ek._updateLabel=function(e,t,i){var n=this.node.getModel(),a=n.getModel("label"),r="normal"===i||"emphasis"===i?a:n.getModel(i+".label"),o=n.getModel("emphasis.label"),s=_e.retrieve(e.getFormattedLabel(this.node.dataIndex,i,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 h=l.endAngle-l.startAngle;null!=u&&Math.abs(h)<u&&(s="");var c=this.childAt(1);iu.setLabelStyle(c.style,c.hoverStyle||{},a,o,{defaultText:r.getShallow("show")?s:null,autoColor:t,useInsideStyle:!0});var d,p=(l.startAngle+l.endAngle)/2,f=Math.cos(p),g=Math.sin(p),m=S("position"),v=S("distance")||0,y=S("align");"outside"===m?(d=l.r+v,y=p>Math.PI/2?"right":"left"):y&&"center"!==y?"left"===y?(d=l.r0+v,p>Math.PI/2&&(y="right")):"right"===y&&(d=l.r-v,p>Math.PI/2&&(y="left")):(d=(l.r+l.r0)/2,y="center"),c.attr("style",{text:s,textAlign:y,textVerticalAlign:S("verticalAlign")||"middle",opacity:S("opacity")});var x=d*f+l.cx,_=d*g+l.cy;c.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=-p)<-Math.PI/2&&(w+=Math.PI):"tangential"===b?(w=Math.PI/2-p)>Math.PI/2?w-=Math.PI:w<-Math.PI/2&&(w+=Math.PI):"number"==typeof b&&(w=b*Math.PI/180),c.attr("rotation",w)},ek._initEvents=function(e,t,i,n){e.off("mouseover").off("mouseout").off("emphasis").off("normal");var a=this,r=function(){a.onEmphasis(n)},o=function(){a.onNormal()};i.isAnimationEnabled()&&e.on("mouseover",r).on("mouseout",o).on("emphasis",r).on("normal",o).on("downplay",(function(){a.onDownplay()})).on("highlight",(function(){a.onHighlight()}))},_e.inherits(QP,iu.Group);var tk=QP,ik=Du.windowOpen;Jd.extend({type:"sunburst",init:function(){},render:function(e,t,i,n){var a=this;this.seriesModel=e,this.api=i,this.ecModel=t;var r=e.getData(),o=r.tree.root,s=e.getViewRoot(),l=this.group,u=e.get("renderLabelForZeroData"),h=[];s.eachNode((function(e){h.push(e)}));var c=this._oldChildren||[];if(function(i,n){if(0===i.length&&0===n.length)return;function a(e){return e.getId()}function s(a,s){!function(i,n){u||!i||i.getValue()||(i=null);if(i!==o&&n!==o)if(n&&n.piece)i?(n.piece.updateData(!1,i,"normal",e,t),r.setItemGraphicEl(i.dataIndex,n.piece)):function(e){if(!e)return;e.piece&&(l.remove(e.piece),e.piece=null)}(n);else if(i){var a=new tk(i,e,t);l.add(a),r.setItemGraphicEl(i.dataIndex,a)}}(null==a?null:i[a],null==s?null:n[s])}new Tf(n,i,a,a).add(s).update(s).remove(_e.curry(s,null)).execute()}(h,c),function(i,n){if(n.depth>0){a.virtualPiece?a.virtualPiece.updateData(!1,i,"normal",e,t):(a.virtualPiece=new tk(i,e,t),l.add(a.virtualPiece)),n.piece._onclickEvent&&n.piece.off("click",n.piece._onclickEvent);var r=function(e){a._rootToNode(n.parentNode)};n.piece._onclickEvent=r,a.virtualPiece.on("click",r)}else a.virtualPiece&&(l.remove(a.virtualPiece),a.virtualPiece=null)}(o,s),n&&n.highlight&&n.highlight.piece){var d=e.getShallow("highlightPolicy");n.highlight.piece.onEmphasis(d)}else if(n&&n.unhighlight){var p=this.virtualPiece;!p&&o.children.length&&(p=o.children[0].piece),p&&p.onNormal()}this._initEvents(),this._oldChildren=h},dispose:function(){},_initEvents:function(){var e=this,t=function(t){var i=!1;e.seriesModel.getViewRoot().eachNode((function(n){if(!i&&n.piece&&n.piece.childAt(0)===t.target){var a=n.getModel().get("nodeClick");if("rootToNode"===a)e._rootToNode(n);else if("link"===a){var r=n.getModel(),o=r.get("link");if(o){var s=r.get("target",!0)||"_blank";ik(o,s)}}i=!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 i=t.getData().getItemLayout(0);if(i){var n=e[0]-i.cx,a=e[1]-i.cy,r=Math.sqrt(n*n+a*a);return r<=i.r&&r>=i.r0}}});Qv.registerAction({type:"sunburstRootToNode",update:"updateView"},(function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},(function(t,i){var n=sM.retrieveTargetInfo(e,["sunburstRootToNode"],t);if(n){var a=t.getViewRoot();a&&(e.direction=sM.aboveViewRoot(a,n.node)?"rollUp":"drillDown"),t.resetViewRoot(n.node)}}))}));Qv.registerAction({type:"sunburstHighlight",update:"updateView"},(function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},(function(t,i){var n=sM.retrieveTargetInfo(e,["sunburstHighlight"],t);n&&(e.highlight=n.node)}))}));Qv.registerAction({type:"sunburstUnhighlight",update:"updateView"},(function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},(function(t,i){e.unhighlight=!0}))}));var nk=bu.parsePercent,ak=Math.PI/180;var rk=function(e,t,i,n){t.eachSeriesByType(e,(function(e){var t=e.get("center"),n=e.get("radius");_e.isArray(n)||(n=[0,n]),_e.isArray(t)||(t=[t,t]);var a=i.getWidth(),r=i.getHeight(),o=Math.min(a,r),s=nk(t[0],a),l=nk(t[1],r),u=nk(n[0],o/2),h=nk(n[1],o/2),c=-e.get("startAngle")*ak,d=e.get("minAngle")*ak,p=e.getData().tree.root,f=e.getViewRoot(),g=f.depth,m=e.get("sort");null!=m&&function e(t,i){var n=t.children||[];t.children=function(e,t){if("function"==typeof t)return e.sort(t);var i="asc"===t;return e.sort((function(e,t){var n=(e.getValue()-t.getValue())*(i?1:-1);return 0===n?(e.dataIndex-t.dataIndex)*(i?-1:1):n}))}(n,i),n.length&&_e.each(t.children,(function(t){e(t,i)}))}(f,m);var v=0;_e.each(f.children,(function(e){!isNaN(e.getValue())&&v++}));var y=f.getValue(),x=Math.PI/(y||v)*2,_=f.depth>0,b=f.height-(_?-1:1),w=(h-u)/(b||1),S=e.get("clockwise"),M=e.get("stillShowZeroSum"),I=S?1:-1,T=function(e,t){if(e){var i=t;if(e!==p){var n=e.getValue(),a=0===y&&M?x:n*x;a<d&&(a=d),i=t+I*a;var r=e.depth-g-(_?-1:1),h=u+w*r,c=u+w*(r+1),f=e.getModel();null!=f.get("r0")&&(h=nk(f.get("r0"),o/2)),null!=f.get("r")&&(c=nk(f.get("r"),o/2)),e.setLayout({angle:a,startAngle:t,endAngle:i,clockwise:S,cx:s,cy:l,r0:h,r:c})}if(e.children&&e.children.length){var m=0;_e.each(e.children,(function(e){m+=T(e,t+m)}))}return i-t}};if(_){var A=u,C=u+w,D=2*Math.PI;p.setLayout({angle:D,startAngle:c,endAngle:c+D,clockwise:S,cx:s,cy:l,r0:A,r:C})}T(f,c)}))};function ok(e,t){return t=t||[0,0],_e.map(["x","y"],(function(i,n){var a=this.getAxis(i),r=t[n],o=e[n]/2;return"category"===a.type?a.getBandWidth():Math.abs(a.dataToCoord(r-o)-a.dataToCoord(r+o))}),this)}Qv.registerVisual(_e.curry(wb,"sunburst")),Qv.registerLayout(_e.curry(rk,"sunburst")),Qv.registerProcessor(_e.curry(Ob,"sunburst"));var sk=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:_e.bind(ok,e)}}};function lk(e,t){return t=t||[0,0],_e.map([0,1],(function(i){var n=t[i],a=e[i]/2,r=[],o=[];return r[i]=n-a,o[i]=n+a,r[1-i]=o[1-i]=t[1-i],Math.abs(this.dataToPoint(r)[i]-this.dataToPoint(o)[i])}),this)}var uk=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:_e.bind(lk,e)}}};function hk(e,t){var i=this.getAxis(),n=t instanceof Array?t[0]:t,a=(e instanceof Array?e[0]:e)/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(n-a)-i.dataToCoord(n+a))}var ck=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:_e.bind(hk,e)}}};function dk(e,t){return _e.map(["Radius","Angle"],(function(i,n){var a=this["get"+i+"Axis"](),r=t[n],o=e[n]/2,s="dataTo"+i,l="category"===a.type?a.getBandWidth():Math.abs(a[s](r-o)-a[s](r+o));return"Angle"===i&&(l=l*Math.PI/180),l}),this)}var pk=function(e){var t=e.getRadiusAxis(),i=e.getAngleAxis(),n=t.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:e.cx,cy:e.cy,r:n[1],r0:n[0]},api:{coord:_e.bind((function(n){var a=t.dataToRadius(n[0]),r=i.dataToAngle(n[1]),o=e.coordToPoint([a,r]);return o.push(a,r*Math.PI/180),o})),size:_e.bind(dk,e)}}};var fk=function(e){var t=e.getRect(),i=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:i.start,end:i.end,weeks:i.weeks,dayCount:i.allDay}},api:{coord:function(t,i){return e.dataToPoint(t,i)}}}},gk=ty.getDefaultLabel,mk=mm.getLayoutOnAxis,vk=Zy.createClipPath,yk=iu.CACHED_LABEL_STYLE_PROPERTIES,xk=["itemStyle"],_k=["emphasis","itemStyle"],bk=["label"],wk=["emphasis","label"],Sk={cartesian2d:sk,geo:uk,singleAxis:ck,polar:pk,calendar:fk};function Mk(e,t,i,n,a){null==i[e]||a||(t[e]=i[e],i[e]=n[e])}function Ik(e,t,i,n){var a=e.get("renderItem"),r=e.coordinateSystem,o={};r&&(o=r.prepareCustoms?r.prepareCustoms():Sk[r.type](r));var s,l,u,h,c,d=_e.defaults({getWidth:n.getWidth,getHeight:n.getHeight,getZr:n.getZr,getDevicePixelRatio:n.getDevicePixelRatio,value:function(e,i){return null==i&&(i=s),t.get(t.getDimension(e||0),i)},style:function(i,n){null==n&&(n=s),g(n);var a=l.getModel(xk).getItemStyle();null!=c&&(a.fill=c);var r=t.getItemVisual(n,"opacity");null!=r&&(a.opacity=r);var o=i?Pk(i,u):u;return iu.setTextStyle(a,o,null,{autoColor:c,isRectText:!0}),a.text=o.getShallow("show")?_e.retrieve2(e.getFormattedLabel(n,"normal"),gk(t,n)):null,i&&kk(a,i),a},styleEmphasis:function(i,n){null==n&&(n=s),g(n);var a=l.getModel(_k).getItemStyle(),r=i?Pk(i,h):h;return iu.setTextStyle(a,r,null,{isRectText:!0},!0),a.text=r.getShallow("show")?_e.retrieve3(e.getFormattedLabel(n,"emphasis"),e.getFormattedLabel(n,"normal"),gk(t,n)):null,i&&kk(a,i),a},visual:function(e,i){return null==i&&(i=s),t.getItemVisual(i,e)},barLayout:function(e){if(r.getBaseAxis){var t=r.getBaseAxis();return mk(_e.defaults({axis:t},e),n)}},currentSeriesIndices:function(){return i.getCurrentSeriesIndices()},font:function(e){return iu.getFont(e,i)}},o.api||{}),p={context:{},seriesId:e.id,seriesName:e.name,seriesIndex:e.seriesIndex,coordSys:o.coordSys,dataInsideLength:t.count(),encode:Tk(e.getData())},f=!0;return function(e,i){return s=e,f=!0,a&&a(_e.defaults({dataIndexInside:e,dataIndex:t.getRawIndex(e),actionType:i?i.type:null},p),d)};function g(e){null==e&&(e=s),f&&(l=t.getItemModel(e),u=l.getModel(bk),h=l.getModel(wk),c=t.getItemVisual(e,"color"),f=!1)}}function Tk(e){var t={};return _e.each(e.dimensions,(function(i,n){var a=e.getDimensionInfo(i);if(!a.isExtraCoord){var r=a.coordDim;(t[r]=t[r]||[])[a.coordDimIndex]=n}})),t}function Ak(e,t,i,n,a,r){return(e=Ck(e,t,i,n,a,r,!0))&&r.setItemGraphicEl(t,e),e}function Ck(e,t,i,n,a,r,o){var s,l=!i,u=(i=i||{}).type,h=i.shape,c=i.style;if(e&&(l||null!=u&&u!==e.__customGraphicType||"path"===u&&((s=h)&&(s.hasOwnProperty("pathData")||s.hasOwnProperty("d")))&&Rk(h)!==e.__customPathData||"image"===u&&Nk(c,"image")&&c.image!==e.__customImagePath||"text"===u&&Nk(h,"text")&&c.text!==e.__customText)&&(a.remove(e),e=null),!l){var d=!e;return!e&&(e=function(e){var t,i=e.type;if("path"===i){var n=e.shape,a=null!=n.width&&null!=n.height?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,r=Rk(n);(t=iu.makePath(r,null,a,n.layout||"center")).__customPathData=r}else if("image"===i)(t=new iu.Image({})).__customImagePath=e.style.image;else if("text"===i)(t=new iu.Text({})).__customText=e.style.text;else if("group"===i)t=new iu.Group;else{if("compoundPath"===i)throw new Error('"compoundPath" is not supported yet.');t=new(iu.getShapeClass(i))}return t.__customGraphicType=i,t.name=e.name,t}(i)),function(e,t,i,n,a,r,o){var s={},l=i.style||{};if(i.shape&&(s.shape=_e.clone(i.shape)),i.position&&(s.position=i.position.slice()),i.scale&&(s.scale=i.scale.slice()),i.origin&&(s.origin=i.origin.slice()),i.rotation&&(s.rotation=i.rotation),"image"===e.type&&i.style){var u=s.style={};_e.each(["x","y","width","height"],(function(t){Mk(t,u,l,e.style,r)}))}if("text"===e.type&&i.style){u=s.style={};_e.each(["x","y"],(function(t){Mk(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 h=l.opacity;null==h&&(h=1),iu.initProps(e,{style:{opacity:h}},n,t)}r?e.attr(s):iu.updateProps(e,s,n,t),i.hasOwnProperty("z2")&&e.attr("z2",i.z2||0),i.hasOwnProperty("silent")&&e.attr("silent",i.silent),i.hasOwnProperty("invisible")&&e.attr("invisible",i.invisible),i.hasOwnProperty("ignore")&&e.attr("ignore",i.ignore),i.hasOwnProperty("info")&&e.attr("info",i.info);var c=i.styleEmphasis;iu.setElementHoverStyle(e,c),o&&iu.setAsHighDownDispatcher(e,!1!==c)}(e,t,i,n,0,d,o),"group"===u&&function(e,t,i,n,a){var r=i.children,o=r?r.length:0,s=i.$mergeChildren,l="byName"===s||i.diffChildrenByName,u=!1===s;if(!o&&!l&&!u)return;if(l)return h={oldChildren:e.children()||[],newChildren:r||[],dataIndex:t,animatableModel:n,group:e,data:a},void new Tf(h.oldChildren,h.newChildren,Dk,Dk,h).add(Lk).update(Lk).remove(Ok).execute();var h;u&&e.removeAll();for(var c=0;c<o;c++)r[c]&&Ck(e.childAt(c),t,r[c],n,e,a)}(e,t,i,n,r),a.add(e),e}}function Dk(e,t){var i=e&&e.name;return null!=i?i:"e\0\0"+t}function Lk(e,t){var i=this.context,n=null!=e?i.newChildren[e]:null;Ck(null!=t?i.oldChildren[t]:null,i.dataIndex,n,i.animatableModel,i.group,i.data)}function Pk(e,t){var i=new gu({},t);return _e.each(yk,(function(t,n){e.hasOwnProperty(t)&&(i.option[n]=e[t])})),i}function kk(e,t){for(var i in t)!t.hasOwnProperty(i)&&yk.hasOwnProperty(i)||(e[i]=t[i])}function Ok(e){var t=this.context,i=t.oldChildren[e];i&&t.group.remove(i)}function Rk(e){return e&&(e.pathData||e.d)}function Nk(e,t){return e&&e.hasOwnProperty(t)}Nd.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 Ng(this.getSource(),this)},getDataParams:function(e,t,i){var n=Nd.prototype.getDataParams.apply(this,arguments);return i&&(n.info=i.info),n}}),Jd.extend({type:"custom",_data:null,render:function(e,t,i,n){var a=this._data,r=e.getData(),o=this.group,s=Ik(e,r,t,i);r.diff(a).add((function(t){Ak(null,t,s(t,n),e,o,r)})).update((function(t,i){Ak(a.getItemGraphicEl(i),t,s(t,n),e,o,r)})).remove((function(e){var t=a.getItemGraphicEl(e);t&&o.remove(t)})).execute();var l=e.get("clip",!0)?vk(e.coordinateSystem,!1,e):null;l?o.setClipPath(l):o.removeClipPath(),this._data=r},incrementalPrepareRender:function(e,t,i){this.group.removeAll(),this._data=null},incrementalRender:function(e,t,i,n,a){var r=t.getData(),o=Ik(t,r,i,n);function s(e){e.isGroup||(e.incremental=!0,e.useHoverLayer=!0)}for(var l=e.start;l<e.end;l++){Ak(null,l,o(l,a),t,this.group,r).traverse(s)}},dispose:_e.noop,filterForExposedEvent:function(e,t,i,n){var a=t.element;if(null==a||i.name===a)return!0;for(;(i=i.parent)&&i!==this.group;)if(i.name===a)return!0;return!1}});var Ek=bu.parsePercent,zk=Cg.isDimensionStacked;function Bk(e){return e.get("stack")||"__ec_stack_"+e.seriesIndex}function Vk(e,t){return t.dim+e.model.componentIndex}var Gk=function(e,t,i){var n={},a=function(e,t){var i={};_e.each(e,(function(e,t){var n=e.getData(),a=e.coordinateSystem,r=a.getBaseAxis(),o=Vk(a,r),s=r.getExtent(),l="category"===r.type?r.getBandWidth():Math.abs(s[1]-s[0])/n.count(),u=i[o]||{bandWidth:l,remainedWidth:l,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},h=u.stacks;i[o]=u;var c=Bk(e);h[c]||u.autoWidthCount++,h[c]=h[c]||{width:0,maxWidth:0};var d=Ek(e.get("barWidth"),l),p=Ek(e.get("barMaxWidth"),l),f=e.get("barGap"),g=e.get("barCategoryGap");d&&!h[c].width&&(d=Math.min(u.remainedWidth,d),h[c].width=d,u.remainedWidth-=d),p&&(h[c].maxWidth=p),null!=f&&(u.gap=f),null!=g&&(u.categoryGap=g)}));var n={};return _e.each(i,(function(e,t){n[t]={};var i=e.stacks,a=e.bandWidth,r=Ek(e.categoryGap,a),o=Ek(e.gap,1),s=e.remainedWidth,l=e.autoWidthCount,u=(s-r)/(l+(l-1)*o);u=Math.max(u,0),_e.each(i,(function(e,t){var i=e.maxWidth;i&&i<u&&(i=Math.min(i,s),e.width&&(i=Math.min(i,e.width)),s-=i,e.width=i,l--)})),u=(s-r)/(l+(l-1)*o),u=Math.max(u,0);var h,c=0;_e.each(i,(function(e,t){e.width||(e.width=u),h=e,c+=e.width*(1+o)})),h&&(c-=h.width*o);var d=-c/2;_e.each(i,(function(e,i){n[t][i]=n[t][i]||{offset:d,width:e.width},d+=e.width*(1+o)}))})),n}(_e.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(),i=e.coordinateSystem,r=i.getBaseAxis(),o=Vk(i,r),s=Bk(e),l=a[o][s],u=l.offset,h=l.width,c=i.getOtherAxis(r),d=e.coordinateSystem.cx,p=e.coordinateSystem.cy,f=e.get("barMinHeight")||0,g=e.get("barMinAngle")||0;n[s]=n[s]||[];for(var m=t.mapDimension(c.dim),v=t.mapDimension(r.dim),y=zk(t,m),x="radius"!==r.dim||!e.get("roundCap",!0),_=c.getExtent()[0],b=0,w=t.count();b<w;b++){var S,M,I,T,A=t.get(m,b),C=t.get(v,b),D=A>=0?"p":"n",L=_;if(y&&(n[s][C]||(n[s][C]={p:_,n:_}),L=n[s][C][D]),"radius"===c.dim){var P=c.dataToRadius(A)-_,k=r.dataToAngle(C);Math.abs(P)<f&&(P=(P<0?-1:1)*f),S=L,M=L+P,T=(I=k-u)-h,y&&(n[s][C][D]=M)}else{var O=c.dataToAngle(A,x)-_,R=r.dataToRadius(C);Math.abs(O)<g&&(O=(O<0?-1:1)*g),M=(S=R+u)+h,I=L,T=L+O,y&&(n[s][C][D]=T)}t.setItemLayout(b,{cx:d,cy:p,r0:S,r:M,startAngle:-I*Math.PI/180,endAngle:-T*Math.PI/180})}}}),this)};function Fk(e,t){Nv.call(this,"radius",e,t),this.type="category"}Fk.prototype={constructor:Fk,pointToData:function(e,t){return this.polar.pointToData(e,t)["radius"===this.dim?0:1]},dataToRadius:Nv.prototype.dataToCoord,radiusToData:Nv.prototype.coordToData},_e.inherits(Fk,Nv);var Hk=Fk,Wk=(0,vr.makeInner)();function Uk(e,t){t=t||[0,360],Nv.call(this,"angle",e,t),this.type="category"}Uk.prototype={constructor:Uk,pointToData:function(e,t){return this.polar.pointToData(e,t)["radius"===this.dim?0:1]},dataToAngle:Nv.prototype.dataToCoord,angleToData:Nv.prototype.coordToData,calculateCategoryInterval:function(){var e=this.getLabelModel(),t=this.scale,i=t.getExtent(),n=t.count();if(i[1]-i[0]<1)return 0;var a=i[0],r=this.dataToCoord(a+1)-this.dataToCoord(a),o=Math.abs(r),s=Bn.getBoundingRect(a,e.getFont(),"center","top"),l=Math.max(s.height,7)/o;isNaN(l)&&(l=1/0);var u=Math.max(0,Math.floor(l)),h=Wk(this.model),c=h.lastAutoInterval,d=h.lastTickCount;return null!=c&&null!=d&&Math.abs(c-u)<=1&&Math.abs(d-n)<=1&&c>u?u=c:(h.lastTickCount=n,h.lastAutoInterval=u),u}},_e.inherits(Uk,Nv);var Zk=Uk,jk=function(e){this.name=e||"",this.cx=0,this.cy=0,this._radiusAxis=new Hk,this._angleAxis=new Zk,this._radiusAxis.polar=this._angleAxis.polar=this};jk.prototype={type:"polar",axisPointerEnabled:!0,constructor:jk,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=[],i=this._angleAxis,n=this._radiusAxis;return i.scale.type===e&&t.push(i),n.scale.type===e&&t.push(n),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 i=this.pointToCoord(e);return[this._radiusAxis.radiusToData(i[0],t),this._angleAxis.angleToData(i[1],t)]},pointToCoord:function(e){var t=e[0]-this.cx,i=e[1]-this.cy,n=this.getAngleAxis(),a=n.getExtent(),r=Math.min(a[0],a[1]),o=Math.max(a[0],a[1]);n.inverse?r=o-360:o=r+360;var s=Math.sqrt(t*t+i*i);t/=s,i/=s;for(var l=Math.atan2(-i,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],i=e[1]/180*Math.PI;return[Math.cos(i)*t+this.cx,-Math.sin(i)*t+this.cy]},getArea:function(){var e=this.getAngleAxis(),t=this.getRadiusAxis().getExtent().slice();t[0]>t[1]&&t.reverse();var i=e.getExtent(),n=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:t[0],r:t[1],startAngle:-i[0]*n,endAngle:-i[1]*n,clockwise:e.inverse,contain:function(e,t){var i=e-this.cx,n=t-this.cy,a=i*i+n*n,r=this.r,o=this.r0;return a<=r*r&&a>=o*o}}}};var Yk=jk,Xk=ju.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});_e.merge(Xk.prototype,Wm);var qk={splitNumber:5};function Kk(e,t){return t.type||(t.data?"category":"value")}Ax("angle",Xk,Kk,{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}}),Ax("radius",Xk,Kk,qk);Qv.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 $k=bu.parsePercent,Jk=Hm.createScaleByModel,Qk=Hm.niceScaleExtent,eO=Cg.getStackedDimension;function tO(e,t){var i=this,n=i.getAngleAxis(),a=i.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),a.scale.setExtent(1/0,-1/0),e.eachSeries((function(e){if(e.coordinateSystem===i){var t=e.getData();_e.each(t.mapDimension("radius",!0),(function(e){a.scale.unionExtentFromData(t,eO(t,e))})),_e.each(t.mapDimension("angle",!0),(function(e){n.scale.unionExtentFromData(t,eO(t,e))}))}})),Qk(n.scale,n.model),Qk(a.scale,a.model),"category"===n.type&&!n.onBand){var r=n.getExtent(),o=360/n.scale.count();n.inverse?r[1]+=o:r[1]-=o,n.setExtent(r[0],r[1])}}function iO(e,t){if(e.type=t.get("type"),e.scale=Jk(t),e.onBand=t.get("boundaryGap")&&"category"===e.type,e.inverse=t.get("inverse"),"angleAxis"===t.mainType){e.inverse^=t.get("clockwise");var i=t.get("startAngle");e.setExtent(i,i+(e.inverse?-360:360))}t.axis=e,e.model=t}var nO={dimensions:Yk.prototype.dimensions,create:function(e,t){var i=[];return e.eachComponent("polar",(function(e,n){var a=new Yk(n);a.update=tO;var r=a.getRadiusAxis(),o=a.getAngleAxis(),s=e.findAxisModel("radiusAxis"),l=e.findAxisModel("angleAxis");iO(r,s),iO(o,l),function(e,t,i){var n=t.get("center"),a=i.getWidth(),r=i.getHeight();e.cx=$k(n[0],a),e.cy=$k(n[1],r);var o=e.getRadiusAxis(),s=Math.min(a,r)/2,l=t.get("radius");null==l?l=[0,"100%"]:_e.isArray(l)||(l=[0,l]),l=[$k(l[0],s),$k(l[1],s)],o.inverse?o.setExtent(l[1],l[0]):o.setExtent(l[0],l[1])}(a,e,t),i.push(a),e.coordinateSystem=a,a.model=e})),e.eachSeries((function(t){if("polar"===t.get("coordinateSystem")){var i=e.queryComponents({mainType:"polar",index:t.get("polarIndex"),id:t.get("polarId")})[0];t.coordinateSystem=i.coordinateSystem}})),i}};ac.register("polar",nO);var aO=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function rO(e,t,i){t[1]>t[0]&&(t=t.slice().reverse());var n=e.coordToPoint([t[0],i]),a=e.coordToPoint([t[1],i]);return{x1:n[0],y1:n[1],x2:a[0],y2:a[1]}}function oO(e){return e.getRadiusAxis().inverse?0:1}function sO(e){var t=e[0],i=e[e.length-1];t&&i&&Math.abs(Math.abs(t.coord-i.coord)-360)<1e-4&&e.pop()}T_.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(e,t){if(this.group.removeAll(),e.get("show")){var i=e.axis,n=i.polar,a=n.getRadiusAxis().getExtent(),r=i.getTicksCoords(),o=i.getMinorTicksCoords(),s=_e.map(i.getViewLabels(),(function(e){return(e=_e.clone(e)).coord=i.dataToCoord(e.tickValue),e}));sO(s),sO(r),_e.each(aO,(function(t){!e.get(t+".show")||i.scale.isBlank()&&"axisLine"!==t||this["_"+t](e,n,r,o,a,s)}),this)}},_axisLine:function(e,t,i,n,a){var r,o=e.getModel("axisLine.lineStyle"),s=oO(t),l=s?0:1;(r=0===a[l]?new iu.Circle({shape:{cx:t.cx,cy:t.cy,r:a[s]},style:o.getLineStyle(),z2:1,silent:!0}):new iu.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,i,n,a){var r=e.getModel("axisTick"),o=(r.get("inside")?-1:1)*r.get("length"),s=a[oO(t)],l=_e.map(i,(function(e){return new iu.Line({shape:rO(t,[s,s+o],e.coord)})}));this.group.add(iu.mergePath(l,{style:_e.defaults(r.getModel("lineStyle").getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")})}))},_minorTick:function(e,t,i,n,a){if(n.length){for(var r=e.getModel("axisTick"),o=e.getModel("minorTick"),s=(r.get("inside")?-1:1)*o.get("length"),l=a[oO(t)],u=[],h=0;h<n.length;h++)for(var c=0;c<n[h].length;c++)u.push(new iu.Line({shape:rO(t,[l,l+s],n[h][c].coord)}));this.group.add(iu.mergePath(u,{style:_e.defaults(o.getModel("lineStyle").getLineStyle(),_e.defaults(r.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}))}))}},_axisLabel:function(e,t,i,n,a,r){var o=e.getCategories(!0),s=e.getModel("axisLabel"),l=s.get("margin"),u=e.get("triggerEvent");_e.each(r,(function(i,n){var r=s,h=i.tickValue,c=a[oO(t)],d=t.coordToPoint([c+l,i.coord]),p=t.cx,f=t.cy,g=Math.abs(d[0]-p)/c<.3?"center":d[0]>p?"left":"right",m=Math.abs(d[1]-f)/c<.3?"middle":d[1]>f?"top":"bottom";o&&o[h]&&o[h].textStyle&&(r=new gu(o[h].textStyle,s,s.ecModel));var v=new iu.Text({silent:f_.isLabelSilent(e)});this.group.add(v),iu.setTextStyle(v.style,r,{x:d[0],y:d[1],textFill:r.getTextColor()||e.get("axisLine.lineStyle.color"),text:i.formattedLabel,textAlign:g,textVerticalAlign:m}),u&&(v.eventData=f_.makeAxisEventDataBase(e),v.eventData.targetType="axisLabel",v.eventData.value=i.rawLabel)}),this)},_splitLine:function(e,t,i,n,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<i.length;u++){var h=s++%o.length;l[h]=l[h]||[],l[h].push(new iu.Line({shape:rO(t,a,i[u].coord)}))}for(u=0;u<l.length;u++)this.group.add(iu.mergePath(l[u],{style:_e.defaults({stroke:o[u%o.length]},r.getLineStyle()),silent:!0,z:e.get("z")}))},_minorSplitLine:function(e,t,i,n,a){if(n.length){for(var r=e.getModel("minorSplitLine").getModel("lineStyle"),o=[],s=0;s<n.length;s++)for(var l=0;l<n[s].length;l++)o.push(new iu.Line({shape:rO(t,a,n[s][l].coord)}));this.group.add(iu.mergePath(o,{style:r.getLineStyle(),silent:!0,z:e.get("z")}))}},_splitArea:function(e,t,i,n,a){if(i.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,h=-i[0].coord*u,c=Math.min(a[0],a[1]),d=Math.max(a[0],a[1]),p=e.get("clockwise"),f=1;f<i.length;f++){var g=s++%o.length;l[g]=l[g]||[],l[g].push(new iu.Sector({shape:{cx:t.cx,cy:t.cy,r0:c,r:d,startAngle:h,endAngle:-i[f].coord*u,clockwise:p},silent:!0})),h=-i[f].coord*u}for(f=0;f<l.length;f++)this.group.add(iu.mergePath(l[f],{style:_e.defaults({fill:o[f%o.length]},r.getAreaStyle()),silent:!0}))}}});var lO=["axisLine","axisTickLabel","axisName"],uO=["splitLine","splitArea","minorSplitLine"];T_.extend({type:"radiusAxis",axisPointerClass:"PolarAxisPointer",render:function(e,t){if(this.group.removeAll(),e.get("show")){var i=e.axis,n=i.polar,a=n.getAngleAxis(),r=i.getTicksCoords(),o=i.getMinorTicksCoords(),s=a.getExtent()[0],l=i.getExtent(),u=function(e,t,i){return{position:[e.cx,e.cy],rotation:i/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:t.getModel("axisLabel").get("rotate"),z2:1}}(n,e,s),h=new f_(e,u);_e.each(lO,h.add,h),this.group.add(h.getGroup()),_e.each(uO,(function(t){e.get(t+".show")&&!i.scale.isBlank()&&this["_"+t](e,n,s,l,r,o)}),this)}},_splitLine:function(e,t,i,n,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 h=s++%o.length;l[h]=l[h]||[],l[h].push(new iu.Circle({shape:{cx:t.cx,cy:t.cy,r:a[u].coord}}))}for(u=0;u<l.length;u++)this.group.add(iu.mergePath(l[u],{style:_e.defaults({stroke:o[u%o.length],fill:null},r.getLineStyle()),silent:!0}))},_minorSplitLine:function(e,t,i,n,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 iu.Circle({shape:{cx:t.cx,cy:t.cy,r:r[l][u].coord}}));this.group.add(iu.mergePath(s,{style:_e.defaults({fill:null},o.getLineStyle()),silent:!0}))}},_splitArea:function(e,t,i,n,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,h=1;h<a.length;h++){var c=s++%o.length;l[c]=l[c]||[],l[c].push(new iu.Sector({shape:{cx:t.cx,cy:t.cy,r0:u,r:a[h].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),u=a[h].coord}for(h=0;h<l.length;h++)this.group.add(iu.mergePath(l[h],{style:_e.defaults({fill:o[h%o.length]},r.getAreaStyle()),silent:!0}))}}});var hO=SP.extend({makeElOption:function(e,t,i,n,a){var r=i.axis;"angle"===r.dim&&(this.animationThreshold=Math.PI/18);var o,s=r.polar,l=s.getOtherAxis(r).getExtent();o=r["dataTo"+Du.capitalFirst(r.dim)](t);var u=n.get("type");if(u&&"none"!==u){var h=AP.buildElStyle(n),c=cO[u](r,s,o,l,h);c.style=h,e.graphicKey=c.type,e.pointer=c}var d=function(e,t,i,n,a){var r=t.axis,o=r.dataToCoord(e),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,h,c=n.getRadiusAxis().getExtent();if("radius"===r.dim){var d=dt.create();dt.rotate(d,d,s),dt.translate(d,d,[n.cx,n.cy]),l=iu.applyTransform([o,-a],d);var p=t.getModel("axisLabel").get("rotate")||0,f=f_.innerTextLayout(s,p*Math.PI/180,-1);u=f.textAlign,h=f.textVerticalAlign}else{var g=c[1];l=n.coordToPoint([g+a,o]);var m=n.cx,v=n.cy;u=Math.abs(l[0]-m)/g<.3?"center":l[0]>m?"left":"right",h=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:h}}(t,i,0,s,n.get("label.margin"));AP.buildLabelElOption(e,i,n,a,d)}});var cO={line:function(e,t,i,n,a){return"angle"===e.dim?{type:"Line",shape:AP.makeLineShape(t.coordToPoint([n[0],i]),t.coordToPoint([n[1],i]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r:i}}},shadow:function(e,t,i,n,a){var r=Math.max(1,e.getBandWidth()),o=Math.PI/180;return"angle"===e.dim?{type:"Sector",shape:AP.makeSectorShape(t.cx,t.cy,n[0],n[1],(-i-r/2)*o,(r/2-i)*o)}:{type:"Sector",shape:AP.makeSectorShape(t.cx,t.cy,i-r/2,i+r/2,0,2*Math.PI)}}};T_.registerAxisPointerClass("PolarAxisPointer",hO),Qv.registerLayout(_e.curry(Gk,"bar")),Qv.extendComponentView({type:"polar"});var dO=ju.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(e){ju.prototype.init.apply(this,arguments),vr.defaultEmphasis(e,"label",["show"])},optionUpdated:function(){var e=this.option,t=this;e.regions=gS.getFilledRegions(e.regions,e.map,e.nameMap),this._optionModelMap=_e.reduce(e.regions||[],(function(e,i){return i.name&&e.set(i.name,new gu(i,t)),e}),_e.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 gu(null,this,this.ecModel)},getFormattedLabel:function(e,t){var i=this.getRegionModel(e).get("label"+("normal"===t?".":t+".")+"formatter"),n={name:e};return"function"==typeof i?(n.status=t,i(n)):"string"==typeof i?i.replace("{a}",null!=e?e:""):void 0},setZoom:function(e){this.option.zoom=e},setCenter:function(e){this.option.center=e}});_e.mixin(dO,hb);Qv.extendComponentView({type:"geo",init:function(e,t){var i=new Qw(t,!0);this._mapDraw=i,this.group.add(i.group)},render:function(e,t,i,n){if(!n||"geoToggleSelect"!==n.type||n.from!==this.uid){var a=this._mapDraw;e.get("show")?a.draw(e,t,i,this,n):this._mapDraw.group.removeAll(),this.group.silent=e.get("silent")}},dispose:function(){this._mapDraw&&this._mapDraw.remove()}});function pO(e,t){t.update="updateView",Qv.registerAction(t,(function(t,i){var n={};return i.eachComponent({mainType:"geo",query:t},(function(i){i[e](t.name);var a=i.coordinateSystem;_e.each(a.regions,(function(e){n[e.name]=i.isSelected(e.name)||!1}))})),{selected:n,name:t.name}}))}pO("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),pO("select",{type:"geoSelect",event:"geoselected"}),pO("unSelect",{type:"geoUnSelect",event:"geounselected"});function fO(e,t,i){this._model=e}function gO(e,t,i,n){var a=i.calendarModel,r=i.seriesModel,o=a?a.coordinateSystem:r?r.coordinateSystem:null;return o===this?o[e](n):null}fO.prototype={constructor:fO,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=bu.parseDate(e)).getFullYear(),i=e.getMonth()+1;i=i<10?"0"+i:i;var n=e.getDate();n=n<10?"0"+n:n;var a=e.getDay();return{y:t,m:i,d:n,day:a=Math.abs((a+7-this.getFirstDayOfWeek())%7),time:e.getTime(),formatedDate:t+"-"+i+"-"+n,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 i=this._rangeInfo.weeks||1,n=["width","height"],a=this._model.get("cellSize").slice(),r=this._model.getBoxLayoutParams(),o="horizontal"===this._orient?[i,7]:[7,i];_e.each([0,1],(function(e){u(a,e)&&(r[n[e]]=a[e]*o[e])}));var s={width:t.getWidth(),height:t.getHeight()},l=this._rect=Gu.getLayoutRect(r,s);function u(e,t){return null!=e[t]&&"auto"!==e[t]}_e.each([0,1],(function(e){u(a,e)||(a[e]=l[n[e]]/o[e])})),this._sw=a[0],this._sh=a[1]},dataToPoint:function(e,t){_e.isArray(e)&&(e=e[0]),null==t&&(t=!0);var i=this.getDateInfo(e),n=this._rangeInfo,a=i.formatedDate;if(t&&!(i.time>=n.start.time&&i.time<n.end.time+864e5))return[NaN,NaN];var r=i.day,o=this._getRangeInfo([n.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 i=this.dataToPoint(e,t);return{contentShape:{x:i[0]-(this._sw-this._lineWidth)/2,y:i[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:i,tl:[i[0]-this._sw/2,i[1]-this._sh/2],tr:[i[0]+this._sw/2,i[1]-this._sh/2],br:[i[0]+this._sw/2,i[1]+this._sh/2],bl:[i[0]-this._sw/2,i[1]+this._sh/2]}},pointToDate:function(e){var t=Math.floor((e[0]-this._rect.x)/this._sw)+1,i=Math.floor((e[1]-this._rect.y)/this._sh)+1,n=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(i,t-1,n):this._getDateByWeeksAndDay(t,i-1,n)},convertToPixel:_e.curry(gO,"dataToPoint"),convertFromPixel:_e.curry(gO,"pointToData"),_initRangeOption:function(){var e=this._model.get("range"),t=e;if(_e.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 i=this.getDateInfo(t),n=i.date;n.setMonth(n.getMonth()+1);var a=this.getNextNDay(n,-1);e=[i.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 i=Math.floor(e[1].time/864e5)-Math.floor(e[0].time/864e5)+1,n=new Date(e[0].time),a=n.getDate(),r=e[1].date.getDate();n.setDate(a+i-1);var o=n.getDate();if(o!==r)for(var s=n.getTime()-e[1].time>0?1:-1;(o=n.getDate())!==r&&(n.getTime()-e[1].time)*s>0;)i-=s,n.setDate(o-s);var l=Math.floor((i+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:i,weeks:l,nthWeek:u,fweek:e[0].day,lweek:e[1].day}},_getDateByWeeksAndDay:function(e,t,i){var n=this._getRangeInfo(i);if(e>n.weeks||0===e&&t<n.fweek||e===n.weeks&&t>n.lweek)return!1;var a=7*(e-1)-n.fweek+t,r=new Date(n.start.time);return r.setDate(n.start.d+a),this.getDateInfo(r)}},fO.dimensions=fO.prototype.dimensions,fO.getDimensionsInfo=fO.prototype.getDimensionsInfo,fO.create=function(e,t){var i=[];return e.eachComponent("calendar",(function(n){var a=new fO(n,e,t);i.push(a),n.coordinateSystem=a})),e.eachSeries((function(e){"calendar"===e.get("coordinateSystem")&&(e.coordinateSystem=i[e.get("calendarIndex")||0])})),i},ac.register("calendar",fO);var mO=Gu.getLayoutParams,vO=Gu.sizeCalculable,yO=Gu.mergeLayoutParam,xO=ju.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,i,n){var a=mO(e);xO.superApply(this,"init",arguments),_O(e,a)},mergeOption:function(e,t){xO.superApply(this,"mergeOption",arguments),_O(this.option,e)}});function _O(e,t){var i=e.cellSize;_e.isArray(i)?1===i.length&&(i[1]=i[0]):i=e.cellSize=[i,i];var n=_e.map([0,1],(function(e){return vO(t,e)&&(i[e]="auto"),null!=i[e]&&"auto"!==i[e]}));yO(e,t,{type:"box",ignoreSize:n})}var bO={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},wO={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]},SO=(Qv.extendComponentView({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(e,t,i){var n=this.group;n.removeAll();var a=e.coordinateSystem,r=a.getRangeInfo(),o=a.getOrient();this._renderDayRect(e,r,n),this._renderLines(e,r,o,n),this._renderYearText(e,r,o,n),this._renderMonthText(e,o,n),this._renderWeekText(e,r,o,n)},_renderDayRect:function(e,t,i){for(var n=e.coordinateSystem,a=e.getModel("itemStyle").getItemStyle(),r=n.getCellWidth(),o=n.getCellHeight(),s=t.start.time;s<=t.end.time;s=n.getNextNDay(s,1).time){var l=n.dataToRect([s],!1).tl,u=new iu.Rect({shape:{x:l[0],y:l[1],width:r,height:o},cursor:"default",style:a});i.add(u)}},_renderLines:function(e,t,i,n){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,h=0;u.time<=t.end.time;h++){d(u.formatedDate),0===h&&(u=r.getDateInfo(t.start.y+"-"+t.start.m));var c=u.date;c.setMonth(c.getMonth()+1),u=r.getDateInfo(c)}function d(t){a._firstDayOfMonth.push(r.getDateInfo(t)),a._firstDayPoints.push(r.dataToRect([t],!1).tl);var l=a._getLinePointsOfOneWeek(e,t,i);a._tlpoints.push(l[0]),a._blpoints.push(l[l.length-1]),s&&a._drawSplitline(l,o,n)}d(r.getNextNDay(t.end.time,1).formatedDate),s&&this._drawSplitline(a._getEdgesPoints(a._tlpoints,l,i),o,n),s&&this._drawSplitline(a._getEdgesPoints(a._blpoints,l,i),o,n)},_getEdgesPoints:function(e,t,i){var n=[e[0].slice(),e[e.length-1].slice()],a="horizontal"===i?0:1;return n[0][a]=n[0][a]-t/2,n[1][a]=n[1][a]+t/2,n},_drawSplitline:function(e,t,i){var n=new iu.Polyline({z2:20,shape:{points:e},style:t});i.add(n)},_getLinePointsOfOneWeek:function(e,t,i){var n=e.coordinateSystem;t=n.getDateInfo(t);for(var a=[],r=0;r<7;r++){var o=n.getNextNDay(t.time,r),s=n.dataToRect([o.time],!1);a[2*o.day]=s.tl,a[2*o.day+1]=s["horizontal"===i?"bl":"tr"]}return a},_formatterLabel:function(e,t){return"string"==typeof e&&e?Du.formatTplSimple(e,t):"function"==typeof e?e(t):t.nameMap},_yearTextPositionControl:function(e,t,i,n,a){t=t.slice();var r=["center","bottom"];"bottom"===n?(t[1]+=a,r=["center","top"]):"left"===n?t[0]-=a:"right"===n?(t[0]+=a,r=["center","top"]):t[1]-=a;var o=0;return"left"!==n&&"right"!==n||(o=Math.PI/2),{rotation:o,position:t,style:{textAlign:r[0],textVerticalAlign:r[1]}}},_renderYearText:function(e,t,i,n){var a=e.getModel("yearLabel");if(a.get("show")){var r=a.get("margin"),o=a.get("position");o||(o="horizontal"!==i?"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,h="horizontal"===i?0:1,c={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},d=t.start.y;+t.end.y>+t.start.y&&(d=d+"-"+t.end.y);var p=a.get("formatter"),f={start:t.start.y,end:t.end.y,nameMap:d},g=this._formatterLabel(p,f),m=new iu.Text({z2:30});iu.setTextStyle(m.style,a,{text:g}),m.attr(this._yearTextPositionControl(m,c[o],i,o,r)),n.add(m)}},_monthTextPositionControl:function(e,t,i,n,a){var r="left",o="top",s=e[0],l=e[1];return"horizontal"===i?(l+=a,t&&(r="center"),"start"===n&&(o="bottom")):(s+=a,t&&(o="middle"),"start"===n&&(r="right")),{x:s,y:l,textAlign:r,textVerticalAlign:o}},_renderMonthText:function(e,t,i){var n=e.getModel("monthLabel");if(n.get("show")){var a=n.get("nameMap"),r=n.get("margin"),o=n.get("position"),s=n.get("align"),l=[this._tlpoints,this._blpoints];_e.isString(a)&&(a=bO[a.toUpperCase()]||[]);var u="start"===o?0:1,h="horizontal"===t?0:1;r="start"===o?-r:r;for(var c="center"===s,d=0;d<l[u].length-1;d++){var p=l[u][d].slice(),f=this._firstDayOfMonth[d];if(c){var g=this._firstDayPoints[d];p[h]=(g[h]+l[0][d+1][h])/2}var m=n.get("formatter"),v=a[+f.m-1],y={yyyy:f.y,yy:(f.y+"").slice(2),MM:f.m,M:+f.m,nameMap:v},x=this._formatterLabel(m,y),_=new iu.Text({z2:30});_e.extend(iu.setTextStyle(_.style,n,{text:x}),this._monthTextPositionControl(p,c,t,o,r)),i.add(_)}}},_weekTextPositionControl:function(e,t,i,n,a){var r="center",o="middle",s=e[0],l=e[1],u="start"===i;return"horizontal"===t?(s=s+n+(u?1:-1)*a[0]/2,r=u?"right":"left"):(l=l+n+(u?1:-1)*a[1]/2,o=u?"bottom":"top"),{x:s,y:l,textAlign:r,textVerticalAlign:o}},_renderWeekText:function(e,t,i,n){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();_e.isString(s)&&(s=wO[s.toUpperCase()]||[]);var h=r.getNextNDay(t.end.time,7-t.lweek).time,c=[r.getCellWidth(),r.getCellHeight()];l=bu.parsePercent(l,c["horizontal"===i?0:1]),"start"===o&&(h=r.getNextNDay(t.start.time,-(7+t.fweek)).time,l=-l);for(var d=0;d<7;d++){var p,f=r.getNextNDay(h,d),g=r.dataToRect([f.time],!1).center;p=Math.abs((d+u)%7);var m=new iu.Text({z2:30});_e.extend(iu.setTextStyle(m.style,a,{text:s[p]}),this._weekTextPositionControl(g,i,o,l,c)),n.add(m)}}}}),bu.parsePercent),MO={path:null,compoundPath:null,group:iu.Group,image:iu.Image,text:iu.Text};Qv.registerPreprocessor((function(e){var t=e.graphic;_e.isArray(t)?t[0]&&t[0].elements?e.graphic=[e.graphic[0]]:e.graphic=[{elements:t}]:t&&!t.elements&&(e.graphic=[{elements:[t]}])}));var IO=Qv.extendComponentModel({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(e){var t=this.option.elements;this.option.elements=null,IO.superApply(this,"mergeOption",arguments),this.option.elements=t},optionUpdated:function(e,t){var i=this.option,n=(t?i:e).elements,a=i.elements=t?[]:i.elements,r=[];this._flatten(n,r);var o=vr.mappingToExists(a,r);vr.makeIdAndName(o);var s=this._elOptionsToUpdate=[];_e.each(o,(function(e,t){var i=e.option;i&&(s.push(i),function(e,t){var i=e.exist;if(t.id=e.keyInfo.id,!t.type&&i&&(t.type=i.type),null==t.parentId){var n=t.parentOption;n?t.parentId=n.id:i&&(t.parentId=i.parentId)}t.parentOption=null}(e,i),function(e,t,i){var n=_e.extend({},i),a=e[t],r=i.$action||"merge";"merge"===r?a?(_e.merge(a,n,!0),Gu.mergeLayoutParam(a,n,{ignoreSize:!0}),Gu.copyLayoutParams(i,a)):e[t]=n:"replace"===r?e[t]=n:"remove"===r&&a&&(e[t]=null)}(a,t,i),function(e,t){if(!e)return;e.hv=t.hv=[CO(t,["left","right"]),CO(t,["top","bottom"])],"group"===e.type&&(null==e.width&&(e.width=t.width=0),null==e.height&&(e.height=t.height=0))}(a[t],i))}),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,i){_e.each(e,(function(e){if(e){i&&(e.parentOption=i),t.push(e);var n=e.children;"group"===e.type&&n&&this._flatten(n,t,e),delete e.children}}),this)},useElOptionsToUpdate:function(){var e=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,e}});function TO(e,t,i,n){var a=i.type,r=new(MO.hasOwnProperty(a)?MO[a]:iu.getShapeClass(a))(i);t.add(r),n.set(e,r),r.__ecGraphicId=e}function AO(e,t){var i=e&&e.parent;i&&("group"===e.type&&e.traverse((function(e){AO(e,t)})),t.removeKey(e.__ecGraphicId),i.remove(e))}function CO(e,t){var i;return _e.each(t,(function(t){null!=e[t]&&"auto"!==e[t]&&(i=!0)})),i}Qv.extendComponentView({type:"graphic",init:function(e,t){this._elMap=_e.createHashMap(),this._lastGraphicModel},render:function(e,t,i){e!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=e,this._updateElements(e),this._relocate(e,i)},_updateElements:function(e){var t=e.useElOptionsToUpdate();if(t){var i=this._elMap,n=this.group;_e.each(t,(function(t){var a=t.$action,r=t.id,o=i.get(r),s=t.parentId,l=null!=s?i.get(s):n,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 h=function(e){return e=_e.extend({},e),_e.each(["id","parentId","$action","hv","bounding"].concat(Gu.LOCATION_PARAMS),(function(t){delete e[t]})),e}(t);a&&"merge"!==a?"replace"===a?(AO(o,i),TO(r,l,h,i)):"remove"===a&&AO(o,i):o?o.attr(h):TO(r,l,h,i);var c=i.get(r);c&&(c.__ecGraphicWidthOption=t.width,c.__ecGraphicHeightOption=t.height,function(e,t,i){var n=e.eventData;e.silent||e.ignore||n||(n=e.eventData={componentType:"graphic",componentIndex:t.componentIndex,name:e.name});n&&(n.info=e.info)}(c,e))}))}},_relocate:function(e,t){for(var i=e.option.elements,n=this.group,a=this._elMap,r=t.getWidth(),o=t.getHeight(),s=0;s<i.length;s++){var l=i[s];if((h=a.get(l.id))&&h.isGroup){var u=(c=h.parent)===n;h.__ecGraphicWidth=SO(h.__ecGraphicWidthOption,u?r:c.__ecGraphicWidth)||0,h.__ecGraphicHeight=SO(h.__ecGraphicHeightOption,u?o:c.__ecGraphicHeight)||0}}for(s=i.length-1;s>=0;s--){var h;l=i[s];if(h=a.get(l.id)){var c,d=(c=h.parent)===n?{width:r,height:o}:{width:c.__ecGraphicWidth,height:c.__ecGraphicHeight};Gu.positionElement(h,l,d,null,{hv:l.hv,boundingMode:l.bounding})}}},_clear:function(){var e=this._elMap;e.each((function(t){AO(t,e)})),this._elMap=_e.createHashMap()},dispose:function(){this._clear()}});var DO={};var LO={register:function(e,t){DO[e]=t},get:function(e){return DO[e]}},PO=Qv.extendComponentModel({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){PO.superApply(this,"optionUpdated",arguments),_e.each(this.option.feature,(function(e,t){var i=LO.get(t);i&&_e.merge(e,i.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}}}),kO=Gu.getLayoutRect,OO=Gu.box,RO=Gu.positionElement;var NO={layout:function(e,t,i){var n=t.getBoxLayoutParams(),a=t.get("padding"),r={width:i.getWidth(),height:i.getHeight()},o=kO(n,r,a);OO(t.get("orient"),e,t.get("itemGap"),o.width,o.height),RO(e,n,r,a)},makeBackground:function(e,t){var i=Du.normalizeCssArray(t.get("padding")),n=t.getItemStyle(["color","opacity"]);return n.fill=t.get("backgroundColor"),e=new iu.Rect({shape:{x:e.x-i[3],y:e.y-i[0],width:e.width+i[1]+i[3],height:e.height+i[0]+i[2],r:t.get("borderRadius")},style:n,silent:!0,z2:-1})}};Qv.extendComponentView({type:"toolbox",render:function(e,t,i,n){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=[];_e.each(o,(function(e,t){l.push(t)})),new Tf(this._featureNames||[],l).add(u).update(u).remove(_e.curry(u,null)).execute(),this._featureNames=l,NO.layout(a,e,i),a.add(NO.makeBackground(a.getBoundingRect(),e)),a.eachChild((function(e){var t=e.__title,n=e.hoverStyle;if(n&&t){var o=Bn.getBoundingRect(t,Bn.makeFont(n)),s=e.position[0]+a.position[0],l=!1;e.position[1]+a.position[1]+r+o.height>i.getHeight()&&(n.textPosition="top",l=!0);var u=l?-5-o.height:r+8;s+o.width/2>i.getWidth()?(n.textPosition=["100%",u],n.textAlign="right"):s-o.width/2<0&&(n.textPosition=[0,u],n.textAlign="left")}}))}function u(u,h){var c,d=l[u],p=l[h],f=o[d],g=new gu(f,e,e.ecModel);if(n&&null!=n.newTitle&&n.featureName===d&&(f.title=n.newTitle),d&&!p){if(function(e){return 0===e.indexOf("my")}(d))c={model:g,onclick:g.option.onclick,featureName:d};else{var m=LO.get(d);if(!m)return;c=new m(g,t,i)}s[d]=c}else{if(!(c=s[p]))return;c.model=g,c.ecModel=t,c.api=i}d||!p?g.get("show")&&!c.unusable?(!function(n,o,s){var l=n.getModel("iconStyle"),u=n.getModel("emphasis.iconStyle"),h=o.getIcons?o.getIcons():n.get("icon"),c=n.get("title")||{};if("string"==typeof h){var d=h,p=c;c={},(h={})[s]=d,c[s]=p}var f=n.iconPaths={};_e.each(h,(function(s,h){var d=iu.createIcon(s,{},{x:-r/2,y:-r/2,width:r,height:r});d.setStyle(l.getItemStyle()),d.hoverStyle=u.getItemStyle(),d.setStyle({text:c[h],textAlign:u.get("textAlign"),textBorderRadius:u.get("textBorderRadius"),textPadding:u.get("textPadding"),textFill:null});var p=e.getModel("tooltip");p&&p.get("show")&&d.attr("tooltip",_e.extend({content:c[h],formatter:p.get("formatter",!0)||function(){return c[h]},formatterParams:{componentType:"toolbox",name:h,title:c[h],$vars:["name","title"]},position:p.get("position",!0)||"bottom"},p.option)),iu.setHoverStyle(d),e.get("showTitle")&&(d.__title=c[h],d.on("mouseover",(function(){var t=u.getItemStyle(),i="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")||i})})).on("mouseout",(function(){d.setStyle({textFill:null,textBackgroundColor:null})}))),d.trigger(n.get("iconStatus."+h)||"normal"),a.add(d),d.on("click",_e.bind(o.onclick,o,t,i,h)),f[h]=d}))}(g,c,d),g.setIconStatus=function(e,t){var i=this.option,n=this.iconPaths;i.iconStatus=i.iconStatus||{},i.iconStatus[e]=t,n[e]&&n[e].trigger(t)},c.render&&c.render(g,t,i,n)):c.remove&&c.remove(t,i):c.dispose&&c.dispose(t,i)}},updateView:function(e,t,i,n){_e.each(this._features,(function(e){e.updateView&&e.updateView(e.model,t,i,n)}))},remove:function(e,t){_e.each(this._features,(function(i){i.remove&&i.remove(e,t)})),this.group.removeAll()},dispose:function(e,t){_e.each(this._features,(function(i){i.dispose&&i.dispose(e,t)}))}});var EO=rp.toolbox.saveAsImage;function zO(e){this.model=e}zO.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:EO.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:EO.lang.slice()},zO.prototype.unusable=!K.canvasSupported,zO.prototype.onclick=function(e,t){var i=this.model,n=i.get("name")||e.get("title.0.text")||"echarts",a="svg"===t.getZr().painter.getType()?"svg":i.get("type",!0)||"png",r=t.getConnectedDataURL({type:a,backgroundColor:i.get("backgroundColor",!0)||e.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if("function"!=typeof MouseEvent||K.browser.ie||K.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,n+"."+a)}else{var h=i.get("lang"),c='<body style="margin:0;"><img src="'+r+'" style="max-width:100%;" title="'+(h&&h[0]||"")+'" /></body>';window.open().document.write(c)}else{var d=document.createElement("a");d.download=n+"."+a,d.target="_blank",d.href=r;var p=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});d.dispatchEvent(p)}},LO.register("saveAsImage",zO);var BO=rp.toolbox.magicType;function VO(e){this.model=e}VO.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:_e.clone(BO.title),option:{},seriesIndex:{}};var GO=VO.prototype;GO.getIcons=function(){var e=this.model,t=e.get("icon"),i={};return _e.each(e.get("type"),(function(e){t[e]&&(i[e]=t[e])})),i};var FO={line:function(e,t,i,n){if("bar"===e)return _e.merge({id:t,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.line")||{},!0)},bar:function(e,t,i,n){if("line"===e)return _e.merge({id:t,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.bar")||{},!0)},stack:function(e,t,i,n){var a="__ec_magicType_stack__"===i.get("stack");if("line"===e||"bar"===e)return n.setIconStatus("stack",a?"normal":"emphasis"),_e.merge({id:t,stack:a?"":"__ec_magicType_stack__"},n.get("option.stack")||{},!0)}},HO=[["line","bar"],["stack"]];GO.onclick=function(e,t,i){var n=this.model,a=n.get("seriesIndex."+i);if(FO[i]){var r,o={series:[]};if(_e.each(HO,(function(e){_e.indexOf(e,i)>=0&&_e.each(e,(function(e){n.setIconStatus(e,"normal")}))})),n.setIconStatus(i,"emphasis"),e.eachComponent({mainType:"series",query:null==a?null:{seriesIndex:a}},(function(t){var a=t.subType,r=t.id,s=FO[i](a,r,t,n);s&&(_e.defaults(s,t.option),o.series.push(s));var l=t.coordinateSystem;if(l&&"cartesian2d"===l.type&&("line"===i||"bar"===i)){var u=l.getAxesByScale("ordinal")[0];if(u){var h=u.dim+"Axis",c=e.queryComponents({mainType:h,index:t.get(name+"Index"),id:t.get(name+"Id")})[0].componentIndex;o[h]=o[h]||[];for(var d=0;d<=c;d++)o[h][c]=o[h][c]||{};o[h][c].boundaryGap="bar"===i}}})),"stack"===i)r=o.series&&o.series[0]&&"__ec_magicType_stack__"===o.series[0].stack?_e.merge({stack:BO.title.tiled},BO.title):_e.clone(BO.title);t.dispatchAction({type:"changeMagicType",currentType:i,newOption:o,newTitle:r,featureName:"magicType"})}},Qv.registerAction({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(e,t){t.mergeOption(e.newOption)})),LO.register("magicType",VO);var WO=rp.toolbox.dataView,UO=new Array(60).join("-");function ZO(e){return _e.map(e,(function(e){var t=e.getRawData(),i=[e.name],n=[];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++)n[o]=arguments[o];i.push((r?r+"\t":"")+n.join("\t"))})),i.join("\n")})).join("\n\n"+UO+"\n\n")}function jO(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var YO=new RegExp("[\t]+","g");function XO(e,t){var i=e.split(new RegExp("\n*"+UO+"\n*","g")),n={series:[]};return _e.each(i,(function(e,i){if(function(e){if(e.slice(0,e.indexOf("\n")).indexOf("\t")>=0)return!0}(e)){var a=function(e){for(var t=e.split(/\n+/g),i=jO(t.shift()).split(YO),n=[],a=_e.map(i,(function(e){return{name:e,data:[]}})),r=0;r<t.length;r++){var o=jO(t[r]).split(YO);n.push(o.shift());for(var s=0;s<o.length;s++)a[s]&&(a[s].data[r]=o[s])}return{series:a,categories:n}}(e),r=t[i],o=r.axisDim+"Axis";r&&(n[o]=n[o]||[],n[o][r.axisIndex]={data:a.categories},n.series=n.series.concat(a.series))}else{a=function(e){for(var t=e.split(/\n+/g),i=jO(t.shift()),n=[],a=0;a<t.length;a++){var r,o=jO(t[a]).split(YO),s="",l=!1;isNaN(o[0])?(l=!0,s=o[0],o=o.slice(1),n[a]={name:s,value:[]},r=n[a].value):r=n[a]=[];for(var u=0;u<o.length;u++)r.push(+o[u]);1===r.length&&(l?n[a].value=r[0]:n[a]=r[0])}return{name:i,data:n}}(e);n.series.push(a)}})),n}function qO(e){this._dom=null,this.model=e}function KO(e,t){return _e.map(e,(function(e,i){var n=t&&t[i];return _e.isObject(n)&&!_e.isArray(n)?(_e.isObject(e)&&!_e.isArray(e)&&(e=e.value),_e.defaults({value:e},n)):e}))}qO.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:_e.clone(WO.title),lang:_e.clone(WO.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},qO.prototype.onclick=function(e,t){var i=t.getDom(),n=this.model;this._dom&&i.removeChild(this._dom);var a=document.createElement("div");a.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",a.style.backgroundColor=n.get("backgroundColor")||"#fff";var r=document.createElement("h4"),o=n.get("lang")||[];r.innerHTML=o[0]||n.get("title"),r.style.cssText="margin: 10px 20px;",r.style.color=n.get("textColor");var s=document.createElement("div"),l=document.createElement("textarea");s.style.cssText="display:block;width:100%;overflow:auto;";var u=n.get("optionToContent"),h=n.get("contentToOption"),c=function(e){var t,i,n=function(e){var t={},i=[],n=[];return e.eachRawSeries((function(e){var a=e.coordinateSystem;if(!a||"cartesian2d"!==a.type&&"polar"!==a.type)i.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:[]},n.push({axisDim:r.dim,axisIndex:r.index})),t[o].series.push(e)}else i.push(e)}})),{seriesGroupByCategoryAxis:t,other:i,meta:n}}(e);return{value:_e.filter([(t=n.seriesGroupByCategoryAxis,i=[],_e.each(t,(function(e,t){var n=e.categoryAxis,a=e.valueAxis.dim,r=[" "].concat(_e.map(e.series,(function(e){return e.name}))),o=[n.model.getCategories()];_e.each(e.series,(function(e){o.push(e.getRawData().mapArray(a,(function(e){return e})))}));for(var s=[r.join("\t")],l=0;l<o[0].length;l++){for(var u=[],h=0;h<o.length;h++)u.push(o[h][l]);s.push(u.join("\t"))}i.push(s.join("\n"))})),i.join("\n\n"+UO+"\n\n")),ZO(n.other)],(function(e){return e.replace(/[\n\t\s]/g,"")})).join("\n\n"+UO+"\n\n"),meta:n.meta}}(e);if("function"==typeof u){var d=u(t.getOption());"string"==typeof d?s.innerHTML=d:_e.isDom(d)&&s.appendChild(d)}else s.appendChild(l),l.readOnly=n.get("readOnly"),l.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",l.style.color=n.get("textColor"),l.style.borderColor=n.get("textareaBorderColor"),l.style.backgroundColor=n.get("textareaColor"),l.value=c.value;var p=c.meta,f=document.createElement("div");f.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:"+n.get("buttonColor"),g+=";color:"+n.get("buttonTextColor");var y=this;function x(){i.removeChild(a),y._dom=null}Ke.addEventListener(m,"click",x),Ke.addEventListener(v,"click",(function(){var e;try{e="function"==typeof h?h(s,t.getOption()):XO(l.value,p)}catch(e){throw x(),new Error("Data view format error "+e)}e&&t.dispatchAction({type:"changeDataView",newOption:e}),x()})),m.innerHTML=o[1],v.innerHTML=o[2],v.style.cssText=g,m.style.cssText=g,!n.get("readOnly")&&f.appendChild(v),f.appendChild(m),a.appendChild(r),a.appendChild(s),a.appendChild(f),s.style.height=i.clientHeight-80+"px",i.appendChild(a),this._dom=a},qO.prototype.remove=function(e,t){this._dom&&t.getDom().removeChild(this._dom)},qO.prototype.dispose=function(e,t){this.remove(e,t)},LO.register("dataView",qO),Qv.registerAction({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},(function(e,t){var i=[];_e.each(e.newOption.series,(function(e){var n=t.getSeriesByName(e.name)[0];if(n){var a=n.get("data");i.push({name:e.name,data:KO(e.data,a)})}else i.push(_e.extend({type:"scatter"},e))})),t.mergeOption(_e.defaults({series:i},e.newOption))}));var $O=_e.each,JO=_e.indexOf,QO=_e.curry,eR=["dataToPoint","pointToData"],tR=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"];function iR(e,t,i){var n=this._targetInfoList=[],a={},r=rR(t,e);$O(oR,(function(e,t){(!i||!i.include||JO(i.include,t)>=0)&&e(r,n,a)}))}var nR=iR.prototype;function aR(e){return e[0]>e[1]&&e.reverse(),e}function rR(e,t){return vr.parseFinder(e,t,{includeMainTypes:tR})}nR.setOutputRanges=function(e,t){this.matchOutputRanges(e,t,(function(e,t,i){if((e.coordRanges||(e.coordRanges=[])).push(t),!e.coordRange){e.coordRange=t;var n=uR[e.brushType](0,i,t);e.__rangeOffset={offset:cR[e.brushType](n.values,e.range,[1,1]),xyMinMax:n.xyMinMax}}}))},nR.matchOutputRanges=function(e,t,i){$O(e,(function(e){var n=this.findTargetInfo(e,t);n&&!0!==n&&_e.each(n.coordSyses,(function(n){var a=uR[e.brushType](1,n,e.range);i(e,a.values,n,t)}))}),this)},nR.setInputRanges=function(e,t){$O(e,(function(e){var i,n,a,r,o,s=this.findTargetInfo(e,t);if(e.range=e.range||[],s&&!0!==s){e.panelId=s.panelId;var l=uR[e.brushType](0,s.coordSys,e.coordRange),u=e.__rangeOffset;e.range=u?cR[e.brushType](l.values,u.offset,(i=l.xyMinMax,n=u.xyMinMax,a=pR(i),r=pR(n),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)},nR.makePanelOpts=function(e,t){return _e.map(this._targetInfoList,(function(i){var n=i.getPanelRect();return{panelId:i.panelId,defaultBrushType:t&&t(i),clipPath:rC.makeRectPanelClipPath(n),isTargetByCursor:rC.makeRectIsTargetByCursor(n,e,i.coordSysModel),getLinearBrushOtherExtent:rC.makeLinearBrushOtherExtent(n)}}))},nR.controlSeries=function(e,t,i){var n=this.findTargetInfo(e,i);return!0===n||n&&JO(n.coordSyses,t.coordinateSystem)>=0},nR.findTargetInfo=function(e,t){for(var i=this._targetInfoList,n=rR(t,e),a=0;a<i.length;a++){var r=i[a],o=e.panelId;if(o){if(r.panelId===o)return r}else for(a=0;a<sR.length;a++)if(sR[a](n,r))return r}return!0};var oR={grid:function(e,t){var i=e.xAxisModels,n=e.yAxisModels,a=e.gridModels,r=_e.createHashMap(),o={},s={};(i||n||a)&&($O(i,(function(e){var t=e.axis.grid.model;r.set(t.id,t),o[t.id]=!0})),$O(n,(function(e){var t=e.axis.grid.model;r.set(t.id,t),s[t.id]=!0})),$O(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=[];$O(a.getCartesians(),(function(e,t){(JO(i,e.getAxis("x").model)>=0||JO(n,e.getAxis("y").model)>=0)&&r.push(e)})),t.push({panelId:"grid--"+e.id,gridModel:e,coordSysModel:e,coordSys:r[0],coordSyses:r,getPanelRect:lR.grid,xAxisDeclared:o[e.id],yAxisDeclared:s[e.id]})})))},geo:function(e,t){$O(e.geoModels,(function(e){var i=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:i,coordSyses:[i],getPanelRect:lR.geo})}))}},sR=[function(e,t){var i=e.xAxisModel,n=e.yAxisModel,a=e.gridModel;return!a&&i&&(a=i.axis.grid.model),!a&&n&&(a=n.axis.grid.model),a&&a===t.gridModel},function(e,t){var i=e.geoModel;return i&&i===t.geoModel}],lR={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform(iu.getTransform(e)),t}},uR={lineX:QO(hR,0),lineY:QO(hR,1),rect:function(e,t,i){var n=t[eR[e]]([i[0][0],i[1][0]]),a=t[eR[e]]([i[0][1],i[1][1]]),r=[aR([n[0],a[0]]),aR([n[1],a[1]])];return{values:r,xyMinMax:r}},polygon:function(e,t,i){var n=[[1/0,-1/0],[1/0,-1/0]];return{values:_e.map(i,(function(i){var a=t[eR[e]](i);return n[0][0]=Math.min(n[0][0],a[0]),n[1][0]=Math.min(n[1][0],a[1]),n[0][1]=Math.max(n[0][1],a[0]),n[1][1]=Math.max(n[1][1],a[1]),a})),xyMinMax:n}}};function hR(e,t,i,n){var a=i.getAxis(["x","y"][e]),r=aR(_e.map([0,1],(function(e){return t?a.coordToData(a.toLocalCoord(n[e])):a.toGlobalCoord(a.dataToCoord(n[e]))}))),o=[];return o[e]=r,o[1-e]=[NaN,NaN],{values:r,xyMinMax:o}}var cR={lineX:QO(dR,0),lineY:QO(dR,1),rect:function(e,t,i){return[[e[0][0]-i[0]*t[0][0],e[0][1]-i[0]*t[0][1]],[e[1][0]-i[1]*t[1][0],e[1][1]-i[1]*t[1][1]]]},polygon:function(e,t,i){return _e.map(e,(function(e,n){return[e[0]-i[0]*t[n][0],e[1]-i[1]*t[n][1]]}))}};function dR(e,t,i,n){return[t[0]-n[e]*i[0],t[1]-n[e]*i[1]]}function pR(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var fR=iR,gR=_e.each,mR="\0_ec_hist_store";function vR(e){var t=e[mR];return t||(t=e[mR]=[{}]),t}var yR={push:function(e,t){var i=vR(e);gR(t,(function(t,n){for(var a=i.length-1;a>=0;a--){if(i[a][n])break}if(a<0){var r=e.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(r){var o=r.getPercentRange();i[0][n]={dataZoomId:n,start:o[0],end:o[1]}}}})),i.push(t)},pop:function(e){var t=vR(e),i=t[t.length-1];t.length>1&&t.pop();var n={};return gR(i,(function(e,i){for(var a=t.length-1;a>=0;a--){if(e=t[a][i]){n[i]=e;break}}})),n},clear:function(e){e[mR]=null},count:function(e){return vR(e).length}};ju.registerSubTypeDefaulter("dataZoom",(function(){return"slider"}));var xR=["cartesian2d","polar","singleAxis"];function _R(e,t){e=e.slice();var i=_e.map(e,Du.capitalFirst);t=(t||[]).slice();var n=_e.map(t,Du.capitalFirst);return function(a,r){_e.each(e,(function(e,o){for(var s={name:e,capital:i[o]},l=0;l<t.length;l++)s[t[l]]=e+n[l];a.call(r,s)}))}}var bR=_R(["x","y","z","radius","angle","single"],["axisIndex","axis","index","id"]);var wR={isCoordSupported:function(e){return _e.indexOf(xR,e)>=0},createNameEach:_R,eachAxisDim:bR,createLinkedNodesFinder:function(e,t,i){return function(a){var r,o={nodes:[],records:{}};if(t((function(e){o.records[e.name]={}})),!a)return o;n(a,o);do{r=!1,e(s)}while(r);function s(e){!function(e,t){return _e.indexOf(t.nodes,e)>=0}(e,o)&&function(e,n){var a=!1;return t((function(t){_e.each(i(e,t)||[],(function(e){n.records[t.name][e]&&(a=!0)}))})),a}(e,o)&&(n(e,o),r=!0)}return o};function n(e,n){n.nodes.push(e),t((function(t){_e.each(i(e,t)||[],(function(e){n.records[t.name][e]=!0}))}))}}},SR=_e.each,MR=bu.asc,IR=function(e,t,i,n){this._dimName=e,this._axisIndex=t,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=n,this._dataZoomModel=i};function TR(e,t){var i=e.getAxisModel(),n=e._percentWindow,a=e._valueWindow;if(n){var r=bu.getPixelPrecision(a,[0,500]);r=Math.min(r,20);var o=t||0===n[0]&&100===n[1];i.setRange(o?null:+a[0].toFixed(r),o?null:+a[1].toFixed(r))}}IR.prototype={constructor:IR,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(i){if(wR.isCoordSupported(i.get("coordinateSystem"))){var n=this._dimName,a=t.queryComponents({mainType:n+"Axis",index:i.get(n+"AxisIndex"),id:i.get(n+"AxisId")})[0];this._axisIndex===(a&&a.componentIndex)&&e.push(i)}}),this),e},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var e,t,i,n=this._dimName,a=this.ecModel,r=this.getAxisModel();return"x"===n||"y"===n?(t="gridIndex",e="x"===n?"y":"x"):(t="polarIndex",e="angle"===n?"radius":"angle"),a.eachComponent(e+"Axis",(function(e){(e.get(t)||0)===(r.get(t)||0)&&(i=e)})),i},getMinMaxSpan:function(){return _e.clone(this._minMaxSpan)},calculateDataWindow:function(e){var t,i=this._dataExtent,n=this.getAxisModel().axis.scale,a=this._dataZoomModel.getRangePropMode(),r=[0,100],o=[],s=[];SR(["start","end"],(function(l,u){var h=e[l],c=e[l+"Value"];"percent"===a[u]?(null==h&&(h=r[u]),c=n.parse(bu.linearMap(h,r,i))):(t=!0,c=null==c?i[u]:n.parse(c),h=bu.linearMap(c,i,r)),s[u]=c,o[u]=h})),MR(s),MR(o);var l=this._minMaxSpan;function u(e,t,i,a,r){var o=r?"Span":"ValueSpan";iA(0,e,i,"all",l["min"+o],l["max"+o]);for(var s=0;s<2;s++)t[s]=bu.linearMap(e[s],i,a,!0),r&&(t[s]=n.parse(t[s]))}return t?u(s,o,i,r,!1):u(o,s,r,i,!0),{valueWindow:s,percentWindow:o}},reset:function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=function(e,t,i){var n=[1/0,-1/0];SR(i,(function(e){var i=e.getData();i&&SR(i.mapDimension(t,!0),(function(e){var t=i.getApproximateExtent(e);t[0]<n[0]&&(n[0]=t[0]),t[1]>n[1]&&(n[1]=t[1])}))})),n[1]<n[0]&&(n=[NaN,NaN]);return function(e,t){var i=e.getAxisModel(),n=i.getMin(!0),a="category"===i.get("type"),r=a&&i.getCategories().length;null!=n&&"dataMin"!==n&&"function"!=typeof n?t[0]=n:a&&(t[0]=r>0?0:NaN);var o=i.getMax(!0);null!=o&&"dataMax"!==o&&"function"!=typeof o?t[1]=o:a&&(t[1]=r>0?r-1:NaN);i.get("scale",!0)||(t[0]>0&&(t[0]=0),t[1]<0&&(t[1]=0))}(e,n),n}(this,this._dimName,t),function(e){var t=e._minMaxSpan={},i=e._dataZoomModel,n=e._dataExtent;SR(["min","max"],(function(a){var r=i.get(a+"Span"),o=i.get(a+"ValueSpan");null!=o&&(o=e.getAxisModel().axis.scale.parse(o)),null!=o?r=bu.linearMap(n[0]+o,n,[0,100],!0):null!=r&&(o=bu.linearMap(r,[0,100],n,!0)-n[0]),t[a+"Span"]=r,t[a+"ValueSpan"]=o}))}(this);var i=this.calculateDataWindow(e.settledOption);this._valueWindow=i.valueWindow,this._percentWindow=i.percentWindow,TR(this)}},restore:function(e){e===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,TR(this,!0))},filterData:function(e,t){if(e===this._dataZoomModel){var i=this._dimName,n=this.getTargetSeriesModels(),a=e.get("filterMode"),r=this._valueWindow;"none"!==a&&SR(n,(function(e){var t=e.getData(),n=t.mapDimension(i,!0);n.length&&("weakFilter"===a?t.filterSelf((function(e){for(var i,a,o,s=0;s<n.length;s++){var l=t.get(n[s],e),u=!isNaN(l),h=l<r[0],c=l>r[1];if(u&&!h&&!c)return!0;u&&(o=!0),h&&(i=!0),c&&(a=!0)}return o&&i&&a})):SR(n,(function(i){if("empty"===a)e.setData(t=t.map(i,(function(e){return function(e){return e>=r[0]&&e<=r[1]}(e)?e:NaN})));else{var n={};n[i]=r,t.selectRange(n)}})),SR(n,(function(e){t.setApproximateExtent(r,e)})))}))}}};var AR=IR,CR=_e.each,DR=wR.eachAxisDim;function LR(e){var t={};return CR(["start","end","startValue","endValue","throttle"],(function(i){e.hasOwnProperty(i)&&(t[i]=e[i])})),t}function PR(e,t){var i=e._rangePropMode,n=e.get("rangeMode");CR([["start","startValue"],["end","endValue"]],(function(e,a){var r=null!=t[e[0]],o=null!=t[e[1]];r&&!o?i[a]="percent":!r&&o?i[a]="value":n?i[a]=n[a]:r&&(i[a]="percent")}))}var kR=Qv.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,i){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var n=LR(e);this.settledOption=n,this.mergeDefaultAndTheme(e,i),this.doInit(n)},mergeOption:function(e){var t=LR(e);_e.merge(this.option,e,!0),_e.merge(this.settledOption,t,!0),this.doInit(t)},doInit:function(e){var t=this.option;K.canvasSupported||(t.realtime=!1),this._setDefaultThrottle(e),PR(this,e);var i=this.settledOption;CR([["start","startValue"],["end","endValue"]],(function(e,n){"value"===this._rangePropMode[n]&&(t[e[0]]=i[e[0]]=null)}),this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var e=this._axisProxies;this.eachTargetAxis((function(t,i,n,a){var r=this.dependentModels[t.axis][i],o=r.__dzAxisProxy||(r.__dzAxisProxy=new AR(t.name,i,this,a));e[t.name+"_"+i]=o}),this)},_resetTarget:function(){var e=this.option,t=this._judgeAutoMode();DR((function(t){var i=t.axisIndex;e[i]=vr.normalizeToArray(e[i])}),this),"axisIndex"===t?this._autoSetAxisIndex():"orient"===t&&this._autoSetOrient()},_judgeAutoMode:function(){var e=this.option,t=!1;DR((function(i){null!=e[i.axisIndex]&&(t=!0)}),this);var i=e.orient;return null==i&&t?"orient":t?void 0:(null==i&&(e.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var e=!0,t=this.get("orient",!0),i=this.option,n=this.dependentModels;if(e){var a="vertical"===t?"y":"x";n[a+"Axis"].length?(i[a+"AxisIndex"]=[0],e=!1):CR(n.singleAxis,(function(n){e&&n.get("orient",!0)===t&&(i.singleAxisIndex=[n.componentIndex],e=!1)}))}e&&DR((function(t){if(e){var n=[],a=this.dependentModels[t.axis];if(a.length&&!n.length)for(var r=0,o=a.length;r<o;r++)"category"===a[r].get("type")&&n.push(r);i[t.axisIndex]=n,n.length&&(e=!1)}}),this),e&&this.ecModel.eachSeries((function(e){this._isSeriesHasAllAxesTypeOf(e,"value")&&DR((function(t){var n=i[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,_e.indexOf(n,a)<0&&n.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 i=!0;return DR((function(n){var a=e.get(n.axisIndex),r=this.dependentModels[n.axis][a];r&&r.get("type")===t||(i=!1)}),this),i},_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 DR((function(t){if(null==e){var i=this.get(t.axisIndex);i.length&&(e=this.dependentModels[t.axis][i[0]])}}),this),e},eachTargetAxis:function(e,t){var i=this.ecModel;DR((function(n){CR(this.get(n.axisIndex),(function(a){e.call(t,n,a,this,i)}),this)}),this)},getAxisProxy:function(e,t){return this._axisProxies[e+"_"+t]},getAxisModel:function(e,t){var i=this.getAxisProxy(e,t);return i&&i.getAxisModel()},setRawRange:function(e){var t=this.option,i=this.settledOption;CR([["start","startValue"],["end","endValue"]],(function(n){null==e[n[0]]&&null==e[n[1]]||(t[n[0]]=i[n[0]]=e[n[0]],t[n[1]]=i[n[1]]=e[n[1]])}),this),PR(this,e)},setCalculatedRange:function(e){var t=this.option;CR(["start","startValue","end","endValue"],(function(i){t[i]=e[i]}))},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 i=this.findRepresentativeAxisProxy();return i?i.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(e){if(e)return e.__dzAxisProxy;var t=this._axisProxies;for(var i in t)if(t.hasOwnProperty(i)&&t[i].hostedBy(this))return t[i];for(var i in t)if(t.hasOwnProperty(i)&&!t[i].hostedBy(this))return t[i]},getRangePropMode:function(){return this._rangePropMode.slice()}}),OR=Bd.extend({type:"dataZoom",render:function(e,t,i,n){this.dataZoomModel=e,this.ecModel=t,this.api=i},getTargetCoordInfo:function(){var e=this.dataZoomModel,t=this.ecModel,i={};return e.eachTargetAxis((function(e,n){var a=t.getComponent(e.axis,n);if(a){var r=a.getCoordSysModel();r&&function(e,t,i,n){for(var a,r=0;r<i.length;r++)if(i[r].model===e){a=i[r];break}a||i.push(a={model:e,axisModels:[],coordIndex:n});a.axisModels.push(t)}(r,a,i[r.mainType]||(i[r.mainType]=[]),r.componentIndex)}}),this),i}}),RR=(kR.extend({type:"dataZoom.select"}),OR.extend({type:"dataZoom.select"}),_e.createHashMap),NR=_e.each;Qv.registerProcessor({getTargetSeries:function(e){var t=RR();return e.eachComponent("dataZoom",(function(e){e.eachTargetAxis((function(e,i,n){var a=n.getAxisProxy(e.name,i);NR(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,i,n){n.getAxisProxy(e.name,i).reset(n,t)})),e.eachTargetAxis((function(e,i,n){n.getAxisProxy(e.name,i).filterData(n,t)}))})),e.eachComponent("dataZoom",(function(e){var t=e.findRepresentativeAxisProxy(),i=t.getDataPercentWindow(),n=t.getDataValueWindow();e.setCalculatedRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]})}))}}),Qv.registerAction("dataZoom",(function(e,t){var i=wR.createLinkedNodesFinder(_e.bind(t.eachComponent,t,"dataZoom"),wR.eachAxisDim,(function(e,t){return e.get(t.axisIndex)})),n=[];t.eachComponent({mainType:"dataZoom",query:e},(function(e,t){n.push.apply(n,i(e).nodes)})),_e.each(n,(function(t,i){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})}))}));var ER=rp.toolbox.dataZoom,zR=_e.each;function BR(e,t,i){(this._brushController=new iC(i.getZr())).on("brush",_e.bind(this._onBrush,this)).mount(),this._isZoomActive}BR.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:_e.clone(ER.title)};var VR=BR.prototype;VR.render=function(e,t,i,n){this.model=e,this.ecModel=t,this.api=i,function(e,t,i,n,a){var r=i._isZoomActive;n&&"takeGlobalCursor"===n.type&&(r="dataZoomSelect"===n.key&&n.dataZoomSelectActive);i._isZoomActive=r,e.setIconStatus("zoom",r?"emphasis":"normal");var o=new fR(FR(e.option),t,{include:["grid"]});i._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,n,i),function(e,t){e.setIconStatus("back",yR.count(t)>1?"emphasis":"normal")}(e,t)},VR.onclick=function(e,t,i){GR[i].call(this)},VR.remove=function(e,t){this._brushController.unmount()},VR.dispose=function(e,t){this._brushController.dispose()};var GR={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:e})},back:function(){this._dispatchZoomAction(yR.pop(this.ecModel))}};function FR(e){var t={};return _e.each(["xAxisIndex","yAxisIndex"],(function(i){t[i]=e[i],null==t[i]&&(t[i]="all"),(!1===t[i]||"none"===t[i])&&(t[i]=[])})),t}VR._onBrush=function(e,t){if(t.isEnd&&e.length){var i={},n=this.ecModel;this._brushController.updateCovers([]),new fR(FR(this.model.option),n,{include:["grid"]}).matchOutputRanges(e,n,(function(e,t,i){if("cartesian2d"===i.type){var n=e.brushType;"rect"===n?(a("x",i,t[0]),a("y",i,t[1])):a({lineX:"x",lineY:"y"}[n],i,t)}})),yR.push(n,i),this._dispatchZoomAction(i)}function a(e,t,a){var r=t.getAxis(e),o=r.model,s=function(e,t,i){var n;return i.eachComponent({mainType:"dataZoom",subType:"select"},(function(i){i.getAxisModel(e,t.componentIndex)&&(n=i)})),n}(e,o,n),l=s.findRepresentativeAxisProxy(o).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(a=iA(0,a.slice(),r.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(i[s.id]={dataZoomId:s.id,startValue:a[0],endValue:a[1]})}},VR._dispatchZoomAction=function(e){var t=[];zR(e,(function(e,i){t.push(_e.clone(e))})),t.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:t})},LO.register("dataZoom",BR),Qv.registerPreprocessor((function(e){if(e){var t=e.dataZoom||(e.dataZoom=[]);_e.isArray(t)||(e.dataZoom=t=[t]);var i=e.toolbox;if(i&&(_e.isArray(i)&&(i=i[0]),i&&i.feature)){var n=i.feature.dataZoom;a("xAxis",n),a("yAxis",n)}}function a(i,n){if(n){var a=i+"Index",r=n[a];null==r||"all"===r||_e.isArray(r)||(r=!1===r||"none"===r?[]:[r]),function(t,i){var n=e[t];_e.isArray(n)||(n=n?[n]:[]);zR(n,i)}(i,(function(e,o){if(null==r||"all"===r||-1!==_e.indexOf(r,o)){var s={type:"select",$fromToolbox:!0,filterMode:n.filterMode||"filter",id:"\0_ec_\0toolbox-dataZoom_"+i+o};s[a]=o,t.push(s)}}))}}}));var HR=rp.toolbox.restore;function WR(e){this.model=e}WR.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:HR.title},WR.prototype.onclick=function(e,t,i){yR.clear(e),t.dispatchAction({type:"restore",from:this.uid})},LO.register("restore",WR),Qv.registerAction({type:"restore",event:"restore",update:"prepareAndUpdate"},(function(e,t){t.resetOption("recreate")}));Qv.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 UR=_e.each,ZR=Du.toCamelCase,jR=["","-webkit-","-moz-","-o-"];function YR(e){var t,i,n=[],a=e.get("transitionDuration"),r=e.get("backgroundColor"),o=e.getModel("textStyle"),s=e.get("padding");return a&&n.push((i="left "+(t=a)+"s cubic-bezier(0.23, 1, 0.32, 1),top "+t+"s cubic-bezier(0.23, 1, 0.32, 1)",_e.map(jR,(function(e){return e+"transition:"+i})).join(";"))),r&&(K.canvasSupported?n.push("background-Color:"+r):(n.push("background-Color:#"+Xt.toHex(r)),n.push("filter:alpha(opacity=70)"))),UR(["width","color","radius"],(function(t){var i="border-"+t,a=ZR(i),r=e.get(a);null!=r&&n.push(i+":"+r+("color"===t?"":"px"))})),n.push(function(e){var t=[],i=e.get("fontSize"),n=e.getTextColor();return n&&t.push("color:"+n),t.push("font:"+e.getFont()),i&&t.push("line-height:"+Math.round(3*i/2)+"px"),UR(["decoration","align"],(function(i){var n=e.get(i);n&&t.push("text-"+i+":"+n)})),t.join(";")}(o)),null!=s&&n.push("padding:"+Du.normalizeCssArray(s).join("px ")+"px"),n.join(";")+";"}function XR(e,t,i,n,a){var r=t&&t.painter;if(i){var o=r&&r.getViewportRoot();o&&Ge.transformLocalCoord(e,o,document.body,n,a)}else{e[0]=n,e[1]=a;var s=r&&r.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}}function qR(e,t,i){if(K.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var a=this._zr=t.getZr(),r=this._appendToBody=i&&i.appendToBody;this._styleCoord=[0,0],XR(this._styleCoord,a,r,t.getWidth()/2,t.getHeight()/2),r?document.body.appendChild(n):e.appendChild(n),this._container=e,this._show=!1,this._hideTimeout;var o=this;n.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},n.onmousemove=function(e){if(e=e||window.event,!o._enterable){var t=a.handler,i=a.painter.getViewportRoot();Ke.normalizeEvent(i,e,!0),t.dispatch("mousemove",e)}},n.onmouseleave=function(){o._enterable&&o._show&&o.hideLater(o._hideDelay),o._inContent=!1}}qR.prototype={constructor:qR,_enterable:!0,update:function(){var e=this._container,t=e.currentStyle||document.defaultView.getComputedStyle(e),i=e.style;"absolute"!==i.position&&"absolute"!==t.position&&(i.position="relative")},show:function(e){clearTimeout(this._hideTimeout);var t=this.el,i=this._styleCoord;t.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+YR(e)+";left:"+i[0]+"px;top:"+i[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 i=this._styleCoord;XR(i,this._zr,this._appendToBody,e,t);var n=this.el.style;n.left=i[0]+"px",n.top=i[1]+"px"},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(e){!this._show||this._inContent&&this._enterable||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(_e.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 i=document.defaultView.getComputedStyle(this.el);i&&(e+=parseInt(i.borderLeftWidth,10)+parseInt(i.borderRightWidth,10),t+=parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10))}return{width:e,height:t}}};var KR=qR;function $R(e){this._zr=e.getZr(),this._show=!1,this._hideTimeout}$R.prototype={constructor:$R,_enterable:!0,update:function(){},show:function(e){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(e,t,i){this.el&&this._zr.remove(this.el);for(var n={},a=e,r=a.indexOf("{marker");r>=0;){var o=a.indexOf("|}"),s=a.substr(r+"{marker".length,o-r-"{marker".length);s.indexOf("sub")>-1?n["marker"+s]={textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:t[s],textOffset:[3,0]}:n["marker"+s]={textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:t[s]},r=(a=a.substr(o+1)).indexOf("{marker")}this.el=new os({style:{rich:n,text:e,textLineHeight:20,textBackgroundColor:i.get("backgroundColor"),textBorderRadius:i.get("borderRadius"),textFill:i.get("textStyle.color"),textPadding:i.get("padding")},z:i.get("z")}),this._zr.add(this.el);var l=this;this.el.on("mouseover",(function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0})),this.el.on("mouseout",(function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._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(_e.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 JR=$R,QR=vr.getTooltipRenderMode,eN=_e.bind,tN=_e.each,iN=bu.parsePercent,nN=new iu.Rect({shape:{x:-1,y:-1,width:2,height:2}});Qv.extendComponentView({type:"tooltip",init:function(e,t){if(!K.node){var i,n=e.getComponent("tooltip"),a=n.get("renderMode");this._renderMode=QR(a),"html"===this._renderMode?(i=new KR(t.getDom(),t,{appendToBody:n.get("appendToBody",!0)}),this._newLine="<br/>"):(i=new JR(t),this._newLine="\n"),this._tooltipContent=i}},render:function(e,t,i){if(!K.node){this.group.removeAll(),this._tooltipModel=e,this._ecModel=t,this._api=i,this._lastDataByCoordSys=null,this._alwaysShowContent=e.get("alwaysShowContent");var n=this._tooltipContent;n.update(),n.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var e=this._tooltipModel.get("triggerOn");pP.register("itemTooltip",this._api,eN((function(t,i,n){"none"!==e&&(e.indexOf(t)>=0?this._tryShow(i,n):"leave"===t&&this._hide(n))}),this))},_keepShow:function(){var e=this._tooltipModel,t=this._ecModel,i=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==e.get("triggerOn")){var n=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!i.isDisposed()&&n.manuallyShowTip(e,t,i,{x:n._lastX,y:n._lastY})}))}},manuallyShowTip:function(e,t,i,n){if(n.from!==this.uid&&!K.node){var a=rN(n,i);this._ticket="";var r=n.dataByCoordSys;if(n.tooltip&&null!=n.x&&null!=n.y){var o=nN;o.position=[n.x,n.y],o.update(),o.tooltip=n.tooltip,this._tryShow({offsetX:n.x,offsetY:n.y,target:o},a)}else if(r)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,dataByCoordSys:n.dataByCoordSys,tooltipOption:n.tooltipOption},a);else if(null!=n.seriesIndex){if(this._manuallyAxisShowTip(e,t,i,n))return;var s=JL(n,t),l=s.point[0],u=s.point[1];null!=l&&null!=u&&this._tryShow({offsetX:l,offsetY:u,position:n.position,target:s.el},a)}else null!=n.x&&null!=n.y&&(i.dispatchAction({type:"updateAxisPointer",x:n.x,y:n.y}),this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,target:i.getZr().findHover(n.x,n.y).target},a))}},manuallyHideTip:function(e,t,i,n){var a=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&a.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,n.from!==this.uid&&this._hide(rN(n,i))},_manuallyAxisShowTip:function(e,t,i,n){var a=n.seriesIndex,r=n.dataIndex,o=t.getComponent("axisPointer").coordSysAxesInfo;if(null!=a&&null!=r&&null!=o){var s=t.getSeriesByIndex(a);if(s)if("axis"===(e=aN([s.getData().getItemModel(r),s,(s.coordinateSystem||{}).model,e])).get("trigger"))return i.dispatchAction({type:"updateAxisPointer",seriesIndex:a,dataIndex:r,position:n.position}),!0}},_tryShow:function(e,t){var i=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var n=e.dataByCoordSys;n&&n.length?this._showAxisTooltip(n,e):i&&null!=i.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(e,i,t)):i&&i.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(e,i,t)):(this._lastDataByCoordSys=null,this._hide(t))}},_showOrMove:function(e,t){var i=e.get("showDelay");t=_e.bind(t,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(t,i):t()},_showAxisTooltip:function(e,t){var i=this._ecModel,n=this._tooltipModel,a=[t.offsetX,t.offsetY],r=[],o=[],s=aN([t.tooltipOption,n]),l=this._renderMode,u=this._newLine,h={};tN(e,(function(e){tN(e.dataByAxis,(function(e){var t=i.getComponent(e.axisDim+"Axis",e.axisIndex),n=e.value,a=[];if(t&&null!=n){var s=AP.getValueLabel(n,t.axis,i,e.seriesDataIndices,e.valueLabelOpt);_e.each(e.seriesDataIndices,(function(r){var u=i.getSeriesByIndex(r.seriesIndex),c=r.dataIndexInside,d=u&&u.getDataParams(c);if(d.axisDim=e.axisDim,d.axisIndex=e.axisIndex,d.axisType=e.axisType,d.axisId=e.axisId,d.axisValue=Hm.getAxisRawValue(t.axis,n),d.axisValueLabel=s,d){o.push(d);var p,f=u.formatTooltip(c,!0,null,l);if(_e.isObject(f)){p=f.html;var g=f.markers;_e.merge(h,g)}else p=f;a.push(p)}}));var c=s;"html"!==l?r.push(a.join(u)):r.push((c?Du.encodeHTML(c)+u:"")+a.join(u))}}))}),this),r.reverse(),r=r.join(this._newLine+this._newLine);var c=t.position;this._showOrMove(s,(function(){this._updateContentNotChangedOnAxis(e)?this._updatePosition(s,c,a[0],a[1],this._tooltipContent,o):this._showTooltipContent(s,r,o,Math.random(),a[0],a[1],c,void 0,h)}))},_showSeriesItemTooltip:function(e,t,i){var n=this._ecModel,a=t.seriesIndex,r=n.getSeriesByIndex(a),o=t.dataModel||r,s=t.dataIndex,l=t.dataType,u=o.getData(l),h=aN([u.getItemModel(s),o,r&&(r.coordinateSystem||{}).model,this._tooltipModel]),c=h.get("trigger");if(null==c||"item"===c){var d,p,f=o.getDataParams(s,l),g=o.formatTooltip(s,!1,l,this._renderMode);_e.isObject(g)?(d=g.html,p=g.markers):(d=g,p=null);var m="item_"+o.name+"_"+s;this._showOrMove(h,(function(){this._showTooltipContent(h,d,f,m,e.offsetX,e.offsetY,e.position,e.target,p)})),i({type:"showTip",dataIndexInside:s,dataIndex:u.getRawIndex(s),seriesIndex:a,from:this.uid})}},_showComponentItemTooltip:function(e,t,i){var n=t.tooltip;if("string"==typeof n){n={content:n,formatter:n}}var a=new gu(n,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)})),i({type:"showTip",from:this.uid})},_showTooltipContent:function(e,t,i,n,a,r,o,s,l){if(this._ticket="",e.get("showContent")&&e.get("show")){var u=this._tooltipContent,h=e.get("formatter");o=o||e.get("position");var c=t;if(h&&"string"==typeof h)c=Du.formatTpl(h,i,!0);else if("function"==typeof h){var d=eN((function(t,n){t===this._ticket&&(u.setContent(n,l,e),this._updatePosition(e,o,a,r,u,i,s))}),this);this._ticket=n,c=h(i,n,d)}u.setContent(c,l,e),u.show(e),this._updatePosition(e,o,a,r,u,i,s)}},_updatePosition:function(e,t,i,n,a,r,o){var s=this._api.getWidth(),l=this._api.getHeight();t=t||e.get("position");var u=a.getSize(),h=e.get("align"),c=e.get("verticalAlign"),d=o&&o.getBoundingRect().clone();if(o&&d.applyTransform(o.transform),"function"==typeof t&&(t=t([i,n],r,a.el,d,{viewSize:[s,l],contentSize:u.slice()})),_e.isArray(t))i=iN(t[0],s),n=iN(t[1],l);else if(_e.isObject(t)){t.width=u[0],t.height=u[1];var p=Gu.getLayoutRect(t,{width:s,height:l});i=p.x,n=p.y,h=null,c=null}else if("string"==typeof t&&o){var f=function(e,t,i){var n=i[0],a=i[1],r=0,o=0,s=t.width,l=t.height;switch(e){case"inside":r=t.x+s/2-n/2,o=t.y+l/2-a/2;break;case"top":r=t.x+s/2-n/2,o=t.y-a-5;break;case"bottom":r=t.x+s/2-n/2,o=t.y+l+5;break;case"left":r=t.x-n-5,o=t.y+l/2-a/2;break;case"right":r=t.x+s+5,o=t.y+l/2-a/2}return[r,o]}(t,d,u);i=f[0],n=f[1]}else{f=function(e,t,i,n,a,r,o){var s=i.getOuterSize(),l=s.width,u=s.height;null!=r&&(e+l+r>n?e-=l+r:e+=r);null!=o&&(t+u+o>a?t-=u+o:t+=o);return[e,t]}(i,n,a,s,l,h?null:20,c?null:20);i=f[0],n=f[1]}if(h&&(i-=oN(h)?u[0]/2:"right"===h?u[0]:0),c&&(n-=oN(c)?u[1]/2:"bottom"===c?u[1]:0),e.get("confine")){f=function(e,t,i,n,a){var r=i.getOuterSize(),o=r.width,s=r.height;return e=Math.min(e+o,n)-o,t=Math.min(t+s,a)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}(i,n,a,s,l);i=f[0],n=f[1]}a.moveTo(i,n)},_updateContentNotChangedOnAxis:function(e){var t=this._lastDataByCoordSys,i=!!t&&t.length===e.length;return i&&tN(t,(function(t,n){var a=t.dataByAxis||{},r=(e[n]||{}).dataByAxis||[];(i&=a.length===r.length)&&tN(a,(function(e,t){var n=r[t]||{},a=e.seriesDataIndices||[],o=n.seriesDataIndices||[];(i&=e.value===n.value&&e.axisType===n.axisType&&e.axisId===n.axisId&&a.length===o.length)&&tN(a,(function(e,t){var n=o[t];i&=e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}))}))})),this._lastDataByCoordSys=e,!!i},_hide:function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},dispose:function(e,t){K.node||(this._tooltipContent.dispose(),pP.unregister("itemTooltip",t))}});function aN(e){for(var t=e.pop();e.length;){var i=e.pop();i&&(gu.isInstance(i)&&(i=i.get("tooltip",!0)),"string"==typeof i&&(i={formatter:i}),t=new gu(i,t,t.ecModel))}return t}function rN(e,t){return e.dispatchAction||_e.bind(t.dispatchAction,t)}function oN(e){return"center"===e||"middle"===e}Qv.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},(function(){})),Qv.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},(function(){}));var sN=["rect","polygon","keep","clear"];var lN=function(e,t){var i=e&&e.brush;if(_e.isArray(i)||(i=i?[i]:[]),i.length){var n=[];_e.each(i,(function(e){var t=e.hasOwnProperty("toolbox")?e.toolbox:[];t instanceof Array&&(n=n.concat(t))}));var a=e&&e.toolbox;_e.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,n),function(e){var t={};_e.each(e,(function(e){t[e]=1})),e.length=0,_e.each(t,(function(t,i){e.push(i)}))}(s),t&&!s.length&&s.push.apply(s,sN)}},uN=_e.each;function hN(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!0}var cN={createVisualMappings:function(e,t,i){var n={};return uN(t,(function(t){var a,r=n[t]=((a=function(){}).prototype.__hidden=a.prototype,new a);uN(e[t],(function(e,n){if(qM.isValidType(n)){var a={type:n,visual:e};i&&i(a,t),r[n]=new qM(a),"opacity"===n&&((a=_e.clone(a)).type="colorAlpha",r.__hidden.__alphaForOpacity=new qM(a))}}))})),n},replaceVisualOption:function(e,t,i){var n;_e.each(i,(function(e){t.hasOwnProperty(e)&&hN(t[e])&&(n=!0)})),n&&_e.each(i,(function(i){t.hasOwnProperty(i)&&hN(t[i])?e[i]=_e.clone(t[i]):delete e[i]}))},applyVisual:function(e,t,i,n,a,r){var o,s={};function l(e){return i.getItemVisual(o,e)}function u(e,t){i.setItemVisual(o,e,t)}function h(e,h){o=null==r?e:h;var c=i.getRawDataItem(o);if(!c||!1!==c.visualMap)for(var d=n.call(a,e),p=t[d],f=s[d],g=0,m=f.length;g<m;g++){var v=f[g];p[v]&&p[v].applyVisual(e,l,u)}}_e.each(e,(function(e){var i=qM.prepareVisualTypes(t[e]);s[e]=i})),null==r?i.each(h):i.each([r],h)},incrementalApplyVisual:function(e,t,i,n){var a={};return _e.each(e,(function(e){var i=qM.prepareVisualTypes(t[e]);a[e]=i})),{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!=n&&(n=r.getDimension(n));null!=(l=e.next());){var u=r.getRawDataItem(l);if(!u||!1!==u.visualMap)for(var h=null!=n?r.get(n,l,!0):l,c=i(h),d=t[c],p=a[c],f=0,g=p.length;f<g;f++){var m=p[f];d[m]&&d[m].applyVisual(h,o,s)}}}}}},dN=iu.linePolygonIntersect;function pN(e){var t=["x","y"],i=["width","height"];return{point:function(t,i,n){if(t){var a=n.range;return fN(t[e],a)}},rect:function(n,a,r){if(n){var o=r.range,s=[n[t[e]],n[t[e]]+n[i[e]]];return s[1]<s[0]&&s.reverse(),fN(s[0],o)||fN(s[1],o)||fN(o[0],s)||fN(o[1],s)}}}}function fN(e,t){return t[0]<=e&&e<=t[1]}var gN={lineX:pN(0),lineY:pN(1),rect:{point:function(e,t,i){return e&&i.boundingRect.contain(e[0],e[1])},rect:function(e,t,i){return e&&i.boundingRect.intersect(e)}},polygon:{point:function(e,t,i){return e&&i.boundingRect.contain(e[0],e[1])&&sv.contain(i.range,e[0],e[1])},rect:function(e,t,i){var n=i.range;if(!e||n.length<=1)return!1;var a=e.x,r=e.y,o=e.width,s=e.height,l=n[0];return!!(sv.contain(n,a,r)||sv.contain(n,a+o,r)||sv.contain(n,a,r+s)||sv.contain(n,a+o,r+s)||Oi.create(e).contain(l[0],l[1])||dN(a,r,a+o,r,n)||dN(a,r,a,r+s,n)||dN(a+o,r,a+o,r+s,n)||dN(a,r+s,a+o,r+s,n))||void 0}}},mN=["inBrush","outOfBrush"],vN=Qv.PRIORITY.VISUAL.BRUSH;function yN(e){e.eachComponent({mainType:"brush"},(function(t){(t.brushTargetManager=new fR(t.option,e)).setInputRanges(t.areas,e)}))}function xN(e,t){if(!e.isDisposed()){var i=e.getZr();i.__ecInBrushSelectEvent=!0,e.dispatchAction({type:"brushSelect",batch:t}),i.__ecInBrushSelectEvent=!1}}function _N(e,t,i,n){for(var a=0,r=t.length;a<r;a++){var o=t[a];if(e[o.brushType](n,i,o.selectors,o))return!0}}function bN(e){var t=e.brushSelector;if(_e.isString(t)){var i=[];return _e.each(gN,(function(e,n){i[n]=function(i,n,a,r){var o=n.getItemLayout(i);return e[t](o,a,r)}})),i}if(_e.isFunction(t)){var n={};return _e.each(gN,(function(e,i){n[i]=t})),n}return t}Qv.registerLayout(vN,(function(e,t,i){e.eachComponent({mainType:"brush"},(function(e){i&&"takeGlobalCursor"===i.type&&e.setBrushOption("brush"===i.key?i.brushOption:{brushType:!1})})),yN(e)})),Qv.registerVisual(vN,(function(e,t,i){var n,a,r=[];e.eachComponent({mainType:"brush"},(function(t,i){var o={brushId:t.id,brushIndex:i,brushName:t.name,areas:_e.clone(t.areas),selected:[]};r.push(o);var s=t.option,l=s.brushLink,u=[],h=[],c=[],d=0;i||(n=s.throttleType,a=s.throttleDelay);var p=_e.map(t.areas,(function(e){return function(e){var t=e.selectors={};return _e.each(gN[e.brushType],(function(i,n){t[n]=function(n){return i(n,t,e)}})),e}(_e.defaults({boundingRect:wN[e.brushType](e)},e))})),f=cN.createVisualMappings(t.option,mN,(function(e){e.mappingMethod="fixed"}));function g(e){return"all"===l||u[e]}function m(e){return!!e.length}_e.isArray(l)&&_e.each(l,(function(e){u[e]=1})),e.eachSeries((function(i,n){var a=c[n]=[];"parallel"===i.subType?function(e,t){var i=e.coordinateSystem;d|=i.hasAxisBrushed(),g(t)&&i.eachActiveState(e.getData(),(function(e,t){"active"===e&&(h[t]=1)}))}(i,n):function(i,n,a){var r=bN(i);if(!r||function(e,t){var i=e.option.seriesIndex;return null!=i&&"all"!==i&&(_e.isArray(i)?_e.indexOf(i,t)<0:t!==i)}(t,n))return;if(_e.each(p,(function(n){r[n.brushType]&&t.brushTargetManager.controlSeries(n,i,e)&&a.push(n),d|=m(a)})),g(n)&&m(a)){var o=i.getData();o.each((function(e){_N(r,a,o,e)&&(h[e]=1)}))}}(i,n,a)})),e.eachSeries((function(e,t){var i={seriesId:e.id,seriesIndex:t,seriesName:e.name,dataIndex:[]};o.selected.push(i);var n=bN(e),a=c[t],r=e.getData(),s=g(t)?function(e){return h[e]?(i.dataIndex.push(r.getRawIndex(e)),"inBrush"):"outOfBrush"}:function(e){return _N(n,a,r,e)?(i.dataIndex.push(r.getRawIndex(e)),"inBrush"):"outOfBrush"};(g(t)?d:m(a))&&cN.applyVisual(mN,f,r,s)}))})),function(e,t,i,n,a){if(!a)return;var r=e.getZr();if(r.__ecInBrushSelectEvent)return;r.__ecBrushSelect||(r.__ecBrushSelect=xN);ip.createOrUpdate(r,"__ecBrushSelect",i,t)(e,n)}(t,n,a,r,i)}));var wN={lineX:_e.noop,lineY:_e.noop,rect:function(e){return SN(e.range)},polygon:function(e){for(var t,i=e.range,n=0,a=i.length;n<a;n++){t=t||[[1/0,-1/0],[1/0,-1/0]];var r=i[n];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&&SN(t)}};function SN(e){return new Oi(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var MN={layoutCovers:yN},IN=["#ddd"];Qv.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 i=this.option;!t&&cN.replaceVisualOption(i,e,["inBrush","outOfBrush"]);var n=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:IN},n.hasOwnProperty("liftZ")||(n.liftZ=5)},setAreas:function(e){e&&(this.areas=_e.map(e,(function(e){return TN(this.option,e)}),this))},setBrushOption:function(e){this.brushOption=TN(this.option,e),this.brushType=this.brushOption.brushType}});function TN(e,t){return _e.merge({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new gu(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}var AN=MN.layoutCovers;Qv.extendComponentView({type:"brush",init:function(e,t){this.ecModel=e,this.api=t,this.model,(this._brushController=new iC(t.getZr())).on("brush",_e.bind(this._onBrush,this)).mount()},render:function(e){return this.model=e,CN.apply(this,arguments)},updateTransform:function(e,t){return AN(t),CN.apply(this,arguments)},updateView:CN,dispose:function(){this._brushController.dispose()},_onBrush:function(e,t){var i=this.model.id;this.model.brushTargetManager.setOutputRanges(e,this.ecModel),(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:i,areas:_e.clone(e),$from:i}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:i,areas:_e.clone(e),$from:i})}});function CN(e,t,i,n){(!n||n.$from!==e.id)&&this._brushController.setPanels(e.brushTargetManager.makePanelOpts(i)).enableBrush(e.brushOption).updateCovers(e.areas.slice())}Qv.registerAction({type:"brush",event:"brush"},(function(e,t){t.eachComponent({mainType:"brush",query:e},(function(t){t.setAreas(e.areas)}))})),Qv.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},(function(){})),Qv.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},(function(){}));var DN=rp.toolbox.brush;function LN(e,t,i){this.model=e,this.ecModel=t,this.api=i,this._brushType,this._brushMode}LN.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:_e.clone(DN.title)};var PN=LN.prototype;PN.render=PN.updateView=function(e,t,i){var n,a,r;t.eachComponent({mainType:"brush"},(function(e){n=e.brushType,a=e.brushOption.brushMode||"single",r|=e.areas.length})),this._brushType=n,this._brushMode=a,_e.each(e.get("type",!0),(function(t){e.setIconStatus(t,("keep"===t?"multiple"===a:"clear"===t?r:t===n)?"emphasis":"normal")}))},PN.getIcons=function(){var e=this.model,t=e.get("icon",!0),i={};return _e.each(e.get("type",!0),(function(e){t[e]&&(i[e]=t[e])})),i},PN.onclick=function(e,t,i){var n=this._brushType,a=this._brushMode;"clear"===i?(t.dispatchAction({type:"axisAreaSelect",intervals:[]}),t.dispatchAction({type:"brush",command:"clear",areas:[]})):t.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===i?n:n!==i&&i,brushMode:"keep"===i?"multiple"===a?"single":"multiple":a}})},LO.register("brush",LN),Qv.registerPreprocessor(lN);var kN=Gu.getLayoutRect,ON=Du.windowOpen;function RN(e){var t=e.itemStyle||(e.itemStyle={}),i=t.emphasis||(t.emphasis={}),n=e.label||e.label||{},a=n.normal||(n.normal={}),r={normal:1,emphasis:1};_e.each(n,(function(e,t){r[t]||NN(a,t)||(a[t]=e)})),i.label&&!NN(n,"emphasis")&&(n.emphasis=i.label,delete i.label)}function NN(e,t){return e.hasOwnProperty(t)}Qv.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"}}}),Qv.extendComponentView({type:"title",render:function(e,t,i){if(this.group.removeAll(),e.get("show")){var n=this.group,a=e.getModel("textStyle"),r=e.getModel("subtextStyle"),o=e.get("textAlign"),s=_e.retrieve2(e.get("textBaseline"),e.get("textVerticalAlign")),l=new iu.Text({style:iu.setTextStyle({},a,{text:e.get("text"),textFill:a.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=e.get("subtext"),c=new iu.Text({style:iu.setTextStyle({},r,{text:h,textFill:r.getTextColor(),y:u.height+e.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),d=e.get("link"),p=e.get("sublink"),f=e.get("triggerEvent",!0);l.silent=!d&&!f,c.silent=!p&&!f,d&&l.on("click",(function(){ON(d,"_"+e.get("target"))})),p&&c.on("click",(function(){ON(d,"_"+e.get("subtarget"))})),l.eventData=c.eventData=f?{componentType:"title",componentIndex:e.componentIndex}:null,n.add(l),h&&n.add(c);var g=n.getBoundingRect(),m=e.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=kN(m,{width:i.getWidth(),height:i.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"),n.attr("position",[v.x,v.y]);var y={textAlign:o,textVerticalAlign:s};l.setStyle(y),c.setStyle(y),g=n.getBoundingRect();var x=v.margin,_=e.getItemStyle(["color","opacity"]);_.fill=e.get("backgroundColor");var b=new iu.Rect({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:e.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0});n.add(b)}}});var EN=function(e){var t=e&&e.timeline;_e.isArray(t)||(t=t?[t]:[]),_e.each(t,(function(e){e&&function(e){var t=e.type,i={number:"value",time:"time"};i[t]&&(e.axisType=i[t],delete e.type);if(RN(e),NN(e,"controlPosition")){var n=e.controlStyle||(e.controlStyle={});NN(n,"position")||(n.position=e.controlPosition),"none"!==n.position||NN(n,"show")||(n.show=!1,delete n.position),delete e.controlPosition}_e.each(e.data||[],(function(e){_e.isObject(e)&&!_e.isArray(e)&&(!NN(e,"value")&&NN(e,"name")&&(e.value=e.name),RN(e))}))}(e)}))};ju.registerSubTypeDefaulter("timeline",(function(){return"slider"})),Qv.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},(function(e,t){var i=t.getComponent("timeline");return i&&null!=e.currentIndex&&(i.setCurrentIndex(e.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.setPlayState(!1)),t.resetOption("timeline"),_e.defaults({currentIndex:i.option.currentIndex},e)})),Qv.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},(function(e,t){var i=t.getComponent("timeline");i&&null!=e.playState&&i.setPlayState(e.playState)}));var zN=ju.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,i){this._data,this._names,this.mergeDefaultAndTheme(e,i),this._initData()},mergeOption:function(e){zN.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||[],i=e.axisType,n=this._names=[];if("category"===i){var a=[];_e.each(t,(function(e,t){var i,r=vr.getDataItemValue(e);_e.isObject(e)?(i=_e.clone(e)).value=t:i=t,a.push(i),_e.isString(r)||null!=r&&!isNaN(r)||(r=""),n.push(r+"")})),t=a}var r={category:"ordinal",time:"time"}[i]||"number";(this._data=new ag([{name:"value",type:r}],this)).initData(t,n)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}}),BN=zN.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:[]}});_e.mixin(BN,ud);var VN=Bd.extend({type:"timeline"}),GN=function(e,t,i,n){Nv.call(this,e,t,i),this.type=n||"value",this.model=null};GN.prototype={constructor:GN,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},_e.inherits(GN,Nv);var FN=GN,HN=ev.createSymbol,WN=Du.encodeHTML,UN=_e.bind,ZN=_e.each,jN=Math.PI;VN.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,i,n){if(this.model=e,this.api=i,this.ecModel=t,this.group.removeAll(),e.get("show",!0)){var a=this._layout(e,i),r=this._createGroup("mainGroup"),o=this._createGroup("labelGroup"),s=this._axis=this._createAxis(a,e);e.formatTooltip=function(e){return WN(s.scale.getLabel(e))},ZN(["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 i=e.get("label.position"),n=e.get("orient"),a=function(e,t){return Gu.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()},e.get("padding"))}(e,t);null==i||"auto"===i?i="horizontal"===n?a.y+a.height/2<t.getHeight()/2?"-":"+":a.x+a.width/2<t.getWidth()/2?"+":"-":isNaN(i)&&(i={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[n][i]);var r,o,s,l,u={horizontal:"center",vertical:i>=0||"+"===i?"left":"right"},h={horizontal:i>=0||"+"===i?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:jN/2},d="vertical"===n?a.height:a.width,p=e.getModel("controlStyle"),f=p.get("show",!0),g=f?p.get("itemSize"):0,m=f?p.get("itemGap"):0,v=g+m,y=e.get("label.rotate")||0;y=y*jN/180;var x=p.get("position",!0),_=f&&p.get("showPlayBtn",!0),b=f&&p.get("showPrevBtn",!0),w=f&&p.get("showNextBtn",!0),S=0,M=d;return"left"===x||"bottom"===x?(_&&(r=[0,0],S+=v),b&&(o=[S,0],S+=v),w&&(s=[M-g,0],M-=v)):(_&&(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:n,rotation:c[n],labelRotation:y,labelPosOpt:i,labelAlign:e.get("label.align")||u[n],labelBaseline:e.get("label.verticalAlign")||e.get("label.baseline")||h[n],playPosition:r,prevBtnPosition:o,nextBtnPosition:s,axisExtent:l,controlSize:g,controlGap:m}},_position:function(e,t){var i=this._mainGroup,n=this._labelGroup,a=e.viewRect;if("vertical"===e.orient){var r=dt.create(),o=a.x,s=a.y+a.height;dt.translate(r,r,[-o,-s]),dt.rotate(r,r,-jN/2),dt.translate(r,r,[o,s]),(a=a.clone()).applyTransform(r)}var l=m(a),u=m(i.getBoundingRect()),h=m(n.getBoundingRect()),c=i.position,d=n.position;d[0]=c[0]=l[0][0];var p,f=e.labelPosOpt;isNaN(f)?(v(c,u,l,1,p="+"===f?0:1),v(d,h,l,1,1-p)):(v(c,u,l,1,p=f>=0?0:1),d[1]=c[1]+f);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,i,n,a){e[n]+=i[n][a]-t[n][a]}i.attr("position",c),n.attr("position",d),i.rotation=n.rotation=e.rotation,g(i),g(n)},_createAxis:function(e,t){var i=t.getData(),n=t.get("axisType"),a=Hm.createScaleByModel(t,n);a.getTicks=function(){return i.mapArray(["value"],(function(e){return e}))};var r=i.getDataExtent("value");a.setExtent(r[0],r[1]),a.niceTicks();var o=new FN("value",a,e.axisExtent,n);return o.model=t,o},_createGroup:function(e){var t=this["_"+e]=new iu.Group;return this.group.add(t),t},_renderAxisLine:function(e,t,i,n){var a=i.getExtent();n.get("lineStyle.show")&&t.add(new iu.Line({shape:{x1:a[0],y1:0,x2:a[1],y2:0},style:_e.extend({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(e,t,i,n){var a=n.getData(),r=i.scale.getTicks();ZN(r,(function(e){var r=i.dataToCoord(e),o=a.getItemModel(e),s=o.getModel("itemStyle"),l=o.getModel("emphasis.itemStyle"),u={position:[r,0],onclick:UN(this._changeTimeline,this,e)},h=YN(o,s,t,u);iu.setHoverStyle(h,l.getItemStyle()),o.get("tooltip")?(h.dataIndex=e,h.dataModel=n):h.dataIndex=h.dataModel=null}),this)},_renderAxisLabel:function(e,t,i,n){if(i.getLabelModel().get("show")){var a=n.getData(),r=i.getViewLabels();ZN(r,(function(n){var r=n.tickValue,o=a.getItemModel(r),s=o.getModel("label"),l=o.getModel("emphasis.label"),u=i.dataToCoord(n.tickValue),h=new iu.Text({position:[u,0],rotation:e.labelRotation-e.rotation,onclick:UN(this._changeTimeline,this,r),silent:!1});iu.setTextStyle(h.style,s,{text:n.formattedLabel,textAlign:e.labelAlign,textVerticalAlign:e.labelBaseline}),t.add(h),iu.setHoverStyle(h,iu.setTextStyle({},l))}),this)}},_renderControl:function(e,t,i,n){var a=e.controlSize,r=e.rotation,o=n.getModel("controlStyle").getItemStyle(),s=n.getModel("emphasis.controlStyle").getItemStyle(),l=[0,-a/2,a,a],u=n.getPlayState(),h=n.get("inverse",!0);function c(e,i,u,h){if(e){var c=function(e,t,i,n){return iu.makePath(e.get(t).replace(/^path:\/\//,""),_e.clone(n||{}),new Oi(i[0],i[1],i[2],i[3]),"center")}(n,i,l,{position:e,origin:[a/2,0],rotation:h?-r:0,rectHover:!0,style:o,onclick:u});t.add(c),iu.setHoverStyle(c,s)}}c(e.nextBtnPosition,"controlStyle.nextIcon",UN(this._changeTimeline,this,h?"-":"+")),c(e.prevBtnPosition,"controlStyle.prevIcon",UN(this._changeTimeline,this,h?"+":"-")),c(e.playPosition,"controlStyle."+(u?"stopIcon":"playIcon"),UN(this._handlePlayClick,this,!u),!0)},_renderCurrentPointer:function(e,t,i,n){var a=n.getData(),r=n.getCurrentIndex(),o=a.getItemModel(r).getModel("checkpointStyle"),s=this,l={onCreate:function(e){e.draggable=!0,e.drift=UN(s._handlePointerDrag,s),e.ondragend=UN(s._handlePointerDragend,s),XN(e,r,i,n,!0)},onUpdate:function(e){XN(e,r,i,n)}};this._currentPointer=YN(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,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},_handlePointerDragend:function(e){this._pointerChangeTimeline([e.offsetX,e.offsetY],!0)},_pointerChangeTimeline:function(e,t){var i=this._toAxisCoord(e)[0],n=this._axis,a=bu.asc(n.getExtent().slice());i>a[1]&&(i=a[1]),i<a[0]&&(i=a[0]),this._currentPointer.position[0]=i,this._currentPointer.dirty();var r=this._findNearestTick(i),o=this.model;(t||r!==o.getCurrentIndex()&&o.get("realtime"))&&this._changeTimeline(r)},_doPlayStop:function(){this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(UN((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 iu.applyTransform(e,t,!0)},_findNearestTick:function(e){var t,i=this.model.getData(),n=1/0,a=this._axis;return i.each(["value"],(function(i,r){var o=a.dataToCoord(i),s=Math.abs(o-e);s<n&&(n=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})}});function YN(e,t,i,n,a,r){var o=t.get("color");if(a)a.setColor(o),i.add(a),r&&r.onUpdate(a);else{var s=e.get("symbol");(a=HN(s,-1,-1,2,2,o)).setStyle("strokeNoScale",!0),i.add(a),r&&r.onCreate(a)}var l=t.getItemStyle(["color","symbol","symbolSize"]);a.setStyle(l),n=_e.merge({rectHover:!0,z2:100},n,!0);var u=e.get("symbolSize");(u=u instanceof Array?u.slice():[+u,+u])[0]/=2,u[1]/=2,n.scale=u;var h=e.get("symbolOffset");if(h){var c=n.position=n.position||[0,0];c[0]+=bu.parsePercent(h[0],u[0]),c[1]+=bu.parsePercent(h[1],u[1])}var d=e.get("symbolRotate");return n.rotation=(d||0)*Math.PI/180||0,a.attr(n),a.updateTransform(),a}function XN(e,t,i,n,a){if(!e.dragging){var r=n.getModel("checkpointStyle"),o=i.dataToCoord(n.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)))}}Qv.registerPreprocessor(EN);var qN=Du.addCommas,KN=Du.encodeHTML;function $N(e){vr.defaultEmphasis(e,"label",["show"])}var JN=Qv.extendComponentModel({type:"marker",dependencies:["series","grid","polar","geo"],init:function(e,t,i){this.mergeDefaultAndTheme(e,i),this._mergeOption(e,i,!1,!0)},isAnimationEnabled:function(){if(K.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,i,n){var a=this.constructor,r=this.mainType+"Model";i||t.eachSeries((function(e){var i=e.get(this.mainType,!0),o=e[r];i&&i.data?(o?o._mergeOption(i,t,!0):(n&&$N(i),_e.each(i.data,(function(e){e instanceof Array?($N(e[0]),$N(e[1])):$N(e)})),o=new a(i,this,t),_e.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(),i=this.getRawValue(e),n=_e.isArray(i)?_e.map(i,qN).join(", "):qN(i),a=t.getName(e),r=KN(this.name);return(null!=i||a)&&(r+="<br />"),a&&(r+=KN(a),null!=i&&(r+=" : ")),null!=i&&(r+=KN(n)),r},getData:function(){return this._data},setData:function(e){this._data=e}});_e.mixin(JN,ud);var QN=JN,eE=(QN.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}}}}),Cg.isDimensionStacked),tE=_e.indexOf;function iE(e,t,i,n,a,r){var o=[],s=eE(t,n)?t.getCalculationInfo("stackResultDimension"):n,l=oE(t,s,e),u=t.indicesOfNearest(s,l)[0];o[a]=t.get(i,u),o[r]=t.get(s,u);var h=t.get(n,u),c=bu.getPrecision(t.get(n,u));return(c=Math.min(c,20))>=0&&(o[r]=+o[r].toFixed(c)),[o,h]}var nE=_e.curry,aE={min:nE(iE,"min"),max:nE(iE,"max"),average:nE(iE,"average")};function rE(e,t,i,n){var a={};return null!=e.valueIndex||null!=e.valueDim?(a.valueDataDim=null!=e.valueIndex?t.getDimension(e.valueIndex):e.valueDim,a.valueAxis=i.getAxis(function(e,t){var i=e.getData(),n=i.dimensions;t=i.getDimension(t);for(var a=0;a<n.length;a++){var r=i.getDimensionInfo(n[a]);if(r.name===t)return r.coordDim}}(n,a.valueDataDim)),a.baseAxis=i.getOtherAxis(a.valueAxis),a.baseDataDim=t.mapDimension(a.baseAxis.dim)):(a.baseAxis=n.getBaseAxis(),a.valueAxis=i.getOtherAxis(a.baseAxis),a.baseDataDim=t.mapDimension(a.baseAxis.dim),a.valueDataDim=t.mapDimension(a.valueAxis.dim)),a}function oE(e,t,i){if("average"===i){var n=0,a=0;return e.each(t,(function(e,t){isNaN(e)||(n+=e,a++)})),n/a}return"median"===i?e.getMedian(t):e.getDataExtent(t,!0)["max"===i?1:0]}var sE={dataTransform:function(e,t){var i=e.getData(),n=e.coordinateSystem;if(t&&!function(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}(t)&&!_e.isArray(t.coord)&&n){var a=n.dimensions,r=rE(t,i,n,e);if((t=_e.clone(t)).type&&aE[t.type]&&r.baseAxis&&r.valueAxis){var o=tE(a,r.baseAxis.dim),s=tE(a,r.valueAxis.dim),l=aE[t.type](i,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],h=0;h<2;h++)aE[u[h]]&&(u[h]=oE(i,i.mapDimension(a[h]),u[h]));t.coord=u}}return t},getAxisInfo:rE,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,i,n){return n<2?e.coord&&e.coord[n]:e.value},numCalculate:oE},lE=Qv.extendComponentView({type:"marker",init:function(){this.markerGroupMap=_e.createHashMap()},render:function(e,t,i){var n=this.markerGroupMap;n.each((function(e){e.__keep=!1}));var a=this.type+"Model";t.eachSeries((function(e){var n=e[a];n&&this.renderSeries(e,n,t,i)}),this),n.each((function(e){!e.__keep&&this.group.remove(e.group)}),this)},renderSeries:function(){}});function uE(e,t,i){var n=t.coordinateSystem;e.each((function(a){var r,o=e.getItemModel(a),s=bu.parsePercent(o.get("x"),i.getWidth()),l=bu.parsePercent(o.get("y"),i.getHeight());if(isNaN(s)||isNaN(l)){if(t.getMarkerPosition)r=t.getMarkerPosition(e.getValues(e.dimensions,a));else if(n){var u=e.get(n.dimensions[0],a),h=e.get(n.dimensions[1],a);r=n.dataToPoint([u,h])}}else r=[s,l];isNaN(s)||(r[0]=s),isNaN(l)||(r[1]=l),e.setItemLayout(a,r)}))}lE.extend({type:"markPoint",updateTransform:function(e,t,i){t.eachSeries((function(e){var t=e.markPointModel;t&&(uE(t.getData(),e,i),this.markerGroupMap.get(e.id).updateLayout(t))}),this)},renderSeries:function(e,t,i,n){var a=e.coordinateSystem,r=e.id,o=e.getData(),s=this.markerGroupMap,l=s.get(r)||s.set(r,new wy),u=function(e,t,i){var n;n=e?_e.map(e&&e.dimensions,(function(e){var i=t.getData().getDimensionInfo(t.getData().mapDimension(e))||{};return _e.defaults({name:e},i)})):[{name:"value",type:"float"}];var a=new ag(n,i),r=_e.map(i.get("data"),_e.curry(sE.dataTransform,t));e&&(r=_e.filter(r,_e.curry(sE.dataFilter,e)));return a.initData(r,null,e?sE.dimValueGetter:function(e){return e.value}),a}(a,e,t);t.setData(u),uE(t.getData(),e,n),u.each((function(e){var i=u.getItemModel(e),n=i.getShallow("symbol"),a=i.getShallow("symbolSize"),r=_e.isFunction(n),s=_e.isFunction(a);if(r||s){var l=t.getRawValue(e),h=t.getDataParams(e);r&&(n=n(l,h)),s&&(a=a(l,h))}u.setItemVisual(e,{symbol:n,symbolSize:a,color:i.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")}});Qv.registerPreprocessor((function(e){e.markPoint=e.markPoint||{}}));QN.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 hE=Cg.getStackedDimension,cE=function(e,t,i,n){var a=e.getData(),r=n.type;if(!_e.isArray(n)&&("min"===r||"max"===r||"average"===r||"median"===r||null!=n.xAxis||null!=n.yAxis)){var o,s;if(null!=n.yAxis||null!=n.xAxis)o=t.getAxis(null!=n.yAxis?"y":"x"),s=_e.retrieve(n.yAxis,n.xAxis);else{var l=sE.getAxisInfo(n,a,t,e);o=l.valueAxis;var u=hE(a,l.valueDataDim);s=sE.numCalculate(a,u,r)}var h="x"===o.dim?0:1,c=1-h,d=_e.clone(n),p={};d.type=null,d.coord=[],p.coord=[],d.coord[c]=-1/0,p.coord[c]=1/0;var f=i.get("precision");f>=0&&"number"==typeof s&&(s=+s.toFixed(Math.min(f,20))),d.coord[h]=p.coord[h]=s,n=[d,p,{type:r,valueIndex:n.valueIndex,value:s}]}return(n=[sE.dataTransform(e,n[0]),sE.dataTransform(e,n[1]),_e.extend({},n[2])])[2].type=n[2].type||"",_e.merge(n[2],n[0]),_e.merge(n[2],n[1]),n};function dE(e){return!isNaN(e)&&!isFinite(e)}function pE(e,t,i,n){var a=1-e,r=n.dimensions[e];return dE(t[a])&&dE(i[a])&&t[e]===i[e]&&n.getAxis(r).containData(t[e])}function fE(e,t){if("cartesian2d"===e.type){var i=t[0].coord,n=t[1].coord;if(i&&n&&(pE(1,i,n,e)||pE(0,i,n,e)))return!0}return sE.dataFilter(e,t[0])&&sE.dataFilter(e,t[1])}function gE(e,t,i,n,a){var r,o=n.coordinateSystem,s=e.getItemModel(t),l=bu.parsePercent(s.get("x"),a.getWidth()),u=bu.parsePercent(s.get("y"),a.getHeight());if(isNaN(l)||isNaN(u)){if(n.getMarkerPosition)r=n.getMarkerPosition(e.getValues(e.dimensions,t));else{var h=o.dimensions,c=e.get(h[0],t),d=e.get(h[1],t);r=o.dataToPoint([c,d])}if("cartesian2d"===o.type){var p=o.getAxis("x"),f=o.getAxis("y");h=o.dimensions;dE(e.get(h[0],t))?r[0]=p.toGlobalCoord(p.getExtent()[i?0:1]):dE(e.get(h[1],t))&&(r[1]=f.toGlobalCoord(f.getExtent()[i?0:1]))}isNaN(l)||(r[0]=l),isNaN(u)||(r[1]=u)}else r=[l,u];e.setItemLayout(t,r)}lE.extend({type:"markLine",updateTransform:function(e,t,i){t.eachSeries((function(e){var t=e.markLineModel;if(t){var n=t.getData(),a=t.__from,r=t.__to;a.each((function(t){gE(a,t,!0,e,i),gE(r,t,!1,e,i)})),n.each((function(e){n.setItemLayout(e,[a.getItemLayout(e),r.getItemLayout(e)])})),this.markerGroupMap.get(e.id).updateLayout()}}),this)},renderSeries:function(e,t,i,n){var a=e.coordinateSystem,r=e.id,o=e.getData(),s=this.markerGroupMap,l=s.get(r)||s.set(r,new UI);this.group.add(l.group);var u=function(e,t,i){var n;n=e?_e.map(e&&e.dimensions,(function(e){var i=t.getData().getDimensionInfo(t.getData().mapDimension(e))||{};return _e.defaults({name:e},i)})):[{name:"value",type:"float"}];var a=new ag(n,i),r=new ag(n,i),o=new ag([],i),s=_e.map(i.get("data"),_e.curry(cE,t,e,i));e&&(s=_e.filter(s,_e.curry(fE,e)));var l=e?sE.dimValueGetter:function(e){return e.value};return a.initData(_e.map(s,(function(e){return e[0]})),null,l),r.initData(_e.map(s,(function(e){return e[1]})),null,l),o.initData(_e.map(s,(function(e){return e[2]}))),o.hasItemOption=!0,{from:a,to:r,line:o}}(a,e,t),h=u.from,c=u.to,d=u.line;t.__from=h,t.__to=c,t.setData(d);var p=t.get("symbol"),f=t.get("symbolSize");function g(t,i,a){var r=t.getItemModel(i);gE(t,i,a,e,n),t.setItemVisual(i,{symbolSize:r.get("symbolSize")||f[a?0:1],symbol:r.get("symbol",!0)||p[a?0:1],color:r.get("itemStyle.color")||o.getVisual("color")})}_e.isArray(p)||(p=[p,p]),"number"==typeof f&&(f=[f,f]),u.from.each((function(e){g(h,e,!0),g(c,e,!1)})),d.each((function(e){var t=d.getItemModel(e).get("lineStyle.color");d.setItemVisual(e,{color:t||h.getItemVisual(e,"color")}),d.setItemLayout(e,[h.getItemLayout(e),c.getItemLayout(e)]),d.setItemVisual(e,{fromSymbolSize:h.getItemVisual(e,"symbolSize"),fromSymbol:h.getItemVisual(e,"symbol"),toSymbolSize:c.getItemVisual(e,"symbolSize"),toSymbol:c.getItemVisual(e,"symbol")})})),l.updateData(d),u.line.eachItemGraphicEl((function(e,i){e.traverse((function(e){e.dataModel=t}))})),l.__keep=!0,l.group.silent=t.get("silent")||e.get("silent")}});Qv.registerPreprocessor((function(e){e.markLine=e.markLine||{}}));QN.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 mE=function(e,t,i,n){var a=sE.dataTransform(e,n[0]),r=sE.dataTransform(e,n[1]),o=_e.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=_e.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 vE(e){return!isNaN(e)&&!isFinite(e)}function yE(e,t,i,n){var a=1-e;return vE(t[a])&&vE(i[a])}function xE(e,t){var i=t.coord[0],n=t.coord[1];return!("cartesian2d"!==e.type||!i||!n||!yE(1,i,n)&&!yE(0,i,n))||(sE.dataFilter(e,{coord:i,x:t.x0,y:t.y0})||sE.dataFilter(e,{coord:n,x:t.x1,y:t.y1}))}function _E(e,t,i,n,a){var r,o=n.coordinateSystem,s=e.getItemModel(t),l=bu.parsePercent(s.get(i[0]),a.getWidth()),u=bu.parsePercent(s.get(i[1]),a.getHeight());if(isNaN(l)||isNaN(u)){if(n.getMarkerPosition)r=n.getMarkerPosition(e.getValues(i,t));else{var h=[p=e.get(i[0],t),f=e.get(i[1],t)];o.clampData&&o.clampData(h,h),r=o.dataToPoint(h,!0)}if("cartesian2d"===o.type){var c=o.getAxis("x"),d=o.getAxis("y"),p=e.get(i[0],t),f=e.get(i[1],t);vE(p)?r[0]=c.toGlobalCoord(c.getExtent()["x0"===i[0]?0:1]):vE(f)&&(r[1]=d.toGlobalCoord(d.getExtent()["y0"===i[1]?0:1]))}isNaN(l)||(r[0]=l),isNaN(u)||(r[1]=u)}else r=[l,u];return r}var bE=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];lE.extend({type:"markArea",updateTransform:function(e,t,i){t.eachSeries((function(e){var t=e.markAreaModel;if(t){var n=t.getData();n.each((function(t){var a=_e.map(bE,(function(a){return _E(n,t,a,e,i)}));n.setItemLayout(t,a),n.getItemGraphicEl(t).setShape("points",a)}))}}),this)},renderSeries:function(e,t,i,n){var a=e.coordinateSystem,r=e.id,o=e.getData(),s=this.markerGroupMap,l=s.get(r)||s.set(r,{group:new iu.Group});this.group.add(l.group),l.__keep=!0;var u=function(e,t,i){var n,a;e?(n=_e.map(e&&e.dimensions,(function(e){var i=t.getData(),n=i.getDimensionInfo(i.mapDimension(e))||{};return _e.defaults({name:e},n)})),a=new ag(_e.map(["x0","y0","x1","y1"],(function(e,t){return{name:e,type:n[t%2].type}})),i)):a=new ag(n=[{name:"value",type:"float"}],i);var r=_e.map(i.get("data"),_e.curry(mE,t,e,i));e&&(r=_e.filter(r,_e.curry(xE,e)));var o=e?function(e,t,i,n){return e.coord[Math.floor(n/2)][n%2]}:function(e){return e.value};return a.initData(r,null,o),a.hasItemOption=!0,a}(a,e,t);t.setData(u),u.each((function(t){u.setItemLayout(t,_e.map(bE,(function(i){return _E(u,t,i,e,n)}))),u.setItemVisual(t,{color:o.getVisual("color")})})),u.diff(l.__data).add((function(e){var t=new iu.Polygon({shape:{points:u.getItemLayout(e)}});u.setItemGraphicEl(e,t),l.group.add(t)})).update((function(e,i){var n=l.__data.getItemGraphicEl(i);iu.updateProps(n,{shape:{points:u.getItemLayout(e)}},t,e),l.group.add(n),u.setItemGraphicEl(e,n)})).remove((function(e){var t=l.__data.getItemGraphicEl(e);l.group.remove(t)})).execute(),u.eachItemGraphicEl((function(e,i){var n=u.getItemModel(i),a=n.getModel("label"),r=n.getModel("emphasis.label"),o=u.getItemVisual(i,"color");e.useStyle(_e.defaults(n.getModel("itemStyle").getItemStyle(),{fill:Xt.modifyAlpha(o,.4),stroke:o})),e.hoverStyle=n.getModel("emphasis.itemStyle").getItemStyle(),iu.setLabelStyle(e.style,e.hoverStyle,a,r,{labelFetcher:t,labelDataIndex:i,defaultText:u.getName(i)||"",isRectText:!0,autoColor:o}),iu.setHoverStyle(e,{}),e.dataModel=t})),l.__data=u,l.group.silent=t.get("silent")||e.get("silent")}}),Qv.registerPreprocessor((function(e){e.markArea=e.markArea||{}}));var wE=vr.isNameSpecified,SE=rp.legend.selector,ME={all:{type:"all",title:_e.clone(SE.all)},inverse:{type:"inverse",title:_e.clone(SE.inverse)}},IE=Qv.extendComponentModel({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(e,t,i){this.mergeDefaultAndTheme(e,i),e.selected=e.selected||{},this._updateSelector(e)},mergeOption:function(e){IE.superCall(this,"mergeOption",e),this._updateSelector(e)},_updateSelector:function(e){var t=e.selector;!0===t&&(t=e.selector=["all","inverse"]),_e.isArray(t)&&_e.each(t,(function(e,i){_e.isString(e)&&(e={type:e}),t[i]=_e.merge(e,ME[e.type])}))},optionUpdated:function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&"single"===this.get("selectedMode")){for(var t=!1,i=0;i<e.length;i++){var n=e[i].get("name");if(this.isSelected(n)){this.select(n),t=!0;break}}!t&&this.select(e[0].get("name"))}},_updateData:function(e){var t=[],i=[];e.eachRawSeries((function(n){var a,r=n.name;if(i.push(r),n.legendVisualProvider){var o=n.legendVisualProvider.getAllNames();e.isSeriesFiltered(n)||(i=i.concat(o)),o.length?t=t.concat(o):a=!0}else a=!0;a&&wE(n)&&t.push(n.name)})),this._availableNames=i;var n=this.get("data")||t,a=_e.map(n,(function(e){return"string"!=typeof e&&"number"!=typeof e||(e={name:e}),new gu(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 i=this._data;_e.each(i,(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;_e.each(e,(function(e){t[e.get("name",!0)]=!0}))},inverseSelect:function(){var e=this._data,t=this.option.selected;_e.each(e,(function(e){var i=e.get("name",!0);t.hasOwnProperty(i)||(t[i]=!0),t[i]=!t[i]}))},isSelected:function(e){var t=this.option.selected;return!(t.hasOwnProperty(e)&&!t[e])&&_e.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}}}),TE=IE;function AE(e,t,i){var n,a={},r="toggleSelected"===e;return i.eachComponent("legend",(function(i){r&&null!=n?i[n?"select":"unSelect"](t.name):"allSelect"===e||"inverseSelect"===e?i[e]():(i[e](t.name),n=i.isSelected(t.name));var o=i.getData();_e.each(o,(function(e){var t=e.get("name");if("\n"!==t&&""!==t){var n=i.isSelected(t);a.hasOwnProperty(t)?a[t]=a[t]&&n:a[t]=n}}))})),"allSelect"===e||"inverseSelect"===e?{selected:a}:{name:t.name,selected:a}}Qv.registerAction("legendToggleSelect","legendselectchanged",_e.curry(AE,"toggleSelected")),Qv.registerAction("legendAllSelect","legendselectall",_e.curry(AE,"allSelect")),Qv.registerAction("legendInverseSelect","legendinverseselect",_e.curry(AE,"inverseSelect")),Qv.registerAction("legendSelect","legendselected",_e.curry(AE,"select")),Qv.registerAction("legendUnSelect","legendunselected",_e.curry(AE,"unSelect"));var CE=ev.createSymbol,DE=NO.makeBackground,LE=_e.curry,PE=_e.each,kE=iu.Group;function OE(e,t,i,n,a,r){var o;return"line"!==t&&t.indexOf("empty")<0?(o=i.getItemStyle(),e.style.stroke=n,r||(o.stroke=a)):o=i.getItemStyle(["borderWidth","borderColor"]),e.setStyle(o)}function RE(e,t,i,n){EE(e,t,i,n),i.dispatchAction({type:"legendToggleSelect",name:null!=e?e:t}),NE(e,t,i,n)}function NE(e,t,i,n){var a=i.getZr().storage.getDisplayList()[0];a&&a.useHoverLayer||i.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:n})}function EE(e,t,i,n){var a=i.getZr().storage.getDisplayList()[0];a&&a.useHoverLayer||i.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:n})}var zE=Qv.extendComponentView({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new kE),this._backgroundEl,this.group.add(this._selectorGroup=new kE),this._isFirstRender=!0},getContentGroup:function(){return this._contentGroup},getSelectorGroup:function(){return this._selectorGroup},render:function(e,t,i){var n=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,i,o,r,s);var l=e.getBoxLayoutParams(),u={width:i.getWidth(),height:i.getHeight()},h=e.get("padding"),c=Gu.getLayoutRect(l,u,h),d=this.layoutInner(e,a,c,n,o,s),p=Gu.getLayoutRect(_e.defaults({width:d.width,height:d.height},l),u,h);this.group.attr("position",[p.x-d.x,p.y-d.y]),this.group.add(this._backgroundEl=DE(d,e))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},renderInner:function(e,t,i,n,a,r,o){var s=this.getContentGroup(),l=_e.createHashMap(),u=t.get("selectedMode"),h=[];i.eachRawSeries((function(e){!e.get("legendHoverLink")&&h.push(e.id)})),PE(t.getData(),(function(a,r){var o=a.get("name");if(this.newlineDisabled||""!==o&&"\n"!==o){var c=i.getSeriesByName(o)[0];if(!l.get(o))if(c){var d=c.getData(),p=d.getVisual("color"),f=d.getVisual("borderColor");"function"==typeof p&&(p=p(c.getDataParams(0))),"function"==typeof f&&(f=f(c.getDataParams(0)));var g=d.getVisual("legendSymbol")||"roundRect",m=d.getVisual("symbol");this._createItem(o,r,a,t,g,m,e,p,f,u).on("click",LE(RE,o,null,n,h)).on("mouseover",LE(NE,c.name,null,n,h)).on("mouseout",LE(EE,c.name,null,n,h)),l.set(o,!0)}else i.eachRawSeries((function(i){if(!l.get(o)&&i.legendVisualProvider){var s=i.legendVisualProvider;if(!s.containName(o))return;var c=s.indexOfName(o),d=s.getItemVisual(c,"color"),p=s.getItemVisual(c,"borderColor");this._createItem(o,r,a,t,"roundRect",null,e,d,p,u).on("click",LE(RE,null,o,n,h)).on("mouseover",LE(NE,null,o,n,h)).on("mouseout",LE(EE,null,o,n,h)),l.set(o,!0)}}),this)}else s.add(new kE({newline:!0}))}),this),a&&this._createSelector(a,t,n,r,o)},_createSelector:function(e,t,i,n,a){var r=this.getSelectorGroup();PE(e,(function(e){!function(e){var n=e.type,a=new iu.Text({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:"all"===n?"legendAllSelect":"legendInverseSelect"})}});r.add(a);var o=t.getModel("selectorLabel"),s=t.getModel("emphasis.selectorLabel");iu.setLabelStyle(a.style,a.hoverStyle={},o,s,{defaultText:e.title,isRectText:!1}),iu.setHoverStyle(a)}(e)}))},_createItem:function(e,t,i,n,a,r,o,s,l,u){var h=n.get("itemWidth"),c=n.get("itemHeight"),d=n.get("inactiveColor"),p=n.get("inactiveBorderColor"),f=n.get("symbolKeepAspect"),g=n.getModel("itemStyle"),m=n.isSelected(e),v=new kE,y=i.getModel("textStyle"),x=i.get("icon"),_=i.getModel("tooltip"),b=_.parentModel,w=CE(a=x||a,0,0,h,c,m?s:d,null==f||f);if(v.add(OE(w,a,g,l,p,m)),!x&&r&&(r!==a||"none"===r)){var S=.8*c;"none"===r&&(r="circle");var M=CE(r,(h-S)/2,(c-S)/2,S,S,m?s:d,null==f||f);v.add(OE(M,r,g,l,p,m))}var I="left"===o?h+5:-5,T=o,A=n.get("formatter"),C=e;"string"==typeof A&&A?C=A.replace("{name}",null!=e?e:""):"function"==typeof A&&(C=A(e)),v.add(new iu.Text({style:iu.setTextStyle({},y,{text:C,x:I,y:c/2,textFill:m?y.getTextColor():d,textAlign:T,textVerticalAlign:"middle"})}));var D=new iu.Rect({shape:v.getBoundingRect(),invisible:!0,tooltip:_.get("show")?_e.extend({content:e,formatter:b.get("formatter",!0)||function(){return e},formatterParams:{componentType:"legend",legendIndex:n.componentIndex,name:e,$vars:["name"]}},_.option):null});return v.add(D),v.eachChild((function(e){e.silent=!0})),D.silent=!u,this.getContentGroup().add(v),iu.setHoverStyle(v),v.__legendDataIndex=t,v},layoutInner:function(e,t,i,n,a,r){var o=this.getContentGroup(),s=this.getSelectorGroup();Gu.box(e.get("orient"),o,e.get("itemGap"),i.width,i.height);var l=o.getBoundingRect(),u=[-l.x,-l.y];if(a){Gu.box("horizontal",s,e.get("selectorItemGap",!0));var h=s.getBoundingRect(),c=[-h.x,-h.y],d=e.get("selectorButtonGap",!0),p=e.getOrient().index,f=0===p?"width":"height",g=0===p?"height":"width",m=0===p?"y":"x";"end"===r?c[p]+=l[f]+d:u[p]+=h[f]+d,c[1-p]+=l[g]/2-h[g]/2,s.attr("position",c),o.attr("position",u);var v={x:0,y:0};return v[f]=l[f]+d+h[f],v[g]=Math.max(l[g],h[g]),v[m]=Math.min(0,h[m]+c[1-p]),v}return o.attr("position",u),this.group.getBoundingRect()},remove:function(){this.getContentGroup().removeAll(),this._isFirstRender=!0}});var BE=function(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.filterSeries((function(e){for(var i=0;i<t.length;i++)if(!t[i].isSelected(e.name))return!1;return!0}))};Qv.registerProcessor(Qv.PRIORITY.PROCESSOR.SERIES_FILTER,BE),ju.registerSubTypeDefaulter("legend",(function(){return"plain"}));var VE=Gu.mergeLayoutParam,GE=Gu.getLayoutParams,FE=TE.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,i,n){var a=GE(e);FE.superCall(this,"init",e,t,i,n),HE(this,e,a)},mergeOption:function(e,t){FE.superCall(this,"mergeOption",e,t),HE(this,this.option,e)}});function HE(e,t,i){var n=[1,1];n[e.getOrient().index]=0,VE(t,i,{type:"box",ignoreSize:n})}var WE=iu.Group,UE=["width","height"],ZE=["x","y"],jE=zE.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){jE.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new WE),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new WE),this._showController},resetInner:function(){jE.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(e,t,i,n,a,r,o){var s=this;jE.superCall(this,"renderInner",e,t,i,n,a,r,o);var l=this._controllerGroup,u=t.get("pageIconSize",!0);_e.isArray(u)||(u=[u,u]),c("pagePrev",0);var h=t.getModel("pageTextStyle");function c(e,i){var a=e+"DataIndex",r=iu.createIcon(t.get("pageIcons",!0)[t.getOrient().name][i],{onclick:_e.bind(s._pageGo,s,a,t,n)},{x:-u[0]/2,y:-u[1]/2,width:u[0],height:u[1]});r.name=e,l.add(r)}l.add(new iu.Text({name:"pageText",style:{textFill:h.getTextColor(),font:h.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),c("pageNext",1)},layoutInner:function(e,t,i,n,a,r){var o=this.getSelectorGroup(),s=e.getOrient().index,l=UE[s],u=ZE[s],h=UE[1-s],c=ZE[1-s];a&&Gu.box("horizontal",o,e.get("selectorItemGap",!0));var d=e.get("selectorButtonGap",!0),p=o.getBoundingRect(),f=[-p.x,-p.y],g=_e.clone(i);a&&(g[l]=i[l]-p[l]-d);var m=this._layoutContentAndController(e,n,g,s,l,h,c);if(a){if("end"===r)f[s]+=m[l]+d;else{var v=p[l]+d;f[s]-=v,m[u]-=v}m[l]+=p[l]+d,f[1-s]+=m[c]+m[h]/2-p[h]/2,m[h]=Math.max(m[h],p[h]),m[c]=Math.min(m[c],p[c]+f[1-s]),o.attr("position",f)}return m},_layoutContentAndController:function(e,t,i,n,a,r,o){var s=this.getContentGroup(),l=this._containerGroup,u=this._controllerGroup;Gu.box(e.get("orient"),s,e.get("itemGap"),n?i.width:null,n?null:i.height),Gu.box("horizontal",u,e.get("pageButtonItemGap",!0));var h=s.getBoundingRect(),c=u.getBoundingRect(),d=this._showController=h[a]>i[a],p=[-h.x,-h.y];t||(p[n]=s.position[n]);var f=[0,0],g=[-c.x,-c.y],m=_e.retrieve2(e.get("pageButtonGap",!0),e.get("itemGap",!0));d&&("end"===e.get("pageButtonPosition",!0)?g[n]+=i[a]-c[a]:f[n]+=c[a]+m);g[1-n]+=h[r]/2-c[r]/2,s.attr("position",p),l.attr("position",f),u.attr("position",g);var v={x:0,y:0};if(v[a]=d?i[a]:h[a],v[r]=Math.max(h[r],c[r]),v[o]=Math.min(0,c[o]+g[1-n]),l.__rectSize=i[a],d){var y={x:0,y:0};y[a]=Math.max(i[a]-c[a]-m,0),y[r]=v[r],l.setClipPath(new iu.Rect({shape:y})),l.__rectSize=y[a]}else u.eachChild((function(e){e.attr({invisible:!0,silent:!0})}));var x=this._getPageInfo(e);return null!=x.pageIndex&&iu.updateProps(s,{position:x.contentPosition},!!d&&e),this._updatePageInfoView(e,x),v},_pageGo:function(e,t,i){var n=this._getPageInfo(t)[e];null!=n&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:t.id})},_updatePageInfoView:function(e,t){var i=this._controllerGroup;_e.each(["pagePrev","pageNext"],(function(n){var a=null!=t[n+"DataIndex"],r=i.childOfName(n);r&&(r.setStyle("fill",a?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),r.cursor=a?"pointer":"default")}));var n=i.childOfName("pageText"),a=e.get("pageFormatter"),r=t.pageIndex,o=null!=r?r+1:0,s=t.pageCount;n&&a&&n.setStyle("text",_e.isString(a)?a.replace("{current}",o).replace("{total}",s):a({current:o,total:s}))},_getPageInfo:function(e){var t=e.get("scrollDataIndex",!0),i=this.getContentGroup(),n=this._containerGroup.__rectSize,a=e.getOrient().index,r=UE[a],o=ZE[a],s=this._findTargetItemIndex(t),l=i.children(),u=l[s],h=l.length,c=h?1:0,d={contentPosition:i.position.slice(),pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return d;var p=y(u);d.contentPosition[a]=-p.s;for(var f=s+1,g=p,m=p,v=null;f<=h;++f)(!(v=y(l[f]))&&m.e>g.s+n||v&&!x(v,g.s))&&(g=m.i>g.i?m:v)&&(null==d.pageNextDataIndex&&(d.pageNextDataIndex=g.i),++d.pageCount),m=v;for(f=s-1,g=p,m=p,v=null;f>=-1;--f)(v=y(l[f]))&&x(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(),i=t[o]+e.position[a];return{s:i,e:i+t[r],i:e.__legendDataIndex}}}function x(e,t){return e.e>=t&&e.s<=t+n}},_findTargetItemIndex:function(e){return this._showController?(this.getContentGroup().eachChild((function(n,a){var r=n.__legendDataIndex;null==i&&null!=r&&(i=a),r===e&&(t=a)})),null!=t?t:i):0;var t,i}});Qv.registerAction("legendScroll","legendscroll",(function(e,t){var i=e.scrollDataIndex;null!=i&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},(function(e){e.setScrollDataIndex(i)}))}));kR.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 YE=iu.Rect,XE=bu.linearMap,qE=bu.asc,KE=_e.bind,$E=_e.each,JE=["line","bar","candlestick","scatter"],QE=OR.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,i,n){QE.superApply(this,"render",arguments),ip.createOrUpdate(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=e.get("orient"),!1!==this.dataZoomModel.get("show")?(n&&"dataZoom"===n.type&&n.from===this.uid||this._buildView(),this._updateView()):this.group.removeAll()},remove:function(){QE.superApply(this,"remove",arguments),ip.clear(this,"_dispatchZoomAction")},dispose:function(){QE.superApply(this,"dispose",arguments),ip.clear(this,"_dispatchZoomAction")},_buildView:function(){var e=this.group;e.removeAll(),this._resetLocation(),this._resetInterval();var t=this._displayables.barGroup=new iu.Group;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},_resetLocation:function(){var e=this.dataZoomModel,t=this.api,i=this._findCoordRect(),n={width:t.getWidth(),height:t.getHeight()},a="horizontal"===this._orient?{right:n.width-i.x-i.width,top:n.height-30-7,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},r=Gu.getLayoutParams(e.option);_e.each(["right","top","width","height"],(function(e){"ph"===r[e]&&(r[e]=a[e])}));var o=Gu.getLayoutRect(r,n,e.padding);this._location={x:o.x,y:o.y},this._size=[o.width,o.height],"vertical"===this._orient&&this._size.reverse()},_positionGroup:function(){var e=this.group,t=this._location,i=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),a=n&&n.get("inverse"),r=this._displayables.barGroup,o=(this._dataShadowInfo||{}).otherAxisInverse;r.attr("horizontal"!==i||a?"horizontal"===i&&a?{scale:o?[-1,1]:[-1,-1]}:"vertical"!==i||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,i=this._displayables.barGroup;i.add(new YE({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get("backgroundColor")},z2:-40})),i.add(new YE({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:"transparent"},z2:0,onclick:_e.bind(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(e){var t=this._size,i=e.series,n=i.getRawData(),a=i.getShadowDim?i.getShadowDim():e.otherDim;if(null!=a){var r=n.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]],h=[[t[0],0],[0,0]],c=[],d=u[1]/(n.count()-1),p=0,f=Math.round(n.count()/t[0]);n.each([a],(function(e,t){if(f>0&&t%f)p+=d;else{var i=null==e||isNaN(e)||""===e,n=i?0:XE(e,r,l,!0);i&&!s&&t?(h.push([h[h.length-1][0],0]),c.push([c[c.length-1][0],0])):!i&&s&&(h.push([p,0]),c.push([p,0])),h.push([p,n]),c.push([p,n]),p+=d,s=i}}));var g=this.dataZoomModel;this._displayables.barGroup.add(new iu.Polygon({shape:{points:h},style:_e.defaults({fill:g.get("dataBackgroundColor")},g.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new iu.Polyline({shape:{points:c},style:g.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var e=this.dataZoomModel,t=e.get("showDataShadow");if(!1!==t){var i,n=this.ecModel;return e.eachTargetAxis((function(a,r){var o=e.getAxisProxy(a.name,r).getTargetSeriesModels();_e.each(o,(function(e){if(!(i||!0!==t&&_e.indexOf(JE,e.get("type"))<0)){var o,s=n.getComponent(a.axis,r).axis,l={x:"y",y:"x",radius:"angle",angle:"radius"}[a.name],u=e.coordinateSystem;null!=l&&u.getOtherAxis&&(o=u.getOtherAxis(s).inverse),l=e.getData().mapDimension(l),i={thisAxis:s,series:e,thisDim:a.name,otherDim:l,otherAxisInverse:o}}}),this)}),this),i}},_renderHandle:function(){var e=this._displayables,t=e.handles=[],i=e.handleLabels=[],n=this._displayables.barGroup,a=this._size,r=this.dataZoomModel;n.add(e.filler=new YE({draggable:!0,cursor:ez(this._orient),drift:KE(this._onDragMove,this,"all"),ondragstart:KE(this._showDataInfo,this,!0),ondragend:KE(this._onDragEnd,this),onmouseover:KE(this._showDataInfo,this,!0),onmouseout:KE(this._showDataInfo,this,!1),style:{fill:r.get("fillerColor"),textPosition:"inside"}})),n.add(new YE({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)"}})),$E([0,1],(function(e){var a=iu.createIcon(r.get("handleIcon"),{cursor:ez(this._orient),draggable:!0,drift:KE(this._onDragMove,this,e),ondragend:KE(this._onDragEnd,this),onmouseover:KE(this._showDataInfo,this,!0),onmouseout:KE(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),o=a.getBoundingRect();this._handleHeight=bu.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),n.add(t[e]=a);var l=r.textStyleModel;this.group.add(i[e]=new iu.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=[XE(e[0],[0,100],t,!0),XE(e[1],[0,100],t,!0)]},_updateInterval:function(e,t){var i=this.dataZoomModel,n=this._handleEnds,a=this._getViewExtent(),r=i.findRepresentativeAxisProxy().getMinMaxSpan(),o=[0,100];iA(t,n,a,i.get("zoomLock")?"all":e,null!=r.minSpan?XE(r.minSpan,o,a,!0):null,null!=r.maxSpan?XE(r.maxSpan,o,a,!0):null);var s=this._range,l=this._range=qE([XE(n[0],a,o,!0),XE(n[1],a,o,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},_updateView:function(e){var t=this._displayables,i=this._handleEnds,n=qE(i.slice()),a=this._size;$E([0,1],(function(e){var n=t.handles[e],r=this._handleHeight;n.attr({scale:[r/2,r/2],position:[i[e],a[1]/2-r/2]})}),this),t.filler.setShape({x:n[0],y:0,width:n[1]-n[0],height:a[1]}),this._updateDataInfo(e)},_updateDataInfo:function(e){var t=this.dataZoomModel,i=this._displayables,n=i.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 h=qE(this._handleEnds.slice());function c(e){var t=iu.getTransform(i.handles[e].parent,this.group),o=iu.transformDirection(0===e?"right":"left",t),s=this._handleWidth/2+5,l=iu.applyTransform([h[e]+(0===e?-s:s),this._size[1]/2],t);n[e].setStyle({x:l[0],y:l[1],textVerticalAlign:"horizontal"===a?"middle":o,textAlign:"horizontal"===a?o:"center",text:r[e]})}c.call(this,0),c.call(this,1)},_formatLabel:function(e,t){var i=this.dataZoomModel,n=i.get("labelFormatter"),a=i.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 _e.isFunction(n)?n(e,r):_e.isString(n)?n.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,i,n){this._dragging=!0,Ke.stop(n.event);var a=this._displayables.barGroup.getLocalTransform(),r=iu.applyTransform([t,i],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,i=this._displayables.barGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(i[0]<0||i[0]>t[0]||i[1]<0||i[1]>t[1])){var n=this._handleEnds,a=(n[0]+n[1])/2,r=this._updateInterval("all",i[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($E(this.getTargetCoordInfo(),(function(t){if(!e&&t.length){var i=t[0].model.coordinateSystem;e=i.getRect&&i.getRect()}})),!e){var t=this.api.getWidth(),i=this.api.getHeight();e={x:.2*t,y:.2*i,width:.6*t,height:.6*i}}return e}});function ez(e){return"vertical"===e?"ns-resize":"ew-resize"}kR.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var tz="\0_ec_dataZoom_roams";function iz(e){var t=e.getZr();return t[tz]||(t[tz]={})}function nz(e){_e.each(e,(function(t,i){t.count||(t.controller.dispose(),delete e[i])}))}function az(e,t){e.dispatchAction({type:"dataZoom",batch:t})}var rz={register:function(e,t){var i=iz(e),n=t.dataZoomId,a=t.coordId;_e.each(i,(function(e,i){var r=e.dataZoomInfos;r[n]&&_e.indexOf(t.allCoordIds,a)<0&&(delete r[n],e.count--)})),nz(i);var r=i[a];r||((r=i[a]={coordId:a,dataZoomInfos:{},count:0}).controller=function(e,t){var i=new Uw(e.getZr());return _e.each(["pan","zoom","scrollMove"],(function(e){i.on(e,(function(i){var n=[];_e.each(t.dataZoomInfos,(function(a){if(i.isAvailableBehavior(a.dataZoomModel.option)){var r=(a.getRange||{})[e],o=r&&r(t.controller,i);!a.dataZoomModel.get("disabled",!0)&&o&&n.push({dataZoomId:a.dataZoomId,start:o[0],end:o[1]})}})),n.length&&t.dispatchAction(n)}))})),i}(e,r),r.dispatchAction=_e.curry(az,e)),!r.dataZoomInfos[n]&&r.count++,r.dataZoomInfos[n]=t;var o,s,l,u,h=(o=r.dataZoomInfos,l={type_true:2,type_move:1,type_false:0,type_undefined:-1},u=!0,_e.each(o,(function(e){var t=e.dataZoomModel,i=!t.get("disabled",!0)&&(!t.get("zoomLock",!0)||"move");l["type_"+i]>l["type_"+s]&&(s=i),u&=t.get("preventDefaultMouseMove",!0)})),{controlType:s,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!u}});r.controller.enable(h.controlType,h.opt),r.controller.setPointerChecker(t.containsPoint),ip.createOrUpdate(r,"dispatchAction",t.dataZoomModel.get("throttle",!0),"fixRate")},unregister:function(e,t){var i=iz(e);_e.each(i,(function(e){e.controller.dispose();var i=e.dataZoomInfos;i[t]&&(delete i[t],e.count--)})),nz(i)},generateCoordId:function(e){return e.type+"\0_"+e.id}},oz=_e.bind,sz=OR.extend({type:"dataZoom.inside",init:function(e,t){this._range},render:function(e,t,i,n){sz.superApply(this,"render",arguments),this._range=e.getPercentRange(),_e.each(this.getTargetCoordInfo(),(function(t,n){var a=_e.map(t,(function(e){return rz.generateCoordId(e.model)}));_e.each(t,(function(t){var r=t.model,o={};_e.each(["pan","zoom","scrollMove"],(function(e){o[e]=oz(lz[e],this,t,n)}),this),rz.register(i,{coordId:rz.generateCoordId(r),allCoordIds:a,containsPoint:function(e,t,i){return r.coordinateSystem.containPoint([t,i])},dataZoomId:e.id,dataZoomModel:e,getRange:o})}),this)}),this)},dispose:function(){rz.unregister(this.api,this.dataZoomModel.id),sz.superApply(this,"dispose",arguments),this._range=null}}),lz={zoom:function(e,t,i,n){var a=this._range,r=a.slice(),o=e.axisModels[0];if(o){var s=hz[t](null,[n.originX,n.originY],o,i,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/n.scale,0);r[0]=(r[0]-l)*u+l,r[1]=(r[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return iA(0,r,[0,100],0,h.minSpan,h.maxSpan),this._range=r,a[0]!==r[0]||a[1]!==r[1]?r:void 0}},pan:uz((function(e,t,i,n,a,r){var o=hz[n]([r.oldX,r.oldY],[r.newX,r.newY],t,a,i);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength})),scrollMove:uz((function(e,t,i,n,a,r){return hz[n]([0,0],[r.scrollDelta,r.scrollDelta],t,a,i).signal*(e[1]-e[0])*r.scrollDelta}))};function uz(e){return function(t,i,n,a){var r=this._range,o=r.slice(),s=t.axisModels[0];if(s){var l=e(o,s,t,i,n,a);return iA(l,o,[0,100],"all"),this._range=o,r[0]!==o[0]||r[1]!==o[1]?o:void 0}}}var hz={grid:function(e,t,i,n,a){var r=i.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,i,n,a){var r=i.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"===i.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,i,n,a){var r=i.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}},cz=_e.each;function dz(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}var pz=function(e){var t=e&&e.visualMap;_e.isArray(t)||(t=t?[t]:[]),cz(t,(function(e){if(e){dz(e,"splitList")&&!dz(e,"pieces")&&(e.pieces=e.splitList,delete e.splitList);var t=e.pieces;t&&_e.isArray(t)&&cz(t,(function(e){_e.isObject(e)&&(dz(e,"start")&&!dz(e,"min")&&(e.min=e.start),dz(e,"end")&&!dz(e,"max")&&(e.max=e.end))}))}}))};ju.registerSubTypeDefaulter("visualMap",(function(e){return e.categories||(e.pieces?e.pieces.length>0:e.splitNumber>0)&&!e.calculable?"piecewise":"continuous"}));var fz=Qv.PRIORITY.VISUAL.COMPONENT;function gz(e,t,i,n){for(var a=t.targetVisuals[n],r=qM.prepareVisualTypes(a),o={color:e.getData().getVisual("color")},s=0,l=r.length;s<l;s++){var u=r[s],h=a["opacity"===u?"__alphaForOpacity":u];h&&h.applyVisual(i,c,d)}return o.color;function c(e){return o[e]}function d(e,t){o[e]=t}}Qv.registerVisual(fz,{createOnAllSeries:!0,reset:function(e,t){var i=[];return t.eachComponent("visualMap",(function(t){var n=e.pipelineContext;!t.isTargetSeries(e)||n&&n.large||i.push(cN.incrementalApplyVisual(t.stateList,t.targetVisuals,_e.bind(t.getValueState,t),t.getDataDimension(e.getData())))})),i}}),Qv.registerVisual(fz,{createOnAllSeries:!0,reset:function(e,t){var i=e.getData(),n=[];t.eachComponent("visualMap",(function(t){if(t.isTargetSeries(e)){var a=t.getVisualMeta(_e.bind(gz,null,e,t))||{stops:[],outerColors:[]},r=t.getDataDimension(i),o=i.getDimensionInfo(r);null!=o&&(a.dimension=o.index,n.push(a))}})),e.getData().setVisual("visualMeta",n)}});var mz={get:function(e,t,i){var n=_e.clone((vz[e]||{})[t]);return i&&_e.isArray(n)?n[n.length-1]:n}},vz={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]}},yz=mz,xz=qM.mapVisual,_z=qM.eachVisual,bz=_e.isArray,wz=_e.each,Sz=bu.asc,Mz=bu.linearMap,Iz=_e.noop,Tz=Qv.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,i){this._dataExtent,this.targetVisuals={},this.controllerVisuals={},this.textStyleModel,this.itemSize,this.mergeDefaultAndTheme(e,i)},optionUpdated:function(e,t){var i=this.option;K.canvasSupported||(i.realtime=!1),!t&&cN.replaceVisualOption(i,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(e){var t=this.stateList;e=_e.bind(e,this),this.controllerVisuals=cN.createVisualMappings(this.option.controller,t,e),this.targetVisuals=cN.createVisualMappings(this.option.target,t,e)},getTargetSeriesIndices:function(){var e=this.option.seriesIndex,t=[];return null==e||"all"===e?this.ecModel.eachSeries((function(e,i){t.push(i)})):t=vr.normalizeToArray(e),t},eachTargetSeries:function(e,t){_e.each(this.getTargetSeriesIndices(),(function(i){e.call(t,this.ecModel.getSeriesByIndex(i))}),this)},isTargetSeries:function(e){var t=!1;return this.eachTargetSeries((function(i){i===e&&(t=!0)})),t},formatValueText:function(e,t,i){var n,a,r=this.option,o=r.precision,s=this.dataBound,l=r.formatter;return i=i||["<",">"],_e.isArray(e)&&(e=e.slice(),n=!0),a=t?e:n?[u(e[0]),u(e[1])]:u(e),_e.isString(l)?l.replace("{value}",n?a[0]:a).replace("{value2}",n?a[1]:a):_e.isFunction(l)?n?l(e[0],e[1]):l(e):n?e[0]===s[0]?i[0]+" "+a[1]:e[1]===s[1]?i[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=Sz([e.min,e.max]);this._dataExtent=t},getDataDimension:function(e){var t=this.option.dimension,i=e.dimensions;if(null!=t||i.length){if(null!=t)return e.getDimension(t);for(var n=e.dimensions,a=n.length-1;a>=0;a--){var r=n[a];if(!e.getDimensionInfo(r).isCalculationCoord)return r}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){var e=this.ecModel,t=this.option,i={inRange:t.inRange,outOfRange:t.outOfRange},n=t.target||(t.target={}),a=t.controller||(t.controller={});_e.merge(n,i),_e.merge(a,i);var r=this.isCategory();function o(i){bz(t.color)&&!i.inRange&&(i.inRange={color:t.color.slice().reverse()}),i.inRange=i.inRange||{color:e.get("gradientColor")},wz(this.stateList,(function(e){var t=i[e];if(_e.isString(t)){var n=yz.get(t,"active",r);n?(i[e]={},i[e][t]=n):delete i[e]}}),this)}o.call(this,n),o.call(this,a),function(e,t,i){var n=e[t],a=e[i];n&&!a&&(a=e[i]={},wz(n,(function(e,t){if(qM.isValidType(t)){var i=yz.get(t,"inactive",r);null!=i&&(a[t]=i,"color"!==t||a.hasOwnProperty("opacity")||a.hasOwnProperty("colorAlpha")||(a.opacity=[0,0]))}})))}.call(this,n,"inRange","outOfRange"),function(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,i=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,n=this.get("inactiveColor");wz(this.stateList,(function(a){var o=this.itemSize,s=e[a];s||(s=e[a]={color:r?n:[n]}),null==s.symbol&&(s.symbol=t&&_e.clone(t)||(r?"roundRect":["roundRect"])),null==s.symbolSize&&(s.symbolSize=i&&_e.clone(i)||(r?o[0]:[o[0],o[0]])),s.symbol=xz(s.symbol,(function(e){return"none"===e||"square"===e?"roundRect":e}));var l=s.symbolSize;if(null!=l){var u=-1/0;_z(l,(function(e){e>u&&(u=e)})),s.symbolSize=xz(l,(function(e){return Mz(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:Iz,getValueState:Iz,getVisualMeta:Iz}),Az=[20,140],Cz=Tz.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){Cz.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual((function(e){e.mappingMethod="linear",e.dataExtent=this.getExtent()})),this._resetRange()},resetItemSize:function(){Cz.superApply(this,"resetItemSize",arguments);var e=this.itemSize;"horizontal"===this._orient&&e.reverse(),(null==e[0]||isNaN(e[0]))&&(e[0]=Az[0]),(null==e[1]||isNaN(e[1]))&&(e[1]=Az[1])},_resetRange:function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):_e.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(){Tz.prototype.completeVisualOption.apply(this,arguments),_e.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=bu.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,i=this.getExtent();return(t[0]<=i[0]||t[0]<=e)&&(t[1]>=i[1]||e<=t[1])?"inRange":"outOfRange"},findTargetDataIndices:function(e){var t=[];return this.eachTargetSeries((function(i){var n=[],a=i.getData();a.each(this.getDataDimension(a),(function(t,i){e[0]<=t&&t<=e[1]&&n.push(i)}),this),t.push({seriesId:i.id,dataIndex:n})}),this),t},getVisualMeta:function(e){var t=Dz(this,"outOfRange",this.getExtent()),i=Dz(this,"inRange",this.option.range.slice()),n=[];function a(t,i){n.push({value:t,color:e(t,i)})}for(var r=0,o=0,s=i.length,l=t.length;o<l&&(!i.length||t[o]<=i[0]);o++)t[o]<i[r]&&a(t[o],"outOfRange");for(var u=1;r<s;r++,u=0)u&&n.length&&a(i[r],"outOfRange"),a(i[r],"inRange");for(u=1;o<l;o++)(!i.length||i[i.length-1]<t[o])&&(u&&(n.length&&a(n[n.length-1].value,"outOfRange"),u=0),a(t[o],"outOfRange"));var h=n.length;return{stops:n,outerColors:[h?n[0].color:"transparent",h?n[h-1].color:"transparent"]}}});function Dz(e,t,i){if(i[0]===i[1])return i.slice();for(var n=(i[1]-i[0])/200,a=i[0],r=[],o=0;o<=200&&a<i[1];o++)r.push(a),a+=n;return r.push(i[1]),r}var Lz=Qv.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,i,n){this.visualMapModel=e,!1!==e.get("show")?this.doRender.apply(this,arguments):this.group.removeAll()},renderBackground:function(e){var t=this.visualMapModel,i=Du.normalizeCssArray(t.get("padding")||0),n=e.getBoundingRect();e.add(new iu.Rect({z2:-1,silent:!0,shape:{x:n.x-i[3],y:n.y-i[0],width:n.width+i[3]+i[1],height:n.height+i[0]+i[2]},style:{fill:t.get("backgroundColor"),stroke:t.get("borderColor"),lineWidth:t.get("borderWidth")}}))},getControllerVisual:function(e,t,i){var n=(i=i||{}).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[n||a.getValueState(e)],h=qM.prepareVisualTypes(u);return _e.each(h,(function(n){var a=u[n];i.convertOpacityToAlpha&&"opacity"===n&&(n="colorAlpha",a=u.__alphaForOpacity),qM.dependsOn(n,t)&&a&&a.applyVisual(e,s,l)})),r[t]},positionGroup:function(e){var t=this.visualMapModel,i=this.api;Gu.positionElement(e,t.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()})},doRender:_e.noop}),Pz=Gu.getLayoutRect;var kz={getItemAlign:function(e,t,i){var n=e.option,a=n.align;if(null!=a&&"auto"!==a)return a;for(var r={width:t.getWidth(),height:t.getHeight()},o="horizontal"===n.orient?1:0,s=[["left","right","width"],["top","bottom","height"]],l=s[o],u=[0,null,10],h={},c=0;c<3;c++)h[s[1-o][c]]=u[c],h[l[c]]=2===c?i[0]:n[l[c]];var d=[["x","width",3],["y","height",0]][o],p=Pz(h,r,n.padding);return l[(p.margin[d[2]]||0)+p[d[0]]+.5*p[d[1]]<.5*r[d[1]]?0:1]},makeHighDownBatch:function(e,t){return _e.each(e||[],(function(e){null!=e.dataIndex&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey="visualMap"+(t?t.componentIndex:"")})),e}},Oz=bu.linearMap,Rz=_e.each,Nz=Math.min,Ez=Math.max,zz=Lz.extend({type:"visualMap.continuous",init:function(){zz.superApply(this,"init",arguments),this._shapes={},this._dataInterval=[],this._handleEnds=[],this._orient,this._useHandle,this._hoverLinkDataIndices=[],this._dragging,this._hovering},doRender:function(e,t,i,n){n&&"selectDataRange"===n.type&&n.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 i=e.get("text");this._renderEndsText(t,i,0),this._renderEndsText(t,i,1),this._updateView(!0),this.renderBackground(t),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(t)},_renderEndsText:function(e,t,i){if(t){var n=t[1-i];n=null!=n?n+"":"";var a=this.visualMapModel,r=a.get("textGap"),o=a.itemSize,s=this._shapes.barGroup,l=this._applyTransform([o[0]/2,0===i?-r:o[1]+r],s),u=this._applyTransform(0===i?"bottom":"top",s),h=this._orient,c=this.visualMapModel.textStyleModel;this.group.add(new iu.Text({style:{x:l[0],y:l[1],textVerticalAlign:"horizontal"===h?"middle":u,textAlign:"horizontal"===h?u:"center",text:n,textFont:c.getFont(),textFill:c.getTextColor()}}))}},_renderBar:function(e){var t=this.visualMapModel,i=this._shapes,n=t.itemSize,a=this._orient,r=this._useHandle,o=kz.getItemAlign(t,this.api,n),s=i.barGroup=this._createBarGroup(o);s.add(i.outOfRange=Bz()),s.add(i.inRange=Bz(null,r?Gz(this._orient):null,_e.bind(this._dragHandle,this,"all",!1),_e.bind(this._dragHandle,this,"all",!0)));var l=t.textStyleModel.getTextRect("国"),u=Ez(l.width,l.height);r&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(s,0,n,u,a,o),this._createHandle(s,1,n,u,a,o)),this._createIndicator(s,n,u,a),e.add(s)},_createHandle:function(e,t,i,n,a){var r=_e.bind(this._dragHandle,this,t,!1),o=_e.bind(this._dragHandle,this,t,!0),s=Bz(function(e,t){return 0===e?[[0,0],[t,0],[t,-t]]:[[0,0],[t,0],[t,t]]}(t,n),Gz(this._orient),r,o);s.position[0]=i[0],e.add(s);var l=this.visualMapModel.textStyleModel,u=new iu.Text({draggable:!0,drift:r,onmousemove:function(e){Ke.stop(e.event)},ondragend:o,style:{x:0,y:0,text:"",textFont:l.getFont(),textFill:l.getTextColor()}});this.group.add(u);var h=["horizontal"===a?n/2:1.5*n,"horizontal"===a?0===t?-1.5*n:1.5*n:0===t?-n/2:n/2],c=this._shapes;c.handleThumbs[t]=s,c.handleLabelPoints[t]=h,c.handleLabels[t]=u},_createIndicator:function(e,t,i,n){var a=Bz([[0,0]],"move");a.position[0]=t[0],a.attr({invisible:!0,silent:!0}),e.add(a);var r=this.visualMapModel.textStyleModel,o=new iu.Text({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textFont:r.getFont(),textFill:r.getTextColor()}});this.group.add(o);var s=["horizontal"===n?i/2:9,0],l=this._shapes;l.indicator=a,l.indicatorLabel=o,l.indicatorLabelPoint=s},_dragHandle:function(e,t,i,n){if(this._useHandle){if(this._dragging=!t,!t){var a=this._applyTransform([i,n],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():Vz(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[e],!1)}},_resetInterval:function(){var e=this.visualMapModel,t=this._dataInterval=e.getSelected(),i=e.getExtent(),n=[0,e.itemSize[1]];this._handleEnds=[Oz(t[0],i,n,!0),Oz(t[1],i,n,!0)]},_updateInterval:function(e,t){t=t||0;var i=this.visualMapModel,n=this._handleEnds,a=[0,i.itemSize[1]];iA(t,n,a,e,0);var r=i.getExtent();this._dataInterval=[Oz(n[0],a,r,!0),Oz(n[1],a,r,!0)]},_updateView:function(e){var t=this.visualMapModel,i=t.getExtent(),n=this._shapes,a=[0,t.itemSize[1]],r=e?a:this._handleEnds,o=this._createBarVisual(this._dataInterval,i,r,"inRange"),s=this._createBarVisual(i,i,a,"outOfRange");n.inRange.setStyle({fill:o.barColor,opacity:o.opacity}).setShape("points",o.barPoints),n.outOfRange.setStyle({fill:s.barColor,opacity:s.opacity}).setShape("points",s.barPoints),this._updateHandle(r,o)},_createBarVisual:function(e,t,i,n){var a={forceState:n,convertOpacityToAlpha:!0},r=this._makeColorGradient(e,a),o=[this.getControllerVisual(e[0],"symbolSize",a),this.getControllerVisual(e[1],"symbolSize",a)],s=this._createBarPoints(i,o);return{barColor:new qs(0,0,0,1,r),barPoints:s,handlesColor:[r[0].color,r[r.length-1].color]}},_makeColorGradient:function(e,t){var i=[],n=(e[1]-e[0])/100;i.push({color:this.getControllerVisual(e[0],"color",t),offset:0});for(var a=1;a<100;a++){var r=e[0]+n*a;if(r>e[1])break;i.push({color:this.getControllerVisual(r,"color",t),offset:a/100})}return i.push({color:this.getControllerVisual(e[1],"color",t),offset:1}),i},_createBarPoints:function(e,t){var i=this.visualMapModel.itemSize;return[[i[0]-t[0],e[0]],[i[0],e[0]],[i[0],e[1]],[i[0]-t[1],e[1]]]},_createBarGroup:function(e){var t=this._orient,i=this.visualMapModel.get("inverse");return new iu.Group("horizontal"!==t||i?"horizontal"===t&&i?{scale:"bottom"===e?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==t||i?{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 i=this._shapes,n=this.visualMapModel,a=i.handleThumbs,r=i.handleLabels;Rz([0,1],(function(o){var s=a[o];s.setStyle("fill",t.handlesColor[o]),s.position[1]=e[o];var l=iu.applyTransform(i.handleLabelPoints[o],iu.getTransform(s,this.group));r[o].setStyle({x:l[0],y:l[1],text:n.formatValueText(this._dataInterval[o]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===o?"bottom":"top":"left",i.barGroup)})}),this)}},_showIndicator:function(e,t,i,n){var a=this.visualMapModel,r=a.getExtent(),o=a.itemSize,s=[0,o[1]],l=Oz(e,r,s,!0),u=this._shapes,h=u.indicator;if(h){h.position[1]=l,h.attr("invisible",!1),h.setShape("points",function(e,t,i,n){return e?[[0,-Nz(t,Ez(i,0))],[6,0],[0,Nz(t,Ez(n-i,0))]]:[[0,0],[5,-5],[5,5]]}(!!i,n,l,o[1]));var c=this.getControllerVisual(e,"color",{convertOpacityToAlpha:!0});h.setStyle("fill",c);var d=iu.applyTransform(u.indicatorLabelPoint,iu.getTransform(h,this.group)),p=u.indicatorLabel;p.attr("invisible",!1);var f=this._applyTransform("left",u.barGroup),g=this._orient;p.setStyle({text:(i||"")+a.formatValueText(t),textVerticalAlign:"horizontal"===g?f:"middle",textAlign:"horizontal"===g?"center":f,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 i=e.visualMapModel.itemSize,n=e._applyTransform([t.offsetX,t.offsetY],e._shapes.barGroup,!0,!0);n[1]=Nz(Ez(0,n[1]),i[1]),e._doHoverLinkToSeries(n[1],0<=n[0]&&n[0]<=i[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 i=this.visualMapModel,n=i.itemSize;if(i.option.hoverLink){var a=[0,n[1]],r=i.getExtent();e=Nz(Ez(a[0],e),a[1]);var o=function(e,t,i){var n=6,a=e.get("hoverLinkDataSize");a&&(n=Oz(a,t,i,!0)/2);return n}(i,r,a),s=[e-o,e+o],l=Oz(e,a,r,!0),u=[Oz(s[0],a,r,!0),Oz(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 h=this._hoverLinkDataIndices,c=[];(t||Vz(i))&&(c=this._hoverLinkDataIndices=i.findTargetDataIndices(u));var d=vr.compressBatches(h,c);this._dispatchHighDown("downplay",kz.makeHighDownBatch(d[0],i)),this._dispatchHighDown("highlight",kz.makeHighDownBatch(d[1],i))}},_hoverLinkFromSeriesMouseOver:function(e){var t=e.target,i=this.visualMapModel;if(t&&null!=t.dataIndex){var n=this.ecModel.getSeriesByIndex(t.seriesIndex);if(i.isTargetSeries(n)){var a=n.getData(t.dataType),r=a.get(i.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",kz.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,i,n){var a=iu.getTransform(t,n?null:this.group);return iu[_e.isArray(e)?"applyTransform":"transformDirection"](e,a,i)},_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 Bz(e,t,i,n){return new iu.Polygon({shape:{points:e},draggable:!!i,cursor:t,drift:i,onmousemove:function(e){Ke.stop(e.event)},ondragend:n})}function Vz(e){var t=e.get("hoverLinkOnHandle");return!!(null==t?e.get("realtime"):t)}function Gz(e){return"vertical"===e?"ns-resize":"ew-resize"}Qv.registerAction({type:"selectDataRange",event:"dataRangeSelected",update:"update"},(function(e,t){t.eachComponent({mainType:"visualMap",query:e},(function(t){t.setSelected(e.selected)}))})),Qv.registerPreprocessor(pz);var Fz=bu.reformIntervals,Hz=Tz.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){Hz.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var i=this._mode=this._determineMode();Wz[this._mode].call(this),this._resetSelected(e,t);var n=this.option.categories;this.resetVisual((function(e,t){"categories"===i?(e.mappingMethod="category",e.categories=_e.clone(n)):(e.dataExtent=this.getExtent(),e.mappingMethod="piecewise",e.pieceList=_e.map(this._pieceList,(function(e){e=_e.clone(e);return"inRange"!==t&&(e.visual=null),e})))}))},completeVisualOption:function(){var e=this.option,t={},i=qM.listVisualTypes(),n=this.isCategory();function a(e,t,i){return e&&e[t]&&(_e.isObject(e[t])?e[t].hasOwnProperty(i):e[t]===i)}_e.each(e.pieces,(function(e){_e.each(i,(function(i){e.hasOwnProperty(i)&&(t[i]=1)}))})),_e.each(t,(function(t,i){var r=0;_e.each(this.stateList,(function(t){r|=a(e,t,i)||a(e.target,t,i)}),this),!r&&_e.each(this.stateList,(function(t){(e[t]||(e[t]={}))[i]=yz.get(i,"inRange"===t?"active":"inactive",n)}))}),this),Tz.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(e,t){var i=this.option,n=this._pieceList,a=(t?i:e).selected||{};if(i.selected=a,_e.each(n,(function(e,t){var i=this.getSelectedMapKey(e);a.hasOwnProperty(i)||(a[i]=!0)}),this),"single"===i.selectedMode){var r=!1;_e.each(n,(function(e,t){var i=this.getSelectedMapKey(e);a[i]&&(r?a[i]=!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=_e.clone(e)},getValueState:function(e){var t=qM.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(i){var n=[],a=i.getData();a.each(this.getDataDimension(a),(function(t,i){qM.findPieceIndex(t,this._pieceList)===e&&n.push(i)}),this),t.push({seriesId:i.id,dataIndex:n})}),this),t},getRepresentValue:function(e){var t;if(this.isCategory())t=e.value;else if(null!=e.value)t=e.value;else{var i=e.interval||[];t=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return t},getVisualMeta:function(e){if(!this.isCategory()){var t=[],i=[],n=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 _e.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:i}}function s(a,r){var o=n.getRepresentValue({interval:a});r||(r=n.getValueState(o));var s=e(o,r);a[0]===-1/0?i[0]=s:a[1]===1/0?i[1]=s:t.push({value:a[0],color:s},{value:a[1],color:s})}}}),Wz={splitNumber:function(){var e=this.option,t=this._pieceList,i=Math.min(e.precision,20),n=this.getExtent(),a=e.splitNumber;a=Math.max(parseInt(a,10),1),e.splitNumber=a;for(var r=(n[1]-n[0])/a;+r.toFixed(i)!==r&&i<5;)i++;e.precision=i,r=+r.toFixed(i),e.minOpen&&t.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,s=n[0];o<a;s+=r,o++){var l=o===a-1?n[1]:s+r;t.push({interval:[s,l],close:[1,1]})}e.maxOpen&&t.push({interval:[n[1],1/0],close:[0,0]}),Fz(t),_e.each(t,(function(e,t){e.index=t,e.text=this.formatValueText(e.interval)}),this)},categories:function(){var e=this.option;_e.each(e.categories,(function(e){this._pieceList.push({text:this.formatValueText(e,!0),value:e})}),this),Uz(e,this._pieceList)},pieces:function(){var e=this.option,t=this._pieceList;_e.each(e.pieces,(function(e,i){_e.isObject(e)||(e={value:e});var n={text:"",index:i};if(null!=e.label&&(n.text=e.label),e.hasOwnProperty("value")){var a=n.value=e.value;n.interval=[a,a],n.close=[1,1]}else{for(var r=n.interval=[],o=n.close=[0,0],s=[1,0,1],l=[-1/0,1/0],u=[],h=0;h<2;h++){for(var c=[["gte","gt","min"],["lte","lt","max"]][h],d=0;d<3&&null==r[h];d++)r[h]=e[c[d]],o[h]=s[d],u[h]=2===d;null==r[h]&&(r[h]=l[h])}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]&&(n.value=r[0])}n.visual=qM.retrieveVisuals(e),t.push(n)}),this),Uz(e,t),Fz(t),_e.each(t,(function(e){var t=e.close,i=[["<","≤"][t[1]],[">","≥"][t[0]]];e.text=e.text||this.formatValueText(null!=e.value?e.value:e.interval,!1,i)}),this)}};function Uz(e,t){var i=e.inverse;("vertical"===e.orient?!i:i)&&t.reverse()}var Zz=ev.createSymbol;Lz.extend({type:"visualMap.piecewise",doRender:function(){var e=this.group;e.removeAll();var t=this.visualMapModel,i=t.get("textGap"),n=t.textStyleModel,a=n.getFont(),r=n.getTextColor(),o=this._getItemAlign(),s=t.itemSize,l=this._getViewData(),u=l.endsText,h=_e.retrieve(t.get("showLabel",!0),!u);u&&this._renderEndsText(e,u[0],s,h,o),_e.each(l.viewPieceList,(function(n){var l=n.piece,u=new iu.Group;u.onclick=_e.bind(this._onItemClick,this,l),this._enableHoverLink(u,n.indexInModelPieceList);var c=t.getRepresentValue(l);if(this._createItemSymbol(u,c,[0,0,s[0],s[1]]),h){var d=this.visualMapModel.getValueState(c);u.add(new iu.Text({style:{x:"right"===o?-i:s[0]+i,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,h,o),Gu.box(t.get("orient"),e,t.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},_enableHoverLink:function(e,t){function i(e){var i=this.visualMapModel;i.option.hoverLink&&this.api.dispatchAction({type:e,batch:kz.makeHighDownBatch(i.findTargetDataIndices(t),i)})}e.on("mouseover",_e.bind(i,this,"highlight")).on("mouseout",_e.bind(i,this,"downplay"))},_getItemAlign:function(){var e=this.visualMapModel,t=e.option;if("vertical"===t.orient)return kz.getItemAlign(e,this.api,e.itemSize);var i=t.align;return i&&"auto"!==i||(i="left"),i},_renderEndsText:function(e,t,i,n,a){if(t){var r=new iu.Group,o=this.visualMapModel.textStyleModel;r.add(new iu.Text({style:{x:n?"right"===a?i[0]:0:i[0]/2,y:i[1]/2,textVerticalAlign:"middle",textAlign:n?a:"center",text:t,textFont:o.getFont(),textFill:o.getTextColor()}})),e.add(r)}},_getViewData:function(){var e=this.visualMapModel,t=_e.map(e.getPieceList(),(function(e,t){return{piece:e,indexInModelPieceList:t}})),i=e.get("text"),n=e.get("orient"),a=e.get("inverse");return("horizontal"===n?a:!a)?t.reverse():i&&(i=i.slice().reverse()),{viewPieceList:t,endsText:i}},_createItemSymbol:function(e,t,i){e.add(Zz(this.getControllerVisual(t,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(t,"color")))},_onItemClick:function(e){var t=this.visualMapModel,i=t.option,n=_e.clone(i.selected),a=t.getSelectedMapKey(e);"single"===i.selectedMode?(n[a]=!0,_e.each(n,(function(e,t){n[t]=t===a}))):n[a]=!n[a],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:n})}});Qv.registerPreprocessor(pz);var jz,Yz="urn:schemas-microsoft-com:vml",Xz="undefined"==typeof window?null:window,qz=!1,Kz=Xz&&Xz.document;if(Kz&&!K.canvasSupported)try{!Kz.namespaces.zrvml&&Kz.namespaces.add("zrvml",Yz),jz=function(e){return Kz.createElement("<zrvml:"+e+' class="zrvml">')}}catch(e){jz=function(e){return Kz.createElement("<"+e+' xmlns="'+Yz+'" class="zrvml">')}}var $z={doc:Kz,createNode:function(e){return jz(e)},initVML:function(){if(!qz&&Kz){qz=!0;var e=Kz.styleSheets;e.length<31?Kz.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):e[0].addRule(".zrvml","behavior:url(#default#VML)")}}},Jz=Te.applyTransform,Qz=fo.CMD,eB=Math.round,tB=Math.sqrt,iB=Math.abs,nB=Math.cos,aB=Math.sin,rB=Math.max;if(!K.canvasSupported){var oB=21600,sB=oB/2,lB=function(e){e.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",e.coordsize=oB+","+oB,e.coordorigin="0,0"},uB=function(e,t,i){return"rgb("+[e,t,i].join(",")+")"},hB=function(e,t){t&&e&&t.parentNode!==e&&e.appendChild(t)},cB=function(e,t){t&&e&&t.parentNode===e&&e.removeChild(t)},dB=function(e,t,i){return 1e5*(parseFloat(e)||0)+1e3*(parseFloat(t)||0)+i},pB=fa.parsePercent,fB=function(e,t,i){var n=Xt.parse(t);i=+i,isNaN(i)&&(i=1),n&&(e.color=uB(n[0],n[1],n[2]),e.opacity=i*n[3])},gB=function(e){var t=Xt.parse(e);return[uB(t[0],t[1],t[2]),t[3]]},mB=function(e,t,i,n){var a="fill"===t,r=e.getElementsByTagName(t)[0];null!=i[t]&&"none"!==i[t]&&(a||!a&&i.lineWidth)?(e[a?"filled":"stroked"]="true",i[t]instanceof Ys&&cB(e,r),r||(r=$z.createNode(t)),a?function(e,t,i){var n=t.fill;if(null!=n)if(n instanceof Ys){var a,r=0,o=[0,0],s=0,l=1,u=i.getBoundingRect(),h=u.width,c=u.height;if("linear"===n.type){a="gradient";var d=i.transform,p=[n.x*h,n.y*c],f=[n.x2*h,n.y2*c];d&&(Jz(p,p,d),Jz(f,f,d));var g=f[0]-p[0],m=f[1]-p[1];(r=180*Math.atan2(g,m)/Math.PI)<0&&(r+=360),r<1e-6&&(r=0)}else{a="gradientradial";p=[n.x*h,n.y*c],d=i.transform;var v=i.scale,y=h,x=c;o=[(p[0]-u.x)/y,(p[1]-u.y)/x],d&&Jz(p,p,d),y/=v[0]*oB,x/=v[1]*oB;var _=rB(y,x);s=0/_,l=2*n.r/_-s}var b=n.colorStops.slice();b.sort((function(e,t){return e.offset-t.offset}));for(var w=b.length,S=[],M=[],I=0;I<w;I++){var T=b[I],A=gB(T.color);M.push(T.offset*l+s+" "+A[0]),0!==I&&I!==w-1||S.push(A)}if(w>=2){var C=S[0][0],D=S[1][0],L=S[0][1]*t.opacity,P=S[1][1]*t.opacity;e.type=a,e.method="none",e.focus="100%",e.angle=r,e.color=C,e.color2=D,e.colors=M.join(","),e.opacity=P,e.opacity2=L}"radial"===a&&(e.focusposition=o.join(","))}else fB(e,n,t.opacity)}(r,i,n):function(e,t){t.lineDash&&(e.dashstyle=t.lineDash.join(" ")),null==t.stroke||t.stroke instanceof Ys||fB(e,t.stroke,t.opacity)}(r,i),hB(e,r)):(e[a?"filled":"stroked"]="false",cB(e,r))},vB=[[],[],[]];Vo.prototype.brushVML=function(e){var t=this.style,i=this._vmlEl;i||(i=$z.createNode("shape"),lB(i),this._vmlEl=i),mB(i,"fill",t,this),mB(i,"stroke",t,this);var n=this.transform,a=null!=n,r=i.getElementsByTagName("stroke")[0];if(r){var o=t.lineWidth;if(a&&!t.strokeNoScale){var s=n[0]*n[3]-n[1]*n[2];o*=tB(iB(s))}r.weight=o+"px"}var l=this.path||(this.path=new fo);this.__dirtyPath&&(l.beginPath(),l.subPixelOptimize=!1,this.buildPath(l,this.shape),l.toStatic(),this.__dirtyPath=!1),i.path=function(e,t){var i,n,a,r,o,s,l=Qz.M,u=Qz.C,h=Qz.L,c=Qz.A,d=Qz.Q,p=[],f=e.data,g=e.len();for(r=0;r<g;){switch(n="",i=0,a=f[r++]){case l:n=" m ",i=1,o=f[r++],s=f[r++],vB[0][0]=o,vB[0][1]=s;break;case h:n=" l ",i=1,o=f[r++],s=f[r++],vB[0][0]=o,vB[0][1]=s;break;case d:case u:n=" c ",i=3;var m,v,y=f[r++],x=f[r++],_=f[r++],b=f[r++];a===d?(m=_,v=b,_=(_+2*y)/3,b=(b+2*x)/3,y=(o+2*y)/3,x=(s+2*x)/3):(m=f[r++],v=f[r++]),vB[0][0]=y,vB[0][1]=x,vB[1][0]=_,vB[1][1]=b,vB[2][0]=m,vB[2][1]=v,o=m,s=v;break;case c:var w=0,S=0,M=1,I=1,T=0;t&&(w=t[4],S=t[5],M=tB(t[0]*t[0]+t[1]*t[1]),I=tB(t[2]*t[2]+t[3]*t[3]),T=Math.atan2(-t[1]/I,t[0]/M));var A=f[r++],C=f[r++],D=f[r++],L=f[r++],P=f[r++]+T,k=f[r++]+P+T;r++;var O=f[r++],R=A+nB(P)*D,N=C+aB(P)*L,E=(y=A+nB(k)*D,x=C+aB(k)*L,O?" wa ":" at ");Math.abs(R-y)<1e-4&&(Math.abs(k-P)>.01?O&&(R+=.0125):Math.abs(N-C)<1e-4?O&&R<A||!O&&R>A?x-=.0125:x+=.0125:O&&N<C||!O&&N>C?y+=.0125:y-=.0125),p.push(E,eB(((A-D)*M+w)*oB-sB),",",eB(((C-L)*I+S)*oB-sB),",",eB(((A+D)*M+w)*oB-sB),",",eB(((C+L)*I+S)*oB-sB),",",eB((R*M+w)*oB-sB),",",eB((N*I+S)*oB-sB),",",eB((y*M+w)*oB-sB),",",eB((x*I+S)*oB-sB)),o=y,s=x;break;case Qz.R:var z=vB[0],B=vB[1];z[0]=f[r++],z[1]=f[r++],B[0]=z[0]+f[r++],B[1]=z[1]+f[r++],t&&(Jz(z,z,t),Jz(B,B,t)),z[0]=eB(z[0]*oB-sB),B[0]=eB(B[0]*oB-sB),z[1]=eB(z[1]*oB-sB),B[1]=eB(B[1]*oB-sB),p.push(" m ",z[0],",",z[1]," l ",B[0],",",z[1]," l ",B[0],",",B[1]," l ",z[0],",",B[1]);break;case Qz.Z:p.push(" x ")}if(i>0){p.push(n);for(var V=0;V<i;V++){var G=vB[V];t&&Jz(G,G,t),p.push(eB(G[0]*oB-sB),",",eB(G[1]*oB-sB),V<i-1?",":"")}}}return p.join("")}(l,this.transform),i.style.zIndex=dB(this.zlevel,this.z,this.z2),hB(e,i),null!=t.text?this.drawRectText(e,this.getBoundingRect()):this.removeRectText(e)},Vo.prototype.onRemove=function(e){cB(e,this._vmlEl),this.removeRectText(e)},Vo.prototype.onAdd=function(e){hB(e,this._vmlEl),this.appendRectText(e)};wa.prototype.brushVML=function(e){var t,i,n,a=this.style,r=a.image;if("object"==typeof(n=r)&&n.tagName&&"IMG"===n.tagName.toUpperCase()){var o=r.src;if(o===this._imageSrc)t=this._imageWidth,i=this._imageHeight;else{var s=r.runtimeStyle,l=s.width,u=s.height;s.width="auto",s.height="auto",t=r.width,i=r.height,s.width=l,s.height=u,this._imageSrc=o,this._imageWidth=t,this._imageHeight=i}r=o}else r===this._imageSrc&&(t=this._imageWidth,i=this._imageHeight);if(r){var h=a.x||0,c=a.y||0,d=a.width,p=a.height,f=a.sWidth,g=a.sHeight,m=a.sx||0,v=a.sy||0,y=f&&g,x=this._vmlEl;x||(x=$z.doc.createElement("div"),lB(x),this._vmlEl=x);var _,b=x.style,w=!1,S=1,M=1;if(this.transform&&(_=this.transform,S=tB(_[0]*_[0]+_[1]*_[1]),M=tB(_[2]*_[2]+_[3]*_[3]),w=_[1]||_[2]),w){var I=[h,c],T=[h+d,c],A=[h,c+p],C=[h+d,c+p];Jz(I,I,_),Jz(T,T,_),Jz(A,A,_),Jz(C,C,_);var D=rB(I[0],T[0],A[0],C[0]),L=rB(I[1],T[1],A[1],C[1]),P=[];P.push("M11=",_[0]/S,",","M12=",_[2]/M,",","M21=",_[1]/S,",","M22=",_[3]/M,",","Dx=",eB(h*S+_[4]),",","Dy=",eB(c*M+_[5])),b.padding="0 "+eB(D)+"px "+eB(L)+"px 0",b.filter="progid:DXImageTransform.Microsoft.Matrix("+P.join("")+", SizingMethod=clip)"}else _&&(h=h*S+_[4],c=c*M+_[5]),b.filter="",b.left=eB(h)+"px",b.top=eB(c)+"px";var k=this._imageEl,O=this._cropEl;k||(k=$z.doc.createElement("div"),this._imageEl=k);var R=k.style;if(y){if(t&&i)R.width=eB(S*t*d/f)+"px",R.height=eB(M*i*p/g)+"px";else{var N=new Image,E=this;N.onload=function(){N.onload=null,t=N.width,i=N.height,R.width=eB(S*t*d/f)+"px",R.height=eB(M*i*p/g)+"px",E._imageWidth=t,E._imageHeight=i,E._imageSrc=r},N.src=r}O||((O=$z.doc.createElement("div")).style.overflow="hidden",this._cropEl=O);var z=O.style;z.width=eB((d+m*d/f)*S),z.height=eB((p+v*p/g)*M),z.filter="progid:DXImageTransform.Microsoft.Matrix(Dx="+-m*d/f*S+",Dy="+-v*p/g*M+")",O.parentNode||x.appendChild(O),k.parentNode!==O&&O.appendChild(k)}else R.width=eB(S*d)+"px",R.height=eB(M*p)+"px",x.appendChild(k),O&&O.parentNode&&(x.removeChild(O),this._cropEl=null);var B="",V=a.opacity;V<1&&(B+=".Alpha(opacity="+eB(100*V)+") "),B+="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+r+", SizingMethod=scale)",R.filter=B,x.style.zIndex=dB(this.zlevel,this.z,this.z2),hB(e,x),null!=a.text&&this.drawRectText(e,this.getBoundingRect())}},wa.prototype.onRemove=function(e){cB(e,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(e)},wa.prototype.onAdd=function(e){hB(e,this._vmlEl),this.appendRectText(e)};var yB,xB={},_B=0,bB=document.createElement("div");Bn.$override("measureText",(function(e,t){var i=$z.doc;yB||((yB=i.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",$z.doc.body.appendChild(yB));try{yB.style.font=t}catch(e){}return yB.innerHTML="",yB.appendChild(i.createTextNode(e)),{width:yB.offsetWidth}}));for(var wB=new Oi,SB=function(e,t,i,n){var a=this.style;this.__dirty&&fa.normalizeTextStyle(a,!0);var r=a.text;if(null!=r&&(r+=""),r){if(a.rich){var o=Bn.parseRichText(r,a);r=[];for(var s=0;s<o.lines.length;s++){for(var l=o.lines[s].tokens,u=[],h=0;h<l.length;h++)u.push(l[h].text);r.push(u.join(""))}r=r.join("\n")}var c,d,p=a.textAlign,f=a.textVerticalAlign,g=function(e){var t=xB[e];if(!t){_B>100&&(_B=0,xB={});var i,n=bB.style;try{n.font=e,i=n.fontFamily.split(",")[0]}catch(e){}t={style:n.fontStyle||"normal",variant:n.fontVariant||"normal",weight:n.fontWeight||"normal",size:0|parseFloat(n.fontSize||12),family:i||"Microsoft YaHei"},xB[e]=t,_B++}return t}(a.font),m=g.style+" "+g.variant+" "+g.weight+" "+g.size+'px "'+g.family+'"';i=i||Bn.getBoundingRect(r,m,p,f,a.textPadding,a.textLineHeight);var v=this.transform;if(v&&!n&&(wB.copy(t),wB.applyTransform(v),t=wB),n)c=t.x,d=t.y;else{var y=a.textPosition;if(y instanceof Array)c=t.x+pB(y[0],t.width),d=t.y+pB(y[1],t.height),p=p||"left";else{var x=this.calculateTextPosition?this.calculateTextPosition({},a,t):Bn.calculateTextPosition({},a,t);c=x.x,d=x.y,p=p||x.textAlign,f=f||x.textVerticalAlign}}c=Bn.adjustTextX(c,i.width,p),d=Bn.adjustTextY(d,i.height,f),d+=i.height/2;var _,b,w,S=$z.createNode,M=this._textVmlEl;M?b=(_=(w=M.firstChild).nextSibling).nextSibling:(M=S("line"),_=S("path"),b=S("textpath"),w=S("skew"),b.style["v-text-align"]="left",lB(M),_.textpathok=!0,b.on=!0,M.from="0 0",M.to="1000 0.05",hB(M,w),hB(M,_),hB(M,b),this._textVmlEl=M);var I=[c,d],T=M.style;v&&n?(Jz(I,I,v),w.on=!0,w.matrix=v[0].toFixed(3)+","+v[2].toFixed(3)+","+v[1].toFixed(3)+","+v[3].toFixed(3)+",0,0",w.offset=(eB(I[0])||0)+","+(eB(I[1])||0),w.origin="0 0",T.left="0px",T.top="0px"):(w.on=!1,T.left=eB(c)+"px",T.top=eB(d)+"px"),b.string=String(r).replace(/&/g,"&amp;").replace(/"/g,"&quot;");try{b.style.font=m}catch(e){}mB(M,"fill",{fill:a.textFill,opacity:a.opacity},this),mB(M,"stroke",{stroke:a.textStroke,opacity:a.opacity,lineDash:a.lineDash||null},this),M.style.zIndex=dB(this.zlevel,this.z,this.z2),hB(e,M)}},MB=function(e){cB(e,this._textVmlEl),this._textVmlEl=null},IB=function(e){hB(e,this._textVmlEl)},TB=[ya,_a,wa,Vo,os],AB=0;AB<TB.length;AB++){var CB=TB[AB].prototype;CB.drawRectText=SB,CB.removeRectText=MB,CB.appendRectText=IB}os.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)},os.prototype.onRemove=function(e){this.removeRectText(e)},os.prototype.onAdd=function(e){this.appendRectText(e)}}var DB=_e.each;function LB(e){return parseInt(e,10)}function PB(e,t){$z.initVML(),this.root=e,this.storage=t;var i=document.createElement("div"),n=document.createElement("div");i.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",n.style.cssText="position:absolute;left:0;top:0;",e.appendChild(i),this._vmlRoot=n,this._vmlViewport=i,this.resize();var a=t.delFromStorage,r=t.addToStorage;t.delFromStorage=function(e){a.call(t,e),e&&e.onRemove&&e.onRemove(n)},t.addToStorage=function(e){e.onAdd&&e.onAdd(n),r.call(t,e)},this._firstPaint=!0}PB.prototype={constructor:PB,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,i=0;i<e.length;i++){var n=e[i];n.invisible||n.ignore?(n.__alreadyNotVisible||n.onRemove(t),n.__alreadyNotVisible=!0):(n.__alreadyNotVisible&&n.onAdd(t),n.__alreadyNotVisible=!1,n.__dirty&&(n.beforeBrush&&n.beforeBrush(),(n.brushVML||n.brush).call(n,t),n.afterBrush&&n.afterBrush())),n.__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 i=this._vmlViewport.style;i.width=e+"px",i.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||LB(t.width))-LB(t.paddingLeft)-LB(t.paddingRight)|0},_getHeight:function(){var e=this.root,t=e.currentStyle;return(e.clientHeight||LB(t.height))-LB(t.paddingTop)-LB(t.paddingBottom)|0}},DB(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],(function(e){PB.prototype[e]=function(){}}));var kB=PB;(0,ur.registerPainter)("vml",kB);var OB={createElement:function(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}},RB=OB.createElement,NB=fo.CMD,EB=Array.prototype.join,zB=Math.round,BB=Math.sin,VB=Math.cos,GB=Math.PI,FB=2*Math.PI,HB=180/GB;function WB(e){return zB(1e4*e)/1e4}function UB(e){return e<1e-4&&e>-1e-4}function ZB(e,t){t&&jB(e,"transform","matrix("+EB.call(t,",")+")")}function jB(e,t,i){(!i||"linear"!==i.type&&"radial"!==i.type)&&e.setAttribute(t,i)}function YB(e,t,i,n){if(function(e,t){var i=t?e.textFill:e.fill;return null!=i&&"none"!==i}(t,i)){var a=i?t.textFill:t.fill;jB(e,"fill",a="transparent"===a?"none":a),jB(e,"fill-opacity",null!=t.fillOpacity?t.fillOpacity*t.opacity:t.opacity)}else jB(e,"fill","none");if(function(e,t){var i=t?e.textStroke:e.stroke;return null!=i&&"none"!==i}(t,i)){var r=i?t.textStroke:t.stroke;jB(e,"stroke",r="transparent"===r?"none":r),jB(e,"stroke-width",(i?t.textStrokeWidth:t.lineWidth)/(!i&&t.strokeNoScale?n.getLineScale():1)),jB(e,"paint-order",i?"stroke":"fill"),jB(e,"stroke-opacity",null!=t.strokeOpacity?t.strokeOpacity:t.opacity),t.lineDash?(jB(e,"stroke-dasharray",t.lineDash.join(",")),jB(e,"stroke-dashoffset",zB(t.lineDashOffset||0))):jB(e,"stroke-dasharray",""),t.lineCap&&jB(e,"stroke-linecap",t.lineCap),t.lineJoin&&jB(e,"stroke-linejoin",t.lineJoin),t.miterLimit&&jB(e,"stroke-miterlimit",t.miterLimit)}else jB(e,"stroke","none")}var XB={};XB.brush=function(e){var t=e.style,i=e.__svgEl;i||(i=RB("path"),e.__svgEl=i),e.path||e.createPathProxy();var n=e.path;if(e.__dirtyPath){n.beginPath(),n.subPixelOptimize=!1,e.buildPath(n,e.shape),e.__dirtyPath=!1;var a=function(e){for(var t=[],i=e.data,n=e.len(),a=0;a<n;){var r="",o=0;switch(i[a++]){case NB.M:r="M",o=2;break;case NB.L:r="L",o=2;break;case NB.Q:r="Q",o=4;break;case NB.C:r="C",o=6;break;case NB.A:var s=i[a++],l=i[a++],u=i[a++],h=i[a++],c=i[a++],d=i[a++],p=i[a++],f=i[a++],g=Math.abs(d),m=UB(g-FB)||(f?d>=FB:-d>=FB),v=d>0?d%FB:d%FB+FB,y=!1;y=!!m||!UB(g)&&v>=GB==!!f;var x=WB(s+u*VB(c)),_=WB(l+h*BB(c));m&&(d=f?FB-1e-4:1e-4-FB,y=!0,9===a&&t.push("M",x,_));var b=WB(s+u*VB(c+d)),w=WB(l+h*BB(c+d));t.push("A",WB(u),WB(h),zB(p*HB),+y,+f,b,w);break;case NB.Z:r="Z";break;case NB.R:b=WB(i[a++]),w=WB(i[a++]);var S=WB(i[a++]),M=WB(i[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 I=0;I<o;I++)t.push(WB(i[a++]))}return t.join(" ")}(n);a.indexOf("NaN")<0&&jB(i,"d",a)}YB(i,t,!1,e),ZB(i,e.transform),null!=t.text?tV(e,e.getBoundingRect()):nV(e)};var qB={brush:function(e){var t=e.style,i=t.image;i instanceof HTMLImageElement&&(i=i.src);if(i){var n=t.x||0,a=t.y||0,r=t.width,o=t.height,s=e.__svgEl;s||(s=RB("image"),e.__svgEl=s),i!==e.__imageSrc&&(!function(e,t,i){e.setAttributeNS("http://www.w3.org/1999/xlink",t,i)}(s,"href",i),e.__imageSrc=i),jB(s,"width",r),jB(s,"height",o),jB(s,"x",n),jB(s,"y",a),ZB(s,e.transform),null!=t.text?tV(e,e.getBoundingRect()):nV(e)}}},KB={},$B=new Oi,JB={},QB=[],eV={left:"start",right:"end",center:"middle",middle:"middle"},tV=function(e,t){var i=e.style,n=e.transform,a=e instanceof os||i.transformText;e.__dirty&&fa.normalizeTextStyle(i,!0);var r=i.text;if(null!=r&&(r+=""),fa.needDrawText(r,i)){null==r&&(r=""),!a&&n&&($B.copy(t),$B.applyTransform(n),t=$B);var o=e.__textSvgEl;o||(o=RB("text"),e.__textSvgEl=o);var s=o.style,l=i.font||Bn.DEFAULT_FONT,u=o.__computedFont;l!==o.__styleFont&&(s.font=o.__styleFont=l,u=o.__computedFont=s.font);var h=i.textPadding,c=i.textLineHeight,d=e.__textCotentBlock;d&&!e.__dirtyText||(d=e.__textCotentBlock=Bn.parsePlainText(r,u,h,c,i.truncate));var p=d.outerHeight,f=d.lineHeight;fa.getBoxPosition(JB,e,i,t);var g=JB.baseX,m=JB.baseY,v=JB.textAlign||"left",y=JB.textVerticalAlign;!function(e,t,i,n,a,r,o){dt.identity(QB),t&&i&&dt.copy(QB,i);var s=n.textRotation;if(a&&s){var l=n.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),QB[4]-=r,QB[5]-=o,dt.rotate(QB,QB,s),QB[4]+=r,QB[5]+=o}ZB(e,QB)}(o,a,n,i,t,g,m);var x=g,_=Bn.adjustTextY(m,p,y);h&&(x=function(e,t,i){return"right"===t?e-i[1]:"center"===t?e+i[3]/2-i[1]/2:e+i[3]}(g,v,h),_+=h[0]),_+=f/2,YB(o,i,!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)iV(w[M],v,x,_+M*f)}else{e.__text=r,e.__canCacheByTextString=b;var I=d.lines,T=I.length;for(M=0;M<T;M++){var A=w[M],C=I[M];A?A.__zrText!==C&&(A.innerHTML="",A.appendChild(document.createTextNode(C))):(A=w[M]=RB("tspan"),o.appendChild(A),A.appendChild(document.createTextNode(C))),iV(A,v,x,_+M*f)}if(S>T){for(;M<S;M++)o.removeChild(w[M]);w.length=T}}}};function iV(e,t,i,n){jB(e,"dominant-baseline","middle"),jB(e,"text-anchor",eV[t]),jB(e,"x",i),jB(e,"y",n)}function nV(e){e&&e.__textSvgEl&&(e.__textSvgEl.parentNode&&e.__textSvgEl.parentNode.removeChild(e.__textSvgEl),e.__textSvgEl=null,e.__tspanList=[],e.__text=null)}KB.drawRectText=tV,KB.brush=function(e){null!=e.style.text?tV(e,!1):nV(e)};var aV={path:XB,image:qB,text:KB};function rV(){}function oV(e,t,i,n){for(var a=0,r=t.length,o=0,s=0;a<r;a++){var l=t[a];if(l.removed){for(u=[],h=s;h<s+l.count;h++)u.push(h);l.indices=u,s+=l.count}else{for(var u=[],h=o;h<o+l.count;h++)u.push(h);l.indices=u,o+=l.count,l.added||(s+=l.count)}}return t}function sV(e){return{newPos:e.newPos,components:e.components.slice(0)}}rV.prototype={diff:function(e,t,i){i||(i=function(e,t){return e===t}),this.equals=i;var n=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 h=[],c=0;c<t.length;c++)h.push(c);return[{indices:h,count:t.length}]}function d(){for(var i=-1*o;i<=o;i+=2){var s,u=l[i-1],h=l[i+1],c=(h?h.newPos:0)-i;u&&(l[i-1]=void 0);var d=u&&u.newPos+1<a,p=h&&0<=c&&c<r;if(d||p){if(!d||p&&u.newPos<h.newPos?(s=sV(h),n.pushComponent(s.components,void 0,!0)):((s=u).newPos++,n.pushComponent(s.components,!0,void 0)),c=n.extractCommon(s,t,e,i),s.newPos+1>=a&&c+1>=r)return oV(n,s.components);l[i]=s}else l[i]=void 0}o++}for(;o<=s;){var p=d();if(p)return p}},pushComponent:function(e,t,i){var n=e[e.length-1];n&&n.added===t&&n.removed===i?e[e.length-1]={count:n.count+1,added:t,removed:i}:e.push({count:1,added:t,removed:i})},extractCommon:function(e,t,i,n){for(var a=t.length,r=i.length,o=e.newPos,s=o-n,l=0;o+1<a&&s+1<r&&this.equals(t[o+1],i[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 lV=new rV;var uV=function(e,t,i){return lV.diff(e,t,i)},hV=OB.createElement,cV=aV.path,dV=aV.image,pV=aV.text;function fV(e,t,i,n,a){this._zrId=e,this._svgRoot=t,this._tagNames="string"==typeof i?[i]:i,this._markLabel=n,this._domName=a||"_dom",this.nextId=0}fV.prototype.createElement=hV,fV.prototype.getDefs=function(e){var t=this._svgRoot,i=this._svgRoot.getElementsByTagName("defs");return 0===i.length?e?((i=t.insertBefore(this.createElement("defs"),t.firstChild)).contains||(i.contains=function(e){var t=i.children;if(!t)return!1;for(var n=t.length-1;n>=0;--n)if(t[n]===e)return!0;return!1}),i):null:i[0]},fV.prototype.update=function(e,t){if(e){var i=this.getDefs(!1);if(e[this._domName]&&i.contains(e[this._domName]))"function"==typeof t&&t(e);else{var n=this.add(e);n&&(e[this._domName]=n)}}},fV.prototype.addDom=function(e){this.getDefs(!0).appendChild(e)},fV.prototype.removeDom=function(e){var t=this.getDefs(!1);t&&e[this._domName]&&(t.removeChild(e[this._domName]),e[this._domName]=null)},fV.prototype.getDoms=function(){var e=this.getDefs(!1);if(!e)return[];var t=[];return _e.each(this._tagNames,(function(i){var n=e.getElementsByTagName(i);t=t.concat([].slice.call(n))})),t},fV.prototype.markAllUnused=function(){var e=this.getDoms(),t=this;_e.each(e,(function(e){e[t._markLabel]="0"}))},fV.prototype.markUsed=function(e){e&&(e[this._markLabel]="1")},fV.prototype.removeUnused=function(){var e=this.getDefs(!1);if(e){var t=this.getDoms(),i=this;_e.each(t,(function(t){"1"!==t[i._markLabel]&&e.removeChild(t)}))}},fV.prototype.getSvgProxy=function(e){return e instanceof Vo?cV:e instanceof wa?dV:e instanceof os?pV:cV},fV.prototype.getTextSvgElement=function(e){return e.__textSvgEl},fV.prototype.getSvgElement=function(e){return e.__svgEl};var gV=fV;function mV(e,t){gV.call(this,e,t,["linearGradient","radialGradient"],"__gradient_in_use__")}_e.inherits(mV,gV),mV.prototype.addWithoutUpdate=function(e,t){if(t&&t.style){var i=this;_e.each(["fill","stroke"],(function(n){if(t.style[n]&&("linear"===t.style[n].type||"radial"===t.style[n].type)){var a,r=t.style[n],o=i.getDefs(!0);r._dom?(a=r._dom,o.contains(r._dom)||i.addDom(a)):a=i.add(r),i.markUsed(t);var s=a.getAttribute("id");e.setAttribute(n,"url(#"+s+")")}}))}},mV.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},mV.prototype.update=function(e){var t=this;gV.prototype.update.call(this,e,(function(){var i=e.type,n=e._dom.tagName;"linear"===i&&"linearGradient"===n||"radial"===i&&"radialGradient"===n?t.updateDom(e,e._dom):(t.removeDom(e),t.add(e))}))},mV.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 i=e.colorStops,n=0,a=i.length;n<a;++n){var r=this.createElement("stop");r.setAttribute("offset",100*i[n].offset+"%");var o=i[n].color;if(o.indexOf(!1)){var s=Xt.parse(o)[3],l=Xt.toHex(o);r.setAttribute("stop-color","#"+l),r.setAttribute("stop-opacity",s)}else r.setAttribute("stop-color",i[n].color);t.appendChild(r)}e._dom=t},mV.prototype.markUsed=function(e){if(e.style){var t=e.style.fill;t&&t._dom&&gV.prototype.markUsed.call(this,t._dom),(t=e.style.stroke)&&t._dom&&gV.prototype.markUsed.call(this,t._dom)}};var vV=mV;function yV(e,t){gV.call(this,e,t,"clipPath","__clippath_in_use__")}_e.inherits(yV,gV),yV.prototype.update=function(e){var t=this.getSvgElement(e);t&&this.updateDom(t,e.__clipPaths,!1);var i=this.getTextSvgElement(e);i&&this.updateDom(i,e.__clipPaths,!0),this.markUsed(e)},yV.prototype.updateDom=function(e,t,i){if(t&&t.length>0){var n,a,r=this.getDefs(!0),o=t[0],s=i?"_textDom":"_dom";o[s]?(a=o[s].getAttribute("id"),n=o[s],r.contains(n)||r.appendChild(n)):(a="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(n=this.createElement("clipPath")).setAttribute("id",a),r.appendChild(n),o[s]=n);var l=this.getSvgProxy(o);if(o.transform&&o.parent.invTransform&&!i){var u=Array.prototype.slice.call(o.transform);dt.mul(o.transform,o.parent.invTransform,o.transform),l.brush(o),o.transform=u}else l.brush(o);var h=this.getSvgElement(o);n.innerHTML="",n.appendChild(h.cloneNode()),e.setAttribute("clip-path","url(#"+a+")"),t.length>1&&this.updateDom(n,t.slice(1),i)}else e&&e.setAttribute("clip-path","none")},yV.prototype.markUsed=function(e){var t=this;e.__clipPaths&&_e.each(e.__clipPaths,(function(e){e._dom&&gV.prototype.markUsed.call(t,e._dom),e._textDom&&gV.prototype.markUsed.call(t,e._textDom)}))};var xV=yV;function _V(e,t){gV.call(this,e,t,["filter"],"__filter_in_use__","_shadowDom")}function bV(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY||e.textShadowBlur||e.textShadowOffsetX||e.textShadowOffsetY)}_e.inherits(_V,gV),_V.prototype.addWithoutUpdate=function(e,t){if(t&&bV(t.style)){var i;if(t._shadowDom)i=t._shadowDom,this.getDefs(!0).contains(t._shadowDom)||this.addDom(i);else i=this.add(t);this.markUsed(t);var n=i.getAttribute("id");e.style.filter="url(#"+n+")"}},_V.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},_V.prototype.update=function(e,t){if(bV(t.style)){var i=this;gV.prototype.update.call(this,t,(function(){i.updateDom(t,t._shadowDom)}))}else this.remove(e,t)},_V.prototype.remove=function(e,t){null!=t._shadowDomId&&(this.removeDom(e),e.style.filter="")},_V.prototype.updateDom=function(e,t){var i=t.getElementsByTagName("feDropShadow");i=0===i.length?this.createElement("feDropShadow"):i[0];var n,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)n=s.shadowOffsetX||0,a=s.shadowOffsetY||0,r=s.shadowBlur,o=s.shadowColor;else{if(!s.textShadowBlur)return void this.removeDom(t,s);n=s.textShadowOffsetX||0,a=s.textShadowOffsetY||0,r=s.textShadowBlur,o=s.textShadowColor}i.setAttribute("dx",n/l),i.setAttribute("dy",a/u),i.setAttribute("flood-color",o);var h=r/2/l+" "+r/2/u;i.setAttribute("stdDeviation",h),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(i),e._shadowDom=t},_V.prototype.markUsed=function(e){e._shadowDom&&gV.prototype.markUsed.call(this,e._shadowDom)};var wV=_V,SV=OB.createElement,MV=aV.path,IV=aV.image,TV=aV.text;function AV(e){return parseInt(e,10)}function CV(e,t){return t&&e&&t.parentNode!==e}function DV(e,t,i){if(CV(e,t)&&i){var n=i.nextSibling;n?e.insertBefore(t,n):e.appendChild(t)}}function LV(e,t){if(CV(e,t)){var i=e.firstChild;i?e.insertBefore(t,i):e.appendChild(t)}}function PV(e,t){t&&e&&t.parentNode===e&&e.removeChild(t)}function kV(e){return e.__textSvgEl}function OV(e){return e.__svgEl}var RV=function(e,t,i,n){this.root=e,this.storage=t,this._opts=i=_e.extend({},i||{});var a=SV("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=SV("g");a.appendChild(r);var o=SV("g");a.appendChild(o),this.gradientManager=new vV(n,o),this.clipPathManager=new xV(n,o),this.shadowManager=new wV(n,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(i.width,i.height),this._visibleList=[]};RV.prototype={constructor:RV,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=SV("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,i,n=this._svgRoot,a=this._visibleList,r=e.length,o=[];for(t=0;t<r;t++){var s=e[t],l=(i=s)instanceof Vo?MV:i instanceof wa?IV:i instanceof os?TV:MV,u=OV(s)||kV(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 h,c=uV(a,o);for(t=0;t<c.length;t++){if((f=c[t]).removed)for(var d=0;d<f.count;d++){u=OV(s=a[f.indices[d]]);var p=kV(s);PV(n,u),PV(n,p)}}for(t=0;t<c.length;t++){var f;if((f=c[t]).added)for(d=0;d<f.count;d++){u=OV(s=o[f.indices[d]]),p=kV(s);h?DV(n,u,h):LV(n,u),u?DV(n,p,u):h?DV(n,p,h):LV(n,p),DV(n,p,u),h=p||u||h,this.gradientManager.addWithoutUpdate(u||p,s),this.shadowManager.addWithoutUpdate(u||p,s),this.clipPathManager.markUsed(s)}else if(!f.removed)for(d=0;d<f.count;d++){u=OV(s=o[f.indices[d]]),p=kV(s),u=OV(s),p=kV(s);this.gradientManager.markUsed(s),this.gradientManager.addWithoutUpdate(u||p,s),this.shadowManager.markUsed(s),this.shadowManager.addWithoutUpdate(u||p,s),this.clipPathManager.markUsed(s),p&&DV(n,p,u),h=u||p||h}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this.shadowManager.removeUnused(),this._visibleList=o},_getDefs:function(e){var t,i=this._svgDom;return 0===(t=i.getElementsByTagName("defs")).length?e?((t=i.insertBefore(SV("defs"),i.firstChild)).contains||(t.contains=function(e){var i=t.children;if(!i)return!1;for(var n=i.length-1;n>=0;--n)if(i[n]===e)return!0;return!1}),t):null:t[0]},resize:function(e,t){var i=this._viewport;i.style.display="none";var n=this._opts;if(null!=e&&(n.width=e),null!=t&&(n.height=t),e=this._getSize(0),t=this._getSize(1),i.style.display="",this._width!==e||this._height!==t){this._width=e,this._height=t;var a=i.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,i=["width","height"][e],n=["clientWidth","clientHeight"][e],a=["paddingLeft","paddingTop"][e],r=["paddingRight","paddingBottom"][e];if(null!=t[i]&&"auto"!==t[i])return parseFloat(t[i]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[n]||AV(s[i])||AV(o.style[i]))-(AV(s[a])||0)-(AV(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<"))}},_e.each(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","pathToImage"],(function(e){RV.prototype[e]=function(){}}));var NV=RV;(0,ur.registerPainter)("svg",NV);var EV,zV=Y((function(e,t){!function(){for(var e in Qv){if(null==Qv||!Qv.hasOwnProperty(e)||"default"===e||"__esModule"===e)return;t[e]=Qv[e]}}(),function(){for(var e in Jv){if(null==Jv||!Jv.hasOwnProperty(e)||"default"===e||"__esModule"===e)return;t[e]=Jv[e]}}()})),BV=(EV=zV)&&EV.__esModule&&Object.prototype.hasOwnProperty.call(EV,"default")?EV.default:EV;Qv.extendSeriesModel({type:"series.liquidFill",visualColorAccessPath:"textStyle.normal.color",optionUpdated:function(){var e=this.option;e.gridSize=Math.max(Math.floor(e.gridSize),4)},getInitialData:function(e,t){var i=vg(["value"],e.data),n=new Qv.List(i,this);return n.initData(e.data),n},defaultOption:{color:["#294D99","#156ACF","#1598ED","#45BDFF"],center:["50%","50%"],radius:"50%",amplitude:"8%",waveLength:"80%",phase:"auto",period:"auto",direction:"right",shape:"circle",waveAnimation:!0,animationEasing:"linear",animationEasingUpdate:"linear",animationDuration:2e3,animationDurationUpdate:1e3,outline:{show:!0,borderDistance:8,itemStyle:{color:"none",borderColor:"#294D99",borderWidth:8,shadowBlur:20,shadowColor:"rgba(0, 0, 0, 0.25)"}},backgroundStyle:{color:"#E3F7FF"},itemStyle:{opacity:.95,shadowBlur:50,shadowColor:"rgba(0, 0, 0, 0.4)"},label:{show:!0,color:"#294D99",insideColor:"#fff",fontSize:50,fontWeight:"bold",align:"center",baseline:"middle",position:"inside"},emphasis:{itemStyle:{opacity:.8}}}});var VV=Qv.graphic.extendShape({type:"ec-liquid-fill",shape:{waveLength:0,radius:0,radiusY:0,cx:0,cy:0,waterLevel:0,amplitude:0,phase:0,inverse:!1},buildPath:function(e,t){null==t.radiusY&&(t.radiusY=t.radius);for(var i=Math.max(2*Math.ceil(2*t.radius/t.waveLength*4),8);t.phase<2*-Math.PI;)t.phase+=2*Math.PI;for(;t.phase>0;)t.phase-=2*Math.PI;var n=t.phase/Math.PI/2*t.waveLength,a=t.cx-t.radius+n-2*t.radius;e.moveTo(a,t.waterLevel);for(var r=0,o=0;o<i;++o){var s=o%4,l=GV(o*t.waveLength/4,s,t.waveLength,t.amplitude);e.bezierCurveTo(l[0][0]+a,-l[0][1]+t.waterLevel,l[1][0]+a,-l[1][1]+t.waterLevel,l[2][0]+a,-l[2][1]+t.waterLevel),o===i-1&&(r=l[2][0])}t.inverse?(e.lineTo(r+a,t.cy-t.radiusY),e.lineTo(a,t.cy-t.radiusY),e.lineTo(a,t.waterLevel)):(e.lineTo(r+a,t.cy+t.radiusY),e.lineTo(a,t.cy+t.radiusY),e.lineTo(a,t.waterLevel)),e.closePath()}});function GV(e,t,i,n){return 0===t?[[e+.5*i/Math.PI/2,n/2],[e+.5*i/Math.PI,n],[e+i/4,n]]:1===t?[[e+.5*i/Math.PI/2*(Math.PI-2),n],[e+.5*i/Math.PI/2*(Math.PI-1),n/2],[e+i/4,0]]:2===t?[[e+.5*i/Math.PI/2,-n/2],[e+.5*i/Math.PI,-n],[e+i/4,-n]]:[[e+.5*i/Math.PI/2*(Math.PI-2),-n],[e+.5*i/Math.PI/2*(Math.PI-1),-n/2],[e+i/4,0]]}var FV=Qv.number.parsePercent;return Qv.extendChartView({type:"liquidFill",render:function(e,t,i){var n=this.group;n.removeAll();var a=e.getData(),r=a.getItemModel(0),o=r.get("center"),s=r.get("radius"),l=i.getWidth(),u=i.getHeight(),h=Math.min(l,u),c=0,d=0,p=e.get("outline.show");p&&(c=e.get("outline.borderDistance"),d=FV(e.get("outline.itemStyle.borderWidth"),h));var f,g,m,v=FV(o[0],l),y=FV(o[1],u),x=!1,_=e.get("shape");("container"===_?(x=!0,g=[(f=[l/2,u/2])[0]-d/2,f[1]-d/2],m=[FV(c,l),FV(c,u)],s=[Math.max(g[0]-m[0],0),Math.max(g[1]-m[1],0)]):(g=(f=FV(s,h)/2)-d/2,m=FV(c,h),s=Math.max(g-m,0)),p)&&(A().style.lineWidth=d,n.add(A()));var b=x?0:v-s,w=x?0:y-s,S=null;n.add(function(){var t=T(s);t.setStyle(e.getModel("backgroundStyle").getItemStyle()),t.style.fill=null,t.z2=5;var i=T(s);i.setStyle(e.getModel("backgroundStyle").getItemStyle()),i.style.stroke=null;var n=new Qv.graphic.Group;return n.add(t),n.add(i),n}());var M=this._data,I=[];function T(e,t){if(_){if(0===_.indexOf("path://")){var i=Qv.graphic.makePath(_.slice(7),{}),n=i.getBoundingRect(),a=n.width,r=n.height;a>r?(r*=2*e/a,a=2*e):(a*=2*e/r,r=2*e);var o=t?0:v-a/2,s=t?0:y-r/2;return i=Qv.graphic.makePath(_.slice(7),{},new Qv.graphic.BoundingRect(o,s,a,r)),t&&(i.position=[-a/2,-r/2]),i}if(x){var l=t?-e[0]:v-e[0],u=t?-e[1]:y-e[1];return ev.createSymbol("rect",l,u,2*e[0],2*e[1])}l=t?-e:v-e,u=t?-e:y-e;return"pin"===_?u+=e:"arrow"===_&&(u-=e),ev.createSymbol(_,l,u,2*e,2*e)}return new Qv.graphic.Circle({shape:{cx:t?0:v,cy:t?0:y,r:e}})}function A(){var t=T(f);return t.style.fill=null,t.setStyle(e.getModel("outline.itemStyle").getItemStyle()),t}function C(t,i,n){var r=x?s[0]:s,o=x?u/2:s,l=a.getItemModel(t),h=l.getModel("itemStyle"),c=l.get("phase"),d=FV(l.get("amplitude"),2*o),p=FV(l.get("waveLength"),2*r),f=o-a.get("value",t)*o*2;c=n?n.shape.phase:"auto"===c?t*Math.PI/4:c;var g=h.getItemStyle();if(!g.fill){var m=e.get("color"),_=t%m.length;g.fill=m[_]}var b=new VV({shape:{waveLength:p,radius:r,radiusY:o,cx:2*r,cy:0,waterLevel:f,amplitude:d,phase:c,inverse:i},style:g,position:[v,y]});b.shape._waterLevel=f;var w=l.getModel("emphasis.itemStyle").getItemStyle();w.lineWidth=0,Qv.graphic.setHoverStyle(b,w);var S=T(s,!0);return S.setStyle({fill:"white"}),b.setClipPath(S),b}function D(e,t,i){var n=a.getItemModel(e),r=n.get("period"),o=n.get("direction"),s=a.get("value",e),l=n.get("phase");l=i?i.shape.phase:"auto"===l?e*Math.PI/4:l;var u=0;u="auto"===r?function(t){var i=a.count();return 0===i?t:t*(.2+(i-e)/i*.8)}(5e3):"function"==typeof r?r(s,e):r;var h=0;"right"===o||null==o?h=Math.PI:"left"===o?h=-Math.PI:"none"===o?h=0:console.error("Illegal direction value for liquid fill."),"none"!==o&&n.get("waveAnimation")&&t.animate("shape",!0).when(0,{phase:l}).when(u/2,{phase:h+l}).when(u,{phase:2*h+l}).during((function(){S&&S.dirty(!0)})).start()}a.diff(M).add((function(t){var i=C(t,!1),r=i.shape.waterLevel;i.shape.waterLevel=x?u/2:s,Qv.graphic.initProps(i,{shape:{waterLevel:r}},e),i.z2=2,D(t,i,null),n.add(i),a.setItemGraphicEl(t,i),I.push(i)})).update((function(t,i){for(var r=M.getItemGraphicEl(i),o=C(t,!1,r),s={},l=["amplitude","cx","cy","phase","radius","radiusY","waterLevel","waveLength"],h=0;h<l.length;++h){var c=l[h];o.shape.hasOwnProperty(c)&&(s[c]=o.shape[c])}var d={},p=["fill","opacity","shadowBlur","shadowColor"];for(h=0;h<p.length;++h){c=p[h];o.style.hasOwnProperty(c)&&(d[c]=o.style[c])}x&&(s.radiusY=u/2),Qv.graphic.updateProps(r,{shape:s},e),r.useStyle(d),r.position=o.position,r.setClipPath(o.clipPath),r.shape.inverse=o.inverse,D(t,r,r),n.add(r),a.setItemGraphicEl(t,r),I.push(r)})).remove((function(e){var t=M.getItemGraphicEl(e);n.remove(t)})).execute(),r.get("label.show")&&n.add(function(t){var i=r.getModel("label");var n={z2:10,shape:{x:b,y:w,width:2*(x?s[0]:s),height:2*(x?s[1]:s)},style:{fill:"transparent",text:(u=e.getFormattedLabel(0,"normal"),h=100*a.get("value",0),c=a.getName(0)||e.name,isNaN(h)||(c=h.toFixed(0)+"%"),null==u?c:u),textAlign:i.get("align"),textVerticalAlign:i.get("baseline")},silent:!0},o=new Qv.graphic.Rect(n),l=i.get("color");var u,h,c;Qv.graphic.setText(o.style,i,l);var d=new Qv.graphic.Rect(n),p=i.get("insideColor");Qv.graphic.setText(d.style,i,p),d.style.textFill=p;var f=new Qv.graphic.Group;f.add(o),f.add(d);var g=T(s,!0);return(S=new Qv.graphic.CompoundPath({shape:{paths:t},position:[v,y]})).setClipPath(g),d.setClipPath(S),f}(I)),this._data=a},dispose:function(){}}),Qv.registerVisual(Qv.util.curry(wb,"liquidFill")),function(e){function n(n){var a=e.call(this,n)||this;return a.chartRef=t.createRef(),a.padding="7vh 2vh 2vh",a.startColor="#0096ff",a.endColor="#00d8ff",a.renderChart=function(){var e={title:{text:100*a.props.gpui.params.ratio+"{a|%}",textStyle:{fontSize:14,lineHeight:14,color:"#cde0ff",rich:{a:{fontSize:10,verticalAlign:"bottom"}}},subtext:a.props.gpui.params.data+"{a|人}",subtextStyle:{fontSize:18,lineHeight:18,color:"#cde0ff",rich:{a:{fontSize:12,verticalAlign:"bottom"}}},left:"center",top:"18%"},series:[{type:"liquidFill",radius:"90%",center:["50%","50%"],data:Array.from({length:3}).fill(a.props.gpui.params.ratio),backgroundStyle:{color:"transparent"},outline:{borderDistance:2,itemStyle:{borderWidth:2,borderColor:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:a.startColor},{offset:1,color:a.endColor}],globalCoord:!1}}},itemStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:1,color:a.startColor},{offset:0,color:a.endColor}],globalCoord:!1}},label:{normal:{formatter:""}}}]};a.chart.setOption(e,{notMerge:!0})},i.reaction((function(){return n.gpui.params.padding}),(function(e){a.padding=e||"7vh 2vh 2vh"}),{fireImmediately:!0}),i.reaction((function(){return{startColor:n.gpui.params.startColor,endColor:n.gpui.params.endColor}}),(function(e){var t=e.startColor,i=e.endColor;a.startColor=t||"#0096ff",a.endColor=i||"#00d8ff"}),{fireImmediately:!0}),a}return function(e,t){function i(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}(n,e),n.prototype.componentDidMount=function(){var e=this;this.chart=this.chart||BV.init(this.chartRef.current),window.addEventListener("resize",(function(){e.chart.resize()})),i.reaction((function(){return e.props.gpui.params}),(function(t){t.name&&e.renderChart()}),{fireImmediately:!0})},n.prototype.render=function(){return t.createElement("div",{className:"g__index",style:{padding:this.padding}},t.createElement("div",{className:o},t.createElement("div",{ref:this.chartRef,className:s}),t.createElement("div",{className:l},this.props.gpui.params.name)))},r([i.observable],n.prototype,"padding",void 0),r([i.observable],n.prototype,"startColor",void 0),r([i.observable],n.prototype,"endColor",void 0),n=r([j],n)}(t.Component)}));
