minidev 2.2.0 → 2.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/worker.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see worker.js.LICENSE.txt */
2
- (()=>{var e={40766:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function s(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}Object.defineProperty(t,"__esModule",{value:!0}),t.MultipleJSContextEngine=void 0;var a=r(82987),c=r(69154),u=r(4814),l=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.logger=t,this.contexts=new Map,this.contextId=0},t=[{key:"preloadScript",value:function(e,t,r,n){if(this.logger.info("[Worker] preloadScript code:\n ".concat(e,"\n")),this.contexts.has(n)){var i=(0,c.runInContext)("(".concat(e,")"),this.contexts.get(n).context);this.logger.info("[Worker] fn: ".concat(i,", args: ").concat(t,", binding: ").concat(r)),i.apply(void 0,function(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t).concat([r]))}}},{key:"evaluateScript",value:function(e,t,r){if(this.contexts.has(r))try{return(0,c.runInContext)(e,this.contexts.get(r).context,{filename:t})}catch(e){var n=e.stack,o=n.split("\n\n");if(o.length>0){var i=[o[0].split("\n")[0],o[1]].join("\n");return global.console.error(i)}global.console.error(n)}}},{key:"createJSContext",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=++this.contextId,n={context:(0,c.createContext)(Object.assign({WebSocket:u.w3cwebsocket,__eval:function(e){return(0,c.runInContext)(e,n.context,{filename:"https://river-test/".concat(a.performance.now(),"}.js")})},clearInterval,clearTimeout,eval:function(e){return(0,c.runInContext)(e,n.context,{filename:"https://river-test/".concat(a.performance.now(),"}.js")})},require:void 0,setInterval,setTimeout},t),{name:e}),id:r};return this.contexts.set(r,n),n}},{key:"destroyJSContext",value:function(e){this.contexts.has(e)&&(this.contexts.get(e).context=null,this.contexts.delete(e))}}],t&&i(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();t.MultipleJSContextEngine=l},47706:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,s=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function h(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),a=new P(n||[]);return s(i,"_invoke",{value:R(e,r,a)}),i}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var d="suspendedStart",y="suspendedYield",m="executing",v="completed",g={};function b(){}function w(){}function _(){}var S={};f(S,c,(function(){return this}));var E=Object.getPrototypeOf,C=E&&E(E(I([])));C&&C!==r&&i.call(C,c)&&(S=C);var k=_.prototype=b.prototype=Object.create(S);function O(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function r(o,s,a,c){var u=p(e[o],e,s);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,c)}),(function(e){r("throw",e,a,c)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,c)}))}c(u.arg)}var o;s(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function R(t,r,n){var o=d;return function(i,s){if(o===m)throw Error("Generator is already running");if(o===v){if("throw"===i)throw s;return{value:e,done:!0}}for(n.method=i,n.arg=s;;){var a=n.delegate;if(a){var c=A(a,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var u=p(t,r,n);if("normal"===u.type){if(o=n.done?v:y,u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=v,n.method="throw",n.arg=u.arg)}}}function A(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=p(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var s=i.arg;return s?s.done?(r[t.resultName]=s.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,s=function r(){for(;++o<t.length;)if(i.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return s.next=s}}throw new TypeError(n(t)+" is not iterable")}return w.prototype=_,s(k,"constructor",{value:_,configurable:!0}),s(_,"constructor",{value:w,configurable:!0}),w.displayName=f(_,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,f(e,l,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},O(x.prototype),f(x.prototype,u,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var s=new x(h(e,r,n,o),i);return t.isGeneratorFunction(r)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},O(k),f(k,l,"Generator"),f(k,c,(function(){return this})),f(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return a.type="throw",a.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var c=i.call(s,"catchLoc"),u=i.call(s,"finallyLoc");if(c&&u){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=e,s.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return s(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0}),t.runChild=void 0;var a,c,u,l=r(76513),f=r(90297),h=r(22534),p=r(87016),d=r(40766),y=[];function m(e){return l.__awaiter(this,void 0,void 0,o().mark((function t(){var r,n,s,a;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=y.slice(),y=[],n=i(r),t.prev=3,n.s();case 5:if((s=n.n()).done){t.next=14;break}return a=s.value,t.t0=a,t.next=10,w(a.message,e);case 10:t.t1=t.sent,t.t0.callback.call(t.t0,t.t1);case 12:t.next=5;break;case 14:t.next=19;break;case 16:t.prev=16,t.t2=t.catch(3),n.e(t.t2);case 19:return t.prev=19,n.f(),t.finish(19);case 22:case"end":return t.stop()}}),t,null,[[3,16,19,22]])})))}var v=0,g=new Map;function b(e,t){return l.__awaiter(this,void 0,void 0,o().mark((function r(){var n,i;return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=new p.URL(e),r.next=3,new Promise((function(e){var r={host:n.hostname,path:n.pathname,port:n.port};t.info("[RuntimeMessage.EMessageType4Proxy2Worker.EvaluateScript] ".concat(JSON.stringify(r))),h.http.request(r,(function(t){var r="";t.on("data",(function(e){r+=e})),t.on("end",(function(){e(r)}))})).end()}));case 3:return i=r.sent,r.abrupt("return",i);case 5:case"end":return r.stop()}}),r)})))}function w(e,t){return l.__awaiter(this,void 0,void 0,o().mark((function r(){var n,i,s,l,h,p,y,m,w;return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t.info("[Worker] dispatchMessage, ".concat(JSON.stringify(e))),"InitializeJSRuntime"!==e.type){r.next=10;break}return n=e,c||(c=new d.MultipleJSContextEngine(t)),i=void 0===n.payload.id?void 0:g.get(n.payload.id),s=c.createJSContext(n.payload.name,i),a=new f.StringMutex(n.payload.arrayBuffer.memory,new f.TypedSharedArrayBuffer(Int32Array,n.payload.arrayBuffer.mutex)),r.abrupt("return",{engineId:s.id,success:!0});case 10:if("EvaluateScript"!==e.type){r.next=28;break}if(l=e,!c){r.next=25;break}if(!l.payload.scriptUrl){r.next=24;break}if(r.t0=l.payload.code,r.t0){r.next=19;break}return r.next=18,b(l.payload.scriptUrl,t);case 18:r.t0=r.sent;case 19:h=r.t0,t.info(h),c.evaluateScript(h,l.payload.scriptUrl,l.payload.engineId),r.next=25;break;case 24:c.evaluateScript(l.payload.code,l.payload.scriptUrl,l.payload.engineId);case 25:return r.abrupt("return",{success:!0});case 28:if("PreloadScript"!==e.type){r.next=34;break}return p=e,c&&c.preloadScript(p.payload.code,p.payload.args,{messageAsync:function(e){u.sendMessage("ForwardMessageAsync",e,!1)},callSync:function(e,t){u.sendMessage("ForwardCallSync",{method:e,option:t},!1);var r=a.getMemory();return JSON.parse(r)},importScriptsSync:function(e){u.sendMessage("ForwardImportScriptsSync",{url:e},!1);var t=a.getMemory(),r=JSON.parse(t),n=r.url,o=r.code;c.evaluateScript(o,n,p.payload.engineId)}},p.payload.engineId),r.abrupt("return",{success:!0});case 34:if("EvaluateScript2GroupVariable"!==e.type){r.next=42;break}if(y=e,!c){r.next=40;break}return m=c.evaluateScript(y.payload.code,y.payload.scriptUrl,y.payload.engineId),g.set(++v,m),r.abrupt("return",{id:v,success:!0});case 40:r.next=43;break;case 42:"Destroy"===e.type&&(w=e,c&&c.destroyJSContext(w.payload.engineId));case 43:case"end":return r.stop()}}),r)})))}t.runChild=function(e,t){var r=this;return t.info("[Worker] begin"),u=new f.RpcSocket("worker2proxy",(0,f.createPortFromWorkerPort)(e),(function(e){return l.__awaiter(r,void 0,void 0,o().mark((function r(){var n,i;return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:r.t0=e.type,r.next="InitializeJSRuntime"===r.t0||"EvaluateScript"===r.t0||"EvaluateScript2GroupVariable"===r.t0||"PreloadScript"===r.t0||"Destroy"===r.t0?3:7;break;case 3:return i=new Promise((function(e){n=e})),y.push({callback:n,message:e}),setTimeout((function(){m(t)}),0),r.abrupt("return",i);case 7:case"end":return r.stop()}}),r)})))}),t),e.postMessage("PING"),u}},33804:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_JSC_INSPECTOR_HOST=t.DEFAULT_JSC_INSPECTOR_PORT=t.DEFAULT_JSC_SERVER_PORT=void 0,t.DEFAULT_JSC_SERVER_PORT=8090,t.DEFAULT_JSC_INSPECTOR_PORT=9229,t.DEFAULT_JSC_INSPECTOR_HOST="127.0.0.1"},49621:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(76513).__exportStar(r(33804),t)},90297:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function i(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}r.r(t),r.d(t,{CallbackManager:()=>v,JSCLogger:()=>q,MAX_SHARED_ARRAY_BUFFER_SIZE:()=>f,RpcSocket:()=>C,StringMutex:()=>h,TypedSharedArrayBuffer:()=>a,createPortFromMessagePort:()=>O,createPortFromWebSocket:()=>k,createPortFromWorkerPort:()=>x});var a=i((function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new SharedArrayBuffer(4);!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.typeFactory=t,this.sharedArrayBuffer=r,this.typedArray=new t(r)}));function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function l(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}var f=10485760,h=function(){return e=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new a(Int32Array);!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.mutex=n,this.encoder=new("undefined"!=typeof globalThis&&"TextEncoder"in globalThis?TextEncoder:r(39023).TextEncoder),this.decoder=new("undefined"!=typeof globalThis&&"TextDecoder"in globalThis?TextDecoder:r(39023).TextDecoder),this.memory=new a(Uint8Array,t),this.mutex.typedArray[0]=0},(t=[{key:"getMemory",value:function(){this.mutex.typedArray[0]=0,Atomics.wait(this.mutex.typedArray,0,0);var e=this.mutex.typedArray[0],t=this.memory.typedArray.slice(0,e),r=this.decoder.decode(t);return this.mutex.typedArray[0]=0,r}},{key:"writeMemory",value:function(e){if(0===this.mutex.typedArray[0]){var t=this.encoder.encode(e);this.memory.typedArray.set(t),this.mutex.typedArray[0]=t.length,Atomics.notify(this.mutex.typedArray,0,1/0)}}}])&&u(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function y(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,m(n.key),n)}}function m(e){var t=function(e){if("object"!=p(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==p(t)?t:t+""}var v=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.nextCallbackId=1,this.callbacks=new Map},(t=[{key:"getCallback",value:function(e){var t=this.nextCallbackId++;return this.callbacks.set(t,e),t}},{key:"invokeCallback",value:function(e,t){var r=this.callbacks.get(e);r&&(this.callbacks.delete(e),r.apply(void 0,function(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t)))}}])&&y(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function b(){b=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},s=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var i=t&&t.prototype instanceof v?t:v,s=Object.create(i.prototype),a=new P(n||[]);return o(s,"_invoke",{value:R(e,r,a)}),s}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function v(){}function w(){}function _(){}var S={};u(S,s,(function(){return this}));var E=Object.getPrototypeOf,C=E&&E(E(I([])));C&&C!==r&&n.call(C,s)&&(S=C);var k=_.prototype=v.prototype=Object.create(S);function O(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function r(o,i,s,a){var c=f(e[o],e,i);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==g(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,s,a)}),(function(e){r("throw",e,s,a)})):t.resolve(l).then((function(e){u.value=e,s(u)}),(function(e){return r("throw",e,s,a)}))}a(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function R(t,r,n){var o=h;return function(i,s){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw s;return{value:e,done:!0}}for(n.method=i,n.arg=s;;){var a=n.delegate;if(a){var c=A(a,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var u=f(t,r,n);if("normal"===u.type){if(o=n.done?y:p,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=y,n.method="throw",n.arg=u.arg)}}}function A(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var s=i.arg;return s?s.done?(r[t.resultName]=s.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(g(t)+" is not iterable")}return w.prototype=_,o(k,"constructor",{value:_,configurable:!0}),o(_,"constructor",{value:w,configurable:!0}),w.displayName=u(_,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,u(e,c,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},O(x.prototype),u(x.prototype,a,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var s=new x(l(e,r,n,o),i);return t.isGeneratorFunction(r)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},O(k),u(k,c,"Generator"),u(k,s,(function(){return this})),u(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return a.type="throw",a.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),u=n.call(s,"finallyLoc");if(c&&u){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=e,s.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function w(e,t,r,n,o,i,s){try{var a=e[i](s),c=a.value}catch(e){return void r(e)}a.done?t(c):Promise.resolve(c).then(n,o)}function _(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function s(e){w(i,n,o,s,a,"next",e)}function a(e){w(i,n,o,s,a,"throw",e)}s(void 0)}))}}function S(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,E(n.key),n)}}function E(e){var t=function(e){if("object"!=g(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=g(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==g(t)?t:t+""}var C=function(){return e=function e(t,r,n,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.direction=t,this.port=r,this.callback=n,this.logger=o,this.callbacks=new v,this.port.setMessageListener(this.onMessage.bind(this))},t=[{key:"onMessage",value:(n=_(b().mark((function e(t){var r,n,o,i;return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.logger.debug("[RpcSocket:".concat(this.direction,"] onMessage"),t),!(r=t).response){e.next=9;break}if((n=r).messageId){e.next=6;break}throw new Error("[Proxy] wrong callback messageId");case 6:this.callbacks.invokeCallback(n.messageId,[n.payload]),e.next=13;break;case 9:return e.next=11,this.callback(r);case 11:o=e.sent,r.messageId&&(i={direction:this.direction,messageId:r.messageId,payload:o,response:!0,type:r.type},this.port.postMessage(i));case 13:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"sendMessage",value:(r=_(b().mark((function e(t,r,n){var o,i,s,a=this;return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n&&(i=new Promise((function(e){o=a.callbacks.getCallback(e)}))),s={direction:this.direction,messageId:o,payload:r,type:t},this.logger.debug("[RpcSocket:".concat(this.direction,"] postMessage"),s),this.port.postMessage(s),e.abrupt("return",i);case 5:case"end":return e.stop()}}),e,this)}))),function(e,t,n){return r.apply(this,arguments)})}],t&&S(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r,n}();function k(e){return{setMessageListener:function(t){e.onmessage=function(e){t(JSON.parse(e.data))}},postMessage:function(t){e.send(JSON.stringify(t))}}}function O(e){return{setMessageListener:function(t){e.onmessage=function(e){t(e.data)}},postMessage:function(t){e.postMessage(t)}}}function x(e){return{setMessageListener:function(t){e.on("message",t)},postMessage:function(t){try{e.postMessage(t)}catch(r){try{e.postMessage(JSON.parse(JSON.stringify(t)))}catch(e){global.console.error(e)}}}}}function R(e){return R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},R(e)}function A(){}var T="undefined",L=["trace","debug","info","warn","error"];function P(e,t){return e[t].bind(e)}function I(e,t){for(var r=0;r<L.length;r++){var n=L[r];this[n]=r<e?A:this.methodFactory(n,e,t)}this.log=this.debug}function F(e){return function(e){return"debug"===e&&(e="log"),("undefined"==typeof console?"undefined":R(console))!==T&&(void 0!==console[e]?P(console,e):void 0!==console.log?P(console,"log"):A)}(e)}function j(e,t,r){var n,o=this,i="loglevel";function s(){var e;if(("undefined"==typeof window?"undefined":R(window))!==T&&i){try{e=window.localStorage[i]}catch(e){}if(R(e)===T)try{var t=window.document.cookie,r=t.indexOf(encodeURIComponent(i)+"=");-1!==r&&(e=/^([^;]+)/.exec(t.slice(r))[1])}catch(e){}return void 0===o.levels[e]&&(e=void 0),e}}"string"==typeof e?i+=":"+e:"symbol"===R(e)&&(i=void 0),o.name=e,o.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},o.methodFactory=r||F,o.getLevel=function(){return n},o.setLevel=function(t,r){if("string"==typeof t&&void 0!==o.levels[t.toUpperCase()]&&(t=o.levels[t.toUpperCase()]),!("number"==typeof t&&t>=0&&t<=o.levels.SILENT))throw new Error("log.setLevel() called with invalid level: "+t);if(n=t,!1!==r&&function(e){var t=(L[e]||"silent").toUpperCase();if(("undefined"==typeof window?"undefined":R(window))!==T&&i){try{return void(window.localStorage[i]=t)}catch(e){}try{window.document.cookie=encodeURIComponent(i)+"="+t+";"}catch(e){}}}(t),I.call(o,t,e),("undefined"==typeof console?"undefined":R(console))===T&&t<o.levels.SILENT)return"No console available for logging"},o.setDefaultLevel=function(e){s()||o.setLevel(e,!1)},o.enableAll=function(e){o.setLevel(o.levels.TRACE,e)},o.disableAll=function(e){o.setLevel(o.levels.SILENT,e)};var a=s();null==a&&(a=null==t?"WARN":t),o.setLevel(a,!1)}var N=new j,D={};N.getLogger=function(e){if("symbol"!==R(e)&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=D[e];return t||(t=D[e]=new j(e,N.getLevel(),N.methodFactory)),t};var M=("undefined"==typeof window?"undefined":R(window))!==T?window.log:void 0;N.noConflict=function(){return("undefined"==typeof window?"undefined":R(window))!==T&&window.log===N&&(window.log=M),N},N.getLoggers=function(){return D};const U=N;U.noConflict();var B=U.methodFactory;U.methodFactory=function(e,t,r){var n=B(e,t,r);return function(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];n.apply(void 0,["[remote-jsc] ".concat(e.toUpperCase())].concat(r))}};var q=U},29989:(e,t,r)=>{"use strict";var n=r(70857),o=r(79896),i=r(35317);function s(){var e="eth",t=n.platform();return"darwin"===t?e="en":"win32"===t&&(e=null),e}function a(e,t){return"IPv4"===t?"IPv4"===e||4===e:"IPv6"===t?"IPv6"===e||6===e:e===t}function c(e,t){"function"==typeof e&&(t=e,e=null);var r={ip:c.ip(e),ipv6:c.ipv6(e),mac:null};c.mac(e,(function(e,n){n&&(r.mac=n),t(e,r)}))}c.interface=function(e,t){var r=n.networkInterfaces(),o=!t;t=t||s(),e=e||"IPv4";for(var i=-1;i<8;i++)if(l=r[t+(i>=0?i:"")])for(var c=0;c<l.length;c++)if(a((f=l[c]).family,e))return f;if(o)for(var u in r){var l=r[u];for(i=0;i<l.length;i++){var f;if(a((f=l[i]).family,e)&&!f.address.startsWith("127."))return f}}},c.ip=function(e){var t=c.interface("IPv4",e);return t&&t.address},c.ipv6=function(e){var t=c.interface("IPv6",e);return t&&t.address};var u=/^(\w+)\:\s+flags=/,l=/^(\w+)\s{2,}link encap:\w+/i,f=c.MAC_RE=/(?:ether|HWaddr)\s+((?:[a-z0-9]{2}\:){5}[a-z0-9]{2})/i,h=c.MAC_IP_RE=/inet\s(?:addr\:)?(\d+\.\d+\.\d+\.\d+)/;c.mac=function(e,t){"function"==typeof e&&(t=e,e=null),e=e||s();var r=c.interface("IPv4",e);return r?(process.env.CI||"ff:00:00:00:00:00"!==r.mac&&"00:00:00:00:00:00"!==r.mac||(r.mac=""),r.mac?t(null,r.mac):void i.exec("win32"===n.platform()?"ipconfig/all":"/sbin/ifconfig",{timeout:5e3},(function(n,o,i){if(n||!o)return t(n);var s=function(e,t,r){for(var n=e.split("\n"),o=0;o<n.length;o++){var i=n[o].trimRight(),s=u.exec(i)||l.exec(i);if(s&&0===s[1].indexOf(t)){var a=null,c=null,p=f.exec(i);for(p&&(c=p[1]),o++;;){if(!(i=n[o])||u.exec(i)||l.exec(i)){o--;break}c||(p=f.exec(i))&&(c=p[1]),a||(p=h.exec(i))&&(a=p[1]),o++}if(a===r)return c}}}(o||"",e,r.address);t(null,s)}))):t()};var p=/^nameserver\s+(\d+\.\d+\.\d+\.\d+)$/i;c.dns=function(e,t){"function"==typeof e&&(t=e,e=null),e=e||"/etc/resolv.conf",o.readFile(e,"utf8",(function(e,r){if(e)return t(e);for(var n=[],o=(r=r||"").split("\n"),i=0;i<o.length;i++){var s=o[i].trim(),a=p.exec(s);a&&n.push(a[1])}t(null,n)}))},e.exports=c},27539:e=>{"use strict";e.exports={mask:function(e,t,r,n,o){for(var i=0;i<o;i++)r[n+i]=e[i]^t[3&i]},unmask:function(e,t){for(var r=e.length,n=0;n<r;n++)e[n]^=t[3&n]}}},87893:(e,t,r)=>{"use strict";try{e.exports=r(16291)(__dirname)}catch(t){e.exports=r(27539)}},51227:(e,t,r)=>{var n;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){var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(function(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(){var e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("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&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));var e},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(n=!1,function(){n||(n=!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||function(){},e.exports=r(18630)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},18630:(e,t,r)=>{function n(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}e.exports=function(e){function t(e){var r,n,i,s=null;function a(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];if(a.enabled){var i=a,s=Number(new Date),c=s-(r||s);i.diff=c,i.prev=r,i.curr=s,r=s,n[0]=t.coerce(n[0]),"string"!=typeof n[0]&&n.unshift("%O");var u=0;n[0]=n[0].replace(/%([a-zA-Z%])/g,(function(e,r){if("%%"===e)return"%";u++;var o=t.formatters[r];if("function"==typeof o){var s=n[u];e=o.call(i,s),n.splice(u,1),u--}return e})),t.formatArgs.call(i,n),(i.log||t.log).apply(i,n)}}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=o,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:function(){return null!==s?s:(n!==t.namespaces&&(n=t.namespaces,i=t.enabled(e)),i)},set:function(e){s=e}}),"function"==typeof t.init&&t.init(a),a}function o(e,r){var n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){var e=[].concat(n(t.names.map(i)),n(t.skips.map(i).map((function(e){return"-"+e})))).join(",");return t.enable(""),e},t.enable=function(e){var r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];var 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.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;var 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=r(9527),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((function(r){t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){for(var r=0,n=0;n<e.length;n++)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},80103:(e,t,r)=>{"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?e.exports=r(51227):e.exports=r(54519)},54519:(e,t,r)=>{var n=r(52018),o=r(39023);t.init=function(e){e.inspectOpts={};for(var r=Object.keys(t.inspectOpts),n=0;n<r.length;n++)e.inspectOpts[r[n]]=t.inspectOpts[r[n]]},t.log=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return process.stderr.write(o.formatWithOptions.apply(o,[t.inspectOpts].concat(r))+"\n")},t.formatArgs=function(r){var n=this.namespace;if(this.useColors){var o=this.color,i="[3"+(o<8?o:"8;5;"+o),s=" ".concat(i,";1m").concat(n," ");r[0]=s+r[0].split("\n").join("\n"+s),r.push(i+"m+"+e.exports.humanize(this.diff)+"")}else r[0]=(t.inspectOpts.hideDate?"":(new Date).toISOString()+" ")+n+" "+r[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):n.isatty(process.stderr.fd)},t.destroy=o.deprecate((function(){}),"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{var i=r(78377);i&&(i.stderr||i).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(process.env).filter((function(e){return/^debug_/i.test(e)})).reduce((function(e,t){var r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(function(e,t){return t.toUpperCase()})),n=process.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=r(18630)(t);var s=e.exports.formatters;s.o=function(e){return this.inspectOpts.colors=this.useColors,o.inspect(e,this.inspectOpts).split("\n").map((function(e){return e.trim()})).join(" ")},s.O=function(e){return this.inspectOpts.colors=this.useColors,o.inspect(e,this.inspectOpts)}},89274:(e,t,r)=>{"use strict";e.exports=r(89425)},89425:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var o=r(69278),i=r(29989),s=r(93474)("detect-port");function a(e,t,r,n){function o(){++e>=t&&(s("port: %s >= maxPort: %s, give up and use random port",e,t),e=0,t=0),a(e,t,r,n)}r?c(e,r,(function(e,t){if(e)return"EADDRNOTAVAIL"===e.code?n(new Error("the ip that is not unkonwn on the machine")):o();n(null,t)})):c(e,null,(function(t,r){return 0===e?n(t,r):t?o():void c(e,"0.0.0.0",(function(t){if(t)return o();c(e,"localhost",(function(t){if(t&&"EADDRNOTAVAIL"!==t.code)return o();c(e,i.ip(),(function(e,t){if(e)return o();n(null,t)}))}))}))}))}function c(e,t,r){var n=new o.Server;n.on("error",(function(o){return s("listen %s:%s error: %s",t,e,o),n.close(),"ENOTFOUND"===o.code?(s("ignore dns ENOTFOUND error, get free %s:%s",t,e),r(null,e)):r(o)})),n.listen(e,t,(function(){return e=n.address().port,n.close(),s("get free %s:%s",t,e),r(null,e)}))}e.exports=function(e,t){var r="";"object"===n(e)&&e?(r=e.hostname,t=e.callback,e=e.port):"function"==typeof e&&(t=e,e=null);var o=(e=parseInt(e)||0)+10;return o>65535&&(o=65535),s("detect free port between [%s, %s)",e,o),"function"==typeof t?a(e,o,r,t):new Promise((function(t){a(e,o,r,(function(e,r){t(r)}))}))}},13442:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e}(t=e.exports=r(97701)).log=function(){return"object"===("undefined"==typeof console?"undefined":n(console))&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var r=this.useColors;if(e[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+e[0]+(r?"%c ":" ")+"+"+t.humanize(this.diff),r){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var o=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(o++,"%c"===e&&(i=o))})),e.splice(i,0,n)}},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=o,t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("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="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(o())},97701:(e,t,r)=>{var n;function o(e){function r(){if(r.enabled){var e=r,o=+new Date,i=o-(n||o);e.diff=i,e.prev=n,e.curr=o,n=o;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var c=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(r,n){if("%%"===r)return r;c++;var o=t.formatters[n];if("function"==typeof o){var i=s[c];r=o.call(e,i),s.splice(c,1),c--}return r})),t.formatArgs.call(e,s),(r.log||t.log||console.log.bind(console)).apply(e,s)}}return r.namespace=e,r.enabled=t.enabled(e),r.useColors=t.useColors(),r.color=function(e){var r,n=0;for(r in e)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]}(e),"function"==typeof t.init&&t.init(r),r}(t=e.exports=o.debug=o.default=o).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){t.save(e),t.names=[],t.skips=[];for(var r=("string"==typeof e?e:"").split(/[\s,]+/),n=r.length,o=0;o<n;o++)r[o]&&("-"===(e=r[o].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){var 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=r(30340),t.names=[],t.skips=[],t.formatters={}},93474:(e,t,r)=>{"undefined"!=typeof process&&"renderer"===process.type?e.exports=r(13442):e.exports=r(48920)},48920:(e,t,r)=>{var n=r(52018),o=r(39023);(t=e.exports=r(97701)).init=function(e){e.inspectOpts={};for(var r=Object.keys(t.inspectOpts),n=0;n<r.length;n++)e.inspectOpts[r[n]]=t.inspectOpts[r[n]]},t.log=function(){return s.write(o.format.apply(o,arguments)+"\n")},t.formatArgs=function(e){var r=this.namespace;if(this.useColors){var n=this.color,o=" [3"+n+";1m"+r+" ";e[0]=o+e[0].split("\n").join("\n"+o),e.push("[3"+n+"m+"+t.humanize(this.diff)+"")}else e[0]=(new Date).toUTCString()+" "+r+" "+e[0]},t.save=function(e){null==e?delete process.env.DEBUG:process.env.DEBUG=e},t.load=a,t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):n.isatty(i)},t.colors=[6,2,3,4,5,1],t.inspectOpts=Object.keys(process.env).filter((function(e){return/^debug_/i.test(e)})).reduce((function(e,t){var r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(function(e,t){return t.toUpperCase()})),n=process.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}),{});var i=parseInt(process.env.DEBUG_FD,10)||2;1!==i&&2!==i&&o.deprecate((function(){}),"except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)")();var s=1===i?process.stdout:2===i?process.stderr:function(e){var t;switch(process.binding("tty_wrap").guessHandleType(e)){case"TTY":(t=new n.WriteStream(e))._type="tty",t._handle&&t._handle.unref&&t._handle.unref();break;case"FILE":(t=new(r(79896).SyncWriteStream)(e,{autoClose:!1}))._type="fs";break;case"PIPE":case"TCP":(t=new(r(69278).Socket)({fd:e,readable:!1,writable:!0})).readable=!1,t.read=null,t._type="pipe",t._handle&&t._handle.unref&&t._handle.unref();break;default:throw new Error("Implement me. Unknown stream file type!")}return t.fd=e,t._isStdio=!0,t}(i);function a(){return process.env.DEBUG}t.formatters.o=function(e){return this.inspectOpts.colors=this.useColors,o.inspect(e,this.inspectOpts).split("\n").map((function(e){return e.trim()})).join(" ")},t.formatters.O=function(e){return this.inspectOpts.colors=this.useColors,o.inspect(e,this.inspectOpts)},t.enable(a())},30340:e=>{function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}var r=1e3,n=60*r,o=60*n,i=24*o;function s(e,t,r){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}e.exports=function(e,a){a=a||{};var c,u=t(e);if("string"===u&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var s=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*o;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(e);if("number"===u&&!1===isNaN(e))return a.long?s(c=e,i,"day")||s(c,o,"hour")||s(c,n,"minute")||s(c,r,"second")||c+" ms":function(e){return e>=i?Math.round(e/i)+"d":e>=o?Math.round(e/o)+"h":e>=n?Math.round(e/n)+"m":e>=r?Math.round(e/r)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},14065:(e,t,r)=>{var n;e.exports=function(){if(!n){try{n=r(80103)("follow-redirects")}catch(e){}"function"!=typeof n&&(n=function(){})}n.apply(null,arguments)}},22534:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var i,s,a,c=r(87016),u=c.URL,l=r(58611),f=r(65692),h=r(2203).Writable,p=r(42613),d=r(14065);i="undefined"!=typeof process,s="undefined"!=typeof window&&"undefined"!=typeof document,a=j(Error.captureStackTrace),i||!s&&a||console.warn("The follow-redirects package should be excluded from browser builds.");var y=!1;try{p(new u(""))}catch(e){y="ERR_INVALID_URL"===e.code}var m=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],v=["abort","aborted","connect","error","socket","timeout"],g=Object.create(null);v.forEach((function(e){g[e]=function(t,r,n){this._redirectable.emit(e,t,r,n)}}));var b=P("ERR_INVALID_URL","Invalid URL",TypeError),w=P("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),_=P("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",w),S=P("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),E=P("ERR_STREAM_WRITE_AFTER_END","write after end"),C=h.prototype.destroy||x;function k(e,t){h.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var r=this;this._onNativeResponse=function(e){try{r._processResponse(e)}catch(e){r.emit("error",e instanceof w?e:new w({cause:e}))}},this._performRequest()}function O(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach((function(n){var o=n+":",i=r[o]=e[n],s=t[n]=Object.create(i);Object.defineProperties(s,{request:{value:function(e,n,i){return u&&e instanceof u?e=T(e):F(e)?e=T(R(e)):(i=n,n=A(e),e={protocol:o}),j(n)&&(i=n,n=null),(n=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,n)).nativeProtocols=r,F(n.host)||F(n.hostname)||(n.hostname="::1"),p.equal(n.protocol,o,"protocol mismatch"),d("options",n),new k(n,i)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,r){var n=s.request(e,t,r);return n.end(),n},configurable:!0,enumerable:!0,writable:!0}})})),t}function x(){}function R(e){var t;if(y)t=new u(e);else if(!F((t=A(c.parse(e))).protocol))throw new b({input:e});return t}function A(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new b({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new b({input:e.href||e});return e}function T(e,t){var r,n=t||{},i=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return o(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,s=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw s}}}}(m);try{for(i.s();!(r=i.n()).done;){var s=r.value;n[s]=e[s]}}catch(e){i.e(e)}finally{i.f()}return n.hostname.startsWith("[")&&(n.hostname=n.hostname.slice(1,-1)),""!==n.port&&(n.port=Number(n.port)),n.path=n.search?n.pathname+n.search:n.pathname,n}function L(e,t){var r;for(var n in t)e.test(n)&&(r=t[n],delete t[n]);return null==r?void 0:String(r).trim()}function P(e,t,r){function n(r){j(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,r||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return n.prototype=new(r||Error),Object.defineProperties(n.prototype,{constructor:{value:n,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),n}function I(e,t){for(var r=0,n=v;r<n.length;r++){var o=n[r];e.removeListener(o,g[o])}e.on("error",x),e.destroy(t)}function F(e){return"string"==typeof e||e instanceof String}function j(e){return"function"==typeof e}k.prototype=Object.create(h.prototype),k.prototype.abort=function(){I(this._currentRequest),this._currentRequest.abort(),this.emit("abort")},k.prototype.destroy=function(e){return I(this._currentRequest,e),C.call(this,e),this},k.prototype.write=function(e,t,r){if(this._ending)throw new E;if(!(F(e)||"object"===n(o=e)&&"length"in o))throw new TypeError("data should be a string, Buffer or Uint8Array");var o;j(t)&&(r=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new S),this.abort()):r&&r()},k.prototype.end=function(e,t,r){if(j(e)?(r=e,e=t=null):j(t)&&(r=t,t=null),e){var n=this,o=this._currentRequest;this.write(e,t,(function(){n._ended=!0,o.end(null,null,r)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,r)},k.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},k.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},k.prototype.setTimeout=function(e,t){var r=this;function n(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function o(t){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout((function(){r.emit("timeout"),i()}),e),n(t)}function i(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",i),r.removeListener("error",i),r.removeListener("response",i),r.removeListener("close",i),t&&r.removeListener("timeout",t),r.socket||r._currentRequest.removeListener("socket",o)}return t&&this.on("timeout",t),this.socket?o(this.socket):this._currentRequest.once("socket",o),this.on("socket",n),this.on("abort",i),this.on("error",i),this.on("response",i),this.on("close",i),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){k.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(k.prototype,e,{get:function(){return this._currentRequest[e]}})})),k.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},k.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=t.request(this._options,this._onNativeResponse);n._redirectable=this;for(var o=0,i=v;o<i.length;o++){var s=i[o];n.on(s,g[s])}if(this._currentUrl=/^\//.test(this._options.path)?c.format(this._options):this._options.path,this._isRedirect){var a=0,u=this,l=this._requestBodyBuffers;!function e(t){if(n===u._currentRequest)if(t)u.emit("error",t);else if(a<l.length){var r=l[a++];n.finished||n.write(r.data,r.encoding,e)}else u._ended&&n.end()}()}},k.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var r,n=e.headers.location;if(!n||!1===this._options.followRedirects||t<300||t>=400)return e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),void(this._requestBodyBuffers=[]);if(I(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new _;var o=this._options.beforeRedirect;o&&(r=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var i=this._options.method;((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],L(/^content-/i,this._options.headers));var s,a,l=L(/^host$/i,this._options.headers),f=R(this._currentUrl),h=l||f.host,m=/^\w+:/.test(n)?this._currentUrl:c.format(Object.assign(f,{host:h})),v=(s=n,a=m,y?new u(s,a):R(c.resolve(a,s)));if(d("redirecting to",v.href),this._isRedirect=!0,T(v,this._options),(v.protocol!==f.protocol&&"https:"!==v.protocol||v.host!==h&&!function(e,t){p(F(e)&&F(t));var r=e.length-t.length-1;return r>0&&"."===e[r]&&e.endsWith(t)}(v.host,h))&&L(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),j(o)){var g={headers:e.headers,statusCode:t},b={url:m,method:i,headers:r};o(this._options,g,b),this._sanitizeOptions(this._options)}this._performRequest()},e.exports=O({http:l,https:f}),e.exports.wrap=O},96482:e=>{"use strict";e.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:process.argv,r=e.startsWith("-")?"":1===e.length?"-":"--",n=t.indexOf(r+e),o=t.indexOf("--");return-1!==n&&(-1===o||n<o)}},1096:e=>{e.exports=n,n.strict=o,n.loose=i;var t=Object.prototype.toString,r={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0};function n(e){return o(e)||i(e)}function o(e){return e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array}function i(e){return r[t.call(e)]}},9527:e=>{function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}var r=1e3,n=60*r,o=60*n,i=24*o,s=7*i;function a(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}e.exports=function(e,c){c=c||{};var u,l,f=t(e);if("string"===f&&e.length>0)return function(e){if(!((e=String(e)).length>100)){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){var a=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"weeks":case"week":case"w":return a*s;case"days":case"day":case"d":return a*i;case"hours":case"hour":case"hrs":case"hr":case"h":return a*o;case"minutes":case"minute":case"mins":case"min":case"m":return a*n;case"seconds":case"second":case"secs":case"sec":case"s":return a*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}(e);if("number"===f&&isFinite(e))return c.long?(u=e,(l=Math.abs(u))>=i?a(u,l,i,"day"):l>=o?a(u,l,o,"hour"):l>=n?a(u,l,n,"minute"):l>=r?a(u,l,r,"second"):u+" ms"):function(e){var t=Math.abs(e);return t>=i?Math.round(e/i)+"d":t>=o?Math.round(e/o)+"h":t>=n?Math.round(e/n)+"m":t>=r?Math.round(e/r)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},16291:(e,t,r)=>{var n=require;"function"==typeof n.addon?e.exports=n.addon.bind(n):e.exports=r(15711)},15711:(e,t,r)=>{var n=r(79896),o=r(16928),i=r(70857),s=require,a=process.config&&process.config.variables||{},c=!!process.env.PREBUILDS_ONLY,u=process.versions.modules,l=process.versions&&process.versions.electron||process.env.ELECTRON_RUN_AS_NODE||"undefined"!=typeof window&&window.process&&"renderer"===window.process.type?"electron":process.versions&&process.versions.nw?"node-webkit":"node",f=process.env.npm_config_arch||i.arch(),h=process.env.npm_config_platform||i.platform(),p=process.env.LIBC||(function(e){return"linux"===e&&n.existsSync("/etc/alpine-release")}(h)?"musl":"glibc"),d=process.env.ARM_VERSION||("arm64"===f?"8":a.arm_version)||"",y=(process.versions.uv||"").split(".")[0];function m(e){return s(m.resolve(e))}function v(e){try{return n.readdirSync(e)}catch(e){return[]}}function g(e,t){var r=v(e).filter(t);return r[0]&&o.join(e,r[0])}function b(e){return/\.node$/.test(e)}function w(e){var t=e.split("-");if(2===t.length){var r=t[0],n=t[1].split("+");if(r&&n.length&&n.every(Boolean))return{name:e,platform:r,architectures:n}}}function _(e,t){return function(r){return null!=r&&r.platform===e&&r.architectures.includes(t)}}function S(e,t){return e.architectures.length-t.architectures.length}function E(e){var t=e.split("."),r={file:e,specificity:0};if("node"===t.pop()){for(var n=0;n<t.length;n++){var o=t[n];if("node"===o||"electron"===o||"node-webkit"===o)r.runtime=o;else if("napi"===o)r.napi=!0;else if("abi"===o.slice(0,3))r.abi=o.slice(3);else if("uv"===o.slice(0,2))r.uv=o.slice(2);else if("armv"===o.slice(0,4))r.armv=o.slice(4);else{if("glibc"!==o&&"musl"!==o)continue;r.libc=o}r.specificity++}return r}}function C(e,t){return function(r){return!(null==r||r.runtime&&r.runtime!==e&&!function(e){return"node"===e.runtime&&e.napi}(r)||r.abi&&r.abi!==t&&!r.napi||r.uv&&r.uv!==y||r.armv&&r.armv!==d||r.libc&&r.libc!==p)}}function k(e){return function(t,r){return t.runtime!==r.runtime?t.runtime===e?-1:1:t.abi!==r.abi?t.abi?-1:1:t.specificity!==r.specificity?t.specificity>r.specificity?-1:1:0}}e.exports=m,m.resolve=m.path=function(e){e=o.resolve(e||".");try{var t=s(o.join(e,"package.json")).name.toUpperCase().replace(/-/g,"_");process.env[t+"_PREBUILD"]&&(e=process.env[t+"_PREBUILD"])}catch(e){}if(!c){var r=g(o.join(e,"build/Release"),b);if(r)return r;var n=g(o.join(e,"build/Debug"),b);if(n)return n}var i=O(e);if(i)return i;var a=O(o.dirname(process.execPath));if(a)return a;var m=["platform="+h,"arch="+f,"runtime="+l,"abi="+u,"uv="+y,d?"armv="+d:"","libc="+p,"node="+process.versions.node,process.versions.electron?"electron="+process.versions.electron:"","webpack=true"].filter(Boolean).join(" ");throw new Error("No native build was found for "+m+"\n loaded from: "+e+"\n");function O(e){var t=v(o.join(e,"prebuilds")).map(w).filter(_(h,f)).sort(S)[0];if(t){var r=o.join(e,"prebuilds",t.name),n=v(r).map(E).filter(C(l,u)).sort(k(l))[0];return n?o.join(r,n.file):void 0}}},m.parseTags=E,m.matchTags=C,m.compareTags=k,m.parseTuple=w,m.matchTuple=_,m.compareTuples=S},78377:(e,t,r)=>{"use strict";var n,o=r(70857),i=r(52018),s=r(96482),a=process.env;function c(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function u(e,t){if(0===n)return 0;if(s("color=16m")||s("color=full")||s("color=truecolor"))return 3;if(s("color=256"))return 2;if(e&&!t&&void 0===n)return 0;var r=n||0;if("dumb"===a.TERM)return r;if("win32"===process.platform){var i=o.release().split(".");return Number(i[0])>=10&&Number(i[2])>=10586?Number(i[2])>=14931?3:2:1}if("CI"in a)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((function(e){return e in a}))||"codeship"===a.CI_NAME?1:r;if("TEAMCITY_VERSION"in a)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(a.TEAMCITY_VERSION)?1:0;if("truecolor"===a.COLORTERM)return 3;if("TERM_PROGRAM"in a){var c=parseInt((a.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(a.TERM_PROGRAM){case"iTerm.app":return c>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(a.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(a.TERM)||"COLORTERM"in a?1:r}s("no-color")||s("no-colors")||s("color=false")||s("color=never")?n=0:(s("color")||s("colors")||s("color=true")||s("color=always"))&&(n=1),"FORCE_COLOR"in a&&(n="true"===a.FORCE_COLOR?1:"false"===a.FORCE_COLOR?0:0===a.FORCE_COLOR.length?1:Math.min(parseInt(a.FORCE_COLOR,10),3)),e.exports={supportsColor:function(e){return c(u(e,e&&e.isTTY))},stdout:c(u(!0,i.isatty(1))),stderr:c(u(!0,i.isatty(2)))}},22197:(e,t,r)=>{var n=r(1096).strict;e.exports=function(e){if(n(e)){var t=Buffer.from(e.buffer);return e.byteLength!==e.buffer.byteLength&&(t=t.slice(e.byteOffset,e.byteOffset+e.byteLength)),t}return Buffer.from(e)}},16086:e=>{"use strict";e.exports=function(e){for(var t=e.length,r=0;r<t;)if(128&e[r])if(192==(224&e[r])){if(r+1===t||128!=(192&e[r+1])||192==(254&e[r]))return!1;r+=2}else if(224==(240&e[r])){if(r+2>=t||128!=(192&e[r+1])||128!=(192&e[r+2])||224===e[r]&&128==(224&e[r+1])||237===e[r]&&160==(224&e[r+1]))return!1;r+=3}else{if(240!=(248&e[r]))return!1;if(r+3>=t||128!=(192&e[r+1])||128!=(192&e[r+2])||128!=(192&e[r+3])||240===e[r]&&128==(240&e[r+1])||244===e[r]&&e[r+1]>143||e[r]>244)return!1;r+=4}else r++;return!0}},82726:(e,t,r)=>{"use strict";try{e.exports=r(16291)(__dirname)}catch(t){e.exports=r(16086)}},4814:(e,t,r)=>{e.exports=r(23725)},36788:e=>{var t={disableWarnings:!1,deprecationWarningMap:{},warn:function(e){!this.disableWarnings&&this.deprecationWarningMap[e]&&(console.warn("DEPRECATION WARNING: "+this.deprecationWarningMap[e]),this.deprecationWarningMap[e]=!1)}};e.exports=t},12750:(e,t,r)=>{var n=r(82418),o=r(22197),i=r(37323),s=0,a=1,c=2,u=3;function l(e,t,r,o,a,c){i.EventTarget.call(this),(c=c||{}).assembleFragments=!0;var u=this;this._url=e,this._readyState=s,this._protocol=void 0,this._extensions="",this._bufferedAmount=0,this._binaryType="arraybuffer",this._connection=void 0,this._client=new n(c),this._client.on("connect",(function(e){p.call(u,e)})),this._client.on("connectFailed",(function(){d.call(u)})),this._client.connect(e,t,r,o,a)}function f(e,t){var r=new i.Event("close");return r.code=e,r.reason=t,r.wasClean=void 0===e||1e3===e,r}function h(e){var t=new i.Event("message");return t.data=e,t}function p(e){var t=this;this._readyState=a,this._connection=e,this._protocol=e.protocol,this._extensions=e.extensions,this._connection.on("close",(function(e,r){y.call(t,e,r)})),this._connection.on("message",(function(e){m.call(t,e)})),this.dispatchEvent(new i.Event("open"))}function d(){v.call(this),this._readyState=u;try{this.dispatchEvent(new i.Event("error"))}finally{this.dispatchEvent(f(1006,"connection failed"))}}function y(e,t){v.call(this),this._readyState=u,this.dispatchEvent(f(e,t||""))}function m(e){if(e.utf8Data)this.dispatchEvent(h(e.utf8Data));else if(e.binaryData&&"arraybuffer"===this.binaryType){for(var t=e.binaryData,r=new ArrayBuffer(t.length),n=new Uint8Array(r),o=0,i=t.length;o<i;++o)n[o]=t[o];this.dispatchEvent(h(r))}}function v(){this._client.removeAllListeners(),this._connection&&this._connection.removeAllListeners()}e.exports=l,Object.defineProperties(l.prototype,{url:{get:function(){return this._url}},readyState:{get:function(){return this._readyState}},protocol:{get:function(){return this._protocol}},extensions:{get:function(){return this._extensions}},bufferedAmount:{get:function(){return this._bufferedAmount}}}),Object.defineProperties(l.prototype,{binaryType:{get:function(){return this._binaryType},set:function(e){if("arraybuffer"!==e)throw new SyntaxError('just "arraybuffer" type allowed for "binaryType" attribute');this._binaryType=e}}}),[["CONNECTING",s],["OPEN",a],["CLOSING",c],["CLOSED",u]].forEach((function(e){Object.defineProperty(l.prototype,e[0],{get:function(){return e[1]}})})),[["CONNECTING",s],["OPEN",a],["CLOSING",c],["CLOSED",u]].forEach((function(e){Object.defineProperty(l,e[0],{get:function(){return e[1]}})})),l.prototype.send=function(e){if(this._readyState!==a)throw new Error("cannot call send() while not connected");if("string"==typeof e||e instanceof String)this._connection.sendUTF(e);else if(e instanceof Buffer)this._connection.sendBytes(e);else{if(!e.byteLength&&0!==e.byteLength)throw new Error("unknown binary data:",e);e=o(e),this._connection.sendBytes(e)}},l.prototype.close=function(e,t){switch(this._readyState){case s:d.call(this),this._client.on("connect",(function(r){e?r.close(e,t):r.close()}));break;case a:this._readyState=c,e?this._connection.close(e,t):this._connection.close()}}},82418:(e,t,r)=>{var n=r(30323),o=n.extend,i=r(39023),s=r(24434).EventEmitter,a=r(58611),c=r(65692),u=r(87016),l=r(76982),f=r(6881),h=n.bufferAllocUnsafe,p=["(",")","<",">","@",",",";",":","\\",'"',"/","[","]","?","=","{","}"," ",String.fromCharCode(9)],d=["hostname","port","method","path","headers"];function y(e){var t;switch(s.call(this),this.config={maxReceivedFrameSize:1048576,maxReceivedMessageSize:8388608,fragmentOutgoingMessages:!0,fragmentationThreshold:16384,webSocketVersion:13,assembleFragments:!0,disableNagleAlgorithm:!0,closeTimeout:5e3,tlsOptions:{}},e&&(e.tlsOptions?(t=e.tlsOptions,delete e.tlsOptions):t={},o(this.config,e),o(this.config.tlsOptions,t)),this._req=null,this.config.webSocketVersion){case 8:case 13:break;default:throw new Error("Requested webSocketVersion is not supported. Allowed values are 8 and 13.")}}i.inherits(y,s),y.prototype.connect=function(e,t,r,i,s){var l=this;if("string"==typeof t&&(t=t.length>0?[t]:[]),t instanceof Array||(t=[]),this.protocols=t,this.origin=r,this.url="string"==typeof e?u.parse(e):e,!this.url.protocol)throw new Error("You must specify a full WebSocket URL, including protocol.");if(!this.url.host)throw new Error("You must specify a full WebSocket URL, including hostname. Relative URLs are not supported.");this.secure="wss:"===this.url.protocol,this.protocols.forEach((function(e){for(var t=0;t<e.length;t++){var r=e.charCodeAt(t),n=e.charAt(t);if(r<33||r>126||-1!==p.indexOf(n))throw new Error('Protocol list contains invalid character "'+String.fromCharCode(r)+'"')}})),this.url.port||(this.url.port={"ws:":"80","wss:":"443"}[this.url.protocol]);for(var f=h(16),y=0;y<16;y++)f[y]=Math.round(255*Math.random());this.base64nonce=f.toString("base64");var m=this.url.hostname;("ws:"===this.url.protocol&&"80"!==this.url.port||"wss:"===this.url.protocol&&"443"!==this.url.port)&&(m+=":"+this.url.port);var v,g={};function b(e){l._req=null,l.emit("connectFailed",e)}this.secure&&this.config.tlsOptions.hasOwnProperty("headers")&&o(g,this.config.tlsOptions.headers),i&&o(g,i),o(g,{Upgrade:"websocket",Connection:"Upgrade","Sec-WebSocket-Version":this.config.webSocketVersion.toString(10),"Sec-WebSocket-Key":this.base64nonce,Host:g.Host||m}),this.protocols.length>0&&(g["Sec-WebSocket-Protocol"]=this.protocols.join(", ")),this.origin&&(13===this.config.webSocketVersion?g.Origin=this.origin:8===this.config.webSocketVersion&&(g["Sec-WebSocket-Origin"]=this.origin)),v=this.url.pathname?this.url.path:this.url.path?"/"+this.url.path:"/";var w={agent:!1};if(s&&o(w,s),o(w,{hostname:this.url.hostname,port:this.url.port,method:"GET",path:v,headers:g}),this.secure){var _=this.config.tlsOptions;for(var S in _)_.hasOwnProperty(S)&&-1===d.indexOf(S)&&(w[S]=_[S])}var E=this._req=(this.secure?c:a).request(w);E.on("upgrade",(function(e,t,r){l._req=null,E.removeListener("error",b),l.socket=t,l.response=e,l.firstDataChunk=r,l.validateHandshake()})),E.on("error",b),E.on("response",(function(e){if(l._req=null,n.eventEmitterListenerCount(l,"httpResponse")>0)l.emit("httpResponse",e,l),e.socket&&e.socket.end();else{var t=[];for(var r in e.headers)t.push(r+": "+e.headers[r]);l.failHandshake("Server responded with a non-101 status: "+e.statusCode+" "+e.statusMessage+"\nResponse Headers Follow:\n"+t.join("\n")+"\n")}})),E.end()},y.prototype.validateHandshake=function(){var e=this.response.headers;if(this.protocols.length>0){if(this.protocol=e["sec-websocket-protocol"],!this.protocol)return void this.failHandshake("Expected a Sec-WebSocket-Protocol header.");if(-1===this.protocols.indexOf(this.protocol))return void this.failHandshake("Server did not respond with a requested protocol.")}if(e.connection&&"upgrade"===e.connection.toLocaleLowerCase())if(e.upgrade&&"websocket"===e.upgrade.toLocaleLowerCase()){var t=l.createHash("sha1");t.update(this.base64nonce+"258EAFA5-E914-47DA-95CA-C5AB0DC85B11");var r=t.digest("base64");e["sec-websocket-accept"]?e["sec-websocket-accept"]===r?this.succeedHandshake():this.failHandshake("Sec-WebSocket-Accept header from server didn't match expected value of "+r):this.failHandshake("Expected Sec-WebSocket-Accept header from server")}else this.failHandshake("Expected an Upgrade: websocket header from the server");else this.failHandshake("Expected a Connection: Upgrade header from the server")},y.prototype.failHandshake=function(e){this.socket&&this.socket.writable&&this.socket.end(),this.emit("connectFailed",new Error(e))},y.prototype.succeedHandshake=function(){var e=new f(this.socket,[],this.protocol,!0,this.config);e.webSocketVersion=this.config.webSocketVersion,e._addSocketEventListeners(),this.emit("connect",e),this.firstDataChunk.length>0&&e.handleSocketData(this.firstDataChunk),this.firstDataChunk=null},y.prototype.abort=function(){this._req&&this._req.abort()},e.exports=y},6881:(e,t,r)=>{var n=r(39023),o=r(30323),i=r(24434).EventEmitter,s=r(81232),a=r(73325),c=r(82726),u=o.bufferAllocUnsafe,l=o.bufferFromString,f="open",h="peer_requested_close",p="ending",d="closed",y="setImmediate"in global?global.setImmediate.bind(global):process.nextTick.bind(process),m=0;function v(e,t,r,n,c){if(this._debug=o.BufferingLogger("websocket:connection",++m),this._debug("constructor"),this._debug.enabled&&function(e,t){if(e._debug.enabled){var r=t.emit;for(var n in t.emit=function(t){e._debug("||| Socket Event '%s'",t),r.apply(this,arguments)},t)"function"==typeof t[n]&&-1===["emit"].indexOf(n)&&function(r){var n=t[r];t[r]="on"!==r?function(){return e._debug("||| Socket method called: %s",r),n.apply(this,arguments)}:function(){return e._debug("||| Socket method called: %s (%s)",r,arguments[0]),n.apply(this,arguments)}}(n)}}(this,e),i.call(this),this._pingListenerCount=0,this.on("newListener",(function(e){"ping"===e&&this._pingListenerCount++})).on("removeListener",(function(e){"ping"===e&&this._pingListenerCount--})),this.config=c,this.socket=e,this.protocol=r,this.extensions=t,this.remoteAddress=e.remoteAddress,this.closeReasonCode=-1,this.closeDescription=null,this.closeEventEmitted=!1,this.maskOutgoingPackets=n,this.maskBytes=u(4),this.frameHeader=u(10),this.bufferList=new a,this.currentFrame=new s(this.maskBytes,this.frameHeader,this.config),this.fragmentationSize=0,this.frameQueue=[],this.connected=!0,this.state=f,this.waitingForCloseResponse=!1,this.receivedEnd=!1,this.closeTimeout=this.config.closeTimeout,this.assembleFragments=this.config.assembleFragments,this.maxReceivedMessageSize=this.config.maxReceivedMessageSize,this.outputBufferFull=!1,this.inputPaused=!1,this.receivedDataHandler=this.processReceivedData.bind(this),this._closeTimerHandler=this.handleCloseTimer.bind(this),this.socket.setNoDelay(this.config.disableNagleAlgorithm),this.socket.setTimeout(0),this.config.keepalive&&!this.config.useNativeKeepalive){if("number"!=typeof this.config.keepaliveInterval)throw new Error("keepaliveInterval must be specified and numeric if keepalive is true.");if(this._keepaliveTimerHandler=this.handleKeepaliveTimer.bind(this),this.setKeepaliveTimer(),this.config.dropConnectionOnKeepaliveTimeout){if("number"!=typeof this.config.keepaliveGracePeriod)throw new Error("keepaliveGracePeriod must be specified and numeric if dropConnectionOnKeepaliveTimeout is true.");this._gracePeriodTimerHandler=this.handleGracePeriodTimer.bind(this)}}else if(this.config.keepalive&&this.config.useNativeKeepalive){if(!("setKeepAlive"in this.socket))throw new Error("Unable to use native keepalive: unsupported by this version of Node.");this.socket.setKeepAlive(!0,this.config.keepaliveInterval)}this.socket.removeAllListeners("error")}function g(e){return!(e<1e3)&&(e>=1e3&&e<=2999?-1!==[1e3,1001,1002,1003,1007,1008,1009,1010,1011,1012,1013,1014,1015].indexOf(e):e>=3e3&&e<=3999||e>=4e3&&e<=4999||!(e>=5e3)&&void 0)}v.CLOSE_REASON_NORMAL=1e3,v.CLOSE_REASON_GOING_AWAY=1001,v.CLOSE_REASON_PROTOCOL_ERROR=1002,v.CLOSE_REASON_UNPROCESSABLE_INPUT=1003,v.CLOSE_REASON_RESERVED=1004,v.CLOSE_REASON_NOT_PROVIDED=1005,v.CLOSE_REASON_ABNORMAL=1006,v.CLOSE_REASON_INVALID_DATA=1007,v.CLOSE_REASON_POLICY_VIOLATION=1008,v.CLOSE_REASON_MESSAGE_TOO_BIG=1009,v.CLOSE_REASON_EXTENSION_REQUIRED=1010,v.CLOSE_REASON_INTERNAL_SERVER_ERROR=1011,v.CLOSE_REASON_TLS_HANDSHAKE_FAILED=1015,v.CLOSE_DESCRIPTIONS={1e3:"Normal connection closure",1001:"Remote peer is going away",1002:"Protocol error",1003:"Unprocessable input",1004:"Reserved",1005:"Reason not provided",1006:"Abnormal closure, no further detail available",1007:"Invalid data received",1008:"Policy violation",1009:"Message too big",1010:"Extension requested by client is required",1011:"Internal Server Error",1015:"TLS Handshake Failed"},n.inherits(v,i),v.prototype._addSocketEventListeners=function(){this.socket.on("error",this.handleSocketError.bind(this)),this.socket.on("end",this.handleSocketEnd.bind(this)),this.socket.on("close",this.handleSocketClose.bind(this)),this.socket.on("drain",this.handleSocketDrain.bind(this)),this.socket.on("pause",this.handleSocketPause.bind(this)),this.socket.on("resume",this.handleSocketResume.bind(this)),this.socket.on("data",this.handleSocketData.bind(this))},v.prototype.setKeepaliveTimer=function(){this._debug("setKeepaliveTimer"),this.config.keepalive&&!this.config.useNativeKeepalive&&(this.clearKeepaliveTimer(),this.clearGracePeriodTimer(),this._keepaliveTimeoutID=setTimeout(this._keepaliveTimerHandler,this.config.keepaliveInterval))},v.prototype.clearKeepaliveTimer=function(){this._keepaliveTimeoutID&&clearTimeout(this._keepaliveTimeoutID)},v.prototype.handleKeepaliveTimer=function(){this._debug("handleKeepaliveTimer"),this._keepaliveTimeoutID=null,this.ping(),this.config.dropConnectionOnKeepaliveTimeout?this.setGracePeriodTimer():this.setKeepaliveTimer()},v.prototype.setGracePeriodTimer=function(){this._debug("setGracePeriodTimer"),this.clearGracePeriodTimer(),this._gracePeriodTimeoutID=setTimeout(this._gracePeriodTimerHandler,this.config.keepaliveGracePeriod)},v.prototype.clearGracePeriodTimer=function(){this._gracePeriodTimeoutID&&clearTimeout(this._gracePeriodTimeoutID)},v.prototype.handleGracePeriodTimer=function(){this._debug("handleGracePeriodTimer"),this._gracePeriodTimeoutID=null,this.drop(v.CLOSE_REASON_ABNORMAL,"Peer not responding.",!0)},v.prototype.handleSocketData=function(e){this._debug("handleSocketData"),this.setKeepaliveTimer(),this.bufferList.write(e),this.processReceivedData()},v.prototype.processReceivedData=function(){if(this._debug("processReceivedData"),this.connected&&!this.inputPaused){var e=this.currentFrame;if(e.addData(this.bufferList)){var t=this;if(e.protocolError)return this._debug("-- protocol error"),void process.nextTick((function(){t.drop(v.CLOSE_REASON_PROTOCOL_ERROR,e.dropReason)}));if(e.frameTooLarge)return this._debug("-- frame too large"),void process.nextTick((function(){t.drop(v.CLOSE_REASON_MESSAGE_TOO_BIG,e.dropReason)}));if(e.rsv1||e.rsv2||e.rsv3)return this._debug("-- illegal rsv flag"),void process.nextTick((function(){t.drop(v.CLOSE_REASON_PROTOCOL_ERROR,"Unsupported usage of rsv bits without negotiated extension.")}));this.assembleFragments||(this._debug("-- emitting frame"),process.nextTick((function(){t.emit("frame",e)}))),process.nextTick((function(){t.processFrame(e)})),this.currentFrame=new s(this.maskBytes,this.frameHeader,this.config),this.bufferList.length>0&&y(this.receivedDataHandler)}else this._debug("-- insufficient data for frame")}},v.prototype.handleSocketError=function(e){this._debug("handleSocketError: %j",e),this.state!==d?(this.closeReasonCode=v.CLOSE_REASON_ABNORMAL,this.closeDescription="Socket Error: "+e.syscall+" "+e.code,this.connected=!1,this.state=d,this.fragmentationSize=0,o.eventEmitterListenerCount(this,"error")>0&&this.emit("error",e),this.socket.destroy(),this._debug.printOutput()):this._debug(" --- Socket 'error' after 'close'")},v.prototype.handleSocketEnd=function(){this._debug("handleSocketEnd: received socket end. state = %s",this.state),this.receivedEnd=!0,this.state!==d?this.state!==h&&this.state!==p&&(this._debug(" --- UNEXPECTED socket end."),this.socket.end()):this._debug(" --- Socket 'end' after 'close'")},v.prototype.handleSocketClose=function(e){this._debug("handleSocketClose: received socket close"),this.socketHadError=e,this.connected=!1,this.state=d,-1===this.closeReasonCode&&(this.closeReasonCode=v.CLOSE_REASON_ABNORMAL,this.closeDescription="Connection dropped by remote peer."),this.clearCloseTimer(),this.clearKeepaliveTimer(),this.clearGracePeriodTimer(),this.closeEventEmitted||(this.closeEventEmitted=!0,this._debug("-- Emitting WebSocketConnection close event"),this.emit("close",this.closeReasonCode,this.closeDescription))},v.prototype.handleSocketDrain=function(){this._debug("handleSocketDrain: socket drain event"),this.outputBufferFull=!1,this.emit("drain")},v.prototype.handleSocketPause=function(){this._debug("handleSocketPause: socket pause event"),this.inputPaused=!0,this.emit("pause")},v.prototype.handleSocketResume=function(){this._debug("handleSocketResume: socket resume event"),this.inputPaused=!1,this.emit("resume"),this.processReceivedData()},v.prototype.pause=function(){this._debug("pause: pause requested"),this.socket.pause()},v.prototype.resume=function(){this._debug("resume: resume requested"),this.socket.resume()},v.prototype.close=function(e,t){if(this.connected){if(this._debug("close: Initating clean WebSocket close sequence."),"number"!=typeof e&&(e=v.CLOSE_REASON_NORMAL),!g(e))throw new Error("Close code "+e+" is not valid.");"string"!=typeof t&&(t=v.CLOSE_DESCRIPTIONS[e]),this.closeReasonCode=e,this.closeDescription=t,this.setCloseTimer(),this.sendCloseFrame(this.closeReasonCode,this.closeDescription),this.state=p,this.connected=!1}},v.prototype.drop=function(e,t,r){this._debug("drop"),"number"!=typeof e&&(e=v.CLOSE_REASON_PROTOCOL_ERROR),"string"!=typeof t&&(t=v.CLOSE_DESCRIPTIONS[e]),this._debug("Forcefully dropping connection. skipCloseFrame: %s, code: %d, description: %s",r,e,t),this.closeReasonCode=e,this.closeDescription=t,this.frameQueue=[],this.fragmentationSize=0,r||this.sendCloseFrame(e,t),this.connected=!1,this.state=d,this.clearCloseTimer(),this.clearKeepaliveTimer(),this.clearGracePeriodTimer(),this.closeEventEmitted||(this.closeEventEmitted=!0,this._debug("Emitting WebSocketConnection close event"),this.emit("close",this.closeReasonCode,this.closeDescription)),this._debug("Drop: destroying socket"),this.socket.destroy()},v.prototype.setCloseTimer=function(){this._debug("setCloseTimer"),this.clearCloseTimer(),this._debug("Setting close timer"),this.waitingForCloseResponse=!0,this.closeTimer=setTimeout(this._closeTimerHandler,this.closeTimeout)},v.prototype.clearCloseTimer=function(){this._debug("clearCloseTimer"),this.closeTimer&&(this._debug("Clearing close timer"),clearTimeout(this.closeTimer),this.waitingForCloseResponse=!1,this.closeTimer=null)},v.prototype.handleCloseTimer=function(){this._debug("handleCloseTimer"),this.closeTimer=null,this.waitingForCloseResponse&&(this._debug("Close response not received from client. Forcing socket end."),this.waitingForCloseResponse=!1,this.state=d,this.socket.end())},v.prototype.processFrame=function(e){if(this._debug("processFrame"),this._debug(" -- frame: %s",e),0!==this.frameQueue.length&&e.opcode>0&&e.opcode<8)this.drop(v.CLOSE_REASON_PROTOCOL_ERROR,"Illegal frame opcode 0x"+e.opcode.toString(16)+" received in middle of fragmented message.");else switch(e.opcode){case 2:this._debug("-- Binary Frame"),this.assembleFragments&&(e.fin?(this._debug("---- Emitting 'message' event"),this.emit("message",{type:"binary",binaryData:e.binaryPayload})):(this.frameQueue.push(e),this.fragmentationSize=e.length));break;case 1:if(this._debug("-- Text Frame"),this.assembleFragments)if(e.fin){if(!c(e.binaryPayload))return void this.drop(v.CLOSE_REASON_INVALID_DATA,"Invalid UTF-8 Data Received");this._debug("---- Emitting 'message' event"),this.emit("message",{type:"utf8",utf8Data:e.binaryPayload.toString("utf8")})}else this.frameQueue.push(e),this.fragmentationSize=e.length;break;case 0:if(this._debug("-- Continuation Frame"),this.assembleFragments){if(0===this.frameQueue.length)return void this.drop(v.CLOSE_REASON_PROTOCOL_ERROR,"Unexpected Continuation Frame");if(this.fragmentationSize+=e.length,this.fragmentationSize>this.maxReceivedMessageSize)return void this.drop(v.CLOSE_REASON_MESSAGE_TOO_BIG,"Maximum message size exceeded.");if(this.frameQueue.push(e),e.fin){var t=0,r=u(this.fragmentationSize),n=this.frameQueue[0].opcode;switch(this.frameQueue.forEach((function(e){e.binaryPayload.copy(r,t),t+=e.binaryPayload.length})),this.frameQueue=[],this.fragmentationSize=0,n){case 2:this.emit("message",{type:"binary",binaryData:r});break;case 1:if(!c(r))return void this.drop(v.CLOSE_REASON_INVALID_DATA,"Invalid UTF-8 Data Received");this.emit("message",{type:"utf8",utf8Data:r.toString("utf8")});break;default:return void this.drop(v.CLOSE_REASON_PROTOCOL_ERROR,"Unexpected first opcode in fragmentation sequence: 0x"+n.toString(16))}}}break;case 9:if(this._debug("-- Ping Frame"),this._pingListenerCount>0){var o=!1;this.emit("ping",(function(){o=!0}),e.binaryPayload),o||this.pong(e.binaryPayload)}else this.pong(e.binaryPayload);break;case 10:this._debug("-- Pong Frame"),this.emit("pong",e.binaryPayload);break;case 8:if(this._debug("-- Close Frame"),this.waitingForCloseResponse)return this._debug("---- Got close response from peer. Completing closing handshake."),this.clearCloseTimer(),this.waitingForCloseResponse=!1,this.state=d,void this.socket.end();var i;if(this._debug("---- Closing handshake initiated by peer."),this.state=h,e.invalidCloseFrameLength?(this.closeReasonCode=1005,i=v.CLOSE_REASON_PROTOCOL_ERROR):-1===e.closeStatus||g(e.closeStatus)?(this.closeReasonCode=e.closeStatus,i=v.CLOSE_REASON_NORMAL):(this.closeReasonCode=e.closeStatus,i=v.CLOSE_REASON_PROTOCOL_ERROR),e.binaryPayload.length>1){if(!c(e.binaryPayload))return void this.drop(v.CLOSE_REASON_INVALID_DATA,"Invalid UTF-8 Data Received");this.closeDescription=e.binaryPayload.toString("utf8")}else this.closeDescription=v.CLOSE_DESCRIPTIONS[this.closeReasonCode];this._debug("------ Remote peer %s - code: %d - %s - close frame payload length: %d",this.remoteAddress,this.closeReasonCode,this.closeDescription,e.length),this._debug("------ responding to remote peer's close request."),this.sendCloseFrame(i,null),this.connected=!1;break;default:this._debug("-- Unrecognized Opcode %d",e.opcode),this.drop(v.CLOSE_REASON_PROTOCOL_ERROR,"Unrecognized Opcode: 0x"+e.opcode.toString(16))}},v.prototype.send=function(e,t){if(this._debug("send"),Buffer.isBuffer(e))this.sendBytes(e,t);else{if("function"!=typeof e.toString)throw new Error("Data provided must either be a Node Buffer or implement toString()");this.sendUTF(e,t)}},v.prototype.sendUTF=function(e,t){e=l(e.toString(),"utf8"),this._debug("sendUTF: %d bytes",e.length);var r=new s(this.maskBytes,this.frameHeader,this.config);r.opcode=1,r.binaryPayload=e,this.fragmentAndSend(r,t)},v.prototype.sendBytes=function(e,t){if(this._debug("sendBytes"),!Buffer.isBuffer(e))throw new Error("You must pass a Node Buffer object to WebSocketConnection.prototype.sendBytes()");var r=new s(this.maskBytes,this.frameHeader,this.config);r.opcode=2,r.binaryPayload=e,this.fragmentAndSend(r,t)},v.prototype.ping=function(e){this._debug("ping");var t=new s(this.maskBytes,this.frameHeader,this.config);t.opcode=9,t.fin=!0,e&&(Buffer.isBuffer(e)||(e=l(e.toString(),"utf8")),e.length>125&&(this._debug("WebSocket: Data for ping is longer than 125 bytes. Truncating."),e=e.slice(0,124)),t.binaryPayload=e),this.sendFrame(t)},v.prototype.pong=function(e){this._debug("pong");var t=new s(this.maskBytes,this.frameHeader,this.config);t.opcode=10,Buffer.isBuffer(e)&&e.length>125&&(this._debug("WebSocket: Data for pong is longer than 125 bytes. Truncating."),e=e.slice(0,124)),t.binaryPayload=e,t.fin=!0,this.sendFrame(t)},v.prototype.fragmentAndSend=function(e,t){if(this._debug("fragmentAndSend"),e.opcode>7)throw new Error("You cannot fragment control frames.");var r=this.config.fragmentationThreshold,n=e.binaryPayload.length;if(!this.config.fragmentOutgoingMessages||e.binaryPayload&&n<=r)return e.fin=!0,void this.sendFrame(e,t);for(var o=Math.ceil(n/r),i=0,a=function(e){e?"function"==typeof t&&(t(e),t=null):++i===o&&"function"==typeof t&&t()},c=1;c<=o;c++){var u=new s(this.maskBytes,this.frameHeader,this.config);u.opcode=1===c?e.opcode:0,u.fin=c===o;var l=c===o?n-r*(c-1):r,f=r*(c-1);u.binaryPayload=e.binaryPayload.slice(f,f+l),this.sendFrame(u,a)}},v.prototype.sendCloseFrame=function(e,t,r){if("number"!=typeof e&&(e=v.CLOSE_REASON_NORMAL),this._debug("sendCloseFrame state: %s, reasonCode: %d, description: %s",this.state,e,t),this.state===f||this.state===h){var n=new s(this.maskBytes,this.frameHeader,this.config);n.fin=!0,n.opcode=8,n.closeStatus=e,"string"==typeof t&&(n.binaryPayload=l(t,"utf8")),this.sendFrame(n,r),this.socket.end()}},v.prototype.sendFrame=function(e,t){this._debug("sendFrame"),e.mask=this.maskOutgoingPackets;var r=this.socket.write(e.toBuffer(),t);return this.outputBufferFull=!r,r},e.exports=v},81232:(e,t,r)=>{var n=r(87893),o=r(30323).bufferAllocUnsafe;function i(e,t,r){this.maskBytes=e,this.frameHeader=t,this.config=r,this.maxReceivedFrameSize=r.maxReceivedFrameSize,this.protocolError=!1,this.frameTooLarge=!1,this.invalidCloseFrameLength=!1,this.parseState=1,this.closeStatus=-1}i.prototype.addData=function(e){if(1===this.parseState&&e.length>=2){e.joinInto(this.frameHeader,0,0,2),e.advance(2);var t=this.frameHeader[0],r=this.frameHeader[1];if(this.fin=Boolean(128&t),this.rsv1=Boolean(64&t),this.rsv2=Boolean(32&t),this.rsv3=Boolean(16&t),this.mask=Boolean(128&r),this.opcode=15&t,this.length=127&r,this.opcode>=8){if(this.length>125)return this.protocolError=!0,this.dropReason="Illegal control frame longer than 125 bytes.",!0;if(!this.fin)return this.protocolError=!0,this.dropReason="Control frames must not be fragmented.",!0}126===this.length?this.parseState=2:127===this.length?this.parseState=3:this.parseState=4}if(2===this.parseState)e.length>=2&&(e.joinInto(this.frameHeader,2,0,2),e.advance(2),this.length=this.frameHeader.readUInt16BE(2),this.parseState=4);else if(3===this.parseState&&e.length>=8){e.joinInto(this.frameHeader,2,0,8),e.advance(8);var i=[this.frameHeader.readUInt32BE(2),this.frameHeader.readUInt32BE(6)];if(0!==i[0])return this.protocolError=!0,this.dropReason="Unsupported 64-bit length frame received",!0;this.length=i[1],this.parseState=4}if(4===this.parseState&&(this.mask?e.length>=4&&(e.joinInto(this.maskBytes,0,0,4),e.advance(4),this.parseState=5):this.parseState=5),5===this.parseState){if(this.length>this.maxReceivedFrameSize)return this.frameTooLarge=!0,this.dropReason="Frame size of "+this.length.toString(10)+" bytes exceeds maximum accepted frame size",!0;if(0===this.length)return this.binaryPayload=o(0),this.parseState=6,!0;if(e.length>=this.length)return this.binaryPayload=e.take(this.length),e.advance(this.length),this.mask&&n.unmask(this.binaryPayload,this.maskBytes),8===this.opcode&&(1===this.length&&(this.binaryPayload=o(0),this.invalidCloseFrameLength=!0),this.length>=2&&(this.closeStatus=this.binaryPayload.readUInt16BE(0),this.binaryPayload=this.binaryPayload.slice(2))),this.parseState=6,!0}return!1},i.prototype.throwAwayPayload=function(e){return e.length>=this.length&&(e.advance(this.length),this.parseState=6,!0)},i.prototype.toBuffer=function(e){var t,r,i,s=2,a=0,c=0;this.fin&&(a|=128),this.rsv1&&(a|=64),this.rsv2&&(a|=32),this.rsv3&&(a|=16),this.mask&&(c|=128),a|=15&this.opcode,8===this.opcode?(this.length=2,this.binaryPayload&&(this.length+=this.binaryPayload.length),(r=o(this.length)).writeUInt16BE(this.closeStatus,0),this.length>2&&this.binaryPayload.copy(r,2)):this.binaryPayload?(r=this.binaryPayload,this.length=r.length):this.length=0,this.length<=125?c|=127&this.length:this.length>125&&this.length<=65535?(c|=126,s+=2):this.length>65535&&(c|=127,s+=8);var u=o(this.length+s+(this.mask?4:0));return u[0]=a,u[1]=c,i=2,this.length>125&&this.length<=65535?(u.writeUInt16BE(this.length,i),i+=2):this.length>65535&&(u.writeUInt32BE(0,i),u.writeUInt32BE(this.length,i+4),i+=8),this.mask?(t=e?0:4294967295*Math.random()>>>0,this.maskBytes.writeUInt32BE(t,0),this.maskBytes.copy(u,i),i+=4,r&&n.mask(r,this.maskBytes,u,i,this.length)):r&&r.copy(u,i),u},i.prototype.toString=function(){return"Opcode: "+this.opcode+", fin: "+this.fin+", length: "+this.length+", hasPayload: "+Boolean(this.binaryPayload)+", masked: "+this.mask},e.exports=i},49244:(e,t,r)=>{for(var n=r(76982),o=r(39023),i=r(87016),s=r(24434).EventEmitter,a=r(6881),c=/,\s*/,u=/;\s*/,l=/[\r\n]/g,f=/,\s*/,h=["(",")","<",">","@",",",";",":","\\",'"',"/","[","]","?","=","{","}"," ",String.fromCharCode(9)],p=[String.fromCharCode(127)],d=0;d<31;d++)p.push(String.fromCharCode(d));var y=/([\x00-\x20\x22\x28\x29\x2c\x2f\x3a-\x3f\x40\x5b-\x5e\x7b\x7d\x7f])/,m=/[^\x21\x23-\x2b\x2d-\x3a\x3c-\x5b\x5d-\x7e]/,v=/^"[^"]*"$/,g=/[\x00-\x20\x3b]/g,b=/[;,] */,w={100:"Continue",101:"Switching Protocols",200:"OK",201:"Created",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",406:"Not Acceptable",407:"Proxy Authorization Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Request Entity Too Long",414:"Request-URI Too Long",415:"Unsupported Media Type",416:"Requested Range Not Satisfiable",417:"Expectation Failed",426:"Upgrade Required",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported"};function _(e,t,r){s.call(this),this.socket=e,this.httpRequest=t,this.resource=t.url,this.remoteAddress=e.remoteAddress,this.remoteAddresses=[this.remoteAddress],this.serverConfig=r,this._socketIsClosing=!1,this._socketCloseHandler=this._handleSocketCloseBeforeAccept.bind(this),this.socket.on("end",this._socketCloseHandler),this.socket.on("close",this._socketCloseHandler),this._resolved=!1}function S(e){process.nextTick((function(){e.drop(1006,"TCP connection lost before handshake completed.",!0)}))}o.inherits(_,s),_.prototype.readHandshake=function(){var e=this,t=this.httpRequest;if(this.resourceURL=i.parse(this.resource,!0),this.host=t.headers.host,!this.host)throw new Error("Client must provide a Host header.");if(this.key=t.headers["sec-websocket-key"],!this.key)throw new Error("Client must provide a value for Sec-WebSocket-Key.");if(this.webSocketVersion=parseInt(t.headers["sec-websocket-version"],10),!this.webSocketVersion||isNaN(this.webSocketVersion))throw new Error("Client must provide a value for Sec-WebSocket-Version.");switch(this.webSocketVersion){case 8:case 13:break;default:var r=new Error("Unsupported websocket client version: "+this.webSocketVersion+"Only versions 8 and 13 are supported.");throw r.httpCode=426,r.headers={"Sec-WebSocket-Version":"13"},r}13===this.webSocketVersion?this.origin=t.headers.origin:8===this.webSocketVersion&&(this.origin=t.headers["sec-websocket-origin"]);var n=t.headers["sec-websocket-protocol"];if(this.protocolFullCaseMap={},this.requestedProtocols=[],n&&n.split(c).forEach((function(t){var r=t.toLocaleLowerCase();e.requestedProtocols.push(r),e.protocolFullCaseMap[r]=t})),!this.serverConfig.ignoreXForwardedFor&&t.headers["x-forwarded-for"]){var o=this.remoteAddress;this.remoteAddresses=t.headers["x-forwarded-for"].split(f),this.remoteAddresses.push(o),this.remoteAddress=this.remoteAddresses[0]}if(this.serverConfig.parseExtensions){var s=t.headers["sec-websocket-extensions"];this.requestedExtensions=this.parseExtensions(s)}else this.requestedExtensions=[];if(this.serverConfig.parseCookies){var a=t.headers.cookie;this.cookies=this.parseCookies(a)}else this.cookies=[]},_.prototype.parseExtensions=function(e){if(!e||0===e.length)return[];var t=e.toLocaleLowerCase().split(c);return t.forEach((function(e,t,r){var n=e.split(u),o=n[0],i=n.slice(1);i.forEach((function(e,t,r){var n=e.split("="),o={name:n[0],value:n[1]};r.splice(t,1,o)}));var s={name:o,params:i};r.splice(t,1,s)})),t},_.prototype.parseCookies=function(e){if(!e||"string"!=typeof e)return[];var t=[];return e.split(b).forEach((function(e){var r=e.indexOf("=");if(-1!==r){var n=e.substr(0,r).trim(),o=e.substr(++r,e.length).trim();'"'===o[0]&&(o=o.slice(1,-1)),t.push({name:n,value:decodeURIComponent(o)})}else t.push({name:e,value:null})})),t},_.prototype.accept=function(e,t,r){var o;this._verifyResolution(),e?void 0===(o=this.protocolFullCaseMap[e.toLocaleLowerCase()])&&(o=e):o=e,this.protocolFullCaseMap=null;var i=n.createHash("sha1");i.update(this.key+"258EAFA5-E914-47DA-95CA-C5AB0DC85B11");var s="HTTP/1.1 101 Switching Protocols\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Accept: "+i.digest("base64")+"\r\n";if(o){for(var c=0;c<o.length;c++){var u=o.charCodeAt(c),f=o.charAt(c);if(u<33||u>126||-1!==h.indexOf(f))throw this.reject(500),new Error('Illegal character "'+String.fromCharCode(f)+'" in subprotocol.')}if(-1===this.requestedProtocols.indexOf(e))throw this.reject(500),new Error("Specified protocol was not requested by the client.");o=o.replace(l,""),s+="Sec-WebSocket-Protocol: "+o+"\r\n"}if(this.requestedProtocols=null,t&&(t=t.replace(l,""),13===this.webSocketVersion?s+="Origin: "+t+"\r\n":8===this.webSocketVersion&&(s+="Sec-WebSocket-Origin: "+t+"\r\n")),r){if(!Array.isArray(r))throw this.reject(500),new Error('Value supplied for "cookies" argument must be an array.');var p={};r.forEach(function(e){if(!e.name||!e.value)throw this.reject(500),new Error('Each cookie to set must at least provide a "name" and "value"');if(e.name=e.name.replace(g,""),e.value=e.value.replace(g,""),p[e.name])throw this.reject(500),new Error("You may not specify the same cookie name twice.");p[e.name]=!0;var t=e.name.match(y);if(t)throw this.reject(500),new Error("Illegal character "+t[0]+" in cookie name");if(t=e.value.match(v)?e.value.slice(1,-1).match(m):e.value.match(m))throw this.reject(500),new Error("Illegal character "+t[0]+" in cookie value");var r=[e.name+"="+e.value];if(e.path){if(t=e.path.match(g))throw this.reject(500),new Error("Illegal character "+t[0]+" in cookie path");r.push("Path="+e.path)}if(e.domain){if("string"!=typeof e.domain)throw this.reject(500),new Error("Domain must be specified and must be a string.");if(t=e.domain.match(g))throw this.reject(500),new Error("Illegal character "+t[0]+" in cookie domain");r.push("Domain="+e.domain.toLowerCase())}if(e.expires){if(!(e.expires instanceof Date))throw this.reject(500),new Error('Value supplied for cookie "expires" must be a vaild date object');r.push("Expires="+e.expires.toGMTString())}if(e.maxage){var n=e.maxage;if("string"==typeof n&&(n=parseInt(n,10)),isNaN(n)||n<=0)throw this.reject(500),new Error('Value supplied for cookie "maxage" must be a non-zero number');n=Math.round(n),r.push("Max-Age="+n.toString(10))}if(e.secure){if("boolean"!=typeof e.secure)throw this.reject(500),new Error('Value supplied for cookie "secure" must be of type boolean');r.push("Secure")}if(e.httponly){if("boolean"!=typeof e.httponly)throw this.reject(500),new Error('Value supplied for cookie "httponly" must be of type boolean');r.push("HttpOnly")}s+="Set-Cookie: "+r.join(";")+"\r\n"}.bind(this))}this._resolved=!0,this.emit("requestResolved",this),s+="\r\n";var d=new a(this.socket,[],e,!1,this.serverConfig);d.webSocketVersion=this.webSocketVersion,d.remoteAddress=this.remoteAddress,d.remoteAddresses=this.remoteAddresses;var b=this;return this._socketIsClosing?S(d):this.socket.write(s,"ascii",(function(e){e?S(d):(b._removeSocketCloseListeners(),d._addSocketEventListeners())})),this.emit("requestAccepted",d),d},_.prototype.reject=function(e,t,r){this._verifyResolution(),this._resolved=!0,this.emit("requestResolved",this),"number"!=typeof e&&(e=403);var n="HTTP/1.1 "+e+" "+w[e]+"\r\nConnection: close\r\n";if(t&&(n+="X-WebSocket-Reject-Reason: "+(t=t.replace(l,""))+"\r\n"),r)for(var o in r){var i=r[o].toString().replace(l,"");n+=o.replace(l,"")+": "+i+"\r\n"}n+="\r\n",this.socket.end(n,"ascii"),this.emit("requestRejected",this)},_.prototype._handleSocketCloseBeforeAccept=function(){this._socketIsClosing=!0,this._removeSocketCloseListeners()},_.prototype._removeSocketCloseListeners=function(){this.socket.removeListener("end",this._socketCloseHandler),this.socket.removeListener("close",this._socketCloseHandler)},_.prototype._verifyResolution=function(){if(this._resolved)throw new Error("WebSocketRequest may only be accepted or rejected one time.")},e.exports=_},56912:(e,t,r)=>{var n=r(30323).extend,o=r(39023),i=r(24434).EventEmitter,s=r(38099);function a(e){i.call(this),this.config={server:null},e&&n(this.config,e),this.handlers=[],this._requestHandler=this.handleRequest.bind(this),this.config.server&&this.attachServer(this.config.server)}o.inherits(a,i),a.prototype.attachServer=function(e){if(!e)throw new Error("You must specify a WebSocketServer instance to attach to.");this.server=e,this.server.on("request",this._requestHandler)},a.prototype.detachServer=function(){if(!this.server)throw new Error("Cannot detach from server: not attached.");this.server.removeListener("request",this._requestHandler),this.server=null},a.prototype.mount=function(e,t,r){if(!e)throw new Error("You must specify a path for this handler.");if(t||(t="____no_protocol____"),!r)throw new Error("You must specify a callback for this handler.");if(!((e=this.pathToRegExp(e))instanceof RegExp))throw new Error("Path must be specified as either a string or a RegExp.");var n=e.toString();if(t=t.toLocaleLowerCase(),-1!==this.findHandlerIndex(n,t))throw new Error("You may only mount one handler per path/protocol combination.");this.handlers.push({path:e,pathString:n,protocol:t,callback:r})},a.prototype.unmount=function(e,t){var r=this.findHandlerIndex(this.pathToRegExp(e).toString(),t);if(-1===r)throw new Error("Unable to find a route matching the specified path and protocol.");this.handlers.splice(r,1)},a.prototype.findHandlerIndex=function(e,t){t=t.toLocaleLowerCase();for(var r=0,n=this.handlers.length;r<n;r++){var o=this.handlers[r];if(o.pathString===e&&o.protocol===t)return r}return-1},a.prototype.pathToRegExp=function(e){return"string"==typeof e&&("*"===e?e=/^.*$/:(e=e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),e=new RegExp("^"+e+"$"))),e},a.prototype.handleRequest=function(e){var t=e.requestedProtocols;0===t.length&&(t=["____no_protocol____"]);for(var r=0;r<t.length;r++)for(var n=t[r].toLocaleLowerCase(),o=0,i=this.handlers.length;o<i;o++){var a=this.handlers[o];if(a.path.test(e.resourceURL.pathname)&&(n===a.protocol||"*"===a.protocol)){var c=new s(e,n);return void a.callback(c)}}e.reject(404,"No handler is available for the given request.")},e.exports=a},38099:(e,t,r)=>{var n=r(39023),o=r(24434).EventEmitter;function i(e,t){o.call(this),this.webSocketRequest=e,this.protocol="____no_protocol____"===t?null:t,this.origin=e.origin,this.resource=e.resource,this.resourceURL=e.resourceURL,this.httpRequest=e.httpRequest,this.remoteAddress=e.remoteAddress,this.webSocketVersion=e.webSocketVersion,this.requestedExtensions=e.requestedExtensions,this.cookies=e.cookies}n.inherits(i,o),i.prototype.accept=function(e,t){var r=this.webSocketRequest.accept(this.protocol,e,t);return this.emit("requestAccepted",r),r},i.prototype.reject=function(e,t,r){this.webSocketRequest.reject(e,t,r),this.emit("requestRejected",this)},e.exports=i},27446:(e,t,r)=>{var n=r(30323).extend,o=r(30323),i=r(39023),s=r(13740)("websocket:server"),a=r(24434).EventEmitter,c=r(49244),u=function(e){a.call(this),this._handlers={upgrade:this.handleUpgrade.bind(this),requestAccepted:this.handleRequestAccepted.bind(this),requestResolved:this.handleRequestResolved.bind(this)},this.connections=[],this.pendingRequests=[],e&&this.mount(e)};i.inherits(u,a),u.prototype.mount=function(e){if(this.config={httpServer:null,maxReceivedFrameSize:65536,maxReceivedMessageSize:1048576,fragmentOutgoingMessages:!0,fragmentationThreshold:16384,keepalive:!0,keepaliveInterval:2e4,dropConnectionOnKeepaliveTimeout:!0,keepaliveGracePeriod:1e4,useNativeKeepalive:!1,assembleFragments:!0,autoAcceptConnections:!1,ignoreXForwardedFor:!1,parseCookies:!0,parseExtensions:!0,disableNagleAlgorithm:!0,closeTimeout:5e3},n(this.config,e),!this.config.httpServer)throw new Error("You must specify an httpServer on which to mount the WebSocket server.");Array.isArray(this.config.httpServer)||(this.config.httpServer=[this.config.httpServer]);var t=this._handlers.upgrade;this.config.httpServer.forEach((function(e){e.on("upgrade",t)}))},u.prototype.unmount=function(){var e=this._handlers.upgrade;this.config.httpServer.forEach((function(t){t.removeListener("upgrade",e)}))},u.prototype.closeAllConnections=function(){this.connections.forEach((function(e){e.close()})),this.pendingRequests.forEach((function(e){process.nextTick((function(){e.reject(503)}))}))},u.prototype.broadcast=function(e){Buffer.isBuffer(e)?this.broadcastBytes(e):"function"==typeof e.toString&&this.broadcastUTF(e)},u.prototype.broadcastUTF=function(e){this.connections.forEach((function(t){t.sendUTF(e)}))},u.prototype.broadcastBytes=function(e){this.connections.forEach((function(t){t.sendBytes(e)}))},u.prototype.shutDown=function(){this.unmount(),this.closeAllConnections()},u.prototype.handleUpgrade=function(e,t){var r=this,n=new c(t,e,this.config);try{n.readHandshake()}catch(e){return n.reject(e.httpCode?e.httpCode:400,e.message,e.headers),s("Invalid handshake: %s",e.message),void this.emit("upgradeError",e)}this.pendingRequests.push(n),n.once("requestAccepted",this._handlers.requestAccepted),n.once("requestResolved",this._handlers.requestResolved),t.once("close",(function(){r._handlers.requestResolved(n)})),!this.config.autoAcceptConnections&&o.eventEmitterListenerCount(this,"request")>0?this.emit("request",n):this.config.autoAcceptConnections?n.accept(n.requestedProtocols[0],n.origin):n.reject(404,"No handler is configured to accept the connection.")},u.prototype.handleRequestAccepted=function(e){var t=this;e.once("close",(function(r,n){t.handleConnectionClose(e,r,n)})),this.connections.push(e),this.emit("connect",e)},u.prototype.handleConnectionClose=function(e,t,r){var n=this.connections.indexOf(e);-1!==n&&this.connections.splice(n,1),this.emit("close",e,t,r)},u.prototype.handleRequestResolved=function(e){var t=this.pendingRequests.indexOf(e);-1!==t&&this.pendingRequests.splice(t,1)},e.exports=u},30323:(e,t,r)=>{var n=t.noop=function(){};function o(e,t,r){this.logFunction=r,this.identifier=e,this.uniqueID=t,this.buffer=[]}t.extend=function(e,t){for(var r in t)e[r]=t[r]},t.eventEmitterListenerCount=r(24434).EventEmitter.listenerCount||function(e,t){return e.listeners(t).length},t.bufferAllocUnsafe=Buffer.allocUnsafe?Buffer.allocUnsafe:function(e){return new Buffer(e)},t.bufferFromString=Buffer.from?Buffer.from:function(e,t){return new Buffer(e,t)},t.BufferingLogger=function(e,t){var i=r(13740)(e);if(i.enabled){var s=new o(e,t,i),a=s.log.bind(s);return a.printOutput=s.printOutput.bind(s),a.enabled=i.enabled,a}return i.printOutput=n,i},o.prototype.log=function(){return this.buffer.push([new Date,Array.prototype.slice.call(arguments)]),this},o.prototype.clear=function(){return this.buffer=[],this},o.prototype.printOutput=function(e){e||(e=this.logFunction);var t=this.uniqueID;this.buffer.forEach((function(r){var n=r[0].toLocaleString(),o=r[1].slice(),i=o[0];null!=i&&(i="%s - %s - "+i.toString(),o.splice(0,1,i,n,t),e.apply(global,o))}))}},14118:(e,t,r)=>{e.exports=r(39003).version},23725:(e,t,r)=>{e.exports={server:r(27446),client:r(82418),router:r(56912),frame:r(81232),request:r(49244),connection:r(6881),w3cwebsocket:r(12750),deprecation:r(36788),version:r(14118)}},56568:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e}(t=e.exports=r(90579)).log=function(){return"object"===("undefined"==typeof console?"undefined":n(console))&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var r=this.useColors;if(e[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+e[0]+(r?"%c ":" ")+"+"+t.humanize(this.diff),r){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var o=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(o++,"%c"===e&&(i=o))})),e.splice(i,0,n)}},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=o,t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("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="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(o())},90579:(e,t,r)=>{var n;function o(e){function r(){if(r.enabled){var e=r,o=+new Date,i=o-(n||o);e.diff=i,e.prev=n,e.curr=o,n=o;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var c=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(r,n){if("%%"===r)return r;c++;var o=t.formatters[n];if("function"==typeof o){var i=s[c];r=o.call(e,i),s.splice(c,1),c--}return r})),t.formatArgs.call(e,s),(r.log||t.log||console.log.bind(console)).apply(e,s)}}return r.namespace=e,r.enabled=t.enabled(e),r.useColors=t.useColors(),r.color=function(e){var r,n=0;for(r in e)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]}(e),"function"==typeof t.init&&t.init(r),r}(t=e.exports=o.debug=o.default=o).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){t.save(e),t.names=[],t.skips=[];for(var r=("string"==typeof e?e:"").split(/[\s,]+/),n=r.length,o=0;o<n;o++)r[o]&&("-"===(e=r[o].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){var 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=r(72150),t.names=[],t.skips=[],t.formatters={}},13740:(e,t,r)=>{"undefined"!=typeof process&&"renderer"===process.type?e.exports=r(56568):e.exports=r(64474)},64474:(e,t,r)=>{var n=r(52018),o=r(39023);(t=e.exports=r(90579)).init=function(e){e.inspectOpts={};for(var r=Object.keys(t.inspectOpts),n=0;n<r.length;n++)e.inspectOpts[r[n]]=t.inspectOpts[r[n]]},t.log=function(){return s.write(o.format.apply(o,arguments)+"\n")},t.formatArgs=function(e){var r=this.namespace;if(this.useColors){var n=this.color,o=" [3"+n+";1m"+r+" ";e[0]=o+e[0].split("\n").join("\n"+o),e.push("[3"+n+"m+"+t.humanize(this.diff)+"")}else e[0]=(new Date).toUTCString()+" "+r+" "+e[0]},t.save=function(e){null==e?delete process.env.DEBUG:process.env.DEBUG=e},t.load=a,t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):n.isatty(i)},t.colors=[6,2,3,4,5,1],t.inspectOpts=Object.keys(process.env).filter((function(e){return/^debug_/i.test(e)})).reduce((function(e,t){var r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(function(e,t){return t.toUpperCase()})),n=process.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}),{});var i=parseInt(process.env.DEBUG_FD,10)||2;1!==i&&2!==i&&o.deprecate((function(){}),"except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)")();var s=1===i?process.stdout:2===i?process.stderr:function(e){var t;switch(process.binding("tty_wrap").guessHandleType(e)){case"TTY":(t=new n.WriteStream(e))._type="tty",t._handle&&t._handle.unref&&t._handle.unref();break;case"FILE":(t=new(r(79896).SyncWriteStream)(e,{autoClose:!1}))._type="fs";break;case"PIPE":case"TCP":(t=new(r(69278).Socket)({fd:e,readable:!1,writable:!0})).readable=!1,t.read=null,t._type="pipe",t._handle&&t._handle.unref&&t._handle.unref();break;default:throw new Error("Implement me. Unknown stream file type!")}return t.fd=e,t._isStdio=!0,t}(i);function a(){return process.env.DEBUG}t.formatters.o=function(e){return this.inspectOpts.colors=this.useColors,o.inspect(e,this.inspectOpts).split("\n").map((function(e){return e.trim()})).join(" ")},t.formatters.O=function(e){return this.inspectOpts.colors=this.useColors,o.inspect(e,this.inspectOpts)},t.enable(a())},72150:e=>{function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}var r=1e3,n=60*r,o=60*n,i=24*o;function s(e,t,r){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}e.exports=function(e,a){a=a||{};var c,u=t(e);if("string"===u&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var s=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*o;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(e);if("number"===u&&!1===isNaN(e))return a.long?s(c=e,i,"day")||s(c,o,"hour")||s(c,n,"minute")||s(c,r,"second")||c+" ms":function(e){return e>=i?Math.round(e/i)+"d":e>=o?Math.round(e/o)+"h":e>=n?Math.round(e/n)+"m":e>=r?Math.round(e/r)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},73325:(e,t,r)=>{var n=r(20181).Buffer,o=r(24434).EventEmitter,i=r(30323).bufferAllocUnsafe;function s(e){if(!(this instanceof s))return new s(e);o.call(this);var t=this;void 0===e&&(e={}),t.encoding=e.encoding;var r={next:null,buffer:null},a={next:null,buffer:null},c=0;t.__defineGetter__("length",(function(){return c}));var u=0;t.write=function(e){return r.buffer?(a.next={next:null,buffer:e},a=a.next):(r.buffer=e,a=r),c+=e.length,t.emit("write",e),!0},t.end=function(e){n.isBuffer(e)&&t.write(e)},t.push=function(){return[].concat.apply([],arguments).forEach(t.write),t},t.forEach=function(e){if(!r.buffer)return i(0);if(r.buffer.length-u<=0)return t;for(var n={buffer:r.buffer.slice(u),next:r.next};n&&n.buffer&&!e(n.buffer);)n=n.next;return t},t.join=function(e,n){if(!r.buffer)return i(0);null==e&&(e=0),null==n&&(n=t.length);var o=i(n-e),s=0;return t.forEach((function(t){if(e<s+t.length&&s<n&&t.copy(o,Math.max(0,s-e),Math.max(0,e-s),Math.min(t.length,n-s)),(s+=t.length)>n)return!0})),o},t.joinInto=function(e,n,o,s){if(!r.buffer)return new i(0);null==o&&(o=0),null==s&&(s=t.length);var a=e;if(a.length-n<s-o)throw new Error("Insufficient space available in target Buffer.");var c=0;return t.forEach((function(e){if(o<c+e.length&&c<s&&e.copy(a,Math.max(n,n+c-o),Math.max(0,o-c),Math.min(e.length,s-c)),(c+=e.length)>s)return!0})),a},t.advance=function(e){for(u+=e,c-=e;r.buffer&&u>=r.buffer.length;)u-=r.buffer.length,r=r.next?r.next:{buffer:null,next:null};return null===r.buffer&&(a={next:null,buffer:null}),t.emit("advance",e),t},t.take=function(e,r){if(null==e?e=t.length:"number"!=typeof e&&(r=e,e=t.length),r||(r=t.encoding),r){var n="";return t.forEach((function(t){if(e<=0)return!0;n+=t.toString(r,0,Math.min(e,t.length)),e-=t.length})),n}return t.join(0,e)},t.toString=function(){return t.take("binary")}}e.exports=s,e.exports.BufferList=s,r(39023).inherits(s,o)},37323:(e,t,r)=>{e.exports={EventTarget:r(53938),Event:r(29391)}},29391:e=>{e.exports=function(e){this.type=e,this.isTrusted=!1,this._yaeti=!0}},53938:e=>{function t(){"function"!=typeof this.addEventListener&&(this._listeners={},this.addEventListener=r,this.removeEventListener=n,this.dispatchEvent=o)}function r(e,t){var r,n,o;if(e&&t){for(void 0===(r=this._listeners[e])&&(this._listeners[e]=r=[]),n=0;o=r[n];n++)if(o===t)return;r.push(t)}}function n(e,t){var r,n,o;if(e&&t&&void 0!==(r=this._listeners[e])){for(n=0;o=r[n];n++)if(o===t){r.splice(n,1);break}0===r.length&&delete this._listeners[e]}}function o(e){var t,r,n,o,i,s=!1;if(!e||"string"!=typeof e.type)throw new Error("`event` must have a valid `type` property");e._yaeti&&(e.target=this,e.cancelable=!0);try{e.stopImmediatePropagation=function(){s=!0}}catch(e){}for(t=e.type,r=this._listeners[t]||[],"function"==typeof(n=this["on"+t])&&n.call(this,e),o=0;(i=r[o])&&!s;o++)i.call(this,e);return!e.defaultPrevented}e.exports=t,Object.defineProperties(t.prototype,{listeners:{get:function(){return this._listeners}}})},42613:e=>{"use strict";e.exports=require("assert")},20181:e=>{"use strict";e.exports=require("buffer")},35317:e=>{"use strict";e.exports=require("child_process")},76982:e=>{"use strict";e.exports=require("crypto")},24434:e=>{"use strict";e.exports=require("events")},79896:e=>{"use strict";e.exports=require("fs")},58611:e=>{"use strict";e.exports=require("http")},65692:e=>{"use strict";e.exports=require("https")},50264:e=>{"use strict";e.exports=require("inspector")},69278:e=>{"use strict";e.exports=require("net")},70857:e=>{"use strict";e.exports=require("os")},16928:e=>{"use strict";e.exports=require("path")},82987:e=>{"use strict";e.exports=require("perf_hooks")},2203:e=>{"use strict";e.exports=require("stream")},52018:e=>{"use strict";e.exports=require("tty")},87016:e=>{"use strict";e.exports=require("url")},39023:e=>{"use strict";e.exports=require("util")},69154:e=>{"use strict";e.exports=require("vm")},28167:e=>{"use strict";e.exports=require("worker_threads")},76513:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r.r(t),r.d(t,{__addDisposableResource:()=>N,__assign:()=>s,__asyncDelegator:()=>O,__asyncGenerator:()=>k,__asyncValues:()=>x,__await:()=>C,__awaiter:()=>y,__classPrivateFieldGet:()=>I,__classPrivateFieldIn:()=>j,__classPrivateFieldSet:()=>F,__createBinding:()=>v,__decorate:()=>c,__disposeResources:()=>M,__esDecorate:()=>l,__exportStar:()=>g,__extends:()=>i,__generator:()=>m,__importDefault:()=>P,__importStar:()=>L,__makeTemplateObject:()=>R,__metadata:()=>d,__param:()=>u,__propKey:()=>h,__read:()=>w,__rest:()=>a,__rewriteRelativeImportExtension:()=>U,__runInitializers:()=>f,__setFunctionName:()=>p,__spread:()=>_,__spreadArray:()=>E,__spreadArrays:()=>S,__values:()=>b,default:()=>B});var o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},o(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var s=function(){return s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},s.apply(this,arguments)};function a(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function c(e,t,r,o){var i,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"===("undefined"==typeof Reflect?"undefined":n(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var c=e.length-1;c>=0;c--)(i=e[c])&&(a=(s<3?i(a):s>3?i(t,r,a):i(t,r))||a);return s>3&&a&&Object.defineProperty(t,r,a),a}function u(e,t){return function(r,n){t(r,n,e)}}function l(e,t,r,o,i,s){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var c,u=o.kind,l="getter"===u?"get":"setter"===u?"set":"value",f=!t&&e?o.static?e:e.prototype:null,h=t||(f?Object.getOwnPropertyDescriptor(f,o.name):{}),p=!1,d=r.length-1;d>=0;d--){var y={};for(var m in o)y[m]="access"===m?{}:o[m];for(var m in o.access)y.access[m]=o.access[m];y.addInitializer=function(e){if(p)throw new TypeError("Cannot add initializers after decoration has completed");s.push(a(e||null))};var v=(0,r[d])("accessor"===u?{get:h.get,set:h.set}:h[l],y);if("accessor"===u){if(void 0===v)continue;if(null===v||"object"!==n(v))throw new TypeError("Object expected");(c=a(v.get))&&(h.get=c),(c=a(v.set))&&(h.set=c),(c=a(v.init))&&i.unshift(c)}else(c=a(v))&&("field"===u?i.unshift(c):h[l]=c)}f&&Object.defineProperty(f,o.name,h),p=!0}function f(e,t,r){for(var n=arguments.length>2,o=0;o<t.length;o++)r=n?t[o].call(e,r):t[o].call(e);return n?r:void 0}function h(e){return"symbol"===n(e)?e:"".concat(e)}function p(e,t,r){return"symbol"===n(t)&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function d(e,t){if("object"===("undefined"==typeof Reflect?"undefined":n(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function y(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))}function m(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}var v=Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function g(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||v(t,e,r)}function b(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function w(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}function _(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(w(arguments[t]));return e}function S(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,o++)n[o]=i[s];return n}function E(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function C(e){return this instanceof C?(this.v=e,this):new C(e)}function k(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),i=[];return n=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",(function(e){return function(t){return Promise.resolve(t).then(e,u)}})),n[Symbol.asyncIterator]=function(){return this},n;function s(e,t){o[e]&&(n[e]=function(t){return new Promise((function(r,n){i.push([e,t,r,n])>1||a(e,t)}))},t&&(n[e]=t(n[e])))}function a(e,t){try{(r=o[e](t)).value instanceof C?Promise.resolve(r.value.v).then(c,u):l(i[0][2],r)}catch(e){l(i[0][3],e)}var r}function c(e){a("next",e)}function u(e){a("throw",e)}function l(e,t){e(t),i.shift(),i.length&&a(i[0][0],i[0][1])}}function O(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:C(e[n](t)),done:!1}:o?o(t):t}:o}}function x(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=b(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){!function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}(n,o,(t=e[r](t)).done,t.value)}))}}}function R(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var A=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},T=function(e){return T=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},T(e)};function L(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=T(e),n=0;n<r.length;n++)"default"!==r[n]&&v(t,e,r[n]);return A(t,e),t}function P(e){return e&&e.__esModule?e:{default:e}}function I(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function F(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function j(e,t){if(null===t||"object"!==n(t)&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function N(e,t,r){if(null!=t){if("object"!==n(t)&&"function"!=typeof t)throw new TypeError("Object expected.");var o,i;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");o=t[Symbol.asyncDispose]}if(void 0===o){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");o=t[Symbol.dispose],r&&(i=o)}if("function"!=typeof o)throw new TypeError("Object not disposable.");i&&(o=function(){try{i.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:o,async:r})}else r&&e.stack.push({async:!0});return t}var D="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function M(e){function t(t){e.error=e.hasError?new D(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var r,n=0;return function o(){for(;r=e.stack.pop();)try{if(!r.async&&1===n)return n=0,e.stack.push(r),Promise.resolve().then(o);if(r.dispose){var i=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(i).then(o,(function(e){return t(e),o()}))}else n|=1}catch(e){t(e)}if(1===n)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}function U(e,t){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,(function(e,r,n,o,i){return r?t?".jsx":".js":!n||o&&i?n+o+"."+i.toLowerCase()+"js":e})):e}const B={__extends:i,__assign:s,__rest:a,__decorate:c,__param:u,__esDecorate:l,__runInitializers:f,__propKey:h,__setFunctionName:p,__metadata:d,__awaiter:y,__generator:m,__createBinding:v,__exportStar:g,__values:b,__read:w,__spread:_,__spreadArrays:S,__spreadArray:E,__await:C,__asyncGenerator:k,__asyncDelegator:O,__asyncValues:x,__makeTemplateObject:R,__importStar:L,__importDefault:P,__classPrivateFieldGet:I,__classPrivateFieldSet:F,__classPrivateFieldIn:j,__addDisposableResource:N,__disposeResources:M,__rewriteRelativeImportExtension:U}},39003:e=>{"use strict";e.exports={version:"1.0.35"}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";var e=n;function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function o(){o=function(){return r};var e,r={},n=Object.prototype,i=n.hasOwnProperty,s=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function h(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),a=new P(n||[]);return s(i,"_invoke",{value:R(e,r,a)}),i}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}r.wrap=h;var d="suspendedStart",y="suspendedYield",m="executing",v="completed",g={};function b(){}function w(){}function _(){}var S={};f(S,c,(function(){return this}));var E=Object.getPrototypeOf,C=E&&E(E(I([])));C&&C!==n&&i.call(C,c)&&(S=C);var k=_.prototype=b.prototype=Object.create(S);function O(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,r){function n(o,s,a,c){var u=p(e[o],e,s);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==t(f)&&i.call(f,"__await")?r.resolve(f.__await).then((function(e){n("next",e,a,c)}),(function(e){n("throw",e,a,c)})):r.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,c)}))}c(u.arg)}var o;s(this,"_invoke",{value:function(e,t){function i(){return new r((function(r,o){n(e,t,r,o)}))}return o=o?o.then(i,i):i()}})}function R(t,r,n){var o=d;return function(i,s){if(o===m)throw Error("Generator is already running");if(o===v){if("throw"===i)throw s;return{value:e,done:!0}}for(n.method=i,n.arg=s;;){var a=n.delegate;if(a){var c=A(a,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var u=p(t,r,n);if("normal"===u.type){if(o=n.done?v:y,u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=v,n.method="throw",n.arg=u.arg)}}}function A(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=p(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var s=i.arg;return s?s.done?(r[t.resultName]=s.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function I(r){if(r||""===r){var n=r[c];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,s=function t(){for(;++o<r.length;)if(i.call(r,o))return t.value=r[o],t.done=!1,t;return t.value=e,t.done=!0,t};return s.next=s}}throw new TypeError(t(r)+" is not iterable")}return w.prototype=_,s(k,"constructor",{value:_,configurable:!0}),s(_,"constructor",{value:w,configurable:!0}),w.displayName=f(_,l,"GeneratorFunction"),r.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,f(e,l,"GeneratorFunction")),e.prototype=Object.create(k),e},r.awrap=function(e){return{__await:e}},O(x.prototype),f(x.prototype,u,(function(){return this})),r.AsyncIterator=x,r.async=function(e,t,n,o,i){void 0===i&&(i=Promise);var s=new x(h(e,t,n,o),i);return r.isGeneratorFunction(t)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},O(k),f(k,l,"Generator"),f(k,c,(function(){return this})),f(k,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},r.values=I,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return a.type="throw",a.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var c=i.call(s,"catchLoc"),u=i.call(s,"finallyLoc");if(c&&u){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=e,s.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},r}Object.defineProperty(e,"__esModule",{value:!0});var i=r(76513),s=r(90297),a=i.__importDefault(r(89274)),c=r(50264),u=r(28167),l=r(47706),f=r(49621);u.isMainThread||function(){i.__awaiter(this,void 0,void 0,o().mark((function e(){var t,r,n,i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=u.workerData,(r=s.JSCLogger).setLevel(t.logLevel||s.JSCLogger.levels.WARN),n=(0,l.runChild)(u.parentPort,r),e.next=6,(0,a.default)(f.DEFAULT_JSC_INSPECTOR_PORT);case 6:i=e.sent,(0,c.open)(i,t.inspectorHost||f.DEFAULT_JSC_INSPECTOR_HOST),n.sendMessage("InspectorCreated",{remoteWorkerInspectorUrl:(0,c.url)()},!1),(0,c.waitForDebugger)();case 10:case"end":return e.stop()}}),e)})))}(),process.on("unhandledRejection",(function(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];(e=global.console).error.apply(e,["Uncaught (in promise)"].concat(r))}))})();var o=exports;for(var i in n)o[i]=n[i];n.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})();
2
+ (()=>{var e={1096:e=>{e.exports=n,n.strict=o,n.loose=i;var t=Object.prototype.toString,r={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0};function n(e){return o(e)||i(e)}function o(e){return e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array}function i(e){return r[t.call(e)]}},2203:e=>{"use strict";e.exports=require("stream")},4814:(e,t,r)=>{e.exports=r(23725)},6881:(e,t,r)=>{var n=r(39023),o=r(30323),i=r(24434).EventEmitter,s=r(81232),a=r(73325),c=r(82726),u=o.bufferAllocUnsafe,l=o.bufferFromString,f="open",h="peer_requested_close",p="ending",d="closed",y="setImmediate"in global?global.setImmediate.bind(global):process.nextTick.bind(process),m=0;function v(e,t,r,n,c){if(this._debug=o.BufferingLogger("websocket:connection",++m),this._debug("constructor"),this._debug.enabled&&function(e,t){if(e._debug.enabled){var r=t.emit;for(var n in t.emit=function(t){e._debug("||| Socket Event '%s'",t),r.apply(this,arguments)},t)"function"==typeof t[n]&&-1===["emit"].indexOf(n)&&function(r){var n=t[r];t[r]="on"!==r?function(){return e._debug("||| Socket method called: %s",r),n.apply(this,arguments)}:function(){return e._debug("||| Socket method called: %s (%s)",r,arguments[0]),n.apply(this,arguments)}}(n)}}(this,e),i.call(this),this._pingListenerCount=0,this.on("newListener",(function(e){"ping"===e&&this._pingListenerCount++})).on("removeListener",(function(e){"ping"===e&&this._pingListenerCount--})),this.config=c,this.socket=e,this.protocol=r,this.extensions=t,this.remoteAddress=e.remoteAddress,this.closeReasonCode=-1,this.closeDescription=null,this.closeEventEmitted=!1,this.maskOutgoingPackets=n,this.maskBytes=u(4),this.frameHeader=u(10),this.bufferList=new a,this.currentFrame=new s(this.maskBytes,this.frameHeader,this.config),this.fragmentationSize=0,this.frameQueue=[],this.connected=!0,this.state=f,this.waitingForCloseResponse=!1,this.receivedEnd=!1,this.closeTimeout=this.config.closeTimeout,this.assembleFragments=this.config.assembleFragments,this.maxReceivedMessageSize=this.config.maxReceivedMessageSize,this.outputBufferFull=!1,this.inputPaused=!1,this.receivedDataHandler=this.processReceivedData.bind(this),this._closeTimerHandler=this.handleCloseTimer.bind(this),this.socket.setNoDelay(this.config.disableNagleAlgorithm),this.socket.setTimeout(0),this.config.keepalive&&!this.config.useNativeKeepalive){if("number"!=typeof this.config.keepaliveInterval)throw new Error("keepaliveInterval must be specified and numeric if keepalive is true.");if(this._keepaliveTimerHandler=this.handleKeepaliveTimer.bind(this),this.setKeepaliveTimer(),this.config.dropConnectionOnKeepaliveTimeout){if("number"!=typeof this.config.keepaliveGracePeriod)throw new Error("keepaliveGracePeriod must be specified and numeric if dropConnectionOnKeepaliveTimeout is true.");this._gracePeriodTimerHandler=this.handleGracePeriodTimer.bind(this)}}else if(this.config.keepalive&&this.config.useNativeKeepalive){if(!("setKeepAlive"in this.socket))throw new Error("Unable to use native keepalive: unsupported by this version of Node.");this.socket.setKeepAlive(!0,this.config.keepaliveInterval)}this.socket.removeAllListeners("error")}function g(e){return!(e<1e3)&&(e>=1e3&&e<=2999?-1!==[1e3,1001,1002,1003,1007,1008,1009,1010,1011,1012,1013,1014,1015].indexOf(e):e>=3e3&&e<=3999||e>=4e3&&e<=4999||!(e>=5e3)&&void 0)}v.CLOSE_REASON_NORMAL=1e3,v.CLOSE_REASON_GOING_AWAY=1001,v.CLOSE_REASON_PROTOCOL_ERROR=1002,v.CLOSE_REASON_UNPROCESSABLE_INPUT=1003,v.CLOSE_REASON_RESERVED=1004,v.CLOSE_REASON_NOT_PROVIDED=1005,v.CLOSE_REASON_ABNORMAL=1006,v.CLOSE_REASON_INVALID_DATA=1007,v.CLOSE_REASON_POLICY_VIOLATION=1008,v.CLOSE_REASON_MESSAGE_TOO_BIG=1009,v.CLOSE_REASON_EXTENSION_REQUIRED=1010,v.CLOSE_REASON_INTERNAL_SERVER_ERROR=1011,v.CLOSE_REASON_TLS_HANDSHAKE_FAILED=1015,v.CLOSE_DESCRIPTIONS={1e3:"Normal connection closure",1001:"Remote peer is going away",1002:"Protocol error",1003:"Unprocessable input",1004:"Reserved",1005:"Reason not provided",1006:"Abnormal closure, no further detail available",1007:"Invalid data received",1008:"Policy violation",1009:"Message too big",1010:"Extension requested by client is required",1011:"Internal Server Error",1015:"TLS Handshake Failed"},n.inherits(v,i),v.prototype._addSocketEventListeners=function(){this.socket.on("error",this.handleSocketError.bind(this)),this.socket.on("end",this.handleSocketEnd.bind(this)),this.socket.on("close",this.handleSocketClose.bind(this)),this.socket.on("drain",this.handleSocketDrain.bind(this)),this.socket.on("pause",this.handleSocketPause.bind(this)),this.socket.on("resume",this.handleSocketResume.bind(this)),this.socket.on("data",this.handleSocketData.bind(this))},v.prototype.setKeepaliveTimer=function(){this._debug("setKeepaliveTimer"),this.config.keepalive&&!this.config.useNativeKeepalive&&(this.clearKeepaliveTimer(),this.clearGracePeriodTimer(),this._keepaliveTimeoutID=setTimeout(this._keepaliveTimerHandler,this.config.keepaliveInterval))},v.prototype.clearKeepaliveTimer=function(){this._keepaliveTimeoutID&&clearTimeout(this._keepaliveTimeoutID)},v.prototype.handleKeepaliveTimer=function(){this._debug("handleKeepaliveTimer"),this._keepaliveTimeoutID=null,this.ping(),this.config.dropConnectionOnKeepaliveTimeout?this.setGracePeriodTimer():this.setKeepaliveTimer()},v.prototype.setGracePeriodTimer=function(){this._debug("setGracePeriodTimer"),this.clearGracePeriodTimer(),this._gracePeriodTimeoutID=setTimeout(this._gracePeriodTimerHandler,this.config.keepaliveGracePeriod)},v.prototype.clearGracePeriodTimer=function(){this._gracePeriodTimeoutID&&clearTimeout(this._gracePeriodTimeoutID)},v.prototype.handleGracePeriodTimer=function(){this._debug("handleGracePeriodTimer"),this._gracePeriodTimeoutID=null,this.drop(v.CLOSE_REASON_ABNORMAL,"Peer not responding.",!0)},v.prototype.handleSocketData=function(e){this._debug("handleSocketData"),this.setKeepaliveTimer(),this.bufferList.write(e),this.processReceivedData()},v.prototype.processReceivedData=function(){if(this._debug("processReceivedData"),this.connected&&!this.inputPaused){var e=this.currentFrame;if(e.addData(this.bufferList)){var t=this;if(e.protocolError)return this._debug("-- protocol error"),void process.nextTick((function(){t.drop(v.CLOSE_REASON_PROTOCOL_ERROR,e.dropReason)}));if(e.frameTooLarge)return this._debug("-- frame too large"),void process.nextTick((function(){t.drop(v.CLOSE_REASON_MESSAGE_TOO_BIG,e.dropReason)}));if(e.rsv1||e.rsv2||e.rsv3)return this._debug("-- illegal rsv flag"),void process.nextTick((function(){t.drop(v.CLOSE_REASON_PROTOCOL_ERROR,"Unsupported usage of rsv bits without negotiated extension.")}));this.assembleFragments||(this._debug("-- emitting frame"),process.nextTick((function(){t.emit("frame",e)}))),process.nextTick((function(){t.processFrame(e)})),this.currentFrame=new s(this.maskBytes,this.frameHeader,this.config),this.bufferList.length>0&&y(this.receivedDataHandler)}else this._debug("-- insufficient data for frame")}},v.prototype.handleSocketError=function(e){this._debug("handleSocketError: %j",e),this.state!==d?(this.closeReasonCode=v.CLOSE_REASON_ABNORMAL,this.closeDescription="Socket Error: "+e.syscall+" "+e.code,this.connected=!1,this.state=d,this.fragmentationSize=0,o.eventEmitterListenerCount(this,"error")>0&&this.emit("error",e),this.socket.destroy(),this._debug.printOutput()):this._debug(" --- Socket 'error' after 'close'")},v.prototype.handleSocketEnd=function(){this._debug("handleSocketEnd: received socket end. state = %s",this.state),this.receivedEnd=!0,this.state!==d?this.state!==h&&this.state!==p&&(this._debug(" --- UNEXPECTED socket end."),this.socket.end()):this._debug(" --- Socket 'end' after 'close'")},v.prototype.handleSocketClose=function(e){this._debug("handleSocketClose: received socket close"),this.socketHadError=e,this.connected=!1,this.state=d,-1===this.closeReasonCode&&(this.closeReasonCode=v.CLOSE_REASON_ABNORMAL,this.closeDescription="Connection dropped by remote peer."),this.clearCloseTimer(),this.clearKeepaliveTimer(),this.clearGracePeriodTimer(),this.closeEventEmitted||(this.closeEventEmitted=!0,this._debug("-- Emitting WebSocketConnection close event"),this.emit("close",this.closeReasonCode,this.closeDescription))},v.prototype.handleSocketDrain=function(){this._debug("handleSocketDrain: socket drain event"),this.outputBufferFull=!1,this.emit("drain")},v.prototype.handleSocketPause=function(){this._debug("handleSocketPause: socket pause event"),this.inputPaused=!0,this.emit("pause")},v.prototype.handleSocketResume=function(){this._debug("handleSocketResume: socket resume event"),this.inputPaused=!1,this.emit("resume"),this.processReceivedData()},v.prototype.pause=function(){this._debug("pause: pause requested"),this.socket.pause()},v.prototype.resume=function(){this._debug("resume: resume requested"),this.socket.resume()},v.prototype.close=function(e,t){if(this.connected){if(this._debug("close: Initating clean WebSocket close sequence."),"number"!=typeof e&&(e=v.CLOSE_REASON_NORMAL),!g(e))throw new Error("Close code "+e+" is not valid.");"string"!=typeof t&&(t=v.CLOSE_DESCRIPTIONS[e]),this.closeReasonCode=e,this.closeDescription=t,this.setCloseTimer(),this.sendCloseFrame(this.closeReasonCode,this.closeDescription),this.state=p,this.connected=!1}},v.prototype.drop=function(e,t,r){this._debug("drop"),"number"!=typeof e&&(e=v.CLOSE_REASON_PROTOCOL_ERROR),"string"!=typeof t&&(t=v.CLOSE_DESCRIPTIONS[e]),this._debug("Forcefully dropping connection. skipCloseFrame: %s, code: %d, description: %s",r,e,t),this.closeReasonCode=e,this.closeDescription=t,this.frameQueue=[],this.fragmentationSize=0,r||this.sendCloseFrame(e,t),this.connected=!1,this.state=d,this.clearCloseTimer(),this.clearKeepaliveTimer(),this.clearGracePeriodTimer(),this.closeEventEmitted||(this.closeEventEmitted=!0,this._debug("Emitting WebSocketConnection close event"),this.emit("close",this.closeReasonCode,this.closeDescription)),this._debug("Drop: destroying socket"),this.socket.destroy()},v.prototype.setCloseTimer=function(){this._debug("setCloseTimer"),this.clearCloseTimer(),this._debug("Setting close timer"),this.waitingForCloseResponse=!0,this.closeTimer=setTimeout(this._closeTimerHandler,this.closeTimeout)},v.prototype.clearCloseTimer=function(){this._debug("clearCloseTimer"),this.closeTimer&&(this._debug("Clearing close timer"),clearTimeout(this.closeTimer),this.waitingForCloseResponse=!1,this.closeTimer=null)},v.prototype.handleCloseTimer=function(){this._debug("handleCloseTimer"),this.closeTimer=null,this.waitingForCloseResponse&&(this._debug("Close response not received from client. Forcing socket end."),this.waitingForCloseResponse=!1,this.state=d,this.socket.end())},v.prototype.processFrame=function(e){if(this._debug("processFrame"),this._debug(" -- frame: %s",e),0!==this.frameQueue.length&&e.opcode>0&&e.opcode<8)this.drop(v.CLOSE_REASON_PROTOCOL_ERROR,"Illegal frame opcode 0x"+e.opcode.toString(16)+" received in middle of fragmented message.");else switch(e.opcode){case 2:this._debug("-- Binary Frame"),this.assembleFragments&&(e.fin?(this._debug("---- Emitting 'message' event"),this.emit("message",{type:"binary",binaryData:e.binaryPayload})):(this.frameQueue.push(e),this.fragmentationSize=e.length));break;case 1:if(this._debug("-- Text Frame"),this.assembleFragments)if(e.fin){if(!c(e.binaryPayload))return void this.drop(v.CLOSE_REASON_INVALID_DATA,"Invalid UTF-8 Data Received");this._debug("---- Emitting 'message' event"),this.emit("message",{type:"utf8",utf8Data:e.binaryPayload.toString("utf8")})}else this.frameQueue.push(e),this.fragmentationSize=e.length;break;case 0:if(this._debug("-- Continuation Frame"),this.assembleFragments){if(0===this.frameQueue.length)return void this.drop(v.CLOSE_REASON_PROTOCOL_ERROR,"Unexpected Continuation Frame");if(this.fragmentationSize+=e.length,this.fragmentationSize>this.maxReceivedMessageSize)return void this.drop(v.CLOSE_REASON_MESSAGE_TOO_BIG,"Maximum message size exceeded.");if(this.frameQueue.push(e),e.fin){var t=0,r=u(this.fragmentationSize),n=this.frameQueue[0].opcode;switch(this.frameQueue.forEach((function(e){e.binaryPayload.copy(r,t),t+=e.binaryPayload.length})),this.frameQueue=[],this.fragmentationSize=0,n){case 2:this.emit("message",{type:"binary",binaryData:r});break;case 1:if(!c(r))return void this.drop(v.CLOSE_REASON_INVALID_DATA,"Invalid UTF-8 Data Received");this.emit("message",{type:"utf8",utf8Data:r.toString("utf8")});break;default:return void this.drop(v.CLOSE_REASON_PROTOCOL_ERROR,"Unexpected first opcode in fragmentation sequence: 0x"+n.toString(16))}}}break;case 9:if(this._debug("-- Ping Frame"),this._pingListenerCount>0){var o=!1;this.emit("ping",(function(){o=!0}),e.binaryPayload),o||this.pong(e.binaryPayload)}else this.pong(e.binaryPayload);break;case 10:this._debug("-- Pong Frame"),this.emit("pong",e.binaryPayload);break;case 8:if(this._debug("-- Close Frame"),this.waitingForCloseResponse)return this._debug("---- Got close response from peer. Completing closing handshake."),this.clearCloseTimer(),this.waitingForCloseResponse=!1,this.state=d,void this.socket.end();var i;if(this._debug("---- Closing handshake initiated by peer."),this.state=h,e.invalidCloseFrameLength?(this.closeReasonCode=1005,i=v.CLOSE_REASON_PROTOCOL_ERROR):-1===e.closeStatus||g(e.closeStatus)?(this.closeReasonCode=e.closeStatus,i=v.CLOSE_REASON_NORMAL):(this.closeReasonCode=e.closeStatus,i=v.CLOSE_REASON_PROTOCOL_ERROR),e.binaryPayload.length>1){if(!c(e.binaryPayload))return void this.drop(v.CLOSE_REASON_INVALID_DATA,"Invalid UTF-8 Data Received");this.closeDescription=e.binaryPayload.toString("utf8")}else this.closeDescription=v.CLOSE_DESCRIPTIONS[this.closeReasonCode];this._debug("------ Remote peer %s - code: %d - %s - close frame payload length: %d",this.remoteAddress,this.closeReasonCode,this.closeDescription,e.length),this._debug("------ responding to remote peer's close request."),this.sendCloseFrame(i,null),this.connected=!1;break;default:this._debug("-- Unrecognized Opcode %d",e.opcode),this.drop(v.CLOSE_REASON_PROTOCOL_ERROR,"Unrecognized Opcode: 0x"+e.opcode.toString(16))}},v.prototype.send=function(e,t){if(this._debug("send"),Buffer.isBuffer(e))this.sendBytes(e,t);else{if("function"!=typeof e.toString)throw new Error("Data provided must either be a Node Buffer or implement toString()");this.sendUTF(e,t)}},v.prototype.sendUTF=function(e,t){e=l(e.toString(),"utf8"),this._debug("sendUTF: %d bytes",e.length);var r=new s(this.maskBytes,this.frameHeader,this.config);r.opcode=1,r.binaryPayload=e,this.fragmentAndSend(r,t)},v.prototype.sendBytes=function(e,t){if(this._debug("sendBytes"),!Buffer.isBuffer(e))throw new Error("You must pass a Node Buffer object to WebSocketConnection.prototype.sendBytes()");var r=new s(this.maskBytes,this.frameHeader,this.config);r.opcode=2,r.binaryPayload=e,this.fragmentAndSend(r,t)},v.prototype.ping=function(e){this._debug("ping");var t=new s(this.maskBytes,this.frameHeader,this.config);t.opcode=9,t.fin=!0,e&&(Buffer.isBuffer(e)||(e=l(e.toString(),"utf8")),e.length>125&&(this._debug("WebSocket: Data for ping is longer than 125 bytes. Truncating."),e=e.slice(0,124)),t.binaryPayload=e),this.sendFrame(t)},v.prototype.pong=function(e){this._debug("pong");var t=new s(this.maskBytes,this.frameHeader,this.config);t.opcode=10,Buffer.isBuffer(e)&&e.length>125&&(this._debug("WebSocket: Data for pong is longer than 125 bytes. Truncating."),e=e.slice(0,124)),t.binaryPayload=e,t.fin=!0,this.sendFrame(t)},v.prototype.fragmentAndSend=function(e,t){if(this._debug("fragmentAndSend"),e.opcode>7)throw new Error("You cannot fragment control frames.");var r=this.config.fragmentationThreshold,n=e.binaryPayload.length;if(!this.config.fragmentOutgoingMessages||e.binaryPayload&&n<=r)return e.fin=!0,void this.sendFrame(e,t);for(var o=Math.ceil(n/r),i=0,a=function(e){e?"function"==typeof t&&(t(e),t=null):++i===o&&"function"==typeof t&&t()},c=1;c<=o;c++){var u=new s(this.maskBytes,this.frameHeader,this.config);u.opcode=1===c?e.opcode:0,u.fin=c===o;var l=c===o?n-r*(c-1):r,f=r*(c-1);u.binaryPayload=e.binaryPayload.slice(f,f+l),this.sendFrame(u,a)}},v.prototype.sendCloseFrame=function(e,t,r){if("number"!=typeof e&&(e=v.CLOSE_REASON_NORMAL),this._debug("sendCloseFrame state: %s, reasonCode: %d, description: %s",this.state,e,t),this.state===f||this.state===h){var n=new s(this.maskBytes,this.frameHeader,this.config);n.fin=!0,n.opcode=8,n.closeStatus=e,"string"==typeof t&&(n.binaryPayload=l(t,"utf8")),this.sendFrame(n,r),this.socket.end()}},v.prototype.sendFrame=function(e,t){this._debug("sendFrame"),e.mask=this.maskOutgoingPackets;var r=this.socket.write(e.toBuffer(),t);return this.outputBufferFull=!r,r},e.exports=v},9527:e=>{function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}var r=1e3,n=60*r,o=60*n,i=24*o,s=7*i;function a(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}e.exports=function(e,c){c=c||{};var u,l,f=t(e);if("string"===f&&e.length>0)return function(e){if(!((e=String(e)).length>100)){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){var a=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"weeks":case"week":case"w":return a*s;case"days":case"day":case"d":return a*i;case"hours":case"hour":case"hrs":case"hr":case"h":return a*o;case"minutes":case"minute":case"mins":case"min":case"m":return a*n;case"seconds":case"second":case"secs":case"sec":case"s":return a*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}(e);if("number"===f&&isFinite(e))return c.long?(u=e,(l=Math.abs(u))>=i?a(u,l,i,"day"):l>=o?a(u,l,o,"hour"):l>=n?a(u,l,n,"minute"):l>=r?a(u,l,r,"second"):u+" ms"):function(e){var t=Math.abs(e);return t>=i?Math.round(e/i)+"d":t>=o?Math.round(e/o)+"h":t>=n?Math.round(e/n)+"m":t>=r?Math.round(e/r)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},12750:(e,t,r)=>{var n=r(82418),o=r(22197),i=r(37323),s=0,a=1,c=2,u=3;function l(e,t,r,o,a,c){i.EventTarget.call(this),(c=c||{}).assembleFragments=!0;var u=this;this._url=e,this._readyState=s,this._protocol=void 0,this._extensions="",this._bufferedAmount=0,this._binaryType="arraybuffer",this._connection=void 0,this._client=new n(c),this._client.on("connect",(function(e){p.call(u,e)})),this._client.on("connectFailed",(function(){d.call(u)})),this._client.connect(e,t,r,o,a)}function f(e,t){var r=new i.Event("close");return r.code=e,r.reason=t,r.wasClean=void 0===e||1e3===e,r}function h(e){var t=new i.Event("message");return t.data=e,t}function p(e){var t=this;this._readyState=a,this._connection=e,this._protocol=e.protocol,this._extensions=e.extensions,this._connection.on("close",(function(e,r){y.call(t,e,r)})),this._connection.on("message",(function(e){m.call(t,e)})),this.dispatchEvent(new i.Event("open"))}function d(){v.call(this),this._readyState=u;try{this.dispatchEvent(new i.Event("error"))}finally{this.dispatchEvent(f(1006,"connection failed"))}}function y(e,t){v.call(this),this._readyState=u,this.dispatchEvent(f(e,t||""))}function m(e){if(e.utf8Data)this.dispatchEvent(h(e.utf8Data));else if(e.binaryData&&"arraybuffer"===this.binaryType){for(var t=e.binaryData,r=new ArrayBuffer(t.length),n=new Uint8Array(r),o=0,i=t.length;o<i;++o)n[o]=t[o];this.dispatchEvent(h(r))}}function v(){this._client.removeAllListeners(),this._connection&&this._connection.removeAllListeners()}e.exports=l,Object.defineProperties(l.prototype,{url:{get:function(){return this._url}},readyState:{get:function(){return this._readyState}},protocol:{get:function(){return this._protocol}},extensions:{get:function(){return this._extensions}},bufferedAmount:{get:function(){return this._bufferedAmount}}}),Object.defineProperties(l.prototype,{binaryType:{get:function(){return this._binaryType},set:function(e){if("arraybuffer"!==e)throw new SyntaxError('just "arraybuffer" type allowed for "binaryType" attribute');this._binaryType=e}}}),[["CONNECTING",s],["OPEN",a],["CLOSING",c],["CLOSED",u]].forEach((function(e){Object.defineProperty(l.prototype,e[0],{get:function(){return e[1]}})})),[["CONNECTING",s],["OPEN",a],["CLOSING",c],["CLOSED",u]].forEach((function(e){Object.defineProperty(l,e[0],{get:function(){return e[1]}})})),l.prototype.send=function(e){if(this._readyState!==a)throw new Error("cannot call send() while not connected");if("string"==typeof e||e instanceof String)this._connection.sendUTF(e);else if(e instanceof Buffer)this._connection.sendBytes(e);else{if(!e.byteLength&&0!==e.byteLength)throw new Error("unknown binary data:",e);e=o(e),this._connection.sendBytes(e)}},l.prototype.close=function(e,t){switch(this._readyState){case s:d.call(this),this._client.on("connect",(function(r){e?r.close(e,t):r.close()}));break;case a:this._readyState=c,e?this._connection.close(e,t):this._connection.close()}}},13442:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e}(t=e.exports=r(97701)).log=function(){return"object"===("undefined"==typeof console?"undefined":n(console))&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var r=this.useColors;if(e[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+e[0]+(r?"%c ":" ")+"+"+t.humanize(this.diff),r){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var o=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(o++,"%c"===e&&(i=o))})),e.splice(i,0,n)}},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=o,t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("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="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(o())},13740:(e,t,r)=>{"undefined"!=typeof process&&"renderer"===process.type?e.exports=r(56568):e.exports=r(64474)},14065:(e,t,r)=>{var n;e.exports=function(){if(!n){try{n=r(80103)("follow-redirects")}catch(e){}"function"!=typeof n&&(n=function(){})}n.apply(null,arguments)}},14118:(e,t,r)=>{e.exports=r(39003).version},15711:(e,t,r)=>{var n=r(79896),o=r(16928),i=r(70857),s=require,a=process.config&&process.config.variables||{},c=!!process.env.PREBUILDS_ONLY,u=process.versions.modules,l=process.versions&&process.versions.electron||process.env.ELECTRON_RUN_AS_NODE||"undefined"!=typeof window&&window.process&&"renderer"===window.process.type?"electron":process.versions&&process.versions.nw?"node-webkit":"node",f=process.env.npm_config_arch||i.arch(),h=process.env.npm_config_platform||i.platform(),p=process.env.LIBC||(function(e){return"linux"===e&&n.existsSync("/etc/alpine-release")}(h)?"musl":"glibc"),d=process.env.ARM_VERSION||("arm64"===f?"8":a.arm_version)||"",y=(process.versions.uv||"").split(".")[0];function m(e){return s(m.resolve(e))}function v(e){try{return n.readdirSync(e)}catch(e){return[]}}function g(e,t){var r=v(e).filter(t);return r[0]&&o.join(e,r[0])}function b(e){return/\.node$/.test(e)}function w(e){var t=e.split("-");if(2===t.length){var r=t[0],n=t[1].split("+");if(r&&n.length&&n.every(Boolean))return{name:e,platform:r,architectures:n}}}function _(e,t){return function(r){return null!=r&&r.platform===e&&r.architectures.includes(t)}}function S(e,t){return e.architectures.length-t.architectures.length}function E(e){var t=e.split("."),r={file:e,specificity:0};if("node"===t.pop()){for(var n=0;n<t.length;n++){var o=t[n];if("node"===o||"electron"===o||"node-webkit"===o)r.runtime=o;else if("napi"===o)r.napi=!0;else if("abi"===o.slice(0,3))r.abi=o.slice(3);else if("uv"===o.slice(0,2))r.uv=o.slice(2);else if("armv"===o.slice(0,4))r.armv=o.slice(4);else{if("glibc"!==o&&"musl"!==o)continue;r.libc=o}r.specificity++}return r}}function C(e,t){return function(r){return!(null==r||r.runtime&&r.runtime!==e&&!function(e){return"node"===e.runtime&&e.napi}(r)||r.abi&&r.abi!==t&&!r.napi||r.uv&&r.uv!==y||r.armv&&r.armv!==d||r.libc&&r.libc!==p)}}function k(e){return function(t,r){return t.runtime!==r.runtime?t.runtime===e?-1:1:t.abi!==r.abi?t.abi?-1:1:t.specificity!==r.specificity?t.specificity>r.specificity?-1:1:0}}e.exports=m,m.resolve=m.path=function(e){e=o.resolve(e||".");try{var t=s(o.join(e,"package.json")).name.toUpperCase().replace(/-/g,"_");process.env[t+"_PREBUILD"]&&(e=process.env[t+"_PREBUILD"])}catch(e){}if(!c){var r=g(o.join(e,"build/Release"),b);if(r)return r;var n=g(o.join(e,"build/Debug"),b);if(n)return n}var i=O(e);if(i)return i;var a=O(o.dirname(process.execPath));if(a)return a;var m=["platform="+h,"arch="+f,"runtime="+l,"abi="+u,"uv="+y,d?"armv="+d:"","libc="+p,"node="+process.versions.node,process.versions.electron?"electron="+process.versions.electron:"","webpack=true"].filter(Boolean).join(" ");throw new Error("No native build was found for "+m+"\n loaded from: "+e+"\n");function O(e){var t=v(o.join(e,"prebuilds")).map(w).filter(_(h,f)).sort(S)[0];if(t){var r=o.join(e,"prebuilds",t.name),n=v(r).map(E).filter(C(l,u)).sort(k(l))[0];return n?o.join(r,n.file):void 0}}},m.parseTags=E,m.matchTags=C,m.compareTags=k,m.parseTuple=w,m.matchTuple=_,m.compareTuples=S},16086:e=>{"use strict";e.exports=function(e){for(var t=e.length,r=0;r<t;)if(128&e[r])if(192==(224&e[r])){if(r+1===t||128!=(192&e[r+1])||192==(254&e[r]))return!1;r+=2}else if(224==(240&e[r])){if(r+2>=t||128!=(192&e[r+1])||128!=(192&e[r+2])||224===e[r]&&128==(224&e[r+1])||237===e[r]&&160==(224&e[r+1]))return!1;r+=3}else{if(240!=(248&e[r]))return!1;if(r+3>=t||128!=(192&e[r+1])||128!=(192&e[r+2])||128!=(192&e[r+3])||240===e[r]&&128==(240&e[r+1])||244===e[r]&&e[r+1]>143||e[r]>244)return!1;r+=4}else r++;return!0}},16291:(e,t,r)=>{var n=require;"function"==typeof n.addon?e.exports=n.addon.bind(n):e.exports=r(15711)},16928:e=>{"use strict";e.exports=require("path")},18630:(e,t,r)=>{function n(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||i(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=i(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,s=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw s}}}}function i(e,t){if(e){if("string"==typeof e)return s(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}e.exports=function(e){function t(e){var r,n,o,s=null;function a(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];if(a.enabled){var i=a,s=Number(new Date),c=s-(r||s);i.diff=c,i.prev=r,i.curr=s,r=s,n[0]=t.coerce(n[0]),"string"!=typeof n[0]&&n.unshift("%O");var u=0;n[0]=n[0].replace(/%([a-zA-Z%])/g,(function(e,r){if("%%"===e)return"%";u++;var o=t.formatters[r];if("function"==typeof o){var s=n[u];e=o.call(i,s),n.splice(u,1),u--}return e})),t.formatArgs.call(i,n),(i.log||t.log).apply(i,n)}}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=i,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:function(){return null!==s?s:(n!==t.namespaces&&(n=t.namespaces,o=t.enabled(e)),o)},set:function(e){s=e}}),"function"==typeof t.init&&t.init(a),a}function i(e,r){var n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function s(e,t){for(var r=0,n=0,o=-1,i=0;r<e.length;)if(n<t.length&&(t[n]===e[r]||"*"===t[n]))"*"===t[n]?(o=n,i=r,n++):(r++,n++);else{if(-1===o)return!1;n=o+1,r=++i}for(;n<t.length&&"*"===t[n];)n++;return n===t.length}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){var e=[].concat(n(t.names),n(t.skips.map((function(e){return"-"+e})))).join(",");return t.enable(""),e},t.enable=function(e){t.save(e),t.namespaces=e,t.names=[],t.skips=[];var r,n=o(("string"==typeof e?e:"").trim().replace(" ",",").split(",").filter(Boolean));try{for(n.s();!(r=n.n()).done;){var i=r.value;"-"===i[0]?t.skips.push(i.slice(1)):t.names.push(i)}}catch(e){n.e(e)}finally{n.f()}},t.enabled=function(e){var r,n=o(t.skips);try{for(n.s();!(r=n.n()).done;)if(s(e,r.value))return!1}catch(e){n.e(e)}finally{n.f()}var i,a=o(t.names);try{for(a.s();!(i=a.n()).done;)if(s(e,i.value))return!0}catch(e){a.e(e)}finally{a.f()}return!1},t.humanize=r(9527),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((function(r){t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){for(var r=0,n=0;n<e.length;n++)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},20181:e=>{"use strict";e.exports=require("buffer")},22197:(e,t,r)=>{var n=r(1096).strict;e.exports=function(e){if(n(e)){var t=Buffer.from(e.buffer);return e.byteLength!==e.buffer.byteLength&&(t=t.slice(e.byteOffset,e.byteOffset+e.byteLength)),t}return Buffer.from(e)}},22534:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var i,s,a,c=r(87016),u=c.URL,l=r(58611),f=r(65692),h=r(2203).Writable,p=r(42613),d=r(14065);i="undefined"!=typeof process,s="undefined"!=typeof window&&"undefined"!=typeof document,a=j(Error.captureStackTrace),i||!s&&a||console.warn("The follow-redirects package should be excluded from browser builds.");var y=!1;try{p(new u(""))}catch(e){y="ERR_INVALID_URL"===e.code}var m=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],v=["abort","aborted","connect","error","socket","timeout"],g=Object.create(null);v.forEach((function(e){g[e]=function(t,r,n){this._redirectable.emit(e,t,r,n)}}));var b=P("ERR_INVALID_URL","Invalid URL",TypeError),w=P("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),_=P("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",w),S=P("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),E=P("ERR_STREAM_WRITE_AFTER_END","write after end"),C=h.prototype.destroy||x;function k(e,t){h.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var r=this;this._onNativeResponse=function(e){try{r._processResponse(e)}catch(e){r.emit("error",e instanceof w?e:new w({cause:e}))}},this._performRequest()}function O(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach((function(n){var o=n+":",i=r[o]=e[n],s=t[n]=Object.create(i);Object.defineProperties(s,{request:{value:function(e,n,i){return u&&e instanceof u?e=T(e):F(e)?e=T(R(e)):(i=n,n=A(e),e={protocol:o}),j(n)&&(i=n,n=null),(n=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,n)).nativeProtocols=r,F(n.host)||F(n.hostname)||(n.hostname="::1"),p.equal(n.protocol,o,"protocol mismatch"),d("options",n),new k(n,i)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,r){var n=s.request(e,t,r);return n.end(),n},configurable:!0,enumerable:!0,writable:!0}})})),t}function x(){}function R(e){var t;if(y)t=new u(e);else if(!F((t=A(c.parse(e))).protocol))throw new b({input:e});return t}function A(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new b({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new b({input:e.href||e});return e}function T(e,t){var r,n=t||{},i=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return o(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,s=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw s}}}}(m);try{for(i.s();!(r=i.n()).done;){var s=r.value;n[s]=e[s]}}catch(e){i.e(e)}finally{i.f()}return n.hostname.startsWith("[")&&(n.hostname=n.hostname.slice(1,-1)),""!==n.port&&(n.port=Number(n.port)),n.path=n.search?n.pathname+n.search:n.pathname,n}function L(e,t){var r;for(var n in t)e.test(n)&&(r=t[n],delete t[n]);return null==r?void 0:String(r).trim()}function P(e,t,r){function n(r){j(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,r||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return n.prototype=new(r||Error),Object.defineProperties(n.prototype,{constructor:{value:n,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),n}function I(e,t){for(var r=0,n=v;r<n.length;r++){var o=n[r];e.removeListener(o,g[o])}e.on("error",x),e.destroy(t)}function F(e){return"string"==typeof e||e instanceof String}function j(e){return"function"==typeof e}k.prototype=Object.create(h.prototype),k.prototype.abort=function(){I(this._currentRequest),this._currentRequest.abort(),this.emit("abort")},k.prototype.destroy=function(e){return I(this._currentRequest,e),C.call(this,e),this},k.prototype.write=function(e,t,r){if(this._ending)throw new E;if(!(F(e)||"object"===n(o=e)&&"length"in o))throw new TypeError("data should be a string, Buffer or Uint8Array");var o;j(t)&&(r=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new S),this.abort()):r&&r()},k.prototype.end=function(e,t,r){if(j(e)?(r=e,e=t=null):j(t)&&(r=t,t=null),e){var n=this,o=this._currentRequest;this.write(e,t,(function(){n._ended=!0,o.end(null,null,r)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,r)},k.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},k.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},k.prototype.setTimeout=function(e,t){var r=this;function n(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function o(t){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout((function(){r.emit("timeout"),i()}),e),n(t)}function i(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",i),r.removeListener("error",i),r.removeListener("response",i),r.removeListener("close",i),t&&r.removeListener("timeout",t),r.socket||r._currentRequest.removeListener("socket",o)}return t&&this.on("timeout",t),this.socket?o(this.socket):this._currentRequest.once("socket",o),this.on("socket",n),this.on("abort",i),this.on("error",i),this.on("response",i),this.on("close",i),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){k.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(k.prototype,e,{get:function(){return this._currentRequest[e]}})})),k.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},k.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=t.request(this._options,this._onNativeResponse);n._redirectable=this;for(var o=0,i=v;o<i.length;o++){var s=i[o];n.on(s,g[s])}if(this._currentUrl=/^\//.test(this._options.path)?c.format(this._options):this._options.path,this._isRedirect){var a=0,u=this,l=this._requestBodyBuffers;!function e(t){if(n===u._currentRequest)if(t)u.emit("error",t);else if(a<l.length){var r=l[a++];n.finished||n.write(r.data,r.encoding,e)}else u._ended&&n.end()}()}},k.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var r,n=e.headers.location;if(!n||!1===this._options.followRedirects||t<300||t>=400)return e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),void(this._requestBodyBuffers=[]);if(I(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new _;var o=this._options.beforeRedirect;o&&(r=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var i=this._options.method;((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],L(/^content-/i,this._options.headers));var s,a,l=L(/^host$/i,this._options.headers),f=R(this._currentUrl),h=l||f.host,m=/^\w+:/.test(n)?this._currentUrl:c.format(Object.assign(f,{host:h})),v=(s=n,a=m,y?new u(s,a):R(c.resolve(a,s)));if(d("redirecting to",v.href),this._isRedirect=!0,T(v,this._options),(v.protocol!==f.protocol&&"https:"!==v.protocol||v.host!==h&&!function(e,t){p(F(e)&&F(t));var r=e.length-t.length-1;return r>0&&"."===e[r]&&e.endsWith(t)}(v.host,h))&&L(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),j(o)){var g={headers:e.headers,statusCode:t},b={url:m,method:i,headers:r};o(this._options,g,b),this._sanitizeOptions(this._options)}this._performRequest()},e.exports=O({http:l,https:f}),e.exports.wrap=O},23725:(e,t,r)=>{e.exports={server:r(27446),client:r(82418),router:r(56912),frame:r(81232),request:r(49244),connection:r(6881),w3cwebsocket:r(12750),deprecation:r(36788),version:r(14118)}},24434:e=>{"use strict";e.exports=require("events")},27446:(e,t,r)=>{var n=r(30323).extend,o=r(30323),i=r(39023),s=r(13740)("websocket:server"),a=r(24434).EventEmitter,c=r(49244),u=function(e){a.call(this),this._handlers={upgrade:this.handleUpgrade.bind(this),requestAccepted:this.handleRequestAccepted.bind(this),requestResolved:this.handleRequestResolved.bind(this)},this.connections=[],this.pendingRequests=[],e&&this.mount(e)};i.inherits(u,a),u.prototype.mount=function(e){if(this.config={httpServer:null,maxReceivedFrameSize:65536,maxReceivedMessageSize:1048576,fragmentOutgoingMessages:!0,fragmentationThreshold:16384,keepalive:!0,keepaliveInterval:2e4,dropConnectionOnKeepaliveTimeout:!0,keepaliveGracePeriod:1e4,useNativeKeepalive:!1,assembleFragments:!0,autoAcceptConnections:!1,ignoreXForwardedFor:!1,parseCookies:!0,parseExtensions:!0,disableNagleAlgorithm:!0,closeTimeout:5e3},n(this.config,e),!this.config.httpServer)throw new Error("You must specify an httpServer on which to mount the WebSocket server.");Array.isArray(this.config.httpServer)||(this.config.httpServer=[this.config.httpServer]);var t=this._handlers.upgrade;this.config.httpServer.forEach((function(e){e.on("upgrade",t)}))},u.prototype.unmount=function(){var e=this._handlers.upgrade;this.config.httpServer.forEach((function(t){t.removeListener("upgrade",e)}))},u.prototype.closeAllConnections=function(){this.connections.forEach((function(e){e.close()})),this.pendingRequests.forEach((function(e){process.nextTick((function(){e.reject(503)}))}))},u.prototype.broadcast=function(e){Buffer.isBuffer(e)?this.broadcastBytes(e):"function"==typeof e.toString&&this.broadcastUTF(e)},u.prototype.broadcastUTF=function(e){this.connections.forEach((function(t){t.sendUTF(e)}))},u.prototype.broadcastBytes=function(e){this.connections.forEach((function(t){t.sendBytes(e)}))},u.prototype.shutDown=function(){this.unmount(),this.closeAllConnections()},u.prototype.handleUpgrade=function(e,t){var r=this,n=new c(t,e,this.config);try{n.readHandshake()}catch(e){return n.reject(e.httpCode?e.httpCode:400,e.message,e.headers),s("Invalid handshake: %s",e.message),void this.emit("upgradeError",e)}this.pendingRequests.push(n),n.once("requestAccepted",this._handlers.requestAccepted),n.once("requestResolved",this._handlers.requestResolved),t.once("close",(function(){r._handlers.requestResolved(n)})),!this.config.autoAcceptConnections&&o.eventEmitterListenerCount(this,"request")>0?this.emit("request",n):this.config.autoAcceptConnections?n.accept(n.requestedProtocols[0],n.origin):n.reject(404,"No handler is configured to accept the connection.")},u.prototype.handleRequestAccepted=function(e){var t=this;e.once("close",(function(r,n){t.handleConnectionClose(e,r,n)})),this.connections.push(e),this.emit("connect",e)},u.prototype.handleConnectionClose=function(e,t,r){var n=this.connections.indexOf(e);-1!==n&&this.connections.splice(n,1),this.emit("close",e,t,r)},u.prototype.handleRequestResolved=function(e){var t=this.pendingRequests.indexOf(e);-1!==t&&this.pendingRequests.splice(t,1)},e.exports=u},27539:e=>{"use strict";e.exports={mask:function(e,t,r,n,o){for(var i=0;i<o;i++)r[n+i]=e[i]^t[3&i]},unmask:function(e,t){for(var r=e.length,n=0;n<r;n++)e[n]^=t[3&n]}}},28167:e=>{"use strict";e.exports=require("worker_threads")},29391:e=>{e.exports=function(e){this.type=e,this.isTrusted=!1,this._yaeti=!0}},29989:(e,t,r)=>{"use strict";var n=r(70857),o=r(79896),i=r(35317);function s(){var e="eth",t=n.platform();return"darwin"===t?e="en":"win32"===t&&(e=null),e}function a(e,t){return"IPv4"===t?"IPv4"===e||4===e:"IPv6"===t?"IPv6"===e||6===e:e===t}function c(e,t){"function"==typeof e&&(t=e,e=null);var r={ip:c.ip(e),ipv6:c.ipv6(e),mac:null};c.mac(e,(function(e,n){n&&(r.mac=n),t(e,r)}))}c.interface=function(e,t){var r=n.networkInterfaces(),o=!t;t=t||s(),e=e||"IPv4";for(var i=-1;i<8;i++)if(l=r[t+(i>=0?i:"")])for(var c=0;c<l.length;c++)if(a((f=l[c]).family,e))return f;if(o)for(var u in r){var l=r[u];for(i=0;i<l.length;i++){var f;if(a((f=l[i]).family,e)&&!f.address.startsWith("127."))return f}}},c.ip=function(e){var t=c.interface("IPv4",e);return t&&t.address},c.ipv6=function(e){var t=c.interface("IPv6",e);return t&&t.address};var u=/^(\w+)\:\s+flags=/,l=/^(\w+)\s{2,}link encap:\w+/i,f=c.MAC_RE=/(?:ether|HWaddr)\s+((?:[a-z0-9]{2}\:){5}[a-z0-9]{2})/i,h=c.MAC_IP_RE=/inet\s(?:addr\:)?(\d+\.\d+\.\d+\.\d+)/;c.mac=function(e,t){"function"==typeof e&&(t=e,e=null),e=e||s();var r=c.interface("IPv4",e);return r?(process.env.CI||"ff:00:00:00:00:00"!==r.mac&&"00:00:00:00:00:00"!==r.mac||(r.mac=""),r.mac?t(null,r.mac):void i.exec("win32"===n.platform()?"ipconfig/all":"/sbin/ifconfig",{timeout:5e3},(function(n,o,i){if(n||!o)return t(n);var s=function(e,t,r){for(var n=e.split("\n"),o=0;o<n.length;o++){var i=n[o].trimRight(),s=u.exec(i)||l.exec(i);if(s&&0===s[1].indexOf(t)){var a=null,c=null,p=f.exec(i);for(p&&(c=p[1]),o++;;){if(!(i=n[o])||u.exec(i)||l.exec(i)){o--;break}c||(p=f.exec(i))&&(c=p[1]),a||(p=h.exec(i))&&(a=p[1]),o++}if(a===r)return c}}}(o||"",e,r.address);t(null,s)}))):t()};var p=/^nameserver\s+(\d+\.\d+\.\d+\.\d+)$/i;c.dns=function(e,t){"function"==typeof e&&(t=e,e=null),e=e||"/etc/resolv.conf",o.readFile(e,"utf8",(function(e,r){if(e)return t(e);for(var n=[],o=(r=r||"").split("\n"),i=0;i<o.length;i++){var s=o[i].trim(),a=p.exec(s);a&&n.push(a[1])}t(null,n)}))},e.exports=c},30323:(e,t,r)=>{var n=t.noop=function(){};function o(e,t,r){this.logFunction=r,this.identifier=e,this.uniqueID=t,this.buffer=[]}t.extend=function(e,t){for(var r in t)e[r]=t[r]},t.eventEmitterListenerCount=r(24434).EventEmitter.listenerCount||function(e,t){return e.listeners(t).length},t.bufferAllocUnsafe=Buffer.allocUnsafe?Buffer.allocUnsafe:function(e){return new Buffer(e)},t.bufferFromString=Buffer.from?Buffer.from:function(e,t){return new Buffer(e,t)},t.BufferingLogger=function(e,t){var i=r(13740)(e);if(i.enabled){var s=new o(e,t,i),a=s.log.bind(s);return a.printOutput=s.printOutput.bind(s),a.enabled=i.enabled,a}return i.printOutput=n,i},o.prototype.log=function(){return this.buffer.push([new Date,Array.prototype.slice.call(arguments)]),this},o.prototype.clear=function(){return this.buffer=[],this},o.prototype.printOutput=function(e){e||(e=this.logFunction);var t=this.uniqueID;this.buffer.forEach((function(r){var n=r[0].toLocaleString(),o=r[1].slice(),i=o[0];null!=i&&(i="%s - %s - "+i.toString(),o.splice(0,1,i,n,t),e.apply(global,o))}))}},30340:e=>{function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}var r=1e3,n=60*r,o=60*n,i=24*o;function s(e,t,r){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}e.exports=function(e,a){a=a||{};var c,u=t(e);if("string"===u&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var s=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*o;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(e);if("number"===u&&!1===isNaN(e))return a.long?s(c=e,i,"day")||s(c,o,"hour")||s(c,n,"minute")||s(c,r,"second")||c+" ms":function(e){return e>=i?Math.round(e/i)+"d":e>=o?Math.round(e/o)+"h":e>=n?Math.round(e/n)+"m":e>=r?Math.round(e/r)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},33804:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_JSC_INSPECTOR_HOST=t.DEFAULT_JSC_INSPECTOR_PORT=t.DEFAULT_JSC_SERVER_PORT=void 0,t.DEFAULT_JSC_SERVER_PORT=8090,t.DEFAULT_JSC_INSPECTOR_PORT=9229,t.DEFAULT_JSC_INSPECTOR_HOST="127.0.0.1"},35317:e=>{"use strict";e.exports=require("child_process")},36788:e=>{var t={disableWarnings:!1,deprecationWarningMap:{},warn:function(e){!this.disableWarnings&&this.deprecationWarningMap[e]&&(console.warn("DEPRECATION WARNING: "+this.deprecationWarningMap[e]),this.deprecationWarningMap[e]=!1)}};e.exports=t},37323:(e,t,r)=>{e.exports={EventTarget:r(53938),Event:r(29391)}},38099:(e,t,r)=>{var n=r(39023),o=r(24434).EventEmitter;function i(e,t){o.call(this),this.webSocketRequest=e,this.protocol="____no_protocol____"===t?null:t,this.origin=e.origin,this.resource=e.resource,this.resourceURL=e.resourceURL,this.httpRequest=e.httpRequest,this.remoteAddress=e.remoteAddress,this.webSocketVersion=e.webSocketVersion,this.requestedExtensions=e.requestedExtensions,this.cookies=e.cookies}n.inherits(i,o),i.prototype.accept=function(e,t){var r=this.webSocketRequest.accept(this.protocol,e,t);return this.emit("requestAccepted",r),r},i.prototype.reject=function(e,t,r){this.webSocketRequest.reject(e,t,r),this.emit("requestRejected",this)},e.exports=i},39003:e=>{"use strict";e.exports={version:"1.0.35"}},39023:e=>{"use strict";e.exports=require("util")},40766:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function s(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}Object.defineProperty(t,"__esModule",{value:!0}),t.MultipleJSContextEngine=void 0;var a=r(82987),c=r(69154),u=r(4814),l=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.logger=t,this.contexts=new Map,this.contextId=0},t=[{key:"preloadScript",value:function(e,t,r,n){if(this.logger.info("[Worker] preloadScript code:\n ".concat(e,"\n")),this.contexts.has(n)){var i=(0,c.runInContext)("(".concat(e,")"),this.contexts.get(n).context);this.logger.info("[Worker] fn: ".concat(i,", args: ").concat(t,", binding: ").concat(r)),i.apply(void 0,function(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t).concat([r]))}}},{key:"evaluateScript",value:function(e,t,r){if(this.contexts.has(r))try{return(0,c.runInContext)(e,this.contexts.get(r).context,{filename:t})}catch(e){var n=e.stack,o=n.split("\n\n");if(o.length>0){var i=[o[0].split("\n")[0],o[1]].join("\n");return global.console.error(i)}global.console.error(n)}}},{key:"createJSContext",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=++this.contextId,n={context:(0,c.createContext)(Object.assign({WebSocket:u.w3cwebsocket,__eval:function(e){return(0,c.runInContext)(e,n.context,{filename:"https://river-test/".concat(a.performance.now(),"}.js")})},clearInterval,clearTimeout,eval:function(e){return(0,c.runInContext)(e,n.context,{filename:"https://river-test/".concat(a.performance.now(),"}.js")})},require:void 0,setInterval,setTimeout},t),{name:e}),id:r};return this.contexts.set(r,n),n}},{key:"destroyJSContext",value:function(e){this.contexts.has(e)&&(this.contexts.get(e).context=null,this.contexts.delete(e))}}],t&&i(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();t.MultipleJSContextEngine=l},42613:e=>{"use strict";e.exports=require("assert")},47706:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,s=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function h(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),a=new P(n||[]);return s(i,"_invoke",{value:R(e,r,a)}),i}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var d="suspendedStart",y="suspendedYield",m="executing",v="completed",g={};function b(){}function w(){}function _(){}var S={};f(S,c,(function(){return this}));var E=Object.getPrototypeOf,C=E&&E(E(I([])));C&&C!==r&&i.call(C,c)&&(S=C);var k=_.prototype=b.prototype=Object.create(S);function O(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function r(o,s,a,c){var u=p(e[o],e,s);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,c)}),(function(e){r("throw",e,a,c)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,c)}))}c(u.arg)}var o;s(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function R(t,r,n){var o=d;return function(i,s){if(o===m)throw Error("Generator is already running");if(o===v){if("throw"===i)throw s;return{value:e,done:!0}}for(n.method=i,n.arg=s;;){var a=n.delegate;if(a){var c=A(a,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var u=p(t,r,n);if("normal"===u.type){if(o=n.done?v:y,u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=v,n.method="throw",n.arg=u.arg)}}}function A(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=p(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var s=i.arg;return s?s.done?(r[t.resultName]=s.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,s=function r(){for(;++o<t.length;)if(i.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return s.next=s}}throw new TypeError(n(t)+" is not iterable")}return w.prototype=_,s(k,"constructor",{value:_,configurable:!0}),s(_,"constructor",{value:w,configurable:!0}),w.displayName=f(_,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,f(e,l,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},O(x.prototype),f(x.prototype,u,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var s=new x(h(e,r,n,o),i);return t.isGeneratorFunction(r)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},O(k),f(k,l,"Generator"),f(k,c,(function(){return this})),f(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return a.type="throw",a.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var c=i.call(s,"catchLoc"),u=i.call(s,"finallyLoc");if(c&&u){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=e,s.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return s(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0}),t.runChild=void 0;var a,c,u,l=r(76513),f=r(90297),h=r(22534),p=r(87016),d=r(40766),y=[];function m(e){return l.__awaiter(this,void 0,void 0,o().mark((function t(){var r,n,s,a;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=y.slice(),y=[],n=i(r),t.prev=3,n.s();case 5:if((s=n.n()).done){t.next=14;break}return a=s.value,t.t0=a,t.next=10,w(a.message,e);case 10:t.t1=t.sent,t.t0.callback.call(t.t0,t.t1);case 12:t.next=5;break;case 14:t.next=19;break;case 16:t.prev=16,t.t2=t.catch(3),n.e(t.t2);case 19:return t.prev=19,n.f(),t.finish(19);case 22:case"end":return t.stop()}}),t,null,[[3,16,19,22]])})))}var v=0,g=new Map;function b(e,t){return l.__awaiter(this,void 0,void 0,o().mark((function r(){var n,i;return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=new p.URL(e),r.next=3,new Promise((function(e){var r={host:n.hostname,path:n.pathname,port:n.port};t.info("[RuntimeMessage.EMessageType4Proxy2Worker.EvaluateScript] ".concat(JSON.stringify(r))),h.http.request(r,(function(t){var r="";t.on("data",(function(e){r+=e})),t.on("end",(function(){e(r)}))})).end()}));case 3:return i=r.sent,r.abrupt("return",i);case 5:case"end":return r.stop()}}),r)})))}function w(e,t){return l.__awaiter(this,void 0,void 0,o().mark((function r(){var n,i,s,l,h,p,y,m,w;return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t.info("[Worker] dispatchMessage, ".concat(JSON.stringify(e))),"InitializeJSRuntime"!==e.type){r.next=10;break}return n=e,c||(c=new d.MultipleJSContextEngine(t)),i=void 0===n.payload.id?void 0:g.get(n.payload.id),s=c.createJSContext(n.payload.name,i),a=new f.StringMutex(n.payload.arrayBuffer.memory,new f.TypedSharedArrayBuffer(Int32Array,n.payload.arrayBuffer.mutex)),r.abrupt("return",{engineId:s.id,success:!0});case 10:if("EvaluateScript"!==e.type){r.next=28;break}if(l=e,!c){r.next=25;break}if(!l.payload.scriptUrl){r.next=24;break}if(r.t0=l.payload.code,r.t0){r.next=19;break}return r.next=18,b(l.payload.scriptUrl,t);case 18:r.t0=r.sent;case 19:h=r.t0,t.info(h),c.evaluateScript(h,l.payload.scriptUrl,l.payload.engineId),r.next=25;break;case 24:c.evaluateScript(l.payload.code,l.payload.scriptUrl,l.payload.engineId);case 25:return r.abrupt("return",{success:!0});case 28:if("PreloadScript"!==e.type){r.next=34;break}return p=e,c&&c.preloadScript(p.payload.code,p.payload.args,{messageAsync:function(e){u.sendMessage("ForwardMessageAsync",e,!1)},callSync:function(e,t){u.sendMessage("ForwardCallSync",{method:e,option:t},!1);var r=a.getMemory();return JSON.parse(r)},importScriptsSync:function(e){u.sendMessage("ForwardImportScriptsSync",{url:e},!1);var t=a.getMemory(),r=JSON.parse(t),n=r.url,o=r.code;c.evaluateScript(o,n,p.payload.engineId)}},p.payload.engineId),r.abrupt("return",{success:!0});case 34:if("EvaluateScript2GroupVariable"!==e.type){r.next=42;break}if(y=e,!c){r.next=40;break}return m=c.evaluateScript(y.payload.code,y.payload.scriptUrl,y.payload.engineId),g.set(++v,m),r.abrupt("return",{id:v,success:!0});case 40:r.next=43;break;case 42:"Destroy"===e.type&&(w=e,c&&c.destroyJSContext(w.payload.engineId));case 43:case"end":return r.stop()}}),r)})))}t.runChild=function(e,t){var r=this;return t.info("[Worker] begin"),u=new f.RpcSocket("worker2proxy",(0,f.createPortFromWorkerPort)(e),(function(e){return l.__awaiter(r,void 0,void 0,o().mark((function r(){var n,i;return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:r.t0=e.type,r.next="InitializeJSRuntime"===r.t0||"EvaluateScript"===r.t0||"EvaluateScript2GroupVariable"===r.t0||"PreloadScript"===r.t0||"Destroy"===r.t0?3:7;break;case 3:return i=new Promise((function(e){n=e})),y.push({callback:n,message:e}),setTimeout((function(){m(t)}),0),r.abrupt("return",i);case 7:case"end":return r.stop()}}),r)})))}),t),e.postMessage("PING"),u}},48920:(e,t,r)=>{var n=r(52018),o=r(39023);(t=e.exports=r(97701)).init=function(e){e.inspectOpts={};for(var r=Object.keys(t.inspectOpts),n=0;n<r.length;n++)e.inspectOpts[r[n]]=t.inspectOpts[r[n]]},t.log=function(){return s.write(o.format.apply(o,arguments)+"\n")},t.formatArgs=function(e){var r=this.namespace;if(this.useColors){var n=this.color,o=" [3"+n+";1m"+r+" ";e[0]=o+e[0].split("\n").join("\n"+o),e.push("[3"+n+"m+"+t.humanize(this.diff)+"")}else e[0]=(new Date).toUTCString()+" "+r+" "+e[0]},t.save=function(e){null==e?delete process.env.DEBUG:process.env.DEBUG=e},t.load=a,t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):n.isatty(i)},t.colors=[6,2,3,4,5,1],t.inspectOpts=Object.keys(process.env).filter((function(e){return/^debug_/i.test(e)})).reduce((function(e,t){var r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(function(e,t){return t.toUpperCase()})),n=process.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}),{});var i=parseInt(process.env.DEBUG_FD,10)||2;1!==i&&2!==i&&o.deprecate((function(){}),"except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)")();var s=1===i?process.stdout:2===i?process.stderr:function(e){var t;switch(process.binding("tty_wrap").guessHandleType(e)){case"TTY":(t=new n.WriteStream(e))._type="tty",t._handle&&t._handle.unref&&t._handle.unref();break;case"FILE":(t=new(r(79896).SyncWriteStream)(e,{autoClose:!1}))._type="fs";break;case"PIPE":case"TCP":(t=new(r(69278).Socket)({fd:e,readable:!1,writable:!0})).readable=!1,t.read=null,t._type="pipe",t._handle&&t._handle.unref&&t._handle.unref();break;default:throw new Error("Implement me. Unknown stream file type!")}return t.fd=e,t._isStdio=!0,t}(i);function a(){return process.env.DEBUG}t.formatters.o=function(e){return this.inspectOpts.colors=this.useColors,o.inspect(e,this.inspectOpts).split("\n").map((function(e){return e.trim()})).join(" ")},t.formatters.O=function(e){return this.inspectOpts.colors=this.useColors,o.inspect(e,this.inspectOpts)},t.enable(a())},49244:(e,t,r)=>{for(var n=r(76982),o=r(39023),i=r(87016),s=r(24434).EventEmitter,a=r(6881),c=/,\s*/,u=/;\s*/,l=/[\r\n]/g,f=/,\s*/,h=["(",")","<",">","@",",",";",":","\\",'"',"/","[","]","?","=","{","}"," ",String.fromCharCode(9)],p=[String.fromCharCode(127)],d=0;d<31;d++)p.push(String.fromCharCode(d));var y=/([\x00-\x20\x22\x28\x29\x2c\x2f\x3a-\x3f\x40\x5b-\x5e\x7b\x7d\x7f])/,m=/[^\x21\x23-\x2b\x2d-\x3a\x3c-\x5b\x5d-\x7e]/,v=/^"[^"]*"$/,g=/[\x00-\x20\x3b]/g,b=/[;,] */,w={100:"Continue",101:"Switching Protocols",200:"OK",201:"Created",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",406:"Not Acceptable",407:"Proxy Authorization Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Request Entity Too Long",414:"Request-URI Too Long",415:"Unsupported Media Type",416:"Requested Range Not Satisfiable",417:"Expectation Failed",426:"Upgrade Required",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported"};function _(e,t,r){s.call(this),this.socket=e,this.httpRequest=t,this.resource=t.url,this.remoteAddress=e.remoteAddress,this.remoteAddresses=[this.remoteAddress],this.serverConfig=r,this._socketIsClosing=!1,this._socketCloseHandler=this._handleSocketCloseBeforeAccept.bind(this),this.socket.on("end",this._socketCloseHandler),this.socket.on("close",this._socketCloseHandler),this._resolved=!1}function S(e){process.nextTick((function(){e.drop(1006,"TCP connection lost before handshake completed.",!0)}))}o.inherits(_,s),_.prototype.readHandshake=function(){var e=this,t=this.httpRequest;if(this.resourceURL=i.parse(this.resource,!0),this.host=t.headers.host,!this.host)throw new Error("Client must provide a Host header.");if(this.key=t.headers["sec-websocket-key"],!this.key)throw new Error("Client must provide a value for Sec-WebSocket-Key.");if(this.webSocketVersion=parseInt(t.headers["sec-websocket-version"],10),!this.webSocketVersion||isNaN(this.webSocketVersion))throw new Error("Client must provide a value for Sec-WebSocket-Version.");switch(this.webSocketVersion){case 8:case 13:break;default:var r=new Error("Unsupported websocket client version: "+this.webSocketVersion+"Only versions 8 and 13 are supported.");throw r.httpCode=426,r.headers={"Sec-WebSocket-Version":"13"},r}13===this.webSocketVersion?this.origin=t.headers.origin:8===this.webSocketVersion&&(this.origin=t.headers["sec-websocket-origin"]);var n=t.headers["sec-websocket-protocol"];if(this.protocolFullCaseMap={},this.requestedProtocols=[],n&&n.split(c).forEach((function(t){var r=t.toLocaleLowerCase();e.requestedProtocols.push(r),e.protocolFullCaseMap[r]=t})),!this.serverConfig.ignoreXForwardedFor&&t.headers["x-forwarded-for"]){var o=this.remoteAddress;this.remoteAddresses=t.headers["x-forwarded-for"].split(f),this.remoteAddresses.push(o),this.remoteAddress=this.remoteAddresses[0]}if(this.serverConfig.parseExtensions){var s=t.headers["sec-websocket-extensions"];this.requestedExtensions=this.parseExtensions(s)}else this.requestedExtensions=[];if(this.serverConfig.parseCookies){var a=t.headers.cookie;this.cookies=this.parseCookies(a)}else this.cookies=[]},_.prototype.parseExtensions=function(e){if(!e||0===e.length)return[];var t=e.toLocaleLowerCase().split(c);return t.forEach((function(e,t,r){var n=e.split(u),o=n[0],i=n.slice(1);i.forEach((function(e,t,r){var n=e.split("="),o={name:n[0],value:n[1]};r.splice(t,1,o)}));var s={name:o,params:i};r.splice(t,1,s)})),t},_.prototype.parseCookies=function(e){if(!e||"string"!=typeof e)return[];var t=[];return e.split(b).forEach((function(e){var r=e.indexOf("=");if(-1!==r){var n=e.substr(0,r).trim(),o=e.substr(++r,e.length).trim();'"'===o[0]&&(o=o.slice(1,-1)),t.push({name:n,value:decodeURIComponent(o)})}else t.push({name:e,value:null})})),t},_.prototype.accept=function(e,t,r){var o;this._verifyResolution(),e?void 0===(o=this.protocolFullCaseMap[e.toLocaleLowerCase()])&&(o=e):o=e,this.protocolFullCaseMap=null;var i=n.createHash("sha1");i.update(this.key+"258EAFA5-E914-47DA-95CA-C5AB0DC85B11");var s="HTTP/1.1 101 Switching Protocols\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Accept: "+i.digest("base64")+"\r\n";if(o){for(var c=0;c<o.length;c++){var u=o.charCodeAt(c),f=o.charAt(c);if(u<33||u>126||-1!==h.indexOf(f))throw this.reject(500),new Error('Illegal character "'+String.fromCharCode(f)+'" in subprotocol.')}if(-1===this.requestedProtocols.indexOf(e))throw this.reject(500),new Error("Specified protocol was not requested by the client.");o=o.replace(l,""),s+="Sec-WebSocket-Protocol: "+o+"\r\n"}if(this.requestedProtocols=null,t&&(t=t.replace(l,""),13===this.webSocketVersion?s+="Origin: "+t+"\r\n":8===this.webSocketVersion&&(s+="Sec-WebSocket-Origin: "+t+"\r\n")),r){if(!Array.isArray(r))throw this.reject(500),new Error('Value supplied for "cookies" argument must be an array.');var p={};r.forEach(function(e){if(!e.name||!e.value)throw this.reject(500),new Error('Each cookie to set must at least provide a "name" and "value"');if(e.name=e.name.replace(g,""),e.value=e.value.replace(g,""),p[e.name])throw this.reject(500),new Error("You may not specify the same cookie name twice.");p[e.name]=!0;var t=e.name.match(y);if(t)throw this.reject(500),new Error("Illegal character "+t[0]+" in cookie name");if(t=e.value.match(v)?e.value.slice(1,-1).match(m):e.value.match(m))throw this.reject(500),new Error("Illegal character "+t[0]+" in cookie value");var r=[e.name+"="+e.value];if(e.path){if(t=e.path.match(g))throw this.reject(500),new Error("Illegal character "+t[0]+" in cookie path");r.push("Path="+e.path)}if(e.domain){if("string"!=typeof e.domain)throw this.reject(500),new Error("Domain must be specified and must be a string.");if(t=e.domain.match(g))throw this.reject(500),new Error("Illegal character "+t[0]+" in cookie domain");r.push("Domain="+e.domain.toLowerCase())}if(e.expires){if(!(e.expires instanceof Date))throw this.reject(500),new Error('Value supplied for cookie "expires" must be a vaild date object');r.push("Expires="+e.expires.toGMTString())}if(e.maxage){var n=e.maxage;if("string"==typeof n&&(n=parseInt(n,10)),isNaN(n)||n<=0)throw this.reject(500),new Error('Value supplied for cookie "maxage" must be a non-zero number');n=Math.round(n),r.push("Max-Age="+n.toString(10))}if(e.secure){if("boolean"!=typeof e.secure)throw this.reject(500),new Error('Value supplied for cookie "secure" must be of type boolean');r.push("Secure")}if(e.httponly){if("boolean"!=typeof e.httponly)throw this.reject(500),new Error('Value supplied for cookie "httponly" must be of type boolean');r.push("HttpOnly")}s+="Set-Cookie: "+r.join(";")+"\r\n"}.bind(this))}this._resolved=!0,this.emit("requestResolved",this),s+="\r\n";var d=new a(this.socket,[],e,!1,this.serverConfig);d.webSocketVersion=this.webSocketVersion,d.remoteAddress=this.remoteAddress,d.remoteAddresses=this.remoteAddresses;var b=this;return this._socketIsClosing?S(d):this.socket.write(s,"ascii",(function(e){e?S(d):(b._removeSocketCloseListeners(),d._addSocketEventListeners())})),this.emit("requestAccepted",d),d},_.prototype.reject=function(e,t,r){this._verifyResolution(),this._resolved=!0,this.emit("requestResolved",this),"number"!=typeof e&&(e=403);var n="HTTP/1.1 "+e+" "+w[e]+"\r\nConnection: close\r\n";if(t&&(n+="X-WebSocket-Reject-Reason: "+(t=t.replace(l,""))+"\r\n"),r)for(var o in r){var i=r[o].toString().replace(l,"");n+=o.replace(l,"")+": "+i+"\r\n"}n+="\r\n",this.socket.end(n,"ascii"),this.emit("requestRejected",this)},_.prototype._handleSocketCloseBeforeAccept=function(){this._socketIsClosing=!0,this._removeSocketCloseListeners()},_.prototype._removeSocketCloseListeners=function(){this.socket.removeListener("end",this._socketCloseHandler),this.socket.removeListener("close",this._socketCloseHandler)},_.prototype._verifyResolution=function(){if(this._resolved)throw new Error("WebSocketRequest may only be accepted or rejected one time.")},e.exports=_},49621:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(76513).__exportStar(r(33804),t)},50264:e=>{"use strict";e.exports=require("inspector")},51227:(e,t,r)=>{var n;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){var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(function(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(){var e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("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&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));var e},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(n=!1,function(){n||(n=!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||function(){},e.exports=r(18630)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},52018:e=>{"use strict";e.exports=require("tty")},53938:e=>{function t(){"function"!=typeof this.addEventListener&&(this._listeners={},this.addEventListener=r,this.removeEventListener=n,this.dispatchEvent=o)}function r(e,t){var r,n,o;if(e&&t){for(void 0===(r=this._listeners[e])&&(this._listeners[e]=r=[]),n=0;o=r[n];n++)if(o===t)return;r.push(t)}}function n(e,t){var r,n,o;if(e&&t&&void 0!==(r=this._listeners[e])){for(n=0;o=r[n];n++)if(o===t){r.splice(n,1);break}0===r.length&&delete this._listeners[e]}}function o(e){var t,r,n,o,i,s=!1;if(!e||"string"!=typeof e.type)throw new Error("`event` must have a valid `type` property");e._yaeti&&(e.target=this,e.cancelable=!0);try{e.stopImmediatePropagation=function(){s=!0}}catch(e){}for(t=e.type,r=this._listeners[t]||[],"function"==typeof(n=this["on"+t])&&n.call(this,e),o=0;(i=r[o])&&!s;o++)i.call(this,e);return!e.defaultPrevented}e.exports=t,Object.defineProperties(t.prototype,{listeners:{get:function(){return this._listeners}}})},54519:(e,t,r)=>{var n=r(52018),o=r(39023);t.init=function(e){e.inspectOpts={};for(var r=Object.keys(t.inspectOpts),n=0;n<r.length;n++)e.inspectOpts[r[n]]=t.inspectOpts[r[n]]},t.log=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return process.stderr.write(o.formatWithOptions.apply(o,[t.inspectOpts].concat(r))+"\n")},t.formatArgs=function(r){var n=this.namespace;if(this.useColors){var o=this.color,i="[3"+(o<8?o:"8;5;"+o),s=" ".concat(i,";1m").concat(n," ");r[0]=s+r[0].split("\n").join("\n"+s),r.push(i+"m+"+e.exports.humanize(this.diff)+"")}else r[0]=(t.inspectOpts.hideDate?"":(new Date).toISOString()+" ")+n+" "+r[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):n.isatty(process.stderr.fd)},t.destroy=o.deprecate((function(){}),"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{var i=r(78377);i&&(i.stderr||i).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(process.env).filter((function(e){return/^debug_/i.test(e)})).reduce((function(e,t){var r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(function(e,t){return t.toUpperCase()})),n=process.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=r(18630)(t);var s=e.exports.formatters;s.o=function(e){return this.inspectOpts.colors=this.useColors,o.inspect(e,this.inspectOpts).split("\n").map((function(e){return e.trim()})).join(" ")},s.O=function(e){return this.inspectOpts.colors=this.useColors,o.inspect(e,this.inspectOpts)}},56568:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e}(t=e.exports=r(90579)).log=function(){return"object"===("undefined"==typeof console?"undefined":n(console))&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var r=this.useColors;if(e[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+e[0]+(r?"%c ":" ")+"+"+t.humanize(this.diff),r){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var o=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(o++,"%c"===e&&(i=o))})),e.splice(i,0,n)}},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=o,t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("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="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(o())},56912:(e,t,r)=>{var n=r(30323).extend,o=r(39023),i=r(24434).EventEmitter,s=r(38099);function a(e){i.call(this),this.config={server:null},e&&n(this.config,e),this.handlers=[],this._requestHandler=this.handleRequest.bind(this),this.config.server&&this.attachServer(this.config.server)}o.inherits(a,i),a.prototype.attachServer=function(e){if(!e)throw new Error("You must specify a WebSocketServer instance to attach to.");this.server=e,this.server.on("request",this._requestHandler)},a.prototype.detachServer=function(){if(!this.server)throw new Error("Cannot detach from server: not attached.");this.server.removeListener("request",this._requestHandler),this.server=null},a.prototype.mount=function(e,t,r){if(!e)throw new Error("You must specify a path for this handler.");if(t||(t="____no_protocol____"),!r)throw new Error("You must specify a callback for this handler.");if(!((e=this.pathToRegExp(e))instanceof RegExp))throw new Error("Path must be specified as either a string or a RegExp.");var n=e.toString();if(t=t.toLocaleLowerCase(),-1!==this.findHandlerIndex(n,t))throw new Error("You may only mount one handler per path/protocol combination.");this.handlers.push({path:e,pathString:n,protocol:t,callback:r})},a.prototype.unmount=function(e,t){var r=this.findHandlerIndex(this.pathToRegExp(e).toString(),t);if(-1===r)throw new Error("Unable to find a route matching the specified path and protocol.");this.handlers.splice(r,1)},a.prototype.findHandlerIndex=function(e,t){t=t.toLocaleLowerCase();for(var r=0,n=this.handlers.length;r<n;r++){var o=this.handlers[r];if(o.pathString===e&&o.protocol===t)return r}return-1},a.prototype.pathToRegExp=function(e){return"string"==typeof e&&("*"===e?e=/^.*$/:(e=e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),e=new RegExp("^"+e+"$"))),e},a.prototype.handleRequest=function(e){var t=e.requestedProtocols;0===t.length&&(t=["____no_protocol____"]);for(var r=0;r<t.length;r++)for(var n=t[r].toLocaleLowerCase(),o=0,i=this.handlers.length;o<i;o++){var a=this.handlers[o];if(a.path.test(e.resourceURL.pathname)&&(n===a.protocol||"*"===a.protocol)){var c=new s(e,n);return void a.callback(c)}}e.reject(404,"No handler is available for the given request.")},e.exports=a},58611:e=>{"use strict";e.exports=require("http")},64474:(e,t,r)=>{var n=r(52018),o=r(39023);(t=e.exports=r(90579)).init=function(e){e.inspectOpts={};for(var r=Object.keys(t.inspectOpts),n=0;n<r.length;n++)e.inspectOpts[r[n]]=t.inspectOpts[r[n]]},t.log=function(){return s.write(o.format.apply(o,arguments)+"\n")},t.formatArgs=function(e){var r=this.namespace;if(this.useColors){var n=this.color,o=" [3"+n+";1m"+r+" ";e[0]=o+e[0].split("\n").join("\n"+o),e.push("[3"+n+"m+"+t.humanize(this.diff)+"")}else e[0]=(new Date).toUTCString()+" "+r+" "+e[0]},t.save=function(e){null==e?delete process.env.DEBUG:process.env.DEBUG=e},t.load=a,t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):n.isatty(i)},t.colors=[6,2,3,4,5,1],t.inspectOpts=Object.keys(process.env).filter((function(e){return/^debug_/i.test(e)})).reduce((function(e,t){var r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(function(e,t){return t.toUpperCase()})),n=process.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}),{});var i=parseInt(process.env.DEBUG_FD,10)||2;1!==i&&2!==i&&o.deprecate((function(){}),"except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)")();var s=1===i?process.stdout:2===i?process.stderr:function(e){var t;switch(process.binding("tty_wrap").guessHandleType(e)){case"TTY":(t=new n.WriteStream(e))._type="tty",t._handle&&t._handle.unref&&t._handle.unref();break;case"FILE":(t=new(r(79896).SyncWriteStream)(e,{autoClose:!1}))._type="fs";break;case"PIPE":case"TCP":(t=new(r(69278).Socket)({fd:e,readable:!1,writable:!0})).readable=!1,t.read=null,t._type="pipe",t._handle&&t._handle.unref&&t._handle.unref();break;default:throw new Error("Implement me. Unknown stream file type!")}return t.fd=e,t._isStdio=!0,t}(i);function a(){return process.env.DEBUG}t.formatters.o=function(e){return this.inspectOpts.colors=this.useColors,o.inspect(e,this.inspectOpts).split("\n").map((function(e){return e.trim()})).join(" ")},t.formatters.O=function(e){return this.inspectOpts.colors=this.useColors,o.inspect(e,this.inspectOpts)},t.enable(a())},65692:e=>{"use strict";e.exports=require("https")},69154:e=>{"use strict";e.exports=require("vm")},69278:e=>{"use strict";e.exports=require("net")},70857:e=>{"use strict";e.exports=require("os")},72150:e=>{function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}var r=1e3,n=60*r,o=60*n,i=24*o;function s(e,t,r){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}e.exports=function(e,a){a=a||{};var c,u=t(e);if("string"===u&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var s=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*o;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(e);if("number"===u&&!1===isNaN(e))return a.long?s(c=e,i,"day")||s(c,o,"hour")||s(c,n,"minute")||s(c,r,"second")||c+" ms":function(e){return e>=i?Math.round(e/i)+"d":e>=o?Math.round(e/o)+"h":e>=n?Math.round(e/n)+"m":e>=r?Math.round(e/r)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},73325:(e,t,r)=>{var n=r(20181).Buffer,o=r(24434).EventEmitter,i=r(30323).bufferAllocUnsafe;function s(e){if(!(this instanceof s))return new s(e);o.call(this);var t=this;void 0===e&&(e={}),t.encoding=e.encoding;var r={next:null,buffer:null},a={next:null,buffer:null},c=0;t.__defineGetter__("length",(function(){return c}));var u=0;t.write=function(e){return r.buffer?(a.next={next:null,buffer:e},a=a.next):(r.buffer=e,a=r),c+=e.length,t.emit("write",e),!0},t.end=function(e){n.isBuffer(e)&&t.write(e)},t.push=function(){return[].concat.apply([],arguments).forEach(t.write),t},t.forEach=function(e){if(!r.buffer)return i(0);if(r.buffer.length-u<=0)return t;for(var n={buffer:r.buffer.slice(u),next:r.next};n&&n.buffer&&!e(n.buffer);)n=n.next;return t},t.join=function(e,n){if(!r.buffer)return i(0);null==e&&(e=0),null==n&&(n=t.length);var o=i(n-e),s=0;return t.forEach((function(t){if(e<s+t.length&&s<n&&t.copy(o,Math.max(0,s-e),Math.max(0,e-s),Math.min(t.length,n-s)),(s+=t.length)>n)return!0})),o},t.joinInto=function(e,n,o,s){if(!r.buffer)return new i(0);null==o&&(o=0),null==s&&(s=t.length);var a=e;if(a.length-n<s-o)throw new Error("Insufficient space available in target Buffer.");var c=0;return t.forEach((function(e){if(o<c+e.length&&c<s&&e.copy(a,Math.max(n,n+c-o),Math.max(0,o-c),Math.min(e.length,s-c)),(c+=e.length)>s)return!0})),a},t.advance=function(e){for(u+=e,c-=e;r.buffer&&u>=r.buffer.length;)u-=r.buffer.length,r=r.next?r.next:{buffer:null,next:null};return null===r.buffer&&(a={next:null,buffer:null}),t.emit("advance",e),t},t.take=function(e,r){if(null==e?e=t.length:"number"!=typeof e&&(r=e,e=t.length),r||(r=t.encoding),r){var n="";return t.forEach((function(t){if(e<=0)return!0;n+=t.toString(r,0,Math.min(e,t.length)),e-=t.length})),n}return t.join(0,e)},t.toString=function(){return t.take("binary")}}e.exports=s,e.exports.BufferList=s,r(39023).inherits(s,o)},76513:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r.r(t),r.d(t,{__addDisposableResource:()=>N,__assign:()=>s,__asyncDelegator:()=>O,__asyncGenerator:()=>k,__asyncValues:()=>x,__await:()=>C,__awaiter:()=>y,__classPrivateFieldGet:()=>I,__classPrivateFieldIn:()=>j,__classPrivateFieldSet:()=>F,__createBinding:()=>v,__decorate:()=>c,__disposeResources:()=>M,__esDecorate:()=>l,__exportStar:()=>g,__extends:()=>i,__generator:()=>m,__importDefault:()=>P,__importStar:()=>L,__makeTemplateObject:()=>R,__metadata:()=>d,__param:()=>u,__propKey:()=>h,__read:()=>w,__rest:()=>a,__rewriteRelativeImportExtension:()=>B,__runInitializers:()=>f,__setFunctionName:()=>p,__spread:()=>_,__spreadArray:()=>E,__spreadArrays:()=>S,__values:()=>b,default:()=>U});var o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},o(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var s=function(){return s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},s.apply(this,arguments)};function a(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function c(e,t,r,o){var i,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"===("undefined"==typeof Reflect?"undefined":n(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var c=e.length-1;c>=0;c--)(i=e[c])&&(a=(s<3?i(a):s>3?i(t,r,a):i(t,r))||a);return s>3&&a&&Object.defineProperty(t,r,a),a}function u(e,t){return function(r,n){t(r,n,e)}}function l(e,t,r,o,i,s){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var c,u=o.kind,l="getter"===u?"get":"setter"===u?"set":"value",f=!t&&e?o.static?e:e.prototype:null,h=t||(f?Object.getOwnPropertyDescriptor(f,o.name):{}),p=!1,d=r.length-1;d>=0;d--){var y={};for(var m in o)y[m]="access"===m?{}:o[m];for(var m in o.access)y.access[m]=o.access[m];y.addInitializer=function(e){if(p)throw new TypeError("Cannot add initializers after decoration has completed");s.push(a(e||null))};var v=(0,r[d])("accessor"===u?{get:h.get,set:h.set}:h[l],y);if("accessor"===u){if(void 0===v)continue;if(null===v||"object"!==n(v))throw new TypeError("Object expected");(c=a(v.get))&&(h.get=c),(c=a(v.set))&&(h.set=c),(c=a(v.init))&&i.unshift(c)}else(c=a(v))&&("field"===u?i.unshift(c):h[l]=c)}f&&Object.defineProperty(f,o.name,h),p=!0}function f(e,t,r){for(var n=arguments.length>2,o=0;o<t.length;o++)r=n?t[o].call(e,r):t[o].call(e);return n?r:void 0}function h(e){return"symbol"===n(e)?e:"".concat(e)}function p(e,t,r){return"symbol"===n(t)&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function d(e,t){if("object"===("undefined"==typeof Reflect?"undefined":n(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function y(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))}function m(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}var v=Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function g(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||v(t,e,r)}function b(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function w(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}function _(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(w(arguments[t]));return e}function S(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,o++)n[o]=i[s];return n}function E(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function C(e){return this instanceof C?(this.v=e,this):new C(e)}function k(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),i=[];return n=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",(function(e){return function(t){return Promise.resolve(t).then(e,u)}})),n[Symbol.asyncIterator]=function(){return this},n;function s(e,t){o[e]&&(n[e]=function(t){return new Promise((function(r,n){i.push([e,t,r,n])>1||a(e,t)}))},t&&(n[e]=t(n[e])))}function a(e,t){try{(r=o[e](t)).value instanceof C?Promise.resolve(r.value.v).then(c,u):l(i[0][2],r)}catch(e){l(i[0][3],e)}var r}function c(e){a("next",e)}function u(e){a("throw",e)}function l(e,t){e(t),i.shift(),i.length&&a(i[0][0],i[0][1])}}function O(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:C(e[n](t)),done:!1}:o?o(t):t}:o}}function x(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=b(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){!function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}(n,o,(t=e[r](t)).done,t.value)}))}}}function R(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var A=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},T=function(e){return T=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},T(e)};function L(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=T(e),n=0;n<r.length;n++)"default"!==r[n]&&v(t,e,r[n]);return A(t,e),t}function P(e){return e&&e.__esModule?e:{default:e}}function I(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function F(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function j(e,t){if(null===t||"object"!==n(t)&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function N(e,t,r){if(null!=t){if("object"!==n(t)&&"function"!=typeof t)throw new TypeError("Object expected.");var o,i;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");o=t[Symbol.asyncDispose]}if(void 0===o){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");o=t[Symbol.dispose],r&&(i=o)}if("function"!=typeof o)throw new TypeError("Object not disposable.");i&&(o=function(){try{i.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:o,async:r})}else r&&e.stack.push({async:!0});return t}var D="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function M(e){function t(t){e.error=e.hasError?new D(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var r,n=0;return function o(){for(;r=e.stack.pop();)try{if(!r.async&&1===n)return n=0,e.stack.push(r),Promise.resolve().then(o);if(r.dispose){var i=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(i).then(o,(function(e){return t(e),o()}))}else n|=1}catch(e){t(e)}if(1===n)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}function B(e,t){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,(function(e,r,n,o,i){return r?t?".jsx":".js":!n||o&&i?n+o+"."+i.toLowerCase()+"js":e})):e}const U={__extends:i,__assign:s,__rest:a,__decorate:c,__param:u,__esDecorate:l,__runInitializers:f,__propKey:h,__setFunctionName:p,__metadata:d,__awaiter:y,__generator:m,__createBinding:v,__exportStar:g,__values:b,__read:w,__spread:_,__spreadArrays:S,__spreadArray:E,__await:C,__asyncGenerator:k,__asyncDelegator:O,__asyncValues:x,__makeTemplateObject:R,__importStar:L,__importDefault:P,__classPrivateFieldGet:I,__classPrivateFieldSet:F,__classPrivateFieldIn:j,__addDisposableResource:N,__disposeResources:M,__rewriteRelativeImportExtension:B}},76982:e=>{"use strict";e.exports=require("crypto")},78377:(e,t,r)=>{"use strict";var n,o=r(70857),i=r(52018),s=r(96482),a=process.env;function c(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function u(e,t){if(0===n)return 0;if(s("color=16m")||s("color=full")||s("color=truecolor"))return 3;if(s("color=256"))return 2;if(e&&!t&&void 0===n)return 0;var r=n||0;if("dumb"===a.TERM)return r;if("win32"===process.platform){var i=o.release().split(".");return Number(i[0])>=10&&Number(i[2])>=10586?Number(i[2])>=14931?3:2:1}if("CI"in a)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((function(e){return e in a}))||"codeship"===a.CI_NAME?1:r;if("TEAMCITY_VERSION"in a)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(a.TEAMCITY_VERSION)?1:0;if("truecolor"===a.COLORTERM)return 3;if("TERM_PROGRAM"in a){var c=parseInt((a.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(a.TERM_PROGRAM){case"iTerm.app":return c>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(a.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(a.TERM)||"COLORTERM"in a?1:r}s("no-color")||s("no-colors")||s("color=false")||s("color=never")?n=0:(s("color")||s("colors")||s("color=true")||s("color=always"))&&(n=1),"FORCE_COLOR"in a&&(n="true"===a.FORCE_COLOR?1:"false"===a.FORCE_COLOR?0:0===a.FORCE_COLOR.length?1:Math.min(parseInt(a.FORCE_COLOR,10),3)),e.exports={supportsColor:function(e){return c(u(e,e&&e.isTTY))},stdout:c(u(!0,i.isatty(1))),stderr:c(u(!0,i.isatty(2)))}},79896:e=>{"use strict";e.exports=require("fs")},80103:(e,t,r)=>{"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?e.exports=r(51227):e.exports=r(54519)},81232:(e,t,r)=>{var n=r(87893),o=r(30323).bufferAllocUnsafe;function i(e,t,r){this.maskBytes=e,this.frameHeader=t,this.config=r,this.maxReceivedFrameSize=r.maxReceivedFrameSize,this.protocolError=!1,this.frameTooLarge=!1,this.invalidCloseFrameLength=!1,this.parseState=1,this.closeStatus=-1}i.prototype.addData=function(e){if(1===this.parseState&&e.length>=2){e.joinInto(this.frameHeader,0,0,2),e.advance(2);var t=this.frameHeader[0],r=this.frameHeader[1];if(this.fin=Boolean(128&t),this.rsv1=Boolean(64&t),this.rsv2=Boolean(32&t),this.rsv3=Boolean(16&t),this.mask=Boolean(128&r),this.opcode=15&t,this.length=127&r,this.opcode>=8){if(this.length>125)return this.protocolError=!0,this.dropReason="Illegal control frame longer than 125 bytes.",!0;if(!this.fin)return this.protocolError=!0,this.dropReason="Control frames must not be fragmented.",!0}126===this.length?this.parseState=2:127===this.length?this.parseState=3:this.parseState=4}if(2===this.parseState)e.length>=2&&(e.joinInto(this.frameHeader,2,0,2),e.advance(2),this.length=this.frameHeader.readUInt16BE(2),this.parseState=4);else if(3===this.parseState&&e.length>=8){e.joinInto(this.frameHeader,2,0,8),e.advance(8);var i=[this.frameHeader.readUInt32BE(2),this.frameHeader.readUInt32BE(6)];if(0!==i[0])return this.protocolError=!0,this.dropReason="Unsupported 64-bit length frame received",!0;this.length=i[1],this.parseState=4}if(4===this.parseState&&(this.mask?e.length>=4&&(e.joinInto(this.maskBytes,0,0,4),e.advance(4),this.parseState=5):this.parseState=5),5===this.parseState){if(this.length>this.maxReceivedFrameSize)return this.frameTooLarge=!0,this.dropReason="Frame size of "+this.length.toString(10)+" bytes exceeds maximum accepted frame size",!0;if(0===this.length)return this.binaryPayload=o(0),this.parseState=6,!0;if(e.length>=this.length)return this.binaryPayload=e.take(this.length),e.advance(this.length),this.mask&&n.unmask(this.binaryPayload,this.maskBytes),8===this.opcode&&(1===this.length&&(this.binaryPayload=o(0),this.invalidCloseFrameLength=!0),this.length>=2&&(this.closeStatus=this.binaryPayload.readUInt16BE(0),this.binaryPayload=this.binaryPayload.slice(2))),this.parseState=6,!0}return!1},i.prototype.throwAwayPayload=function(e){return e.length>=this.length&&(e.advance(this.length),this.parseState=6,!0)},i.prototype.toBuffer=function(e){var t,r,i,s=2,a=0,c=0;this.fin&&(a|=128),this.rsv1&&(a|=64),this.rsv2&&(a|=32),this.rsv3&&(a|=16),this.mask&&(c|=128),a|=15&this.opcode,8===this.opcode?(this.length=2,this.binaryPayload&&(this.length+=this.binaryPayload.length),(r=o(this.length)).writeUInt16BE(this.closeStatus,0),this.length>2&&this.binaryPayload.copy(r,2)):this.binaryPayload?(r=this.binaryPayload,this.length=r.length):this.length=0,this.length<=125?c|=127&this.length:this.length>125&&this.length<=65535?(c|=126,s+=2):this.length>65535&&(c|=127,s+=8);var u=o(this.length+s+(this.mask?4:0));return u[0]=a,u[1]=c,i=2,this.length>125&&this.length<=65535?(u.writeUInt16BE(this.length,i),i+=2):this.length>65535&&(u.writeUInt32BE(0,i),u.writeUInt32BE(this.length,i+4),i+=8),this.mask?(t=e?0:4294967295*Math.random()>>>0,this.maskBytes.writeUInt32BE(t,0),this.maskBytes.copy(u,i),i+=4,r&&n.mask(r,this.maskBytes,u,i,this.length)):r&&r.copy(u,i),u},i.prototype.toString=function(){return"Opcode: "+this.opcode+", fin: "+this.fin+", length: "+this.length+", hasPayload: "+Boolean(this.binaryPayload)+", masked: "+this.mask},e.exports=i},82418:(e,t,r)=>{var n=r(30323),o=n.extend,i=r(39023),s=r(24434).EventEmitter,a=r(58611),c=r(65692),u=r(87016),l=r(76982),f=r(6881),h=n.bufferAllocUnsafe,p=["(",")","<",">","@",",",";",":","\\",'"',"/","[","]","?","=","{","}"," ",String.fromCharCode(9)],d=["hostname","port","method","path","headers"];function y(e){var t;switch(s.call(this),this.config={maxReceivedFrameSize:1048576,maxReceivedMessageSize:8388608,fragmentOutgoingMessages:!0,fragmentationThreshold:16384,webSocketVersion:13,assembleFragments:!0,disableNagleAlgorithm:!0,closeTimeout:5e3,tlsOptions:{}},e&&(e.tlsOptions?(t=e.tlsOptions,delete e.tlsOptions):t={},o(this.config,e),o(this.config.tlsOptions,t)),this._req=null,this.config.webSocketVersion){case 8:case 13:break;default:throw new Error("Requested webSocketVersion is not supported. Allowed values are 8 and 13.")}}i.inherits(y,s),y.prototype.connect=function(e,t,r,i,s){var l=this;if("string"==typeof t&&(t=t.length>0?[t]:[]),t instanceof Array||(t=[]),this.protocols=t,this.origin=r,this.url="string"==typeof e?u.parse(e):e,!this.url.protocol)throw new Error("You must specify a full WebSocket URL, including protocol.");if(!this.url.host)throw new Error("You must specify a full WebSocket URL, including hostname. Relative URLs are not supported.");this.secure="wss:"===this.url.protocol,this.protocols.forEach((function(e){for(var t=0;t<e.length;t++){var r=e.charCodeAt(t),n=e.charAt(t);if(r<33||r>126||-1!==p.indexOf(n))throw new Error('Protocol list contains invalid character "'+String.fromCharCode(r)+'"')}})),this.url.port||(this.url.port={"ws:":"80","wss:":"443"}[this.url.protocol]);for(var f=h(16),y=0;y<16;y++)f[y]=Math.round(255*Math.random());this.base64nonce=f.toString("base64");var m=this.url.hostname;("ws:"===this.url.protocol&&"80"!==this.url.port||"wss:"===this.url.protocol&&"443"!==this.url.port)&&(m+=":"+this.url.port);var v,g={};function b(e){l._req=null,l.emit("connectFailed",e)}this.secure&&this.config.tlsOptions.hasOwnProperty("headers")&&o(g,this.config.tlsOptions.headers),i&&o(g,i),o(g,{Upgrade:"websocket",Connection:"Upgrade","Sec-WebSocket-Version":this.config.webSocketVersion.toString(10),"Sec-WebSocket-Key":this.base64nonce,Host:g.Host||m}),this.protocols.length>0&&(g["Sec-WebSocket-Protocol"]=this.protocols.join(", ")),this.origin&&(13===this.config.webSocketVersion?g.Origin=this.origin:8===this.config.webSocketVersion&&(g["Sec-WebSocket-Origin"]=this.origin)),v=this.url.pathname?this.url.path:this.url.path?"/"+this.url.path:"/";var w={agent:!1};if(s&&o(w,s),o(w,{hostname:this.url.hostname,port:this.url.port,method:"GET",path:v,headers:g}),this.secure){var _=this.config.tlsOptions;for(var S in _)_.hasOwnProperty(S)&&-1===d.indexOf(S)&&(w[S]=_[S])}var E=this._req=(this.secure?c:a).request(w);E.on("upgrade",(function(e,t,r){l._req=null,E.removeListener("error",b),l.socket=t,l.response=e,l.firstDataChunk=r,l.validateHandshake()})),E.on("error",b),E.on("response",(function(e){if(l._req=null,n.eventEmitterListenerCount(l,"httpResponse")>0)l.emit("httpResponse",e,l),e.socket&&e.socket.end();else{var t=[];for(var r in e.headers)t.push(r+": "+e.headers[r]);l.failHandshake("Server responded with a non-101 status: "+e.statusCode+" "+e.statusMessage+"\nResponse Headers Follow:\n"+t.join("\n")+"\n")}})),E.end()},y.prototype.validateHandshake=function(){var e=this.response.headers;if(this.protocols.length>0){if(this.protocol=e["sec-websocket-protocol"],!this.protocol)return void this.failHandshake("Expected a Sec-WebSocket-Protocol header.");if(-1===this.protocols.indexOf(this.protocol))return void this.failHandshake("Server did not respond with a requested protocol.")}if(e.connection&&"upgrade"===e.connection.toLocaleLowerCase())if(e.upgrade&&"websocket"===e.upgrade.toLocaleLowerCase()){var t=l.createHash("sha1");t.update(this.base64nonce+"258EAFA5-E914-47DA-95CA-C5AB0DC85B11");var r=t.digest("base64");e["sec-websocket-accept"]?e["sec-websocket-accept"]===r?this.succeedHandshake():this.failHandshake("Sec-WebSocket-Accept header from server didn't match expected value of "+r):this.failHandshake("Expected Sec-WebSocket-Accept header from server")}else this.failHandshake("Expected an Upgrade: websocket header from the server");else this.failHandshake("Expected a Connection: Upgrade header from the server")},y.prototype.failHandshake=function(e){this.socket&&this.socket.writable&&this.socket.end(),this.emit("connectFailed",new Error(e))},y.prototype.succeedHandshake=function(){var e=new f(this.socket,[],this.protocol,!0,this.config);e.webSocketVersion=this.config.webSocketVersion,e._addSocketEventListeners(),this.emit("connect",e),this.firstDataChunk.length>0&&e.handleSocketData(this.firstDataChunk),this.firstDataChunk=null},y.prototype.abort=function(){this._req&&this._req.abort()},e.exports=y},82726:(e,t,r)=>{"use strict";try{e.exports=r(16291)(__dirname)}catch(t){e.exports=r(16086)}},82987:e=>{"use strict";e.exports=require("perf_hooks")},87016:e=>{"use strict";e.exports=require("url")},87893:(e,t,r)=>{"use strict";try{e.exports=r(16291)(__dirname)}catch(t){e.exports=r(27539)}},89274:(e,t,r)=>{"use strict";e.exports=r(89425)},89425:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var o=r(69278),i=r(29989),s=r(93474)("detect-port");function a(e,t,r,n){function o(){++e>=t&&(s("port: %s >= maxPort: %s, give up and use random port",e,t),e=0,t=0),a(e,t,r,n)}r?c(e,r,(function(e,t){if(e)return"EADDRNOTAVAIL"===e.code?n(new Error("the ip that is not unkonwn on the machine")):o();n(null,t)})):c(e,null,(function(t,r){return 0===e?n(t,r):t?o():void c(e,"0.0.0.0",(function(t){if(t)return o();c(e,"localhost",(function(t){if(t&&"EADDRNOTAVAIL"!==t.code)return o();c(e,i.ip(),(function(e,t){if(e)return o();n(null,t)}))}))}))}))}function c(e,t,r){var n=new o.Server;n.on("error",(function(o){return s("listen %s:%s error: %s",t,e,o),n.close(),"ENOTFOUND"===o.code?(s("ignore dns ENOTFOUND error, get free %s:%s",t,e),r(null,e)):r(o)})),n.listen(e,t,(function(){return e=n.address().port,n.close(),s("get free %s:%s",t,e),r(null,e)}))}e.exports=function(e,t){var r="";"object"===n(e)&&e?(r=e.hostname,t=e.callback,e=e.port):"function"==typeof e&&(t=e,e=null);var o=(e=parseInt(e)||0)+10;return o>65535&&(o=65535),s("detect free port between [%s, %s)",e,o),"function"==typeof t?a(e,o,r,t):new Promise((function(t){a(e,o,r,(function(e,r){t(r)}))}))}},90297:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function i(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}r.r(t),r.d(t,{CallbackManager:()=>v,JSCLogger:()=>q,MAX_SHARED_ARRAY_BUFFER_SIZE:()=>f,RpcSocket:()=>C,StringMutex:()=>h,TypedSharedArrayBuffer:()=>a,createPortFromMessagePort:()=>O,createPortFromWebSocket:()=>k,createPortFromWorkerPort:()=>x});var a=i((function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new SharedArrayBuffer(4);!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.typeFactory=t,this.sharedArrayBuffer=r,this.typedArray=new t(r)}));function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function l(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}var f=10485760,h=function(){return e=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new a(Int32Array);!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.mutex=n,this.encoder=new("undefined"!=typeof globalThis&&"TextEncoder"in globalThis?TextEncoder:r(39023).TextEncoder),this.decoder=new("undefined"!=typeof globalThis&&"TextDecoder"in globalThis?TextDecoder:r(39023).TextDecoder),this.memory=new a(Uint8Array,t),this.mutex.typedArray[0]=0},(t=[{key:"getMemory",value:function(){this.mutex.typedArray[0]=0,Atomics.wait(this.mutex.typedArray,0,0);var e=this.mutex.typedArray[0],t=this.memory.typedArray.slice(0,e),r=this.decoder.decode(t);return this.mutex.typedArray[0]=0,r}},{key:"writeMemory",value:function(e){if(0===this.mutex.typedArray[0]){var t=this.encoder.encode(e);this.memory.typedArray.set(t),this.mutex.typedArray[0]=t.length,Atomics.notify(this.mutex.typedArray,0,1/0)}}}])&&u(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function y(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,m(n.key),n)}}function m(e){var t=function(e){if("object"!=p(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==p(t)?t:t+""}var v=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.nextCallbackId=1,this.callbacks=new Map},(t=[{key:"getCallback",value:function(e){var t=this.nextCallbackId++;return this.callbacks.set(t,e),t}},{key:"invokeCallback",value:function(e,t){var r=this.callbacks.get(e);r&&(this.callbacks.delete(e),r.apply(void 0,function(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t)))}}])&&y(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function b(){b=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},s=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var i=t&&t.prototype instanceof v?t:v,s=Object.create(i.prototype),a=new P(n||[]);return o(s,"_invoke",{value:R(e,r,a)}),s}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function v(){}function w(){}function _(){}var S={};u(S,s,(function(){return this}));var E=Object.getPrototypeOf,C=E&&E(E(I([])));C&&C!==r&&n.call(C,s)&&(S=C);var k=_.prototype=v.prototype=Object.create(S);function O(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function r(o,i,s,a){var c=f(e[o],e,i);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==g(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,s,a)}),(function(e){r("throw",e,s,a)})):t.resolve(l).then((function(e){u.value=e,s(u)}),(function(e){return r("throw",e,s,a)}))}a(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function R(t,r,n){var o=h;return function(i,s){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw s;return{value:e,done:!0}}for(n.method=i,n.arg=s;;){var a=n.delegate;if(a){var c=A(a,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var u=f(t,r,n);if("normal"===u.type){if(o=n.done?y:p,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=y,n.method="throw",n.arg=u.arg)}}}function A(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var s=i.arg;return s?s.done?(r[t.resultName]=s.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(g(t)+" is not iterable")}return w.prototype=_,o(k,"constructor",{value:_,configurable:!0}),o(_,"constructor",{value:w,configurable:!0}),w.displayName=u(_,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,u(e,c,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},O(x.prototype),u(x.prototype,a,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var s=new x(l(e,r,n,o),i);return t.isGeneratorFunction(r)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},O(k),u(k,c,"Generator"),u(k,s,(function(){return this})),u(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return a.type="throw",a.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),u=n.call(s,"finallyLoc");if(c&&u){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=e,s.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function w(e,t,r,n,o,i,s){try{var a=e[i](s),c=a.value}catch(e){return void r(e)}a.done?t(c):Promise.resolve(c).then(n,o)}function _(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function s(e){w(i,n,o,s,a,"next",e)}function a(e){w(i,n,o,s,a,"throw",e)}s(void 0)}))}}function S(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,E(n.key),n)}}function E(e){var t=function(e){if("object"!=g(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=g(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==g(t)?t:t+""}var C=function(){return e=function e(t,r,n,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.direction=t,this.port=r,this.callback=n,this.logger=o,this.callbacks=new v,this.port.setMessageListener(this.onMessage.bind(this))},t=[{key:"onMessage",value:(n=_(b().mark((function e(t){var r,n,o,i;return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.logger.debug("[RpcSocket:".concat(this.direction,"] onMessage"),t),!(r=t).response){e.next=9;break}if((n=r).messageId){e.next=6;break}throw new Error("[Proxy] wrong callback messageId");case 6:this.callbacks.invokeCallback(n.messageId,[n.payload]),e.next=13;break;case 9:return e.next=11,this.callback(r);case 11:o=e.sent,r.messageId&&(i={direction:this.direction,messageId:r.messageId,payload:o,response:!0,type:r.type},this.port.postMessage(i));case 13:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"sendMessage",value:(r=_(b().mark((function e(t,r,n){var o,i,s,a=this;return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n&&(i=new Promise((function(e){o=a.callbacks.getCallback(e)}))),s={direction:this.direction,messageId:o,payload:r,type:t},this.logger.debug("[RpcSocket:".concat(this.direction,"] postMessage"),s),this.port.postMessage(s),e.abrupt("return",i);case 5:case"end":return e.stop()}}),e,this)}))),function(e,t,n){return r.apply(this,arguments)})}],t&&S(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r,n}();function k(e){return{setMessageListener:function(t){e.onmessage=function(e){t(JSON.parse(e.data))}},postMessage:function(t){e.send(JSON.stringify(t))}}}function O(e){return{setMessageListener:function(t){e.onmessage=function(e){t(e.data)}},postMessage:function(t){e.postMessage(t)}}}function x(e){return{setMessageListener:function(t){e.on("message",t)},postMessage:function(t){try{e.postMessage(t)}catch(r){try{e.postMessage(JSON.parse(JSON.stringify(t)))}catch(e){global.console.error(e)}}}}}function R(e){return R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},R(e)}function A(){}var T="undefined",L=["trace","debug","info","warn","error"];function P(e,t){return e[t].bind(e)}function I(e,t){for(var r=0;r<L.length;r++){var n=L[r];this[n]=r<e?A:this.methodFactory(n,e,t)}this.log=this.debug}function F(e){return function(e){return"debug"===e&&(e="log"),("undefined"==typeof console?"undefined":R(console))!==T&&(void 0!==console[e]?P(console,e):void 0!==console.log?P(console,"log"):A)}(e)}function j(e,t,r){var n,o=this,i="loglevel";function s(){var e;if(("undefined"==typeof window?"undefined":R(window))!==T&&i){try{e=window.localStorage[i]}catch(e){}if(R(e)===T)try{var t=window.document.cookie,r=t.indexOf(encodeURIComponent(i)+"=");-1!==r&&(e=/^([^;]+)/.exec(t.slice(r))[1])}catch(e){}return void 0===o.levels[e]&&(e=void 0),e}}"string"==typeof e?i+=":"+e:"symbol"===R(e)&&(i=void 0),o.name=e,o.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},o.methodFactory=r||F,o.getLevel=function(){return n},o.setLevel=function(t,r){if("string"==typeof t&&void 0!==o.levels[t.toUpperCase()]&&(t=o.levels[t.toUpperCase()]),!("number"==typeof t&&t>=0&&t<=o.levels.SILENT))throw new Error("log.setLevel() called with invalid level: "+t);if(n=t,!1!==r&&function(e){var t=(L[e]||"silent").toUpperCase();if(("undefined"==typeof window?"undefined":R(window))!==T&&i){try{return void(window.localStorage[i]=t)}catch(e){}try{window.document.cookie=encodeURIComponent(i)+"="+t+";"}catch(e){}}}(t),I.call(o,t,e),("undefined"==typeof console?"undefined":R(console))===T&&t<o.levels.SILENT)return"No console available for logging"},o.setDefaultLevel=function(e){s()||o.setLevel(e,!1)},o.enableAll=function(e){o.setLevel(o.levels.TRACE,e)},o.disableAll=function(e){o.setLevel(o.levels.SILENT,e)};var a=s();null==a&&(a=null==t?"WARN":t),o.setLevel(a,!1)}var N=new j,D={};N.getLogger=function(e){if("symbol"!==R(e)&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=D[e];return t||(t=D[e]=new j(e,N.getLevel(),N.methodFactory)),t};var M=("undefined"==typeof window?"undefined":R(window))!==T?window.log:void 0;N.noConflict=function(){return("undefined"==typeof window?"undefined":R(window))!==T&&window.log===N&&(window.log=M),N},N.getLoggers=function(){return D};const B=N;B.noConflict();var U=B.methodFactory;B.methodFactory=function(e,t,r){var n=U(e,t,r);return function(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];n.apply(void 0,["[remote-jsc] ".concat(e.toUpperCase())].concat(r))}};var q=B},90579:(e,t,r)=>{var n;function o(e){function r(){if(r.enabled){var e=r,o=+new Date,i=o-(n||o);e.diff=i,e.prev=n,e.curr=o,n=o;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var c=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(r,n){if("%%"===r)return r;c++;var o=t.formatters[n];if("function"==typeof o){var i=s[c];r=o.call(e,i),s.splice(c,1),c--}return r})),t.formatArgs.call(e,s),(r.log||t.log||console.log.bind(console)).apply(e,s)}}return r.namespace=e,r.enabled=t.enabled(e),r.useColors=t.useColors(),r.color=function(e){var r,n=0;for(r in e)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]}(e),"function"==typeof t.init&&t.init(r),r}(t=e.exports=o.debug=o.default=o).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){t.save(e),t.names=[],t.skips=[];for(var r=("string"==typeof e?e:"").split(/[\s,]+/),n=r.length,o=0;o<n;o++)r[o]&&("-"===(e=r[o].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){var 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=r(72150),t.names=[],t.skips=[],t.formatters={}},93474:(e,t,r)=>{"undefined"!=typeof process&&"renderer"===process.type?e.exports=r(13442):e.exports=r(48920)},96482:e=>{"use strict";e.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:process.argv,r=e.startsWith("-")?"":1===e.length?"-":"--",n=t.indexOf(r+e),o=t.indexOf("--");return-1!==n&&(-1===o||n<o)}},97701:(e,t,r)=>{var n;function o(e){function r(){if(r.enabled){var e=r,o=+new Date,i=o-(n||o);e.diff=i,e.prev=n,e.curr=o,n=o;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var c=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(r,n){if("%%"===r)return r;c++;var o=t.formatters[n];if("function"==typeof o){var i=s[c];r=o.call(e,i),s.splice(c,1),c--}return r})),t.formatArgs.call(e,s),(r.log||t.log||console.log.bind(console)).apply(e,s)}}return r.namespace=e,r.enabled=t.enabled(e),r.useColors=t.useColors(),r.color=function(e){var r,n=0;for(r in e)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]}(e),"function"==typeof t.init&&t.init(r),r}(t=e.exports=o.debug=o.default=o).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){t.save(e),t.names=[],t.skips=[];for(var r=("string"==typeof e?e:"").split(/[\s,]+/),n=r.length,o=0;o<n;o++)r[o]&&("-"===(e=r[o].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){var 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=r(30340),t.names=[],t.skips=[],t.formatters={}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";var e=n;function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function o(){o=function(){return r};var e,r={},n=Object.prototype,i=n.hasOwnProperty,s=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function h(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),a=new P(n||[]);return s(i,"_invoke",{value:R(e,r,a)}),i}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}r.wrap=h;var d="suspendedStart",y="suspendedYield",m="executing",v="completed",g={};function b(){}function w(){}function _(){}var S={};f(S,c,(function(){return this}));var E=Object.getPrototypeOf,C=E&&E(E(I([])));C&&C!==n&&i.call(C,c)&&(S=C);var k=_.prototype=b.prototype=Object.create(S);function O(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,r){function n(o,s,a,c){var u=p(e[o],e,s);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==t(f)&&i.call(f,"__await")?r.resolve(f.__await).then((function(e){n("next",e,a,c)}),(function(e){n("throw",e,a,c)})):r.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,c)}))}c(u.arg)}var o;s(this,"_invoke",{value:function(e,t){function i(){return new r((function(r,o){n(e,t,r,o)}))}return o=o?o.then(i,i):i()}})}function R(t,r,n){var o=d;return function(i,s){if(o===m)throw Error("Generator is already running");if(o===v){if("throw"===i)throw s;return{value:e,done:!0}}for(n.method=i,n.arg=s;;){var a=n.delegate;if(a){var c=A(a,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var u=p(t,r,n);if("normal"===u.type){if(o=n.done?v:y,u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=v,n.method="throw",n.arg=u.arg)}}}function A(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=p(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var s=i.arg;return s?s.done?(r[t.resultName]=s.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function I(r){if(r||""===r){var n=r[c];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,s=function t(){for(;++o<r.length;)if(i.call(r,o))return t.value=r[o],t.done=!1,t;return t.value=e,t.done=!0,t};return s.next=s}}throw new TypeError(t(r)+" is not iterable")}return w.prototype=_,s(k,"constructor",{value:_,configurable:!0}),s(_,"constructor",{value:w,configurable:!0}),w.displayName=f(_,l,"GeneratorFunction"),r.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,f(e,l,"GeneratorFunction")),e.prototype=Object.create(k),e},r.awrap=function(e){return{__await:e}},O(x.prototype),f(x.prototype,u,(function(){return this})),r.AsyncIterator=x,r.async=function(e,t,n,o,i){void 0===i&&(i=Promise);var s=new x(h(e,t,n,o),i);return r.isGeneratorFunction(t)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},O(k),f(k,l,"Generator"),f(k,c,(function(){return this})),f(k,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},r.values=I,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return a.type="throw",a.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var c=i.call(s,"catchLoc"),u=i.call(s,"finallyLoc");if(c&&u){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=e,s.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},r}Object.defineProperty(e,"__esModule",{value:!0});var i=r(76513),s=r(90297),a=i.__importDefault(r(89274)),c=r(50264),u=r(28167),l=r(47706),f=r(49621);u.isMainThread||function(){i.__awaiter(this,void 0,void 0,o().mark((function e(){var t,r,n,i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=u.workerData,(r=s.JSCLogger).setLevel(t.logLevel||s.JSCLogger.levels.WARN),n=(0,l.runChild)(u.parentPort,r),e.next=6,(0,a.default)(f.DEFAULT_JSC_INSPECTOR_PORT);case 6:i=e.sent,(0,c.open)(i,t.inspectorHost||f.DEFAULT_JSC_INSPECTOR_HOST),n.sendMessage("InspectorCreated",{remoteWorkerInspectorUrl:(0,c.url)()},!1),(0,c.waitForDebugger)();case 10:case"end":return e.stop()}}),e)})))}(),process.on("unhandledRejection",(function(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];(e=global.console).error.apply(e,["Uncaught (in promise)"].concat(r))}))})();var o=exports;for(var i in n)o[i]=n[i];n.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})();