UNPKG

dpchart

Version:

Create your graph based of eCharts

1 lines 1.17 MB
var MK=(G,ee)=>()=>(G&&(ee=G(G=0)),ee);var Ua=(G,ee)=>()=>(ee||G((ee={exports:{}}).exports,ee),ee.exports);var $t=MK(()=>{});var _E=Ua((ld,mE)=>{$t();(function(G,ee){typeof ld=="object"&&typeof mE<"u"?ee(ld):typeof define=="function"&&define.amd?define(["exports"],ee):(G=typeof globalThis<"u"?globalThis:G||self,ee(G.echarts={}))})(ld,(function(G){"use strict";var ee=function(r,e){return ee=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])},ee(r,e)};function P(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");ee(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var q=(function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r})(),ut=(function(){function r(){this.browser=new q,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return r})(),Z=new ut;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(Z.wxa=!0,Z.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?Z.worker=!0:!Z.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(Z.node=!0,Z.svgSupported=!0):He(navigator.userAgent,Z);function He(r,e){var t=e.browser,n=r.match(/Firefox\/([\d.]+)/),a=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),i=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);n&&(t.firefox=!0,t.version=n[1]),a&&(t.ie=!0,t.version=a[1]),i&&(t.edge=!0,t.version=i[1],t.newEdge=+i[1].split(".")[0]>18),o&&(t.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!t.ie&&!t.edge,e.pointerEventsSupported="onpointerdown"in window&&(t.edge||t.ie&&+t.version>=11);var s=e.domSupported=typeof document<"u";if(s){var l=document.documentElement.style;e.transform3dSupported=(t.ie&&"transition"in l||t.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),e.transformSupported=e.transform3dSupported||t.ie&&+t.version>=9}}var xe=12,ge="sans-serif",Se=xe+"px "+ge,ke=20,re=100,ze="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function K(r){var e={};if(typeof JSON>"u")return e;for(var t=0;t<r.length;t++){var n=String.fromCharCode(t+32),a=(r.charCodeAt(t)-ke)/re;e[n]=a}return e}var pe=K(ze),ie={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:(function(){var r,e;return function(t,n){if(!r){var a=ie.createCanvas();r=a&&a.getContext("2d")}if(r)return e!==n&&(e=r.font=n||Se),r.measureText(t);t=t||"",n=n||Se;var i=/((?:\d+)?\.?\d*)px/.exec(n),o=i&&+i[1]||xe,s=0;if(n.indexOf("mono")>=0)s=o*t.length;else for(var l=0;l<t.length;l++){var u=pe[t[l]];s+=u==null?o:u*o}return{width:s}}})(),loadImage:function(r,e,t){var n=new Image;return n.onload=e,n.onerror=t,n.src=r,n}};function fe(r){for(var e in ie)r[e]&&(ie[e]=r[e])}var me=Er(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(r,e){return r["[object "+e+"]"]=!0,r},{}),Ae=Er(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(r,e){return r["[object "+e+"Array]"]=!0,r},{}),se=Object.prototype.toString,Ce=Array.prototype,Oe=Ce.forEach,Ve=Ce.filter,It=Ce.slice,At=Ce.map,Ge=function(){}.constructor,Ue=Ge?Ge.prototype:null,Ye="__proto__",rt=2311;function Je(){return rt++}function Ne(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];typeof console<"u"&&console.error.apply(console,r)}function $(r){if(r==null||typeof r!="object")return r;var e=r,t=se.call(r);if(t==="[object Array]"){if(!qo(r)){e=[];for(var n=0,a=r.length;n<a;n++)e[n]=$(r[n])}}else if(Ae[t]){if(!qo(r)){var i=r.constructor;if(i.from)e=i.from(r);else{e=new i(r.length);for(var n=0,a=r.length;n<a;n++)e[n]=r[n]}}}else if(!me[t]&&!qo(r)&&!en(r)){e={};for(var o in r)r.hasOwnProperty(o)&&o!==Ye&&(e[o]=$(r[o]))}return e}function ne(r,e,t){if(!ve(e)||!ve(r))return t?$(e):r;for(var n in e)if(e.hasOwnProperty(n)&&n!==Ye){var a=r[n],i=e[n];ve(i)&&ve(a)&&!U(i)&&!U(a)&&!en(i)&&!en(a)&&!dr(i)&&!dr(a)&&!qo(i)&&!qo(a)?ne(a,i,t):(t||!(n in r))&&(r[n]=$(e[n]))}return r}function dt(r,e){for(var t=r[0],n=1,a=r.length;n<a;n++)t=ne(t,r[n],e);return t}function V(r,e){if(Object.assign)Object.assign(r,e);else for(var t in e)e.hasOwnProperty(t)&&t!==Ye&&(r[t]=e[t]);return r}function X(r,e,t){for(var n=Xe(e),a=0,i=n.length;a<i;a++){var o=n[a];(t?e[o]!=null:r[o]==null)&&(r[o]=e[o])}return r}var Ht=ie.createCanvas;function De(r,e){if(r){if(r.indexOf)return r.indexOf(e);for(var t=0,n=r.length;t<n;t++)if(r[t]===e)return t}return-1}function cr(r,e){var t=r.prototype;function n(){}n.prototype=e.prototype,r.prototype=new n;for(var a in t)t.hasOwnProperty(a)&&(r.prototype[a]=t[a]);r.prototype.constructor=r,r.superClass=e}function Mt(r,e,t){if(r="prototype"in r?r.prototype:r,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var n=Object.getOwnPropertyNames(e),a=0;a<n.length;a++){var i=n[a];i!=="constructor"&&(t?e[i]!=null:r[i]==null)&&(r[i]=e[i])}else X(r,e,t)}function wt(r){return!r||typeof r=="string"?!1:typeof r.length=="number"}function A(r,e,t){if(r&&e)if(r.forEach&&r.forEach===Oe)r.forEach(e,t);else if(r.length===+r.length)for(var n=0,a=r.length;n<a;n++)e.call(t,r[n],n,r);else for(var i in r)r.hasOwnProperty(i)&&e.call(t,r[i],i,r)}function W(r,e,t){if(!r)return[];if(!e)return Rf(r);if(r.map&&r.map===At)return r.map(e,t);for(var n=[],a=0,i=r.length;a<i;a++)n.push(e.call(t,r[a],a,r));return n}function Er(r,e,t,n){if(r&&e){for(var a=0,i=r.length;a<i;a++)t=e.call(n,t,r[a],a,r);return t}}function et(r,e,t){if(!r)return[];if(!e)return Rf(r);if(r.filter&&r.filter===Ve)return r.filter(e,t);for(var n=[],a=0,i=r.length;a<i;a++)e.call(t,r[a],a,r)&&n.push(r[a]);return n}function Qr(r,e,t){if(r&&e){for(var n=0,a=r.length;n<a;n++)if(e.call(t,r[n],n,r))return r[n]}}function Xe(r){if(!r)return[];if(Object.keys)return Object.keys(r);var e=[];for(var t in r)r.hasOwnProperty(t)&&e.push(t);return e}function $o(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];return function(){return r.apply(e,t.concat(It.call(arguments)))}}var J=Ue&&oe(Ue.bind)?Ue.call.bind(Ue.bind):$o;function Re(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return function(){return r.apply(this,e.concat(It.call(arguments)))}}function U(r){return Array.isArray?Array.isArray(r):se.call(r)==="[object Array]"}function oe(r){return typeof r=="function"}function j(r){return typeof r=="string"}function kt(r){return se.call(r)==="[object String]"}function We(r){return typeof r=="number"}function ve(r){var e=typeof r;return e==="function"||!!r&&e==="object"}function dr(r){return!!me[se.call(r)]}function it(r){return!!Ae[se.call(r)]}function en(r){return typeof r=="object"&&typeof r.nodeType=="number"&&typeof r.ownerDocument=="object"}function Tl(r){return r.colorStops!=null}function C1(r){return r.image!=null}function ud(r){return se.call(r)==="[object RegExp]"}function er(r){return r!==r}function Wt(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];for(var t=0,n=r.length;t<n;t++)if(r[t]!=null)return r[t]}function he(r,e){return r??e}function Sr(r,e,t){return r??e??t}function Rf(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return It.apply(r,e)}function Cl(r){if(typeof r=="number")return[r,r,r,r];var e=r.length;return e===2?[r[0],r[1],r[0],r[1]]:e===3?[r[0],r[1],r[2],r[1]]:r}function ue(r,e){if(!r)throw new Error(e)}function Gr(r){return r==null?null:typeof r.trim=="function"?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var A1="__ec_primitive__";function Al(r){r[A1]=!0}function qo(r){return r[A1]}var IE=(function(){function r(){this.data={}}return r.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},r.prototype.has=function(e){return this.data.hasOwnProperty(e)},r.prototype.get=function(e){return this.data[e]},r.prototype.set=function(e,t){return this.data[e]=t,this},r.prototype.keys=function(){return Xe(this.data)},r.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},r})(),M1=typeof Map=="function";function PE(){return M1?new Map:new IE}var D1=(function(){function r(e){var t=U(e);this.data=PE();var n=this;e instanceof r?e.each(a):e&&A(e,a);function a(i,o){t?n.set(i,o):n.set(o,i)}}return r.prototype.hasKey=function(e){return this.data.has(e)},r.prototype.get=function(e){return this.data.get(e)},r.prototype.set=function(e,t){return this.data.set(e,t),t},r.prototype.each=function(e,t){this.data.forEach(function(n,a){e.call(t,n,a)})},r.prototype.keys=function(){var e=this.data.keys();return M1?Array.from(e):e},r.prototype.removeKey=function(e){this.data.delete(e)},r})();function ce(r){return new D1(r)}function Ko(r,e){for(var t=new r.constructor(r.length+e.length),n=0;n<r.length;n++)t[n]=r[n];for(var a=r.length,n=0;n<e.length;n++)t[n+a]=e[n];return t}function Ml(r,e){var t;if(Object.create)t=Object.create(r);else{var n=function(){};n.prototype=r,t=new n}return e&&V(t,e),t}function fd(r){var e=r.style;e.webkitUserSelect="none",e.userSelect="none",e.webkitTapHighlightColor="rgba(0,0,0,0)",e["-webkit-touch-callout"]="none"}function ae(r,e){return r.hasOwnProperty(e)}function Rt(){}var Dl=180/Math.PI,RE=Number.EPSILON||Math.pow(2,-52),EE=Object.freeze({__proto__:null,guid:Je,logError:Ne,clone:$,merge:ne,mergeAll:dt,extend:V,defaults:X,createCanvas:Ht,indexOf:De,inherits:cr,mixin:Mt,isArrayLike:wt,each:A,map:W,reduce:Er,filter:et,find:Qr,keys:Xe,bind:J,curry:Re,isArray:U,isFunction:oe,isString:j,isStringSafe:kt,isNumber:We,isObject:ve,isBuiltInObject:dr,isTypedArray:it,isDom:en,isGradientObject:Tl,isImagePatternObject:C1,isRegExp:ud,eqNaN:er,retrieve:Wt,retrieve2:he,retrieve3:Sr,slice:Rf,normalizeCssArray:Cl,assert:ue,trim:Gr,setAsPrimitive:Al,isPrimitive:qo,HashMap:D1,createHashMap:ce,concatArray:Ko,createObject:Ml,disableUserSelect:fd,hasOwn:ae,noop:Rt,RADIAN_TO_DEGREE:Dl,EPSILON:RE});function Xa(r,e){return r==null&&(r=0),e==null&&(e=0),[r,e]}function xr(r,e){return r[0]=e[0],r[1]=e[1],r}function zn(r){return[r[0],r[1]]}function Ef(r,e,t){return r[0]=e,r[1]=t,r}function vd(r,e,t){return r[0]=e[0]+t[0],r[1]=e[1]+t[1],r}function kf(r,e,t,n){return r[0]=e[0]+t[0]*n,r[1]=e[1]+t[1]*n,r}function Za(r,e,t){return r[0]=e[0]-t[0],r[1]=e[1]-t[1],r}function Ll(r){return Math.sqrt(hd(r))}var kE=Ll;function hd(r){return r[0]*r[0]+r[1]*r[1]}var OE=hd;function NE(r,e,t){return r[0]=e[0]*t[0],r[1]=e[1]*t[1],r}function BE(r,e,t){return r[0]=e[0]/t[0],r[1]=e[1]/t[1],r}function zE(r,e){return r[0]*e[0]+r[1]*e[1]}function Il(r,e,t){return r[0]=e[0]*t,r[1]=e[1]*t,r}function Ii(r,e){var t=Ll(e);return t===0?(r[0]=0,r[1]=0):(r[0]=e[0]/t,r[1]=e[1]/t),r}function Of(r,e){return Math.sqrt((r[0]-e[0])*(r[0]-e[0])+(r[1]-e[1])*(r[1]-e[1]))}var da=Of;function L1(r,e){return(r[0]-e[0])*(r[0]-e[0])+(r[1]-e[1])*(r[1]-e[1])}var $a=L1;function VE(r,e){return r[0]=-e[0],r[1]=-e[1],r}function Pl(r,e,t,n){return r[0]=e[0]+n*(t[0]-e[0]),r[1]=e[1]+n*(t[1]-e[1]),r}function Et(r,e,t){var n=e[0],a=e[1];return r[0]=t[0]*n+t[2]*a+t[4],r[1]=t[1]*n+t[3]*a+t[5],r}function pa(r,e,t){return r[0]=Math.min(e[0],t[0]),r[1]=Math.min(e[1],t[1]),r}function ga(r,e,t){return r[0]=Math.max(e[0],t[0]),r[1]=Math.max(e[1],t[1]),r}var GE=Object.freeze({__proto__:null,create:Xa,copy:xr,clone:zn,set:Ef,add:vd,scaleAndAdd:kf,sub:Za,len:Ll,length:kE,lenSquare:hd,lengthSquare:OE,mul:NE,div:BE,dot:zE,scale:Il,normalize:Ii,distance:Of,dist:da,distanceSquare:L1,distSquare:$a,negate:VE,lerp:Pl,applyTransform:Et,min:pa,max:ga}),jo=(function(){function r(e,t){this.target=e,this.topTarget=t&&t.topTarget}return r})(),FE=(function(){function r(e){this.handler=e,e.on("mousedown",this._dragStart,this),e.on("mousemove",this._drag,this),e.on("mouseup",this._dragEnd,this)}return r.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new jo(t,e),"dragstart",e.event))},r.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,a=e.offsetY,i=n-this._x,o=a-this._y;this._x=n,this._y=a,t.drift(i,o,e),this.handler.dispatchToElement(new jo(t,e),"drag",e.event);var s=this.handler.findHover(n,a,t).target,l=this._dropTarget;this._dropTarget=s,t!==s&&(l&&s!==l&&this.handler.dispatchToElement(new jo(l,e),"dragleave",e.event),s&&s!==l&&this.handler.dispatchToElement(new jo(s,e),"dragenter",e.event))}},r.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new jo(t,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new jo(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},r})(),tn=(function(){function r(e){e&&(this._$eventProcessor=e)}return r.prototype.on=function(e,t,n,a){this._$handlers||(this._$handlers={});var i=this._$handlers;if(typeof t=="function"&&(a=n,n=t,t=null),!n||!e)return this;var o=this._$eventProcessor;t!=null&&o&&o.normalizeQuery&&(t=o.normalizeQuery(t)),i[e]||(i[e]=[]);for(var s=0;s<i[e].length;s++)if(i[e][s].h===n)return this;var l={h:n,query:t,ctx:a||this,callAtLast:n.zrEventfulCallAtLast},u=i[e].length-1,f=i[e][u];return f&&f.callAtLast?i[e].splice(u,0,l):i[e].push(l),this},r.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},r.prototype.off=function(e,t){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var a=[],i=0,o=n[e].length;i<o;i++)n[e][i].h!==t&&a.push(n[e][i]);n[e]=a}n[e]&&n[e].length===0&&delete n[e]}else delete n[e];return this},r.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var a=this._$handlers[e],i=this._$eventProcessor;if(a)for(var o=t.length,s=a.length,l=0;l<s;l++){var u=a[l];if(!(i&&i.filter&&u.query!=null&&!i.filter(e,u.query)))switch(o){case 0:u.h.call(u.ctx);break;case 1:u.h.call(u.ctx,t[0]);break;case 2:u.h.call(u.ctx,t[0],t[1]);break;default:u.h.apply(u.ctx,t);break}}return i&&i.afterTrigger&&i.afterTrigger(e),this},r.prototype.triggerWithContext=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var a=this._$handlers[e],i=this._$eventProcessor;if(a)for(var o=t.length,s=t[o-1],l=a.length,u=0;u<l;u++){var f=a[u];if(!(i&&i.filter&&f.query!=null&&!i.filter(e,f.query)))switch(o){case 0:f.h.call(s);break;case 1:f.h.call(s,t[0]);break;case 2:f.h.call(s,t[0],t[1]);break;default:f.h.apply(s,t.slice(1,o-1));break}}return i&&i.afterTrigger&&i.afterTrigger(e),this},r})(),HE=Math.log(2);function cd(r,e,t,n,a,i){var o=n+"-"+a,s=r.length;if(i.hasOwnProperty(o))return i[o];if(e===1){var l=Math.round(Math.log((1<<s)-1&~a)/HE);return r[t][l]}for(var u=n|1<<t,f=t+1;n&1<<f;)f++;for(var v=0,h=0,c=0;h<s;h++){var d=1<<h;d&a||(v+=(c%2?-1:1)*r[t][h]*cd(r,e-1,f,u,a|d,i),c++)}return i[o]=v,v}function I1(r,e){var t=[[r[0],r[1],1,0,0,0,-e[0]*r[0],-e[0]*r[1]],[0,0,0,r[0],r[1],1,-e[1]*r[0],-e[1]*r[1]],[r[2],r[3],1,0,0,0,-e[2]*r[2],-e[2]*r[3]],[0,0,0,r[2],r[3],1,-e[3]*r[2],-e[3]*r[3]],[r[4],r[5],1,0,0,0,-e[4]*r[4],-e[4]*r[5]],[0,0,0,r[4],r[5],1,-e[5]*r[4],-e[5]*r[5]],[r[6],r[7],1,0,0,0,-e[6]*r[6],-e[6]*r[7]],[0,0,0,r[6],r[7],1,-e[7]*r[6],-e[7]*r[7]]],n={},a=cd(t,8,0,0,0,n);if(a!==0){for(var i=[],o=0;o<8;o++)for(var s=0;s<8;s++)i[s]==null&&(i[s]=0),i[s]+=((o+s)%2?-1:1)*cd(t,7,o===0?1:0,1<<o,1<<s,n)/a*e[o];return function(l,u,f){var v=u*i[6]+f*i[7]+1;l[0]=(u*i[0]+f*i[1]+i[2])/v,l[1]=(u*i[3]+f*i[4]+i[5])/v}}}var Nf="___zrEVENTSAVED",dd=[];function WE(r,e,t,n,a){return pd(dd,e,n,a,!0)&&pd(r,t,dd[0],dd[1])}function UE(r,e){r&&t(r),e&&t(e);function t(n){var a=n[Nf];a&&(a.clearMarkers&&a.clearMarkers(),delete n[Nf])}}function pd(r,e,t,n,a){if(e.getBoundingClientRect&&Z.domSupported&&!P1(e)){var i=e[Nf]||(e[Nf]={}),o=YE(e,i),s=XE(o,i,a);if(s)return s(r,t,n),!0}return!1}function YE(r,e){var t=e.markers;if(t)return t;t=e.markers=[];for(var n=["left","right"],a=["top","bottom"],i=0;i<4;i++){var o=document.createElement("div"),s=o.style,l=i%2,u=(i>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",a[u]+":0",n[1-l]+":auto",a[1-u]+":auto",""].join("!important;"),r.appendChild(o),t.push(o)}return e.clearMarkers=function(){A(t,function(f){f.parentNode&&f.parentNode.removeChild(f)})},t}function XE(r,e,t){for(var n=t?"invTrans":"trans",a=e[n],i=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var f=r[u].getBoundingClientRect(),v=2*u,h=f.left,c=f.top;o.push(h,c),l=l&&i&&h===i[v]&&c===i[v+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&a?a:(e.srcCoords=o,e[n]=t?I1(s,o):I1(o,s))}function P1(r){return r.nodeName.toUpperCase()==="CANVAS"}var ZE=/([&<>"'])/g,$E={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function pr(r){return r==null?"":(r+"").replace(ZE,function(e,t){return $E[t]})}var qE=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,gd=[],KE=Z.browser.firefox&&+Z.browser.version.split(".")[0]<39;function yd(r,e,t,n){return t=t||{},n?R1(r,e,t):KE&&e.layerX!=null&&e.layerX!==e.offsetX?(t.zrX=e.layerX,t.zrY=e.layerY):e.offsetX!=null?(t.zrX=e.offsetX,t.zrY=e.offsetY):R1(r,e,t),t}function R1(r,e,t){if(Z.domSupported&&r.getBoundingClientRect){var n=e.clientX,a=e.clientY;if(P1(r)){var i=r.getBoundingClientRect();t.zrX=n-i.left,t.zrY=a-i.top;return}else if(pd(gd,r,n,a)){t.zrX=gd[0],t.zrY=gd[1];return}}t.zrX=t.zrY=0}function md(r){return r||window.event}function rn(r,e,t){if(e=md(e),e.zrX!=null)return e;var n=e.type,a=n&&n.indexOf("touch")>=0;if(a){var o=n!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&yd(r,o,e,t)}else{yd(r,e,e,t);var i=jE(e);e.zrDelta=i?i/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&qE.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function jE(r){var e=r.wheelDelta;if(e)return e;var t=r.deltaX,n=r.deltaY;if(t==null||n==null)return e;var a=Math.abs(n!==0?n:t),i=n>0?-1:n<0?1:t>0?-1:1;return 3*a*i}function _d(r,e,t,n){r.addEventListener(e,t,n)}function JE(r,e,t,n){r.removeEventListener(e,t,n)}var ya=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function E1(r){return r.which===2||r.which===3}var QE=(function(){function r(){this._track=[]}return r.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(e,t,n){var a=e.touches;if(a){for(var i={points:[],touches:[],target:t,event:e},o=0,s=a.length;o<s;o++){var l=a[o],u=yd(n,l,{});i.points.push([u.zrX,u.zrY]),i.touches.push(l)}this._track.push(i)}},r.prototype._recognize=function(e){for(var t in Sd)if(Sd.hasOwnProperty(t)){var n=Sd[t](this._track,e);if(n)return n}},r})();function k1(r){var e=r[1][0]-r[0][0],t=r[1][1]-r[0][1];return Math.sqrt(e*e+t*t)}function ek(r){return[(r[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2]}var Sd={pinch:function(r,e){var t=r.length;if(t){var n=(r[t-1]||{}).points,a=(r[t-2]||{}).points||n;if(a&&a.length>1&&n&&n.length>1){var i=k1(n)/k1(a);!isFinite(i)&&(i=1),e.pinchScale=i;var o=ek(n);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:r[0].target,event:e}}}}};function tr(){return[1,0,0,1,0,0]}function Rl(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function El(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r}function bn(r,e,t){var n=e[0]*t[0]+e[2]*t[1],a=e[1]*t[0]+e[3]*t[1],i=e[0]*t[2]+e[2]*t[3],o=e[1]*t[2]+e[3]*t[3],s=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];return r[0]=n,r[1]=a,r[2]=i,r[3]=o,r[4]=s,r[5]=l,r}function wn(r,e,t){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4]+t[0],r[5]=e[5]+t[1],r}function ma(r,e,t,n){n===void 0&&(n=[0,0]);var a=e[0],i=e[2],o=e[4],s=e[1],l=e[3],u=e[5],f=Math.sin(t),v=Math.cos(t);return r[0]=a*v+s*f,r[1]=-a*f+s*v,r[2]=i*v+l*f,r[3]=-i*f+v*l,r[4]=v*(o-n[0])+f*(u-n[1])+n[0],r[5]=v*(u-n[1])-f*(o-n[0])+n[1],r}function Bf(r,e,t){var n=t[0],a=t[1];return r[0]=e[0]*n,r[1]=e[1]*a,r[2]=e[2]*n,r[3]=e[3]*a,r[4]=e[4]*n,r[5]=e[5]*a,r}function nn(r,e){var t=e[0],n=e[2],a=e[4],i=e[1],o=e[3],s=e[5],l=t*o-i*n;return l?(l=1/l,r[0]=o*l,r[1]=-i*l,r[2]=-n*l,r[3]=t*l,r[4]=(n*s-o*a)*l,r[5]=(i*a-t*s)*l,r):null}function O1(r){var e=tr();return El(e,r),e}var tk=Object.freeze({__proto__:null,create:tr,identity:Rl,copy:El,mul:bn,translate:wn,rotate:ma,scale:Bf,invert:nn,clone:O1}),be=(function(){function r(e,t){this.x=e||0,this.y=t||0}return r.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(e,t){return this.x=e,this.y=t,this},r.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},r.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},r.prototype.scale=function(e){this.x*=e,this.y*=e},r.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},r.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},r.prototype.dot=function(e){return this.x*e.x+this.y*e.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},r.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},r.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},r.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},r.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},r.set=function(e,t,n){e.x=t,e.y=n},r.copy=function(e,t){e.x=t.x,e.y=t.y},r.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},r.lenSquare=function(e){return e.x*e.x+e.y*e.y},r.dot=function(e,t){return e.x*t.x+e.y*t.y},r.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},r.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},r.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},r.scaleAndAdd=function(e,t,n,a){e.x=t.x+n.x*a,e.y=t.y+n.y*a},r.lerp=function(e,t,n,a){var i=1-a;e.x=i*t.x+a*n.x,e.y=i*t.y+a*n.y},r})(),Pi=Math.min,Jo=Math.max,xd=Math.abs,N1=["x","y"],rk=["width","height"],Ri=new be,Ei=new be,ki=new be,Oi=new be,Fr=z1(),kl=Fr.minTv,bd=Fr.maxTv,Ol=[0,0],we=(function(){function r(e,t,n,a){r.set(this,e,t,n,a)}return r.set=function(e,t,n,a,i){return a<0&&(t=t+a,a=-a),i<0&&(n=n+i,i=-i),e.x=t,e.y=n,e.width=a,e.height=i,e},r.prototype.union=function(e){var t=Pi(e.x,this.x),n=Pi(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Jo(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=Jo(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},r.prototype.applyTransform=function(e){r.applyTransform(this,this,e)},r.prototype.calculateTransform=function(e){var t=this,n=e.width/t.width,a=e.height/t.height,i=tr();return wn(i,i,[-t.x,-t.y]),Bf(i,i,[n,a]),wn(i,i,[e.x,e.y]),i},r.prototype.intersect=function(e,t,n){return r.intersect(this,e,t,n)},r.intersect=function(e,t,n,a){n&&be.set(n,0,0);var i=a&&a.outIntersectRect||null,o=a&&a.clamp;if(i&&(i.x=i.y=i.width=i.height=NaN),!e||!t)return!1;e instanceof r||(e=r.set(nk,e.x,e.y,e.width,e.height)),t instanceof r||(t=r.set(ak,t.x,t.y,t.width,t.height));var s=!!n;Fr.reset(a,s);var l=Fr.touchThreshold,u=e.x+l,f=e.x+e.width-l,v=e.y+l,h=e.y+e.height-l,c=t.x+l,d=t.x+t.width-l,p=t.y+l,g=t.y+t.height-l;if(u>f||v>h||c>d||p>g)return!1;var y=!(f<c||d<u||h<p||g<v);return(s||i)&&(Ol[0]=1/0,Ol[1]=0,B1(u,f,c,d,0,s,i,o),B1(v,h,p,g,1,s,i,o),s&&be.copy(n,y?Fr.useDir?Fr.dirMinTv:kl:bd)),y},r.contain=function(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},r.prototype.contain=function(e,t){return r.contain(this,e,t)},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(e){r.copy(this,e)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(e){return new r(e.x,e.y,e.width,e.height)},r.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},r.applyTransform=function(e,t,n){if(!n){e!==t&&r.copy(e,t);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var a=n[0],i=n[3],o=n[4],s=n[5];e.x=t.x*a+o,e.y=t.y*i+s,e.width=t.width*a,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}Ri.x=ki.x=t.x,Ri.y=Oi.y=t.y,Ei.x=Oi.x=t.x+t.width,Ei.y=ki.y=t.y+t.height,Ri.transform(n),Oi.transform(n),Ei.transform(n),ki.transform(n),e.x=Pi(Ri.x,Ei.x,ki.x,Oi.x),e.y=Pi(Ri.y,Ei.y,ki.y,Oi.y);var l=Jo(Ri.x,Ei.x,ki.x,Oi.x),u=Jo(Ri.y,Ei.y,ki.y,Oi.y);e.width=l-e.x,e.height=u-e.y},r})(),nk=new we(0,0,0,0),ak=new we(0,0,0,0);function B1(r,e,t,n,a,i,o,s){var l=xd(e-t),u=xd(n-r),f=Pi(l,u),v=N1[a],h=N1[1-a],c=rk[a];e<t||n<r?l<u?(i&&(bd[v]=-l),s&&(o[v]=e,o[c]=0)):(i&&(bd[v]=u),s&&(o[v]=r,o[c]=0)):(o&&(o[v]=Jo(r,t),o[c]=Pi(e,n)-o[v]),i&&(f<Ol[0]||Fr.useDir)&&(Ol[0]=Pi(f,Ol[0]),(l<u||!Fr.bidirectional)&&(kl[v]=l,kl[h]=0,Fr.useDir&&Fr.calcDirMTV()),(l>=u||!Fr.bidirectional)&&(kl[v]=-u,kl[h]=0,Fr.useDir&&Fr.calcDirMTV())))}function z1(){var r=0,e=new be,t=new be,n={minTv:new be,maxTv:new be,useDir:!1,dirMinTv:new be,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,o){n.touchThreshold=0,i&&i.touchThreshold!=null&&(n.touchThreshold=Jo(0,i.touchThreshold)),n.negativeSize=!1,o&&(n.minTv.set(1/0,1/0),n.maxTv.set(0,0),n.useDir=!1,i&&i.direction!=null&&(n.useDir=!0,n.dirMinTv.copy(n.minTv),t.copy(n.minTv),r=i.direction,n.bidirectional=i.bidirectional==null||!!i.bidirectional,n.bidirectional||e.set(Math.cos(r),Math.sin(r))))},calcDirMTV:function(){var i=n.minTv,o=n.dirMinTv,s=i.y*i.y+i.x*i.x,l=Math.sin(r),u=Math.cos(r),f=l*i.y+u*i.x;if(a(f)){a(i.x)&&a(i.y)&&o.set(0,0);return}if(t.x=s*u/f,t.y=s*l/f,a(t.x)&&a(t.y)){o.set(0,0);return}(n.bidirectional||e.dot(t)>0)&&t.len()<o.len()&&o.copy(t)}};function a(i){return xd(i)<1e-10}return n}var V1="silent";function ik(r,e,t){return{type:r,event:t,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:t.zrX,offsetY:t.zrY,gestureEvent:t.gestureEvent,pinchX:t.pinchX,pinchY:t.pinchY,pinchScale:t.pinchScale,wheelDelta:t.zrDelta,zrByTouch:t.zrByTouch,which:t.which,stop:ok}}function ok(){ya(this.event)}var sk=(function(r){P(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.handler=null,t}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e})(tn),Nl=(function(){function r(e,t){this.x=e,this.y=t}return r})(),lk=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],wd=new we(0,0,0,0),G1=(function(r){P(e,r);function e(t,n,a,i,o){var s=r.call(this)||this;return s._hovered=new Nl(0,0),s.storage=t,s.painter=n,s.painterRoot=i,s._pointerSize=o,a=a||new sk,s.proxy=null,s.setHandlerProxy(a),s._draggingMgr=new FE(s),s}return e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(A(lk,function(n){t.on&&t.on(n,this[n],this)},this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var n=t.zrX,a=t.zrY,i=H1(this,n,a),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=i?new Nl(n,a):this.findHover(n,a),u=l.target,f=this.proxy;f.setCursor&&f.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(l,"mousemove",t),u&&u!==s&&this.dispatchToElement(l,"mouseover",t)},e.prototype.mouseout=function(t){var n=t.zrEventControl;n!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",t),n!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new Nl(0,0)},e.prototype.dispatch=function(t,n){var a=this[t];a&&a.call(this,n)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var n=this.proxy;n.setCursor&&n.setCursor(t)},e.prototype.dispatchToElement=function(t,n,a){t=t||{};var i=t.target;if(!(i&&i.silent)){for(var o="on"+n,s=ik(n,t,a);i&&(i[o]&&(s.cancelBubble=!!i[o].call(i,s)),i.trigger(n,s),i=i.__hostTarget?i.__hostTarget:i.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(n,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(n,s)}))}},e.prototype.findHover=function(t,n,a){var i=this.storage.getDisplayList(),o=new Nl(t,n);if(F1(i,o,t,n,a),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,f=new we(t-u,n-u,l,l),v=i.length-1;v>=0;v--){var h=i[v];h!==a&&!h.ignore&&!h.ignoreCoarsePointer&&(!h.parent||!h.parent.ignoreCoarsePointer)&&(wd.copy(h.getBoundingRect()),h.transform&&wd.applyTransform(h.transform),wd.intersect(f)&&s.push(h))}if(s.length)for(var c=4,d=Math.PI/12,p=Math.PI*2,g=0;g<u;g+=c)for(var y=0;y<p;y+=d){var m=t+g*Math.cos(y),_=n+g*Math.sin(y);if(F1(s,o,m,_,a),o.target)return o}}return o},e.prototype.processGesture=function(t,n){this._gestureMgr||(this._gestureMgr=new QE);var a=this._gestureMgr;n==="start"&&a.clear();var i=a.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if(n==="end"&&a.clear(),i){var o=i.type;t.gestureEvent=o;var s=new Nl;s.target=i.target,this.dispatchToElement(s,o,i.event)}},e})(tn);A(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(r){G1.prototype[r]=function(e){var t=e.zrX,n=e.zrY,a=H1(this,t,n),i,o;if((r!=="mouseup"||!a)&&(i=this.findHover(t,n),o=i.target),r==="mousedown")this._downEl=o,this._downPoint=[e.zrX,e.zrY],this._upEl=o;else if(r==="mouseup")this._upEl=o;else if(r==="click"){if(this._downEl!==this._upEl||!this._downPoint||da(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,r,e)}});function uk(r,e,t){if(r[r.rectHover?"rectContain":"contain"](e,t)){for(var n=r,a=void 0,i=!1;n;){if(n.ignoreClip&&(i=!0),!i){var o=n.getClipPath();if(o&&!o.contain(e,t))return!1}n.silent&&(a=!0);var s=n.__hostTarget;n=s?n.ignoreHostSilent?null:s:n.parent}return a?V1:!0}return!1}function F1(r,e,t,n,a){for(var i=r.length-1;i>=0;i--){var o=r[i],s=void 0;if(o!==a&&!o.ignore&&(s=uk(o,t,n))&&(!e.topTarget&&(e.topTarget=o),s!==V1)){e.target=o;break}}}function H1(r,e,t){var n=r.painter;return e<0||e>n.getWidth()||t<0||t>n.getHeight()}var W1=32,Bl=7;function fk(r){for(var e=0;r>=W1;)e|=r&1,r>>=1;return r+e}function U1(r,e,t,n){var a=e+1;if(a===t)return 1;if(n(r[a++],r[e])<0){for(;a<t&&n(r[a],r[a-1])<0;)a++;vk(r,e,a)}else for(;a<t&&n(r[a],r[a-1])>=0;)a++;return a-e}function vk(r,e,t){for(t--;e<t;){var n=r[e];r[e++]=r[t],r[t--]=n}}function Y1(r,e,t,n,a){for(n===e&&n++;n<t;n++){for(var i=r[n],o=e,s=n,l;o<s;)l=o+s>>>1,a(i,r[l])<0?s=l:o=l+1;var u=n-o;switch(u){case 3:r[o+3]=r[o+2];case 2:r[o+2]=r[o+1];case 1:r[o+1]=r[o];break;default:for(;u>0;)r[o+u]=r[o+u-1],u--}r[o]=i}}function Td(r,e,t,n,a,i){var o=0,s=0,l=1;if(i(r,e[t+a])>0){for(s=n-a;l<s&&i(r,e[t+a+l])>0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=a,l+=a}else{for(s=a+1;l<s&&i(r,e[t+a-l])<=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=a-l,l=a-u}for(o++;o<l;){var f=o+(l-o>>>1);i(r,e[t+f])>0?o=f+1:l=f}return l}function Cd(r,e,t,n,a,i){var o=0,s=0,l=1;if(i(r,e[t+a])<0){for(s=a+1;l<s&&i(r,e[t+a-l])<0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=a-l,l=a-u}else{for(s=n-a;l<s&&i(r,e[t+a+l])>=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=a,l+=a}for(o++;o<l;){var f=o+(l-o>>>1);i(r,e[t+f])<0?l=f:o=f+1}return l}function hk(r,e){var t=Bl,n,a,i=0,o=[];n=[],a=[];function s(c,d){n[i]=c,a[i]=d,i+=1}function l(){for(;i>1;){var c=i-2;if(c>=1&&a[c-1]<=a[c]+a[c+1]||c>=2&&a[c-2]<=a[c]+a[c-1])a[c-1]<a[c+1]&&c--;else if(a[c]>a[c+1])break;f(c)}}function u(){for(;i>1;){var c=i-2;c>0&&a[c-1]<a[c+1]&&c--,f(c)}}function f(c){var d=n[c],p=a[c],g=n[c+1],y=a[c+1];a[c]=p+y,c===i-3&&(n[c+1]=n[c+2],a[c+1]=a[c+2]),i--;var m=Cd(r[g],r,d,p,0,e);d+=m,p-=m,p!==0&&(y=Td(r[d+p-1],r,g,y,y-1,e),y!==0&&(p<=y?v(d,p,g,y):h(d,p,g,y)))}function v(c,d,p,g){var y=0;for(y=0;y<d;y++)o[y]=r[c+y];var m=0,_=p,S=c;if(r[S++]=r[_++],--g===0){for(y=0;y<d;y++)r[S+y]=o[m+y];return}if(d===1){for(y=0;y<g;y++)r[S+y]=r[_+y];r[S+g]=o[m];return}for(var x=t,b,w,T;;){b=0,w=0,T=!1;do if(e(r[_],o[m])<0){if(r[S++]=r[_++],w++,b=0,--g===0){T=!0;break}}else if(r[S++]=o[m++],b++,w=0,--d===1){T=!0;break}while((b|w)<x);if(T)break;do{if(b=Cd(r[_],o,m,d,0,e),b!==0){for(y=0;y<b;y++)r[S+y]=o[m+y];if(S+=b,m+=b,d-=b,d<=1){T=!0;break}}if(r[S++]=r[_++],--g===0){T=!0;break}if(w=Td(o[m],r,_,g,0,e),w!==0){for(y=0;y<w;y++)r[S+y]=r[_+y];if(S+=w,_+=w,g-=w,g===0){T=!0;break}}if(r[S++]=o[m++],--d===1){T=!0;break}x--}while(b>=Bl||w>=Bl);if(T)break;x<0&&(x=0),x+=2}if(t=x,t<1&&(t=1),d===1){for(y=0;y<g;y++)r[S+y]=r[_+y];r[S+g]=o[m]}else{if(d===0)throw new Error;for(y=0;y<d;y++)r[S+y]=o[m+y]}}function h(c,d,p,g){var y=0;for(y=0;y<g;y++)o[y]=r[p+y];var m=c+d-1,_=g-1,S=p+g-1,x=0,b=0;if(r[S--]=r[m--],--d===0){for(x=S-(g-1),y=0;y<g;y++)r[x+y]=o[y];return}if(g===1){for(S-=d,m-=d,b=S+1,x=m+1,y=d-1;y>=0;y--)r[b+y]=r[x+y];r[S]=o[_];return}for(var w=t;;){var T=0,C=0,M=!1;do if(e(o[_],r[m])<0){if(r[S--]=r[m--],T++,C=0,--d===0){M=!0;break}}else if(r[S--]=o[_--],C++,T=0,--g===1){M=!0;break}while((T|C)<w);if(M)break;do{if(T=d-Cd(o[_],r,c,d,d-1,e),T!==0){for(S-=T,m-=T,d-=T,b=S+1,x=m+1,y=T-1;y>=0;y--)r[b+y]=r[x+y];if(d===0){M=!0;break}}if(r[S--]=o[_--],--g===1){M=!0;break}if(C=g-Td(r[m],o,0,g,g-1,e),C!==0){for(S-=C,_-=C,g-=C,b=S+1,x=_+1,y=0;y<C;y++)r[b+y]=o[x+y];if(g<=1){M=!0;break}}if(r[S--]=r[m--],--d===0){M=!0;break}w--}while(T>=Bl||C>=Bl);if(M)break;w<0&&(w=0),w+=2}if(t=w,t<1&&(t=1),g===1){for(S-=d,m-=d,b=S+1,x=m+1,y=d-1;y>=0;y--)r[b+y]=r[x+y];r[S]=o[_]}else{if(g===0)throw new Error;for(x=S-(g-1),y=0;y<g;y++)r[x+y]=o[y]}}return{mergeRuns:l,forceMergeRuns:u,pushRun:s}}function zf(r,e,t,n){t||(t=0),n||(n=r.length);var a=n-t;if(!(a<2)){var i=0;if(a<W1){i=U1(r,t,n,e),Y1(r,t,n,t+i,e);return}var o=hk(r,e),s=fk(a);do{if(i=U1(r,t,n,e),i<s){var l=a;l>s&&(l=s),Y1(r,t,t+l,t+i,e),i=l}o.pushRun(t,i),o.mergeRuns(),a-=i,t+=i}while(a!==0);o.forceMergeRuns()}}var Hr=1,zl=2,Qo=4,X1=!1;function Ad(){X1||(X1=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Z1(r,e){return r.zlevel===e.zlevel?r.z===e.z?r.z2-e.z2:r.z-e.z:r.zlevel-e.zlevel}var ck=(function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Z1}return r.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},r.prototype.getDisplayList=function(e,t){t=t||!1;var n=this._displayList;return(e||!n.length)&&this.updateDisplayList(t),n},r.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,a=0,i=t.length;a<i;a++)this._updateAndAddDisplayable(t[a],null,e);n.length=this._displayListLen,zf(n,Z1)},r.prototype._updateAndAddDisplayable=function(e,t,n){if(!(e.ignore&&!n)){e.beforeUpdate(),e.update(),e.afterUpdate();var a=e.getClipPath(),i=t&&t.length,o=0,s=e.__clipPaths;if(!e.ignoreClip&&(i||a)){if(s||(s=e.__clipPaths=[]),i)for(var l=0;l<t.length;l++)s[o++]=t[l];for(var u=a,f=e;u;)u.parent=f,u.updateTransform(),s[o++]=u,f=u,u=u.getClipPath()}if(s&&(s.length=o),e.childrenRef){for(var v=e.childrenRef(),h=0;h<v.length;h++){var c=v[h];e.__dirty&&(c.__dirty|=Hr),this._updateAndAddDisplayable(c,s,n)}e.__dirty=0}else{var d=e;isNaN(d.z)&&(Ad(),d.z=0),isNaN(d.z2)&&(Ad(),d.z2=0),isNaN(d.zlevel)&&(Ad(),d.zlevel=0),this._displayList[this._displayListLen++]=d}var p=e.getDecalElement&&e.getDecalElement();p&&this._updateAndAddDisplayable(p,s,n);var g=e.getTextGuideLine();g&&this._updateAndAddDisplayable(g,s,n);var y=e.getTextContent();y&&this._updateAndAddDisplayable(y,s,n)}},r.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},r.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);return}var a=De(this._roots,e);a>=0&&this._roots.splice(a,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r})(),$1;$1=Z.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var Md=$1,Vl={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var e,t=.1,n=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=n/4):e=n*Math.asin(1/t)/(2*Math.PI),-(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/n)))},elasticOut:function(r){var e,t=.1,n=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=n/4):e=n*Math.asin(1/t)/(2*Math.PI),t*Math.pow(2,-10*r)*Math.sin((r-e)*(2*Math.PI)/n)+1)},elasticInOut:function(r){var e,t=.1,n=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=n/4):e=n*Math.asin(1/t)/(2*Math.PI),(r*=2)<1?-.5*(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/n)):t*Math.pow(2,-10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/n)*.5+1)},backIn:function(r){var e=1.70158;return r*r*((e+1)*r-e)},backOut:function(r){var e=1.70158;return--r*r*((e+1)*r+e)+1},backInOut:function(r){var e=2.5949095;return(r*=2)<1?.5*(r*r*((e+1)*r-e)):.5*((r-=2)*r*((e+1)*r+e)+2)},bounceIn:function(r){return 1-Vl.bounceOut(1-r)},bounceOut:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},bounceInOut:function(r){return r<.5?Vl.bounceIn(r*2)*.5:Vl.bounceOut(r*2-1)*.5+.5}},Vf=Math.pow,qa=Math.sqrt,Gf=1e-8,q1=1e-4,K1=qa(3),Ff=1/3,Vn=Xa(),an=Xa(),es=Xa();function Ka(r){return r>-Gf&&r<Gf}function j1(r){return r>Gf||r<-Gf}function rr(r,e,t,n,a){var i=1-a;return i*i*(i*r+3*a*e)+a*a*(a*n+3*i*t)}function J1(r,e,t,n,a){var i=1-a;return 3*(((e-r)*i+2*(t-e)*a)*i+(n-t)*a*a)}function Hf(r,e,t,n,a,i){var o=n+3*(e-t)-r,s=3*(t-e*2+r),l=3*(e-r),u=r-a,f=s*s-3*o*l,v=s*l-9*o*u,h=l*l-3*s*u,c=0;if(Ka(f)&&Ka(v))if(Ka(s))i[0]=0;else{var d=-l/s;d>=0&&d<=1&&(i[c++]=d)}else{var p=v*v-4*f*h;if(Ka(p)){var g=v/f,d=-s/o+g,y=-g/2;d>=0&&d<=1&&(i[c++]=d),y>=0&&y<=1&&(i[c++]=y)}else if(p>0){var m=qa(p),_=f*s+1.5*o*(-v+m),S=f*s+1.5*o*(-v-m);_<0?_=-Vf(-_,Ff):_=Vf(_,Ff),S<0?S=-Vf(-S,Ff):S=Vf(S,Ff);var d=(-s-(_+S))/(3*o);d>=0&&d<=1&&(i[c++]=d)}else{var x=(2*f*s-3*o*v)/(2*qa(f*f*f)),b=Math.acos(x)/3,w=qa(f),T=Math.cos(b),d=(-s-2*w*T)/(3*o),y=(-s+w*(T+K1*Math.sin(b)))/(3*o),C=(-s+w*(T-K1*Math.sin(b)))/(3*o);d>=0&&d<=1&&(i[c++]=d),y>=0&&y<=1&&(i[c++]=y),C>=0&&C<=1&&(i[c++]=C)}}return c}function Q1(r,e,t,n,a){var i=6*t-12*e+6*r,o=9*e+3*n-3*r-9*t,s=3*e-3*r,l=0;if(Ka(o)){if(j1(i)){var u=-s/i;u>=0&&u<=1&&(a[l++]=u)}}else{var f=i*i-4*o*s;if(Ka(f))a[0]=-i/(2*o);else if(f>0){var v=qa(f),u=(-i+v)/(2*o),h=(-i-v)/(2*o);u>=0&&u<=1&&(a[l++]=u),h>=0&&h<=1&&(a[l++]=h)}}return l}function ja(r,e,t,n,a,i){var o=(e-r)*a+r,s=(t-e)*a+e,l=(n-t)*a+t,u=(s-o)*a+o,f=(l-s)*a+s,v=(f-u)*a+u;i[0]=r,i[1]=o,i[2]=u,i[3]=v,i[4]=v,i[5]=f,i[6]=l,i[7]=n}function eS(r,e,t,n,a,i,o,s,l,u,f){var v,h=.005,c=1/0,d,p,g,y;Vn[0]=l,Vn[1]=u;for(var m=0;m<1;m+=.05)an[0]=rr(r,t,a,o,m),an[1]=rr(e,n,i,s,m),g=$a(Vn,an),g<c&&(v=m,c=g);c=1/0;for(var _=0;_<32&&!(h<q1);_++)d=v-h,p=v+h,an[0]=rr(r,t,a,o,d),an[1]=rr(e,n,i,s,d),g=$a(an,Vn),d>=0&&g<c?(v=d,c=g):(es[0]=rr(r,t,a,o,p),es[1]=rr(e,n,i,s,p),y=$a(es,Vn),p<=1&&y<c?(v=p,c=y):h*=.5);return f&&(f[0]=rr(r,t,a,o,v),f[1]=rr(e,n,i,s,v)),qa(c)}function dk(r,e,t,n,a,i,o,s,l){for(var u=r,f=e,v=0,h=1/l,c=1;c<=l;c++){var d=c*h,p=rr(r,t,a,o,d),g=rr(e,n,i,s,d),y=p-u,m=g-f;v+=Math.sqrt(y*y+m*m),u=p,f=g}return v}function lr(r,e,t,n){var a=1-n;return a*(a*r+2*n*e)+n*n*t}function Dd(r,e,t,n){return 2*((1-n)*(e-r)+n*(t-e))}function pk(r,e,t,n,a){var i=r-2*e+t,o=2*(e-r),s=r-n,l=0;if(Ka(i)){if(j1(o)){var u=-s/o;u>=0&&u<=1&&(a[l++]=u)}}else{var f=o*o-4*i*s;if(Ka(f)){var u=-o/(2*i);u>=0&&u<=1&&(a[l++]=u)}else if(f>0){var v=qa(f),u=(-o+v)/(2*i),h=(-o-v)/(2*i);u>=0&&u<=1&&(a[l++]=u),h>=0&&h<=1&&(a[l++]=h)}}return l}function tS(r,e,t){var n=r+t-2*e;return n===0?.5:(r-e)/n}function Gl(r,e,t,n,a){var i=(e-r)*n+r,o=(t-e)*n+e,s=(o-i)*n+i;a[0]=r,a[1]=i,a[2]=s,a[3]=s,a[4]=o,a[5]=t}function rS(r,e,t,n,a,i,o,s,l){var u,f=.005,v=1/0;Vn[0]=o,Vn[1]=s;for(var h=0;h<1;h+=.05){an[0]=lr(r,t,a,h),an[1]=lr(e,n,i,h);var c=$a(Vn,an);c<v&&(u=h,v=c)}v=1/0;for(var d=0;d<32&&!(f<q1);d++){var p=u-f,g=u+f;an[0]=lr(r,t,a,p),an[1]=lr(e,n,i,p);var c=$a(an,Vn);if(p>=0&&c<v)u=p,v=c;else{es[0]=lr(r,t,a,g),es[1]=lr(e,n,i,g);var y=$a(es,Vn);g<=1&&y<v?(u=g,v=y):f*=.5}}return l&&(l[0]=lr(r,t,a,u),l[1]=lr(e,n,i,u)),qa(v)}function gk(r,e,t,n,a,i,o){for(var s=r,l=e,u=0,f=1/o,v=1;v<=o;v++){var h=v*f,c=lr(r,t,a,h),d=lr(e,n,i,h),p=c-s,g=d-l;u+=Math.sqrt(p*p+g*g),s=c,l=d}return u}var yk=/cubic-bezier\(([0-9,\.e ]+)\)/;function Ld(r){var e=r&&yk.exec(r);if(e){var t=e[1].split(","),n=+Gr(t[0]),a=+Gr(t[1]),i=+Gr(t[2]),o=+Gr(t[3]);if(isNaN(n+a+i+o))return;var s=[];return function(l){return l<=0?0:l>=1?1:Hf(0,n,i,1,l,s)&&rr(0,a,o,1,s[0])}}}var mk=(function(){function r(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Rt,this.ondestroy=e.ondestroy||Rt,this.onrestart=e.onrestart||Rt,e.easing&&this.setEasing(e.easing)}return r.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=t;return}var n=this._life,a=e-this._startTime-this._pausedTime,i=a/n;i<0&&(i=0),i=Math.min(i,1);var o=this.easingFunc,s=o?o(i):i;if(this.onframe(s),i===1)if(this.loop){var l=a%n;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(e){this.easing=e,this.easingFunc=oe(e)?e:Vl[e]||Ld(e)},r})(),nS=(function(){function r(e){this.value=e}return r})(),_k=(function(){function r(){this._len=0}return r.prototype.insert=function(e){var t=new nS(e);return this.insertEntry(t),t},r.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},r.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r})(),ts=(function(){function r(e){this._list=new _k,this._maxSize=10,this._map={},this._maxSize=e}return r.prototype.put=function(e,t){var n=this._list,a=this._map,i=null;if(a[e]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete a[l.key],i=l.value,this._lastRemovedEntry=l}s?s.value=t:s=new nS(t),s.key=e,n.insertEntry(s),a[e]=s}return i},r.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r})(),aS={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 Tn(r){return r=Math.round(r),r<0?0:r>255?255:r}function Sk(r){return r=Math.round(r),r<0?0:r>360?360:r}function Fl(r){return r<0?0:r>1?1:r}function Wf(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?Tn(parseFloat(e)/100*255):Tn(parseInt(e,10))}function _a(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?Fl(parseFloat(e)/100):Fl(parseFloat(e))}function Id(r,e,t){return t<0?t+=1:t>1&&(t-=1),t*6<1?r+(e-r)*t*6:t*2<1?e:t*3<2?r+(e-r)*(2/3-t)*6:r}function Ja(r,e,t){return r+(e-r)*t}function on(r,e,t,n,a){return r[0]=e,r[1]=t,r[2]=n,r[3]=a,r}function Pd(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r}var iS=new ts(20),Uf=null;function rs(r,e){Uf&&Pd(Uf,e),Uf=iS.put(r,Uf||e.slice())}function br(r,e){if(r){e=e||[];var t=iS.get(r);if(t)return Pd(e,t);r=r+"";var n=r.replace(/ /g,"").toLowerCase();if(n in aS)return Pd(e,aS[n]),rs(r,e),e;var a=n.length;if(n.charAt(0)==="#"){if(a===4||a===5){var i=parseInt(n.slice(1,4),16);if(!(i>=0&&i<=4095)){on(e,0,0,0,1);return}return on(e,(i&3840)>>4|(i&3840)>>8,i&240|(i&240)>>4,i&15|(i&15)<<4,a===5?parseInt(n.slice(4),16)/15:1),rs(r,e),e}else if(a===7||a===9){var i=parseInt(n.sli