define(["gpui-style-inject","react","mobx"],(function(t,e,i){"use strict";t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;var n="default"in e?e.default:e,r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};
/*! *****************************************************************************
    Copyright (c) Microsoft Corporation.

    Permission to use, copy, modify, and/or distribute this software for any
    purpose with or without fee is hereby granted.

    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
    REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
    AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
    INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    PERFORMANCE OF THIS SOFTWARE.
    ***************************************************************************** */function a(t,e,i,n){var r,a=arguments.length,o=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(o=(a<3?r(o):a>3?r(e,i,o):r(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o}t("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__3O-bt",s="index-module_chart__19T88";if(t(".index-module_main__3O-bt {\n  position: relative;\n  width: 100%;\n  height: 100%; }\n  .index-module_main__3O-bt .index-module_chart__19T88 {\n    width: 100%;\n    height: 100%; }\n"),!e.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!i.spy)throw new Error("mobx-react-lite requires mobx at least version 4 to be available");function l(){return(l=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t}).apply(this,arguments)}function u(){var t=e.useState(0)[1];return e.useCallback((function(){t((function(t){return t+1}))}),[])}function h(t){return i.getDependencyTree(t)}var c,d=1e4,f=new Set;function p(){void 0===c&&(c=setTimeout(g,1e4))}function g(){c=void 0;var t=Date.now();f.forEach((function(e){var i=e.current;i&&t>=i.cleanAt&&(i.reaction.dispose(),e.current=null,f.delete(e))})),f.size>0&&p()}var m={};function v(t){return"observer"+t}function y(t,e,r){void 0===e&&(e="observed"),void 0===r&&(r=m);var a,o=(r.useForceUpdate||u)(),s=n.useRef(null);if(!s.current){var l=new i.Reaction(v(e),(function(){c.mounted?o():(l.dispose(),s.current=null)})),c=function(t){return{cleanAt:Date.now()+d,reaction:t}}(l);s.current=c,a=s,f.add(a),p()}var g,y,_=s.current.reaction;if(n.useDebugValue(_,h),n.useEffect((function(){var t;return t=s,f.delete(t),s.current?s.current.mounted=!0:(s.current={reaction:new i.Reaction(v(e),(function(){o()})),cleanAt:1/0},o()),function(){s.current.reaction.dispose(),s.current=null}}),[]),_.track((function(){try{g=t()}catch(t){y=t}})),y)throw y;return g}function _(t,i){var n,r=l({forwardRef:!1},i),a=t.displayName||t.name,o=function(e,i){return y((function(){return t(e,i)}),a)};return o.displayName=a,n=r.forwardRef?e.memo(e.forwardRef(o)):e.memo(o),function(t,e){Object.keys(t).forEach((function(i){x[i]||Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))}))}(t,n),n.displayName=a,n}var x={$$typeof:!0,render:!0,compare:!0,type:!0};function b(t){var e=t.children,i=t.render,n=e||i;return"function"!=typeof n?null:y(n)}function w(t,e,i,n,r){var a="children"===e?"render":"children",o="function"==typeof t[e],s="function"==typeof t[a];return o&&s?new Error("MobX Observer: Do not use children and render in the same time in`"+i):o||s?null:new Error("Invalid prop `"+r+"` of type `"+typeof t[e]+"` supplied to `"+i+"`, expected `function`.")}b.propTypes={children:w,render:w},b.displayName="Observer";var S=0;var T={};function M(t){return T[t]||(T[t]=function(t){if("function"==typeof Symbol)return Symbol(t);var e="__$mobx-react "+t+" ("+S+")";return S++,e}(t)),T[t]}function C(t,e){if(I(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var i=Object.keys(t),n=Object.keys(e);if(i.length!==n.length)return!1;for(var r=0;r<i.length;r++)if(!Object.hasOwnProperty.call(e,i[r])||!I(t[i[r]],e[i[r]]))return!1;return!0}function I(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function A(t,e,i){Object.hasOwnProperty.call(t,e)?t[e]=i:Object.defineProperty(t,e,{enumerable:!1,configurable:!0,writable:!0,value:i})}var D=M("patchMixins"),k=M("patchedDefinition");function O(t,e){for(var i=this,n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];e.locks++;try{var o;return null!=t&&(o=t.apply(this,r)),o}finally{e.locks--,0===e.locks&&e.methods.forEach((function(t){t.apply(i,r)}))}}function P(t,e){return function(){for(var i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];O.call.apply(O,[this,t,e].concat(n))}}function L(t,e,i){var n=function(t,e){var i=t[D]=t[D]||{},n=i[e]=i[e]||{};return n.locks=n.locks||0,n.methods=n.methods||[],n}(t,e);n.methods.indexOf(i)<0&&n.methods.push(i);var r=Object.getOwnPropertyDescriptor(t,e);if(!r||!r[k]){var a=t[e],o=function t(e,i,n,r,a){var o,s=P(a,r);return(o={})[k]=!0,o.get=function(){return s},o.set=function(a){if(this===e)s=P(a,r);else{var o=t(this,i,n,r,a);Object.defineProperty(this,i,o)}},o.configurable=!0,o.enumerable=n,o}(t,e,r?r.enumerable:void 0,n,a);Object.defineProperty(t,e,o)}}var R=i.$mobx||"$mobx",E=M("isUnmounted"),B=M("skipRender"),z=M("isForcingUpdate");function N(t){var i=t.prototype;if(i.componentWillReact)throw new Error("The componentWillReact life-cycle event is no longer supported");if(t.__proto__!==e.PureComponent)if(i.shouldComponentUpdate){if(i.shouldComponentUpdate!==H)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}else i.shouldComponentUpdate=H;V(i,"props"),V(i,"state");var n=i.render;return i.render=function(){return F.call(this,n)},L(i,"componentWillUnmount",(function(){this.render[R]&&this.render[R].dispose(),this[E]=!0})),t}function F(t){var n=this;A(this,B,!1),A(this,z,!1);var r,a=(r=this).displayName||r.name||r.constructor&&(r.constructor.displayName||r.constructor.name)||"<component>",o=t.bind(this),s=!1,l=new i.Reaction(a+".render()",(function(){if(!s&&(s=!0,!0!==n[E])){var t=!0;try{A(n,z,!0),n[B]||e.Component.prototype.forceUpdate.call(n),t=!1}finally{A(n,z,!1),t&&l.dispose()}}}));function u(){s=!1;var t=void 0,e=void 0;if(l.track((function(){try{e=i._allowStateChanges(!1,o)}catch(e){t=e}})),t)throw t;return e}return l.reactComponent=this,u[R]=l,this.render=u,u.call(this)}function H(t,e){return this.state!==e||!C(this.props,t)}function V(t,e){var n=M("reactProp_"+e+"_valueHolder"),r=M("reactProp_"+e+"_atomHolder");function a(){return this[r]||A(this,r,i.createAtom("reactive "+e)),this[r]}Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get:function(){var t=!1;return i._allowStateReadsStart&&i._allowStateReadsEnd&&(t=i._allowStateReadsStart(!0)),a.call(this).reportObserved(),i._allowStateReadsStart&&i._allowStateReadsEnd&&i._allowStateReadsEnd(t),this[n]},set:function(t){this[z]||C(this[n],t)?A(this,n,t):(A(this,n,t),A(this,B,!0),a.call(this).reportChanged(),A(this,B,!1))}})}var W="function"==typeof Symbol&&Symbol.for,G=W?Symbol.for("react.forward_ref"):"function"==typeof e.forwardRef&&e.forwardRef((function(t){return null})).$$typeof,U=W?Symbol.for("react.memo"):"function"==typeof e.memo&&e.memo((function(t){return null})).$$typeof;function Y(t){if(!0===t.isMobxInjector&&console.warn("Mobx observer: You are trying to use 'observer' on a component that already has 'inject'. Please apply 'observer' before applying 'inject'"),U&&t.$$typeof===U)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(G&&t.$$typeof===G){var i=t.render;if("function"!=typeof i)throw new Error("render property of ForwardRef was not a function");return e.forwardRef((function(){var t=arguments;return e.createElement(b,null,(function(){return i.apply(void 0,t)}))}))}return"function"!=typeof t||t.prototype&&t.prototype.render||t.isReactClass||Object.prototype.isPrototypeOf.call(e.Component,t)?N(t):_(t)}if(!e.Component)throw new Error("mobx-react requires React to be available");if(!i.observable)throw new Error("mobx-react requires mobx to be available");var j=2311;var X=function(){return j++};var q="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:function(t){var e={},i=t.match(/Firefox\/([\d.]+)/),n=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),r=t.match(/Edge\/([\d.]+)/),a=/micromessenger/i.test(t);i&&(e.firefox=!0,e.version=i[1]);n&&(e.ie=!0,e.version=n[1]);r&&(e.edge=!0,e.version=r[1]);a&&(e.weChat=!0);return{browser:e,os:{},node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!e.ie&&!e.edge,pointerEventsSupported:"onpointerdown"in window&&(e.edge||e.ie&&e.version>=11),domSupported:"undefined"!=typeof document}}(navigator.userAgent),Z={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},$={"[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},K=Object.prototype.toString,Q=Array.prototype,J=Q.forEach,tt=Q.filter,et=Q.slice,it=Q.map,nt=Q.reduce,rt={};function at(t){if(null==t||"object"!=typeof t)return t;var e=t,i=K.call(t);if("[object Array]"===i){if(!mt(t)){e=[];for(var n=0,r=t.length;n<r;n++)e[n]=at(t[n])}}else if($[i]){if(!mt(t)){var a=t.constructor;if(t.constructor.from)e=a.from(t);else{e=new a(t.length);for(n=0,r=t.length;n<r;n++)e[n]=at(t[n])}}}else if(!Z[i]&&!mt(t)&&!gt(t))for(var o in e={},t)t.hasOwnProperty(o)&&(e[o]=at(t[o]));return e}function ot(t,e,i){if(!ft(e)||!ft(t))return i?at(e):t;for(var n in e)if(e.hasOwnProperty(n)){var r=t[n],a=e[n];!ft(a)||!ft(r)||dt(a)||dt(r)||gt(a)||gt(r)||pt(a)||pt(r)||mt(a)||mt(r)?!i&&n in t||(t[n]=at(e[n])):ot(r,a,i)}return t}function st(t,e,i){for(var n in e)e.hasOwnProperty(n)&&(i?null!=e[n]:null==t[n])&&(t[n]=e[n]);return t}var lt,ut=function(){return rt.createCanvas()};function ht(t,e,i){if(t&&e)if(t.forEach&&t.forEach===J)t.forEach(e,i);else if(t.length===+t.length)for(var n=0,r=t.length;n<r;n++)e.call(i,t[n],n,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(i,t[a],a,t)}function ct(t,e){var i=et.call(arguments,2);return function(){return t.apply(e,i.concat(et.call(arguments)))}}function dt(t){return"[object Array]"===K.call(t)}function ft(t){var e=typeof t;return"function"===e||!!t&&"object"===e}function pt(t){return!!Z[K.call(t)]}function gt(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}rt.createCanvas=function(){return document.createElement("canvas")};function mt(t){return t.__ec_primitive__}function vt(t){var e=dt(t);this.data={};var i=this;function n(t,n){e?i.set(t,n):i.set(n,t)}t instanceof vt?t.each(n):t&&ht(t,n)}vt.prototype={constructor:vt,get:function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},set:function(t,e){return this.data[t]=e},each:function(t,e){for(var i in void 0!==e&&(t=ct(t,e)),this.data)this.data.hasOwnProperty(i)&&t(this.data[i],i)},removeKey:function(t){delete this.data[t]}};var yt={$override:function(t,e){"createCanvas"===t&&(lt=null),rt[t]=e},clone:at,merge:ot,mergeAll:function(t,e){for(var i=t[0],n=1,r=t.length;n<r;n++)i=ot(i,t[n],e);return i},extend:function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t},defaults:st,createCanvas:ut,getContext:function(){return lt||(lt=ut().getContext("2d")),lt},indexOf:function(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var i=0,n=t.length;i<n;i++)if(t[i]===e)return i}return-1},inherits:function(t,e){var i=t.prototype;function n(){}for(var r in n.prototype=e.prototype,t.prototype=new n,i)i.hasOwnProperty(r)&&(t.prototype[r]=i[r]);t.prototype.constructor=t,t.superClass=e},mixin:function(t,e,i){st(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,i)},isArrayLike:function(t){if(t)return"string"!=typeof t&&"number"==typeof t.length},each:ht,map:function(t,e,i){if(t&&e){if(t.map&&t.map===it)return t.map(e,i);for(var n=[],r=0,a=t.length;r<a;r++)n.push(e.call(i,t[r],r,t));return n}},reduce:function(t,e,i,n){if(t&&e){if(t.reduce&&t.reduce===nt)return t.reduce(e,i,n);for(var r=0,a=t.length;r<a;r++)i=e.call(n,i,t[r],r,t);return i}},filter:function(t,e,i){if(t&&e){if(t.filter&&t.filter===tt)return t.filter(e,i);for(var n=[],r=0,a=t.length;r<a;r++)e.call(i,t[r],r,t)&&n.push(t[r]);return n}},find:function(t,e,i){if(t&&e)for(var n=0,r=t.length;n<r;n++)if(e.call(i,t[n],n,t))return t[n]},bind:ct,curry:function(t){var e=et.call(arguments,1);return function(){return t.apply(this,e.concat(et.call(arguments)))}},isArray:dt,isFunction:function(t){return"function"==typeof t},isString:function(t){return"[object String]"===K.call(t)},isObject:ft,isBuiltInObject:pt,isTypedArray:function(t){return!!$[K.call(t)]},isDom:gt,eqNaN:function(t){return t!=t},retrieve:function(t){for(var e=0,i=arguments.length;e<i;e++)if(null!=arguments[e])return arguments[e]},retrieve2:function(t,e){return null!=t?t:e},retrieve3:function(t,e,i){return null!=t?t:null!=e?e:i},slice:function(){return Function.call.apply(et,arguments)},normalizeCssArray:function(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t},assert:function(t,e){if(!t)throw new Error(e)},trim:function(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},setAsPrimitive:function(t){t.__ec_primitive__=!0},isPrimitive:mt,createHashMap:function(t){return new vt(t)},concatArray:function(t,e){for(var i=new t.constructor(t.length+e.length),n=0;n<t.length;n++)i[n]=t[n];var r=t.length;for(n=0;n<e.length;n++)i[n+r]=e[n];return i},noop:function(){}},_t="undefined"==typeof Float32Array?Array:Float32Array;function xt(t){return Math.sqrt(bt(t))}function bt(t){return t[0]*t[0]+t[1]*t[1]}function wt(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function St(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var Tt={create:function(t,e){var i=new _t(2);return null==t&&(t=0),null==e&&(e=0),i[0]=t,i[1]=e,i},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t},clone:function(t){var e=new _t(2);return e[0]=t[0],e[1]=t[1],e},set:function(t,e,i){return t[0]=e,t[1]=i,t},add:function(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t},scaleAndAdd:function(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t},sub:function(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t},len:xt,length:xt,lenSquare:bt,lengthSquare:bt,mul:function(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t},div:function(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},scale:function(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t},normalize:function(t,e){var i=xt(e);return 0===i?(t[0]=0,t[1]=0):(t[0]=e[0]/i,t[1]=e[1]/i),t},distance:wt,dist:wt,distanceSquare:St,distSquare:St,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},lerp:function(t,e,i,n){return t[0]=e[0]+n*(i[0]-e[0]),t[1]=e[1]+n*(i[1]-e[1]),t},applyTransform:function(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[2]*r+i[4],t[1]=i[1]*n+i[3]*r+i[5],t},min:function(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t},max:function(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t}};function Mt(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}function Ct(t,e){return{target:t,topTarget:e&&e.topTarget}}Mt.prototype={constructor:Mt,_dragStart:function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent;e&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(Ct(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,n=t.offsetY,r=i-this._x,a=n-this._y;this._x=i,this._y=n,e.drift(r,a,t),this.dispatchToElement(Ct(e,t),"drag",t.event);var o=this.findHover(i,n,e).target,s=this._dropTarget;this._dropTarget=o,e!==o&&(s&&o!==s&&this.dispatchToElement(Ct(s,t),"dragleave",t.event),o&&o!==s&&this.dispatchToElement(Ct(o,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(Ct(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(Ct(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};var It=Mt,At=Array.prototype.slice,Dt=function(t){this._$handlers={},this._$eventProcessor=t};function kt(t,e,i,n,r,a){var o=t._$handlers;if("function"==typeof i&&(r=n,n=i,i=null),!n||!e)return t;i=function(t,e){var i=t._$eventProcessor;return null!=e&&i&&i.normalizeQuery&&(e=i.normalizeQuery(e)),e}(t,i),o[e]||(o[e]=[]);for(var s=0;s<o[e].length;s++)if(o[e][s].h===n)return t;var l={h:n,one:a,query:i,ctx:r||t,callAtLast:n.zrEventfulCallAtLast},u=o[e].length-1,h=o[e][u];return h&&h.callAtLast?o[e].splice(u,0,l):o[e].push(l),t}Dt.prototype={constructor:Dt,one:function(t,e,i,n){return kt(this,t,e,i,n,!0)},on:function(t,e,i,n){return kt(this,t,e,i,n,!1)},isSilent:function(t){var e=this._$handlers;return!e[t]||!e[t].length},off:function(t,e){var i=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(i[t]){for(var n=[],r=0,a=i[t].length;r<a;r++)i[t][r].h!==e&&n.push(i[t][r]);i[t]=n}i[t]&&0===i[t].length&&delete i[t]}else delete i[t];return this},trigger:function(t){var e=this._$handlers[t],i=this._$eventProcessor;if(e){var n=arguments,r=n.length;r>3&&(n=At.call(n,1));for(var a=e.length,o=0;o<a;){var s=e[o];if(i&&i.filter&&null!=s.query&&!i.filter(t,s.query))o++;else{switch(r){case 1:s.h.call(s.ctx);break;case 2:s.h.call(s.ctx,n[1]);break;case 3:s.h.call(s.ctx,n[1],n[2]);break;default:s.h.apply(s.ctx,n)}s.one?(e.splice(o,1),a--):o++}}}return i&&i.afterTrigger&&i.afterTrigger(t),this},triggerWithContext:function(t){var e=this._$handlers[t],i=this._$eventProcessor;if(e){var n=arguments,r=n.length;r>4&&(n=At.call(n,1,n.length-1));for(var a=n[n.length-1],o=e.length,s=0;s<o;){var l=e[s];if(i&&i.filter&&null!=l.query&&!i.filter(t,l.query))s++;else{switch(r){case 1:l.h.call(a);break;case 2:l.h.call(a,n[1]);break;case 3:l.h.call(a,n[1],n[2]);break;default:l.h.apply(a,n)}l.one?(e.splice(s,1),o--):s++}}}return i&&i.afterTrigger&&i.afterTrigger(t),this}};var Ot=Dt,Pt=Math.log(2);function Lt(t,e,i,n,r,a){var o=n+"-"+r,s=t.length;if(a.hasOwnProperty(o))return a[o];if(1===e){var l=Math.round(Math.log((1<<s)-1&~r)/Pt);return t[i][l]}for(var u=n|1<<i,h=i+1;n&1<<h;)h++;for(var c=0,d=0,f=0;d<s;d++){var p=1<<d;p&r||(c+=(f%2?-1:1)*t[i][d]*Lt(t,e-1,h,u,r|p,a),f++)}return a[o]=c,c}var Rt={buildTransformer:function(t,e){var i=[[t[0],t[1],1,0,0,0,-e[0]*t[0],-e[0]*t[1]],[0,0,0,t[0],t[1],1,-e[1]*t[0],-e[1]*t[1]],[t[2],t[3],1,0,0,0,-e[2]*t[2],-e[2]*t[3]],[0,0,0,t[2],t[3],1,-e[3]*t[2],-e[3]*t[3]],[t[4],t[5],1,0,0,0,-e[4]*t[4],-e[4]*t[5]],[0,0,0,t[4],t[5],1,-e[5]*t[4],-e[5]*t[5]],[t[6],t[7],1,0,0,0,-e[6]*t[6],-e[6]*t[7]],[0,0,0,t[6],t[7],1,-e[7]*t[6],-e[7]*t[7]]],n={},r=Lt(i,8,0,0,0,n);if(0!==r){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)null==a[s]&&(a[s]=0),a[s]+=((o+s)%2?-1:1)*Lt(i,7,0===o?1:0,1<<o,1<<s,n)/r*e[o];return function(t,e,i){var n=e*a[6]+i*a[7]+1;t[0]=(e*a[0]+i*a[1]+a[2])/n,t[1]=(e*a[3]+i*a[4]+a[5])/n}}}}.buildTransformer,Et=[];function Bt(t,e,i,n,r){if(e.getBoundingClientRect&&q.domSupported&&!zt(e)){var a=e.___zrEVENTSAVED||(e.___zrEVENTSAVED={}),o=function(t,e,i){for(var n=i?"invTrans":"trans",r=e[n],a=e.srcCoords,o=!0,s=[],l=[],u=0;u<4;u++){var h=t[u].getBoundingClientRect(),c=2*u,d=h.left,f=h.top;s.push(d,f),o=o&&a&&d===a[c]&&f===a[c+1],l.push(t[u].offsetLeft,t[u].offsetTop)}return o&&r?r:(e.srcCoords=s,e[n]=i?Rt(l,s):Rt(s,l))}(function(t,e){var i=e.markers;if(i)return i;i=e.markers=[];for(var n=["left","right"],r=["top","bottom"],a=0;a<4;a++){var o=document.createElement("div"),s=o.style,l=a%2,u=(a>>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",r[u]+":0",n[1-l]+":auto",r[1-u]+":auto",""].join("!important;"),t.appendChild(o),i.push(o)}return i}(e,a),a,r);if(o)return o(t,i,n),!0}return!1}function zt(t){return"CANVAS"===t.nodeName.toUpperCase()}var Nt={transformLocalCoord:function(t,e,i,n,r){return Bt(Et,e,n,r,!0)&&Bt(t,i,Et[0],Et[1])},transformCoordWithViewport:Bt,isCanvasEl:zt},Ft=Ot,Ht=Nt.isCanvasEl,Vt=Nt.transformCoordWithViewport,Wt="undefined"!=typeof window&&!!window.addEventListener,Gt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ut=[];function Yt(t,e,i,n){return i=i||{},n||!q.canvasSupported?jt(t,e,i):q.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(i.zrX=e.layerX,i.zrY=e.layerY):null!=e.offsetX?(i.zrX=e.offsetX,i.zrY=e.offsetY):jt(t,e,i),i}function jt(t,e,i){if(q.domSupported&&t.getBoundingClientRect){var n=e.clientX,r=e.clientY;if(Ht(t)){var a=t.getBoundingClientRect();return i.zrX=n-a.left,void(i.zrY=r-a.top)}if(Vt(Ut,t,n,r))return i.zrX=Ut[0],void(i.zrY=Ut[1])}i.zrX=i.zrY=0}function Xt(t){return t||window.event}var qt={Dispatcher:Ft,clientToLocal:Yt,getNativeEvent:Xt,normalizeEvent:function(t,e,i){if(null!=(e=Xt(e)).zrX)return e;var n=e.type;if(n&&n.indexOf("touch")>=0){var r="touchend"!==n?e.targetTouches[0]:e.changedTouches[0];r&&Yt(t,r,e,i)}else Yt(t,e,e,i),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var a=e.button;return null==e.which&&void 0!==a&&Gt.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e},addEventListener:function(t,e,i,n){Wt?t.addEventListener(e,i,n):t.attachEvent("on"+e,i)},removeEventListener:function(t,e,i,n){Wt?t.removeEventListener(e,i,n):t.detachEvent("on"+e,i)},stop:Wt?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0},isMiddleOrRightButtonOnMouseUpDown:function(t){return 2===t.which||3===t.which},notLeftMouse:function(t){return t.which>1}},Zt=function(){this._track=[]};function $t(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}Zt.prototype={constructor:Zt,recognize:function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,i){var n=t.touches;if(n){for(var r={points:[],touches:[],target:e,event:t},a=0,o=n.length;a<o;a++){var s=n[a],l=qt.clientToLocal(i,s,{});r.points.push([l.zrX,l.zrY]),r.touches.push(s)}this._track.push(r)}},_recognize:function(t){for(var e in Kt)if(Kt.hasOwnProperty(e)){var i=Kt[e](this._track,t);if(i)return i}}};var Kt={pinch:function(t,e){var i=t.length;if(i){var n,r=(t[i-1]||{}).points,a=(t[i-2]||{}).points||r;if(a&&a.length>1&&r&&r.length>1){var o=$t(r)/$t(a);!isFinite(o)&&(o=1),e.pinchScale=o;var s=[((n=r)[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}},Qt=Zt;function Jt(){qt.stop(this.event)}function te(){}te.prototype.dispose=function(){};var ee=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],ie=function(t,e,i,n){Ot.call(this),this.storage=t,this.painter=e,this.painterRoot=n,i=i||new te,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,It.call(this),this.setHandlerProxy(i)};function ne(t,e,i){if(t[t.rectHover?"rectContain":"contain"](e,i)){for(var n,r=t;r;){if(r.clipPath&&!r.clipPath.contain(e,i))return!1;r.silent&&(n=!0),r=r.parent}return!n||"silent"}return!1}function re(t,e,i){var n=t.painter;return e<0||e>n.getWidth()||i<0||i>n.getHeight()}ie.prototype={constructor:ie,setHandlerProxy:function(t){this.proxy&&this.proxy.dispose(),t&&(yt.each(ee,(function(e){t.on&&t.on(e,this[e],this)}),this),t.handler=this),this.proxy=t},mousemove:function(t){var e=t.zrX,i=t.zrY,n=re(this,e,i),r=this._hovered,a=r.target;a&&!a.__zr&&(a=(r=this.findHover(r.x,r.y)).target);var o=this._hovered=n?{x:e,y:i}:this.findHover(e,i),s=o.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),a&&s!==a&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(o,"mousemove",t),s&&s!==a&&this.dispatchToElement(o,"mouseover",t)},mouseout:function(t){var e=t.zrEventControl,i=t.zrIsToLocalDOM;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&!i&&this.trigger("globalout",{type:"globalout",event:t})},resize:function(t){this._hovered={}},dispatch:function(t,e){var i=this[t];i&&i.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,i){var n=(t=t||{}).target;if(!n||!n.silent){for(var r="on"+e,a=function(t,e,i){return{type:t,event:i,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:i.zrX,offsetY:i.zrY,gestureEvent:i.gestureEvent,pinchX:i.pinchX,pinchY:i.pinchY,pinchScale:i.pinchScale,wheelDelta:i.zrDelta,zrByTouch:i.zrByTouch,which:i.which,stop:Jt}}(e,t,i);n&&(n[r]&&(a.cancelBubble=n[r].call(n,a)),n.trigger(e,a),n=n.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(e,a),this.painter&&this.painter.eachOtherLayer((function(t){"function"==typeof t[r]&&t[r].call(t,a),t.trigger&&t.trigger(e,a)})))}},findHover:function(t,e,i){for(var n=this.storage.getDisplayList(),r={x:t,y:e},a=n.length-1;a>=0;a--){var o;if(n[a]!==i&&!n[a].ignore&&(o=ne(n[a],t,e))&&(!r.topTarget&&(r.topTarget=n[a]),"silent"!==o)){r.target=n[a];break}}return r},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new Qt);var i=this._gestureMgr;"start"===e&&i.clear();var n=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&i.clear(),n){var r=n.type;t.gestureEvent=r,this.dispatchToElement({target:n.target},r,n.event)}}},yt.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){ie.prototype[t]=function(e){var i,n,r=e.zrX,a=e.zrY,o=re(this,r,a);if("mouseup"===t&&o||(n=(i=this.findHover(r,a)).target),"mousedown"===t)this._downEl=n,this._downPoint=[e.zrX,e.zrY],this._upEl=n;else if("mouseup"===t)this._upEl=n;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||Tt.dist(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,e)}})),yt.mixin(ie,Ot),yt.mixin(ie,It);var ae=ie,oe="undefined"==typeof Float32Array?Array:Float32Array;function se(){var t=new oe(6);return le(t),t}function le(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function ue(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}var he={create:se,identity:le,copy:ue,mul:function(t,e,i){var n=e[0]*i[0]+e[2]*i[1],r=e[1]*i[0]+e[3]*i[1],a=e[0]*i[2]+e[2]*i[3],o=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],l=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=n,t[1]=r,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t},translate:function(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t},rotate:function(t,e,i){var n=e[0],r=e[2],a=e[4],o=e[1],s=e[3],l=e[5],u=Math.sin(i),h=Math.cos(i);return t[0]=n*h+o*u,t[1]=-n*u+o*h,t[2]=r*h+s*u,t[3]=-r*u+h*s,t[4]=h*a+u*l,t[5]=h*l-u*a,t},scale:function(t,e,i){var n=i[0],r=i[1];return t[0]=e[0]*n,t[1]=e[1]*r,t[2]=e[2]*n,t[3]=e[3]*r,t[4]=e[4]*n,t[5]=e[5]*r,t},invert:function(t,e){var i=e[0],n=e[2],r=e[4],a=e[1],o=e[3],s=e[5],l=i*o-a*n;return l?(l=1/l,t[0]=o*l,t[1]=-a*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-o*r)*l,t[5]=(a*r-i*s)*l,t):null},clone:function(t){var e=se();return ue(e,t),e}},ce=he.identity;function de(t){return t>5e-5||t<-5e-5}var fe=function(t){(t=t||{}).position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},pe=fe.prototype;pe.transform=null,pe.needLocalTransform=function(){return de(this.rotation)||de(this.position[0])||de(this.position[1])||de(this.scale[0]-1)||de(this.scale[1]-1)};var ge=[];pe.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),n=this.transform;if(i||e){n=n||he.create(),i?this.getLocalTransform(n):ce(n),e&&(i?he.mul(n,t.transform,n):he.copy(n,t.transform)),this.transform=n;var r=this.globalScaleRatio;if(null!=r&&1!==r){this.getGlobalScale(ge);var a=ge[0]<0?-1:1,o=ge[1]<0?-1:1,s=((ge[0]-a)*r+a)/ge[0]||0,l=((ge[1]-o)*r+o)/ge[1]||0;n[0]*=s,n[1]*=s,n[2]*=l,n[3]*=l}this.invTransform=this.invTransform||he.create(),he.invert(this.invTransform,n)}else n&&ce(n)},pe.getLocalTransform=function(t){return fe.getLocalTransform(this,t)},pe.setTransform=function(t){var e=this.transform,i=t.dpr||1;e?t.setTransform(i*e[0],i*e[1],i*e[2],i*e[3],i*e[4],i*e[5]):t.setTransform(i,0,0,i,0,0)},pe.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var me=[],ve=he.create();pe.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],n=this.position,r=this.scale;de(e-1)&&(e=Math.sqrt(e)),de(i-1)&&(i=Math.sqrt(i)),t[0]<0&&(e=-e),t[3]<0&&(i=-i),n[0]=t[4],n[1]=t[5],r[0]=e,r[1]=i,this.rotation=Math.atan2(-t[1]/i,t[0]/e)}},pe.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(he.mul(me,t.invTransform,e),e=me);var i=this.origin;i&&(i[0]||i[1])&&(ve[4]=i[0],ve[5]=i[1],he.mul(me,e,ve),me[4]-=i[0],me[5]-=i[1],e=me),this.setLocalTransform(e)}},pe.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},pe.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&Tt.applyTransform(i,i,n),i},pe.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&Tt.applyTransform(i,i,n),i},fe.getLocalTransform=function(t,e){ce(e=e||[]);var i=t.origin,n=t.scale||[1,1],r=t.rotation||0,a=t.position||[0,0];return i&&(e[4]-=i[0],e[5]-=i[1]),he.scale(e,e,n),r&&he.rotate(e,e,r),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=a[0],e[5]+=a[1],e};var ye=fe,_e={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=n*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-_e.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*_e.bounceIn(2*t):.5*_e.bounceOut(2*t-1)+.5}},xe=_e;function be(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null!=t.loop&&t.loop,this.gap=t.gap||0,this.easing=t.easing||"Linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart,this._pausedTime=0,this._paused=!1}be.prototype={constructor:be,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)this._pausedTime+=e;else{var i=(t-this._startTime-this._pausedTime)/this._life;if(!(i<0)){i=Math.min(i,1);var n=this.easing,r="string"==typeof n?xe[n]:n,a="function"==typeof r?r(i):i;return this.fire("frame",a),1===i?this.loop?(this.restart(t),"restart"):(this._needsRemove=!0,"destroy"):null}}},restart:function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(t,e){this[t="on"+t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var we=be,Se=function(){this.head=null,this.tail=null,this._len=0},Te=Se.prototype;Te.insert=function(t){var e=new Me(t);return this.insertEntry(e),e},Te.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},Te.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},Te.len=function(){return this._len},Te.clear=function(){this.head=this.tail=null,this._len=0};var Me=function(t){this.value=t,this.next,this.prev},Ce=function(t){this._list=new Se,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},Ie=Ce.prototype;Ie.put=function(t,e){var i=this._list,n=this._map,r=null;if(null==n[t]){var a=i.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=i.head;i.remove(s),delete n[s.key],r=s.value,this._lastRemovedEntry=s}o?o.value=e:o=new Me(e),o.key=t,i.insertEntry(o),n[t]=o}return r},Ie.get=function(t){var e=this._map[t],i=this._list;if(null!=e)return e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value},Ie.clear=function(){this._list.clear(),this._map={}};var Ae=Ce,De={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 ke(t){return(t=Math.round(t))<0?0:t>255?255:t}function Oe(t){return t<0?0:t>1?1:t}function Pe(t){return t.length&&"%"===t.charAt(t.length-1)?ke(parseFloat(t)/100*255):ke(parseInt(t,10))}function Le(t){return t.length&&"%"===t.charAt(t.length-1)?Oe(parseFloat(t)/100):Oe(parseFloat(t))}function Re(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}function Ee(t,e,i){return t+(e-t)*i}function Be(t,e,i,n,r){return t[0]=e,t[1]=i,t[2]=n,t[3]=r,t}function ze(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var Ne=new Ae(20),Fe=null;function He(t,e){Fe&&ze(Fe,e),Fe=Ne.put(t,Fe||e.slice())}function Ve(t,e){if(t){e=e||[];var i=Ne.get(t);if(i)return ze(e,i);var n,r=(t+="").replace(/ /g,"").toLowerCase();if(r in De)return ze(e,De[r]),He(t,e),e;if("#"===r.charAt(0))return 4===r.length?(n=parseInt(r.substr(1),16))>=0&&n<=4095?(Be(e,(3840&n)>>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,1),He(t,e),e):void Be(e,0,0,0,1):7===r.length?(n=parseInt(r.substr(1),16))>=0&&n<=16777215?(Be(e,(16711680&n)>>16,(65280&n)>>8,255&n,1),He(t,e),e):void Be(e,0,0,0,1):void 0;var a=r.indexOf("("),o=r.indexOf(")");if(-1!==a&&o+1===r.length){var s=r.substr(0,a),l=r.substr(a+1,o-(a+1)).split(","),u=1;switch(s){case"rgba":if(4!==l.length)return void Be(e,0,0,0,1);u=Le(l.pop());case"rgb":return 3!==l.length?void Be(e,0,0,0,1):(Be(e,Pe(l[0]),Pe(l[1]),Pe(l[2]),u),He(t,e),e);case"hsla":return 4!==l.length?void Be(e,0,0,0,1):(l[3]=Le(l[3]),We(l,e),He(t,e),e);case"hsl":return 3!==l.length?void Be(e,0,0,0,1):(We(l,e),He(t,e),e);default:return}}Be(e,0,0,0,1)}}function We(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=Le(t[1]),r=Le(t[2]),a=r<=.5?r*(n+1):r+n-r*n,o=2*r-a;return Be(e=e||[],ke(255*Re(o,a,i+1/3)),ke(255*Re(o,a,i)),ke(255*Re(o,a,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Ge(t,e,i){if(e&&e.length&&t>=0&&t<=1){i=i||[];var n=t*(e.length-1),r=Math.floor(n),a=Math.ceil(n),o=e[r],s=e[a],l=n-r;return i[0]=ke(Ee(o[0],s[0],l)),i[1]=ke(Ee(o[1],s[1],l)),i[2]=ke(Ee(o[2],s[2],l)),i[3]=Oe(Ee(o[3],s[3],l)),i}}function Ue(t,e,i){if(e&&e.length&&t>=0&&t<=1){var n=t*(e.length-1),r=Math.floor(n),a=Math.ceil(n),o=Ve(e[r]),s=Ve(e[a]),l=n-r,u=Ye([ke(Ee(o[0],s[0],l)),ke(Ee(o[1],s[1],l)),ke(Ee(o[2],s[2],l)),Oe(Ee(o[3],s[3],l))],"rgba");return i?{color:u,leftIndex:r,rightIndex:a,value:n}:u}}function Ye(t,e){if(t&&t.length){var i=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(i+=","+t[3]),e+"("+i+")"}}var je={parse:Ve,lift:function(t,e){var i=Ve(t);if(i){for(var n=0;n<3;n++)i[n]=e<0?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0,i[n]>255?i[n]=255:t[n]<0&&(i[n]=0);return Ye(i,4===i.length?"rgba":"rgb")}},toHex:function(t){var e=Ve(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)},fastLerp:Ge,fastMapToColor:Ge,lerp:Ue,mapToColor:Ue,modifyHSL:function(t,e,i,n){if(t=Ve(t))return t=function(t){if(t){var e,i,n=t[0]/255,r=t[1]/255,a=t[2]/255,o=Math.min(n,r,a),s=Math.max(n,r,a),l=s-o,u=(s+o)/2;if(0===l)e=0,i=0;else{i=u<.5?l/(s+o):l/(2-s-o);var h=((s-n)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-a)/6+l/2)/l;n===s?e=d-c:r===s?e=1/3+h-d:a===s&&(e=2/3+c-h),e<0&&(e+=1),e>1&&(e-=1)}var f=[360*e,i,u];return null!=t[3]&&f.push(t[3]),f}}(t),null!=e&&(t[0]=function(t){return(t=Math.round(t))<0?0:t>360?360:t}(e)),null!=i&&(t[1]=Le(i)),null!=n&&(t[2]=Le(n)),Ye(We(t),"rgba")},modifyAlpha:function(t,e){if((t=Ve(t))&&null!=e)return t[3]=Oe(e),Ye(t,"rgba")},stringify:Ye},Xe=yt.isArrayLike,qe=Array.prototype.slice;function Ze(t,e){return t[e]}function $e(t,e,i){t[e]=i}function Ke(t,e,i){return(e-t)*i+t}function Qe(t,e,i){return i>.5?e:t}function Je(t,e,i,n,r){var a=t.length;if(1===r)for(var o=0;o<a;o++)n[o]=Ke(t[o],e[o],i);else{var s=a&&t[0].length;for(o=0;o<a;o++)for(var l=0;l<s;l++)n[o][l]=Ke(t[o][l],e[o][l],i)}}function ti(t,e,i){var n=t.length,r=e.length;if(n!==r)if(n>r)t.length=r;else for(var a=n;a<r;a++)t.push(1===i?e[a]:qe.call(e[a]));var o=t[0]&&t[0].length;for(a=0;a<t.length;a++)if(1===i)isNaN(t[a])&&(t[a]=e[a]);else for(var s=0;s<o;s++)isNaN(t[a][s])&&(t[a][s]=e[a][s])}function ei(t,e,i){if(t===e)return!0;var n=t.length;if(n!==e.length)return!1;if(1===i){for(var r=0;r<n;r++)if(t[r]!==e[r])return!1}else{var a=t[0].length;for(r=0;r<n;r++)for(var o=0;o<a;o++)if(t[r][o]!==e[r][o])return!1}return!0}function ii(t,e,i,n,r,a,o,s,l){var u=t.length;if(1===l)for(var h=0;h<u;h++)s[h]=ni(t[h],e[h],i[h],n[h],r,a,o);else{var c=t[0].length;for(h=0;h<u;h++)for(var d=0;d<c;d++)s[h][d]=ni(t[h][d],e[h][d],i[h][d],n[h][d],r,a,o)}}function ni(t,e,i,n,r,a,o){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*o+(-3*(e-i)-2*s-l)*a+s*r+e}function ri(t){if(Xe(t)){var e=t.length;if(Xe(t[0])){for(var i=[],n=0;n<e;n++)i.push(qe.call(t[n]));return i}return qe.call(t)}return t}function ai(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function oi(t,e,i,n,r,a){var o=t._getter,s=t._setter,l="spline"===e,u=n.length;if(u){var h,c=n[0].value,d=Xe(c),f=!1,p=!1,g=d?function(t){var e=t[t.length-1].value;return Xe(e&&e[0])?2:1}(n):0;n.sort((function(t,e){return t.time-e.time})),h=n[u-1].time;for(var m=[],v=[],y=n[0].value,_=!0,x=0;x<u;x++){m.push(n[x].time/h);var b=n[x].value;if(d&&ei(b,y,g)||!d&&b===y||(_=!1),y=b,"string"==typeof b){var w=je.parse(b);w?(b=w,f=!0):p=!0}v.push(b)}if(a||!_){var S=v[u-1];for(x=0;x<u-1;x++)d?ti(v[x],S,g):!isNaN(v[x])||isNaN(S)||p||f||(v[x]=S);d&&ti(o(t._target,r),S,g);var T,M,C,I,A,D=0,k=0;if(f)var O=[0,0,0,0];var P=new we({target:t._target,life:h,loop:t._loop,delay:t._delay,onframe:function(t,e){var i;if(e<0)i=0;else if(e<k){for(i=Math.min(D+1,u-1);i>=0&&!(m[i]<=e);i--);i=Math.min(i,u-2)}else{for(i=D;i<u&&!(m[i]>e);i++);i=Math.min(i-1,u-2)}D=i,k=e;var n=m[i+1]-m[i];if(0!==n)if(T=(e-m[i])/n,l)if(C=v[i],M=v[0===i?i:i-1],I=v[i>u-2?u-1:i+1],A=v[i>u-3?u-1:i+2],d)ii(M,C,I,A,T,T*T,T*T*T,o(t,r),g);else{if(f)a=ii(M,C,I,A,T,T*T,T*T*T,O,1),a=ai(O);else{if(p)return Qe(C,I,T);a=ni(M,C,I,A,T,T*T,T*T*T)}s(t,r,a)}else if(d)Je(v[i],v[i+1],T,o(t,r),g);else{var a;if(f)Je(v[i],v[i+1],T,O,1),a=ai(O);else{if(p)return Qe(v[i],v[i+1],T);a=Ke(v[i],v[i+1],T)}s(t,r,a)}},ondestroy:i});return e&&"spline"!==e&&(P.easing=e),P}}}var si=function(t,e,i,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||Ze,this._setter=n||$e,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};si.prototype={when:function(t,e){var i=this._tracks;for(var n in e)if(e.hasOwnProperty(n)){if(!i[n]){i[n]=[];var r=this._getter(this._target,n);if(null==r)continue;0!==t&&i[n].push({time:0,value:ri(r)})}i[n].push({time:t,value:e[n]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].pause();this._paused=!0},resume:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var t=this._doneList,e=t.length,i=0;i<e;i++)t[i].call(this)},start:function(t,e){var i,n=this,r=0,a=function(){--r||n._doneCallback()};for(var o in this._tracks)if(this._tracks.hasOwnProperty(o)){var s=oi(this,t,a,this._tracks[o],o,e);s&&(this._clipList.push(s),r++,this.animation&&this.animation.addClip(s),i=s)}if(i){var l=i.onframe;i.onframe=function(t,e){l(t,e);for(var i=0;i<n._onframeList.length;i++)n._onframeList[i](t,e)}}return r||this._doneCallback(),this},stop:function(t){for(var e=this._clipList,i=this.animation,n=0;n<e.length;n++){var r=e[n];t&&r.onframe(this._target,1),i&&i.removeClip(r)}e.length=0},delay:function(t){return this._delay=t,this},done:function(t){return t&&this._doneList.push(t),this},getClips:function(){return this._clipList}};var li=si,ui=1;"undefined"!=typeof window&&(ui=Math.max(window.devicePixelRatio||1,1));var hi={debugMode:0,devicePixelRatio:ui},ci=function(){},di=yt.isString,fi=yt.isFunction,pi=yt.isObject,gi=yt.isArrayLike,mi=yt.indexOf,vi=function(){this.animators=[]};function yi(t,e,i,n,r,a,o,s){di(n)?(a=r,r=n,n=0):fi(r)?(a=r,r="linear",n=0):fi(n)?(a=n,n=0):fi(i)?(a=i,i=500):i||(i=500),t.stopAnimation(),function t(e,i,n,r,a,o,s){var l={},u=0;for(var h in r)r.hasOwnProperty(h)&&(null!=n[h]?pi(r[h])&&!gi(r[h])?t(e,i?i+"."+h:h,n[h],r[h],a,o,s):(s?(l[h]=n[h],_i(e,i,h,r[h])):l[h]=r[h],u++):null==r[h]||s||_i(e,i,h,r[h]));u>0&&e.animate(i,!1).when(null==a?500:a,l).delay(o||0)}(t,"",t,e,i,n,s);var l=t.animators.slice(),u=l.length;function h(){--u||a&&a()}u||a&&a();for(var c=0;c<l.length;c++)l[c].done(h).start(r,o)}function _i(t,e,i,n){if(e){var r={};r[e]={},r[e][i]=n,t.attr(r)}else t.attr(i,n)}vi.prototype={constructor:vi,animate:function(t,e){var i,n=!1,r=this,a=this.__zr;if(t){var o=t.split("."),s=r;n="shape"===o[0];for(var l=0,u=o.length;l<u;l++)s&&(s=s[o[l]]);s&&(i=s)}else i=r;if(i){var h=r.animators,c=new li(i,e);return c.during((function(t){r.dirty(n)})).done((function(){h.splice(mi(h,c),1)})),h.push(c),a&&a.animation.addAnimator(c),c}ci('Property "'+t+'" is not existed in element '+r.id)},stopAnimation:function(t){for(var e=this.animators,i=e.length,n=0;n<i;n++)e[n].stop(t);return e.length=0,this},animateTo:function(t,e,i,n,r,a){yi(this,t,e,i,n,r,a)},animateFrom:function(t,e,i,n,r,a){yi(this,t,e,i,n,r,a,!0)}};var xi=vi,bi=function(t){ye.call(this,t),Ot.call(this,t),xi.call(this,t),this.id=t.id||X()};bi.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(t,e){},attrKV:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var i=this[t];i||(i=this[t]=[]),i[0]=e[0],i[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(yt.isObject(t))for(var i in t)t.hasOwnProperty(i)&&this.attrKV(i,t[i]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),this.clipPath=t,t.__zr=e,t.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.addAnimator(e[i]);this.clipPath&&this.clipPath.addSelfToZr(t)},removeSelfFromZr:function(t){this.__zr=null;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.removeAnimator(e[i]);this.clipPath&&this.clipPath.removeSelfFromZr(t)}},yt.mixin(bi,xi),yt.mixin(bi,ye),yt.mixin(bi,Ot);var wi,Si,Ti,Mi,Ci=bi,Ii=Tt.applyTransform,Ai=Math.min,Di=Math.max;function ki(t,e,i,n){i<0&&(t+=i,i=-i),n<0&&(e+=n,n=-n),this.x=t,this.y=e,this.width=i,this.height=n}ki.prototype={constructor:ki,union:function(t){var e=Ai(t.x,this.x),i=Ai(t.y,this.y);this.width=Di(t.x+t.width,this.x+this.width)-e,this.height=Di(t.y+t.height,this.y+this.height)-i,this.x=e,this.y=i},applyTransform:(wi=[],Si=[],Ti=[],Mi=[],function(t){if(t){wi[0]=Ti[0]=this.x,wi[1]=Mi[1]=this.y,Si[0]=Mi[0]=this.x+this.width,Si[1]=Ti[1]=this.y+this.height,Ii(wi,wi,t),Ii(Si,Si,t),Ii(Ti,Ti,t),Ii(Mi,Mi,t),this.x=Ai(wi[0],Si[0],Ti[0],Mi[0]),this.y=Ai(wi[1],Si[1],Ti[1],Mi[1]);var e=Di(wi[0],Si[0],Ti[0],Mi[0]),i=Di(wi[1],Si[1],Ti[1],Mi[1]);this.width=e-this.x,this.height=i-this.y}}),calculateTransform:function(t){var e=this,i=t.width/e.width,n=t.height/e.height,r=he.create();return he.translate(r,r,[-e.x,-e.y]),he.scale(r,r,[i,n]),he.translate(r,r,[t.x,t.y]),r},intersect:function(t){if(!t)return!1;t instanceof ki||(t=ki.create(t));var e=this,i=e.x,n=e.x+e.width,r=e.y,a=e.y+e.height,o=t.x,s=t.x+t.width,l=t.y,u=t.y+t.height;return!(n<o||s<i||a<l||u<r)},contain:function(t,e){return t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height},clone:function(){return new ki(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},ki.create=function(t){return new ki(t.x,t.y,t.width,t.height)};var Oi=ki,Pi=function(t){for(var e in t=t||{},Ci.call(this,t),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};Pi.prototype={constructor:Pi,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,i=0;i<e.length;i++)if(e[i].name===t)return e[i]},childCount:function(){return this._children.length},add:function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},addBefore:function(t,e){if(t&&t!==this&&t.parent!==this&&e&&e.parent===this){var i=this._children,n=i.indexOf(e);n>=0&&(i.splice(n,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,i=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof Pi&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,n=this._children,r=yt.indexOf(n,t);return r<0||(n.splice(r,1),t.parent=null,i&&(i.delFromStorage(t),t instanceof Pi&&t.delChildrenFromStorage(i)),e&&e.refresh()),this},removeAll:function(){var t,e,i=this._children,n=this.__storage;for(e=0;e<i.length;e++)t=i[e],n&&(n.delFromStorage(t),t instanceof Pi&&t.delChildrenFromStorage(n)),t.parent=null;return i.length=0,this},eachChild:function(t,e){for(var i=this._children,n=0;n<i.length;n++){var r=i[n];t.call(e,r,n)}return this},traverse:function(t,e){for(var i=0;i<this._children.length;i++){var n=this._children[i];t.call(e,n),"group"===n.type&&n.traverse(t,e)}return this},addChildrenToStorage:function(t){for(var e=0;e<this._children.length;e++){var i=this._children[e];t.addToStorage(i),i instanceof Pi&&i.addChildrenToStorage(t)}},delChildrenFromStorage:function(t){for(var e=0;e<this._children.length;e++){var i=this._children[e];t.delFromStorage(i),i instanceof Pi&&i.delChildrenFromStorage(t)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(t){for(var e=null,i=new Oi(0,0,0,0),n=t||this._children,r=[],a=0;a<n.length;a++){var o=n[a];if(!o.ignore&&!o.invisible){var s=o.getBoundingRect(),l=o.getLocalTransform(r);l?(i.copy(s),i.applyTransform(l),(e=e||i.clone()).union(i)):(e=e||s.clone()).union(s)}}return e||i}},yt.inherits(Pi,Ci);var Li=Pi;function Ri(t,e,i,n){var r=e+1;if(r===i)return 1;if(n(t[r++],t[e])<0){for(;r<i&&n(t[r],t[r-1])<0;)r++;!function(t,e,i){i--;for(;e<i;){var n=t[e];t[e++]=t[i],t[i--]=n}}(t,e,r)}else for(;r<i&&n(t[r],t[r-1])>=0;)r++;return r-e}function Ei(t,e,i,n,r){for(n===e&&n++;n<i;n++){for(var a,o=t[n],s=e,l=n;s<l;)r(o,t[a=s+l>>>1])<0?l=a:s=a+1;var u=n-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=o}}function Bi(t,e,i,n,r,a){var o=0,s=0,l=1;if(a(t,e[i+r])>0){for(s=n-r;l<s&&a(t,e[i+r+l])>0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=r,l+=r}else{for(s=r+1;l<s&&a(t,e[i+r-l])<=0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=o;o=r-l,l=r-u}for(o++;o<l;){var h=o+(l-o>>>1);a(t,e[i+h])>0?o=h+1:l=h}return l}function zi(t,e,i,n,r,a){var o=0,s=0,l=1;if(a(t,e[i+r])<0){for(s=r+1;l<s&&a(t,e[i+r-l])<0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=o;o=r-l,l=r-u}else{for(s=n-r;l<s&&a(t,e[i+r+l])>=0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=r,l+=r}for(o++;o<l;){var h=o+(l-o>>>1);a(t,e[i+h])<0?l=h:o=h+1}return l}function Ni(t,e){var i,n,r=7,a=0;t.length;var o=[];function s(s){var l=i[s],u=n[s],h=i[s+1],c=n[s+1];n[s]=u+c,s===a-3&&(i[s+1]=i[s+2],n[s+1]=n[s+2]),a--;var d=zi(t[h],t,l,u,0,e);l+=d,0!==(u-=d)&&0!==(c=Bi(t[l+u-1],t,h,c,c-1,e))&&(u<=c?function(i,n,a,s){var l=0;for(l=0;l<n;l++)o[l]=t[i+l];var u=0,h=a,c=i;if(t[c++]=t[h++],0==--s){for(l=0;l<n;l++)t[c+l]=o[u+l];return}if(1===n){for(l=0;l<s;l++)t[c+l]=t[h+l];return void(t[c+s]=o[u])}var d,f,p,g=r;for(;;){d=0,f=0,p=!1;do{if(e(t[h],o[u])<0){if(t[c++]=t[h++],f++,d=0,0==--s){p=!0;break}}else if(t[c++]=o[u++],d++,f=0,1==--n){p=!0;break}}while((d|f)<g);if(p)break;do{if(0!==(d=zi(t[h],o,u,n,0,e))){for(l=0;l<d;l++)t[c+l]=o[u+l];if(c+=d,u+=d,(n-=d)<=1){p=!0;break}}if(t[c++]=t[h++],0==--s){p=!0;break}if(0!==(f=Bi(o[u],t,h,s,0,e))){for(l=0;l<f;l++)t[c+l]=t[h+l];if(c+=f,h+=f,0===(s-=f)){p=!0;break}}if(t[c++]=o[u++],1==--n){p=!0;break}g--}while(d>=7||f>=7);if(p)break;g<0&&(g=0),g+=2}if((r=g)<1&&(r=1),1===n){for(l=0;l<s;l++)t[c+l]=t[h+l];t[c+s]=o[u]}else{if(0===n)throw new Error;for(l=0;l<n;l++)t[c+l]=o[u+l]}}(l,u,h,c):function(i,n,a,s){var l=0;for(l=0;l<s;l++)o[l]=t[a+l];var u=i+n-1,h=s-1,c=a+s-1,d=0,f=0;if(t[c--]=t[u--],0==--n){for(d=c-(s-1),l=0;l<s;l++)t[d+l]=o[l];return}if(1===s){for(f=(c-=n)+1,d=(u-=n)+1,l=n-1;l>=0;l--)t[f+l]=t[d+l];return void(t[c]=o[h])}var p=r;for(;;){var g=0,m=0,v=!1;do{if(e(o[h],t[u])<0){if(t[c--]=t[u--],g++,m=0,0==--n){v=!0;break}}else if(t[c--]=o[h--],m++,g=0,1==--s){v=!0;break}}while((g|m)<p);if(v)break;do{if(0!==(g=n-zi(o[h],t,i,n,n-1,e))){for(n-=g,f=(c-=g)+1,d=(u-=g)+1,l=g-1;l>=0;l--)t[f+l]=t[d+l];if(0===n){v=!0;break}}if(t[c--]=o[h--],1==--s){v=!0;break}if(0!==(m=s-Bi(t[u],o,0,s,s-1,e))){for(s-=m,f=(c-=m)+1,d=(h-=m)+1,l=0;l<m;l++)t[f+l]=o[d+l];if(s<=1){v=!0;break}}if(t[c--]=t[u--],0==--n){v=!0;break}p--}while(g>=7||m>=7);if(v)break;p<0&&(p=0),p+=2}(r=p)<1&&(r=1);if(1===s){for(f=(c-=n)+1,d=(u-=n)+1,l=n-1;l>=0;l--)t[f+l]=t[d+l];t[c]=o[h]}else{if(0===s)throw new Error;for(d=c-(s-1),l=0;l<s;l++)t[d+l]=o[l]}}(l,u,h,c))}i=[],n=[],this.mergeRuns=function(){for(;a>1;){var t=a-2;if(t>=1&&n[t-1]<=n[t]+n[t+1]||t>=2&&n[t-2]<=n[t]+n[t-1])n[t-1]<n[t+1]&&t--;else if(n[t]>n[t+1])break;s(t)}},this.forceMergeRuns=function(){for(;a>1;){var t=a-2;t>0&&n[t-1]<n[t+1]&&t--,s(t)}},this.pushRun=function(t,e){i[a]=t,n[a]=e,a+=1}}var Fi=function(t,e,i,n){i||(i=0),n||(n=t.length);var r=n-i;if(!(r<2)){var a=0;if(r<32)Ei(t,i,n,i+(a=Ri(t,i,n,e)),e);else{var o=new Ni(t,e),s=function(t){for(var e=0;t>=32;)e|=1&t,t>>=1;return t+e}(r);do{if((a=Ri(t,i,n,e))<s){var l=r;l>s&&(l=s),Ei(t,i,i+l,i+a,e),a=l}o.pushRun(i,a),o.mergeRuns(),r-=a,i+=a}while(0!==r);o.forceMergeRuns()}}};function Hi(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var Vi=function(){this._roots=[],this._displayList=[],this._displayListLen=0};Vi.prototype={constructor:Vi,traverse:function(t,e){for(var i=0;i<this._roots.length;i++)this._roots[i].traverse(t,e)},getDisplayList:function(t,e){return e=e||!1,t&&this.updateDisplayList(e),this._displayList},updateDisplayList:function(t){this._displayListLen=0;for(var e=this._roots,i=this._displayList,n=0,r=e.length;n<r;n++)this._updateAndAddDisplayable(e[n],null,t);i.length=this._displayListLen,q.canvasSupported&&Fi(i,Hi)},_updateAndAddDisplayable:function(t,e,i){if(!t.ignore||i){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var n=t.clipPath;if(n){e=e?e.slice():[];for(var r=n,a=t;r;)r.parent=a,r.updateTransform(),e.push(r),a=r,r=r.clipPath}if(t.isGroup){for(var o=t._children,s=0;s<o.length;s++){var l=o[s];t.__dirty&&(l.__dirty=!0),this._updateAndAddDisplayable(l,e,i)}t.__dirty=!1}else t.__clipPaths=e,this._displayList[this._displayListLen++]=t}},addRoot:function(t){t.__storage!==this&&(t instanceof Li&&t.addChildrenToStorage(this),this.addToStorage(t),this._roots.push(t))},delRoot:function(t){if(null==t){for(var e=0;e<this._roots.length;e++){var i=this._roots[e];i instanceof Li&&i.delChildrenFromStorage(this)}return this._roots=[],this._displayList=[],void(this._displayListLen=0)}if(t instanceof Array){e=0;for(var n=t.length;e<n;e++)this.delRoot(t[e])}else{var r=yt.indexOf(this._roots,t);r>=0&&(this.delFromStorage(t),this._roots.splice(r,1),t instanceof Li&&t.delChildrenFromStorage(this))}},addToStorage:function(t){return t&&(t.__storage=this,t.dirty(!1)),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:Hi};var Wi=Vi,Gi={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1};var Ui=function(t,e,i){return Gi.hasOwnProperty(e)?i*t.dpr:i},Yi={ContextCachedBy:{NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},WILL_BE_RESTORED:9},ji=Yi.ContextCachedBy,Xi=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],qi=function(t){this.extendFrom(t,!1)};function Zi(t,e,i){var n=null==e.x?0:e.x,r=null==e.x2?1:e.x2,a=null==e.y?0:e.y,o=null==e.y2?0:e.y2;return e.global||(n=n*i.width+i.x,r=r*i.width+i.x,a=a*i.height+i.y,o=o*i.height+i.y),n=isNaN(n)?0:n,r=isNaN(r)?1:r,a=isNaN(a)?0:a,o=isNaN(o)?0:o,t.createLinearGradient(n,a,r,o)}function $i(t,e,i){var n=i.width,r=i.height,a=Math.min(n,r),o=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;return e.global||(o=o*n+i.x,s=s*r+i.y,l*=a),t.createRadialGradient(o,s,0,o,s,l)}for(var Ki=qi.prototype={constructor:qi,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,i){var n=i&&i.style,r=!n||t.__attrCachedBy!==ji.STYLE_BIND;t.__attrCachedBy=ji.STYLE_BIND;for(var a=0;a<Xi.length;a++){var o=Xi[a],s=o[0];(r||this[s]!==n[s])&&(t[s]=Ui(t,s,this[s]||o[1]))}if((r||this.fill!==n.fill)&&(t.fillStyle=this.fill),(r||this.stroke!==n.stroke)&&(t.strokeStyle=this.stroke),(r||this.opacity!==n.opacity)&&(t.globalAlpha=null==this.opacity?1:this.opacity),(r||this.blend!==n.blend)&&(t.globalCompositeOperation=this.blend||"source-over"),this.hasStroke()){var l=this.lineWidth;t.lineWidth=l/(this.strokeNoScale&&e&&e.getLineScale?e.getLineScale():1)}},hasFill:function(){var t=this.fill;return null!=t&&"none"!==t},hasStroke:function(){var t=this.stroke;return null!=t&&"none"!==t&&this.lineWidth>0},extendFrom:function(t,e){if(t)for(var i in t)!t.hasOwnProperty(i)||!0!==e&&(!1===e?this.hasOwnProperty(i):null==t[i])||(this[i]=t[i])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,i){for(var n=("radial"===e.type?$i:Zi)(t,e,i),r=e.colorStops,a=0;a<r.length;a++)n.addColorStop(r[a].offset,r[a].color);return n}},Qi=0;Qi<Xi.length;Qi++){var Ji=Xi[Qi];Ji[0]in Ki||(Ki[Ji[0]]=Ji[1])}qi.getGradient=Ki.getGradient;var tn=qi,en=function(t,e){this.image=t,this.repeat=e,this.type="pattern"};en.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")};var nn=en,rn=hi.devicePixelRatio;function an(){return!1}function on(t,e,i){var n=yt.createCanvas(),r=e.getWidth(),a=e.getHeight(),o=n.style;return o&&(o.position="absolute",o.left=0,o.top=0,o.width=r+"px",o.height=a+"px",n.setAttribute("data-zr-dom-id",t)),n.width=r*i,n.height=a*i,n}var sn=function(t,e,i){var n;i=i||rn,"string"==typeof t?n=on(t,e,i):yt.isObject(t)&&(t=(n=t).id),this.id=t,this.dom=n;var r=n.style;r&&(n.onselectstart=an,r["-webkit-user-select"]="none",r["user-select"]="none",r["-webkit-touch-callout"]="none",r["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",r.padding=0,r.margin=0,r["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=e,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=i};sn.prototype={constructor:sn,__dirty:!0,__used:!1,__drawIndex:0,__startIndex:0,__endIndex:0,incremental:!1,getElementCount:function(){return this.__endIndex-this.__startIndex},initContext:function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},createBackBuffer:function(){var t=this.dpr;this.domBack=on("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},resize:function(t,e){var i=this.dpr,n=this.dom,r=n.style,a=this.domBack;r&&(r.width=t+"px",r.height=e+"px"),n.width=t*i,n.height=e*i,a&&(a.width=t*i,a.height=e*i,1!==i&&this.ctxBack.scale(i,i))},clear:function(t,e){var i,n=this.dom,r=this.ctx,a=n.width,o=n.height,s=(e=e||this.clearColor,this.motionBlur&&!t),l=this.lastFrameAlpha,u=this.dpr;(s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(n,0,0,a/u,o/u)),r.clearRect(0,0,a,o),e&&"transparent"!==e)&&(e.colorStops?(i=e.__canvasGradient||tn.getGradient(r,e,{x:0,y:0,width:a,height:o}),e.__canvasGradient=i):e.image&&(i=nn.prototype.getCanvasPattern.call(e,r)),r.save(),r.fillStyle=i||e,r.fillRect(0,0,a,o),r.restore());if(s){var h=this.domBack;r.save(),r.globalAlpha=l,r.drawImage(h,0,0,a,o),r.restore()}}};var ln=sn,un="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)},hn=new Ae(50);function cn(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var i=t.pending[e],n=i.cb;n&&n(this,i.cbPayload),i.hostEl.dirty()}t.pending.length=0}function dn(t){return t&&t.width&&t.height}var fn={findExistImage:function(t){if("string"==typeof t){var e=hn.get(t);return e&&e.image}return t},createOrUpdateImage:function(t,e,i,n,r){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!i)return e;var a=hn.get(t),o={hostEl:i,cb:n,cbPayload:r};return a?!dn(e=a.image)&&a.pending.push(o):((e=new Image).onload=e.onerror=cn,hn.put(t,e.__cachedImgObj={image:e,pending:[o]}),e.src=e.__zrImageSrc=t),e}return t}return e},isImageReady:dn},pn=yt.getContext,gn=yt.extend,mn=yt.retrieve2,vn=yt.retrieve3,yn=yt.trim,_n={},xn=0,bn=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,wn={};function Sn(t,e){var i=t+":"+(e=e||"12px sans-serif");if(_n[i])return _n[i];for(var n=(t+"").split("\n"),r=0,a=0,o=n.length;a<o;a++)r=Math.max(Pn(n[a],e).width,r);return xn>5e3&&(xn=0,_n={}),xn++,_n[i]=r,r}function Tn(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function Mn(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function Cn(t,e,i){var n=e.textPosition,r=e.textDistance,a=i.x,o=i.y;r=r||0;var s=i.height,l=i.width,u=s/2,h="left",c="top";switch(n){case"left":a-=r,o+=u,h="right",c="middle";break;case"right":a+=r+l,o+=u,c="middle";break;case"top":a+=l/2,o-=r,h="center",c="bottom";break;case"bottom":a+=l/2,o+=s+r,h="center";break;case"inside":a+=l/2,o+=u,h="center",c="middle";break;case"insideLeft":a+=r,o+=u,c="middle";break;case"insideRight":a+=l-r,o+=u,h="right",c="middle";break;case"insideTop":a+=l/2,o+=r,h="center";break;case"insideBottom":a+=l/2,o+=s-r,h="center",c="bottom";break;case"insideTopLeft":a+=r,o+=r;break;case"insideTopRight":a+=l-r,o+=r,h="right";break;case"insideBottomLeft":a+=r,o+=s-r,c="bottom";break;case"insideBottomRight":a+=l-r,o+=s-r,h="right",c="bottom"}return(t=t||{}).x=a,t.y=o,t.textAlign=h,t.textVerticalAlign=c,t}function In(t,e,i,n,r){if(!e)return"";var a=(t+"").split("\n");r=An(e,i,n,r);for(var o=0,s=a.length;o<s;o++)a[o]=Dn(a[o],r);return a.join("\n")}function An(t,e,i,n){(n=gn({},n)).font=e;i=mn(i,"...");n.maxIterations=mn(n.maxIterations,2);var r=n.minChar=mn(n.minChar,0);n.cnCharWidth=Sn("国",e);var a=n.ascCharWidth=Sn("a",e);n.placeholder=mn(n.placeholder,"");for(var o=t=Math.max(0,t-1),s=0;s<r&&o>=a;s++)o-=a;var l=Sn(i,e);return l>o&&(i="",l=0),o=t-l,n.ellipsis=i,n.ellipsisWidth=l,n.contentWidth=o,n.containerWidth=t,n}function Dn(t,e){var i=e.containerWidth,n=e.font,r=e.contentWidth;if(!i)return"";var a=Sn(t,n);if(a<=i)return t;for(var o=0;;o++){if(a<=r||o>=e.maxIterations){t+=e.ellipsis;break}var s=0===o?kn(t,r,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*r/a):0;a=Sn(t=t.substr(0,s),n)}return""===t&&(t=e.placeholder),t}function kn(t,e,i,n){for(var r=0,a=0,o=t.length;a<o&&r<e;a++){var s=t.charCodeAt(a);r+=0<=s&&s<=127?i:n}return a}function On(t){return Sn("国",t)}function Pn(t,e){return wn.measureText(t,e)}function Ln(t,e,i,n,r){null!=t&&(t+="");var a=mn(n,On(e)),o=t?t.split("\n"):[],s=o.length*a,l=s,u=!0;if(i&&(l+=i[0]+i[2]),t&&r){u=!1;var h=r.outerHeight,c=r.outerWidth;if(null!=h&&l>h)t="",o=[];else if(null!=c)for(var d=An(c-(i?i[1]+i[3]:0),e,r.ellipsis,{minChar:r.minChar,placeholder:r.placeholder}),f=0,p=o.length;f<p;f++)o[f]=Dn(o[f],d)}return{lines:o,height:s,outerHeight:l,lineHeight:a,canCacheByTextString:u}}function Rn(t,e){var i={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return i;for(var n,r=bn.lastIndex=0;null!=(n=bn.exec(t));){var a=n.index;a>r&&En(i,t.substring(r,a)),En(i,n[2],n[1]),r=bn.lastIndex}r<t.length&&En(i,t.substring(r,t.length));var o=i.lines,s=0,l=0,u=[],h=e.textPadding,c=e.truncate,d=c&&c.outerWidth,f=c&&c.outerHeight;h&&(null!=d&&(d-=h[1]+h[3]),null!=f&&(f-=h[0]+h[2]));for(var p=0;p<o.length;p++){for(var g=o[p],m=0,v=0,y=0;y<g.tokens.length;y++){var _=(D=g.tokens[y]).styleName&&e.rich[D.styleName]||{},x=D.textPadding=_.textPadding,b=D.font=_.font||e.font,w=D.textHeight=mn(_.textHeight,On(b));if(x&&(w+=x[0]+x[2]),D.height=w,D.lineHeight=vn(_.textLineHeight,e.textLineHeight,w),D.textAlign=_&&_.textAlign||e.textAlign,D.textVerticalAlign=_&&_.textVerticalAlign||"middle",null!=f&&s+D.lineHeight>f)return{lines:[],width:0,height:0};D.textWidth=Sn(D.text,b);var S=_.textWidth,T=null==S||"auto"===S;if("string"==typeof S&&"%"===S.charAt(S.length-1))D.percentWidth=S,u.push(D),S=0;else{if(T){S=D.textWidth;var M=_.textBackgroundColor,C=M&&M.image;C&&(C=fn.findExistImage(C),fn.isImageReady(C)&&(S=Math.max(S,C.width*w/C.height)))}var I=x?x[1]+x[3]:0;S+=I;var A=null!=d?d-v:null;null!=A&&A<S&&(!T||A<I?(D.text="",D.textWidth=S=0):(D.text=In(D.text,A-I,b,c.ellipsis,{minChar:c.minChar}),D.textWidth=Sn(D.text,b),S=D.textWidth+I))}v+=D.width=S,_&&(m=Math.max(m,D.lineHeight))}g.width=v,g.lineHeight=m,s+=m,l=Math.max(l,v)}i.outerWidth=i.width=mn(e.textWidth,l),i.outerHeight=i.height=mn(e.textHeight,s),h&&(i.outerWidth+=h[1]+h[3],i.outerHeight+=h[0]+h[2]);for(p=0;p<u.length;p++){var D,k=(D=u[p]).percentWidth;D.width=parseInt(k,10)/100*l}return i}function En(t,e,i){for(var n=""===e,r=e.split("\n"),a=t.lines,o=0;o<r.length;o++){var s=r[o],l={styleName:i,text:s,isLineHolder:!s&&!n};if(o)a.push({tokens:[l]});else{var u=(a[a.length-1]||(a[0]={tokens:[]})).tokens,h=u.length;1===h&&u[0].isLineHolder?u[0]=l:(s||!h||n)&&u.push(l)}}}wn.measureText=function(t,e){var i=pn();return i.font=e||"12px sans-serif",i.measureText(t)};var Bn={DEFAULT_FONT:"12px sans-serif",$override:function(t,e){wn[t]=e},getWidth:Sn,getBoundingRect:function(t,e,i,n,r,a,o,s){return o?function(t,e,i,n,r,a,o,s){var l=Rn(t,{rich:o,truncate:s,font:e,textAlign:i,textPadding:r,textLineHeight:a}),u=l.outerWidth,h=l.outerHeight,c=Tn(0,u,i),d=Mn(0,h,n);return new Oi(c,d,u,h)}(t,e,i,n,r,a,o,s):function(t,e,i,n,r,a,o){var s=Ln(t,e,r,a,o),l=Sn(t,e);r&&(l+=r[1]+r[3]);var u=s.outerHeight,h=Tn(0,l,i),c=Mn(0,u,n),d=new Oi(h,c,l,u);return d.lineHeight=s.lineHeight,d}(t,e,i,n,r,a,s)},adjustTextX:Tn,adjustTextY:Mn,calculateTextPosition:Cn,adjustTextPositionOnRect:function(t,e,i){return Cn({},{textPosition:t,textDistance:i},e)},truncateText:In,getLineHeight:On,measureText:Pn,parsePlainText:Ln,parseRichText:Rn,makeFont:function(t){var e=(t.fontSize||t.fontFamily)&&[t.fontStyle,t.fontWeight,(t.fontSize||12)+"px",t.fontFamily||"sans-serif"].join(" ");return e&&yn(e)||t.textFont||t.font}};var zn={buildPath:function(t,e){var i,n,r,a,o,s=e.x,l=e.y,u=e.width,h=e.height,c=e.r;u<0&&(s+=u,u=-u),h<0&&(l+=h,h=-h),"number"==typeof c?i=n=r=a=c:c instanceof Array?1===c.length?i=n=r=a=c[0]:2===c.length?(i=r=c[0],n=a=c[1]):3===c.length?(i=c[0],n=a=c[1],r=c[2]):(i=c[0],n=c[1],r=c[2],a=c[3]):i=n=r=a=0,i+n>u&&(i*=u/(o=i+n),n*=u/o),r+a>u&&(r*=u/(o=r+a),a*=u/o),n+r>h&&(n*=h/(o=n+r),r*=h/o),i+a>h&&(i*=h/(o=i+a),a*=h/o),t.moveTo(s+i,l),t.lineTo(s+u-n,l),0!==n&&t.arc(s+u-n,l+n,n,-Math.PI/2,0),t.lineTo(s+u,l+h-r),0!==r&&t.arc(s+u-r,l+h-r,r,0,Math.PI/2),t.lineTo(s+a,l+h),0!==a&&t.arc(s+a,l+h-a,a,Math.PI/2,Math.PI),t.lineTo(s,l+i),0!==i&&t.arc(s+i,l+i,i,Math.PI,1.5*Math.PI)}},Nn=yt.retrieve2,Fn=yt.retrieve3,Hn=yt.each,Vn=yt.normalizeCssArray,Wn=yt.isString,Gn=yt.isObject,Un=Yi.ContextCachedBy,Yn=Yi.WILL_BE_RESTORED,jn=Bn.DEFAULT_FONT,Xn={left:1,right:1,center:1},qn={top:1,bottom:1,middle:1},Zn=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],$n={},Kn={};function Qn(t){if(t){t.font=Bn.makeFont(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||Xn[e]?e:"left";var i=t.textVerticalAlign||t.textBaseline;"center"===i&&(i="middle"),t.textVerticalAlign=null==i||qn[i]?i:"top",t.textPadding&&(t.textPadding=Vn(t.textPadding))}}function Jn(t,e,i,n,r,a){var o,s=nr(n),l=!1,u=e.__attrCachedBy===Un.PLAIN_TEXT;a!==Yn?(a&&(o=a.style,l=!s&&u&&o),e.__attrCachedBy=s?Un.NONE:Un.PLAIN_TEXT):u&&(e.__attrCachedBy=Un.NONE);var h=n.font||jn;l&&h===(o.font||jn)||(e.font=h);var c=t.__computedFont;t.__styleFont!==h&&(t.__styleFont=h,c=t.__computedFont=e.font);var d=n.textPadding,f=n.textLineHeight,p=t.__textCotentBlock;p&&!t.__dirtyText||(p=t.__textCotentBlock=Bn.parsePlainText(i,c,d,f,n.truncate));var g=p.outerHeight,m=p.lines,v=p.lineHeight,y=or(Kn,t,n,r),_=y.baseX,x=y.baseY,b=y.textAlign||"left",w=y.textVerticalAlign;er(e,n,r,_,x);var S=Bn.adjustTextY(x,g,w),T=_,M=S;if(s||d){var C=Bn.getWidth(i,c);d&&(C+=d[1]+d[3]);var I=Bn.adjustTextX(_,C,b);s&&rr(t,e,n,I,S,C,g),d&&(T=cr(_,b,d),M+=d[0])}e.textAlign=b,e.textBaseline="middle",e.globalAlpha=n.opacity||1;for(var A=0;A<Zn.length;A++){var D=Zn[A],k=D[0],O=D[1],P=n[k];l&&P===o[k]||(e[O]=Ui(e,O,P||D[2]))}M+=v/2;var L=n.textStrokeWidth,R=l?o.textStrokeWidth:null,E=!l||L!==R,B=!l||E||n.textStroke!==o.textStroke,z=lr(n.textStroke,L),N=ur(n.textFill);if(z&&(E&&(e.lineWidth=L),B&&(e.strokeStyle=z)),N&&(l&&n.textFill===o.textFill||(e.fillStyle=N)),1===m.length)z&&e.strokeText(m[0],T,M),N&&e.fillText(m[0],T,M);else for(A=0;A<m.length;A++)z&&e.strokeText(m[A],T,M),N&&e.fillText(m[A],T,M),M+=v}function tr(t,e,i,n,r,a){a!==Yn&&(e.__attrCachedBy=Un.NONE);var o=t.__textCotentBlock;o&&!t.__dirtyText||(o=t.__textCotentBlock=Bn.parseRichText(i,n)),function(t,e,i,n,r){var a=i.width,o=i.outerWidth,s=i.outerHeight,l=n.textPadding,u=or(Kn,t,n,r),h=u.baseX,c=u.baseY,d=u.textAlign,f=u.textVerticalAlign;er(e,n,r,h,c);var p=Bn.adjustTextX(h,o,d),g=Bn.adjustTextY(c,s,f),m=p,v=g;l&&(m+=l[3],v+=l[0]);var y=m+a;nr(n)&&rr(t,e,n,p,g,o,s);for(var _=0;_<i.lines.length;_++){for(var x,b=i.lines[_],w=b.tokens,S=w.length,T=b.lineHeight,M=b.width,C=0,I=m,A=y,D=S-1;C<S&&(!(x=w[C]).textAlign||"left"===x.textAlign);)ir(t,e,x,n,T,v,I,"left"),M-=x.width,I+=x.width,C++;for(;D>=0&&"right"===(x=w[D]).textAlign;)ir(t,e,x,n,T,v,A,"right"),M-=x.width,A-=x.width,D--;for(I+=(a-(I-m)-(y-A)-M)/2;C<=D;)x=w[C],ir(t,e,x,n,T,v,I+x.width/2,"center"),I+=x.width,C++;v+=T}}(t,e,o,n,r)}function er(t,e,i,n,r){if(i&&e.textRotation){var a=e.textOrigin;"center"===a?(n=i.width/2+i.x,r=i.height/2+i.y):a&&(n=a[0]+i.x,r=a[1]+i.y),t.translate(n,r),t.rotate(-e.textRotation),t.translate(-n,-r)}}function ir(t,e,i,n,r,a,o,s){var l=n.rich[i.styleName]||{};l.text=i.text;var u=i.textVerticalAlign,h=a+r/2;"top"===u?h=a+i.height/2:"bottom"===u&&(h=a+r-i.height/2),!i.isLineHolder&&nr(l)&&rr(t,e,l,"right"===s?o-i.width:"center"===s?o-i.width/2:o,h-i.height/2,i.width,i.height);var c=i.textPadding;c&&(o=cr(o,s,c),h-=i.height/2-c[2]-i.textHeight/2),sr(e,"shadowBlur",Fn(l.textShadowBlur,n.textShadowBlur,0)),sr(e,"shadowColor",l.textShadowColor||n.textShadowColor||"transparent"),sr(e,"shadowOffsetX",Fn(l.textShadowOffsetX,n.textShadowOffsetX,0)),sr(e,"shadowOffsetY",Fn(l.textShadowOffsetY,n.textShadowOffsetY,0)),sr(e,"textAlign",s),sr(e,"textBaseline","middle"),sr(e,"font",i.font||jn);var d=lr(l.textStroke||n.textStroke,p),f=ur(l.textFill||n.textFill),p=Nn(l.textStrokeWidth,n.textStrokeWidth);d&&(sr(e,"lineWidth",p),sr(e,"strokeStyle",d),e.strokeText(i.text,o,h)),f&&(sr(e,"fillStyle",f),e.fillText(i.text,o,h))}function nr(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function rr(t,e,i,n,r,a,o){var s=i.textBackgroundColor,l=i.textBorderWidth,u=i.textBorderColor,h=Wn(s);if(sr(e,"shadowBlur",i.textBoxShadowBlur||0),sr(e,"shadowColor",i.textBoxShadowColor||"transparent"),sr(e,"shadowOffsetX",i.textBoxShadowOffsetX||0),sr(e,"shadowOffsetY",i.textBoxShadowOffsetY||0),h||l&&u){e.beginPath();var c=i.textBorderRadius;c?zn.buildPath(e,{x:n,y:r,width:a,height:o,r:c}):e.rect(n,r,a,o),e.closePath()}if(h)if(sr(e,"fillStyle",s),null!=i.fillOpacity){var d=e.globalAlpha;e.globalAlpha=i.fillOpacity*i.opacity,e.fill(),e.globalAlpha=d}else e.fill();else if(Gn(s)){var f=s.image;(f=fn.createOrUpdateImage(f,null,t,ar,s))&&fn.isImageReady(f)&&e.drawImage(f,n,r,a,o)}if(l&&u)if(sr(e,"lineWidth",l),sr(e,"strokeStyle",u),null!=i.strokeOpacity){d=e.globalAlpha;e.globalAlpha=i.strokeOpacity*i.opacity,e.stroke(),e.globalAlpha=d}else e.stroke()}function ar(t,e){e.image=t}function or(t,e,i,n){var r=i.x||0,a=i.y||0,o=i.textAlign,s=i.textVerticalAlign;if(n){var l=i.textPosition;if(l instanceof Array)r=n.x+hr(l[0],n.width),a=n.y+hr(l[1],n.height);else{var u=e&&e.calculateTextPosition?e.calculateTextPosition($n,i,n):Bn.calculateTextPosition($n,i,n);r=u.x,a=u.y,o=o||u.textAlign,s=s||u.textVerticalAlign}var h=i.textOffset;h&&(r+=h[0],a+=h[1])}return(t=t||{}).baseX=r,t.baseY=a,t.textAlign=o,t.textVerticalAlign=s,t}function sr(t,e,i){return t[e]=Ui(t,e,i),t[e]}function lr(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function ur(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function hr(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function cr(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}var dr={normalizeTextStyle:function(t){return Qn(t),Hn(t.rich,Qn),t},renderText:function(t,e,i,n,r,a){n.rich?tr(t,e,i,n,r,a):Jn(t,e,i,n,r,a)},getBoxPosition:or,getStroke:lr,getFill:ur,parsePercent:hr,needDrawText:function(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}},fr=Yi.WILL_BE_RESTORED,pr=new Oi,gr=function(){};gr.prototype={constructor:gr,drawRectText:function(t,e){var i=this.style;e=i.textRect||e,this.__dirty&&dr.normalizeTextStyle(i,!0);var n=i.text;if(null!=n&&(n+=""),dr.needDrawText(n,i)){t.save();var r=this.transform;i.transformText?this.setTransform(t):r&&(pr.copy(e),pr.applyTransform(r),e=pr),dr.renderText(this,t,n,i,e,fr),t.restore()}}};var mr=gr;function vr(t){for(var e in t=t||{},Ci.call(this,t),t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new tn(t.style,this),this._rect=null,this.__clipPaths=null}vr.prototype={constructor:vr,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,globalScaleRatio:1,beforeBrush:function(t){},afterBrush:function(t){},brush:function(t,e){},getBoundingRect:function(){},contain:function(t,e){return this.rectContain(t,e)},traverse:function(t,e){t.call(e,this)},rectContain:function(t,e){var i=this.transformCoordToLocal(t,e);return this.getBoundingRect().contain(i[0],i[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){"style"!==t?Ci.prototype.attrKV.call(this,t,e):this.style.set(e)},setStyle:function(t,e){return this.style.set(t,e),this.dirty(!1),this},useStyle:function(t){return this.style=new tn(t,this),this.dirty(!1),this},calculateTextPosition:null},yt.inherits(vr,Ci),yt.mixin(vr,mr);var yr=vr;function _r(t){yr.call(this,t)}_r.prototype={constructor:_r,type:"image",brush:function(t,e){var i=this.style,n=i.image;i.bind(t,this,e);var r=this._image=fn.createOrUpdateImage(n,this._image,this,this.onload);if(r&&fn.isImageReady(r)){var a=i.x||0,o=i.y||0,s=i.width,l=i.height,u=r.width/r.height;if(null==s&&null!=l?s=l*u:null==l&&null!=s?l=s/u:null==s&&null==l&&(s=r.width,l=r.height),this.setTransform(t),i.sWidth&&i.sHeight){var h=i.sx||0,c=i.sy||0;t.drawImage(r,h,c,i.sWidth,i.sHeight,a,o,s,l)}else if(i.sx&&i.sy){var d=s-(h=i.sx),f=l-(c=i.sy);t.drawImage(r,h,c,d,f,a,o,s,l)}else t.drawImage(r,a,o,s,l);null!=i.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))}},getBoundingRect:function(){var t=this.style;return this._rect||(this._rect=new Oi(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},yt.inherits(_r,yr);var xr=_r,br=hi.devicePixelRatio;function wr(t){return parseInt(t,10)}var Sr=new Oi(0,0,0,0),Tr=new Oi(0,0,0,0);var Mr=function(t,e,i){this.type="canvas";var n=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=i=yt.extend({},i||{}),this.dpr=i.devicePixelRatio||br,this._singleCanvas=n,this.root=t;var r=t.style;r&&(r["-webkit-tap-highlight-color"]="transparent",r["-webkit-user-select"]=r["user-select"]=r["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var a=this._zlevelList=[],o=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,n){var s=t.width,l=t.height;null!=i.width&&(s=i.width),null!=i.height&&(l=i.height),this.dpr=i.devicePixelRatio||1,t.width=s*this.dpr,t.height=l*this.dpr,this._width=s,this._height=l;var u=new ln(t,this,this.dpr);u.__builtin__=!0,u.initContext(),o[314159]=u,u.zlevel=314159,a.push(314159),this._domRoot=t}else{this._width=this._getSize(0),this._height=this._getSize(1);var h=this._domRoot=function(t,e){var i=document.createElement("div");return i.style.cssText=["position:relative","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",i}(this._width,this._height);t.appendChild(h)}this._hoverlayer=null,this._hoverElements=[]};Mr.prototype={constructor:Mr,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(t){var e=this.storage.getDisplayList(!0),i=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,t,this._redrawId);for(var n=0;n<i.length;n++){var r=i[n],a=this._layers[r];if(!a.__builtin__&&a.refresh){var o=0===n?this._backgroundColor:null;a.refresh(o)}}return this.refreshHover(),this},addHover:function(t,e){if(!t.__hoverMir){var i=new t.constructor({style:t.style,shape:t.shape,z:t.z,z2:t.z2,silent:t.silent});return i.__from=t,t.__hoverMir=i,e&&i.setStyle(e),this._hoverElements.push(i),i}},removeHover:function(t){var e=t.__hoverMir,i=this._hoverElements,n=yt.indexOf(i,e);n>=0&&i.splice(n,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,i=0;i<e.length;i++){var n=e[i].__from;n&&(n.__hoverMir=null)}e.length=0},refreshHover:function(){var t=this._hoverElements,e=t.length,i=this._hoverlayer;if(i&&i.clear(),e){Fi(t,this.storage.displayableSortFunc),i||(i=this._hoverlayer=this.getLayer(1e5));var n={};i.ctx.save();for(var r=0;r<e;){var a=t[r],o=a.__from;o&&o.__zr?(r++,o.invisible||(a.transform=o.transform,a.invTransform=o.invTransform,a.__clipPaths=o.__clipPaths,this._doPaintEl(a,i,!0,n))):(t.splice(r,1),o.__hoverMir=null,e--)}i.ctx.restore()}},getHoverLayer:function(){return this.getLayer(1e5)},_paintList:function(t,e,i){if(this._redrawId===i){e=e||!1,this._updateLayerStatus(t);var n=this._doPaintList(t,e);if(this._needsManuallyCompositing&&this._compositeManually(),!n){var r=this;un((function(){r._paintList(t,e,i)}))}}},_compositeManually:function(){var t=this.getLayer(314159).ctx,e=this._domRoot.width,i=this._domRoot.height;t.clearRect(0,0,e,i),this.eachBuiltinLayer((function(n){n.virtual&&t.drawImage(n.dom,0,0,e,i)}))},_doPaintList:function(t,e){for(var i=[],n=0;n<this._zlevelList.length;n++){var r=this._zlevelList[n];(s=this._layers[r]).__builtin__&&s!==this._hoverlayer&&(s.__dirty||e)&&i.push(s)}for(var a=!0,o=0;o<i.length;o++){var s,l=(s=i[o]).ctx,u={};l.save();var h=e?s.__startIndex:s.__drawIndex,c=!e&&s.incremental&&Date.now,d=c&&Date.now(),f=s.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(s.__startIndex===s.__endIndex)s.clear(!1,f);else if(h===s.__startIndex){var p=t[h];p.incremental&&p.notClear&&!e||s.clear(!1,f)}-1===h&&(console.error("For some unknown reason. drawIndex is -1"),h=s.__startIndex);for(var g=h;g<s.__endIndex;g++){var m=t[g];if(this._doPaintEl(m,s,e,u),m.__dirty=m.__dirtyText=!1,c)if(Date.now()-d>15)break}s.__drawIndex=g,s.__drawIndex<s.__endIndex&&(a=!1),u.prevElClipPaths&&l.restore(),l.restore()}return q.wxa&&yt.each(this._layers,(function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()})),a},_doPaintEl:function(t,e,i,n){var r=e.ctx,a=t.transform;if((e.__dirty||i)&&!t.invisible&&0!==t.style.opacity&&(!a||a[0]||a[3])&&(!t.culling||!function(t,e,i){return Sr.copy(t.getBoundingRect()),t.transform&&Sr.applyTransform(t.transform),Tr.width=e,Tr.height=i,!Sr.intersect(Tr)}(t,this._width,this._height))){var o=t.__clipPaths,s=n.prevElClipPaths;s&&!function(t,e){if(t===e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i<t.length;i++)if(t[i]!==e[i])return!0;return!1}(o,s)||(s&&(r.restore(),n.prevElClipPaths=null,n.prevEl=null),o&&(r.save(),function(t,e){for(var i=0;i<t.length;i++){var n=t[i];n.setTransform(e),e.beginPath(),n.buildPath(e,n.shape),e.clip(),n.restoreTransform(e)}}(o,r),n.prevElClipPaths=o)),t.beforeBrush&&t.beforeBrush(r),t.brush(r,n.prevEl||null),n.prevEl=t,t.afterBrush&&t.afterBrush(r)}},getLayer:function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=314159);var i=this._layers[t];return i||((i=new ln("zr_"+t,this,this.dpr)).zlevel=t,i.__builtin__=!0,this._layerConfig[t]?yt.merge(i,this._layerConfig[t],!0):this._layerConfig[t-.01]&&yt.merge(i,this._layerConfig[t-.01],!0),e&&(i.virtual=e),this.insertLayer(t,i),i.initContext()),i},insertLayer:function(t,e){var i=this._layers,n=this._zlevelList,r=n.length,a=null,o=-1,s=this._domRoot;if(!i[t]&&function(t){return!!t&&(!!t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh)}(e)){if(r>0&&t>n[0]){for(o=0;o<r-1&&!(n[o]<t&&n[o+1]>t);o++);a=i[n[o]]}if(n.splice(o+1,0,t),i[t]=e,!e.virtual)if(a){var l=a.dom;l.nextSibling?s.insertBefore(e.dom,l.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}},eachLayer:function(t,e){var i,n,r=this._zlevelList;for(n=0;n<r.length;n++)i=r[n],t.call(e,this._layers[i],i)},eachBuiltinLayer:function(t,e){var i,n,r,a=this._zlevelList;for(r=0;r<a.length;r++)n=a[r],(i=this._layers[n]).__builtin__&&t.call(e,i,n)},eachOtherLayer:function(t,e){var i,n,r,a=this._zlevelList;for(r=0;r<a.length;r++)n=a[r],(i=this._layers[n]).__builtin__||t.call(e,i,n)},getLayers:function(){return this._layers},_updateLayerStatus:function(t){function e(t){r&&(r.__endIndex!==t&&(r.__dirty=!0),r.__endIndex=t)}if(this.eachBuiltinLayer((function(t,e){t.__dirty=t.__used=!1})),this._singleCanvas)for(var i=1;i<t.length;i++){if((o=t[i]).zlevel!==t[i-1].zlevel||o.incremental){this._needsManuallyCompositing=!0;break}}var n,r=null,a=0;for(i=0;i<t.length;i++){var o,s,l=(o=t[i]).zlevel;n!==l&&(n=l,a=0),o.incremental?((s=this.getLayer(l+.001,this._needsManuallyCompositing)).incremental=!0,a=1):s=this.getLayer(l+(a>0?.01:0),this._needsManuallyCompositing),s.__builtin__||ci("ZLevel "+l+" has been used by unkown layer "+s.id),s!==r&&(s.__used=!0,s.__startIndex!==i&&(s.__dirty=!0),s.__startIndex=i,s.incremental?s.__drawIndex=-1:s.__drawIndex=i,e(i),r=s),o.__dirty&&(s.__dirty=!0,s.incremental&&s.__drawIndex<0&&(s.__drawIndex=i))}e(i),this.eachBuiltinLayer((function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)}))},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},setBackgroundColor:function(t){this._backgroundColor=t},configLayer:function(t,e){if(e){var i=this._layerConfig;i[t]?yt.merge(i[t],e,!0):i[t]=e;for(var n=0;n<this._zlevelList.length;n++){var r=this._zlevelList[n];if(r===t||r===t+.01){var a=this._layers[r];yt.merge(a,i[t],!0)}}}},delLayer:function(t){var e=this._layers,i=this._zlevelList,n=e[t];n&&(n.dom.parentNode.removeChild(n.dom),delete e[t],i.splice(yt.indexOf(i,t),1))},resize:function(t,e){if(this._domRoot.style){var i=this._domRoot;i.style.display="none";var n=this._opts;if(null!=t&&(n.width=t),null!=e&&(n.height=e),t=this._getSize(0),e=this._getSize(1),i.style.display="",this._width!==t||e!==this._height){for(var r in i.style.width=t+"px",i.style.height=e+"px",this._layers)this._layers.hasOwnProperty(r)&&this._layers[r].resize(t,e);yt.each(this._progressiveLayers,(function(i){i.resize(t,e)})),this.refresh(!0)}this._width=t,this._height=e}else{if(null==t||null==e)return;this._width=t,this._height=e,this.getLayer(314159).resize(t,e)}return this},clearLayer:function(t){var e=this._layers[t];e&&e.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[314159].dom;var e=new ln("image",this,t.pixelRatio||this.dpr);if(e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor),t.pixelRatio<=this.dpr){this.refresh();var i=e.dom.width,n=e.dom.height,r=e.ctx;this.eachLayer((function(t){t.__builtin__?r.drawImage(t.dom,0,0,i,n):t.renderToCanvas&&(e.ctx.save(),t.renderToCanvas(e.ctx),e.ctx.restore())}))}else for(var a={},o=this.storage.getDisplayList(!0),s=0;s<o.length;s++){var l=o[s];this._doPaintEl(l,e,!0,a)}return e.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,i=["width","height"][t],n=["clientWidth","clientHeight"][t],r=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[n]||wr(s[i])||wr(o.style[i]))-(wr(s[r])||0)-(wr(s[a])||0)|0},pathToImage:function(t,e){e=e||this.dpr;var i=document.createElement("canvas"),n=i.getContext("2d"),r=t.getBoundingRect(),a=t.style,o=a.shadowBlur*e,s=a.shadowOffsetX*e,l=a.shadowOffsetY*e,u=a.hasStroke()?a.lineWidth:0,h=Math.max(u/2,-s+o),c=Math.max(u/2,s+o),d=Math.max(u/2,-l+o),f=Math.max(u/2,l+o),p=r.width+h+c,g=r.height+d+f;i.width=p*e,i.height=g*e,n.scale(e,e),n.clearRect(0,0,p,g),n.dpr=e;var m={position:t.position,rotation:t.rotation,scale:t.scale};t.position=[h-r.x,d-r.y],t.rotation=0,t.scale=[1,1],t.updateTransform(),t&&t.brush(n);var v=new xr({style:{x:0,y:0,image:i}});return null!=m.position&&(v.position=t.position=m.position),null!=m.rotation&&(v.rotation=t.rotation=m.rotation),null!=m.scale&&(v.scale=t.scale=m.scale),v}};var Cr=Mr,Ir=qt.Dispatcher,Ar=function(t){t=t||{},this.stage=t.stage||{},this.onframe=t.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,Ir.call(this)};Ar.prototype={constructor:Ar,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),i=0;i<e.length;i++)this.addClip(e[i])},removeClip:function(t){var e=yt.indexOf(this._clips,t);e>=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;i<e.length;i++)this.removeClip(e[i]);t.animation=null},_update:function(){for(var t=(new Date).getTime()-this._pausedTime,e=t-this._time,i=this._clips,n=i.length,r=[],a=[],o=0;o<n;o++){var s=i[o],l=s.step(t,e);l&&(r.push(l),a.push(s))}for(o=0;o<n;)i[o]._needsRemove?(i[o]=i[n-1],i.pop(),n--):o++;n=r.length;for(o=0;o<n;o++)a[o].fire(r[o]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){var t=this;this._running=!0,un((function e(){t._running&&(un(e),!t._paused&&t._update())}))},start:function(){this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},clear:function(){this._clips=[]},isFinished:function(){return!this._clips.length},animate:function(t,e){var i=new li(t,(e=e||{}).loop,e.getter,e.setter);return this.addAnimator(i),i}},yt.mixin(Ar,Ir);var Dr,kr,Or=Ar,Pr=qt.addEventListener,Lr=qt.removeEventListener,Rr=qt.normalizeEvent,Er=qt.getNativeEvent,Br=q.domSupported,zr=(kr={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:Dr=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:yt.map(Dr,(function(t){var e=t.replace("mouse","pointer");return kr.hasOwnProperty(e)?e:t}))}),Nr=["mousemove","mouseup"],Fr=["pointermove","pointerup"];function Hr(t){return"mousewheel"===t&&q.browser.firefox?"DOMMouseScroll":t}function Vr(t){var e=t.pointerType;return"pen"===e||"touch"===e}function Wr(t){t&&(t.zrByTouch=!0)}function Gr(t,e){for(var i=e,n=!1;i&&9!==i.nodeType&&!(n=i.domBelongToZr||i!==e&&i===t.painterRoot);)i=i.parentNode;return n}function Ur(t,e){this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}var Yr=Ur.prototype;Yr.stopPropagation=Yr.stopImmediatePropagation=Yr.preventDefault=yt.noop;var jr={mousedown:function(t){t=Rr(this.dom,t),this._mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=Rr(this.dom,t);var e=this._mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||Qr(this,!0),this.trigger("mousemove",t)},mouseup:function(t){t=Rr(this.dom,t),Qr(this,!1),this.trigger("mouseup",t)},mouseout:function(t){t=Rr(this.dom,t),this._pointerCapturing&&(t.zrEventControl="no_globalout");var e=t.toElement||t.relatedTarget;t.zrIsToLocalDOM=Gr(this,e),this.trigger("mouseout",t)},touchstart:function(t){Wr(t=Rr(this.dom,t)),this._lastTouchMoment=new Date,this.handler.processGesture(t,"start"),jr.mousemove.call(this,t),jr.mousedown.call(this,t)},touchmove:function(t){Wr(t=Rr(this.dom,t)),this.handler.processGesture(t,"change"),jr.mousemove.call(this,t)},touchend:function(t){Wr(t=Rr(this.dom,t)),this.handler.processGesture(t,"end"),jr.mouseup.call(this,t),+new Date-this._lastTouchMoment<300&&jr.click.call(this,t)},pointerdown:function(t){jr.mousedown.call(this,t)},pointermove:function(t){Vr(t)||jr.mousemove.call(this,t)},pointerup:function(t){jr.mouseup.call(this,t)},pointerout:function(t){Vr(t)||jr.mouseout.call(this,t)}};yt.each(["click","mousewheel","dblclick","contextmenu"],(function(t){jr[t]=function(e){e=Rr(this.dom,e),this.trigger(t,e)}}));var Xr={pointermove:function(t){Vr(t)||Xr.mousemove.call(this,t)},pointerup:function(t){Xr.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this._pointerCapturing;Qr(this,!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function qr(t,e){var i=e.domHandlers;q.pointerEventsSupported?yt.each(zr.pointer,(function(n){$r(e,n,(function(e){i[n].call(t,e)}))})):(q.touchEventsSupported&&yt.each(zr.touch,(function(n){$r(e,n,(function(r){i[n].call(t,r),function(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout((function(){t.touching=!1,t.touchTimer=null}),700)}(e)}))})),yt.each(zr.mouse,(function(n){$r(e,n,(function(r){r=Er(r),e.touching||i[n].call(t,r)}))})))}function Zr(t,e){function i(i){$r(e,i,(function(n){n=Er(n),Gr(t,n.target)||(n=function(t,e){return Rr(t.dom,new Ur(t,e),!0)}(t,n),e.domHandlers[i].call(t,n))}),{capture:!0})}q.pointerEventsSupported?yt.each(Fr,i):q.touchEventsSupported||yt.each(Nr,i)}function $r(t,e,i,n){t.mounted[e]=i,t.listenerOpts[e]=n,Pr(t.domTarget,Hr(e),i,n)}function Kr(t){var e=t.mounted;for(var i in e)e.hasOwnProperty(i)&&Lr(t.domTarget,Hr(i),e[i],t.listenerOpts[i]);t.mounted={}}function Qr(t,e){if(t._mayPointerCapture=null,Br&&t._pointerCapturing^e){t._pointerCapturing=e;var i=t._globalHandlerScope;e?Zr(t,i):Kr(i)}}function Jr(t,e){this.domTarget=t,this.domHandlers=e,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function ta(t,e){Ot.call(this),this.dom=t,this.painterRoot=e,this._localHandlerScope=new Jr(t,jr),Br&&(this._globalHandlerScope=new Jr(document,Xr)),this._pointerCapturing=!1,this._mayPointerCapture=null,qr(this,this._localHandlerScope)}var ea=ta.prototype;ea.dispose=function(){Kr(this._localHandlerScope),Br&&Kr(this._globalHandlerScope)},ea.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},yt.mixin(ta,Ot);var ia=ta,na=!q.canvasSupported,ra={canvas:Cr},aa={};var oa=function(t,e,i){i=i||{},this.dom=e,this.id=t;var n=this,r=new Wi,a=i.renderer;if(na){if(!ra.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");a="vml"}else a&&ra[a]||(a="canvas");var o=new ra[a](e,r,i,t);this.storage=r,this.painter=o;var s=q.node||q.worker?null:new ia(o.getViewportRoot(),o.root);this.handler=new ae(r,o,s,o.root),this.animation=new Or({stage:{update:yt.bind(this.flush,this)}}),this.animation.start(),this._needsRefresh;var l=r.delFromStorage,u=r.addToStorage;r.delFromStorage=function(t){l.call(r,t),t&&t.removeSelfFromZr(n)},r.addToStorage=function(t){u.call(r,t),t.addSelfToZr(n)}};oa.prototype={constructor:oa,getId:function(){return this.id},add:function(t){this.storage.addRoot(t),this._needsRefresh=!0},remove:function(t){this.storage.delRoot(t),this._needsRefresh=!0},configLayer:function(t,e){this.painter.configLayer&&this.painter.configLayer(t,e),this._needsRefresh=!0},setBackgroundColor:function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh(),this._needsRefresh=this._needsRefreshHover=!1},refresh:function(){this._needsRefresh=!0},flush:function(){var t;this._needsRefresh&&(t=!0,this.refreshImmediately()),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately()),t&&this.trigger("rendered")},addHover:function(t,e){if(this.painter.addHover){var i=this.painter.addHover(t,e);return this.refreshHover(),i}},removeHover:function(t){this.painter.removeHover&&(this.painter.removeHover(t),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},resize:function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(t,e){return this.painter.pathToImage(t,e)},setCursorStyle:function(t){this.handler.setCursorStyle(t)},findHover:function(t,e){return this.handler.findHover(t,e)},on:function(t,e,i){this.handler.on(t,e,i)},off:function(t,e){this.handler.off(t,e)},trigger:function(t,e){this.handler.trigger(t,e)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){var t;this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,t=this.id,delete aa[t]}};var sa={version:"4.3.1",init:function(t,e){var i=new oa(X(),t,e);return aa[i.id]=i,i},dispose:function(t){if(t)t.dispose();else{for(var e in aa)aa.hasOwnProperty(e)&&aa[e].dispose();aa={}}return this},getInstance:function(t){return aa[t]},registerPainter:function(t,e){ra[t]=e}},la=yt.each,ua=yt.isObject,ha=yt.isArray;function ca(t){return t instanceof Array?t:null==t?[]:[t]}function da(t){return ua(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}var fa=0;function pa(t,e){return t&&t.hasOwnProperty(e)}var ga={normalizeToArray:ca,defaultEmphasis:function(t,e,i){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var n=0,r=i.length;n<r;n++){var a=i[n];!t.emphasis[e].hasOwnProperty(a)&&t[e].hasOwnProperty(a)&&(t.emphasis[e][a]=t[e][a])}}},TEXT_STYLE_OPTIONS:["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"],getDataItemValue:function(t){return!ua(t)||ha(t)||t instanceof Date?t:t.value},isDataItemOption:function(t){return ua(t)&&!(t instanceof Array)},mappingToExists:function(t,e){e=(e||[]).slice();var i=yt.map(t||[],(function(t,e){return{exist:t}}));return la(e,(function(t,n){if(ua(t)){for(var r=0;r<i.length;r++)if(!i[r].option&&null!=t.id&&i[r].exist.id===t.id+"")return i[r].option=t,void(e[n]=null);for(r=0;r<i.length;r++){var a=i[r].exist;if(!(i[r].option||null!=a.id&&null!=t.id||null==t.name||da(t)||da(a)||a.name!==t.name+""))return i[r].option=t,void(e[n]=null)}}})),la(e,(function(t,e){if(ua(t)){for(var n=0;n<i.length;n++){var r=i[n].exist;if(!i[n].option&&!da(r)&&null==t.id){i[n].option=t;break}}n>=i.length&&i.push({option:t})}})),i},makeIdAndName:function(t){var e=yt.createHashMap();la(t,(function(t,i){var n=t.exist;n&&e.set(n.id,t)})),la(t,(function(t,i){var n=t.option;yt.assert(!n||null==n.id||!e.get(n.id)||e.get(n.id)===t,"id duplicates: "+(n&&n.id)),n&&null!=n.id&&e.set(n.id,t),!t.keyInfo&&(t.keyInfo={})})),la(t,(function(t,i){var n=t.exist,r=t.option,a=t.keyInfo;if(ua(r)){if(a.name=null!=r.name?r.name+"":n?n.name:"series\0"+i,n)a.id=n.id;else if(null!=r.id)a.id=r.id+"";else{var o=0;do{a.id="\0"+a.name+"\0"+o++}while(e.get(a.id))}e.set(a.id,t)}}))},isNameSpecified:function(t){var e=t.name;return!(!e||!e.indexOf("series\0"))},isIdInner:da,compressBatches:function(t,e){var i={},n={};return r(t||[],i),r(e||[],n,i),[a(i),a(n)];function r(t,e,i){for(var n=0,r=t.length;n<r;n++)for(var a=t[n].seriesId,o=ca(t[n].dataIndex),s=i&&i[a],l=0,u=o.length;l<u;l++){var h=o[l];s&&s[h]?s[h]=null:(e[a]||(e[a]={}))[h]=1}}function a(t,e){var i=[];for(var n in t)if(t.hasOwnProperty(n)&&null!=t[n])if(e)i.push(+n);else{var r=a(t[n],!0);r.length&&i.push({seriesId:n,dataIndex:r})}return i}},queryDataIndex:function(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?yt.isArray(e.dataIndex)?yt.map(e.dataIndex,(function(e){return t.indexOfRawIndex(e)})):t.indexOfRawIndex(e.dataIndex):null!=e.name?yt.isArray(e.name)?yt.map(e.name,(function(e){return t.indexOfName(e)})):t.indexOfName(e.name):void 0},makeInner:function(){var t="__\0ec_inner_"+fa+++"_"+Math.random().toFixed(5);return function(e){return e[t]||(e[t]={})}},parseFinder:function(t,e,i){if(yt.isString(e)){var n={};n[e+"Index"]=0,e=n}var r=i&&i.defaultMainType;!r||pa(e,r+"Index")||pa(e,r+"Id")||pa(e,r+"Name")||(e[r+"Index"]=0);var a={};return la(e,(function(n,r){n=e[r];if("dataIndex"!==r&&"dataIndexInside"!==r){var o=r.match(/^(\w+)(Index|Id|Name)$/)||[],s=o[1],l=(o[2]||"").toLowerCase();if(!(!s||!l||null==n||"index"===l&&"none"===n||i&&i.includeMainTypes&&yt.indexOf(i.includeMainTypes,s)<0)){var u={mainType:s};"index"===l&&"all"===n||(u[l]=n);var h=t.queryComponents(u);a[s+"Models"]=h,a[s+"Model"]=h[0]}}else a[r]=n})),a},setAttribute:function(t,e,i){t.setAttribute?t.setAttribute(e,i):t[e]=i},getAttribute:function(t,e){return t.getAttribute?t.getAttribute(e):t[e]},getTooltipRenderMode:function(t){return"auto"===t?q.domSupported?"html":"richText":t||"html"},groupData:function(t,e){var i=yt.createHashMap(),n=[];return yt.each(t,(function(t){var r=e(t);(i.get(r)||(n.push(r),i.set(r,[]))).push(t)})),{keys:n,buckets:i}}},ma="___EC__COMPONENT__CONTAINER___";function va(t){var e={main:"",sub:""};return t&&(t=t.split("."),e.main=t[0]||"",e.sub=t[1]||""),e}var ya=0;function _a(t,e){var i=yt.slice(arguments,2);return this.superClass.prototype[e].apply(t,i)}function xa(t,e,i){return this.superClass.prototype[e].apply(t,i)}var ba={parseClassType:va,enableClassExtend:function(t,e){t.$constructor=t,t.extend=function(t){var e=this,i=function(){t.$constructor?t.$constructor.apply(this,arguments):e.apply(this,arguments)};return yt.extend(i.prototype,t),i.extend=this.extend,i.superCall=_a,i.superApply=xa,yt.inherits(i,this),i.superClass=e,i}},enableClassCheck:function(t){var e=["__\0is_clz",ya++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}},enableClassManagement:function(t,e){e=e||{};var i={};if(t.registerClass=function(t,e){if(e)if(function(t){yt.assert(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}(e),(e=va(e)).sub){if(e.sub!==ma){(function(t){var e=i[t.main];e&&e[ma]||((e=i[t.main]={})[ma]=!0);return e}(e))[e.sub]=t}}else i[e.main]=t;return t},t.getClass=function(t,e,n){var r=i[t];if(r&&r[ma]&&(r=e?r[e]:null),n&&!r)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return r},t.getClassesByMainType=function(t){t=va(t);var e=[],n=i[t.main];return n&&n[ma]?yt.each(n,(function(t,i){i!==ma&&e.push(t)})):e.push(n),e},t.hasClass=function(t){return t=va(t),!!i[t.main]},t.getAllClassMainTypes=function(){var t=[];return yt.each(i,(function(e,i){t.push(i)})),t},t.hasSubTypes=function(t){t=va(t);var e=i[t.main];return e&&e[ma]},t.parseClassType=va,e.registerWhenExtend){var n=t.extend;n&&(t.extend=function(e){var i=n.call(this,e);return t.registerClass(i,e.type)})}return t},setReadOnly:function(t,e){}};var wa=function(t){for(var e=0;e<t.length;e++)t[e][1]||(t[e][1]=t[e][0]);return function(e,i,n){for(var r={},a=0;a<t.length;a++){var o=t[a][1];if(!(i&&yt.indexOf(i,o)>=0||n&&yt.indexOf(n,o)<0)){var s=e.getShallow(o);null!=s&&(r[t[a][0]]=s)}}return r}},Sa=wa([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Ta={getLineStyle:function(t){var e=Sa(this,t);return e.lineDash=this.getLineDash(e.lineWidth),e},getLineDash:function(t){null==t&&(t=1);var e=this.get("type"),i=Math.max(t,2),n=4*t;return"solid"!==e&&null!=e&&("dashed"===e?[n,n]:[i,i])}},Ma=wa([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Ca={getAreaStyle:function(t,e){return Ma(this,t,e)}},Ia=Tt.create,Aa=Tt.distSquare,Da=Math.pow,ka=Math.sqrt,Oa=ka(3),Pa=Ia(),La=Ia(),Ra=Ia();function Ea(t){return t>-1e-8&&t<1e-8}function Ba(t){return t>1e-8||t<-1e-8}function za(t,e,i,n,r){var a=1-r;return a*a*(a*t+3*r*e)+r*r*(r*n+3*a*i)}function Na(t,e,i,n){var r=1-n;return r*(r*t+2*n*e)+n*n*i}var Fa={cubicAt:za,cubicDerivativeAt:function(t,e,i,n,r){var a=1-r;return 3*(((e-t)*a+2*(i-e)*r)*a+(n-i)*r*r)},cubicRootAt:function(t,e,i,n,r,a){var o=n+3*(e-i)-t,s=3*(i-2*e+t),l=3*(e-t),u=t-r,h=s*s-3*o*l,c=s*l-9*o*u,d=l*l-3*s*u,f=0;if(Ea(h)&&Ea(c)){if(Ea(s))a[0]=0;else(T=-l/s)>=0&&T<=1&&(a[f++]=T)}else{var p=c*c-4*h*d;if(Ea(p)){var g=c/h,m=-g/2;(T=-s/o+g)>=0&&T<=1&&(a[f++]=T),m>=0&&m<=1&&(a[f++]=m)}else if(p>0){var v=ka(p),y=h*s+1.5*o*(-c+v),_=h*s+1.5*o*(-c-v);(T=(-s-((y=y<0?-Da(-y,1/3):Da(y,1/3))+(_=_<0?-Da(-_,1/3):Da(_,1/3))))/(3*o))>=0&&T<=1&&(a[f++]=T)}else{var x=(2*h*s-3*o*c)/(2*ka(h*h*h)),b=Math.acos(x)/3,w=ka(h),S=Math.cos(b),T=(-s-2*w*S)/(3*o),M=(m=(-s+w*(S+Oa*Math.sin(b)))/(3*o),(-s+w*(S-Oa*Math.sin(b)))/(3*o));T>=0&&T<=1&&(a[f++]=T),m>=0&&m<=1&&(a[f++]=m),M>=0&&M<=1&&(a[f++]=M)}}return f},cubicExtrema:function(t,e,i,n,r){var a=6*i-12*e+6*t,o=9*e+3*n-3*t-9*i,s=3*e-3*t,l=0;if(Ea(o)){if(Ba(a))(h=-s/a)>=0&&h<=1&&(r[l++]=h)}else{var u=a*a-4*o*s;if(Ea(u))r[0]=-a/(2*o);else if(u>0){var h,c=ka(u),d=(-a-c)/(2*o);(h=(-a+c)/(2*o))>=0&&h<=1&&(r[l++]=h),d>=0&&d<=1&&(r[l++]=d)}}return l},cubicSubdivide:function(t,e,i,n,r,a){var o=(e-t)*r+t,s=(i-e)*r+e,l=(n-i)*r+i,u=(s-o)*r+o,h=(l-s)*r+s,c=(h-u)*r+u;a[0]=t,a[1]=o,a[2]=u,a[3]=c,a[4]=c,a[5]=h,a[6]=l,a[7]=n},cubicProjectPoint:function(t,e,i,n,r,a,o,s,l,u,h){var c,d,f,p,g,m=.005,v=1/0;Pa[0]=l,Pa[1]=u;for(var y=0;y<1;y+=.05)La[0]=za(t,i,r,o,y),La[1]=za(e,n,a,s,y),(p=Aa(Pa,La))<v&&(c=y,v=p);v=1/0;for(var _=0;_<32&&!(m<1e-4);_++)d=c-m,f=c+m,La[0]=za(t,i,r,o,d),La[1]=za(e,n,a,s,d),p=Aa(La,Pa),d>=0&&p<v?(c=d,v=p):(Ra[0]=za(t,i,r,o,f),Ra[1]=za(e,n,a,s,f),g=Aa(Ra,Pa),f<=1&&g<v?(c=f,v=g):m*=.5);return h&&(h[0]=za(t,i,r,o,c),h[1]=za(e,n,a,s,c)),ka(v)},quadraticAt:Na,quadraticDerivativeAt:function(t,e,i,n){return 2*((1-n)*(e-t)+n*(i-e))},quadraticRootAt:function(t,e,i,n,r){var a=t-2*e+i,o=2*(e-t),s=t-n,l=0;if(Ea(a)){if(Ba(o))(h=-s/o)>=0&&h<=1&&(r[l++]=h)}else{var u=o*o-4*a*s;if(Ea(u))(h=-o/(2*a))>=0&&h<=1&&(r[l++]=h);else if(u>0){var h,c=ka(u),d=(-o-c)/(2*a);(h=(-o+c)/(2*a))>=0&&h<=1&&(r[l++]=h),d>=0&&d<=1&&(r[l++]=d)}}return l},quadraticExtremum:function(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n},quadraticSubdivide:function(t,e,i,n,r){var a=(e-t)*n+t,o=(i-e)*n+e,s=(o-a)*n+a;r[0]=t,r[1]=a,r[2]=s,r[3]=s,r[4]=o,r[5]=i},quadraticProjectPoint:function(t,e,i,n,r,a,o,s,l){var u,h=.005,c=1/0;Pa[0]=o,Pa[1]=s;for(var d=0;d<1;d+=.05){La[0]=Na(t,i,r,d),La[1]=Na(e,n,a,d),(m=Aa(Pa,La))<c&&(u=d,c=m)}c=1/0;for(var f=0;f<32&&!(h<1e-4);f++){var p=u-h,g=u+h;La[0]=Na(t,i,r,p),La[1]=Na(e,n,a,p);var m=Aa(La,Pa);if(p>=0&&m<c)u=p,c=m;else{Ra[0]=Na(t,i,r,g),Ra[1]=Na(e,n,a,g);var v=Aa(Ra,Pa);g<=1&&v<c?(u=g,c=v):h*=.5}}return l&&(l[0]=Na(t,i,r,u),l[1]=Na(e,n,a,u)),ka(c)}},Ha=Math.min,Va=Math.max,Wa=Math.sin,Ga=Math.cos,Ua=2*Math.PI,Ya=Tt.create(),ja=Tt.create(),Xa=Tt.create();var qa=[],Za=[];var $a={fromPoints:function(t,e,i){if(0!==t.length){var n,r=t[0],a=r[0],o=r[0],s=r[1],l=r[1];for(n=1;n<t.length;n++)r=t[n],a=Ha(a,r[0]),o=Va(o,r[0]),s=Ha(s,r[1]),l=Va(l,r[1]);e[0]=a,e[1]=s,i[0]=o,i[1]=l}},fromLine:function(t,e,i,n,r,a){r[0]=Ha(t,i),r[1]=Ha(e,n),a[0]=Va(t,i),a[1]=Va(e,n)},fromCubic:function(t,e,i,n,r,a,o,s,l,u){var h,c=Fa.cubicExtrema,d=Fa.cubicAt,f=c(t,i,r,o,qa);for(l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0,h=0;h<f;h++){var p=d(t,i,r,o,qa[h]);l[0]=Ha(p,l[0]),u[0]=Va(p,u[0])}for(f=c(e,n,a,s,Za),h=0;h<f;h++){var g=d(e,n,a,s,Za[h]);l[1]=Ha(g,l[1]),u[1]=Va(g,u[1])}l[0]=Ha(t,l[0]),u[0]=Va(t,u[0]),l[0]=Ha(o,l[0]),u[0]=Va(o,u[0]),l[1]=Ha(e,l[1]),u[1]=Va(e,u[1]),l[1]=Ha(s,l[1]),u[1]=Va(s,u[1])},fromQuadratic:function(t,e,i,n,r,a,o,s){var l=Fa.quadraticExtremum,u=Fa.quadraticAt,h=Va(Ha(l(t,i,r),1),0),c=Va(Ha(l(e,n,a),1),0),d=u(t,i,r,h),f=u(e,n,a,c);o[0]=Ha(t,r,d),o[1]=Ha(e,a,f),s[0]=Va(t,r,d),s[1]=Va(e,a,f)},fromArc:function(t,e,i,n,r,a,o,s,l){var u=Tt.min,h=Tt.max,c=Math.abs(r-a);if(c%Ua<1e-4&&c>1e-4)return s[0]=t-i,s[1]=e-n,l[0]=t+i,void(l[1]=e+n);if(Ya[0]=Ga(r)*i+t,Ya[1]=Wa(r)*n+e,ja[0]=Ga(a)*i+t,ja[1]=Wa(a)*n+e,u(s,Ya,ja),h(l,Ya,ja),(r%=Ua)<0&&(r+=Ua),(a%=Ua)<0&&(a+=Ua),r>a&&!o?a+=Ua:r<a&&o&&(r+=Ua),o){var d=a;a=r,r=d}for(var f=0;f<a;f+=Math.PI/2)f>r&&(Xa[0]=Ga(f)*i+t,Xa[1]=Wa(f)*n+e,u(s,Xa,s),h(l,Xa,l))}},Ka=hi.devicePixelRatio,Qa={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Ja=[],to=[],eo=[],io=[],no=Math.min,ro=Math.max,ao=Math.cos,oo=Math.sin,so=Math.sqrt,lo=Math.abs,uo="undefined"!=typeof Float32Array,ho=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};ho.prototype={constructor:ho,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e,i){i=i||0,this._ux=lo(i/Ka/t)||0,this._uy=lo(i/Ka/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return this._ctx=t,t&&t.beginPath(),t&&(this.dpr=t.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(t,e){return this.addData(Qa.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var i=lo(t-this._xi)>this._ux||lo(e-this._yi)>this._uy||this._len<5;return this.addData(Qa.L,t,e),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),i&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,i,n,r,a){return this.addData(Qa.C,t,e,i,n,r,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,r,a):this._ctx.bezierCurveTo(t,e,i,n,r,a)),this._xi=r,this._yi=a,this},quadraticCurveTo:function(t,e,i,n){return this.addData(Qa.Q,t,e,i,n),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,i,n):this._ctx.quadraticCurveTo(t,e,i,n)),this._xi=i,this._yi=n,this},arc:function(t,e,i,n,r,a){return this.addData(Qa.A,t,e,i,i,n,r-n,0,a?0:1),this._ctx&&this._ctx.arc(t,e,i,n,r,a),this._xi=ao(r)*i+t,this._yi=oo(r)*i+e,this},arcTo:function(t,e,i,n,r){return this._ctx&&this._ctx.arcTo(t,e,i,n,r),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData(Qa.R,t,e,i,n),this},closePath:function(){this.addData(Qa.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,i),t.closePath()),this._xi=e,this._yi=i,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,i=0;i<t.length;i++)e+=t[i];this._dashSum=e}return this},setLineDashOffset:function(t){return this._dashOffset=t,this},len:function(){return this._len},setData:function(t){var e=t.length;this.data&&this.data.length===e||!uo||(this.data=new Float32Array(e));for(var i=0;i<e;i++)this.data[i]=t[i];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,i=0,n=this._len,r=0;r<e;r++)i+=t[r].len();uo&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i));for(r=0;r<e;r++)for(var a=t[r].data,o=0;o<a.length;o++)this.data[n++]=a[o];this._len=n},addData:function(t){if(this._saveData){var e=this.data;this._len+arguments.length>e.length&&(this._expandData(),e=this.data);for(var i=0;i<arguments.length;i++)e[this._len++]=arguments[i];this._prevCmd=t}},_expandData:function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(t,e){var i,n,r=this._dashSum,a=this._dashOffset,o=this._lineDash,s=this._ctx,l=this._xi,u=this._yi,h=t-l,c=e-u,d=so(h*h+c*c),f=l,p=u,g=o.length;for(a<0&&(a=r+a),f-=(a%=r)*(h/=d),p-=a*(c/=d);h>0&&f<=t||h<0&&f>=t||0===h&&(c>0&&p<=e||c<0&&p>=e);)f+=h*(i=o[n=this._dashIdx]),p+=c*i,this._dashIdx=(n+1)%g,h>0&&f<l||h<0&&f>l||c>0&&p<u||c<0&&p>u||s[n%2?"moveTo":"lineTo"](h>=0?no(f,t):ro(f,t),c>=0?no(p,e):ro(p,e));h=f-t,c=p-e,this._dashOffset=-so(h*h+c*c)},_dashedBezierTo:function(t,e,i,n,r,a){var o,s,l,u,h,c=this._dashSum,d=this._dashOffset,f=this._lineDash,p=this._ctx,g=this._xi,m=this._yi,v=Fa.cubicAt,y=0,_=this._dashIdx,x=f.length,b=0;for(d<0&&(d=c+d),d%=c,o=0;o<1;o+=.1)s=v(g,t,i,r,o+.1)-v(g,t,i,r,o),l=v(m,e,n,a,o+.1)-v(m,e,n,a,o),y+=so(s*s+l*l);for(;_<x&&!((b+=f[_])>d);_++);for(o=(b-d)/y;o<=1;)u=v(g,t,i,r,o),h=v(m,e,n,a,o),_%2?p.moveTo(u,h):p.lineTo(u,h),o+=f[_]/y,_=(_+1)%x;_%2!=0&&p.lineTo(r,a),s=r-u,l=a-h,this._dashOffset=-so(s*s+l*l)},_dashedQuadraticTo:function(t,e,i,n){var r=i,a=n;i=(i+2*t)/3,n=(n+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,i,n,r,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,uo&&(this.data=new Float32Array(t)))},getBoundingRect:function(){Ja[0]=Ja[1]=eo[0]=eo[1]=Number.MAX_VALUE,to[0]=to[1]=io[0]=io[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,i=0,n=0,r=0,a=0;a<t.length;){var o=t[a++];switch(1===a&&(n=e=t[a],r=i=t[a+1]),o){case Qa.M:e=n=t[a++],i=r=t[a++],eo[0]=n,eo[1]=r,io[0]=n,io[1]=r;break;case Qa.L:$a.fromLine(e,i,t[a],t[a+1],eo,io),e=t[a++],i=t[a++];break;case Qa.C:$a.fromCubic(e,i,t[a++],t[a++],t[a++],t[a++],t[a],t[a+1],eo,io),e=t[a++],i=t[a++];break;case Qa.Q:$a.fromQuadratic(e,i,t[a++],t[a++],t[a],t[a+1],eo,io),e=t[a++],i=t[a++];break;case Qa.A:var s=t[a++],l=t[a++],u=t[a++],h=t[a++],c=t[a++],d=t[a++]+c;a+=1;var f=1-t[a++];1===a&&(n=ao(c)*u+s,r=oo(c)*h+l),$a.fromArc(s,l,u,h,c,d,f,eo,io),e=ao(d)*u+s,i=oo(d)*h+l;break;case Qa.R:n=e=t[a++],r=i=t[a++];var p=t[a++],g=t[a++];$a.fromLine(n,r,n+p,r+g,eo,io);break;case Qa.Z:e=n,i=r}Tt.min(Ja,Ja,eo),Tt.max(to,to,io)}return 0===a&&(Ja[0]=Ja[1]=to[0]=to[1]=0),new Oi(Ja[0],Ja[1],to[0]-Ja[0],to[1]-Ja[1])},rebuildPath:function(t){for(var e,i,n,r,a,o,s=this.data,l=this._ux,u=this._uy,h=this._len,c=0;c<h;){var d=s[c++];switch(1===c&&(e=n=s[c],i=r=s[c+1]),d){case Qa.M:e=n=s[c++],i=r=s[c++],t.moveTo(n,r);break;case Qa.L:a=s[c++],o=s[c++],(lo(a-n)>l||lo(o-r)>u||c===h-1)&&(t.lineTo(a,o),n=a,r=o);break;case Qa.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],r=s[c-1];break;case Qa.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],r=s[c-1];break;case Qa.A:var f=s[c++],p=s[c++],g=s[c++],m=s[c++],v=s[c++],y=s[c++],_=s[c++],x=s[c++],b=g>m?g:m,w=g>m?1:g/m,S=g>m?m/g:1,T=v+y;Math.abs(g-m)>.001?(t.translate(f,p),t.rotate(_),t.scale(w,S),t.arc(0,0,b,v,T,1-x),t.scale(1/w,1/S),t.rotate(-_),t.translate(-f,-p)):t.arc(f,p,b,v,T,1-x),1===c&&(e=ao(v)*g+f,i=oo(v)*m+p),n=ao(T)*g+f,r=oo(T)*m+p;break;case Qa.R:e=n=s[c],i=r=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case Qa.Z:t.closePath(),n=e,r=i}}}},ho.CMD=Qa;var co=ho;var fo={containStroke:function(t,e,i,n,r,a,o){if(0===r)return!1;var s=r,l=0;if(o>e+s&&o>n+s||o<e-s&&o<n-s||a>t+s&&a>i+s||a<t-s&&a<i-s)return!1;if(t===i)return Math.abs(a-t)<=s/2;var u=(l=(e-n)/(t-i))*a-o+(t*n-i*e)/(t-i);return u*u/(l*l+1)<=s/2*s/2}};var po={containStroke:function(t,e,i,n,r,a,o,s,l,u,h){if(0===l)return!1;var c=l;return!(h>e+c&&h>n+c&&h>a+c&&h>s+c||h<e-c&&h<n-c&&h<a-c&&h<s-c||u>t+c&&u>i+c&&u>r+c&&u>o+c||u<t-c&&u<i-c&&u<r-c&&u<o-c)&&Fa.cubicProjectPoint(t,e,i,n,r,a,o,s,u,h,null)<=c/2}},go=Fa.quadraticProjectPoint;var mo={containStroke:function(t,e,i,n,r,a,o,s,l){if(0===o)return!1;var u=o;return!(l>e+u&&l>n+u&&l>a+u||l<e-u&&l<n-u&&l<a-u||s>t+u&&s>i+u&&s>r+u||s<t-u&&s<i-u&&s<r-u)&&go(t,e,i,n,r,a,s,l,null)<=u/2}},vo=2*Math.PI;var yo={normalizeRadian:function(t){return(t%=vo)<0&&(t+=vo),t}},_o=yo.normalizeRadian,xo=2*Math.PI;var bo={containStroke:function(t,e,i,n,r,a,o,s,l){if(0===o)return!1;var u=o;s-=t,l-=e;var h=Math.sqrt(s*s+l*l);if(h-u>i||h+u<i)return!1;if(Math.abs(n-r)%xo<1e-4)return!0;if(a){var c=n;n=_o(r),r=_o(c)}else n=_o(n),r=_o(r);n>r&&(r+=xo);var d=Math.atan2(l,s);return d<0&&(d+=xo),d>=n&&d<=r||d+xo>=n&&d+xo<=r}};var wo=function(t,e,i,n,r,a){if(a>e&&a>n||a<e&&a<n)return 0;if(n===e)return 0;var o=n<e?1:-1,s=(a-e)/(n-e);1!==s&&0!==s||(o=n<e?.5:-.5);var l=s*(i-t)+t;return l===r?1/0:l>r?o:0},So=yo.normalizeRadian,To=co.CMD,Mo=2*Math.PI;var Co=[-1,-1,-1],Io=[-1,-1];function Ao(t,e,i,n,r,a,o,s,l,u){if(u>e&&u>n&&u>a&&u>s||u<e&&u<n&&u<a&&u<s)return 0;var h,c=Fa.cubicRootAt(e,n,a,s,u,Co);if(0===c)return 0;for(var d,f,p=0,g=-1,m=0;m<c;m++){var v=Co[m],y=0===v||1===v?.5:1;Fa.cubicAt(t,i,r,o,v)<l||(g<0&&(g=Fa.cubicExtrema(e,n,a,s,Io),Io[1]<Io[0]&&g>1&&(h=void 0,h=Io[0],Io[0]=Io[1],Io[1]=h),d=Fa.cubicAt(e,n,a,s,Io[0]),g>1&&(f=Fa.cubicAt(e,n,a,s,Io[1]))),2===g?v<Io[0]?p+=d<e?y:-y:v<Io[1]?p+=f<d?y:-y:p+=s<f?y:-y:v<Io[0]?p+=d<e?y:-y:p+=s<d?y:-y)}return p}function Do(t,e,i,n,r,a,o,s){if(s>e&&s>n&&s>a||s<e&&s<n&&s<a)return 0;var l=Fa.quadraticRootAt(e,n,a,s,Co);if(0===l)return 0;var u=Fa.quadraticExtremum(e,n,a);if(u>=0&&u<=1){for(var h=0,c=Fa.quadraticAt(e,n,a,u),d=0;d<l;d++){var f=0===Co[d]||1===Co[d]?.5:1;Fa.quadraticAt(t,i,r,Co[d])<o||(Co[d]<u?h+=c<e?f:-f:h+=a<c?f:-f)}return h}f=0===Co[0]||1===Co[0]?.5:1;return Fa.quadraticAt(t,i,r,Co[0])<o?0:a<e?f:-f}function ko(t,e,i,n,r,a,o,s){if((s-=e)>i||s<-i)return 0;var l=Math.sqrt(i*i-s*s);Co[0]=-l,Co[1]=l;var u=Math.abs(n-r);if(u<1e-4)return 0;if(u%Mo<1e-4){n=0,r=Mo;var h=a?1:-1;return o>=Co[0]+t&&o<=Co[1]+t?h:0}if(a){l=n;n=So(r),r=So(l)}else n=So(n),r=So(r);n>r&&(r+=Mo);for(var c=0,d=0;d<2;d++){var f=Co[d];if(f+t>o){var p=Math.atan2(s,f);h=a?1:-1;p<0&&(p=Mo+p),(p>=n&&p<=r||p+Mo>=n&&p+Mo<=r)&&(p>Math.PI/2&&p<1.5*Math.PI&&(h=-h),c+=h)}}return c}function Oo(t,e,i,n,r){for(var a,o,s=0,l=0,u=0,h=0,c=0,d=0;d<t.length;){var f=t[d++];switch(f===To.M&&d>1&&(i||(s+=wo(l,u,h,c,n,r))),1===d&&(h=l=t[d],c=u=t[d+1]),f){case To.M:l=h=t[d++],u=c=t[d++];break;case To.L:if(i){if(fo.containStroke(l,u,t[d],t[d+1],e,n,r))return!0}else s+=wo(l,u,t[d],t[d+1],n,r)||0;l=t[d++],u=t[d++];break;case To.C:if(i){if(po.containStroke(l,u,t[d++],t[d++],t[d++],t[d++],t[d],t[d+1],e,n,r))return!0}else s+=Ao(l,u,t[d++],t[d++],t[d++],t[d++],t[d],t[d+1],n,r)||0;l=t[d++],u=t[d++];break;case To.Q:if(i){if(mo.containStroke(l,u,t[d++],t[d++],t[d],t[d+1],e,n,r))return!0}else s+=Do(l,u,t[d++],t[d++],t[d],t[d+1],n,r)||0;l=t[d++],u=t[d++];break;case To.A:var p=t[d++],g=t[d++],m=t[d++],v=t[d++],y=t[d++],_=t[d++];d+=1;var x=1-t[d++],b=Math.cos(y)*m+p,w=Math.sin(y)*v+g;d>1?s+=wo(l,u,b,w,n,r):(h=b,c=w);var S=(n-p)*v/m+p;if(i){if(bo.containStroke(p,g,v,y,y+_,x,e,S,r))return!0}else s+=ko(p,g,v,y,y+_,x,S,r);l=Math.cos(y+_)*m+p,u=Math.sin(y+_)*v+g;break;case To.R:h=l=t[d++],c=u=t[d++];b=h+t[d++],w=c+t[d++];if(i){if(fo.containStroke(h,c,b,c,e,n,r)||fo.containStroke(b,c,b,w,e,n,r)||fo.containStroke(b,w,h,w,e,n,r)||fo.containStroke(h,w,h,c,e,n,r))return!0}else s+=wo(b,c,b,w,n,r),s+=wo(h,w,h,c,n,r);break;case To.Z:if(i){if(fo.containStroke(l,u,h,c,e,n,r))return!0}else s+=wo(l,u,h,c,n,r);l=h,u=c}}return i||(a=u,o=c,Math.abs(a-o)<1e-4)||(s+=wo(l,u,h,c,n,r)||0),0!==s}var Po={contain:function(t,e,i){return Oo(t,0,!1,e,i)},containStroke:function(t,e,i,n){return Oo(t,e,!0,i,n)}},Lo=nn.prototype.getCanvasPattern,Ro=Math.abs,Eo=new co(!0);function Bo(t){yr.call(this,t),this.path=null}Bo.prototype={constructor:Bo,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(t,e){var i,n=this.style,r=this.path||Eo,a=n.hasStroke(),o=n.hasFill(),s=n.fill,l=n.stroke,u=o&&!!s.colorStops,h=a&&!!l.colorStops,c=o&&!!s.image,d=a&&!!l.image;(n.bind(t,this,e),this.setTransform(t),this.__dirty)&&(u&&(i=i||this.getBoundingRect(),this._fillGradient=n.getGradient(t,s,i)),h&&(i=i||this.getBoundingRect(),this._strokeGradient=n.getGradient(t,l,i)));u?t.fillStyle=this._fillGradient:c&&(t.fillStyle=Lo.call(s,t)),h?t.strokeStyle=this._strokeGradient:d&&(t.strokeStyle=Lo.call(l,t));var f=n.lineDash,p=n.lineDashOffset,g=!!t.setLineDash,m=this.getGlobalScale();if(r.setScale(m[0],m[1],this.segmentIgnoreThreshold),this.__dirtyPath||f&&!g&&a?(r.beginPath(t),f&&!g&&(r.setLineDash(f),r.setLineDashOffset(p)),this.buildPath(r,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),o)if(null!=n.fillOpacity){var v=t.globalAlpha;t.globalAlpha=n.fillOpacity*n.opacity,r.fill(t),t.globalAlpha=v}else r.fill(t);if(f&&g&&(t.setLineDash(f),t.lineDashOffset=p),a)if(null!=n.strokeOpacity){v=t.globalAlpha;t.globalAlpha=n.strokeOpacity*n.opacity,r.stroke(t),t.globalAlpha=v}else r.stroke(t);f&&g&&t.setLineDash([]),null!=n.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(t,e,i){},createPathProxy:function(){this.path=new co},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;n||(n=this.path=new co),this.__dirtyPath&&(n.beginPath(),this.buildPath(n,this.shape,!1)),t=n.getBoundingRect()}if(this._rect=t,e.hasStroke()){var r=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){r.copy(t);var a=e.lineWidth,o=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(a=Math.max(a,this.strokeContainThreshold||4)),o>1e-10&&(r.width+=a/o,r.height+=a/o,r.x-=a/o/2,r.y-=a/o/2)}return r}return t},contain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),r=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var a=this.path.data;if(r.hasStroke()){var o=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(r.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),Po.containStroke(a,o/s,t,e)))return!0}if(r.hasFill())return Po.contain(a,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):yr.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(yt.isObject(t))for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);else i[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&Ro(t[0]-1)>1e-10&&Ro(t[3]-1)>1e-10?Math.sqrt(Ro(t[0]*t[3]-t[2]*t[1])):1}},Bo.extend=function(t){var e=function(e){Bo.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var n=this.shape;for(var r in i)!n.hasOwnProperty(r)&&i.hasOwnProperty(r)&&(n[r]=i[r])}t.init&&t.init.call(this,e)};for(var i in yt.inherits(e,Bo),t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},yt.inherits(Bo,yr);var zo=Bo,No=Tt.applyTransform,Fo=co.CMD,Ho=[[],[],[]],Vo=Math.sqrt,Wo=Math.atan2;var Go=function(t,e){var i,n,r,a,o,s=t.data,l=Fo.M,u=Fo.C,h=Fo.L,c=Fo.R,d=Fo.A,f=Fo.Q;for(r=0,a=0;r<s.length;){switch(i=s[r++],a=r,n=0,i){case l:case h:n=1;break;case u:n=3;break;case f:n=2;break;case d:var p=e[4],g=e[5],m=Vo(e[0]*e[0]+e[1]*e[1]),v=Vo(e[2]*e[2]+e[3]*e[3]),y=Wo(-e[1]/v,e[0]/m);s[r]*=m,s[r++]+=p,s[r]*=v,s[r++]+=g,s[r++]*=m,s[r++]*=v,s[r++]+=y,s[r++]+=y,a=r+=2;break;case c:_[0]=s[r++],_[1]=s[r++],No(_,_,e),s[a++]=_[0],s[a++]=_[1],_[0]+=s[r++],_[1]+=s[r++],No(_,_,e),s[a++]=_[0],s[a++]=_[1]}for(o=0;o<n;o++){var _;(_=Ho[o])[0]=s[r++],_[1]=s[r++],No(_,_,e),s[a++]=_[0],s[a++]=_[1]}}},Uo=Math.sqrt,Yo=Math.sin,jo=Math.cos,Xo=Math.PI,qo=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},Zo=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(qo(t)*qo(e))},$o=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Zo(t,e))};function Ko(t,e,i,n,r,a,o,s,l,u,h){var c=l*(Xo/180),d=jo(c)*(t-i)/2+Yo(c)*(e-n)/2,f=-1*Yo(c)*(t-i)/2+jo(c)*(e-n)/2,p=d*d/(o*o)+f*f/(s*s);p>1&&(o*=Uo(p),s*=Uo(p));var g=(r===a?-1:1)*Uo((o*o*(s*s)-o*o*(f*f)-s*s*(d*d))/(o*o*(f*f)+s*s*(d*d)))||0,m=g*o*f/s,v=g*-s*d/o,y=(t+i)/2+jo(c)*m-Yo(c)*v,_=(e+n)/2+Yo(c)*m+jo(c)*v,x=$o([1,0],[(d-m)/o,(f-v)/s]),b=[(d-m)/o,(f-v)/s],w=[(-1*d-m)/o,(-1*f-v)/s],S=$o(b,w);Zo(b,w)<=-1&&(S=Xo),Zo(b,w)>=1&&(S=0),0===a&&S>0&&(S-=2*Xo),1===a&&S<0&&(S+=2*Xo),h.addData(u,y,_,o,s,x,S,c,a)}var Qo=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Jo=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function ts(t,e){var i=function(t){if(!t)return new co;for(var e,i=0,n=0,r=i,a=n,o=new co,s=co.CMD,l=t.match(Qo),u=0;u<l.length;u++){for(var h,c=l[u],d=c.charAt(0),f=c.match(Jo)||[],p=f.length,g=0;g<p;g++)f[g]=parseFloat(f[g]);for(var m=0;m<p;){var v,y,_,x,b,w,S,T=i,M=n;switch(d){case"l":i+=f[m++],n+=f[m++],h=s.L,o.addData(h,i,n);break;case"L":i=f[m++],n=f[m++],h=s.L,o.addData(h,i,n);break;case"m":i+=f[m++],n+=f[m++],h=s.M,o.addData(h,i,n),r=i,a=n,d="l";break;case"M":i=f[m++],n=f[m++],h=s.M,o.addData(h,i,n),r=i,a=n,d="L";break;case"h":i+=f[m++],h=s.L,o.addData(h,i,n);break;case"H":i=f[m++],h=s.L,o.addData(h,i,n);break;case"v":n+=f[m++],h=s.L,o.addData(h,i,n);break;case"V":n=f[m++],h=s.L,o.addData(h,i,n);break;case"C":h=s.C,o.addData(h,f[m++],f[m++],f[m++],f[m++],f[m++],f[m++]),i=f[m-2],n=f[m-1];break;case"c":h=s.C,o.addData(h,f[m++]+i,f[m++]+n,f[m++]+i,f[m++]+n,f[m++]+i,f[m++]+n),i+=f[m-2],n+=f[m-1];break;case"S":v=i,y=n;var C=o.len(),I=o.data;e===s.C&&(v+=i-I[C-4],y+=n-I[C-3]),h=s.C,T=f[m++],M=f[m++],i=f[m++],n=f[m++],o.addData(h,v,y,T,M,i,n);break;case"s":v=i,y=n;C=o.len(),I=o.data;e===s.C&&(v+=i-I[C-4],y+=n-I[C-3]),h=s.C,T=i+f[m++],M=n+f[m++],i+=f[m++],n+=f[m++],o.addData(h,v,y,T,M,i,n);break;case"Q":T=f[m++],M=f[m++],i=f[m++],n=f[m++],h=s.Q,o.addData(h,T,M,i,n);break;case"q":T=f[m++]+i,M=f[m++]+n,i+=f[m++],n+=f[m++],h=s.Q,o.addData(h,T,M,i,n);break;case"T":v=i,y=n;C=o.len(),I=o.data;e===s.Q&&(v+=i-I[C-4],y+=n-I[C-3]),i=f[m++],n=f[m++],h=s.Q,o.addData(h,v,y,i,n);break;case"t":v=i,y=n;C=o.len(),I=o.data;e===s.Q&&(v+=i-I[C-4],y+=n-I[C-3]),i+=f[m++],n+=f[m++],h=s.Q,o.addData(h,v,y,i,n);break;case"A":_=f[m++],x=f[m++],b=f[m++],w=f[m++],S=f[m++],Ko(T=i,M=n,i=f[m++],n=f[m++],w,S,_,x,b,h=s.A,o);break;case"a":_=f[m++],x=f[m++],b=f[m++],w=f[m++],S=f[m++],Ko(T=i,M=n,i+=f[m++],n+=f[m++],w,S,_,x,b,h=s.A,o)}}"z"!==d&&"Z"!==d||(h=s.Z,o.addData(h),i=r,n=a),e=h}return o.toStatic(),o}(t);return(e=e||{}).buildPath=function(t){if(t.setData){t.setData(i.data),(e=t.getContext())&&t.rebuildPath(e)}else{var e=t;i.rebuildPath(e)}},e.applyTransform=function(t){Go(i,t),this.dirty(!0)},e}var es={createFromString:function(t,e){return new zo(ts(t,e))},extendFromString:function(t,e){return zo.extend(ts(t,e))},mergePath:function(t,e){for(var i=[],n=t.length,r=0;r<n;r++){var a=t[r];a.path||a.createPathProxy(),a.__dirtyPath&&a.buildPath(a.path,a.shape,!0),i.push(a.path)}var o=new zo(e);return o.createPathProxy(),o.buildPath=function(t){t.appendPath(i);var e=t.getContext();e&&t.rebuildPath(e)},o}},is=Yi.ContextCachedBy,ns=function(t){yr.call(this,t)};ns.prototype={constructor:ns,type:"text",brush:function(t,e){var i=this.style;this.__dirty&&dr.normalizeTextStyle(i,!0),i.fill=i.stroke=i.shadowBlur=i.shadowColor=i.shadowOffsetX=i.shadowOffsetY=null;var n=i.text;null!=n&&(n+=""),dr.needDrawText(n,i)?(this.setTransform(t),dr.renderText(this,t,n,i,null,e),this.restoreTransform(t)):t.__attrCachedBy=is.NONE},getBoundingRect:function(){var t=this.style;if(this.__dirty&&dr.normalizeTextStyle(t,!0),!this._rect){var e=t.text;null!=e?e+="":e="";var i=Bn.getBoundingRect(t.text+"",t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich);if(i.x+=t.x||0,i.y+=t.y||0,dr.getStroke(t.textStroke,t.textStrokeWidth)){var n=t.textStrokeWidth;i.x-=n/2,i.y-=n/2,i.width+=n,i.height+=n}this._rect=i}return this._rect}},yt.inherits(ns,yr);var rs=ns,as=zo.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,i){i&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI,!0)}}),os=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]];var ss=function(t){return q.browser.ie&&q.browser.version>=11?function(){var e,i=this.__clipPaths,n=this.style;if(i)for(var r=0;r<i.length;r++){var a=i[r],o=a&&a.shape,s=a&&a.type;if(o&&("sector"===s&&o.startAngle===o.endAngle||"rect"===s&&(!o.width||!o.height))){for(var l=0;l<os.length;l++)os[l][2]=n[os[l][0]],n[os[l][0]]=os[l][1];e=!0;break}}if(t.apply(this,arguments),e)for(l=0;l<os.length;l++)n[os[l][0]]=os[l][2]}:t},ls=zo.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:ss(zo.prototype.brush),buildPath:function(t,e){var i=e.cx,n=e.cy,r=Math.max(e.r0||0,0),a=Math.max(e.r,0),o=e.startAngle,s=e.endAngle,l=e.clockwise,u=Math.cos(o),h=Math.sin(o);t.moveTo(u*r+i,h*r+n),t.lineTo(u*a+i,h*a+n),t.arc(i,n,a,o,s,!l),t.lineTo(Math.cos(s)*r+i,Math.sin(s)*r+n),0!==r&&t.arc(i,n,r,s,o,l),t.closePath()}}),us=zo.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=2*Math.PI;t.moveTo(i+e.r,n),t.arc(i,n,e.r,0,r,!1),t.moveTo(i+e.r0,n),t.arc(i,n,e.r0,0,r,!0)}}),hs=Tt.distance;function cs(t,e,i,n,r,a,o){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*o+(-3*(e-i)-2*s-l)*a+s*r+e}var ds=function(t,e){for(var i=t.length,n=[],r=0,a=1;a<i;a++)r+=hs(t[a-1],t[a]);var o=r/2;for(o=o<i?i:o,a=0;a<o;a++){var s,l,u,h=a/(o-1)*(e?i:i-1),c=Math.floor(h),d=h-c,f=t[c%i];e?(s=t[(c-1+i)%i],l=t[(c+1)%i],u=t[(c+2)%i]):(s=t[0===c?c:c-1],l=t[c>i-2?i-1:c+1],u=t[c>i-3?i-1:c+2]);var p=d*d,g=d*p;n.push([cs(s[0],f[0],l[0],u[0],d,p,g),cs(s[1],f[1],l[1],u[1],d,p,g)])}return n},fs=Tt.min,ps=Tt.max,gs=Tt.scale,ms=Tt.distance,vs=Tt.add,ys=Tt.clone,_s=Tt.sub;var xs=function(t,e,i,n){var r,a,o,s,l=[],u=[],h=[],c=[];if(n){o=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=t.length;d<f;d++)fs(o,o,t[d]),ps(s,s,t[d]);fs(o,o,n[0]),ps(s,s,n[1])}for(d=0,f=t.length;d<f;d++){var p=t[d];if(i)r=t[d?d-1:f-1],a=t[(d+1)%f];else{if(0===d||d===f-1){l.push(ys(t[d]));continue}r=t[d-1],a=t[d+1]}_s(u,a,r),gs(u,u,e);var g=ms(p,r),m=ms(p,a),v=g+m;0!==v&&(g/=v,m/=v),gs(h,u,-g),gs(c,u,m);var y=vs([],p,h),_=vs([],p,c);n&&(ps(y,y,o),fs(y,y,s),ps(_,_,o),fs(_,_,s)),l.push(y),l.push(_)}return i&&l.push(l.shift()),l};var bs={buildPath:function(t,e,i){var n=e.points,r=e.smooth;if(n&&n.length>=2){if(r&&"spline"!==r){var a=xs(n,r,i,e.smoothConstraint);t.moveTo(n[0][0],n[0][1]);for(var o=n.length,s=0;s<(i?o:o-1);s++){var l=a[2*s],u=a[2*s+1],h=n[(s+1)%o];t.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{"spline"===r&&(n=ds(n,i)),t.moveTo(n[0][0],n[0][1]);s=1;for(var c=n.length;s<c;s++)t.lineTo(n[s][0],n[s][1])}i&&t.closePath()}}},ws=zo.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){bs.buildPath(t,e,!0)}}),Ss=zo.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){bs.buildPath(t,e,!1)}}),Ts=Math.round;function Ms(t,e,i){if(!e)return t;var n=Ts(2*t);return(n+Ts(e))%2==0?n/2:(n+(i?1:-1))/2}var Cs={subPixelOptimizeLine:function(t,e,i){if(e){var n=e.x1,r=e.x2,a=e.y1,o=e.y2;t.x1=n,t.x2=r,t.y1=a,t.y2=o;var s=i&&i.lineWidth;s&&(Ts(2*n)===Ts(2*r)&&(t.x1=t.x2=Ms(n,s,!0)),Ts(2*a)===Ts(2*o)&&(t.y1=t.y2=Ms(a,s,!0)))}},subPixelOptimizeRect:function(t,e,i){if(e){var n=e.x,r=e.y,a=e.width,o=e.height;t.x=n,t.y=r,t.width=a,t.height=o;var s=i&&i.lineWidth;s&&(t.x=Ms(n,s,!0),t.y=Ms(r,s,!0),t.width=Math.max(Ms(n+a,s,!1)-t.x,0===a?0:1),t.height=Math.max(Ms(r+o,s,!1)-t.y,0===o?0:1))}},subPixelOptimize:Ms},Is=Cs.subPixelOptimizeRect,As={},Ds=zo.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var i,n,r,a;this.subPixelOptimize?(Is(As,e,this.style),i=As.x,n=As.y,r=As.width,a=As.height,As.r=e.r,e=As):(i=e.x,n=e.y,r=e.width,a=e.height),e.r?zn.buildPath(t,e):t.rect(i,n,r,a),t.closePath()}}),ks=Cs.subPixelOptimizeLine,Os={},Ps=zo.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i,n,r,a;this.subPixelOptimize?(ks(Os,e,this.style),i=Os.x1,n=Os.y1,r=Os.x2,a=Os.y2):(i=e.x1,n=e.y1,r=e.x2,a=e.y2);var o=e.percent;0!==o&&(t.moveTo(i,n),o<1&&(r=i*(1-o)+r*o,a=n*(1-o)+a*o),t.lineTo(r,a))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),Ls=Fa.quadraticSubdivide,Rs=Fa.cubicSubdivide,Es=Fa.quadraticAt,Bs=Fa.cubicAt,zs=Fa.quadraticDerivativeAt,Ns=Fa.cubicDerivativeAt,Fs=[];function Hs(t,e,i){var n=t.cpx2,r=t.cpy2;return null===n||null===r?[(i?Ns:Bs)(t.x1,t.cpx1,t.cpx2,t.x2,e),(i?Ns:Bs)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(i?zs:Es)(t.x1,t.cpx1,t.x2,e),(i?zs:Es)(t.y1,t.cpy1,t.y2,e)]}var Vs=zo.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.x1,n=e.y1,r=e.x2,a=e.y2,o=e.cpx1,s=e.cpy1,l=e.cpx2,u=e.cpy2,h=e.percent;0!==h&&(t.moveTo(i,n),null==l||null==u?(h<1&&(Ls(i,o,r,h,Fs),o=Fs[1],r=Fs[2],Ls(n,s,a,h,Fs),s=Fs[1],a=Fs[2]),t.quadraticCurveTo(o,s,r,a)):(h<1&&(Rs(i,o,l,r,h,Fs),o=Fs[1],l=Fs[2],r=Fs[3],Rs(n,s,u,a,h,Fs),s=Fs[1],u=Fs[2],a=Fs[3]),t.bezierCurveTo(o,s,l,u,r,a)))},pointAt:function(t){return Hs(this.shape,t,!1)},tangentAt:function(t){var e=Hs(this.shape,t,!0);return Tt.normalize(e,e)}}),Ws=zo.extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.cx,n=e.cy,r=Math.max(e.r,0),a=e.startAngle,o=e.endAngle,s=e.clockwise,l=Math.cos(a),u=Math.sin(a);t.moveTo(l*r+i,u*r+n),t.arc(i,n,r,a,o,!s)}}),Gs=zo.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,i=0;i<e.length;i++)t=t||e[i].__dirtyPath;this.__dirtyPath=t,this.__dirty=this.__dirty||t},beforeBrush:function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),i=0;i<t.length;i++)t[i].path||t[i].createPathProxy(),t[i].path.setScale(e[0],e[1],t[i].segmentIgnoreThreshold)},buildPath:function(t,e){for(var i=e.paths||[],n=0;n<i.length;n++)i[n].buildPath(t,i[n].shape,!0)},afterBrush:function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),zo.prototype.getBoundingRect.call(this)}}),Us=function(t){this.colorStops=t||[]};Us.prototype={constructor:Us,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}};var Ys=Us,js=function(t,e,i,n,r,a){this.x=null==t?0:t,this.y=null==e?0:e,this.x2=null==i?1:i,this.y2=null==n?0:n,this.type="linear",this.global=a||!1,Ys.call(this,r)};js.prototype={constructor:js},yt.inherits(js,Ys);var Xs=js,qs=function(t,e,i,n,r){this.x=null==t?.5:t,this.y=null==e?.5:e,this.r=null==i?.5:i,this.type="radial",this.global=r||!1,Ys.call(this,n)};qs.prototype={constructor:qs},yt.inherits(qs,Ys);var Zs=qs,$s=yt.inherits;function Ks(t){yr.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}Ks.prototype.incremental=!0,Ks.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},Ks.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.dirty()},Ks.prototype.addDisplayables=function(t,e){e=e||!1;for(var i=0;i<t.length;i++)this.addDisplayable(t[i],e)},Ks.prototype.eachPendingDisplayable=function(t){for(var e=this._cursor;e<this._displayables.length;e++)t&&t(this._displayables[e]);for(e=0;e<this._temporaryDisplayables.length;e++)t&&t(this._temporaryDisplayables[e])},Ks.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){(e=this._displayables[t]).parent=this,e.update(),e.parent=null}for(t=0;t<this._temporaryDisplayables.length;t++){var e;(e=this._temporaryDisplayables[t]).parent=this,e.update(),e.parent=null}},Ks.prototype.brush=function(t,e){for(var i=this._cursor;i<this._displayables.length;i++){(n=this._displayables[i]).beforeBrush&&n.beforeBrush(t),n.brush(t,i===this._cursor?null:this._displayables[i-1]),n.afterBrush&&n.afterBrush(t)}this._cursor=i;for(i=0;i<this._temporaryDisplayables.length;i++){var n;(n=this._temporaryDisplayables[i]).beforeBrush&&n.beforeBrush(t),n.brush(t,0===i?null:this._temporaryDisplayables[i-1]),n.afterBrush&&n.afterBrush(t)}this._temporaryDisplayables=[],this.notClear=!0};var Qs=[];Ks.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new Oi(1/0,1/0,-1/0,-1/0),e=0;e<this._displayables.length;e++){var i=this._displayables[e],n=i.getBoundingRect().clone();i.needLocalTransform()&&n.applyTransform(i.getLocalTransform(Qs)),t.union(n)}this._rect=t}return this._rect},Ks.prototype.contain=function(t,e){var i=this.transformCoordToLocal(t,e);if(this.getBoundingRect().contain(i[0],i[1]))for(var n=0;n<this._displayables.length;n++){if(this._displayables[n].contain(t,e))return!0}return!1},$s(Ks,yr);var Js=Ks,tl=xr,el=Li,il=rs,nl=as,rl=ls,al=us,ol=ws,sl=Ss,ll=Ds,ul=Ps,hl=Vs,cl=Ws,dl=Gs,fl=Xs,pl=Zs,gl=Oi,ml=Js,vl=Math.max,yl=Math.min,_l={},xl=1,bl={},wl={};function Sl(t,e){wl[t]=e}function Tl(t,e,i,n){var r=es.createFromString(t,e);return i&&("center"===n&&(i=Ml(i,r.getBoundingRect())),Il(r,i)),r}function Ml(t,e){var i,n=e.width/e.height,r=t.height*n;return i=r<=t.width?t.height:(r=t.width)/n,{x:t.x+t.width/2-r/2,y:t.y+t.height/2-i/2,width:r,height:i}}var Cl=es.mergePath;function Il(t,e){if(t.applyTransform){var i=t.getBoundingRect().calculateTransform(e);t.applyTransform(i)}}var Al=Cs.subPixelOptimize;function Dl(t){return null!=t&&"none"!==t}var kl=yt.createHashMap(),Ol=0;function Pl(t){var e=t.__hoverStl;if(e&&!t.__highlighted){var i=t.__zr,n=t.useHoverLayer&&i&&"canvas"===i.painter.type;if(t.__highlighted=n?"layer":"plain",!(t.isGroup||!i&&t.useHoverLayer)){var r=t,a=t.style;n&&(a=(r=i.addHover(t)).style),ql(a),n||function(t){if(t.__hoverStlDirty){t.__hoverStlDirty=!1;var e=t.__hoverStl;if(e){var i=t.__cachedNormalStl={};t.__cachedNormalZ2=t.z2;var n=t.style;for(var r in e)null!=e[r]&&(i[r]=n[r]);i.fill=n.fill,i.stroke=n.stroke}else t.__cachedNormalStl=t.__cachedNormalZ2=null}}(r),a.extendFrom(e),Ll(a,e,"fill"),Ll(a,e,"stroke"),Xl(a),n||(t.dirty(!1),t.z2+=1)}}}function Ll(t,e,i){!Dl(e[i])&&Dl(t[i])&&(t[i]=function(t){if("string"!=typeof t)return t;var e=kl.get(t);return e||(e=je.lift(t,-.1),Ol<1e4&&(kl.set(t,e),Ol++)),e}(t[i]))}function Rl(t){var e=t.__highlighted;if(e&&(t.__highlighted=!1,!t.isGroup))if("layer"===e)t.__zr&&t.__zr.removeHover(t);else{var i=t.style,n=t.__cachedNormalStl;n&&(ql(i),t.setStyle(n),Xl(i));var r=t.__cachedNormalZ2;null!=r&&t.z2-r==1&&(t.z2=r)}}function El(t,e,i){var n,r="normal",a="normal";t.__highlighted&&(r="emphasis",n=!0),e(t,i),t.__highlighted&&(a="emphasis",n=!0),t.isGroup&&t.traverse((function(t){!t.isGroup&&e(t,i)})),n&&t.__highDownOnUpdate&&t.__highDownOnUpdate(r,a)}function Bl(t,e){e=t.__hoverStl=!1!==e&&(t.hoverStyle||e||{}),t.__hoverStlDirty=!0,t.__highlighted&&(t.__cachedNormalStl=null,Rl(t),Pl(t))}function zl(t){!Vl(this,t)&&!this.__highByOuter&&El(this,Pl)}function Nl(t){!Vl(this,t)&&!this.__highByOuter&&El(this,Rl)}function Fl(t){this.__highByOuter|=1<<(t||0),El(this,Pl)}function Hl(t){!(this.__highByOuter&=~(1<<(t||0)))&&El(this,Rl)}function Vl(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function Wl(t,e){var i=!1===e;if(t.__highDownSilentOnTouch=t.highDownSilentOnTouch,t.__highDownOnUpdate=t.highDownOnUpdate,!i||t.__highDownDispatcher){var n=i?"off":"on";t[n]("mouseover",zl)[n]("mouseout",Nl),t[n]("emphasis",Fl)[n]("normal",Hl),t.__highByOuter=t.__highByOuter||0,t.__highDownDispatcher=!i}}function Gl(t,e,i,n,r){return Ul(t,e,n,r),i&&yt.extend(t,i),t}function Ul(t,e,i,n){if((i=i||_l).isRectText){var r;i.getTextPosition?r=i.getTextPosition(e,n):"outside"===(r=e.getShallow("position")||(n?null:"inside"))&&(r="top"),t.textPosition=r,t.textOffset=e.getShallow("offset");var a=e.getShallow("rotate");null!=a&&(a*=Math.PI/180),t.textRotation=a,t.textDistance=yt.retrieve2(e.getShallow("distance"),n?null:5)}var o,s=e.ecModel,l=s&&s.option.textStyle,u=function(t){var e;for(;t&&t!==t.ecModel;){var i=(t.option||_l).rich;if(i)for(var n in e=e||{},i)i.hasOwnProperty(n)&&(e[n]=1);t=t.parentModel}return e}(e);if(u)for(var h in o={},u)if(u.hasOwnProperty(h)){var c=e.getModel(["rich",h]);Yl(o[h]={},c,l,i,n)}return t.rich=o,Yl(t,e,l,i,n,!0),i.forceRich&&!i.textStyle&&(i.textStyle={}),t}function Yl(t,e,i,n,r,a){i=!r&&i||_l,t.textFill=jl(e.getShallow("color"),n)||i.color,t.textStroke=jl(e.getShallow("textBorderColor"),n)||i.textBorderColor,t.textStrokeWidth=yt.retrieve2(e.getShallow("textBorderWidth"),i.textBorderWidth),r||(a&&(t.insideRollbackOpt=n,Xl(t)),null==t.textFill&&(t.textFill=n.autoColor)),t.fontStyle=e.getShallow("fontStyle")||i.fontStyle,t.fontWeight=e.getShallow("fontWeight")||i.fontWeight,t.fontSize=e.getShallow("fontSize")||i.fontSize,t.fontFamily=e.getShallow("fontFamily")||i.fontFamily,t.textAlign=e.getShallow("align"),t.textVerticalAlign=e.getShallow("verticalAlign")||e.getShallow("baseline"),t.textLineHeight=e.getShallow("lineHeight"),t.textWidth=e.getShallow("width"),t.textHeight=e.getShallow("height"),t.textTag=e.getShallow("tag"),a&&n.disableBox||(t.textBackgroundColor=jl(e.getShallow("backgroundColor"),n),t.textPadding=e.getShallow("padding"),t.textBorderColor=jl(e.getShallow("borderColor"),n),t.textBorderWidth=e.getShallow("borderWidth"),t.textBorderRadius=e.getShallow("borderRadius"),t.textBoxShadowColor=e.getShallow("shadowColor"),t.textBoxShadowBlur=e.getShallow("shadowBlur"),t.textBoxShadowOffsetX=e.getShallow("shadowOffsetX"),t.textBoxShadowOffsetY=e.getShallow("shadowOffsetY")),t.textShadowColor=e.getShallow("textShadowColor")||i.textShadowColor,t.textShadowBlur=e.getShallow("textShadowBlur")||i.textShadowBlur,t.textShadowOffsetX=e.getShallow("textShadowOffsetX")||i.textShadowOffsetX,t.textShadowOffsetY=e.getShallow("textShadowOffsetY")||i.textShadowOffsetY}function jl(t,e){return"auto"!==t?t:e&&e.autoColor?e.autoColor:null}function Xl(t){var e,i=t.textPosition,n=t.insideRollbackOpt;if(n&&null==t.textFill){var r=n.autoColor,a=n.isRectText,o=n.useInsideStyle,s=!1!==o&&(!0===o||a&&i&&"string"==typeof i&&i.indexOf("inside")>=0),l=!s&&null!=r;(s||l)&&(e={textFill:t.textFill,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth}),s&&(t.textFill="#fff",null==t.textStroke&&(t.textStroke=r,null==t.textStrokeWidth&&(t.textStrokeWidth=2))),l&&(t.textFill=r)}t.insideRollback=e}function ql(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function Zl(t,e,i,n,r,a){if("function"==typeof r&&(a=r,r=null),n&&n.isAnimationEnabled()){var o=t?"Update":"",s=n.getShallow("animationDuration"+o),l=n.getShallow("animationEasing"+o),u=n.getShallow("animationDelay"+o);"function"==typeof u&&(u=u(r,n.getAnimationDelayParams?n.getAnimationDelayParams(e,r):null)),"function"==typeof s&&(s=s(r)),s>0?e.animateTo(i,s,u||0,l,a,!!a):(e.stopAnimation(),e.attr(i),a&&a())}else e.stopAnimation(),e.attr(i),a&&a()}function $l(t,e,i,n,r){Zl(!0,t,e,i,n,r)}function Kl(t,e,i){return e&&!yt.isArrayLike(e)&&(e=ye.getLocalTransform(e)),i&&(e=he.invert([],e)),Tt.applyTransform([],t,e)}function Ql(t,e,i,n,r,a,o,s){var l,u=i-t,h=n-e,c=o-r,d=s-a,f=Jl(c,d,u,h);if((l=f)<=1e-6&&l>=-1e-6)return!1;var p=t-r,g=e-a,m=Jl(p,g,u,h)/f;if(m<0||m>1)return!1;var v=Jl(p,g,c,d)/f;return!(v<0||v>1)}function Jl(t,e,i,n){return t*n-i*e}Sl("circle",as),Sl("sector",ls),Sl("ring",us),Sl("polygon",ws),Sl("polyline",Ss),Sl("rect",Ds),Sl("line",Ps),Sl("bezierCurve",Vs),Sl("arc",Ws);var tu={Image:tl,Group:el,Text:il,Circle:nl,Sector:rl,Ring:al,Polygon:ol,Polyline:sl,Rect:ll,Line:ul,BezierCurve:hl,Arc:cl,CompoundPath:dl,LinearGradient:fl,RadialGradient:pl,BoundingRect:gl,IncrementalDisplayable:ml,Z2_EMPHASIS_LIFT:1,CACHED_LABEL_STYLE_PROPERTIES:{color:"textFill",textBorderColor:"textStroke",textBorderWidth:"textStrokeWidth"},extendShape:function(t){return zo.extend(t)},extendPath:function(t,e){return es.extendFromString(t,e)},registerShape:Sl,getShapeClass:function(t){if(wl.hasOwnProperty(t))return wl[t]},makePath:Tl,makeImage:function(t,e,i){var n=new xr({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===i){var r={width:t.width,height:t.height};n.setStyle(Ml(e,r))}}});return n},mergePath:Cl,resizePath:Il,subPixelOptimizeLine:function(t){return Cs.subPixelOptimizeLine(t.shape,t.shape,t.style),t},subPixelOptimizeRect:function(t){return Cs.subPixelOptimizeRect(t.shape,t.shape,t.style),t},subPixelOptimize:Al,setElementHoverStyle:Bl,setHoverStyle:function(t,e){Wl(t,!0),El(t,Bl,e)},setAsHighDownDispatcher:Wl,isHighDownDispatcher:function(t){return!(!t||!t.__highDownDispatcher)},getHighlightDigit:function(t){var e=bl[t];return null==e&&xl<=32&&(e=bl[t]=xl++),e},setLabelStyle:function(t,e,i,n,r,a,o){var s,l=(r=r||_l).labelFetcher,u=r.labelDataIndex,h=r.labelDimIndex,c=r.labelProp,d=i.getShallow("show"),f=n.getShallow("show");(d||f)&&(l&&(s=l.getFormattedLabel(u,"normal",null,h,c)),null==s&&(s=yt.isFunction(r.defaultText)?r.defaultText(u,r):r.defaultText));var p=d?s:null,g=f?yt.retrieve2(l?l.getFormattedLabel(u,"emphasis",null,h,c):null,s):null;null==p&&null==g||(Gl(t,i,a,r),Gl(e,n,o,r,!0)),t.text=p,e.text=g},modifyLabelStyle:function(t,e,i){var n=t.style;e&&(ql(n),t.setStyle(e),Xl(n)),n=t.__hoverStl,i&&n&&(ql(n),yt.extend(n,i),Xl(n))},setTextStyle:Gl,setText:function(t,e,i){var n,r={isRectText:!0};!1===i?n=!0:r.autoColor=i,Ul(t,e,r,n)},getFont:function(t,e){var i=e&&e.getModel("textStyle");return yt.trim([t.fontStyle||i&&i.getShallow("fontStyle")||"",t.fontWeight||i&&i.getShallow("fontWeight")||"",(t.fontSize||i&&i.getShallow("fontSize")||12)+"px",t.fontFamily||i&&i.getShallow("fontFamily")||"sans-serif"].join(" "))},updateProps:$l,initProps:function(t,e,i,n,r){Zl(!1,t,e,i,n,r)},getTransform:function(t,e){for(var i=he.identity([]);t&&t!==e;)he.mul(i,t.getLocalTransform(),i),t=t.parent;return i},applyTransform:Kl,transformDirection:function(t,e,i){var n=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),r=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),a=["left"===t?-n:"right"===t?n:0,"top"===t?-r:"bottom"===t?r:0];return a=Kl(a,e,i),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"},groupTransition:function(t,e,i,n){if(t&&e){var r,a=(r={},t.traverse((function(t){!t.isGroup&&t.anid&&(r[t.anid]=t)})),r);e.traverse((function(t){if(!t.isGroup&&t.anid){var e=a[t.anid];if(e){var n=o(t);t.attr(o(e)),$l(t,n,i,t.dataIndex)}}}))}function o(t){var e={position:Tt.clone(t.position),rotation:t.rotation};return t.shape&&(e.shape=yt.extend({},t.shape)),e}},clipPointsByRect:function(t,e){return yt.map(t,(function(t){var i=t[0];i=vl(i,e.x),i=yl(i,e.x+e.width);var n=t[1];return n=vl(n,e.y),[i,n=yl(n,e.y+e.height)]}))},clipRectByRect:function(t,e){var i=vl(t.x,e.x),n=yl(t.x+t.width,e.x+e.width),r=vl(t.y,e.y),a=yl(t.y+t.height,e.y+e.height);if(n>=i&&a>=r)return{x:i,y:r,width:n-i,height:a-r}},createIcon:function(t,e,i){var n=(e=yt.extend({rectHover:!0},e)).style={strokeNoScale:!0};if(i=i||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(n.image=t.slice(8),yt.defaults(n,i),new xr(e)):Tl(t.replace("path://",""),e,i,"center")},linePolygonIntersect:function(t,e,i,n,r){for(var a=0,o=r[r.length-1];a<r.length;a++){var s=r[a];if(Ql(t,e,i,n,s[0],s[1],o[0],o[1]))return!0;o=s}},lineLineIntersect:Ql},eu=["textStyle","color"],iu={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(eu):null)},getFont:function(){return tu.getFont({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return Bn.getBoundingRect(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("lineHeight"),this.getShallow("rich"),this.getShallow("truncateText"))}},nu=wa([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),ru={getItemStyle:function(t,e){var i=nu(this,t,e),n=this.getBorderLineDash();return n&&(i.lineDash=n),i},getBorderLineDash:function(){var t=this.get("borderType");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}},au=ga.makeInner,ou=ba.enableClassExtend,su=ba.enableClassCheck,lu=yt.mixin,uu=au();function hu(t,e,i){this.parentModel=e,this.ecModel=i,this.option=t}function cu(t,e,i){for(var n=0;n<e.length&&(!e[n]||null!=(t=t&&"object"==typeof t?t[e[n]]:null));n++);return null==t&&i&&(t=i.get(e)),t}function du(t,e){var i=uu(t).getParent;return i?i.call(t,e):t.parentModel}hu.prototype={constructor:hu,init:null,mergeOption:function(t){yt.merge(this.option,t,!0)},get:function(t,e){return null==t?this.option:cu(this.option,this.parsePath(t),!e&&du(this,t))},getShallow:function(t,e){var i=this.option,n=null==i?i:i[t],r=!e&&du(this,t);return null==n&&r&&(n=r.getShallow(t)),n},getModel:function(t,e){var i;return new hu(null==t?this.option:cu(this.option,t=this.parsePath(t)),e=e||(i=du(this,t))&&i.getModel(t),this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new(0,this.constructor)(yt.clone(this.option))},setReadOnly:function(t){},parsePath:function(t){return"string"==typeof t&&(t=t.split(".")),t},customizeGetParent:function(t){uu(this).getParent=t},isAnimationEnabled:function(){if(!q.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},ou(hu),su(hu),lu(hu,Ta),lu(hu,Ca),lu(hu,iu),lu(hu,ru);var fu=hu,pu=ba.parseClassType,gu=0;var mu={getUID:function(t){return[t||"",gu++,Math.random().toFixed(5)].join("_")},enableSubTypeDefaulter:function(t){var e={};return t.registerSubTypeDefaulter=function(t,i){t=pu(t),e[t.main]=i},t.determineSubType=function(i,n){var r=n.type;if(!r){var a=pu(i).main;t.hasSubTypes(i)&&e[a]&&(r=e[a](n))}return r},t},enableTopologicalTravel:function(t,e){function i(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}t.topologicalTravel=function(t,n,r,a){if(t.length){var o=function(t){var n={},r=[];return yt.each(t,(function(a){var o=i(n,a),s=function(t,e){var i=[];return yt.each(t,(function(t){yt.indexOf(e,t)>=0&&i.push(t)})),i}(o.originalDeps=e(a),t);o.entryCount=s.length,0===o.entryCount&&r.push(a),yt.each(s,(function(t){yt.indexOf(o.predecessor,t)<0&&o.predecessor.push(t);var e=i(n,t);yt.indexOf(e.successor,t)<0&&e.successor.push(a)}))})),{graph:n,noEntryList:r}}(n),s=o.graph,l=o.noEntryList,u={};for(yt.each(t,(function(t){u[t]=!0}));l.length;){var h=l.pop(),c=s[h],d=!!u[h];d&&(r.call(a,h,c.originalDeps.slice()),delete u[h]),yt.each(c.successor,d?p:f)}yt.each(u,(function(){throw new Error("Circle dependency may exists")}))}function f(t){s[t].entryCount--,0===s[t].entryCount&&l.push(t)}function p(t){u[t]=!0,f(t)}}}};var vu=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function yu(t){if(0===t)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return t/Math.pow(10,e)>=10&&e++,e}var _u={linearMap:function(t,e,i,n){var r=e[1]-e[0],a=i[1]-i[0];if(0===r)return 0===a?i[0]:(i[0]+i[1])/2;if(n)if(r>0){if(t<=e[0])return i[0];if(t>=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/r*a+i[0]},parsePercent:function(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?(i=t,i.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var i},round:function(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),i?t:+t},asc:function(t){return t.sort((function(t,e){return t-e})),t},getPrecision:function(t){if(t=+t,isNaN(t))return 0;for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i},getPrecisionSafe:function(t){var e=t.toString(),i=e.indexOf("e");if(i>0){var n=+e.slice(i+1);return n<0?-n:0}var r=e.indexOf(".");return r<0?0:e.length-1-r},getPixelPrecision:function(t,e){var i=Math.log,n=Math.LN10,r=Math.floor(i(t[1]-t[0])/n),a=Math.round(i(Math.abs(e[1]-e[0]))/n),o=Math.min(Math.max(-r+a,0),20);return isFinite(o)?o:20},getPercentWithPrecision:function(t,e,i){if(!t[e])return 0;var n=yt.reduce(t,(function(t,e){return t+(isNaN(e)?0:e)}),0);if(0===n)return 0;for(var r=Math.pow(10,i),a=yt.map(t,(function(t){return(isNaN(t)?0:t)/n*r*100})),o=100*r,s=yt.map(a,(function(t){return Math.floor(t)})),l=yt.reduce(s,(function(t,e){return t+e}),0),u=yt.map(a,(function(t,e){return t-s[e]}));l<o;){for(var h=Number.NEGATIVE_INFINITY,c=null,d=0,f=u.length;d<f;++d)u[d]>h&&(h=u[d],c=d);++s[c],u[c]=0,++l}return s[e]/r},MAX_SAFE_INTEGER:9007199254740991,remRadian:function(t){var e=2*Math.PI;return(t%e+e)%e},isRadianAroundZero:function(t){return t>-1e-4&&t<1e-4},parseDate:function(t){if(t instanceof Date)return t;if("string"==typeof t){var e=vu.exec(t);if(!e)return new Date(NaN);if(e[8]){var i=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(i-=e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,i,+(e[5]||0),+e[6]||0,+e[7]||0))}return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0)}return null==t?new Date(NaN):new Date(Math.round(t))},quantity:function(t){return Math.pow(10,yu(t))},quantityExponent:yu,nice:function(t,e){var i=yu(t),n=Math.pow(10,i),r=t/n;return t=(e?r<1.5?1:r<2.5?2:r<4?3:r<7?5:10:r<1?1:r<2?2:r<3?3:r<5?5:10)*n,i>=-20?+t.toFixed(i<0?-i:0):t},quantile:function(t,e){var i=(t.length-1)*e+1,n=Math.floor(i),r=+t[n-1],a=i-n;return a?r+a*(t[n]-r):r},reformIntervals:function(t){t.sort((function(t,e){return function t(e,i,n){return e.interval[n]<i.interval[n]||e.interval[n]===i.interval[n]&&(e.close[n]-i.close[n]==(n?-1:1)||!n&&t(e,i,1))}(t,e,0)?-1:1}));for(var e=-1/0,i=1,n=0;n<t.length;){for(var r=t[n].interval,a=t[n].close,o=0;o<2;o++)r[o]<=e&&(r[o]=e,a[o]=o?1:1-i),e=r[o],i=a[o];r[0]===r[1]&&a[0]*a[1]!=1?t.splice(n,1):n++}return t},isNumeric:function(t){return t-parseFloat(t)>=0}};var xu=yt.normalizeCssArray,bu=/([&<>"'])/g,wu={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Su(t){return null==t?"":(t+"").replace(bu,(function(t,e){return wu[e]}))}var Tu=["a","b","c","d","e","f","g"],Mu=function(t,e){return"{"+t+(null==e?"":e)+"}"};function Cu(t,e){return"0000".substr(0,e-(t+="").length)+t}var Iu={addCommas:function(t){return isNaN(t)?"-":(t=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")},toCamelCase:function(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,(function(t,e){return e.toUpperCase()})),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t},normalizeCssArray:xu,encodeHTML:Su,formatTpl:function(t,e,i){yt.isArray(e)||(e=[e]);var n=e.length;if(!n)return"";for(var r=e[0].$vars||[],a=0;a<r.length;a++){var o=Tu[a];t=t.replace(Mu(o),Mu(o,0))}for(var s=0;s<n;s++)for(var l=0;l<r.length;l++){var u=e[s][r[l]];t=t.replace(Mu(Tu[l],s),i?Su(u):u)}return t},formatTplSimple:function(t,e,i){return yt.each(e,(function(e,n){t=t.replace("{"+n+"}",i?Su(e):e)})),t},getTooltipMarker:function(t,e){var i=(t=yt.isString(t)?{color:t,extraCssText:e}:t||{}).color,n=t.type,r=(e=t.extraCssText,t.renderMode||"html"),a=t.markerId||"X";return i?"html"===r?"subItem"===n?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Su(i)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+Su(i)+";"+(e||"")+'"></span>':{renderMode:r,content:"{marker"+a+"|}  ",style:{color:i}}:""},formatTime:function(t,e,i){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var n=_u.parseDate(e),r=i?"UTC":"",a=n["get"+r+"FullYear"](),o=n["get"+r+"Month"]()+1,s=n["get"+r+"Date"](),l=n["get"+r+"Hours"](),u=n["get"+r+"Minutes"](),h=n["get"+r+"Seconds"](),c=n["get"+r+"Milliseconds"]();return t=t.replace("MM",Cu(o,2)).replace("M",o).replace("yyyy",a).replace("yy",a%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(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t},truncateText:Bn.truncateText,getTextBoundingRect:function(t){return Bn.getBoundingRect(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)},getTextRect:function(t,e,i,n,r,a,o,s){return Bn.getBoundingRect(t,e,i,n,r,s,a,o)},windowOpen:function(t,e){if("_blank"===e||"blank"===e){var i=window.open();i.opener=null,i.location=t}else window.open(t,e)}},Au=_u.parsePercent,Du=yt.each,ku=["left","right","top","bottom","width","height"],Ou=[["width","left","right"],["height","top","bottom"]];function Pu(t,e,i,n,r){var a=0,o=0;null==n&&(n=1/0),null==r&&(r=1/0);var s=0;e.eachChild((function(l,u){var h,c,d=l.position,f=l.getBoundingRect(),p=e.childAt(u+1),g=p&&p.getBoundingRect();if("horizontal"===t){var m=f.width+(g?-g.x+f.x:0);(h=a+m)>n||l.newline?(a=0,h=m,o+=s+i,s=f.height):s=Math.max(s,f.height)}else{var v=f.height+(g?-g.y+f.y:0);(c=o+v)>r||l.newline?(a+=s+i,o=0,c=v,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=a,d[1]=o,"horizontal"===t?a=h+i:o=c+i)}))}var Lu=Pu,Ru=yt.curry(Pu,"vertical"),Eu=yt.curry(Pu,"horizontal");function Bu(t,e,i){i=Iu.normalizeCssArray(i||0);var n=e.width,r=e.height,a=Au(t.left,n),o=Au(t.top,r),s=Au(t.right,n),l=Au(t.bottom,r),u=Au(t.width,n),h=Au(t.height,r),c=i[2]+i[0],d=i[1]+i[3],f=t.aspect;switch(isNaN(u)&&(u=n-s-d-a),isNaN(h)&&(h=r-l-c-o),null!=f&&(isNaN(u)&&isNaN(h)&&(f>n/r?u=.8*n:h=.8*r),isNaN(u)&&(u=f*h),isNaN(h)&&(h=u/f)),isNaN(a)&&(a=n-s-u-d),isNaN(o)&&(o=r-l-h-c),t.left||t.right){case"center":a=n/2-u/2-i[3];break;case"right":a=n-u-d}switch(t.top||t.bottom){case"middle":case"center":o=r/2-h/2-i[0];break;case"bottom":o=r-h-c}a=a||0,o=o||0,isNaN(u)&&(u=n-d-a-(s||0)),isNaN(h)&&(h=r-c-o-(l||0));var p=new Oi(a+i[3],o+i[0],u,h);return p.margin=i,p}function zu(t,e){return e&&t&&Du(ku,(function(i){e.hasOwnProperty(i)&&(t[i]=e[i])})),t}var Nu={LOCATION_PARAMS:ku,HV_NAMES:Ou,box:Lu,vbox:Ru,hbox:Eu,getAvailableSize:function(t,e,i){var n=e.width,r=e.height,a=Au(t.x,n),o=Au(t.y,r),s=Au(t.x2,n),l=Au(t.y2,r);return(isNaN(a)||isNaN(parseFloat(t.x)))&&(a=0),(isNaN(s)||isNaN(parseFloat(t.x2)))&&(s=n),(isNaN(o)||isNaN(parseFloat(t.y)))&&(o=0),(isNaN(l)||isNaN(parseFloat(t.y2)))&&(l=r),i=Iu.normalizeCssArray(i||0),{width:Math.max(s-a-i[1]-i[3],0),height:Math.max(l-o-i[0]-i[2],0)}},getLayoutRect:Bu,positionElement:function(t,e,i,n,r){var a=!r||!r.hv||r.hv[0],o=!r||!r.hv||r.hv[1],s=r&&r.boundingMode||"all";if(a||o){var l;if("raw"===s)l="group"===t.type?new Oi(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(l=t.getBoundingRect(),t.needLocalTransform()){var u=t.getLocalTransform();(l=l.clone()).applyTransform(u)}e=Bu(yt.defaults({width:l.width,height:l.height},e),i,n);var h=t.position,c=a?e.x-l.x:0,d=o?e.y-l.y:0;t.attr("position","raw"===s?[c,d]:[h[0]+c,h[1]+d])}},sizeCalculable:function(t,e){return null!=t[Ou[e][0]]||null!=t[Ou[e][1]]&&null!=t[Ou[e][2]]},mergeLayoutParam:function(t,e,i){!yt.isObject(i)&&(i={});var n=i.ignoreSize;!yt.isArray(n)&&(n=[n,n]);var r=o(Ou[0],0),a=o(Ou[1],1);function o(i,r){var a={},o=0,u={},h=0;if(Du(i,(function(e){u[e]=t[e]})),Du(i,(function(t){s(e,t)&&(a[t]=u[t]=e[t]),l(a,t)&&o++,l(u,t)&&h++})),n[r])return l(e,i[1])?u[i[2]]=null:l(e,i[2])&&(u[i[1]]=null),u;if(2!==h&&o){if(o>=2)return a;for(var c=0;c<i.length;c++){var d=i[c];if(!s(a,d)&&s(t,d)){a[d]=t[d];break}}return a}return u}function s(t,e){return t.hasOwnProperty(e)}function l(t,e){return null!=t[e]&&"auto"!==t[e]}function u(t,e,i){Du(t,(function(t){e[t]=i[t]}))}u(Ou[0],t,r),u(Ou[1],t,a)},getLayoutParams:function(t){return zu({},t)},copyLayoutParams:zu},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=ba.enableClassManagement,Vu=ba.parseClassType,Wu=(0,ga.makeInner)(),Gu=fu.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,i,n){fu.call(this,t,e,i,n),this.uid=mu.getUID("ec_cpt_model")},init:function(t,e,i,n){this.mergeDefaultAndTheme(t,i)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?Nu.getLayoutParams(t):{},r=e.getTheme();yt.merge(t,r.get(this.mainType)),yt.merge(t,this.getDefaultOption()),i&&Nu.mergeLayoutParam(t,n,i)},mergeOption:function(t,e){yt.merge(this.option,t,!0);var i=this.layoutMode;i&&Nu.mergeLayoutParam(this.option,t,i)},optionUpdated:function(t,e){},getDefaultOption:function(){var t=Wu(this);if(!t.defaultOption){for(var e=[],i=this.constructor;i;){var n=i.prototype.defaultOption;n&&e.push(n),i=i.superClass}for(var r={},a=e.length-1;a>=0;a--)r=yt.merge(r,e[a],!0);t.defaultOption=r}return t.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});Hu(Gu,{registerWhenExtend:!0}),mu.enableSubTypeDefaulter(Gu),mu.enableTopologicalTravel(Gu,(function(t){var e=[];yt.each(Gu.getClassesByMainType(t),(function(t){e=e.concat(t.prototype.dependencies||[])})),e=yt.map(e,(function(t){return Vu(t).main})),"dataset"!==t&&yt.indexOf(e,"dataset")<=0&&e.unshift("dataset");return e})),yt.mixin(Gu,Fu);var Uu=Gu,Yu="";"undefined"!=typeof navigator&&(Yu=navigator.platform||"");var ju={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},Xu=ga.makeInner,qu=ga.normalizeToArray,Zu=Xu();var $u={clearColorPalette:function(){Zu(this).colorIdx=0,Zu(this).colorNameMap={}},getColorFromPalette:function(t,e,i){var n=Zu(e=e||this),r=n.colorIdx||0,a=n.colorNameMap=n.colorNameMap||{};if(a.hasOwnProperty(t))return a[t];var o=qu(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=i&&s?function(t,e){for(var i=t.length,n=0;n<i;n++)if(t[n].length>e)return t[n];return t[i-1]}(s,i):o;if((l=l||o)&&l.length){var u=l[r];return t&&(a[t]=u),n.colorIdx=(r+1)%l.length,u}}},Ku={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"},Qu=yt.createHashMap,Ju=yt.isTypedArray,th=ba.enableClassCheck,eh=Ku.SOURCE_FORMAT_ORIGINAL,ih=Ku.SERIES_LAYOUT_BY_COLUMN,nh=Ku.SOURCE_FORMAT_UNKNOWN,rh=Ku.SOURCE_FORMAT_TYPED_ARRAY,ah=Ku.SOURCE_FORMAT_KEYED_COLUMNS;function oh(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===ah?{}:[]),this.sourceFormat=t.sourceFormat||nh,this.seriesLayoutBy=t.seriesLayoutBy||ih,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&Qu(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}oh.seriesDataToSource=function(t){return new oh({data:t,sourceFormat:Ju(t)?rh:eh,fromDataset:!1})},th(oh);var sh=oh,lh=ga.makeInner,uh=ga.getDataItemValue,hh=yt.createHashMap,ch=yt.each,dh=yt.map,fh=yt.isArray,ph=yt.isString,gh=yt.isObject,mh=yt.isTypedArray,vh=yt.isArrayLike,yh=yt.extend,_h=Ku.SOURCE_FORMAT_ORIGINAL,xh=Ku.SOURCE_FORMAT_ARRAY_ROWS,bh=Ku.SOURCE_FORMAT_OBJECT_ROWS,wh=Ku.SOURCE_FORMAT_KEYED_COLUMNS,Sh=Ku.SOURCE_FORMAT_UNKNOWN,Th=Ku.SOURCE_FORMAT_TYPED_ARRAY,Mh=Ku.SERIES_LAYOUT_BY_ROW,Ch={Must:1,Might:2,Not:3},Ih=lh();function Ah(t){if(t){var e=hh();return dh(t,(function(t,i){if(null==(t=yh({},gh(t)?t:{name:t})).name)return t;t.name+="",null==t.displayName&&(t.displayName=t.name);var n=e.get(t.name);return n?t.name+="-"+n.count++:e.set(t.name,{count:1}),t}))}}function Dh(t,e,i,n){if(null==n&&(n=1/0),e===Mh)for(var r=0;r<i.length&&r<n;r++)t(i[r]?i[r][0]:null,r);else{var a=i[0]||[];for(r=0;r<a.length&&r<n;r++)t(a[r],r)}}function kh(t){var e=t.option;if(!e.data)return t.ecModel.getComponent("dataset",e.datasetIndex||0)}function Oh(t,e,i,n,r,a){var o,s,l;if(mh(t))return Ch.Not;if(n){var u=n[a];gh(u)?(s=u.name,l=u.type):ph(u)&&(s=u)}if(null!=l)return"ordinal"===l?Ch.Must:Ch.Not;if(e===xh)if(i===Mh){for(var h=t[a],c=0;c<(h||[]).length&&c<5;c++)if(null!=(o=g(h[r+c])))return o}else for(c=0;c<t.length&&c<5;c++){var d=t[r+c];if(d&&null!=(o=g(d[a])))return o}else if(e===bh){if(!s)return Ch.Not;for(c=0;c<t.length&&c<5;c++){if((f=t[c])&&null!=(o=g(f[s])))return o}}else if(e===wh){if(!s)return Ch.Not;if(!(h=t[s])||mh(h))return Ch.Not;for(c=0;c<h.length&&c<5;c++)if(null!=(o=g(h[c])))return o}else if(e===_h)for(c=0;c<t.length&&c<5;c++){var f=t[c],p=uh(f);if(!fh(p))return Ch.Not;if(null!=(o=g(p[a])))return o}function g(t){var e=ph(t);return null!=t&&isFinite(t)&&""!==t?e?Ch.Might:Ch.Not:e&&"-"!==t?Ch.Must:void 0}return Ch.Not}var Ph={BE_ORDINAL:Ch,detectSourceFormat:function(t){var e=t.option.source,i=Sh;if(mh(e))i=Th;else if(fh(e)){0===e.length&&(i=xh);for(var n=0,r=e.length;n<r;n++){var a=e[n];if(null!=a){if(fh(a)){i=xh;break}if(gh(a)){i=bh;break}}}}else if(gh(e)){for(var o in e)if(e.hasOwnProperty(o)&&vh(e[o])){i=wh;break}}else if(null!=e)throw new Error("Invalid data");Ih(t).sourceFormat=i},getSource:function(t){return Ih(t).source},resetSourceDefaulter:function(t){Ih(t).datasetMap=hh()},prepareSource:function(t){var e=t.option,i=e.data,n=mh(i)?Th:_h,r=!1,a=e.seriesLayoutBy,o=e.sourceHeader,s=e.dimensions,l=kh(t);if(l){var u=l.option;i=u.source,n=Ih(l).sourceFormat,r=!0,a=a||u.seriesLayoutBy,null==o&&(o=u.sourceHeader),s=s||u.dimensions}var h=function(t,e,i,n,r){if(!t)return{dimensionsDefine:Ah(r)};var a,o;if(e===xh)"auto"===n||null==n?Dh((function(t){null!=t&&"-"!==t&&(ph(t)?null==o&&(o=1):o=0)}),i,t,10):o=n?1:0,r||1!==o||(r=[],Dh((function(t,e){r[e]=null!=t?t:""}),i,t)),a=r?r.length:i===Mh?t.length:t[0]?t[0].length:null;else if(e===bh)r||(r=function(t){var e,i=0;for(;i<t.length&&!(e=t[i++]););if(e){var n=[];return ch(e,(function(t,e){n.push(e)})),n}}(t));else if(e===wh)r||(r=[],ch(t,(function(t,e){r.push(e)})));else if(e===_h){var s=uh(t[0]);a=fh(s)&&s.length||1}return{startIndex:o,dimensionsDefine:Ah(r),dimensionsDetectCount:a}}(i,n,a,o,s);Ih(t).source=new sh({data:i,fromDataset:r,seriesLayoutBy:a,sourceFormat:n,dimensionsDefine:h.dimensionsDefine,startIndex:h.startIndex,dimensionsDetectCount:h.dimensionsDetectCount,encodeDefine:e.encode})},makeSeriesEncodeForAxisCoordSys:function(t,e,i){var n={},r=kh(e);if(!r||!t)return n;var a,o,s=[],l=[],u=e.ecModel,h=Ih(u).datasetMap,c=r.uid+"_"+i.seriesLayoutBy;t=t.slice(),ch(t,(function(e,i){!gh(e)&&(t[i]={name:e}),"ordinal"===e.type&&null==a&&(a=i,o=p(t[i])),n[e.name]=[]}));var d=h.get(c)||h.set(c,{categoryWayDim:o,valueWayDim:0});function f(t,e,i){for(var n=0;n<i;n++)t.push(e+n)}function p(t){var e=t.dimsDef;return e?e.length:1}return ch(t,(function(t,e){var i=t.name,r=p(t);if(null==a){var o=d.valueWayDim;f(n[i],o,r),f(l,o,r),d.valueWayDim+=r}else if(a===e)f(n[i],0,r),f(s,0,r);else{o=d.categoryWayDim;f(n[i],o,r),f(l,o,r),d.categoryWayDim+=r}})),s.length&&(n.itemName=s),l.length&&(n.seriesName=l),n},makeSeriesEncodeForNameBased:function(t,e,i){var n={};if(!kh(t))return n;var r,a=e.sourceFormat,o=e.dimensionsDefine;a!==bh&&a!==wh||ch(o,(function(t,e){"name"===(gh(t)?t.name:t)&&(r=e)}));var s=function(){for(var t={},n={},s=[],l=0,u=Math.min(5,i);l<u;l++){var h=Oh(e.data,a,e.seriesLayoutBy,o,e.startIndex,l);s.push(h);var c=h===Ch.Not;if(c&&null==t.v&&l!==r&&(t.v=l),(null==t.n||t.n===t.v||!c&&s[t.n]===Ch.Not)&&(t.n=l),d(t)&&s[t.n]!==Ch.Not)return t;c||(h===Ch.Might&&null==n.v&&l!==r&&(n.v=l),null!=n.n&&n.n!==n.v||(n.n=l))}function d(t){return null!=t.v&&null!=t.n}return d(t)?t:d(n)?n:null}();if(s){n.value=s.v;var l=null!=r?r:s.n;n.itemName=[l],n.seriesName=[l]}return n},guessOrdinal:function(t,e){return Oh(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}},Lh=yt.each,Rh=yt.filter,Eh=yt.map,Bh=yt.isArray,zh=yt.indexOf,Nh=yt.isObject,Fh=yt.isString,Hh=yt.createHashMap,Vh=yt.assert,Wh=yt.clone,Gh=yt.merge,Uh=yt.extend,Yh=yt.mixin,jh=Ph.resetSourceDefaulter,Xh=fu.extend({init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new fu(i),this._optionManager=n},setOption:function(t,e){Vh(!("\0_ec_inner"in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e=!1,i=this._optionManager;if(!t||"recreate"===t){var n=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(n)):qh.call(this,n),e=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var r=i.getTimelineOption(this);r&&(this.mergeOption(r),e=!0)}if(!t||"recreate"===t||"media"===t){var a=i.getMediaOption(this,this._api);a.length&&Lh(a,(function(t){this.mergeOption(t,e=!0)}),this)}return e},mergeOption:function(t){var e=this.option,i=this._componentsMap,n=[];jh(this),Lh(t,(function(t,i){null!=t&&(Uu.hasClass(i)?i&&n.push(i):e[i]=null==e[i]?Wh(t):Gh(e[i],t,!0))})),Uu.topologicalTravel(n,Uu.getAllClassMainTypes(),(function(n,r){var a=ga.normalizeToArray(t[n]),o=ga.mappingToExists(i.get(n),a);ga.makeIdAndName(o),Lh(o,(function(t,e){var i=t.option;Nh(i)&&(t.keyInfo.mainType=n,t.keyInfo.subType=function(t,e,i){return e.type?e.type:i?i.subType:Uu.determineSubType(t,e)}(n,i,t.exist))}));var s=function(t,e){Bh(e)||(e=e?[e]:[]);var i={};return Lh(e,(function(e){i[e]=(t.get(e)||[]).slice()})),i}(i,r);e[n]=[],i.set(n,[]),Lh(o,(function(t,r){var a=t.exist,o=t.option;if(Vh(Nh(o)||a,"Empty component definition"),o){var l=Uu.getClass(n,t.keyInfo.subType,!0);if(a&&a.constructor===l)a.name=t.keyInfo.name,a.mergeOption(o,this),a.optionUpdated(o,!1);else{var u=Uh({dependentModels:s,componentIndex:r},t.keyInfo);a=new l(o,this,this,u),Uh(a,u),a.init(o,this,this,u),a.optionUpdated(null,!0)}}else a.mergeOption({},this),a.optionUpdated({},!1);i.get(n)[r]=a,e[n][r]=a.option}),this),"series"===n&&Zh(this,i.get("series"))}),this),this._seriesIndicesMap=Hh(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var t=Wh(this.option);return Lh(t,(function(e,i){if(Uu.hasClass(i)){for(var n=(e=ga.normalizeToArray(e)).length-1;n>=0;n--)ga.isIdInner(e[n])&&e.splice(n,1);t[i]=e}})),delete t["\0_ec_inner"],t},getTheme:function(){return this._theme},getComponent:function(t,e){var i=this._componentsMap.get(t);if(i)return i[e||0]},queryComponents:function(t){var e=t.mainType;if(!e)return[];var i,n=t.index,r=t.id,a=t.name,o=this._componentsMap.get(e);if(!o||!o.length)return[];if(null!=n)Bh(n)||(n=[n]),i=Rh(Eh(n,(function(t){return o[t]})),(function(t){return!!t}));else if(null!=r){var s=Bh(r);i=Rh(o,(function(t){return s&&zh(r,t.id)>=0||!s&&t.id===r}))}else if(null!=a){var l=Bh(a);i=Rh(o,(function(t){return l&&zh(a,t.name)>=0||!l&&t.name===a}))}else i=o.slice();return $h(i,t)},findComponents:function(t){var e,i,n,r,a,o=t.query,s=t.mainType,l=(i=s+"Index",n=s+"Id",r=s+"Name",!(e=o)||null==e[i]&&null==e[n]&&null==e[r]?null:{mainType:s,index:e[i],id:e[n],name:e[r]}),u=l?this.queryComponents(l):this._componentsMap.get(s);return a=$h(u,t),t.filter?Rh(a,t.filter):a},eachComponent:function(t,e,i){var n=this._componentsMap;if("function"==typeof t)i=e,e=t,n.each((function(t,n){Lh(t,(function(t,r){e.call(i,n,t,r)}))}));else if(Fh(t))Lh(n.get(t),e,i);else if(Nh(t)){var r=this.findComponents(t);Lh(r,e,i)}},getSeriesByName:function(t){var e=this._componentsMap.get("series");return Rh(e,(function(e){return e.name===t}))},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(t){var e=this._componentsMap.get("series");return Rh(e,(function(e){return e.subType===t}))},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(t,e){Lh(this._seriesIndices,(function(i){var n=this._componentsMap.get("series")[i];t.call(e,n,i)}),this)},eachRawSeries:function(t,e){Lh(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,i){Lh(this._seriesIndices,(function(n){var r=this._componentsMap.get("series")[n];r.subType===t&&e.call(i,r,n)}),this)},eachRawSeriesByType:function(t,e,i){return Lh(this.getSeriesByType(t),e,i)},isSeriesFiltered:function(t){return null==this._seriesIndicesMap.get(t.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){Zh(this,Rh(this._componentsMap.get("series"),t,e))},restoreData:function(t){var e=this._componentsMap;Zh(this,e.get("series"));var i=[];e.each((function(t,e){i.push(e)})),Uu.topologicalTravel(i,Uu.getAllClassMainTypes(),(function(i,n){Lh(e.get(i),(function(e){("series"!==i||!function(t,e){if(e){var i=e.seiresIndex,n=e.seriesId,r=e.seriesName;return null!=i&&t.componentIndex!==i||null!=n&&t.id!==n||null!=r&&t.name!==r}}(e,t))&&e.restoreData()}))}))}});function qh(t){t=t,this.option={},this.option["\0_ec_inner"]=1,this._componentsMap=Hh({series:[]}),this._seriesIndices,this._seriesIndicesMap,function(t,e){var i=t.color&&!t.colorLayer;Lh(e,(function(e,n){"colorLayer"===n&&i||Uu.hasClass(n)||("object"==typeof e?t[n]=t[n]?Gh(t[n],e,!1):Wh(e):null==t[n]&&(t[n]=e))}))}(t,this._theme.option),Gh(t,ju,!1),this.mergeOption(t)}function Zh(t,e){t._seriesIndicesMap=Hh(t._seriesIndices=Eh(e,(function(t){return t.componentIndex}))||[])}function $h(t,e){return e.hasOwnProperty("subType")?Rh(t,(function(t){return t.subType===e.subType})):t}Yh(Xh,$u);var Kh=Xh,Qh=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];var Jh=function(t){yt.each(Qh,(function(e){this[e]=yt.bind(t[e],t)}),this)},tc={};function ec(){this._coordinateSystems=[]}ec.prototype={constructor:ec,create:function(t,e){var i=[];yt.each(tc,(function(n,r){var a=n.create(t,e);i=i.concat(a||[])})),this._coordinateSystems=i},update:function(t,e){yt.each(this._coordinateSystems,(function(i){i.update&&i.update(t,e)}))},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},ec.register=function(t,e){tc[t]=e},ec.get=function(t){return tc[t]};var ic=ec,nc=yt.each,rc=yt.clone,ac=yt.map,oc=yt.merge,sc=/^(min|max)?(.+)$/;function lc(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function uc(t,e,i){var n,r,a=[],o=[],s=t.timeline;if(t.baseOption&&(r=t.baseOption),(s||t.options)&&(r=r||{},a=(t.options||[]).slice()),t.media){r=r||{};var l=t.media;nc(l,(function(t){t&&t.option&&(t.query?o.push(t):n||(n=t))}))}return r||(r=t),r.timeline||(r.timeline=s),nc([r].concat(a).concat(yt.map(o,(function(t){return t.option}))),(function(t){nc(e,(function(e){e(t,i)}))})),{baseOption:r,timelineOptions:a,mediaDefault:n,mediaList:o}}function hc(t,e,i){var n={width:e,height:i,aspectratio:e/i},r=!0;return yt.each(t,(function(t,e){var i=e.match(sc);if(i&&i[1]&&i[2]){var a=i[1],o=i[2].toLowerCase();(function(t,e,i){return"min"===i?t>=e:"max"===i?t<=e:t===e})(n[o],t,a)||(r=!1)}})),r}lc.prototype={constructor:lc,setOption:function(t,e){t&&yt.each(ga.normalizeToArray(t.series),(function(t){t&&t.data&&yt.isTypedArray(t.data)&&yt.setAsPrimitive(t.data)})),t=rc(t);var i,n,r=this._optionBackup,a=uc.call(this,t,e,!r);this._newBaseOption=a.baseOption,r?(i=r.baseOption,n=a.baseOption,nc(n=n||{},(function(t,e){if(null!=t){var n=i[e];if(Uu.hasClass(e)){t=ga.normalizeToArray(t),n=ga.normalizeToArray(n);var r=ga.mappingToExists(n,t);i[e]=ac(r,(function(t){return t.option&&t.exist?oc(t.exist,t.option,!0):t.exist||t.option}))}else i[e]=oc(n,t,!0)}})),a.timelineOptions.length&&(r.timelineOptions=a.timelineOptions),a.mediaList.length&&(r.mediaList=a.mediaList),a.mediaDefault&&(r.mediaDefault=a.mediaDefault)):this._optionBackup=a},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=ac(e.timelineOptions,rc),this._mediaList=ac(e.mediaList,rc),this._mediaDefault=rc(e.mediaDefault),this._currentMediaIndices=[],rc(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=rc(i[n.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e,i,n=this._api.getWidth(),r=this._api.getHeight(),a=this._mediaList,o=this._mediaDefault,s=[],l=[];if(!a.length&&!o)return l;for(var u=0,h=a.length;u<h;u++)hc(a[u].query,n,r)&&s.push(u);return!s.length&&o&&(s=[-1]),s.length&&(e=s,i=this._currentMediaIndices,e.join(",")!==i.join(","))&&(l=ac(s,(function(t){return rc(-1===t?o.option:a[t].option)}))),this._currentMediaIndices=s,l}};var cc=lc,dc=yt.each,fc=yt.isObject,pc=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function gc(t){var e=t&&t.itemStyle;if(e)for(var i=0,n=pc.length;i<n;i++){var r=pc[i],a=e.normal,o=e.emphasis;a&&a[r]&&(t[r]=t[r]||{},t[r].normal?yt.merge(t[r].normal,a[r]):t[r].normal=a[r],a[r]=null),o&&o[r]&&(t[r]=t[r]||{},t[r].emphasis?yt.merge(t[r].emphasis,o[r]):t[r].emphasis=o[r],o[r]=null)}}function mc(t,e,i){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var n=t[e].normal,r=t[e].emphasis;n&&(i?(t[e].normal=t[e].emphasis=null,yt.defaults(t[e],n)):t[e]=n),r&&(t.emphasis=t.emphasis||{},t.emphasis[e]=r)}}function vc(t){mc(t,"itemStyle"),mc(t,"lineStyle"),mc(t,"areaStyle"),mc(t,"label"),mc(t,"labelLine"),mc(t,"upperLabel"),mc(t,"edgeLabel")}function yc(t,e){var i=fc(t)&&t[e],n=fc(i)&&i.textStyle;if(n)for(var r=0,a=ga.TEXT_STYLE_OPTIONS.length;r<a;r++){e=ga.TEXT_STYLE_OPTIONS[r];n.hasOwnProperty(e)&&(i[e]=n[e])}}function _c(t){t&&(vc(t),yc(t,"label"),t.emphasis&&yc(t.emphasis,"label"))}function xc(t){return yt.isArray(t)?t:t?[t]:[]}function bc(t){return(yt.isArray(t)?t[0]:t)||{}}var wc=function(t,e){dc(xc(t.series),(function(t){fc(t)&&function(t){if(fc(t)){gc(t),vc(t),yc(t,"label"),yc(t,"upperLabel"),yc(t,"edgeLabel"),t.emphasis&&(yc(t.emphasis,"label"),yc(t.emphasis,"upperLabel"),yc(t.emphasis,"edgeLabel")),(i=t.markPoint)&&(gc(i),_c(i)),(n=t.markLine)&&(gc(n),_c(n));var e=t.markArea;e&&_c(e);var i,n,r=t.data;if("graph"===t.type){r=r||t.nodes;var a=t.links||t.edges;if(a&&!yt.isTypedArray(a))for(var o=0;o<a.length;o++)_c(a[o]);yt.each(t.categories,(function(t){vc(t)}))}if(r&&!yt.isTypedArray(r))for(o=0;o<r.length;o++)_c(r[o]);if((i=t.markPoint)&&i.data){var s=i.data;for(o=0;o<s.length;o++)_c(s[o])}if((n=t.markLine)&&n.data){var l=n.data;for(o=0;o<l.length;o++)yt.isArray(l[o])?(_c(l[o][0]),_c(l[o][1])):_c(l[o])}"gauge"===t.type?(yc(t,"axisLabel"),yc(t,"title"),yc(t,"detail")):"treemap"===t.type?(mc(t.breadcrumb,"itemStyle"),yt.each(t.levels,(function(t){vc(t)}))):"tree"===t.type&&vc(t.leaves)}}(t)}));var i=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&i.push("valueAxis","categoryAxis","logAxis","timeAxis"),dc(i,(function(e){dc(xc(t[e]),(function(t){t&&(yc(t,"axisLabel"),yc(t.axisPointer,"label"))}))})),dc(xc(t.parallel),(function(t){var e=t&&t.parallelAxisDefault;yc(e,"axisLabel"),yc(e&&e.axisPointer,"label")})),dc(xc(t.calendar),(function(t){mc(t,"itemStyle"),yc(t,"dayLabel"),yc(t,"monthLabel"),yc(t,"yearLabel")})),dc(xc(t.radar),(function(t){yc(t,"name")})),dc(xc(t.geo),(function(t){fc(t)&&(_c(t),dc(xc(t.regions),(function(t){_c(t)})))})),dc(xc(t.timeline),(function(t){_c(t),mc(t,"label"),mc(t,"itemStyle"),mc(t,"controlStyle",!0);var e=t.data;yt.isArray(e)&&yt.each(e,(function(t){yt.isObject(t)&&(mc(t,"label"),mc(t,"itemStyle"))}))})),dc(xc(t.toolbox),(function(t){mc(t,"iconStyle"),dc(t.feature,(function(t){mc(t,"iconStyle")}))})),yc(bc(t.axisPointer),"label"),yc(bc(t.tooltip).axisPointer,"label")},Sc=yt.each,Tc=yt.isArray,Mc=yt.isObject,Cc=ga.normalizeToArray;function Ic(t){Sc(Ac,(function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])}))}var Ac=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],Dc=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"];var kc=function(t,e){wc(t,e),t.series=Cc(t.series),Sc(t.series,(function(t){if(Mc(t)){var e=t.type;if("line"===e)null!=t.clipOverflow&&(t.clip=t.clipOverflow);else if("pie"===e||"gauge"===e)null!=t.clockWise&&(t.clockwise=t.clockWise);else if("gauge"===e){var i=function(t,e){e=e.split(",");for(var i=t,n=0;n<e.length&&null!=(i=i&&i[e[n]]);n++);return i}(t,"pointer.color");null!=i&&function(t,e,i,n){e=e.split(",");for(var r,a=t,o=0;o<e.length-1;o++)null==a[r=e[o]]&&(a[r]={}),a=a[r];(n||null==a[e[o]])&&(a[e[o]]=i)}(t,"itemStyle.color",i)}Ic(t)}})),t.dataRange&&(t.visualMap=t.dataRange),Sc(Dc,(function(e){var i=t[e];i&&(Tc(i)||(i=[i]),Sc(i,(function(t){Ic(t)})))}))},Oc=yt.createHashMap,Pc=yt.each;function Lc(t){Pc(t,(function(e,i){var n=[],r=[NaN,NaN],a=[e.stackResultDimension,e.stackedOverDimension],o=e.data,s=e.isStackedByIndex,l=o.map(a,(function(a,l,u){var h,c,d=o.get(e.stackedDimension,u);if(isNaN(d))return r;s?c=o.getRawIndex(u):h=o.get(e.stackedByDimension,u);for(var f=NaN,p=i-1;p>=0;p--){var g=t[p];if(s||(c=g.data.rawIndexOf(g.stackedByDimension,h)),c>=0){var m=g.data.getByRawIndex(g.stackResultDimension,c);if(d>=0&&m>0||d<=0&&m<0){d+=m,f=m;break}}}return n[0]=d,n[1]=f,n}));o.hostModel.setData(l),e.data=l}))}var Rc=function(t){var e=Oc();t.eachSeries((function(t){var i=t.get("stack");if(i){var n=e.get(i)||e.set(i,[]),r=t.getData(),a={stackResultDimension:r.getCalculationInfo("stackResultDimension"),stackedOverDimension:r.getCalculationInfo("stackedOverDimension"),stackedDimension:r.getCalculationInfo("stackedDimension"),stackedByDimension:r.getCalculationInfo("stackedByDimension"),isStackedByIndex:r.getCalculationInfo("isStackedByIndex"),data:r,seriesModel:t};if(!a.stackedDimension||!a.isStackedByIndex&&!a.stackedByDimension)return;n.length&&r.setCalculationInfo("stackedOnSeries",n[n.length-1].seriesModel),n.push(a)}})),e.each(Lc)},Ec=yt.extend,Bc=yt.each,zc=yt.isObject,Nc=ga.getDataItemValue,Fc=ga.isDataItemOption,Hc=_u.parseDate,Vc=Ku.SOURCE_FORMAT_TYPED_ARRAY,Wc=Ku.SOURCE_FORMAT_ARRAY_ROWS,Gc=Ku.SOURCE_FORMAT_ORIGINAL,Uc=Ku.SOURCE_FORMAT_OBJECT_ROWS;function Yc(t,e){sh.isInstance(t)||(t=sh.seriesDataToSource(t)),this._source=t;var i=this._data=t.data,n=t.sourceFormat;n===Vc&&(this._offset=0,this._dimSize=e,this._data=i);var r=Xc[n===Wc?n+"_"+t.seriesLayoutBy:n];Ec(this,r)}var jc=Yc.prototype;jc.pure=!1,jc.persistent=!0,jc.getSource=function(){return this._source};var Xc={arrayRows_column:{pure:!0,count:function(){return Math.max(0,this._data.length-this._source.startIndex)},getItem:function(t){return this._data[t+this._source.startIndex]},appendData:$c},arrayRows_row:{pure:!0,count:function(){var t=this._data[0];return t?Math.max(0,t.length-this._source.startIndex):0},getItem:function(t){t+=this._source.startIndex;for(var e=[],i=this._data,n=0;n<i.length;n++){var r=i[n];e.push(r?r[t]:null)}return e},appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},objectRows:{pure:!0,count:qc,getItem:Zc,appendData:$c},keyedColumns:{pure:!0,count:function(){var t=this._source.dimensionsDefine[0].name,e=this._data[t];return e?e.length:0},getItem:function(t){for(var e=[],i=this._source.dimensionsDefine,n=0;n<i.length;n++){var r=this._data[i[n].name];e.push(r?r[t]:null)}return e},appendData:function(t){var e=this._data;Bc(t,(function(t,i){for(var n=e[i]||(e[i]=[]),r=0;r<(t||[]).length;r++)n.push(t[r])}))}},original:{count:qc,getItem:Zc,appendData:$c},typedArray:{persistent:!1,pure:!0,count:function(){return this._data?this._data.length/this._dimSize:0},getItem:function(t,e){t-=this._offset,e=e||[];for(var i=this._dimSize*t,n=0;n<this._dimSize;n++)e[n]=this._data[i+n];return e},appendData:function(t){this._data=t},clean:function(){this._offset+=this.count(),this._data=null}}};function qc(){return this._data.length}function Zc(t){return this._data[t]}function $c(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}var Kc={arrayRows:Qc,objectRows:function(t,e,i,n){return null!=i?t[n]:t},keyedColumns:Qc,original:function(t,e,i,n){var r=Nc(t);return null!=i&&r instanceof Array?r[i]:r},typedArray:Qc};function Qc(t,e,i,n){return null!=i?t[i]:t}function Jc(t,e,i,n){return td(t[n],this._dimensionInfos[e])}function td(t,e){var i=e&&e.type;if("ordinal"===i){var n=e&&e.ordinalMeta;return n?n.parseAndCollect(t):t}return"time"===i&&"number"!=typeof t&&null!=t&&"-"!==t&&(t=+Hc(t)),null==t||""===t?NaN:+t}var ed={DefaultDataProvider:Yc,defaultDimValueGetters:{arrayRows:Jc,objectRows:function(t,e,i,n){return td(t[e],this._dimensionInfos[e])},keyedColumns:Jc,original:function(t,e,i,n){var r=t&&(null==t.value?t:t.value);return!this._rawData.pure&&Fc(t)&&(this.hasItemOption=!0),td(r instanceof Array?r[n]:r,this._dimensionInfos[e])},typedArray:function(t,e,i,n){return t[n]}},retrieveRawValue:function(t,e,i){if(t){var n=t.getRawDataItem(e);if(null!=n){var r,a,o=t.getProvider().getSource().sourceFormat,s=t.getDimensionInfo(i);return s&&(r=s.name,a=s.index),Kc[o](n,e,a,r)}}},retrieveRawAttr:function(t,e,i){if(t){var n=t.getProvider().getSource().sourceFormat;if(n===Gc||n===Uc){var r=t.getRawDataItem(e);return n!==Gc||zc(r)||(r=null),r?r[i]:void 0}}}},id=ed.retrieveRawValue,nd=Iu.getTooltipMarker,rd=Iu.formatTpl,ad=ga.getTooltipRenderMode,od=/\{@(.+?)\}/g,sd={getDataParams:function(t,e){var i=this.getData(e),n=this.getRawValue(t,e),r=i.getRawIndex(t),a=i.getName(t),o=i.getRawDataItem(t),s=i.getItemVisual(t,"color"),l=i.getItemVisual(t,"borderColor"),u=this.ecModel.getComponent("tooltip"),h=u&&u.get("renderMode"),c=ad(h),d=this.mainType,f="series"===d,p=i.userOutput;return{componentType:d,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:f?this.subType:null,seriesIndex:this.seriesIndex,seriesId:f?this.id:null,seriesName:f?this.name:null,name:a,dataIndex:r,data:o,dataType:e,value:n,color:s,borderColor:l,dimensionNames:p?p.dimensionNames:null,encode:p?p.encode:null,marker:nd({color:s,renderMode:c}),$vars:["seriesName","name","value"]}},getFormattedLabel:function(t,e,i,n,r){e=e||"normal";var a=this.getData(i),o=a.getItemModel(t),s=this.getDataParams(t,i);null!=n&&s.value instanceof Array&&(s.value=s.value[n]);var l=o.get("normal"===e?[r||"label","formatter"]:[e,r||"label","formatter"]);return"function"==typeof l?(s.status=e,s.dimensionIndex=n,l(s)):"string"==typeof l?rd(l,s).replace(od,(function(e,i){var n=i.length;return"["===i.charAt(0)&&"]"===i.charAt(n-1)&&(i=+i.slice(1,n-1)),id(a,t,i)})):void 0},getRawValue:function(t,e){return id(this.getData(e),t)},formatTooltip:function(){}},ld=yt.isArray;function ud(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0,this.context}var hd=ud.prototype;hd.perform=function(t){var e,i=this._upstream,n=t&&t.skip;if(this._dirty&&i){var r=this.context;r.data=r.outputData=i.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!n&&(e=this._plan(this.context));var a,o=h(this._modBy),s=this._modDataCount||0,l=h(t&&t.modBy),u=t&&t.modDataCount||0;function h(t){return!(t>=1)&&(t=1),t}o===l&&s===u||(e="reset"),(this._dirty||"reset"===e)&&(this._dirty=!1,a=function(t,e){var i,n;t._dueIndex=t._outputDueEnd=t._dueEnd=0,t._settedOutputEnd=null,!e&&t._reset&&((i=t._reset(t.context))&&i.progress&&(n=i.forceFirstProgress,i=i.progress),ld(i)&&!i.length&&(i=null));t._progress=i,t._modBy=t._modDataCount=null;var r=t._downstream;return r&&r.dirty(),n}(this,n)),this._modBy=l,this._modDataCount=u;var c=t&&t.step;if(this._dueEnd=i?i._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,f=Math.min(null!=c?this._dueIndex+c:1/0,this._dueEnd);if(!n&&(a||d<f)){var p=this._progress;if(ld(p))for(var g=0;g<p.length;g++)dd(this,p[g],d,f,l,u);else dd(this,p,d,f,l,u)}this._dueIndex=f;var m=null!=this._settedOutputEnd?this._settedOutputEnd:f;this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()};var cd=function(){var t,e,i,n,r,a={reset:function(l,u,h,c){e=l,t=u,i=h,n=c,r=Math.ceil(n/i),a.next=i>1&&n>0?s:o}};return a;function o(){return e<t?e++:null}function s(){var a=e%r*i+Math.ceil(e/r),o=e>=t?null:a<n?a:e;return e++,o}}();function dd(t,e,i,n,r,a){cd.reset(i,n,r,a),t._callingProgress=e,t._callingProgress({start:i,end:n,count:n-i,next:cd.next},t.context)}hd.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},hd.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},hd.pipe=function(t){(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},hd.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},hd.getUpstream=function(){return this._upstream},hd.getDownstream=function(){return this._downstream},hd.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t};var fd={createTask:function(t){return new ud(t)}},pd=Iu.formatTime,gd=Iu.encodeHTML,md=Iu.addCommas,vd=Iu.getTooltipMarker,yd=Nu.getLayoutParams,_d=Nu.mergeLayoutParam,xd=fd.createTask,bd=Ph.prepareSource,wd=Ph.getSource,Sd=ed.retrieveRawValue,Td=ga.makeInner(),Md=Uu.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendVisualProvider:null,visualColorAccessPath:"itemStyle.color",visualBorderColorAccessPath:"itemStyle.borderColor",layoutMode:null,init:function(t,e,i,n){this.seriesIndex=this.componentIndex,this.dataTask=xd({count:Id,reset:Ad}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,i),bd(this);var r=this.getInitialData(t,i);kd(r,this),this.dataTask.context.data=r,Td(this).dataBeforeProcessed=r,Cd(this)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?yd(t):{},r=this.subType;Uu.hasClass(r)&&(r+="Series"),yt.merge(t,e.getTheme().get(this.subType)),yt.merge(t,this.getDefaultOption()),ga.defaultEmphasis(t,"label",["show"]),this.fillDataTextStyle(t.data),i&&_d(t,n,i)},mergeOption:function(t,e){t=yt.merge(this.option,t,!0),this.fillDataTextStyle(t.data);var i=this.layoutMode;i&&_d(this.option,t,i),bd(this);var n=this.getInitialData(t,e);kd(n,this),this.dataTask.dirty(),this.dataTask.context.data=n,Td(this).dataBeforeProcessed=n,Cd(this)},fillDataTextStyle:function(t){if(t&&!yt.isTypedArray(t))for(var e=["show"],i=0;i<t.length;i++)t[i]&&t[i].label&&ga.defaultEmphasis(t[i],"label",e)},getInitialData:function(){},appendData:function(t){this.getRawData().appendData(t.data)},getData:function(t){var e=Pd(this);if(e){var i=e.context.data;return null==t?i:i.getLinkedData(t)}return Td(this).data},setData:function(t){var e=Pd(this);if(e){var i=e.context;i.data!==t&&e.modifyOutputEnd&&e.setOutputEnd(t.count()),i.outputData=t,e!==this.dataTask&&(i.data=t)}Td(this).data=t},getSource:function(){return wd(this)},getRawData:function(){return Td(this).dataBeforeProcessed},getBaseAxis:function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},formatTooltip:function(t,e,i,n){var r=this,a="html"===(n=n||"html")?"<br/>":"\n",o="richText"===n,s={},l=0;function u(t){return{renderMode:n,content:gd(md(t)),style:s}}var h=this.getData(),c=h.mapDimension("defaultedTooltip",!0),d=c.length,f=this.getRawValue(t),p=yt.isArray(f),g=h.getItemVisual(t,"color");yt.isObject(g)&&g.colorStops&&(g=(g.colorStops[0]||{}).color),g=g||"transparent";var m=(d>1||p&&!d?function(i){var a=yt.reduce(i,(function(t,e,i){var n=h.getDimensionInfo(i);return t|(n&&!1!==n.tooltip&&null!=n.displayName)}),0),u=[];function d(t,i){var c=h.getDimensionInfo(i);if(c&&!1!==c.otherDims.tooltip){var d=c.type,f="sub"+r.seriesIndex+"at"+l,p=vd({color:g,type:"subItem",renderMode:n,markerId:f}),m="string"==typeof p?p:p.content,v=(a?m+gd(c.displayName||"-")+": ":"")+gd("ordinal"===d?t+"":"time"===d?e?"":pd("yyyy/MM/dd hh:mm:ss",t):md(t));v&&u.push(v),o&&(s[f]=g,++l)}}c.length?yt.each(c,(function(e){d(Sd(h,t,e),e)})):yt.each(i,d);var f=a?o?"\n":"<br/>":"",p=f+u.join(f||", ");return{renderMode:n,content:p,style:s}}(f):u(d?Sd(h,t,c[0]):p?f[0]:f)).content,v=r.seriesIndex+"at"+l,y=vd({color:g,type:"item",renderMode:n,markerId:v});s[v]=g,++l;var _=h.getName(t),x=this.name;ga.isNameSpecified(this)||(x=""),x=x?gd(x)+(e?": ":a):"";var b="string"==typeof y?y:y.content;return{html:e?b+x+m:x+b+(_?gd(_)+": "+m:m),markers:s}},isAnimationEnabled:function(){if(q.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,i){var n=this.ecModel,r=$u.getColorFromPalette.call(this,t,e,i);return r||(r=n.getColorFromPalette(t,e,i)),r},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});function Cd(t){var e=t.name;ga.isNameSpecified(t)||(t.name=function(t){var e=t.getRawData(),i=e.mapDimension("seriesName",!0),n=[];return yt.each(i,(function(t){var i=e.getDimensionInfo(t);i.displayName&&n.push(i.displayName)})),n.join(" ")}(t)||e)}function Id(t){return t.model.getRawData().count()}function Ad(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),Dd}function Dd(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function kd(t,e){yt.each(t.CHANGABLE_METHODS,(function(i){t.wrapMethod(i,yt.curry(Od,e))}))}function Od(t){var e=Pd(t);e&&e.setOutputEnd(this.count())}function Pd(t){var e=(t.ecModel||{}).scheduler,i=e&&e.getPipeline(t.uid);if(i){var n=i.currentTask;if(n){var r=n.agentStubMap;r&&(n=r.get(t.uid))}return n}}yt.mixin(Md,sd),yt.mixin(Md,$u);var Ld=Md,Rd=function(){this.group=new Li,this.uid=mu.getUID("viewComponent")},Ed=Rd.prototype={constructor:Rd,init:function(t,e){},render:function(t,e,i,n){},dispose:function(){},filterForExposedEvent:null};Ed.updateView=Ed.updateLayout=Ed.updateVisual=function(t,e,i,n){},ba.enableClassExtend(Rd),ba.enableClassManagement(Rd,{registerWhenExtend:!0});var Bd=Rd,zd=ga.makeInner;var Nd=function(){var t=zd();return function(e){var i=t(e),n=e.pipelineContext,r=i.large,a=i.progressiveRender,o=i.large=n&&n.large,s=i.progressiveRender=n&&n.progressiveRender;return!!(r^o||a^s)&&"reset"}},Fd=yt.each,Hd=fd.createTask,Vd=ga.makeInner(),Wd=Nd();function Gd(){this.group=new Li,this.uid=mu.getUID("viewChart"),this.renderTask=Hd({plan:Xd,reset:qd}),this.renderTask.context={view:this}}Gd.prototype={type:"chart",init:function(t,e){},render:function(t,e,i,n){},highlight:function(t,e,i,n){jd(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){jd(t.getData(),n,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var Ud=Gd.prototype;function Yd(t,e,i){if(t&&(t.trigger(e,i),t.isGroup&&!tu.isHighDownDispatcher(t)))for(var n=0,r=t.childCount();n<r;n++)Yd(t.childAt(n),e,i)}function jd(t,e,i){var n=ga.queryDataIndex(t,e),r=e&&null!=e.highlightKey?tu.getHighlightDigit(e.highlightKey):null;null!=n?Fd(ga.normalizeToArray(n),(function(e){Yd(t.getItemGraphicEl(e),i,r)})):t.eachItemGraphicEl((function(t){Yd(t,i,r)}))}function Xd(t){return Wd(t.model)}function qd(t){var e=t.model,i=t.ecModel,n=t.api,r=t.payload,a=e.pipelineContext.progressiveRender,o=t.view,s=r&&Vd(r).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return"render"!==l&&o[l](e,i,n,r),Zd[l]}Ud.updateView=Ud.updateLayout=Ud.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},ba.enableClassExtend(Gd,["dispose"]),ba.enableClassManagement(Gd,{registerWhenExtend:!0}),Gd.markUpdateMethod=function(t,e){Vd(t).updateMethod=e};var Zd={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},$d=Gd,Kd="\0__throttleOriginMethod",Qd="\0__throttleRate";function Jd(t,e,i){var n,r,a,o,s,l=0,u=0,h=null;function c(){u=(new Date).getTime(),h=null,t.apply(a,o||[])}e=e||0;var d=function(){n=(new Date).getTime(),a=this,o=arguments;var t=s||e,d=s||i;s=null,r=n-(d?l:u)-t,clearTimeout(h),d?h=setTimeout(c,t):r>=0?c():h=setTimeout(c,-r),l=n};return d.clear=function(){h&&(clearTimeout(h),h=null)},d.debounceNextCall=function(t){s=t},d}var tf={throttle:Jd,createOrUpdate:function(t,e,i,n){var r=t[e];if(r){var a=r[Kd]||r,o=r["\0__throttleType"];if(r[Qd]!==i||o!==n){if(null==i||!n)return t[e]=a;(r=t[e]=Jd(a,i,"debounce"===n))[Kd]=a,r["\0__throttleType"]=n,r[Qd]=i}return r}},clear:function(t,e){var i=t[e];i&&i[Kd]&&(t[e]=i[Kd])}},ef=yt.isFunction,nf={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var i=t.getData(),n=(t.visualColorAccessPath||"itemStyle.color").split("."),r=t.get(n),a=!ef(r)||r instanceof Ys?null:r;r&&!a||(r=t.getColorFromPalette(t.name,null,e.getSeriesCount())),i.setVisual("color",r);var o=(t.visualBorderColorAccessPath||"itemStyle.borderColor").split("."),s=t.get(o);if(i.setVisual("borderColor",s),!e.isSeriesFiltered(t)){a&&i.each((function(e){i.setItemVisual(e,"color",a(t.getDataParams(e)))}));return{dataEach:i.hasItemOption?function(t,e){var i=t.getItemModel(e),r=i.get(n,!0),a=i.get(o,!0);null!=r&&t.setItemVisual(e,"color",r),null!=a&&t.setItemVisual(e,"borderColor",a)}:null}}}},rf={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:""}}}},af=ed.retrieveRawValue;var of=function(t,e){var i=e.getModel("aria");if(i.get("show"))if(i.get("description"))t.setAttribute("aria-label",i.get("description"));else{var n=0;e.eachSeries((function(t,e){++n}),this);var r,a=i.get("data.maxCount")||10,o=i.get("series.maxCount")||10,s=Math.min(n,o);if(!(n<1)){var l=function(){var t=e.getModel("title").option;t&&t.length&&(t=t[0]);return t&&t.text}();r=l?h(c("general.withTitle"),{title:l}):c("general.withoutTitle");var u=[];r+=h(c(n>1?"series.multiple.prefix":"series.single.prefix"),{seriesCount:n}),e.eachSeries((function(t,e){if(e<s){var i,r=t.get("name"),o="series."+(n>1?"multiple":"single")+".";i=h(i=c(r?o+"withName":o+"withoutName"),{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:(m=t.subType,rf.series.typeNames[m]||"自定义图")});var l=t.getData();window.data=l,l.count()>a?i+=h(c("data.partialData"),{displayCnt:a}):i+=c("data.allData");for(var d=[],f=0;f<l.count();f++)if(f<a){var p=l.getName(f),g=af(l,f);d.push(h(c(p?"data.withName":"data.withoutName"),{name:p,value:g}))}i+=d.join(c("data.separator.middle"))+c("data.separator.end"),u.push(i)}var m})),r+=u.join(c("series.multiple.separator.middle"))+c("series.multiple.separator.end"),t.setAttribute("aria-label",r)}}function h(t,e){if("string"!=typeof t)return t;var i=t;return yt.each(e,(function(t,e){i=i.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)})),i}function c(t){var e=i.get(t);if(null==e){for(var n=t.split("."),r=rf.aria,a=0;a<n.length;++a)r=r[n[a]];return r}return e}},sf=Math.PI;var lf=function(t,e){e=e||{},yt.defaults(e,{text:"loading",textColor:"#000",fontSize:"12px",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#c23531",spinnerRadius:10,lineWidth:5,zlevel:0});var i=new tu.Group,n=new tu.Rect({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});i.add(n);var r=e.fontSize+" sans-serif",a=new tu.Rect({style:{fill:"none",text:e.text,font:r,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});if(i.add(a),e.showSpinner){var o=new tu.Arc({shape:{startAngle:-sf/2,endAngle:-sf/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001});o.animateShape(!0).when(1e3,{endAngle:3*sf/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:3*sf/2}).delay(300).start("circularInOut"),i.add(o)}return i.resize=function(){var i=Bn.getWidth(e.text,r),s=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-2*s-(e.showSpinner&&i?10:0)-i)/2-(e.showSpinner?0:i/2),u=t.getHeight()/2;e.showSpinner&&o.setShape({cx:l,cy:u}),a.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),n.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},i.resize(),i},uf=yt.each,hf=yt.map,cf=yt.isFunction,df=yt.createHashMap,ff=yt.noop,pf=fd.createTask,gf=mu.getUID,mf=ga.normalizeToArray;function vf(t,e,i,n){this.ecInstance=t,this.api=e,this.unfinished;i=this._dataProcessorHandlers=i.slice(),n=this._visualHandlers=n.slice();this._allHandlers=i.concat(n),this._stageTaskMap=df()}var yf=vf.prototype;function _f(t,e,i,n,r){var a;function o(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}r=r||{},uf(e,(function(e,s){if(!r.visualType||r.visualType===e.visualType){var l=t._stageTaskMap.get(e.uid),u=l.seriesTaskMap,h=l.overallTask;if(h){var c,d=h.agentStubMap;d.each((function(t){o(r,t)&&(t.dirty(),c=!0)})),c&&h.dirty(),xf(h,n);var f=t.getPerformArgs(h,r.block);d.each((function(t){t.perform(f)})),a|=h.perform(f)}else u&&u.each((function(s,l){o(r,s)&&s.dirty();var u=t.getPerformArgs(s,r.block);u.skip=!e.performRawSeries&&i.isSeriesFiltered(s.context.model),xf(s,n),a|=s.perform(u)}))}})),t.unfinished|=a}yf.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each((function(t){var e=t.overallTask;e&&e.dirty()}))},yf.getPerformArgs=function(t,e){if(t.__pipeline){var i=this._pipelineMap.get(t.__pipeline.id),n=i.context,r=!e&&i.progressiveEnabled&&(!n||n.progressiveRender)&&t.__idxInPipeline>i.blockIndex?i.step:null,a=n&&n.modDataCount;return{step:r,modBy:null!=a?Math.ceil(a/r):null,modDataCount:a}}},yf.getPipeline=function(t){return this._pipelineMap.get(t)},yf.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),n=t.getData().count(),r=i.progressiveEnabled&&e.incrementalPrepareRender&&n>=i.threshold,a=t.get("large")&&n>=t.get("largeThreshold"),o="mod"===t.get("progressiveChunkMode")?n:null;t.pipelineContext=i.context={progressiveRender:r,modDataCount:o,large:a}},yf.restorePipelines=function(t){var e=this,i=e._pipelineMap=df();t.eachSeries((function(t){var n=t.getProgressive(),r=t.uid;i.set(r,{id:r,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:n&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(n||700),count:0}),kf(e,t,t.dataTask)}))},yf.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.ecInstance.getModel(),i=this.api;uf(this._allHandlers,(function(n){var r=t.get(n.uid)||t.set(n.uid,[]);n.reset&&function(t,e,i,n,r){var a=i.seriesTaskMap||(i.seriesTaskMap=df()),o=e.seriesType,s=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(l):o?n.eachRawSeriesByType(o,l):s&&s(n,r).each(l);function l(i){var o=i.uid,s=a.get(o)||a.set(o,pf({plan:Mf,reset:Cf,count:Df}));s.context={model:i,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:t},kf(t,i,s)}var u=t._pipelineMap;a.each((function(t,e){u.get(e)||(t.dispose(),a.removeKey(e))}))}(this,n,r,e,i),n.overallReset&&function(t,e,i,n,r){var a=i.overallTask=i.overallTask||pf({reset:bf});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:t};var o=a.agentStubMap=a.agentStubMap||df(),s=e.seriesType,l=e.getTargetSeries,u=!0,h=e.modifyOutputEnd;s?n.eachRawSeriesByType(s,c):l?l(n,r).each(c):(u=!1,uf(n.getSeries(),c));function c(e){var i=e.uid,n=o.get(i);n||(n=o.set(i,pf({reset:wf,onDirty:Tf})),a.dirty()),n.context={model:e,overallProgress:u,modifyOutputEnd:h},n.agent=a,n.__block=u,kf(t,e,n)}var d=t._pipelineMap;o.each((function(t,e){d.get(e)||(t.dispose(),a.dirty(),o.removeKey(e))}))}(this,n,r,e,i)}),this)},yf.prepareView=function(t,e,i,n){var r=t.renderTask,a=r.context;a.model=e,a.ecModel=i,a.api=n,r.__block=!t.incrementalPrepareRender,kf(this,e,r)},yf.performDataProcessorTasks=function(t,e){_f(this,this._dataProcessorHandlers,t,e,{block:!0})},yf.performVisualTasks=function(t,e,i){_f(this,this._visualHandlers,t,e,i)},yf.performSeriesTasks=function(t){var e;t.eachSeries((function(t){e|=t.dataTask.perform()})),this.unfinished|=e},yf.plan=function(){this._pipelineMap.each((function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)}))};var xf=yf.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)};function bf(t){t.overallReset(t.ecModel,t.api,t.payload)}function wf(t,e){return t.overallProgress&&Sf}function Sf(){this.agent.dirty(),this.getDownstream().dirty()}function Tf(){this.agent&&this.agent.dirty()}function Mf(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function Cf(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=mf(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?hf(e,(function(t,e){return Af(e)})):If}var If=Af(0);function Af(t){return function(e,i){var n=i.data,r=i.resetDefines[t];if(r&&r.dataEach)for(var a=e.start;a<e.end;a++)r.dataEach(n,a);else r&&r.progress&&r.progress(e,n)}}function Df(t){return t.data.count()}function kf(t,e,i){var n=e.uid,r=t._pipelineMap.get(n);!r.head&&(r.head=i),r.tail&&r.tail.pipe(i),r.tail=i,i.__idxInPipeline=r.count++,i.__pipeline=r}function Of(t){Pf=null;try{t(Lf,Rf)}catch(t){}return Pf}vf.wrapStageHandler=function(t,e){return cf(t)&&(t={overallReset:t,seriesType:Of(t)}),t.uid=gf("stageHandler"),e&&(t.visualType=e),t};var Pf,Lf={},Rf={};function Ef(t,e){for(var i in e.prototype)t[i]=ff}Ef(Lf,Kh),Ef(Rf,Jh),Lf.eachSeriesByType=Lf.eachRawSeriesByType=function(t){Pf=t},Lf.eachComponent=function(t){"series"===t.mainType&&t.subType&&(Pf=t.subType)};var Bf=vf,zf=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],Nf={color:zf,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],zf]},Ff=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],Hf={color:Ff,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:Ff[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:Ff},gauge:{title:{textStyle:{color:"#eee"}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};Hf.categoryAxis.splitLine.show=!1;var Vf=Hf,Wf=Ph.detectSourceFormat,Gf=Ku.SERIES_LAYOUT_BY_COLUMN;Uu.extend({type:"dataset",defaultOption:{seriesLayoutBy:Gf,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){Wf(this)}}),Bd.extend({type:"dataset"});var Uf=zo.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(t,e){var i=.5522848,n=e.cx,r=e.cy,a=e.rx,o=e.ry,s=a*i,l=o*i;t.moveTo(n-a,r),t.bezierCurveTo(n-a,r-l,n-s,r-o,n,r-o),t.bezierCurveTo(n+s,r-o,n+a,r-l,n+a,r),t.bezierCurveTo(n+a,r+l,n+s,r+o,n,r+o),t.bezierCurveTo(n-s,r+o,n-a,r+l,n-a,r),t.closePath()}}),Yf=es.createFromString,jf=yt.isString,Xf=yt.extend,qf=yt.defaults,Zf=yt.trim,$f=yt.each,Kf=/[\s,]+/;function Qf(t){jf(t)&&(t=(new DOMParser).parseFromString(t,"text/xml"));for(9===t.nodeType&&(t=t.firstChild);"svg"!==t.nodeName.toLowerCase()||1!==t.nodeType;)t=t.nextSibling;return t}function Jf(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}Jf.prototype.parse=function(t,e){e=e||{};var i=Qf(t);if(!i)throw new Error("Illegal svg");var n=new Li;this._root=n;var r=i.getAttribute("viewBox")||"",a=parseFloat(i.getAttribute("width")||e.width),o=parseFloat(i.getAttribute("height")||e.height);isNaN(a)&&(a=null),isNaN(o)&&(o=null),ap(i,n,null,!0);for(var s,l,u=i.firstChild;u;)this._parseNode(u,n),u=u.nextSibling;if(r){var h=Zf(r).split(Kf);h.length>=4&&(s={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(s&&null!=a&&null!=o&&(l=hp(s,a,o),!e.ignoreViewBox)){var c=n;(n=new Li).add(c),c.scale=l.scale.slice(),c.position=l.position.slice()}return e.ignoreRootClip||null==a||null==o||n.setClipPath(new Ds({shape:{x:0,y:0,width:a,height:o}})),{root:n,width:a,height:o,viewBoxRect:s,viewBoxTransform:l}},Jf.prototype._parseNode=function(t,e){var i,n,r=t.nodeName.toLowerCase();if("defs"===r?this._isDefine=!0:"text"===r&&(this._isText=!0),this._isDefine){if(n=ep[r]){var a=n.call(this,t),o=t.getAttribute("id");o&&(this._defs[o]=a)}}else(n=tp[r])&&(i=n.call(this,t,e),e.add(i));for(var s=t.firstChild;s;)1===s.nodeType&&this._parseNode(s,i),3===s.nodeType&&this._isText&&this._parseText(s,i),s=s.nextSibling;"defs"===r?this._isDefine=!1:"text"===r&&(this._isText=!1)},Jf.prototype._parseText=function(t,e){if(1===t.nodeType){var i=t.getAttribute("dx")||0,n=t.getAttribute("dy")||0;this._textX+=parseFloat(i),this._textY+=parseFloat(n)}var r=new rs({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});ip(e,r),ap(t,r,this._defs);var a=r.style.fontSize;a&&a<9&&(r.style.fontSize=9,r.scale=r.scale||[1,1],r.scale[0]*=a/9,r.scale[1]*=a/9);var o=r.getBoundingRect();return this._textX+=o.width,e.add(r),r};var tp={g:function(t,e){var i=new Li;return ip(e,i),ap(t,i,this._defs),i},rect:function(t,e){var i=new Ds;return ip(e,i),ap(t,i,this._defs),i.setShape({x:parseFloat(t.getAttribute("x")||0),y:parseFloat(t.getAttribute("y")||0),width:parseFloat(t.getAttribute("width")||0),height:parseFloat(t.getAttribute("height")||0)}),i},circle:function(t,e){var i=new as;return ip(e,i),ap(t,i,this._defs),i.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),r:parseFloat(t.getAttribute("r")||0)}),i},line:function(t,e){var i=new Ps;return ip(e,i),ap(t,i,this._defs),i.setShape({x1:parseFloat(t.getAttribute("x1")||0),y1:parseFloat(t.getAttribute("y1")||0),x2:parseFloat(t.getAttribute("x2")||0),y2:parseFloat(t.getAttribute("y2")||0)}),i},ellipse:function(t,e){var i=new Uf;return ip(e,i),ap(t,i,this._defs),i.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),rx:parseFloat(t.getAttribute("rx")||0),ry:parseFloat(t.getAttribute("ry")||0)}),i},polygon:function(t,e){var i=t.getAttribute("points");i&&(i=np(i));var n=new ws({shape:{points:i||[]}});return ip(e,n),ap(t,n,this._defs),n},polyline:function(t,e){var i=new zo;ip(e,i),ap(t,i,this._defs);var n=t.getAttribute("points");return n&&(n=np(n)),new Ss({shape:{points:n||[]}})},image:function(t,e){var i=new xr;return ip(e,i),ap(t,i,this._defs),i.setStyle({image:t.getAttribute("xlink:href"),x:t.getAttribute("x"),y:t.getAttribute("y"),width:t.getAttribute("width"),height:t.getAttribute("height")}),i},text:function(t,e){var i=t.getAttribute("x")||0,n=t.getAttribute("y")||0,r=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0;this._textX=parseFloat(i)+parseFloat(r),this._textY=parseFloat(n)+parseFloat(a);var o=new Li;return ip(e,o),ap(t,o,this._defs),o},tspan:function(t,e){var i=t.getAttribute("x"),n=t.getAttribute("y");null!=i&&(this._textX=parseFloat(i)),null!=n&&(this._textY=parseFloat(n));var r=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0,o=new Li;return ip(e,o),ap(t,o,this._defs),this._textX+=r,this._textY+=a,o},path:function(t,e){var i=t.getAttribute("d")||"",n=Yf(i);return ip(e,n),ap(t,n,this._defs),n}},ep={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||0,10),i=parseInt(t.getAttribute("y1")||0,10),n=parseInt(t.getAttribute("x2")||10,10),r=parseInt(t.getAttribute("y2")||0,10),a=new Xs(e,i,n,r);return function(t,e){var i=t.firstChild;for(;i;){if(1===i.nodeType){var n=i.getAttribute("offset");n=n.indexOf("%")>0?parseInt(n,10)/100:n?parseFloat(n):0;var r=i.getAttribute("stop-color")||"#000000";e.addColorStop(n,r)}i=i.nextSibling}}(t,a),a},radialgradient:function(t){}};function ip(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),qf(e.__inheritedStyle,t.__inheritedStyle))}function np(t){for(var e=Zf(t).split(Kf),i=[],n=0;n<e.length;n+=2){var r=parseFloat(e[n]),a=parseFloat(e[n+1]);i.push([r,a])}return i}var rp={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 ap(t,e,i,n){var r=e.__inheritedStyle||{},a="text"===e.type;if(1===t.nodeType&&(function(t,e){var i=t.getAttribute("transform");if(i){i=i.replace(/,/g," ");var n=null,r=[];i.replace(lp,(function(t,e,i){r.push(e,i)}));for(var a=r.length-1;a>0;a-=2){var o=r[a],s=r[a-1];switch(n=n||he.create(),s){case"translate":o=Zf(o).split(Kf),he.translate(n,n,[parseFloat(o[0]),parseFloat(o[1]||0)]);break;case"scale":o=Zf(o).split(Kf),he.scale(n,n,[parseFloat(o[0]),parseFloat(o[1]||o[0])]);break;case"rotate":o=Zf(o).split(Kf),he.rotate(n,n,parseFloat(o[0]));break;case"skew":o=Zf(o).split(Kf),console.warn("Skew transform is not supported yet");break;case"matrix":o=Zf(o).split(Kf);n[0]=parseFloat(o[0]),n[1]=parseFloat(o[1]),n[2]=parseFloat(o[2]),n[3]=parseFloat(o[3]),n[4]=parseFloat(o[4]),n[5]=parseFloat(o[5])}}e.setLocalTransform(n)}}(t,e),Xf(r,function(t){var e=t.getAttribute("style"),i={};if(!e)return i;var n,r={};up.lastIndex=0;for(;null!=(n=up.exec(e));)r[n[1]]=n[2];for(var a in rp)rp.hasOwnProperty(a)&&null!=r[a]&&(i[rp[a]]=r[a]);return i}(t)),!n))for(var o in rp)if(rp.hasOwnProperty(o)){var s=t.getAttribute(o);null!=s&&(r[rp[o]]=s)}var l=a?"textFill":"fill",u=a?"textStroke":"stroke";e.style=e.style||new tn;var h=e.style;null!=r.fill&&h.set(l,sp(r.fill,i)),null!=r.stroke&&h.set(u,sp(r.stroke,i)),$f(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],(function(t){var e="lineWidth"===t&&a?"textStrokeWidth":t;null!=r[t]&&h.set(e,parseFloat(r[t]))})),r.textBaseline&&"auto"!==r.textBaseline||(r.textBaseline="alphabetic"),"alphabetic"===r.textBaseline&&(r.textBaseline="bottom"),"start"===r.textAlign&&(r.textAlign="left"),"end"===r.textAlign&&(r.textAlign="right"),$f(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],(function(t){null!=r[t]&&h.set(t,r[t])})),r.lineDash&&(e.style.lineDash=Zf(r.lineDash).split(Kf)),h[u]&&"none"!==h[u]&&(e[u]=!0),e.__inheritedStyle=r}var op=/url\(\s*#(.*?)\)/;function sp(t,e){var i=e&&t&&t.match(op);return i?e[Zf(i[1])]:t}var lp=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;var up=/([^\s:;]+)\s*:\s*([^:;]+)/g;function hp(t,e,i){var n=e/t.width,r=i/t.height,a=Math.min(n,r);return{scale:[a,a],position:[-(t.x+t.width/2)*a+e/2,-(t.y+t.height/2)*a+i/2]}}var cp={parseXML:Qf,makeViewBoxTransform:hp,parseSVG:function(t,e){return(new Jf).parse(t,e)}},dp=yt.createHashMap,fp=yt.isString,pp=yt.isArray,gp=yt.each,mp=cp.parseXML,vp=dp(),yp={registerMap:function(t,e,i){var n;return pp(e)?n=e:e.svg?n=[{type:"svg",source:e.svg,specialAreas:e.specialAreas}]:(e.geoJson&&!e.features&&(i=e.specialAreas,e=e.geoJson),n=[{type:"geoJSON",source:e,specialAreas:i}]),gp(n,(function(t){var e=t.type;"geoJson"===e&&(e=t.type="geoJSON"),(0,_p[e])(t)})),vp.set(t,n)},retrieveMap:function(t){return vp.get(t)}},_p={geoJSON:function(t){var e=t.source;t.geoJSON=fp(e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=mp(t.source)}},xp=yp;function bp(t){return t}function wp(t,e,i,n,r){this._old=t,this._new=e,this._oldKeyGetter=i||bp,this._newKeyGetter=n||bp,this.context=r}function Sp(t,e,i,n,r){for(var a=0;a<t.length;a++){var o="_ec_"+r[n](t[a],a),s=e[o];null==s?(i.push(o),e[o]=a):(s.length||(e[o]=s=[s]),s.push(a))}}wp.prototype={constructor:wp,add:function(t){return this._add=t,this},update:function(t){return this._update=t,this},remove:function(t){return this._remove=t,this},execute:function(){var t=this._old,e=this._new,i={},n=[],r=[];for(Sp(t,{},n,"_oldKeyGetter",this),Sp(e,i,r,"_newKeyGetter",this),a=0;a<t.length;a++){if(null!=(s=i[o=n[a]]))(u=s.length)?(1===u&&(i[o]=null),s=s.shift()):i[o]=null,this._update&&this._update(s,a);else this._remove&&this._remove(a)}for(var a=0;a<r.length;a++){var o=r[a];if(i.hasOwnProperty(o)){var s;if(null==(s=i[o]))continue;if(s.length)for(var l=0,u=s.length;l<u;l++)this._add&&this._add(s[l]);else this._add&&this._add(s)}}}};var Tp=wp,Mp=yt.each,Cp=yt.createHashMap,Ip=Cp(["tooltip","label","itemName","itemId","seriesName"]);function Ap(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}var Dp={OTHER_DIMENSIONS:Ip,summarizeDimensions:function(t){var e={},i=e.encode={},n=Cp(),r=[],a=[],o=e.userOutput={dimensionNames:t.dimensions.slice(),encode:{}};Mp(t.dimensions,(function(e){var s,l=t.getDimensionInfo(e),u=l.coordDim;if(u){var h=l.coordDimIndex;Ap(i,u)[h]=e,l.isExtraCoord||(n.set(u,1),"ordinal"!==(s=l.type)&&"time"!==s&&(r[0]=e),Ap(o.encode,u)[h]=l.index),l.defaultTooltip&&a.push(e)}Ip.each((function(t,e){var n=Ap(i,e),r=l.otherDims[e];null!=r&&!1!==r&&(n[r]=l.name)}))}));var s=[],l={};n.each((function(t,e){var n=i[e];l[e]=n[0],s=s.concat(n)})),e.dataDimsOnCoord=s,e.encodeFirstDimNotExtra=l;var u=i.label;u&&u.length&&(r=u.slice());var h=i.tooltip;return h&&h.length?a=h.slice():a.length||(a=r.slice()),i.defaultedLabel=r,i.defaultedTooltip=a,e},getDimensionTypeByAxis:function(t){return"category"===t?"ordinal":"time"===t?"time":"float"}};var kp=function(t){null!=t&&yt.extend(this,t),this.otherDims={}},Op=ed.defaultDimValueGetters,Pp=ed.DefaultDataProvider,Lp=Dp.summarizeDimensions,Rp=yt.isObject,Ep={float:"undefined"==typeof Float64Array?Array:Float64Array,int:"undefined"==typeof Int32Array?Array:Int32Array,ordinal:Array,number:Array,time:Array},Bp="undefined"==typeof Uint32Array?Array:Uint32Array,zp="undefined"==typeof Int32Array?Array:Int32Array,Np="undefined"==typeof Uint16Array?Array:Uint16Array;function Fp(t){return t._rawCount>65535?Bp:Np}var Hp=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],Vp=["_extent","_approximateExtent","_rawExtent"];function Wp(t,e){yt.each(Hp.concat(e.__wrappedMethods||[]),(function(i){e.hasOwnProperty(i)&&(t[i]=e[i])})),t.__wrappedMethods=e.__wrappedMethods,yt.each(Vp,(function(i){t[i]=yt.clone(e[i])})),t._calculationInfo=yt.extend(e._calculationInfo)}var Gp=function(t,e){t=t||["x","y"];for(var i={},n=[],r={},a=0;a<t.length;a++){var o=t[a];yt.isString(o)?o=new kp({name:o}):o instanceof kp||(o=new kp(o));var s=o.name;o.type=o.type||"float",o.coordDim||(o.coordDim=s,o.coordDimIndex=0),o.otherDims=o.otherDims||{},n.push(s),i[s]=o,o.index=a,o.createInvertedIndices&&(r[s]=[])}this.dimensions=n,this._dimensionInfos=i,this.hostModel=e,this.dataType,this._indices=null,this._count=0,this._rawCount=0,this._storage={},this._nameList=[],this._idList=[],this._optionModels=[],this._visual={},this._layout={},this._itemVisuals=[],this.hasItemVisual={},this._itemLayouts=[],this._graphicEls=[],this._chunkSize=1e5,this._chunkCount=0,this._rawData,this._rawExtent={},this._extent={},this._approximateExtent={},this._dimensionsSummary=Lp(this),this._invertedIndicesMap=r,this._calculationInfo={},this.userOutput=this._dimensionsSummary.userOutput},Up=Gp.prototype;function Yp(t,e,i,n,r){var a=Ep[e.type],o=n-1,s=e.name,l=t[s][o];if(l&&l.length<i){for(var u=new a(Math.min(r-o*i,i)),h=0;h<l.length;h++)u[h]=l[h];t[s][o]=u}for(var c=n*i;c<r;c+=i)t[s].push(new a(Math.min(r-c,i)))}function jp(t){var e=t._invertedIndicesMap;yt.each(e,(function(i,n){var r=t._dimensionInfos[n].ordinalMeta;if(r){i=e[n]=new zp(r.categories.length);for(var a=0;a<i.length;a++)i[a]=-1;for(a=0;a<t._count;a++)i[t.get(n,a)]=a}}))}function Xp(t,e,i){var n;if(null!=e){var r=t._chunkSize,a=Math.floor(i/r),o=i%r,s=t.dimensions[e],l=t._storage[s][a];if(l){n=l[o];var u=t._dimensionInfos[s].ordinalMeta;u&&u.categories.length&&(n=u.categories[n])}}return n}function qp(t){return t}function Zp(t){return t<this._count&&t>=0?this._indices[t]:-1}function $p(t,e){var i=t._idList[e];return null==i&&(i=Xp(t,t._idDimIdx,e)),null==i&&(i="e\0\0"+e),i}function Kp(t){return yt.isArray(t)||(t=[t]),t}function Qp(t,e){var i=t.dimensions,n=new Gp(yt.map(i,t.getDimensionInfo,t),t.hostModel);Wp(n,t);for(var r=n._storage={},a=t._storage,o=0;o<i.length;o++){var s=i[o];a[s]&&(yt.indexOf(e,s)>=0?(r[s]=Jp(a[s]),n._rawExtent[s]=tg(),n._extent[s]=null):r[s]=a[s])}return n}function Jp(t){for(var e,i,n=new Array(t.length),r=0;r<t.length;r++)n[r]=(e=t[r],i=void 0,(i=e.constructor)===Array?e.slice():new i(e));return n}function tg(){return[1/0,-1/0]}Up.type="list",Up.hasItemOption=!0,Up.getDimension=function(t){return"number"!=typeof t&&(isNaN(t)||this._dimensionInfos.hasOwnProperty(t))||(t=this.dimensions[t]),t},Up.getDimensionInfo=function(t){return this._dimensionInfos[this.getDimension(t)]},Up.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},Up.mapDimension=function(t,e){var i=this._dimensionsSummary;if(null==e)return i.encodeFirstDimNotExtra[t];var n=i.encode[t];return!0===e?(n||[]).slice():n&&n[e]},Up.initData=function(t,e,i){(sh.isInstance(t)||yt.isArrayLike(t))&&(t=new Pp(t,this.dimensions.length)),this._rawData=t,this._storage={},this._indices=null,this._nameList=e||[],this._idList=[],this._nameRepeatCount={},i||(this.hasItemOption=!1),this.defaultDimValueGetter=Op[this._rawData.getSource().sourceFormat],this._dimValueGetter=i=i||this.defaultDimValueGetter,this._dimValueGetterArrayRows=Op.arrayRows,this._rawExtent={},this._initDataFromProvider(0,t.count()),t.pure&&(this.hasItemOption=!1)},Up.getProvider=function(){return this._rawData},Up.appendData=function(t){var e=this._rawData,i=this.count();e.appendData(t);var n=e.count();e.persistent||(n+=i),this._initDataFromProvider(i,n)},Up.appendValues=function(t,e){for(var i=this._chunkSize,n=this._storage,r=this.dimensions,a=r.length,o=this._rawExtent,s=this.count(),l=s+Math.max(t.length,e?e.length:0),u=this._chunkCount,h=0;h<a;h++){o[v=r[h]]||(o[v]=tg()),n[v]||(n[v]=[]),Yp(n,this._dimensionInfos[v],i,u,l),this._chunkCount=n[v].length}for(var c=new Array(a),d=s;d<l;d++){for(var f=d-s,p=Math.floor(d/i),g=d%i,m=0;m<a;m++){var v=r[m],y=this._dimValueGetterArrayRows(t[f]||c,v,f,m);n[v][p][g]=y;var _=o[v];y<_[0]&&(_[0]=y),y>_[1]&&(_[1]=y)}e&&(this._nameList[d]=e[f])}this._rawCount=this._count=l,this._extent={},jp(this)},Up._initDataFromProvider=function(t,e){if(!(t>=e)){for(var i,n=this._chunkSize,r=this._rawData,a=this._storage,o=this.dimensions,s=o.length,l=this._dimensionInfos,u=this._nameList,h=this._idList,c=this._rawExtent,d=this._nameRepeatCount={},f=this._chunkCount,p=0;p<s;p++){c[b=o[p]]||(c[b]=tg());var g=l[b];0===g.otherDims.itemName&&(i=this._nameDimIdx=p),0===g.otherDims.itemId&&(this._idDimIdx=p),a[b]||(a[b]=[]),Yp(a,g,n,f,e),this._chunkCount=a[b].length}for(var m=new Array(s),v=t;v<e;v++){m=r.getItem(v,m);for(var y=Math.floor(v/n),_=v%n,x=0;x<s;x++){var b,w=a[b=o[x]][y],S=this._dimValueGetter(m,b,v,x);w[_]=S;var T=c[b];S<T[0]&&(T[0]=S),S>T[1]&&(T[1]=S)}if(!r.pure){var M=u[v];if(m&&null==M)if(null!=m.name)u[v]=M=m.name;else if(null!=i){var C=o[i],I=a[C][y];if(I){M=I[_];var A=l[C].ordinalMeta;A&&A.categories.length&&(M=A.categories[M])}}var D=null==m?null:m.id;null==D&&null!=M&&(d[M]=d[M]||0,D=M,d[M]>0&&(D+="__ec__"+d[M]),d[M]++),null!=D&&(h[v]=D)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=e,this._extent={},jp(this)}},Up.count=function(){return this._count},Up.getIndices=function(){var t=this._indices;if(t){var e=t.constructor,i=this._count;if(e===Array){r=new e(i);for(var n=0;n<i;n++)r[n]=t[n]}else r=new e(t.buffer,0,i)}else{var r=new(e=Fp(this))(this.count());for(n=0;n<r.length;n++)r[n]=n}return r},Up.get=function(t,e){if(!(e>=0&&e<this._count))return NaN;var i=this._storage;if(!i[t])return NaN;e=this.getRawIndex(e);var n=Math.floor(e/this._chunkSize),r=e%this._chunkSize;return i[t][n][r]},Up.getByRawIndex=function(t,e){if(!(e>=0&&e<this._rawCount))return NaN;var i=this._storage[t];if(!i)return NaN;var n=Math.floor(e/this._chunkSize),r=e%this._chunkSize;return i[n][r]},Up._getFast=function(t,e){var i=Math.floor(e/this._chunkSize),n=e%this._chunkSize;return this._storage[t][i][n]},Up.getValues=function(t,e){var i=[];yt.isArray(t)||(e=t,t=this.dimensions);for(var n=0,r=t.length;n<r;n++)i.push(this.get(t[n],e));return i},Up.hasValue=function(t){for(var e=this._dimensionsSummary.dataDimsOnCoord,i=0,n=e.length;i<n;i++)if(isNaN(this.get(e[i],t)))return!1;return!0},Up.getDataExtent=function(t){t=this.getDimension(t);var e=this._storage[t],i=tg();if(!e)return i;var n,r=this.count();if(!this._indices)return this._rawExtent[t].slice();if(n=this._extent[t])return n.slice();for(var a=(n=i)[0],o=n[1],s=0;s<r;s++){var l=this._getFast(t,this.getRawIndex(s));l<a&&(a=l),l>o&&(o=l)}return n=[a,o],this._extent[t]=n,n},Up.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},Up.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},Up.getCalculationInfo=function(t){return this._calculationInfo[t]},Up.setCalculationInfo=function(t,e){Rp(t)?yt.extend(this._calculationInfo,t):this._calculationInfo[t]=e},Up.getSum=function(t){var e=0;if(this._storage[t])for(var i=0,n=this.count();i<n;i++){var r=this.get(t,i);isNaN(r)||(e+=r)}return e},Up.getMedian=function(t){var e=[];this.each(t,(function(t,i){isNaN(t)||e.push(t)}));var i=[].concat(e).sort((function(t,e){return t-e})),n=this.count();return 0===n?0:n%2==1?i[(n-1)/2]:(i[n/2]+i[n/2-1])/2},Up.rawIndexOf=function(t,e){var i=(t&&this._invertedIndicesMap[t])[e];return null==i||isNaN(i)?-1:i},Up.indexOfName=function(t){for(var e=0,i=this.count();e<i;e++)if(this.getName(e)===t)return e;return-1},Up.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,i=e[t];if(null!=i&&i<this._count&&i===t)return t;for(var n=0,r=this._count-1;n<=r;){var a=(n+r)/2|0;if(e[a]<t)n=a+1;else{if(!(e[a]>t))return a;r=a-1}}return-1},Up.indicesOfNearest=function(t,e,i){var n=[];if(!this._storage[t])return n;null==i&&(i=1/0);for(var r=1/0,a=-1,o=0,s=0,l=this.count();s<l;s++){var u=e-this.get(t,s),h=Math.abs(u);h<=i&&((h<r||h===r&&u>=0&&a<0)&&(r=h,a=u,o=0),u===a&&(n[o++]=s))}return n.length=o,n},Up.getRawIndex=qp,Up.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],i=0;i<this.dimensions.length;i++){var n=this.dimensions[i];e.push(this.get(n,t))}return e},Up.getName=function(t){var e=this.getRawIndex(t);return this._nameList[e]||Xp(this,this._nameDimIdx,e)||""},Up.getId=function(t){return $p(this,this.getRawIndex(t))},Up.each=function(t,e,i,n){if(this._count){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this;for(var r=(t=yt.map(Kp(t),this.getDimension,this)).length,a=0;a<this.count();a++)switch(r){case 0:e.call(i,a);break;case 1:e.call(i,this.get(t[0],a),a);break;case 2:e.call(i,this.get(t[0],a),this.get(t[1],a),a);break;default:for(var o=0,s=[];o<r;o++)s[o]=this.get(t[o],a);s[o]=a,e.apply(i,s)}}},Up.filterSelf=function(t,e,i,n){if(this._count){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this,t=yt.map(Kp(t),this.getDimension,this);for(var r=this.count(),a=new(Fp(this))(r),o=[],s=t.length,l=0,u=t[0],h=0;h<r;h++){var c,d=this.getRawIndex(h);if(0===s)c=e.call(i,h);else if(1===s){var f=this._getFast(u,d);c=e.call(i,f,h)}else{for(var p=0;p<s;p++)o[p]=this._getFast(u,d);o[p]=h,c=e.apply(i,o)}c&&(a[l++]=d)}return l<r&&(this._indices=a),this._count=l,this._extent={},this.getRawIndex=this._indices?Zp:qp,this}},Up.selectRange=function(t){if(this._count){var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(i);var n=e.length;if(n){var r=this.count(),a=new(Fp(this))(r),o=0,s=e[0],l=t[s][0],u=t[s][1],h=!1;if(!this._indices){var c=0;if(1===n){for(var d=this._storage[e[0]],f=0;f<this._chunkCount;f++)for(var p=d[f],g=Math.min(this._count-f*this._chunkSize,this._chunkSize),m=0;m<g;m++){((b=p[m])>=l&&b<=u||isNaN(b))&&(a[o++]=c),c++}h=!0}else if(2===n){d=this._storage[s];var v=this._storage[e[1]],y=t[e[1]][0],_=t[e[1]][1];for(f=0;f<this._chunkCount;f++){p=d[f];var x=v[f];for(g=Math.min(this._count-f*this._chunkSize,this._chunkSize),m=0;m<g;m++){var b=p[m],w=x[m];(b>=l&&b<=u||isNaN(b))&&(w>=y&&w<=_||isNaN(w))&&(a[o++]=c),c++}}h=!0}}if(!h)if(1===n)for(m=0;m<r;m++){var S=this.getRawIndex(m);((b=this._getFast(s,S))>=l&&b<=u||isNaN(b))&&(a[o++]=S)}else for(m=0;m<r;m++){var T=!0;for(S=this.getRawIndex(m),f=0;f<n;f++){var M=e[f];((b=this._getFast(i,S))<t[M][0]||b>t[M][1])&&(T=!1)}T&&(a[o++]=this.getRawIndex(m))}return o<r&&(this._indices=a),this._count=o,this._extent={},this.getRawIndex=this._indices?Zp:qp,this}}},Up.mapArray=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this;var r=[];return this.each(t,(function(){r.push(e&&e.apply(this,arguments))}),i),r},Up.map=function(t,e,i,n){i=i||n||this;var r=Qp(this,t=yt.map(Kp(t),this.getDimension,this));r._indices=this._indices,r.getRawIndex=r._indices?Zp:qp;for(var a=r._storage,o=[],s=this._chunkSize,l=t.length,u=this.count(),h=[],c=r._rawExtent,d=0;d<u;d++){for(var f=0;f<l;f++)h[f]=this.get(t[f],d);h[l]=d;var p=e&&e.apply(i,h);if(null!=p){"object"!=typeof p&&(o[0]=p,p=o);for(var g=this.getRawIndex(d),m=Math.floor(g/s),v=g%s,y=0;y<p.length;y++){var _=t[y],x=p[y],b=c[_],w=a[_];w&&(w[m][v]=x),x<b[0]&&(b[0]=x),x>b[1]&&(b[1]=x)}}}return r},Up.downSample=function(t,e,i,n){for(var r=Qp(this,[t]),a=r._storage,o=[],s=Math.floor(1/e),l=a[t],u=this.count(),h=this._chunkSize,c=r._rawExtent[t],d=new(Fp(this))(u),f=0,p=0;p<u;p+=s){s>u-p&&(s=u-p,o.length=s);for(var g=0;g<s;g++){var m=this.getRawIndex(p+g),v=Math.floor(m/h),y=m%h;o[g]=l[v][y]}var _=i(o),x=this.getRawIndex(Math.min(p+n(o,_)||0,u-1)),b=x%h;l[Math.floor(x/h)][b]=_,_<c[0]&&(c[0]=_),_>c[1]&&(c[1]=_),d[f++]=x}return r._count=f,r._indices=d,r.getRawIndex=Zp,r},Up.getItemModel=function(t){var e=this.hostModel;return new fu(this.getRawDataItem(t),e,e&&e.ecModel)},Up.diff=function(t){var e=this;return new Tp(t?t.getIndices():[],this.getIndices(),(function(e){return $p(t,e)}),(function(t){return $p(e,t)}))},Up.getVisual=function(t){var e=this._visual;return e&&e[t]},Up.setVisual=function(t,e){if(Rp(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},Up.setLayout=function(t,e){if(Rp(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},Up.getLayout=function(t){return this._layout[t]},Up.getItemLayout=function(t){return this._itemLayouts[t]},Up.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?yt.extend(this._itemLayouts[t]||{},e):e},Up.clearItemLayouts=function(){this._itemLayouts.length=0},Up.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],r=n&&n[e];return null!=r||i?r:this.getVisual(e)},Up.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{},r=this.hasItemVisual;if(this._itemVisuals[t]=n,Rp(e))for(var a in e)e.hasOwnProperty(a)&&(n[a]=e[a],r[a]=!0);else n[e]=i,r[e]=!0},Up.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var eg=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};Up.setItemGraphicEl=function(t,e){var i=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=i&&i.seriesIndex,"group"===e.type&&e.traverse(eg,e)),this._graphicEls[t]=e},Up.getItemGraphicEl=function(t){return this._graphicEls[t]},Up.eachItemGraphicEl=function(t,e){yt.each(this._graphicEls,(function(i,n){i&&t&&t.call(e,i,n)}))},Up.cloneShallow=function(t){if(!t){var e=yt.map(this.dimensions,this.getDimensionInfo,this);t=new Gp(e,this.hostModel)}if(t._storage=this._storage,Wp(t,this),this._indices){var i=this._indices.constructor;t._indices=new i(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?Zp:qp,t},Up.wrapMethod=function(t,e){var i=this[t];"function"==typeof i&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=i.apply(this,arguments);return e.apply(this,[t].concat(yt.slice(arguments)))})},Up.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],Up.CHANGABLE_METHODS=["filterSelf","selectRange"];var ig=Gp,ng=yt.createHashMap,rg=yt.each,ag=yt.isString,og=yt.defaults,sg=yt.extend,lg=yt.isObject,ug=yt.clone,hg=ga.normalizeToArray,cg=Ph.guessOrdinal,dg=Ph.BE_ORDINAL,fg=Dp.OTHER_DIMENSIONS;function pg(t,e,i){if(i||null!=e.get(t)){for(var n=0;null!=e.get(t+n);)n++;t+=n}return e.set(t,!0),t}var gg=function(t,e,i){sh.isInstance(e)||(e=sh.seriesDataToSource(e)),i=i||{},t=(t||[]).slice();for(var n=(i.dimsDef||[]).slice(),r=ng(),a=ng(),o=[],s=function(t,e,i,n){var r=Math.max(t.dimensionsDetectCount||1,e.length,i.length,n||0);return rg(e,(function(t){var e=t.dimsDef;e&&(r=Math.max(r,e.length))})),r}(e,t,n,i.dimCount),l=0;l<s;l++){var u=n[l]=sg({},lg(n[l])?n[l]:{name:n[l]}),h=u.name,c=o[l]=new kp;null!=h&&null==r.get(h)&&(c.name=c.displayName=h,r.set(h,l)),null!=u.type&&(c.type=u.type),null!=u.displayName&&(c.displayName=u.displayName)}var d=i.encodeDef;!d&&i.encodeDefaulter&&(d=i.encodeDefaulter(e,s)),(d=ng(d)).each((function(t,e){if(1===(t=hg(t).slice()).length&&!ag(t[0])&&t[0]<0)d.set(e,!1);else{var i=d.set(e,[]);rg(t,(function(t,n){ag(t)&&(t=r.get(t)),null!=t&&t<s&&(i[n]=t,p(o[t],e,n))}))}}));var f=0;function p(t,e,i){null!=fg.get(e)?t.otherDims[e]=i:(t.coordDim=e,t.coordDimIndex=i,a.set(e,!0))}rg(t,(function(t,e){var i,n,r;if(ag(t))i=t,t={};else{i=t.name;var a=t.ordinalMeta;t.ordinalMeta=null,(t=ug(t)).ordinalMeta=a,n=t.dimsDef,r=t.otherDims,t.name=t.coordDim=t.coordDimIndex=t.dimsDef=t.otherDims=null}if(!1!==(s=d.get(i))){var s;if(!(s=hg(s)).length)for(var l=0;l<(n&&n.length||1);l++){for(;f<o.length&&null!=o[f].coordDim;)f++;f<o.length&&s.push(f++)}rg(s,(function(e,a){var s=o[e];if(p(og(s,t),i,a),null==s.name&&n){var l=n[a];!lg(l)&&(l={name:l}),s.name=s.displayName=l.name,s.defaultTooltip=l.defaultTooltip}r&&og(s.otherDims,r)}))}}));var g=i.generateCoord,m=i.generateCoordCount,v=null!=m;m=g?m||1:0;for(var y=g||"value",_=0;_<s;_++){null==(c=o[_]=o[_]||new kp).coordDim&&(c.coordDim=pg(y,a,v),c.coordDimIndex=0,(!g||m<=0)&&(c.isExtraCoord=!0),m--),null==c.name&&(c.name=pg(c.coordDim,r)),null!=c.type||cg(e,_,c.name)!==dg.Must&&(!c.isExtraCoord||null==c.otherDims.itemName&&null==c.otherDims.seriesName)||(c.type="ordinal")}return o};var mg=function(t,e){return gg((e=e||{}).coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,encodeDefaulter:e.encodeDefaulter,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})},vg=yt.createHashMap,yg=yt.each;function _g(t){this.coordSysName=t,this.coordSysDims=[],this.axisMap=vg(),this.categoryAxisMap=vg(),this.firstCategoryDimIndex=null}var xg={cartesian2d:function(t,e,i,n){var r=t.getReferringComponents("xAxis")[0],a=t.getReferringComponents("yAxis")[0];e.coordSysDims=["x","y"],i.set("x",r),i.set("y",a),bg(r)&&(n.set("x",r),e.firstCategoryDimIndex=0),bg(a)&&(n.set("y",a),e.firstCategoryDimIndex,e.firstCategoryDimIndex=1)},singleAxis:function(t,e,i,n){var r=t.getReferringComponents("singleAxis")[0];e.coordSysDims=["single"],i.set("single",r),bg(r)&&(n.set("single",r),e.firstCategoryDimIndex=0)},polar:function(t,e,i,n){var r=t.getReferringComponents("polar")[0],a=r.findAxisModel("radiusAxis"),o=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],i.set("radius",a),i.set("angle",o),bg(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),bg(o)&&(n.set("angle",o),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e,i,n){e.coordSysDims=["lng","lat"]},parallel:function(t,e,i,n){var r=t.ecModel,a=r.getComponent("parallel",t.get("parallelIndex")),o=e.coordSysDims=a.dimensions.slice();yg(a.parallelAxisIndex,(function(t,a){var s=r.getComponent("parallelAxis",t),l=o[a];i.set(l,s),bg(s)&&null==e.firstCategoryDimIndex&&(n.set(l,s),e.firstCategoryDimIndex=a)}))}};function bg(t){return"category"===t.get("type")}var wg={getCoordSysInfoBySeries:function(t){var e=t.get("coordinateSystem"),i=new _g(e),n=xg[e];if(n)return n(t,i,i.axisMap,i.categoryAxisMap),i}},Sg=yt.each,Tg=yt.isString;function Mg(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}var Cg={enableDataStack:function(t,e,i){var n,r,a,o,s=(i=i||{}).byIndex,l=i.stackedCoordDimension,u=!(!t||!t.get("stack"));if(Sg(e,(function(t,i){Tg(t)&&(e[i]=t={name:t}),u&&!t.isExtraCoord&&(s||n||!t.ordinalMeta||(n=t),r||"ordinal"===t.type||"time"===t.type||l&&l!==t.coordDim||(r=t))})),!r||s||n||(s=!0),r){a="__\0ecstackresult",o="__\0ecstackedover",n&&(n.createInvertedIndices=!0);var h=r.coordDim,c=r.type,d=0;Sg(e,(function(t){t.coordDim===h&&d++})),e.push({name:a,coordDim:h,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0}),d++,e.push({name:o,coordDim:o,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:r&&r.name,stackedByDimension:n&&n.name,isStackedByIndex:s,stackedOverDimension:o,stackResultDimension:a}},isDimensionStacked:Mg,getStackedDimension:function(t,e){return Mg(t,e)?t.getCalculationInfo("stackResultDimension"):e}},Ig=Ku.SOURCE_FORMAT_ORIGINAL,Ag=Dp.getDimensionTypeByAxis,Dg=ga.getDataItemValue,kg=wg.getCoordSysInfoBySeries,Og=Cg.enableDataStack,Pg=Ph.makeSeriesEncodeForAxisCoordSys;var Lg=function(t,e,i){i=i||{},sh.isInstance(t)||(t=sh.seriesDataToSource(t));var n,r=e.get("coordinateSystem"),a=ic.get(r),o=kg(e);o&&(n=yt.map(o.coordSysDims,(function(t){var e={name:t},i=o.axisMap.get(t);if(i){var n=i.get("type");e.type=Ag(n)}return e}))),n||(n=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]);var s,l,u=mg(t,{coordDimensions:n,generateCoord:i.generateCoord,encodeDefaulter:i.useEncodeDefaulter?yt.curry(Pg,n,e):null});o&&yt.each(u,(function(t,e){var i=t.coordDim,n=o.categoryAxisMap.get(i);n&&(null==s&&(s=e),t.ordinalMeta=n.getOrdinalMeta()),null!=t.otherDims.itemName&&(l=!0)})),l||null==s||(u[s].otherDims.itemName=0);var h=Og(e,u),c=new ig(u,e);c.setCalculationInfo(h);var d=null!=s&&function(t){if(t.sourceFormat===Ig){var e=function(t){var e=0;for(;e<t.length&&null==t[e];)e++;return t[e]}(t.data||[]);return null!=e&&!yt.isArray(Dg(e))}}(t)?function(t,e,i,n){return n===s?i:this.defaultDimValueGetter(t,e,i,n)}:null;return c.hasItemOption=!1,c.initData(t,null,d),c};function Rg(t){this._setting=t||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}Rg.prototype.parse=function(t){return t},Rg.prototype.getSetting=function(t){return this._setting[t]},Rg.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},Rg.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},Rg.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},Rg.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},Rg.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},Rg.prototype.getExtent=function(){return this._extent.slice()},Rg.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},Rg.prototype.isBlank=function(){return this._isBlank},Rg.prototype.setBlank=function(t){this._isBlank=t},Rg.prototype.getLabel=null,ba.enableClassExtend(Rg),ba.enableClassManagement(Rg,{registerWhenExtend:!0});var Eg=Rg,Bg=yt.createHashMap,zg=yt.isObject,Ng=yt.map;function Fg(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this._map}Fg.createByAxisModel=function(t){var e=t.option,i=e.data,n=i&&Ng(i,Wg);return new Fg({categories:n,needCollect:!n,deduplication:!1!==e.dedplication})};var Hg=Fg.prototype;function Vg(t){return t._map||(t._map=Bg(t.categories))}function Wg(t){return zg(t)&&null!=t.value?t.value:t+""}Hg.getOrdinal=function(t){return Vg(this).get(t)},Hg.parseAndCollect=function(t){var e,i=this._needCollect;if("string"!=typeof t&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var n=Vg(this);return null==(e=n.get(t))&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=NaN),e};var Gg=Fg,Ug=Eg.prototype,Yg=Eg.extend({type:"ordinal",init:function(t,e){t&&!yt.isArray(t)||(t=new Gg({categories:t})),this._ordinalMeta=t,this._extent=e||[0,t.categories.length-1]},parse:function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},contain:function(t){return t=this.parse(t),Ug.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return Ug.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(Ug.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,i=e[0];i<=e[1];)t.push(i),i++;return t},getLabel:function(t){if(!this.isBlank())return this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:yt.noop,niceExtent:yt.noop});Yg.create=function(){return new Yg};var jg=Yg,Xg=_u.round;function qg(t){return _u.getPrecisionSafe(t)+2}function Zg(t,e,i){t[e]=Math.max(Math.min(t[e],i[1]),i[0])}function $g(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),Zg(t,0,e),Zg(t,1,e),t[0]>t[1]&&(t[0]=t[1])}var Kg={intervalScaleNiceTicks:function(t,e,i,n){var r={},a=t[1]-t[0],o=r.interval=_u.nice(a/e,!0);null!=i&&o<i&&(o=r.interval=i),null!=n&&o>n&&(o=r.interval=n);var s=r.intervalPrecision=qg(o);return $g(r.niceTickExtent=[Xg(Math.ceil(t[0]/o)*o,s),Xg(Math.floor(t[1]/o)*o,s)],t),r},getIntervalPrecision:qg,fixExtent:$g},Qg=_u.round,Jg=Eg.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(e)||(i[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]),Jg.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Kg.getIntervalPrecision(t)},getTicks:function(t){var e=this._interval,i=this._extent,n=this._niceExtent,r=this._intervalPrecision,a=[];if(!e)return a;i[0]<n[0]&&(t?a.push(Qg(n[0]-e,r)):a.push(i[0]));for(var o=n[0];o<=n[1]&&(a.push(o),(o=Qg(o+e,r))!==a[a.length-1]);)if(a.length>1e4)return[];var s=a.length?a[a.length-1]:n[1];return i[1]>s&&(t?a.push(Qg(s+e,r)):a.push(i[1])),a},getMinorTicks:function(t){for(var e=this.getTicks(!0),i=[],n=this.getExtent(),r=1;r<e.length;r++){for(var a=e[r],o=e[r-1],s=0,l=[],u=(a-o)/t;s<t-1;){var h=_u.round(o+(s+1)*u);h>n[0]&&h<n[1]&&l.push(h),s++}i.push(l)}return i},getLabel:function(t,e){if(null==t)return"";var i=e&&e.precision;return null==i?i=_u.getPrecisionSafe(t)||0:"auto"===i&&(i=this._intervalPrecision),t=Qg(t,i,!0),Iu.addCommas(t)},niceTicks:function(t,e,i){t=t||5;var n=this._extent,r=n[1]-n[0];if(isFinite(r)){r<0&&(r=-r,n.reverse());var a=Kg.intervalScaleNiceTicks(n,t,e,i);this._intervalPrecision=a.intervalPrecision,this._interval=a.interval,this._niceExtent=a.niceTickExtent}},niceExtent:function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var i=e[0];t.fixMax||(e[1]+=i/2),e[0]-=i/2}else e[1]=1;var n=e[1]-e[0];isFinite(n)||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var r=this._interval;t.fixMin||(e[0]=Qg(Math.floor(e[0]/r)*r)),t.fixMax||(e[1]=Qg(Math.ceil(e[1]/r)*r))}});Jg.create=function(){return new Jg};var tm=Jg,em=_u.parsePercent,im=Cg.isDimensionStacked,nm="undefined"!=typeof Float32Array?Float32Array:Array;function rm(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function am(t){return t.dim+t.index}function om(t,e){var i=[];return e.eachSeriesByType(t,(function(t){cm(t)&&!dm(t)&&i.push(t)})),i}function sm(t){var e=function(t){var e={};yt.each(t,(function(t){var i=t.coordinateSystem.getBaseAxis();if("time"===i.type||"value"===i.type)for(var n=t.getData(),r=i.dim+"_"+i.index,a=n.mapDimension(i.dim),o=0,s=n.count();o<s;++o){var l=n.get(a,o);e[r]?e[r].push(l):e[r]=[l]}}));var i=[];for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(r){r.sort((function(t,e){return t-e}));for(var a=null,o=1;o<r.length;++o){var s=r[o]-r[o-1];s>0&&(a=null===a?s:Math.min(a,s))}i[n]=a}}return i}(t),i=[];return yt.each(t,(function(t){var n,r=t.coordinateSystem.getBaseAxis(),a=r.getExtent();if("category"===r.type)n=r.getBandWidth();else if("value"===r.type||"time"===r.type){var o=r.dim+"_"+r.index,s=e[o],l=Math.abs(a[1]-a[0]),u=r.scale.getExtent(),h=Math.abs(u[1]-u[0]);n=s?l/h*s:l}else{var c=t.getData();n=Math.abs(a[1]-a[0])/c.count()}var d=em(t.get("barWidth"),n),f=em(t.get("barMaxWidth"),n),p=em(t.get("barMinWidth")||1,n),g=t.get("barGap"),m=t.get("barCategoryGap");i.push({bandWidth:n,barWidth:d,barMaxWidth:f,barMinWidth:p,barGap:g,barCategoryGap:m,axisKey:am(r),stackId:rm(t)})})),lm(i)}function lm(t){var e={};yt.each(t,(function(t,i){var n=t.axisKey,r=t.bandWidth,a=e[n]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},o=a.stacks;e[n]=a;var s=t.stackId;o[s]||a.autoWidthCount++,o[s]=o[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!o[s].width&&(o[s].width=l,l=Math.min(a.remainedWidth,l),a.remainedWidth-=l);var u=t.barMaxWidth;u&&(o[s].maxWidth=u);var h=t.barMinWidth;h&&(o[s].minWidth=h);var c=t.barGap;null!=c&&(a.gap=c);var d=t.barCategoryGap;null!=d&&(a.categoryGap=d)}));var i={};return yt.each(e,(function(t,e){i[e]={};var n=t.stacks,r=t.bandWidth,a=em(t.categoryGap,r),o=em(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,u=(s-a)/(l+(l-1)*o);u=Math.max(u,0),yt.each(n,(function(t){var e=t.maxWidth,i=t.minWidth;if(t.width){n=t.width;e&&(n=Math.min(n,e)),i&&(n=Math.max(n,i)),t.width=n,s-=n+o*n,l--}else{var n=u;e&&e<n&&(n=Math.min(e,s)),i&&i>n&&(n=i),n!==u&&(t.width=n,s-=n+o*n,l--)}})),u=(s-a)/(l+(l-1)*o),u=Math.max(u,0);var h,c=0;yt.each(n,(function(t,e){t.width||(t.width=u),h=t,c+=t.width*(1+o)})),h&&(c-=h.width*o);var d=-c/2;yt.each(n,(function(t,n){i[e][n]=i[e][n]||{bandWidth:r,offset:d,width:t.width},d+=t.width*(1+o)}))})),i}function um(t,e,i){if(t&&e){var n=t[am(e)];return null!=n&&null!=i&&(n=n[rm(i)]),n}}var hm={seriesType:"bar",plan:Nd(),reset:function(t){if(cm(t)&&dm(t)){var e=t.getData(),i=t.coordinateSystem,n=i.grid.getRect(),r=i.getBaseAxis(),a=i.getOtherAxis(r),o=e.mapDimension(a.dim),s=e.mapDimension(r.dim),l=a.isHorizontal(),u=l?0:1,h=um(sm([t]),r,t).width;return h>.5||(h=.5),{progress:function(t,e){var c,d=t.count,f=new nm(2*d),p=new nm(2*d),g=new nm(d),m=[],v=[],y=0,_=0;for(;null!=(c=t.next());)v[u]=e.get(o,c),v[1-u]=e.get(s,c),m=i.dataToPoint(v,null,m),p[y]=l?n.x+n.width:m[0],f[y++]=m[0],p[y]=l?m[1]:n.y+n.height,f[y++]=m[1],g[_++]=c;e.setLayout({largePoints:f,largeDataIndices:g,largeBackgroundPoints:p,barWidth:h,valueAxisStart:fm(r,a),backgroundStart:l?n.x:n.y,valueAxisHorizontal:l})}}}}};function cm(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function dm(t){return t.pipelineContext&&t.pipelineContext.large}function fm(t,e,i){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}var pm={getLayoutOnAxis:function(t){var e=[],i=t.axis;if("category"===i.type){for(var n=i.getBandWidth(),r=0;r<t.count;r++)e.push(yt.defaults({bandWidth:n,axisKey:"axis0",stackId:"__ec_stack_"+r},t));var a=lm(e),o=[];for(r=0;r<t.count;r++){var s=a.axis0["__ec_stack_"+r];s.offsetCenter=s.offset+s.width/2,o.push(s)}return o}},prepareLayoutBarSeries:om,makeColumnLayout:sm,retrieveColumnLayout:um,layout:function(t,e){var i=om(t,e),n=sm(i),r={};yt.each(i,(function(t){var e=t.getData(),i=t.coordinateSystem,a=i.getBaseAxis(),o=rm(t),s=n[am(a)][o],l=s.offset,u=s.width,h=i.getOtherAxis(a),c=t.get("barMinHeight")||0;r[o]=r[o]||[],e.setLayout({bandWidth:s.bandWidth,offset:l,size:u});for(var d=e.mapDimension(h.dim),f=e.mapDimension(a.dim),p=im(e,d),g=h.isHorizontal(),m=fm(a,h),v=0,y=e.count();v<y;v++){var _,x,b,w,S,T=e.get(d,v),M=e.get(f,v),C=T>=0?"p":"n",I=m;if(p&&(r[o][M]||(r[o][M]={p:m,n:m}),I=r[o][M][C]),g)_=I,x=(S=i.dataToPoint([T,M]))[1]+l,b=S[0]-m,w=u,Math.abs(b)<c&&(b=(b<0?-1:1)*c),isNaN(b)||p&&(r[o][M][C]+=b);else _=(S=i.dataToPoint([M,T]))[0]+l,x=I,b=u,w=S[1]-m,Math.abs(w)<c&&(w=(w<=0?-1:1)*c),isNaN(w)||p&&(r[o][M][C]+=w);e.setItemLayout(v,{x:_,y:x,width:b,height:w})}}),this)},largeLayout:hm},gm=tm.prototype,mm=Math.ceil,vm=Math.floor,ym=864e5,_m=tm.extend({type:"time",getLabel:function(t){var e=this._stepLvl,i=new Date(t);return Iu.formatTime(e[0],i,this.getSetting("useUTC"))},niceExtent:function(t){var e=this._extent;if(e[0]===e[1]&&(e[0]-=ym,e[1]+=ym),e[1]===-1/0&&e[0]===1/0){var i=new Date;e[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),e[0]=e[1]-ym}this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var n=this._interval;t.fixMin||(e[0]=_u.round(vm(e[0]/n)*n)),t.fixMax||(e[1]=_u.round(mm(e[1]/n)*n))},niceTicks:function(t,e,i){t=t||10;var n=this._extent,r=n[1]-n[0],a=r/t;null!=e&&a<e&&(a=e),null!=i&&a>i&&(a=i);var o=xm.length,s=function(t,e,i,n){for(;i<n;){var r=i+n>>>1;t[r][1]<e?i=r+1:n=r}return i}(xm,a,0,o),l=xm[Math.min(s,o-1)],u=l[1];if("year"===l[0]){var h=r/u;u*=_u.nice(h/t,!0)}var c=this.getSetting("useUTC")?0:60*new Date(+n[0]||+n[1]).getTimezoneOffset()*1e3,d=[Math.round(mm((n[0]-c)/u)*u+c),Math.round(vm((n[1]-c)/u)*u+c)];Kg.fixExtent(d,n),this._stepLvl=l,this._interval=u,this._niceExtent=d},parse:function(t){return+_u.parseDate(t)}});yt.each(["contain","normalize"],(function(t){_m.prototype[t]=function(e){return gm[t].call(this,this.parse(e))}}));var xm=[["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",ym],["MM-dd\nyyyy",2*ym],["MM-dd\nyyyy",3*ym],["MM-dd\nyyyy",4*ym],["MM-dd\nyyyy",5*ym],["MM-dd\nyyyy",6*ym],["week",7*ym],["MM-dd\nyyyy",10*ym],["week",14*ym],["week",21*ym],["month",31*ym],["week",42*ym],["month",62*ym],["week",70*ym],["quarter",95*ym],["month",31*ym*4],["month",31*ym*5],["half-year",380*ym/2],["month",31*ym*8],["month",31*ym*10],["year",380*ym]];_m.create=function(t){return new _m({useUTC:t.ecModel.get("useUTC")})};var bm=Eg.prototype,wm=tm.prototype,Sm=_u.getPrecisionSafe,Tm=_u.round,Mm=Math.floor,Cm=Math.ceil,Im=Math.pow,Am=Math.log,Dm=Eg.extend({type:"log",base:10,$constructor:function(){Eg.apply(this,arguments),this._originalScale=new tm},getTicks:function(t){var e=this._originalScale,i=this._extent,n=e.getExtent();return yt.map(wm.getTicks.call(this,t),(function(t){var r=_u.round(Im(this.base,t));return r=t===i[0]&&e.__fixMin?km(r,n[0]):r,r=t===i[1]&&e.__fixMax?km(r,n[1]):r}),this)},getMinorTicks:wm.getMinorTicks,getLabel:wm.getLabel,scale:function(t){return t=bm.scale.call(this,t),Im(this.base,t)},setExtent:function(t,e){var i=this.base;t=Am(t)/Am(i),e=Am(e)/Am(i),wm.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=bm.getExtent.call(this);e[0]=Im(t,e[0]),e[1]=Im(t,e[1]);var i=this._originalScale,n=i.getExtent();return i.__fixMin&&(e[0]=km(e[0],n[0])),i.__fixMax&&(e[1]=km(e[1],n[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=Am(t[0])/Am(e),t[1]=Am(t[1])/Am(e),bm.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(i===1/0||i<=0)){var n=_u.quantity(i);for(t/i*n<=.5&&(n*=10);!isNaN(n)&&Math.abs(n)<1&&Math.abs(n)>0;)n*=10;var r=[_u.round(Cm(e[0]/n)*n),_u.round(Mm(e[1]/n)*n)];this._interval=n,this._niceExtent=r}},niceExtent:function(t){wm.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});function km(t,e){return Tm(t,Sm(e))}yt.each(["contain","normalize"],(function(t){Dm.prototype[t]=function(e){return e=Am(e)/Am(this.base),bm[t].call(this,e)}})),Dm.create=function(){return new Dm};var Om=pm.prepareLayoutBarSeries,Pm=pm.makeColumnLayout,Lm=pm.retrieveColumnLayout;function Rm(t,e){var i,n,r,a=t.type,o=e.getMin(),s=e.getMax(),l=t.getExtent();"ordinal"===a?i=e.getCategories().length:(n=e.get("boundaryGap"),yt.isArray(n)||(n=[n||0,n||0]),"boolean"==typeof n[0]&&(n=[0,0]),n[0]=_u.parsePercent(n[0],1),n[1]=_u.parsePercent(n[1],1),r=l[1]-l[0]||Math.abs(l[0])),"dataMin"===o?o=l[0]:"function"==typeof o&&(o=o({min:l[0],max:l[1]})),"dataMax"===s?s=l[1]:"function"==typeof s&&(s=s({min:l[0],max:l[1]}));var u=null!=o,h=null!=s;null==o&&(o="ordinal"===a?i?0:NaN:l[0]-n[0]*r),null==s&&(s="ordinal"===a?i?i-1:NaN:l[1]+n[1]*r),(null==o||!isFinite(o))&&(o=NaN),(null==s||!isFinite(s))&&(s=NaN),t.setBlank(yt.eqNaN(o)||yt.eqNaN(s)||"ordinal"===a&&!t.getOrdinalMeta().categories.length),e.getNeedCrossZero()&&(o>0&&s>0&&!u&&(o=0),o<0&&s<0&&!h&&(s=0));var c=e.ecModel;if(c&&"time"===a){var d,f=Om("bar",c);if(yt.each(f,(function(t){d|=t.getBaseAxis()===e.axis})),d){var p=Pm(f),g=function(t,e,i,n){var r=i.axis.getExtent(),a=r[1]-r[0],o=Lm(n,i.axis);if(void 0===o)return{min:t,max:e};var s=1/0;yt.each(o,(function(t){s=Math.min(t.offset,s)}));var l=-1/0;yt.each(o,(function(t){l=Math.max(t.offset+t.width,l)})),s=Math.abs(s),l=Math.abs(l);var u=s+l,h=e-t,c=h/(1-(s+l)/a)-h;return{min:t-=c*(s/u),max:e+=c*(l/u)}}(o,s,e,p);o=g.min,s=g.max}}return{extent:[o,s],fixMin:u,fixMax:h}}function Em(t){var e,i=t.getLabelModel().get("formatter"),n="category"===t.type?t.scale.getExtent()[0]:null;return"string"==typeof i?(e=i,i=function(i){return i=t.scale.getLabel(i),e.replace("{value}",null!=i?i:"")}):"function"==typeof i?function(e,r){return null!=n&&(r=e-n),i(Bm(t,e),r)}:function(e){return t.scale.getLabel(e)}}function Bm(t,e){return"category"===t.type?t.scale.getLabel(e):e}function zm(t,e){var i=e*Math.PI/180,n=t.plain(),r=n.width,a=n.height,o=r*Math.cos(i)+a*Math.sin(i),s=r*Math.sin(i)+a*Math.cos(i);return new Oi(n.x,n.y,o,s)}function Nm(t){var e=t.get("interval");return null==e?"auto":e}var Fm={getScaleExtent:Rm,niceScaleExtent:function(t,e){var i=Rm(t,e),n=i.extent,r=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var a=t.type;t.setExtent(n[0],n[1]),t.niceExtent({splitNumber:r,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:"interval"===a||"time"===a?e.get("minInterval"):null,maxInterval:"interval"===a||"time"===a?e.get("maxInterval"):null});var o=e.get("interval");null!=o&&t.setInterval&&t.setInterval(o)},createScaleByModel:function(t,e){if(e=e||t.get("type"))switch(e){case"category":return new jg(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new tm;default:return(Eg.getClass(e)||tm).create(t)}},ifAxisCrossZero:function(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(i>0&&n>0||i<0&&n<0)},makeLabelFormatter:Em,getAxisRawValue:Bm,estimateLabelUnionRect:function(t){var e=t.model,i=t.scale;if(e.get("axisLabel.show")&&!i.isBlank()){var n,r,a="category"===t.type,o=i.getExtent();r=a?i.count():(n=i.getTicks()).length;var s,l=t.getLabelModel(),u=Em(t),h=1;r>40&&(h=Math.ceil(r/40));for(var c=0;c<r;c+=h){var d=u(n?n[c]:o[0]+c),f=zm(l.getTextRect(d),l.get("rotate")||0);s?s.union(f):s=f}return s}},getOptionCategoryInterval:Nm,shouldShowAllLabels:function(t){return"category"===t.type&&0===Nm(t.getLabelModel())}},Hm={getMin:function(t){var e=this.option,i=t||null==e.rangeStart?e.min:e.rangeStart;return this.axis&&null!=i&&"dataMin"!==i&&"function"!=typeof i&&!yt.eqNaN(i)&&(i=this.axis.scale.parse(i)),i},getMax:function(t){var e=this.option,i=t||null==e.rangeEnd?e.max:e.rangeEnd;return this.axis&&null!=i&&"dataMax"!==i&&"function"!=typeof i&&!yt.eqNaN(i)&&(i=this.axis.scale.parse(i)),i},getNeedCrossZero:function(){var t=this.option;return null==t.rangeStart&&null==t.rangeEnd&&!t.scale},getCoordSysModel:yt.noop,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},Vm=Bn.calculateTextPosition,Wm=tu.extendShape({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+r,n+a),t.lineTo(i-r,n+a),t.closePath()}}),Gm=tu.extendShape({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+r,n),t.lineTo(i,n+a),t.lineTo(i-r,n),t.closePath()}}),Um=tu.extendShape({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,r=e.width/5*3,a=Math.max(r,e.height),o=r/2,s=o*o/(a-o),l=n-a+o+s,u=Math.asin(s/o),h=Math.cos(u)*o,c=Math.sin(u),d=Math.cos(u),f=.6*o,p=.7*o;t.moveTo(i-h,l+s),t.arc(i,l,o,Math.PI-u,2*Math.PI+u),t.bezierCurveTo(i+h-c*f,l+s+d*f,i,n-p,i,n),t.bezierCurveTo(i,n-p,i-h+c*f,l+s+d*f,i-h,l+s),t.closePath()}}),Ym=tu.extendShape({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.height,n=e.width,r=e.x,a=e.y,o=n/3*2;t.moveTo(r,a),t.lineTo(r+o,a+i),t.lineTo(r,a+i/4*3),t.lineTo(r-o,a+i),t.lineTo(r,a),t.closePath()}}),jm={line:tu.Line,rect:tu.Rect,roundRect:tu.Rect,square:tu.Rect,circle:tu.Circle,diamond:Gm,pin:Um,arrow:Ym,triangle:Wm},Xm={line:function(t,e,i,n,r){r.x1=t,r.y1=e+n/2,r.x2=t+i,r.y2=e+n/2},rect:function(t,e,i,n,r){r.x=t,r.y=e,r.width=i,r.height=n},roundRect:function(t,e,i,n,r){r.x=t,r.y=e,r.width=i,r.height=n,r.r=Math.min(i,n)/4},square:function(t,e,i,n,r){var a=Math.min(i,n);r.x=t,r.y=e,r.width=a,r.height=a},circle:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.r=Math.min(i,n)/2},diamond:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.width=i,r.height=n},pin:function(t,e,i,n,r){r.x=t+i/2,r.y=e+n/2,r.width=i,r.height=n},arrow:function(t,e,i,n,r){r.x=t+i/2,r.y=e+n/2,r.width=i,r.height=n},triangle:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.width=i,r.height=n}},qm={};yt.each(jm,(function(t,e){qm[e]=new t}));var Zm=tu.extendShape({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,i){var n=Vm(t,e,i),r=this.shape;return r&&"pin"===r.symbolType&&"inside"===e.textPosition&&(n.y=i.y+.4*i.height),n},buildPath:function(t,e,i){var n=e.symbolType;if("none"!==n){var r=qm[n];r||(r=qm[n="rect"]),Xm[n](e.x,e.y,e.width,e.height,r.shape),r.buildPath(t,r.shape,i)}}});function $m(t,e){if("image"!==this.type){var i=this.style,n=this.shape;n&&"line"===n.symbolType?i.stroke=t:this.__isEmptyBrush?(i.stroke=t,i.fill=e||"#fff"):(i.fill&&(i.fill=t),i.stroke&&(i.stroke=t)),this.dirty(!1)}}var Km={createSymbol:function(t,e,i,n,r,a,o){var s,l=0===t.indexOf("empty");return l&&(t=t.substr(5,1).toLowerCase()+t.substr(6)),(s=0===t.indexOf("image://")?tu.makeImage(t.slice(8),new Oi(e,i,n,r),o?"center":"cover"):0===t.indexOf("path://")?tu.makePath(t.slice(7),{},new Oi(e,i,n,r),o?"center":"cover"):new Zm({shape:{symbolType:t,x:e,y:i,width:n,height:r}})).__isEmptyBrush=l,s.setColor=$m,s.setColor(a),s}};var Qm={getLayoutRect:Nu.getLayoutRect,completeDimensions:gg,createDimensions:mg,createSymbol:Km.createSymbol,createList:function(t){return Lg(t.getSource(),t)},dataStack:{isDimensionStacked:Cg.isDimensionStacked,enableDataStack:Cg.enableDataStack,getStackedDimension:Cg.getStackedDimension},createScale:function(t,e){var i=e;fu.isInstance(e)||(i=new fu(e),yt.mixin(i,Hm));var n=Fm.createScaleByModel(i);return n.setExtent(t[0],t[1]),Fm.niceScaleExtent(n,i),n},mixinAxisModelCommonMethods:function(t){yt.mixin(t,Hm)}};function Jm(t,e){return Math.abs(t-e)<1e-8}var tv={contain:function(t,e,i){var n=0,r=t[0];if(!r)return!1;for(var a=1;a<t.length;a++){var o=t[a];n+=wo(r[0],r[1],o[0],o[1],e,i),r=o}var s=t[0];return Jm(r[0],s[0])&&Jm(r[1],s[1])||(n+=wo(r[0],r[1],s[0],s[1],e,i)),0!==n}};function ev(t,e,i){if(this.name=t,this.geometries=e,i)i=[i[0],i[1]];else{var n=this.getBoundingRect();i=[n.x+n.width/2,n.y+n.height/2]}this.center=i}ev.prototype={constructor:ev,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,i=[e,e],n=[-e,-e],r=[],a=[],o=this.geometries,s=0;s<o.length;s++)if("polygon"===o[s].type){var l=o[s].exterior;$a.fromPoints(l,r,a),Tt.min(i,i,r),Tt.max(n,n,a)}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(t){var e=this.getBoundingRect(),i=this.geometries;if(!e.contain(t[0],t[1]))return!1;t:for(var n=0,r=i.length;n<r;n++)if("polygon"===i[n].type){var a=i[n].exterior,o=i[n].interiors;if(tv.contain(a,t[0],t[1])){for(var s=0;s<(o?o.length:0);s++)if(tv.contain(o[s]))continue t;return!0}}return!1},transformTo:function(t,e,i,n){var r=this.getBoundingRect(),a=r.width/r.height;i?n||(n=i/a):i=a*n;for(var o=new Oi(t,e,i,n),s=r.calculateTransform(o),l=this.geometries,u=0;u<l.length;u++)if("polygon"===l[u].type){for(var h=l[u].exterior,c=l[u].interiors,d=0;d<h.length;d++)Tt.applyTransform(h[d],h[d],s);for(var f=0;f<(c?c.length:0);f++)for(d=0;d<c[f].length;d++)Tt.applyTransform(c[f][d],c[f][d],s)}(r=this._rect).copy(o),this.center=[r.x+r.width/2,r.y+r.height/2]},cloneShallow:function(t){null==t&&(t=this.name);var e=new ev(t,this.geometries,this.center);return e._rect=this._rect,e.transformTo=null,e}};var iv=ev;function nv(t,e,i){for(var n=[],r=e[0],a=e[1],o=0;o<t.length;o+=2){var s=t.charCodeAt(o)-64,l=t.charCodeAt(o+1)-64;s=s>>1^-(1&s),l=l>>1^-(1&l),r=s+=r,a=l+=a,n.push([s/i,l/i])}return n}var rv=function(t,e){return function(t){if(!t.UTF8Encoding)return t;var e=t.UTF8Scale;null==e&&(e=1024);for(var i=t.features,n=0;n<i.length;n++)for(var r=i[n].geometry,a=r.coordinates,o=r.encodeOffsets,s=0;s<a.length;s++){var l=a[s];if("Polygon"===r.type)a[s]=nv(l,o[s],e);else if("MultiPolygon"===r.type)for(var u=0;u<l.length;u++){var h=l[u];l[u]=nv(h,o[s][u],e)}}t.UTF8Encoding=!1}(t),yt.map(yt.filter(t.features,(function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0})),(function(t){var i=t.properties,n=t.geometry,r=n.coordinates,a=[];"Polygon"===n.type&&a.push({type:"polygon",exterior:r[0],interiors:r.slice(1)}),"MultiPolygon"===n.type&&yt.each(r,(function(t){t[0]&&a.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})}));var o=new iv(i[e||"name"],a,i.cp);return o.properties=i,o}))},av=ga.makeInner,ov=Fm.makeLabelFormatter,sv=Fm.getOptionCategoryInterval,lv=Fm.shouldShowAllLabels,uv=av();function hv(t,e){var i,n,r=cv(t,"labels"),a=sv(e),o=dv(r,a);return o||(yt.isFunction(a)?i=gv(t,a):(n="auto"===a?function(t){var e=uv(t).autoInterval;return null!=e?e:uv(t).autoInterval=t.calculateCategoryInterval()}(t):a,i=pv(t,n)),fv(r,a,{labels:i,labelCategoryInterval:n}))}function cv(t,e){return uv(t)[e]||(uv(t)[e]=[])}function dv(t,e){for(var i=0;i<t.length;i++)if(t[i].key===e)return t[i].value}function fv(t,e,i){return t.push({key:e,value:i}),i}function pv(t,e,i){var n=ov(t),r=t.scale,a=r.getExtent(),o=t.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=a[0],h=r.count();0!==u&&l>1&&h/l>2&&(u=Math.round(Math.ceil(u/l)*l));var c=lv(t),d=o.get("showMinLabel")||c,f=o.get("showMaxLabel")||c;d&&u!==a[0]&&g(a[0]);for(var p=u;p<=a[1];p+=l)g(p);function g(t){s.push(i?t:{formattedLabel:n(t),rawLabel:r.getLabel(t),tickValue:t})}return f&&p-l!==a[1]&&g(a[1]),s}function gv(t,e,i){var n=t.scale,r=ov(t),a=[];return yt.each(n.getTicks(),(function(t){var o=n.getLabel(t);e(t,o)&&a.push(i?t:{formattedLabel:r(t),rawLabel:o,tickValue:t})})),a}var mv={createAxisLabels:function(t){return"category"===t.type?function(t){var e=t.getLabelModel(),i=hv(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:i.labelCategoryInterval}:i}(t):function(t){var e=t.scale.getTicks(),i=ov(t);return{labels:yt.map(e,(function(e,n){return{formattedLabel:i(e,n),rawLabel:t.scale.getLabel(e),tickValue:e}}))}}(t)},createAxisTicks:function(t,e){return"category"===t.type?function(t,e){var i,n,r=cv(t,"ticks"),a=sv(e),o=dv(r,a);if(o)return o;e.get("show")&&!t.scale.isBlank()||(i=[]);if(yt.isFunction(a))i=gv(t,a,!0);else if("auto"===a){var s=hv(t,t.getLabelModel());n=s.labelCategoryInterval,i=yt.map(s.labels,(function(t){return t.tickValue}))}else i=pv(t,n=a,!0);return fv(r,a,{ticks:i,tickCategoryInterval:n})}(t,e):{ticks:t.scale.getTicks()}},calculateCategoryInterval:function(t){var e=function(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}(t),i=ov(t),n=(e.axisRotate-e.labelRotate)/180*Math.PI,r=t.scale,a=r.getExtent(),o=r.count();if(a[1]-a[0]<1)return 0;var s=1;o>40&&(s=Math.max(1,Math.floor(o/40)));for(var l=a[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),h=Math.abs(u*Math.cos(n)),c=Math.abs(u*Math.sin(n)),d=0,f=0;l<=a[1];l+=s){var p,g,m=Bn.getBoundingRect(i(l),e.font,"center","top");p=1.3*m.width,g=1.3*m.height,d=Math.max(d,p,7),f=Math.max(f,g,7)}var v=d/h,y=f/c;isNaN(v)&&(v=1/0),isNaN(y)&&(y=1/0);var _=Math.max(0,Math.floor(Math.min(v,y))),x=uv(t.model),b=t.getExtent(),w=x.lastAutoInterval,S=x.lastTickCount;return null!=w&&null!=S&&Math.abs(w-_)<=1&&Math.abs(S-o)<=1&&w>_&&x.axisExtend0===b[0]&&x.axisExtend1===b[1]?_=w:(x.lastTickCount=o,x.lastAutoInterval=_,x.axisExtend0=b[0],x.axisExtend1=b[1]),_}},vv=yt.each,yv=yt.map,_v=_u.linearMap,xv=_u.getPixelPrecision,bv=_u.round,wv=mv.createAxisTicks,Sv=mv.createAxisLabels,Tv=mv.calculateCategoryInterval,Mv=[0,1],Cv=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onBand=!1};function Iv(t,e){var i=(t[1]-t[0])/e/2;t[0]+=i,t[1]-=i}Cv.prototype={constructor:Cv,contain:function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=i&&t<=n},containData:function(t){return this.scale.contain(t)},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return xv(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var i=this._extent;i[0]=t,i[1]=e},dataToCoord:function(t,e){var i=this._extent,n=this.scale;return t=n.normalize(t),this.onBand&&"ordinal"===n.type&&Iv(i=i.slice(),n.count()),_v(t,Mv,i,e)},coordToData:function(t,e){var i=this._extent,n=this.scale;this.onBand&&"ordinal"===n.type&&Iv(i=i.slice(),n.count());var r=_v(t,i,Mv,e);return this.scale.scale(r)},pointToData:function(t,e){},getTicksCoords:function(t){var e=(t=t||{}).tickModel||this.getTickModel(),i=wv(this,e).ticks,n=yv(i,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this);return function(t,e,i,n){var r=e.length;if(!t.onBand||i||!r)return;var a,o,s=t.getExtent();if(1===r)e[0].coord=s[0],a=e[1]={coord:s[0]};else{var l=e[r-1].tickValue-e[0].tickValue,u=(e[r-1].coord-e[0].coord)/l;vv(e,(function(t){t.coord-=u/2}));var h=t.scale.getExtent();o=1+h[1]-e[r-1].tickValue,a={coord:e[r-1].coord+u*o},e.push(a)}var c=s[0]>s[1];d(e[0].coord,s[0])&&(n?e[0].coord=s[0]:e.shift());n&&d(s[0],e[0].coord)&&e.unshift({coord:s[0]});d(s[1],a.coord)&&(n?a.coord=s[1]:e.pop());n&&d(a.coord,s[1])&&e.push({coord:s[1]});function d(t,e){return t=bv(t),e=bv(e),c?t>e:t<e}}(this,n,e.get("alignWithLabel"),t.clamp),n},getMinorTicksCoords:function(){if("ordinal"===this.scale.type)return[];var t=this.model.getModel("minorTick").get("splitNumber");t>0&&t<100||(t=5);var e=this.scale.getMinorTicks(t);return yv(e,(function(t){return yv(t,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this)}),this)},getViewLabels:function(){return Sv(this).labels},getLabelModel:function(){return this.model.getModel("axisLabel")},getTickModel:function(){return this.model.getModel("axisTick")},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),i=e[1]-e[0]+(this.onBand?1:0);0===i&&(i=1);var n=Math.abs(t[1]-t[0]);return Math.abs(n)/i},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return Tv(this)}};var Av=Cv,Dv=sa,kv=he,Ov=Tt,Pv=je,Lv=_u,Rv=Iu,Ev=tf.throttle,Bv=Qm,zv=rv,Nv=ig,Fv=fu,Hv=Av,Vv=q,Wv=rv,Gv={};yt.each(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],(function(t){Gv[t]=yt[t]}));var Uv={};yt.each(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","setHoverStyle","setLabelStyle","setTextStyle","setText","getFont","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","registerShape","getShapeClass","Group","Image","Text","Circle","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],(function(t){Uv[t]=tu[t]}));var Yv,jv,Xv={zrender:Dv,matrix:kv,vector:Ov,color:Pv,number:Lv,format:Rv,throttle:Ev,helper:Bv,parseGeoJSON:zv,List:Nv,Model:Fv,Axis:Hv,env:Vv,parseGeoJson:Wv,util:Gv,graphic:Uv},qv=(function(t,e){var i=tf.throttle,n=yt.assert,r=yt.each,a=yt.isFunction,o=yt.isObject,s=Uu.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(t,e){return function(i,n,r){e||!this._disposed?(i=i&&i.toLowerCase(),Ot.prototype[t].call(this,i,n,r)):this.id}}function d(){Ot.call(this)}function f(t,e,n){n=n||{},"string"==typeof e&&(e=z[e]),this.id,this.group,this._dom=t;var r=this._zr=sa.init(t,{renderer:n.renderer||"canvas",devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height});this._throttledZrFlush=i(yt.bind(r.flush,r),17),(e=yt.clone(e))&&kc(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new ic;var a,o,s=this._api=(o=(a=this)._coordSysMgr,yt.extend(new Jh(a),{getCoordinateSystems:yt.bind(o.getCoordinateSystems,o),getComponentByElement:function(t){for(;t;){var e=t.__ecComponentInfo;if(null!=e)return a._model.getComponent(e.mainType,e.index);t=t.parent}}}));function l(t,e){return t.__prio-e.__prio}Fi(B,l),Fi(L,l),this._scheduler=new Bf(this,s,L,B),Ot.call(this,this._ecEventProcessor=new k),this._messageCenter=new d,this._initEvents(),this.resize=yt.bind(this.resize,this),this._pendingActions=[],r.animation.on("frame",this._onframe,this),function(t,e){t.on("rendered",(function(){e.trigger("rendered"),!t.animation.isFinished()||e.__optionUpdated||e._scheduler.unfinished||e._pendingActions.length||e.trigger("finished")}))}(r,this),yt.setAsPrimitive(this)}d.prototype.on=c("on",!0),d.prototype.off=c("off",!0),d.prototype.one=c("one",!0),yt.mixin(d,Ot);var p=f.prototype;function g(t,e,i){if(this._disposed)this.id;else{var n,r=this._model,a=this._coordSysMgr.getCoordinateSystems();e=ga.parseFinder(r,e);for(var o=0;o<a.length;o++){var s=a[o];if(s[t]&&null!=(n=s[t](r,e,i)))return n}}}p._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this.__optionUpdated){var e=this.__optionUpdated.silent;this[u]=!0,v(this),m.update.call(this),this[u]=!1,this.__optionUpdated=!1,b.call(this,e),w.call(this,e)}else if(t.unfinished){var i=1,n=this._model;this._api;t.unfinished=!1;do{var r=+new Date;t.performSeriesTasks(n),t.performDataProcessorTasks(n),_(this,n),t.performVisualTasks(n),C(this,this._model,0,"remain"),i-=+new Date-r}while(i>0&&t.unfinished);t.unfinished||this._zr.flush()}}},p.getDom=function(){return this._dom},p.getZr=function(){return this._zr},p.setOption=function(t,e,i){if(this._disposed)this.id;else{var n;if(o(e)&&(i=e.lazyUpdate,n=e.silent,e=e.notMerge),this[u]=!0,!this._model||e){var r=new cc(this._api),a=this._theme,s=this._model=new Kh;s.scheduler=this._scheduler,s.init(null,null,a,r)}this._model.setOption(t,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))}},p.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},p.getModel=function(){return this._model},p.getOption=function(){return this._model&&this._model.getOption()},p.getWidth=function(){return this._zr.getWidth()},p.getHeight=function(){return this._zr.getHeight()},p.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},p.getRenderedCanvas=function(t){if(q.canvasSupported)return(t=t||{}).pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(t)},p.getSvgDataURL=function(){if(q.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return yt.each(e,(function(t){t.stopAnimation(!0)})),t.painter.toDataURL()}},p.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,i=this._model,n=[],a=this;r(e,(function(t){i.eachComponent({mainType:t},(function(t){var e=a._componentsMap[t.__viewId];e.group.ignore||(n.push(e),e.group.ignore=!0)}))}));var o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return r(n,(function(t){t.group.ignore=!1})),o}this.id},p.getConnectedDataURL=function(t){if(this._disposed)this.id;else if(q.canvasSupported){var e="svg"===t.type,i=this.group,n=Math.min,a=Math.max;if(H[i]){var o=1/0,s=1/0,l=-1/0,u=-1/0,h=[],c=t&&t.pixelRatio||1;yt.each(F,(function(r,c){if(r.group===i){var d=e?r.getZr().painter.getSvgDom().innerHTML:r.getRenderedCanvas(yt.clone(t)),f=r.getDom().getBoundingClientRect();o=n(f.left,o),s=n(f.top,s),l=a(f.right,l),u=a(f.bottom,u),h.push({dom:d,left:f.left,top:f.top})}}));var d=(l*=c)-(o*=c),f=(u*=c)-(s*=c),p=yt.createCanvas(),g=sa.init(p,{renderer:e?"svg":"canvas"});if(g.resize({width:d,height:f}),e){var m="";return r(h,(function(t){var e=t.left-o,i=t.top-s;m+='<g transform="translate('+e+","+i+')">'+t.dom+"</g>"})),g.painter.getSvgRoot().innerHTML=m,t.connectedBackgroundColor&&g.painter.setBackgroundColor(t.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}return t.connectedBackgroundColor&&g.add(new tu.Rect({shape:{x:0,y:0,width:d,height:f},style:{fill:t.connectedBackgroundColor}})),r(h,(function(t){var e=new tu.Image({style:{x:t.left*c-o,y:t.top*c-s,image:t.dom}});g.add(e)})),g.refreshImmediately(),p.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},p.convertToPixel=yt.curry(g,"convertToPixel"),p.convertFromPixel=yt.curry(g,"convertFromPixel"),p.containPixel=function(t,e){if(!this._disposed){var i,n=this._model;return t=ga.parseFinder(n,t),yt.each(t,(function(t,n){n.indexOf("Models")>=0&&yt.each(t,(function(t){var r=t.coordinateSystem;if(r&&r.containPoint)i|=!!r.containPoint(e);else if("seriesModels"===n){var a=this._chartsMap[t.__viewId];a&&a.containPoint&&(i|=a.containPoint(e,t))}}),this)}),this),!!i}this.id},p.getVisual=function(t,e){var i=this._model,n=(t=ga.parseFinder(i,t,{defaultMainType:"series"})).seriesModel.getData(),r=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?n.indexOfRawIndex(t.dataIndex):null;return null!=r?n.getItemVisual(r,e):n.getVisual(e)},p.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},p.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var m={prepareAndUpdate:function(t){v(this),m.update.call(this,t)},update:function(t){var e=this._model,i=this._api,n=this._zr,r=this._coordSysMgr,a=this._scheduler;if(e){a.restoreData(e,t),a.performSeriesTasks(e),r.create(e,i),a.performDataProcessorTasks(e,t),_(this,e),r.update(e,i),T(e),a.performVisualTasks(e,t),M(this,e,i,t);var o=e.get("backgroundColor")||"transparent";if(q.canvasSupported)n.setBackgroundColor(o);else{var s=je.parse(o);o=je.stringify(s,"rgb"),0===s[3]&&(o="transparent")}I(e,i)}},updateTransform:function(t){var e=this._model,i=this,n=this._api;if(e){var r=[];e.eachComponent((function(a,o){var s=i.getViewOfComponentModel(o);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(o,e,n,t);l&&l.update&&r.push(s)}else r.push(s)}));var a=yt.createHashMap();e.eachSeries((function(r){var o=i._chartsMap[r.__viewId];if(o.updateTransform){var s=o.updateTransform(r,e,n,t);s&&s.update&&a.set(r.uid,1)}else a.set(r.uid,1)})),T(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0,dirtyMap:a}),C(i,e,0,t,a),I(e,this._api)}},updateView:function(t){var e=this._model;e&&($d.markUpdateMethod(t,"updateView"),T(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),M(this,this._model,this._api,t),I(e,this._api))},updateVisual:function(t){m.update.call(this,t)},updateLayout:function(t){m.update.call(this,t)}};function v(t){var e=t._model,i=t._scheduler;i.restorePipelines(e),i.prepareStageTasks(),S(t,"component",e,i),S(t,"chart",e,i),i.plan()}function y(t,e,i,n,a){var o=t._model;if(n){var s={};s[n+"Id"]=i[n+"Id"],s[n+"Index"]=i[n+"Index"],s[n+"Name"]=i[n+"Name"];var l={mainType:n,query:s};a&&(l.subType=a);var u=i.excludeSeriesId;null!=u&&(u=yt.createHashMap(ga.normalizeToArray(u))),o&&o.eachComponent(l,(function(e){u&&null!=u.get(e.id)||h(t["series"===n?"_chartsMap":"_componentsMap"][e.__viewId])}),t)}else r(t._componentsViews.concat(t._chartsViews),h);function h(n){n&&n.__alive&&n[e]&&n[e](n.__model,o,t._api,i)}}function _(t,e){var i=t._chartsMap,n=t._scheduler;e.eachSeries((function(t){n.updateStreamModes(t,i[t.__viewId])}))}function x(t,e){var i=t.type,n=t.escapeConnect,a=O[i],o=a.actionInfo,l=(o.update||"update").split(":"),h=l.pop();l=null!=l[0]&&s(l[0]),this[u]=!0;var c=[t],d=!1;t.batch&&(d=!0,c=yt.map(t.batch,(function(e){return(e=yt.defaults(yt.extend({},e),t)).batch=null,e})));var f,p=[],g="highlight"===i||"downplay"===i;r(c,(function(t){(f=(f=a.action(t,this._model,this._api))||yt.extend({},t)).type=o.event||f.type,p.push(f),g?y(this,h,t,"series"):l&&y(this,h,t,l.main,l.sub)}),this),"none"===h||g||l||(this.__optionUpdated?(v(this),m.update.call(this,t),this.__optionUpdated=!1):m[h].call(this,t)),f=d?{type:o.event||i,escapeConnect:n,batch:p}:p[0],this[u]=!1,!e&&this._messageCenter.trigger(f.type,f)}function b(t){for(var e=this._pendingActions;e.length;){var i=e.shift();x.call(this,i,t)}}function w(t){!t&&this.trigger("updated")}function S(t,e,i,n){for(var r="component"===e,a=r?t._componentsViews:t._chartsViews,o=r?t._componentsMap:t._chartsMap,l=t._zr,u=t._api,h=0;h<a.length;h++)a[h].__alive=!1;function c(t){var e="_ec_"+t.id+"_"+t.type,h=o[e];if(!h){var c=s(t.type);(h=new(r?Bd.getClass(c.main,c.sub):$d.getClass(c.sub))).init(i,u),o[e]=h,a.push(h),l.add(h.group)}t.__viewId=h.__id=e,h.__alive=!0,h.__model=t,h.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},!r&&n.prepareView(h,t,i,u)}for(r?i.eachComponent((function(t,e){"series"!==t&&c(e)})):i.eachSeries(c),h=0;h<a.length;){var d=a[h];d.__alive?h++:(!r&&d.renderTask.dispose(),l.remove(d.group),d.dispose(i,u),a.splice(h,1),delete o[d.__id],d.__id=d.group.__ecComponentInfo=null)}}function T(t){t.clearColorPalette(),t.eachSeries((function(t){t.clearColorPalette()}))}function M(t,e,i,n){!function(t,e,i,n,a){r(a||t._componentsViews,(function(t){var r=t.__model;t.render(r,e,i,n),D(r,t)}))}(t,e,i,n),r(t._chartsViews,(function(t){t.__alive=!1})),C(t,e,0,n),r(t._chartsViews,(function(t){t.__alive||t.remove(e,i)}))}function C(t,e,i,n,r){var a,o=t._scheduler;e.eachSeries((function(e){var i=t._chartsMap[e.__viewId];i.__alive=!0;var s=i.renderTask;o.updatePayload(s,n),r&&r.get(e.uid)&&s.dirty(),a|=s.perform(o.getPerformArgs(s)),i.group.silent=!!e.get("silent"),D(e,i),function(t,e){var i=t.get("blendMode")||null;e.group.traverse((function(t){t.isGroup||t.style.blend!==i&&t.setStyle("blend",i),t.eachPendingDisplayable&&t.eachPendingDisplayable((function(t){t.setStyle("blend",i)}))}))}(e,i)})),o.unfinished|=a,function(t,e){var i=t._zr.storage,n=0;i.traverse((function(t){n++})),n>e.get("hoverLayerThreshold")&&!q.node&&e.eachSeries((function(e){if(!e.preventUsingHoverLayer){var i=t._chartsMap[e.__viewId];i.__alive&&i.group.traverse((function(t){t.useHoverLayer=!0}))}}))}(t,e),of(t._zr.dom,e)}function I(t,e){r(E,(function(i){i(t,e)}))}p.resize=function(t){if(this._disposed)this.id;else{this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var i=e.resetOption("media"),n=t&&t.silent;this[u]=!0,i&&v(this),m.update.call(this),this[u]=!1,b.call(this,n),w.call(this,n)}}},p.showLoading=function(t,e){if(this._disposed)this.id;else if(o(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),N[t]){var i=N[t](this._api,e),n=this._zr;this._loadingFX=i,n.add(i)}},p.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},p.makeActionFromEvent=function(t){var e=yt.extend({},t);return e.type=P[t.type],e},p.dispatchAction=function(t,e){this._disposed?this.id:(o(e)||(e={silent:!!e}),O[t.type]&&this._model&&(this[u]?this._pendingActions.push(t):(x.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&q.browser.weChat&&this._throttledZrFlush(),b.call(this,e.silent),w.call(this,e.silent))))},p.appendData=function(t){if(this._disposed)this.id;else{var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0}},p.on=c("on",!1),p.off=c("off",!1),p.one=c("one",!1);var A=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function D(t,e){var i=t.get("z"),n=t.get("zlevel");e.group.traverse((function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))}))}function k(){this.eventInfo}p._initEvents=function(){r(A,(function(t){var e=function(e){var i,n=this.getModel(),r=e.target;if("globalout"===t)i={};else if(r&&null!=r.dataIndex){var a=r.dataModel||n.getSeriesByIndex(r.seriesIndex);i=a&&a.getDataParams(r.dataIndex,r.dataType,r)||{}}else r&&r.eventData&&(i=yt.extend({},r.eventData));if(i){var o=i.componentType,s=i.componentIndex;"markLine"!==o&&"markPoint"!==o&&"markArea"!==o||(o="series",s=i.seriesIndex);var l=o&&null!=s&&n.getComponent(o,s),u=l&&this["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];i.event=e,i.type=t,this._ecEventProcessor.eventInfo={targetEl:r,packedEvent:i,model:l,view:u},this.trigger(t,i)}};e.zrEventfulCallAtLast=!0,this._zr.on(t,e,this)}),this),r(P,(function(t,e){this._messageCenter.on(e,(function(t){this.trigger(e,t)}),this)}),this)},p.isDisposed=function(){return this._disposed},p.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},p.dispose=function(){if(this._disposed)this.id;else{this._disposed=!0,ga.setAttribute(this.getDom(),G,"");var t=this._api,e=this._model;r(this._componentsViews,(function(i){i.dispose(e,t)})),r(this._chartsViews,(function(i){i.dispose(e,t)})),this._zr.dispose(),delete F[this.id]}},yt.mixin(f,Ot),k.prototype={constructor:k,normalizeQuery:function(t){var e={},i={},n={};if(yt.isString(t)){var r=s(t);e.mainType=r.main||null,e.subType=r.sub||null}else{var a=["Index","Name","Id"],o={name:1,dataIndex:1,dataType:1};yt.each(t,(function(t,r){for(var s=!1,l=0;l<a.length;l++){var u=a[l],h=r.lastIndexOf(u);if(h>0&&h===r.length-u.length){var c=r.slice(0,h);"data"!==c&&(e.mainType=c,e[u.toLowerCase()]=t,s=!0)}}o.hasOwnProperty(r)&&(i[r]=t,s=!0),s||(n[r]=t)}))}return{cptQuery:e,dataQuery:i,otherQuery:n}},filter:function(t,e,i){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return h(l,o,"mainType")&&h(l,o,"subType")&&h(l,o,"index","componentIndex")&&h(l,o,"name")&&h(l,o,"id")&&h(u,a,"name")&&h(u,a,"dataIndex")&&h(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,r,a));function h(t,e,i,n){return null==t[i]||e[n||i]===t[i]}},afterTrigger:function(){this.eventInfo=null}};var O={},P={},L=[],R=[],E=[],B=[],z={},N={},F={},H={},V=new Date-0,W=new Date-0,G="_echarts_instance_";function U(t){H[t]=!1}var Y=U;function j(t){return F[ga.getAttribute(t,G)]}function X(t,e){z[t]=e}function Z(t){R.push(t)}function $(t,e){J(L,t,e,1e3)}function K(t,e,i){"function"==typeof e&&(i=e,e="");var r=o(t)?t.type:[t,t={event:e}][0];t.event=(t.event||r).toLowerCase(),e=t.event,n(h.test(r)&&h.test(e)),O[r]||(O[r]={action:i,actionInfo:t}),P[e]=r}function Q(t,e){J(B,t,e,3e3,"visual")}function J(t,e,i,n,r){(a(e)||o(e))&&(i=e,e=n);var s=Bf.wrapStageHandler(i,r);return s.__prio=e,s.__raw=i,t.push(s),s}function tt(t,e){N[t]=e}Q(2e3,nf),Z(kc),$(900,Rc),tt("default",lf),K({type:"highlight",event:"highlight",update:"highlight"},yt.noop),K({type:"downplay",event:"downplay",update:"downplay"},yt.noop),X("light",Nf),X("dark",Vf),e.version="4.8.0",e.dependencies={zrender:"4.3.1"},e.PRIORITY=l,e.init=function(t,e,i){var n=j(t);if(n)return n;var a=new f(t,e,i);return a.id="ec_"+V++,F[a.id]=a,ga.setAttribute(t,G,a.id),function(t){var e="__connectUpdateStatus";function i(t,i){for(var n=0;n<t.length;n++)t[n][e]=i}r(P,(function(n,a){t._messageCenter.on(a,(function(n){if(H[t.group]&&0!==t[e]){if(n&&n.escapeConnect)return;var a=t.makeActionFromEvent(n),o=[];r(F,(function(e){e!==t&&e.group===t.group&&o.push(e)})),i(o,0),r(o,(function(t){1!==t[e]&&t.dispatchAction(a)})),i(o,2)}}))}))}(a),a},e.connect=function(t){if(yt.isArray(t)){var e=t;t=null,r(e,(function(e){null!=e.group&&(t=e.group)})),t=t||"g_"+W++,r(e,(function(e){e.group=t}))}return H[t]=!0,t},e.disConnect=U,e.disconnect=Y,e.dispose=function(t){"string"==typeof t?t=F[t]:t instanceof f||(t=j(t)),t instanceof f&&!t.isDisposed()&&t.dispose()},e.getInstanceByDom=j,e.getInstanceById=function(t){return F[t]},e.registerTheme=X,e.registerPreprocessor=Z,e.registerProcessor=$,e.registerPostUpdate=function(t){E.push(t)},e.registerAction=K,e.registerCoordinateSystem=function(t,e){ic.register(t,e)},e.getCoordinateSystemDimensions=function(t){var e=ic.get(t);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()},e.registerLayout=function(t,e){J(B,t,e,1e3,"layout")},e.registerVisual=Q,e.registerLoading=tt,e.extendComponentModel=function(t){return Uu.extend(t)},e.extendComponentView=function(t){return Bd.extend(t)},e.extendSeriesModel=function(t){return Ld.extend(t)},e.extendChartView=function(t){return $d.extend(t)},e.setCanvasCreator=function(t){yt.$override("createCanvas",t)},e.registerMap=function(t,e,i){xp.registerMap(t,e,i)},e.getMap=function(t){var e=xp.retrieveMap(t);return e&&e[0]&&{geoJson:e[0].geoJSON,specialAreas:e[0].specialAreas}},e.dataTool={},function(){for(var t in Xv)Xv.hasOwnProperty(t)&&(e[t]=Xv[t])}()}(jv={path:Yv,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&jv.path)}},jv.exports),jv.exports),Zv=(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,Ld.extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(t,e){return Lg(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},clip:!0}}),ed.retrieveRawValue);var $v={getDefaultLabel:function(t,e){var i=t.mapDimension("defaultedLabel",!0),n=i.length;if(1===n)return Zv(t,e,i[0]);if(n){for(var r=[],a=0;a<i.length;a++){var o=Zv(t,e,i[a]);r.push(o)}return r.join(" ")}}},Kv=Km.createSymbol,Qv=_u.parsePercent,Jv=$v.getDefaultLabel;function ty(t,e,i){tu.Group.call(this),this.updateData(t,e,i)}var ey=ty.prototype,iy=ty.getSymbolSize=function(t,e){var i=t.getItemVisual(e,"symbolSize");return i instanceof Array?i.slice():[+i,+i]};function ny(t){return[t[0]/2,t[1]/2]}function ry(t,e){this.parent.drift(t,e)}ey._createSymbol=function(t,e,i,n,r){this.removeAll();var a=e.getItemVisual(i,"color"),o=Kv(t,-1,-1,2,2,a,r);o.attr({z2:100,culling:!0,scale:ny(n)}),o.drift=ry,this._symbolType=t,this.add(o)},ey.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(t)},ey.getSymbolPath=function(){return this.childAt(0)},ey.getScale=function(){return this.childAt(0).scale},ey.highlight=function(){this.childAt(0).trigger("emphasis")},ey.downplay=function(){this.childAt(0).trigger("normal")},ey.setZ=function(t,e){var i=this.childAt(0);i.zlevel=t,i.z=e},ey.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":e.cursor},ey.updateData=function(t,e,i){this.silent=!1;var n=t.getItemVisual(e,"symbol")||"circle",r=t.hostModel,a=iy(t,e),o=n!==this._symbolType;if(o){var s=t.getItemVisual(e,"symbolKeepAspect");this._createSymbol(n,t,e,a,s)}else{(l=this.childAt(0)).silent=!1,tu.updateProps(l,{scale:ny(a)},r,e)}if(this._updateCommon(t,e,a,i),o){var l=this.childAt(0),u=i&&i.fadeIn,h={scale:l.scale.slice()};u&&(h.style={opacity:l.style.opacity}),l.scale=[0,0],u&&(l.style.opacity=0),tu.initProps(l,h,r,e)}this._seriesModel=r};var ay=["itemStyle"],oy=["emphasis","itemStyle"],sy=["label"],ly=["emphasis","label"];function uy(t,e){if(!this.incremental&&!this.useHoverLayer)if("emphasis"===e){var i=this.__symbolOriginalScale,n=i[1]/i[0],r={scale:[Math.max(1.1*i[0],i[0]+3),Math.max(1.1*i[1],i[1]+3*n)]};this.animateTo(r,400,"elasticOut")}else"normal"===e&&this.animateTo({scale:this.__symbolOriginalScale},400,"elasticOut")}ey._updateCommon=function(t,e,i,n){var r=this.childAt(0),a=t.hostModel,o=t.getItemVisual(e,"color");"image"!==r.type?r.useStyle({strokeNoScale:!0}):r.setStyle({opacity:null,shadowBlur:null,shadowOffsetX:null,shadowOffsetY:null,shadowColor:null});var s=n&&n.itemStyle,l=n&&n.hoverItemStyle,u=n&&n.symbolOffset,h=n&&n.labelModel,c=n&&n.hoverLabelModel,d=n&&n.hoverAnimation,f=n&&n.cursorStyle;if(!n||t.hasItemOption){var p=n&&n.itemModel?n.itemModel:t.getItemModel(e);s=p.getModel(ay).getItemStyle(["color"]),l=p.getModel(oy).getItemStyle(),u=p.getShallow("symbolOffset"),h=p.getModel(sy),c=p.getModel(ly),d=p.getShallow("hoverAnimation"),f=p.getShallow("cursor")}else l=yt.extend({},l);var g=r.style,m=t.getItemVisual(e,"symbolRotate");r.attr("rotation",(m||0)*Math.PI/180||0),u&&r.attr("position",[Qv(u[0],i[0]),Qv(u[1],i[1])]),f&&r.attr("cursor",f),r.setColor(o,n&&n.symbolInnerColor),r.setStyle(s);var v=t.getItemVisual(e,"opacity");null!=v&&(g.opacity=v);var y=t.getItemVisual(e,"liftZ"),_=r.__z2Origin;null!=y?null==_&&(r.__z2Origin=r.z2,r.z2+=y):null!=_&&(r.z2=_,r.__z2Origin=null);var x=n&&n.useNameLabel;tu.setLabelStyle(g,l,h,c,{labelFetcher:a,labelDataIndex:e,defaultText:function(e,i){return x?t.getName(e):Jv(t,e)},isRectText:!0,autoColor:o}),r.__symbolOriginalScale=ny(i),r.hoverStyle=l,r.highDownOnUpdate=d&&a.isAnimationEnabled()?uy:null,tu.setHoverStyle(r)},ey.fadeOut=function(t,e){var i=this.childAt(0);this.silent=i.silent=!0,(!e||!e.keepLabel)&&(i.style.text=null),tu.updateProps(i,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,t)},yt.inherits(ty,tu.Group);var hy=ty,cy=yt.isObject;function dy(t){this.group=new tu.Group,this._symbolCtor=t||hy}var fy=dy.prototype;function py(t,e,i,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(i))&&!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&"none"!==t.getItemVisual(i,"symbol")}function gy(t){return null==t||cy(t)||(t={isIgnore:t}),t||{}}function my(t){var e=t.hostModel;return{itemStyle:e.getModel("itemStyle").getItemStyle(["color"]),hoverItemStyle:e.getModel("emphasis.itemStyle").getItemStyle(),symbolRotate:e.get("symbolRotate"),symbolOffset:e.get("symbolOffset"),hoverAnimation:e.get("hoverAnimation"),labelModel:e.getModel("label"),hoverLabelModel:e.getModel("emphasis.label"),cursorStyle:e.get("cursor")}}fy.updateData=function(t,e){e=gy(e);var i=this.group,n=t.hostModel,r=this._data,a=this._symbolCtor,o=my(t);r||i.removeAll(),t.diff(r).add((function(n){var r=t.getItemLayout(n);if(py(t,r,n,e)){var s=new a(t,n,o);s.attr("position",r),t.setItemGraphicEl(n,s),i.add(s)}})).update((function(s,l){var u=r.getItemGraphicEl(l),h=t.getItemLayout(s);py(t,h,s,e)?(u?(u.updateData(t,s,o),tu.updateProps(u,{position:h},n)):(u=new a(t,s)).attr("position",h),i.add(u),t.setItemGraphicEl(s,u)):i.remove(u)})).remove((function(t){var e=r.getItemGraphicEl(t);e&&e.fadeOut((function(){i.remove(e)}))})).execute(),this._data=t},fy.isPersistent=function(){return!0},fy.updateLayout=function(){var t=this._data;t&&t.eachItemGraphicEl((function(e,i){var n=t.getItemLayout(i);e.attr("position",n)}))},fy.incrementalPrepareUpdate=function(t){this._seriesScope=my(t),this._data=null,this.group.removeAll()},fy.incrementalUpdate=function(t,e,i){function n(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}i=gy(i);for(var r=t.start;r<t.end;r++){var a=e.getItemLayout(r);if(py(e,a,r,i)){var o=new this._symbolCtor(e,r,this._seriesScope);o.traverse(n),o.attr("position",a),this.group.add(o),e.setItemGraphicEl(r,o)}}},fy.remove=function(t){var e=this.group,i=this._data;i&&t?i.eachItemGraphicEl((function(t){t.fadeOut((function(){e.remove(t)}))})):e.removeAll()};var vy=dy,yy=Km.createSymbol,_y=tu.extendShape({shape:{points:null},symbolProxy:null,softClipShape:null,buildPath:function(t,e){var i=e.points,n=e.size,r=this.symbolProxy,a=r.shape;if(!((t.getContext?t.getContext():t)&&n[0]<4))for(var o=0;o<i.length;){var s=i[o++],l=i[o++];isNaN(s)||isNaN(l)||(this.softClipShape&&!this.softClipShape.contain(s,l)||(a.x=s-n[0]/2,a.y=l-n[1]/2,a.width=n[0],a.height=n[1],r.buildPath(t,a,!0)))}},afterBrush:function(t){var e=this.shape,i=e.points,n=e.size;if(n[0]<4){this.setTransform(t);for(var r=0;r<i.length;){var a=i[r++],o=i[r++];isNaN(a)||isNaN(o)||(this.softClipShape&&!this.softClipShape.contain(a,o)||t.fillRect(a-n[0]/2,o-n[1]/2,n[0],n[1]))}this.restoreTransform(t)}},findDataIndex:function(t,e){for(var i=this.shape,n=i.points,r=i.size,a=Math.max(r[0],4),o=Math.max(r[1],4),s=n.length/2-1;s>=0;s--){var l=2*s,u=n[l]-a/2,h=n[l+1]-o/2;if(t>=u&&e>=h&&t<=u+a&&e<=h+o)return s}return-1}});function xy(){this.group=new tu.Group}var by=xy.prototype;by.isPersistent=function(){return!this._incremental},by.updateData=function(t,e){this.group.removeAll();var i=new _y({rectHover:!0,cursor:"default"});i.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(i,t,!1,e),this.group.add(i),this._incremental=null},by.updateLayout=function(t){if(!this._incremental){var e=t.getLayout("symbolPoints");this.group.eachChild((function(t){if(null!=t.startIndex){var i=2*(t.endIndex-t.startIndex),n=4*t.startIndex*2;e=new Float32Array(e.buffer,n,i)}t.setShape("points",e)}))}},by.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>2e6?(this._incremental||(this._incremental=new Js({silent:!0})),this.group.add(this._incremental)):this._incremental=null},by.incrementalUpdate=function(t,e,i){var n;this._incremental?(n=new _y,this._incremental.addDisplayable(n,!0)):((n=new _y({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end})).incremental=!0,this.group.add(n)),n.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(n,e,!!this._incremental,i)},by._setCommon=function(t,e,i,n){var r=e.hostModel;n=n||{};var a=e.getVisual("symbolSize");t.setShape("size",a instanceof Array?a:[a,a]),t.softClipShape=n.clipShape||null,t.symbolProxy=yy(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var o=t.shape.size[0]<4;t.useStyle(r.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=e.getVisual("color");s&&t.setColor(s),i||(t.seriesIndex=r.seriesIndex,t.on("mousemove",(function(e){t.dataIndex=null;var i=t.findDataIndex(e.offsetX,e.offsetY);i>=0&&(t.dataIndex=i+(t.startIndex||0))})))},by.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},by._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var wy=xy,Sy=yt.map,Ty=Cg.isDimensionStacked;var My=function(t){return{seriesType:t,plan:Nd(),reset:function(t){var e=t.getData(),i=t.coordinateSystem,n=t.pipelineContext.large;if(i){var r=Sy(i.dimensions,(function(t){return e.mapDimension(t)})).slice(0,2),a=r.length,o=e.getCalculationInfo("stackResultDimension");return Ty(e,r[0])&&(r[0]=o),Ty(e,r[1])&&(r[1]=o),a&&{progress:function(t,e){for(var o=t.end-t.start,s=n&&new Float32Array(o*a),l=t.start,u=0,h=[],c=[];l<t.end;l++){var d;if(1===a){var f=e.get(r[0],l);d=!isNaN(f)&&i.dataToPoint(f,null,c)}else{f=h[0]=e.get(r[0],l);var p=h[1]=e.get(r[1],l);d=!isNaN(f)&&!isNaN(p)&&i.dataToPoint(h,null,c)}n?(s[u++]=d?d[0]:NaN,s[u++]=d?d[1]:NaN):e.setItemLayout(l,d&&d.slice()||[NaN,NaN])}n&&e.setLayout("symbolPoints",s)}}}}}};qv.extendChartView({type:"scatter",render:function(t,e,i){var n=t.getData();this._updateSymbolDraw(n,t).updateData(n,{clipShape:this._getClipShape(t)}),this._finished=!0},incrementalPrepareRender:function(t,e,i){var n=t.getData();this._updateSymbolDraw(n,t).incrementalPrepareUpdate(n),this._finished=!1},incrementalRender:function(t,e,i){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,i){var n=t.getData();if(this.group.dirty(),!this._finished||n.count()>1e4||!this._symbolDraw.isPersistent())return{update:!0};var r=My().reset(t);r.progress&&r.progress({start:0,end:n.count()},n),this._symbolDraw.updateLayout(n)},_getClipShape:function(t){var e=t.coordinateSystem,i=e&&e.getArea&&e.getArea();return t.get("clip",!0)?i:null},_updateSymbolDraw:function(t,e){var i=this._symbolDraw,n=e.pipelineContext.large;return i&&n===this._isLargeDraw||(i&&i.remove(),i=this._symbolDraw=n?new wy:new vy,this._isLargeDraw=n,this.group.removeAll()),this.group.add(i.group),i},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}});var Cy=yt.isFunction;var Iy=function(t,e,i){return{seriesType:t,performRawSeries:!0,reset:function(t,n,r){var a=t.getData(),o=t.get("symbol"),s=t.get("symbolSize"),l=t.get("symbolKeepAspect"),u=t.get("symbolRotate"),h=Cy(o),c=Cy(s),d=Cy(u),f=h||c||d,p=!h&&o?o:e,g=c?null:s;if(a.setVisual({legendSymbol:i||p,symbol:p,symbolSize:g,symbolKeepAspect:l,symbolRotate:u}),!n.isSeriesFiltered(t))return{dataEach:a.hasItemOption||f?function(e,i){if(f){var n=t.getRawValue(i),r=t.getDataParams(i);h&&e.setItemVisual(i,"symbol",o(n,r)),c&&e.setItemVisual(i,"symbolSize",s(n,r)),d&&e.setItemVisual(i,"symbolRotate",u(n,r))}if(e.hasItemOption){var a=e.getItemModel(i),l=a.getShallow("symbol",!0),p=a.getShallow("symbolSize",!0),g=a.getShallow("symbolRotate",!0),m=a.getShallow("symbolKeepAspect",!0);null!=l&&e.setItemVisual(i,"symbol",l),null!=p&&e.setItemVisual(i,"symbolSize",p),null!=g&&e.setItemVisual(i,"symbolRotate",g),null!=m&&e.setItemVisual(i,"symbolKeepAspect",m)}}:null}}}};function Ay(t){return this._axes[t]}var Dy=function(t){this._axes={},this._dimList=[],this.name=t||""};Dy.prototype={constructor:Dy,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return yt.map(this._dimList,Ay,this)},getAxesByScale:function(t){return t=t.toLowerCase(),yt.filter(this.getAxes(),(function(e){return e.scale.type===t}))},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var i=this._dimList,n=t instanceof Array?[]:{},r=0;r<i.length;r++){var a=i[r],o=this._axes[a];n[a]=o[e](t[a])}return n}};var ky=Dy;function Oy(t){ky.call(this,t)}Oy.prototype={constructor:Oy,type:"cartesian2d",dimensions:["x","y"],getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},containPoint:function(t){var e=this.getAxis("x"),i=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&i.contain(i.toLocalCoord(t[1]))},containData:function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},dataToPoint:function(t,e,i){var n=this.getAxis("x"),r=this.getAxis("y");return(i=i||[])[0]=n.toGlobalCoord(n.dataToCoord(t[0])),i[1]=r.toGlobalCoord(r.dataToCoord(t[1])),i},clampData:function(t,e){var i=this.getAxis("x").scale,n=this.getAxis("y").scale,r=i.getExtent(),a=n.getExtent(),o=i.parse(t[0]),s=n.parse(t[1]);return(e=e||[])[0]=Math.min(Math.max(Math.min(r[0],r[1]),o),Math.max(r[0],r[1])),e[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),e},pointToData:function(t,e){var i=this.getAxis("x"),n=this.getAxis("y");return(e=e||[])[0]=i.coordToData(i.toLocalCoord(t[0])),e[1]=n.coordToData(n.toLocalCoord(t[1])),e},getOtherAxis:function(t){return this.getAxis("x"===t.dim?"y":"x")},getArea:function(){var t=this.getAxis("x").getGlobalExtent(),e=this.getAxis("y").getGlobalExtent(),i=Math.min(t[0],t[1]),n=Math.min(e[0],e[1]),r=Math.max(t[0],t[1])-i,a=Math.max(e[0],e[1])-n;return new Oi(i,n,r,a)}},yt.inherits(Oy,ky);var Py=Oy,Ly=function(t,e,i,n,r){Av.call(this,t,e,i),this.type=n||"value",this.position=r||"bottom"};Ly.prototype={constructor:Ly,index:0,getAxesOnZeroOf:null,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},getGlobalExtent:function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},yt.inherits(Ly,Av);var Ry=Ly,Ey={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)"]}}},By={};By.categoryAxis=yt.merge({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Ey),By.valueAxis=yt.merge({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},Ey),By.timeAxis=yt.defaults({scale:!0,min:"dataMin",max:"dataMax"},By.valueAxis),By.logAxis=yt.defaults({scale:!0,logBase:10},By.valueAxis);var zy=By,Ny=Nu.getLayoutParams,Fy=Nu.mergeLayoutParam,Hy=["value","category","time","log"];var Vy=function(t,e,i,n){yt.each(Hy,(function(r){e.extend({type:t+"Axis."+r,mergeDefaultAndTheme:function(e,n){var a=this.layoutMode,o=a?Ny(e):{},s=n.getTheme();yt.merge(e,s.get(r+"Axis")),yt.merge(e,this.getDefaultOption()),e.type=i(t,e),a&&Fy(e,o,a)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=Gg.createByAxisModel(this))},getCategories:function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:yt.mergeAll([{},zy[r+"Axis"],n],!0)})})),Uu.registerSubTypeDefaulter(t+"Axis",yt.curry(i,t))},Wy=Uu.extend({type:"cartesian2dAxis",axis:null,init:function(){Wy.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){Wy.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){Wy.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function Gy(t,e){return e.type||(e.data?"category":"value")}yt.merge(Wy.prototype,Hm);var Uy={offset:0};Vy("x",Wy,Gy,Uy),Vy("y",Wy,Gy,Uy);Uu.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 Yy=yt.isObject,jy=yt.each,Xy=yt.map,qy=yt.indexOf,Zy=Nu.getLayoutRect,$y=Fm.createScaleByModel,Ky=Fm.ifAxisCrossZero,Qy=Fm.niceScaleExtent,Jy=Fm.estimateLabelUnionRect,t_=Cg.getStackedDimension;function e_(t,e,i){return t.getCoordSysModel()===e}function i_(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this.model=t}var n_=i_.prototype;function r_(t,e,i,n){i.getAxesOnZeroOf=function(){return r?[r]:[]};var r,a=t[e],o=i.model,s=o.get("axisLine.onZero"),l=o.get("axisLine.onZeroAxisIndex");if(s){if(null!=l)a_(a[l])&&(r=a[l]);else for(var u in a)if(a.hasOwnProperty(u)&&a_(a[u])&&!n[h(a[u])]){r=a[u];break}r&&(n[h(r)]=!0)}function h(t){return t.dim+"_"+t.index}}function a_(t){return t&&"category"!==t.type&&"time"!==t.type&&Ky(t)}n_.type="grid",n_.axisPointerEnabled=!0,n_.getRect=function(){return this._rect},n_.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model),jy(i.x,(function(t){Qy(t.scale,t.model)})),jy(i.y,(function(t){Qy(t.scale,t.model)}));var n={};jy(i.x,(function(t){r_(i,"y",t,n)})),jy(i.y,(function(t){r_(i,"x",t,n)})),this.resize(this.model,e)},n_.resize=function(t,e,i){var n=Zy(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=n;var r=this._axesList;function a(){jy(r,(function(t){var e=t.isHorizontal(),i=e?[0,n.width]:[0,n.height],r=t.inverse?1:0;t.setExtent(i[r],i[1-r]),function(t,e){var i=t.getExtent(),n=i[0]+i[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return n-t+e}}(t,e?n.x:n.y)}))}a(),!i&&t.get("containLabel")&&(jy(r,(function(t){if(!t.model.get("axisLabel.inside")){var e=Jy(t);if(e){var i=t.isHorizontal()?"height":"width",r=t.model.get("axisLabel.margin");n[i]-=e[i]+r,"top"===t.position?n.y+=e.height+r:"left"===t.position&&(n.x+=e.width+r)}}})),a())},n_.getAxis=function(t,e){var i=this._axesMap[t];if(null!=i){if(null==e)for(var n in i)if(i.hasOwnProperty(n))return i[n];return i[e]}},n_.getAxes=function(){return this._axesList.slice()},n_.getCartesian=function(t,e){if(null!=t&&null!=e){var i="x"+t+"y"+e;return this._coordsMap[i]}Yy(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,r=this._coordsList;n<r.length;n++)if(r[n].getAxis("x").index===t||r[n].getAxis("y").index===e)return r[n]},n_.getCartesians=function(){return this._coordsList.slice()},n_.convertToPixel=function(t,e,i){var n=this._findConvertTarget(t,e);return n.cartesian?n.cartesian.dataToPoint(i):n.axis?n.axis.toGlobalCoord(n.axis.dataToCoord(i)):null},n_.convertFromPixel=function(t,e,i){var n=this._findConvertTarget(t,e);return n.cartesian?n.cartesian.pointToData(i):n.axis?n.axis.coordToData(n.axis.toLocalCoord(i)):null},n_._findConvertTarget=function(t,e){var i,n,r=e.seriesModel,a=e.xAxisModel||r&&r.getReferringComponents("xAxis")[0],o=e.yAxisModel||r&&r.getReferringComponents("yAxis")[0],s=e.gridModel,l=this._coordsList;if(r)i=r.coordinateSystem,qy(l,i)<0&&(i=null);else if(a&&o)i=this.getCartesian(a.componentIndex,o.componentIndex);else if(a)n=this.getAxis("x",a.componentIndex);else if(o)n=this.getAxis("y",o.componentIndex);else if(s){s.coordinateSystem===this&&(i=this._coordsList[0])}return{cartesian:i,axis:n}},n_.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},n_._initCartesian=function(t,e,i){var n={left:!1,right:!1,top:!1,bottom:!1},r={x:{},y:{}},a={x:0,y:0};if(e.eachComponent("xAxis",o("x"),this),e.eachComponent("yAxis",o("y"),this),!a.x||!a.y)return this._axesMap={},void(this._axesList=[]);function o(e){return function(i,o){if(e_(i,t)){var s=i.get("position");"x"===e?"top"!==s&&"bottom"!==s&&(s=n.bottom?"top":"bottom"):"left"!==s&&"right"!==s&&(s=n.left?"right":"left"),n[s]=!0;var l=new Ry(e,$y(i),[0,0],i.get("type"),s),u="category"===l.type;l.onBand=u&&i.get("boundaryGap"),l.inverse=i.get("inverse"),i.axis=l,l.model=i,l.grid=this,l.index=o,this._axesList.push(l),r[e][o]=l,a[e]++}}}this._axesMap=r,jy(r.x,(function(e,i){jy(r.y,(function(n,r){var a="x"+i+"y"+r,o=new Py(a);o.grid=this,o.model=t,this._coordsMap[a]=o,this._coordsList.push(o),o.addAxis(e),o.addAxis(n)}),this)}),this)},n_._updateScale=function(t,e){function i(t,e,i){jy(t.mapDimension(e.dim,!0),(function(i){e.scale.unionExtentFromData(t,t_(t,i))}))}jy(this._axesList,(function(t){t.scale.setExtent(1/0,-1/0)})),t.eachSeries((function(t){if(l_(t)){var n=s_(t),r=n[0],a=n[1];if(!e_(r,e)||!e_(a,e))return;var o=this.getCartesian(r.componentIndex,a.componentIndex),s=t.getData(),l=o.getAxis("x"),u=o.getAxis("y");"list"===s.type&&(i(s,l),i(s,u))}}),this)},n_.getTooltipAxes=function(t){var e=[],i=[];return jy(this.getCartesians(),(function(n){var r=null!=t&&"auto"!==t?n.getAxis(t):n.getBaseAxis(),a=n.getOtherAxis(r);qy(e,r)<0&&e.push(r),qy(i,a)<0&&i.push(a)})),{baseAxes:e,otherAxes:i}};var o_=["xAxis","yAxis"];function s_(t,e){return Xy(o_,(function(e){return t.getReferringComponents(e)[0]}))}function l_(t){return"cartesian2d"===t.get("coordinateSystem")}i_.create=function(t,e){var i=[];return t.eachComponent("grid",(function(n,r){var a=new i_(n,t,e);a.name="grid_"+r,a.resize(n,e,!0),n.coordinateSystem=a,i.push(a)})),t.eachSeries((function(t){if(l_(t)){var e=s_(t),i=e[0],n=e[1],r=i.getCoordSysModel().coordinateSystem;t.coordinateSystem=r.getCartesian(i.componentIndex,n.componentIndex)}})),i},i_.dimensions=i_.prototype.dimensions=Py.prototype.dimensions,ic.register("cartesian2d",i_);var u_=yt.retrieve,h_=yt.defaults,c_=yt.extend,d_=yt.each,f_=_u.isRadianAroundZero,p_=_u.remRadian,g_=Km.createSymbol,m_=Tt.applyTransform,v_=Fm.shouldShowAllLabels,y_=Math.PI,__=function(t,e){this.opt=e,this.axisModel=t,h_(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new tu.Group;var i=new tu.Group({position:e.position.slice(),rotation:e.rotation});i.updateTransform(),this._transform=i.transform,this._dumbGroup=i};__.prototype={constructor:__,hasBuilder:function(t){return!!x_[t]},add:function(t){x_[t].call(this)},getGroup:function(){return this.group}};var x_={axisLine:function(){var t=this.opt,e=this.axisModel;if(e.get("axisLine.show")){var i=this.axisModel.axis.getExtent(),n=this._transform,r=[i[0],0],a=[i[1],0];n&&(m_(r,r,n),m_(a,a,n));var o=c_({lineCap:"round"},e.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new tu.Line({anid:"line",subPixelOptimize:!0,shape:{x1:r[0],y1:r[1],x2:a[0],y2:a[1]},style:o,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1}));var s=e.get("axisLine.symbol"),l=e.get("axisLine.symbolSize"),u=e.get("axisLine.symbolOffset")||0;if("number"==typeof u&&(u=[u,u]),null!=s){"string"==typeof s&&(s=[s,s]),"string"!=typeof l&&"number"!=typeof l||(l=[l,l]);var h=l[0],c=l[1];d_([{rotate:t.rotation+Math.PI/2,offset:u[0],r:0},{rotate:t.rotation-Math.PI/2,offset:u[1],r:Math.sqrt((r[0]-a[0])*(r[0]-a[0])+(r[1]-a[1])*(r[1]-a[1]))}],(function(e,i){if("none"!==s[i]&&null!=s[i]){var n=g_(s[i],-h/2,-c/2,h,c,o.stroke,!0),a=e.r+e.offset,l=[r[0]+a*Math.cos(t.rotation),r[1]-a*Math.sin(t.rotation)];n.attr({rotation:e.rotate,position:l,silent:!0,z2:11}),this.group.add(n)}}),this)}}},axisTickLabel:function(){var t=this.axisModel,e=this.opt,i=function(t,e,i){var n=e.axis,r=e.getModel("axisTick");if(!r.get("show")||n.scale.isBlank())return;for(var a=r.getModel("lineStyle"),o=i.tickDirection*r.get("length"),s=I_(n.getTicksCoords(),t._transform,o,h_(a.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}),"ticks"),l=0;l<s.length;l++)t.group.add(s[l]);return s}(this,t,e),n=function(t,e,i){var n=e.axis;if(!u_(i.axisLabelShow,e.get("axisLabel.show"))||n.scale.isBlank())return;var r=e.getModel("axisLabel"),a=r.get("margin"),o=n.getViewLabels(),s=(u_(i.labelRotate,r.get("rotate"))||0)*y_/180,l=w_(i.rotation,s,i.labelDirection),u=e.getCategories&&e.getCategories(!0),h=[],c=S_(e),d=e.get("triggerEvent");return d_(o,(function(o,s){var f=o.tickValue,p=o.formattedLabel,g=o.rawLabel,m=r;u&&u[f]&&u[f].textStyle&&(m=new fu(u[f].textStyle,r,e.ecModel));var v=m.getTextColor()||e.get("axisLine.lineStyle.color"),y=[n.dataToCoord(f),i.labelOffset+i.labelDirection*a],_=new tu.Text({anid:"label_"+f,position:y,rotation:l.rotation,silent:c,z2:10});tu.setTextStyle(_.style,m,{text:p,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?f+"":f,s):v}),d&&(_.eventData=b_(e),_.eventData.targetType="axisLabel",_.eventData.value=g),t._dumbGroup.add(_),_.updateTransform(),h.push(_),t.group.add(_),_.decomposeTransform()})),h}(this,t,e);!function(t,e,i){if(v_(t.axis))return;var n=t.get("axisLabel.showMinLabel"),r=t.get("axisLabel.showMaxLabel");i=i||[];var a=(e=e||[])[0],o=e[1],s=e[e.length-1],l=e[e.length-2],u=i[0],h=i[1],c=i[i.length-1],d=i[i.length-2];!1===n?(T_(a),T_(u)):M_(a,o)&&(n?(T_(o),T_(h)):(T_(a),T_(u)));!1===r?(T_(s),T_(c)):M_(l,s)&&(r?(T_(l),T_(d)):(T_(s),T_(c)))}(t,n,i),function(t,e,i){var n=e.axis,r=e.getModel("minorTick");if(!r.get("show")||n.scale.isBlank())return;var a=n.getMinorTicksCoords();if(!a.length)return;for(var o=r.getModel("lineStyle"),s=i.tickDirection*r.get("length"),l=h_(o.getLineStyle(),h_(e.getModel("axisTick").getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")})),u=0;u<a.length;u++)for(var h=I_(a[u],t._transform,s,l,"minorticks_"+u),c=0;c<h.length;c++)t.group.add(h[c])}(this,t,e)},axisName:function(){var t=this.opt,e=this.axisModel,i=u_(t.axisName,e.get("name"));if(i){var n,r,a=e.get("nameLocation"),o=t.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=this.axisModel.axis.getExtent(),h=u[0]>u[1]?-1:1,c=["start"===a?u[0]-h*l:"end"===a?u[1]+h*l:(u[0]+u[1])/2,C_(a)?t.labelOffset+o*l:0],d=e.get("nameRotate");null!=d&&(d=d*y_/180),C_(a)?n=w_(t.rotation,null!=d?d:t.rotation,o):(n=function(t,e,i,n){var r,a,o=p_(i-t.rotation),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;f_(o-y_/2)?(a=l?"bottom":"top",r="center"):f_(o-1.5*y_)?(a=l?"top":"bottom",r="center"):(a="middle",r=o<1.5*y_&&o>y_/2?l?"left":"right":l?"right":"left");return{rotation:o,textAlign:r,textVerticalAlign:a}}(t,a,d||0,u),null!=(r=t.axisNameAvailableWidth)&&(r=Math.abs(r/Math.sin(n.rotation)),!isFinite(r)&&(r=null)));var f=s.getFont(),p=e.get("nameTruncate",!0)||{},g=p.ellipsis,m=u_(t.nameTruncateMaxWidth,p.maxWidth,r),v=null!=g&&null!=m?Iu.truncateText(i,m,f,g,{minChar:2,placeholder:p.placeholder}):i,y=e.get("tooltip",!0),_=e.mainType,x={componentType:_,name:i,$vars:["name"]};x[_+"Index"]=e.componentIndex;var b=new tu.Text({anid:"name",__fullText:i,__truncatedText:v,position:c,rotation:n.rotation,silent:S_(e),z2:1,tooltip:y&&y.show?c_({content:i,formatter:function(){return i},formatterParams:x},y):null});tu.setTextStyle(b.style,s,{text:v,textFont:f,textFill:s.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:s.get("align")||n.textAlign,textVerticalAlign:s.get("verticalAlign")||n.textVerticalAlign}),e.get("triggerEvent")&&(b.eventData=b_(e),b.eventData.targetType="axisName",b.eventData.name=i),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},b_=__.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},w_=__.innerTextLayout=function(t,e,i){var n,r,a=p_(e-t);return f_(a)?(r=i>0?"top":"bottom",n="center"):f_(a-y_)?(r=i>0?"bottom":"top",n="center"):(r="middle",n=a>0&&a<y_?i>0?"right":"left":i>0?"left":"right"),{rotation:a,textAlign:n,textVerticalAlign:r}};var S_=__.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)};function T_(t){t&&(t.ignore=!0)}function M_(t,e,i){var n=t&&t.getBoundingRect().clone(),r=e&&e.getBoundingRect().clone();if(n&&r){var a=he.identity([]);return he.rotate(a,a,-t.rotation),n.applyTransform(he.mul([],a,t.getLocalTransform())),r.applyTransform(he.mul([],a,e.getLocalTransform())),n.intersect(r)}}function C_(t){return"middle"===t||"center"===t}function I_(t,e,i,n,r){for(var a=[],o=[],s=[],l=0;l<t.length;l++){var u=t[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=i,e&&(m_(o,o,e),m_(s,s,e));var h=new tu.Line({anid:r+"_"+t[l].tickValue,subPixelOptimize:!0,shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:n,z2:2,silent:!0});a.push(h)}return a}var A_=__,D_=yt.each,k_=yt.curry;function O_(t,e){return"all"===t||yt.isArray(t)&&yt.indexOf(t,e)>=0||t===e}function P_(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[R_(t)]}function L_(t){return!!t.get("handle.show")}function R_(t){return t.type+"||"+t.id}var E_={collect:function(t,e){var i={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(t,e,i){var n=e.getComponent("tooltip"),r=e.getComponent("axisPointer"),a=r.get("link",!0)||[],o=[];D_(i.getCoordinateSystems(),(function(i){if(i.axisPointerEnabled){var s=R_(i.model),l=t.coordSysAxesInfo[s]={};t.coordSysMap[s]=i;var u=i.model.getModel("tooltip",n);if(D_(i.getAxes(),k_(f,!1,null)),i.getTooltipAxes&&n&&u.get("show")){var h="axis"===u.get("trigger"),c="cross"===u.get("axisPointer.type"),d=i.getTooltipAxes(u.get("axisPointer.axis"));(h||c)&&D_(d.baseAxes,k_(f,!c||"cross",h)),c&&D_(d.otherAxes,k_(f,"cross",!1))}}function f(n,s,h){var c=h.model.getModel("axisPointer",r),d=c.get("show");if(d&&("auto"!==d||n||L_(c))){null==s&&(s=c.get("triggerTooltip"));var f=(c=n?function(t,e,i,n,r,a){var o=e.getModel("axisPointer"),s={};D_(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],(function(t){s[t]=yt.clone(o.get(t))})),s.snap="category"!==t.type&&!!a,"cross"===o.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===r){var u=o.get("label.show");if(l.show=null==u||u,!a){var h=s.lineStyle=o.get("crossStyle");h&&yt.defaults(l,h.textStyle)}}return t.model.getModel("axisPointer",new fu(s,i,n))}(h,u,r,e,n,s):c).get("snap"),p=R_(h.model),g=s||f||"category"===h.type,m=t.axesInfo[p]={key:p,axis:h,coordSys:i,axisPointerModel:c,triggerTooltip:s,involveSeries:g,snap:f,useHandle:L_(c),seriesModels:[]};l[p]=m,t.seriesInvolved|=g;var v=function(t,e){for(var i=e.model,n=e.dim,r=0;r<t.length;r++){var a=t[r]||{};if(O_(a[n+"AxisId"],i.id)||O_(a[n+"AxisIndex"],i.componentIndex)||O_(a[n+"AxisName"],i.name))return r}}(a,h);if(null!=v){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[p]=m,y.mapper=a[v].mapper,m.linkGroup=y}}}}))}(i,t,e),i.seriesInvolved&&function(t,e){e.eachSeries((function(e){var i=e.coordinateSystem,n=e.get("tooltip.trigger",!0),r=e.get("tooltip.show",!0);i&&"none"!==n&&!1!==n&&"item"!==n&&!1!==r&&!1!==e.get("axisPointer.show",!0)&&D_(t.coordSysAxesInfo[R_(i.model)],(function(t){var n=t.axis;i.getAxis(n.dim)===n&&(t.seriesModels.push(e),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=e.getData().count())}))}),this)}(i,t),i},fixValue:function(t){var e=P_(t);if(e){var i=e.axisPointerModel,n=e.axis.scale,r=i.option,a=i.get("status"),o=i.get("value");null!=o&&(o=n.parse(o));var s=L_(i);null==a&&(r.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==o||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),r.value=o,s&&(r.status=e.axis.scale.isBlank()?"hide":"show")}},getAxisInfo:P_,getAxisPointerModel:function(t){var e=P_(t);return e&&e.axisPointerModel},makeKey:R_},B_=qv.extendComponentView({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,i,n){this.axisPointerClass&&E_.fixValue(t),B_.superApply(this,"render",arguments),z_(this,t,e,i,n,!0)},updateAxisPointer:function(t,e,i,n,r){z_(this,t,e,i,n,!1)},remove:function(t,e){var i=this._axisPointer;i&&i.remove(e),B_.superApply(this,"remove",arguments)},dispose:function(t,e){N_(this,e),B_.superApply(this,"dispose",arguments)}});function z_(t,e,i,n,r,a){var o=B_.getAxisPointerClass(t.axisPointerClass);if(o){var s=E_.getAxisPointerModel(e);s?(t._axisPointer||(t._axisPointer=new o)).render(e,s,n,a):N_(t,n)}}function N_(t,e,i){var n=t._axisPointer;n&&n.dispose(e,i),t._axisPointer=null}var F_=[];B_.registerAxisPointerClass=function(t,e){F_[t]=e},B_.getAxisPointerClass=function(t){return t&&F_[t]};var H_=B_;var V_={layout:function(t,e,i){i=i||{};var n=t.coordinateSystem,r=e.axis,a={},o=r.getAxesOnZeroOf()[0],s=r.position,l=o?"onZero":s,u=r.dim,h=n.getRect(),c=[h.x,h.x+h.width,h.y,h.y+h.height],d={left:0,right:1,top:0,bottom:1,onZero:2},f=e.get("offset")||0,p="x"===u?[c[2]-f,c[3]+f]:[c[0]-f,c[1]+f];if(o){var g=o.toGlobalCoord(o.dataToCoord(0));p[d.onZero]=Math.max(Math.min(g,p[1]),p[0])}a.position=["y"===u?p[d[l]]:c[0],"x"===u?p[d[l]]:c[3]],a.rotation=Math.PI/2*("x"===u?0:1),a.labelDirection=a.tickDirection=a.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],a.labelOffset=o?p[d[s]]-p[d.onZero]:0,e.get("axisTick.inside")&&(a.tickDirection=-a.tickDirection),yt.retrieve(i.labelInside,e.get("axisLabel.inside"))&&(a.labelDirection=-a.labelDirection);var m=e.get("axisLabel.rotate");return a.labelRotate="top"===l?-m:m,a.z2=1,a}};var W_={rectCoordAxisBuildSplitArea:function(t,e,i,n){var r=i.axis;if(!r.scale.isBlank()){var a=i.getModel("splitArea"),o=a.getModel("areaStyle"),s=o.get("color"),l=n.coordinateSystem.getRect(),u=r.getTicksCoords({tickModel:a,clamp:!0});if(u.length){var h=s.length,c=t.__splitAreaColors,d=yt.createHashMap(),f=0;if(c)for(var p=0;p<u.length;p++){var g=c.get(u[p].tickValue);if(null!=g){f=(g+(h-1)*p)%h;break}}var m=r.toGlobalCoord(u[0].coord),v=o.getAreaStyle();s=yt.isArray(s)?s:[s];for(p=1;p<u.length;p++){var y,_,x,b,w=r.toGlobalCoord(u[p].coord);r.isHorizontal()?(y=m,_=l.y,x=w-y,b=l.height,m=y+x):(y=l.x,_=m,x=l.width,m=_+(b=w-_));var S=u[p-1].tickValue;null!=S&&d.set(S,f),e.add(new tu.Rect({anid:null!=S?"area_"+S:null,shape:{x:y,y:_,width:x,height:b},style:yt.defaults({fill:s[f]},v),silent:!0})),f=(f+1)%h}t.__splitAreaColors=d}}},rectCoordAxisHandleRemove:function(t){t.__splitAreaColors=null}},G_=W_.rectCoordAxisBuildSplitArea,U_=W_.rectCoordAxisHandleRemove,Y_=["axisLine","axisTickLabel","axisName"],j_=["splitArea","splitLine","minorSplitLine"],X_=H_.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,i,n){this.group.removeAll();var r=this._axisGroup;if(this._axisGroup=new tu.Group,this.group.add(this._axisGroup),t.get("show")){var a=t.getCoordSysModel(),o=V_.layout(a,t),s=new A_(t,o);yt.each(Y_,s.add,s),this._axisGroup.add(s.getGroup()),yt.each(j_,(function(e){t.get(e+".show")&&this["_"+e](t,a)}),this),tu.groupTransition(r,this._axisGroup,t),X_.superCall(this,"render",t,e,i,n)}},remove:function(){U_(this)},_splitLine:function(t,e){var i=t.axis;if(!i.scale.isBlank()){var n=t.getModel("splitLine"),r=n.getModel("lineStyle"),a=r.get("color");a=yt.isArray(a)?a:[a];for(var o=e.coordinateSystem.getRect(),s=i.isHorizontal(),l=0,u=i.getTicksCoords({tickModel:n}),h=[],c=[],d=r.getLineStyle(),f=0;f<u.length;f++){var p=i.toGlobalCoord(u[f].coord);s?(h[0]=p,h[1]=o.y,c[0]=p,c[1]=o.y+o.height):(h[0]=o.x,h[1]=p,c[0]=o.x+o.width,c[1]=p);var g=l++%a.length,m=u[f].tickValue;this._axisGroup.add(new tu.Line({anid:null!=m?"line_"+u[f].tickValue:null,subPixelOptimize:!0,shape:{x1:h[0],y1:h[1],x2:c[0],y2:c[1]},style:yt.defaults({stroke:a[g]},d),silent:!0}))}}},_minorSplitLine:function(t,e){var i=t.axis,n=t.getModel("minorSplitLine").getModel("lineStyle"),r=e.coordinateSystem.getRect(),a=i.isHorizontal(),o=i.getMinorTicksCoords();if(o.length)for(var s=[],l=[],u=n.getLineStyle(),h=0;h<o.length;h++)for(var c=0;c<o[h].length;c++){var d=i.toGlobalCoord(o[h][c].coord);a?(s[0]=d,s[1]=r.y,l[0]=d,l[1]=r.y+r.height):(s[0]=r.x,s[1]=d,l[0]=r.x+r.width,l[1]=d),this._axisGroup.add(new tu.Line({anid:"minor_line_"+o[h][c].tickValue,subPixelOptimize:!0,shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:u,silent:!0}))}},_splitArea:function(t,e){G_(this,this._axisGroup,t,e)}});X_.extend({type:"xAxis"}),X_.extend({type:"yAxis"}),qv.extendComponentView({type:"grid",render:function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new tu.Rect({shape:t.coordinateSystem.getRect(),style:yt.defaults({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))}}),qv.registerPreprocessor((function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})})),qv.registerVisual(Iy("scatter","circle")),qv.registerLayout(My("scatter"));var q_=function(t,e){var i,n=[],r=t.seriesIndex;if(null==r||!(i=e.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=ga.queryDataIndex(a,t);if(null==o||o<0||yt.isArray(o))return{point:[]};var s=a.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)n=l.dataToPoint(a.getValues(yt.map(l.dimensions,(function(t){return a.mapDimension(t)})),o,!0))||[];else if(s){var u=s.getBoundingRect().clone();u.applyTransform(s.transform),n=[u.x+u.width/2,u.y+u.height/2]}return{point:n,el:s}},Z_=ga.makeInner,$_=yt.each,K_=yt.curry,Q_=Z_();function J_(t,e,i,n,r){var a=t.axis;if(!a.scale.isBlank()&&a.containData(e))if(t.involveSeries){var o=function(t,e){var i=e.axis,n=i.dim,r=t,a=[],o=Number.MAX_VALUE,s=-1;return $_(e.seriesModels,(function(e,l){var u,h,c=e.getData().mapDimension(n,!0);if(e.getAxisTooltipData){var d=e.getAxisTooltipData(c,t,i);h=d.dataIndices,u=d.nestestValue}else{if(!(h=e.getData().indicesOfNearest(c[0],t,"category"===i.type?.5:null)).length)return;u=e.getData().get(c[0],h[0])}if(null!=u&&isFinite(u)){var f=t-u,p=Math.abs(f);p<=o&&((p<o||f>=0&&s<0)&&(o=p,s=f,r=u,a.length=0),$_(h,(function(t){a.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})})))}})),{payloadBatch:a,snapToValue:r}}(e,t),s=o.payloadBatch,l=o.snapToValue;s[0]&&null==r.seriesIndex&&yt.extend(r,s[0]),!n&&t.snap&&a.containData(l)&&null!=l&&(e=l),i.showPointer(t,e,s,r),i.showTooltip(t,o,l)}else i.showPointer(t,e)}function tx(t,e,i,n){t[e.key]={value:i,payloadBatch:n}}function ex(t,e,i,n){var r=i.payloadBatch,a=e.axis,o=a.model,s=e.axisPointerModel;if(e.triggerTooltip&&r.length){var l=e.coordSys.model,u=E_.makeKey(l),h=t.map[u];h||(h=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:r.slice()})}}function ix(t){var e=t.axis.model,i={},n=i.axisDim=t.axis.dim;return i.axisIndex=i[n+"AxisIndex"]=e.componentIndex,i.axisName=i[n+"AxisName"]=e.name,i.axisId=i[n+"AxisId"]=e.id,i}function nx(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}var rx=function(t,e,i){var n=t.currTrigger,r=[t.x,t.y],a=t,o=t.dispatchAction||yt.bind(i.dispatchAction,i),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){nx(r)&&(r=q_({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=nx(r),u=a.axesInfo,h=s.axesInfo,c="leave"===n||nx(r),d={},f={},p={list:[],map:{}},g={showPointer:K_(tx,f),showTooltip:K_(ex,p)};$_(s.coordSysMap,(function(t,e){var i=l||t.containPoint(r);$_(s.coordSysAxesInfo[e],(function(t,e){var n=t.axis,a=function(t,e){for(var i=0;i<(t||[]).length;i++){var n=t[i];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}(u,t);if(!c&&i&&(!u||a)){var o=a&&a.value;null!=o||l||(o=n.pointToData(r)),null!=o&&J_(t,o,g,!1,d)}}))}));var m={};return $_(h,(function(t,e){var i=t.linkGroup;i&&!f[e]&&$_(i.axesInfo,(function(e,n){var r=f[n];if(e!==t&&r){var a=r.value;i.mapper&&(a=t.axis.scale.parse(i.mapper(a,ix(e),ix(t)))),m[t.key]=a}}))})),$_(m,(function(t,e){J_(h[e],t,g,!0,d)})),function(t,e,i){var n=i.axesInfo=[];$_(e,(function(e,i){var r=e.axisPointerModel.option,a=t[i];a?(!e.useHandle&&(r.status="show"),r.value=a.value,r.seriesDataIndices=(a.payloadBatch||[]).slice()):!e.useHandle&&(r.status="hide"),"show"===r.status&&n.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:r.value})}))}(f,h,d),function(t,e,i,n){if(nx(e)||!t.list.length)return void n({type:"hideTip"});var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:i.tooltipOption,position:i.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}(p,r,t,o),function(t,e,i){var n=i.getZr(),r=Q_(n).axisPointerLastHighlights||{},a=Q_(n).axisPointerLastHighlights={};$_(t,(function(t,e){var i=t.axisPointerModel.option;"show"===i.status&&$_(i.seriesDataIndices,(function(t){var e=t.seriesIndex+" | "+t.dataIndex;a[e]=t}))}));var o=[],s=[];yt.each(r,(function(t,e){!a[e]&&s.push(t)})),yt.each(a,(function(t,e){!r[e]&&o.push(t)})),s.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,batch:s}),o.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,batch:o})}(h,0,i),d}},ax=(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,ga.makeInner)()),ox=yt.each;function sx(t,e,i){t.handler("leave",null,i)}function lx(t,e,i,n){e.handler(t,i,n)}var ux={register:function(t,e,i){if(!q.node){var n=e.getZr();ax(n).records||(ax(n).records={}),function(t,e){if(ax(t).initialized)return;function i(i,n){t.on(i,(function(i){var r=function(t){var e={showTip:[],hideTip:[]},i=function(n){var r=e[n.type];r?r.push(n):(n.dispatchAction=i,t.dispatchAction(n))};return{dispatchAction:i,pendings:e}}(e);ox(ax(t).records,(function(t){t&&n(t,i,r.dispatchAction)})),function(t,e){var i,n=t.showTip.length,r=t.hideTip.length;n?i=t.showTip[n-1]:r&&(i=t.hideTip[r-1]);i&&(i.dispatchAction=null,e.dispatchAction(i))}(r.pendings,e)}))}ax(t).initialized=!0,i("click",yt.curry(lx,"click")),i("mousemove",yt.curry(lx,"mousemove")),i("globalout",sx)}(n,e),(ax(n).records[t]||(ax(n).records[t]={})).handler=i}},unregister:function(t,e){if(!q.node){var i=e.getZr();(ax(i).records||{})[t]&&(ax(i).records[t]=null)}}},hx=qv.extendComponentView({type:"axisPointer",render:function(t,e,i){var n=e.getComponent("tooltip"),r=t.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";ux.register("axisPointer",i,(function(t,e,i){"none"!==r&&("leave"===t||r.indexOf(t)>=0)&&i({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})}))},remove:function(t,e){ux.unregister(e.getZr(),"axisPointer"),hx.superApply(this._model,"remove",arguments)},dispose:function(t,e){ux.unregister("axisPointer",e),hx.superApply(this._model,"dispose",arguments)}}),cx=(0,ga.makeInner)(),dx=yt.clone,fx=yt.bind;function px(){}function gx(t,e,i,n){(function t(e,i){if(yt.isObject(e)&&yt.isObject(i)){var n=!0;return yt.each(i,(function(i,r){n=n&&t(e[r],i)})),!!n}return e===i})(cx(i).lastProp,n)||(cx(i).lastProp=n,e?tu.updateProps(i,n,t):(i.stopAnimation(),i.attr(n)))}function mx(t,e){t[e.get("label.show")?"show":"hide"]()}function vx(t){return{position:t.position.slice(),rotation:t.rotation||0}}function yx(t,e,i){var n=e.get("z"),r=e.get("zlevel");t&&t.traverse((function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=r&&(t.zlevel=r),t.silent=i)}))}function _x(t,e,i,n,r){var a=xx(i.get("value"),e.axis,e.ecModel,i.get("seriesDataIndices"),{precision:i.get("label.precision"),formatter:i.get("label.formatter")}),o=i.getModel("label"),s=Iu.normalizeCssArray(o.get("padding")||0),l=o.getFont(),u=Bn.getBoundingRect(a,l),h=r.position,c=u.width+s[1]+s[3],d=u.height+s[0]+s[2],f=r.align;"right"===f&&(h[0]-=c),"center"===f&&(h[0]-=c/2);var p=r.verticalAlign;"bottom"===p&&(h[1]-=d),"middle"===p&&(h[1]-=d/2),function(t,e,i,n){var r=n.getWidth(),a=n.getHeight();t[0]=Math.min(t[0]+e,r)-e,t[1]=Math.min(t[1]+i,a)-i,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}(h,c,d,n);var g=o.get("backgroundColor");g&&"auto"!==g||(g=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:c,height:d,r:o.get("borderRadius")},position:h.slice(),style:{text:a,textFont:l,textFill:o.getTextColor(),textPosition:"inside",textPadding:s,fill:g,stroke:o.get("borderColor")||"transparent",lineWidth:o.get("borderWidth")||0,shadowBlur:o.get("shadowBlur"),shadowColor:o.get("shadowColor"),shadowOffsetX:o.get("shadowOffsetX"),shadowOffsetY:o.get("shadowOffsetY")},z2:10}}function xx(t,e,i,n,r){t=e.scale.parse(t);var a=e.scale.getLabel(t,{precision:r.precision}),o=r.formatter;if(o){var s={value:Fm.getAxisRawValue(e,t),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};yt.each(n,(function(t){var e=i.getSeriesByIndex(t.seriesIndex),n=t.dataIndexInside,r=e&&e.getDataParams(n);r&&s.seriesData.push(r)})),yt.isString(o)?a=o.replace("{value}",a):yt.isFunction(o)&&(a=o(s))}return a}function bx(t,e,i){var n=he.create();return he.rotate(n,n,i.rotation),he.translate(n,n,i.position),tu.applyTransform([t.dataToCoord(e),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],n)}px.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,i,n){var r=e.get("value"),a=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,n||this._lastValue!==r||this._lastStatus!==a){this._lastValue=r,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||"hide"===a)return o&&o.hide(),void(s&&s.hide());o&&o.show(),s&&s.show();var l={};this.makeElOption(l,r,t,e,i);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=u;var h=this._moveAnimation=this.determineAnimation(t,e);if(o){var c=yt.curry(gx,e,h);this.updatePointerEl(o,l,c,e),this.updateLabelEl(o,l,c,e)}else o=this._group=new tu.Group,this.createPointerEl(o,l,t,e),this.createLabelEl(o,l,t,e),i.getZr().add(o);yx(o,e,!0),this._renderHandle(r)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var i=e.get("animation"),n=t.axis,r="category"===n.type,a=e.get("snap");if(!a&&!r)return!1;if("auto"===i||null==i){var o=this.animationThreshold;if(r&&n.getBandWidth()>o)return!0;if(a){var s=E_.getAxisInfo(t).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>o}return!1}return!0===i},makeElOption:function(t,e,i,n,r){},createPointerEl:function(t,e,i,n){var r=e.pointer;if(r){var a=cx(t).pointerEl=new tu[r.type](dx(e.pointer));t.add(a)}},createLabelEl:function(t,e,i,n){if(e.label){var r=cx(t).labelEl=new tu.Rect(dx(e.label));t.add(r),mx(r,n)}},updatePointerEl:function(t,e,i){var n=cx(t).pointerEl;n&&e.pointer&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var r=cx(t).labelEl;r&&(r.setStyle(e.label.style),i(r,{shape:e.label.shape,position:e.label.position}),mx(r,n))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e,i=this._axisPointerModel,n=this._api.getZr(),r=this._handle,a=i.getModel("handle"),o=i.get("status");if(!a.get("show")||!o||"hide"===o)return r&&n.remove(r),void(this._handle=null);this._handle||(e=!0,r=this._handle=tu.createIcon(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){qt.stop(t.event)},onmousedown:fx(this._onHandleDragMove,this,0,0),drift:fx(this._onHandleDragMove,this),ondragend:fx(this._onHandleDragEnd,this)}),n.add(r)),yx(r,i,!1);r.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=a.get("size");yt.isArray(s)||(s=[s,s]),r.attr("scale",[s[0]/2,s[1]/2]),tf.createOrUpdate(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},_moveHandleToValue:function(t,e){gx(this._axisPointerModel,!e&&this._moveAnimation,this._handle,vx(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(vx(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(vx(n)),cx(i).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},_onHandleDragEnd:function(t){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}}},px.prototype.constructor=px,ba.enableClassExtend(px);var Sx={buildElStyle:function(t){var e,i=t.get("type"),n=t.getModel(i+"Style");return"line"===i?(e=n.getLineStyle()).fill=null:"shadow"===i&&((e=n.getAreaStyle()).stroke=null),e},buildLabelElOption:_x,getValueLabel:xx,getTransformedPosition:bx,buildCartesianSingleLabelElOption:function(t,e,i,n,r,a){var o=A_.innerTextLayout(i.rotation,0,i.labelDirection);i.labelMargin=r.get("label.margin"),_x(e,n,r,a,{position:bx(n.axis,t,i),align:o.textAlign,verticalAlign:o.textVerticalAlign})},makeLineShape:function(t,e,i){return{x1:t[i=i||0],y1:t[1-i],x2:e[i],y2:e[1-i]}},makeRectShape:function(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}},makeSectorShape:function(t,e,i,n,r,a){return{cx:t,cy:e,r0:i,r:n,startAngle:r,endAngle:a,clockwise:!0}}},Tx=px.extend({makeElOption:function(t,e,i,n,r){var a=i.axis,o=a.grid,s=n.get("type"),l=Mx(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(e,!0));if(s&&"none"!==s){var h=Sx.buildElStyle(n),c=Cx[s](a,u,l);c.style=h,t.graphicKey=c.type,t.pointer=c}var d=V_.layout(o.model,i);Sx.buildCartesianSingleLabelElOption(e,t,d,i,n,r)},getHandleTransform:function(t,e,i){var n=V_.layout(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:Sx.getTransformedPosition(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var r=i.axis,a=r.grid,o=r.getGlobalExtent(!0),s=Mx(a,r).getOtherAxis(r).getGlobalExtent(),l="x"===r.dim?0:1,u=t.position;u[l]+=e[l],u[l]=Math.min(o[1],u[l]),u[l]=Math.max(o[0],u[l]);var h=(s[1]+s[0])/2,c=[h,h];c[l]=u[l];return{position:u,rotation:t.rotation,cursorPoint:c,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}}});function Mx(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}var Cx={line:function(t,e,i){return{type:"Line",subPixelOptimize:!0,shape:Sx.makeLineShape([e,i[0]],[e,i[1]],Ix(t))}},shadow:function(t,e,i){var n=Math.max(1,t.getBandWidth()),r=i[1]-i[0];return{type:"Rect",shape:Sx.makeRectShape([e-n/2,i[0]],[n,r],Ix(t))}}};function Ix(t){return"x"===t.dim?0:1}H_.registerAxisPointerClass("CartesianAxisPointer",Tx),qv.registerPreprocessor((function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!yt.isArray(e)&&(t.axisPointer.link=[e])}})),qv.registerProcessor(qv.PRIORITY.PROCESSOR.STATISTIC,(function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=E_.collect(t,e)})),qv.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},rx);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 Ax=yt.each,Dx=Iu.toCamelCase,kx=["","-webkit-","-moz-","-o-"];function Ox(t){var e,i,n=[],r=t.get("transitionDuration"),a=t.get("backgroundColor"),o=t.getModel("textStyle"),s=t.get("padding");return r&&n.push((i="left "+(e=r)+"s cubic-bezier(0.23, 1, 0.32, 1),top "+e+"s cubic-bezier(0.23, 1, 0.32, 1)",yt.map(kx,(function(t){return t+"transition:"+i})).join(";"))),a&&(q.canvasSupported?n.push("background-Color:"+a):(n.push("background-Color:#"+je.toHex(a)),n.push("filter:alpha(opacity=70)"))),Ax(["width","color","radius"],(function(e){var i="border-"+e,r=Dx(i),a=t.get(r);null!=a&&n.push(i+":"+a+("color"===e?"":"px"))})),n.push(function(t){var e=[],i=t.get("fontSize"),n=t.getTextColor();return n&&e.push("color:"+n),e.push("font:"+t.getFont()),i&&e.push("line-height:"+Math.round(3*i/2)+"px"),Ax(["decoration","align"],(function(i){var n=t.get(i);n&&e.push("text-"+i+":"+n)})),e.join(";")}(o)),null!=s&&n.push("padding:"+Iu.normalizeCssArray(s).join("px ")+"px"),n.join(";")+";"}function Px(t,e,i,n,r){var a=e&&e.painter;if(i){var o=a&&a.getViewportRoot();o&&Nt.transformLocalCoord(t,o,document.body,n,r)}else{t[0]=n,t[1]=r;var s=a&&a.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}}function Lx(t,e,i){if(q.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),a=this._appendToBody=i&&i.appendToBody;this._styleCoord=[0,0],Px(this._styleCoord,r,a,e.getWidth()/2,e.getHeight()/2),a?document.body.appendChild(n):t.appendChild(n),this._container=t,this._show=!1,this._hideTimeout;var o=this;n.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},n.onmousemove=function(t){if(t=t||window.event,!o._enterable){var e=r.handler,i=r.painter.getViewportRoot();qt.normalizeEvent(i,t,!0),e.dispatch("mousemove",t)}},n.onmouseleave=function(){o._enterable&&o._show&&o.hideLater(o._hideDelay),o._inContent=!1}}Lx.prototype={constructor:Lx,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),i=t.style;"absolute"!==i.position&&"absolute"!==e.position&&(i.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el,i=this._styleCoord;e.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+Ox(t)+";left:"+i[0]+"px;top:"+i[1]+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",e.style.pointerEvents=this._enterable?"auto":"none",this._show=!0},setContent:function(t){this.el.innerHTML=null==t?"":t},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var i=this._styleCoord;Px(i,this._zr,this._appendToBody,t,e);var n=this.el.style;n.left=i[0]+"px",n.top=i[1]+"px"},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(yt.bind(this.hide,this),t)):this.hide())},isShow:function(){return this._show},dispose:function(){this.el.parentNode.removeChild(this.el)},getOuterSize:function(){var t=this.el.clientWidth,e=this.el.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var i=document.defaultView.getComputedStyle(this.el);i&&(t+=parseInt(i.borderLeftWidth,10)+parseInt(i.borderRightWidth,10),e+=parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10))}return{width:t,height:e}}};var Rx=Lx;function Ex(t){this._zr=t.getZr(),this._show=!1,this._hideTimeout}Ex.prototype={constructor:Ex,_enterable:!0,update:function(){},show:function(t){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(t,e,i){this.el&&this._zr.remove(this.el);for(var n={},r=t,a=r.indexOf("{marker");a>=0;){var o=r.indexOf("|}"),s=r.substr(a+"{marker".length,o-a-"{marker".length);s.indexOf("sub")>-1?n["marker"+s]={textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:e[s],textOffset:[3,0]}:n["marker"+s]={textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:e[s]},a=(r=r.substr(o+1)).indexOf("{marker")}this.el=new rs({style:{rich:n,text:t,textLineHeight:20,textBackgroundColor:i.get("backgroundColor"),textBorderRadius:i.get("borderRadius"),textFill:i.get("textStyle.color"),textPadding:i.get("padding")},z:i.get("z")}),this._zr.add(this.el);var 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(t){this._enterable=t},getSize:function(){var t=this.el.getBoundingRect();return[t.width,t.height]},moveTo:function(t,e){this.el&&this.el.attr("position",[t,e])},hide:function(){this.el&&this.el.hide(),this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(yt.bind(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){var t=this.getSize();return{width:t[0],height:t[1]}}};var Bx=Ex,zx=ga.getTooltipRenderMode,Nx=yt.bind,Fx=yt.each,Hx=_u.parsePercent,Vx=new tu.Rect({shape:{x:-1,y:-1,width:2,height:2}});qv.extendComponentView({type:"tooltip",init:function(t,e){if(!q.node){var i,n=t.getComponent("tooltip"),r=n.get("renderMode");this._renderMode=zx(r),"html"===this._renderMode?(i=new Rx(e.getDom(),e,{appendToBody:n.get("appendToBody",!0)}),this._newLine="<br/>"):(i=new Bx(e),this._newLine="\n"),this._tooltipContent=i}},render:function(t,e,i){if(!q.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=i,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var n=this._tooltipContent;n.update(),n.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel.get("triggerOn");ux.register("itemTooltip",this._api,Nx((function(e,i,n){"none"!==t&&(t.indexOf(e)>=0?this._tryShow(i,n):"leave"===e&&this._hide(n))}),this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,i=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var n=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!i.isDisposed()&&n.manuallyShowTip(t,e,i,{x:n._lastX,y:n._lastY})}))}},manuallyShowTip:function(t,e,i,n){if(n.from!==this.uid&&!q.node){var r=Gx(n,i);this._ticket="";var a=n.dataByCoordSys;if(n.tooltip&&null!=n.x&&null!=n.y){var o=Vx;o.position=[n.x,n.y],o.update(),o.tooltip=n.tooltip,this._tryShow({offsetX:n.x,offsetY:n.y,target:o},r)}else if(a)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,dataByCoordSys:n.dataByCoordSys,tooltipOption:n.tooltipOption},r);else if(null!=n.seriesIndex){if(this._manuallyAxisShowTip(t,e,i,n))return;var s=q_(n,e),l=s.point[0],u=s.point[1];null!=l&&null!=u&&this._tryShow({offsetX:l,offsetY:u,position:n.position,target:s.el},r)}else null!=n.x&&null!=n.y&&(i.dispatchAction({type:"updateAxisPointer",x:n.x,y:n.y}),this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,target:i.getZr().findHover(n.x,n.y).target},r))}},manuallyHideTip:function(t,e,i,n){var r=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,n.from!==this.uid&&this._hide(Gx(n,i))},_manuallyAxisShowTip:function(t,e,i,n){var r=n.seriesIndex,a=n.dataIndex,o=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=a&&null!=o){var s=e.getSeriesByIndex(r);if(s)if("axis"===(t=Wx([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model,t])).get("trigger"))return i.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:a,position:n.position}),!0}},_tryShow:function(t,e){var i=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var n=t.dataByCoordSys;n&&n.length?this._showAxisTooltip(n,t):i&&null!=i.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,i,e)):i&&i.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,i,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var i=t.get("showDelay");e=yt.bind(e,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(e,i):e()},_showAxisTooltip:function(t,e){var i=this._ecModel,n=this._tooltipModel,r=[e.offsetX,e.offsetY],a=[],o=[],s=Wx([e.tooltipOption,n]),l=this._renderMode,u=this._newLine,h={};Fx(t,(function(t){Fx(t.dataByAxis,(function(t){var e=i.getComponent(t.axisDim+"Axis",t.axisIndex),n=t.value,r=[];if(e&&null!=n){var s=Sx.getValueLabel(n,e.axis,i,t.seriesDataIndices,t.valueLabelOpt);yt.each(t.seriesDataIndices,(function(a){var u=i.getSeriesByIndex(a.seriesIndex),c=a.dataIndexInside,d=u&&u.getDataParams(c);if(d.axisDim=t.axisDim,d.axisIndex=t.axisIndex,d.axisType=t.axisType,d.axisId=t.axisId,d.axisValue=Fm.getAxisRawValue(e.axis,n),d.axisValueLabel=s,d){o.push(d);var f,p=u.formatTooltip(c,!0,null,l);if(yt.isObject(p)){f=p.html;var g=p.markers;yt.merge(h,g)}else f=p;r.push(f)}}));var c=s;"html"!==l?a.push(r.join(u)):a.push((c?Iu.encodeHTML(c)+u:"")+r.join(u))}}))}),this),a.reverse(),a=a.join(this._newLine+this._newLine);var c=e.position;this._showOrMove(s,(function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(s,c,r[0],r[1],this._tooltipContent,o):this._showTooltipContent(s,a,o,Math.random(),r[0],r[1],c,void 0,h)}))},_showSeriesItemTooltip:function(t,e,i){var n=this._ecModel,r=e.seriesIndex,a=n.getSeriesByIndex(r),o=e.dataModel||a,s=e.dataIndex,l=e.dataType,u=o.getData(l),h=Wx([u.getItemModel(s),o,a&&(a.coordinateSystem||{}).model,this._tooltipModel]),c=h.get("trigger");if(null==c||"item"===c){var d,f,p=o.getDataParams(s,l),g=o.formatTooltip(s,!1,l,this._renderMode);yt.isObject(g)?(d=g.html,f=g.markers):(d=g,f=null);var m="item_"+o.name+"_"+s;this._showOrMove(h,(function(){this._showTooltipContent(h,d,p,m,t.offsetX,t.offsetY,t.position,t.target,f)})),i({type:"showTip",dataIndexInside:s,dataIndex:u.getRawIndex(s),seriesIndex:r,from:this.uid})}},_showComponentItemTooltip:function(t,e,i){var n=e.tooltip;if("string"==typeof n){n={content:n,formatter:n}}var r=new fu(n,this._tooltipModel,this._ecModel),a=r.get("content"),o=Math.random();this._showOrMove(r,(function(){this._showTooltipContent(r,a,r.get("formatterParams")||{},o,t.offsetX,t.offsetY,t.position,e)})),i({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,i,n,r,a,o,s,l){if(this._ticket="",t.get("showContent")&&t.get("show")){var u=this._tooltipContent,h=t.get("formatter");o=o||t.get("position");var c=e;if(h&&"string"==typeof h)c=Iu.formatTpl(h,i,!0);else if("function"==typeof h){var d=Nx((function(e,n){e===this._ticket&&(u.setContent(n,l,t),this._updatePosition(t,o,r,a,u,i,s))}),this);this._ticket=n,c=h(i,n,d)}u.setContent(c,l,t),u.show(t),this._updatePosition(t,o,r,a,u,i,s)}},_updatePosition:function(t,e,i,n,r,a,o){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u=r.getSize(),h=t.get("align"),c=t.get("verticalAlign"),d=o&&o.getBoundingRect().clone();if(o&&d.applyTransform(o.transform),"function"==typeof e&&(e=e([i,n],a,r.el,d,{viewSize:[s,l],contentSize:u.slice()})),yt.isArray(e))i=Hx(e[0],s),n=Hx(e[1],l);else if(yt.isObject(e)){e.width=u[0],e.height=u[1];var f=Nu.getLayoutRect(e,{width:s,height:l});i=f.x,n=f.y,h=null,c=null}else if("string"==typeof e&&o){var p=function(t,e,i){var n=i[0],r=i[1],a=0,o=0,s=e.width,l=e.height;switch(t){case"inside":a=e.x+s/2-n/2,o=e.y+l/2-r/2;break;case"top":a=e.x+s/2-n/2,o=e.y-r-5;break;case"bottom":a=e.x+s/2-n/2,o=e.y+l+5;break;case"left":a=e.x-n-5,o=e.y+l/2-r/2;break;case"right":a=e.x+s+5,o=e.y+l/2-r/2}return[a,o]}(e,d,u);i=p[0],n=p[1]}else{p=function(t,e,i,n,r,a,o){var s=i.getOuterSize(),l=s.width,u=s.height;null!=a&&(t+l+a>n?t-=l+a:t+=a);null!=o&&(e+u+o>r?e-=u+o:e+=o);return[t,e]}(i,n,r,s,l,h?null:20,c?null:20);i=p[0],n=p[1]}if(h&&(i-=Ux(h)?u[0]/2:"right"===h?u[0]:0),c&&(n-=Ux(c)?u[1]/2:"bottom"===c?u[1]:0),t.get("confine")){p=function(t,e,i,n,r){var a=i.getOuterSize(),o=a.width,s=a.height;return t=Math.min(t+o,n)-o,e=Math.min(e+s,r)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}(i,n,r,s,l);i=p[0],n=p[1]}r.moveTo(i,n)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,i=!!e&&e.length===t.length;return i&&Fx(e,(function(e,n){var r=e.dataByAxis||{},a=(t[n]||{}).dataByAxis||[];(i&=r.length===a.length)&&Fx(r,(function(t,e){var n=a[e]||{},r=t.seriesDataIndices||[],o=n.seriesDataIndices||[];(i&=t.value===n.value&&t.axisType===n.axisType&&t.axisId===n.axisId&&r.length===o.length)&&Fx(r,(function(t,e){var n=o[e];i&=t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex}))}))})),this._lastDataByCoordSys=t,!!i},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){q.node||(this._tooltipContent.dispose(),ux.unregister("itemTooltip",e))}});function Wx(t){for(var e=t.pop();t.length;){var i=t.pop();i&&(fu.isInstance(i)&&(i=i.get("tooltip",!0)),"string"==typeof i&&(i={formatter:i}),e=new fu(i,e,e.ecModel))}return e}function Gx(t,e){return t.dispatchAction||yt.bind(e.dispatchAction,e)}function Ux(t){return"center"===t||"middle"===t}qv.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},(function(){})),qv.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},(function(){}));var Yx=[{college:"材料学院",use_time:4264.33,numberOfResearchGroups:1883,numberOfRecords:91},{college:"能动学院",use_time:1094.2,numberOfResearchGroups:594,numberOfRecords:56},{college:"理学院",use_time:2751.5,numberOfResearchGroups:803,numberOfRecords:48},{college:"机械学院",use_time:1620.34,numberOfResearchGroups:748,numberOfRecords:46},{college:"电气学院",use_time:784.3,numberOfResearchGroups:381,numberOfRecords:38},{college:"电信学部",use_time:760.27,numberOfResearchGroups:295,numberOfRecords:36},{college:"生命学院",use_time:1847.83,numberOfResearchGroups:704,numberOfRecords:31},{college:"医学部",use_time:265.06,numberOfResearchGroups:133,numberOfRecords:26},{college:"化工学院",use_time:371.63,numberOfResearchGroups:170,numberOfRecords:24},{college:"前沿院",use_time:355.16,numberOfResearchGroups:238,numberOfRecords:13},{college:"航天学院",use_time:223.6,numberOfResearchGroups:102,numberOfRecords:13},{college:"一附院",use_time:130.64,numberOfResearchGroups:34,numberOfRecords:10},{college:"人居学院",use_time:22.66,numberOfResearchGroups:11,numberOfRecords:4},{college:"二附院",use_time:10.4,numberOfResearchGroups:6,numberOfRecords:2}];return function(t){function n(n){var r=t.call(this,n)||this;return r.chartRef=e.createRef(),r.padding="7vh 2vh 2vh",r.generateChartOption=function(){var t=[{color:"rgba(0, 150, 255, 0.42)",borderColor:"rgba(0, 150, 255, 1)"},{color:"rgba(213, 64, 64, 0.42)",borderColor:"rgba(213, 64, 64, 1)"},{color:"rgba(11, 210, 195, 0.42)",borderColor:"rgba(11, 210, 195, 1)"}];return{tooltip:{show:!0,formatter:function(t){var e=t.seriesName,i=t.data;return i.type,e+"<br/>"+i.name+": "+i.value}},xAxis:{axisLine:{show:!0,lineStyle:{color:"#2B3873"}},axisTick:{show:!0,lineStyle:{color:"#2B3873"}},axisLabel:{color:"#CDE0FF"},splitLine:{show:!1}},yAxis:{axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:"#CDE0FF"},splitLine:{show:!0,lineStyle:{color:"#2B3873",type:"dashed"}}},series:[{name:"支撑学科",type:"scatter",data:Yx.map((function(e,i){return{name:e.college,value:[e.use_time,e.numberOfRecords],symbolSize:2*Math.sqrt(e.numberOfResearchGroups),itemStyle:t[i%t.length]}})),label:{show:!0,position:"inside",color:"#CDE0FF",formatter:function(t){return t.data.name}},itemStyle:{borderWidth:1,borderType:"solid"}}]}},i.reaction((function(){return n.gpui.params.padding}),(function(t){r.padding=t||"7vh 2vh 2vh"}),{fireImmediately:!0}),r}return function(t,e){function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}(n,t),n.prototype.componentDidMount=function(){var t=this;this.chart=this.chart||qv.init(this.chartRef.current),window.addEventListener("resize",(function(){t.chart.resize()})),this.chart.setOption(this.generateChartOption(),{notMerge:!0})},n.prototype.render=function(){return e.createElement("div",{className:"g__index",style:{padding:this.padding}},e.createElement("div",{className:o},e.createElement("div",{ref:this.chartRef,className:s})))},a([i.observable],n.prototype,"padding",void 0),n=a([Y],n)}(e.Component)}));
