
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements.  See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership.  The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License.  You may obtain a copy of the License at
*
*   http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied.  See the License for the
* specific language governing permissions and limitations
* under the License.
*/


!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";var e=2311,n=function(){return e++},v="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.]+))/),o=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]);o&&(e.edge=!0,e.version=o[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&&11<=e.version),domSupported:"undefined"!=typeof document}}(navigator.userAgent);var s={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},l={"[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},u=Object.prototype.toString,i=Array.prototype,r=i.forEach,h=i.filter,o=i.slice,c=i.map,d=i.reduce,a={};function f(t,e){"createCanvas"===t&&(g=null),a[t]=e}function k(t){if(null==t||"object"!=typeof t)return t;var e=t,i=u.call(t);if("[object Array]"===i){if(!$(t)){e=[];for(var n=0,o=t.length;n<o;n++)e[n]=k(t[n])}}else if(l[i]){if(!$(t)){var a=t.constructor;if(t.constructor.from)e=a.from(t);else{e=new a(t.length);for(n=0,o=t.length;n<o;n++)e[n]=k(t[n])}}}else if(!s[i]&&!$(t)&&!G(t))for(var r in e={},t)t.hasOwnProperty(r)&&(e[r]=k(t[r]));return e}function m(t,e,i){if(!z(e)||!z(t))return i?k(e):t;for(var n in e)if(e.hasOwnProperty(n)){var o=t[n],a=e[n];!z(a)||!z(o)||L(a)||L(o)||G(a)||G(o)||B(a)||B(o)||$(a)||$(o)?!i&&n in t||(t[n]=k(e[n])):m(o,a,i)}return t}function p(t,e){for(var i=t[0],n=1,o=t.length;n<o;n++)i=m(i,t[n],e);return i}function P(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function D(t,e,i){for(var n in e)e.hasOwnProperty(n)&&(i?null!=e[n]:null==t[n])&&(t[n]=e[n]);return t}function y(){return a.createCanvas()}var g;function x(){return g=g||y().getContext("2d")}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}function w(t,e){var i=t.prototype;function n(){}for(var o in n.prototype=e.prototype,t.prototype=new n,i)i.hasOwnProperty(o)&&(t.prototype[o]=i[o]);(t.prototype.constructor=t).superClass=e}function b(t,e,i){D(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,i)}function N(t){if(t)return"string"!=typeof t&&"number"==typeof t.length}function E(t,e,i){if(t&&e)if(t.forEach&&t.forEach===r)t.forEach(e,i);else if(t.length===+t.length)for(var n=0,o=t.length;n<o;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 O(t,e,i){if(t&&e){if(t.map&&t.map===c)return t.map(e,i);for(var n=[],o=0,a=t.length;o<a;o++)n.push(e.call(i,t[o],o,t));return n}}function S(t,e,i,n){if(t&&e){if(t.reduce&&t.reduce===d)return t.reduce(e,i,n);for(var o=0,a=t.length;o<a;o++)i=e.call(n,i,t[o],o,t);return i}}function M(t,e,i){if(t&&e){if(t.filter&&t.filter===h)return t.filter(e,i);for(var n=[],o=0,a=t.length;o<a;o++)e.call(i,t[o],o,t)&&n.push(t[o]);return n}}function I(t,e,i){if(t&&e)for(var n=0,o=t.length;n<o;n++)if(e.call(i,t[n],n,t))return t[n]}function A(t,e){var i=o.call(arguments,2);return function(){return t.apply(e,i.concat(o.call(arguments)))}}function T(t){var e=o.call(arguments,1);return function(){return t.apply(this,e.concat(o.call(arguments)))}}function L(t){return"[object Array]"===u.call(t)}function C(t){return"function"==typeof t}function R(t){return"[object String]"===u.call(t)}function z(t){var e=typeof t;return"function"==e||!!t&&"object"==e}function B(t){return!!s[u.call(t)]}function V(t){return!!l[u.call(t)]}function G(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function F(t){return t!=t}function W(t){for(var e=0,i=arguments.length;e<i;e++)if(null!=arguments[e])return arguments[e]}function H(t,e){return null!=t?t:e}function Z(t,e,i){return null!=t?t:null!=e?e:i}function U(){return Function.call.apply(o,arguments)}function X(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}function Y(t,e){if(!t)throw new Error(e)}function j(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}a.createCanvas=function(){return document.createElement("canvas")};var q="__ec_primitive__";function K(t){t[q]=!0}function $(t){return t[q]}function J(t){var i=L(t);this.data={};var n=this;function e(t,e){i?n.set(t,e):n.set(e,t)}t instanceof J?t.each(e):t&&E(t,e)}function Q(t){return new J(t)}function tt(t,e){for(var i=new t.constructor(t.length+e.length),n=0;n<t.length;n++)i[n]=t[n];var o=t.length;for(n=0;n<e.length;n++)i[n+o]=e[n];return i}function et(){}J.prototype={constructor:J,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=A(t,e)),this.data)this.data.hasOwnProperty(i)&&t(this.data[i],i)},removeKey:function(t){delete this.data[t]}};var it=(Object.freeze||Object)({$override:f,clone:k,merge:m,mergeAll:p,extend:P,defaults:D,createCanvas:y,getContext:x,indexOf:_,inherits:w,mixin:b,isArrayLike:N,each:E,map:O,reduce:S,filter:M,find:I,bind:A,curry:T,isArray:L,isFunction:C,isString:R,isObject:z,isBuiltInObject:B,isTypedArray:V,isDom:G,eqNaN:F,retrieve:W,retrieve2:H,retrieve3:Z,slice:U,normalizeCssArray:X,assert:Y,trim:j,setAsPrimitive:K,isPrimitive:$,createHashMap:Q,concatArray:tt,noop:et}),nt="undefined"==typeof Float32Array?Array:Float32Array;function ot(t,e){var i=new nt(2);return null==t&&(t=0),null==e&&(e=0),i[0]=t,i[1]=e,i}function at(t,e){return t[0]=e[0],t[1]=e[1],t}function rt(t){var e=new nt(2);return e[0]=t[0],e[1]=t[1],e}function st(t,e,i){return t[0]=e,t[1]=i,t}function lt(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t}function ut(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t}function ht(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t}function ct(t){return Math.sqrt(ft(t))}var dt=ct;function ft(t){return t[0]*t[0]+t[1]*t[1]}var pt=ft;function gt(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t}function mt(t,e){var i=ct(e);return 0===i?(t[0]=0,t[1]=0):(t[0]=e[0]/i,t[1]=e[1]/i),t}function vt(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var yt=vt;function xt(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var _t=xt;function wt(t,e,i,n){return t[0]=e[0]+n*(i[0]-e[0]),t[1]=e[1]+n*(i[1]-e[1]),t}function bt(t,e,i){var n=e[0],o=e[1];return t[0]=i[0]*n+i[2]*o+i[4],t[1]=i[1]*n+i[3]*o+i[5],t}function St(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t}function Mt(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t}var It=(Object.freeze||Object)({create:ot,copy:at,clone:rt,set:st,add:lt,scaleAndAdd:ut,sub:ht,len:ct,length:dt,lenSquare:ft,lengthSquare:pt,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:gt,normalize:mt,distance:vt,dist:yt,distanceSquare:xt,distSquare:_t,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},lerp:wt,applyTransform:bt,min:St,max:Mt});function Tt(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}function At(t,e){return{target:t,topTarget:e&&e.topTarget}}Tt.prototype={constructor:Tt,_dragStart:function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent;e&&((this._draggingTarget=e).dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(At(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,n=t.offsetY,o=i-this._x,a=n-this._y;this._x=i,this._y=n,e.drift(o,a,t),this.dispatchToElement(At(e,t),"drag",t.event);var r=this.findHover(i,n,e).target,s=this._dropTarget;e!==(this._dropTarget=r)&&(s&&r!==s&&this.dispatchToElement(At(s,t),"dragleave",t.event),r&&r!==s&&this.dispatchToElement(At(r,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(At(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(At(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};var Dt=Array.prototype.slice,Ct=function(t){this._$handlers={},this._$eventProcessor=t};function Lt(t,e,i,n,o,a){var r=t._$handlers;if("function"==typeof i&&(o=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),r[e]||(r[e]=[]);for(var s=0;s<r[e].length;s++)if(r[e][s].h===n)return t;var l={h:n,one:a,query:i,ctx:o||t,callAtLast:n.zrEventfulCallAtLast},u=r[e].length-1,h=r[e][u];return h&&h.callAtLast?r[e].splice(u,0,l):r[e].push(l),t}Ct.prototype={constructor:Ct,one:function(t,e,i,n){return Lt(this,t,e,i,n,!0)},on:function(t,e,i,n){return Lt(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=[],o=0,a=i[t].length;o<a;o++)i[t][o].h!==e&&n.push(i[t][o]);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,o=n.length;3<o&&(n=Dt.call(n,1));for(var a=e.length,r=0;r<a;){var s=e[r];if(i&&i.filter&&null!=s.query&&!i.filter(t,s.query))r++;else{switch(o){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(r,1),a--):r++}}}return i&&i.afterTrigger&&i.afterTrigger(t),this},triggerWithContext:function(t){var e=this._$handlers[t],i=this._$eventProcessor;if(e){var n=arguments,o=n.length;4<o&&(n=Dt.call(n,1,n.length-1));for(var a=n[n.length-1],r=e.length,s=0;s<r;){var l=e[s];if(i&&i.filter&&null!=l.query&&!i.filter(t,l.query))s++;else{switch(o){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),r--):s++}}}return i&&i.afterTrigger&&i.afterTrigger(t),this}};var kt=Math.log(2);function Pt(t,e,i,n,o,a){var r=n+"-"+o,s=t.length;if(a.hasOwnProperty(r))return a[r];if(1===e){var l=Math.round(Math.log((1<<s)-1&~o)/kt);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&o||(c+=(f%2?-1:1)*t[i][d]*Pt(t,e-1,h,u,o|p,a),f++)}return a[r]=c}function Nt(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={},o=Pt(i,8,0,0,0,n);if(0!==o){for(var a=[],r=0;r<8;r++)for(var s=0;s<8;s++)null==a[s]&&(a[s]=0),a[s]+=((r+s)%2?-1:1)*Pt(i,7,0===r?1:0,1<<r,1<<s,n)/o*e[r];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}}}var Ot="___zrEVENTSAVED",Et=[];function Rt(t,e,i,n,o){if(e.getBoundingClientRect&&v.domSupported&&!zt(e)){var a=e[Ot]||(e[Ot]={}),r=function(t,e,i){for(var n=i?"invTrans":"trans",o=e[n],a=e.srcCoords,r=!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),r=r&&a&&d===a[c]&&f===a[1+c],l.push(t[u].offsetLeft,t[u].offsetTop)}return r&&o?o:(e.srcCoords=s,e[n]=i?Nt(l,s):Nt(s,l))}(function(t,e){var i=e.markers;if(i)return i;i=e.markers=[];for(var n=["left","right"],o=["top","bottom"],a=0;a<4;a++){var r=document.createElement("div"),s=r.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",o[u]+":0",n[1-l]+":auto",o[1-u]+":auto",""].join("!important;"),t.appendChild(r),i.push(r)}return i}(e,a),a,o);if(r)return r(t,i,n),!0}return!1}function zt(t){return"CANVAS"===t.nodeName.toUpperCase()}var Bt="undefined"!=typeof window&&!!window.addEventListener,Vt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Gt=[];function Ft(t,e,i,n){return i=i||{},n||!v.canvasSupported?Wt(t,e,i):v.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):Wt(t,e,i),i}function Wt(t,e,i){if(v.domSupported&&t.getBoundingClientRect){var n=e.clientX,o=e.clientY;if(zt(t)){var a=t.getBoundingClientRect();return i.zrX=n-a.left,void(i.zrY=o-a.top)}if(Rt(Gt,t,n,o))return i.zrX=Gt[0],void(i.zrY=Gt[1])}i.zrX=i.zrY=0}function Ht(t){return t||window.event}function Zt(t,e,i){if(null!=(e=Ht(e)).zrX)return e;var n=e.type;if(n&&0<=n.indexOf("touch")){var o="touchend"!==n?e.targetTouches[0]:e.changedTouches[0];o&&Ft(t,o,e,i)}else Ft(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&&Vt.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function Ut(t,e,i,n){Bt?t.addEventListener(e,i,n):t.attachEvent("on"+e,i)}var Xt=Bt?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};function Yt(t){return 2===t.which||3===t.which}function jt(){this._track=[]}function qt(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}jt.prototype={constructor:jt,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 o={points:[],touches:[],target:e,event:t},a=0,r=n.length;a<r;a++){var s=n[a],l=Ft(i,s,{});o.points.push([l.zrX,l.zrY]),o.touches.push(s)}this._track.push(o)}},_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=(t[i-1]||{}).points,o=(t[i-2]||{}).points||n;if(o&&1<o.length&&n&&1<n.length){var a=qt(n)/qt(o);isFinite(a)||(a=1),e.pinchScale=a;var r=function(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}(n);return e.pinchX=r[0],e.pinchY=r[1],{type:"pinch",target:t[0].target,event:e}}}}},$t="silent";function Jt(){Xt(this.event)}function Qt(){}Qt.prototype.dispose=function(){};function te(t,e,i,n){Ct.call(this),this.storage=t,this.painter=e,this.painterRoot=n,i=i||new Qt,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,Tt.call(this),this.setHandlerProxy(i)}var ee=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"];function ie(t,e,i){if(t[t.rectHover?"rectContain":"contain"](e,i)){for(var n,o=t;o;){if(o.clipPath&&!o.clipPath.contain(e,i))return!1;o.silent&&(n=!0),o=o.parent}return!n||$t}return!1}function ne(t,e,i){var n=t.painter;return e<0||e>n.getWidth()||i<0||i>n.getHeight()}te.prototype={constructor:te,setHandlerProxy:function(e){this.proxy&&this.proxy.dispose(),e&&(E(ee,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},mousemove:function(t){var e=t.zrX,i=t.zrY,n=ne(this,e,i),o=this._hovered,a=o.target;a&&!a.__zr&&(a=(o=this.findHover(o.x,o.y)).target);var r=this._hovered=n?{x:e,y:i}:this.findHover(e,i),s=r.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),a&&s!==a&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(r,"mousemove",t),s&&s!==a&&this.dispatchToElement(r,"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 o="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[o]&&(a.cancelBubble=n[o].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[o]&&t[o].call(t,a),t.trigger&&t.trigger(e,a)}))}},findHover:function(t,e,i){for(var n=this.storage.getDisplayList(),o={x:t,y:e},a=n.length-1;0<=a;a--){var r;if(n[a]!==i&&!n[a].ignore&&(r=ie(n[a],t,e))&&(o.topTarget||(o.topTarget=n[a]),r!==$t)){o.target=n[a];break}}return o},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new jt);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 o=n.type;t.gestureEvent=o,this.dispatchToElement({target:n.target},o,n.event)}}},E(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(r){te.prototype[r]=function(t){var e,i,n=t.zrX,o=t.zrY,a=ne(this,n,o);if("mouseup"===r&&a||(i=(e=this.findHover(n,o)).target),"mousedown"===r)this._downEl=i,this._downPoint=[t.zrX,t.zrY],this._upEl=i;else if("mouseup"===r)this._upEl=i;else if("click"===r){if(this._downEl!==this._upEl||!this._downPoint||4<yt(this._downPoint,[t.zrX,t.zrY]))return;this._downPoint=null}this.dispatchToElement(e,r,t)}}),b(te,Ct),b(te,Tt);var oe="undefined"==typeof Float32Array?Array:Float32Array;function ae(){var t=new oe(6);return re(t),t}function re(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function se(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}function le(t,e,i){var n=e[0]*i[0]+e[2]*i[1],o=e[1]*i[0]+e[3]*i[1],a=e[0]*i[2]+e[2]*i[3],r=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]=o,t[2]=a,t[3]=r,t[4]=s,t[5]=l,t}function ue(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}function he(t,e,i){var n=e[0],o=e[2],a=e[4],r=e[1],s=e[3],l=e[5],u=Math.sin(i),h=Math.cos(i);return t[0]=n*h+r*u,t[1]=-n*u+r*h,t[2]=o*h+s*u,t[3]=-o*u+h*s,t[4]=h*a+u*l,t[5]=h*l-u*a,t}function ce(t,e,i){var n=i[0],o=i[1];return t[0]=e[0]*n,t[1]=e[1]*o,t[2]=e[2]*n,t[3]=e[3]*o,t[4]=e[4]*n,t[5]=e[5]*o,t}function de(t,e){var i=e[0],n=e[2],o=e[4],a=e[1],r=e[3],s=e[5],l=i*r-a*n;return l?(l=1/l,t[0]=r*l,t[1]=-a*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-r*o)*l,t[5]=(a*o-i*s)*l,t):null}function fe(t){var e=ae();return se(e,t),e}var pe=(Object.freeze||Object)({create:ae,identity:re,copy:se,mul:le,translate:ue,rotate:he,scale:ce,invert:de,clone:fe}),ge=re;function me(t){return 5e-5<t||t<-5e-5}var ve=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},ye=ve.prototype;ye.transform=null,ye.needLocalTransform=function(){return me(this.rotation)||me(this.position[0])||me(this.position[1])||me(this.scale[0]-1)||me(this.scale[1]-1)};var xe=[];ye.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),n=this.transform;if(i||e){n=n||ae(),i?this.getLocalTransform(n):ge(n),e&&(i?le(n,t.transform,n):se(n,t.transform)),this.transform=n;var o=this.globalScaleRatio;if(null!=o&&1!==o){this.getGlobalScale(xe);var a=xe[0]<0?-1:1,r=xe[1]<0?-1:1,s=((xe[0]-a)*o+a)/xe[0]||0,l=((xe[1]-r)*o+r)/xe[1]||0;n[0]*=s,n[1]*=s,n[2]*=l,n[3]*=l}this.invTransform=this.invTransform||ae(),de(this.invTransform,n)}else n&&ge(n)},ye.getLocalTransform=function(t){return ve.getLocalTransform(this,t)},ye.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)},ye.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var _e=[],we=ae();ye.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,o=this.scale;me(e-1)&&(e=Math.sqrt(e)),me(i-1)&&(i=Math.sqrt(i)),t[0]<0&&(e=-e),t[3]<0&&(i=-i),n[0]=t[4],n[1]=t[5],o[0]=e,o[1]=i,this.rotation=Math.atan2(-t[1]/i,t[0]/e)}},ye.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(le(_e,t.invTransform,e),e=_e);var i=this.origin;i&&(i[0]||i[1])&&(we[4]=i[0],we[5]=i[1],le(_e,e,we),_e[4]-=i[0],_e[5]-=i[1],e=_e),this.setLocalTransform(e)}},ye.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[0]=1,t[1]=1),t},ye.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&bt(i,i,n),i},ye.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&bt(i,i,n),i},ve.getLocalTransform=function(t,e){ge(e=e||[]);var i=t.origin,n=t.scale||[1,1],o=t.rotation||0,a=t.position||[0,0];return i&&(e[4]-=i[0],e[5]-=i[1]),ce(e,e,n),o&&he(e,e,o),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=a[0],e[5]+=a[1],e};var be={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:(e=!i||i<1?(i=1,.1):.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:(e=!i||i<1?(i=1,.1):.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;return 0===t?0:1===t?1:(e=!i||i<1?(i=1,.1):.4*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*.5+1)},backIn:function(t){return t*t*(2.70158*t-1.70158)},backOut:function(t){return--t*t*(2.70158*t+1.70158)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((1+e)*t-e)*.5:.5*((t-=2)*t*((1+e)*t+e)+2)},bounceIn:function(t){return 1-be.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*be.bounceIn(2*t):.5*be.bounceOut(2*t-1)+.5}};function Se(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}Se.prototype={constructor:Se,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,o="string"==typeof n?be[n]:n,a="function"==typeof o?o(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}};function Me(){this.head=null,this.tail=null,this._len=0}var Ie=Me.prototype;Ie.insert=function(t){var e=new Ae(t);return this.insertEntry(e),e},Ie.insertEntry=function(t){this.head?((this.tail.next=t).prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},Ie.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--},Ie.len=function(){return this._len},Ie.clear=function(){this.head=this.tail=null,this._len=0};function Te(t){this._list=new Me,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null}var Ae=function(t){this.value=t,this.next,this.prev},De=Te.prototype;De.put=function(t,e){var i=this._list,n=this._map,o=null;if(null==n[t]){var a=i.len(),r=this._lastRemovedEntry;if(a>=this._maxSize&&0<a){var s=i.head;i.remove(s),delete n[s.key],o=s.value,this._lastRemovedEntry=s}r?r.value=e:r=new Ae(e),r.key=t,i.insertEntry(r),n[t]=r}return o},De.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},De.clear=function(){this._list.clear(),this._map={}};var Ce={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 Le(t){return(t=Math.round(t))<0?0:255<t?255:t}function ke(t){return t<0?0:1<t?1:t}function Pe(t){return t.length&&"%"===t.charAt(t.length-1)?Le(parseFloat(t)/100*255):Le(parseInt(t,10))}function Ne(t){return t.length&&"%"===t.charAt(t.length-1)?ke(parseFloat(t)/100):ke(parseFloat(t))}function Oe(t,e,i){return i<0?i+=1:1<i&&(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 Re(t,e,i,n,o){return t[0]=e,t[1]=i,t[2]=n,t[3]=o,t}function ze(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var Be=new Te(20),Ve=null;function Ge(t,e){Ve&&ze(Ve,e),Ve=Be.put(t,Ve||e.slice())}function Fe(t,e){if(t){e=e||[];var i=Be.get(t);if(i)return ze(e,i);var n,o=(t+="").replace(/ /g,"").toLowerCase();if(o in Ce)return ze(e,Ce[o]),Ge(t,e),e;if("#"===o.charAt(0))return 4===o.length?0<=(n=parseInt(o.substr(1),16))&&n<=4095?(Re(e,(3840&n)>>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,1),Ge(t,e),e):void Re(e,0,0,0,1):7===o.length?0<=(n=parseInt(o.substr(1),16))&&n<=16777215?(Re(e,(16711680&n)>>16,(65280&n)>>8,255&n,1),Ge(t,e),e):void Re(e,0,0,0,1):void 0;var a=o.indexOf("("),r=o.indexOf(")");if(-1!==a&&r+1===o.length){var s=o.substr(0,a),l=o.substr(a+1,r-(a+1)).split(","),u=1;switch(s){case"rgba":if(4!==l.length)return void Re(e,0,0,0,1);u=Ne(l.pop());case"rgb":return 3!==l.length?void Re(e,0,0,0,1):(Re(e,Pe(l[0]),Pe(l[1]),Pe(l[2]),u),Ge(t,e),e);case"hsla":return 4!==l.length?void Re(e,0,0,0,1):(l[3]=Ne(l[3]),We(l,e),Ge(t,e),e);case"hsl":return 3!==l.length?void Re(e,0,0,0,1):(We(l,e),Ge(t,e),e);default:return}}Re(e,0,0,0,1)}}function We(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=Ne(t[1]),o=Ne(t[2]),a=o<=.5?o*(n+1):o+n-o*n,r=2*o-a;return Re(e=e||[],Le(255*Oe(r,a,i+1/3)),Le(255*Oe(r,a,i)),Le(255*Oe(r,a,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function He(t,e){var i=Fe(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,255<i[n]?i[n]=255:t[n]<0&&(i[n]=0);return $e(i,4===i.length?"rgba":"rgb")}}function Ze(t){var e=Fe(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function Ue(t,e,i){if(e&&e.length&&0<=t&&t<=1){i=i||[];var n=t*(e.length-1),o=Math.floor(n),a=Math.ceil(n),r=e[o],s=e[a],l=n-o;return i[0]=Le(Ee(r[0],s[0],l)),i[1]=Le(Ee(r[1],s[1],l)),i[2]=Le(Ee(r[2],s[2],l)),i[3]=ke(Ee(r[3],s[3],l)),i}}var Xe=Ue;function Ye(t,e,i){if(e&&e.length&&0<=t&&t<=1){var n=t*(e.length-1),o=Math.floor(n),a=Math.ceil(n),r=Fe(e[o]),s=Fe(e[a]),l=n-o,u=$e([Le(Ee(r[0],s[0],l)),Le(Ee(r[1],s[1],l)),Le(Ee(r[2],s[2],l)),ke(Ee(r[3],s[3],l))],"rgba");return i?{color:u,leftIndex:o,rightIndex:a,value:n}:u}}var je=Ye;function qe(t,e,i,n){if(t=Fe(t))return t=function(t){if(t){var e,i,n=t[0]/255,o=t[1]/255,a=t[2]/255,r=Math.min(n,o,a),s=Math.max(n,o,a),l=s-r,u=(s+r)/2;if(0==l)i=e=0;else{i=u<.5?l/(s+r):l/(2-s-r);var h=((s-n)/6+l/2)/l,c=((s-o)/6+l/2)/l,d=((s-a)/6+l/2)/l;n===s?e=d-c:o===s?e=1/3+h-d:a===s&&(e=2/3+c-h),e<0&&(e+=1),1<e&&(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:360<t?360:t}(e)),null!=i&&(t[1]=Ne(i)),null!=n&&(t[2]=Ne(n)),$e(We(t),"rgba")}function Ke(t,e){if((t=Fe(t))&&null!=e)return t[3]=ke(e),$e(t,"rgba")}function $e(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=(Object.freeze||Object)({parse:Fe,lift:He,toHex:Ze,fastLerp:Ue,fastMapToColor:Xe,lerp:Ye,mapToColor:je,modifyHSL:qe,modifyAlpha:Ke,stringify:$e}),Qe=Array.prototype.slice;function ti(t,e){return t[e]}function ei(t,e,i){t[e]=i}function ii(t,e,i){return(e-t)*i+t}function ni(t,e,i){return.5<i?e:t}function oi(t,e,i,n,o){var a=t.length;if(1===o)for(var r=0;r<a;r++)n[r]=ii(t[r],e[r],i);else{var s=a&&t[0].length;for(r=0;r<a;r++)for(var l=0;l<s;l++)n[r][l]=ii(t[r][l],e[r][l],i)}}function ai(t,e,i){var n=t.length,o=e.length;if(n!==o)if(o<n)t.length=o;else for(var a=n;a<o;a++)t.push(1===i?e[a]:Qe.call(e[a]));var r=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<r;s++)isNaN(t[a][s])&&(t[a][s]=e[a][s])}function ri(t,e,i){if(t===e)return!0;var n=t.length;if(n!==e.length)return!1;if(1===i){for(var o=0;o<n;o++)if(t[o]!==e[o])return!1}else{var a=t[0].length;for(o=0;o<n;o++)for(var r=0;r<a;r++)if(t[o][r]!==e[o][r])return!1}return!0}function si(t,e,i,n,o,a,r,s,l){var u=t.length;if(1===l)for(var h=0;h<u;h++)s[h]=li(t[h],e[h],i[h],n[h],o,a,r);else{var c=t[0].length;for(h=0;h<u;h++)for(var d=0;d<c;d++)s[h][d]=li(t[h][d],e[h][d],i[h][d],n[h][d],o,a,r)}}function li(t,e,i,n,o,a,r){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*r+(-3*(e-i)-2*s-l)*a+s*o+e}function ui(t){if(N(t)){var e=t.length;if(N(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 hi(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function ci(t,e,i,n,a,o){var r=t._getter,s=t._setter,l="spline"===e,u=n.length;if(u){var h,c=N(n[0].value),d=!1,f=!1,p=c?function(t){var e=t[t.length-1].value;return N(e&&e[0])?2:1}(n):0;n.sort(function(t,e){return t.time-e.time}),h=n[u-1].time;for(var g=[],m=[],v=n[0].value,y=!0,x=0;x<u;x++){g.push(n[x].time/h);var _=n[x].value;if(c&&ri(_,v,p)||!c&&_===v||(y=!1),"string"==typeof(v=_)){var w=Fe(_);w?(_=w,d=!0):f=!0}m.push(_)}if(o||!y){var b=m[u-1];for(x=0;x<u-1;x++)c?ai(m[x],b,p):!isNaN(m[x])||isNaN(b)||f||d||(m[x]=b);c&&ai(r(t._target,a),b,p);var S,M,I,T,A,D=0,C=0;if(d)var L=[0,0,0,0];var k=new Se({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<C){for(i=Math.min(D+1,u-1);0<=i&&!(g[i]<=e);i--);i=Math.min(i,u-2)}else{for(i=D;i<u&&!(g[i]>e);i++);i=Math.min(i-1,u-2)}C=e;var n=g[(D=i)+1]-g[i];if(0!=n)if(S=(e-g[i])/n,l)if(I=m[i],M=m[0===i?i:i-1],T=m[u-2<i?u-1:i+1],A=m[u-3<i?u-1:i+2],c)si(M,I,T,A,S,S*S,S*S*S,r(t,a),p);else{if(d)o=si(M,I,T,A,S,S*S,S*S*S,L,1),o=hi(L);else{if(f)return ni(I,T,S);o=li(M,I,T,A,S,S*S,S*S*S)}s(t,a,o)}else if(c)oi(m[i],m[i+1],S,r(t,a),p);else{var o;if(d)oi(m[i],m[i+1],S,L,1),o=hi(L);else{if(f)return ni(m[i],m[i+1],S);o=ii(m[i],m[i+1],S)}s(t,a,o)}},ondestroy:i});return e&&"spline"!==e&&(k.easing=e),k}}}function di(t,e,i,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||ti,this._setter=n||ei,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]}di.prototype={when:function(t,e){var i=this._tracks;for(var n in e)if(e.hasOwnProperty(n)){if(!i[n]){i[n]=[];var o=this._getter(this._target,n);if(null==o)continue;0!==t&&i[n].push({time:0,value:ui(o)})}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){function i(){--a||o._doneCallback()}var n,o=this,a=0;for(var r in this._tracks)if(this._tracks.hasOwnProperty(r)){var s=ci(this,t,i,this._tracks[r],r,e);s&&(this._clipList.push(s),a++,this.animation&&this.animation.addClip(s),n=s)}if(n){var l=n.onframe;n.onframe=function(t,e){l(t,e);for(var i=0;i<o._onframeList.length;i++)o._onframeList[i](t,e)}}return a||this._doneCallback(),this},stop:function(t){for(var e=this._clipList,i=this.animation,n=0;n<e.length;n++){var o=e[n];t&&o.onframe(this._target,1),i&&i.removeClip(o)}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 fi=1;"undefined"!=typeof window&&(fi=Math.max(window.devicePixelRatio||1,1));var pi=fi,gi=function(){};function mi(){this.animators=[]}var vi=gi;function yi(t,e,i,n,o,a,r,s){R(n)?(a=o,o=n,n=0):C(o)?(a=o,o="linear",n=0):C(n)?(a=n,n=0):i=C(i)?(a=i,500):i||500,t.stopAnimation(),function t(e,i,n,o,a,r,s){var l={};var u=0;for(var h in o)o.hasOwnProperty(h)&&(null!=n[h]?z(o[h])&&!N(o[h])?t(e,i?i+"."+h:h,n[h],o[h],a,r,s):(s?(l[h]=n[h],xi(e,i,h,o[h])):l[h]=o[h],u++):null==o[h]||s||xi(e,i,h,o[h]));0<u&&e.animate(i,!1).when(null==a?500:a,l).delay(r||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(o,r)}function xi(t,e,i,n){if(e){var o={};o[e]={},o[e][i]=n,t.attr(o)}else t.attr(i,n)}mi.prototype={constructor:mi,animate:function(t,e){var i,n=!1,o=this,a=this.__zr;if(t){var r=t.split("."),s=o;n="shape"===r[0];for(var l=0,u=r.length;l<u;l++)s=s&&s[r[l]];s&&(i=s)}else i=o;if(i){var h=o.animators,c=new di(i,e);return c.during(function(t){o.dirty(n)}).done(function(){h.splice(_(h,c),1)}),h.push(c),a&&a.animation.addAnimator(c),c}vi('Property "'+t+'" is not existed in element '+o.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,o,a){yi(this,t,e,i,n,o,a)},animateFrom:function(t,e,i,n,o,a){yi(this,t,e,i,n,o,a,!0)}};var _i=function(t){ve.call(this,t),Ct.call(this,t),mi.call(this,t),this.id=t.id||n()};_i.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]))[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]=[]))[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(z(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).__zr=e,(t.__clipTarget=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)}},b(_i,mi),b(_i,ve),b(_i,Ct);var wi,bi,Si,Mi,Ii=bt,Ti=Math.min,Ai=Math.max;function Di(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}Di.prototype={constructor:Di,union:function(t){var e=Ti(t.x,this.x),i=Ti(t.y,this.y);this.width=Ai(t.x+t.width,this.x+this.width)-e,this.height=Ai(t.y+t.height,this.y+this.height)-i,this.x=e,this.y=i},applyTransform:(wi=[],bi=[],Si=[],Mi=[],function(t){if(t){wi[0]=Si[0]=this.x,wi[1]=Mi[1]=this.y,bi[0]=Mi[0]=this.x+this.width,bi[1]=Si[1]=this.y+this.height,Ii(wi,wi,t),Ii(bi,bi,t),Ii(Si,Si,t),Ii(Mi,Mi,t),this.x=Ti(wi[0],bi[0],Si[0],Mi[0]),this.y=Ti(wi[1],bi[1],Si[1],Mi[1]);var e=Ai(wi[0],bi[0],Si[0],Mi[0]),i=Ai(wi[1],bi[1],Si[1],Mi[1]);this.width=e-this.x,this.height=i-this.y}}),calculateTransform:function(t){var e=t.width/this.width,i=t.height/this.height,n=ae();return ue(n,n,[-this.x,-this.y]),ce(n,n,[e,i]),ue(n,n,[t.x,t.y]),n},intersect:function(t){if(!t)return!1;t instanceof Di||(t=Di.create(t));var e=this,i=e.x,n=e.x+e.width,o=e.y,a=e.y+e.height,r=t.x,s=t.x+t.width,l=t.y,u=t.y+t.height;return!(n<r||s<i||a<l||u<o)},contain:function(t,e){var i=this;return t>=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new Di(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}}},Di.create=function(t){return new Di(t.x,t.y,t.width,t.height)};var Ci=function(t){for(var e in t=t||{},_i.call(this,t),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};Ci.prototype={constructor:Ci,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);0<=n&&(i.splice(n,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t);var e=(t.parent=this).__storage,i=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof Ci&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,n=this._children,o=_(n,t);return o<0||(n.splice(o,1),t.parent=null,i&&(i.delFromStorage(t),t instanceof Ci&&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 Ci&&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 o=i[n];t.call(e,o,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 Ci&&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 Ci&&i.delChildrenFromStorage(t)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(t){for(var e=null,i=new Di(0,0,0,0),n=t||this._children,o=[],a=0;a<n.length;a++){var r=n[a];if(!r.ignore&&!r.invisible){var s=r.getBoundingRect(),l=r.getLocalTransform(o);l?(i.copy(s),i.applyTransform(l),(e=e||i.clone()).union(i)):(e=e||s.clone()).union(s)}}return e||i}},w(Ci,_i);var Li=32,ki=7;function Pi(t,e,i,n){var o=e+1;if(o===i)return 1;if(n(t[o++],t[e])<0){for(;o<i&&n(t[o],t[o-1])<0;)o++;!function(t,e,i){i--;for(;e<i;){var n=t[e];t[e++]=t[i],t[i--]=n}}(t,e,o)}else for(;o<i&&0<=n(t[o],t[o-1]);)o++;return o-e}function Ni(t,e,i,n,o){for(n===e&&n++;n<i;n++){for(var a,r=t[n],s=e,l=n;s<l;)o(r,t[a=s+l>>>1])<0?l=a:s=1+a;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(;0<u;)t[s+u]=t[s+u-1],u--}t[s]=r}}function Oi(t,e,i,n,o,a){var r=0,s=0,l=1;if(0<a(t,e[i+o])){for(s=n-o;l<s&&0<a(t,e[i+o+l]);)(l=1+((r=l)<<1))<=0&&(l=s);s<l&&(l=s),r+=o,l+=o}else{for(s=o+1;l<s&&a(t,e[i+o-l])<=0;)(l=1+((r=l)<<1))<=0&&(l=s);s<l&&(l=s);var u=r;r=o-l,l=o-u}for(r++;r<l;){var h=r+(l-r>>>1);0<a(t,e[i+h])?r=h+1:l=h}return l}function Ei(t,e,i,n,o,a){var r=0,s=0,l=1;if(a(t,e[i+o])<0){for(s=o+1;l<s&&a(t,e[i+o-l])<0;)(l=1+((r=l)<<1))<=0&&(l=s);s<l&&(l=s);var u=r;r=o-l,l=o-u}else{for(s=n-o;l<s&&0<=a(t,e[i+o+l]);)(l=1+((r=l)<<1))<=0&&(l=s);s<l&&(l=s),r+=o,l+=o}for(r++;r<l;){var h=r+(l-r>>>1);a(t,e[i+h])<0?l=h:r=h+1}return l}function Ri(p,g){var r,s,m=ki,l=0,v=[];function e(t){var e=r[t],i=s[t],n=r[t+1],o=s[t+1];s[t]=i+o,t===l-3&&(r[t+1]=r[t+2],s[t+1]=s[t+2]),l--;var a=Ei(p[n],p,e,i,0,g);e+=a,0!==(i-=a)&&0!==(o=Oi(p[e+i-1],p,n,o,o-1,g))&&(i<=o?function(t,e,i,n){var o=0;for(o=0;o<e;o++)v[o]=p[t+o];var a=0,r=i,s=t;if(p[s++]=p[r++],0==--n){for(o=0;o<e;o++)p[s+o]=v[a+o];return}if(1===e){for(o=0;o<n;o++)p[s+o]=p[r+o];return p[s+n]=v[a]}var l,u,h,c=m;for(;;){u=l=0,h=!1;do{if(g(p[r],v[a])<0){if(p[s++]=p[r++],u++,(l=0)==--n){h=!0;break}}else if(p[s++]=v[a++],l++,u=0,1==--e){h=!0;break}}while((l|u)<c);if(h)break;do{if(0!==(l=Ei(p[r],v,a,e,0,g))){for(o=0;o<l;o++)p[s+o]=v[a+o];if(s+=l,a+=l,(e-=l)<=1){h=!0;break}}if(p[s++]=p[r++],0==--n){h=!0;break}if(0!==(u=Oi(v[a],p,r,n,0,g))){for(o=0;o<u;o++)p[s+o]=p[r+o];if(s+=u,r+=u,0===(n-=u)){h=!0;break}}if(p[s++]=v[a++],1==--e){h=!0;break}c--}while(ki<=l||ki<=u);if(h)break;c<0&&(c=0),c+=2}if((m=c)<1&&(m=1),1===e){for(o=0;o<n;o++)p[s+o]=p[r+o];p[s+n]=v[a]}else{if(0===e)throw new Error;for(o=0;o<e;o++)p[s+o]=v[a+o]}}(e,i,n,o):function(t,e,i,n){var o=0;for(o=0;o<n;o++)v[o]=p[i+o];var a=t+e-1,r=n-1,s=i+n-1,l=0,u=0;if(p[s--]=p[a--],0==--e){for(l=s-(n-1),o=0;o<n;o++)p[l+o]=v[o];return}if(1===n){for(u=(s-=e)+1,l=(a-=e)+1,o=e-1;0<=o;o--)p[u+o]=p[l+o];return p[s]=v[r]}var h=m;for(;;){var c=0,d=0,f=!1;do{if(g(v[r],p[a])<0){if(p[s--]=p[a--],c++,(d=0)==--e){f=!0;break}}else if(p[s--]=v[r--],d++,c=0,1==--n){f=!0;break}}while((c|d)<h);if(f)break;do{if(0!==(c=e-Ei(v[r],p,t,e,e-1,g))){for(e-=c,u=(s-=c)+1,l=(a-=c)+1,o=c-1;0<=o;o--)p[u+o]=p[l+o];if(0===e){f=!0;break}}if(p[s--]=v[r--],1==--n){f=!0;break}if(0!==(d=n-Oi(p[a],v,0,n,n-1,g))){for(n-=d,u=(s-=d)+1,l=(r-=d)+1,o=0;o<d;o++)p[u+o]=v[l+o];if(n<=1){f=!0;break}}if(p[s--]=p[a--],0==--e){f=!0;break}h--}while(ki<=c||ki<=d);if(f)break;h<0&&(h=0),h+=2}(m=h)<1&&(m=1);if(1===n){for(u=(s-=e)+1,l=(a-=e)+1,o=e-1;0<=o;o--)p[u+o]=p[l+o];p[s]=v[r]}else{if(0===n)throw new Error;for(l=s-(n-1),o=0;o<n;o++)p[l+o]=v[o]}}(e,i,n,o))}r=[],s=[],this.mergeRuns=function(){for(;1<l;){var t=l-2;if(1<=t&&s[t-1]<=s[t]+s[t+1]||2<=t&&s[t-2]<=s[t]+s[t-1])s[t-1]<s[t+1]&&t--;else if(s[t]>s[t+1])break;e(t)}},this.forceMergeRuns=function(){for(;1<l;){var t=l-2;0<t&&s[t-1]<s[t+1]&&t--,e(t)}},this.pushRun=function(t,e){r[l]=t,s[l]=e,l+=1}}function zi(t,e,i,n){i=i||0;var o=(n=n||t.length)-i;if(!(o<2)){var a=0;if(o<Li)Ni(t,i,n,i+(a=Pi(t,i,n,e)),e);else{var r=new Ri(t,e),s=function(t){for(var e=0;Li<=t;)e|=1&t,t>>=1;return t+e}(o);do{if((a=Pi(t,i,n,e))<s){var l=o;s<l&&(l=s),Ni(t,i,i+l,i+a,e),a=l}r.pushRun(i,a),r.mergeRuns(),o-=a,i+=a}while(0!==o);r.forceMergeRuns()}}}function Bi(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function Vi(){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,o=e.length;n<o;n++)this._updateAndAddDisplayable(e[n],null,t);i.length=this._displayListLen,v.canvasSupported&&zi(i,Bi)},_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 o=n,a=t;o;)o.parent=a,o.updateTransform(),e.push(o),o=(a=o).clipPath}if(t.isGroup){for(var r=t._children,s=0;s<r.length;s++){var l=r[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 Ci&&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 Ci&&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 o=_(this._roots,t);0<=o&&(this.delFromStorage(t),this._roots.splice(o,1),t instanceof Ci&&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:Bi};var Gi={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},Fi=function(t,e,i){return Gi.hasOwnProperty(e)?i*t.dpr:i},Wi={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},Hi=9,Zi=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],Ui=function(t){this.extendFrom(t,!1)};function Xi(t,e,i){var n=null==e.x?0:e.x,o=null==e.x2?1:e.x2,a=null==e.y?0:e.y,r=null==e.y2?0:e.y2;return e.global||(n=n*i.width+i.x,o=o*i.width+i.x,a=a*i.height+i.y,r=r*i.height+i.y),n=isNaN(n)?0:n,o=isNaN(o)?1:o,a=isNaN(a)?0:a,r=isNaN(r)?0:r,t.createLinearGradient(n,a,o,r)}function Yi(t,e,i){var n=i.width,o=i.height,a=Math.min(n,o),r=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;return e.global||(r=r*n+i.x,s=s*o+i.y,l*=a),t.createRadialGradient(r,s,0,r,s,l)}Ui.prototype={constructor:Ui,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,i){var n=this,o=i&&i.style,a=!o||t.__attrCachedBy!==Wi.STYLE_BIND;t.__attrCachedBy=Wi.STYLE_BIND;for(var r=0;r<Zi.length;r++){var s=Zi[r],l=s[0];!a&&n[l]===o[l]||(t[l]=Fi(t,l,n[l]||s[1]))}if(!a&&n.fill===o.fill||(t.fillStyle=n.fill),!a&&n.stroke===o.stroke||(t.strokeStyle=n.stroke),!a&&n.opacity===o.opacity||(t.globalAlpha=null==n.opacity?1:n.opacity),!a&&n.blend===o.blend||(t.globalCompositeOperation=n.blend||"source-over"),this.hasStroke()){var u=n.lineWidth;t.lineWidth=u/(this.strokeNoScale&&e&&e.getLineScale?e.getLineScale():1)}},hasFill:function(){var t=this.fill;return null!=t&&"none"!==t},hasStroke:function(){var t=this.stroke;return null!=t&&"none"!==t&&0<this.lineWidth},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?Yi:Xi)(t,e,i),o=e.colorStops,a=0;a<o.length;a++)n.addColorStop(o[a].offset,o[a].color);return n}};for(var ji=Ui.prototype,qi=0;qi<Zi.length;qi++){var Ki=Zi[qi];Ki[0]in ji||(ji[Ki[0]]=Ki[1])}Ui.getGradient=ji.getGradient;function $i(t,e){this.image=t,this.repeat=e,this.type="pattern"}function Ji(){return!1}function Qi(t,e,i){var n=y(),o=e.getWidth(),a=e.getHeight(),r=n.style;return r&&(r.position="absolute",r.left=0,r.top=0,r.width=o+"px",r.height=a+"px",n.setAttribute("data-zr-dom-id",t)),n.width=o*i,n.height=a*i,n}function tn(t,e,i){var n;i=i||pi,"string"==typeof t?n=Qi(t,e,i):z(t)&&(t=(n=t).id),this.id=t;var o=(this.dom=n).style;o&&(n.onselectstart=Ji,o["-webkit-user-select"]="none",o["user-select"]="none",o["-webkit-touch-callout"]="none",o["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",o.padding=0,o.margin=0,o["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}tn.prototype={constructor:tn,__dirty:!0,__used:!($i.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")}),__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=Qi("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,o=n.style,a=this.domBack;o&&(o.width=t+"px",o.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,o=this.ctx,a=n.width,r=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,r/u)),o.clearRect(0,0,a,r),e&&"transparent"!==e&&(e.colorStops?(i=e.__canvasGradient||Ui.getGradient(o,e,{x:0,y:0,width:a,height:r}),e.__canvasGradient=i):e.image&&(i=$i.prototype.getCanvasPattern.call(e,o)),o.save(),o.fillStyle=i||e,o.fillRect(0,0,a,r),o.restore());if(s){var h=this.domBack;o.save(),o.globalAlpha=l,o.drawImage(h,0,0,a,r),o.restore()}}};var en="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)},nn=new Te(50);function on(t){if("string"!=typeof t)return t;var e=nn.get(t);return e&&e.image}function an(t,e,i,n,o){if(t){if("string"!=typeof t)return t;if(e&&e.__zrImageSrc===t||!i)return e;var a=nn.get(t),r={hostEl:i,cb:n,cbPayload:o};return a?sn(e=a.image)||a.pending.push(r):((e=new Image).onload=e.onerror=rn,nn.put(t,e.__cachedImgObj={image:e,pending:[r]}),e.src=e.__zrImageSrc=t),e}return e}function rn(){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 sn(t){return t&&t.width&&t.height}var ln={},un=0,hn=5e3,cn=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,dn="12px sans-serif",fn={};function pn(t,e){var i=t+":"+(e=e||dn);if(ln[i])return ln[i];for(var n,o,a=(t+"").split("\n"),r=0,s=0,l=a.length;s<l;s++)r=Math.max((n=a[s],o=e,fn.measureText(n,o)).width,r);return hn<un&&(un=0,ln={}),un++,ln[i]=r}function gn(t,e,i,n,o,a,r,s){return r?function(t,e,i,n,o,a,r,s){var l=In(t,{rich:r,truncate:s,font:e,textAlign:i,textPadding:o,textLineHeight:a}),u=l.outerWidth,h=l.outerHeight,c=mn(0,u,i),d=vn(0,h,n);return new Di(c,d,u,h)}(t,e,i,n,o,a,r,s):function(t,e,i,n,o,a,r){var s=Mn(t,e,o,a,r),l=pn(t,e);o&&(l+=o[1]+o[3]);var u=s.outerHeight,h=mn(0,l,i),c=vn(0,u,n),d=new Di(h,c,l,u);return d.lineHeight=s.lineHeight,d}(t,e,i,n,o,a,s)}function mn(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function vn(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function yn(t,e,i){var n=e.textPosition,o=e.textDistance,a=i.x,r=i.y;o=o||0;var s=i.height,l=i.width,u=s/2,h="left",c="top";switch(n){case"left":a-=o,r+=u,h="right",c="middle";break;case"right":a+=o+l,r+=u,c="middle";break;case"top":a+=l/2,r-=o,h="center",c="bottom";break;case"bottom":a+=l/2,r+=s+o,h="center";break;case"inside":a+=l/2,r+=u,h="center",c="middle";break;case"insideLeft":a+=o,r+=u,c="middle";break;case"insideRight":a+=l-o,r+=u,h="right",c="middle";break;case"insideTop":a+=l/2,r+=o,h="center";break;case"insideBottom":a+=l/2,r+=s-o,h="center",c="bottom";break;case"insideTopLeft":a+=o,r+=o;break;case"insideTopRight":a+=l-o,r+=o,h="right";break;case"insideBottomLeft":a+=o,r+=s-o,c="bottom";break;case"insideBottomRight":a+=l-o,r+=s-o,h="right",c="bottom"}return(t=t||{}).x=a,t.y=r,t.textAlign=h,t.textVerticalAlign=c,t}function xn(t,e,i,n,o){if(!e)return"";var a=(t+"").split("\n");o=_n(e,i,n,o);for(var r=0,s=a.length;r<s;r++)a[r]=wn(a[r],o);return a.join("\n")}function _n(t,e,i,n){(n=P({},n)).font=e;i=H(i,"...");n.maxIterations=H(n.maxIterations,2);var o=n.minChar=H(n.minChar,0);n.cnCharWidth=pn("