@zeainc/zea-collab
Version:
The Zea Collab library provides Client and Server side tools for connecting and synchronizing users.
1 lines • 78.7 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@zeainc/zea-engine"),require("socket.io-client"),require("@zeainc/zea-ux")):"function"==typeof define&&define.amd?define(["exports","@zeainc/zea-engine","socket.io-client","@zeainc/zea-ux"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).zeaCollab={},e.zeaEngine,e.io,e.zeaUx)}(this,(function(e,t,r,n){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function i(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var s=i(t),a=o(r),u={name:"@zeainc/zea-collab",version:"6.3.4",description:"The Zea Collab library provides Client and Server side tools for connecting and synchronizing users.",main:"dist/index.cjs.js",module:"dist/index.esm.js",browser:"dist/index.umd.js",files:["dist/"],keywords:["Zea"],scripts:{build:"rollup -c","build:watch":"rollup -w -c",dev:"npm-run-all --parallel build:watch start:watch",dist:"yarn publish --access=public",docs:"cp CHANGELOG.md docs/ && adg --config adg.config.json","docs-w":"cp CHANGELOG.md docs/ && adg -w --config=adg.config.json","docs:serve":"docsify serve docs/",prepare:"yarn run build",release:"standard-version",start:"es-dev-server --cors","start:watch":"es-dev-server --cors --app-index testing-e2e/index.html --open --watch","to-cleanup":"rm -Rf dist/ node_modules/ yarn.lock"},repository:{type:"git",url:"git+ssh://git@github.com/ZeaInc/zea-collab.git"},bugs:{url:"https://github.com/ZeaInc/zea-collab/issues"},homepage:"https://github.com/ZeaInc/zea-collab#readme",author:"Zea Inc.",license:"MIT",dependencies:{debug:"^4.1.1","socket.io-client":"^2.3.0","socketio-wildcard":"^2.0.0"},devDependencies:{"@rollup/plugin-commonjs":"^15.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^9.0.0","@zeainc/jsdocs2md":"^0.0.8","@zeainc/zea-engine":"^4.13.0","@zeainc/zea-ux":"4.6.0",bufferutil:"^4.0.1","builtin-modules":"^3.1.0",crypto:"^1.0.1","docsify-cli":"^4.4.1","es-dev-server":"^1.57.4",eslint:"^7.9.0","eslint-config-airbnb-base":"^14.1.0","eslint-plugin-import":"^2.20.2","npm-run-all":"^4.1.5",path:"^0.12.7",prettier:"2.1.2",rollup:"^2.27.0","rollup-plugin-node-polyfills":"^0.2.1","rollup-plugin-terser":"^7.0.2","standard-version":"^9.0.0",stream:"^0.0.2",tls:"^0.0.1","utf-8-validate":"^5.0.2"}};function l(){}function c(){c.init.call(this)}function h(e){return void 0===e._maxListeners?c.defaultMaxListeners:e._maxListeners}function f(e,t,r){if(t)e.call(r);else for(var n=e.length,o=b(e,n),i=0;i<n;++i)o[i].call(r)}function d(e,t,r,n){if(t)e.call(r,n);else for(var o=e.length,i=b(e,o),s=0;s<o;++s)i[s].call(r,n)}function m(e,t,r,n,o){if(t)e.call(r,n,o);else for(var i=e.length,s=b(e,i),a=0;a<i;++a)s[a].call(r,n,o)}function p(e,t,r,n,o,i){if(t)e.call(r,n,o,i);else for(var s=e.length,a=b(e,s),u=0;u<s;++u)a[u].call(r,n,o,i)}function g(e,t,r,n){if(t)e.apply(r,n);else for(var o=e.length,i=b(e,o),s=0;s<o;++s)i[s].apply(r,n)}function v(e,t,r,n){var o,i,s,a;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((i=e._events)?(i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),s=i[t]):(i=e._events=new l,e._eventsCount=0),s){if("function"==typeof s?s=i[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),!s.warned&&(o=h(e))&&o>0&&s.length>o){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,a=u,"function"==typeof console.warn?console.warn(a):console.log(a)}}else s=i[t]=r,++e._eventsCount;return e}function w(e,t,r){var n=!1;function o(){e.removeListener(t,o),n||(n=!0,r.apply(e,arguments))}return o.listener=r,o}function y(e){var t=this._events;if(t){var r=t[e];if("function"==typeof r)return 1;if(r)return r.length}return 0}function b(e,t){for(var r=new Array(t);t--;)r[t]=e[t];return r}function C(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},r.exports),r.exports}function I(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})})),t}l.prototype=Object.create(null),c.EventEmitter=c,c.usingDomains=!1,c.prototype.domain=void 0,c.prototype._events=void 0,c.prototype._maxListeners=void 0,c.defaultMaxListeners=10,c.init=function(){this.domain=null,c.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new l,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},c.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},c.prototype.getMaxListeners=function(){return h(this)},c.prototype.emit=function(e){var t,r,n,o,i,s,a,u="error"===e;if(s=this._events)u=u&&null==s.error;else if(!u)return!1;if(a=this.domain,u){if(t=arguments[1],!a){if(t instanceof Error)throw t;var l=new Error('Uncaught, unspecified "error" event. ('+t+")");throw l.context=t,l}return t||(t=new Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=a,t.domainThrown=!1,a.emit("error",t),!1}if(!(r=s[e]))return!1;var c="function"==typeof r;switch(n=arguments.length){case 1:f(r,c,this);break;case 2:d(r,c,this,arguments[1]);break;case 3:m(r,c,this,arguments[1],arguments[2]);break;case 4:p(r,c,this,arguments[1],arguments[2],arguments[3]);break;default:for(o=new Array(n-1),i=1;i<n;i++)o[i-1]=arguments[i];g(r,c,this,o)}return!0},c.prototype.addListener=function(e,t){return v(this,e,t,!1)},c.prototype.on=c.prototype.addListener,c.prototype.prependListener=function(e,t){return v(this,e,t,!0)},c.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,w(this,e,t)),this},c.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,w(this,e,t)),this},c.prototype.removeListener=function(e,t){var r,n,o,i,s;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(n=this._events))return this;if(!(r=n[e]))return this;if(r===t||r.listener&&r.listener===t)0==--this._eventsCount?this._events=new l:(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(o=-1,i=r.length;i-- >0;)if(r[i]===t||r[i].listener&&r[i].listener===t){s=r[i].listener,o=i;break}if(o<0)return this;if(1===r.length){if(r[0]=void 0,0==--this._eventsCount)return this._events=new l,this;delete n[e]}else!function(e,t){for(var r=t,n=r+1,o=e.length;n<o;r+=1,n+=1)e[r]=e[n];e.pop()}(r,o);n.removeListener&&this.emit("removeListener",e,s||t)}return this},c.prototype.removeAllListeners=function(e){var t,r;if(!(r=this._events))return this;if(!r.removeListener)return 0===arguments.length?(this._events=new l,this._eventsCount=0):r[e]&&(0==--this._eventsCount?this._events=new l:delete r[e]),this;if(0===arguments.length){for(var n,o=Object.keys(r),i=0;i<o.length;++i)"removeListener"!==(n=o[i])&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=new l,this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(t)do{this.removeListener(e,t[t.length-1])}while(t[0]);return this},c.prototype.listeners=function(e){var t,r=this._events;return r&&(t=r[e])?"function"==typeof t?[t.listener||t]:function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(t):[]},c.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):y.call(e,t)},c.prototype.listenerCount=y,c.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var P=I(Object.freeze({__proto__:null,default:c,EventEmitter:c})).EventEmitter,E="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function _(){throw new Error("setTimeout has not been defined")}function R(){throw new Error("clearTimeout has not been defined")}var A=_,O=R;function S(e){if(A===setTimeout)return setTimeout(e,0);if((A===_||!A)&&setTimeout)return A=setTimeout,setTimeout(e,0);try{return A(e,0)}catch(t){try{return A.call(null,e,0)}catch(t){return A.call(this,e,0)}}}"function"==typeof E.setTimeout&&(A=setTimeout),"function"==typeof E.clearTimeout&&(O=clearTimeout);var D,T=[],M=!1,U=-1;function N(){M&&D&&(M=!1,D.length?T=D.concat(T):U=-1,T.length&&F())}function F(){if(!M){var e=S(N);M=!0;for(var t=T.length;t;){for(D=T,T=[];++U<t;)D&&D[U].run();U=-1,t=T.length}D=null,M=!1,function(e){if(O===clearTimeout)return clearTimeout(e);if((O===R||!O)&&clearTimeout)return O=clearTimeout,clearTimeout(e);try{O(e)}catch(t){try{return O.call(null,e)}catch(t){return O.call(this,e)}}}(e)}}function x(e,t){this.fun=e,this.array=t}x.prototype.run=function(){this.fun.apply(null,this.array)};function L(){}var V=L,k=L,B=L,G=L,X=L,j=L,z=L;var Y=E.performance||{},J=Y.now||Y.mozNow||Y.msNow||Y.oNow||Y.webkitNow||function(){return(new Date).getTime()};var $=new Date;var H={nextTick:function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];T.push(new x(e,t)),1!==T.length||M||S(F)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:V,addListener:k,once:B,off:G,removeListener:X,removeAllListeners:j,emit:z,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*J.call(Y),r=Math.floor(t),n=Math.floor(t%1*1e9);return e&&(r-=e[0],(n-=e[1])<0&&(r--,n+=1e9)),[r,n]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-$)/1e3}},Z=H,W=1e3,q=60*W,Q=60*q,K=24*Q,ee=7*K,te=365.25*K,re=function(e,t){t=t||{};var r=typeof e;if("string"===r&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*te;case"weeks":case"week":case"w":return r*ee;case"days":case"day":case"d":return r*K;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Q;case"minutes":case"minute":case"mins":case"min":case"m":return r*q;case"seconds":case"second":case"secs":case"sec":case"s":return r*W;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}(e);if("number"===r&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=K)return ne(e,t,K,"day");if(t>=Q)return ne(e,t,Q,"hour");if(t>=q)return ne(e,t,q,"minute");if(t>=W)return ne(e,t,W,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=K)return Math.round(e/K)+"d";if(t>=Q)return Math.round(e/Q)+"h";if(t>=q)return Math.round(e/q)+"m";if(t>=W)return Math.round(e/W)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function ne(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}var oe=function(e){function t(e){let n,o,i,s=null;function a(...e){if(!a.enabled)return;const r=a,o=Number(new Date),i=o-(n||o);r.diff=i,r.prev=n,r.curr=o,n=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,o)=>{if("%%"===n)return"%";s++;const i=t.formatters[o];if("function"==typeof i){const t=e[s];n=i.call(r,t),e.splice(s,1),s--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=r,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{s=e}}),"function"==typeof t.init&&t.init(a),a}function r(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function n(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(n),...t.skips.map(n).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(r=0;r<o;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=re,t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t},ie=C((function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&void 0!==Z&&"env"in Z&&(e=Z.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=oe(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}));function se(){return!1}function ae(){throw new Error("tty.ReadStream is not implemented")}function ue(){throw new Error("tty.ReadStream is not implemented")}var le={isatty:se,ReadStream:ae,WriteStream:ue},ce=Object.freeze({__proto__:null,isatty:se,ReadStream:ae,WriteStream:ue,default:le}),he=[],fe=[],de="undefined"!=typeof Uint8Array?Uint8Array:Array,me=!1;function pe(){me=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,r=e.length;t<r;++t)he[t]=e[t],fe[e.charCodeAt(t)]=t;fe["-".charCodeAt(0)]=62,fe["_".charCodeAt(0)]=63}function ge(e,t,r){for(var n,o,i=[],s=t;s<r;s+=3)n=(e[s]<<16)+(e[s+1]<<8)+e[s+2],i.push(he[(o=n)>>18&63]+he[o>>12&63]+he[o>>6&63]+he[63&o]);return i.join("")}function ve(e){var t;me||pe();for(var r=e.length,n=r%3,o="",i=[],s=16383,a=0,u=r-n;a<u;a+=s)i.push(ge(e,a,a+s>u?u:a+s));return 1===n?(t=e[r-1],o+=he[t>>2],o+=he[t<<4&63],o+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],o+=he[t>>10],o+=he[t>>4&63],o+=he[t<<2&63],o+="="),i.push(o),i.join("")}function we(e,t,r,n,o){var i,s,a=8*o-n-1,u=(1<<a)-1,l=u>>1,c=-7,h=r?o-1:0,f=r?-1:1,d=e[t+h];for(h+=f,i=d&(1<<-c)-1,d>>=-c,c+=a;c>0;i=256*i+e[t+h],h+=f,c-=8);for(s=i&(1<<-c)-1,i>>=-c,c+=n;c>0;s=256*s+e[t+h],h+=f,c-=8);if(0===i)i=1-l;else{if(i===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),i-=l}return(d?-1:1)*s*Math.pow(2,i-n)}function ye(e,t,r,n,o,i){var s,a,u,l=8*i-o-1,c=(1<<l)-1,h=c>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:i-1,m=n?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+h>=1?f/u:f*Math.pow(2,1-h))*u>=2&&(s++,u/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(t*u-1)*Math.pow(2,o),s+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,o),s=0));o>=8;e[r+d]=255&a,d+=m,a/=256,o-=8);for(s=s<<o|a,l+=o;l>0;e[r+d]=255&s,d+=m,s/=256,l-=8);e[r+d-m]|=128*p}var be={}.toString,Ce=Array.isArray||function(e){return"[object Array]"==be.call(e)};function Ie(){return Ee.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Pe(e,t){if(Ie()<t)throw new RangeError("Invalid typed array length");return Ee.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=Ee.prototype:(null===e&&(e=new Ee(t)),e.length=t),e}function Ee(e,t,r){if(!(Ee.TYPED_ARRAY_SUPPORT||this instanceof Ee))return new Ee(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return Ae(this,e)}return _e(this,e,t,r)}function _e(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n);Ee.TYPED_ARRAY_SUPPORT?(e=t).__proto__=Ee.prototype:e=Oe(e,t);return e}(e,t,r,n):"string"==typeof t?function(e,t,r){"string"==typeof r&&""!==r||(r="utf8");if(!Ee.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|Te(t,r),o=(e=Pe(e,n)).write(t,r);o!==n&&(e=e.slice(0,o));return e}(e,t,r):function(e,t){if(De(t)){var r=0|Se(t.length);return 0===(e=Pe(e,r)).length||t.copy(e,0,0,r),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(n=t.length)!=n?Pe(e,0):Oe(e,t);if("Buffer"===t.type&&Ce(t.data))return Oe(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function Re(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function Ae(e,t){if(Re(t),e=Pe(e,t<0?0:0|Se(t)),!Ee.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function Oe(e,t){var r=t.length<0?0:0|Se(t.length);e=Pe(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function Se(e){if(e>=Ie())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ie().toString(16)+" bytes");return 0|e}function De(e){return!(null==e||!e._isBuffer)}function Te(e,t){if(De(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return ot(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return it(e).length;default:if(n)return ot(e).length;t=(""+t).toLowerCase(),n=!0}}function Me(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return $e(this,t,r);case"utf8":case"utf-8":return je(this,t,r);case"ascii":return Ye(this,t,r);case"latin1":case"binary":return Je(this,t,r);case"base64":return Xe(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return He(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function Ue(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function Ne(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=Ee.from(t,n)),De(t))return 0===t.length?-1:Fe(e,t,r,n,o);if("number"==typeof t)return t&=255,Ee.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):Fe(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function Fe(e,t,r,n,o){var i,s=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,r/=2}function l(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){var c=-1;for(i=r;i<a;i++)if(l(e,i)===l(t,-1===c?0:i-c)){if(-1===c&&(c=i),i-c+1===u)return c*s}else-1!==c&&(i-=i-c),c=-1}else for(r+u>a&&(r=a-u),i=r;i>=0;i--){for(var h=!0,f=0;f<u;f++)if(l(e,i+f)!==l(t,f)){h=!1;break}if(h)return i}return-1}function xe(e,t,r,n){r=Number(r)||0;var o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var s=0;s<n;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[r+s]=a}return s}function Le(e,t,r,n){return st(ot(t,e.length-r),e,r,n)}function Ve(e,t,r,n){return st(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function ke(e,t,r,n){return Ve(e,t,r,n)}function Be(e,t,r,n){return st(it(t),e,r,n)}function Ge(e,t,r,n){return st(function(e,t){for(var r,n,o,i=[],s=0;s<e.length&&!((t-=2)<0);++s)n=(r=e.charCodeAt(s))>>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function Xe(e,t,r){return 0===t&&r===e.length?ve(e):ve(e.slice(t,r))}function je(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o<r;){var i,s,a,u,l=e[o],c=null,h=l>239?4:l>223?3:l>191?2:1;if(o+h<=r)switch(h){case 1:l<128&&(c=l);break;case 2:128==(192&(i=e[o+1]))&&(u=(31&l)<<6|63&i)>127&&(c=u);break;case 3:i=e[o+1],s=e[o+2],128==(192&i)&&128==(192&s)&&(u=(15&l)<<12|(63&i)<<6|63&s)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:i=e[o+1],s=e[o+2],a=e[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(u=(15&l)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(c=u)}null===c?(c=65533,h=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),o+=h}return function(e){var t=e.length;if(t<=ze)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=ze));return r}(n)}Ee.TYPED_ARRAY_SUPPORT=void 0===E.TYPED_ARRAY_SUPPORT||E.TYPED_ARRAY_SUPPORT,Ee.poolSize=8192,Ee._augment=function(e){return e.__proto__=Ee.prototype,e},Ee.from=function(e,t,r){return _e(null,e,t,r)},Ee.TYPED_ARRAY_SUPPORT&&(Ee.prototype.__proto__=Uint8Array.prototype,Ee.__proto__=Uint8Array),Ee.alloc=function(e,t,r){return function(e,t,r,n){return Re(t),t<=0?Pe(e,t):void 0!==r?"string"==typeof n?Pe(e,t).fill(r,n):Pe(e,t).fill(r):Pe(e,t)}(null,e,t,r)},Ee.allocUnsafe=function(e){return Ae(null,e)},Ee.allocUnsafeSlow=function(e){return Ae(null,e)},Ee.isBuffer=function(e){return null!=e&&(!!e._isBuffer||at(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&at(e.slice(0,0))}(e))},Ee.compare=function(e,t){if(!De(e)||!De(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},Ee.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Ee.concat=function(e,t){if(!Ce(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return Ee.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=Ee.allocUnsafe(t),o=0;for(r=0;r<e.length;++r){var i=e[r];if(!De(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,o),o+=i.length}return n},Ee.byteLength=Te,Ee.prototype._isBuffer=!0,Ee.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)Ue(this,t,t+1);return this},Ee.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)Ue(this,t,t+3),Ue(this,t+1,t+2);return this},Ee.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)Ue(this,t,t+7),Ue(this,t+1,t+6),Ue(this,t+2,t+5),Ue(this,t+3,t+4);return this},Ee.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?je(this,0,e):Me.apply(this,arguments)},Ee.prototype.equals=function(e){if(!De(e))throw new TypeError("Argument must be a Buffer");return this===e||0===Ee.compare(this,e)},Ee.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),"<Buffer "+e+">"},Ee.prototype.compare=function(e,t,r,n,o){if(!De(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),a=Math.min(i,s),u=this.slice(n,o),l=e.slice(t,r),c=0;c<a;++c)if(u[c]!==l[c]){i=u[c],s=l[c];break}return i<s?-1:s<i?1:0},Ee.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},Ee.prototype.indexOf=function(e,t,r){return Ne(this,e,t,r,!0)},Ee.prototype.lastIndexOf=function(e,t,r){return Ne(this,e,t,r,!1)},Ee.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return xe(this,e,t,r);case"utf8":case"utf-8":return Le(this,e,t,r);case"ascii":return Ve(this,e,t,r);case"latin1":case"binary":return ke(this,e,t,r);case"base64":return Be(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ge(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},Ee.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ze=4096;function Ye(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function Je(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function $e(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=t;i<r;++i)o+=nt(e[i]);return o}function He(e,t,r){for(var n=e.slice(t,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function Ze(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function We(e,t,r,n,o,i){if(!De(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function qe(e,t,r,n){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-r,2);o<i;++o)e[r+o]=(t&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function Qe(e,t,r,n){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-r,4);o<i;++o)e[r+o]=t>>>8*(n?o:3-o)&255}function Ke(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function et(e,t,r,n,o){return o||Ke(e,0,r,4),ye(e,t,r,n,23,4),r+4}function tt(e,t,r,n,o){return o||Ke(e,0,r,8),ye(e,t,r,n,52,8),r+8}Ee.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),Ee.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=Ee.prototype;else{var o=t-e;r=new Ee(o,void 0);for(var i=0;i<o;++i)r[i]=this[i+e]}return r},Ee.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||Ze(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n},Ee.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||Ze(e,t,this.length);for(var n=this[e+--t],o=1;t>0&&(o*=256);)n+=this[e+--t]*o;return n},Ee.prototype.readUInt8=function(e,t){return t||Ze(e,1,this.length),this[e]},Ee.prototype.readUInt16LE=function(e,t){return t||Ze(e,2,this.length),this[e]|this[e+1]<<8},Ee.prototype.readUInt16BE=function(e,t){return t||Ze(e,2,this.length),this[e]<<8|this[e+1]},Ee.prototype.readUInt32LE=function(e,t){return t||Ze(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Ee.prototype.readUInt32BE=function(e,t){return t||Ze(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Ee.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||Ze(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*t)),n},Ee.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||Ze(e,t,this.length);for(var n=t,o=1,i=this[e+--n];n>0&&(o*=256);)i+=this[e+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},Ee.prototype.readInt8=function(e,t){return t||Ze(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Ee.prototype.readInt16LE=function(e,t){t||Ze(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},Ee.prototype.readInt16BE=function(e,t){t||Ze(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},Ee.prototype.readInt32LE=function(e,t){return t||Ze(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Ee.prototype.readInt32BE=function(e,t){return t||Ze(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Ee.prototype.readFloatLE=function(e,t){return t||Ze(e,4,this.length),we(this,e,!0,23,4)},Ee.prototype.readFloatBE=function(e,t){return t||Ze(e,4,this.length),we(this,e,!1,23,4)},Ee.prototype.readDoubleLE=function(e,t){return t||Ze(e,8,this.length),we(this,e,!0,52,8)},Ee.prototype.readDoubleBE=function(e,t){return t||Ze(e,8,this.length),we(this,e,!1,52,8)},Ee.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||We(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},Ee.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||We(this,e,t,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},Ee.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||We(this,e,t,1,255,0),Ee.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},Ee.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||We(this,e,t,2,65535,0),Ee.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):qe(this,e,t,!0),t+2},Ee.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||We(this,e,t,2,65535,0),Ee.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):qe(this,e,t,!1),t+2},Ee.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||We(this,e,t,4,4294967295,0),Ee.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):Qe(this,e,t,!0),t+4},Ee.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||We(this,e,t,4,4294967295,0),Ee.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Qe(this,e,t,!1),t+4},Ee.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);We(this,e,t,r,o-1,-o)}var i=0,s=1,a=0;for(this[t]=255&e;++i<r&&(s*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+r},Ee.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);We(this,e,t,r,o-1,-o)}var i=r-1,s=1,a=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+r},Ee.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||We(this,e,t,1,127,-128),Ee.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},Ee.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||We(this,e,t,2,32767,-32768),Ee.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):qe(this,e,t,!0),t+2},Ee.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||We(this,e,t,2,32767,-32768),Ee.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):qe(this,e,t,!1),t+2},Ee.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||We(this,e,t,4,2147483647,-2147483648),Ee.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):Qe(this,e,t,!0),t+4},Ee.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||We(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Ee.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Qe(this,e,t,!1),t+4},Ee.prototype.writeFloatLE=function(e,t,r){return et(this,e,t,!0,r)},Ee.prototype.writeFloatBE=function(e,t,r){return et(this,e,t,!1,r)},Ee.prototype.writeDoubleLE=function(e,t,r){return tt(this,e,t,!0,r)},Ee.prototype.writeDoubleBE=function(e,t,r){return tt(this,e,t,!1,r)},Ee.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var o,i=n-r;if(this===e&&r<t&&t<n)for(o=i-1;o>=0;--o)e[o+t]=this[o+r];else if(i<1e3||!Ee.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)e[o+t]=this[o+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+i),t);return i},Ee.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!Ee.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var s=De(e)?e:ot(new Ee(e,n).toString()),a=s.length;for(i=0;i<r-t;++i)this[i+t]=s[i%a]}return this};var rt=/[^+\/0-9A-Za-z-_]/g;function nt(e){return e<16?"0"+e.toString(16):e.toString(16)}function ot(e,t){var r;t=t||1/0;for(var n=e.length,o=null,i=[],s=0;s<n;++s){if((r=e.charCodeAt(s))>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function it(e){return function(e){var t,r,n,o,i,s;me||pe();var a=e.length;if(a%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i="="===e[a-2]?2:"="===e[a-1]?1:0,s=new de(3*a/4-i),n=i>0?a-4:a;var u=0;for(t=0,r=0;t<n;t+=4,r+=3)o=fe[e.charCodeAt(t)]<<18|fe[e.charCodeAt(t+1)]<<12|fe[e.charCodeAt(t+2)]<<6|fe[e.charCodeAt(t+3)],s[u++]=o>>16&255,s[u++]=o>>8&255,s[u++]=255&o;return 2===i?(o=fe[e.charCodeAt(t)]<<2|fe[e.charCodeAt(t+1)]>>4,s[u++]=255&o):1===i&&(o=fe[e.charCodeAt(t)]<<10|fe[e.charCodeAt(t+1)]<<4|fe[e.charCodeAt(t+2)]>>2,s[u++]=o>>8&255,s[u++]=255&o),s}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(rt,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function st(e,t,r,n){for(var o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function at(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var ut="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e},lt=/%[sdj%]/g;function ct(e){if(!Rt(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(pt(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,o=n.length,i=String(e).replace(lt,(function(e){if("%%"===e)return"%";if(r>=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),s=n[r];r<o;s=n[++r])Pt(s)||!Dt(s)?i+=" "+s:i+=" "+pt(s);return i}function ht(e,t){if(Ot(E.process))return function(){return ht(e,t).apply(this,arguments)};if(!0===Z.noDeprecation)return e;var r=!1;return function(){if(!r){if(Z.throwDeprecation)throw new Error(t);Z.traceDeprecation?console.trace(t):console.error(t),r=!0}return e.apply(this,arguments)}}var ft,dt={};function mt(e){if(Ot(ft)&&(ft=Z.env.NODE_DEBUG||""),e=e.toUpperCase(),!dt[e])if(new RegExp("\\b"+e+"\\b","i").test(ft)){dt[e]=function(){var t=ct.apply(null,arguments);console.error("%s %d: %s",e,0,t)}}else dt[e]=function(){};return dt[e]}function pt(e,t){var r={seen:[],stylize:vt};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),It(t)?r.showHidden=t:t&&Gt(r,t),Ot(r.showHidden)&&(r.showHidden=!1),Ot(r.depth)&&(r.depth=2),Ot(r.colors)&&(r.colors=!1),Ot(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=gt),wt(r,e,r.depth)}function gt(e,t){var r=pt.styles[t];return r?"["+pt.colors[r][0]+"m"+e+"["+pt.colors[r][1]+"m":e}function vt(e,t){return e}function wt(e,t,r){if(e.customInspect&&t&&Ut(t.inspect)&&t.inspect!==pt&&(!t.constructor||t.constructor.prototype!==t)){var n=t.inspect(r,e);return Rt(n)||(n=wt(e,n,r)),n}var o=function(e,t){if(Ot(t))return e.stylize("undefined","undefined");if(Rt(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(_t(t))return e.stylize(""+t,"number");if(It(t))return e.stylize(""+t,"boolean");if(Pt(t))return e.stylize("null","null")}(e,t);if(o)return o;var i=Object.keys(t),s=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(i);if(e.showHidden&&(i=Object.getOwnPropertyNames(t)),Mt(t)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return yt(t);if(0===i.length){if(Ut(t)){var a=t.name?": "+t.name:"";return e.stylize("[Function"+a+"]","special")}if(St(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(Tt(t))return e.stylize(Date.prototype.toString.call(t),"date");if(Mt(t))return yt(t)}var u,l="",c=!1,h=["{","}"];(Ct(t)&&(c=!0,h=["[","]"]),Ut(t))&&(l=" [Function"+(t.name?": "+t.name:"")+"]");return St(t)&&(l=" "+RegExp.prototype.toString.call(t)),Tt(t)&&(l=" "+Date.prototype.toUTCString.call(t)),Mt(t)&&(l=" "+yt(t)),0!==i.length||c&&0!=t.length?r<0?St(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),u=c?function(e,t,r,n,o){for(var i=[],s=0,a=t.length;s<a;++s)Xt(t,String(s))?i.push(bt(e,t,r,n,String(s),!0)):i.push("");return o.forEach((function(o){o.match(/^\d+$/)||i.push(bt(e,t,r,n,o,!0))})),i}(e,t,r,s,i):i.map((function(n){return bt(e,t,r,s,n,c)})),e.seen.pop(),function(e,t,r){if(e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(u,l,h)):h[0]+l+h[1]}function yt(e){return"["+Error.prototype.toString.call(e)+"]"}function bt(e,t,r,n,o,i){var s,a,u;if((u=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?a=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(a=e.stylize("[Setter]","special")),Xt(n,o)||(s="["+o+"]"),a||(e.seen.indexOf(u.value)<0?(a=Pt(r)?wt(e,u.value,null):wt(e,u.value,r-1)).indexOf("\n")>-1&&(a=i?a.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+a.split("\n").map((function(e){return" "+e})).join("\n")):a=e.stylize("[Circular]","special")),Ot(s)){if(i&&o.match(/^\d+$/))return a;(s=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function Ct(e){return Array.isArray(e)}function It(e){return"boolean"==typeof e}function Pt(e){return null===e}function Et(e){return null==e}function _t(e){return"number"==typeof e}function Rt(e){return"string"==typeof e}function At(e){return"symbol"==typeof e}function Ot(e){return void 0===e}function St(e){return Dt(e)&&"[object RegExp]"===xt(e)}function Dt(e){return"object"==typeof e&&null!==e}function Tt(e){return Dt(e)&&"[object Date]"===xt(e)}function Mt(e){return Dt(e)&&("[object Error]"===xt(e)||e instanceof Error)}function Ut(e){return"function"==typeof e}function Nt(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function Ft(e){return Ee.isBuffer(e)}function xt(e){return Object.prototype.toString.call(e)}function Lt(e){return e<10?"0"+e.toString(10):e.toString(10)}pt.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},pt.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};var Vt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function kt(){var e=new Date,t=[Lt(e.getHours()),Lt(e.getMinutes()),Lt(e.getSeconds())].join(":");return[e.getDate(),Vt[e.getMonth()],t].join(" ")}function Bt(){console.log("%s - %s",kt(),ct.apply(null,arguments))}function Gt(e,t){if(!t||!Dt(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}function Xt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var jt,zt={inherits:ut,_extend:Gt,log:Bt,isBuffer:Ft,isPrimitive:Nt,isFunction:Ut,isError:Mt,isDate:Tt,isObject:Dt,isRegExp:St,isUndefined:Ot,isSymbol:At,isString:Rt,isNumber:_t,isNullOrUndefined:Et,isNull:Pt,isBoolean:It,isArray:Ct,inspect:pt,deprecate:ht,format:ct,debuglog:mt},Yt=Object.freeze({__proto__:null,format:ct,deprecate:ht,debuglog:mt,inspect:pt,isArray:Ct,isBoolean:It,isNull:Pt,isNullOrUndefined:Et,isNumber:_t,isString:Rt,isSymbol:At,isUndefined:Ot,isRegExp:St,isObject:Dt,isDate:Tt,isError:Mt,isFunction:Ut,isPrimitive:Nt,isBuffer:Ft,log:Bt,inherits:ut,_extend:Gt,default:zt});function Jt(){if(void 0===jt){var e=new ArrayBuffer(2),t=new Uint8Array(e),r=new Uint16Array(e);if(t[0]=1,t[1]=2,258===r[0])jt="BE";else{if(513!==r[0])throw new Error("unable to figure out endianess");jt="LE"}}return jt}function $t(){return void 0!==E.location?E.location.hostname:""}function Ht(){return[]}function Zt(){return 0}function Wt(){return Number.MAX_VALUE}function qt(){return Number.MAX_VALUE}function Qt(){return[]}function Kt(){return"Browser"}function er(){return void 0!==E.navigator?E.navigator.appVersion:""}function tr(){}function rr(){}function nr(){return"/tmp"}var or=nr,ir={EOL:"\n",tmpdir:or,tmpDir:nr,networkInterfaces:tr,getNetworkInterfaces:rr,release:er,type:Kt,cpus:Qt,totalmem:qt,freemem:Wt,uptime:Zt,loadavg:Ht,hostname:$t,endianness:Jt},sr=(e,t=Z.argv)=>{const r=e.startsWith("-")?"":1===e.length?"-":"--",n=t.indexOf(r+e),o=t.indexOf("--");return-1!==n&&(-1===o||n<o)},ar=I(Object.freeze({__proto__:null,endianness:Jt,hostname:$t,loadavg:Ht,uptime:Zt,freemem:Wt,totalmem:qt,cpus:Qt,type:Kt,release:er,networkInterfaces:tr,getNetworkInterfaces:rr,arch:function(){return"javascript"},platform:function(){return"browser"},tmpDir:nr,tmpdir:or,EOL:"\n",default:ir})),ur=I(ce);const{env:lr}=Z;let cr;function hr(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function fr(e,t){if(0===cr)return 0;if(sr("color=16m")||sr("color=full")||sr("color=truecolor"))return 3;if(sr("color=256"))return 2;if(e&&!t&&void 0===cr)return 0;const r=cr||0;if("dumb"===lr.TERM)return r;if("win32"===Z.platform){const e=ar.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in lr)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in lr))||"codeship"===lr.CI_NAME?1:r;if("TEAMCITY_VERSION"in lr)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(lr.TEAMCITY_VERSION)?1:0;if("truecolor"===lr.COLORTERM)return 3;if("TERM_PROGRAM"in lr){const e=parseInt((lr.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(lr.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(lr.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(lr.TERM)||"COLORTERM"in lr?1:r}sr("no-color")||sr("no-colors")||sr("color=false")||sr("color=never")?cr=0:(sr("color")||sr("colors")||sr("color=true")||sr("color=always"))&&(cr=1),"FORCE_COLOR"in lr&&(cr="true"===lr.FORCE_COLOR?1:"false"===lr.FORCE_COLOR?0:0===lr.FORCE_COLOR.length?1:Math.min(parseInt(lr.FORCE_COLOR,10),3));var dr={supportsColor:function(e){return hr(fr(e,e&&e.isTTY))},stdout:hr(fr(!0,ur.isatty(1))),stderr:hr(fr(!0,ur.isatty(2)))},mr=I(Yt),pr=C((function(e,t){t.init=function(e){e.inspectOpts={};const r=Object.keys(t.inspectOpts);for(let n=0;n<r.length;n++)e.inspectOpts[r[n]]=t.inspectOpts[r[n]]},t.log=function(...e){return Z.stderr.write(mr.format(...e)+"\n")},t.formatArgs=function(r){const{namespace:n,useColors:o}=this;if(o){const t=this.color,o="[3"+(t<8?t:"8;5;"+t),i=` ${o};1m${n} [0m`;r[0]=i+r[0].split("\n").join("\n"+i),r.push(o+"m+"+e.exports.humanize(this.diff)+"[0m")}else r[0]=function(){if(t.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+n+" "+r[0]},t.save=function(e){e?Z.env.DEBUG=e:delete Z.env.DEBUG},t.load=function(){return Z.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):ur.isatty(Z.stderr.fd)},t.destroy=mr.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=dr;e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(Z.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const r=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let n=Z.env[t];return n=!!/^(yes|on|true|enabled)$/i.test(n)||!/^(no|off|false|disabled)$/i.test(n)&&("null"===n?null:Number(n)),e[r]=n,e}),{}),e.exports=oe(t);const{formatters:r}=e.exports;r.o=function(e){return this.inspectOpts.colors=this.useColors,mr.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},r.O=function(e){return this.inspectOpts.colors=this.useColors,mr.inspect(e,this.inspectOpts)}})),gr=C((function(e){void 0===Z||"renderer"===Z.type||!0===Z.browser||Z.__nwjs?e.exports=ie:e.exports=pr}));const vr=gr("zea:collab"),wr=()=>{let e=t.MathFunctions.randomInt(0,360);const[r,n,o]=function(e,t,r){let n=t*Math.min(r,1-r),o=(t,o=(t+e/30)%12)=>r-n*Math.max(Math.min(o-3,9-o,1),-1);return[o(0),o(8),o(4)]}(e,.9,.5);return new t.Color(r,n,o)};c