zrender
Version:
A lightweight graphic library providing 2d draw for Apache ECharts
1 lines • 221 kB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).zrender={})}(this,function(t){"use strict";var e=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},c=new function(){this.browser=new e,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?(c.wxa=!0,c.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?c.worker=!0:!c.hasGlobalWindow||"Deno"in window||"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent&&-1<navigator.userAgent.indexOf("Node.js")?(c.node=!0,c.svgSupported=!0):function(t,e){var r=e.browser,i=t.match(/Firefox\/([\d.]+)/),n=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(t);i&&(r.firefox=!0,r.version=i[1]);n&&(r.ie=!0,r.version=n[1]);o&&(r.edge=!0,r.version=o[1],r.newEdge=18<+o[1].split(".")[0]);a&&(r.weChat=!0);{var s;e.svgSupported="undefined"!=typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge,e.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&11<=+r.version),(e.domSupported="undefined"!=typeof document)&&(s=document.documentElement.style,e.transform3dSupported=(r.ie&&"transition"in s||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||r.ie&&9<=+r.version)}}(navigator.userAgent,c);var h=12,v="sans-serif",H=h+"px "+v;var l,u,p=function(t){var e={};if("undefined"==typeof JSON)return e;for(var r=0;r<t.length;r++){var i=String.fromCharCode(r+32),n=(t.charCodeAt(r)-20)/100;e[i]=n}return e}("007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N"),d={createCanvas:function(){return"undefined"!=typeof document&&document.createElement("canvas")},measureText:function(t,e){var r;if(l||(r=d.createCanvas(),l=r&&r.getContext("2d")),l)return u!==e&&(u=l.font=e||H),l.measureText(t);t=t||"";var i=/((?:\d+)?\.?\d*)px/.exec(e=e||H),n=i&&+i[1]||h,o=0;if(0<=e.indexOf("mono"))o=n*t.length;else for(var a=0;a<t.length;a++){var s=p[t[a]];o+=null==s?n:s*n}return{width:o}},loadImage:function(t,e,r){var i=new Image;return i.onload=e,i.onerror=r,i.src=t,i},getTime:function(){return Date.now?Date.now():+new Date}};var s=O(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(t,e){return t["[object "+e+"]"]=!0,t},{}),f=O(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(t,e){return t["[object "+e+"Array]"]=!0,t},{}),y=Object.prototype.toString,r=Array.prototype,a=r.forEach,g=r.filter,n=r.slice,_=r.map,i=function(){}.constructor,o=i?i.prototype:null,m="__proto__",x=2311,w=Math.pow(2,53)-1;function b(){return w<=x&&(x=0),x++}function S(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];"undefined"!=typeof console&&console.error.apply(console,t)}function C(t){if(null==t||"object"!=typeof t)return t;var e=t,r=y.call(t);if("[object Array]"===r){if(!nt(t)){e=[];for(var i=0,n=t.length;i<n;i++)e[i]=C(t[i])}}else if(f[r]){if(!nt(t)){var o=t.constructor;if(o.from)e=o.from(t);else{e=new o(t.length);for(i=0,n=t.length;i<n;i++)e[i]=t[i]}}}else if(!s[r]&&!nt(t)&&!V(t))for(var a in e={},t)t.hasOwnProperty(a)&&a!==m&&(e[a]=C(t[a]));return e}function T(t,e,r){if(!Y(e)||!Y(t))return r?C(e):t;for(var i in e){var n,o;e.hasOwnProperty(i)&&i!==m&&(n=t[i],!Y(o=e[i])||!Y(n)||G(o)||G(n)||V(o)||V(n)||q(o)||q(n)||nt(o)||nt(n)?!r&&i in t||(t[i]=C(e[i])):T(n,o,r))}return t}function L(t,e){if(Object.assign)Object.assign(t,e);else for(var r in e)e.hasOwnProperty(r)&&r!==m&&(t[r]=e[r]);return t}function k(t,e,r){t=t||{};for(var i=0;i<r.length;i++){var n=r[i];t[n]=e[n]}return t}function P(t,e,r){for(var i=B(e),n=0,o=i.length;n<o;n++){var a=i[n];(r?null!=e[a]:null==t[a])&&(t[a]=e[a])}return t}var M=d.createCanvas;function A(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r}return-1}function D(t,e,r){if(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var i=Object.getOwnPropertyNames(e),n=0;n<i.length;n++){var o=i[n];"constructor"!==o&&(r?null!=e[o]:null==t[o])&&(t[o]=e[o])}else P(t,e,r)}function z(t){return!!t&&("string"!=typeof t&&"number"==typeof t.length)}function R(t,e,r){if(t&&e)if(t.forEach&&t.forEach===a)t.forEach(e,r);else if(t.length===+t.length)for(var i=0,n=t.length;i<n;i++)e.call(r,t[i],i,t);else for(var o in t)t.hasOwnProperty(o)&&e.call(r,t[o],o,t)}function I(t,e,r){if(!t)return[];if(!e)return J(t);if(t.map&&t.map===_)return t.map(e,r);for(var i=[],n=0,o=t.length;n<o;n++)i.push(e.call(r,t[n],n,t));return i}function O(t,e,r,i){if(t&&e){for(var n=0,o=t.length;n<o;n++)r=e.call(i,r,t[n],n,t);return r}}function F(t,e,r){if(!t)return[];if(!e)return J(t);if(t.filter&&t.filter===g)return t.filter(e,r);for(var i=[],n=0,o=t.length;n<o;n++)e.call(r,t[n],n,t)&&i.push(t[n]);return i}function B(t){if(!t)return[];if(Object.keys)return Object.keys(t);var e=[];for(var r in t)t.hasOwnProperty(r)&&e.push(r);return e}var N=o&&W(o.bind)?o.call.bind(o.bind):function(t,e){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return function(){return t.apply(e,r.concat(n.call(arguments)))}};function G(t){return Array.isArray?Array.isArray(t):"[object Array]"===y.call(t)}function W(t){return"function"==typeof t}function E(t){return"string"==typeof t}function X(t){return"number"==typeof t}function Y(t){var e=typeof t;return"function"==e||!!t&&"object"==e}function q(t){return!!s[y.call(t)]}function j(t){return!!f[y.call(t)]}function V(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function U(t){return null!=t.colorStops}function Z(t){return null!=t.image}function K(t){return t!=t}function Q(t,e){return null!=t?t:e}function $(t,e,r){return null!=t?t:null!=e?e:r}function J(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return n.apply(t,e)}function tt(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 et(t,e){if(!t)throw new Error(e)}function rt(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var it="__ec_primitive__";function nt(t){return t[it]}var ot=(at.prototype.delete=function(t){var e=this.has(t);return e&&delete this.data[t],e},at.prototype.has=function(t){return this.data.hasOwnProperty(t)},at.prototype.get=function(t){return this.data[t]},at.prototype.set=function(t,e){return this.data[t]=e,this},at.prototype.keys=function(){return B(this.data)},at.prototype.forEach=function(t){var e=this.data;for(var r in e)e.hasOwnProperty(r)&&t(e[r],r)},at);function at(){this.data={}}var st="function"==typeof Map;var ht=(lt.prototype.hasKey=function(t){return this.data.has(t)},lt.prototype.get=function(t){return this.data.get(t)},lt.prototype.set=function(t,e){return this.data.set(t,e),e},lt.prototype.each=function(r,i){this.data.forEach(function(t,e){r.call(i,t,e)})},lt.prototype.keys=function(){var t=this.data.keys();return st?Array.from(t):t},lt.prototype.removeKey=function(t){this.data.delete(t)},lt);function lt(t){var r=G(t);this.data=new(st?Map:ot);var i=this;function e(t,e){r?i.set(t,e):i.set(e,t)}t instanceof lt?t.each(e):t&&R(t,e)}function ut(t){return new ht(t)}function ct(t,e){var r,i=Object.create?Object.create(t):((r=function(){}).prototype=t,new r);return e&&L(i,e),i}function pt(t){var e=t.style;e.webkitUserSelect="none",e.userSelect="none",e.webkitTapHighlightColor="rgba(0,0,0,0)",e["-webkit-touch-callout"]="none"}function ft(t,e){return t.hasOwnProperty(e)}function dt(){}var yt=180/Math.PI,vt=Number.EPSILON||Math.pow(2,-52),gt=Object.freeze({__proto__:null,guid:b,logError:S,clone:C,merge:T,mergeAll:function(t,e){for(var r=t[0],i=1,n=t.length;i<n;i++)r=T(r,t[i],e);return r},extend:L,assignProps:k,defaults:P,createCanvas:M,indexOf:A,inherits:function(t,e){var r=t.prototype;function i(){}for(var n in i.prototype=e.prototype,t.prototype=new i,r)r.hasOwnProperty(n)&&(t.prototype[n]=r[n]);(t.prototype.constructor=t).superClass=e},mixin:D,isArrayLike:z,each:R,map:I,reduce:O,filter:F,find:function(t,e,r){if(t&&e)for(var i=0,n=t.length;i<n;i++)if(e.call(r,t[i],i,t))return t[i]},keys:B,bind:N,curry:function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return function(){return t.apply(this,e.concat(n.call(arguments)))}},isArray:G,isFunction:W,isString:E,isStringSafe:function(t){return"[object String]"===y.call(t)},isNumber:X,isObject:Y,isBuiltInObject:q,isTypedArray:j,isDom:V,isGradientObject:U,isImagePatternObject:Z,isRegExp:function(t){return"[object RegExp]"===y.call(t)},eqNaN:K,retrieve:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=0,i=t.length;r<i;r++)if(null!=t[r])return t[r]},retrieve2:Q,retrieve3:$,slice:J,normalizeCssArray:tt,assert:et,trim:rt,setAsPrimitive:function(t){t[it]=!0},isPrimitive:nt,HashMap:ht,createHashMap:ut,concatArray:function(t,e){for(var r=new t.constructor(t.length+e.length),i=0;i<t.length;i++)r[i]=t[i];for(var n=t.length,i=0;i<e.length;i++)r[i+n]=e[i];return r},createObject:ct,disableUserSelect:pt,hasOwn:ft,noop:dt,RADIAN_TO_DEGREE:yt,EPSILON:vt}),_t=function(t,e){return(_t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};function mt(t,e){function r(){this.constructor=t}_t(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function xt(t,e){return null==t&&(t=0),null==e&&(e=0),[t,e]}function wt(t){return[t[0],t[1]]}function bt(t,e,r){return t[0]=e,t[1]=r,t}function St(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t}function Tt(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t}function kt(t){return Math.sqrt(Ct(t))}function Ct(t){return t[0]*t[0]+t[1]*t[1]}function Pt(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t}function Mt(t,e){var r=kt(e);return 0===r?(t[0]=0,t[1]=0):(t[0]=e[0]/r,t[1]=e[1]/r),t}function At(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var Dt=At;function zt(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var It=zt;function Lt(t,e,r,i){return t[0]=e[0]+i*(r[0]-e[0]),t[1]=e[1]+i*(r[1]-e[1]),t}function Rt(t,e,r){var i=e[0],n=e[1];return t[0]=r[0]*i+r[2]*n+r[4],t[1]=r[1]*i+r[3]*n+r[5],t}function Ot(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t}function Ft(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t}var Bt=Object.freeze({__proto__:null,create:xt,copy:function(t,e){return t[0]=e[0],t[1]=e[1],t},clone:wt,set:bt,add:St,scaleAndAdd:function(t,e,r,i){return t[0]=e[0]+r[0]*i,t[1]=e[1]+r[1]*i,t},sub:Tt,len:kt,length:kt,lenSquare:Ct,lengthSquare:Ct,mul:function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t},div:function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},scale:Pt,normalize:Mt,distance:At,dist:Dt,distanceSquare:zt,distSquare:It,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},lerp:Lt,applyTransform:Rt,min:Ot,max:Ft}),Nt=function(t,e){this.target=t,this.topTarget=e&&e.topTarget},Ht=(Wt.prototype._dragStart=function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent||e.__hostTarget;e&&((this._draggingTarget=e).dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.handler.dispatchToElement(new Nt(e,t),"dragstart",t.event))},Wt.prototype._drag=function(t){var e,r,i,n,o,a,s=this._draggingTarget;s&&(e=t.offsetX,r=t.offsetY,i=e-this._x,n=r-this._y,this._x=e,this._y=r,s.drift(i,n,t),this.handler.dispatchToElement(new Nt(s,t),"drag",t.event),o=this.handler.findHover(e,r,s).target,a=this._dropTarget,s!==(this._dropTarget=o)&&(a&&o!==a&&this.handler.dispatchToElement(new Nt(a,t),"dragleave",t.event),o&&o!==a&&this.handler.dispatchToElement(new Nt(o,t),"dragenter",t.event)))},Wt.prototype._dragEnd=function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.handler.dispatchToElement(new Nt(e,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new Nt(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},Wt);function Wt(t){(this.handler=t).on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}var Et=(Xt.prototype.on=function(t,e,r,i){this._$handlers||(this._$handlers={});var n=this._$handlers;if("function"==typeof e&&(i=r,r=e,e=null),!r||!t)return this;var o=this._$eventProcessor;null!=e&&o&&o.normalizeQuery&&(e=o.normalizeQuery(e)),n[t]||(n[t]=[]);for(var a=0;a<n[t].length;a++)if(n[t][a].h===r)return this;var s={h:r,query:e,ctx:i||this,callAtLast:r.zrEventfulCallAtLast},h=n[t].length-1,l=n[t][h];return l&&l.callAtLast?n[t].splice(h,0,s):n[t].push(s),this},Xt.prototype.isSilent=function(t){var e=this._$handlers;return!e||!e[t]||!e[t].length},Xt.prototype.off=function(t,e){var r=this._$handlers;if(!r)return this;if(!t)return this._$handlers={},this;if(e){if(r[t]){for(var i=[],n=0,o=r[t].length;n<o;n++)r[t][n].h!==e&&i.push(r[t][n]);r[t]=i}r[t]&&0===r[t].length&&delete r[t]}else delete r[t];return this},Xt.prototype.trigger=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(!this._$handlers)return this;var i=this._$handlers[t],n=this._$eventProcessor;if(i)for(var o=e.length,a=i.length,s=0;s<a;s++){var h=i[s];if(!n||!n.filter||null==h.query||n.filter(t,h.query))switch(o){case 0:h.h.call(h.ctx);break;case 1:h.h.call(h.ctx,e[0]);break;case 2:h.h.call(h.ctx,e[0],e[1]);break;default:h.h.apply(h.ctx,e)}}return n&&n.afterTrigger&&n.afterTrigger(t),this},Xt.prototype.triggerWithContext=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(!this._$handlers)return this;var i=this._$handlers[t],n=this._$eventProcessor;if(i)for(var o=e.length,a=e[o-1],s=i.length,h=0;h<s;h++){var l=i[h];if(!n||!n.filter||null==l.query||n.filter(t,l.query))switch(o){case 0:l.h.call(a);break;case 1:l.h.call(a,e[0]);break;case 2:l.h.call(a,e[0],e[1]);break;default:l.h.apply(a,e.slice(1,o-1))}}return n&&n.afterTrigger&&n.afterTrigger(t),this},Xt);function Xt(t){t&&(this._$eventProcessor=t)}var Yt=Math.log(2);function qt(t,e,r,i,n,o){var a=i+"-"+n,s=t.length;if(o.hasOwnProperty(a))return o[a];if(1===e){var h=Math.round(Math.log((1<<s)-1&~n)/Yt);return t[r][h]}for(var l=i|1<<r,u=r+1;i&1<<u;)u++;for(var c=0,p=0,f=0;p<s;p++){var d=1<<p;d&n||(c+=(f%2?-1:1)*t[r][p]*qt(t,e-1,u,l,n|d,o),f++)}return o[a]=c}function jt(t,e){var r=[[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]]],i={},n=qt(r,8,0,0,0,i);if(0!==n){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)*qt(r,7,0===a?1:0,1<<a,1<<s,i)/n*e[a];return function(t,e,r){var i=e*o[6]+r*o[7]+1;t[0]=(e*o[0]+r*o[1]+o[2])/i,t[1]=(e*o[3]+r*o[4]+o[5])/i}}}var Vt="___zrEVENTSAVED";function Ut(t,e,r,i,n){if(e.getBoundingClientRect&&c.domSupported&&!Gt(e)){var o=e[Vt]||(e[Vt]={}),a=function(t,e,r){for(var i=r?"invTrans":"trans",n=e[i],o=e.srcCoords,a=[],s=[],h=!0,l=0;l<4;l++){var u=t[l].getBoundingClientRect(),c=2*l,p=u.left,f=u.top;a.push(p,f),h=h&&o&&p===o[c]&&f===o[1+c],s.push(t[l].offsetLeft,t[l].offsetTop)}return h&&n?n:(e.srcCoords=a,e[i]=r?jt(s,a):jt(a,s))}(function(t,e){var r=e.markers;if(r)return r;r=e.markers=[];for(var i=["left","right"],n=["top","bottom"],o=0;o<4;o++){var a=document.createElement("div"),s=a.style,h=o%2,l=(o>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[h]+":0",n[l]+":0",i[1-h]+":auto",n[1-l]+":auto",""].join("!important;"),t.appendChild(a),r.push(a)}return e.clearMarkers=function(){R(r,function(t){t.parentNode&&t.parentNode.removeChild(t)})},r}(e,o),o,n);if(a)return a(t,r,i),1}}function Gt(t){return"CANVAS"===t.nodeName.toUpperCase()}var Zt=/([&<>"'])/g,Kt={"&":"&","<":"<",">":">",'"':""","'":"'"};var Qt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,$t=[],Jt=c.browser.firefox&&+c.browser.version.split(".")[0]<39;function te(t,e,r,i){return r=r||{},i?ee(t,e,r):Jt&&null!=e.layerX&&e.layerX!==e.offsetX?(r.zrX=e.layerX,r.zrY=e.layerY):null!=e.offsetX?(r.zrX=e.offsetX,r.zrY=e.offsetY):ee(t,e,r),r}function ee(t,e,r){if(c.domSupported&&t.getBoundingClientRect){var i=e.clientX,n=e.clientY;if(Gt(t)){var o=t.getBoundingClientRect();return r.zrX=i-o.left,void(r.zrY=n-o.top)}if(Ut($t,t,i,n))return r.zrX=$t[0],void(r.zrY=$t[1])}r.zrX=r.zrY=0}function re(t){return t||window.event}function ie(t,e,r){if(null!=(e=re(e)).zrX)return e;var i,n,o=e.type;o&&0<=o.indexOf("touch")?(i="touchend"!==o?e.targetTouches[0]:e.changedTouches[0])&&te(t,i,e,r):(te(t,e,e,r),n=function(t){var e=t.wheelDelta;if(e)return e;var r=t.deltaX,i=t.deltaY;return null!=r&&null!=i?3*(0!==i?Math.abs(i):Math.abs(r))*(0<i||!(i<0)&&0<r?-1:1):e}(e),e.zrDelta=n?n/120:-(e.detail||0)/3);var a=e.button;return null==e.which&&void 0!==a&&Qt.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}var ne=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0},oe=(ae.prototype.recognize=function(t,e,r){return this._doTrack(t,e,r),this._recognize(t)},ae.prototype.clear=function(){return this._track.length=0,this},ae.prototype._doTrack=function(t,e,r){var i=t.touches;if(i){for(var n={points:[],touches:[],target:e,event:t},o=0,a=i.length;o<a;o++){var s=i[o],h=te(r,s,{});n.points.push([h.zrX,h.zrY]),n.touches.push(s)}this._track.push(n)}},ae.prototype._recognize=function(t){for(var e in he)if(he.hasOwnProperty(e)){var r=he[e](this._track,t);if(r)return r}},ae);function ae(){this._track=[]}function se(t){var e=t[1][0]-t[0][0],r=t[1][1]-t[0][1];return Math.sqrt(e*e+r*r)}var he={pinch:function(t,e){var r=t.length;if(r){var i,n=(t[r-1]||{}).points,o=(t[r-2]||{}).points||n;if(o&&1<o.length&&n&&1<n.length){var a=se(n)/se(o);isFinite(a)||(a=1),e.pinchScale=a;var s=[((i=n)[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}};function le(){return[1,0,0,1,0,0]}function ue(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function ce(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 pe(t,e,r){var i=e[0]*r[0]+e[2]*r[1],n=e[1]*r[0]+e[3]*r[1],o=e[0]*r[2]+e[2]*r[3],a=e[1]*r[2]+e[3]*r[3],s=e[0]*r[4]+e[2]*r[5]+e[4],h=e[1]*r[4]+e[3]*r[5]+e[5];return t[0]=i,t[1]=n,t[2]=o,t[3]=a,t[4]=s,t[5]=h,t}function fe(t,e,r){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+r[0],t[5]=e[5]+r[1],t}function de(t,e,r,i){void 0===i&&(i=[0,0]);var n=e[0],o=e[2],a=e[4],s=e[1],h=e[3],l=e[5],u=Math.sin(r),c=Math.cos(r);return t[0]=n*c+s*u,t[1]=-n*u+s*c,t[2]=o*c+h*u,t[3]=-o*u+c*h,t[4]=c*(a-i[0])+u*(l-i[1])+i[0],t[5]=c*(l-i[1])-u*(a-i[0])+i[1],t}function ye(t,e,r){var i=r[0],n=r[1];return t[0]=e[0]*i,t[1]=e[1]*n,t[2]=e[2]*i,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*n,t}function ve(t,e){var r=e[0],i=e[2],n=e[4],o=e[1],a=e[3],s=e[5],h=r*a-o*i;return h?(h=1/h,t[0]=a*h,t[1]=-o*h,t[2]=-i*h,t[3]=r*h,t[4]=(i*s-a*n)*h,t[5]=(o*n-r*s)*h,t):null}var ge=Object.freeze({__proto__:null,create:le,identity:ue,copy:ce,mul:pe,translate:fe,rotate:de,scale:ye,invert:ve,clone:function(t){var e=le();return ce(e,t),e}}),_e=(me.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},me.prototype.clone=function(){return new me(this.x,this.y)},me.prototype.set=function(t,e){return this.x=t,this.y=e,this},me.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},me.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},me.prototype.scale=function(t){this.x*=t,this.y*=t},me.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},me.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},me.prototype.dot=function(t){return this.x*t.x+this.y*t.y},me.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},me.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},me.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},me.prototype.distance=function(t){var e=this.x-t.x,r=this.y-t.y;return Math.sqrt(e*e+r*r)},me.prototype.distanceSquare=function(t){var e=this.x-t.x,r=this.y-t.y;return e*e+r*r},me.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},me.prototype.transform=function(t){if(t){var e=this.x,r=this.y;return this.x=t[0]*e+t[2]*r+t[4],this.y=t[1]*e+t[3]*r+t[5],this}},me.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},me.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},me.set=function(t,e,r){t.x=e,t.y=r},me.copy=function(t,e){t.x=e.x,t.y=e.y},me.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},me.lenSquare=function(t){return t.x*t.x+t.y*t.y},me.dot=function(t,e){return t.x*e.x+t.y*e.y},me.add=function(t,e,r){t.x=e.x+r.x,t.y=e.y+r.y},me.sub=function(t,e,r){t.x=e.x-r.x,t.y=e.y-r.y},me.scale=function(t,e,r){t.x=e.x*r,t.y=e.y*r},me.scaleAndAdd=function(t,e,r,i){t.x=e.x+r.x*i,t.y=e.y+r.y*i},me.lerp=function(t,e,r,i){var n=1-i;t.x=n*e.x+i*r.x,t.y=n*e.y+i*r.y},me);function me(t,e){this.x=t||0,this.y=e||0}var xe=Math.min,we=Math.max,be=Math.abs,Se=["x","y"],Te=["width","height"],ke=new _e,Ce=new _e,Pe=new _e,Me=new _e,Ae=Xe(),De=Ae.minTv,ze=Ae.maxTv,Ie=[0,0],Le=(Re.set=function(t,e,r,i,n){return i<0&&(e+=i,i=-i),n<0&&(r+=n,n=-n),t.x=e,t.y=r,t.width=i,t.height=n,t},Re.prototype.union=function(t){var e=xe(t.x,this.x),r=xe(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=we(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=we(t.y+t.height,this.y+this.height)-r:this.height=t.height,this.x=e,this.y=r},Re.prototype.applyTransform=function(t){Re.applyTransform(this,this,t)},Re.prototype.calculateTransform=function(t){return Be(le(),this,t)},Re.prototype.intersect=function(t,e,r){return Re.intersect(this,t,e,r)},Re.intersect=function(t,e,r,i){r&&_e.set(r,0,0);var n=i&&i.outIntersectRect||null,o=i&&i.clamp;if(n&&(n.x=n.y=n.width=n.height=NaN),!t||!e)return!1;t instanceof Re||(t=Oe(Ne,t.x,t.y,t.width,t.height)),e instanceof Re||(e=Oe(He,e.x,e.y,e.width,e.height));var a=!!r;Ae.reset(i,a);var s=Ae.touchThreshold,h=t.x+s,l=t.x+t.width-s,u=t.y+s,c=t.y+t.height-s,p=e.x+s,f=e.x+e.width-s,d=e.y+s,y=e.y+e.height-s;if(l<h||c<u||f<p||y<d)return!1;var v=!(l<p||f<h||c<d||y<u);return(a||n)&&(Ie[0]=1/0,Ee(h,l,p,f,Ie[1]=0,a,n,o),Ee(u,c,d,y,1,a,n,o),a&&_e.copy(r,v?Ae.useDir?Ae.dirMinTv:De:ze)),v},Re.contain=function(t,e,r){return e>=t.x&&e<=t.x+t.width&&r>=t.y&&r<=t.y+t.height},Re.prototype.contain=function(t,e){return Re.contain(this,t,e)},Re.prototype.clone=function(){return new Re(this.x,this.y,this.width,this.height)},Re.prototype.copy=function(t){Fe(this,t)},Re.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},Re.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Re.prototype.isZero=function(){return 0===this.width||0===this.height},Re.create=function(t){return new Re(t?t.x:0,t?t.y:0,t?t.width:0,t?t.height:0)},Re.copy=function(t,e){return t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t},Re.applyTransform=function(t,e,r){if(r){if(r[1]<1e-5&&-1e-5<r[1]&&r[2]<1e-5&&-1e-5<r[2]){var i=r[0],n=r[3],o=r[4],a=r[5];return t.x=e.x*i+o,t.y=e.y*n+a,t.width=e.width*i,t.height=e.height*n,t.width<0&&(t.x+=t.width,t.width=-t.width),void(t.height<0&&(t.y+=t.height,t.height=-t.height))}ke.x=Pe.x=e.x,ke.y=Me.y=e.y,Ce.x=Me.x=e.x+e.width,Ce.y=Pe.y=e.y+e.height,ke.transform(r),Me.transform(r),Ce.transform(r),Pe.transform(r),t.x=xe(ke.x,Ce.x,Pe.x,Me.x),t.y=xe(ke.y,Ce.y,Pe.y,Me.y);var s=we(ke.x,Ce.x,Pe.x,Me.x),h=we(ke.y,Ce.y,Pe.y,Me.y);t.width=s-t.x,t.height=h-t.y}else t!==e&&Fe(t,e)},Re.calculateTransform=function(t,e,r){var i=r.width/e.width,n=r.height/e.height;return fe(t=ue(t||[]),t,bt(We,-e.x,-e.y)),ye(t,t,bt(We,i,n)),fe(t,t,bt(We,r.x,r.y)),t},Re);function Re(t,e,r,i){Oe(this,t,e,r,i)}var Oe=Le.set,Fe=Le.copy,Be=Le.calculateTransform,Ne=new Le(0,0,0,0),He=new Le(0,0,0,0),We=[];function Ee(t,e,r,i,n,o,a,s){var h=be(e-r),l=be(i-t),u=xe(h,l),c=Se[n],p=Se[1-n],f=Te[n];e<r||i<t?h<l?(o&&(ze[c]=-h),s&&(a[c]=e,a[f]=0)):(o&&(ze[c]=l),s&&(a[c]=t,a[f]=0)):(a&&(a[c]=we(t,r),a[f]=xe(e,i)-a[c]),o&&(u<Ie[0]||Ae.useDir)&&(Ie[0]=xe(u,Ie[0]),(h<l||!Ae.bidirectional)&&(De[c]=h,De[p]=0,Ae.useDir&&Ae.calcDirMTV()),(l<=h||!Ae.bidirectional)&&(De[c]=-l,De[p]=0,Ae.useDir&&Ae.calcDirMTV())))}function Xe(){var a=0,s=new _e,h=new _e,l={minTv:new _e,maxTv:new _e,useDir:!1,dirMinTv:new _e,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(t,e){l.touchThreshold=0,t&&null!=t.touchThreshold&&(l.touchThreshold=we(0,t.touchThreshold)),l.negativeSize=!1,e&&(l.minTv.set(1/0,1/0),l.maxTv.set(0,0),l.useDir=!1,t&&null!=t.direction&&(l.useDir=!0,l.dirMinTv.copy(l.minTv),h.copy(l.minTv),a=t.direction,l.bidirectional=null==t.bidirectional||!!t.bidirectional,l.bidirectional||s.set(Math.cos(a),Math.sin(a))))},calcDirMTV:function(){var t=l.minTv,e=l.dirMinTv,r=t.y*t.y+t.x*t.x,i=Math.sin(a),n=Math.cos(a),o=i*t.y+n*t.x;u(o)?u(t.x)&&u(t.y)&&e.set(0,0):(h.x=r*n/o,h.y=r*i/o,u(h.x)&&u(h.y)?e.set(0,0):(l.bidirectional||0<s.dot(h))&&h.len()<e.len()&&e.copy(h))}};function u(t){return be(t)<1e-10}return l}var Ye="silent";function qe(){ne(this.event)}var je,Ve=(mt(Ue,je=Et),Ue.prototype.dispose=function(){},Ue.prototype.setCursor=function(){},Ue);function Ue(){var t=null!==je&&je.apply(this,arguments)||this;return t.handler=null,t}var Ge,Ze=function(t,e){this.x=t,this.y=e},Ke=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Qe=new Le(0,0,0,0),$e=(mt(Je,Ge=Et),Je.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(R(Ke,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},Je.prototype.mousemove=function(t){var e=t.zrX,r=t.zrY,i=er(this,e,r),n=this._hovered,o=n.target;o&&!o.__zr&&(o=(n=this.findHover(n.x,n.y)).target);var a=this._hovered=i?new Ze(e,r):this.findHover(e,r),s=a.target,h=this.proxy;h.setCursor&&h.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(n,"mouseout",t),this.dispatchToElement(a,"mousemove",t),s&&s!==o&&this.dispatchToElement(a,"mouseover",t)},Je.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})},Je.prototype.resize=function(){this._hovered=new Ze(0,0)},Je.prototype.dispatch=function(t,e){var r=this[t];r&&r.call(this,e)},Je.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},Je.prototype.setCursorStyle=function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},Je.prototype.dispatchToElement=function(t,e,r){var i=(t=t||{}).target;if(!i||!i.silent){for(var n,o,a="on"+e,s={type:e,event:o=r,target:(n=t).target,topTarget:n.topTarget,cancelBubble:!1,offsetX:o.zrX,offsetY:o.zrY,gestureEvent:o.gestureEvent,pinchX:o.pinchX,pinchY:o.pinchY,pinchScale:o.pinchScale,wheelDelta:o.zrDelta,zrByTouch:o.zrByTouch,which:o.which,stop:qe};i&&(i[a]&&(s.cancelBubble=!!i[a].call(i,s)),i.trigger(e,s),i=i.__hostTarget?i.__hostTarget:i.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(e,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(t){"function"==typeof t[a]&&t[a].call(t,s),t.trigger&&t.trigger(e,s)}))}},Je.prototype.findHover=function(t,e,r){var i=this.storage.getDisplayList(),n=new Ze(t,e);if(tr(i,n,t,e,r),this._pointerSize&&!n.target){for(var o=[],a=this._pointerSize,s=a/2,h=new Le(t-s,e-s,a,a),l=i.length-1;0<=l;l--){var u=i[l];u===r||u.ignore||u.ignoreCoarsePointer||u.parent&&u.parent.ignoreCoarsePointer||(Qe.copy(u.getBoundingRect()),u.transform&&Qe.applyTransform(u.transform),Qe.intersect(h)&&o.push(u))}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(tr(o,n,t+f*Math.cos(d),e+f*Math.sin(d),r),n.target)return n}return n},Je.prototype.processGesture=function(t,e){this._gestureMgr||(this._gestureMgr=new oe);var r=this._gestureMgr;"start"===e&&r.clear();var i,n,o=r.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);"end"===e&&r.clear(),o&&(i=o.type,t.gestureEvent=i,(n=new Ze).target=o.target,this.dispatchToElement(n,i,o.event))},Je);function Je(t,e,r,i,n){var o=Ge.call(this)||this;return o._hovered=new Ze(0,0),o.storage=t,o.painter=e,o.painterRoot=i,o._pointerSize=n,r=r||new Ve,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new Ht(o),o}function tr(t,e,r,i,n){for(var o=t.length-1;0<=o;o--){var a=t[o],s=void 0;if(a!==n&&!a.ignore&&(s=function(t,e,r){if(t[t.rectHover?"rectContain":"contain"](e,r)){for(var i=t,n=void 0,o=!1;i;){if(i.ignoreClip&&(o=!0),!o){var a=i.getClipPath();if(a&&!a.contain(e,r))return!1}i.silent&&(n=!0);var s=i.__hostTarget,i=s?i.ignoreHostSilent?null:s:i.parent}return!n||Ye}return!1}(a,r,i))&&(e.topTarget||(e.topTarget=a),s!==Ye)){e.target=a;break}}}function er(t,e,r){var i=t.painter;return e<0||e>i.getWidth()||r<0||r>i.getHeight()}R(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(a){$e.prototype[a]=function(t){var e,r,i=t.zrX,n=t.zrY,o=er(this,i,n);if("mouseup"===a&&o||(r=(e=this.findHover(i,n)).target),"mousedown"===a)this._downEl=r,this._downPoint=[t.zrX,t.zrY],this._upEl=r;else if("mouseup"===a)this._upEl=r;else if("click"===a){if(this._downEl!==this._upEl||!this._downPoint||4<Dt(this._downPoint,[t.zrX,t.zrY]))return;this._downPoint=null}this.dispatchToElement(e,a,t)}});var rr=32,ir=7;function nr(t,e,r,i){var n=e+1;if(n===r)return 1;if(i(t[n++],t[e])<0){for(;n<r&&i(t[n],t[n-1])<0;)n++;!function(t,e,r){r--;for(;e<r;){var i=t[e];t[e++]=t[r],t[r--]=i}}(t,e,n)}else for(;n<r&&0<=i(t[n],t[n-1]);)n++;return n-e}function or(t,e,r,i,n){for(i===e&&i++;i<r;i++){for(var o,a=t[i],s=e,h=i;s<h;)n(a,t[o=s+h>>>1])<0?h=o:s=1+o;var l=i-s;switch(l){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;0<l;)t[s+l]=t[s+l-1],l--}t[s]=a}}function ar(t,e,r,i,n,o){var a=0,s=0,h=1;if(0<o(t,e[r+n])){for(s=i-n;h<s&&0<o(t,e[r+n+h]);)(h=1+((a=h)<<1))<=0&&(h=s);s<h&&(h=s),a+=n,h+=n}else{for(s=n+1;h<s&&o(t,e[r+n-h])<=0;)(h=1+((a=h)<<1))<=0&&(h=s);s<h&&(h=s);var l=a,a=n-h,h=n-l}for(a++;a<h;){var u=a+(h-a>>>1);0<o(t,e[r+u])?a=u+1:h=u}return h}function sr(t,e,r,i,n,o){var a=0,s=0,h=1;if(o(t,e[r+n])<0){for(s=n+1;h<s&&o(t,e[r+n-h])<0;)(h=1+((a=h)<<1))<=0&&(h=s);s<h&&(h=s);var l=a,a=n-h,h=n-l}else{for(s=i-n;h<s&&0<=o(t,e[r+n+h]);)(h=1+((a=h)<<1))<=0&&(h=s);s<h&&(h=s),a+=n,h+=n}for(a++;a<h;){var u=a+(h-a>>>1);o(t,e[r+u])<0?h=u:a=u+1}return h}function hr(d,y){var a,s,v=ir,h=0,g=[];function e(t){var e=a[t],r=s[t],i=a[t+1],n=s[t+1];s[t]=r+n,t===h-3&&(a[t+1]=a[t+2],s[t+1]=s[t+2]),h--;var o=sr(d[i],d,e,r,0,y);e+=o,0!=(r-=o)&&0!==(n=ar(d[e+r-1],d,i,n,n-1,y))&&(r<=n?function(t,e,r,i){var n=0;for(n=0;n<e;n++)g[n]=d[t+n];var o=0,a=r,s=t;if(d[s++]=d[a++],0==--i){for(n=0;n<e;n++)d[s+n]=g[o+n];return}if(1===e){for(n=0;n<i;n++)d[s+n]=d[a+n];return d[s+i]=g[o]}var h,l,u,c=v;for(;;){l=h=0,u=!1;do{if(y(d[a],g[o])<0){if(d[s++]=d[a++],l++,(h=0)==--i){u=!0;break}}else if(d[s++]=g[o++],h++,l=0,1==--e){u=!0;break}}while((h|l)<c);if(u)break;do{if(0!==(h=sr(d[a],g,o,e,0,y))){for(n=0;n<h;n++)d[s+n]=g[o+n];if(s+=h,o+=h,(e-=h)<=1){u=!0;break}}if(d[s++]=d[a++],0==--i){u=!0;break}if(0!==(l=ar(g[o],d,a,i,0,y))){for(n=0;n<l;n++)d[s+n]=d[a+n];if(s+=l,a+=l,0===(i-=l)){u=!0;break}}if(d[s++]=g[o++],1==--e){u=!0;break}c--}while(ir<=h||ir<=l);if(u)break;c<0&&(c=0),c+=2}if((v=c)<1&&(v=1),1===e){for(n=0;n<i;n++)d[s+n]=d[a+n];d[s+i]=g[o]}else{if(0===e)throw new Error;for(n=0;n<e;n++)d[s+n]=g[o+n]}}:function(t,e,r,i){var n=0;for(n=0;n<i;n++)g[n]=d[r+n];var o=t+e-1,a=i-1,s=r+i-1,h=0,l=0;if(d[s--]=d[o--],0==--e){for(h=s-(i-1),n=0;n<i;n++)d[h+n]=g[n];return}if(1===i){for(l=(s-=e)+1,h=(o-=e)+1,n=e-1;0<=n;n--)d[l+n]=d[h+n];return d[s]=g[a]}var u=v;for(;;){var c=0,p=0,f=!1;do{if(y(g[a],d[o])<0){if(d[s--]=d[o--],c++,(p=0)==--e){f=!0;break}}else if(d[s--]=g[a--],p++,c=0,1==--i){f=!0;break}}while((c|p)<u);if(f)break;do{if(0!==(c=e-sr(g[a],d,t,e,e-1,y))){for(e-=c,l=(s-=c)+1,h=(o-=c)+1,n=c-1;0<=n;n--)d[l+n]=d[h+n];if(0===e){f=!0;break}}if(d[s--]=g[a--],1==--i){f=!0;break}if(0!==(p=i-ar(d[o],g,0,i,i-1,y))){for(i-=p,l=(s-=p)+1,h=(a-=p)+1,n=0;n<p;n++)d[l+n]=g[h+n];if(i<=1){f=!0;break}}if(d[s--]=d[o--],0==--e){f=!0;break}u--}while(ir<=c||ir<=p);if(f)break;u<0&&(u=0),u+=2}(v=u)<1&&(v=1);if(1===i){for(l=(s-=e)+1,h=(o-=e)+1,n=e-1;0<=n;n--)d[l+n]=d[h+n];d[s]=g[a]}else{if(0===i)throw new Error;for(h=s-(i-1),n=0;n<i;n++)d[h+n]=g[n]}})(e,r,i,n)}return a=[],s=[],{mergeRuns:function(){for(;1<h;){var t=h-2;if(1<=t&&s[t-1]<=s[t]+s[t+1]||2<=t&&s[t-2]<=s[t]+s[t-1])s[t-1]<s[t+1]&&t--;else if(s[t]>s[t+1])break;e(t)}},forceMergeRuns:function(){for(;1<h;){var t=h-2;0<t&&s[t-1]<s[t+1]&&t--,e(t)}},pushRun:function(t,e){a[h]=t,s[h]=e,h+=1}}}function lr(t,e,r,i){r=r||0;var n=(i=i||t.length)-r;if(!(n<2)){var o=0;if(n<rr)or(t,r,i,r+(o=nr(t,r,i,e)),e);else{var a,s=hr(t,e),h=function(t){for(var e=0;rr<=t;)e|=1&t,t>>=1;return t+e}(n);do{(o=nr(t,r,i,e))<h&&(h<(a=n)&&(a=h),or(t,r,r+a,r+o,e),o=a),s.pushRun(r,o),s.mergeRuns(),n-=o,r+=o}while(0!==n);s.forceMergeRuns()}}}var ur=1,cr=4,pr=!1;function fr(){pr||(pr=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function dr(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var yr=(vr.prototype.traverse=function(t,e){for(var r=0;r<this._roots.length;r++)this._roots[r].traverse(t,e)},vr.prototype.getDisplayList=function(t,e){e=e||!1;var r=this._displayList;return!t&&r.length||this.updateDisplayList(e),r},vr.prototype.updateDisplayList=function(t){this._displayListLen=0;for(var e=this._roots,r=this._displayList,i=0,n=e.length;i<n;i++)this._updateAndAddDisplayable(e[i],null,t);r.length=this._displayListLen,lr(r,dr)},vr.prototype._updateAndAddDisplayable=function(t,e,r){if(!t.ignore||r){t.beforeUpdate(),t.update(),t.afterUpdate();var i=t.getClipPath(),n=e&&e.length,o=0,a=t.__clipPaths;if(!t.ignoreClip&&(n||i)){if(a=a||(t.__clipPaths=[]),n)for(var s=0;s<e.length;s++)a[o++]=e[s];for(var h=i,l=t;h;)h.parent=l,h.updateTransform(),h=(l=a[o++]=h).getClipPath()}if(a&&(a.length=o),t.childrenRef){for(var u=t.childrenRef(),c=0;c<u.length;c++){var p=u[c];t.__dirty&&(p.__dirty|=ur),this._updateAndAddDisplayable(p,a,r)}t.__dirty=0}else{var f=t;isNaN(f.z)&&(fr(),f.z=0),isNaN(f.z2)&&(fr(),f.z2=0),isNaN(f.zlevel)&&(fr(),f.zlevel=0),this._displayList[this._displayListLen++]=f}var d=t.getDecalElement&&t.getDecalElement();d&&this._updateAndAddDisplayable(d,a,r);var y=t.getTextGuideLine();y&&this._updateAndAddDisplayable(y,a,r);var v=t.getTextContent();v&&this._updateAndAddDisplayable(v,a,r)}},vr.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},vr.prototype.delRoot=function(t){if(t instanceof Array)for(var e=0,r=t.length;e<r;e++)this.delRoot(t[e]);else{var i=A(this._roots,t);0<=i&&this._roots.splice(i,1)}},vr.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},vr.prototype.getRoots=function(){return this._roots},vr.prototype.dispose=function(){this._displayList=null,this._roots=null},vr);function vr(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=dr}var gr=c.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)},_r={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,r=.1;return 0===t?0:1===t?1:(e=!r||r<1?(r=1,.1):.4*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*--t)*Math.sin((t-e)*(2*Math.PI)/.4)))},elasticOut:function(t){var e,r=.1;return 0===t?0:1===t?1:(e=!r||r<1?(r=1,.1):.4*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,r=.1;return 0===t?0:1===t?1:(e=!r||r<1?(r=1,.1):.4*Math.asin(1/r)/(2*Math.PI),(t*=2)<1?r*Math.pow(2,10*--t)*Math.sin((t-e)*(2*Math.PI)/.4)*-.5:r*Math.pow(2,-10*--t)*Math.sin((t-e)*(2*Math.PI)/.4)*.5+1)},backIn:function(t){return t*t*(2.70158*t-1.70158)},backOut:function(t){return--t*t*(2.70158*t+1.70158)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((1+e)*t-e)*.5:.5*((t-=2)*t*((1+e)*t+e)+2)},bounceIn:function(t){return 1-_r.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*_r.bounceIn(2*t):.5*_r.bounceOut(2*t-1)+.5}},mr=Math.pow,xr=Math.sqrt,wr=1e-8,br=1e-4,Sr=xr(3),Tr=1/3,kr=xt(),Cr=xt(),Pr=xt();function Mr(t){return-wr<t&&t<wr}function Ar(t){return wr<t||t<-wr}function Dr(t,e,r,i,n){var o=1-n;return o*o*(o*t+3*n*e)+n*n*(n*i+3*o*r)}function zr(t,e,r,i,n){var o=1-n;return 3*(((e-t)*o+2*(r-e)*n)*o+(i-r)*n*n)}function Ir(t,e,r,i,n,o){var a,s,h,l,u,c,p,f,d,y,v,g,_=i+3*(e-r)-t,m=3*(r-2*e+t),x=3*(e-t),w=t-n,b=m*m-3*_*x,S=m*x-9*_*w,T=x*x-3*m*w,k=0;return Mr(b)&&Mr(S)?Mr(m)?o[0]=0:0<=(y=-x/m)&&y<=1&&(o[k++]=y):Mr(a=S*S-4*b*T)?(v=-(s=S/b)/2,0<=(y=-m/_+s)&&y<=1&&(o[k++]=y),0<=v&&v<=1&&(o[k++]=v)):0<a?(u=b*m+1.5*_*(-S-(h=xr(a))),0<=(y=(-m-((l=(l=b*m+1.5*_*(-S+h))<0?-mr(-l,Tr):mr(l,Tr))+(u=u<0?-mr(-u,Tr):mr(u,Tr))))/(3*_))&&y<=1&&(o[k++]=y)):(c=(2*b*m-3*_*S)/(2*xr(b*b*b)),p=Math.acos(c)/3,y=(-m-2*(f=xr(b))*(d=Math.cos(p)))/(3*_),v=(-m+f*(d+Sr*Math.sin(p)))/(3*_),g=(-m+f*(d-Sr*Math.sin(p)))/(3*_),0<=y&&y<=1&&(o[k++]=y),0<=v&&v<=1&&(o[k++]=v),0<=g&&g<=1&&(o[k++]=g)),k}function Lr(t,e,r,i,n){var o,a,s,h,l=6*r-12*e+6*t,u=9*e+3*i-3*t-9*r,c=3*e-3*t,p=0;return Mr(u)?Ar(l)&&0<=(s=-c/l)&&s<=1&&(n[p++]=s):Mr(o=l*l-4*u*c)?n[0]=-l/(2*u):0<o&&(h=(-l-(a=xr(o)))/(2*u),0<=(s=(-l+a)/(2*u))&&s<=1&&(n[p++]=s),0<=h&&h<=1&&(n[p++]=h)),p}function Rr(t,e,r,i,n,o){var a=(e-t)*n+t,s=(r-e)*n+e,h=(i-r)*n+r,l=(s-a)*n+a,u=(h-s)*n+s,c=(u-l)*n+l;o[0]=t,o[1]=a,o[2]=l,o[3]=c,o[4]=c,o[5]=u,o[6]=h,o[7]=i}function Or(t,e,r,i){var n=1-i;return n*(n*t+2*i*e)+i*i*r}function Fr(t,e,r,i){return 2*((1-i)*(e-t)+i*(r-e))}function Br(t,e,r){var i=t+r-2*e;return 0==i?.5:(t-e)/i}function Nr(t,e,r,i,n){var o=(e-t)*i+t,a=(r-e)*i+e,s=(a-o)*i+o;n[0]=t,n[1]=o,n[2]=s,n[3]=s,n[4]=a,n[5]=r}var Hr=/cubic-bezier\(([0-9,\.e ]+)\)/;function Wr(t){var e=t&&Hr.exec(t);if(e){var r=e[1].split(","),i=+rt(r[0]),n=+rt(r[1]),o=+rt(r[2]),a=+rt(r[3]);if(isNaN(i+n+o+a))return;var s=[];return function(t){return t<=0?0:1<=t?1:Ir(0,i,o,1,t,s)&&Dr(0,n,a,1,s[0])}}}var Er=(Xr.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),!this._paused){var r=this._life,i=t-this._startTime-this._pausedTime,n=i/r;n<0&&(n=0),n=Math.min(n,1);var o=this.easingFunc,a=o?o(n):n;if(this.onframe(a),1===n){if(!this.loop)return!0;var s=i%r;this._startTime=t-s,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=e},Xr.prototype.pause=function(){this._paused=!0},Xr.prototype.resume=function(){this._paused=!1},Xr.prototype.setEasing=function(t){this.easing=t,this.easingFunc=W(t)?t:_r[t]||Wr(t)},Xr);function Xr(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||dt,this.ondestroy=t.ondestroy||dt,this.onrestart=t.onrestart||dt,t.easing&&this.setEasing(t.easing)}var Yr=function(t){this.value=t},qr=(jr.prototype.insert=function(t){var e=new Yr(t);return this.insertEntry(e),e},jr.prototype.insertEntry=function(t){this.head?((this.tail.next=t).prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},jr.prototype.remove=function(t){var e=t.prev,r=t.next;e?e.next=r:this.head=r,r?r.prev=e:this.tail=e,t.next=t.prev=null,this._len--},jr.prototype.len=function(){return this._len},jr.prototype.clear=function(){this.head=this.tail=null,this._len=0},jr);function jr(){this._len=0}var Vr=(Ur.prototype.put=function(t,e){var r,i,n,o=this._list,a=this._map,s=null;return null==a[t]&&(r=o.len(),i=this._lastRemovedEntry,r>=this._maxSize&&0<r&&(n=o.head,o.remove(n),delete a[n.key],s=n.value,this._lastRemovedEntry=n),i?i.value=e:i=new Yr(e),i.key=t,o.insertEntry(i),a[t]=i),s},Ur.prototype.get=function(t){var e=this._map[t],r=this._list;if(null!=e)return e!==r.tail&&(r.remove(e),r.insertEntry(e)),e.value},Ur.prototype.clear=function(){this._list.clear(),this._map={}},Ur.prototype.len=function(){return this._list.len()},Ur);function Ur(t){this._list=new qr,this._maxSize=10,this._map={},this._maxSize=t}var Gr={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 Zr(t){return(t=Math.round(t))<0?0:255<t?255:t}function Kr(t){return t<0?0:1<t?1:t}function Qr(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?Zr(parseFloat(e)/100*255):Zr(parseInt(e,10))}function $r(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?Kr(parseFloat(e)/100):Kr(parseFloat(e))}function Jr(t,e,r){return r<0?r+=1:1<r&&--r,6*r<1?t+(e-t)*r*6:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}function ti(t,e,r){return t+(e-t)*r}function ei(t,e,r,i,n){return t[0]=e,t[1]=r,t[2]=i,t[3]=n,t}function ri(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var ii=new Vr(20),ni=null;function oi(t,e){ni&&ri(ni,e),ni=ii.put(t,ni||e.slice())}function ai(t,e){if(t){e=e||[];var r=ii.get(t);if(r)return ri(e,r);var i=(t+="").replace(/ /g,"").toLowerCase();if(i in Gr)return ri(e,Gr[i]),oi(t,e),e;var n,o=i.length;if("#"===i.charAt(0))return 4===o||5===o?0<=(n=parseInt(i.slice(1,4),16))&&n<=4095?(ei(e,(3840&n)>>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,5===o?parseInt(i.slice(4),16)/15:1),oi(t,e),e):void ei(e,0,0,0,1):7===o||9===o?0<=(n=parseInt(i.slice(1,7),16))&&n<=16777215?(ei(e,(16711680&n)>>16,(65280&n)>>8,255&n,9===o?parseInt(i.slice(7),16)/255:1),oi(t,e),e):void ei(e,0,0,0,1):void 0;var a=i.indexOf("("),s=i.indexOf(")");if(-1!==a&&s+1===o){var h=i.substr(0,a),l=i.substr(a+1,s-(a+1)).split(","),u=1;switch(h){case"rgba":if(4!==l.length)return 3===l.length?ei(e,+l[0],+l[1],+l[2],1):ei(e,0,0,0,1);u=$r(l.pop());case"rgb":return 3<=l.length?(ei(e,Qr(l[0]),Qr(l[1]),Qr(l[2]),3===l.length?u:$r(l[3])),oi(t,e),e):void ei(e,0,0,0,1);case"hsla":return 4!==l.length?void ei(e,0,0,0,1):(l[3]=$r(l[3]),si(l,e),oi(t,e),e);case"hsl":return 3!==l.length?void ei(e,0,0,0,1):(si(l,e),oi(t,e),e);default:return}}ei(e,0,0,0,1)}}function si(t,e){var r=(parseFloat(t[0])%360+360)%360/360,i=$r(t[1]),n=$r(t[2]),o=n<=.5?n*(i+1):n+i-n*i,a=2*n-o;return ei(e=e||[],Zr(255*Jr(a,o,r+1/3)),Zr(255*Jr(a,o,r)),Zr(255*Jr(a,o,r-1/3)),1),4===t.length&&(e[3]=t[3]),e}function hi(t,e){var r=ai(t);if(r){for(var i=0;i<3;i++)r[i]=e<0?r[i]*(1-e)|0:(255-r[i])*e+r[i]|0,255<r[i]?r[i]=255:r[i]<0&&(r[i]=0);return fi(r,4===r.length?"rgba":"rgb")}}function li(t,e,r){if(e&&e.length&&0<=t&&t<=1){r=r||[];var i=t*(e.length-1),n=Math.floor(i),o=Math.ceil(i),a=e[n],s=e[o],h=i-n;return r[0]=Zr(ti(a[0],s[0],h)),r[1]=Zr(ti(a[1],s[1],h)),r[2]=Zr(ti(a[2],s[2],h)),r[3]=Kr(ti(a[3],s[3],h)),r}}var ui=li;function ci(t,e,r){if(e&&e.length&&0<=t&&t<=1){var i=t*(e.length-1),n=Math.floor(i),o=Math.ceil(i),a=ai(e[n]),s=ai(e[o]),h=i-n,l=fi([Zr(ti(a[0],s[0],h)),Zr(ti(a[1],s[1],h)),Zr(ti(a[2],s[2],h)),Kr(ti(a[3],s[3],h))],"rgba");return r?{color:l,leftIndex:n,rightIndex:o,value:i}:l}}var pi=ci;function fi(t,e){if(t&&t.length){var r=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(r+=","+t[3]),e+"("+r+")"}}function di(t,e){var r=ai(t);return r?(.299*r[0]+.587*r[1]+.114*r[2])*r[3]/255+(1-r[3])*e:0}var yi=new Vr(100);function vi(t){if(E(t)){var e=yi.get(t);return e||(e=hi(t,-.1),yi.put(t,e)),e}if(U(t)){var r=L({},t);return r.colorStops=I(t.colorStops,function(t){return{offset:t.offset,color:hi(t.color,-.1)}}),r}return t}var gi=Object.freeze({__proto__:null,parseCssInt:Qr,parseCssFloat:$r,parse:ai,lift:hi,toHex:function(t){var e=ai(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)},fastLerp:li,fastMapToColor:ui,lerp:ci,mapToColor:pi,modifyHSL:function(t,e,r,i){var n,o=ai(t);if(t)return o=function(t){if(t){var e,r,i,n,o,a=t[0]/255,s=t[1]/255,h=t[2]/255,l=Math.min(a,s,h),u=Math.max(a,s,h),c=u-l,p=(u+l)/2;0==c?r=e=0:(r=p<.5?c/(u+l):c/(2-u-l),i=((u-a)/6+c/2)/c,n=((u-s)/6+c/2)/c,o=((u-h)/6+c/2)/c,a===u?e=o-n:s===u?e=1/3+i-o:h===u&&(e=2/3+n-i),e<0&&(e+=1),1<e&&--e);var f=[360*e,r,p];return null!=t[3]&&f.push(t[3]),f}}(o),null!=e&&(o[0]=(n=W(e)?e(o[0]):e,(n=Math.round(n))<0?0:360<n?360:n)),null!=r&&(o[1]=$r(W(r)?r(o[1]):r)),null!=i&&(o[2]=$r(W(i)?i(o[2]):i)),fi(si(o),"rgba")},modifyAlph