basb-cli
Version:
Blog as Second Brain!
15 lines (13 loc) • 403 kB
JavaScript
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};function e(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var n=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},r=new function(){this.browser=new n,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="undefined"!=typeof window};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(r.wxa=!0,r.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?r.worker=!0:"undefined"==typeof navigator||0===navigator.userAgent.indexOf("Node.js")?(r.node=!0,r.svgSupported=!0):function(t,e){var n=e.browser,r=t.match(/Firefox\/([\d.]+)/),i=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(t);r&&(n.firefox=!0,n.version=r[1]);i&&(n.ie=!0,n.version=i[1]);o&&(n.edge=!0,n.version=o[1],n.newEdge=+o[1].split(".")[0]>18);a&&(n.weChat=!0);e.svgSupported="undefined"!=typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,e.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),e.domSupported="undefined"!=typeof document;var s=document.documentElement.style;e.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||n.ie&&+n.version>=9}(navigator.userAgent,r);var i=r,o="12px sans-serif";var a,s,l=function(t){var e={};if("undefined"==typeof JSON)return e;for(var n=0;n<t.length;n++){var r=String.fromCharCode(n+32),i=(t.charCodeAt(n)-20)/100;e[r]=i}return e}("007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N"),u={createCanvas:function(){return"undefined"!=typeof document&&document.createElement("canvas")},measureText:function(t,e){if(!a){var n=u.createCanvas();a=n&&n.getContext("2d")}if(a)return s!==e&&(s=a.font=e||o),a.measureText(t);t=t||"";var r=/(\d+)px/.exec(e=e||o),i=r&&+r[1]||12,h=0;if(e.indexOf("mono")>=0)h=i*t.length;else for(var c=0;c<t.length;c++){var p=l[t[c]];h+=null==p?i:p*i}return{width:h}},loadImage:function(t,e,n){var r=new Image;return r.onload=e,r.onerror=n,r.src=t,r}};function h(t){for(var e in u)t[e]&&(u[e]=t[e])}var c=B(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],(function(t,e){return t["[object "+e+"]"]=!0,t}),{}),p=B(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],(function(t,e){return t["[object "+e+"Array]"]=!0,t}),{}),f=Object.prototype.toString,d=Array.prototype,g=d.forEach,v=d.filter,y=d.slice,m=d.map,_=function(){}.constructor,x=_?_.prototype:null,w="__proto__",b=2311;function S(){return b++}function M(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];"undefined"!=typeof console&&console.error.apply(console,t)}function T(t){if(null==t||"object"!=typeof t)return t;var e=t,n=f.call(t);if("[object Array]"===n){if(!ct(t)){e=[];for(var r=0,i=t.length;r<i;r++)e[r]=T(t[r])}}else if(p[n]){if(!ct(t)){var o=t.constructor;if(o.from)e=o.from(t);else{e=new o(t.length);for(r=0,i=t.length;r<i;r++)e[r]=t[r]}}}else if(!c[n]&&!ct(t)&&!$(t))for(var a in e={},t)t.hasOwnProperty(a)&&a!==w&&(e[a]=T(t[a]));return e}function C(t,e,n){if(!Y(e)||!Y(t))return n?T(e):t;for(var r in e)if(e.hasOwnProperty(r)&&r!==w){var i=t[r],o=e[r];!Y(o)||!Y(i)||j(o)||j(i)||$(o)||$(i)||Z(o)||Z(i)||ct(o)||ct(i)?!n&&r in t||(t[r]=T(e[r])):C(i,o,n)}return t}function k(t,e){for(var n=t[0],r=1,i=t.length;r<i;r++)n=C(n,t[r],e);return n}function D(t,e){if(Object.assign)Object.assign(t,e);else for(var n in e)e.hasOwnProperty(n)&&n!==w&&(t[n]=e[n]);return t}function I(t,e,n){for(var r=H(e),i=0;i<r.length;i++){var o=r[i];(n?null!=e[o]:null==t[o])&&(t[o]=e[o])}return t}var P=u.createCanvas;function A(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n}return-1}function O(t,e){var n=t.prototype;function r(){}for(var i in r.prototype=e.prototype,t.prototype=new r,n)n.hasOwnProperty(i)&&(t.prototype[i]=n[i]);t.prototype.constructor=t,t.superClass=e}function R(t,e,n){if(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var r=Object.getOwnPropertyNames(e),i=0;i<r.length;i++){var o=r[i];"constructor"!==o&&(n?null!=e[o]:null==t[o])&&(t[o]=e[o])}else I(t,e,n)}function L(t){return!!t&&("string"!=typeof t&&"number"==typeof t.length)}function N(t,e,n){if(t&&e)if(t.forEach&&t.forEach===g)t.forEach(e,n);else if(t.length===+t.length)for(var r=0,i=t.length;r<i;r++)e.call(n,t[r],r,t);else for(var o in t)t.hasOwnProperty(o)&&e.call(n,t[o],o,t)}function E(t,e,n){if(!t)return[];if(!e)return ot(t);if(t.map&&t.map===m)return t.map(e,n);for(var r=[],i=0,o=t.length;i<o;i++)r.push(e.call(n,t[i],i,t));return r}function B(t,e,n,r){if(t&&e){for(var i=0,o=t.length;i<o;i++)n=e.call(r,n,t[i],i,t);return n}}function z(t,e,n){if(!t)return[];if(!e)return ot(t);if(t.filter&&t.filter===v)return t.filter(e,n);for(var r=[],i=0,o=t.length;i<o;i++)e.call(n,t[i],i,t)&&r.push(t[i]);return r}function F(t,e,n){if(t&&e)for(var r=0,i=t.length;r<i;r++)if(e.call(n,t[r],r,t))return t[r]}function H(t){if(!t)return[];if(Object.keys)return Object.keys(t);var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e}var V=x&&U(x.bind)?x.call.bind(x.bind):function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return function(){return t.apply(e,n.concat(y.call(arguments)))}};function W(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return function(){return t.apply(this,e.concat(y.call(arguments)))}}function j(t){return Array.isArray?Array.isArray(t):"[object Array]"===f.call(t)}function U(t){return"function"==typeof t}function G(t){return"string"==typeof t}function q(t){return"[object String]"===f.call(t)}function X(t){return"number"==typeof t}function Y(t){var e=typeof t;return"function"===e||!!t&&"object"===e}function Z(t){return!!c[f.call(t)]}function K(t){return!!p[f.call(t)]}function $(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function Q(t){return null!=t.colorStops}function J(t){return null!=t.image}function tt(t){return"[object RegExp]"===f.call(t)}function et(t){return t!=t}function nt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=0,r=t.length;n<r;n++)if(null!=t[n])return t[n]}function rt(t,e){return null!=t?t:e}function it(t,e,n){return null!=t?t:null!=e?e:n}function ot(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return y.apply(t,e)}function at(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 st(t,e){if(!t)throw new Error(e)}function lt(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var ut="__ec_primitive__";function ht(t){t[ut]=!0}function ct(t){return t[ut]}var pt=function(){function t(){this.data={}}return t.prototype.delete=function(t){var e=this.has(t);return e&&delete this.data[t],e},t.prototype.has=function(t){return this.data.hasOwnProperty(t)},t.prototype.get=function(t){return this.data[t]},t.prototype.set=function(t,e){return this.data[t]=e,this},t.prototype.keys=function(){return H(this.data)},t.prototype.forEach=function(t){var e=this.data;for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)},t}(),ft="function"==typeof Map;var dt=function(){function t(e){var n=j(e);this.data=ft?new Map:new pt;var r=this;function i(t,e){n?r.set(t,e):r.set(e,t)}e instanceof t?e.each(i):e&&N(e,i)}return t.prototype.hasKey=function(t){return this.data.has(t)},t.prototype.get=function(t){return this.data.get(t)},t.prototype.set=function(t,e){return this.data.set(t,e),e},t.prototype.each=function(t,e){this.data.forEach((function(n,r){t.call(e,n,r)}))},t.prototype.keys=function(){var t=this.data.keys();return ft?Array.from(t):t},t.prototype.removeKey=function(t){this.data.delete(t)},t}();function gt(t){return new dt(t)}function vt(t,e){for(var n=new t.constructor(t.length+e.length),r=0;r<t.length;r++)n[r]=t[r];var i=t.length;for(r=0;r<e.length;r++)n[r+i]=e[r];return n}function yt(t,e){var n;if(Object.create)n=Object.create(t);else{var r=function(){};r.prototype=t,n=new r}return e&&D(n,e),n}function mt(t){var e=t.style;e.webkitUserSelect="none",e.userSelect="none",e.webkitTapHighlightColor="rgba(0,0,0,0)",e["-webkit-touch-callout"]="none"}function _t(t,e){return t.hasOwnProperty(e)}function xt(){}var wt=180/Math.PI,bt=Object.freeze({__proto__:null,HashMap:dt,RADIAN_TO_DEGREE:wt,assert:st,bind:V,clone:T,concatArray:vt,createCanvas:P,createHashMap:gt,createObject:yt,curry:W,defaults:I,disableUserSelect:mt,each:N,eqNaN:et,extend:D,filter:z,find:F,guid:S,hasOwn:_t,indexOf:A,inherits:O,isArray:j,isArrayLike:L,isBuiltInObject:Z,isDom:$,isFunction:U,isGradientObject:Q,isImagePatternObject:J,isNumber:X,isObject:Y,isPrimitive:ct,isRegExp:tt,isString:G,isStringSafe:q,isTypedArray:K,keys:H,logError:M,map:E,merge:C,mergeAll:k,mixin:R,noop:xt,normalizeCssArray:at,reduce:B,retrieve:nt,retrieve2:rt,retrieve3:it,setAsPrimitive:ht,slice:ot,trim:lt});function St(t,e){return null==t&&(t=0),null==e&&(e=0),[t,e]}function Mt(t,e){return t[0]=e[0],t[1]=e[1],t}function Tt(t){return[t[0],t[1]]}function Ct(t,e,n){return t[0]=e,t[1]=n,t}function kt(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function Dt(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t}function It(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function Pt(t){return Math.sqrt(Ot(t))}var At=Pt;function Ot(t){return t[0]*t[0]+t[1]*t[1]}var Rt=Ot;function Lt(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function Nt(t,e){var n=Pt(e);return 0===n?(t[0]=0,t[1]=0):(t[0]=e[0]/n,t[1]=e[1]/n),t}function Et(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var Bt=Et;function zt(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var Ft=zt;function Ht(t,e,n,r){return t[0]=e[0]+r*(n[0]-e[0]),t[1]=e[1]+r*(n[1]-e[1]),t}function Vt(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t}function Wt(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function jt(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}var Ut=Object.freeze({__proto__:null,add:kt,applyTransform:Vt,clone:Tt,copy:Mt,create:St,dist:Bt,distSquare:Ft,distance:Et,distanceSquare:zt,div:function(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},len:Pt,lenSquare:Ot,length:At,lengthSquare:Rt,lerp:Ht,max:jt,min:Wt,mul:function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t},negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},normalize:Nt,scale:Lt,scaleAndAdd:Dt,set:Ct,sub:It}),Gt=function(t,e){this.target=t,this.topTarget=e&&e.topTarget},qt=function(){function t(t){this.handler=t,t.on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}return t.prototype._dragStart=function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent||e.__hostTarget;e&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.handler.dispatchToElement(new Gt(e,t),"dragstart",t.event))},t.prototype._drag=function(t){var e=this._draggingTarget;if(e){var n=t.offsetX,r=t.offsetY,i=n-this._x,o=r-this._y;this._x=n,this._y=r,e.drift(i,o,t),this.handler.dispatchToElement(new Gt(e,t),"drag",t.event);var a=this.handler.findHover(n,r,e).target,s=this._dropTarget;this._dropTarget=a,e!==a&&(s&&a!==s&&this.handler.dispatchToElement(new Gt(s,t),"dragleave",t.event),a&&a!==s&&this.handler.dispatchToElement(new Gt(a,t),"dragenter",t.event))}},t.prototype._dragEnd=function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.handler.dispatchToElement(new Gt(e,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new Gt(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},t}(),Xt=function(){function t(t){t&&(this._$eventProcessor=t)}return t.prototype.on=function(t,e,n,r){this._$handlers||(this._$handlers={});var i=this._$handlers;if("function"==typeof e&&(r=n,n=e,e=null),!n||!t)return this;var o=this._$eventProcessor;null!=e&&o&&o.normalizeQuery&&(e=o.normalizeQuery(e)),i[t]||(i[t]=[]);for(var a=0;a<i[t].length;a++)if(i[t][a].h===n)return this;var s={h:n,query:e,ctx:r||this,callAtLast:n.zrEventfulCallAtLast},l=i[t].length-1,u=i[t][l];return u&&u.callAtLast?i[t].splice(l,0,s):i[t].push(s),this},t.prototype.isSilent=function(t){var e=this._$handlers;return!e||!e[t]||!e[t].length},t.prototype.off=function(t,e){var n=this._$handlers;if(!n)return this;if(!t)return this._$handlers={},this;if(e){if(n[t]){for(var r=[],i=0,o=n[t].length;i<o;i++)n[t][i].h!==e&&r.push(n[t][i]);n[t]=r}n[t]&&0===n[t].length&&delete n[t]}else delete n[t];return this},t.prototype.trigger=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!this._$handlers)return this;var r=this._$handlers[t],i=this._$eventProcessor;if(r)for(var o=e.length,a=r.length,s=0;s<a;s++){var l=r[s];if(!i||!i.filter||null==l.query||i.filter(t,l.query))switch(o){case 0:l.h.call(l.ctx);break;case 1:l.h.call(l.ctx,e[0]);break;case 2:l.h.call(l.ctx,e[0],e[1]);break;default:l.h.apply(l.ctx,e)}}return i&&i.afterTrigger&&i.afterTrigger(t),this},t.prototype.triggerWithContext=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!this._$handlers)return this;var r=this._$handlers[t],i=this._$eventProcessor;if(r)for(var o=e.length,a=e[o-1],s=r.length,l=0;l<s;l++){var u=r[l];if(!i||!i.filter||null==u.query||i.filter(t,u.query))switch(o){case 0:u.h.call(a);break;case 1:u.h.call(a,e[0]);break;case 2:u.h.call(a,e[0],e[1]);break;default:u.h.apply(a,e.slice(1,o-1))}}return i&&i.afterTrigger&&i.afterTrigger(t),this},t}(),Yt=Math.log(2);function Zt(t,e,n,r,i,o){var a=r+"-"+i,s=t.length;if(o.hasOwnProperty(a))return o[a];if(1===e){var l=Math.round(Math.log((1<<s)-1&~i)/Yt);return t[n][l]}for(var u=r|1<<n,h=n+1;r&1<<h;)h++;for(var c=0,p=0,f=0;p<s;p++){var d=1<<p;d&i||(c+=(f%2?-1:1)*t[n][p]*Zt(t,e-1,h,u,i|d,o),f++)}return o[a]=c,c}function Kt(t,e){var n=[[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]]],r={},i=Zt(n,8,0,0,0,r);if(0!==i){for(var o=[],a=0;a<8;a++)for(var s=0;s<8;s++)null==o[s]&&(o[s]=0),o[s]+=((a+s)%2?-1:1)*Zt(n,7,0===a?1:0,1<<a,1<<s,r)/i*e[a];return function(t,e,n){var r=e*o[6]+n*o[7]+1;t[0]=(e*o[0]+n*o[1]+o[2])/r,t[1]=(e*o[3]+n*o[4]+o[5])/r}}}var $t="___zrEVENTSAVED",Qt=[];function Jt(t,e,n,r,i){return te(Qt,e,r,i,!0)&&te(t,n,Qt[0],Qt[1])}function te(t,e,n,r,o){if(e.getBoundingClientRect&&i.domSupported&&!ee(e)){var a=e[$t]||(e[$t]={}),s=function(t,e){var n=e.markers;if(n)return n;n=e.markers=[];for(var r=["left","right"],i=["top","bottom"],o=0;o<4;o++){var a=document.createElement("div"),s=o%2,l=(o>>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",r[s]+":0",i[l]+":0",r[1-s]+":auto",i[1-l]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}return n}(e,a),l=function(t,e,n){for(var r=n?"invTrans":"trans",i=e[r],o=e.srcCoords,a=[],s=[],l=!0,u=0;u<4;u++){var h=t[u].getBoundingClientRect(),c=2*u,p=h.left,f=h.top;a.push(p,f),l=l&&o&&p===o[c]&&f===o[c+1],s.push(t[u].offsetLeft,t[u].offsetTop)}return l&&i?i:(e.srcCoords=a,e[r]=n?Kt(s,a):Kt(a,s))}(s,a,o);if(l)return l(t,n,r),!0}return!1}function ee(t){return"CANVAS"===t.nodeName.toUpperCase()}var ne=/([&<>"'])/g,re={"&":"&","<":"<",">":">",'"':""","'":"'"};function ie(t){return null==t?"":(t+"").replace(ne,(function(t,e){return re[e]}))}var oe=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ae=[],se=i.browser.firefox&&+i.browser.version.split(".")[0]<39;function le(t,e,n,r){return n=n||{},r?ue(t,e,n):se&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):ue(t,e,n),n}function ue(t,e,n){if(i.domSupported&&t.getBoundingClientRect){var r=e.clientX,o=e.clientY;if(ee(t)){var a=t.getBoundingClientRect();return n.zrX=r-a.left,void(n.zrY=o-a.top)}if(te(ae,t,r,o))return n.zrX=ae[0],void(n.zrY=ae[1])}n.zrX=n.zrY=0}function he(t){return t||window.event}function ce(t,e,n){if(null!=(e=he(e)).zrX)return e;var r=e.type;if(r&&r.indexOf("touch")>=0){var i="touchend"!==r?e.targetTouches[0]:e.changedTouches[0];i&&le(t,i,e,n)}else{le(t,e,e,n);var o=function(t){var e=t.wheelDelta;if(e)return e;var n=t.deltaX,r=t.deltaY;if(null==n||null==r)return e;return 3*(0!==r?Math.abs(r):Math.abs(n))*(r>0?-1:r<0?1:n>0?-1:1)}(e);e.zrDelta=o?o/120:-(e.detail||0)/3}var a=e.button;return null==e.which&&void 0!==a&&oe.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function pe(t,e,n,r){t.addEventListener(e,n,r)}var fe=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0};function de(t){return 2===t.which||3===t.which}var ge=function(){function t(){this._track=[]}return t.prototype.recognize=function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(t,e,n){var r=t.touches;if(r){for(var i={points:[],touches:[],target:e,event:t},o=0,a=r.length;o<a;o++){var s=r[o],l=le(n,s,{});i.points.push([l.zrX,l.zrY]),i.touches.push(s)}this._track.push(i)}},t.prototype._recognize=function(t){for(var e in ye)if(ye.hasOwnProperty(e)){var n=ye[e](this._track,t);if(n)return n}},t}();function ve(t){var e=t[1][0]-t[0][0],n=t[1][1]-t[0][1];return Math.sqrt(e*e+n*n)}var ye={pinch:function(t,e){var n=t.length;if(n){var r,i=(t[n-1]||{}).points,o=(t[n-2]||{}).points||i;if(o&&o.length>1&&i&&i.length>1){var a=ve(i)/ve(o);!isFinite(a)&&(a=1),e.pinchScale=a;var s=[((r=i)[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}};function me(){return[1,0,0,1,0,0]}function _e(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function xe(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 we(t,e,n){var r=e[0]*n[0]+e[2]*n[1],i=e[1]*n[0]+e[3]*n[1],o=e[0]*n[2]+e[2]*n[3],a=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],l=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t}function be(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function Se(t,e,n,r){void 0===r&&(r=[0,0]);var i=e[0],o=e[2],a=e[4],s=e[1],l=e[3],u=e[5],h=Math.sin(n),c=Math.cos(n);return t[0]=i*c+s*h,t[1]=-i*h+s*c,t[2]=o*c+l*h,t[3]=-o*h+c*l,t[4]=c*(a-r[0])+h*(u-r[1])+r[0],t[5]=c*(u-r[1])-h*(a-r[0])+r[1],t}function Me(t,e,n){var r=n[0],i=n[1];return t[0]=e[0]*r,t[1]=e[1]*i,t[2]=e[2]*r,t[3]=e[3]*i,t[4]=e[4]*r,t[5]=e[5]*i,t}function Te(t,e){var n=e[0],r=e[2],i=e[4],o=e[1],a=e[3],s=e[5],l=n*a-o*r;return l?(l=1/l,t[0]=a*l,t[1]=-o*l,t[2]=-r*l,t[3]=n*l,t[4]=(r*s-a*i)*l,t[5]=(o*i-n*s)*l,t):null}function Ce(t){var e=[1,0,0,1,0,0];return xe(e,t),e}var ke=Object.freeze({__proto__:null,clone:Ce,copy:xe,create:me,identity:_e,invert:Te,mul:we,rotate:Se,scale:Me,translate:be}),De=function(){function t(t,e){this.x=t||0,this.y=e||0}return t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(t,e){return this.x=t,this.y=e,this},t.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},t.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},t.prototype.scale=function(t){this.x*=t,this.y*=t},t.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},t.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},t.prototype.dot=function(t){return this.x*t.x+this.y*t.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},t.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},t.prototype.distanceSquare=function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(t){if(t){var e=this.x,n=this.y;return this.x=t[0]*e+t[2]*n+t[4],this.y=t[1]*e+t[3]*n+t[5],this}},t.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},t.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},t.set=function(t,e,n){t.x=e,t.y=n},t.copy=function(t,e){t.x=e.x,t.y=e.y},t.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},t.lenSquare=function(t){return t.x*t.x+t.y*t.y},t.dot=function(t,e){return t.x*e.x+t.y*e.y},t.add=function(t,e,n){t.x=e.x+n.x,t.y=e.y+n.y},t.sub=function(t,e,n){t.x=e.x-n.x,t.y=e.y-n.y},t.scale=function(t,e,n){t.x=e.x*n,t.y=e.y*n},t.scaleAndAdd=function(t,e,n,r){t.x=e.x+n.x*r,t.y=e.y+n.y*r},t.lerp=function(t,e,n,r){var i=1-r;t.x=i*e.x+r*n.x,t.y=i*e.y+r*n.y},t}(),Ie=Math.min,Pe=Math.max,Ae=new De,Oe=new De,Re=new De,Le=new De,Ne=new De,Ee=new De,Be=function(){function t(t,e,n,r){n<0&&(t+=n,n=-n),r<0&&(e+=r,r=-r),this.x=t,this.y=e,this.width=n,this.height=r}return t.prototype.union=function(t){var e=Ie(t.x,this.x),n=Ie(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Pe(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=Pe(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=e,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(t){var e=this,n=t.width/e.width,r=t.height/e.height,i=[1,0,0,1,0,0];return be(i,i,[-e.x,-e.y]),Me(i,i,[n,r]),be(i,i,[t.x,t.y]),i},t.prototype.intersect=function(e,n){if(!e)return!1;e instanceof t||(e=t.create(e));var r=this,i=r.x,o=r.x+r.width,a=r.y,s=r.y+r.height,l=e.x,u=e.x+e.width,h=e.y,c=e.y+e.height,p=!(o<l||u<i||s<h||c<a);if(n){var f=1/0,d=0,g=Math.abs(o-l),v=Math.abs(u-i),y=Math.abs(s-h),m=Math.abs(c-a),_=Math.min(g,v),x=Math.min(y,m);o<l||u<i?_>d&&(d=_,g<v?De.set(Ee,-g,0):De.set(Ee,v,0)):_<f&&(f=_,g<v?De.set(Ne,g,0):De.set(Ne,-v,0)),s<h||c<a?x>d&&(d=x,y<m?De.set(Ee,0,-y):De.set(Ee,0,m)):_<f&&(f=_,y<m?De.set(Ne,0,y):De.set(Ne,0,-m))}return n&&De.copy(n,p?Ne:Ee),p},t.prototype.contain=function(t,e){var n=this;return t>=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return 0===this.width||0===this.height},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},t.applyTransform=function(e,n,r){if(r){if(r[1]<1e-5&&r[1]>-1e-5&&r[2]<1e-5&&r[2]>-1e-5){var i=r[0],o=r[3],a=r[4],s=r[5];return e.x=n.x*i+a,e.y=n.y*o+s,e.width=n.width*i,e.height=n.height*o,e.width<0&&(e.x+=e.width,e.width=-e.width),void(e.height<0&&(e.y+=e.height,e.height=-e.height))}Ae.x=Re.x=n.x,Ae.y=Le.y=n.y,Oe.x=Le.x=n.x+n.width,Oe.y=Re.y=n.y+n.height,Ae.transform(r),Le.transform(r),Oe.transform(r),Re.transform(r),e.x=Ie(Ae.x,Oe.x,Re.x,Le.x),e.y=Ie(Ae.y,Oe.y,Re.y,Le.y);var l=Pe(Ae.x,Oe.x,Re.x,Le.x),u=Pe(Ae.y,Oe.y,Re.y,Le.y);e.width=l-e.x,e.height=u-e.y}else e!==n&&t.copy(e,n)},t}(),ze=Be,Fe="silent";function He(){fe(this.event)}var Ve=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.handler=null,e}return e(n,t),n.prototype.dispose=function(){},n.prototype.setCursor=function(){},n}(Xt),We=function(t,e){this.x=t,this.y=e},je=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Ue=new ze(0,0,0,0),Ge=function(t){function n(e,n,r,i,o){var a=t.call(this)||this;return a._hovered=new We(0,0),a.storage=e,a.painter=n,a.painterRoot=i,a._pointerSize=o,r=r||new Ve,a.proxy=null,a.setHandlerProxy(r),a._draggingMgr=new qt(a),a}return e(n,t),n.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(N(je,(function(e){t.on&&t.on(e,this[e],this)}),this),t.handler=this),this.proxy=t},n.prototype.mousemove=function(t){var e=t.zrX,n=t.zrY,r=Ye(this,e,n),i=this._hovered,o=i.target;o&&!o.__zr&&(o=(i=this.findHover(i.x,i.y)).target);var a=this._hovered=r?new We(e,n):this.findHover(e,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(i,"mouseout",t),this.dispatchToElement(a,"mousemove",t),s&&s!==o&&this.dispatchToElement(a,"mouseover",t)},n.prototype.mouseout=function(t){var e=t.zrEventControl;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&this.trigger("globalout",{type:"globalout",event:t})},n.prototype.resize=function(){this._hovered=new We(0,0)},n.prototype.dispatch=function(t,e){var n=this[t];n&&n.call(this,e)},n.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},n.prototype.setCursorStyle=function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},n.prototype.dispatchToElement=function(t,e,n){var r=(t=t||{}).target;if(!r||!r.silent){for(var i="on"+e,o=function(t,e,n){return{type:t,event:n,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:He}}(e,t,n);r&&(r[i]&&(o.cancelBubble=!!r[i].call(r,o)),r.trigger(e,o),r=r.__hostTarget?r.__hostTarget:r.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(e,o),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer((function(t){"function"==typeof t[i]&&t[i].call(t,o),t.trigger&&t.trigger(e,o)})))}},n.prototype.findHover=function(t,e,n){var r=this.storage.getDisplayList(),i=new We(t,e);if(Xe(r,i,t,e,n),this._pointerSize&&!i.target){for(var o=[],a=this._pointerSize,s=a/2,l=new ze(t-s,e-s,a,a),u=r.length-1;u>=0;u--){var h=r[u];h===n||h.ignore||h.ignoreCoarsePointer||h.parent&&h.parent.ignoreCoarsePointer||(Ue.copy(h.getBoundingRect()),h.transform&&Ue.applyTransform(h.transform),Ue.intersect(l)&&o.push(h))}if(o.length)for(var c=Math.PI/12,p=2*Math.PI,f=0;f<s;f+=4)for(var d=0;d<p;d+=c){if(Xe(o,i,t+f*Math.cos(d),e+f*Math.sin(d),n),i.target)return i}}return i},n.prototype.processGesture=function(t,e){this._gestureMgr||(this._gestureMgr=new ge);var n=this._gestureMgr;"start"===e&&n.clear();var r=n.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&n.clear(),r){var i=r.type;t.gestureEvent=i;var o=new We;o.target=r.target,this.dispatchToElement(o,i,r.event)}},n}(Xt);function qe(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){for(var r=t,i=void 0,o=!1;r;){if(r.ignoreClip&&(o=!0),!o){var a=r.getClipPath();if(a&&!a.contain(e,n))return!1}r.silent&&(i=!0);var s=r.__hostTarget;r=s||r.parent}return!i||Fe}return!1}function Xe(t,e,n,r,i){for(var o=t.length-1;o>=0;o--){var a=t[o],s=void 0;if(a!==i&&!a.ignore&&(s=qe(a,n,r))&&(!e.topTarget&&(e.topTarget=a),s!==Fe)){e.target=a;break}}}function Ye(t,e,n){var r=t.painter;return e<0||e>r.getWidth()||n<0||n>r.getHeight()}N(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){Ge.prototype[t]=function(e){var n,r,i=e.zrX,o=e.zrY,a=Ye(this,i,o);if("mouseup"===t&&a||(r=(n=this.findHover(i,o)).target),"mousedown"===t)this._downEl=r,this._downPoint=[e.zrX,e.zrY],this._upEl=r;else if("mouseup"===t)this._upEl=r;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||Bt(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}}));var Ze=Ge,Ke=32,$e=7;function Qe(t,e,n,r){var i=e+1;if(i===n)return 1;if(r(t[i++],t[e])<0){for(;i<n&&r(t[i],t[i-1])<0;)i++;!function(t,e,n){n--;for(;e<n;){var r=t[e];t[e++]=t[n],t[n--]=r}}(t,e,i)}else for(;i<n&&r(t[i],t[i-1])>=0;)i++;return i-e}function Je(t,e,n,r,i){for(r===e&&r++;r<n;r++){for(var o,a=t[r],s=e,l=r;s<l;)i(a,t[o=s+l>>>1])<0?l=o:s=o+1;var u=r-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=a}}function tn(t,e,n,r,i,o){var a=0,s=0,l=1;if(o(t,e[n+i])>0){for(s=r-i;l<s&&o(t,e[n+i+l])>0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=i,l+=i}else{for(s=i+1;l<s&&o(t,e[n+i-l])<=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=a;a=i-l,l=i-u}for(a++;a<l;){var h=a+(l-a>>>1);o(t,e[n+h])>0?a=h+1:l=h}return l}function en(t,e,n,r,i,o){var a=0,s=0,l=1;if(o(t,e[n+i])<0){for(s=i+1;l<s&&o(t,e[n+i-l])<0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=a;a=i-l,l=i-u}else{for(s=r-i;l<s&&o(t,e[n+i+l])>=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=i,l+=i}for(a++;a<l;){var h=a+(l-a>>>1);o(t,e[n+h])<0?l=h:a=h+1}return l}function nn(t,e){var n,r,i=$e,o=0,a=[];function s(s){var l=n[s],u=r[s],h=n[s+1],c=r[s+1];r[s]=u+c,s===o-3&&(n[s+1]=n[s+2],r[s+1]=r[s+2]),o--;var p=en(t[h],t,l,u,0,e);l+=p,0!==(u-=p)&&0!==(c=tn(t[l+u-1],t,h,c,c-1,e))&&(u<=c?function(n,r,o,s){var l=0;for(l=0;l<r;l++)a[l]=t[n+l];var u=0,h=o,c=n;if(t[c++]=t[h++],0==--s){for(l=0;l<r;l++)t[c+l]=a[u+l];return}if(1===r){for(l=0;l<s;l++)t[c+l]=t[h+l];return void(t[c+s]=a[u])}var p,f,d,g=i;for(;;){p=0,f=0,d=!1;do{if(e(t[h],a[u])<0){if(t[c++]=t[h++],f++,p=0,0==--s){d=!0;break}}else if(t[c++]=a[u++],p++,f=0,1==--r){d=!0;break}}while((p|f)<g);if(d)break;do{if(0!==(p=en(t[h],a,u,r,0,e))){for(l=0;l<p;l++)t[c+l]=a[u+l];if(c+=p,u+=p,(r-=p)<=1){d=!0;break}}if(t[c++]=t[h++],0==--s){d=!0;break}if(0!==(f=tn(a[u],t,h,s,0,e))){for(l=0;l<f;l++)t[c+l]=t[h+l];if(c+=f,h+=f,0===(s-=f)){d=!0;break}}if(t[c++]=a[u++],1==--r){d=!0;break}g--}while(p>=$e||f>=$e);if(d)break;g<0&&(g=0),g+=2}if((i=g)<1&&(i=1),1===r){for(l=0;l<s;l++)t[c+l]=t[h+l];t[c+s]=a[u]}else{if(0===r)throw new Error;for(l=0;l<r;l++)t[c+l]=a[u+l]}}(l,u,h,c):function(n,r,o,s){var l=0;for(l=0;l<s;l++)a[l]=t[o+l];var u=n+r-1,h=s-1,c=o+s-1,p=0,f=0;if(t[c--]=t[u--],0==--r){for(p=c-(s-1),l=0;l<s;l++)t[p+l]=a[l];return}if(1===s){for(f=(c-=r)+1,p=(u-=r)+1,l=r-1;l>=0;l--)t[f+l]=t[p+l];return void(t[c]=a[h])}var d=i;for(;;){var g=0,v=0,y=!1;do{if(e(a[h],t[u])<0){if(t[c--]=t[u--],g++,v=0,0==--r){y=!0;break}}else if(t[c--]=a[h--],v++,g=0,1==--s){y=!0;break}}while((g|v)<d);if(y)break;do{if(0!==(g=r-en(a[h],t,n,r,r-1,e))){for(r-=g,f=(c-=g)+1,p=(u-=g)+1,l=g-1;l>=0;l--)t[f+l]=t[p+l];if(0===r){y=!0;break}}if(t[c--]=a[h--],1==--s){y=!0;break}if(0!==(v=s-tn(t[u],a,0,s,s-1,e))){for(s-=v,f=(c-=v)+1,p=(h-=v)+1,l=0;l<v;l++)t[f+l]=a[p+l];if(s<=1){y=!0;break}}if(t[c--]=t[u--],0==--r){y=!0;break}d--}while(g>=$e||v>=$e);if(y)break;d<0&&(d=0),d+=2}(i=d)<1&&(i=1);if(1===s){for(f=(c-=r)+1,p=(u-=r)+1,l=r-1;l>=0;l--)t[f+l]=t[p+l];t[c]=a[h]}else{if(0===s)throw new Error;for(p=c-(s-1),l=0;l<s;l++)t[p+l]=a[l]}}(l,u,h,c))}return n=[],r=[],{mergeRuns:function(){for(;o>1;){var t=o-2;if(t>=1&&r[t-1]<=r[t]+r[t+1]||t>=2&&r[t-2]<=r[t]+r[t-1])r[t-1]<r[t+1]&&t--;else if(r[t]>r[t+1])break;s(t)}},forceMergeRuns:function(){for(;o>1;){var t=o-2;t>0&&r[t-1]<r[t+1]&&t--,s(t)}},pushRun:function(t,e){n[o]=t,r[o]=e,o+=1}}}function rn(t,e,n,r){n||(n=0),r||(r=t.length);var i=r-n;if(!(i<2)){var o=0;if(i<Ke)Je(t,n,r,n+(o=Qe(t,n,r,e)),e);else{var a=nn(t,e),s=function(t){for(var e=0;t>=Ke;)e|=1&t,t>>=1;return t+e}(i);do{if((o=Qe(t,n,r,e))<s){var l=i;l>s&&(l=s),Je(t,n,n+l,n+o,e),o=l}a.pushRun(n,o),a.mergeRuns(),i-=o,n+=o}while(0!==i);a.forceMergeRuns()}}}var on=1,an=4,sn=!1;function ln(){sn||(sn=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function un(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var hn=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=un}return t.prototype.traverse=function(t,e){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(t,e)},t.prototype.getDisplayList=function(t,e){e=e||!1;var n=this._displayList;return!t&&n.length||this.updateDisplayList(e),n},t.prototype.updateDisplayList=function(t){this._displayListLen=0;for(var e=this._roots,n=this._displayList,r=0,i=e.length;r<i;r++)this._updateAndAddDisplayable(e[r],null,t);n.length=this._displayListLen,rn(n,un)},t.prototype._updateAndAddDisplayable=function(t,e,n){if(!t.ignore||n){t.beforeUpdate(),t.update(),t.afterUpdate();var r=t.getClipPath();if(t.ignoreClip)e=null;else if(r){e=e?e.slice():[];for(var i=r,o=t;i;)i.parent=o,i.updateTransform(),e.push(i),o=i,i=i.getClipPath()}if(t.childrenRef){for(var a=t.childrenRef(),s=0;s<a.length;s++){var l=a[s];t.__dirty&&(l.__dirty|=on),this._updateAndAddDisplayable(l,e,n)}t.__dirty=0}else{var u=t;e&&e.length?u.__clipPaths=e:u.__clipPaths&&u.__clipPaths.length>0&&(u.__clipPaths=[]),isNaN(u.z)&&(ln(),u.z=0),isNaN(u.z2)&&(ln(),u.z2=0),isNaN(u.zlevel)&&(ln(),u.zlevel=0),this._displayList[this._displayListLen++]=u}var h=t.getDecalElement&&t.getDecalElement();h&&this._updateAndAddDisplayable(h,e,n);var c=t.getTextGuideLine();c&&this._updateAndAddDisplayable(c,e,n);var p=t.getTextContent();p&&this._updateAndAddDisplayable(p,e,n)}},t.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},t.prototype.delRoot=function(t){if(t instanceof Array)for(var e=0,n=t.length;e<n;e++)this.delRoot(t[e]);else{var r=A(this._roots,t);r>=0&&this._roots.splice(r,1)}},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}(),cn=i.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)},pn={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,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,n=.1,r=.4;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=r*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/r)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/r)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-pn.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*pn.bounceIn(2*t):.5*pn.bounceOut(2*t-1)+.5}},fn=Math.pow,dn=Math.sqrt,gn=1e-8,vn=1e-4,yn=dn(3),mn=1/3,_n=St(),xn=St(),wn=St();function bn(t){return t>-gn&&t<gn}function Sn(t){return t>gn||t<-gn}function Mn(t,e,n,r,i){var o=1-i;return o*o*(o*t+3*i*e)+i*i*(i*r+3*o*n)}function Tn(t,e,n,r,i){var o=1-i;return 3*(((e-t)*o+2*(n-e)*i)*o+(r-n)*i*i)}function Cn(t,e,n,r,i,o){var a=r+3*(e-n)-t,s=3*(n-2*e+t),l=3*(e-t),u=t-i,h=s*s-3*a*l,c=s*l-9*a*u,p=l*l-3*s*u,f=0;if(bn(h)&&bn(c)){if(bn(s))o[0]=0;else(M=-l/s)>=0&&M<=1&&(o[f++]=M)}else{var d=c*c-4*h*p;if(bn(d)){var g=c/h,v=-g/2;(M=-s/a+g)>=0&&M<=1&&(o[f++]=M),v>=0&&v<=1&&(o[f++]=v)}else if(d>0){var y=dn(d),m=h*s+1.5*a*(-c+y),_=h*s+1.5*a*(-c-y);(M=(-s-((m=m<0?-fn(-m,mn):fn(m,mn))+(_=_<0?-fn(-_,mn):fn(_,mn))))/(3*a))>=0&&M<=1&&(o[f++]=M)}else{var x=(2*h*s-3*a*c)/(2*dn(h*h*h)),w=Math.acos(x)/3,b=dn(h),S=Math.cos(w),M=(-s-2*b*S)/(3*a),T=(v=(-s+b*(S+yn*Math.sin(w)))/(3*a),(-s+b*(S-yn*Math.sin(w)))/(3*a));M>=0&&M<=1&&(o[f++]=M),v>=0&&v<=1&&(o[f++]=v),T>=0&&T<=1&&(o[f++]=T)}}return f}function kn(t,e,n,r,i){var o=6*n-12*e+6*t,a=9*e+3*r-3*t-9*n,s=3*e-3*t,l=0;if(bn(a)){if(Sn(o))(h=-s/o)>=0&&h<=1&&(i[l++]=h)}else{var u=o*o-4*a*s;if(bn(u))i[0]=-o/(2*a);else if(u>0){var h,c=dn(u),p=(-o-c)/(2*a);(h=(-o+c)/(2*a))>=0&&h<=1&&(i[l++]=h),p>=0&&p<=1&&(i[l++]=p)}}return l}function Dn(t,e,n,r,i,o){var a=(e-t)*i+t,s=(n-e)*i+e,l=(r-n)*i+n,u=(s-a)*i+a,h=(l-s)*i+s,c=(h-u)*i+u;o[0]=t,o[1]=a,o[2]=u,o[3]=c,o[4]=c,o[5]=h,o[6]=l,o[7]=r}function In(t,e,n,r,i,o,a,s,l){for(var u=t,h=e,c=0,p=1/l,f=1;f<=l;f++){var d=f*p,g=Mn(t,n,i,a,d),v=Mn(e,r,o,s,d),y=g-u,m=v-h;c+=Math.sqrt(y*y+m*m),u=g,h=v}return c}function Pn(t,e,n,r){var i=1-r;return i*(i*t+2*r*e)+r*r*n}function An(t,e,n,r){return 2*((1-r)*(e-t)+r*(n-e))}function On(t,e,n){var r=t+n-2*e;return 0===r?.5:(t-e)/r}function Rn(t,e,n,r,i){var o=(e-t)*r+t,a=(n-e)*r+e,s=(a-o)*r+o;i[0]=t,i[1]=o,i[2]=s,i[3]=s,i[4]=a,i[5]=n}function Ln(t,e,n,r,i,o,a){for(var s=t,l=e,u=0,h=1/a,c=1;c<=a;c++){var p=c*h,f=Pn(t,n,i,p),d=Pn(e,r,o,p),g=f-s,v=d-l;u+=Math.sqrt(g*g+v*v),s=f,l=d}return u}var Nn=/cubic-bezier\(([0-9,\.e ]+)\)/;function En(t){var e=t&&Nn.exec(t);if(e){var n=e[1].split(","),r=+lt(n[0]),i=+lt(n[1]),o=+lt(n[2]),a=+lt(n[3]);if(isNaN(r+i+o+a))return;var s=[];return function(t){return t<=0?0:t>=1?1:Cn(0,r,o,1,t,s)&&Mn(0,i,a,1,s[0])}}}var Bn=function(){function t(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||xt,this.ondestroy=t.ondestroy||xt,this.onrestart=t.onrestart||xt,t.easing&&this.setEasing(t.easing)}return t.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),!this._paused){var n=this._life,r=t-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var o=this.easingFunc,a=o?o(i):i;if(this.onframe(a),1===i){if(!this.loop)return!0;var s=r%n;this._startTime=t-s,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=e},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(t){this.easing=t,this.easingFunc=U(t)?t:pn[t]||En(t)},t}(),zn=function(t){this.value=t},Fn=function(){function t(){this._len=0}return t.prototype.insert=function(t){var e=new zn(t);return this.insertEntry(e),e},t.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},t.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),Hn=function(){function t(t){this._list=new Fn,this._maxSize=10,this._map={},this._maxSize=t}return t.prototype.put=function(t,e){var n=this._list,r=this._map,i=null;if(null==r[t]){var o=n.len(),a=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}a?a.value=e:a=new zn(e),a.key=t,n.insertEntry(a),r[t]=a}return i},t.prototype.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}(),Vn={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 Wn(t){return(t=Math.round(t))<0?0:t>255?255:t}function jn(t){return t<0?0:t>1?1:t}function Un(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?Wn(parseFloat(e)/100*255):Wn(parseInt(e,10))}function Gn(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?jn(parseFloat(e)/100):jn(parseFloat(e))}function qn(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function Xn(t,e,n){return t+(e-t)*n}function Yn(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t}function Zn(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var Kn=new Hn(20),$n=null;function Qn(t,e){$n&&Zn($n,e),$n=Kn.put(t,$n||e.slice())}function Jn(t,e){if(t){e=e||[];var n=Kn.get(t);if(n)return Zn(e,n);var r=(t+="").replace(/ /g,"").toLowerCase();if(r in Vn)return Zn(e,Vn[r]),Qn(t,e),e;var i,o=r.length;if("#"===r.charAt(0))return 4===o||5===o?(i=parseInt(r.slice(1,4),16))>=0&&i<=4095?(Yn(e,(3840&i)>>4|(3840&i)>>8,240&i|(240&i)>>4,15&i|(15&i)<<4,5===o?parseInt(r.slice(4),16)/15:1),Qn(t,e),e):void Yn(e,0,0,0,1):7===o||9===o?(i=parseInt(r.slice(1,7),16))>=0&&i<=16777215?(Yn(e,(16711680&i)>>16,(65280&i)>>8,255&i,9===o?parseInt(r.slice(7),16)/255:1),Qn(t,e),e):void Yn(e,0,0,0,1):void 0;var a=r.indexOf("("),s=r.indexOf(")");if(-1!==a&&s+1===o){var l=r.substr(0,a),u=r.substr(a+1,s-(a+1)).split(","),h=1;switch(l){case"rgba":if(4!==u.length)return 3===u.length?Yn(e,+u[0],+u[1],+u[2],1):Yn(e,0,0,0,1);h=Gn(u.pop());case"rgb":return u.length>=3?(Yn(e,Un(u[0]),Un(u[1]),Un(u[2]),3===u.length?h:Gn(u[3])),Qn(t,e),e):void Yn(e,0,0,0,1);case"hsla":return 4!==u.length?void Yn(e,0,0,0,1):(u[3]=Gn(u[3]),tr(u,e),Qn(t,e),e);case"hsl":return 3!==u.length?void Yn(e,0,0,0,1):(tr(u,e),Qn(t,e),e);default:return}}Yn(e,0,0,0,1)}}function tr(t,e){var n=(parseFloat(t[0])%360+360)%360/360,r=Gn(t[1]),i=Gn(t[2]),o=i<=.5?i*(r+1):i+r-i*r,a=2*i-o;return Yn(e=e||[],Wn(255*qn(a,o,n+1/3)),Wn(255*qn(a,o,n)),Wn(255*qn(a,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function er(t,e){var n=Jn(t);if(n){for(var r=0;r<3;r++)n[r]=e<0?n[r]*(1-e)|0:(255-n[r])*e+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return lr(n,4===n.length?"rgba":"rgb")}}function nr(t,e,n){if(e&&e.length&&t>=0&&t<=1){n=n||[];var r=t*(e.length-1),i=Math.floor(r),o=Math.ceil(r),a=e[i],s=e[o],l=r-i;return n[0]=Wn(Xn(a[0],s[0],l)),n[1]=Wn(Xn(a[1],s[1],l)),n[2]=Wn(Xn(a[2],s[2],l)),n[3]=jn(Xn(a[3],s[3],l)),n}}var rr=nr;function ir(t,e,n){if(e&&e.length&&t>=0&&t<=1){var r=t*(e.length-1),i=Math.floor(r),o=Math.ceil(r),a=Jn(e[i]),s=Jn(e[o]),l=r-i,u=lr([Wn(Xn(a[0],s[0],l)),Wn(Xn(a[1],s[1],l)),Wn(Xn(a[2],s[2],l)),jn(Xn(a[3],s[3],l))],"rgba");return n?{color:u,leftIndex:i,rightIndex:o,value:r}:u}}var or=ir;function ar(t,e,n,r){var i,o=Jn(t);if(t)return o=function(t){if(t){var e,n,r=t[0]/255,i=t[1]/255,o=t[2]/255,a=Math.min(r,i,o),s=Math.max(r,i,o),l=s-a,u=(s+a)/2;if(0===l)e=0,n=0;else{n=u<.5?l/(s+a):l/(2-s-a);var h=((s-r)/6+l/2)/l,c=((s-i)/6+l/2)/l,p=((s-o)/6+l/2)/l;r===s?e=p-c:i===s?e=1/3+h-p:o===s&&(e=2/3+c-h),e<0&&(e+=1),e>1&&(e-=1)}var f=[360*e,n,u];return null!=t[3]&&f.push(t[3]),f}}(o),null!=e&&(o[0]=(i=e,(i=Math.round(i))<0?0:i>360?360:i)),null!=n&&(o[1]=Gn(n)),null!=r&&(o[2]=Gn(r)),lr(tr(o),"rgba")}function sr(t,e){var n=Jn(t);if(n&&null!=e)return n[3]=jn(e),lr(n,"rgba")}function lr(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}}function ur(t,e){var n=Jn(t);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*e:0}var hr=new Hn(100);function cr(t){if(G(t)){var e=hr.get(t);return e||(e=er(t,-.1),hr.put(t,e)),e}if(Q(t)){var n=D({},t);return n.colorStops=E(t.colorStops,(function(t){return{offset:t.offset,color:er(t.color,-.1)}})),n}return t}var pr=Object.freeze({__proto__:null,fastLerp:nr,fastMapToColor:rr,lerp:ir,lift:er,liftColor:cr,lum:ur,mapToColor:or,modifyAlpha:sr,modifyHSL:ar,parse:Jn,random:function(){return lr([Math.round(255*Math.random()),Math.round(255*Math.random()),Math.round(255*Math.random())],"rgb")},stringify:lr,toHex:function(t){var e=Jn(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}});i.hasGlobalWindow&&U(window.btoa);var fr=Array.prototype.slice;function dr(t,e,n){return(e-t)*n+t}function gr(t,e,n,r){for(var i=e.length,o=0;o<i;o++)t[o]=dr(e