qumra-cli 1.1.48 → 1.1.49
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/build/cli.cjs +4 -4
- package/build/cli.cjs.map +1 -1
- package/package.json +2 -2
package/build/cli.cjs
CHANGED
|
@@ -14,7 +14,7 @@ const Mo=s,Uo=o,qo=w,Ho=function(){var e;return e=Fo?process.env.TEMP||process.e
|
|
|
14
14
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
15
15
|
* MIT Licensed
|
|
16
16
|
*/
|
|
17
|
-
!function(e){var t=_u,n=o.extname,r=/^\s*([^;\s]*)(?:;|\s|$)/,i=/^text\//i;function s(e){if(!e||"string"!=typeof e)return!1;var n=r.exec(e),s=n&&t[n[1].toLowerCase()];return s&&s.charset?s.charset:!(!n||!i.test(n[1]))&&"UTF-8"}e.charset=s,e.charsets={lookup:s},e.contentType=function(t){if(!t||"string"!=typeof t)return!1;var n=-1===t.indexOf("/")?e.lookup(t):t;if(!n)return!1;if(-1===n.indexOf("charset")){var r=e.charset(n);r&&(n+="; charset="+r.toLowerCase())}return n},e.extension=function(t){if(!t||"string"!=typeof t)return!1;var n=r.exec(t),i=n&&e.extensions[n[1].toLowerCase()];if(!i||!i.length)return!1;return i[0]},e.extensions=Object.create(null),e.lookup=function(t){if(!t||"string"!=typeof t)return!1;var r=n("x."+t).toLowerCase().substr(1);if(!r)return!1;return e.types[r]||!1},e.types=Object.create(null),function(e,n){var r=["nginx","apache",void 0,"iana"];Object.keys(t).forEach((function(i){var s=t[i],o=s.extensions;if(o&&o.length){e[i]=o;for(var a=0;a<o.length;a++){var c=o[a];if(n[c]){var l=r.indexOf(t[n[c]].source),u=r.indexOf(s.source);if("application/octet-stream"!==n[c]&&(l>u||l===u&&"application/"===n[c].substr(0,12)))continue}n[c]=i}}}))}(e.extensions,e.types)}(bu);var wu=function(e){var t="function"==typeof setImmediate?setImmediate:"object"==typeof process&&"function"==typeof process.nextTick?process.nextTick:null;t?t(e):setTimeout(e,0)};var xu=wu,Eu=function(e){var t=!1;return xu((function(){t=!0})),function(n,r){t?e(n,r):xu((function(){e(n,r)}))}};var Su=function(e){Object.keys(e.jobs).forEach(Tu.bind(e)),e.jobs={}};function Tu(e){"function"==typeof this.jobs[e]&&this.jobs[e]()}var Du=Eu,ku=Su,Au=function(e,t,n,r){var i=n.keyedList?n.keyedList[n.index]:n.index;n.jobs[i]=function(e,t,n,r){var i;i=2==e.length?e(n,Du(r)):e(n,t,Du(r));return i}(t,i,e[i],(function(e,t){i in n.jobs&&(delete n.jobs[i],e?ku(n):n.results[i]=t,r(e,n.results))}))};var Cu=function(e,t){var n=!Array.isArray(e),r={index:0,keyedList:n||t?Object.keys(e):null,jobs:{},results:n?{}:[],size:n?Object.keys(e).length:e.length};t&&r.keyedList.sort(n?t:function(n,r){return t(e[n],e[r])});return r};var Ru=Su,Ou=Eu,Lu=function(e){if(!Object.keys(this.jobs).length)return;this.index=this.size,Ru(this),Ou(e)(null,this.results)};var Iu=Au,Pu=Cu,Nu=Lu,ju=function(e,t,n){var r=Pu(e);for(;r.index<(r.keyedList||e).length;)Iu(e,t,r,(function(e,t){e?n(e,t):0!==Object.keys(r.jobs).length||n(null,r.results)})),r.index++;return Nu.bind(r,n)};var Fu={exports:{}},Bu=Au,Mu=Cu,Uu=Lu;function qu(e,t){return e<t?-1:e>t?1:0}Fu.exports=function(e,t,n,r){var i=Mu(e,n);return Bu(e,t,i,(function n(s,o){s?r(s,o):(i.index++,i.index<(i.keyedList||e).length?Bu(e,t,i,n):r(null,i.results))})),Uu.bind(i,r)},Fu.exports.ascending=qu,Fu.exports.descending=function(e,t){return-1*qu(e,t)};var Hu=Fu.exports,$u=Hu,zu=function(e,t,n){return $u(e,t,null,n)};var Wu={parallel:ju,serial:zu,serialOrdered:Hu},Gu=yu,Vu=y,Ku=o,Yu=x,Zu=E,Qu=S.parse,Ju=s,Xu=h.Stream,ep=bu,tp=Wu,np=function(e,t){return Object.keys(t).forEach((function(n){e[n]=e[n]||t[n]})),e},rp=ip;function ip(e){if(!(this instanceof ip))return new ip(e);for(var t in this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],Gu.call(this),e=e||{})this[t]=e[t]}Vu.inherits(ip,Gu),ip.LINE_BREAK="\r\n",ip.DEFAULT_CONTENT_TYPE="application/octet-stream",ip.prototype.append=function(e,t,n){"string"==typeof(n=n||{})&&(n={filename:n});var r=Gu.prototype.append.bind(this);if("number"==typeof t&&(t=""+t),Vu.isArray(t))this._error(new Error("Arrays are not supported."));else{var i=this._multiPartHeader(e,t,n),s=this._multiPartFooter();r(i),r(t),r(s),this._trackLength(i,t,n)}},ip.prototype._trackLength=function(e,t,n){var r=0;null!=n.knownLength?r+=+n.knownLength:Buffer.isBuffer(t)?r=t.length:"string"==typeof t&&(r=Buffer.byteLength(t)),this._valueLength+=r,this._overheadLength+=Buffer.byteLength(e)+ip.LINE_BREAK.length,t&&(t.path||t.readable&&t.hasOwnProperty("httpVersion")||t instanceof Xu)&&(n.knownLength||this._valuesToMeasure.push(t))},ip.prototype._lengthRetriever=function(e,t){e.hasOwnProperty("fd")?null!=e.end&&e.end!=1/0&&null!=e.start?t(null,e.end+1-(e.start?e.start:0)):Ju.stat(e.path,(function(n,r){var i;n?t(n):(i=r.size-(e.start?e.start:0),t(null,i))})):e.hasOwnProperty("httpVersion")?t(null,+e.headers["content-length"]):e.hasOwnProperty("httpModule")?(e.on("response",(function(n){e.pause(),t(null,+n.headers["content-length"])})),e.resume()):t("Unknown stream")},ip.prototype._multiPartHeader=function(e,t,n){if("string"==typeof n.header)return n.header;var r,i=this._getContentDisposition(t,n),s=this._getContentType(t,n),o="",a={"Content-Disposition":["form-data",'name="'+e+'"'].concat(i||[]),"Content-Type":[].concat(s||[])};for(var c in"object"==typeof n.header&&np(a,n.header),a)a.hasOwnProperty(c)&&null!=(r=a[c])&&(Array.isArray(r)||(r=[r]),r.length&&(o+=c+": "+r.join("; ")+ip.LINE_BREAK));return"--"+this.getBoundary()+ip.LINE_BREAK+o+ip.LINE_BREAK},ip.prototype._getContentDisposition=function(e,t){var n,r;return"string"==typeof t.filepath?n=Ku.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e.name||e.path?n=Ku.basename(t.filename||e.name||e.path):e.readable&&e.hasOwnProperty("httpVersion")&&(n=Ku.basename(e.client._httpMessage.path||"")),n&&(r='filename="'+n+'"'),r},ip.prototype._getContentType=function(e,t){var n=t.contentType;return!n&&e.name&&(n=ep.lookup(e.name)),!n&&e.path&&(n=ep.lookup(e.path)),!n&&e.readable&&e.hasOwnProperty("httpVersion")&&(n=e.headers["content-type"]),n||!t.filepath&&!t.filename||(n=ep.lookup(t.filepath||t.filename)),n||"object"!=typeof e||(n=ip.DEFAULT_CONTENT_TYPE),n},ip.prototype._multiPartFooter=function(){return function(e){var t=ip.LINE_BREAK;0===this._streams.length&&(t+=this._lastBoundary()),e(t)}.bind(this)},ip.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+ip.LINE_BREAK},ip.prototype.getHeaders=function(e){var t,n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)e.hasOwnProperty(t)&&(n[t.toLowerCase()]=e[t]);return n},ip.prototype.setBoundary=function(e){this._boundary=e},ip.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary},ip.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),n=0,r=this._streams.length;n<r;n++)"function"!=typeof this._streams[n]&&(e=Buffer.isBuffer(this._streams[n])?Buffer.concat([e,this._streams[n]]):Buffer.concat([e,Buffer.from(this._streams[n])]),"string"==typeof this._streams[n]&&this._streams[n].substring(2,t.length+2)===t||(e=Buffer.concat([e,Buffer.from(ip.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])},ip.prototype._generateBoundary=function(){for(var e="--------------------------",t=0;t<24;t++)e+=Math.floor(10*Math.random()).toString(16);this._boundary=e},ip.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e},ip.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e},ip.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;this._streams.length&&(t+=this._lastBoundary().length),this._valuesToMeasure.length?tp.parallel(this._valuesToMeasure,this._lengthRetriever,(function(n,r){n?e(n):(r.forEach((function(e){t+=e})),e(null,t))})):process.nextTick(e.bind(this,null,t))},ip.prototype.submit=function(e,t){var n,r,i={method:"post"};return"string"==typeof e?(e=Qu(e),r=np({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(r=np(e,i)).port||(r.port="https:"==r.protocol?443:80),r.headers=this.getHeaders(e.headers),n="https:"==r.protocol?Zu.request(r):Yu.request(r),this.getLength(function(e,r){if(e&&"Unknown stream"!==e)this._error(e);else if(r&&n.setHeader("Content-Length",r),this.pipe(n),t){var i,s=function(e,r){return n.removeListener("error",s),n.removeListener("response",i),t.call(this,e,r)};i=s.bind(this,null),n.on("error",s),n.on("response",i)}}.bind(this)),n},ip.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))},ip.prototype.toString=function(){return"[object FormData]"};var sp=q(rp);function op(e){return au.isPlainObject(e)||au.isArray(e)}function ap(e){return au.endsWith(e,"[]")?e.slice(0,-2):e}function cp(e,t,n){return e?e.concat(t).map((function(e,t){return e=ap(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const lp=au.toFlatObject(au,{},null,(function(e){return/^is[A-Z]/.test(e)}));function up(e,t,n){if(!au.isObject(e))throw new TypeError("target must be an object");t=t||new(sp||FormData),n=au.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!au.isUndefined(t[e])}));const r=n.metaTokens,i=n.visitor||l,s=n.dots,o=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&au.isSpecCompliantForm(t);if(!au.isFunction(i))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(au.isDate(e))return e.toISOString();if(!a&&au.isBlob(e))throw new cu("Blob is not supported. Use a Buffer instead.");return au.isArrayBuffer(e)||au.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,n,i){let a=e;if(e&&!i&&"object"==typeof e)if(au.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(au.isArray(e)&&function(e){return au.isArray(e)&&!e.some(op)}(e)||(au.isFileList(e)||au.endsWith(n,"[]"))&&(a=au.toArray(e)))return n=ap(n),a.forEach((function(e,r){!au.isUndefined(e)&&null!==e&&t.append(!0===o?cp([n],r,s):null===o?n:n+"[]",c(e))})),!1;return!!op(e)||(t.append(cp(i,n,s),c(e)),!1)}const u=[],p=Object.assign(lp,{defaultVisitor:l,convertValue:c,isVisitable:op});if(!au.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!au.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),au.forEach(n,(function(n,s){!0===(!(au.isUndefined(n)||null===n)&&i.call(t,n,au.isString(s)?s.trim():s,r,p))&&e(n,r?r.concat(s):[s])})),u.pop()}}(e),t}function pp(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function hp(e,t){this._pairs=[],e&&up(e,this,t)}const dp=hp.prototype;function fp(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function mp(e,t,n){if(!t)return e;const r=n&&n.encode||fp,i=n&&n.serialize;let s;if(s=i?i(t,n):au.isURLSearchParams(t)?t.toString():new hp(t,n).toString(r),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}dp.append=function(e,t){this._pairs.push([e,t])},dp.toString=function(e){const t=e?function(t){return e.call(this,t,pp)}:pp;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var gp=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){au.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},yp={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},vp={isNode:!0,classes:{URLSearchParams:S.URLSearchParams,FormData:sp,Blob:"undefined"!=typeof Blob&&Blob||null},protocols:["http","https","file","data"]};const bp="undefined"!=typeof window&&"undefined"!=typeof document,_p="object"==typeof navigator&&navigator||void 0,wp=bp&&(!_p||["ReactNative","NativeScript","NS"].indexOf(_p.product)<0),xp="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Ep=bp&&window.location.href||"http://localhost";var Sp={...Object.freeze({__proto__:null,hasBrowserEnv:bp,hasStandardBrowserEnv:wp,hasStandardBrowserWebWorkerEnv:xp,navigator:_p,origin:Ep}),...vp};function Tp(e){function t(e,n,r,i){let s=e[i++];if("__proto__"===s)return!0;const o=Number.isFinite(+s),a=i>=e.length;if(s=!s&&au.isArray(r)?r.length:s,a)return au.hasOwnProp(r,s)?r[s]=[r[s],n]:r[s]=n,!o;r[s]&&au.isObject(r[s])||(r[s]=[]);return t(e,n,r[s],i)&&au.isArray(r[s])&&(r[s]=function(e){const t={},n=Object.keys(e);let r;const i=n.length;let s;for(r=0;r<i;r++)s=n[r],t[s]=e[s];return t}(r[s])),!o}if(au.isFormData(e)&&au.isFunction(e.entries)){const n={};return au.forEachEntry(e,((e,r)=>{t(function(e){return au.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null}const Dp={transitional:yp,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,i=au.isObject(e);i&&au.isHTMLForm(e)&&(e=new FormData(e));if(au.isFormData(e))return r?JSON.stringify(Tp(e)):e;if(au.isArrayBuffer(e)||au.isBuffer(e)||au.isStream(e)||au.isFile(e)||au.isBlob(e)||au.isReadableStream(e))return e;if(au.isArrayBufferView(e))return e.buffer;if(au.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return up(e,new Sp.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return Sp.isNode&&au.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((s=au.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return up(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||r?(t.setContentType("application/json",!1),function(e,t,n){if(au.isString(e))try{return(t||JSON.parse)(e),au.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Dp.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(au.isResponse(e)||au.isReadableStream(e))return e;if(e&&au.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw cu.from(e,cu.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Sp.classes.FormData,Blob:Sp.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};au.forEach(["delete","get","head","post","put","patch"],(e=>{Dp.headers[e]={}}));var kp=Dp;const Ap=au.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const Cp=Symbol("internals");function Rp(e){return e&&String(e).trim().toLowerCase()}function Op(e){return!1===e||null==e?e:au.isArray(e)?e.map(Op):String(e)}function Lp(e,t,n,r,i){return au.isFunction(r)?r.call(this,t,n):(i&&(t=n),au.isString(t)?au.isString(r)?-1!==t.indexOf(r):au.isRegExp(r)?r.test(t):void 0:void 0)}class Ip{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function i(e,t,n){const i=Rp(t);if(!i)throw new Error("header name must be a non-empty string");const s=au.findKey(r,i);(!s||void 0===r[s]||!0===n||void 0===n&&!1!==r[s])&&(r[s||t]=Op(e))}const s=(e,t)=>au.forEach(e,((e,n)=>i(e,n,t)));if(au.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(au.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))s((e=>{const t={};let n,r,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!n||t[n]&&Ap[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(au.isHeaders(e))for(const[t,r]of e.entries())i(r,t,n);else null!=e&&i(t,e,n);return this}get(e,t){if(e=Rp(e)){const n=au.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(au.isFunction(t))return t.call(this,e,n);if(au.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Rp(e)){const n=au.findKey(this,e);return!(!n||void 0===this[n]||t&&!Lp(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function i(e){if(e=Rp(e)){const i=au.findKey(n,e);!i||t&&!Lp(0,n[i],i,t)||(delete n[i],r=!0)}}return au.isArray(e)?e.forEach(i):i(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const i=t[n];e&&!Lp(0,this[i],i,e,!0)||(delete this[i],r=!0)}return r}normalize(e){const t=this,n={};return au.forEach(this,((r,i)=>{const s=au.findKey(n,i);if(s)return t[s]=Op(r),void delete t[i];const o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(i):String(i).trim();o!==i&&delete t[i],t[o]=Op(r),n[o]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return au.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&au.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[Cp]=this[Cp]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Rp(e);t[r]||(!function(e,t){const n=au.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})}))}(n,e),t[r]=!0)}return au.isArray(e)?e.forEach(r):r(e),this}}Ip.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),au.reduceDescriptors(Ip.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),au.freezeMethods(Ip);var Pp=Ip;function Np(e,t){const n=this||kp,r=t||n,i=Pp.from(r.headers);let s=r.data;return au.forEach(e,(function(e){s=e.call(n,s,i.normalize(),t?t.status:void 0)})),i.normalize(),s}function jp(e){return!(!e||!e.__CANCEL__)}function Fp(e,t,n){cu.call(this,null==e?"canceled":e,cu.ERR_CANCELED,t,n),this.name="CanceledError"}function Bp(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new cu("Request failed with status code "+n.status,[cu.ERR_BAD_REQUEST,cu.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}function Mp(e,t){return e&&!function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}au.inherits(Fp,cu,{__CANCEL__:!0});var Up=S.parse,qp={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},Hp=String.prototype.endsWith||function(e){return e.length<=this.length&&-1!==this.indexOf(e,this.length-e.length)};function $p(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||""}var zp,Wp,Gp,Vp,Kp,Yp=function(e){var t="string"==typeof e?Up(e):e||{},n=t.protocol,r=t.host,i=t.port;if("string"!=typeof r||!r||"string"!=typeof n)return"";if(n=n.split(":",1)[0],!function(e,t){var n=($p("npm_config_no_proxy")||$p("no_proxy")).toLowerCase();if(!n)return!0;if("*"===n)return!1;return n.split(/[,\s]/).every((function(n){if(!n)return!0;var r=n.match(/^(.+):(\d+)$/),i=r?r[1]:n,s=r?parseInt(r[2]):0;return!(!s||s===t)||(/^[.*]/.test(i)?("*"===i.charAt(0)&&(i=i.slice(1)),!Hp.call(e,i)):e!==i)}))}(r=r.replace(/:\d*$/,""),i=parseInt(i)||qp[n]||0))return"";var s=$p("npm_config_"+n+"_proxy")||$p(n+"_proxy")||$p("npm_config_proxy")||$p("all_proxy");return s&&-1===s.indexOf("://")&&(s=n+"://"+s),s},Zp={exports:{}},Qp={exports:{}},Jp={exports:{}};function Xp(){if(Wp)return zp;Wp=1;var e=1e3,t=60*e,n=60*t,r=24*n,i=7*r,s=365.25*r;function o(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}return zp=function(a,c){c=c||{};var l=typeof a;if("string"===l&&a.length>0)return function(o){if((o=String(o)).length>100)return;var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(o);if(!a)return;var c=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*s;case"weeks":case"week":case"w":return c*i;case"days":case"day":case"d":return c*r;case"hours":case"hour":case"hrs":case"hr":case"h":return c*n;case"minutes":case"minute":case"mins":case"min":case"m":return c*t;case"seconds":case"second":case"secs":case"sec":case"s":return c*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(a);if("number"===l&&isFinite(a))return c.long?function(i){var s=Math.abs(i);if(s>=r)return o(i,s,r,"day");if(s>=n)return o(i,s,n,"hour");if(s>=t)return o(i,s,t,"minute");if(s>=e)return o(i,s,e,"second");return i+" ms"}(a):function(i){var s=Math.abs(i);if(s>=r)return Math.round(i/r)+"d";if(s>=n)return Math.round(i/n)+"h";if(s>=t)return Math.round(i/t)+"m";if(s>=e)return Math.round(i/e)+"s";return i+"ms"}(a);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))},zp}function eh(){if(Vp)return Gp;return Vp=1,Gp=function(e){function t(e){let r,i,s,o=null;function a(...e){if(!a.enabled)return;const n=a,i=Number(new Date),s=i-(r||i);n.diff=s,n.prev=r,n.curr=i,r=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,i)=>{if("%%"===r)return"%";o++;const s=t.formatters[i];if("function"==typeof s){const t=e[o];r=s.call(n,t),e.splice(o,1),o--}return r})),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=n,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==t.namespaces&&(i=t.namespaces,s=t.enabled(e)),s),set:e=>{o=e}}),"function"==typeof t.init&&t.init(a),a}function n(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].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;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=Xp(),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((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t},Gp}var th,nh={exports:{}};"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?Qp.exports=(Kp||(Kp=1,function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=eh()(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(Jp,Jp.exports)),Jp.exports):Qp.exports=(th||(th=1,function(e,t){const n=c,r=y;t.init=function(e){e.inspectOpts={};const n=Object.keys(t.inspectOpts);for(let r=0;r<n.length;r++)e.inspectOpts[n[r]]=t.inspectOpts[n[r]]},t.log=function(...e){return process.stderr.write(r.formatWithOptions(t.inspectOpts,...e)+"\n")},t.formatArgs=function(n){const{namespace:r,useColors:i}=this;if(i){const t=this.color,i="[3"+(t<8?t:"8;5;"+t),s=` ${i};1m${r} [0m`;n[0]=s+n[0].split("\n").join("\n"+s),n.push(i+"m+"+e.exports.humanize(this.diff)+"[0m")}else n[0]=(t.inspectOpts.hideDate?"":(new Date).toISOString()+" ")+r+" "+n[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=r.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=Qe;e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let r=process.env[t];return r=!!/^(yes|on|true|enabled)$/i.test(r)||!/^(no|off|false|disabled)$/i.test(r)&&("null"===r?null:Number(r)),e[n]=r,e}),{}),e.exports=eh()(t);const{formatters:i}=e.exports;i.o=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},i.O=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts)}}(nh,nh.exports)),nh.exports);var rh,ih,sh,oh,ah=Qp.exports,ch=S,lh=ch.URL,uh=x,ph=E,hh=h.Writable,dh=u,fh=function(){if(!rh){try{rh=ah("follow-redirects")}catch(e){}"function"!=typeof rh&&(rh=function(){})}rh.apply(null,arguments)};ih="undefined"!=typeof process,sh="undefined"!=typeof window&&"undefined"!=typeof document,oh=Nh(Error.captureStackTrace),ih||!sh&&oh||console.warn("The follow-redirects package should be excluded from browser builds.");var mh=!1;try{dh(new lh(""))}catch(Dk){mh="ERR_INVALID_URL"===Dk.code}var gh=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],yh=["abort","aborted","connect","error","socket","timeout"],vh=Object.create(null);yh.forEach((function(e){vh[e]=function(t,n,r){this._redirectable.emit(e,t,n,r)}}));var bh=Lh("ERR_INVALID_URL","Invalid URL",TypeError),_h=Lh("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),wh=Lh("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",_h),xh=Lh("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),Eh=Lh("ERR_STREAM_WRITE_AFTER_END","write after end"),Sh=hh.prototype.destroy||kh;function Th(e,t){hh.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 n=this;this._onNativeResponse=function(e){try{n._processResponse(e)}catch(e){n.emit("error",e instanceof _h?e:new _h({cause:e}))}},this._performRequest()}function Dh(e){var t={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(e).forEach((function(r){var i=r+":",s=n[i]=e[r],o=t[r]=Object.create(s);Object.defineProperties(o,{request:{value:function(e,r,s){var o;return o=e,lh&&o instanceof lh?e=Rh(e):Ph(e)?e=Rh(Ah(e)):(s=r,r=Ch(e),e={protocol:i}),Nh(r)&&(s=r,r=null),(r=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,r)).nativeProtocols=n,Ph(r.host)||Ph(r.hostname)||(r.hostname="::1"),dh.equal(r.protocol,i,"protocol mismatch"),fh("options",r),new Th(r,s)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,n){var r=o.request(e,t,n);return r.end(),r},configurable:!0,enumerable:!0,writable:!0}})})),t}function kh(){}function Ah(e){var t;if(mh)t=new lh(e);else if(!Ph((t=Ch(ch.parse(e))).protocol))throw new bh({input:e});return t}function Ch(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new bh({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new bh({input:e.href||e});return e}function Rh(e,t){var n=t||{};for(var r of gh)n[r]=e[r];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 Oh(e,t){var n;for(var r in t)e.test(r)&&(n=t[r],delete t[r]);return null==n?void 0:String(n).trim()}function Lh(e,t,n){function r(n){Nh(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,n||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return r.prototype=new(n||Error),Object.defineProperties(r.prototype,{constructor:{value:r,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),r}function Ih(e,t){for(var n of yh)e.removeListener(n,vh[n]);e.on("error",kh),e.destroy(t)}function Ph(e){return"string"==typeof e||e instanceof String}function Nh(e){return"function"==typeof e}Th.prototype=Object.create(hh.prototype),Th.prototype.abort=function(){Ih(this._currentRequest),this._currentRequest.abort(),this.emit("abort")},Th.prototype.destroy=function(e){return Ih(this._currentRequest,e),Sh.call(this,e),this},Th.prototype.write=function(e,t,n){if(this._ending)throw new Eh;if(!Ph(e)&&("object"!=typeof(r=e)||!("length"in r)))throw new TypeError("data should be a string, Buffer or Uint8Array");var r;Nh(t)&&(n=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,n)):(this.emit("error",new xh),this.abort()):n&&n()},Th.prototype.end=function(e,t,n){if(Nh(e)?(n=e,e=t=null):Nh(t)&&(n=t,t=null),e){var r=this,i=this._currentRequest;this.write(e,t,(function(){r._ended=!0,i.end(null,null,n)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,n)},Th.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},Th.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},Th.prototype.setTimeout=function(e,t){var n=this;function r(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function i(t){n._timeout&&clearTimeout(n._timeout),n._timeout=setTimeout((function(){n.emit("timeout"),s()}),e),r(t)}function s(){n._timeout&&(clearTimeout(n._timeout),n._timeout=null),n.removeListener("abort",s),n.removeListener("error",s),n.removeListener("response",s),n.removeListener("close",s),t&&n.removeListener("timeout",t),n.socket||n._currentRequest.removeListener("socket",i)}return t&&this.on("timeout",t),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",r),this.on("abort",s),this.on("error",s),this.on("response",s),this.on("close",s),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){Th.prototype[e]=function(t,n){return this._currentRequest[e](t,n)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(Th.prototype,e,{get:function(){return this._currentRequest[e]}})})),Th.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))}},Th.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 n=e.slice(0,-1);this._options.agent=this._options.agents[n]}var r=this._currentRequest=t.request(this._options,this._onNativeResponse);for(var i of(r._redirectable=this,yh))r.on(i,vh[i]);if(this._currentUrl=/^\//.test(this._options.path)?ch.format(this._options):this._options.path,this._isRedirect){var s=0,o=this,a=this._requestBodyBuffers;!function e(t){if(r===o._currentRequest)if(t)o.emit("error",t);else if(s<a.length){var n=a[s++];r.finished||r.write(n.data,n.encoding,e)}else o._ended&&r.end()}()}},Th.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var n,r=e.headers.location;if(!r||!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(Ih(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new wh;var i=this._options.beforeRedirect;i&&(n=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var s=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=[],Oh(/^content-/i,this._options.headers));var o=Oh(/^host$/i,this._options.headers),a=Ah(this._currentUrl),c=o||a.host,l=/^\w+:/.test(r)?this._currentUrl:ch.format(Object.assign(a,{host:c})),u=function(e,t){return mh?new lh(e,t):Ah(ch.resolve(t,e))}(r,l);if(fh("redirecting to",u.href),this._isRedirect=!0,Rh(u,this._options),(u.protocol!==a.protocol&&"https:"!==u.protocol||u.host!==c&&!function(e,t){dh(Ph(e)&&Ph(t));var n=e.length-t.length-1;return n>0&&"."===e[n]&&e.endsWith(t)}(u.host,c))&&Oh(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),Nh(i)){var p={headers:e.headers,statusCode:t},h={url:l,method:s,headers:n};i(this._options,p,h),this._sanitizeOptions(this._options)}this._performRequest()},Zp.exports=Dh({http:uh,https:ph}),Zp.exports.wrap=Dh;var jh=q(Zp.exports);const Fh="1.7.7";function Bh(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}const Mh=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;const Uh=Symbol("internals");class qh extends h.Transform{constructor(e){e=au.toFlatObject(e,{maxRate:0,chunkSize:65536,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,((e,t)=>!au.isUndefined(t[e]))),super({readableHighWaterMark:e.chunkSize});const t=this[Uh]={timeWindow:e.timeWindow,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",(e=>{"progress"===e&&(t.isCaptured||(t.isCaptured=!0))}))}_read(e){const t=this[Uh];return t.onReadCallback&&t.onReadCallback(),super._read(e)}_transform(e,t,n){const r=this[Uh],i=r.maxRate,s=this.readableHighWaterMark,o=r.timeWindow,a=i/(1e3/o),c=!1!==r.minChunkSize?Math.max(r.minChunkSize,.01*a):0,l=(e,t)=>{const n=Buffer.byteLength(e);r.bytesSeen+=n,r.bytes+=n,r.isCaptured&&this.emit("progress",r.bytesSeen),this.push(e)?process.nextTick(t):r.onReadCallback=()=>{r.onReadCallback=null,process.nextTick(t)}},u=(e,t)=>{const n=Buffer.byteLength(e);let u,p=null,h=s,d=0;if(i){const e=Date.now();(!r.ts||(d=e-r.ts)>=o)&&(r.ts=e,u=a-r.bytes,r.bytes=u<0?-u:0,d=0),u=a-r.bytes}if(i){if(u<=0)return setTimeout((()=>{t(null,e)}),o-d);u<h&&(h=u)}h&&n>h&&n-h>c&&(p=e.subarray(h),e=e.subarray(0,h)),l(e,p?()=>{process.nextTick(t,null,p)}:t)};u(e,(function e(t,r){if(t)return n(t);r?u(r,e):n(null)}))}}var Hh=qh;const{asyncIterator:$h}=Symbol;var zh=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[$h]?yield*e[$h]():yield e};const Wh=au.ALPHABET.ALPHA_DIGIT+"-_",Gh=new y.TextEncoder,Vh="\r\n",Kh=Gh.encode(Vh);class Yh{constructor(e,t){const{escapeName:n}=this.constructor,r=au.isString(t);let i=`Content-Disposition: form-data; name="${n(e)}"${!r&&t.name?`; filename="${n(t.name)}"`:""}${Vh}`;r?t=Gh.encode(String(t).replace(/\r?\n|\r\n?/g,Vh)):i+=`Content-Type: ${t.type||"application/octet-stream"}${Vh}`,this.headers=Gh.encode(i+Vh),this.contentLength=r?t.byteLength:t.size,this.size=this.headers.byteLength+this.contentLength+2,this.name=e,this.value=t}async*encode(){yield this.headers;const{value:e}=this;au.isTypedArray(e)?yield e:yield*zh(e),yield Kh}static escapeName(e){return String(e).replace(/[\r\n"]/g,(e=>({"\r":"%0D","\n":"%0A",'"':"%22"}[e])))}}var Zh=(e,t,n)=>{const{tag:r="form-data-boundary",size:i=25,boundary:s=r+"-"+au.generateString(i,Wh)}=n||{};if(!au.isFormData(e))throw TypeError("FormData instance required");if(s.length<1||s.length>70)throw Error("boundary must be 10-70 characters long");const o=Gh.encode("--"+s+Vh),a=Gh.encode("--"+s+"--"+Vh+Vh);let c=a.byteLength;const l=Array.from(e.entries()).map((([e,t])=>{const n=new Yh(e,t);return c+=n.size,n}));c+=o.byteLength*l.length,c=au.toFiniteNumber(c);const u={"Content-Type":`multipart/form-data; boundary=${s}`};return Number.isFinite(c)&&(u["Content-Length"]=c),t&&t(u),h.Readable.from(async function*(){for(const e of l)yield o,yield*e.encode();yield a}())};class Qh extends h.Transform{__transform(e,t,n){this.push(e),n()}_transform(e,t,n){if(0!==e.length&&(this._transform=this.__transform,120!==e[0])){const e=Buffer.alloc(2);e[0]=120,e[1]=156,this.push(e,t)}this.__transform(e,t,n)}}var Jh=Qh;var Xh=(e,t)=>au.isAsyncFn(e)?function(...n){const r=n.pop();e.apply(this,n).then((e=>{try{t?r(null,...t(e)):r(null,e)}catch(e){r(e)}}),r)}:e;const ed=(e,t,n=3)=>{let r=0;const i=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i,s=0,o=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),l=r[o];i||(i=c),n[s]=a,r[s]=c;let u=o,p=0;for(;u!==s;)p+=n[u++],u%=e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),c-i<t)return;const h=l&&c-l;return h?Math.round(1e3*p/h):void 0}}(50,250);return function(e,t){let n,r,i=0,s=1e3/t;const o=(t,s=Date.now())=>{i=s,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),a=t-i;a>=s?o(e,t):(n=e,r||(r=setTimeout((()=>{r=null,o(n)}),s-a)))},()=>n&&o(n)]}((n=>{const s=n.loaded,o=n.lengthComputable?n.total:void 0,a=s-r,c=i(a);r=s;e({loaded:s,total:o,progress:o?s/o:void 0,bytes:a,rate:c||void 0,estimated:c&&o&&s<=o?(o-s)/c:void 0,event:n,lengthComputable:null!=o,[t?"download":"upload"]:!0})}),n)},td=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},nd=e=>(...t)=>au.asap((()=>e(...t))),rd={flush:T.constants.Z_SYNC_FLUSH,finishFlush:T.constants.Z_SYNC_FLUSH},id={flush:T.constants.BROTLI_OPERATION_FLUSH,finishFlush:T.constants.BROTLI_OPERATION_FLUSH},sd=au.isFunction(T.createBrotliDecompress),{http:od,https:ad}=jh,cd=/https:?/,ld=Sp.protocols.map((e=>e+":")),ud=(e,[t,n])=>(e.on("end",n).on("error",n),t);function pd(e,t){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e,t)}function hd(e,t,n){let r=t;if(!r&&!1!==r){const e=Yp(n);e&&(r=new URL(e))}if(r){if(r.username&&(r.auth=(r.username||"")+":"+(r.password||"")),r.auth){(r.auth.username||r.auth.password)&&(r.auth=(r.auth.username||"")+":"+(r.auth.password||""));const t=Buffer.from(r.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+t}e.headers.host=e.hostname+(e.port?":"+e.port:"");const t=r.hostname||r.host;e.hostname=t,e.host=t,e.port=r.port,e.path=n,r.protocol&&(e.protocol=r.protocol.includes(":")?r.protocol:`${r.protocol}:`)}e.beforeRedirects.proxy=function(e){hd(e,t,e.href)}}const dd="undefined"!=typeof process&&"process"===au.kindOf(process),fd=(e,t)=>(({address:e,family:t})=>{if(!au.isString(e))throw TypeError("address must be a string");return{address:e,family:t||(e.indexOf(".")<0?6:4)}})(au.isObject(e)?e:{address:e,family:t});var md=dd&&function(e){return t=async function(t,n,r){let{data:i,lookup:s,family:o}=e;const{responseType:a,responseEncoding:c}=e,l=e.method.toUpperCase();let u,d,f=!1;if(s){const e=Xh(s,(e=>au.isArray(e)?e:[e]));s=(t,n,r)=>{e(t,n,((e,t,i)=>{if(e)return r(e);const s=au.isArray(t)?t.map((e=>fd(e))):[fd(t,i)];n.all?r(e,s):r(e,s[0].address,s[0].family)}))}}const m=new p.EventEmitter,g=()=>{e.cancelToken&&e.cancelToken.unsubscribe(v),e.signal&&e.signal.removeEventListener("abort",v),m.removeAllListeners()};function v(t){m.emit("abort",!t||t.type?new Fp(null,e,d):t)}r(((e,t)=>{u=!0,t&&(f=!0,g())})),m.once("abort",n),(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(v),e.signal&&(e.signal.aborted?v():e.signal.addEventListener("abort",v)));const b=Mp(e.baseURL,e.url),_=new URL(b,Sp.hasBrowserEnv?Sp.origin:void 0),w=_.protocol||ld[0];if("data:"===w){let r;if("GET"!==l)return Bp(t,n,{status:405,statusText:"method not allowed",headers:{},config:e});try{r=function(e,t,n){const r=n&&n.Blob||Sp.classes.Blob,i=Bh(e);if(void 0===t&&r&&(t=!0),"data"===i){e=i.length?e.slice(i.length+1):e;const n=Mh.exec(e);if(!n)throw new cu("Invalid URL",cu.ERR_INVALID_URL);const s=n[1],o=n[2],a=n[3],c=Buffer.from(decodeURIComponent(a),o?"base64":"utf8");if(t){if(!r)throw new cu("Blob is not supported",cu.ERR_NOT_SUPPORT);return new r([c],{type:s})}return c}throw new cu("Unsupported protocol "+i,cu.ERR_NOT_SUPPORT)}(e.url,"blob"===a,{Blob:e.env&&e.env.Blob})}catch(t){throw cu.from(t,cu.ERR_BAD_REQUEST,e)}return"text"===a?(r=r.toString(c),c&&"utf8"!==c||(r=au.stripBOM(r))):"stream"===a&&(r=h.Readable.from(r)),Bp(t,n,{data:r,status:200,statusText:"OK",headers:new Pp,config:e})}if(-1===ld.indexOf(w))return n(new cu("Unsupported protocol "+w,cu.ERR_BAD_REQUEST,e));const S=Pp.from(e.headers).normalize();S.set("User-Agent","axios/"+Fh,!1);const{onUploadProgress:D,onDownloadProgress:k}=e,A=e.maxRate;let C,R;if(au.isSpecCompliantForm(i)){const e=S.getContentType(/boundary=([-_\w\d]{10,70})/i);i=Zh(i,(e=>{S.set(e)}),{tag:`axios-${Fh}-boundary`,boundary:e&&e[1]||void 0})}else if(au.isFormData(i)&&au.isFunction(i.getHeaders)){if(S.set(i.getHeaders()),!S.hasContentLength())try{const e=await y.promisify(i.getLength).call(i);Number.isFinite(e)&&e>=0&&S.setContentLength(e)}catch(e){}}else if(au.isBlob(i))i.size&&S.setContentType(i.type||"application/octet-stream"),S.setContentLength(i.size||0),i=h.Readable.from(zh(i));else if(i&&!au.isStream(i)){if(Buffer.isBuffer(i));else if(au.isArrayBuffer(i))i=Buffer.from(new Uint8Array(i));else{if(!au.isString(i))return n(new cu("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",cu.ERR_BAD_REQUEST,e));i=Buffer.from(i,"utf-8")}if(S.setContentLength(i.length,!1),e.maxBodyLength>-1&&i.length>e.maxBodyLength)return n(new cu("Request body larger than maxBodyLength limit",cu.ERR_BAD_REQUEST,e))}const O=au.toFiniteNumber(S.getContentLength());let L,I;au.isArray(A)?(C=A[0],R=A[1]):C=R=A,i&&(D||C)&&(au.isStream(i)||(i=h.Readable.from(i,{objectMode:!1})),i=h.pipeline([i,new Hh({maxRate:au.toFiniteNumber(C)})],au.noop),D&&i.on("progress",ud(i,td(O,ed(nd(D),!1,3))))),e.auth&&(L=(e.auth.username||"")+":"+(e.auth.password||"")),!L&&_.username&&(L=_.username+":"+_.password),L&&S.delete("authorization");try{I=mp(_.pathname+_.search,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(t){const r=new Error(t.message);return r.config=e,r.url=e.url,r.exists=!0,n(r)}S.set("Accept-Encoding","gzip, compress, deflate"+(sd?", br":""),!1);const P={path:I,method:l,headers:S.toJSON(),agents:{http:e.httpAgent,https:e.httpsAgent},auth:L,protocol:w,family:o,beforeRedirect:pd,beforeRedirects:{}};let N;!au.isUndefined(s)&&(P.lookup=s),e.socketPath?P.socketPath=e.socketPath:(P.hostname=_.hostname.startsWith("[")?_.hostname.slice(1,-1):_.hostname,P.port=_.port,hd(P,e.proxy,w+"//"+_.hostname+(_.port?":"+_.port:"")+P.path));const j=cd.test(P.protocol);if(P.agent=j?e.httpsAgent:e.httpAgent,e.transport?N=e.transport:0===e.maxRedirects?N=j?E:x:(e.maxRedirects&&(P.maxRedirects=e.maxRedirects),e.beforeRedirect&&(P.beforeRedirects.config=e.beforeRedirect),N=j?ad:od),e.maxBodyLength>-1?P.maxBodyLength=e.maxBodyLength:P.maxBodyLength=1/0,e.insecureHTTPParser&&(P.insecureHTTPParser=e.insecureHTTPParser),d=N.request(P,(function(r){if(d.destroyed)return;const i=[r],s=+r.headers["content-length"];if(k||R){const e=new Hh({maxRate:au.toFiniteNumber(R)});k&&e.on("progress",ud(e,td(s,ed(nd(k),!0,3)))),i.push(e)}let o=r;const u=r.req||d;if(!1!==e.decompress&&r.headers["content-encoding"])switch("HEAD"!==l&&204!==r.statusCode||delete r.headers["content-encoding"],(r.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":i.push(T.createUnzip(rd)),delete r.headers["content-encoding"];break;case"deflate":i.push(new Jh),i.push(T.createUnzip(rd)),delete r.headers["content-encoding"];break;case"br":sd&&(i.push(T.createBrotliDecompress(id)),delete r.headers["content-encoding"])}o=i.length>1?h.pipeline(i,au.noop):i[0];const p=h.finished(o,(()=>{p(),g()})),y={status:r.statusCode,statusText:r.statusMessage,headers:new Pp(r.headers),config:e,request:u};if("stream"===a)y.data=o,Bp(t,n,y);else{const r=[];let i=0;o.on("data",(function(t){r.push(t),i+=t.length,e.maxContentLength>-1&&i>e.maxContentLength&&(f=!0,o.destroy(),n(new cu("maxContentLength size of "+e.maxContentLength+" exceeded",cu.ERR_BAD_RESPONSE,e,u)))})),o.on("aborted",(function(){if(f)return;const t=new cu("maxContentLength size of "+e.maxContentLength+" exceeded",cu.ERR_BAD_RESPONSE,e,u);o.destroy(t),n(t)})),o.on("error",(function(t){d.destroyed||n(cu.from(t,null,e,u))})),o.on("end",(function(){try{let e=1===r.length?r[0]:Buffer.concat(r);"arraybuffer"!==a&&(e=e.toString(c),c&&"utf8"!==c||(e=au.stripBOM(e))),y.data=e}catch(t){return n(cu.from(t,null,e,y.request,y))}Bp(t,n,y)}))}m.once("abort",(e=>{o.destroyed||(o.emit("error",e),o.destroy())}))})),m.once("abort",(e=>{n(e),d.destroy(e)})),d.on("error",(function(t){n(cu.from(t,null,e,d))})),d.on("socket",(function(e){e.setKeepAlive(!0,6e4)})),e.timeout){const t=parseInt(e.timeout,10);if(Number.isNaN(t))return void n(new cu("error trying to parse `config.timeout` to int",cu.ERR_BAD_OPTION_VALUE,e,d));d.setTimeout(t,(function(){if(u)return;let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||yp;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new cu(t,r.clarifyTimeoutError?cu.ETIMEDOUT:cu.ECONNABORTED,e,d)),v()}))}if(au.isStream(i)){let t=!1,n=!1;i.on("end",(()=>{t=!0})),i.once("error",(e=>{n=!0,d.destroy(e)})),i.on("close",(()=>{t||n||v(new Fp("Request stream has been aborted",e,d))})),i.pipe(d)}else d.end(i)},new Promise(((e,n)=>{let r,i;const s=(e,t)=>{i||(i=!0,r&&r(e,t))},o=e=>{s(e,!0),n(e)};t((t=>{s(t),e(t)}),o,(e=>r=e)).catch(o)}));var t},gd=Sp.hasStandardBrowserEnv?function(){const e=Sp.navigator&&/(msie|trident)/i.test(Sp.navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=au.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0},yd=Sp.hasStandardBrowserEnv?{write(e,t,n,r,i,s){const o=[e+"="+encodeURIComponent(t)];au.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),au.isString(r)&&o.push("path="+r),au.isString(i)&&o.push("domain="+i),!0===s&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};const vd=e=>e instanceof Pp?{...e}:e;function bd(e,t){t=t||{};const n={};function r(e,t,n){return au.isPlainObject(e)&&au.isPlainObject(t)?au.merge.call({caseless:n},e,t):au.isPlainObject(t)?au.merge({},t):au.isArray(t)?t.slice():t}function i(e,t,n){return au.isUndefined(t)?au.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function s(e,t){if(!au.isUndefined(t))return r(void 0,t)}function o(e,t){return au.isUndefined(t)?au.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,i,s){return s in t?r(n,i):s in e?r(void 0,n):void 0}const c={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(e,t)=>i(vd(e),vd(t),!0)};return au.forEach(Object.keys(Object.assign({},e,t)),(function(r){const s=c[r]||i,o=s(e[r],t[r],r);au.isUndefined(o)&&s!==a||(n[r]=o)})),n}var _d=e=>{const t=bd({},e);let n,{data:r,withXSRFToken:i,xsrfHeaderName:s,xsrfCookieName:o,headers:a,auth:c}=t;if(t.headers=a=Pp.from(a),t.url=mp(Mp(t.baseURL,t.url),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),au.isFormData(r))if(Sp.hasStandardBrowserEnv||Sp.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(n=a.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}if(Sp.hasStandardBrowserEnv&&(i&&au.isFunction(i)&&(i=i(t)),i||!1!==i&&gd(t.url))){const e=s&&o&&yd.read(o);e&&a.set(s,e)}return t};var wd="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=_d(e);let i=r.data;const s=Pp.from(r.headers).normalize();let o,a,c,l,u,{responseType:p,onUploadProgress:h,onDownloadProgress:d}=r;function f(){l&&l(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(o),r.signal&&r.signal.removeEventListener("abort",o)}let m=new XMLHttpRequest;function g(){if(!m)return;const r=Pp.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());Bp((function(e){t(e),f()}),(function(e){n(e),f()}),{data:p&&"text"!==p&&"json"!==p?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(g)},m.onabort=function(){m&&(n(new cu("Request aborted",cu.ECONNABORTED,e,m)),m=null)},m.onerror=function(){n(new cu("Network Error",cu.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const i=r.transitional||yp;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new cu(t,i.clarifyTimeoutError?cu.ETIMEDOUT:cu.ECONNABORTED,e,m)),m=null},void 0===i&&s.setContentType(null),"setRequestHeader"in m&&au.forEach(s.toJSON(),(function(e,t){m.setRequestHeader(t,e)})),au.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),p&&"json"!==p&&(m.responseType=r.responseType),d&&([c,u]=ed(d,!0),m.addEventListener("progress",c)),h&&m.upload&&([a,l]=ed(h),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",l)),(r.cancelToken||r.signal)&&(o=t=>{m&&(n(!t||t.type?new Fp(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(o),r.signal&&(r.signal.aborted?o():r.signal.addEventListener("abort",o)));const y=Bh(r.url);y&&-1===Sp.protocols.indexOf(y)?n(new cu("Unsupported protocol "+y+":",cu.ERR_BAD_REQUEST,e)):m.send(i||null)}))};var xd=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const i=function(e){if(!n){n=!0,o();const t=e instanceof Error?e:this.reason;r.abort(t instanceof cu?t:new Fp(t instanceof Error?t.message:t))}};let s=t&&setTimeout((()=>{s=null,i(new cu(`timeout ${t} of ms exceeded`,cu.ETIMEDOUT))}),t);const o=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)})),e=null)};e.forEach((e=>e.addEventListener("abort",i)));const{signal:a}=r;return a.unsubscribe=()=>au.asap(o),a}};const Ed=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let r,i=0;for(;i<n;)r=i+t,yield e.slice(i,r),i=r},Sd=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},Td=(e,t,n,r)=>{const i=async function*(e,t){for await(const n of Sd(e))yield*Ed(n,t)}(e,t);let s,o=0,a=e=>{s||(s=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await i.next();if(t)return a(),void e.close();let s=r.byteLength;if(n){let e=o+=s;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw a(e),e}},cancel:e=>(a(e),i.return())},{highWaterMark:2})},Dd="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,kd=Dd&&"function"==typeof ReadableStream,Ad=Dd&&("function"==typeof TextEncoder?(Cd=new TextEncoder,e=>Cd.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var Cd;const Rd=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Od=kd&&Rd((()=>{let e=!1;const t=new Request(Sp.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),Ld=kd&&Rd((()=>au.isReadableStream(new Response("").body))),Id={stream:Ld&&(e=>e.body)};Dd&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach((t=>{!Id[t]&&(Id[t]=au.isFunction(e[t])?e=>e[t]():(e,n)=>{throw new cu(`Response type '${t}' is not supported`,cu.ERR_NOT_SUPPORT,n)})}))})(new Response);const Pd=async(e,t)=>{const n=au.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(au.isBlob(e))return e.size;if(au.isSpecCompliantForm(e)){const t=new Request(Sp.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return au.isArrayBufferView(e)||au.isArrayBuffer(e)?e.byteLength:(au.isURLSearchParams(e)&&(e+=""),au.isString(e)?(await Ad(e)).byteLength:void 0)})(t):n};var Nd=Dd&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:s,timeout:o,onDownloadProgress:a,onUploadProgress:c,responseType:l,headers:u,withCredentials:p="same-origin",fetchOptions:h}=_d(e);l=l?(l+"").toLowerCase():"text";let d,f=xd([i,s&&s.toAbortSignal()],o);const m=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let g;try{if(c&&Od&&"get"!==n&&"head"!==n&&0!==(g=await Pd(u,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(au.isFormData(r)&&(e=n.headers.get("content-type"))&&u.setContentType(e),n.body){const[e,t]=td(g,ed(nd(c)));r=Td(n.body,65536,e,t)}}au.isString(p)||(p=p?"include":"omit");const i="credentials"in Request.prototype;d=new Request(t,{...h,signal:f,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:i?p:void 0});let s=await fetch(d);const o=Ld&&("stream"===l||"response"===l);if(Ld&&(a||o&&m)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=s[t]}));const t=au.toFiniteNumber(s.headers.get("content-length")),[n,r]=a&&td(t,ed(nd(a),!0))||[];s=new Response(Td(s.body,65536,n,(()=>{r&&r(),m&&m()})),e)}l=l||"text";let y=await Id[au.findKey(Id,l)||"text"](s,e);return!o&&m&&m(),await new Promise(((t,n)=>{Bp(t,n,{data:y,headers:Pp.from(s.headers),status:s.status,statusText:s.statusText,config:e,request:d})}))}catch(t){if(m&&m(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new cu("Network Error",cu.ERR_NETWORK,e,d),{cause:t.cause||t});throw cu.from(t,t&&t.code,e,d)}});const jd={http:md,xhr:wd,fetch:Nd};au.forEach(jd,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Fd=e=>`- ${e}`,Bd=e=>au.isFunction(e)||null===e||!1===e;var Md=e=>{e=au.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let s=0;s<t;s++){let t;if(n=e[s],r=n,!Bd(n)&&(r=jd[(t=String(n)).toLowerCase()],void 0===r))throw new cu(`Unknown adapter '${t}'`);if(r)break;i[t||"#"+s]=r}if(!r){const e=Object.entries(i).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new cu("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Fd).join("\n"):" "+Fd(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function Ud(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Fp(null,e)}function qd(e){Ud(e),e.headers=Pp.from(e.headers),e.data=Np.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Md(e.adapter||kp.adapter)(e).then((function(t){return Ud(e),t.data=Np.call(e,e.transformResponse,t),t.headers=Pp.from(t.headers),t}),(function(t){return jp(t)||(Ud(e),t&&t.response&&(t.response.data=Np.call(e,e.transformResponse,t.response),t.response.headers=Pp.from(t.response.headers))),Promise.reject(t)}))}const Hd={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Hd[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const $d={};Hd.transitional=function(e,t,n){function r(e,t){return"[Axios v1.7.7] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,i,s)=>{if(!1===e)throw new cu(r(i," has been removed"+(t?" in "+t:"")),cu.ERR_DEPRECATED);return t&&!$d[i]&&($d[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,s)}};var zd={assertOptions:function(e,t,n){if("object"!=typeof e)throw new cu("options must be an object",cu.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const s=r[i],o=t[s];if(o){const t=e[s],n=void 0===t||o(t,s,e);if(!0!==n)throw new cu("option "+s+" must be "+n,cu.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new cu("Unknown option "+s,cu.ERR_BAD_OPTION)}},validators:Hd};const Wd=zd.validators;class Gd{constructor(e){this.defaults=e,this.interceptors={request:new gp,response:new gp}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=bd(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:i}=t;void 0!==n&&zd.assertOptions(n,{silentJSONParsing:Wd.transitional(Wd.boolean),forcedJSONParsing:Wd.transitional(Wd.boolean),clarifyTimeoutError:Wd.transitional(Wd.boolean)},!1),null!=r&&(au.isFunction(r)?t.paramsSerializer={serialize:r}:zd.assertOptions(r,{encode:Wd.function,serialize:Wd.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=i&&au.merge(i.common,i[t.method]);i&&au.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=Pp.concat(s,i);const o=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,o.unshift(e.fulfilled,e.rejected))}));const c=[];let l;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let u,p=0;if(!a){const e=[qd.bind(this),void 0];for(e.unshift.apply(e,o),e.push.apply(e,c),u=e.length,l=Promise.resolve(t);p<u;)l=l.then(e[p++],e[p++]);return l}u=o.length;let h=t;for(p=0;p<u;){const e=o[p++],t=o[p++];try{h=e(h)}catch(e){t.call(this,e);break}}try{l=qd.call(this,h)}catch(e){return Promise.reject(e)}for(p=0,u=c.length;p<u;)l=l.then(c[p++],c[p++]);return l}getUri(e){return mp(Mp((e=bd(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}au.forEach(["delete","get","head","options"],(function(e){Gd.prototype[e]=function(t,n){return this.request(bd(n||{},{method:e,url:t,data:(n||{}).data}))}})),au.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,i){return this.request(bd(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Gd.prototype[e]=t(),Gd.prototype[e+"Form"]=t(!0)}));var Vd=Gd;class Kd{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,i){n.reason||(n.reason=new Fp(e,r,i),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Kd((function(t){e=t})),cancel:e}}}var Yd=Kd;const Zd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Zd).forEach((([e,t])=>{Zd[t]=e}));var Qd=Zd;const Jd=function e(t){const n=new Vd(t),r=vl(Vd.prototype.request,n);return au.extend(r,Vd.prototype,n,{allOwnKeys:!0}),au.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(bd(t,n))},r}(kp);Jd.Axios=Vd,Jd.CanceledError=Fp,Jd.CancelToken=Yd,Jd.isCancel=jp,Jd.VERSION=Fh,Jd.toFormData=up,Jd.AxiosError=cu,Jd.Cancel=Jd.CanceledError,Jd.all=function(e){return Promise.all(e)},Jd.spread=function(e){return function(t){return e.apply(null,t)}},Jd.isAxiosError=function(e){return au.isObject(e)&&!0===e.isAxiosError},Jd.mergeConfig=bd,Jd.AxiosHeaders=Pp,Jd.formToJSON=e=>Tp(au.isHTMLForm(e)?new FormData(e):e),Jd.getAdapter=Md,Jd.HttpStatusCode=Qd,Jd.default=Jd;var Xd=Jd;const ef="1.0.0",tf="https://api.qumra.cloud/cli/v1",nf=async()=>{const{default:e}=await import("conf");return new e({projectName:"qumra-cli"})},rf=async(e,t)=>{const n=await nf();try{n.set(e,t)}catch(e){console.error("Error saving data:",e)}},sf=async e=>{const t=await nf();try{return t.get(e)}catch(e){console.error("Error retrieving data:",e)}},of=Xd.create({baseURL:tf,headers:{"Content-Type":"application/json"}});of.interceptors.request.use((async e=>{const t=await sf("token");return t&&(e.headers.Authorization=`${t}`),e}),(e=>Promise.reject(e)));const af=async(e,t)=>e.split("\n").map((e=>{const n=Math.max(0,Math.floor((t-e.length)/2));return" ".repeat(n)+e})).join("\n");var cf={exports:{}};!function(e){const t=(()=>{const e=0,t=1,n=2,r={},i={font:"Standard",fontPath:"./fonts"};function s(e,t,n){return e===t&&e!==n&&e}function o(e,t){let n="|/\\[]{}()<>";if("_"===e){if(-1!==n.indexOf(t))return t}else if("_"===t&&-1!==n.indexOf(e))return e;return!1}function a(e,t){let n="| /\\ [] {} () <>",r=n.indexOf(e),i=n.indexOf(t);if(-1!==r&&-1!==i&&r!==i&&1!==Math.abs(r-i)){const e=Math.max(r,i);return n.substring(e,e+1)}return!1}function c(e,t){let n="[] {} ()",r=n.indexOf(e),i=n.indexOf(t);return-1!==r&&-1!==i&&Math.abs(r-i)<=1&&"|"}function l(e,t){let n="/\\ \\/ ><",r={0:"|",3:"Y",6:"X"},i=n.indexOf(e),s=n.indexOf(t);return-1!==i&&-1!==s&&s-i==1&&r[i]}function u(e,t,n){return e===n&&t===n&&n}function p(e,t){return e===t&&e}function h(e,t){let n="|/\\[]{}()<>";if("_"===e){if(-1!==n.indexOf(t))return t}else if("_"===t&&-1!==n.indexOf(e))return e;return!1}function d(e,t){let n="| /\\ [] {} () <>",r=n.indexOf(e),i=n.indexOf(t);if(-1!==r&&-1!==i&&r!==i&&1!==Math.abs(r-i)){const e=Math.max(r,i);return n.substring(e,e+1)}return!1}function f(e,t){return("-"===e&&"_"===t||"_"===e&&"-"===t)&&"="}function m(e,t){return"|"===e&&"|"===t&&"|"}function g(e,t,n){return" "===t||""===t||t===n&&" "!==e?e:t}function y(r,i,s){if(s.fittingRules.vLayout===e)return"invalid";let o,a,c,l,u=Math.min(r.length,i.length),g=!1;if(0===u)return"invalid";for(o=0;o<u;o++)if(a=r.substring(o,o+1),c=i.substring(o,o+1)," "!==a&&" "!==c){if(s.fittingRules.vLayout===t)return"invalid";if(s.fittingRules.vLayout===n)return"end";if(m(a,c)){g=g||!1;continue}if(l=!1,l=s.fittingRules.vRule1?p(a,c):l,l=!l&&s.fittingRules.vRule2?h(a,c):l,l=!l&&s.fittingRules.vRule3?d(a,c):l,l=!l&&s.fittingRules.vRule4?f(a,c):l,g=!0,!l)return"invalid"}return g?"end":"valid"}function v(e,r,i){let s,o,a,c,l=Math.min(e.length,r.length),u="";for(s=0;s<l;s++)o=e.substring(s,s+1),a=r.substring(s,s+1)," "!==o&&" "!==a?i.fittingRules.vLayout===t||i.fittingRules.vLayout===n?u+=g(o,a):(c=!1,c=i.fittingRules.vRule5?m(o,a):c,c=!c&&i.fittingRules.vRule1?p(o,a):c,c=!c&&i.fittingRules.vRule2?h(o,a):c,c=!c&&i.fittingRules.vRule3?d(o,a):c,c=!c&&i.fittingRules.vRule4?f(o,a):c,u+=c):u+=g(o,a);return u}function b(e,t){let n,r=e.length,i="";for(n=0;n<t;n++)i+=" ";for(n=0;n<r;n++)e[n]+=i}function _(e,t,n){let r,i=e[0].length,s=t[0].length;return i>s?b(t,i-s):s>i&&b(e,s-i),r=function(e,t,n){let r,i,s,o=e.length,a=e.length;t.length;let c,l,u,p=1;for(;p<=o;){for(r=e.slice(Math.max(0,a-p),a),i=t.slice(0,Math.min(o,p)),s=i.length,u="",c=0;c<s;c++)if(l=y(r[c],i[c],n),"end"===l)u=l;else{if("invalid"===l){u=l;break}""===u&&(u="valid")}if("invalid"===u){p--;break}if("end"===u)break;"valid"===u&&p++}return Math.min(o,p)}(e,t,n),function(e,t,n,r){let i,s,o,a,c=e.length,l=t.length,u=e.slice(0,Math.max(0,c-n)),p=e.slice(Math.max(0,c-n),c),h=t.slice(0,Math.min(n,l)),d=[];for(s=p.length,i=0;i<s;i++)o=i>=l?p[i]:v(p[i],h[i],r),d.push(o);return a=t.slice(Math.min(n,l),l),[].concat(u,d,a)}(e,t,r,n)}function w(r,i,p){if(p.fittingRules.hLayout===e)return 0;let h,d,f,m,g,y=r.length,v=i.length,b=y,_=1,w=!1,x=!1;if(0===y)return 0;e:for(;_<=b;){const e=y-_;for(d=r.substring(e,e+_),f=i.substring(0,Math.min(_,v)),h=0;h<Math.min(_,v);h++)if(m=d.substring(h,h+1),g=f.substring(h,h+1)," "!==m&&" "!==g){if(p.fittingRules.hLayout===t){_-=1;break e}if(p.fittingRules.hLayout===n){m!==p.hardBlank&&g!==p.hardBlank||(_-=1);break e}if(w=!0,x=!1,x=p.fittingRules.hRule1?s(m,g,p.hardBlank):x,x=!x&&p.fittingRules.hRule2?o(m,g,p.hardBlank):x,x=!x&&p.fittingRules.hRule3?a(m,g,p.hardBlank):x,x=!x&&p.fittingRules.hRule4?c(m,g,p.hardBlank):x,x=!x&&p.fittingRules.hRule5?l(m,g,p.hardBlank):x,x=!x&&p.fittingRules.hRule6?u(m,g,p.hardBlank):x,!x){_-=1;break e}}if(w)break;_++}return Math.min(b,_)}function x(e,r,i,p){let h,d,f,m,y,v,b,_,w,x,E=[];for(h=0;h<p.height;h++){w=e[h],x=r[h],b=w.length,_=x.length,f=b-i,m=w.substr(0,Math.max(0,f)),y="";const C=Math.max(0,b-i);var S=w.substring(C,C+i),T=x.substring(0,Math.min(i,_));for(d=0;d<i;d++){var D=d<b?S.substring(d,d+1):" ",k=d<_?T.substring(d,d+1):" ";if(" "!==D&&" "!==k)if(p.fittingRules.hLayout===t)y+=g(D,k,p.hardBlank);else if(p.fittingRules.hLayout===n)y+=g(D,k,p.hardBlank);else{var A="";y+=A=(A=!(A=!(A=!(A=!(A=!(A=!A&&p.fittingRules.hRule1?s(D,k,p.hardBlank):A)&&p.fittingRules.hRule2?o(D,k,p.hardBlank):A)&&p.fittingRules.hRule3?a(D,k,p.hardBlank):A)&&p.fittingRules.hRule4?c(D,k,p.hardBlank):A)&&p.fittingRules.hRule5?l(D,k,p.hardBlank):A)&&p.fittingRules.hRule6?u(D,k,p.hardBlank):A)||g(D,k,p.hardBlank)}else y+=g(D,k,p.hardBlank)}v=i>=_?"":x.substring(i,i+Math.max(0,_-i)),E[h]=m+y+v}return E}function E(e){let t,n=[];for(t=0;t<e;t++)n[t]="";return n}const S=function(e){return Math.max.apply(Math,e.map((function(e,t){return e.length})))};function T(e,t,n){return e.reduce((function(e,t){return x(e,t.fig,t.overlap,n)}),E(t))}function D(e,t,n){const r={};for(let i=e.length;--i;){let s=T(e.slice(0,i),t,n);if(S(s)<=n.width){r.outputFigText=s,i<e.length?r.chars=e.slice(i):r.chars=[];break}}return r}function k(t,n,r){let i,s,o,a,c,l,u,p,h,d,f,m,g=0,y=r.height,v=[],b=[];for(a=E(y),r.width>0&&r.whitespaceBreak&&(u={chars:[],overlap:g}),1===r.printDirection&&(t=t.split("").reverse().join("")),c=t.length,i=0;i<c;i++)if(p=t.substring(i,i+1),h=p.match(/\s/),s=n[p.charCodeAt(0)],f=null,s){if(r.fittingRules.hLayout!==e){for(g=1e4,o=0;o<r.height;o++)g=Math.min(g,w(a[o],s[o],r));g=1e4===g?0:g}if(r.width>0&&(r.whitespaceBreak?(d=T(u.chars.concat([{fig:s,overlap:g}]),y,r),f=T(b.concat([{fig:d,overlap:u.overlap}]),y,r),l=S(f)):(f=x(a,s,g,r),l=S(f)),l>=r.width&&i>0&&(r.whitespaceBreak?(a=T(b.slice(0,-1),y,r),b.length>1&&(v.push(a),a=E(y)),b=[]):(v.push(a),a=E(y)))),r.width>0&&r.whitespaceBreak&&(h&&i!==c-1||u.chars.push({fig:s,overlap:g}),h||i===c-1)){for(m=null;f=T(u.chars,y,r),l=S(f),l>=r.width;)m=D(u.chars,y,r),u={chars:m.chars},v.push(m.outputFigText);l>0&&(m?b.push({fig:f,overlap:1}):b.push({fig:f,overlap:u.overlap})),h&&(b.push({fig:s,overlap:g}),a=E(y)),i===c-1&&(a=T(b,y,r)),u={chars:[],overlap:g};continue}a=x(a,s,g,r)}return S(a)>0&&v.push(a),!0!==r.showHardBlanks&&v.forEach((function(e){for(c=e.length,o=0;o<c;o++)e[o]=e[o].replace(new RegExp("\\"+r.hardBlank,"g")," ")})),v}const A=function(e,t,n){let i,s,o,a=(n=n.replace(/\r\n/g,"\n").replace(/\r/g,"\n")).split("\n"),c=[];for(s=a.length,i=0;i<s;i++)c=c.concat(k(a[i],r[e],t));for(s=c.length,o=c[0],i=1;i<s;i++)o=_(o,c[i],t);return o?o.join("\n"):""};function C(r,i){let s,o,a=JSON.parse(JSON.stringify(r));if(void 0!==i.horizontalLayout)for(o in s=function(r,i){let s,o=["hLayout","hRule1","hRule2","hRule3","hRule4","hRule5","hRule6"],a={};if("default"===r)for(s=0;s<o.length;s++)a[o[s]]=i.fittingRules[o[s]];else if("full"===r)a={hLayout:e,hRule1:!1,hRule2:!1,hRule3:!1,hRule4:!1,hRule5:!1,hRule6:!1};else if("fitted"===r)a={hLayout:t,hRule1:!1,hRule2:!1,hRule3:!1,hRule4:!1,hRule5:!1,hRule6:!1};else if("controlled smushing"===r)a={hLayout:3,hRule1:!0,hRule2:!0,hRule3:!0,hRule4:!0,hRule5:!0,hRule6:!0};else{if("universal smushing"!==r)return;a={hLayout:n,hRule1:!1,hRule2:!1,hRule3:!1,hRule4:!1,hRule5:!1,hRule6:!1}}return a}(i.horizontalLayout,r),s)s.hasOwnProperty(o)&&(a.fittingRules[o]=s[o]);if(void 0!==i.verticalLayout)for(o in s=function(r,i){let s,o=["vLayout","vRule1","vRule2","vRule3","vRule4","vRule5"],a={};if("default"===r)for(s=0;s<o.length;s++)a[o[s]]=i.fittingRules[o[s]];else if("full"===r)a={vLayout:e,vRule1:!1,vRule2:!1,vRule3:!1,vRule4:!1,vRule5:!1};else if("fitted"===r)a={vLayout:t,vRule1:!1,vRule2:!1,vRule3:!1,vRule4:!1,vRule5:!1};else if("controlled smushing"===r)a={vLayout:3,vRule1:!0,vRule2:!0,vRule3:!0,vRule4:!0,vRule5:!0};else{if("universal smushing"!==r)return;a={vLayout:n,vRule1:!1,vRule2:!1,vRule3:!1,vRule4:!1,vRule5:!1}}return a}(i.verticalLayout,r),s)s.hasOwnProperty(o)&&(a.fittingRules[o]=s[o]);return a.printDirection=void 0!==i.printDirection?i.printDirection:r.printDirection,a.showHardBlanks=i.showHardBlanks||!1,a.width=i.width||-1,a.whitespaceBreak=i.whitespaceBreak||!1,a}const R=function(e,t,n){return R.text(e,t,n)};return R.text=async function(e,t,n){let r="";return e+="","function"==typeof arguments[1]&&(n=t,(t={}).font=i.font),"string"==typeof t?(r=t,t={}):r=(t=t||{}).font||i.font,await new Promise(((i,s)=>{R.loadFont(r,(function(o,a){if(o)return s(o),void(n&&n(o));const c=A(r,C(a,t),e);i(c),n&&n(null,c)}))}))},R.textSync=function(e,t){let n="";e+="","string"==typeof t?(n=t,t={}):n=(t=t||{}).font||i.font;var r=C(R.loadFontSync(n),t);return A(n,r,e)},R.metadata=function(e,t){e+="",R.loadFont(e,(function(n,i){n?t(n):t(null,i,r[e].comment)}))},R.defaults=function(e){if("object"==typeof e&&null!==e)for(var t in e)e.hasOwnProperty(t)&&(i[t]=e[t]);return JSON.parse(JSON.stringify(i))},R.parseFont=function(i,s){s=s.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),r[i]={};var o=s.split("\n"),a=o.splice(0,1)[0].split(" "),c=r[i],l={};if(l.hardBlank=a[0].substr(5,1),l.height=parseInt(a[1],10),l.baseline=parseInt(a[2],10),l.maxLength=parseInt(a[3],10),l.oldLayout=parseInt(a[4],10),l.numCommentLines=parseInt(a[5],10),l.printDirection=a.length>=6?parseInt(a[6],10):0,l.fullLayout=a.length>=7?parseInt(a[7],10):null,l.codeTagCount=a.length>=8?parseInt(a[8],10):null,l.fittingRules=function(r,i){let s,o,a,c,l={},u=[[16384,"vLayout",n],[8192,"vLayout",t],[4096,"vRule5",!0],[2048,"vRule4",!0],[1024,"vRule3",!0],[512,"vRule2",!0],[256,"vRule1",!0],[128,"hLayout",n],[64,"hLayout",t],[32,"hRule6",!0],[16,"hRule5",!0],[8,"hRule4",!0],[4,"hRule3",!0],[2,"hRule2",!0],[1,"hRule1",!0]];for(s=null!==i?i:r,o=0,a=u.length;o<a;)c=u[o],s>=c[0]?(s-=c[0],l[c[1]]=void 0===l[c[1]]?c[2]:l[c[1]]):"vLayout"!==c[1]&&"hLayout"!==c[1]&&(l[c[1]]=!1),o++;return void 0===l.hLayout?0===r?l.hLayout=t:-1===r?l.hLayout=e:l.hRule1||l.hRule2||l.hRule3||l.hRule4||l.hRule5||l.hRule6?l.hLayout=3:l.hLayout=n:l.hLayout===n&&(l.hRule1||l.hRule2||l.hRule3||l.hRule4||l.hRule5||l.hRule6)&&(l.hLayout=3),void 0===l.vLayout?l.vRule1||l.vRule2||l.vRule3||l.vRule4||l.vRule5?l.vLayout=3:l.vLayout=e:l.vLayout===n&&(l.vRule1||l.vRule2||l.vRule3||l.vRule4||l.vRule5)&&(l.vLayout=3),l}(l.oldLayout,l.fullLayout),c.options=l,1!==l.hardBlank.length||isNaN(l.height)||isNaN(l.baseline)||isNaN(l.maxLength)||isNaN(l.oldLayout)||isNaN(l.numCommentLines))throw new Error("FIGlet header contains invalid values.");let u,p=[];for(u=32;u<=126;u++)p.push(u);if(p=p.concat(196,214,220,228,246,252,223),o.length<l.numCommentLines+l.height*p.length)throw new Error("FIGlet file is missing data.");let h,d,f=!1;for(c.comment=o.splice(0,l.numCommentLines).join("\n"),c.numChars=0;o.length>0&&c.numChars<p.length;){for(h=p[c.numChars],c[h]=o.splice(0,l.height),u=0;u<l.height;u++)void 0===c[h][u]?c[h][u]="":(d=new RegExp("\\"+c[h][u].substr(c[h][u].length-1,1)+"+$"),c[h][u]=c[h][u].replace(d,""));c.numChars++}for(;o.length>0;){if(h=o.splice(0,1)[0].split(" ")[0],/^0[xX][0-9a-fA-F]+$/.test(h))h=parseInt(h,16);else if(/^0[0-7]+$/.test(h))h=parseInt(h,8);else if(/^[0-9]+$/.test(h))h=parseInt(h,10);else{if(!/^-0[xX][0-9a-fA-F]+$/.test(h)){if(""===h)break;console.log("Invalid data:"+h),f=!0;break}h=parseInt(h,16)}for(c[h]=o.splice(0,l.height),u=0;u<l.height;u++)void 0===c[h][u]?c[h][u]="":(d=new RegExp("\\"+c[h][u].substr(c[h][u].length-1,1)+"+$"),c[h][u]=c[h][u].replace(d,""));c.numChars++}if(!0===f)throw new Error("Error parsing data.");return l},R.loadFont=function(e,t){if(r[e])t(null,r[e].options);else{if("function"!=typeof fetch)throw console.error("figlet.js requires the fetch API or a fetch polyfill such as https://cdnjs.com/libraries/fetch"),new Error("fetch is required for figlet.js to work.");fetch(i.fontPath+"/"+e+".flf").then((function(e){if(e.ok)return e.text();throw console.log("Unexpected response",e),new Error("Network response was not ok.")})).then((function(n){t(null,R.parseFont(e,n))})).catch(t)}},R.loadFontSync=function(e){if(r[e])return r[e].options;throw new Error("synchronous font loading is not implemented for the browser")},R.preloadFonts=function(e,t){let n=[];e.reduce((function(e,t){return e.then((function(){return fetch(i.fontPath+"/"+t+".flf").then((e=>e.text())).then((function(e){n.push(e)}))}))}),Promise.resolve()).then((function(r){for(var i in e)e.hasOwnProperty(i)&&R.parseFont(e[i],n[i]);t&&t()}))},R.figFonts=r,R})();e.exports=t}(cf);const lf=cf.exports,uf=s,pf=o,hf=pf.join(__dirname,"/../fonts/");lf.loadFont=function(e,t){lf.figFonts[e]?t(null,lf.figFonts[e].options):uf.readFile(pf.join(hf,e+".flf"),{encoding:"utf-8"},(function(n,r){if(n)return t(n);r+="";try{t(null,lf.parseFont(e,r))}catch(e){t(e)}}))},lf.loadFontSync=function(e){if(lf.figFonts[e])return lf.figFonts[e].options;var t=uf.readFileSync(pf.join(hf,e+".flf"),{encoding:"utf-8"});return t+="",lf.parseFont(e,t)},lf.fonts=function(e){var t=[];uf.readdir(hf,(function(n,r){if(n)return e(n);r.forEach((function(e){/\.flf$/.test(e)&&t.push(e.replace(/\.flf$/,""))})),e(null,t)}))},lf.fontsSync=function(){var e=[];return uf.readdirSync(hf).forEach((function(t){/\.flf$/.test(t)&&e.push(t.replace(/\.flf$/,""))})),e};var df=q(lf);const ff=(e,t)=>df.textSync(e,{font:"Standard",horizontalLayout:"default",verticalLayout:"default",width:t,whitespaceBreak:!1}),mf=async()=>{const e=ff("Qumra Cloud CLI",90),t=ff(ef,90),n=await af(e,90),r=await af(t,90),i=await af("Welcome to Qumra Cloud CLI!",90);console.log(_t.green(n)),console.log(_t.green(i)),console.log(_t.green(r))};const gf=async()=>{await mf();const e=zr("Initialisation...").start();let t;try{t=(await of.get("themes/createThemeData")).data}catch(t){e.fail(_t.red(`Failed to fetch theme creation data: ${t.message}`)),process.exit(1)}const n=t?.platforms?.map((e=>({name:e.title,value:e._id}))),r=t?.apps?.map((e=>({name:e.subdomain,value:e._id})));e.succeed(),yl.prompt([{type:"input",name:"title",message:"What would you like to name your theme?",default:"qumra-theme",validate:e=>""!==e.trim()||"Title is required."},{type:"list",name:"platform",message:"Select the category for your theme:",choices:n,validate:e=>void 0!==e||"Platform selection is required."},{type:"list",name:"app",message:"Select the app you want to use to test your theme:",choices:r,validate:e=>void 0!==e||"App selection is required."},{type:"input",name:"supportEmail",message:"Enter your support email:",default:"support@example.com",validate:e=>/\S+@\S+\.\S+/.test(e)||"Please enter a valid email address."},{type:"input",name:"supportSite",message:"Enter your support site URL:",default:"https://example.com",validate:e=>{try{return new URL(e),!0}catch{return"Please enter a valid URL."}}},{type:"confirm",name:"savePath",message:"Do you want to save the theme path on your machine?",default:!0}]).then((async t=>{const{title:n}=t,r=n.toString().toLowerCase().trim().replace(/\s+/g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-").replace(/^-+/,"").replace(/-+$/,"");const i=o.join(process.cwd(),r);let a;s.existsSync(i)&&(e.fail(_t.red(`Project "${r}" already exists.`)),process.exit(1)),!0===t.savePath&&(t.path=i),delete t.savePath;try{a=await of.post("/themes",t)}catch(t){e.fail(_t.red(`Failed to create theme on server: ${t.message}`)),process.exit(1)}const{version:c,theme:l}=a.data,u=l.platform.githubRepo;try{let e=zr("Creating Qumra Theme...").start();d.exec(`git clone ${u} ${r}`,((t,n,a)=>{t&&(e.fail(_t.red(`Failed to clone repository: ${t.message}`)),process.exit(1)),e.succeed("Repository cloned successfully.");const u=o.join(i,".git");try{p=u,s.existsSync(p)&&s.rmSync(p,{recursive:!0,force:!0})}catch(e){console.error(_t.red(`Failed to remove .git folder: ${e.message}`)),process.exit(1)}var p;const h={themeId:l._id,version:c},f=o.join(i,"qumra.config.json");try{s.writeFileSync(f,JSON.stringify(h,null,2),"utf-8"),zr().succeed("Created qumra.config.json successfully.")}catch(e){console.error(_t.red(`Failed to create qumra.config.json: ${e.message}`)),process.exit(1)}yl.prompt([{type:"confirm",name:"install",message:"Do you want to run npm install?",default:!0}]).then((({install:e})=>{if(e){const e=zr("Installing dependencies...").start();d.exec(`cd "${r}" && npm install --force`,((t,n,i)=>{t&&(e.fail(_t.red(`Failed to install dependencies: ${t.message}`)),process.exit(1)),e.succeed(_t.blue(`Qumra Theme "${r}" created successfully. Thank you for choosing Qumra!`))}))}else zr().succeed(_t.blue(`Qumra Theme "${r}" created successfully. Thank you for choosing Qumra!`))})).catch((e=>{console.error(_t.red(`Error during install prompt: ${e.message}`)),process.exit(1)}))}))}catch(t){e.fail(_t.red(`Failed to create project "${r}": ${t.message}`)),process.exit(1)}})).catch((e=>{console.error("🚀 ~ .then ~ err:",e),process.exit(1)}))};var yf="object"==typeof process&&process&&"win32"===process.platform?{sep:"\\"}:{sep:"/"},vf=bf;function bf(e,t,n){e instanceof RegExp&&(e=_f(e,n)),t instanceof RegExp&&(t=_f(t,n));var r=wf(e,t,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+e.length,r[1]),post:n.slice(r[1]+t.length)}}function _f(e,t){var n=t.match(e);return n?n[0]:null}function wf(e,t,n){var r,i,s,o,a,c=n.indexOf(e),l=n.indexOf(t,c+1),u=c;if(c>=0&&l>0){if(e===t)return[c,l];for(r=[],s=n.length;u>=0&&!a;)u==c?(r.push(u),c=n.indexOf(e,u+1)):1==r.length?a=[r.pop(),l]:((i=r.pop())<s&&(s=i,o=l),l=n.indexOf(t,u+1)),u=c<l&&c>=0?c:l;r.length&&(a=[s,o])}return a}bf.range=wf;var xf=vf,Ef=function(e){if(!e)return[];"{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2));return jf(function(e){return e.split("\\\\").join(Sf).split("\\{").join(Tf).split("\\}").join(Df).split("\\,").join(kf).split("\\.").join(Af)}(e),!0).map(Rf)},Sf="\0SLASH"+Math.random()+"\0",Tf="\0OPEN"+Math.random()+"\0",Df="\0CLOSE"+Math.random()+"\0",kf="\0COMMA"+Math.random()+"\0",Af="\0PERIOD"+Math.random()+"\0";function Cf(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function Rf(e){return e.split(Sf).join("\\").split(Tf).join("{").split(Df).join("}").split(kf).join(",").split(Af).join(".")}function Of(e){if(!e)return[""];var t=[],n=xf("{","}",e);if(!n)return e.split(",");var r=n.pre,i=n.body,s=n.post,o=r.split(",");o[o.length-1]+="{"+i+"}";var a=Of(s);return s.length&&(o[o.length-1]+=a.shift(),o.push.apply(o,a)),t.push.apply(t,o),t}function Lf(e){return"{"+e+"}"}function If(e){return/^-?0\d/.test(e)}function Pf(e,t){return e<=t}function Nf(e,t){return e>=t}function jf(e,t){var n=[],r=xf("{","}",e);if(!r)return[e];var i=r.pre,s=r.post.length?jf(r.post,!1):[""];if(/\$$/.test(r.pre))for(var o=0;o<s.length;o++){var a=i+"{"+r.body+"}"+s[o];n.push(a)}else{var c,l,u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(r.body),p=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(r.body),h=u||p,d=r.body.indexOf(",")>=0;if(!h&&!d)return r.post.match(/,.*\}/)?jf(e=r.pre+"{"+r.body+Df+r.post):[e];if(h)c=r.body.split(/\.\./);else if(1===(c=Of(r.body)).length&&1===(c=jf(c[0],!1).map(Lf)).length)return s.map((function(e){return r.pre+c[0]+e}));if(h){var f=Cf(c[0]),m=Cf(c[1]),g=Math.max(c[0].length,c[1].length),y=3==c.length?Math.abs(Cf(c[2])):1,v=Pf;m<f&&(y*=-1,v=Nf);var b=c.some(If);l=[];for(var _=f;v(_,m);_+=y){var w;if(p)"\\"===(w=String.fromCharCode(_))&&(w="");else if(w=String(_),b){var x=g-w.length;if(x>0){var E=new Array(x+1).join("0");w=_<0?"-"+E+w.slice(1):E+w}}l.push(w)}}else{l=[];for(var S=0;S<c.length;S++)l.push.apply(l,jf(c[S],!1))}for(S=0;S<l.length;S++)for(o=0;o<s.length;o++){a=i+l[S]+s[o];(!t||h||a)&&n.push(a)}}return n}const Ff=(e,t,n={})=>(Qf(t),!(!n.nocomment&&"#"===t.charAt(0))&&new em(t,n).match(e));var Bf=Ff;const Mf=yf;Ff.sep=Mf.sep;const Uf=Symbol("globstar **");Ff.GLOBSTAR=Uf;const qf=Ef,Hf={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},$f="[^/]",zf=$f+"*?",Wf=e=>e.split("").reduce(((e,t)=>(e[t]=!0,e)),{}),Gf=Wf("().*{}+?[]^$\\!"),Vf=Wf("[.("),Kf=/\/+/;Ff.filter=(e,t={})=>(n,r,i)=>Ff(n,e,t);const Yf=(e,t={})=>{const n={};return Object.keys(e).forEach((t=>n[t]=e[t])),Object.keys(t).forEach((e=>n[e]=t[e])),n};Ff.defaults=e=>{if(!e||"object"!=typeof e||!Object.keys(e).length)return Ff;const t=Ff,n=(n,r,i)=>t(n,r,Yf(e,i));return n.Minimatch=class extends t.Minimatch{constructor(t,n){super(t,Yf(e,n))}},n.Minimatch.defaults=n=>t.defaults(Yf(e,n)).Minimatch,n.filter=(n,r)=>t.filter(n,Yf(e,r)),n.defaults=n=>t.defaults(Yf(e,n)),n.makeRe=(n,r)=>t.makeRe(n,Yf(e,r)),n.braceExpand=(n,r)=>t.braceExpand(n,Yf(e,r)),n.match=(n,r,i)=>t.match(n,r,Yf(e,i)),n},Ff.braceExpand=(e,t)=>Zf(e,t);const Zf=(e,t={})=>(Qf(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:qf(e)),Qf=e=>{if("string"!=typeof e)throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")},Jf=Symbol("subparse");Ff.makeRe=(e,t)=>new em(e,t||{}).makeRe(),Ff.match=(e,t,n={})=>{const r=new em(t,n);return e=e.filter((e=>r.match(e))),r.options.nonull&&!e.length&&e.push(t),e};const Xf=e=>e.replace(/[[\]\\]/g,"\\$&");let em=class{constructor(e,t){Qf(e),t||(t={}),this.options=t,this.set=[],this.pattern=e,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||!1===t.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}debug(){}make(){const e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate();let n=this.globSet=this.braceExpand();t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,n),n=this.globParts=n.map((e=>e.split(Kf))),this.debug(this.pattern,n),n=n.map(((e,t,n)=>e.map(this.parse,this))),this.debug(this.pattern,n),n=n.filter((e=>-1===e.indexOf(!1))),this.debug(this.pattern,n),this.set=n}parseNegate(){if(this.options.nonegate)return;const e=this.pattern;let t=!1,n=0;for(let r=0;r<e.length&&"!"===e.charAt(r);r++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}matchOne(e,t,n){var r=this.options;this.debug("matchOne",{this:this,file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var i=0,s=0,o=e.length,a=t.length;i<o&&s<a;i++,s++){this.debug("matchOne loop");var c,l=t[s],u=e[i];if(this.debug(t,l,u),!1===l)return!1;if(l===Uf){this.debug("GLOBSTAR",[t,l,u]);var p=i,h=s+1;if(h===a){for(this.debug("** at the end");i<o;i++)if("."===e[i]||".."===e[i]||!r.dot&&"."===e[i].charAt(0))return!1;return!0}for(;p<o;){var d=e[p];if(this.debug("\nglobstar while",e,p,t,h,d),this.matchOne(e.slice(p),t.slice(h),n))return this.debug("globstar found match!",p,o,d),!0;if("."===d||".."===d||!r.dot&&"."===d.charAt(0)){this.debug("dot detected!",e,p,t,h);break}this.debug("globstar swallow a segment, and continue"),p++}return!(!n||(this.debug("\n>>> no match, partial?",e,p,t,h),p!==o))}if("string"==typeof l?(c=u===l,this.debug("string match",l,u,c)):(c=u.match(l),this.debug("pattern match",l,u,c)),!c)return!1}if(i===o&&s===a)return!0;if(i===o)return n;if(s===a)return i===o-1&&""===e[i];throw new Error("wtf?")}braceExpand(){return Zf(this.pattern,this.options)}parse(e,t){Qf(e);const n=this.options;if("**"===e){if(!n.noglobstar)return Uf;e="*"}if(""===e)return"";let r="",i=!1,s=!1;const o=[],a=[];let c,l,u,p,h=!1,d=-1,f=-1,m="."===e.charAt(0),g=n.dot||m;const y=e=>"."===e.charAt(0)?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",v=()=>{if(c){switch(c){case"*":r+=zf,i=!0;break;case"?":r+=$f,i=!0;break;default:r+="\\"+c}this.debug("clearStateChar %j %j",c,r),c=!1}};for(let t,p=0;p<e.length&&(t=e.charAt(p));p++)if(this.debug("%s\t%s %s %j",e,p,r,t),s){if("/"===t)return!1;Gf[t]&&(r+="\\"),r+=t,s=!1}else switch(t){case"/":return!1;case"\\":if(h&&"-"===e.charAt(p+1)){r+=t;continue}v(),s=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",e,p,r,t),h){this.debug(" in class"),"!"===t&&p===f+1&&(t="^"),r+=t;continue}this.debug("call clearStateChar %j",c),v(),c=t,n.noext&&v();continue;case"(":{if(h){r+="(";continue}if(!c){r+="\\(";continue}const t={type:c,start:p-1,reStart:r.length,open:Hf[c].open,close:Hf[c].close};this.debug(this.pattern,"\t",t),o.push(t),r+=t.open,0===t.start&&"!"!==t.type&&(m=!0,r+=y(e.slice(p+1))),this.debug("plType %j %j",c,r),c=!1;continue}case")":{const e=o[o.length-1];if(h||!e){r+="\\)";continue}o.pop(),v(),i=!0,u=e,r+=u.close,"!"===u.type&&a.push(Object.assign(u,{reEnd:r.length}));continue}case"|":{const t=o[o.length-1];if(h||!t){r+="\\|";continue}v(),r+="|",0===t.start&&"!"!==t.type&&(m=!0,r+=y(e.slice(p+1)));continue}case"[":if(v(),h){r+="\\"+t;continue}h=!0,f=p,d=r.length,r+=t;continue;case"]":if(p===f+1||!h){r+="\\"+t;continue}l=e.substring(f+1,p);try{RegExp("["+Xf(l.replace(/\\([^-\]])/g,"$1"))+"]"),r+=t}catch(e){r=r.substring(0,d)+"(?:$.)"}i=!0,h=!1;continue;default:v(),!Gf[t]||"^"===t&&h||(r+="\\"),r+=t}for(h&&(l=e.slice(f+1),p=this.parse(l,Jf),r=r.substring(0,d)+"\\["+p[0],i=i||p[1]),u=o.pop();u;u=o.pop()){let e;e=r.slice(u.reStart+u.open.length),this.debug("setting tail",r,u),e=e.replace(/((?:\\{2}){0,64})(\\?)\|/g,((e,t,n)=>(n||(n="\\"),t+t+n+"|"))),this.debug("tail=%j\n %s",e,e,u,r);const t="*"===u.type?zf:"?"===u.type?$f:"\\"+u.type;i=!0,r=r.slice(0,u.reStart)+t+"\\("+e}v(),s&&(r+="\\\\");const b=Vf[r.charAt(0)];for(let e=a.length-1;e>-1;e--){const n=a[e],i=r.slice(0,n.reStart),s=r.slice(n.reStart,n.reEnd-8);let o=r.slice(n.reEnd);const c=r.slice(n.reEnd-8,n.reEnd)+o,l=i.split(")").length,u=i.split("(").length-l;let p=o;for(let e=0;e<u;e++)p=p.replace(/\)[+*?]?/,"");o=p;r=i+s+o+(""===o&&t!==Jf?"(?:$|\\/)":"")+c}if(""!==r&&i&&(r="(?=.)"+r),b&&(r=(m?"":g?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)")+r),t===Jf)return[r,i];if(n.nocase&&!i&&(i=e.toUpperCase()!==e.toLowerCase()),!i)return(e=>e.replace(/\\(.)/g,"$1"))(e);const _=n.nocase?"i":"";try{return Object.assign(new RegExp("^"+r+"$",_),{_glob:e,_src:r})}catch(e){return new RegExp("$.")}}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const e=this.set;if(!e.length)return this.regexp=!1,this.regexp;const t=this.options,n=t.noglobstar?zf:t.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",r=t.nocase?"i":"";let i=e.map((e=>(e=e.map((e=>"string"==typeof e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):e===Uf?Uf:e._src)).reduce(((e,t)=>(e[e.length-1]===Uf&&t===Uf||e.push(t),e)),[]),e.forEach(((t,r)=>{t===Uf&&e[r-1]!==Uf&&(0===r?e.length>1?e[r+1]="(?:\\/|"+n+"\\/)?"+e[r+1]:e[r]=n:r===e.length-1?e[r-1]+="(?:\\/|"+n+")?":(e[r-1]+="(?:\\/|\\/"+n+"\\/)"+e[r+1],e[r+1]=Uf))})),e.filter((e=>e!==Uf)).join("/")))).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,r)}catch(e){this.regexp=!1}return this.regexp}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;const n=this.options;"/"!==Mf.sep&&(e=e.split(Mf.sep).join("/")),e=e.split(Kf),this.debug(this.pattern,"split",e);const r=this.set;let i;this.debug(this.pattern,"set",r);for(let t=e.length-1;t>=0&&(i=e[t],!i);t--);for(let s=0;s<r.length;s++){const o=r[s];let a=e;n.matchBase&&1===o.length&&(a=[i]);if(this.matchOne(a,o,t))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate}static defaults(e){return Ff.defaults(e).Minimatch}};Ff.Minimatch=em;var tm=lm;const nm=s,{EventEmitter:rm}=p,{Minimatch:im}=Bf,{resolve:sm}=o;function om(e,t){return new Promise(((n,r)=>{(t?nm.stat:nm.lstat)(e,((r,i)=>{if(r)if("ENOENT"===r.code)n(t?om(e,!1):null);else n(null);else n(i)}))}))}async function*am(e,t,n,r,i,s){let o=await function(e,t){return new Promise(((n,r)=>{nm.readdir(e,{withFileTypes:!0},((e,i)=>{if(e)switch(e.code){case"ENOTDIR":t?r(e):n([]);break;case"ENOTSUP":case"ENOENT":case"ENAMETOOLONG":case"UNKNOWN":n([]);break;default:r(e)}else n(i)}))}))}(t+e,s);for(const s of o){let o=s.name;void 0===o&&(o=s,r=!0);const a=e+"/"+o,c=a.slice(1),l=t+"/"+c;let u=null;(r||n)&&(u=await om(l,n)),u||void 0===s.name||(u=s),null===u&&(u={isDirectory:()=>!1}),u.isDirectory()?i(c)||(yield{relative:c,absolute:l,stats:u},yield*am(a,t,n,r,i,!1)):yield{relative:c,absolute:l,stats:u}}}class cm extends rm{constructor(e,t,n){if(super(),"function"==typeof t&&(n=t,t=null),this.options=function(e){return{pattern:e.pattern,dot:!!e.dot,noglobstar:!!e.noglobstar,matchBase:!!e.matchBase,nocase:!!e.nocase,ignore:e.ignore,skip:e.skip,follow:!!e.follow,stat:!!e.stat,nodir:!!e.nodir,mark:!!e.mark,silent:!!e.silent,absolute:!!e.absolute}}(t||{}),this.matchers=[],this.options.pattern){const e=Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern];this.matchers=e.map((e=>new im(e,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase})))}if(this.ignoreMatchers=[],this.options.ignore){const e=Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore];this.ignoreMatchers=e.map((e=>new im(e,{dot:!0})))}if(this.skipMatchers=[],this.options.skip){const e=Array.isArray(this.options.skip)?this.options.skip:[this.options.skip];this.skipMatchers=e.map((e=>new im(e,{dot:!0})))}this.iterator=async function*(e,t,n,r){yield*am("",e,t,n,r,!0)}(sm(e||"."),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this)),this.paused=!1,this.inactive=!1,this.aborted=!1,n&&(this._matches=[],this.on("match",(e=>this._matches.push(this.options.absolute?e.absolute:e.relative))),this.on("error",(e=>n(e))),this.on("end",(()=>n(null,this._matches)))),setTimeout((()=>this._next()),0)}_shouldSkipDirectory(e){return this.skipMatchers.some((t=>t.match(e)))}_fileMatches(e,t){const n=e+(t?"/":"");return(0===this.matchers.length||this.matchers.some((e=>e.match(n))))&&!this.ignoreMatchers.some((e=>e.match(n)))&&(!this.options.nodir||!t)}_next(){this.paused||this.aborted?this.inactive=!0:this.iterator.next().then((e=>{if(e.done)this.emit("end");else{const t=e.value.stats.isDirectory();if(this._fileMatches(e.value.relative,t)){let n=e.value.relative,r=e.value.absolute;this.options.mark&&t&&(n+="/",r+="/"),this.options.stat?this.emit("match",{relative:n,absolute:r,stat:e.value.stats}):this.emit("match",{relative:n,absolute:r})}this._next(this.iterator)}})).catch((e=>{this.abort(),this.emit("error",e),e.code||this.options.silent||console.error(e)}))}abort(){this.aborted=!0}pause(){this.paused=!0}resume(){this.paused=!1,this.inactive&&(this.inactive=!1,this._next())}}function lm(e,t,n){return new cm(e,t,n)}function um(e,...t){return(...n)=>e(...t,...n)}function pm(e){return function(...t){var n=t.pop();return e.call(this,t,n)}}lm.ReaddirGlob=cm;var hm="function"==typeof queueMicrotask&&queueMicrotask,dm="function"==typeof setImmediate&&setImmediate,fm="object"==typeof process&&"function"==typeof process.nextTick;function mm(e){setTimeout(e,0)}function gm(e){return(t,...n)=>e((()=>t(...n)))}var ym=gm(hm?queueMicrotask:dm?setImmediate:fm?process.nextTick:mm);function vm(e){return wm(e)?function(...t){const n=t.pop();return bm(e.apply(this,t),n)}:pm((function(t,n){var r;try{r=e.apply(this,t)}catch(e){return n(e)}if(r&&"function"==typeof r.then)return bm(r,n);n(null,r)}))}function bm(e,t){return e.then((e=>{_m(t,null,e)}),(e=>{_m(t,e&&(e instanceof Error||e.message)?e:new Error(e))}))}function _m(e,t,n){try{e(t,n)}catch(e){ym((e=>{throw e}),e)}}function wm(e){return"AsyncFunction"===e[Symbol.toStringTag]}function xm(e){if("function"!=typeof e)throw new Error("expected a function");return wm(e)?vm(e):e}function Em(e,t){if(t||(t=e.length),!t)throw new Error("arity is undefined");return function(...n){return"function"==typeof n[t-1]?e.apply(this,n):new Promise(((r,i)=>{n[t-1]=(e,...t)=>{if(e)return i(e);r(t.length>1?t:t[0])},e.apply(this,n)}))}}function Sm(e){return function(t,...n){return Em((function(r){var i=this;return e(t,((e,t)=>{xm(e).apply(i,n.concat(t))}),r)}))}}function Tm(e,t,n,r){t=t||[];var i=[],s=0,o=xm(n);return e(t,((e,t,n)=>{var r=s++;o(e,((e,t)=>{i[r]=t,n(e)}))}),(e=>{r(e,i)}))}function Dm(e){return e&&"number"==typeof e.length&&e.length>=0&&e.length%1==0}const km={};function Am(e){function t(...t){if(null!==e){var n=e;e=null,n.apply(this,t)}}return Object.assign(t,e),t}function Cm(e){if(Dm(e))return function(e){var t=-1,n=e.length;return function(){return++t<n?{value:e[t],key:t}:null}}(e);var t=function(e){return e[Symbol.iterator]&&e[Symbol.iterator]()}(e);return t?function(e){var t=-1;return function(){var n=e.next();return n.done?null:(t++,{value:n.value,key:t})}}(t):function(e){var t=e?Object.keys(e):[],n=-1,r=t.length;return function i(){var s=t[++n];return"__proto__"===s?i():n<r?{value:e[s],key:s}:null}}(e)}function Rm(e){return function(...t){if(null===e)throw new Error("Callback was already called.");var n=e;e=null,n.apply(this,t)}}function Om(e,t,n,r){let i=!1,s=!1,o=!1,a=0,c=0;function l(){a>=t||o||i||(o=!0,e.next().then((({value:e,done:t})=>{if(!s&&!i){if(o=!1,t)return i=!0,void(a<=0&&r(null));a++,n(e,c,u),c++,l()}})).catch(p))}function u(e,t){if(a-=1,!s)return e?p(e):!1===e?(i=!0,void(s=!0)):t===km||i&&a<=0?(i=!0,r(null)):void l()}function p(e){s||(o=!1,i=!0,r(e))}l()}var Lm=e=>(t,n,r)=>{if(r=Am(r),e<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return r(null);if("AsyncGenerator"===t[Symbol.toStringTag])return Om(t,e,n,r);if(function(e){return"function"==typeof e[Symbol.asyncIterator]}(t))return Om(t[Symbol.asyncIterator](),e,n,r);var i=Cm(t),s=!1,o=!1,a=0,c=!1;function l(e,t){if(!o)if(a-=1,e)s=!0,r(e);else if(!1===e)s=!0,o=!0;else{if(t===km||s&&a<=0)return s=!0,r(null);c||u()}}function u(){for(c=!0;a<e&&!s;){var t=i();if(null===t)return s=!0,void(a<=0&&r(null));a+=1,n(t.value,t.key,Rm(l))}c=!1}u()};var Im=Em((function(e,t,n,r){return Lm(t)(e,xm(n),r)}),4);function Pm(e,t,n){n=Am(n);var r=0,i=0,{length:s}=e,o=!1;function a(e,t){!1===e&&(o=!0),!0!==o&&(e?n(e):++i!==s&&t!==km||n(null))}for(0===s&&n(null);r<s;r++)t(e[r],r,Rm(a))}function Nm(e,t,n){return Im(e,1/0,t,n)}var jm=Em((function(e,t,n){return(Dm(e)?Pm:Nm)(e,xm(t),n)}),3);var Fm=Em((function(e,t,n){return Tm(jm,e,t,n)}),3),Bm=Sm(Fm);var Mm=Em((function(e,t,n){return Im(e,1,t,n)}),3);var Um=Em((function(e,t,n){return Tm(Mm,e,t,n)}),3),qm=Sm(Um);const Hm=Symbol("promiseCallback");function $m(){let e,t;function n(n,...r){if(n)return t(n);e(r.length>1?r:r[0])}return n[Hm]=new Promise(((n,r)=>{e=n,t=r})),n}function zm(e,t,n){"number"!=typeof t&&(n=t,t=null),n=Am(n||$m());var r=Object.keys(e).length;if(!r)return n(null);t||(t=r);var i={},s=0,o=!1,a=!1,c=Object.create(null),l=[],u=[],p={};function h(e,t){l.push((()=>function(e,t){if(a)return;var r=Rm(((t,...r)=>{if(s--,!1!==t)if(r.length<2&&([r]=r),t){var l={};if(Object.keys(i).forEach((e=>{l[e]=i[e]})),l[e]=r,a=!0,c=Object.create(null),o)return;n(t,l)}else i[e]=r,(c[e]||[]).forEach((e=>e())),d();else o=!0}));s++;var l=xm(t[t.length-1]);t.length>1?l(i,r):l(r)}(e,t)))}function d(){if(!o){if(0===l.length&&0===s)return n(null,i);for(;l.length&&s<t;){l.shift()()}}}function f(t){var n=[];return Object.keys(e).forEach((r=>{const i=e[r];Array.isArray(i)&&i.indexOf(t)>=0&&n.push(r)})),n}return Object.keys(e).forEach((t=>{var n=e[t];if(!Array.isArray(n))return h(t,[n]),void u.push(t);var r=n.slice(0,n.length-1),i=r.length;if(0===i)return h(t,n),void u.push(t);p[t]=i,r.forEach((s=>{if(!e[s])throw new Error("async.auto task `"+t+"` has a non-existent dependency `"+s+"` in "+r.join(", "));!function(e,t){var n=c[e];n||(n=c[e]=[]);n.push(t)}(s,(()=>{0===--i&&h(t,n)}))}))})),function(){var e=0;for(;u.length;)e++,f(u.pop()).forEach((e=>{0==--p[e]&&u.push(e)}));if(e!==r)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}(),d(),n[Hm]}var Wm=/^(?:async\s)?(?:function)?\s*(?:\w+\s*)?\(([^)]+)\)(?:\s*{)/,Gm=/^(?:async\s)?\s*(?:\(\s*)?((?:[^)=\s]\s*)*)(?:\)\s*)?=>/,Vm=/,/,Km=/(=.+)?(\s*)$/;function Ym(e,t){var n={};return Object.keys(e).forEach((t=>{var r,i=e[t],s=wm(i),o=!s&&1===i.length||s&&0===i.length;if(Array.isArray(i))r=[...i],i=r.pop(),n[t]=r.concat(r.length>0?a:i);else if(o)n[t]=i;else{if(r=function(e){const t=function(e){let t="",n=0,r=e.indexOf("*/");for(;n<e.length;)if("/"===e[n]&&"/"===e[n+1]){let t=e.indexOf("\n",n);n=-1===t?e.length:t}else if(-1!==r&&"/"===e[n]&&"*"===e[n+1]){let i=e.indexOf("*/",n);-1!==i?(n=i+2,r=e.indexOf("*/",n)):(t+=e[n],n++)}else t+=e[n],n++;return t}(e.toString());let n=t.match(Wm);if(n||(n=t.match(Gm)),!n)throw new Error("could not parse args in autoInject\nSource:\n"+t);let[,r]=n;return r.replace(/\s/g,"").split(Vm).map((e=>e.replace(Km,"").trim()))}(i),0===i.length&&!s&&0===r.length)throw new Error("autoInject task functions require explicit parameters.");s||r.pop(),n[t]=r.concat(a)}function a(e,t){var n=r.map((t=>e[t]));n.push(t),xm(i)(...n)}})),zm(n,t)}class Zm{constructor(){this.head=this.tail=null,this.length=0}removeLink(e){return e.prev?e.prev.next=e.next:this.head=e.next,e.next?e.next.prev=e.prev:this.tail=e.prev,e.prev=e.next=null,this.length-=1,e}empty(){for(;this.head;)this.shift();return this}insertAfter(e,t){t.prev=e,t.next=e.next,e.next?e.next.prev=t:this.tail=t,e.next=t,this.length+=1}insertBefore(e,t){t.prev=e.prev,t.next=e,e.prev?e.prev.next=t:this.head=t,e.prev=t,this.length+=1}unshift(e){this.head?this.insertBefore(this.head,e):Qm(this,e)}push(e){this.tail?this.insertAfter(this.tail,e):Qm(this,e)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var e=this.head;e;)yield e.data,e=e.next}remove(e){for(var t=this.head;t;){var{next:n}=t;e(t)&&this.removeLink(t),t=n}return this}}function Qm(e,t){e.length=1,e.head=e.tail=t}function Jm(e,t,n){if(null==t)t=1;else if(0===t)throw new RangeError("Concurrency must not be zero");var r=xm(e),i=0,s=[];const o={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function a(e,t){return e?t?void(o[e]=o[e].filter((e=>e!==t))):o[e]=[]:Object.keys(o).forEach((e=>o[e]=[]))}function c(e,...t){o[e].forEach((e=>e(...t)))}var l=!1;function u(e,t,n,r){if(null!=r&&"function"!=typeof r)throw new Error("task callback must be a function");var i,s;function o(e,...t){return e?n?s(e):i():t.length<=1?i(t[0]):void i(t)}m.started=!0;var a=m._createTaskItem(e,n?o:r||o);if(t?m._tasks.unshift(a):m._tasks.push(a),l||(l=!0,ym((()=>{l=!1,m.process()}))),n||!r)return new Promise(((e,t)=>{i=e,s=t}))}function p(e){return function(t,...n){i-=1;for(var r=0,o=e.length;r<o;r++){var a=e[r],l=s.indexOf(a);0===l?s.shift():l>0&&s.splice(l,1),a.callback(t,...n),null!=t&&c("error",t,a.data)}i<=m.concurrency-m.buffer&&c("unsaturated"),m.idle()&&c("drain"),m.process()}}function h(e){return!(0!==e.length||!m.idle())&&(ym((()=>c("drain"))),!0)}const d=e=>t=>{if(!t)return new Promise(((t,n)=>{!function(e,t){const n=(...r)=>{a(e,n),t(...r)};o[e].push(n)}(e,((e,r)=>{if(e)return n(e);t(r)}))}));a(e),function(e,t){o[e].push(t)}(e,t)};var f=!1,m={_tasks:new Zm,_createTaskItem:(e,t)=>({data:e,callback:t}),*[Symbol.iterator](){yield*m._tasks[Symbol.iterator]()},concurrency:t,payload:n,buffer:t/4,started:!1,paused:!1,push(e,t){if(Array.isArray(e)){if(h(e))return;return e.map((e=>u(e,!1,!1,t)))}return u(e,!1,!1,t)},pushAsync(e,t){if(Array.isArray(e)){if(h(e))return;return e.map((e=>u(e,!1,!0,t)))}return u(e,!1,!0,t)},kill(){a(),m._tasks.empty()},unshift(e,t){if(Array.isArray(e)){if(h(e))return;return e.map((e=>u(e,!0,!1,t)))}return u(e,!0,!1,t)},unshiftAsync(e,t){if(Array.isArray(e)){if(h(e))return;return e.map((e=>u(e,!0,!0,t)))}return u(e,!0,!0,t)},remove(e){m._tasks.remove(e)},process(){if(!f){for(f=!0;!m.paused&&i<m.concurrency&&m._tasks.length;){var e=[],t=[],n=m._tasks.length;m.payload&&(n=Math.min(n,m.payload));for(var o=0;o<n;o++){var a=m._tasks.shift();e.push(a),s.push(a),t.push(a.data)}i+=1,0===m._tasks.length&&c("empty"),i===m.concurrency&&c("saturated");var l=Rm(p(e));r(t,l)}f=!1}},length:()=>m._tasks.length,running:()=>i,workersList:()=>s,idle:()=>m._tasks.length+i===0,pause(){m.paused=!0},resume(){!1!==m.paused&&(m.paused=!1,ym(m.process))}};return Object.defineProperties(m,{saturated:{writable:!1,value:d("saturated")},unsaturated:{writable:!1,value:d("unsaturated")},empty:{writable:!1,value:d("empty")},drain:{writable:!1,value:d("drain")},error:{writable:!1,value:d("error")}}),m}function Xm(e,t){return Jm(e,1,t)}function eg(e,t,n){return Jm(e,t,n)}var tg=Em((function(e,t,n,r){r=Am(r);var i=xm(n);return Mm(e,((e,n,r)=>{i(t,e,((e,n)=>{t=n,r(e)}))}),(e=>r(e,t)))}),4);function ng(...e){var t=e.map(xm);return function(...e){var n=this,r=e[e.length-1];return"function"==typeof r?e.pop():r=$m(),tg(t,e,((e,t,r)=>{t.apply(n,e.concat(((e,...t)=>{r(e,t)})))}),((e,t)=>r(e,...t))),r[Hm]}}function rg(...e){return ng(...e.reverse())}var ig=Em((function(e,t,n,r){return Tm(Lm(t),e,n,r)}),4);var sg=Em((function(e,t,n,r){var i=xm(n);return ig(e,t,((e,t)=>{i(e,((e,...n)=>e?t(e):t(e,n)))}),((e,t)=>{for(var n=[],i=0;i<t.length;i++)t[i]&&(n=n.concat(...t[i]));return r(e,n)}))}),4);var og=Em((function(e,t,n){return sg(e,1/0,t,n)}),3);var ag=Em((function(e,t,n){return sg(e,1,t,n)}),3);function cg(...e){return function(...t){return t.pop()(null,...e)}}function lg(e,t){return(n,r,i,s)=>{var o,a=!1;const c=xm(i);n(r,((n,r,i)=>{c(n,((r,s)=>r||!1===r?i(r):e(s)&&!o?(a=!0,o=t(!0,n),i(null,km)):void i()))}),(e=>{if(e)return s(e);s(null,a?o:t(!1))}))}}var ug=Em((function(e,t,n){return lg((e=>e),((e,t)=>t))(jm,e,t,n)}),3);var pg=Em((function(e,t,n,r){return lg((e=>e),((e,t)=>t))(Lm(t),e,n,r)}),4);var hg=Em((function(e,t,n){return lg((e=>e),((e,t)=>t))(Lm(1),e,t,n)}),3);function dg(e){return(t,...n)=>xm(t)(...n,((t,...n)=>{"object"==typeof console&&(t?console.error&&console.error(t):console[e]&&n.forEach((t=>console[e](t))))}))}var fg=dg("dir");var mg=Em((function(e,t,n){n=Rm(n);var r,i=xm(e),s=xm(t);function o(e,...t){if(e)return n(e);!1!==e&&(r=t,s(...t,a))}function a(e,t){return e?n(e):!1!==e?t?void i(o):n(null,...r):void 0}return a(null,!0)}),3);function gg(e,t,n){const r=xm(t);return mg(e,((...e)=>{const t=e.pop();r(...e,((e,n)=>t(e,!n)))}),n)}function yg(e){return(t,n,r)=>e(t,r)}var vg=Em((function(e,t,n){return jm(e,yg(xm(t)),n)}),3);var bg=Em((function(e,t,n,r){return Lm(t)(e,yg(xm(n)),r)}),4);var _g=Em((function(e,t,n){return bg(e,1,t,n)}),3);function wg(e){return wm(e)?e:function(...t){var n=t.pop(),r=!0;t.push(((...e)=>{r?ym((()=>n(...e))):n(...e)})),e.apply(this,t),r=!1}}var xg=Em((function(e,t,n){return lg((e=>!e),(e=>!e))(jm,e,t,n)}),3);var Eg=Em((function(e,t,n,r){return lg((e=>!e),(e=>!e))(Lm(t),e,n,r)}),4);var Sg=Em((function(e,t,n){return lg((e=>!e),(e=>!e))(Mm,e,t,n)}),3);function Tg(e,t,n,r){var i=new Array(t.length);e(t,((e,t,r)=>{n(e,((e,n)=>{i[t]=!!n,r(e)}))}),(e=>{if(e)return r(e);for(var n=[],s=0;s<t.length;s++)i[s]&&n.push(t[s]);r(null,n)}))}function Dg(e,t,n,r){var i=[];e(t,((e,t,r)=>{n(e,((n,s)=>{if(n)return r(n);s&&i.push({index:t,value:e}),r(n)}))}),(e=>{if(e)return r(e);r(null,i.sort(((e,t)=>e.index-t.index)).map((e=>e.value)))}))}function kg(e,t,n,r){return(Dm(t)?Tg:Dg)(e,t,xm(n),r)}var Ag=Em((function(e,t,n){return kg(jm,e,t,n)}),3);var Cg=Em((function(e,t,n,r){return kg(Lm(t),e,n,r)}),4);var Rg=Em((function(e,t,n){return kg(Mm,e,t,n)}),3);var Og=Em((function(e,t){var n=Rm(t),r=xm(wg(e));return function e(t){if(t)return n(t);!1!==t&&r(e)}()}),2);var Lg=Em((function(e,t,n,r){var i=xm(n);return ig(e,t,((e,t)=>{i(e,((n,r)=>n?t(n):t(n,{key:r,val:e})))}),((e,t)=>{for(var n={},{hasOwnProperty:i}=Object.prototype,s=0;s<t.length;s++)if(t[s]){var{key:o}=t[s],{val:a}=t[s];i.call(n,o)?n[o].push(a):n[o]=[a]}return r(e,n)}))}),4);function Ig(e,t,n){return Lg(e,1/0,t,n)}function Pg(e,t,n){return Lg(e,1,t,n)}var Ng=dg("log");var jg=Em((function(e,t,n,r){r=Am(r);var i={},s=xm(n);return Lm(t)(e,((e,t,n)=>{s(e,t,((e,r)=>{if(e)return n(e);i[t]=r,n(e)}))}),(e=>r(e,i)))}),4);function Fg(e,t,n){return jg(e,1/0,t,n)}function Bg(e,t,n){return jg(e,1,t,n)}function Mg(e,t=e=>e){var n=Object.create(null),r=Object.create(null),i=xm(e),s=pm(((e,s)=>{var o=t(...e);o in n?ym((()=>s(null,...n[o]))):o in r?r[o].push(s):(r[o]=[s],i(...e,((e,...t)=>{e||(n[o]=t);var i=r[o];delete r[o];for(var s=0,a=i.length;s<a;s++)i[s](e,...t)})))}));return s.memo=n,s.unmemoized=e,s}var Ug=gm(fm?process.nextTick:dm?setImmediate:mm),qg=Em(((e,t,n)=>{var r=Dm(t)?[]:{};e(t,((e,t,n)=>{xm(e)(((e,...i)=>{i.length<2&&([i]=i),r[t]=i,n(e)}))}),(e=>n(e,r)))}),3);function Hg(e,t){return qg(jm,e,t)}function $g(e,t,n){return qg(Lm(t),e,n)}function zg(e,t){var n=xm(e);return Jm(((e,t)=>{n(e[0],t)}),t,1)}class Wg{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(e){let t;for(;e>0&&Kg(this.heap[e],this.heap[t=Vg(e)]);){let n=this.heap[e];this.heap[e]=this.heap[t],this.heap[t]=n,e=t}}percDown(e){let t;for(;(t=Gg(e))<this.heap.length&&(t+1<this.heap.length&&Kg(this.heap[t+1],this.heap[t])&&(t+=1),!Kg(this.heap[e],this.heap[t]));){let n=this.heap[e];this.heap[e]=this.heap[t],this.heap[t]=n,e=t}}push(e){e.pushCount=++this.pushCount,this.heap.push(e),this.percUp(this.heap.length-1)}unshift(e){return this.heap.push(e)}shift(){let[e]=this.heap;return this.heap[0]=this.heap[this.heap.length-1],this.heap.pop(),this.percDown(0),e}toArray(){return[...this]}*[Symbol.iterator](){for(let e=0;e<this.heap.length;e++)yield this.heap[e].data}remove(e){let t=0;for(let n=0;n<this.heap.length;n++)e(this.heap[n])||(this.heap[t]=this.heap[n],t++);this.heap.splice(t);for(let e=Vg(this.heap.length-1);e>=0;e--)this.percDown(e);return this}}function Gg(e){return 1+(e<<1)}function Vg(e){return(e+1>>1)-1}function Kg(e,t){return e.priority!==t.priority?e.priority<t.priority:e.pushCount<t.pushCount}function Yg(e,t){var n=zg(e,t),{push:r,pushAsync:i}=n;function s(e,t){return Array.isArray(e)?e.map((e=>({data:e,priority:t}))):{data:e,priority:t}}return n._tasks=new Wg,n._createTaskItem=({data:e,priority:t},n)=>({data:e,priority:t,callback:n}),n.push=function(e,t=0,n){return r(s(e,t),n)},n.pushAsync=function(e,t=0,n){return i(s(e,t),n)},delete n.unshift,delete n.unshiftAsync,n}var Zg=Em((function(e,t){if(t=Am(t),!Array.isArray(e))return t(new TypeError("First argument to race must be an array of functions"));if(!e.length)return t();for(var n=0,r=e.length;n<r;n++)xm(e[n])(t)}),2);function Qg(e,t,n,r){var i=[...e].reverse();return tg(i,t,n,r)}function Jg(e){var t=xm(e);return pm((function(e,n){return e.push(((e,...t)=>{let r={};if(e&&(r.error=e),t.length>0){var i=t;t.length<=1&&([i]=t),r.value=i}n(null,r)})),t.apply(this,e)}))}function Xg(e){var t;return Array.isArray(e)?t=e.map(Jg):(t={},Object.keys(e).forEach((n=>{t[n]=Jg.call(this,e[n])}))),t}function ey(e,t,n,r){const i=xm(n);return kg(e,t,((e,t)=>{i(e,((e,n)=>{t(e,!n)}))}),r)}var ty=Em((function(e,t,n){return ey(jm,e,t,n)}),3);var ny=Em((function(e,t,n,r){return ey(Lm(t),e,n,r)}),4);var ry=Em((function(e,t,n){return ey(Mm,e,t,n)}),3);function iy(e){return function(){return e}}const sy=5,oy=0;function ay(e,t,n){var r={times:sy,intervalFunc:iy(oy)};if(arguments.length<3&&"function"==typeof e?(n=t||$m(),t=e):(!function(e,t){if("object"==typeof t)e.times=+t.times||sy,e.intervalFunc="function"==typeof t.interval?t.interval:iy(+t.interval||oy),e.errorFilter=t.errorFilter;else{if("number"!=typeof t&&"string"!=typeof t)throw new Error("Invalid arguments for async.retry");e.times=+t||sy}}(r,e),n=n||$m()),"function"!=typeof t)throw new Error("Invalid arguments for async.retry");var i=xm(t),s=1;return function e(){i(((t,...i)=>{!1!==t&&(t&&s++<r.times&&("function"!=typeof r.errorFilter||r.errorFilter(t))?setTimeout(e,r.intervalFunc(s-1)):n(t,...i))}))}(),n[Hm]}function cy(e,t){t||(t=e,e=null);let n=e&&e.arity||t.length;wm(t)&&(n+=1);var r=xm(t);return pm(((t,i)=>{function s(e){r(...t,e)}return(t.length<n-1||null==i)&&(t.push(i),i=$m()),e?ay(e,s,i):ay(s,i),i[Hm]}))}function ly(e,t){return qg(Mm,e,t)}var uy=Em((function(e,t,n){return lg(Boolean,(e=>e))(jm,e,t,n)}),3);var py=Em((function(e,t,n,r){return lg(Boolean,(e=>e))(Lm(t),e,n,r)}),4);var hy=Em((function(e,t,n){return lg(Boolean,(e=>e))(Mm,e,t,n)}),3);var dy=Em((function(e,t,n){var r=xm(t);return Fm(e,((e,t)=>{r(e,((n,r)=>{if(n)return t(n);t(n,{value:e,criteria:r})}))}),((e,t)=>{if(e)return n(e);n(null,t.sort(i).map((e=>e.value)))}));function i(e,t){var n=e.criteria,r=t.criteria;return n<r?-1:n>r?1:0}}),3);function fy(e,t,n){var r=xm(e);return pm(((i,s)=>{var o,a=!1;i.push(((...e)=>{a||(s(...e),clearTimeout(o))})),o=setTimeout((function(){var t=e.name||"anonymous",r=new Error('Callback function "'+t+'" timed out.');r.code="ETIMEDOUT",n&&(r.info=n),a=!0,s(r)}),t),r(...i)}))}function my(e,t,n,r){var i=xm(n);return ig(function(e){for(var t=Array(e);e--;)t[e]=e;return t}(e),t,i,r)}function gy(e,t,n){return my(e,1/0,t,n)}function yy(e,t,n){return my(e,1,t,n)}function vy(e,t,n,r){arguments.length<=3&&"function"==typeof t&&(r=n,n=t,t=Array.isArray(e)?[]:{}),r=Am(r||$m());var i=xm(n);return jm(e,((e,n,r)=>{i(t,e,n,r)}),(e=>r(e,t))),r[Hm]}var by=Em((function(e,t){var n,r=null;return _g(e,((e,t)=>{xm(e)(((e,...i)=>{if(!1===e)return t(e);i.length<2?[n]=i:n=i,r=e,t(e?null:{})}))}),(()=>t(r,n)))}));function _y(e){return(...t)=>(e.unmemoized||e)(...t)}var wy=Em((function(e,t,n){n=Rm(n);var r=xm(t),i=xm(e),s=[];function o(e,...t){if(e)return n(e);s=t,!1!==e&&i(a)}function a(e,t){return e?n(e):!1!==e?t?void r(o):n(null,...s):void 0}return i(a)}),3);function xy(e,t,n){const r=xm(e);return wy((e=>r(((t,n)=>e(t,!n)))),t,n)}var Ey=Em((function(e,t){if(t=Am(t),!Array.isArray(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();var n=0;function r(t){xm(e[n++])(...t,Rm(i))}function i(i,...s){if(!1!==i)return i||n===e.length?t(i,...s):void r(s)}r([])})),Sy={apply:um,applyEach:Bm,applyEachSeries:qm,asyncify:vm,auto:zm,autoInject:Ym,cargo:Xm,cargoQueue:eg,compose:rg,concat:og,concatLimit:sg,concatSeries:ag,constant:cg,detect:ug,detectLimit:pg,detectSeries:hg,dir:fg,doUntil:gg,doWhilst:mg,each:vg,eachLimit:bg,eachOf:jm,eachOfLimit:Im,eachOfSeries:Mm,eachSeries:_g,ensureAsync:wg,every:xg,everyLimit:Eg,everySeries:Sg,filter:Ag,filterLimit:Cg,filterSeries:Rg,forever:Og,groupBy:Ig,groupByLimit:Lg,groupBySeries:Pg,log:Ng,map:Fm,mapLimit:ig,mapSeries:Um,mapValues:Fg,mapValuesLimit:jg,mapValuesSeries:Bg,memoize:Mg,nextTick:Ug,parallel:Hg,parallelLimit:$g,priorityQueue:Yg,queue:zg,race:Zg,reduce:tg,reduceRight:Qg,reflect:Jg,reflectAll:Xg,reject:ty,rejectLimit:ny,rejectSeries:ry,retry:ay,retryable:cy,seq:ng,series:ly,setImmediate:ym,some:uy,someLimit:py,someSeries:hy,sortBy:dy,timeout:fy,times:gy,timesLimit:my,timesSeries:yy,transform:vy,tryEach:by,unmemoize:_y,until:xy,waterfall:Ey,whilst:wy,all:xg,allLimit:Eg,allSeries:Sg,any:uy,anyLimit:py,anySeries:hy,find:ug,findLimit:pg,findSeries:hg,flatMap:og,flatMapLimit:sg,flatMapSeries:ag,forEach:vg,forEachSeries:_g,forEachLimit:bg,forEachOf:jm,forEachOfSeries:Mm,forEachOfLimit:Im,inject:tg,foldl:tg,foldr:Qg,select:Ag,selectLimit:Cg,selectSeries:Rg,wrapSync:vm,during:wy,doDuring:mg},Ty=H(Object.freeze({__proto__:null,all:xg,allLimit:Eg,allSeries:Sg,any:uy,anyLimit:py,anySeries:hy,apply:um,applyEach:Bm,applyEachSeries:qm,asyncify:vm,auto:zm,autoInject:Ym,cargo:Xm,cargoQueue:eg,compose:rg,concat:og,concatLimit:sg,concatSeries:ag,constant:cg,default:Sy,detect:ug,detectLimit:pg,detectSeries:hg,dir:fg,doDuring:mg,doUntil:gg,doWhilst:mg,during:wy,each:vg,eachLimit:bg,eachOf:jm,eachOfLimit:Im,eachOfSeries:Mm,eachSeries:_g,ensureAsync:wg,every:xg,everyLimit:Eg,everySeries:Sg,filter:Ag,filterLimit:Cg,filterSeries:Rg,find:ug,findLimit:pg,findSeries:hg,flatMap:og,flatMapLimit:sg,flatMapSeries:ag,foldl:tg,foldr:Qg,forEach:vg,forEachLimit:bg,forEachOf:jm,forEachOfLimit:Im,forEachOfSeries:Mm,forEachSeries:_g,forever:Og,groupBy:Ig,groupByLimit:Lg,groupBySeries:Pg,inject:tg,log:Ng,map:Fm,mapLimit:ig,mapSeries:Um,mapValues:Fg,mapValuesLimit:jg,mapValuesSeries:Bg,memoize:Mg,nextTick:Ug,parallel:Hg,parallelLimit:$g,priorityQueue:Yg,queue:zg,race:Zg,reduce:tg,reduceRight:Qg,reflect:Jg,reflectAll:Xg,reject:ty,rejectLimit:ny,rejectSeries:ry,retry:ay,retryable:cy,select:Ag,selectLimit:Cg,selectSeries:Rg,seq:ng,series:ly,setImmediate:ym,some:uy,someLimit:py,someSeries:hy,sortBy:dy,timeout:fy,times:gy,timesLimit:my,timesSeries:yy,transform:vy,tryEach:by,unmemoize:_y,until:xy,waterfall:Ey,whilst:wy,wrapSync:vm})),Dy={exports:{}},ky=D,Ay=process.cwd,Cy=null,Ry=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return Cy||(Cy=Ay.call(process)),Cy};try{process.cwd()}catch(e){}if("function"==typeof process.chdir){var Oy=process.chdir;process.chdir=function(e){Cy=null,Oy.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,Oy)}var Ly=function(e){ky.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&function(e){e.lchmod=function(t,n,r){e.open(t,ky.O_WRONLY|ky.O_SYMLINK,n,(function(t,i){t?r&&r(t):e.fchmod(i,n,(function(t){e.close(i,(function(e){r&&r(t||e)}))}))}))},e.lchmodSync=function(t,n){var r,i=e.openSync(t,ky.O_WRONLY|ky.O_SYMLINK,n),s=!0;try{r=e.fchmodSync(i,n),s=!1}finally{if(s)try{e.closeSync(i)}catch(e){}else e.closeSync(i)}return r}}(e);e.lutimes||function(e){ky.hasOwnProperty("O_SYMLINK")&&e.futimes?(e.lutimes=function(t,n,r,i){e.open(t,ky.O_SYMLINK,(function(t,s){t?i&&i(t):e.futimes(s,n,r,(function(t){e.close(s,(function(e){i&&i(t||e)}))}))}))},e.lutimesSync=function(t,n,r){var i,s=e.openSync(t,ky.O_SYMLINK),o=!0;try{i=e.futimesSync(s,n,r),o=!1}finally{if(o)try{e.closeSync(s)}catch(e){}else e.closeSync(s)}return i}):e.futimes&&(e.lutimes=function(e,t,n,r){r&&process.nextTick(r)},e.lutimesSync=function(){})}(e);e.chown=r(e.chown),e.fchown=r(e.fchown),e.lchown=r(e.lchown),e.chmod=t(e.chmod),e.fchmod=t(e.fchmod),e.lchmod=t(e.lchmod),e.chownSync=i(e.chownSync),e.fchownSync=i(e.fchownSync),e.lchownSync=i(e.lchownSync),e.chmodSync=n(e.chmodSync),e.fchmodSync=n(e.fchmodSync),e.lchmodSync=n(e.lchmodSync),e.stat=s(e.stat),e.fstat=s(e.fstat),e.lstat=s(e.lstat),e.statSync=o(e.statSync),e.fstatSync=o(e.fstatSync),e.lstatSync=o(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(e,t,n){n&&process.nextTick(n)},e.lchmodSync=function(){});e.chown&&!e.lchown&&(e.lchown=function(e,t,n,r){r&&process.nextTick(r)},e.lchownSync=function(){});"win32"===Ry&&(e.rename="function"!=typeof e.rename?e.rename:function(t){function n(n,r,i){var s=Date.now(),o=0;t(n,r,(function a(c){if(c&&("EACCES"===c.code||"EPERM"===c.code||"EBUSY"===c.code)&&Date.now()-s<6e4)return setTimeout((function(){e.stat(r,(function(e,s){e&&"ENOENT"===e.code?t(n,r,a):i(c)}))}),o),void(o<100&&(o+=10));i&&i(c)}))}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n}(e.rename));function t(t){return t?function(n,r,i){return t.call(e,n,r,(function(e){a(e)&&(e=null),i&&i.apply(this,arguments)}))}:t}function n(t){return t?function(n,r){try{return t.call(e,n,r)}catch(e){if(!a(e))throw e}}:t}function r(t){return t?function(n,r,i,s){return t.call(e,n,r,i,(function(e){a(e)&&(e=null),s&&s.apply(this,arguments)}))}:t}function i(t){return t?function(n,r,i){try{return t.call(e,n,r,i)}catch(e){if(!a(e))throw e}}:t}function s(t){return t?function(n,r,i){function s(e,t){t&&(t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296)),i&&i.apply(this,arguments)}return"function"==typeof r&&(i=r,r=null),r?t.call(e,n,r,s):t.call(e,n,s)}:t}function o(t){return t?function(n,r){var i=r?t.call(e,n,r):t.call(e,n);return i&&(i.uid<0&&(i.uid+=4294967296),i.gid<0&&(i.gid+=4294967296)),i}:t}function a(e){return!e||("ENOSYS"===e.code||!(process.getuid&&0===process.getuid()||"EINVAL"!==e.code&&"EPERM"!==e.code))}e.read="function"!=typeof e.read?e.read:function(t){function n(n,r,i,s,o,a){var c;if(a&&"function"==typeof a){var l=0;c=function(u,p,h){if(u&&"EAGAIN"===u.code&&l<10)return l++,t.call(e,n,r,i,s,o,c);a.apply(this,arguments)}}return t.call(e,n,r,i,s,o,c)}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n}(e.read),e.readSync="function"!=typeof e.readSync?e.readSync:(c=e.readSync,function(t,n,r,i,s){for(var o=0;;)try{return c.call(e,t,n,r,i,s)}catch(e){if("EAGAIN"===e.code&&o<10){o++;continue}throw e}});var c};var Iy=h.Stream,Py=function(e){return{ReadStream:function t(n,r){if(!(this instanceof t))return new t(n,r);Iy.call(this);var i=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,r=r||{};for(var s=Object.keys(r),o=0,a=s.length;o<a;o++){var c=s[o];this[c]=r[c]}this.encoding&&this.setEncoding(this.encoding);if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(void 0===this.end)this.end=1/0;else if("number"!=typeof this.end)throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(null!==this.fd)return void process.nextTick((function(){i._read()}));e.open(this.path,this.flags,this.mode,(function(e,t){if(e)return i.emit("error",e),void(i.readable=!1);i.fd=t,i.emit("open",t),i._read()}))},WriteStream:function t(n,r){if(!(this instanceof t))return new t(n,r);Iy.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,r=r||{};for(var i=Object.keys(r),s=0,o=i.length;s<o;s++){var a=i[s];this[a]=r[a]}if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],null===this.fd&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}};var Ny=function(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Object)var t={__proto__:jy(e)};else t=Object.create(null);return Object.getOwnPropertyNames(e).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})),t},jy=Object.getPrototypeOf||function(e){return e.__proto__};var Fy,By,My=s,Uy=Ly,qy=Py,Hy=Ny,$y=y;function zy(e,t){Object.defineProperty(e,Fy,{get:function(){return t}})}"function"==typeof Symbol&&"function"==typeof Symbol.for?(Fy=Symbol.for("graceful-fs.queue"),By=Symbol.for("graceful-fs.previous")):(Fy="___graceful-fs.queue",By="___graceful-fs.previous");var Wy=function(){};if($y.debuglog?Wy=$y.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(Wy=function(){var e=$y.format.apply($y,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: "),console.error(e)}),!My[Fy]){var Gy=U[Fy]||[];zy(My,Gy),My.close=function(e){function t(t,n){return e.call(My,t,(function(e){e||Qy(),"function"==typeof n&&n.apply(this,arguments)}))}return Object.defineProperty(t,By,{value:e}),t}(My.close),My.closeSync=function(e){function t(t){e.apply(My,arguments),Qy()}return Object.defineProperty(t,By,{value:e}),t}(My.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",(function(){Wy(My[Fy]),u.equal(My[Fy].length,0)}))}U[Fy]||zy(U,My[Fy]);var Vy,Ky=Yy(Hy(My));function Yy(e){Uy(e),e.gracefulify=Yy,e.createReadStream=function(t,n){return new e.ReadStream(t,n)},e.createWriteStream=function(t,n){return new e.WriteStream(t,n)};var t=e.readFile;e.readFile=function(e,n,r){"function"==typeof n&&(r=n,n=null);return function e(n,r,i,s){return t(n,r,(function(t){!t||"EMFILE"!==t.code&&"ENFILE"!==t.code?"function"==typeof i&&i.apply(this,arguments):Zy([e,[n,r,i],t,s||Date.now(),Date.now()])}))}(e,n,r)};var n=e.writeFile;e.writeFile=function(e,t,r,i){"function"==typeof r&&(i=r,r=null);return function e(t,r,i,s,o){return n(t,r,i,(function(n){!n||"EMFILE"!==n.code&&"ENFILE"!==n.code?"function"==typeof s&&s.apply(this,arguments):Zy([e,[t,r,i,s],n,o||Date.now(),Date.now()])}))}(e,t,r,i)};var r=e.appendFile;r&&(e.appendFile=function(e,t,n,i){"function"==typeof n&&(i=n,n=null);return function e(t,n,i,s,o){return r(t,n,i,(function(r){!r||"EMFILE"!==r.code&&"ENFILE"!==r.code?"function"==typeof s&&s.apply(this,arguments):Zy([e,[t,n,i,s],r,o||Date.now(),Date.now()])}))}(e,t,n,i)});var i=e.copyFile;i&&(e.copyFile=function(e,t,n,r){"function"==typeof n&&(r=n,n=0);return function e(t,n,r,s,o){return i(t,n,r,(function(i){!i||"EMFILE"!==i.code&&"ENFILE"!==i.code?"function"==typeof s&&s.apply(this,arguments):Zy([e,[t,n,r,s],i,o||Date.now(),Date.now()])}))}(e,t,n,r)});var s=e.readdir;e.readdir=function(e,t,n){"function"==typeof t&&(n=t,t=null);var r=o.test(process.version)?function(e,t,n,r){return s(e,i(e,t,n,r))}:function(e,t,n,r){return s(e,t,i(e,t,n,r))};return r(e,t,n);function i(e,t,n,i){return function(s,o){!s||"EMFILE"!==s.code&&"ENFILE"!==s.code?(o&&o.sort&&o.sort(),"function"==typeof n&&n.call(this,s,o)):Zy([r,[e,t,n],s,i||Date.now(),Date.now()])}}};var o=/^v[0-5]\./;if("v0.8"===process.version.substr(0,4)){var a=qy(e);h=a.ReadStream,d=a.WriteStream}var c=e.ReadStream;c&&(h.prototype=Object.create(c.prototype),h.prototype.open=function(){var e=this;m(e.path,e.flags,e.mode,(function(t,n){t?(e.autoClose&&e.destroy(),e.emit("error",t)):(e.fd=n,e.emit("open",n),e.read())}))});var l=e.WriteStream;l&&(d.prototype=Object.create(l.prototype),d.prototype.open=function(){var e=this;m(e.path,e.flags,e.mode,(function(t,n){t?(e.destroy(),e.emit("error",t)):(e.fd=n,e.emit("open",n))}))}),Object.defineProperty(e,"ReadStream",{get:function(){return h},set:function(e){h=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return d},set:function(e){d=e},enumerable:!0,configurable:!0});var u=h;Object.defineProperty(e,"FileReadStream",{get:function(){return u},set:function(e){u=e},enumerable:!0,configurable:!0});var p=d;function h(e,t){return this instanceof h?(c.apply(this,arguments),this):h.apply(Object.create(h.prototype),arguments)}function d(e,t){return this instanceof d?(l.apply(this,arguments),this):d.apply(Object.create(d.prototype),arguments)}Object.defineProperty(e,"FileWriteStream",{get:function(){return p},set:function(e){p=e},enumerable:!0,configurable:!0});var f=e.open;function m(e,t,n,r){return"function"==typeof n&&(r=n,n=null),function e(t,n,r,i,s){return f(t,n,r,(function(o,a){!o||"EMFILE"!==o.code&&"ENFILE"!==o.code?"function"==typeof i&&i.apply(this,arguments):Zy([e,[t,n,r,i],o,s||Date.now(),Date.now()])}))}(e,t,n,r)}return e.open=m,e}function Zy(e){Wy("ENQUEUE",e[0].name,e[1]),My[Fy].push(e),Jy()}function Qy(){for(var e=Date.now(),t=0;t<My[Fy].length;++t)My[Fy][t].length>2&&(My[Fy][t][3]=e,My[Fy][t][4]=e);Jy()}function Jy(){if(clearTimeout(Vy),Vy=void 0,0!==My[Fy].length){var e=My[Fy].shift(),t=e[0],n=e[1],r=e[2],i=e[3],s=e[4];if(void 0===i)Wy("RETRY",t.name,n),t.apply(null,n);else if(Date.now()-i>=6e4){Wy("TIMEOUT",t.name,n);var o=n.pop();"function"==typeof o&&o.call(null,r)}else{var a=Date.now()-s,c=Math.max(s-i,1);a>=Math.min(1.2*c,100)?(Wy("RETRY",t.name,n),t.apply(null,n.concat([i]))):My[Fy].push(e)}void 0===Vy&&(Vy=setTimeout(Jy,0))}}process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!My.__patched&&(Ky=Yy(My),My.__patched=!0);const Xy=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;Xy.writable=e=>Xy(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState,Xy.readable=e=>Xy(e)&&!1!==e.readable&&"function"==typeof e._read&&"object"==typeof e._readableState,Xy.duplex=e=>Xy.writable(e)&&Xy.readable(e),Xy.transform=e=>Xy.duplex(e)&&"function"==typeof e._transform;var ev,tv,nv,rv,iv,sv=Xy,ov={exports:{}},av={exports:{}};function cv(){if(ev)return av.exports;return ev=1,"undefined"==typeof process||!process.version||0===process.version.indexOf("v0.")||0===process.version.indexOf("v1.")&&0!==process.version.indexOf("v1.8.")?av.exports={nextTick:function(e,t,n,r){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var i,s,o=arguments.length;switch(o){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick((function(){e.call(null,t)}));case 3:return process.nextTick((function(){e.call(null,t,n)}));case 4:return process.nextTick((function(){e.call(null,t,n,r)}));default:for(i=new Array(o-1),s=0;s<i.length;)i[s++]=arguments[s];return process.nextTick((function(){e.apply(null,i)}))}}}:av.exports=process,av.exports}function lv(){return iv?rv:(iv=1,rv=h)}var uv,pv={exports:{}};function hv(){return uv||(uv=1,function(e,t){var n=v,r=n.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return r(e,t,n)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=s),i(r,s),s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return r(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=r(e);return void 0!==t?"string"==typeof n?i.fill(t,n):i.fill(t):i.fill(0),i},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}}(pv,pv.exports)),pv.exports}var dv,fv={};function mv(){if(dv)return fv;function e(e){return Object.prototype.toString.call(e)}return dv=1,fv.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===e(t)},fv.isBoolean=function(e){return"boolean"==typeof e},fv.isNull=function(e){return null===e},fv.isNullOrUndefined=function(e){return null==e},fv.isNumber=function(e){return"number"==typeof e},fv.isString=function(e){return"string"==typeof e},fv.isSymbol=function(e){return"symbol"==typeof e},fv.isUndefined=function(e){return void 0===e},fv.isRegExp=function(t){return"[object RegExp]"===e(t)},fv.isObject=function(e){return"object"==typeof e&&null!==e},fv.isDate=function(t){return"[object Date]"===e(t)},fv.isError=function(t){return"[object Error]"===e(t)||t instanceof Error},fv.isFunction=function(e){return"function"==typeof e},fv.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},fv.isBuffer=Buffer.isBuffer,fv}var gv,yv={exports:{}},vv={exports:{}};try{var bv=require("util");if("function"!=typeof bv.inherits)throw"";yv.exports=bv.inherits}catch(e){yv.exports=(gv||(gv=1,"function"==typeof Object.create?vv.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:vv.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}),vv.exports)}var _v,wv,xv,Ev,Sv,Tv,Dv,kv,Av,Cv=yv.exports,Rv={exports:{}};function Ov(){return _v||(_v=1,function(e){var t=hv().Buffer,n=y;function r(e,t,n){e.copy(t,n)}e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return t.alloc(0);for(var n=t.allocUnsafe(e>>>0),i=this.head,s=0;i;)r(i.data,n,s),s+=i.data.length,i=i.next;return n},e}(),n&&n.inspect&&n.inspect.custom&&(e.exports.prototype[n.inspect.custom]=function(){var e=n.inspect({length:this.length});return this.constructor.name+" "+e})}(Rv)),Rv.exports}function Lv(){if(xv)return wv;xv=1;var e=cv();function t(e,t){e.emit("error",t)}return wv={destroy:function(n,r){var i=this,s=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return s||o?(r?r(n):n&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(t,this,n)):e.nextTick(t,this,n)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(n||null,(function(n){!r&&n?i._writableState?i._writableState.errorEmitted||(i._writableState.errorEmitted=!0,e.nextTick(t,i,n)):e.nextTick(t,i,n):r&&r(n)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}}function Iv(){if(Dv)return Tv;Dv=1;var e=cv();function t(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}Tv=d;var n,r=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:e.nextTick;d.WritableState=h;var i=Object.create(mv());i.inherits=Cv;var s={deprecate:Sv?Ev:(Sv=1,Ev=y.deprecate)},o=lv(),a=hv().Buffer,c=(void 0!==U?U:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var l,u=Lv();function p(){}function h(i,s){n=n||Pv(),i=i||{};var o=s instanceof n;this.objectMode=!!i.objectMode,o&&(this.objectMode=this.objectMode||!!i.writableObjectMode);var a=i.highWaterMark,c=i.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=a||0===a?a:o&&(c||0===c)?c:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var u=!1===i.decodeStrings;this.decodeStrings=!u,this.defaultEncoding=i.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,n){var i=t._writableState,s=i.sync,o=i.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(i),n)!function(t,n,r,i,s){--n.pendingcb,r?(e.nextTick(s,i),e.nextTick(_,t,n),t._writableState.errorEmitted=!0,t.emit("error",i)):(s(i),t._writableState.errorEmitted=!0,t.emit("error",i),_(t,n))}(t,i,s,n,o);else{var a=v(i);a||i.corked||i.bufferProcessing||!i.bufferedRequest||g(t,i),s?r(m,t,i,a,o):m(t,i,a,o)}}(s,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}function d(e){if(n=n||Pv(),!(l.call(d,this)||this instanceof n))return new d(e);this._writableState=new h(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),o.call(this)}function f(e,t,n,r,i,s,o){t.writelen=r,t.writecb=o,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function m(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),_(e,t)}function g(e,n){n.bufferProcessing=!0;var r=n.bufferedRequest;if(e._writev&&r&&r.next){var i=n.bufferedRequestCount,s=new Array(i),o=n.corkedRequestsFree;o.entry=r;for(var a=0,c=!0;r;)s[a]=r,r.isBuf||(c=!1),r=r.next,a+=1;s.allBuffers=c,f(e,n,!0,n.length,s,"",o.finish),n.pendingcb++,n.lastBufferedRequest=null,o.next?(n.corkedRequestsFree=o.next,o.next=null):n.corkedRequestsFree=new t(n),n.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,p=r.callback;if(f(e,n,!1,n.objectMode?1:l.length,l,u,p),r=r.next,n.bufferedRequestCount--,n.writing)break}null===r&&(n.lastBufferedRequest=null)}n.bufferedRequest=r,n.bufferProcessing=!1}function v(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function b(e,t){e._final((function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),_(e,t)}))}function _(t,n){var r=v(n);return r&&(!function(t,n){n.prefinished||n.finalCalled||("function"==typeof t._final?(n.pendingcb++,n.finalCalled=!0,e.nextTick(b,t,n)):(n.prefinished=!0,t.emit("prefinish")))}(t,n),0===n.pendingcb&&(n.finished=!0,t.emit("finish"))),r}return i.inherits(d,o),h.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(h.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(l=Function.prototype[Symbol.hasInstance],Object.defineProperty(d,Symbol.hasInstance,{value:function(e){return!!l.call(this,e)||this===d&&(e&&e._writableState instanceof h)}})):l=function(e){return e instanceof this},d.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},d.prototype.write=function(t,n,r){var i,s=this._writableState,o=!1,l=!s.objectMode&&(i=t,a.isBuffer(i)||i instanceof c);return l&&!a.isBuffer(t)&&(t=function(e){return a.from(e)}(t)),"function"==typeof n&&(r=n,n=null),l?n="buffer":n||(n=s.defaultEncoding),"function"!=typeof r&&(r=p),s.ended?function(t,n){var r=new Error("write after end");t.emit("error",r),e.nextTick(n,r)}(this,r):(l||function(t,n,r,i){var s=!0,o=!1;return null===r?o=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||n.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(t.emit("error",o),e.nextTick(i,o),s=!1),s}(this,s,t,r))&&(s.pendingcb++,o=function(e,t,n,r,i,s){if(!n){var o=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=a.from(t,n));return t}(t,r,i);r!==o&&(n=!0,i="buffer",r=o)}var c=t.objectMode?1:r.length;t.length+=c;var l=t.length<t.highWaterMark;l||(t.needDrain=!0);if(t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:s,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else f(e,t,!1,c,r,i,s);return l}(this,s,l,t,n,r)),o},d.prototype.cork=function(){this._writableState.corked++},d.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||g(this,e))},d.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),d.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},d.prototype._writev=null,d.prototype.end=function(t,n,r){var i=this._writableState;"function"==typeof t?(r=t,t=null,n=null):"function"==typeof n&&(r=n,n=null),null!=t&&this.write(t,n),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,n,r){n.ending=!0,_(t,n),r&&(n.finished?e.nextTick(r):t.once("finish",r));n.ended=!0,t.writable=!1}(this,i,r)},Object.defineProperty(d.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),d.prototype.destroy=u.destroy,d.prototype._undestroy=u.undestroy,d.prototype._destroy=function(e,t){this.end(),t(e)},Tv}function Pv(){if(Av)return kv;Av=1;var e=cv(),t=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};kv=c;var n=Object.create(mv());n.inherits=Cv;var r=zv(),i=Iv();n.inherits(c,r);for(var s=t(i.prototype),o=0;o<s.length;o++){var a=s[o];c.prototype[a]||(c.prototype[a]=i.prototype[a])}function c(e){if(!(this instanceof c))return new c(e);r.call(this,e),i.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",l)}function l(){this.allowHalfOpen||this._writableState.ended||e.nextTick(u,this)}function u(e){e.end()}return Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),c.prototype._destroy=function(t,n){this.push(null),this.end(),e.nextTick(n,t)},kv}var Nv,jv,Fv,Bv,Mv,Uv,qv,Hv={};function $v(){if(Nv)return Hv;Nv=1;var e=hv().Buffer,t=e.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function n(n){var r;switch(this.encoding=function(n){var r=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(n);if("string"!=typeof r&&(e.isEncoding===t||!t(n)))throw new Error("Unknown encoding: "+n);return r||n}(n),this.encoding){case"utf16le":this.text=s,this.end=o,r=4;break;case"utf8":this.fillLast=i,r=4;break;case"base64":this.text=a,this.end=c,r=3;break;default:return this.write=l,void(this.end=u)}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(r)}function r(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function i(e){var t=this.lastTotal-this.lastNeed,n=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function s(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function o(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function a(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function l(e){return e.toString(this.encoding)}function u(e){return e&&e.length?this.write(e):""}return Hv.StringDecoder=n,n.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},n.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},n.prototype.text=function(e,t){var n=function(e,t,n){var i=t.length-1;if(i<n)return 0;var s=r(t[i]);if(s>=0)return s>0&&(e.lastNeed=s-1),s;if(--i<n||-2===s)return 0;if(s=r(t[i]),s>=0)return s>0&&(e.lastNeed=s-2),s;if(--i<n||-2===s)return 0;if(s=r(t[i]),s>=0)return s>0&&(2===s?s=0:e.lastNeed=s-3),s;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var i=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},n.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length},Hv}function zv(){if(Fv)return jv;Fv=1;var e=cv();jv=g;var t,n=function(){if(nv)return tv;nv=1;var e={}.toString;return tv=Array.isArray||function(t){return"[object Array]"==e.call(t)}}();g.ReadableState=m,p.EventEmitter;var r=function(e,t){return e.listeners(t).length},i=lv(),s=hv().Buffer,o=(void 0!==U?U:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var a=Object.create(mv());a.inherits=Cv;var c=y,l=void 0;l=c&&c.debuglog?c.debuglog("stream"):function(){};var u,h=Ov(),d=Lv();a.inherits(g,i);var f=["error","close","destroy","pause","resume"];function m(e,n){e=e||{};var r=n instanceof(t=t||Pv());this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,s=e.readableHighWaterMark,o=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(s||0===s)?s:o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new h,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(u||(u=$v().StringDecoder),this.decoder=new u(e.encoding),this.encoding=e.encoding)}function g(e){if(t=t||Pv(),!(this instanceof g))return new g(e);this._readableState=new m(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),i.call(this)}function v(e,t,n,r,i){var a,c=e._readableState;null===t?(c.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,x(e)}(e,c)):(i||(a=function(e,t){var n;r=t,s.isBuffer(r)||r instanceof o||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));var r;return n}(c,t)),a?e.emit("error",a):c.objectMode||t&&t.length>0?("string"==typeof t||c.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),r?c.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):b(e,c,t,!0):c.ended?e.emit("error",new Error("stream.push() after EOF")):(c.reading=!1,c.decoder&&!n?(t=c.decoder.write(t),c.objectMode||0!==t.length?b(e,c,t,!1):S(e,c)):b(e,c,t,!1))):r||(c.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(c)}function b(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&x(e)),S(e,t)}Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),g.prototype.destroy=d.destroy,g.prototype._undestroy=d.undestroy,g.prototype._destroy=function(e,t){this.push(null),t(e)},g.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=s.from(e,t),t=""),n=!0),v(this,e,t,!1,n)},g.prototype.unshift=function(e){return v(this,e,null,!0,!1)},g.prototype.isPaused=function(){return!1===this._readableState.flowing},g.prototype.setEncoding=function(e){return u||(u=$v().StringDecoder),this._readableState.decoder=new u(e),this._readableState.encoding=e,this};var _=8388608;function w(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=_?e=_:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function x(t){var n=t._readableState;n.needReadable=!1,n.emittedReadable||(l("emitReadable",n.flowing),n.emittedReadable=!0,n.sync?e.nextTick(E,t):E(t))}function E(e){l("emit readable"),e.emit("readable"),A(e)}function S(t,n){n.readingMore||(n.readingMore=!0,e.nextTick(T,t,n))}function T(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(l("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function D(e){l("readable nexttick read 0"),e.read(0)}function k(e,t){t.reading||(l("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),A(e),t.flowing&&!t.reading&&e.read(0)}function A(e){var t=e._readableState;for(l("flow",t.flowing);t.flowing&&null!==e.read(););}function C(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?function(e,t){var n=t.head,r=1,i=n.data;e-=i.length;for(;n=n.next;){var s=n.data,o=e>s.length?s.length:e;if(o===s.length?i+=s:i+=s.slice(0,e),0===(e-=o)){o===s.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=s.slice(o));break}++r}return t.length-=r,i}(e,t):function(e,t){var n=s.allocUnsafe(e),r=t.head,i=1;r.data.copy(n),e-=r.data.length;for(;r=r.next;){var o=r.data,a=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,a),0===(e-=a)){a===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++i}return t.length-=i,n}(e,t);return r}(e,t.buffer,t.decoder),n);var n}function R(t){var n=t._readableState;if(n.length>0)throw new Error('"endReadable()" called on non-empty stream');n.endEmitted||(n.ended=!0,e.nextTick(O,n,t))}function O(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function L(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}return g.prototype.read=function(e){l("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return l("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?R(this):x(this),null;if(0===(e=w(e,t))&&t.ended)return 0===t.length&&R(this),null;var r,i=t.needReadable;return l("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&l("length less than watermark",i=!0),t.ended||t.reading?l("reading or ended",i=!1):i&&(l("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=w(n,t))),null===(r=e>0?C(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&R(this)),null!==r&&this.emit("data",r),r},g.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},g.prototype.pipe=function(t,i){var s=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,l("pipe count=%d opts=%j",o.pipesCount,i);var a=(!i||!1!==i.end)&&t!==process.stdout&&t!==process.stderr?u:v;function c(e,n){l("onunpipe"),e===s&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,l("cleanup"),t.removeListener("close",g),t.removeListener("finish",y),t.removeListener("drain",p),t.removeListener("error",m),t.removeListener("unpipe",c),s.removeListener("end",u),s.removeListener("end",v),s.removeListener("data",f),h=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||p())}function u(){l("onend"),t.end()}o.endEmitted?e.nextTick(a):s.once("end",a),t.on("unpipe",c);var p=function(e){return function(){var t=e._readableState;l("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&r(e,"data")&&(t.flowing=!0,A(e))}}(s);t.on("drain",p);var h=!1;var d=!1;function f(e){l("ondata"),d=!1,!1!==t.write(e)||d||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==L(o.pipes,t))&&!h&&(l("false write response, pause",o.awaitDrain),o.awaitDrain++,d=!0),s.pause())}function m(e){l("onerror",e),v(),t.removeListener("error",m),0===r(t,"error")&&t.emit("error",e)}function g(){t.removeListener("finish",y),v()}function y(){l("onfinish"),t.removeListener("close",g),v()}function v(){l("unpipe"),s.unpipe(t)}return s.on("data",f),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?n(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(t,"error",m),t.once("close",g),t.once("finish",y),t.emit("pipe",s),o.flowing||(l("pipe resume"),s.resume()),t},g.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<i;s++)r[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=L(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},g.prototype.on=function(t,n){var r=i.prototype.on.call(this,t,n);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var s=this._readableState;s.endEmitted||s.readableListening||(s.readableListening=s.needReadable=!0,s.emittedReadable=!1,s.reading?s.length&&x(this):e.nextTick(D,this))}return r},g.prototype.addListener=g.prototype.on,g.prototype.resume=function(){var t=this._readableState;return t.flowing||(l("resume"),t.flowing=!0,function(t,n){n.resumeScheduled||(n.resumeScheduled=!0,e.nextTick(k,t,n))}(this,t)),this},g.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this},g.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(l("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(l("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var s=0;s<f.length;s++)e.on(f[s],this.emit.bind(this,f[s]));return this._read=function(t){l("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(g.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),g._fromList=C,jv}function Wv(){if(Mv)return Bv;Mv=1,Bv=r;var e=Pv(),t=Object.create(mv());function n(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function r(t){if(!(this instanceof r))return new r(t);e.call(this,t),this._transformState={afterTransform:n.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",i)}function i(){var e=this;"function"==typeof this._flush?this._flush((function(t,n){s(e,t,n)})):s(this,null,null)}function s(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}return t.inherits=Cv,t.inherits(r,e),r.prototype.push=function(t,n){return this._transformState.needTransform=!1,e.prototype.push.call(this,t,n)},r.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},r.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},r.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},r.prototype._destroy=function(t,n){var r=this;e.prototype._destroy.call(this,t,(function(e){n(e),r.emit("close")}))},Bv}!function(e,t){var n=h;"disable"===process.env.READABLE_STREAM&&n?(e.exports=n,(t=e.exports=n.Readable).Readable=n.Readable,t.Writable=n.Writable,t.Duplex=n.Duplex,t.Transform=n.Transform,t.PassThrough=n.PassThrough,t.Stream=n):((t=e.exports=zv()).Stream=n||t,t.Readable=t,t.Writable=Iv(),t.Duplex=Pv(),t.Transform=Wv(),t.PassThrough=function(){if(qv)return Uv;qv=1,Uv=n;var e=Wv(),t=Object.create(mv());function n(t){if(!(this instanceof n))return new n(t);e.call(this,t)}return t.inherits=Cv,t.inherits(n,e),n.prototype._transform=function(e,t,n){n(null,e)},Uv}())}(ov,ov.exports);var Gv=ov.exports.PassThrough,Vv=y,Kv=Gv,Yv={Readable:Qv,Writable:Jv};function Zv(e,t,n){e[t]=function(){return delete e[t],n.apply(this,arguments),this[t].apply(this,arguments)}}function Qv(e,t){if(!(this instanceof Qv))return new Qv(e,t);Kv.call(this,t),Zv(this,"_read",(function(){var n=e.call(this,t),r=this.emit.bind(this,"error");n.on("error",r),n.pipe(this)})),this.emit("readable")}function Jv(e,t){if(!(this instanceof Jv))return new Jv(e,t);Kv.call(this,t),Zv(this,"_write",(function(){var n=e.call(this,t),r=this.emit.bind(this,"error");n.on("error",r),this.pipe(n)})),this.emit("writable")}
|
|
17
|
+
!function(e){var t=_u,n=o.extname,r=/^\s*([^;\s]*)(?:;|\s|$)/,i=/^text\//i;function s(e){if(!e||"string"!=typeof e)return!1;var n=r.exec(e),s=n&&t[n[1].toLowerCase()];return s&&s.charset?s.charset:!(!n||!i.test(n[1]))&&"UTF-8"}e.charset=s,e.charsets={lookup:s},e.contentType=function(t){if(!t||"string"!=typeof t)return!1;var n=-1===t.indexOf("/")?e.lookup(t):t;if(!n)return!1;if(-1===n.indexOf("charset")){var r=e.charset(n);r&&(n+="; charset="+r.toLowerCase())}return n},e.extension=function(t){if(!t||"string"!=typeof t)return!1;var n=r.exec(t),i=n&&e.extensions[n[1].toLowerCase()];if(!i||!i.length)return!1;return i[0]},e.extensions=Object.create(null),e.lookup=function(t){if(!t||"string"!=typeof t)return!1;var r=n("x."+t).toLowerCase().substr(1);if(!r)return!1;return e.types[r]||!1},e.types=Object.create(null),function(e,n){var r=["nginx","apache",void 0,"iana"];Object.keys(t).forEach((function(i){var s=t[i],o=s.extensions;if(o&&o.length){e[i]=o;for(var a=0;a<o.length;a++){var c=o[a];if(n[c]){var l=r.indexOf(t[n[c]].source),u=r.indexOf(s.source);if("application/octet-stream"!==n[c]&&(l>u||l===u&&"application/"===n[c].substr(0,12)))continue}n[c]=i}}}))}(e.extensions,e.types)}(bu);var wu=function(e){var t="function"==typeof setImmediate?setImmediate:"object"==typeof process&&"function"==typeof process.nextTick?process.nextTick:null;t?t(e):setTimeout(e,0)};var xu=wu,Eu=function(e){var t=!1;return xu((function(){t=!0})),function(n,r){t?e(n,r):xu((function(){e(n,r)}))}};var Su=function(e){Object.keys(e.jobs).forEach(Tu.bind(e)),e.jobs={}};function Tu(e){"function"==typeof this.jobs[e]&&this.jobs[e]()}var Du=Eu,ku=Su,Au=function(e,t,n,r){var i=n.keyedList?n.keyedList[n.index]:n.index;n.jobs[i]=function(e,t,n,r){var i;i=2==e.length?e(n,Du(r)):e(n,t,Du(r));return i}(t,i,e[i],(function(e,t){i in n.jobs&&(delete n.jobs[i],e?ku(n):n.results[i]=t,r(e,n.results))}))};var Cu=function(e,t){var n=!Array.isArray(e),r={index:0,keyedList:n||t?Object.keys(e):null,jobs:{},results:n?{}:[],size:n?Object.keys(e).length:e.length};t&&r.keyedList.sort(n?t:function(n,r){return t(e[n],e[r])});return r};var Ru=Su,Ou=Eu,Lu=function(e){if(!Object.keys(this.jobs).length)return;this.index=this.size,Ru(this),Ou(e)(null,this.results)};var Iu=Au,Pu=Cu,Nu=Lu,ju=function(e,t,n){var r=Pu(e);for(;r.index<(r.keyedList||e).length;)Iu(e,t,r,(function(e,t){e?n(e,t):0!==Object.keys(r.jobs).length||n(null,r.results)})),r.index++;return Nu.bind(r,n)};var Fu={exports:{}},Bu=Au,Mu=Cu,Uu=Lu;function qu(e,t){return e<t?-1:e>t?1:0}Fu.exports=function(e,t,n,r){var i=Mu(e,n);return Bu(e,t,i,(function n(s,o){s?r(s,o):(i.index++,i.index<(i.keyedList||e).length?Bu(e,t,i,n):r(null,i.results))})),Uu.bind(i,r)},Fu.exports.ascending=qu,Fu.exports.descending=function(e,t){return-1*qu(e,t)};var Hu=Fu.exports,$u=Hu,zu=function(e,t,n){return $u(e,t,null,n)};var Wu={parallel:ju,serial:zu,serialOrdered:Hu},Gu=yu,Vu=y,Ku=o,Yu=x,Zu=E,Qu=S.parse,Ju=s,Xu=h.Stream,ep=bu,tp=Wu,np=function(e,t){return Object.keys(t).forEach((function(n){e[n]=e[n]||t[n]})),e},rp=ip;function ip(e){if(!(this instanceof ip))return new ip(e);for(var t in this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],Gu.call(this),e=e||{})this[t]=e[t]}Vu.inherits(ip,Gu),ip.LINE_BREAK="\r\n",ip.DEFAULT_CONTENT_TYPE="application/octet-stream",ip.prototype.append=function(e,t,n){"string"==typeof(n=n||{})&&(n={filename:n});var r=Gu.prototype.append.bind(this);if("number"==typeof t&&(t=""+t),Vu.isArray(t))this._error(new Error("Arrays are not supported."));else{var i=this._multiPartHeader(e,t,n),s=this._multiPartFooter();r(i),r(t),r(s),this._trackLength(i,t,n)}},ip.prototype._trackLength=function(e,t,n){var r=0;null!=n.knownLength?r+=+n.knownLength:Buffer.isBuffer(t)?r=t.length:"string"==typeof t&&(r=Buffer.byteLength(t)),this._valueLength+=r,this._overheadLength+=Buffer.byteLength(e)+ip.LINE_BREAK.length,t&&(t.path||t.readable&&t.hasOwnProperty("httpVersion")||t instanceof Xu)&&(n.knownLength||this._valuesToMeasure.push(t))},ip.prototype._lengthRetriever=function(e,t){e.hasOwnProperty("fd")?null!=e.end&&e.end!=1/0&&null!=e.start?t(null,e.end+1-(e.start?e.start:0)):Ju.stat(e.path,(function(n,r){var i;n?t(n):(i=r.size-(e.start?e.start:0),t(null,i))})):e.hasOwnProperty("httpVersion")?t(null,+e.headers["content-length"]):e.hasOwnProperty("httpModule")?(e.on("response",(function(n){e.pause(),t(null,+n.headers["content-length"])})),e.resume()):t("Unknown stream")},ip.prototype._multiPartHeader=function(e,t,n){if("string"==typeof n.header)return n.header;var r,i=this._getContentDisposition(t,n),s=this._getContentType(t,n),o="",a={"Content-Disposition":["form-data",'name="'+e+'"'].concat(i||[]),"Content-Type":[].concat(s||[])};for(var c in"object"==typeof n.header&&np(a,n.header),a)a.hasOwnProperty(c)&&null!=(r=a[c])&&(Array.isArray(r)||(r=[r]),r.length&&(o+=c+": "+r.join("; ")+ip.LINE_BREAK));return"--"+this.getBoundary()+ip.LINE_BREAK+o+ip.LINE_BREAK},ip.prototype._getContentDisposition=function(e,t){var n,r;return"string"==typeof t.filepath?n=Ku.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e.name||e.path?n=Ku.basename(t.filename||e.name||e.path):e.readable&&e.hasOwnProperty("httpVersion")&&(n=Ku.basename(e.client._httpMessage.path||"")),n&&(r='filename="'+n+'"'),r},ip.prototype._getContentType=function(e,t){var n=t.contentType;return!n&&e.name&&(n=ep.lookup(e.name)),!n&&e.path&&(n=ep.lookup(e.path)),!n&&e.readable&&e.hasOwnProperty("httpVersion")&&(n=e.headers["content-type"]),n||!t.filepath&&!t.filename||(n=ep.lookup(t.filepath||t.filename)),n||"object"!=typeof e||(n=ip.DEFAULT_CONTENT_TYPE),n},ip.prototype._multiPartFooter=function(){return function(e){var t=ip.LINE_BREAK;0===this._streams.length&&(t+=this._lastBoundary()),e(t)}.bind(this)},ip.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+ip.LINE_BREAK},ip.prototype.getHeaders=function(e){var t,n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)e.hasOwnProperty(t)&&(n[t.toLowerCase()]=e[t]);return n},ip.prototype.setBoundary=function(e){this._boundary=e},ip.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary},ip.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),n=0,r=this._streams.length;n<r;n++)"function"!=typeof this._streams[n]&&(e=Buffer.isBuffer(this._streams[n])?Buffer.concat([e,this._streams[n]]):Buffer.concat([e,Buffer.from(this._streams[n])]),"string"==typeof this._streams[n]&&this._streams[n].substring(2,t.length+2)===t||(e=Buffer.concat([e,Buffer.from(ip.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])},ip.prototype._generateBoundary=function(){for(var e="--------------------------",t=0;t<24;t++)e+=Math.floor(10*Math.random()).toString(16);this._boundary=e},ip.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e},ip.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e},ip.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;this._streams.length&&(t+=this._lastBoundary().length),this._valuesToMeasure.length?tp.parallel(this._valuesToMeasure,this._lengthRetriever,(function(n,r){n?e(n):(r.forEach((function(e){t+=e})),e(null,t))})):process.nextTick(e.bind(this,null,t))},ip.prototype.submit=function(e,t){var n,r,i={method:"post"};return"string"==typeof e?(e=Qu(e),r=np({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(r=np(e,i)).port||(r.port="https:"==r.protocol?443:80),r.headers=this.getHeaders(e.headers),n="https:"==r.protocol?Zu.request(r):Yu.request(r),this.getLength(function(e,r){if(e&&"Unknown stream"!==e)this._error(e);else if(r&&n.setHeader("Content-Length",r),this.pipe(n),t){var i,s=function(e,r){return n.removeListener("error",s),n.removeListener("response",i),t.call(this,e,r)};i=s.bind(this,null),n.on("error",s),n.on("response",i)}}.bind(this)),n},ip.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))},ip.prototype.toString=function(){return"[object FormData]"};var sp=q(rp);function op(e){return au.isPlainObject(e)||au.isArray(e)}function ap(e){return au.endsWith(e,"[]")?e.slice(0,-2):e}function cp(e,t,n){return e?e.concat(t).map((function(e,t){return e=ap(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const lp=au.toFlatObject(au,{},null,(function(e){return/^is[A-Z]/.test(e)}));function up(e,t,n){if(!au.isObject(e))throw new TypeError("target must be an object");t=t||new(sp||FormData),n=au.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!au.isUndefined(t[e])}));const r=n.metaTokens,i=n.visitor||l,s=n.dots,o=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&au.isSpecCompliantForm(t);if(!au.isFunction(i))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(au.isDate(e))return e.toISOString();if(!a&&au.isBlob(e))throw new cu("Blob is not supported. Use a Buffer instead.");return au.isArrayBuffer(e)||au.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,n,i){let a=e;if(e&&!i&&"object"==typeof e)if(au.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(au.isArray(e)&&function(e){return au.isArray(e)&&!e.some(op)}(e)||(au.isFileList(e)||au.endsWith(n,"[]"))&&(a=au.toArray(e)))return n=ap(n),a.forEach((function(e,r){!au.isUndefined(e)&&null!==e&&t.append(!0===o?cp([n],r,s):null===o?n:n+"[]",c(e))})),!1;return!!op(e)||(t.append(cp(i,n,s),c(e)),!1)}const u=[],p=Object.assign(lp,{defaultVisitor:l,convertValue:c,isVisitable:op});if(!au.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!au.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),au.forEach(n,(function(n,s){!0===(!(au.isUndefined(n)||null===n)&&i.call(t,n,au.isString(s)?s.trim():s,r,p))&&e(n,r?r.concat(s):[s])})),u.pop()}}(e),t}function pp(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function hp(e,t){this._pairs=[],e&&up(e,this,t)}const dp=hp.prototype;function fp(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function mp(e,t,n){if(!t)return e;const r=n&&n.encode||fp,i=n&&n.serialize;let s;if(s=i?i(t,n):au.isURLSearchParams(t)?t.toString():new hp(t,n).toString(r),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}dp.append=function(e,t){this._pairs.push([e,t])},dp.toString=function(e){const t=e?function(t){return e.call(this,t,pp)}:pp;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var gp=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){au.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},yp={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},vp={isNode:!0,classes:{URLSearchParams:S.URLSearchParams,FormData:sp,Blob:"undefined"!=typeof Blob&&Blob||null},protocols:["http","https","file","data"]};const bp="undefined"!=typeof window&&"undefined"!=typeof document,_p="object"==typeof navigator&&navigator||void 0,wp=bp&&(!_p||["ReactNative","NativeScript","NS"].indexOf(_p.product)<0),xp="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Ep=bp&&window.location.href||"http://localhost";var Sp={...Object.freeze({__proto__:null,hasBrowserEnv:bp,hasStandardBrowserEnv:wp,hasStandardBrowserWebWorkerEnv:xp,navigator:_p,origin:Ep}),...vp};function Tp(e){function t(e,n,r,i){let s=e[i++];if("__proto__"===s)return!0;const o=Number.isFinite(+s),a=i>=e.length;if(s=!s&&au.isArray(r)?r.length:s,a)return au.hasOwnProp(r,s)?r[s]=[r[s],n]:r[s]=n,!o;r[s]&&au.isObject(r[s])||(r[s]=[]);return t(e,n,r[s],i)&&au.isArray(r[s])&&(r[s]=function(e){const t={},n=Object.keys(e);let r;const i=n.length;let s;for(r=0;r<i;r++)s=n[r],t[s]=e[s];return t}(r[s])),!o}if(au.isFormData(e)&&au.isFunction(e.entries)){const n={};return au.forEachEntry(e,((e,r)=>{t(function(e){return au.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null}const Dp={transitional:yp,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,i=au.isObject(e);i&&au.isHTMLForm(e)&&(e=new FormData(e));if(au.isFormData(e))return r?JSON.stringify(Tp(e)):e;if(au.isArrayBuffer(e)||au.isBuffer(e)||au.isStream(e)||au.isFile(e)||au.isBlob(e)||au.isReadableStream(e))return e;if(au.isArrayBufferView(e))return e.buffer;if(au.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return up(e,new Sp.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return Sp.isNode&&au.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((s=au.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return up(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||r?(t.setContentType("application/json",!1),function(e,t,n){if(au.isString(e))try{return(t||JSON.parse)(e),au.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Dp.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(au.isResponse(e)||au.isReadableStream(e))return e;if(e&&au.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw cu.from(e,cu.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Sp.classes.FormData,Blob:Sp.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};au.forEach(["delete","get","head","post","put","patch"],(e=>{Dp.headers[e]={}}));var kp=Dp;const Ap=au.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const Cp=Symbol("internals");function Rp(e){return e&&String(e).trim().toLowerCase()}function Op(e){return!1===e||null==e?e:au.isArray(e)?e.map(Op):String(e)}function Lp(e,t,n,r,i){return au.isFunction(r)?r.call(this,t,n):(i&&(t=n),au.isString(t)?au.isString(r)?-1!==t.indexOf(r):au.isRegExp(r)?r.test(t):void 0:void 0)}class Ip{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function i(e,t,n){const i=Rp(t);if(!i)throw new Error("header name must be a non-empty string");const s=au.findKey(r,i);(!s||void 0===r[s]||!0===n||void 0===n&&!1!==r[s])&&(r[s||t]=Op(e))}const s=(e,t)=>au.forEach(e,((e,n)=>i(e,n,t)));if(au.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(au.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))s((e=>{const t={};let n,r,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!n||t[n]&&Ap[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(au.isHeaders(e))for(const[t,r]of e.entries())i(r,t,n);else null!=e&&i(t,e,n);return this}get(e,t){if(e=Rp(e)){const n=au.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(au.isFunction(t))return t.call(this,e,n);if(au.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Rp(e)){const n=au.findKey(this,e);return!(!n||void 0===this[n]||t&&!Lp(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function i(e){if(e=Rp(e)){const i=au.findKey(n,e);!i||t&&!Lp(0,n[i],i,t)||(delete n[i],r=!0)}}return au.isArray(e)?e.forEach(i):i(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const i=t[n];e&&!Lp(0,this[i],i,e,!0)||(delete this[i],r=!0)}return r}normalize(e){const t=this,n={};return au.forEach(this,((r,i)=>{const s=au.findKey(n,i);if(s)return t[s]=Op(r),void delete t[i];const o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(i):String(i).trim();o!==i&&delete t[i],t[o]=Op(r),n[o]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return au.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&au.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[Cp]=this[Cp]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Rp(e);t[r]||(!function(e,t){const n=au.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})}))}(n,e),t[r]=!0)}return au.isArray(e)?e.forEach(r):r(e),this}}Ip.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),au.reduceDescriptors(Ip.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),au.freezeMethods(Ip);var Pp=Ip;function Np(e,t){const n=this||kp,r=t||n,i=Pp.from(r.headers);let s=r.data;return au.forEach(e,(function(e){s=e.call(n,s,i.normalize(),t?t.status:void 0)})),i.normalize(),s}function jp(e){return!(!e||!e.__CANCEL__)}function Fp(e,t,n){cu.call(this,null==e?"canceled":e,cu.ERR_CANCELED,t,n),this.name="CanceledError"}function Bp(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new cu("Request failed with status code "+n.status,[cu.ERR_BAD_REQUEST,cu.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}function Mp(e,t){return e&&!function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}au.inherits(Fp,cu,{__CANCEL__:!0});var Up=S.parse,qp={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},Hp=String.prototype.endsWith||function(e){return e.length<=this.length&&-1!==this.indexOf(e,this.length-e.length)};function $p(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||""}var zp,Wp,Gp,Vp,Kp,Yp=function(e){var t="string"==typeof e?Up(e):e||{},n=t.protocol,r=t.host,i=t.port;if("string"!=typeof r||!r||"string"!=typeof n)return"";if(n=n.split(":",1)[0],!function(e,t){var n=($p("npm_config_no_proxy")||$p("no_proxy")).toLowerCase();if(!n)return!0;if("*"===n)return!1;return n.split(/[,\s]/).every((function(n){if(!n)return!0;var r=n.match(/^(.+):(\d+)$/),i=r?r[1]:n,s=r?parseInt(r[2]):0;return!(!s||s===t)||(/^[.*]/.test(i)?("*"===i.charAt(0)&&(i=i.slice(1)),!Hp.call(e,i)):e!==i)}))}(r=r.replace(/:\d*$/,""),i=parseInt(i)||qp[n]||0))return"";var s=$p("npm_config_"+n+"_proxy")||$p(n+"_proxy")||$p("npm_config_proxy")||$p("all_proxy");return s&&-1===s.indexOf("://")&&(s=n+"://"+s),s},Zp={exports:{}},Qp={exports:{}},Jp={exports:{}};function Xp(){if(Wp)return zp;Wp=1;var e=1e3,t=60*e,n=60*t,r=24*n,i=7*r,s=365.25*r;function o(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}return zp=function(a,c){c=c||{};var l=typeof a;if("string"===l&&a.length>0)return function(o){if((o=String(o)).length>100)return;var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(o);if(!a)return;var c=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*s;case"weeks":case"week":case"w":return c*i;case"days":case"day":case"d":return c*r;case"hours":case"hour":case"hrs":case"hr":case"h":return c*n;case"minutes":case"minute":case"mins":case"min":case"m":return c*t;case"seconds":case"second":case"secs":case"sec":case"s":return c*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(a);if("number"===l&&isFinite(a))return c.long?function(i){var s=Math.abs(i);if(s>=r)return o(i,s,r,"day");if(s>=n)return o(i,s,n,"hour");if(s>=t)return o(i,s,t,"minute");if(s>=e)return o(i,s,e,"second");return i+" ms"}(a):function(i){var s=Math.abs(i);if(s>=r)return Math.round(i/r)+"d";if(s>=n)return Math.round(i/n)+"h";if(s>=t)return Math.round(i/t)+"m";if(s>=e)return Math.round(i/e)+"s";return i+"ms"}(a);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))},zp}function eh(){if(Vp)return Gp;return Vp=1,Gp=function(e){function t(e){let r,i,s,o=null;function a(...e){if(!a.enabled)return;const n=a,i=Number(new Date),s=i-(r||i);n.diff=s,n.prev=r,n.curr=i,r=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,i)=>{if("%%"===r)return"%";o++;const s=t.formatters[i];if("function"==typeof s){const t=e[o];r=s.call(n,t),e.splice(o,1),o--}return r})),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=n,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==t.namespaces&&(i=t.namespaces,s=t.enabled(e)),s),set:e=>{o=e}}),"function"==typeof t.init&&t.init(a),a}function n(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].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;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=Xp(),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((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t},Gp}var th,nh={exports:{}};"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?Qp.exports=(Kp||(Kp=1,function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=eh()(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(Jp,Jp.exports)),Jp.exports):Qp.exports=(th||(th=1,function(e,t){const n=c,r=y;t.init=function(e){e.inspectOpts={};const n=Object.keys(t.inspectOpts);for(let r=0;r<n.length;r++)e.inspectOpts[n[r]]=t.inspectOpts[n[r]]},t.log=function(...e){return process.stderr.write(r.formatWithOptions(t.inspectOpts,...e)+"\n")},t.formatArgs=function(n){const{namespace:r,useColors:i}=this;if(i){const t=this.color,i="[3"+(t<8?t:"8;5;"+t),s=` ${i};1m${r} [0m`;n[0]=s+n[0].split("\n").join("\n"+s),n.push(i+"m+"+e.exports.humanize(this.diff)+"[0m")}else n[0]=(t.inspectOpts.hideDate?"":(new Date).toISOString()+" ")+r+" "+n[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=r.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=Qe;e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let r=process.env[t];return r=!!/^(yes|on|true|enabled)$/i.test(r)||!/^(no|off|false|disabled)$/i.test(r)&&("null"===r?null:Number(r)),e[n]=r,e}),{}),e.exports=eh()(t);const{formatters:i}=e.exports;i.o=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},i.O=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts)}}(nh,nh.exports)),nh.exports);var rh,ih,sh,oh,ah=Qp.exports,ch=S,lh=ch.URL,uh=x,ph=E,hh=h.Writable,dh=u,fh=function(){if(!rh){try{rh=ah("follow-redirects")}catch(e){}"function"!=typeof rh&&(rh=function(){})}rh.apply(null,arguments)};ih="undefined"!=typeof process,sh="undefined"!=typeof window&&"undefined"!=typeof document,oh=Nh(Error.captureStackTrace),ih||!sh&&oh||console.warn("The follow-redirects package should be excluded from browser builds.");var mh=!1;try{dh(new lh(""))}catch(Dk){mh="ERR_INVALID_URL"===Dk.code}var gh=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],yh=["abort","aborted","connect","error","socket","timeout"],vh=Object.create(null);yh.forEach((function(e){vh[e]=function(t,n,r){this._redirectable.emit(e,t,n,r)}}));var bh=Lh("ERR_INVALID_URL","Invalid URL",TypeError),_h=Lh("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),wh=Lh("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",_h),xh=Lh("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),Eh=Lh("ERR_STREAM_WRITE_AFTER_END","write after end"),Sh=hh.prototype.destroy||kh;function Th(e,t){hh.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 n=this;this._onNativeResponse=function(e){try{n._processResponse(e)}catch(e){n.emit("error",e instanceof _h?e:new _h({cause:e}))}},this._performRequest()}function Dh(e){var t={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(e).forEach((function(r){var i=r+":",s=n[i]=e[r],o=t[r]=Object.create(s);Object.defineProperties(o,{request:{value:function(e,r,s){var o;return o=e,lh&&o instanceof lh?e=Rh(e):Ph(e)?e=Rh(Ah(e)):(s=r,r=Ch(e),e={protocol:i}),Nh(r)&&(s=r,r=null),(r=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,r)).nativeProtocols=n,Ph(r.host)||Ph(r.hostname)||(r.hostname="::1"),dh.equal(r.protocol,i,"protocol mismatch"),fh("options",r),new Th(r,s)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,n){var r=o.request(e,t,n);return r.end(),r},configurable:!0,enumerable:!0,writable:!0}})})),t}function kh(){}function Ah(e){var t;if(mh)t=new lh(e);else if(!Ph((t=Ch(ch.parse(e))).protocol))throw new bh({input:e});return t}function Ch(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new bh({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new bh({input:e.href||e});return e}function Rh(e,t){var n=t||{};for(var r of gh)n[r]=e[r];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 Oh(e,t){var n;for(var r in t)e.test(r)&&(n=t[r],delete t[r]);return null==n?void 0:String(n).trim()}function Lh(e,t,n){function r(n){Nh(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,n||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return r.prototype=new(n||Error),Object.defineProperties(r.prototype,{constructor:{value:r,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),r}function Ih(e,t){for(var n of yh)e.removeListener(n,vh[n]);e.on("error",kh),e.destroy(t)}function Ph(e){return"string"==typeof e||e instanceof String}function Nh(e){return"function"==typeof e}Th.prototype=Object.create(hh.prototype),Th.prototype.abort=function(){Ih(this._currentRequest),this._currentRequest.abort(),this.emit("abort")},Th.prototype.destroy=function(e){return Ih(this._currentRequest,e),Sh.call(this,e),this},Th.prototype.write=function(e,t,n){if(this._ending)throw new Eh;if(!Ph(e)&&("object"!=typeof(r=e)||!("length"in r)))throw new TypeError("data should be a string, Buffer or Uint8Array");var r;Nh(t)&&(n=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,n)):(this.emit("error",new xh),this.abort()):n&&n()},Th.prototype.end=function(e,t,n){if(Nh(e)?(n=e,e=t=null):Nh(t)&&(n=t,t=null),e){var r=this,i=this._currentRequest;this.write(e,t,(function(){r._ended=!0,i.end(null,null,n)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,n)},Th.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},Th.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},Th.prototype.setTimeout=function(e,t){var n=this;function r(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function i(t){n._timeout&&clearTimeout(n._timeout),n._timeout=setTimeout((function(){n.emit("timeout"),s()}),e),r(t)}function s(){n._timeout&&(clearTimeout(n._timeout),n._timeout=null),n.removeListener("abort",s),n.removeListener("error",s),n.removeListener("response",s),n.removeListener("close",s),t&&n.removeListener("timeout",t),n.socket||n._currentRequest.removeListener("socket",i)}return t&&this.on("timeout",t),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",r),this.on("abort",s),this.on("error",s),this.on("response",s),this.on("close",s),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){Th.prototype[e]=function(t,n){return this._currentRequest[e](t,n)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(Th.prototype,e,{get:function(){return this._currentRequest[e]}})})),Th.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))}},Th.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 n=e.slice(0,-1);this._options.agent=this._options.agents[n]}var r=this._currentRequest=t.request(this._options,this._onNativeResponse);for(var i of(r._redirectable=this,yh))r.on(i,vh[i]);if(this._currentUrl=/^\//.test(this._options.path)?ch.format(this._options):this._options.path,this._isRedirect){var s=0,o=this,a=this._requestBodyBuffers;!function e(t){if(r===o._currentRequest)if(t)o.emit("error",t);else if(s<a.length){var n=a[s++];r.finished||r.write(n.data,n.encoding,e)}else o._ended&&r.end()}()}},Th.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var n,r=e.headers.location;if(!r||!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(Ih(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new wh;var i=this._options.beforeRedirect;i&&(n=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var s=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=[],Oh(/^content-/i,this._options.headers));var o=Oh(/^host$/i,this._options.headers),a=Ah(this._currentUrl),c=o||a.host,l=/^\w+:/.test(r)?this._currentUrl:ch.format(Object.assign(a,{host:c})),u=function(e,t){return mh?new lh(e,t):Ah(ch.resolve(t,e))}(r,l);if(fh("redirecting to",u.href),this._isRedirect=!0,Rh(u,this._options),(u.protocol!==a.protocol&&"https:"!==u.protocol||u.host!==c&&!function(e,t){dh(Ph(e)&&Ph(t));var n=e.length-t.length-1;return n>0&&"."===e[n]&&e.endsWith(t)}(u.host,c))&&Oh(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),Nh(i)){var p={headers:e.headers,statusCode:t},h={url:l,method:s,headers:n};i(this._options,p,h),this._sanitizeOptions(this._options)}this._performRequest()},Zp.exports=Dh({http:uh,https:ph}),Zp.exports.wrap=Dh;var jh=q(Zp.exports);const Fh="1.7.7";function Bh(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}const Mh=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;const Uh=Symbol("internals");class qh extends h.Transform{constructor(e){e=au.toFlatObject(e,{maxRate:0,chunkSize:65536,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,((e,t)=>!au.isUndefined(t[e]))),super({readableHighWaterMark:e.chunkSize});const t=this[Uh]={timeWindow:e.timeWindow,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",(e=>{"progress"===e&&(t.isCaptured||(t.isCaptured=!0))}))}_read(e){const t=this[Uh];return t.onReadCallback&&t.onReadCallback(),super._read(e)}_transform(e,t,n){const r=this[Uh],i=r.maxRate,s=this.readableHighWaterMark,o=r.timeWindow,a=i/(1e3/o),c=!1!==r.minChunkSize?Math.max(r.minChunkSize,.01*a):0,l=(e,t)=>{const n=Buffer.byteLength(e);r.bytesSeen+=n,r.bytes+=n,r.isCaptured&&this.emit("progress",r.bytesSeen),this.push(e)?process.nextTick(t):r.onReadCallback=()=>{r.onReadCallback=null,process.nextTick(t)}},u=(e,t)=>{const n=Buffer.byteLength(e);let u,p=null,h=s,d=0;if(i){const e=Date.now();(!r.ts||(d=e-r.ts)>=o)&&(r.ts=e,u=a-r.bytes,r.bytes=u<0?-u:0,d=0),u=a-r.bytes}if(i){if(u<=0)return setTimeout((()=>{t(null,e)}),o-d);u<h&&(h=u)}h&&n>h&&n-h>c&&(p=e.subarray(h),e=e.subarray(0,h)),l(e,p?()=>{process.nextTick(t,null,p)}:t)};u(e,(function e(t,r){if(t)return n(t);r?u(r,e):n(null)}))}}var Hh=qh;const{asyncIterator:$h}=Symbol;var zh=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[$h]?yield*e[$h]():yield e};const Wh=au.ALPHABET.ALPHA_DIGIT+"-_",Gh=new y.TextEncoder,Vh="\r\n",Kh=Gh.encode(Vh);class Yh{constructor(e,t){const{escapeName:n}=this.constructor,r=au.isString(t);let i=`Content-Disposition: form-data; name="${n(e)}"${!r&&t.name?`; filename="${n(t.name)}"`:""}${Vh}`;r?t=Gh.encode(String(t).replace(/\r?\n|\r\n?/g,Vh)):i+=`Content-Type: ${t.type||"application/octet-stream"}${Vh}`,this.headers=Gh.encode(i+Vh),this.contentLength=r?t.byteLength:t.size,this.size=this.headers.byteLength+this.contentLength+2,this.name=e,this.value=t}async*encode(){yield this.headers;const{value:e}=this;au.isTypedArray(e)?yield e:yield*zh(e),yield Kh}static escapeName(e){return String(e).replace(/[\r\n"]/g,(e=>({"\r":"%0D","\n":"%0A",'"':"%22"}[e])))}}var Zh=(e,t,n)=>{const{tag:r="form-data-boundary",size:i=25,boundary:s=r+"-"+au.generateString(i,Wh)}=n||{};if(!au.isFormData(e))throw TypeError("FormData instance required");if(s.length<1||s.length>70)throw Error("boundary must be 10-70 characters long");const o=Gh.encode("--"+s+Vh),a=Gh.encode("--"+s+"--"+Vh+Vh);let c=a.byteLength;const l=Array.from(e.entries()).map((([e,t])=>{const n=new Yh(e,t);return c+=n.size,n}));c+=o.byteLength*l.length,c=au.toFiniteNumber(c);const u={"Content-Type":`multipart/form-data; boundary=${s}`};return Number.isFinite(c)&&(u["Content-Length"]=c),t&&t(u),h.Readable.from(async function*(){for(const e of l)yield o,yield*e.encode();yield a}())};class Qh extends h.Transform{__transform(e,t,n){this.push(e),n()}_transform(e,t,n){if(0!==e.length&&(this._transform=this.__transform,120!==e[0])){const e=Buffer.alloc(2);e[0]=120,e[1]=156,this.push(e,t)}this.__transform(e,t,n)}}var Jh=Qh;var Xh=(e,t)=>au.isAsyncFn(e)?function(...n){const r=n.pop();e.apply(this,n).then((e=>{try{t?r(null,...t(e)):r(null,e)}catch(e){r(e)}}),r)}:e;const ed=(e,t,n=3)=>{let r=0;const i=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i,s=0,o=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),l=r[o];i||(i=c),n[s]=a,r[s]=c;let u=o,p=0;for(;u!==s;)p+=n[u++],u%=e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),c-i<t)return;const h=l&&c-l;return h?Math.round(1e3*p/h):void 0}}(50,250);return function(e,t){let n,r,i=0,s=1e3/t;const o=(t,s=Date.now())=>{i=s,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),a=t-i;a>=s?o(e,t):(n=e,r||(r=setTimeout((()=>{r=null,o(n)}),s-a)))},()=>n&&o(n)]}((n=>{const s=n.loaded,o=n.lengthComputable?n.total:void 0,a=s-r,c=i(a);r=s;e({loaded:s,total:o,progress:o?s/o:void 0,bytes:a,rate:c||void 0,estimated:c&&o&&s<=o?(o-s)/c:void 0,event:n,lengthComputable:null!=o,[t?"download":"upload"]:!0})}),n)},td=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},nd=e=>(...t)=>au.asap((()=>e(...t))),rd={flush:T.constants.Z_SYNC_FLUSH,finishFlush:T.constants.Z_SYNC_FLUSH},id={flush:T.constants.BROTLI_OPERATION_FLUSH,finishFlush:T.constants.BROTLI_OPERATION_FLUSH},sd=au.isFunction(T.createBrotliDecompress),{http:od,https:ad}=jh,cd=/https:?/,ld=Sp.protocols.map((e=>e+":")),ud=(e,[t,n])=>(e.on("end",n).on("error",n),t);function pd(e,t){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e,t)}function hd(e,t,n){let r=t;if(!r&&!1!==r){const e=Yp(n);e&&(r=new URL(e))}if(r){if(r.username&&(r.auth=(r.username||"")+":"+(r.password||"")),r.auth){(r.auth.username||r.auth.password)&&(r.auth=(r.auth.username||"")+":"+(r.auth.password||""));const t=Buffer.from(r.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+t}e.headers.host=e.hostname+(e.port?":"+e.port:"");const t=r.hostname||r.host;e.hostname=t,e.host=t,e.port=r.port,e.path=n,r.protocol&&(e.protocol=r.protocol.includes(":")?r.protocol:`${r.protocol}:`)}e.beforeRedirects.proxy=function(e){hd(e,t,e.href)}}const dd="undefined"!=typeof process&&"process"===au.kindOf(process),fd=(e,t)=>(({address:e,family:t})=>{if(!au.isString(e))throw TypeError("address must be a string");return{address:e,family:t||(e.indexOf(".")<0?6:4)}})(au.isObject(e)?e:{address:e,family:t});var md=dd&&function(e){return t=async function(t,n,r){let{data:i,lookup:s,family:o}=e;const{responseType:a,responseEncoding:c}=e,l=e.method.toUpperCase();let u,d,f=!1;if(s){const e=Xh(s,(e=>au.isArray(e)?e:[e]));s=(t,n,r)=>{e(t,n,((e,t,i)=>{if(e)return r(e);const s=au.isArray(t)?t.map((e=>fd(e))):[fd(t,i)];n.all?r(e,s):r(e,s[0].address,s[0].family)}))}}const m=new p.EventEmitter,g=()=>{e.cancelToken&&e.cancelToken.unsubscribe(v),e.signal&&e.signal.removeEventListener("abort",v),m.removeAllListeners()};function v(t){m.emit("abort",!t||t.type?new Fp(null,e,d):t)}r(((e,t)=>{u=!0,t&&(f=!0,g())})),m.once("abort",n),(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(v),e.signal&&(e.signal.aborted?v():e.signal.addEventListener("abort",v)));const b=Mp(e.baseURL,e.url),_=new URL(b,Sp.hasBrowserEnv?Sp.origin:void 0),w=_.protocol||ld[0];if("data:"===w){let r;if("GET"!==l)return Bp(t,n,{status:405,statusText:"method not allowed",headers:{},config:e});try{r=function(e,t,n){const r=n&&n.Blob||Sp.classes.Blob,i=Bh(e);if(void 0===t&&r&&(t=!0),"data"===i){e=i.length?e.slice(i.length+1):e;const n=Mh.exec(e);if(!n)throw new cu("Invalid URL",cu.ERR_INVALID_URL);const s=n[1],o=n[2],a=n[3],c=Buffer.from(decodeURIComponent(a),o?"base64":"utf8");if(t){if(!r)throw new cu("Blob is not supported",cu.ERR_NOT_SUPPORT);return new r([c],{type:s})}return c}throw new cu("Unsupported protocol "+i,cu.ERR_NOT_SUPPORT)}(e.url,"blob"===a,{Blob:e.env&&e.env.Blob})}catch(t){throw cu.from(t,cu.ERR_BAD_REQUEST,e)}return"text"===a?(r=r.toString(c),c&&"utf8"!==c||(r=au.stripBOM(r))):"stream"===a&&(r=h.Readable.from(r)),Bp(t,n,{data:r,status:200,statusText:"OK",headers:new Pp,config:e})}if(-1===ld.indexOf(w))return n(new cu("Unsupported protocol "+w,cu.ERR_BAD_REQUEST,e));const S=Pp.from(e.headers).normalize();S.set("User-Agent","axios/"+Fh,!1);const{onUploadProgress:D,onDownloadProgress:k}=e,A=e.maxRate;let C,R;if(au.isSpecCompliantForm(i)){const e=S.getContentType(/boundary=([-_\w\d]{10,70})/i);i=Zh(i,(e=>{S.set(e)}),{tag:`axios-${Fh}-boundary`,boundary:e&&e[1]||void 0})}else if(au.isFormData(i)&&au.isFunction(i.getHeaders)){if(S.set(i.getHeaders()),!S.hasContentLength())try{const e=await y.promisify(i.getLength).call(i);Number.isFinite(e)&&e>=0&&S.setContentLength(e)}catch(e){}}else if(au.isBlob(i))i.size&&S.setContentType(i.type||"application/octet-stream"),S.setContentLength(i.size||0),i=h.Readable.from(zh(i));else if(i&&!au.isStream(i)){if(Buffer.isBuffer(i));else if(au.isArrayBuffer(i))i=Buffer.from(new Uint8Array(i));else{if(!au.isString(i))return n(new cu("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",cu.ERR_BAD_REQUEST,e));i=Buffer.from(i,"utf-8")}if(S.setContentLength(i.length,!1),e.maxBodyLength>-1&&i.length>e.maxBodyLength)return n(new cu("Request body larger than maxBodyLength limit",cu.ERR_BAD_REQUEST,e))}const O=au.toFiniteNumber(S.getContentLength());let L,I;au.isArray(A)?(C=A[0],R=A[1]):C=R=A,i&&(D||C)&&(au.isStream(i)||(i=h.Readable.from(i,{objectMode:!1})),i=h.pipeline([i,new Hh({maxRate:au.toFiniteNumber(C)})],au.noop),D&&i.on("progress",ud(i,td(O,ed(nd(D),!1,3))))),e.auth&&(L=(e.auth.username||"")+":"+(e.auth.password||"")),!L&&_.username&&(L=_.username+":"+_.password),L&&S.delete("authorization");try{I=mp(_.pathname+_.search,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(t){const r=new Error(t.message);return r.config=e,r.url=e.url,r.exists=!0,n(r)}S.set("Accept-Encoding","gzip, compress, deflate"+(sd?", br":""),!1);const P={path:I,method:l,headers:S.toJSON(),agents:{http:e.httpAgent,https:e.httpsAgent},auth:L,protocol:w,family:o,beforeRedirect:pd,beforeRedirects:{}};let N;!au.isUndefined(s)&&(P.lookup=s),e.socketPath?P.socketPath=e.socketPath:(P.hostname=_.hostname.startsWith("[")?_.hostname.slice(1,-1):_.hostname,P.port=_.port,hd(P,e.proxy,w+"//"+_.hostname+(_.port?":"+_.port:"")+P.path));const j=cd.test(P.protocol);if(P.agent=j?e.httpsAgent:e.httpAgent,e.transport?N=e.transport:0===e.maxRedirects?N=j?E:x:(e.maxRedirects&&(P.maxRedirects=e.maxRedirects),e.beforeRedirect&&(P.beforeRedirects.config=e.beforeRedirect),N=j?ad:od),e.maxBodyLength>-1?P.maxBodyLength=e.maxBodyLength:P.maxBodyLength=1/0,e.insecureHTTPParser&&(P.insecureHTTPParser=e.insecureHTTPParser),d=N.request(P,(function(r){if(d.destroyed)return;const i=[r],s=+r.headers["content-length"];if(k||R){const e=new Hh({maxRate:au.toFiniteNumber(R)});k&&e.on("progress",ud(e,td(s,ed(nd(k),!0,3)))),i.push(e)}let o=r;const u=r.req||d;if(!1!==e.decompress&&r.headers["content-encoding"])switch("HEAD"!==l&&204!==r.statusCode||delete r.headers["content-encoding"],(r.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":i.push(T.createUnzip(rd)),delete r.headers["content-encoding"];break;case"deflate":i.push(new Jh),i.push(T.createUnzip(rd)),delete r.headers["content-encoding"];break;case"br":sd&&(i.push(T.createBrotliDecompress(id)),delete r.headers["content-encoding"])}o=i.length>1?h.pipeline(i,au.noop):i[0];const p=h.finished(o,(()=>{p(),g()})),y={status:r.statusCode,statusText:r.statusMessage,headers:new Pp(r.headers),config:e,request:u};if("stream"===a)y.data=o,Bp(t,n,y);else{const r=[];let i=0;o.on("data",(function(t){r.push(t),i+=t.length,e.maxContentLength>-1&&i>e.maxContentLength&&(f=!0,o.destroy(),n(new cu("maxContentLength size of "+e.maxContentLength+" exceeded",cu.ERR_BAD_RESPONSE,e,u)))})),o.on("aborted",(function(){if(f)return;const t=new cu("maxContentLength size of "+e.maxContentLength+" exceeded",cu.ERR_BAD_RESPONSE,e,u);o.destroy(t),n(t)})),o.on("error",(function(t){d.destroyed||n(cu.from(t,null,e,u))})),o.on("end",(function(){try{let e=1===r.length?r[0]:Buffer.concat(r);"arraybuffer"!==a&&(e=e.toString(c),c&&"utf8"!==c||(e=au.stripBOM(e))),y.data=e}catch(t){return n(cu.from(t,null,e,y.request,y))}Bp(t,n,y)}))}m.once("abort",(e=>{o.destroyed||(o.emit("error",e),o.destroy())}))})),m.once("abort",(e=>{n(e),d.destroy(e)})),d.on("error",(function(t){n(cu.from(t,null,e,d))})),d.on("socket",(function(e){e.setKeepAlive(!0,6e4)})),e.timeout){const t=parseInt(e.timeout,10);if(Number.isNaN(t))return void n(new cu("error trying to parse `config.timeout` to int",cu.ERR_BAD_OPTION_VALUE,e,d));d.setTimeout(t,(function(){if(u)return;let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||yp;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new cu(t,r.clarifyTimeoutError?cu.ETIMEDOUT:cu.ECONNABORTED,e,d)),v()}))}if(au.isStream(i)){let t=!1,n=!1;i.on("end",(()=>{t=!0})),i.once("error",(e=>{n=!0,d.destroy(e)})),i.on("close",(()=>{t||n||v(new Fp("Request stream has been aborted",e,d))})),i.pipe(d)}else d.end(i)},new Promise(((e,n)=>{let r,i;const s=(e,t)=>{i||(i=!0,r&&r(e,t))},o=e=>{s(e,!0),n(e)};t((t=>{s(t),e(t)}),o,(e=>r=e)).catch(o)}));var t},gd=Sp.hasStandardBrowserEnv?function(){const e=Sp.navigator&&/(msie|trident)/i.test(Sp.navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=au.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0},yd=Sp.hasStandardBrowserEnv?{write(e,t,n,r,i,s){const o=[e+"="+encodeURIComponent(t)];au.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),au.isString(r)&&o.push("path="+r),au.isString(i)&&o.push("domain="+i),!0===s&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};const vd=e=>e instanceof Pp?{...e}:e;function bd(e,t){t=t||{};const n={};function r(e,t,n){return au.isPlainObject(e)&&au.isPlainObject(t)?au.merge.call({caseless:n},e,t):au.isPlainObject(t)?au.merge({},t):au.isArray(t)?t.slice():t}function i(e,t,n){return au.isUndefined(t)?au.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function s(e,t){if(!au.isUndefined(t))return r(void 0,t)}function o(e,t){return au.isUndefined(t)?au.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,i,s){return s in t?r(n,i):s in e?r(void 0,n):void 0}const c={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(e,t)=>i(vd(e),vd(t),!0)};return au.forEach(Object.keys(Object.assign({},e,t)),(function(r){const s=c[r]||i,o=s(e[r],t[r],r);au.isUndefined(o)&&s!==a||(n[r]=o)})),n}var _d=e=>{const t=bd({},e);let n,{data:r,withXSRFToken:i,xsrfHeaderName:s,xsrfCookieName:o,headers:a,auth:c}=t;if(t.headers=a=Pp.from(a),t.url=mp(Mp(t.baseURL,t.url),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),au.isFormData(r))if(Sp.hasStandardBrowserEnv||Sp.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(n=a.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}if(Sp.hasStandardBrowserEnv&&(i&&au.isFunction(i)&&(i=i(t)),i||!1!==i&&gd(t.url))){const e=s&&o&&yd.read(o);e&&a.set(s,e)}return t};var wd="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=_d(e);let i=r.data;const s=Pp.from(r.headers).normalize();let o,a,c,l,u,{responseType:p,onUploadProgress:h,onDownloadProgress:d}=r;function f(){l&&l(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(o),r.signal&&r.signal.removeEventListener("abort",o)}let m=new XMLHttpRequest;function g(){if(!m)return;const r=Pp.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());Bp((function(e){t(e),f()}),(function(e){n(e),f()}),{data:p&&"text"!==p&&"json"!==p?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(g)},m.onabort=function(){m&&(n(new cu("Request aborted",cu.ECONNABORTED,e,m)),m=null)},m.onerror=function(){n(new cu("Network Error",cu.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const i=r.transitional||yp;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new cu(t,i.clarifyTimeoutError?cu.ETIMEDOUT:cu.ECONNABORTED,e,m)),m=null},void 0===i&&s.setContentType(null),"setRequestHeader"in m&&au.forEach(s.toJSON(),(function(e,t){m.setRequestHeader(t,e)})),au.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),p&&"json"!==p&&(m.responseType=r.responseType),d&&([c,u]=ed(d,!0),m.addEventListener("progress",c)),h&&m.upload&&([a,l]=ed(h),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",l)),(r.cancelToken||r.signal)&&(o=t=>{m&&(n(!t||t.type?new Fp(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(o),r.signal&&(r.signal.aborted?o():r.signal.addEventListener("abort",o)));const y=Bh(r.url);y&&-1===Sp.protocols.indexOf(y)?n(new cu("Unsupported protocol "+y+":",cu.ERR_BAD_REQUEST,e)):m.send(i||null)}))};var xd=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const i=function(e){if(!n){n=!0,o();const t=e instanceof Error?e:this.reason;r.abort(t instanceof cu?t:new Fp(t instanceof Error?t.message:t))}};let s=t&&setTimeout((()=>{s=null,i(new cu(`timeout ${t} of ms exceeded`,cu.ETIMEDOUT))}),t);const o=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)})),e=null)};e.forEach((e=>e.addEventListener("abort",i)));const{signal:a}=r;return a.unsubscribe=()=>au.asap(o),a}};const Ed=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let r,i=0;for(;i<n;)r=i+t,yield e.slice(i,r),i=r},Sd=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},Td=(e,t,n,r)=>{const i=async function*(e,t){for await(const n of Sd(e))yield*Ed(n,t)}(e,t);let s,o=0,a=e=>{s||(s=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await i.next();if(t)return a(),void e.close();let s=r.byteLength;if(n){let e=o+=s;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw a(e),e}},cancel:e=>(a(e),i.return())},{highWaterMark:2})},Dd="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,kd=Dd&&"function"==typeof ReadableStream,Ad=Dd&&("function"==typeof TextEncoder?(Cd=new TextEncoder,e=>Cd.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var Cd;const Rd=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Od=kd&&Rd((()=>{let e=!1;const t=new Request(Sp.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),Ld=kd&&Rd((()=>au.isReadableStream(new Response("").body))),Id={stream:Ld&&(e=>e.body)};Dd&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach((t=>{!Id[t]&&(Id[t]=au.isFunction(e[t])?e=>e[t]():(e,n)=>{throw new cu(`Response type '${t}' is not supported`,cu.ERR_NOT_SUPPORT,n)})}))})(new Response);const Pd=async(e,t)=>{const n=au.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(au.isBlob(e))return e.size;if(au.isSpecCompliantForm(e)){const t=new Request(Sp.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return au.isArrayBufferView(e)||au.isArrayBuffer(e)?e.byteLength:(au.isURLSearchParams(e)&&(e+=""),au.isString(e)?(await Ad(e)).byteLength:void 0)})(t):n};var Nd=Dd&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:s,timeout:o,onDownloadProgress:a,onUploadProgress:c,responseType:l,headers:u,withCredentials:p="same-origin",fetchOptions:h}=_d(e);l=l?(l+"").toLowerCase():"text";let d,f=xd([i,s&&s.toAbortSignal()],o);const m=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let g;try{if(c&&Od&&"get"!==n&&"head"!==n&&0!==(g=await Pd(u,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(au.isFormData(r)&&(e=n.headers.get("content-type"))&&u.setContentType(e),n.body){const[e,t]=td(g,ed(nd(c)));r=Td(n.body,65536,e,t)}}au.isString(p)||(p=p?"include":"omit");const i="credentials"in Request.prototype;d=new Request(t,{...h,signal:f,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:i?p:void 0});let s=await fetch(d);const o=Ld&&("stream"===l||"response"===l);if(Ld&&(a||o&&m)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=s[t]}));const t=au.toFiniteNumber(s.headers.get("content-length")),[n,r]=a&&td(t,ed(nd(a),!0))||[];s=new Response(Td(s.body,65536,n,(()=>{r&&r(),m&&m()})),e)}l=l||"text";let y=await Id[au.findKey(Id,l)||"text"](s,e);return!o&&m&&m(),await new Promise(((t,n)=>{Bp(t,n,{data:y,headers:Pp.from(s.headers),status:s.status,statusText:s.statusText,config:e,request:d})}))}catch(t){if(m&&m(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new cu("Network Error",cu.ERR_NETWORK,e,d),{cause:t.cause||t});throw cu.from(t,t&&t.code,e,d)}});const jd={http:md,xhr:wd,fetch:Nd};au.forEach(jd,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Fd=e=>`- ${e}`,Bd=e=>au.isFunction(e)||null===e||!1===e;var Md=e=>{e=au.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let s=0;s<t;s++){let t;if(n=e[s],r=n,!Bd(n)&&(r=jd[(t=String(n)).toLowerCase()],void 0===r))throw new cu(`Unknown adapter '${t}'`);if(r)break;i[t||"#"+s]=r}if(!r){const e=Object.entries(i).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new cu("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Fd).join("\n"):" "+Fd(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function Ud(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Fp(null,e)}function qd(e){Ud(e),e.headers=Pp.from(e.headers),e.data=Np.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Md(e.adapter||kp.adapter)(e).then((function(t){return Ud(e),t.data=Np.call(e,e.transformResponse,t),t.headers=Pp.from(t.headers),t}),(function(t){return jp(t)||(Ud(e),t&&t.response&&(t.response.data=Np.call(e,e.transformResponse,t.response),t.response.headers=Pp.from(t.response.headers))),Promise.reject(t)}))}const Hd={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Hd[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const $d={};Hd.transitional=function(e,t,n){function r(e,t){return"[Axios v1.7.7] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,i,s)=>{if(!1===e)throw new cu(r(i," has been removed"+(t?" in "+t:"")),cu.ERR_DEPRECATED);return t&&!$d[i]&&($d[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,s)}};var zd={assertOptions:function(e,t,n){if("object"!=typeof e)throw new cu("options must be an object",cu.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const s=r[i],o=t[s];if(o){const t=e[s],n=void 0===t||o(t,s,e);if(!0!==n)throw new cu("option "+s+" must be "+n,cu.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new cu("Unknown option "+s,cu.ERR_BAD_OPTION)}},validators:Hd};const Wd=zd.validators;class Gd{constructor(e){this.defaults=e,this.interceptors={request:new gp,response:new gp}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=bd(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:i}=t;void 0!==n&&zd.assertOptions(n,{silentJSONParsing:Wd.transitional(Wd.boolean),forcedJSONParsing:Wd.transitional(Wd.boolean),clarifyTimeoutError:Wd.transitional(Wd.boolean)},!1),null!=r&&(au.isFunction(r)?t.paramsSerializer={serialize:r}:zd.assertOptions(r,{encode:Wd.function,serialize:Wd.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=i&&au.merge(i.common,i[t.method]);i&&au.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=Pp.concat(s,i);const o=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,o.unshift(e.fulfilled,e.rejected))}));const c=[];let l;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let u,p=0;if(!a){const e=[qd.bind(this),void 0];for(e.unshift.apply(e,o),e.push.apply(e,c),u=e.length,l=Promise.resolve(t);p<u;)l=l.then(e[p++],e[p++]);return l}u=o.length;let h=t;for(p=0;p<u;){const e=o[p++],t=o[p++];try{h=e(h)}catch(e){t.call(this,e);break}}try{l=qd.call(this,h)}catch(e){return Promise.reject(e)}for(p=0,u=c.length;p<u;)l=l.then(c[p++],c[p++]);return l}getUri(e){return mp(Mp((e=bd(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}au.forEach(["delete","get","head","options"],(function(e){Gd.prototype[e]=function(t,n){return this.request(bd(n||{},{method:e,url:t,data:(n||{}).data}))}})),au.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,i){return this.request(bd(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Gd.prototype[e]=t(),Gd.prototype[e+"Form"]=t(!0)}));var Vd=Gd;class Kd{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,i){n.reason||(n.reason=new Fp(e,r,i),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Kd((function(t){e=t})),cancel:e}}}var Yd=Kd;const Zd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Zd).forEach((([e,t])=>{Zd[t]=e}));var Qd=Zd;const Jd=function e(t){const n=new Vd(t),r=vl(Vd.prototype.request,n);return au.extend(r,Vd.prototype,n,{allOwnKeys:!0}),au.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(bd(t,n))},r}(kp);Jd.Axios=Vd,Jd.CanceledError=Fp,Jd.CancelToken=Yd,Jd.isCancel=jp,Jd.VERSION=Fh,Jd.toFormData=up,Jd.AxiosError=cu,Jd.Cancel=Jd.CanceledError,Jd.all=function(e){return Promise.all(e)},Jd.spread=function(e){return function(t){return e.apply(null,t)}},Jd.isAxiosError=function(e){return au.isObject(e)&&!0===e.isAxiosError},Jd.mergeConfig=bd,Jd.AxiosHeaders=Pp,Jd.formToJSON=e=>Tp(au.isHTMLForm(e)?new FormData(e):e),Jd.getAdapter=Md,Jd.HttpStatusCode=Qd,Jd.default=Jd;var Xd=Jd;const ef="1.0.0",tf="https://api.qumra.cloud/cli/v1",nf=async()=>{const{default:e}=await import("conf");return new e({projectName:"qumra-cli"})},rf=async(e,t)=>{const n=await nf();try{n.set(e,t)}catch(e){console.error("Error saving data:",e)}},sf=async e=>{const t=await nf();try{return t.get(e)}catch(e){console.error("Error retrieving data:",e)}},of=Xd.create({baseURL:tf,headers:{"Content-Type":"application/json"}});of.interceptors.request.use((async e=>{const t=await sf("token");return console.log("🚀 ~ token:",t),t&&(e.headers.Authorization=`${t}`),e}),(e=>Promise.reject(e)));const af=async(e,t)=>e.split("\n").map((e=>{const n=Math.max(0,Math.floor((t-e.length)/2));return" ".repeat(n)+e})).join("\n");var cf={exports:{}};!function(e){const t=(()=>{const e=0,t=1,n=2,r={},i={font:"Standard",fontPath:"./fonts"};function s(e,t,n){return e===t&&e!==n&&e}function o(e,t){let n="|/\\[]{}()<>";if("_"===e){if(-1!==n.indexOf(t))return t}else if("_"===t&&-1!==n.indexOf(e))return e;return!1}function a(e,t){let n="| /\\ [] {} () <>",r=n.indexOf(e),i=n.indexOf(t);if(-1!==r&&-1!==i&&r!==i&&1!==Math.abs(r-i)){const e=Math.max(r,i);return n.substring(e,e+1)}return!1}function c(e,t){let n="[] {} ()",r=n.indexOf(e),i=n.indexOf(t);return-1!==r&&-1!==i&&Math.abs(r-i)<=1&&"|"}function l(e,t){let n="/\\ \\/ ><",r={0:"|",3:"Y",6:"X"},i=n.indexOf(e),s=n.indexOf(t);return-1!==i&&-1!==s&&s-i==1&&r[i]}function u(e,t,n){return e===n&&t===n&&n}function p(e,t){return e===t&&e}function h(e,t){let n="|/\\[]{}()<>";if("_"===e){if(-1!==n.indexOf(t))return t}else if("_"===t&&-1!==n.indexOf(e))return e;return!1}function d(e,t){let n="| /\\ [] {} () <>",r=n.indexOf(e),i=n.indexOf(t);if(-1!==r&&-1!==i&&r!==i&&1!==Math.abs(r-i)){const e=Math.max(r,i);return n.substring(e,e+1)}return!1}function f(e,t){return("-"===e&&"_"===t||"_"===e&&"-"===t)&&"="}function m(e,t){return"|"===e&&"|"===t&&"|"}function g(e,t,n){return" "===t||""===t||t===n&&" "!==e?e:t}function y(r,i,s){if(s.fittingRules.vLayout===e)return"invalid";let o,a,c,l,u=Math.min(r.length,i.length),g=!1;if(0===u)return"invalid";for(o=0;o<u;o++)if(a=r.substring(o,o+1),c=i.substring(o,o+1)," "!==a&&" "!==c){if(s.fittingRules.vLayout===t)return"invalid";if(s.fittingRules.vLayout===n)return"end";if(m(a,c)){g=g||!1;continue}if(l=!1,l=s.fittingRules.vRule1?p(a,c):l,l=!l&&s.fittingRules.vRule2?h(a,c):l,l=!l&&s.fittingRules.vRule3?d(a,c):l,l=!l&&s.fittingRules.vRule4?f(a,c):l,g=!0,!l)return"invalid"}return g?"end":"valid"}function v(e,r,i){let s,o,a,c,l=Math.min(e.length,r.length),u="";for(s=0;s<l;s++)o=e.substring(s,s+1),a=r.substring(s,s+1)," "!==o&&" "!==a?i.fittingRules.vLayout===t||i.fittingRules.vLayout===n?u+=g(o,a):(c=!1,c=i.fittingRules.vRule5?m(o,a):c,c=!c&&i.fittingRules.vRule1?p(o,a):c,c=!c&&i.fittingRules.vRule2?h(o,a):c,c=!c&&i.fittingRules.vRule3?d(o,a):c,c=!c&&i.fittingRules.vRule4?f(o,a):c,u+=c):u+=g(o,a);return u}function b(e,t){let n,r=e.length,i="";for(n=0;n<t;n++)i+=" ";for(n=0;n<r;n++)e[n]+=i}function _(e,t,n){let r,i=e[0].length,s=t[0].length;return i>s?b(t,i-s):s>i&&b(e,s-i),r=function(e,t,n){let r,i,s,o=e.length,a=e.length;t.length;let c,l,u,p=1;for(;p<=o;){for(r=e.slice(Math.max(0,a-p),a),i=t.slice(0,Math.min(o,p)),s=i.length,u="",c=0;c<s;c++)if(l=y(r[c],i[c],n),"end"===l)u=l;else{if("invalid"===l){u=l;break}""===u&&(u="valid")}if("invalid"===u){p--;break}if("end"===u)break;"valid"===u&&p++}return Math.min(o,p)}(e,t,n),function(e,t,n,r){let i,s,o,a,c=e.length,l=t.length,u=e.slice(0,Math.max(0,c-n)),p=e.slice(Math.max(0,c-n),c),h=t.slice(0,Math.min(n,l)),d=[];for(s=p.length,i=0;i<s;i++)o=i>=l?p[i]:v(p[i],h[i],r),d.push(o);return a=t.slice(Math.min(n,l),l),[].concat(u,d,a)}(e,t,r,n)}function w(r,i,p){if(p.fittingRules.hLayout===e)return 0;let h,d,f,m,g,y=r.length,v=i.length,b=y,_=1,w=!1,x=!1;if(0===y)return 0;e:for(;_<=b;){const e=y-_;for(d=r.substring(e,e+_),f=i.substring(0,Math.min(_,v)),h=0;h<Math.min(_,v);h++)if(m=d.substring(h,h+1),g=f.substring(h,h+1)," "!==m&&" "!==g){if(p.fittingRules.hLayout===t){_-=1;break e}if(p.fittingRules.hLayout===n){m!==p.hardBlank&&g!==p.hardBlank||(_-=1);break e}if(w=!0,x=!1,x=p.fittingRules.hRule1?s(m,g,p.hardBlank):x,x=!x&&p.fittingRules.hRule2?o(m,g,p.hardBlank):x,x=!x&&p.fittingRules.hRule3?a(m,g,p.hardBlank):x,x=!x&&p.fittingRules.hRule4?c(m,g,p.hardBlank):x,x=!x&&p.fittingRules.hRule5?l(m,g,p.hardBlank):x,x=!x&&p.fittingRules.hRule6?u(m,g,p.hardBlank):x,!x){_-=1;break e}}if(w)break;_++}return Math.min(b,_)}function x(e,r,i,p){let h,d,f,m,y,v,b,_,w,x,E=[];for(h=0;h<p.height;h++){w=e[h],x=r[h],b=w.length,_=x.length,f=b-i,m=w.substr(0,Math.max(0,f)),y="";const C=Math.max(0,b-i);var S=w.substring(C,C+i),T=x.substring(0,Math.min(i,_));for(d=0;d<i;d++){var D=d<b?S.substring(d,d+1):" ",k=d<_?T.substring(d,d+1):" ";if(" "!==D&&" "!==k)if(p.fittingRules.hLayout===t)y+=g(D,k,p.hardBlank);else if(p.fittingRules.hLayout===n)y+=g(D,k,p.hardBlank);else{var A="";y+=A=(A=!(A=!(A=!(A=!(A=!(A=!A&&p.fittingRules.hRule1?s(D,k,p.hardBlank):A)&&p.fittingRules.hRule2?o(D,k,p.hardBlank):A)&&p.fittingRules.hRule3?a(D,k,p.hardBlank):A)&&p.fittingRules.hRule4?c(D,k,p.hardBlank):A)&&p.fittingRules.hRule5?l(D,k,p.hardBlank):A)&&p.fittingRules.hRule6?u(D,k,p.hardBlank):A)||g(D,k,p.hardBlank)}else y+=g(D,k,p.hardBlank)}v=i>=_?"":x.substring(i,i+Math.max(0,_-i)),E[h]=m+y+v}return E}function E(e){let t,n=[];for(t=0;t<e;t++)n[t]="";return n}const S=function(e){return Math.max.apply(Math,e.map((function(e,t){return e.length})))};function T(e,t,n){return e.reduce((function(e,t){return x(e,t.fig,t.overlap,n)}),E(t))}function D(e,t,n){const r={};for(let i=e.length;--i;){let s=T(e.slice(0,i),t,n);if(S(s)<=n.width){r.outputFigText=s,i<e.length?r.chars=e.slice(i):r.chars=[];break}}return r}function k(t,n,r){let i,s,o,a,c,l,u,p,h,d,f,m,g=0,y=r.height,v=[],b=[];for(a=E(y),r.width>0&&r.whitespaceBreak&&(u={chars:[],overlap:g}),1===r.printDirection&&(t=t.split("").reverse().join("")),c=t.length,i=0;i<c;i++)if(p=t.substring(i,i+1),h=p.match(/\s/),s=n[p.charCodeAt(0)],f=null,s){if(r.fittingRules.hLayout!==e){for(g=1e4,o=0;o<r.height;o++)g=Math.min(g,w(a[o],s[o],r));g=1e4===g?0:g}if(r.width>0&&(r.whitespaceBreak?(d=T(u.chars.concat([{fig:s,overlap:g}]),y,r),f=T(b.concat([{fig:d,overlap:u.overlap}]),y,r),l=S(f)):(f=x(a,s,g,r),l=S(f)),l>=r.width&&i>0&&(r.whitespaceBreak?(a=T(b.slice(0,-1),y,r),b.length>1&&(v.push(a),a=E(y)),b=[]):(v.push(a),a=E(y)))),r.width>0&&r.whitespaceBreak&&(h&&i!==c-1||u.chars.push({fig:s,overlap:g}),h||i===c-1)){for(m=null;f=T(u.chars,y,r),l=S(f),l>=r.width;)m=D(u.chars,y,r),u={chars:m.chars},v.push(m.outputFigText);l>0&&(m?b.push({fig:f,overlap:1}):b.push({fig:f,overlap:u.overlap})),h&&(b.push({fig:s,overlap:g}),a=E(y)),i===c-1&&(a=T(b,y,r)),u={chars:[],overlap:g};continue}a=x(a,s,g,r)}return S(a)>0&&v.push(a),!0!==r.showHardBlanks&&v.forEach((function(e){for(c=e.length,o=0;o<c;o++)e[o]=e[o].replace(new RegExp("\\"+r.hardBlank,"g")," ")})),v}const A=function(e,t,n){let i,s,o,a=(n=n.replace(/\r\n/g,"\n").replace(/\r/g,"\n")).split("\n"),c=[];for(s=a.length,i=0;i<s;i++)c=c.concat(k(a[i],r[e],t));for(s=c.length,o=c[0],i=1;i<s;i++)o=_(o,c[i],t);return o?o.join("\n"):""};function C(r,i){let s,o,a=JSON.parse(JSON.stringify(r));if(void 0!==i.horizontalLayout)for(o in s=function(r,i){let s,o=["hLayout","hRule1","hRule2","hRule3","hRule4","hRule5","hRule6"],a={};if("default"===r)for(s=0;s<o.length;s++)a[o[s]]=i.fittingRules[o[s]];else if("full"===r)a={hLayout:e,hRule1:!1,hRule2:!1,hRule3:!1,hRule4:!1,hRule5:!1,hRule6:!1};else if("fitted"===r)a={hLayout:t,hRule1:!1,hRule2:!1,hRule3:!1,hRule4:!1,hRule5:!1,hRule6:!1};else if("controlled smushing"===r)a={hLayout:3,hRule1:!0,hRule2:!0,hRule3:!0,hRule4:!0,hRule5:!0,hRule6:!0};else{if("universal smushing"!==r)return;a={hLayout:n,hRule1:!1,hRule2:!1,hRule3:!1,hRule4:!1,hRule5:!1,hRule6:!1}}return a}(i.horizontalLayout,r),s)s.hasOwnProperty(o)&&(a.fittingRules[o]=s[o]);if(void 0!==i.verticalLayout)for(o in s=function(r,i){let s,o=["vLayout","vRule1","vRule2","vRule3","vRule4","vRule5"],a={};if("default"===r)for(s=0;s<o.length;s++)a[o[s]]=i.fittingRules[o[s]];else if("full"===r)a={vLayout:e,vRule1:!1,vRule2:!1,vRule3:!1,vRule4:!1,vRule5:!1};else if("fitted"===r)a={vLayout:t,vRule1:!1,vRule2:!1,vRule3:!1,vRule4:!1,vRule5:!1};else if("controlled smushing"===r)a={vLayout:3,vRule1:!0,vRule2:!0,vRule3:!0,vRule4:!0,vRule5:!0};else{if("universal smushing"!==r)return;a={vLayout:n,vRule1:!1,vRule2:!1,vRule3:!1,vRule4:!1,vRule5:!1}}return a}(i.verticalLayout,r),s)s.hasOwnProperty(o)&&(a.fittingRules[o]=s[o]);return a.printDirection=void 0!==i.printDirection?i.printDirection:r.printDirection,a.showHardBlanks=i.showHardBlanks||!1,a.width=i.width||-1,a.whitespaceBreak=i.whitespaceBreak||!1,a}const R=function(e,t,n){return R.text(e,t,n)};return R.text=async function(e,t,n){let r="";return e+="","function"==typeof arguments[1]&&(n=t,(t={}).font=i.font),"string"==typeof t?(r=t,t={}):r=(t=t||{}).font||i.font,await new Promise(((i,s)=>{R.loadFont(r,(function(o,a){if(o)return s(o),void(n&&n(o));const c=A(r,C(a,t),e);i(c),n&&n(null,c)}))}))},R.textSync=function(e,t){let n="";e+="","string"==typeof t?(n=t,t={}):n=(t=t||{}).font||i.font;var r=C(R.loadFontSync(n),t);return A(n,r,e)},R.metadata=function(e,t){e+="",R.loadFont(e,(function(n,i){n?t(n):t(null,i,r[e].comment)}))},R.defaults=function(e){if("object"==typeof e&&null!==e)for(var t in e)e.hasOwnProperty(t)&&(i[t]=e[t]);return JSON.parse(JSON.stringify(i))},R.parseFont=function(i,s){s=s.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),r[i]={};var o=s.split("\n"),a=o.splice(0,1)[0].split(" "),c=r[i],l={};if(l.hardBlank=a[0].substr(5,1),l.height=parseInt(a[1],10),l.baseline=parseInt(a[2],10),l.maxLength=parseInt(a[3],10),l.oldLayout=parseInt(a[4],10),l.numCommentLines=parseInt(a[5],10),l.printDirection=a.length>=6?parseInt(a[6],10):0,l.fullLayout=a.length>=7?parseInt(a[7],10):null,l.codeTagCount=a.length>=8?parseInt(a[8],10):null,l.fittingRules=function(r,i){let s,o,a,c,l={},u=[[16384,"vLayout",n],[8192,"vLayout",t],[4096,"vRule5",!0],[2048,"vRule4",!0],[1024,"vRule3",!0],[512,"vRule2",!0],[256,"vRule1",!0],[128,"hLayout",n],[64,"hLayout",t],[32,"hRule6",!0],[16,"hRule5",!0],[8,"hRule4",!0],[4,"hRule3",!0],[2,"hRule2",!0],[1,"hRule1",!0]];for(s=null!==i?i:r,o=0,a=u.length;o<a;)c=u[o],s>=c[0]?(s-=c[0],l[c[1]]=void 0===l[c[1]]?c[2]:l[c[1]]):"vLayout"!==c[1]&&"hLayout"!==c[1]&&(l[c[1]]=!1),o++;return void 0===l.hLayout?0===r?l.hLayout=t:-1===r?l.hLayout=e:l.hRule1||l.hRule2||l.hRule3||l.hRule4||l.hRule5||l.hRule6?l.hLayout=3:l.hLayout=n:l.hLayout===n&&(l.hRule1||l.hRule2||l.hRule3||l.hRule4||l.hRule5||l.hRule6)&&(l.hLayout=3),void 0===l.vLayout?l.vRule1||l.vRule2||l.vRule3||l.vRule4||l.vRule5?l.vLayout=3:l.vLayout=e:l.vLayout===n&&(l.vRule1||l.vRule2||l.vRule3||l.vRule4||l.vRule5)&&(l.vLayout=3),l}(l.oldLayout,l.fullLayout),c.options=l,1!==l.hardBlank.length||isNaN(l.height)||isNaN(l.baseline)||isNaN(l.maxLength)||isNaN(l.oldLayout)||isNaN(l.numCommentLines))throw new Error("FIGlet header contains invalid values.");let u,p=[];for(u=32;u<=126;u++)p.push(u);if(p=p.concat(196,214,220,228,246,252,223),o.length<l.numCommentLines+l.height*p.length)throw new Error("FIGlet file is missing data.");let h,d,f=!1;for(c.comment=o.splice(0,l.numCommentLines).join("\n"),c.numChars=0;o.length>0&&c.numChars<p.length;){for(h=p[c.numChars],c[h]=o.splice(0,l.height),u=0;u<l.height;u++)void 0===c[h][u]?c[h][u]="":(d=new RegExp("\\"+c[h][u].substr(c[h][u].length-1,1)+"+$"),c[h][u]=c[h][u].replace(d,""));c.numChars++}for(;o.length>0;){if(h=o.splice(0,1)[0].split(" ")[0],/^0[xX][0-9a-fA-F]+$/.test(h))h=parseInt(h,16);else if(/^0[0-7]+$/.test(h))h=parseInt(h,8);else if(/^[0-9]+$/.test(h))h=parseInt(h,10);else{if(!/^-0[xX][0-9a-fA-F]+$/.test(h)){if(""===h)break;console.log("Invalid data:"+h),f=!0;break}h=parseInt(h,16)}for(c[h]=o.splice(0,l.height),u=0;u<l.height;u++)void 0===c[h][u]?c[h][u]="":(d=new RegExp("\\"+c[h][u].substr(c[h][u].length-1,1)+"+$"),c[h][u]=c[h][u].replace(d,""));c.numChars++}if(!0===f)throw new Error("Error parsing data.");return l},R.loadFont=function(e,t){if(r[e])t(null,r[e].options);else{if("function"!=typeof fetch)throw console.error("figlet.js requires the fetch API or a fetch polyfill such as https://cdnjs.com/libraries/fetch"),new Error("fetch is required for figlet.js to work.");fetch(i.fontPath+"/"+e+".flf").then((function(e){if(e.ok)return e.text();throw console.log("Unexpected response",e),new Error("Network response was not ok.")})).then((function(n){t(null,R.parseFont(e,n))})).catch(t)}},R.loadFontSync=function(e){if(r[e])return r[e].options;throw new Error("synchronous font loading is not implemented for the browser")},R.preloadFonts=function(e,t){let n=[];e.reduce((function(e,t){return e.then((function(){return fetch(i.fontPath+"/"+t+".flf").then((e=>e.text())).then((function(e){n.push(e)}))}))}),Promise.resolve()).then((function(r){for(var i in e)e.hasOwnProperty(i)&&R.parseFont(e[i],n[i]);t&&t()}))},R.figFonts=r,R})();e.exports=t}(cf);const lf=cf.exports,uf=s,pf=o,hf=pf.join(__dirname,"/../fonts/");lf.loadFont=function(e,t){lf.figFonts[e]?t(null,lf.figFonts[e].options):uf.readFile(pf.join(hf,e+".flf"),{encoding:"utf-8"},(function(n,r){if(n)return t(n);r+="";try{t(null,lf.parseFont(e,r))}catch(e){t(e)}}))},lf.loadFontSync=function(e){if(lf.figFonts[e])return lf.figFonts[e].options;var t=uf.readFileSync(pf.join(hf,e+".flf"),{encoding:"utf-8"});return t+="",lf.parseFont(e,t)},lf.fonts=function(e){var t=[];uf.readdir(hf,(function(n,r){if(n)return e(n);r.forEach((function(e){/\.flf$/.test(e)&&t.push(e.replace(/\.flf$/,""))})),e(null,t)}))},lf.fontsSync=function(){var e=[];return uf.readdirSync(hf).forEach((function(t){/\.flf$/.test(t)&&e.push(t.replace(/\.flf$/,""))})),e};var df=q(lf);const ff=(e,t)=>df.textSync(e,{font:"Standard",horizontalLayout:"default",verticalLayout:"default",width:t,whitespaceBreak:!1}),mf=async()=>{const e=ff("Qumra Cloud CLI",90),t=ff(ef,90),n=await af(e,90),r=await af(t,90),i=await af("Welcome to Qumra Cloud CLI!",90);console.log(_t.green(n)),console.log(_t.green(i)),console.log(_t.green(r))};const gf=async()=>{await mf();const e=zr("Initialisation...").start();let t;try{t=(await of.get("themes/createThemeData")).data}catch(t){e.fail(_t.red(`Failed to fetch theme creation data: ${t.message}`)),process.exit(1)}const n=t?.platforms?.map((e=>({name:e.title,value:e._id}))),r=t?.apps?.map((e=>({name:e.subdomain,value:e._id})));e.succeed(),yl.prompt([{type:"input",name:"title",message:"What would you like to name your theme?",default:"qumra-theme",validate:e=>""!==e.trim()||"Title is required."},{type:"list",name:"platform",message:"Select the category for your theme:",choices:n,validate:e=>void 0!==e||"Platform selection is required."},{type:"list",name:"app",message:"Select the app you want to use to test your theme:",choices:r,validate:e=>void 0!==e||"App selection is required."},{type:"input",name:"supportEmail",message:"Enter your support email:",default:"support@example.com",validate:e=>/\S+@\S+\.\S+/.test(e)||"Please enter a valid email address."},{type:"input",name:"supportSite",message:"Enter your support site URL:",default:"https://example.com",validate:e=>{try{return new URL(e),!0}catch{return"Please enter a valid URL."}}},{type:"confirm",name:"savePath",message:"Do you want to save the theme path on your machine?",default:!0}]).then((async t=>{const{title:n}=t,r=n.toString().toLowerCase().trim().replace(/\s+/g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-").replace(/^-+/,"").replace(/-+$/,"");const i=o.join(process.cwd(),r);let a;s.existsSync(i)&&(e.fail(_t.red(`Project "${r}" already exists.`)),process.exit(1)),!0===t.savePath&&(t.path=i),delete t.savePath;try{a=await of.post("/themes",t)}catch(t){e.fail(_t.red(`Failed to create theme on server: ${t.message}`)),process.exit(1)}const{version:c,theme:l}=a.data,u=l.platform.githubRepo;try{let e=zr("Creating Qumra Theme...").start();d.exec(`git clone ${u} ${r}`,((t,n,a)=>{t&&(e.fail(_t.red(`Failed to clone repository: ${t.message}`)),process.exit(1)),e.succeed("Repository cloned successfully.");const u=o.join(i,".git");try{p=u,s.existsSync(p)&&s.rmSync(p,{recursive:!0,force:!0})}catch(e){console.error(_t.red(`Failed to remove .git folder: ${e.message}`)),process.exit(1)}var p;const h={themeId:l._id,version:c},f=o.join(i,"qumra.config.json");try{s.writeFileSync(f,JSON.stringify(h,null,2),"utf-8"),zr().succeed("Created qumra.config.json successfully.")}catch(e){console.error(_t.red(`Failed to create qumra.config.json: ${e.message}`)),process.exit(1)}yl.prompt([{type:"confirm",name:"install",message:"Do you want to run npm install?",default:!0}]).then((({install:e})=>{if(e){const e=zr("Installing dependencies...").start();d.exec(`cd "${r}" && npm install --force`,((t,n,i)=>{t&&(e.fail(_t.red(`Failed to install dependencies: ${t.message}`)),process.exit(1)),e.succeed(_t.blue(`Qumra Theme "${r}" created successfully. Thank you for choosing Qumra!`))}))}else zr().succeed(_t.blue(`Qumra Theme "${r}" created successfully. Thank you for choosing Qumra!`))})).catch((e=>{console.error(_t.red(`Error during install prompt: ${e.message}`)),process.exit(1)}))}))}catch(t){e.fail(_t.red(`Failed to create project "${r}": ${t.message}`)),process.exit(1)}})).catch((e=>{console.error("🚀 ~ .then ~ err:",e),process.exit(1)}))};var yf="object"==typeof process&&process&&"win32"===process.platform?{sep:"\\"}:{sep:"/"},vf=bf;function bf(e,t,n){e instanceof RegExp&&(e=_f(e,n)),t instanceof RegExp&&(t=_f(t,n));var r=wf(e,t,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+e.length,r[1]),post:n.slice(r[1]+t.length)}}function _f(e,t){var n=t.match(e);return n?n[0]:null}function wf(e,t,n){var r,i,s,o,a,c=n.indexOf(e),l=n.indexOf(t,c+1),u=c;if(c>=0&&l>0){if(e===t)return[c,l];for(r=[],s=n.length;u>=0&&!a;)u==c?(r.push(u),c=n.indexOf(e,u+1)):1==r.length?a=[r.pop(),l]:((i=r.pop())<s&&(s=i,o=l),l=n.indexOf(t,u+1)),u=c<l&&c>=0?c:l;r.length&&(a=[s,o])}return a}bf.range=wf;var xf=vf,Ef=function(e){if(!e)return[];"{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2));return jf(function(e){return e.split("\\\\").join(Sf).split("\\{").join(Tf).split("\\}").join(Df).split("\\,").join(kf).split("\\.").join(Af)}(e),!0).map(Rf)},Sf="\0SLASH"+Math.random()+"\0",Tf="\0OPEN"+Math.random()+"\0",Df="\0CLOSE"+Math.random()+"\0",kf="\0COMMA"+Math.random()+"\0",Af="\0PERIOD"+Math.random()+"\0";function Cf(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function Rf(e){return e.split(Sf).join("\\").split(Tf).join("{").split(Df).join("}").split(kf).join(",").split(Af).join(".")}function Of(e){if(!e)return[""];var t=[],n=xf("{","}",e);if(!n)return e.split(",");var r=n.pre,i=n.body,s=n.post,o=r.split(",");o[o.length-1]+="{"+i+"}";var a=Of(s);return s.length&&(o[o.length-1]+=a.shift(),o.push.apply(o,a)),t.push.apply(t,o),t}function Lf(e){return"{"+e+"}"}function If(e){return/^-?0\d/.test(e)}function Pf(e,t){return e<=t}function Nf(e,t){return e>=t}function jf(e,t){var n=[],r=xf("{","}",e);if(!r)return[e];var i=r.pre,s=r.post.length?jf(r.post,!1):[""];if(/\$$/.test(r.pre))for(var o=0;o<s.length;o++){var a=i+"{"+r.body+"}"+s[o];n.push(a)}else{var c,l,u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(r.body),p=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(r.body),h=u||p,d=r.body.indexOf(",")>=0;if(!h&&!d)return r.post.match(/,.*\}/)?jf(e=r.pre+"{"+r.body+Df+r.post):[e];if(h)c=r.body.split(/\.\./);else if(1===(c=Of(r.body)).length&&1===(c=jf(c[0],!1).map(Lf)).length)return s.map((function(e){return r.pre+c[0]+e}));if(h){var f=Cf(c[0]),m=Cf(c[1]),g=Math.max(c[0].length,c[1].length),y=3==c.length?Math.abs(Cf(c[2])):1,v=Pf;m<f&&(y*=-1,v=Nf);var b=c.some(If);l=[];for(var _=f;v(_,m);_+=y){var w;if(p)"\\"===(w=String.fromCharCode(_))&&(w="");else if(w=String(_),b){var x=g-w.length;if(x>0){var E=new Array(x+1).join("0");w=_<0?"-"+E+w.slice(1):E+w}}l.push(w)}}else{l=[];for(var S=0;S<c.length;S++)l.push.apply(l,jf(c[S],!1))}for(S=0;S<l.length;S++)for(o=0;o<s.length;o++){a=i+l[S]+s[o];(!t||h||a)&&n.push(a)}}return n}const Ff=(e,t,n={})=>(Qf(t),!(!n.nocomment&&"#"===t.charAt(0))&&new em(t,n).match(e));var Bf=Ff;const Mf=yf;Ff.sep=Mf.sep;const Uf=Symbol("globstar **");Ff.GLOBSTAR=Uf;const qf=Ef,Hf={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},$f="[^/]",zf=$f+"*?",Wf=e=>e.split("").reduce(((e,t)=>(e[t]=!0,e)),{}),Gf=Wf("().*{}+?[]^$\\!"),Vf=Wf("[.("),Kf=/\/+/;Ff.filter=(e,t={})=>(n,r,i)=>Ff(n,e,t);const Yf=(e,t={})=>{const n={};return Object.keys(e).forEach((t=>n[t]=e[t])),Object.keys(t).forEach((e=>n[e]=t[e])),n};Ff.defaults=e=>{if(!e||"object"!=typeof e||!Object.keys(e).length)return Ff;const t=Ff,n=(n,r,i)=>t(n,r,Yf(e,i));return n.Minimatch=class extends t.Minimatch{constructor(t,n){super(t,Yf(e,n))}},n.Minimatch.defaults=n=>t.defaults(Yf(e,n)).Minimatch,n.filter=(n,r)=>t.filter(n,Yf(e,r)),n.defaults=n=>t.defaults(Yf(e,n)),n.makeRe=(n,r)=>t.makeRe(n,Yf(e,r)),n.braceExpand=(n,r)=>t.braceExpand(n,Yf(e,r)),n.match=(n,r,i)=>t.match(n,r,Yf(e,i)),n},Ff.braceExpand=(e,t)=>Zf(e,t);const Zf=(e,t={})=>(Qf(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:qf(e)),Qf=e=>{if("string"!=typeof e)throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")},Jf=Symbol("subparse");Ff.makeRe=(e,t)=>new em(e,t||{}).makeRe(),Ff.match=(e,t,n={})=>{const r=new em(t,n);return e=e.filter((e=>r.match(e))),r.options.nonull&&!e.length&&e.push(t),e};const Xf=e=>e.replace(/[[\]\\]/g,"\\$&");let em=class{constructor(e,t){Qf(e),t||(t={}),this.options=t,this.set=[],this.pattern=e,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||!1===t.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}debug(){}make(){const e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate();let n=this.globSet=this.braceExpand();t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,n),n=this.globParts=n.map((e=>e.split(Kf))),this.debug(this.pattern,n),n=n.map(((e,t,n)=>e.map(this.parse,this))),this.debug(this.pattern,n),n=n.filter((e=>-1===e.indexOf(!1))),this.debug(this.pattern,n),this.set=n}parseNegate(){if(this.options.nonegate)return;const e=this.pattern;let t=!1,n=0;for(let r=0;r<e.length&&"!"===e.charAt(r);r++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}matchOne(e,t,n){var r=this.options;this.debug("matchOne",{this:this,file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var i=0,s=0,o=e.length,a=t.length;i<o&&s<a;i++,s++){this.debug("matchOne loop");var c,l=t[s],u=e[i];if(this.debug(t,l,u),!1===l)return!1;if(l===Uf){this.debug("GLOBSTAR",[t,l,u]);var p=i,h=s+1;if(h===a){for(this.debug("** at the end");i<o;i++)if("."===e[i]||".."===e[i]||!r.dot&&"."===e[i].charAt(0))return!1;return!0}for(;p<o;){var d=e[p];if(this.debug("\nglobstar while",e,p,t,h,d),this.matchOne(e.slice(p),t.slice(h),n))return this.debug("globstar found match!",p,o,d),!0;if("."===d||".."===d||!r.dot&&"."===d.charAt(0)){this.debug("dot detected!",e,p,t,h);break}this.debug("globstar swallow a segment, and continue"),p++}return!(!n||(this.debug("\n>>> no match, partial?",e,p,t,h),p!==o))}if("string"==typeof l?(c=u===l,this.debug("string match",l,u,c)):(c=u.match(l),this.debug("pattern match",l,u,c)),!c)return!1}if(i===o&&s===a)return!0;if(i===o)return n;if(s===a)return i===o-1&&""===e[i];throw new Error("wtf?")}braceExpand(){return Zf(this.pattern,this.options)}parse(e,t){Qf(e);const n=this.options;if("**"===e){if(!n.noglobstar)return Uf;e="*"}if(""===e)return"";let r="",i=!1,s=!1;const o=[],a=[];let c,l,u,p,h=!1,d=-1,f=-1,m="."===e.charAt(0),g=n.dot||m;const y=e=>"."===e.charAt(0)?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",v=()=>{if(c){switch(c){case"*":r+=zf,i=!0;break;case"?":r+=$f,i=!0;break;default:r+="\\"+c}this.debug("clearStateChar %j %j",c,r),c=!1}};for(let t,p=0;p<e.length&&(t=e.charAt(p));p++)if(this.debug("%s\t%s %s %j",e,p,r,t),s){if("/"===t)return!1;Gf[t]&&(r+="\\"),r+=t,s=!1}else switch(t){case"/":return!1;case"\\":if(h&&"-"===e.charAt(p+1)){r+=t;continue}v(),s=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",e,p,r,t),h){this.debug(" in class"),"!"===t&&p===f+1&&(t="^"),r+=t;continue}this.debug("call clearStateChar %j",c),v(),c=t,n.noext&&v();continue;case"(":{if(h){r+="(";continue}if(!c){r+="\\(";continue}const t={type:c,start:p-1,reStart:r.length,open:Hf[c].open,close:Hf[c].close};this.debug(this.pattern,"\t",t),o.push(t),r+=t.open,0===t.start&&"!"!==t.type&&(m=!0,r+=y(e.slice(p+1))),this.debug("plType %j %j",c,r),c=!1;continue}case")":{const e=o[o.length-1];if(h||!e){r+="\\)";continue}o.pop(),v(),i=!0,u=e,r+=u.close,"!"===u.type&&a.push(Object.assign(u,{reEnd:r.length}));continue}case"|":{const t=o[o.length-1];if(h||!t){r+="\\|";continue}v(),r+="|",0===t.start&&"!"!==t.type&&(m=!0,r+=y(e.slice(p+1)));continue}case"[":if(v(),h){r+="\\"+t;continue}h=!0,f=p,d=r.length,r+=t;continue;case"]":if(p===f+1||!h){r+="\\"+t;continue}l=e.substring(f+1,p);try{RegExp("["+Xf(l.replace(/\\([^-\]])/g,"$1"))+"]"),r+=t}catch(e){r=r.substring(0,d)+"(?:$.)"}i=!0,h=!1;continue;default:v(),!Gf[t]||"^"===t&&h||(r+="\\"),r+=t}for(h&&(l=e.slice(f+1),p=this.parse(l,Jf),r=r.substring(0,d)+"\\["+p[0],i=i||p[1]),u=o.pop();u;u=o.pop()){let e;e=r.slice(u.reStart+u.open.length),this.debug("setting tail",r,u),e=e.replace(/((?:\\{2}){0,64})(\\?)\|/g,((e,t,n)=>(n||(n="\\"),t+t+n+"|"))),this.debug("tail=%j\n %s",e,e,u,r);const t="*"===u.type?zf:"?"===u.type?$f:"\\"+u.type;i=!0,r=r.slice(0,u.reStart)+t+"\\("+e}v(),s&&(r+="\\\\");const b=Vf[r.charAt(0)];for(let e=a.length-1;e>-1;e--){const n=a[e],i=r.slice(0,n.reStart),s=r.slice(n.reStart,n.reEnd-8);let o=r.slice(n.reEnd);const c=r.slice(n.reEnd-8,n.reEnd)+o,l=i.split(")").length,u=i.split("(").length-l;let p=o;for(let e=0;e<u;e++)p=p.replace(/\)[+*?]?/,"");o=p;r=i+s+o+(""===o&&t!==Jf?"(?:$|\\/)":"")+c}if(""!==r&&i&&(r="(?=.)"+r),b&&(r=(m?"":g?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)")+r),t===Jf)return[r,i];if(n.nocase&&!i&&(i=e.toUpperCase()!==e.toLowerCase()),!i)return(e=>e.replace(/\\(.)/g,"$1"))(e);const _=n.nocase?"i":"";try{return Object.assign(new RegExp("^"+r+"$",_),{_glob:e,_src:r})}catch(e){return new RegExp("$.")}}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const e=this.set;if(!e.length)return this.regexp=!1,this.regexp;const t=this.options,n=t.noglobstar?zf:t.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",r=t.nocase?"i":"";let i=e.map((e=>(e=e.map((e=>"string"==typeof e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):e===Uf?Uf:e._src)).reduce(((e,t)=>(e[e.length-1]===Uf&&t===Uf||e.push(t),e)),[]),e.forEach(((t,r)=>{t===Uf&&e[r-1]!==Uf&&(0===r?e.length>1?e[r+1]="(?:\\/|"+n+"\\/)?"+e[r+1]:e[r]=n:r===e.length-1?e[r-1]+="(?:\\/|"+n+")?":(e[r-1]+="(?:\\/|\\/"+n+"\\/)"+e[r+1],e[r+1]=Uf))})),e.filter((e=>e!==Uf)).join("/")))).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,r)}catch(e){this.regexp=!1}return this.regexp}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;const n=this.options;"/"!==Mf.sep&&(e=e.split(Mf.sep).join("/")),e=e.split(Kf),this.debug(this.pattern,"split",e);const r=this.set;let i;this.debug(this.pattern,"set",r);for(let t=e.length-1;t>=0&&(i=e[t],!i);t--);for(let s=0;s<r.length;s++){const o=r[s];let a=e;n.matchBase&&1===o.length&&(a=[i]);if(this.matchOne(a,o,t))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate}static defaults(e){return Ff.defaults(e).Minimatch}};Ff.Minimatch=em;var tm=lm;const nm=s,{EventEmitter:rm}=p,{Minimatch:im}=Bf,{resolve:sm}=o;function om(e,t){return new Promise(((n,r)=>{(t?nm.stat:nm.lstat)(e,((r,i)=>{if(r)if("ENOENT"===r.code)n(t?om(e,!1):null);else n(null);else n(i)}))}))}async function*am(e,t,n,r,i,s){let o=await function(e,t){return new Promise(((n,r)=>{nm.readdir(e,{withFileTypes:!0},((e,i)=>{if(e)switch(e.code){case"ENOTDIR":t?r(e):n([]);break;case"ENOTSUP":case"ENOENT":case"ENAMETOOLONG":case"UNKNOWN":n([]);break;default:r(e)}else n(i)}))}))}(t+e,s);for(const s of o){let o=s.name;void 0===o&&(o=s,r=!0);const a=e+"/"+o,c=a.slice(1),l=t+"/"+c;let u=null;(r||n)&&(u=await om(l,n)),u||void 0===s.name||(u=s),null===u&&(u={isDirectory:()=>!1}),u.isDirectory()?i(c)||(yield{relative:c,absolute:l,stats:u},yield*am(a,t,n,r,i,!1)):yield{relative:c,absolute:l,stats:u}}}class cm extends rm{constructor(e,t,n){if(super(),"function"==typeof t&&(n=t,t=null),this.options=function(e){return{pattern:e.pattern,dot:!!e.dot,noglobstar:!!e.noglobstar,matchBase:!!e.matchBase,nocase:!!e.nocase,ignore:e.ignore,skip:e.skip,follow:!!e.follow,stat:!!e.stat,nodir:!!e.nodir,mark:!!e.mark,silent:!!e.silent,absolute:!!e.absolute}}(t||{}),this.matchers=[],this.options.pattern){const e=Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern];this.matchers=e.map((e=>new im(e,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase})))}if(this.ignoreMatchers=[],this.options.ignore){const e=Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore];this.ignoreMatchers=e.map((e=>new im(e,{dot:!0})))}if(this.skipMatchers=[],this.options.skip){const e=Array.isArray(this.options.skip)?this.options.skip:[this.options.skip];this.skipMatchers=e.map((e=>new im(e,{dot:!0})))}this.iterator=async function*(e,t,n,r){yield*am("",e,t,n,r,!0)}(sm(e||"."),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this)),this.paused=!1,this.inactive=!1,this.aborted=!1,n&&(this._matches=[],this.on("match",(e=>this._matches.push(this.options.absolute?e.absolute:e.relative))),this.on("error",(e=>n(e))),this.on("end",(()=>n(null,this._matches)))),setTimeout((()=>this._next()),0)}_shouldSkipDirectory(e){return this.skipMatchers.some((t=>t.match(e)))}_fileMatches(e,t){const n=e+(t?"/":"");return(0===this.matchers.length||this.matchers.some((e=>e.match(n))))&&!this.ignoreMatchers.some((e=>e.match(n)))&&(!this.options.nodir||!t)}_next(){this.paused||this.aborted?this.inactive=!0:this.iterator.next().then((e=>{if(e.done)this.emit("end");else{const t=e.value.stats.isDirectory();if(this._fileMatches(e.value.relative,t)){let n=e.value.relative,r=e.value.absolute;this.options.mark&&t&&(n+="/",r+="/"),this.options.stat?this.emit("match",{relative:n,absolute:r,stat:e.value.stats}):this.emit("match",{relative:n,absolute:r})}this._next(this.iterator)}})).catch((e=>{this.abort(),this.emit("error",e),e.code||this.options.silent||console.error(e)}))}abort(){this.aborted=!0}pause(){this.paused=!0}resume(){this.paused=!1,this.inactive&&(this.inactive=!1,this._next())}}function lm(e,t,n){return new cm(e,t,n)}function um(e,...t){return(...n)=>e(...t,...n)}function pm(e){return function(...t){var n=t.pop();return e.call(this,t,n)}}lm.ReaddirGlob=cm;var hm="function"==typeof queueMicrotask&&queueMicrotask,dm="function"==typeof setImmediate&&setImmediate,fm="object"==typeof process&&"function"==typeof process.nextTick;function mm(e){setTimeout(e,0)}function gm(e){return(t,...n)=>e((()=>t(...n)))}var ym=gm(hm?queueMicrotask:dm?setImmediate:fm?process.nextTick:mm);function vm(e){return wm(e)?function(...t){const n=t.pop();return bm(e.apply(this,t),n)}:pm((function(t,n){var r;try{r=e.apply(this,t)}catch(e){return n(e)}if(r&&"function"==typeof r.then)return bm(r,n);n(null,r)}))}function bm(e,t){return e.then((e=>{_m(t,null,e)}),(e=>{_m(t,e&&(e instanceof Error||e.message)?e:new Error(e))}))}function _m(e,t,n){try{e(t,n)}catch(e){ym((e=>{throw e}),e)}}function wm(e){return"AsyncFunction"===e[Symbol.toStringTag]}function xm(e){if("function"!=typeof e)throw new Error("expected a function");return wm(e)?vm(e):e}function Em(e,t){if(t||(t=e.length),!t)throw new Error("arity is undefined");return function(...n){return"function"==typeof n[t-1]?e.apply(this,n):new Promise(((r,i)=>{n[t-1]=(e,...t)=>{if(e)return i(e);r(t.length>1?t:t[0])},e.apply(this,n)}))}}function Sm(e){return function(t,...n){return Em((function(r){var i=this;return e(t,((e,t)=>{xm(e).apply(i,n.concat(t))}),r)}))}}function Tm(e,t,n,r){t=t||[];var i=[],s=0,o=xm(n);return e(t,((e,t,n)=>{var r=s++;o(e,((e,t)=>{i[r]=t,n(e)}))}),(e=>{r(e,i)}))}function Dm(e){return e&&"number"==typeof e.length&&e.length>=0&&e.length%1==0}const km={};function Am(e){function t(...t){if(null!==e){var n=e;e=null,n.apply(this,t)}}return Object.assign(t,e),t}function Cm(e){if(Dm(e))return function(e){var t=-1,n=e.length;return function(){return++t<n?{value:e[t],key:t}:null}}(e);var t=function(e){return e[Symbol.iterator]&&e[Symbol.iterator]()}(e);return t?function(e){var t=-1;return function(){var n=e.next();return n.done?null:(t++,{value:n.value,key:t})}}(t):function(e){var t=e?Object.keys(e):[],n=-1,r=t.length;return function i(){var s=t[++n];return"__proto__"===s?i():n<r?{value:e[s],key:s}:null}}(e)}function Rm(e){return function(...t){if(null===e)throw new Error("Callback was already called.");var n=e;e=null,n.apply(this,t)}}function Om(e,t,n,r){let i=!1,s=!1,o=!1,a=0,c=0;function l(){a>=t||o||i||(o=!0,e.next().then((({value:e,done:t})=>{if(!s&&!i){if(o=!1,t)return i=!0,void(a<=0&&r(null));a++,n(e,c,u),c++,l()}})).catch(p))}function u(e,t){if(a-=1,!s)return e?p(e):!1===e?(i=!0,void(s=!0)):t===km||i&&a<=0?(i=!0,r(null)):void l()}function p(e){s||(o=!1,i=!0,r(e))}l()}var Lm=e=>(t,n,r)=>{if(r=Am(r),e<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return r(null);if("AsyncGenerator"===t[Symbol.toStringTag])return Om(t,e,n,r);if(function(e){return"function"==typeof e[Symbol.asyncIterator]}(t))return Om(t[Symbol.asyncIterator](),e,n,r);var i=Cm(t),s=!1,o=!1,a=0,c=!1;function l(e,t){if(!o)if(a-=1,e)s=!0,r(e);else if(!1===e)s=!0,o=!0;else{if(t===km||s&&a<=0)return s=!0,r(null);c||u()}}function u(){for(c=!0;a<e&&!s;){var t=i();if(null===t)return s=!0,void(a<=0&&r(null));a+=1,n(t.value,t.key,Rm(l))}c=!1}u()};var Im=Em((function(e,t,n,r){return Lm(t)(e,xm(n),r)}),4);function Pm(e,t,n){n=Am(n);var r=0,i=0,{length:s}=e,o=!1;function a(e,t){!1===e&&(o=!0),!0!==o&&(e?n(e):++i!==s&&t!==km||n(null))}for(0===s&&n(null);r<s;r++)t(e[r],r,Rm(a))}function Nm(e,t,n){return Im(e,1/0,t,n)}var jm=Em((function(e,t,n){return(Dm(e)?Pm:Nm)(e,xm(t),n)}),3);var Fm=Em((function(e,t,n){return Tm(jm,e,t,n)}),3),Bm=Sm(Fm);var Mm=Em((function(e,t,n){return Im(e,1,t,n)}),3);var Um=Em((function(e,t,n){return Tm(Mm,e,t,n)}),3),qm=Sm(Um);const Hm=Symbol("promiseCallback");function $m(){let e,t;function n(n,...r){if(n)return t(n);e(r.length>1?r:r[0])}return n[Hm]=new Promise(((n,r)=>{e=n,t=r})),n}function zm(e,t,n){"number"!=typeof t&&(n=t,t=null),n=Am(n||$m());var r=Object.keys(e).length;if(!r)return n(null);t||(t=r);var i={},s=0,o=!1,a=!1,c=Object.create(null),l=[],u=[],p={};function h(e,t){l.push((()=>function(e,t){if(a)return;var r=Rm(((t,...r)=>{if(s--,!1!==t)if(r.length<2&&([r]=r),t){var l={};if(Object.keys(i).forEach((e=>{l[e]=i[e]})),l[e]=r,a=!0,c=Object.create(null),o)return;n(t,l)}else i[e]=r,(c[e]||[]).forEach((e=>e())),d();else o=!0}));s++;var l=xm(t[t.length-1]);t.length>1?l(i,r):l(r)}(e,t)))}function d(){if(!o){if(0===l.length&&0===s)return n(null,i);for(;l.length&&s<t;){l.shift()()}}}function f(t){var n=[];return Object.keys(e).forEach((r=>{const i=e[r];Array.isArray(i)&&i.indexOf(t)>=0&&n.push(r)})),n}return Object.keys(e).forEach((t=>{var n=e[t];if(!Array.isArray(n))return h(t,[n]),void u.push(t);var r=n.slice(0,n.length-1),i=r.length;if(0===i)return h(t,n),void u.push(t);p[t]=i,r.forEach((s=>{if(!e[s])throw new Error("async.auto task `"+t+"` has a non-existent dependency `"+s+"` in "+r.join(", "));!function(e,t){var n=c[e];n||(n=c[e]=[]);n.push(t)}(s,(()=>{0===--i&&h(t,n)}))}))})),function(){var e=0;for(;u.length;)e++,f(u.pop()).forEach((e=>{0==--p[e]&&u.push(e)}));if(e!==r)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}(),d(),n[Hm]}var Wm=/^(?:async\s)?(?:function)?\s*(?:\w+\s*)?\(([^)]+)\)(?:\s*{)/,Gm=/^(?:async\s)?\s*(?:\(\s*)?((?:[^)=\s]\s*)*)(?:\)\s*)?=>/,Vm=/,/,Km=/(=.+)?(\s*)$/;function Ym(e,t){var n={};return Object.keys(e).forEach((t=>{var r,i=e[t],s=wm(i),o=!s&&1===i.length||s&&0===i.length;if(Array.isArray(i))r=[...i],i=r.pop(),n[t]=r.concat(r.length>0?a:i);else if(o)n[t]=i;else{if(r=function(e){const t=function(e){let t="",n=0,r=e.indexOf("*/");for(;n<e.length;)if("/"===e[n]&&"/"===e[n+1]){let t=e.indexOf("\n",n);n=-1===t?e.length:t}else if(-1!==r&&"/"===e[n]&&"*"===e[n+1]){let i=e.indexOf("*/",n);-1!==i?(n=i+2,r=e.indexOf("*/",n)):(t+=e[n],n++)}else t+=e[n],n++;return t}(e.toString());let n=t.match(Wm);if(n||(n=t.match(Gm)),!n)throw new Error("could not parse args in autoInject\nSource:\n"+t);let[,r]=n;return r.replace(/\s/g,"").split(Vm).map((e=>e.replace(Km,"").trim()))}(i),0===i.length&&!s&&0===r.length)throw new Error("autoInject task functions require explicit parameters.");s||r.pop(),n[t]=r.concat(a)}function a(e,t){var n=r.map((t=>e[t]));n.push(t),xm(i)(...n)}})),zm(n,t)}class Zm{constructor(){this.head=this.tail=null,this.length=0}removeLink(e){return e.prev?e.prev.next=e.next:this.head=e.next,e.next?e.next.prev=e.prev:this.tail=e.prev,e.prev=e.next=null,this.length-=1,e}empty(){for(;this.head;)this.shift();return this}insertAfter(e,t){t.prev=e,t.next=e.next,e.next?e.next.prev=t:this.tail=t,e.next=t,this.length+=1}insertBefore(e,t){t.prev=e.prev,t.next=e,e.prev?e.prev.next=t:this.head=t,e.prev=t,this.length+=1}unshift(e){this.head?this.insertBefore(this.head,e):Qm(this,e)}push(e){this.tail?this.insertAfter(this.tail,e):Qm(this,e)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var e=this.head;e;)yield e.data,e=e.next}remove(e){for(var t=this.head;t;){var{next:n}=t;e(t)&&this.removeLink(t),t=n}return this}}function Qm(e,t){e.length=1,e.head=e.tail=t}function Jm(e,t,n){if(null==t)t=1;else if(0===t)throw new RangeError("Concurrency must not be zero");var r=xm(e),i=0,s=[];const o={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function a(e,t){return e?t?void(o[e]=o[e].filter((e=>e!==t))):o[e]=[]:Object.keys(o).forEach((e=>o[e]=[]))}function c(e,...t){o[e].forEach((e=>e(...t)))}var l=!1;function u(e,t,n,r){if(null!=r&&"function"!=typeof r)throw new Error("task callback must be a function");var i,s;function o(e,...t){return e?n?s(e):i():t.length<=1?i(t[0]):void i(t)}m.started=!0;var a=m._createTaskItem(e,n?o:r||o);if(t?m._tasks.unshift(a):m._tasks.push(a),l||(l=!0,ym((()=>{l=!1,m.process()}))),n||!r)return new Promise(((e,t)=>{i=e,s=t}))}function p(e){return function(t,...n){i-=1;for(var r=0,o=e.length;r<o;r++){var a=e[r],l=s.indexOf(a);0===l?s.shift():l>0&&s.splice(l,1),a.callback(t,...n),null!=t&&c("error",t,a.data)}i<=m.concurrency-m.buffer&&c("unsaturated"),m.idle()&&c("drain"),m.process()}}function h(e){return!(0!==e.length||!m.idle())&&(ym((()=>c("drain"))),!0)}const d=e=>t=>{if(!t)return new Promise(((t,n)=>{!function(e,t){const n=(...r)=>{a(e,n),t(...r)};o[e].push(n)}(e,((e,r)=>{if(e)return n(e);t(r)}))}));a(e),function(e,t){o[e].push(t)}(e,t)};var f=!1,m={_tasks:new Zm,_createTaskItem:(e,t)=>({data:e,callback:t}),*[Symbol.iterator](){yield*m._tasks[Symbol.iterator]()},concurrency:t,payload:n,buffer:t/4,started:!1,paused:!1,push(e,t){if(Array.isArray(e)){if(h(e))return;return e.map((e=>u(e,!1,!1,t)))}return u(e,!1,!1,t)},pushAsync(e,t){if(Array.isArray(e)){if(h(e))return;return e.map((e=>u(e,!1,!0,t)))}return u(e,!1,!0,t)},kill(){a(),m._tasks.empty()},unshift(e,t){if(Array.isArray(e)){if(h(e))return;return e.map((e=>u(e,!0,!1,t)))}return u(e,!0,!1,t)},unshiftAsync(e,t){if(Array.isArray(e)){if(h(e))return;return e.map((e=>u(e,!0,!0,t)))}return u(e,!0,!0,t)},remove(e){m._tasks.remove(e)},process(){if(!f){for(f=!0;!m.paused&&i<m.concurrency&&m._tasks.length;){var e=[],t=[],n=m._tasks.length;m.payload&&(n=Math.min(n,m.payload));for(var o=0;o<n;o++){var a=m._tasks.shift();e.push(a),s.push(a),t.push(a.data)}i+=1,0===m._tasks.length&&c("empty"),i===m.concurrency&&c("saturated");var l=Rm(p(e));r(t,l)}f=!1}},length:()=>m._tasks.length,running:()=>i,workersList:()=>s,idle:()=>m._tasks.length+i===0,pause(){m.paused=!0},resume(){!1!==m.paused&&(m.paused=!1,ym(m.process))}};return Object.defineProperties(m,{saturated:{writable:!1,value:d("saturated")},unsaturated:{writable:!1,value:d("unsaturated")},empty:{writable:!1,value:d("empty")},drain:{writable:!1,value:d("drain")},error:{writable:!1,value:d("error")}}),m}function Xm(e,t){return Jm(e,1,t)}function eg(e,t,n){return Jm(e,t,n)}var tg=Em((function(e,t,n,r){r=Am(r);var i=xm(n);return Mm(e,((e,n,r)=>{i(t,e,((e,n)=>{t=n,r(e)}))}),(e=>r(e,t)))}),4);function ng(...e){var t=e.map(xm);return function(...e){var n=this,r=e[e.length-1];return"function"==typeof r?e.pop():r=$m(),tg(t,e,((e,t,r)=>{t.apply(n,e.concat(((e,...t)=>{r(e,t)})))}),((e,t)=>r(e,...t))),r[Hm]}}function rg(...e){return ng(...e.reverse())}var ig=Em((function(e,t,n,r){return Tm(Lm(t),e,n,r)}),4);var sg=Em((function(e,t,n,r){var i=xm(n);return ig(e,t,((e,t)=>{i(e,((e,...n)=>e?t(e):t(e,n)))}),((e,t)=>{for(var n=[],i=0;i<t.length;i++)t[i]&&(n=n.concat(...t[i]));return r(e,n)}))}),4);var og=Em((function(e,t,n){return sg(e,1/0,t,n)}),3);var ag=Em((function(e,t,n){return sg(e,1,t,n)}),3);function cg(...e){return function(...t){return t.pop()(null,...e)}}function lg(e,t){return(n,r,i,s)=>{var o,a=!1;const c=xm(i);n(r,((n,r,i)=>{c(n,((r,s)=>r||!1===r?i(r):e(s)&&!o?(a=!0,o=t(!0,n),i(null,km)):void i()))}),(e=>{if(e)return s(e);s(null,a?o:t(!1))}))}}var ug=Em((function(e,t,n){return lg((e=>e),((e,t)=>t))(jm,e,t,n)}),3);var pg=Em((function(e,t,n,r){return lg((e=>e),((e,t)=>t))(Lm(t),e,n,r)}),4);var hg=Em((function(e,t,n){return lg((e=>e),((e,t)=>t))(Lm(1),e,t,n)}),3);function dg(e){return(t,...n)=>xm(t)(...n,((t,...n)=>{"object"==typeof console&&(t?console.error&&console.error(t):console[e]&&n.forEach((t=>console[e](t))))}))}var fg=dg("dir");var mg=Em((function(e,t,n){n=Rm(n);var r,i=xm(e),s=xm(t);function o(e,...t){if(e)return n(e);!1!==e&&(r=t,s(...t,a))}function a(e,t){return e?n(e):!1!==e?t?void i(o):n(null,...r):void 0}return a(null,!0)}),3);function gg(e,t,n){const r=xm(t);return mg(e,((...e)=>{const t=e.pop();r(...e,((e,n)=>t(e,!n)))}),n)}function yg(e){return(t,n,r)=>e(t,r)}var vg=Em((function(e,t,n){return jm(e,yg(xm(t)),n)}),3);var bg=Em((function(e,t,n,r){return Lm(t)(e,yg(xm(n)),r)}),4);var _g=Em((function(e,t,n){return bg(e,1,t,n)}),3);function wg(e){return wm(e)?e:function(...t){var n=t.pop(),r=!0;t.push(((...e)=>{r?ym((()=>n(...e))):n(...e)})),e.apply(this,t),r=!1}}var xg=Em((function(e,t,n){return lg((e=>!e),(e=>!e))(jm,e,t,n)}),3);var Eg=Em((function(e,t,n,r){return lg((e=>!e),(e=>!e))(Lm(t),e,n,r)}),4);var Sg=Em((function(e,t,n){return lg((e=>!e),(e=>!e))(Mm,e,t,n)}),3);function Tg(e,t,n,r){var i=new Array(t.length);e(t,((e,t,r)=>{n(e,((e,n)=>{i[t]=!!n,r(e)}))}),(e=>{if(e)return r(e);for(var n=[],s=0;s<t.length;s++)i[s]&&n.push(t[s]);r(null,n)}))}function Dg(e,t,n,r){var i=[];e(t,((e,t,r)=>{n(e,((n,s)=>{if(n)return r(n);s&&i.push({index:t,value:e}),r(n)}))}),(e=>{if(e)return r(e);r(null,i.sort(((e,t)=>e.index-t.index)).map((e=>e.value)))}))}function kg(e,t,n,r){return(Dm(t)?Tg:Dg)(e,t,xm(n),r)}var Ag=Em((function(e,t,n){return kg(jm,e,t,n)}),3);var Cg=Em((function(e,t,n,r){return kg(Lm(t),e,n,r)}),4);var Rg=Em((function(e,t,n){return kg(Mm,e,t,n)}),3);var Og=Em((function(e,t){var n=Rm(t),r=xm(wg(e));return function e(t){if(t)return n(t);!1!==t&&r(e)}()}),2);var Lg=Em((function(e,t,n,r){var i=xm(n);return ig(e,t,((e,t)=>{i(e,((n,r)=>n?t(n):t(n,{key:r,val:e})))}),((e,t)=>{for(var n={},{hasOwnProperty:i}=Object.prototype,s=0;s<t.length;s++)if(t[s]){var{key:o}=t[s],{val:a}=t[s];i.call(n,o)?n[o].push(a):n[o]=[a]}return r(e,n)}))}),4);function Ig(e,t,n){return Lg(e,1/0,t,n)}function Pg(e,t,n){return Lg(e,1,t,n)}var Ng=dg("log");var jg=Em((function(e,t,n,r){r=Am(r);var i={},s=xm(n);return Lm(t)(e,((e,t,n)=>{s(e,t,((e,r)=>{if(e)return n(e);i[t]=r,n(e)}))}),(e=>r(e,i)))}),4);function Fg(e,t,n){return jg(e,1/0,t,n)}function Bg(e,t,n){return jg(e,1,t,n)}function Mg(e,t=e=>e){var n=Object.create(null),r=Object.create(null),i=xm(e),s=pm(((e,s)=>{var o=t(...e);o in n?ym((()=>s(null,...n[o]))):o in r?r[o].push(s):(r[o]=[s],i(...e,((e,...t)=>{e||(n[o]=t);var i=r[o];delete r[o];for(var s=0,a=i.length;s<a;s++)i[s](e,...t)})))}));return s.memo=n,s.unmemoized=e,s}var Ug=gm(fm?process.nextTick:dm?setImmediate:mm),qg=Em(((e,t,n)=>{var r=Dm(t)?[]:{};e(t,((e,t,n)=>{xm(e)(((e,...i)=>{i.length<2&&([i]=i),r[t]=i,n(e)}))}),(e=>n(e,r)))}),3);function Hg(e,t){return qg(jm,e,t)}function $g(e,t,n){return qg(Lm(t),e,n)}function zg(e,t){var n=xm(e);return Jm(((e,t)=>{n(e[0],t)}),t,1)}class Wg{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(e){let t;for(;e>0&&Kg(this.heap[e],this.heap[t=Vg(e)]);){let n=this.heap[e];this.heap[e]=this.heap[t],this.heap[t]=n,e=t}}percDown(e){let t;for(;(t=Gg(e))<this.heap.length&&(t+1<this.heap.length&&Kg(this.heap[t+1],this.heap[t])&&(t+=1),!Kg(this.heap[e],this.heap[t]));){let n=this.heap[e];this.heap[e]=this.heap[t],this.heap[t]=n,e=t}}push(e){e.pushCount=++this.pushCount,this.heap.push(e),this.percUp(this.heap.length-1)}unshift(e){return this.heap.push(e)}shift(){let[e]=this.heap;return this.heap[0]=this.heap[this.heap.length-1],this.heap.pop(),this.percDown(0),e}toArray(){return[...this]}*[Symbol.iterator](){for(let e=0;e<this.heap.length;e++)yield this.heap[e].data}remove(e){let t=0;for(let n=0;n<this.heap.length;n++)e(this.heap[n])||(this.heap[t]=this.heap[n],t++);this.heap.splice(t);for(let e=Vg(this.heap.length-1);e>=0;e--)this.percDown(e);return this}}function Gg(e){return 1+(e<<1)}function Vg(e){return(e+1>>1)-1}function Kg(e,t){return e.priority!==t.priority?e.priority<t.priority:e.pushCount<t.pushCount}function Yg(e,t){var n=zg(e,t),{push:r,pushAsync:i}=n;function s(e,t){return Array.isArray(e)?e.map((e=>({data:e,priority:t}))):{data:e,priority:t}}return n._tasks=new Wg,n._createTaskItem=({data:e,priority:t},n)=>({data:e,priority:t,callback:n}),n.push=function(e,t=0,n){return r(s(e,t),n)},n.pushAsync=function(e,t=0,n){return i(s(e,t),n)},delete n.unshift,delete n.unshiftAsync,n}var Zg=Em((function(e,t){if(t=Am(t),!Array.isArray(e))return t(new TypeError("First argument to race must be an array of functions"));if(!e.length)return t();for(var n=0,r=e.length;n<r;n++)xm(e[n])(t)}),2);function Qg(e,t,n,r){var i=[...e].reverse();return tg(i,t,n,r)}function Jg(e){var t=xm(e);return pm((function(e,n){return e.push(((e,...t)=>{let r={};if(e&&(r.error=e),t.length>0){var i=t;t.length<=1&&([i]=t),r.value=i}n(null,r)})),t.apply(this,e)}))}function Xg(e){var t;return Array.isArray(e)?t=e.map(Jg):(t={},Object.keys(e).forEach((n=>{t[n]=Jg.call(this,e[n])}))),t}function ey(e,t,n,r){const i=xm(n);return kg(e,t,((e,t)=>{i(e,((e,n)=>{t(e,!n)}))}),r)}var ty=Em((function(e,t,n){return ey(jm,e,t,n)}),3);var ny=Em((function(e,t,n,r){return ey(Lm(t),e,n,r)}),4);var ry=Em((function(e,t,n){return ey(Mm,e,t,n)}),3);function iy(e){return function(){return e}}const sy=5,oy=0;function ay(e,t,n){var r={times:sy,intervalFunc:iy(oy)};if(arguments.length<3&&"function"==typeof e?(n=t||$m(),t=e):(!function(e,t){if("object"==typeof t)e.times=+t.times||sy,e.intervalFunc="function"==typeof t.interval?t.interval:iy(+t.interval||oy),e.errorFilter=t.errorFilter;else{if("number"!=typeof t&&"string"!=typeof t)throw new Error("Invalid arguments for async.retry");e.times=+t||sy}}(r,e),n=n||$m()),"function"!=typeof t)throw new Error("Invalid arguments for async.retry");var i=xm(t),s=1;return function e(){i(((t,...i)=>{!1!==t&&(t&&s++<r.times&&("function"!=typeof r.errorFilter||r.errorFilter(t))?setTimeout(e,r.intervalFunc(s-1)):n(t,...i))}))}(),n[Hm]}function cy(e,t){t||(t=e,e=null);let n=e&&e.arity||t.length;wm(t)&&(n+=1);var r=xm(t);return pm(((t,i)=>{function s(e){r(...t,e)}return(t.length<n-1||null==i)&&(t.push(i),i=$m()),e?ay(e,s,i):ay(s,i),i[Hm]}))}function ly(e,t){return qg(Mm,e,t)}var uy=Em((function(e,t,n){return lg(Boolean,(e=>e))(jm,e,t,n)}),3);var py=Em((function(e,t,n,r){return lg(Boolean,(e=>e))(Lm(t),e,n,r)}),4);var hy=Em((function(e,t,n){return lg(Boolean,(e=>e))(Mm,e,t,n)}),3);var dy=Em((function(e,t,n){var r=xm(t);return Fm(e,((e,t)=>{r(e,((n,r)=>{if(n)return t(n);t(n,{value:e,criteria:r})}))}),((e,t)=>{if(e)return n(e);n(null,t.sort(i).map((e=>e.value)))}));function i(e,t){var n=e.criteria,r=t.criteria;return n<r?-1:n>r?1:0}}),3);function fy(e,t,n){var r=xm(e);return pm(((i,s)=>{var o,a=!1;i.push(((...e)=>{a||(s(...e),clearTimeout(o))})),o=setTimeout((function(){var t=e.name||"anonymous",r=new Error('Callback function "'+t+'" timed out.');r.code="ETIMEDOUT",n&&(r.info=n),a=!0,s(r)}),t),r(...i)}))}function my(e,t,n,r){var i=xm(n);return ig(function(e){for(var t=Array(e);e--;)t[e]=e;return t}(e),t,i,r)}function gy(e,t,n){return my(e,1/0,t,n)}function yy(e,t,n){return my(e,1,t,n)}function vy(e,t,n,r){arguments.length<=3&&"function"==typeof t&&(r=n,n=t,t=Array.isArray(e)?[]:{}),r=Am(r||$m());var i=xm(n);return jm(e,((e,n,r)=>{i(t,e,n,r)}),(e=>r(e,t))),r[Hm]}var by=Em((function(e,t){var n,r=null;return _g(e,((e,t)=>{xm(e)(((e,...i)=>{if(!1===e)return t(e);i.length<2?[n]=i:n=i,r=e,t(e?null:{})}))}),(()=>t(r,n)))}));function _y(e){return(...t)=>(e.unmemoized||e)(...t)}var wy=Em((function(e,t,n){n=Rm(n);var r=xm(t),i=xm(e),s=[];function o(e,...t){if(e)return n(e);s=t,!1!==e&&i(a)}function a(e,t){return e?n(e):!1!==e?t?void r(o):n(null,...s):void 0}return i(a)}),3);function xy(e,t,n){const r=xm(e);return wy((e=>r(((t,n)=>e(t,!n)))),t,n)}var Ey=Em((function(e,t){if(t=Am(t),!Array.isArray(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();var n=0;function r(t){xm(e[n++])(...t,Rm(i))}function i(i,...s){if(!1!==i)return i||n===e.length?t(i,...s):void r(s)}r([])})),Sy={apply:um,applyEach:Bm,applyEachSeries:qm,asyncify:vm,auto:zm,autoInject:Ym,cargo:Xm,cargoQueue:eg,compose:rg,concat:og,concatLimit:sg,concatSeries:ag,constant:cg,detect:ug,detectLimit:pg,detectSeries:hg,dir:fg,doUntil:gg,doWhilst:mg,each:vg,eachLimit:bg,eachOf:jm,eachOfLimit:Im,eachOfSeries:Mm,eachSeries:_g,ensureAsync:wg,every:xg,everyLimit:Eg,everySeries:Sg,filter:Ag,filterLimit:Cg,filterSeries:Rg,forever:Og,groupBy:Ig,groupByLimit:Lg,groupBySeries:Pg,log:Ng,map:Fm,mapLimit:ig,mapSeries:Um,mapValues:Fg,mapValuesLimit:jg,mapValuesSeries:Bg,memoize:Mg,nextTick:Ug,parallel:Hg,parallelLimit:$g,priorityQueue:Yg,queue:zg,race:Zg,reduce:tg,reduceRight:Qg,reflect:Jg,reflectAll:Xg,reject:ty,rejectLimit:ny,rejectSeries:ry,retry:ay,retryable:cy,seq:ng,series:ly,setImmediate:ym,some:uy,someLimit:py,someSeries:hy,sortBy:dy,timeout:fy,times:gy,timesLimit:my,timesSeries:yy,transform:vy,tryEach:by,unmemoize:_y,until:xy,waterfall:Ey,whilst:wy,all:xg,allLimit:Eg,allSeries:Sg,any:uy,anyLimit:py,anySeries:hy,find:ug,findLimit:pg,findSeries:hg,flatMap:og,flatMapLimit:sg,flatMapSeries:ag,forEach:vg,forEachSeries:_g,forEachLimit:bg,forEachOf:jm,forEachOfSeries:Mm,forEachOfLimit:Im,inject:tg,foldl:tg,foldr:Qg,select:Ag,selectLimit:Cg,selectSeries:Rg,wrapSync:vm,during:wy,doDuring:mg},Ty=H(Object.freeze({__proto__:null,all:xg,allLimit:Eg,allSeries:Sg,any:uy,anyLimit:py,anySeries:hy,apply:um,applyEach:Bm,applyEachSeries:qm,asyncify:vm,auto:zm,autoInject:Ym,cargo:Xm,cargoQueue:eg,compose:rg,concat:og,concatLimit:sg,concatSeries:ag,constant:cg,default:Sy,detect:ug,detectLimit:pg,detectSeries:hg,dir:fg,doDuring:mg,doUntil:gg,doWhilst:mg,during:wy,each:vg,eachLimit:bg,eachOf:jm,eachOfLimit:Im,eachOfSeries:Mm,eachSeries:_g,ensureAsync:wg,every:xg,everyLimit:Eg,everySeries:Sg,filter:Ag,filterLimit:Cg,filterSeries:Rg,find:ug,findLimit:pg,findSeries:hg,flatMap:og,flatMapLimit:sg,flatMapSeries:ag,foldl:tg,foldr:Qg,forEach:vg,forEachLimit:bg,forEachOf:jm,forEachOfLimit:Im,forEachOfSeries:Mm,forEachSeries:_g,forever:Og,groupBy:Ig,groupByLimit:Lg,groupBySeries:Pg,inject:tg,log:Ng,map:Fm,mapLimit:ig,mapSeries:Um,mapValues:Fg,mapValuesLimit:jg,mapValuesSeries:Bg,memoize:Mg,nextTick:Ug,parallel:Hg,parallelLimit:$g,priorityQueue:Yg,queue:zg,race:Zg,reduce:tg,reduceRight:Qg,reflect:Jg,reflectAll:Xg,reject:ty,rejectLimit:ny,rejectSeries:ry,retry:ay,retryable:cy,select:Ag,selectLimit:Cg,selectSeries:Rg,seq:ng,series:ly,setImmediate:ym,some:uy,someLimit:py,someSeries:hy,sortBy:dy,timeout:fy,times:gy,timesLimit:my,timesSeries:yy,transform:vy,tryEach:by,unmemoize:_y,until:xy,waterfall:Ey,whilst:wy,wrapSync:vm})),Dy={exports:{}},ky=D,Ay=process.cwd,Cy=null,Ry=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return Cy||(Cy=Ay.call(process)),Cy};try{process.cwd()}catch(e){}if("function"==typeof process.chdir){var Oy=process.chdir;process.chdir=function(e){Cy=null,Oy.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,Oy)}var Ly=function(e){ky.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&function(e){e.lchmod=function(t,n,r){e.open(t,ky.O_WRONLY|ky.O_SYMLINK,n,(function(t,i){t?r&&r(t):e.fchmod(i,n,(function(t){e.close(i,(function(e){r&&r(t||e)}))}))}))},e.lchmodSync=function(t,n){var r,i=e.openSync(t,ky.O_WRONLY|ky.O_SYMLINK,n),s=!0;try{r=e.fchmodSync(i,n),s=!1}finally{if(s)try{e.closeSync(i)}catch(e){}else e.closeSync(i)}return r}}(e);e.lutimes||function(e){ky.hasOwnProperty("O_SYMLINK")&&e.futimes?(e.lutimes=function(t,n,r,i){e.open(t,ky.O_SYMLINK,(function(t,s){t?i&&i(t):e.futimes(s,n,r,(function(t){e.close(s,(function(e){i&&i(t||e)}))}))}))},e.lutimesSync=function(t,n,r){var i,s=e.openSync(t,ky.O_SYMLINK),o=!0;try{i=e.futimesSync(s,n,r),o=!1}finally{if(o)try{e.closeSync(s)}catch(e){}else e.closeSync(s)}return i}):e.futimes&&(e.lutimes=function(e,t,n,r){r&&process.nextTick(r)},e.lutimesSync=function(){})}(e);e.chown=r(e.chown),e.fchown=r(e.fchown),e.lchown=r(e.lchown),e.chmod=t(e.chmod),e.fchmod=t(e.fchmod),e.lchmod=t(e.lchmod),e.chownSync=i(e.chownSync),e.fchownSync=i(e.fchownSync),e.lchownSync=i(e.lchownSync),e.chmodSync=n(e.chmodSync),e.fchmodSync=n(e.fchmodSync),e.lchmodSync=n(e.lchmodSync),e.stat=s(e.stat),e.fstat=s(e.fstat),e.lstat=s(e.lstat),e.statSync=o(e.statSync),e.fstatSync=o(e.fstatSync),e.lstatSync=o(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(e,t,n){n&&process.nextTick(n)},e.lchmodSync=function(){});e.chown&&!e.lchown&&(e.lchown=function(e,t,n,r){r&&process.nextTick(r)},e.lchownSync=function(){});"win32"===Ry&&(e.rename="function"!=typeof e.rename?e.rename:function(t){function n(n,r,i){var s=Date.now(),o=0;t(n,r,(function a(c){if(c&&("EACCES"===c.code||"EPERM"===c.code||"EBUSY"===c.code)&&Date.now()-s<6e4)return setTimeout((function(){e.stat(r,(function(e,s){e&&"ENOENT"===e.code?t(n,r,a):i(c)}))}),o),void(o<100&&(o+=10));i&&i(c)}))}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n}(e.rename));function t(t){return t?function(n,r,i){return t.call(e,n,r,(function(e){a(e)&&(e=null),i&&i.apply(this,arguments)}))}:t}function n(t){return t?function(n,r){try{return t.call(e,n,r)}catch(e){if(!a(e))throw e}}:t}function r(t){return t?function(n,r,i,s){return t.call(e,n,r,i,(function(e){a(e)&&(e=null),s&&s.apply(this,arguments)}))}:t}function i(t){return t?function(n,r,i){try{return t.call(e,n,r,i)}catch(e){if(!a(e))throw e}}:t}function s(t){return t?function(n,r,i){function s(e,t){t&&(t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296)),i&&i.apply(this,arguments)}return"function"==typeof r&&(i=r,r=null),r?t.call(e,n,r,s):t.call(e,n,s)}:t}function o(t){return t?function(n,r){var i=r?t.call(e,n,r):t.call(e,n);return i&&(i.uid<0&&(i.uid+=4294967296),i.gid<0&&(i.gid+=4294967296)),i}:t}function a(e){return!e||("ENOSYS"===e.code||!(process.getuid&&0===process.getuid()||"EINVAL"!==e.code&&"EPERM"!==e.code))}e.read="function"!=typeof e.read?e.read:function(t){function n(n,r,i,s,o,a){var c;if(a&&"function"==typeof a){var l=0;c=function(u,p,h){if(u&&"EAGAIN"===u.code&&l<10)return l++,t.call(e,n,r,i,s,o,c);a.apply(this,arguments)}}return t.call(e,n,r,i,s,o,c)}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n}(e.read),e.readSync="function"!=typeof e.readSync?e.readSync:(c=e.readSync,function(t,n,r,i,s){for(var o=0;;)try{return c.call(e,t,n,r,i,s)}catch(e){if("EAGAIN"===e.code&&o<10){o++;continue}throw e}});var c};var Iy=h.Stream,Py=function(e){return{ReadStream:function t(n,r){if(!(this instanceof t))return new t(n,r);Iy.call(this);var i=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,r=r||{};for(var s=Object.keys(r),o=0,a=s.length;o<a;o++){var c=s[o];this[c]=r[c]}this.encoding&&this.setEncoding(this.encoding);if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(void 0===this.end)this.end=1/0;else if("number"!=typeof this.end)throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(null!==this.fd)return void process.nextTick((function(){i._read()}));e.open(this.path,this.flags,this.mode,(function(e,t){if(e)return i.emit("error",e),void(i.readable=!1);i.fd=t,i.emit("open",t),i._read()}))},WriteStream:function t(n,r){if(!(this instanceof t))return new t(n,r);Iy.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,r=r||{};for(var i=Object.keys(r),s=0,o=i.length;s<o;s++){var a=i[s];this[a]=r[a]}if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],null===this.fd&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}};var Ny=function(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Object)var t={__proto__:jy(e)};else t=Object.create(null);return Object.getOwnPropertyNames(e).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})),t},jy=Object.getPrototypeOf||function(e){return e.__proto__};var Fy,By,My=s,Uy=Ly,qy=Py,Hy=Ny,$y=y;function zy(e,t){Object.defineProperty(e,Fy,{get:function(){return t}})}"function"==typeof Symbol&&"function"==typeof Symbol.for?(Fy=Symbol.for("graceful-fs.queue"),By=Symbol.for("graceful-fs.previous")):(Fy="___graceful-fs.queue",By="___graceful-fs.previous");var Wy=function(){};if($y.debuglog?Wy=$y.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(Wy=function(){var e=$y.format.apply($y,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: "),console.error(e)}),!My[Fy]){var Gy=U[Fy]||[];zy(My,Gy),My.close=function(e){function t(t,n){return e.call(My,t,(function(e){e||Qy(),"function"==typeof n&&n.apply(this,arguments)}))}return Object.defineProperty(t,By,{value:e}),t}(My.close),My.closeSync=function(e){function t(t){e.apply(My,arguments),Qy()}return Object.defineProperty(t,By,{value:e}),t}(My.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",(function(){Wy(My[Fy]),u.equal(My[Fy].length,0)}))}U[Fy]||zy(U,My[Fy]);var Vy,Ky=Yy(Hy(My));function Yy(e){Uy(e),e.gracefulify=Yy,e.createReadStream=function(t,n){return new e.ReadStream(t,n)},e.createWriteStream=function(t,n){return new e.WriteStream(t,n)};var t=e.readFile;e.readFile=function(e,n,r){"function"==typeof n&&(r=n,n=null);return function e(n,r,i,s){return t(n,r,(function(t){!t||"EMFILE"!==t.code&&"ENFILE"!==t.code?"function"==typeof i&&i.apply(this,arguments):Zy([e,[n,r,i],t,s||Date.now(),Date.now()])}))}(e,n,r)};var n=e.writeFile;e.writeFile=function(e,t,r,i){"function"==typeof r&&(i=r,r=null);return function e(t,r,i,s,o){return n(t,r,i,(function(n){!n||"EMFILE"!==n.code&&"ENFILE"!==n.code?"function"==typeof s&&s.apply(this,arguments):Zy([e,[t,r,i,s],n,o||Date.now(),Date.now()])}))}(e,t,r,i)};var r=e.appendFile;r&&(e.appendFile=function(e,t,n,i){"function"==typeof n&&(i=n,n=null);return function e(t,n,i,s,o){return r(t,n,i,(function(r){!r||"EMFILE"!==r.code&&"ENFILE"!==r.code?"function"==typeof s&&s.apply(this,arguments):Zy([e,[t,n,i,s],r,o||Date.now(),Date.now()])}))}(e,t,n,i)});var i=e.copyFile;i&&(e.copyFile=function(e,t,n,r){"function"==typeof n&&(r=n,n=0);return function e(t,n,r,s,o){return i(t,n,r,(function(i){!i||"EMFILE"!==i.code&&"ENFILE"!==i.code?"function"==typeof s&&s.apply(this,arguments):Zy([e,[t,n,r,s],i,o||Date.now(),Date.now()])}))}(e,t,n,r)});var s=e.readdir;e.readdir=function(e,t,n){"function"==typeof t&&(n=t,t=null);var r=o.test(process.version)?function(e,t,n,r){return s(e,i(e,t,n,r))}:function(e,t,n,r){return s(e,t,i(e,t,n,r))};return r(e,t,n);function i(e,t,n,i){return function(s,o){!s||"EMFILE"!==s.code&&"ENFILE"!==s.code?(o&&o.sort&&o.sort(),"function"==typeof n&&n.call(this,s,o)):Zy([r,[e,t,n],s,i||Date.now(),Date.now()])}}};var o=/^v[0-5]\./;if("v0.8"===process.version.substr(0,4)){var a=qy(e);h=a.ReadStream,d=a.WriteStream}var c=e.ReadStream;c&&(h.prototype=Object.create(c.prototype),h.prototype.open=function(){var e=this;m(e.path,e.flags,e.mode,(function(t,n){t?(e.autoClose&&e.destroy(),e.emit("error",t)):(e.fd=n,e.emit("open",n),e.read())}))});var l=e.WriteStream;l&&(d.prototype=Object.create(l.prototype),d.prototype.open=function(){var e=this;m(e.path,e.flags,e.mode,(function(t,n){t?(e.destroy(),e.emit("error",t)):(e.fd=n,e.emit("open",n))}))}),Object.defineProperty(e,"ReadStream",{get:function(){return h},set:function(e){h=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return d},set:function(e){d=e},enumerable:!0,configurable:!0});var u=h;Object.defineProperty(e,"FileReadStream",{get:function(){return u},set:function(e){u=e},enumerable:!0,configurable:!0});var p=d;function h(e,t){return this instanceof h?(c.apply(this,arguments),this):h.apply(Object.create(h.prototype),arguments)}function d(e,t){return this instanceof d?(l.apply(this,arguments),this):d.apply(Object.create(d.prototype),arguments)}Object.defineProperty(e,"FileWriteStream",{get:function(){return p},set:function(e){p=e},enumerable:!0,configurable:!0});var f=e.open;function m(e,t,n,r){return"function"==typeof n&&(r=n,n=null),function e(t,n,r,i,s){return f(t,n,r,(function(o,a){!o||"EMFILE"!==o.code&&"ENFILE"!==o.code?"function"==typeof i&&i.apply(this,arguments):Zy([e,[t,n,r,i],o,s||Date.now(),Date.now()])}))}(e,t,n,r)}return e.open=m,e}function Zy(e){Wy("ENQUEUE",e[0].name,e[1]),My[Fy].push(e),Jy()}function Qy(){for(var e=Date.now(),t=0;t<My[Fy].length;++t)My[Fy][t].length>2&&(My[Fy][t][3]=e,My[Fy][t][4]=e);Jy()}function Jy(){if(clearTimeout(Vy),Vy=void 0,0!==My[Fy].length){var e=My[Fy].shift(),t=e[0],n=e[1],r=e[2],i=e[3],s=e[4];if(void 0===i)Wy("RETRY",t.name,n),t.apply(null,n);else if(Date.now()-i>=6e4){Wy("TIMEOUT",t.name,n);var o=n.pop();"function"==typeof o&&o.call(null,r)}else{var a=Date.now()-s,c=Math.max(s-i,1);a>=Math.min(1.2*c,100)?(Wy("RETRY",t.name,n),t.apply(null,n.concat([i]))):My[Fy].push(e)}void 0===Vy&&(Vy=setTimeout(Jy,0))}}process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!My.__patched&&(Ky=Yy(My),My.__patched=!0);const Xy=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;Xy.writable=e=>Xy(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState,Xy.readable=e=>Xy(e)&&!1!==e.readable&&"function"==typeof e._read&&"object"==typeof e._readableState,Xy.duplex=e=>Xy.writable(e)&&Xy.readable(e),Xy.transform=e=>Xy.duplex(e)&&"function"==typeof e._transform;var ev,tv,nv,rv,iv,sv=Xy,ov={exports:{}},av={exports:{}};function cv(){if(ev)return av.exports;return ev=1,"undefined"==typeof process||!process.version||0===process.version.indexOf("v0.")||0===process.version.indexOf("v1.")&&0!==process.version.indexOf("v1.8.")?av.exports={nextTick:function(e,t,n,r){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var i,s,o=arguments.length;switch(o){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick((function(){e.call(null,t)}));case 3:return process.nextTick((function(){e.call(null,t,n)}));case 4:return process.nextTick((function(){e.call(null,t,n,r)}));default:for(i=new Array(o-1),s=0;s<i.length;)i[s++]=arguments[s];return process.nextTick((function(){e.apply(null,i)}))}}}:av.exports=process,av.exports}function lv(){return iv?rv:(iv=1,rv=h)}var uv,pv={exports:{}};function hv(){return uv||(uv=1,function(e,t){var n=v,r=n.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return r(e,t,n)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=s),i(r,s),s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return r(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=r(e);return void 0!==t?"string"==typeof n?i.fill(t,n):i.fill(t):i.fill(0),i},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}}(pv,pv.exports)),pv.exports}var dv,fv={};function mv(){if(dv)return fv;function e(e){return Object.prototype.toString.call(e)}return dv=1,fv.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===e(t)},fv.isBoolean=function(e){return"boolean"==typeof e},fv.isNull=function(e){return null===e},fv.isNullOrUndefined=function(e){return null==e},fv.isNumber=function(e){return"number"==typeof e},fv.isString=function(e){return"string"==typeof e},fv.isSymbol=function(e){return"symbol"==typeof e},fv.isUndefined=function(e){return void 0===e},fv.isRegExp=function(t){return"[object RegExp]"===e(t)},fv.isObject=function(e){return"object"==typeof e&&null!==e},fv.isDate=function(t){return"[object Date]"===e(t)},fv.isError=function(t){return"[object Error]"===e(t)||t instanceof Error},fv.isFunction=function(e){return"function"==typeof e},fv.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},fv.isBuffer=Buffer.isBuffer,fv}var gv,yv={exports:{}},vv={exports:{}};try{var bv=require("util");if("function"!=typeof bv.inherits)throw"";yv.exports=bv.inherits}catch(e){yv.exports=(gv||(gv=1,"function"==typeof Object.create?vv.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:vv.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}),vv.exports)}var _v,wv,xv,Ev,Sv,Tv,Dv,kv,Av,Cv=yv.exports,Rv={exports:{}};function Ov(){return _v||(_v=1,function(e){var t=hv().Buffer,n=y;function r(e,t,n){e.copy(t,n)}e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return t.alloc(0);for(var n=t.allocUnsafe(e>>>0),i=this.head,s=0;i;)r(i.data,n,s),s+=i.data.length,i=i.next;return n},e}(),n&&n.inspect&&n.inspect.custom&&(e.exports.prototype[n.inspect.custom]=function(){var e=n.inspect({length:this.length});return this.constructor.name+" "+e})}(Rv)),Rv.exports}function Lv(){if(xv)return wv;xv=1;var e=cv();function t(e,t){e.emit("error",t)}return wv={destroy:function(n,r){var i=this,s=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return s||o?(r?r(n):n&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(t,this,n)):e.nextTick(t,this,n)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(n||null,(function(n){!r&&n?i._writableState?i._writableState.errorEmitted||(i._writableState.errorEmitted=!0,e.nextTick(t,i,n)):e.nextTick(t,i,n):r&&r(n)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}}function Iv(){if(Dv)return Tv;Dv=1;var e=cv();function t(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}Tv=d;var n,r=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:e.nextTick;d.WritableState=h;var i=Object.create(mv());i.inherits=Cv;var s={deprecate:Sv?Ev:(Sv=1,Ev=y.deprecate)},o=lv(),a=hv().Buffer,c=(void 0!==U?U:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var l,u=Lv();function p(){}function h(i,s){n=n||Pv(),i=i||{};var o=s instanceof n;this.objectMode=!!i.objectMode,o&&(this.objectMode=this.objectMode||!!i.writableObjectMode);var a=i.highWaterMark,c=i.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=a||0===a?a:o&&(c||0===c)?c:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var u=!1===i.decodeStrings;this.decodeStrings=!u,this.defaultEncoding=i.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,n){var i=t._writableState,s=i.sync,o=i.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(i),n)!function(t,n,r,i,s){--n.pendingcb,r?(e.nextTick(s,i),e.nextTick(_,t,n),t._writableState.errorEmitted=!0,t.emit("error",i)):(s(i),t._writableState.errorEmitted=!0,t.emit("error",i),_(t,n))}(t,i,s,n,o);else{var a=v(i);a||i.corked||i.bufferProcessing||!i.bufferedRequest||g(t,i),s?r(m,t,i,a,o):m(t,i,a,o)}}(s,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}function d(e){if(n=n||Pv(),!(l.call(d,this)||this instanceof n))return new d(e);this._writableState=new h(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),o.call(this)}function f(e,t,n,r,i,s,o){t.writelen=r,t.writecb=o,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function m(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),_(e,t)}function g(e,n){n.bufferProcessing=!0;var r=n.bufferedRequest;if(e._writev&&r&&r.next){var i=n.bufferedRequestCount,s=new Array(i),o=n.corkedRequestsFree;o.entry=r;for(var a=0,c=!0;r;)s[a]=r,r.isBuf||(c=!1),r=r.next,a+=1;s.allBuffers=c,f(e,n,!0,n.length,s,"",o.finish),n.pendingcb++,n.lastBufferedRequest=null,o.next?(n.corkedRequestsFree=o.next,o.next=null):n.corkedRequestsFree=new t(n),n.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,p=r.callback;if(f(e,n,!1,n.objectMode?1:l.length,l,u,p),r=r.next,n.bufferedRequestCount--,n.writing)break}null===r&&(n.lastBufferedRequest=null)}n.bufferedRequest=r,n.bufferProcessing=!1}function v(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function b(e,t){e._final((function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),_(e,t)}))}function _(t,n){var r=v(n);return r&&(!function(t,n){n.prefinished||n.finalCalled||("function"==typeof t._final?(n.pendingcb++,n.finalCalled=!0,e.nextTick(b,t,n)):(n.prefinished=!0,t.emit("prefinish")))}(t,n),0===n.pendingcb&&(n.finished=!0,t.emit("finish"))),r}return i.inherits(d,o),h.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(h.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(l=Function.prototype[Symbol.hasInstance],Object.defineProperty(d,Symbol.hasInstance,{value:function(e){return!!l.call(this,e)||this===d&&(e&&e._writableState instanceof h)}})):l=function(e){return e instanceof this},d.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},d.prototype.write=function(t,n,r){var i,s=this._writableState,o=!1,l=!s.objectMode&&(i=t,a.isBuffer(i)||i instanceof c);return l&&!a.isBuffer(t)&&(t=function(e){return a.from(e)}(t)),"function"==typeof n&&(r=n,n=null),l?n="buffer":n||(n=s.defaultEncoding),"function"!=typeof r&&(r=p),s.ended?function(t,n){var r=new Error("write after end");t.emit("error",r),e.nextTick(n,r)}(this,r):(l||function(t,n,r,i){var s=!0,o=!1;return null===r?o=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||n.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(t.emit("error",o),e.nextTick(i,o),s=!1),s}(this,s,t,r))&&(s.pendingcb++,o=function(e,t,n,r,i,s){if(!n){var o=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=a.from(t,n));return t}(t,r,i);r!==o&&(n=!0,i="buffer",r=o)}var c=t.objectMode?1:r.length;t.length+=c;var l=t.length<t.highWaterMark;l||(t.needDrain=!0);if(t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:s,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else f(e,t,!1,c,r,i,s);return l}(this,s,l,t,n,r)),o},d.prototype.cork=function(){this._writableState.corked++},d.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||g(this,e))},d.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),d.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},d.prototype._writev=null,d.prototype.end=function(t,n,r){var i=this._writableState;"function"==typeof t?(r=t,t=null,n=null):"function"==typeof n&&(r=n,n=null),null!=t&&this.write(t,n),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,n,r){n.ending=!0,_(t,n),r&&(n.finished?e.nextTick(r):t.once("finish",r));n.ended=!0,t.writable=!1}(this,i,r)},Object.defineProperty(d.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),d.prototype.destroy=u.destroy,d.prototype._undestroy=u.undestroy,d.prototype._destroy=function(e,t){this.end(),t(e)},Tv}function Pv(){if(Av)return kv;Av=1;var e=cv(),t=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};kv=c;var n=Object.create(mv());n.inherits=Cv;var r=zv(),i=Iv();n.inherits(c,r);for(var s=t(i.prototype),o=0;o<s.length;o++){var a=s[o];c.prototype[a]||(c.prototype[a]=i.prototype[a])}function c(e){if(!(this instanceof c))return new c(e);r.call(this,e),i.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",l)}function l(){this.allowHalfOpen||this._writableState.ended||e.nextTick(u,this)}function u(e){e.end()}return Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),c.prototype._destroy=function(t,n){this.push(null),this.end(),e.nextTick(n,t)},kv}var Nv,jv,Fv,Bv,Mv,Uv,qv,Hv={};function $v(){if(Nv)return Hv;Nv=1;var e=hv().Buffer,t=e.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function n(n){var r;switch(this.encoding=function(n){var r=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(n);if("string"!=typeof r&&(e.isEncoding===t||!t(n)))throw new Error("Unknown encoding: "+n);return r||n}(n),this.encoding){case"utf16le":this.text=s,this.end=o,r=4;break;case"utf8":this.fillLast=i,r=4;break;case"base64":this.text=a,this.end=c,r=3;break;default:return this.write=l,void(this.end=u)}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(r)}function r(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function i(e){var t=this.lastTotal-this.lastNeed,n=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function s(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function o(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function a(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function l(e){return e.toString(this.encoding)}function u(e){return e&&e.length?this.write(e):""}return Hv.StringDecoder=n,n.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},n.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},n.prototype.text=function(e,t){var n=function(e,t,n){var i=t.length-1;if(i<n)return 0;var s=r(t[i]);if(s>=0)return s>0&&(e.lastNeed=s-1),s;if(--i<n||-2===s)return 0;if(s=r(t[i]),s>=0)return s>0&&(e.lastNeed=s-2),s;if(--i<n||-2===s)return 0;if(s=r(t[i]),s>=0)return s>0&&(2===s?s=0:e.lastNeed=s-3),s;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var i=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},n.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length},Hv}function zv(){if(Fv)return jv;Fv=1;var e=cv();jv=g;var t,n=function(){if(nv)return tv;nv=1;var e={}.toString;return tv=Array.isArray||function(t){return"[object Array]"==e.call(t)}}();g.ReadableState=m,p.EventEmitter;var r=function(e,t){return e.listeners(t).length},i=lv(),s=hv().Buffer,o=(void 0!==U?U:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var a=Object.create(mv());a.inherits=Cv;var c=y,l=void 0;l=c&&c.debuglog?c.debuglog("stream"):function(){};var u,h=Ov(),d=Lv();a.inherits(g,i);var f=["error","close","destroy","pause","resume"];function m(e,n){e=e||{};var r=n instanceof(t=t||Pv());this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,s=e.readableHighWaterMark,o=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(s||0===s)?s:o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new h,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(u||(u=$v().StringDecoder),this.decoder=new u(e.encoding),this.encoding=e.encoding)}function g(e){if(t=t||Pv(),!(this instanceof g))return new g(e);this._readableState=new m(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),i.call(this)}function v(e,t,n,r,i){var a,c=e._readableState;null===t?(c.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,x(e)}(e,c)):(i||(a=function(e,t){var n;r=t,s.isBuffer(r)||r instanceof o||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));var r;return n}(c,t)),a?e.emit("error",a):c.objectMode||t&&t.length>0?("string"==typeof t||c.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),r?c.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):b(e,c,t,!0):c.ended?e.emit("error",new Error("stream.push() after EOF")):(c.reading=!1,c.decoder&&!n?(t=c.decoder.write(t),c.objectMode||0!==t.length?b(e,c,t,!1):S(e,c)):b(e,c,t,!1))):r||(c.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(c)}function b(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&x(e)),S(e,t)}Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),g.prototype.destroy=d.destroy,g.prototype._undestroy=d.undestroy,g.prototype._destroy=function(e,t){this.push(null),t(e)},g.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=s.from(e,t),t=""),n=!0),v(this,e,t,!1,n)},g.prototype.unshift=function(e){return v(this,e,null,!0,!1)},g.prototype.isPaused=function(){return!1===this._readableState.flowing},g.prototype.setEncoding=function(e){return u||(u=$v().StringDecoder),this._readableState.decoder=new u(e),this._readableState.encoding=e,this};var _=8388608;function w(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=_?e=_:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function x(t){var n=t._readableState;n.needReadable=!1,n.emittedReadable||(l("emitReadable",n.flowing),n.emittedReadable=!0,n.sync?e.nextTick(E,t):E(t))}function E(e){l("emit readable"),e.emit("readable"),A(e)}function S(t,n){n.readingMore||(n.readingMore=!0,e.nextTick(T,t,n))}function T(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(l("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function D(e){l("readable nexttick read 0"),e.read(0)}function k(e,t){t.reading||(l("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),A(e),t.flowing&&!t.reading&&e.read(0)}function A(e){var t=e._readableState;for(l("flow",t.flowing);t.flowing&&null!==e.read(););}function C(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?function(e,t){var n=t.head,r=1,i=n.data;e-=i.length;for(;n=n.next;){var s=n.data,o=e>s.length?s.length:e;if(o===s.length?i+=s:i+=s.slice(0,e),0===(e-=o)){o===s.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=s.slice(o));break}++r}return t.length-=r,i}(e,t):function(e,t){var n=s.allocUnsafe(e),r=t.head,i=1;r.data.copy(n),e-=r.data.length;for(;r=r.next;){var o=r.data,a=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,a),0===(e-=a)){a===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++i}return t.length-=i,n}(e,t);return r}(e,t.buffer,t.decoder),n);var n}function R(t){var n=t._readableState;if(n.length>0)throw new Error('"endReadable()" called on non-empty stream');n.endEmitted||(n.ended=!0,e.nextTick(O,n,t))}function O(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function L(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}return g.prototype.read=function(e){l("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return l("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?R(this):x(this),null;if(0===(e=w(e,t))&&t.ended)return 0===t.length&&R(this),null;var r,i=t.needReadable;return l("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&l("length less than watermark",i=!0),t.ended||t.reading?l("reading or ended",i=!1):i&&(l("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=w(n,t))),null===(r=e>0?C(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&R(this)),null!==r&&this.emit("data",r),r},g.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},g.prototype.pipe=function(t,i){var s=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,l("pipe count=%d opts=%j",o.pipesCount,i);var a=(!i||!1!==i.end)&&t!==process.stdout&&t!==process.stderr?u:v;function c(e,n){l("onunpipe"),e===s&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,l("cleanup"),t.removeListener("close",g),t.removeListener("finish",y),t.removeListener("drain",p),t.removeListener("error",m),t.removeListener("unpipe",c),s.removeListener("end",u),s.removeListener("end",v),s.removeListener("data",f),h=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||p())}function u(){l("onend"),t.end()}o.endEmitted?e.nextTick(a):s.once("end",a),t.on("unpipe",c);var p=function(e){return function(){var t=e._readableState;l("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&r(e,"data")&&(t.flowing=!0,A(e))}}(s);t.on("drain",p);var h=!1;var d=!1;function f(e){l("ondata"),d=!1,!1!==t.write(e)||d||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==L(o.pipes,t))&&!h&&(l("false write response, pause",o.awaitDrain),o.awaitDrain++,d=!0),s.pause())}function m(e){l("onerror",e),v(),t.removeListener("error",m),0===r(t,"error")&&t.emit("error",e)}function g(){t.removeListener("finish",y),v()}function y(){l("onfinish"),t.removeListener("close",g),v()}function v(){l("unpipe"),s.unpipe(t)}return s.on("data",f),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?n(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(t,"error",m),t.once("close",g),t.once("finish",y),t.emit("pipe",s),o.flowing||(l("pipe resume"),s.resume()),t},g.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<i;s++)r[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=L(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},g.prototype.on=function(t,n){var r=i.prototype.on.call(this,t,n);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var s=this._readableState;s.endEmitted||s.readableListening||(s.readableListening=s.needReadable=!0,s.emittedReadable=!1,s.reading?s.length&&x(this):e.nextTick(D,this))}return r},g.prototype.addListener=g.prototype.on,g.prototype.resume=function(){var t=this._readableState;return t.flowing||(l("resume"),t.flowing=!0,function(t,n){n.resumeScheduled||(n.resumeScheduled=!0,e.nextTick(k,t,n))}(this,t)),this},g.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this},g.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(l("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(l("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var s=0;s<f.length;s++)e.on(f[s],this.emit.bind(this,f[s]));return this._read=function(t){l("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(g.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),g._fromList=C,jv}function Wv(){if(Mv)return Bv;Mv=1,Bv=r;var e=Pv(),t=Object.create(mv());function n(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function r(t){if(!(this instanceof r))return new r(t);e.call(this,t),this._transformState={afterTransform:n.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",i)}function i(){var e=this;"function"==typeof this._flush?this._flush((function(t,n){s(e,t,n)})):s(this,null,null)}function s(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}return t.inherits=Cv,t.inherits(r,e),r.prototype.push=function(t,n){return this._transformState.needTransform=!1,e.prototype.push.call(this,t,n)},r.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},r.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},r.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},r.prototype._destroy=function(t,n){var r=this;e.prototype._destroy.call(this,t,(function(e){n(e),r.emit("close")}))},Bv}!function(e,t){var n=h;"disable"===process.env.READABLE_STREAM&&n?(e.exports=n,(t=e.exports=n.Readable).Readable=n.Readable,t.Writable=n.Writable,t.Duplex=n.Duplex,t.Transform=n.Transform,t.PassThrough=n.PassThrough,t.Stream=n):((t=e.exports=zv()).Stream=n||t,t.Readable=t,t.Writable=Iv(),t.Duplex=Pv(),t.Transform=Wv(),t.PassThrough=function(){if(qv)return Uv;qv=1,Uv=n;var e=Wv(),t=Object.create(mv());function n(t){if(!(this instanceof n))return new n(t);e.call(this,t)}return t.inherits=Cv,t.inherits(n,e),n.prototype._transform=function(e,t,n){n(null,e)},Uv}())}(ov,ov.exports);var Gv=ov.exports.PassThrough,Vv=y,Kv=Gv,Yv={Readable:Qv,Writable:Jv};function Zv(e,t,n){e[t]=function(){return delete e[t],n.apply(this,arguments),this[t].apply(this,arguments)}}function Qv(e,t){if(!(this instanceof Qv))return new Qv(e,t);Kv.call(this,t),Zv(this,"_read",(function(){var n=e.call(this,t),r=this.emit.bind(this,"error");n.on("error",r),n.pipe(this)})),this.emit("readable")}function Jv(e,t){if(!(this instanceof Jv))return new Jv(e,t);Kv.call(this,t),Zv(this,"_write",(function(){var n=e.call(this,t),r=this.emit.bind(this,"error");n.on("error",r),this.pipe(n)})),this.emit("writable")}
|
|
18
18
|
/*!
|
|
19
19
|
* normalize-path <https://github.com/jonschlinkert/normalize-path>
|
|
20
20
|
*
|
|
@@ -152,7 +152,7 @@ var _O=T,wO=YA,xO=Tk,EO=function(e){if(!(this instanceof EO))return new EO(e);"o
|
|
|
152
152
|
* body-parser
|
|
153
153
|
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|
154
154
|
* MIT Licensed
|
|
155
|
-
*/function dP(){if(NI)return PI;NI=1;var e=gL(),t=yL,n=GL()("body-parser:text"),r=hI(),i=uP;return PI=function(s){var o=s||{},a=o.defaultCharset||"utf-8",c=!1!==o.inflate,l="number"!=typeof o.limit?e.parse(o.limit||"100kb"):o.limit,u=o.type||"text/plain",p=o.verify||!1;if(!1!==p&&"function"!=typeof p)throw new TypeError("option verify must be function");var h="function"!=typeof u?function(e){return function(t){return Boolean(i(t,e))}}(u):u;function d(e){return e}return function(e,s,o){if(e._body)return n("body already parsed"),void o();if(e.body=e.body||{},!i.hasBody(e))return n("skip empty body"),void o();if(n("content-type %j",e.headers["content-type"]),!h(e))return n("skip parsing"),void o();var u=function(e){try{return(t.parse(e).parameters.charset||"").toLowerCase()}catch(e){return}}(e)||a;r(e,s,o,d,n,{encoding:u,inflate:c,limit:l,verify:p})}},PI}function fP(){return WI?zI:(WI=1,zI=SyntaxError)}function mP(){return VI?GI:(VI=1,GI=TypeError)}function gP(){if(XI)return JI;XI=1;var e="undefined"!=typeof Symbol&&Symbol,t=QI?ZI:(QI=1,ZI=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0});return JI=function(){return"function"==typeof e&&("function"==typeof Symbol&&("symbol"==typeof e("foo")&&("symbol"==typeof Symbol("bar")&&t())))}}function yP(){if(tP)return eP;tP=1;var e={__proto__:null,foo:{}},t=Object;return eP=function(){return{__proto__:e}.foo===e.foo&&!(e instanceof t)}}function vP(){if(rP)return nP;rP=1;var e=Object.prototype.toString,t=Math.max,n=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var i=0;i<t.length;i+=1)n[i+e.length]=t[i];return n};return nP=function(r){var i=this;if("function"!=typeof i||"[object Function]"!==e.apply(i))throw new TypeError("Function.prototype.bind called on incompatible "+i);for(var s,o=function(e,t){for(var n=[],r=t||0,i=0;r<e.length;r+=1,i+=1)n[i]=e[r];return n}(arguments,1),a=t(0,i.length-o.length),c=[],l=0;l<a;l++)c[l]="$"+l;if(s=Function("binder","return function ("+function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n}(c,",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof s){var e=i.apply(this,n(o,arguments));return Object(e)===e?e:this}return i.apply(r,n(o,arguments))})),i.prototype){var u=function(){};u.prototype=i.prototype,s.prototype=new u,u.prototype=null}return s},nP}function bP(){if(sP)return iP;sP=1;var e=vP();return iP=Function.prototype.bind||e}function _P(){if(lP)return cP;var e;lP=1;var t=FI?jI:(FI=1,jI=Error),n=MI?BI:(MI=1,BI=EvalError),r=qI?UI:(qI=1,UI=RangeError),i=$I?HI:($I=1,HI=ReferenceError),s=fP(),o=mP(),a=YI?KI:(YI=1,KI=URIError),c=Function,l=function(e){try{return c('"use strict"; return ('+e+").constructor;")()}catch(e){}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch(e){u=null}var p=function(){throw new o},h=u?function(){try{return p}catch(e){try{return u(arguments,"callee").get}catch(e){return p}}}():p,d=gP()(),f=yP()(),m=Object.getPrototypeOf||(f?function(e){return e.__proto__}:null),g={},y="undefined"!=typeof Uint8Array&&m?m(Uint8Array):e,v={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?e:ArrayBuffer,"%ArrayIteratorPrototype%":d&&m?m([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":g,"%AsyncGenerator%":g,"%AsyncGeneratorFunction%":g,"%AsyncIteratorPrototype%":g,"%Atomics%":"undefined"==typeof Atomics?e:Atomics,"%BigInt%":"undefined"==typeof BigInt?e:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?e:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":t,"%eval%":eval,"%EvalError%":n,"%Float32Array%":"undefined"==typeof Float32Array?e:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?e:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?e:FinalizationRegistry,"%Function%":c,"%GeneratorFunction%":g,"%Int8Array%":"undefined"==typeof Int8Array?e:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?e:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":d&&m?m(m([][Symbol.iterator]())):e,"%JSON%":"object"==typeof JSON?JSON:e,"%Map%":"undefined"==typeof Map?e:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&d&&m?m((new Map)[Symbol.iterator]()):e,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?e:Promise,"%Proxy%":"undefined"==typeof Proxy?e:Proxy,"%RangeError%":r,"%ReferenceError%":i,"%Reflect%":"undefined"==typeof Reflect?e:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?e:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&d&&m?m((new Set)[Symbol.iterator]()):e,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":d&&m?m(""[Symbol.iterator]()):e,"%Symbol%":d?Symbol:e,"%SyntaxError%":s,"%ThrowTypeError%":h,"%TypedArray%":y,"%TypeError%":o,"%Uint8Array%":"undefined"==typeof Uint8Array?e:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?e:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?e:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?e:Uint32Array,"%URIError%":a,"%WeakMap%":"undefined"==typeof WeakMap?e:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?e:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?e:WeakSet};if(m)try{null.error}catch(e){var b=m(m(e));v["%Error.prototype%"]=b}var _=function e(t){var n;if("%AsyncFunction%"===t)n=l("async function () {}");else if("%GeneratorFunction%"===t)n=l("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=l("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&m&&(n=m(i.prototype))}return v[t]=n,n},w={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},x=bP(),E=function(){if(aP)return oP;aP=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=bP();return oP=n.call(e,t)}(),S=x.call(Function.call,Array.prototype.concat),T=x.call(Function.apply,Array.prototype.splice),D=x.call(Function.call,String.prototype.replace),k=x.call(Function.call,String.prototype.slice),A=x.call(Function.call,RegExp.prototype.exec),C=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,R=/\\(\\)?/g,O=function(e,t){var n,r=e;if(E(w,r)&&(r="%"+(n=w[r])[0]+"%"),E(v,r)){var i=v[r];if(i===g&&(i=_(r)),void 0===i&&!t)throw new o("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:i}}throw new s("intrinsic "+e+" does not exist!")};return cP=function(e,t){if("string"!=typeof e||0===e.length)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new o('"allowMissing" argument must be a boolean');if(null===A(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=k(e,0,1),n=k(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return D(e,C,(function(e,t,n,i){r[r.length]=n?D(i,R,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",i=O("%"+r+"%",t),a=i.name,c=i.value,l=!1,p=i.alias;p&&(r=p[0],T(n,S([0,1],p)));for(var h=1,d=!0;h<n.length;h+=1){var f=n[h],m=k(f,0,1),g=k(f,-1);if(('"'===m||"'"===m||"`"===m||'"'===g||"'"===g||"`"===g)&&m!==g)throw new s("property names with quotes must have matching quotes");if("constructor"!==f&&d||(l=!0),E(v,a="%"+(r+="."+f)+"%"))c=v[a];else if(null!=c){if(!(f in c)){if(!t)throw new o("base intrinsic for "+e+" exists, but the property is not available.");return}if(u&&h+1>=n.length){var y=u(c,f);c=(d=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:c[f]}else d=E(c,f),c=c[f];d&&!l&&(v[a]=c)}}return c},cP}var wP,xP,EP,SP,TP,DP,kP,AP,CP,RP,OP,LP,IP,PP,NP,jP,FP,BP,MP,UP,qP,HP,$P,zP,WP,GP,VP,KP,YP,ZP,QP,JP={exports:{}};function XP(){if(xP)return wP;xP=1;var e=_P()("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch(t){e=!1}return wP=e}function eN(){if(SP)return EP;SP=1;var e=_P()("%Object.getOwnPropertyDescriptor%",!0);if(e)try{e([],"length")}catch(t){e=null}return EP=e}function tN(){if(RP)return CP;RP=1;var e=_P(),t=function(){if(DP)return TP;DP=1;var e=XP(),t=fP(),n=mP(),r=eN();return TP=function(i,s,o){if(!i||"object"!=typeof i&&"function"!=typeof i)throw new n("`obj` must be an object or a function`");if("string"!=typeof s&&"symbol"!=typeof s)throw new n("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new n("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new n("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new n("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new n("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],p=!!r&&r(i,s);if(e)e(i,s,{configurable:null===l&&p?p.configurable:!l,enumerable:null===a&&p?p.enumerable:!a,value:o,writable:null===c&&p?p.writable:!c});else{if(!u&&(a||c||l))throw new t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");i[s]=o}},TP}(),n=function(){if(AP)return kP;AP=1;var e=XP(),t=function(){return!!e};return t.hasArrayLengthDefineBug=function(){if(!e)return null;try{return 1!==e([],"length",{value:1}).length}catch(e){return!0}},kP=t}()(),r=eN(),i=mP(),s=e("%Math.floor%");return CP=function(e,o){if("function"!=typeof e)throw new i("`fn` is not a function");if("number"!=typeof o||o<0||o>4294967295||s(o)!==o)throw new i("`length` must be a positive 32-bit integer");var a=arguments.length>2&&!!arguments[2],c=!0,l=!0;if("length"in e&&r){var u=r(e,"length");u&&!u.configurable&&(c=!1),u&&!u.writable&&(l=!1)}return(c||l||!a)&&(n?t(e,"length",o,!0,!0):t(e,"length",o)),e},CP}function nN(){return OP||(OP=1,function(e){var t=bP(),n=_P(),r=tN(),i=mP(),s=n("%Function.prototype.apply%"),o=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(o,s),c=XP(),l=n("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new i("a function is required");var n=a(t,o,arguments);return r(n,1+l(0,e.length-(arguments.length-1)),!0)};var u=function(){return a(t,s,arguments)};c?c(e.exports,"apply",{value:u}):e.exports.apply=u}(JP)),JP.exports}function rN(){if(IP)return LP;IP=1;var e=_P(),t=nN(),n=t(e("String.prototype.indexOf"));return LP=function(r,i){var s=e(r,!!i);return"function"==typeof s&&n(r,".prototype.")>-1?t(s):s},LP}function iN(){if(FP)return jP;FP=1;var e="function"==typeof Map&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=e&&t&&"function"==typeof t.get?t.get:null,r=e&&Map.prototype.forEach,i="function"==typeof Set&&Set.prototype,s=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,o=i&&s&&"function"==typeof s.get?s.get:null,a=i&&Set.prototype.forEach,c="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,l="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,u="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,h=Object.prototype.toString,d=Function.prototype.toString,f=String.prototype.match,m=String.prototype.slice,g=String.prototype.replace,v=String.prototype.toUpperCase,b=String.prototype.toLowerCase,_=RegExp.prototype.test,w=Array.prototype.concat,x=Array.prototype.join,E=Array.prototype.slice,S=Math.floor,T="function"==typeof BigInt?BigInt.prototype.valueOf:null,D=Object.getOwnPropertySymbols,k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,A="function"==typeof Symbol&&"object"==typeof Symbol.iterator,C="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===A||"symbol")?Symbol.toStringTag:null,R=Object.prototype.propertyIsEnumerable,O=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function L(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||_.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var r=e<0?-S(-e):S(e);if(r!==e){var i=String(r),s=m.call(t,i.length+1);return g.call(i,n,"$&_")+"."+g.call(g.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return g.call(t,n,"$&_")}var I=NP?PP:(NP=1,PP=y.inspect),P=I.custom,N=q(P)?P:null;function j(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function F(e){return g.call(String(e),/"/g,""")}function B(e){return!("[object Array]"!==z(e)||C&&"object"==typeof e&&C in e)}function M(e){return!("[object RegExp]"!==z(e)||C&&"object"==typeof e&&C in e)}function q(e){if(A)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!k)return!1;try{return k.call(e),!0}catch(e){}return!1}jP=function e(t,i,s,h){var y=i||{};if($(y,"quoteStyle")&&"single"!==y.quoteStyle&&"double"!==y.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if($(y,"maxStringLength")&&("number"==typeof y.maxStringLength?y.maxStringLength<0&&y.maxStringLength!==1/0:null!==y.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var v=!$(y,"customInspect")||y.customInspect;if("boolean"!=typeof v&&"symbol"!==v)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if($(y,"indent")&&null!==y.indent&&"\t"!==y.indent&&!(parseInt(y.indent,10)===y.indent&&y.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if($(y,"numericSeparator")&&"boolean"!=typeof y.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var _=y.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return G(t,y);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var S=String(t);return _?L(t,S):S}if("bigint"==typeof t){var D=String(t)+"n";return _?L(t,D):D}var P=void 0===y.depth?5:y.depth;if(void 0===s&&(s=0),s>=P&&P>0&&"object"==typeof t)return B(t)?"[Array]":"[Object]";var H=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=x.call(Array(e.indent+1)," ")}return{base:n,prev:x.call(Array(t+1),n)}}(y,s);if(void 0===h)h=[];else if(W(h,t)>=0)return"[Circular]";function V(t,n,r){if(n&&(h=E.call(h)).push(n),r){var i={depth:y.depth};return $(y,"quoteStyle")&&(i.quoteStyle=y.quoteStyle),e(t,i,s+1,h)}return e(t,y,s+1,h)}if("function"==typeof t&&!M(t)){var X=function(e){if(e.name)return e.name;var t=f.call(d.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),ee=J(t,V);return"[Function"+(X?": "+X:" (anonymous)")+"]"+(ee.length>0?" { "+x.call(ee,", ")+" }":"")}if(q(t)){var te=A?g.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):k.call(t);return"object"!=typeof t||A?te:K(te)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var ne="<"+b.call(String(t.nodeName)),re=t.attributes||[],ie=0;ie<re.length;ie++)ne+=" "+re[ie].name+"="+j(F(re[ie].value),"double",y);return ne+=">",t.childNodes&&t.childNodes.length&&(ne+="..."),ne+="</"+b.call(String(t.nodeName))+">"}if(B(t)){if(0===t.length)return"[]";var se=J(t,V);return H&&!function(e){for(var t=0;t<e.length;t++)if(W(e[t],"\n")>=0)return!1;return!0}(se)?"["+Q(se,H)+"]":"[ "+x.call(se,", ")+" ]"}if(function(e){return!("[object Error]"!==z(e)||C&&"object"==typeof e&&C in e)}(t)){var oe=J(t,V);return"cause"in Error.prototype||!("cause"in t)||R.call(t,"cause")?0===oe.length?"["+String(t)+"]":"{ ["+String(t)+"] "+x.call(oe,", ")+" }":"{ ["+String(t)+"] "+x.call(w.call("[cause]: "+V(t.cause),oe),", ")+" }"}if("object"==typeof t&&v){if(N&&"function"==typeof t[N]&&I)return I(t,{depth:P-s});if("symbol"!==v&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!n||!e||"object"!=typeof e)return!1;try{n.call(e);try{o.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ae=[];return r&&r.call(t,(function(e,n){ae.push(V(n,t,!0)+" => "+V(e,t))})),Z("Map",n.call(t),ae,H)}if(function(e){if(!o||!e||"object"!=typeof e)return!1;try{o.call(e);try{n.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var ce=[];return a&&a.call(t,(function(e){ce.push(V(e,t))})),Z("Set",o.call(t),ce,H)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e,c);try{l.call(e,l)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return Y("WeakMap");if(function(e){if(!l||!e||"object"!=typeof e)return!1;try{l.call(e,l);try{c.call(e,c)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return Y("WeakSet");if(function(e){if(!u||!e||"object"!=typeof e)return!1;try{return u.call(e),!0}catch(e){}return!1}(t))return Y("WeakRef");if(function(e){return!("[object Number]"!==z(e)||C&&"object"==typeof e&&C in e)}(t))return K(V(Number(t)));if(function(e){if(!e||"object"!=typeof e||!T)return!1;try{return T.call(e),!0}catch(e){}return!1}(t))return K(V(T.call(t)));if(function(e){return!("[object Boolean]"!==z(e)||C&&"object"==typeof e&&C in e)}(t))return K(p.call(t));if(function(e){return!("[object String]"!==z(e)||C&&"object"==typeof e&&C in e)}(t))return K(V(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&t===globalThis||void 0!==U&&t===U)return"{ [object globalThis] }";if(!function(e){return!("[object Date]"!==z(e)||C&&"object"==typeof e&&C in e)}(t)&&!M(t)){var le=J(t,V),ue=O?O(t)===Object.prototype:t instanceof Object||t.constructor===Object,pe=t instanceof Object?"":"null prototype",he=!ue&&C&&Object(t)===t&&C in t?m.call(z(t),8,-1):pe?"Object":"",de=(ue||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(he||pe?"["+x.call(w.call([],he||[],pe||[]),": ")+"] ":"");return 0===le.length?de+"{}":H?de+"{"+Q(le,H)+"}":de+"{ "+x.call(le,", ")+" }"}return String(t)};var H=Object.prototype.hasOwnProperty||function(e){return e in this};function $(e,t){return H.call(e,t)}function z(e){return h.call(e)}function W(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function G(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return G(m.call(e,0,t.maxStringLength),t)+r}return j(g.call(g.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,V),"single",t)}function V(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+v.call(t.toString(16))}function K(e){return"Object("+e+")"}function Y(e){return e+" { ? }"}function Z(e,t,n,r){return e+" ("+t+") {"+(r?Q(n,r):x.call(n,", "))+"}"}function Q(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+x.call(e,","+n)+"\n"+t.prev}function J(e,t){var n=B(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=$(e,i)?t(e[i],e):""}var s,o="function"==typeof D?D(e):[];if(A){s={};for(var a=0;a<o.length;a++)s["$"+o[a]]=o[a]}for(var c in e)$(e,c)&&(n&&String(Number(c))===c&&c<e.length||A&&s["$"+c]instanceof Symbol||(_.call(/[^\w$]/,c)?r.push(t(c,e)+": "+t(e[c],e)):r.push(c+": "+t(e[c],e))));if("function"==typeof D)for(var l=0;l<o.length;l++)R.call(e,o[l])&&r.push("["+t(o[l])+"]: "+t(e[o[l]],e));return r}return jP}function sN(){if(MP)return BP;MP=1;var e=_P(),t=rN(),n=iN(),r=mP(),i=e("%WeakMap%",!0),s=e("%Map%",!0),o=t("WeakMap.prototype.get",!0),a=t("WeakMap.prototype.set",!0),c=t("WeakMap.prototype.has",!0),l=t("Map.prototype.get",!0),u=t("Map.prototype.set",!0),p=t("Map.prototype.has",!0),h=function(e,t){for(var n,r=e;null!==(n=r.next);r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n};return BP=function(){var e,t,d,f={assert:function(e){if(!f.has(e))throw new r("Side channel does not contain "+n(e))},get:function(n){if(i&&n&&("object"==typeof n||"function"==typeof n)){if(e)return o(e,n)}else if(s){if(t)return l(t,n)}else if(d)return function(e,t){var n=h(e,t);return n&&n.value}(d,n)},has:function(n){if(i&&n&&("object"==typeof n||"function"==typeof n)){if(e)return c(e,n)}else if(s){if(t)return p(t,n)}else if(d)return function(e,t){return!!h(e,t)}(d,n);return!1},set:function(n,r){i&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new i),a(e,n,r)):s?(t||(t=new s),u(t,n,r)):(d||(d={key:{},next:null}),function(e,t,n){var r=h(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}}(d,n,r))}};return f},BP}function oN(){if(qP)return UP;qP=1;var e=String.prototype.replace,t=/%20/g,n="RFC3986";return UP={default:n,formatters:{RFC1738:function(n){return e.call(n,t,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:n}}function aN(){if($P)return HP;$P=1;var e=oN(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),i=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n},s=1024;return HP={arrayToObject:i,assign:function(e,t){return Object.keys(t).reduce((function(e,n){return e[n]=t[n],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],i=0;i<t.length;++i)for(var s=t[i],o=s.obj[s.prop],a=Object.keys(o),c=0;c<a.length;++c){var l=a[c],u=o[l];"object"==typeof u&&null!==u&&-1===r.indexOf(u)&&(t.push({obj:o,prop:l}),r.push(u))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(n(r)){for(var i=[],s=0;s<r.length;++s)void 0!==r[s]&&i.push(r[s]);t.obj[t.prop]=i}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(e){return r}},encode:function(t,n,i,o,a){if(0===t.length)return t;var c=t;if("symbol"==typeof t?c=Symbol.prototype.toString.call(t):"string"!=typeof t&&(c=String(t)),"iso-8859-1"===i)return escape(c).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var l="",u=0;u<c.length;u+=s){for(var p=c.length>=s?c.slice(u,u+s):c,h=[],d=0;d<p.length;++d){var f=p.charCodeAt(d);45===f||46===f||95===f||126===f||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||a===e.RFC1738&&(40===f||41===f)?h[h.length]=p.charAt(d):f<128?h[h.length]=r[f]:f<2048?h[h.length]=r[192|f>>6]+r[128|63&f]:f<55296||f>=57344?h[h.length]=r[224|f>>12]+r[128|f>>6&63]+r[128|63&f]:(d+=1,f=65536+((1023&f)<<10|1023&p.charCodeAt(d)),h[h.length]=r[240|f>>18]+r[128|f>>12&63]+r[128|f>>6&63]+r[128|63&f])}l+=h.join("")}return l},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(n(e)){for(var r=[],i=0;i<e.length;i+=1)r.push(t(e[i]));return r}return t(e)},merge:function e(r,s,o){if(!s)return r;if("object"!=typeof s){if(n(r))r.push(s);else{if(!r||"object"!=typeof r)return[r,s];(o&&(o.plainObjects||o.allowPrototypes)||!t.call(Object.prototype,s))&&(r[s]=!0)}return r}if(!r||"object"!=typeof r)return[r].concat(s);var a=r;return n(r)&&!n(s)&&(a=i(r,o)),n(r)&&n(s)?(s.forEach((function(n,i){if(t.call(r,i)){var s=r[i];s&&"object"==typeof s&&n&&"object"==typeof n?r[i]=e(s,n,o):r.push(n)}else r[i]=n})),r):Object.keys(s).reduce((function(n,r){var i=s[r];return t.call(n,r)?n[r]=e(n[r],i,o):n[r]=i,n}),a)}},HP}function cN(){if(WP)return zP;WP=1;var e=sN(),t=aN(),n=oN(),r=Object.prototype.hasOwnProperty,i={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},s=Array.isArray,o=Array.prototype.push,a=function(e,t){o.apply(e,s(t)?t:[t])},c=Date.prototype.toISOString,l=n.default,u={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,format:l,formatter:n.formatters[l],indices:!1,serializeDate:function(e){return c.call(e)},skipNulls:!1,strictNullHandling:!1},p={},h=function n(r,i,o,c,l,h,d,f,m,g,y,v,b,_,w,x,E,S){for(var T,D=r,k=S,A=0,C=!1;void 0!==(k=k.get(p))&&!C;){var R=k.get(r);if(A+=1,void 0!==R){if(R===A)throw new RangeError("Cyclic object value");C=!0}void 0===k.get(p)&&(A=0)}if("function"==typeof g?D=g(i,D):D instanceof Date?D=b(D):"comma"===o&&s(D)&&(D=t.maybeMap(D,(function(e){return e instanceof Date?b(e):e}))),null===D){if(h)return m&&!x?m(i,u.encoder,E,"key",_):i;D=""}if("string"==typeof(T=D)||"number"==typeof T||"boolean"==typeof T||"symbol"==typeof T||"bigint"==typeof T||t.isBuffer(D))return m?[w(x?i:m(i,u.encoder,E,"key",_))+"="+w(m(D,u.encoder,E,"value",_))]:[w(i)+"="+w(String(D))];var O,L=[];if(void 0===D)return L;if("comma"===o&&s(D))x&&m&&(D=t.maybeMap(D,m)),O=[{value:D.length>0?D.join(",")||null:void 0}];else if(s(g))O=g;else{var I=Object.keys(D);O=y?I.sort(y):I}var P=f?i.replace(/\./g,"%2E"):i,N=c&&s(D)&&1===D.length?P+"[]":P;if(l&&s(D)&&0===D.length)return N+"[]";for(var j=0;j<O.length;++j){var F=O[j],B="object"==typeof F&&void 0!==F.value?F.value:D[F];if(!d||null!==B){var M=v&&f?F.replace(/\./g,"%2E"):F,U=s(D)?"function"==typeof o?o(N,M):N:N+(v?"."+M:"["+M+"]");S.set(r,A);var q=e();q.set(p,S),a(L,n(B,U,o,c,l,h,d,f,"comma"===o&&x&&s(D)?null:m,g,y,v,b,_,w,x,E,q))}}return L};return zP=function(t,o){var c,l=t,p=function(e){if(!e)return u;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||u.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var o=n.default;if(void 0!==e.format){if(!r.call(n.formatters,e.format))throw new TypeError("Unknown format option provided.");o=e.format}var a,c=n.formatters[o],l=u.filter;if(("function"==typeof e.filter||s(e.filter))&&(l=e.filter),a=e.arrayFormat in i?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":u.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var p=void 0===e.allowDots?!0===e.encodeDotInKeys||u.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:u.addQueryPrefix,allowDots:p,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:a,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:u.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:void 0===e.delimiter?u.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:u.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:u.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:u.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:u.encodeValuesOnly,filter:l,format:o,formatter:c,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:u.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:u.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:u.strictNullHandling}}(o);"function"==typeof p.filter?l=(0,p.filter)("",l):s(p.filter)&&(c=p.filter);var d=[];if("object"!=typeof l||null===l)return"";var f=i[p.arrayFormat],m="comma"===f&&p.commaRoundTrip;c||(c=Object.keys(l)),p.sort&&c.sort(p.sort);for(var g=e(),y=0;y<c.length;++y){var v=c[y];p.skipNulls&&null===l[v]||a(d,h(l[v],v,f,m,p.allowEmptyArrays,p.strictNullHandling,p.skipNulls,p.encodeDotInKeys,p.encode?p.encoder:null,p.filter,p.sort,p.allowDots,p.serializeDate,p.format,p.formatter,p.encodeValuesOnly,p.charset,g))}var b=d.join(p.delimiter),_=!0===p.addQueryPrefix?"?":"";return p.charsetSentinel&&("iso-8859-1"===p.charset?_+="utf8=%26%2310003%3B&":_+="utf8=%E2%9C%93&"),b.length>0?_+b:""},zP}function lN(){if(VP)return GP;VP=1;var e=aN(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},i=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},s=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},o=function(e,n,r,i){if(e){var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,c=r.depth>0&&/(\[[^[\]]*])/.exec(o),l=c?o.slice(0,c.index):o,u=[];if(l){if(!r.plainObjects&&t.call(Object.prototype,l)&&!r.allowPrototypes)return;u.push(l)}for(var p=0;r.depth>0&&null!==(c=a.exec(o))&&p<r.depth;){if(p+=1,!r.plainObjects&&t.call(Object.prototype,c[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(c[1])}if(c){if(!0===r.strictDepth)throw new RangeError("Input depth exceeded depth option of "+r.depth+" and strictDepth is true");u.push("["+o.slice(c.index)+"]")}return function(e,t,n,r){for(var i=r?t:s(t,n),o=e.length-1;o>=0;--o){var a,c=e[o];if("[]"===c&&n.parseArrays)a=n.allowEmptyArrays&&(""===i||n.strictNullHandling&&null===i)?[]:[].concat(i);else{a=n.plainObjects?Object.create(null):{};var l="["===c.charAt(0)&&"]"===c.charAt(c.length-1)?c.slice(1,-1):c,u=n.decodeDotInKeys?l.replace(/%2E/g,"."):l,p=parseInt(u,10);n.parseArrays||""!==u?!isNaN(p)&&c!==u&&String(p)===u&&p>=0&&n.parseArrays&&p<=n.arrayLimit?(a=[])[p]=i:"__proto__"!==u&&(a[u]=i):a={0:i}}i=a}return i}(u,n,r,i)}};return GP=function(a,c){var l=function(t){if(!t)return r;if(void 0!==t.allowEmptyArrays&&"boolean"!=typeof t.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==t.decodeDotInKeys&&"boolean"!=typeof t.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=void 0===t.charset?r.charset:t.charset,i=void 0===t.duplicates?r.duplicates:t.duplicates;if("combine"!==i&&"first"!==i&&"last"!==i)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===t.allowDots?!0===t.decodeDotInKeys||r.allowDots:!!t.allowDots,allowEmptyArrays:"boolean"==typeof t.allowEmptyArrays?!!t.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:r.allowPrototypes,allowSparse:"boolean"==typeof t.allowSparse?t.allowSparse:r.allowSparse,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:r.arrayLimit,charset:n,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:r.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:r.comma,decodeDotInKeys:"boolean"==typeof t.decodeDotInKeys?t.decodeDotInKeys:r.decodeDotInKeys,decoder:"function"==typeof t.decoder?t.decoder:r.decoder,delimiter:"string"==typeof t.delimiter||e.isRegExp(t.delimiter)?t.delimiter:r.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:r.depth,duplicates:i,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:r.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:r.plainObjects,strictDepth:"boolean"==typeof t.strictDepth?!!t.strictDepth:r.strictDepth,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:r.strictNullHandling}}(c);if(""===a||null==a)return l.plainObjects?Object.create(null):{};for(var u="string"==typeof a?function(o,a){var c={__proto__:null},l=a.ignoreQueryPrefix?o.replace(/^\?/,""):o;l=l.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var u,p=a.parameterLimit===1/0?void 0:a.parameterLimit,h=l.split(a.delimiter,p),d=-1,f=a.charset;if(a.charsetSentinel)for(u=0;u<h.length;++u)0===h[u].indexOf("utf8=")&&("utf8=%E2%9C%93"===h[u]?f="utf-8":"utf8=%26%2310003%3B"===h[u]&&(f="iso-8859-1"),d=u,u=h.length);for(u=0;u<h.length;++u)if(u!==d){var m,g,y=h[u],v=y.indexOf("]="),b=-1===v?y.indexOf("="):v+1;-1===b?(m=a.decoder(y,r.decoder,f,"key"),g=a.strictNullHandling?null:""):(m=a.decoder(y.slice(0,b),r.decoder,f,"key"),g=e.maybeMap(s(y.slice(b+1),a),(function(e){return a.decoder(e,r.decoder,f,"value")}))),g&&a.interpretNumericEntities&&"iso-8859-1"===f&&(g=i(g)),y.indexOf("[]=")>-1&&(g=n(g)?[g]:g);var _=t.call(c,m);_&&"combine"===a.duplicates?c[m]=e.combine(c[m],g):_&&"last"!==a.duplicates||(c[m]=g)}return c}(a,l):a,p=l.plainObjects?Object.create(null):{},h=Object.keys(u),d=0;d<h.length;++d){var f=h[d],m=o(f,u[f],l,"string"==typeof a);p=e.merge(p,m,l)}return!0===l.allowSparse?p:e.compact(p)},GP}function uN(){if(YP)return KP;YP=1;var e=cN(),t=lN(),n=oN();return KP={formats:n,parse:t,stringify:e}}
|
|
155
|
+
*/function dP(){if(NI)return PI;NI=1;var e=gL(),t=yL,n=GL()("body-parser:text"),r=hI(),i=uP;return PI=function(s){var o=s||{},a=o.defaultCharset||"utf-8",c=!1!==o.inflate,l="number"!=typeof o.limit?e.parse(o.limit||"100kb"):o.limit,u=o.type||"text/plain",p=o.verify||!1;if(!1!==p&&"function"!=typeof p)throw new TypeError("option verify must be function");var h="function"!=typeof u?function(e){return function(t){return Boolean(i(t,e))}}(u):u;function d(e){return e}return function(e,s,o){if(e._body)return n("body already parsed"),void o();if(e.body=e.body||{},!i.hasBody(e))return n("skip empty body"),void o();if(n("content-type %j",e.headers["content-type"]),!h(e))return n("skip parsing"),void o();var u=function(e){try{return(t.parse(e).parameters.charset||"").toLowerCase()}catch(e){return}}(e)||a;r(e,s,o,d,n,{encoding:u,inflate:c,limit:l,verify:p})}},PI}function fP(){return WI?zI:(WI=1,zI=SyntaxError)}function mP(){return VI?GI:(VI=1,GI=TypeError)}function gP(){if(XI)return JI;XI=1;var e="undefined"!=typeof Symbol&&Symbol,t=QI?ZI:(QI=1,ZI=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0});return JI=function(){return"function"==typeof e&&("function"==typeof Symbol&&("symbol"==typeof e("foo")&&("symbol"==typeof Symbol("bar")&&t())))}}function yP(){if(tP)return eP;tP=1;var e={__proto__:null,foo:{}},t=Object;return eP=function(){return{__proto__:e}.foo===e.foo&&!(e instanceof t)}}function vP(){if(rP)return nP;rP=1;var e=Object.prototype.toString,t=Math.max,n=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var i=0;i<t.length;i+=1)n[i+e.length]=t[i];return n};return nP=function(r){var i=this;if("function"!=typeof i||"[object Function]"!==e.apply(i))throw new TypeError("Function.prototype.bind called on incompatible "+i);for(var s,o=function(e,t){for(var n=[],r=t||0,i=0;r<e.length;r+=1,i+=1)n[i]=e[r];return n}(arguments,1),a=t(0,i.length-o.length),c=[],l=0;l<a;l++)c[l]="$"+l;if(s=Function("binder","return function ("+function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n}(c,",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof s){var e=i.apply(this,n(o,arguments));return Object(e)===e?e:this}return i.apply(r,n(o,arguments))})),i.prototype){var u=function(){};u.prototype=i.prototype,s.prototype=new u,u.prototype=null}return s},nP}function bP(){if(sP)return iP;sP=1;var e=vP();return iP=Function.prototype.bind||e}function _P(){if(lP)return cP;var e;lP=1;var t=FI?jI:(FI=1,jI=Error),n=MI?BI:(MI=1,BI=EvalError),r=qI?UI:(qI=1,UI=RangeError),i=$I?HI:($I=1,HI=ReferenceError),s=fP(),o=mP(),a=YI?KI:(YI=1,KI=URIError),c=Function,l=function(e){try{return c('"use strict"; return ('+e+").constructor;")()}catch(e){}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch(e){u=null}var p=function(){throw new o},h=u?function(){try{return p}catch(e){try{return u(arguments,"callee").get}catch(e){return p}}}():p,d=gP()(),f=yP()(),m=Object.getPrototypeOf||(f?function(e){return e.__proto__}:null),g={},y="undefined"!=typeof Uint8Array&&m?m(Uint8Array):e,v={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?e:ArrayBuffer,"%ArrayIteratorPrototype%":d&&m?m([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":g,"%AsyncGenerator%":g,"%AsyncGeneratorFunction%":g,"%AsyncIteratorPrototype%":g,"%Atomics%":"undefined"==typeof Atomics?e:Atomics,"%BigInt%":"undefined"==typeof BigInt?e:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?e:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":t,"%eval%":eval,"%EvalError%":n,"%Float32Array%":"undefined"==typeof Float32Array?e:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?e:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?e:FinalizationRegistry,"%Function%":c,"%GeneratorFunction%":g,"%Int8Array%":"undefined"==typeof Int8Array?e:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?e:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":d&&m?m(m([][Symbol.iterator]())):e,"%JSON%":"object"==typeof JSON?JSON:e,"%Map%":"undefined"==typeof Map?e:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&d&&m?m((new Map)[Symbol.iterator]()):e,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?e:Promise,"%Proxy%":"undefined"==typeof Proxy?e:Proxy,"%RangeError%":r,"%ReferenceError%":i,"%Reflect%":"undefined"==typeof Reflect?e:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?e:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&d&&m?m((new Set)[Symbol.iterator]()):e,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":d&&m?m(""[Symbol.iterator]()):e,"%Symbol%":d?Symbol:e,"%SyntaxError%":s,"%ThrowTypeError%":h,"%TypedArray%":y,"%TypeError%":o,"%Uint8Array%":"undefined"==typeof Uint8Array?e:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?e:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?e:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?e:Uint32Array,"%URIError%":a,"%WeakMap%":"undefined"==typeof WeakMap?e:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?e:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?e:WeakSet};if(m)try{null.error}catch(e){var b=m(m(e));v["%Error.prototype%"]=b}var _=function e(t){var n;if("%AsyncFunction%"===t)n=l("async function () {}");else if("%GeneratorFunction%"===t)n=l("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=l("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&m&&(n=m(i.prototype))}return v[t]=n,n},w={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},x=bP(),E=function(){if(aP)return oP;aP=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=bP();return oP=n.call(e,t)}(),S=x.call(Function.call,Array.prototype.concat),T=x.call(Function.apply,Array.prototype.splice),D=x.call(Function.call,String.prototype.replace),k=x.call(Function.call,String.prototype.slice),A=x.call(Function.call,RegExp.prototype.exec),C=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,R=/\\(\\)?/g,O=function(e,t){var n,r=e;if(E(w,r)&&(r="%"+(n=w[r])[0]+"%"),E(v,r)){var i=v[r];if(i===g&&(i=_(r)),void 0===i&&!t)throw new o("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:i}}throw new s("intrinsic "+e+" does not exist!")};return cP=function(e,t){if("string"!=typeof e||0===e.length)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new o('"allowMissing" argument must be a boolean');if(null===A(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=k(e,0,1),n=k(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return D(e,C,(function(e,t,n,i){r[r.length]=n?D(i,R,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",i=O("%"+r+"%",t),a=i.name,c=i.value,l=!1,p=i.alias;p&&(r=p[0],T(n,S([0,1],p)));for(var h=1,d=!0;h<n.length;h+=1){var f=n[h],m=k(f,0,1),g=k(f,-1);if(('"'===m||"'"===m||"`"===m||'"'===g||"'"===g||"`"===g)&&m!==g)throw new s("property names with quotes must have matching quotes");if("constructor"!==f&&d||(l=!0),E(v,a="%"+(r+="."+f)+"%"))c=v[a];else if(null!=c){if(!(f in c)){if(!t)throw new o("base intrinsic for "+e+" exists, but the property is not available.");return}if(u&&h+1>=n.length){var y=u(c,f);c=(d=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:c[f]}else d=E(c,f),c=c[f];d&&!l&&(v[a]=c)}}return c},cP}var wP,xP,EP,SP,TP,DP,kP,AP,CP,RP,OP,LP,IP,PP,NP,jP,FP,BP,MP,UP,qP,HP,$P,zP,WP,GP,VP,KP,YP,ZP,QP,JP={exports:{}};function XP(){if(xP)return wP;xP=1;var e=_P()("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch(t){e=!1}return wP=e}function eN(){if(SP)return EP;SP=1;var e=_P()("%Object.getOwnPropertyDescriptor%",!0);if(e)try{e([],"length")}catch(t){e=null}return EP=e}function tN(){if(RP)return CP;RP=1;var e=_P(),t=function(){if(DP)return TP;DP=1;var e=XP(),t=fP(),n=mP(),r=eN();return TP=function(i,s,o){if(!i||"object"!=typeof i&&"function"!=typeof i)throw new n("`obj` must be an object or a function`");if("string"!=typeof s&&"symbol"!=typeof s)throw new n("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new n("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new n("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new n("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new n("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],p=!!r&&r(i,s);if(e)e(i,s,{configurable:null===l&&p?p.configurable:!l,enumerable:null===a&&p?p.enumerable:!a,value:o,writable:null===c&&p?p.writable:!c});else{if(!u&&(a||c||l))throw new t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");i[s]=o}},TP}(),n=function(){if(AP)return kP;AP=1;var e=XP(),t=function(){return!!e};return t.hasArrayLengthDefineBug=function(){if(!e)return null;try{return 1!==e([],"length",{value:1}).length}catch(e){return!0}},kP=t}()(),r=eN(),i=mP(),s=e("%Math.floor%");return CP=function(e,o){if("function"!=typeof e)throw new i("`fn` is not a function");if("number"!=typeof o||o<0||o>4294967295||s(o)!==o)throw new i("`length` must be a positive 32-bit integer");var a=arguments.length>2&&!!arguments[2],c=!0,l=!0;if("length"in e&&r){var u=r(e,"length");u&&!u.configurable&&(c=!1),u&&!u.writable&&(l=!1)}return(c||l||!a)&&(n?t(e,"length",o,!0,!0):t(e,"length",o)),e},CP}function nN(){return OP||(OP=1,function(e){var t=bP(),n=_P(),r=tN(),i=mP(),s=n("%Function.prototype.apply%"),o=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(o,s),c=XP(),l=n("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new i("a function is required");var n=a(t,o,arguments);return r(n,1+l(0,e.length-(arguments.length-1)),!0)};var u=function(){return a(t,s,arguments)};c?c(e.exports,"apply",{value:u}):e.exports.apply=u}(JP)),JP.exports}function rN(){if(IP)return LP;IP=1;var e=_P(),t=nN(),n=t(e("String.prototype.indexOf"));return LP=function(r,i){var s=e(r,!!i);return"function"==typeof s&&n(r,".prototype.")>-1?t(s):s},LP}function iN(){if(FP)return jP;FP=1;var e="function"==typeof Map&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=e&&t&&"function"==typeof t.get?t.get:null,r=e&&Map.prototype.forEach,i="function"==typeof Set&&Set.prototype,s=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,o=i&&s&&"function"==typeof s.get?s.get:null,a=i&&Set.prototype.forEach,c="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,l="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,u="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,h=Object.prototype.toString,d=Function.prototype.toString,f=String.prototype.match,m=String.prototype.slice,g=String.prototype.replace,v=String.prototype.toUpperCase,b=String.prototype.toLowerCase,_=RegExp.prototype.test,w=Array.prototype.concat,x=Array.prototype.join,E=Array.prototype.slice,S=Math.floor,T="function"==typeof BigInt?BigInt.prototype.valueOf:null,D=Object.getOwnPropertySymbols,k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,A="function"==typeof Symbol&&"object"==typeof Symbol.iterator,C="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===A||"symbol")?Symbol.toStringTag:null,R=Object.prototype.propertyIsEnumerable,O=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function L(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||_.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var r=e<0?-S(-e):S(e);if(r!==e){var i=String(r),s=m.call(t,i.length+1);return g.call(i,n,"$&_")+"."+g.call(g.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return g.call(t,n,"$&_")}var I=NP?PP:(NP=1,PP=y.inspect),P=I.custom,N=$(P)?P:null,j={__proto__:null,double:'"',single:"'"},F={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function B(e,t,n){var r=n.quoteStyle||t,i=j[r];return i+e+i}function M(e){return g.call(String(e),/"/g,""")}function q(e){return!("[object Array]"!==G(e)||C&&"object"==typeof e&&C in e)}function H(e){return!("[object RegExp]"!==G(e)||C&&"object"==typeof e&&C in e)}function $(e){if(A)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!k)return!1;try{return k.call(e),!0}catch(e){}return!1}jP=function e(t,i,s,h){var y=i||{};if(W(y,"quoteStyle")&&!W(j,y.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(W(y,"maxStringLength")&&("number"==typeof y.maxStringLength?y.maxStringLength<0&&y.maxStringLength!==1/0:null!==y.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var v=!W(y,"customInspect")||y.customInspect;if("boolean"!=typeof v&&"symbol"!==v)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(W(y,"indent")&&null!==y.indent&&"\t"!==y.indent&&!(parseInt(y.indent,10)===y.indent&&y.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(W(y,"numericSeparator")&&"boolean"!=typeof y.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var _=y.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return K(t,y);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var S=String(t);return _?L(t,S):S}if("bigint"==typeof t){var D=String(t)+"n";return _?L(t,D):D}var P=void 0===y.depth?5:y.depth;if(void 0===s&&(s=0),s>=P&&P>0&&"object"==typeof t)return q(t)?"[Array]":"[Object]";var F=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=x.call(Array(e.indent+1)," ")}return{base:n,prev:x.call(Array(t+1),n)}}(y,s);if(void 0===h)h=[];else if(V(h,t)>=0)return"[Circular]";function z(t,n,r){if(n&&(h=E.call(h)).push(n),r){var i={depth:y.depth};return W(y,"quoteStyle")&&(i.quoteStyle=y.quoteStyle),e(t,i,s+1,h)}return e(t,y,s+1,h)}if("function"==typeof t&&!H(t)){var Y=function(e){if(e.name)return e.name;var t=f.call(d.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),te=ee(t,z);return"[Function"+(Y?": "+Y:" (anonymous)")+"]"+(te.length>0?" { "+x.call(te,", ")+" }":"")}if($(t)){var ne=A?g.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):k.call(t);return"object"!=typeof t||A?ne:Z(ne)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var re="<"+b.call(String(t.nodeName)),ie=t.attributes||[],se=0;se<ie.length;se++)re+=" "+ie[se].name+"="+B(M(ie[se].value),"double",y);return re+=">",t.childNodes&&t.childNodes.length&&(re+="..."),re+="</"+b.call(String(t.nodeName))+">"}if(q(t)){if(0===t.length)return"[]";var oe=ee(t,z);return F&&!function(e){for(var t=0;t<e.length;t++)if(V(e[t],"\n")>=0)return!1;return!0}(oe)?"["+X(oe,F)+"]":"[ "+x.call(oe,", ")+" ]"}if(function(e){return!("[object Error]"!==G(e)||C&&"object"==typeof e&&C in e)}(t)){var ae=ee(t,z);return"cause"in Error.prototype||!("cause"in t)||R.call(t,"cause")?0===ae.length?"["+String(t)+"]":"{ ["+String(t)+"] "+x.call(ae,", ")+" }":"{ ["+String(t)+"] "+x.call(w.call("[cause]: "+z(t.cause),ae),", ")+" }"}if("object"==typeof t&&v){if(N&&"function"==typeof t[N]&&I)return I(t,{depth:P-s});if("symbol"!==v&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!n||!e||"object"!=typeof e)return!1;try{n.call(e);try{o.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ce=[];return r&&r.call(t,(function(e,n){ce.push(z(n,t,!0)+" => "+z(e,t))})),J("Map",n.call(t),ce,F)}if(function(e){if(!o||!e||"object"!=typeof e)return!1;try{o.call(e);try{n.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var le=[];return a&&a.call(t,(function(e){le.push(z(e,t))})),J("Set",o.call(t),le,F)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e,c);try{l.call(e,l)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return Q("WeakMap");if(function(e){if(!l||!e||"object"!=typeof e)return!1;try{l.call(e,l);try{c.call(e,c)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return Q("WeakSet");if(function(e){if(!u||!e||"object"!=typeof e)return!1;try{return u.call(e),!0}catch(e){}return!1}(t))return Q("WeakRef");if(function(e){return!("[object Number]"!==G(e)||C&&"object"==typeof e&&C in e)}(t))return Z(z(Number(t)));if(function(e){if(!e||"object"!=typeof e||!T)return!1;try{return T.call(e),!0}catch(e){}return!1}(t))return Z(z(T.call(t)));if(function(e){return!("[object Boolean]"!==G(e)||C&&"object"==typeof e&&C in e)}(t))return Z(p.call(t));if(function(e){return!("[object String]"!==G(e)||C&&"object"==typeof e&&C in e)}(t))return Z(z(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&t===globalThis||void 0!==U&&t===U)return"{ [object globalThis] }";if(!function(e){return!("[object Date]"!==G(e)||C&&"object"==typeof e&&C in e)}(t)&&!H(t)){var ue=ee(t,z),pe=O?O(t)===Object.prototype:t instanceof Object||t.constructor===Object,he=t instanceof Object?"":"null prototype",de=!pe&&C&&Object(t)===t&&C in t?m.call(G(t),8,-1):he?"Object":"",fe=(pe||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(de||he?"["+x.call(w.call([],de||[],he||[]),": ")+"] ":"");return 0===ue.length?fe+"{}":F?fe+"{"+X(ue,F)+"}":fe+"{ "+x.call(ue,", ")+" }"}return String(t)};var z=Object.prototype.hasOwnProperty||function(e){return e in this};function W(e,t){return z.call(e,t)}function G(e){return h.call(e)}function V(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function K(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return K(m.call(e,0,t.maxStringLength),t)+r}var i=F[t.quoteStyle||"single"];return i.lastIndex=0,B(g.call(g.call(e,i,"\\$1"),/[\x00-\x1f]/g,Y),"single",t)}function Y(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+v.call(t.toString(16))}function Z(e){return"Object("+e+")"}function Q(e){return e+" { ? }"}function J(e,t,n,r){return e+" ("+t+") {"+(r?X(n,r):x.call(n,", "))+"}"}function X(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+x.call(e,","+n)+"\n"+t.prev}function ee(e,t){var n=q(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=W(e,i)?t(e[i],e):""}var s,o="function"==typeof D?D(e):[];if(A){s={};for(var a=0;a<o.length;a++)s["$"+o[a]]=o[a]}for(var c in e)W(e,c)&&(n&&String(Number(c))===c&&c<e.length||A&&s["$"+c]instanceof Symbol||(_.call(/[^\w$]/,c)?r.push(t(c,e)+": "+t(e[c],e)):r.push(c+": "+t(e[c],e))));if("function"==typeof D)for(var l=0;l<o.length;l++)R.call(e,o[l])&&r.push("["+t(o[l])+"]: "+t(e[o[l]],e));return r}return jP}function sN(){if(MP)return BP;MP=1;var e=_P(),t=rN(),n=iN(),r=mP(),i=e("%WeakMap%",!0),s=e("%Map%",!0),o=t("WeakMap.prototype.get",!0),a=t("WeakMap.prototype.set",!0),c=t("WeakMap.prototype.has",!0),l=t("Map.prototype.get",!0),u=t("Map.prototype.set",!0),p=t("Map.prototype.has",!0),h=function(e,t){for(var n,r=e;null!==(n=r.next);r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n};return BP=function(){var e,t,d,f={assert:function(e){if(!f.has(e))throw new r("Side channel does not contain "+n(e))},get:function(n){if(i&&n&&("object"==typeof n||"function"==typeof n)){if(e)return o(e,n)}else if(s){if(t)return l(t,n)}else if(d)return function(e,t){var n=h(e,t);return n&&n.value}(d,n)},has:function(n){if(i&&n&&("object"==typeof n||"function"==typeof n)){if(e)return c(e,n)}else if(s){if(t)return p(t,n)}else if(d)return function(e,t){return!!h(e,t)}(d,n);return!1},set:function(n,r){i&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new i),a(e,n,r)):s?(t||(t=new s),u(t,n,r)):(d||(d={key:{},next:null}),function(e,t,n){var r=h(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}}(d,n,r))}};return f},BP}function oN(){if(qP)return UP;qP=1;var e=String.prototype.replace,t=/%20/g,n="RFC3986";return UP={default:n,formatters:{RFC1738:function(n){return e.call(n,t,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:n}}function aN(){if($P)return HP;$P=1;var e=oN(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),i=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n},s=1024;return HP={arrayToObject:i,assign:function(e,t){return Object.keys(t).reduce((function(e,n){return e[n]=t[n],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],i=0;i<t.length;++i)for(var s=t[i],o=s.obj[s.prop],a=Object.keys(o),c=0;c<a.length;++c){var l=a[c],u=o[l];"object"==typeof u&&null!==u&&-1===r.indexOf(u)&&(t.push({obj:o,prop:l}),r.push(u))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(n(r)){for(var i=[],s=0;s<r.length;++s)void 0!==r[s]&&i.push(r[s]);t.obj[t.prop]=i}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(e){return r}},encode:function(t,n,i,o,a){if(0===t.length)return t;var c=t;if("symbol"==typeof t?c=Symbol.prototype.toString.call(t):"string"!=typeof t&&(c=String(t)),"iso-8859-1"===i)return escape(c).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var l="",u=0;u<c.length;u+=s){for(var p=c.length>=s?c.slice(u,u+s):c,h=[],d=0;d<p.length;++d){var f=p.charCodeAt(d);45===f||46===f||95===f||126===f||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||a===e.RFC1738&&(40===f||41===f)?h[h.length]=p.charAt(d):f<128?h[h.length]=r[f]:f<2048?h[h.length]=r[192|f>>6]+r[128|63&f]:f<55296||f>=57344?h[h.length]=r[224|f>>12]+r[128|f>>6&63]+r[128|63&f]:(d+=1,f=65536+((1023&f)<<10|1023&p.charCodeAt(d)),h[h.length]=r[240|f>>18]+r[128|f>>12&63]+r[128|f>>6&63]+r[128|63&f])}l+=h.join("")}return l},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(n(e)){for(var r=[],i=0;i<e.length;i+=1)r.push(t(e[i]));return r}return t(e)},merge:function e(r,s,o){if(!s)return r;if("object"!=typeof s){if(n(r))r.push(s);else{if(!r||"object"!=typeof r)return[r,s];(o&&(o.plainObjects||o.allowPrototypes)||!t.call(Object.prototype,s))&&(r[s]=!0)}return r}if(!r||"object"!=typeof r)return[r].concat(s);var a=r;return n(r)&&!n(s)&&(a=i(r,o)),n(r)&&n(s)?(s.forEach((function(n,i){if(t.call(r,i)){var s=r[i];s&&"object"==typeof s&&n&&"object"==typeof n?r[i]=e(s,n,o):r.push(n)}else r[i]=n})),r):Object.keys(s).reduce((function(n,r){var i=s[r];return t.call(n,r)?n[r]=e(n[r],i,o):n[r]=i,n}),a)}},HP}function cN(){if(WP)return zP;WP=1;var e=sN(),t=aN(),n=oN(),r=Object.prototype.hasOwnProperty,i={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},s=Array.isArray,o=Array.prototype.push,a=function(e,t){o.apply(e,s(t)?t:[t])},c=Date.prototype.toISOString,l=n.default,u={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,format:l,formatter:n.formatters[l],indices:!1,serializeDate:function(e){return c.call(e)},skipNulls:!1,strictNullHandling:!1},p={},h=function n(r,i,o,c,l,h,d,f,m,g,y,v,b,_,w,x,E,S){for(var T,D=r,k=S,A=0,C=!1;void 0!==(k=k.get(p))&&!C;){var R=k.get(r);if(A+=1,void 0!==R){if(R===A)throw new RangeError("Cyclic object value");C=!0}void 0===k.get(p)&&(A=0)}if("function"==typeof g?D=g(i,D):D instanceof Date?D=b(D):"comma"===o&&s(D)&&(D=t.maybeMap(D,(function(e){return e instanceof Date?b(e):e}))),null===D){if(h)return m&&!x?m(i,u.encoder,E,"key",_):i;D=""}if("string"==typeof(T=D)||"number"==typeof T||"boolean"==typeof T||"symbol"==typeof T||"bigint"==typeof T||t.isBuffer(D))return m?[w(x?i:m(i,u.encoder,E,"key",_))+"="+w(m(D,u.encoder,E,"value",_))]:[w(i)+"="+w(String(D))];var O,L=[];if(void 0===D)return L;if("comma"===o&&s(D))x&&m&&(D=t.maybeMap(D,m)),O=[{value:D.length>0?D.join(",")||null:void 0}];else if(s(g))O=g;else{var I=Object.keys(D);O=y?I.sort(y):I}var P=f?i.replace(/\./g,"%2E"):i,N=c&&s(D)&&1===D.length?P+"[]":P;if(l&&s(D)&&0===D.length)return N+"[]";for(var j=0;j<O.length;++j){var F=O[j],B="object"==typeof F&&void 0!==F.value?F.value:D[F];if(!d||null!==B){var M=v&&f?F.replace(/\./g,"%2E"):F,U=s(D)?"function"==typeof o?o(N,M):N:N+(v?"."+M:"["+M+"]");S.set(r,A);var q=e();q.set(p,S),a(L,n(B,U,o,c,l,h,d,f,"comma"===o&&x&&s(D)?null:m,g,y,v,b,_,w,x,E,q))}}return L};return zP=function(t,o){var c,l=t,p=function(e){if(!e)return u;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||u.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var o=n.default;if(void 0!==e.format){if(!r.call(n.formatters,e.format))throw new TypeError("Unknown format option provided.");o=e.format}var a,c=n.formatters[o],l=u.filter;if(("function"==typeof e.filter||s(e.filter))&&(l=e.filter),a=e.arrayFormat in i?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":u.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var p=void 0===e.allowDots?!0===e.encodeDotInKeys||u.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:u.addQueryPrefix,allowDots:p,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:a,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:u.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:void 0===e.delimiter?u.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:u.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:u.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:u.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:u.encodeValuesOnly,filter:l,format:o,formatter:c,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:u.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:u.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:u.strictNullHandling}}(o);"function"==typeof p.filter?l=(0,p.filter)("",l):s(p.filter)&&(c=p.filter);var d=[];if("object"!=typeof l||null===l)return"";var f=i[p.arrayFormat],m="comma"===f&&p.commaRoundTrip;c||(c=Object.keys(l)),p.sort&&c.sort(p.sort);for(var g=e(),y=0;y<c.length;++y){var v=c[y];p.skipNulls&&null===l[v]||a(d,h(l[v],v,f,m,p.allowEmptyArrays,p.strictNullHandling,p.skipNulls,p.encodeDotInKeys,p.encode?p.encoder:null,p.filter,p.sort,p.allowDots,p.serializeDate,p.format,p.formatter,p.encodeValuesOnly,p.charset,g))}var b=d.join(p.delimiter),_=!0===p.addQueryPrefix?"?":"";return p.charsetSentinel&&("iso-8859-1"===p.charset?_+="utf8=%26%2310003%3B&":_+="utf8=%E2%9C%93&"),b.length>0?_+b:""},zP}function lN(){if(VP)return GP;VP=1;var e=aN(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},i=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},s=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},o=function(e,n,r,i){if(e){var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,c=r.depth>0&&/(\[[^[\]]*])/.exec(o),l=c?o.slice(0,c.index):o,u=[];if(l){if(!r.plainObjects&&t.call(Object.prototype,l)&&!r.allowPrototypes)return;u.push(l)}for(var p=0;r.depth>0&&null!==(c=a.exec(o))&&p<r.depth;){if(p+=1,!r.plainObjects&&t.call(Object.prototype,c[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(c[1])}if(c){if(!0===r.strictDepth)throw new RangeError("Input depth exceeded depth option of "+r.depth+" and strictDepth is true");u.push("["+o.slice(c.index)+"]")}return function(e,t,n,r){for(var i=r?t:s(t,n),o=e.length-1;o>=0;--o){var a,c=e[o];if("[]"===c&&n.parseArrays)a=n.allowEmptyArrays&&(""===i||n.strictNullHandling&&null===i)?[]:[].concat(i);else{a=n.plainObjects?Object.create(null):{};var l="["===c.charAt(0)&&"]"===c.charAt(c.length-1)?c.slice(1,-1):c,u=n.decodeDotInKeys?l.replace(/%2E/g,"."):l,p=parseInt(u,10);n.parseArrays||""!==u?!isNaN(p)&&c!==u&&String(p)===u&&p>=0&&n.parseArrays&&p<=n.arrayLimit?(a=[])[p]=i:"__proto__"!==u&&(a[u]=i):a={0:i}}i=a}return i}(u,n,r,i)}};return GP=function(a,c){var l=function(t){if(!t)return r;if(void 0!==t.allowEmptyArrays&&"boolean"!=typeof t.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==t.decodeDotInKeys&&"boolean"!=typeof t.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=void 0===t.charset?r.charset:t.charset,i=void 0===t.duplicates?r.duplicates:t.duplicates;if("combine"!==i&&"first"!==i&&"last"!==i)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===t.allowDots?!0===t.decodeDotInKeys||r.allowDots:!!t.allowDots,allowEmptyArrays:"boolean"==typeof t.allowEmptyArrays?!!t.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:r.allowPrototypes,allowSparse:"boolean"==typeof t.allowSparse?t.allowSparse:r.allowSparse,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:r.arrayLimit,charset:n,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:r.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:r.comma,decodeDotInKeys:"boolean"==typeof t.decodeDotInKeys?t.decodeDotInKeys:r.decodeDotInKeys,decoder:"function"==typeof t.decoder?t.decoder:r.decoder,delimiter:"string"==typeof t.delimiter||e.isRegExp(t.delimiter)?t.delimiter:r.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:r.depth,duplicates:i,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:r.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:r.plainObjects,strictDepth:"boolean"==typeof t.strictDepth?!!t.strictDepth:r.strictDepth,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:r.strictNullHandling}}(c);if(""===a||null==a)return l.plainObjects?Object.create(null):{};for(var u="string"==typeof a?function(o,a){var c={__proto__:null},l=a.ignoreQueryPrefix?o.replace(/^\?/,""):o;l=l.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var u,p=a.parameterLimit===1/0?void 0:a.parameterLimit,h=l.split(a.delimiter,p),d=-1,f=a.charset;if(a.charsetSentinel)for(u=0;u<h.length;++u)0===h[u].indexOf("utf8=")&&("utf8=%E2%9C%93"===h[u]?f="utf-8":"utf8=%26%2310003%3B"===h[u]&&(f="iso-8859-1"),d=u,u=h.length);for(u=0;u<h.length;++u)if(u!==d){var m,g,y=h[u],v=y.indexOf("]="),b=-1===v?y.indexOf("="):v+1;-1===b?(m=a.decoder(y,r.decoder,f,"key"),g=a.strictNullHandling?null:""):(m=a.decoder(y.slice(0,b),r.decoder,f,"key"),g=e.maybeMap(s(y.slice(b+1),a),(function(e){return a.decoder(e,r.decoder,f,"value")}))),g&&a.interpretNumericEntities&&"iso-8859-1"===f&&(g=i(g)),y.indexOf("[]=")>-1&&(g=n(g)?[g]:g);var _=t.call(c,m);_&&"combine"===a.duplicates?c[m]=e.combine(c[m],g):_&&"last"!==a.duplicates||(c[m]=g)}return c}(a,l):a,p=l.plainObjects?Object.create(null):{},h=Object.keys(u),d=0;d<h.length;++d){var f=h[d],m=o(f,u[f],l,"string"==typeof a);p=e.merge(p,m,l)}return!0===l.allowSparse?p:e.compact(p)},GP}function uN(){if(YP)return KP;YP=1;var e=cN(),t=lN(),n=oN();return KP={formats:n,parse:t,stringify:e}}
|
|
156
156
|
/*!
|
|
157
157
|
* body-parser
|
|
158
158
|
* Copyright(c) 2014 Jonathan Ong
|
|
@@ -374,7 +374,7 @@ const s$=y,o$=VH,a$=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),c$=e=>"nu
|
|
|
374
374
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
375
375
|
* MIT Licensed
|
|
376
376
|
*/
|
|
377
|
-
parse:function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var n={},r=t||{},i=e.split(NV),s=r.decode||IV,o=0;o<i.length;o++){var a=i[o],c=a.indexOf("=");if(!(c<0)){var l=a.substr(0,c).trim(),u=a.substr(++c,a.length).trim();'"'==u[0]&&(u=u.slice(1,-1)),null==n[l]&&(n[l]=FV(u,s))}}return n},serialize:function(e,t,n){var r=n||{},i=r.encode||PV;if("function"!=typeof i)throw new TypeError("option encode is invalid");if(!jV.test(e))throw new TypeError("argument name is invalid");var s=i(t);if(s&&!jV.test(s))throw new TypeError("argument val is invalid");var o=e+"="+s;if(null!=r.maxAge){var a=r.maxAge-0;if(isNaN(a)||!isFinite(a))throw new TypeError("option maxAge is invalid");o+="; Max-Age="+Math.floor(a)}if(r.domain){if(!jV.test(r.domain))throw new TypeError("option domain is invalid");o+="; Domain="+r.domain}if(r.path){if(!jV.test(r.path))throw new TypeError("option path is invalid");o+="; Path="+r.path}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");o+="; Expires="+r.expires.toUTCString()}r.httpOnly&&(o+="; HttpOnly");r.secure&&(o+="; Secure");if(r.sameSite){switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return o}},IV=decodeURIComponent,PV=encodeURIComponent,NV=/; */,jV=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function FV(e,t){try{return t(e)}catch(t){return e}}var BV,MV,UV,qV,HV,$V,zV={exports:{}},WV={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}},GV={exports:{}},VV={exports:{}};function KV(){if(UV)return VV.exports;UV=1;const e="function"==typeof __webpack_require__?__non_webpack_require__:rF;return"function"==typeof e.addon?VV.exports=e.addon.bind(e):VV.exports=function(){if(MV)return BV;MV=1;var e=s,t=o,n=a,r="function"==typeof __webpack_require__?__non_webpack_require__:rF,i=process.config&&process.config.variables||{},c=!!process.env.PREBUILDS_ONLY,l=process.versions.modules,u=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",p=process.env.npm_config_arch||n.arch(),h=process.env.npm_config_platform||n.platform(),d=process.env.LIBC||(function(t){return"linux"===t&&e.existsSync("/etc/alpine-release")}(h)?"musl":"glibc"),f=process.env.ARM_VERSION||("arm64"===p?"8":i.arm_version)||"",m=(process.versions.uv||"").split(".")[0];function g(e){return r(g.resolve(e))}function y(t){try{return e.readdirSync(t)}catch(e){return[]}}function v(e,n){var r=y(e).filter(n);return r[0]&&t.join(e,r[0])}function b(e){return/\.node$/.test(e)}function _(e){var t=e.split("-");if(2===t.length){var n=t[0],r=t[1].split("+");if(n&&r.length&&r.every(Boolean))return{name:e,platform:n,architectures:r}}}function w(e,t){return function(n){return null!=n&&n.platform===e&&n.architectures.includes(t)}}function x(e,t){return e.architectures.length-t.architectures.length}function E(e){var t=e.split("."),n={file:e,specificity:0};if("node"===t.pop()){for(var r=0;r<t.length;r++){var i=t[r];if("node"===i||"electron"===i||"node-webkit"===i)n.runtime=i;else if("napi"===i)n.napi=!0;else if("abi"===i.slice(0,3))n.abi=i.slice(3);else if("uv"===i.slice(0,2))n.uv=i.slice(2);else if("armv"===i.slice(0,4))n.armv=i.slice(4);else{if("glibc"!==i&&"musl"!==i)continue;n.libc=i}n.specificity++}return n}}function S(e,t){return function(n){return!(null==n||n.runtime&&n.runtime!==e&&!function(e){return"node"===e.runtime&&e.napi}(n)||n.abi&&n.abi!==t&&!n.napi||n.uv&&n.uv!==m||n.armv&&n.armv!==f||n.libc&&n.libc!==d)}}function T(e){return function(t,n){return t.runtime!==n.runtime?t.runtime===e?-1:1:t.abi!==n.abi?t.abi?-1:1:t.specificity!==n.specificity?t.specificity>n.specificity?-1:1:0}}return BV=g,g.resolve=g.path=function(e){e=t.resolve(e||".");try{var n=r(t.join(e,"package.json")).name.toUpperCase().replace(/-/g,"_");process.env[n+"_PREBUILD"]&&(e=process.env[n+"_PREBUILD"])}catch(e){}if(!c){var i=v(t.join(e,"build/Release"),b);if(i)return i;var s=v(t.join(e,"build/Debug"),b);if(s)return s}var o=D(e);if(o)return o;var a=D(t.dirname(process.execPath));if(a)return a;var g=["platform="+h,"arch="+p,"runtime="+u,"abi="+l,"uv="+m,f?"armv="+f:"","libc="+d,"node="+process.versions.node,process.versions.electron?"electron="+process.versions.electron:"","function"==typeof __webpack_require__?"webpack=true":""].filter(Boolean).join(" ");throw new Error("No native build was found for "+g+"\n loaded from: "+e+"\n");function D(e){var n=y(t.join(e,"prebuilds")).map(_).filter(w(h,p)).sort(x)[0];if(n){var r=t.join(e,"prebuilds",n.name),i=y(r).map(E).filter(S(u,l)).sort(T(u))[0];return i?t.join(r,i.file):void 0}}},g.parseTags=E,g.matchTags=S,g.compareTags=T,g.parseTuple=_,g.matchTuple=w,g.compareTuples=x,BV}(),VV.exports}const{EMPTY_BUFFER:YV}=WV,ZV=Buffer[Symbol.species];function QV(e,t,n,r,i){for(let s=0;s<i;s++)n[r+s]=e[s]^t[3&s]}function JV(e,t){for(let n=0;n<e.length;n++)e[n]^=t[3&n]}if(zV.exports={concat:function(e,t){if(0===e.length)return YV;if(1===e.length)return e[0];const n=Buffer.allocUnsafe(t);let r=0;for(let t=0;t<e.length;t++){const i=e[t];n.set(i,r),r+=i.length}return r<t?new ZV(n.buffer,n.byteOffset,r):n},mask:QV,toArrayBuffer:function(e){return e.length===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.length)},toBuffer:function e(t){if(e.readOnly=!0,Buffer.isBuffer(t))return t;let n;return t instanceof ArrayBuffer?n=new ZV(t):ArrayBuffer.isView(t)?n=new ZV(t.buffer,t.byteOffset,t.byteLength):(n=Buffer.from(t),e.readOnly=!1),n},unmask:JV},!process.env.WS_NO_BUFFER_UTIL)try{const e=function(){if($V)return GV.exports;$V=1;try{GV.exports=KV()(__dirname)}catch(e){GV.exports=(HV||(HV=1,qV={mask:(e,t,n,r,i)=>{for(var s=0;s<i;s++)n[r+s]=e[s]^t[3&s]},unmask:(e,t)=>{const n=e.length;for(var r=0;r<n;r++)e[r]^=t[3&r]}}),qV)}return GV.exports}();zV.exports.mask=function(t,n,r,i,s){s<48?QV(t,n,r,i,s):e.mask(t,n,r,i,s)},zV.exports.unmask=function(t,n){t.length<32?JV(t,n):e.unmask(t,n)}}catch(e){}var XV=zV.exports;const eK=Symbol("kDone"),tK=Symbol("kRun");const nK=T,rK=XV,iK=class{constructor(e){this[eK]=()=>{this.pending--,this[tK]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[tK]()}[tK](){if(this.pending!==this.concurrency&&this.jobs.length){const e=this.jobs.shift();this.pending++,e(this[eK])}}},{kStatusCode:sK}=WV,oK=Buffer[Symbol.species],aK=Buffer.from([0,0,255,255]),cK=Symbol("permessage-deflate"),lK=Symbol("total-length"),uK=Symbol("callback"),pK=Symbol("buffers"),hK=Symbol("error");let dK;var fK=class{constructor(e,t,n){if(this._maxPayload=0|n,this._options=e||{},this._threshold=void 0!==this._options.threshold?this._options.threshold:1024,this._isServer=!!t,this._deflate=null,this._inflate=null,this.params=null,!dK){const e=void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10;dK=new iK(e)}}static get extensionName(){return"permessage-deflate"}offer(){const e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:null==this._options.clientMaxWindowBits&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){const e=this._deflate[uK];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){const t=this._options,n=e.find((e=>!(!1===t.serverNoContextTakeover&&e.server_no_context_takeover||e.server_max_window_bits&&(!1===t.serverMaxWindowBits||"number"==typeof t.serverMaxWindowBits&&t.serverMaxWindowBits>e.server_max_window_bits)||"number"==typeof t.clientMaxWindowBits&&!e.client_max_window_bits)));if(!n)throw new Error("None of the extension offers can be accepted");return t.serverNoContextTakeover&&(n.server_no_context_takeover=!0),t.clientNoContextTakeover&&(n.client_no_context_takeover=!0),"number"==typeof t.serverMaxWindowBits&&(n.server_max_window_bits=t.serverMaxWindowBits),"number"==typeof t.clientMaxWindowBits?n.client_max_window_bits=t.clientMaxWindowBits:!0!==n.client_max_window_bits&&!1!==t.clientMaxWindowBits||delete n.client_max_window_bits,n}acceptAsClient(e){const t=e[0];if(!1===this._options.clientNoContextTakeover&&t.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(t.client_max_window_bits){if(!1===this._options.clientMaxWindowBits||"number"==typeof this._options.clientMaxWindowBits&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"')}else"number"==typeof this._options.clientMaxWindowBits&&(t.client_max_window_bits=this._options.clientMaxWindowBits);return t}normalizeParams(e){return e.forEach((e=>{Object.keys(e).forEach((t=>{let n=e[t];if(n.length>1)throw new Error(`Parameter "${t}" must have only a single value`);if(n=n[0],"client_max_window_bits"===t){if(!0!==n){const e=+n;if(!Number.isInteger(e)||e<8||e>15)throw new TypeError(`Invalid value for parameter "${t}": ${n}`);n=e}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${t}": ${n}`)}else if("server_max_window_bits"===t){const e=+n;if(!Number.isInteger(e)||e<8||e>15)throw new TypeError(`Invalid value for parameter "${t}": ${n}`);n=e}else{if("client_no_context_takeover"!==t&&"server_no_context_takeover"!==t)throw new Error(`Unknown parameter "${t}"`);if(!0!==n)throw new TypeError(`Invalid value for parameter "${t}": ${n}`)}e[t]=n}))})),e}decompress(e,t,n){dK.add((r=>{this._decompress(e,t,((e,t)=>{r(),n(e,t)}))}))}compress(e,t,n){dK.add((r=>{this._compress(e,t,((e,t)=>{r(),n(e,t)}))}))}_decompress(e,t,n){const r=this._isServer?"client":"server";if(!this._inflate){const e=`${r}_max_window_bits`,t="number"!=typeof this.params[e]?nK.Z_DEFAULT_WINDOWBITS:this.params[e];this._inflate=nK.createInflateRaw({...this._options.zlibInflateOptions,windowBits:t}),this._inflate[cK]=this,this._inflate[lK]=0,this._inflate[pK]=[],this._inflate.on("error",yK),this._inflate.on("data",gK)}this._inflate[uK]=n,this._inflate.write(e),t&&this._inflate.write(aK),this._inflate.flush((()=>{const e=this._inflate[hK];if(e)return this._inflate.close(),this._inflate=null,void n(e);const i=rK.concat(this._inflate[pK],this._inflate[lK]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[lK]=0,this._inflate[pK]=[],t&&this.params[`${r}_no_context_takeover`]&&this._inflate.reset()),n(null,i)}))}_compress(e,t,n){const r=this._isServer?"server":"client";if(!this._deflate){const e=`${r}_max_window_bits`,t="number"!=typeof this.params[e]?nK.Z_DEFAULT_WINDOWBITS:this.params[e];this._deflate=nK.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:t}),this._deflate[lK]=0,this._deflate[pK]=[],this._deflate.on("data",mK)}this._deflate[uK]=n,this._deflate.write(e),this._deflate.flush(nK.Z_SYNC_FLUSH,(()=>{if(!this._deflate)return;let e=rK.concat(this._deflate[pK],this._deflate[lK]);t&&(e=new oK(e.buffer,e.byteOffset,e.length-4)),this._deflate[uK]=null,this._deflate[lK]=0,this._deflate[pK]=[],t&&this.params[`${r}_no_context_takeover`]&&this._deflate.reset(),n(null,e)}))}};function mK(e){this[pK].push(e),this[lK]+=e.length}function gK(e){this[lK]+=e.length,this[cK]._maxPayload<1||this[lK]<=this[cK]._maxPayload?this[pK].push(e):(this[hK]=new RangeError("Max payload size exceeded"),this[hK].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[hK][sK]=1009,this.removeListener("data",gK),this.reset())}function yK(e){this[cK]._inflate=null,e[sK]=1007,this[uK](e)}var vK,bK,_K,wK={exports:{}},xK={exports:{}};const{isUtf8:EK}=v;function SK(e){const t=e.length;let n=0;for(;n<t;)if(128&e[n])if(192==(224&e[n])){if(n+1===t||128!=(192&e[n+1])||192==(254&e[n]))return!1;n+=2}else if(224==(240&e[n])){if(n+2>=t||128!=(192&e[n+1])||128!=(192&e[n+2])||224===e[n]&&128==(224&e[n+1])||237===e[n]&&160==(224&e[n+1]))return!1;n+=3}else{if(240!=(248&e[n]))return!1;if(n+3>=t||128!=(192&e[n+1])||128!=(192&e[n+2])||128!=(192&e[n+3])||240===e[n]&&128==(240&e[n+1])||244===e[n]&&e[n+1]>143||e[n]>244)return!1;n+=4}else n++;return!0}if(wK.exports={isValidStatusCode:function(e){return e>=1e3&&e<=1014&&1004!==e&&1005!==e&&1006!==e||e>=3e3&&e<=4999},isValidUTF8:SK,tokenChars:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0]},EK)wK.exports.isValidUTF8=function(e){return e.length<24?SK(e):EK(e)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{const e=function(){if(_K)return xK.exports;_K=1;try{xK.exports=KV()(__dirname)}catch(e){xK.exports=(bK||(bK=1,vK=function(e){const t=e.length;let n=0;for(;n<t;)if(128&e[n])if(192==(224&e[n])){if(n+1===t||128!=(192&e[n+1])||192==(254&e[n]))return!1;n+=2}else if(224==(240&e[n])){if(n+2>=t||128!=(192&e[n+1])||128!=(192&e[n+2])||224===e[n]&&128==(224&e[n+1])||237===e[n]&&160==(224&e[n+1]))return!1;n+=3}else{if(240!=(248&e[n]))return!1;if(n+3>=t||128!=(192&e[n+1])||128!=(192&e[n+2])||128!=(192&e[n+3])||240===e[n]&&128==(240&e[n+1])||244===e[n]&&e[n+1]>143||e[n]>244)return!1;n+=4}else n++;return!0}),vK)}return xK.exports}();wK.exports.isValidUTF8=function(t){return t.length<32?SK(t):e(t)}}catch(e){}var TK=wK.exports;const{Writable:DK}=h,kK=fK,{BINARY_TYPES:AK,EMPTY_BUFFER:CK,kStatusCode:RK,kWebSocket:OK}=WV,{concat:LK,toArrayBuffer:IK,unmask:PK}=XV,{isValidStatusCode:NK,isValidUTF8:jK}=TK,FK=Buffer[Symbol.species];var BK=class extends DK{constructor(e={}){super(),this._allowSynchronousEvents=void 0===e.allowSynchronousEvents||e.allowSynchronousEvents,this._binaryType=e.binaryType||AK[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=0|e.maxPayload,this._skipUTF8Validation=!!e.skipUTF8Validation,this[OK]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=0}_write(e,t,n){if(8===this._opcode&&0==this._state)return n();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(n)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){const t=this._buffers[0];return this._buffers[0]=new FK(t.buffer,t.byteOffset+e,t.length-e),new FK(t.buffer,t.byteOffset,e)}const t=Buffer.allocUnsafe(e);do{const n=this._buffers[0],r=t.length-e;e>=n.length?t.set(this._buffers.shift(),r):(t.set(new Uint8Array(n.buffer,n.byteOffset,e),r),this._buffers[0]=new FK(n.buffer,n.byteOffset+e,n.length-e)),e-=n.length}while(e>0);return t}startLoop(e){this._loop=!0;do{switch(this._state){case 0:this.getInfo(e);break;case 1:this.getPayloadLength16(e);break;case 2:this.getPayloadLength64(e);break;case 3:this.getMask();break;case 4:this.getData(e);break;case 5:case 6:return void(this._loop=!1)}}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2)return void(this._loop=!1);const t=this.consume(2);if(48&t[0]){return void e(this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3"))}const n=!(64&~t[0]);if(!n||this._extensions[kK.extensionName]){if(this._fin=!(128&~t[0]),this._opcode=15&t[0],this._payloadLength=127&t[1],0===this._opcode){if(n){return void e(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"))}if(!this._fragmented){return void e(this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE"))}this._opcode=this._fragmented}else if(1===this._opcode||2===this._opcode){if(this._fragmented){return void e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"))}this._compressed=n}else{if(!(this._opcode>7&&this._opcode<11)){return void e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"))}if(!this._fin){return void e(this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN"))}if(n){return void e(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"))}if(this._payloadLength>125||8===this._opcode&&1===this._payloadLength){return void e(this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH"))}}if(this._fin||this._fragmented||(this._fragmented=this._opcode),this._masked=!(128&~t[1]),this._isServer){if(!this._masked){return void e(this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK"))}}else if(this._masked){return void e(this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK"))}126===this._payloadLength?this._state=1:127===this._payloadLength?this._state=2:this.haveLength(e)}else{e(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"))}}getPayloadLength16(e){this._bufferedBytes<2?this._loop=!1:(this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e))}getPayloadLength64(e){if(this._bufferedBytes<8)return void(this._loop=!1);const t=this.consume(8),n=t.readUInt32BE(0);if(n>Math.pow(2,21)-1){e(this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH"))}else this._payloadLength=n*Math.pow(2,32)+t.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){e(this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"))}else this._masked?this._state=3:this._state=4}getMask(){this._bufferedBytes<4?this._loop=!1:(this._mask=this.consume(4),this._state=4)}getData(e){let t=CK;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength)return void(this._loop=!1);t=this.consume(this._payloadLength),this._masked&&this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3]&&PK(t,this._mask)}if(this._opcode>7)this.controlMessage(t,e);else{if(this._compressed)return this._state=5,void this.decompress(t,e);t.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(t)),this.dataMessage(e)}}decompress(e,t){this._extensions[kK.extensionName].decompress(e,this._fin,((e,n)=>{if(e)return t(e);if(n.length){if(this._messageLength+=n.length,this._messageLength>this._maxPayload&&this._maxPayload>0){const e=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");return void t(e)}this._fragments.push(n)}this.dataMessage(t),0===this._state&&this.startLoop(t)}))}dataMessage(e){if(!this._fin)return void(this._state=0);const t=this._messageLength,n=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],2===this._opcode){let r;r="nodebuffer"===this._binaryType?LK(n,t):"arraybuffer"===this._binaryType?IK(LK(n,t)):n,this._allowSynchronousEvents?(this.emit("message",r,!0),this._state=0):(this._state=6,setImmediate((()=>{this.emit("message",r,!0),this._state=0,this.startLoop(e)})))}else{const r=LK(n,t);if(!this._skipUTF8Validation&&!jK(r)){const t=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");return void e(t)}5===this._state||this._allowSynchronousEvents?(this.emit("message",r,!1),this._state=0):(this._state=6,setImmediate((()=>{this.emit("message",r,!1),this._state=0,this.startLoop(e)})))}}controlMessage(e,t){if(8!==this._opcode)this._allowSynchronousEvents?(this.emit(9===this._opcode?"ping":"pong",e),this._state=0):(this._state=6,setImmediate((()=>{this.emit(9===this._opcode?"ping":"pong",e),this._state=0,this.startLoop(t)})));else{if(0===e.length)this._loop=!1,this.emit("conclude",1005,CK),this.end();else{const n=e.readUInt16BE(0);if(!NK(n)){const e=this.createError(RangeError,`invalid status code ${n}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");return void t(e)}const r=new FK(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!jK(r)){const e=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");return void t(e)}this._loop=!1,this.emit("conclude",n,r),this.end()}this._state=0}}createError(e,t,n,r,i){this._loop=!1,this._errored=!0;const s=new e(n?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(s,this.createError),s.code=i,s[RK]=r,s}};const{randomFillSync:MK}=w,UK=fK,{EMPTY_BUFFER:qK}=WV,{isValidStatusCode:HK}=TK,{mask:$K,toBuffer:zK}=XV,WK=Symbol("kByteLength"),GK=Buffer.alloc(4),VK=8192;let KK,YK=VK;var ZK=class e{constructor(e,t,n){this._extensions=t||{},n&&(this._generateMask=n,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(e,t){let n,r,i=!1,s=2,o=!1;t.mask&&(n=t.maskBuffer||GK,t.generateMask?t.generateMask(n):(YK===VK&&(void 0===KK&&(KK=Buffer.alloc(VK)),MK(KK,0,VK),YK=0),n[0]=KK[YK++],n[1]=KK[YK++],n[2]=KK[YK++],n[3]=KK[YK++]),o=!(n[0]|n[1]|n[2]|n[3]),s=6),"string"==typeof e?r=t.mask&&!o||void 0===t[WK]?(e=Buffer.from(e)).length:t[WK]:(r=e.length,i=t.mask&&t.readOnly&&!o);let a=r;r>=65536?(s+=8,a=127):r>125&&(s+=2,a=126);const c=Buffer.allocUnsafe(i?r+s:s);return c[0]=t.fin?128|t.opcode:t.opcode,t.rsv1&&(c[0]|=64),c[1]=a,126===a?c.writeUInt16BE(r,2):127===a&&(c[2]=c[3]=0,c.writeUIntBE(r,4,6)),t.mask?(c[1]|=128,c[s-4]=n[0],c[s-3]=n[1],c[s-2]=n[2],c[s-1]=n[3],o?[c,e]:i?($K(e,n,c,s,r),[c]):($K(e,n,e,0,r),[c,e])):[c,e]}close(t,n,r,i){let s;if(void 0===t)s=qK;else{if("number"!=typeof t||!HK(t))throw new TypeError("First argument must be a valid error code number");if(void 0!==n&&n.length){const e=Buffer.byteLength(n);if(e>123)throw new RangeError("The message must not be greater than 123 bytes");s=Buffer.allocUnsafe(2+e),s.writeUInt16BE(t,0),"string"==typeof n?s.write(n,2):s.set(n,2)}else s=Buffer.allocUnsafe(2),s.writeUInt16BE(t,0)}const o={[WK]:s.length,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._deflating?this.enqueue([this.dispatch,s,!1,o,i]):this.sendFrame(e.frame(s,o),i)}ping(t,n,r){let i,s;if("string"==typeof t?(i=Buffer.byteLength(t),s=!1):(i=(t=zK(t)).length,s=zK.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");const o={[WK]:i,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:9,readOnly:s,rsv1:!1};this._deflating?this.enqueue([this.dispatch,t,!1,o,r]):this.sendFrame(e.frame(t,o),r)}pong(t,n,r){let i,s;if("string"==typeof t?(i=Buffer.byteLength(t),s=!1):(i=(t=zK(t)).length,s=zK.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");const o={[WK]:i,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:10,readOnly:s,rsv1:!1};this._deflating?this.enqueue([this.dispatch,t,!1,o,r]):this.sendFrame(e.frame(t,o),r)}send(t,n,r){const i=this._extensions[UK.extensionName];let s,o,a=n.binary?2:1,c=n.compress;if("string"==typeof t?(s=Buffer.byteLength(t),o=!1):(s=(t=zK(t)).length,o=zK.readOnly),this._firstFragment?(this._firstFragment=!1,c&&i&&i.params[i._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(c=s>=i._threshold),this._compress=c):(c=!1,a=0),n.fin&&(this._firstFragment=!0),i){const e={[WK]:s,fin:n.fin,generateMask:this._generateMask,mask:n.mask,maskBuffer:this._maskBuffer,opcode:a,readOnly:o,rsv1:c};this._deflating?this.enqueue([this.dispatch,t,this._compress,e,r]):this.dispatch(t,this._compress,e,r)}else this.sendFrame(e.frame(t,{[WK]:s,fin:n.fin,generateMask:this._generateMask,mask:n.mask,maskBuffer:this._maskBuffer,opcode:a,readOnly:o,rsv1:!1}),r)}dispatch(t,n,r,i){if(!n)return void this.sendFrame(e.frame(t,r),i);const s=this._extensions[UK.extensionName];this._bufferedBytes+=r[WK],this._deflating=!0,s.compress(t,r.fin,((t,n)=>{if(this._socket.destroyed){const e=new Error("The socket was closed while data was being compressed");"function"==typeof i&&i(e);for(let t=0;t<this._queue.length;t++){const n=this._queue[t],r=n[n.length-1];"function"==typeof r&&r(e)}}else this._bufferedBytes-=r[WK],this._deflating=!1,r.readOnly=!1,this.sendFrame(e.frame(n,r),i),this.dequeue()}))}dequeue(){for(;!this._deflating&&this._queue.length;){const e=this._queue.shift();this._bufferedBytes-=e[3][WK],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][WK],this._queue.push(e)}sendFrame(e,t){2===e.length?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],t),this._socket.uncork()):this._socket.write(e[0],t)}};const{kForOnEventAttribute:QK,kListener:JK}=WV,XK=Symbol("kCode"),eY=Symbol("kData"),tY=Symbol("kError"),nY=Symbol("kMessage"),rY=Symbol("kReason"),iY=Symbol("kTarget"),sY=Symbol("kType"),oY=Symbol("kWasClean");class aY{constructor(e){this[iY]=null,this[sY]=e}get target(){return this[iY]}get type(){return this[sY]}}Object.defineProperty(aY.prototype,"target",{enumerable:!0}),Object.defineProperty(aY.prototype,"type",{enumerable:!0});class cY extends aY{constructor(e,t={}){super(e),this[XK]=void 0===t.code?0:t.code,this[rY]=void 0===t.reason?"":t.reason,this[oY]=void 0!==t.wasClean&&t.wasClean}get code(){return this[XK]}get reason(){return this[rY]}get wasClean(){return this[oY]}}Object.defineProperty(cY.prototype,"code",{enumerable:!0}),Object.defineProperty(cY.prototype,"reason",{enumerable:!0}),Object.defineProperty(cY.prototype,"wasClean",{enumerable:!0});class lY extends aY{constructor(e,t={}){super(e),this[tY]=void 0===t.error?null:t.error,this[nY]=void 0===t.message?"":t.message}get error(){return this[tY]}get message(){return this[nY]}}Object.defineProperty(lY.prototype,"error",{enumerable:!0}),Object.defineProperty(lY.prototype,"message",{enumerable:!0});class uY extends aY{constructor(e,t={}){super(e),this[eY]=void 0===t.data?null:t.data}get data(){return this[eY]}}Object.defineProperty(uY.prototype,"data",{enumerable:!0});const pY={addEventListener(e,t,n={}){for(const r of this.listeners(e))if(!n[QK]&&r[JK]===t&&!r[QK])return;let r;if("message"===e)r=function(e,n){const r=new uY("message",{data:n?e:e.toString()});r[iY]=this,dY(t,this,r)};else if("close"===e)r=function(e,n){const r=new cY("close",{code:e,reason:n.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[iY]=this,dY(t,this,r)};else if("error"===e)r=function(e){const n=new lY("error",{error:e,message:e.message});n[iY]=this,dY(t,this,n)};else{if("open"!==e)return;r=function(){const e=new aY("open");e[iY]=this,dY(t,this,e)}}r[QK]=!!n[QK],r[JK]=t,n.once?this.once(e,r):this.on(e,r)},removeEventListener(e,t){for(const n of this.listeners(e))if(n[JK]===t&&!n[QK]){this.removeListener(e,n);break}}};var hY={CloseEvent:cY,ErrorEvent:lY,Event:aY,EventTarget:pY,MessageEvent:uY};function dY(e,t,n){"object"==typeof e&&e.handleEvent?e.handleEvent.call(e,n):e.call(t,n)}const{tokenChars:fY}=TK;function mY(e,t,n){void 0===e[t]?e[t]=[n]:e[t].push(n)}var gY={format:function(e){return Object.keys(e).map((t=>{let n=e[t];return Array.isArray(n)||(n=[n]),n.map((e=>[t].concat(Object.keys(e).map((t=>{let n=e[t];return Array.isArray(n)||(n=[n]),n.map((e=>!0===e?t:`${t}=${e}`)).join("; ")}))).join("; "))).join(", ")})).join(", ")},parse:function(e){const t=Object.create(null);let n,r,i=Object.create(null),s=!1,o=!1,a=!1,c=-1,l=-1,u=-1,p=0;for(;p<e.length;p++)if(l=e.charCodeAt(p),void 0===n)if(-1===u&&1===fY[l])-1===c&&(c=p);else if(0===p||32!==l&&9!==l){if(59!==l&&44!==l)throw new SyntaxError(`Unexpected character at index ${p}`);{if(-1===c)throw new SyntaxError(`Unexpected character at index ${p}`);-1===u&&(u=p);const r=e.slice(c,u);44===l?(mY(t,r,i),i=Object.create(null)):n=r,c=u=-1}}else-1===u&&-1!==c&&(u=p);else if(void 0===r)if(-1===u&&1===fY[l])-1===c&&(c=p);else if(32===l||9===l)-1===u&&-1!==c&&(u=p);else if(59===l||44===l){if(-1===c)throw new SyntaxError(`Unexpected character at index ${p}`);-1===u&&(u=p),mY(i,e.slice(c,u),!0),44===l&&(mY(t,n,i),i=Object.create(null),n=void 0),c=u=-1}else{if(61!==l||-1===c||-1!==u)throw new SyntaxError(`Unexpected character at index ${p}`);r=e.slice(c,p),c=u=-1}else if(o){if(1!==fY[l])throw new SyntaxError(`Unexpected character at index ${p}`);-1===c?c=p:s||(s=!0),o=!1}else if(a)if(1===fY[l])-1===c&&(c=p);else if(34===l&&-1!==c)a=!1,u=p;else{if(92!==l)throw new SyntaxError(`Unexpected character at index ${p}`);o=!0}else if(34===l&&61===e.charCodeAt(p-1))a=!0;else if(-1===u&&1===fY[l])-1===c&&(c=p);else if(-1===c||32!==l&&9!==l){if(59!==l&&44!==l)throw new SyntaxError(`Unexpected character at index ${p}`);{if(-1===c)throw new SyntaxError(`Unexpected character at index ${p}`);-1===u&&(u=p);let o=e.slice(c,u);s&&(o=o.replace(/\\/g,""),s=!1),mY(i,r,o),44===l&&(mY(t,n,i),i=Object.create(null),n=void 0),r=void 0,c=u=-1}}else-1===u&&(u=p);if(-1===c||a||32===l||9===l)throw new SyntaxError("Unexpected end of input");-1===u&&(u=p);const h=e.slice(c,u);return void 0===n?mY(t,h,i):(void 0===r?mY(i,h,!0):mY(i,r,s?h.replace(/\\/g,""):h),mY(t,n,i)),t}};const yY=p,vY=E,bY=x,_Y=O,wY=N,{randomBytes:xY,createHash:EY}=w,{URL:SY}=S,TY=fK,DY=BK,kY=ZK,{BINARY_TYPES:AY,EMPTY_BUFFER:CY,GUID:RY,kForOnEventAttribute:OY,kListener:LY,kStatusCode:IY,kWebSocket:PY,NOOP:NY}=WV,{EventTarget:{addEventListener:jY,removeEventListener:FY}}=hY,{format:BY,parse:MY}=gY,{toBuffer:UY}=XV,qY=Symbol("kAborted"),HY=[8,13],$Y=["CONNECTING","OPEN","CLOSING","CLOSED"],zY=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;let WY=class e extends yY{constructor(t,n,r){super(),this._binaryType=AY[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=CY,this._closeTimer=null,this._extensions={},this._paused=!1,this._protocol="",this._readyState=e.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,null!==t?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,void 0===n?n=[]:Array.isArray(n)||("object"==typeof n&&null!==n?(r=n,n=[]):n=[n]),VY(this,t,n,r)):(this._autoPong=r.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){AY.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(t,n,r){const i=new DY({allowSynchronousEvents:r.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:r.maxPayload,skipUTF8Validation:r.skipUTF8Validation});this._sender=new kY(t,this._extensions,r.generateMask),this._receiver=i,this._socket=t,i[PY]=this,t[PY]=this,i.on("conclude",XY),i.on("drain",eZ),i.on("error",tZ),i.on("message",rZ),i.on("ping",iZ),i.on("pong",sZ),t.setTimeout&&t.setTimeout(0),t.setNoDelay&&t.setNoDelay(),n.length>0&&t.unshift(n),t.on("close",aZ),t.on("data",cZ),t.on("end",lZ),t.on("error",uZ),this._readyState=e.OPEN,this.emit("open")}emitClose(){if(!this._socket)return this._readyState=e.CLOSED,void this.emit("close",this._closeCode,this._closeMessage);this._extensions[TY.extensionName]&&this._extensions[TY.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=e.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(t,n){if(this.readyState!==e.CLOSED)if(this.readyState!==e.CONNECTING)this.readyState!==e.CLOSING?(this._readyState=e.CLOSING,this._sender.close(t,n,!this._isServer,(e=>{e||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())})),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),3e4)):this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();else{const e="WebSocket was closed before the connection was established";QY(this,this._req,e)}}pause(){this.readyState!==e.CONNECTING&&this.readyState!==e.CLOSED&&(this._paused=!0,this._socket.pause())}ping(t,n,r){if(this.readyState===e.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");"function"==typeof t?(r=t,t=n=void 0):"function"==typeof n&&(r=n,n=void 0),"number"==typeof t&&(t=t.toString()),this.readyState===e.OPEN?(void 0===n&&(n=!this._isServer),this._sender.ping(t||CY,n,r)):JY(this,t,r)}pong(t,n,r){if(this.readyState===e.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");"function"==typeof t?(r=t,t=n=void 0):"function"==typeof n&&(r=n,n=void 0),"number"==typeof t&&(t=t.toString()),this.readyState===e.OPEN?(void 0===n&&(n=!this._isServer),this._sender.pong(t||CY,n,r)):JY(this,t,r)}resume(){this.readyState!==e.CONNECTING&&this.readyState!==e.CLOSED&&(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(t,n,r){if(this.readyState===e.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if("function"==typeof n&&(r=n,n={}),"number"==typeof t&&(t=t.toString()),this.readyState!==e.OPEN)return void JY(this,t,r);const i={binary:"string"!=typeof t,mask:!this._isServer,compress:!0,fin:!0,...n};this._extensions[TY.extensionName]||(i.compress=!1),this._sender.send(t||CY,i,r)}terminate(){if(this.readyState!==e.CLOSED)if(this.readyState!==e.CONNECTING)this._socket&&(this._readyState=e.CLOSING,this._socket.destroy());else{const e="WebSocket was closed before the connection was established";QY(this,this._req,e)}}};Object.defineProperty(WY,"CONNECTING",{enumerable:!0,value:$Y.indexOf("CONNECTING")}),Object.defineProperty(WY.prototype,"CONNECTING",{enumerable:!0,value:$Y.indexOf("CONNECTING")}),Object.defineProperty(WY,"OPEN",{enumerable:!0,value:$Y.indexOf("OPEN")}),Object.defineProperty(WY.prototype,"OPEN",{enumerable:!0,value:$Y.indexOf("OPEN")}),Object.defineProperty(WY,"CLOSING",{enumerable:!0,value:$Y.indexOf("CLOSING")}),Object.defineProperty(WY.prototype,"CLOSING",{enumerable:!0,value:$Y.indexOf("CLOSING")}),Object.defineProperty(WY,"CLOSED",{enumerable:!0,value:$Y.indexOf("CLOSED")}),Object.defineProperty(WY.prototype,"CLOSED",{enumerable:!0,value:$Y.indexOf("CLOSED")}),["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach((e=>{Object.defineProperty(WY.prototype,e,{enumerable:!0})})),["open","error","close","message"].forEach((e=>{Object.defineProperty(WY.prototype,`on${e}`,{enumerable:!0,get(){for(const t of this.listeners(e))if(t[OY])return t[LY];return null},set(t){for(const t of this.listeners(e))if(t[OY]){this.removeListener(e,t);break}"function"==typeof t&&this.addEventListener(e,t,{[OY]:!0})}})})),WY.prototype.addEventListener=jY,WY.prototype.removeEventListener=FY;var GY=WY;function VY(e,t,n,r){const i={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:HY[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(e._autoPong=i.autoPong,!HY.includes(i.protocolVersion))throw new RangeError(`Unsupported protocol version: ${i.protocolVersion} (supported versions: ${HY.join(", ")})`);let s;if(t instanceof SY)s=t;else try{s=new SY(t)}catch(e){throw new SyntaxError(`Invalid URL: ${t}`)}"http:"===s.protocol?s.protocol="ws:":"https:"===s.protocol&&(s.protocol="wss:"),e._url=s.href;const o="wss:"===s.protocol,a="ws+unix:"===s.protocol;let c;if("ws:"===s.protocol||o||a?a&&!s.pathname?c="The URL's pathname is empty":s.hash&&(c="The URL contains a fragment identifier"):c='The URL\'s protocol must be one of "ws:", "wss:", "http:", "https", or "ws+unix:"',c){const t=new SyntaxError(c);if(0===e._redirects)throw t;return void KY(e,t)}const l=o?443:80,u=xY(16).toString("base64"),p=o?vY.request:bY.request,h=new Set;let d,f;if(i.createConnection=i.createConnection||(o?ZY:YY),i.defaultPort=i.defaultPort||l,i.port=s.port||l,i.host=s.hostname.startsWith("[")?s.hostname.slice(1,-1):s.hostname,i.headers={...i.headers,"Sec-WebSocket-Version":i.protocolVersion,"Sec-WebSocket-Key":u,Connection:"Upgrade",Upgrade:"websocket"},i.path=s.pathname+s.search,i.timeout=i.handshakeTimeout,i.perMessageDeflate&&(d=new TY(!0!==i.perMessageDeflate?i.perMessageDeflate:{},!1,i.maxPayload),i.headers["Sec-WebSocket-Extensions"]=BY({[TY.extensionName]:d.offer()})),n.length){for(const e of n){if("string"!=typeof e||!zY.test(e)||h.has(e))throw new SyntaxError("An invalid or duplicated subprotocol was specified");h.add(e)}i.headers["Sec-WebSocket-Protocol"]=n.join(",")}if(i.origin&&(i.protocolVersion<13?i.headers["Sec-WebSocket-Origin"]=i.origin:i.headers.Origin=i.origin),(s.username||s.password)&&(i.auth=`${s.username}:${s.password}`),a){const e=i.path.split(":");i.socketPath=e[0],i.path=e[1]}if(i.followRedirects){if(0===e._redirects){e._originalIpc=a,e._originalSecure=o,e._originalHostOrSocketPath=a?i.socketPath:s.host;const t=r&&r.headers;if(r={...r,headers:{}},t)for(const[e,n]of Object.entries(t))r.headers[e.toLowerCase()]=n}else if(0===e.listenerCount("redirect")){const t=a?!!e._originalIpc&&i.socketPath===e._originalHostOrSocketPath:!e._originalIpc&&s.host===e._originalHostOrSocketPath;(!t||e._originalSecure&&!o)&&(delete i.headers.authorization,delete i.headers.cookie,t||delete i.headers.host,i.auth=void 0)}i.auth&&!r.headers.authorization&&(r.headers.authorization="Basic "+Buffer.from(i.auth).toString("base64")),f=e._req=p(i),e._redirects&&e.emit("redirect",e.url,f)}else f=e._req=p(i);i.timeout&&f.on("timeout",(()=>{QY(e,f,"Opening handshake has timed out")})),f.on("error",(t=>{null===f||f[qY]||(f=e._req=null,KY(e,t))})),f.on("response",(s=>{const o=s.headers.location,a=s.statusCode;if(o&&i.followRedirects&&a>=300&&a<400){if(++e._redirects>i.maxRedirects)return void QY(e,f,"Maximum redirects exceeded");let s;f.abort();try{s=new SY(o,t)}catch(t){const n=new SyntaxError(`Invalid URL: ${o}`);return void KY(e,n)}VY(e,s,n,r)}else e.emit("unexpected-response",f,s)||QY(e,f,`Unexpected server response: ${s.statusCode}`)})),f.on("upgrade",((t,n,r)=>{if(e.emit("upgrade",t),e.readyState!==WY.CONNECTING)return;f=e._req=null;const s=t.headers.upgrade;if(void 0===s||"websocket"!==s.toLowerCase())return void QY(e,n,"Invalid Upgrade header");const o=EY("sha1").update(u+RY).digest("base64");if(t.headers["sec-websocket-accept"]!==o)return void QY(e,n,"Invalid Sec-WebSocket-Accept header");const a=t.headers["sec-websocket-protocol"];let c;if(void 0!==a?h.size?h.has(a)||(c="Server sent an invalid subprotocol"):c="Server sent a subprotocol but none was requested":h.size&&(c="Server sent no subprotocol"),c)return void QY(e,n,c);a&&(e._protocol=a);const l=t.headers["sec-websocket-extensions"];if(void 0!==l){if(!d){return void QY(e,n,"Server sent a Sec-WebSocket-Extensions header but no extension was requested")}let t;try{t=MY(l)}catch(t){return void QY(e,n,"Invalid Sec-WebSocket-Extensions header")}const r=Object.keys(t);if(1!==r.length||r[0]!==TY.extensionName){return void QY(e,n,"Server indicated an extension that was not requested")}try{d.accept(t[TY.extensionName])}catch(t){return void QY(e,n,"Invalid Sec-WebSocket-Extensions header")}e._extensions[TY.extensionName]=d}e.setSocket(n,r,{allowSynchronousEvents:i.allowSynchronousEvents,generateMask:i.generateMask,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation})})),i.finishRequest?i.finishRequest(f,e):f.end()}function KY(e,t){e._readyState=WY.CLOSING,e.emit("error",t),e.emitClose()}function YY(e){return e.path=e.socketPath,_Y.connect(e)}function ZY(e){return e.path=void 0,e.servername||""===e.servername||(e.servername=_Y.isIP(e.host)?"":e.host),wY.connect(e)}function QY(e,t,n){e._readyState=WY.CLOSING;const r=new Error(n);Error.captureStackTrace(r,QY),t.setHeader?(t[qY]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick(KY,e,r)):(t.destroy(r),t.once("error",e.emit.bind(e,"error")),t.once("close",e.emitClose.bind(e)))}function JY(e,t,n){if(t){const n=UY(t).length;e._socket?e._sender._bufferedBytes+=n:e._bufferedAmount+=n}if(n){const t=new Error(`WebSocket is not open: readyState ${e.readyState} (${$Y[e.readyState]})`);process.nextTick(n,t)}}function XY(e,t){const n=this[PY];n._closeFrameReceived=!0,n._closeMessage=t,n._closeCode=e,void 0!==n._socket[PY]&&(n._socket.removeListener("data",cZ),process.nextTick(oZ,n._socket),1005===e?n.close():n.close(e,t))}function eZ(){const e=this[PY];e.isPaused||e._socket.resume()}function tZ(e){const t=this[PY];void 0!==t._socket[PY]&&(t._socket.removeListener("data",cZ),process.nextTick(oZ,t._socket),t.close(e[IY])),t.emit("error",e)}function nZ(){this[PY].emitClose()}function rZ(e,t){this[PY].emit("message",e,t)}function iZ(e){const t=this[PY];t._autoPong&&t.pong(e,!this._isServer,NY),t.emit("ping",e)}function sZ(e){this[PY].emit("pong",e)}function oZ(e){e.resume()}function aZ(){const e=this[PY];let t;this.removeListener("close",aZ),this.removeListener("data",cZ),this.removeListener("end",lZ),e._readyState=WY.CLOSING,this._readableState.endEmitted||e._closeFrameReceived||e._receiver._writableState.errorEmitted||null===(t=e._socket.read())||e._receiver.write(t),e._receiver.end(),this[PY]=void 0,clearTimeout(e._closeTimer),e._receiver._writableState.finished||e._receiver._writableState.errorEmitted?e.emitClose():(e._receiver.on("error",nZ),e._receiver.on("finish",nZ))}function cZ(e){this[PY]._receiver.write(e)||this.pause()}function lZ(){const e=this[PY];e._readyState=WY.CLOSING,e._receiver.end(),this.end()}function uZ(){const e=this[PY];this.removeListener("error",uZ),this.on("error",NY),e&&(e._readyState=WY.CLOSING,this.destroy())}var pZ=q(GY);const{Duplex:hZ}=h;function dZ(e){e.emit("close")}function fZ(){!this.destroyed&&this._writableState.finished&&this.destroy()}function mZ(e){this.removeListener("error",mZ),this.destroy(),0===this.listenerCount("error")&&this.emit("error",e)}var gZ=function(e,t){let n=!0;const r=new hZ({...t,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return e.on("message",(function(t,n){const i=!n&&r._readableState.objectMode?t.toString():t;r.push(i)||e.pause()})),e.once("error",(function(e){r.destroyed||(n=!1,r.destroy(e))})),e.once("close",(function(){r.destroyed||r.push(null)})),r._destroy=function(t,i){if(e.readyState===e.CLOSED)return i(t),void process.nextTick(dZ,r);let s=!1;e.once("error",(function(e){s=!0,i(e)})),e.once("close",(function(){s||i(t),process.nextTick(dZ,r)})),n&&e.terminate()},r._final=function(t){e.readyState!==e.CONNECTING?null!==e._socket&&(e._socket._writableState.finished?(t(),r._readableState.endEmitted&&r.destroy()):(e._socket.once("finish",(function(){t()})),e.close())):e.once("open",(function(){r._final(t)}))},r._read=function(){e.isPaused&&e.resume()},r._write=function(t,n,i){e.readyState!==e.CONNECTING?e.send(t,i):e.once("open",(function(){r._write(t,n,i)}))},r.on("end",fZ),r.on("error",mZ),r};const{tokenChars:yZ}=TK;var vZ={parse:function(e){const t=new Set;let n=-1,r=-1,i=0;for(;i<e.length;i++){const s=e.charCodeAt(i);if(-1===r&&1===yZ[s])-1===n&&(n=i);else if(0===i||32!==s&&9!==s){if(44!==s)throw new SyntaxError(`Unexpected character at index ${i}`);{if(-1===n)throw new SyntaxError(`Unexpected character at index ${i}`);-1===r&&(r=i);const s=e.slice(n,r);if(t.has(s))throw new SyntaxError(`The "${s}" subprotocol is duplicated`);t.add(s),n=r=-1}}else-1===r&&-1!==n&&(r=i)}if(-1===n||-1!==r)throw new SyntaxError("Unexpected end of input");const s=e.slice(n,i);if(t.has(s))throw new SyntaxError(`The "${s}" subprotocol is duplicated`);return t.add(s),t}};const bZ=p,_Z=x,{createHash:wZ}=w,xZ=gY,EZ=fK,SZ=vZ,TZ=GY,{GUID:DZ,kWebSocket:kZ}=WV,AZ=/^[+/0-9A-Za-z]{22}==$/;var CZ=class extends bZ{constructor(e,t){if(super(),null==(e={allowSynchronousEvents:!0,autoPong:!0,maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:TZ,...e}).port&&!e.server&&!e.noServer||null!=e.port&&(e.server||e.noServer)||e.server&&e.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(null!=e.port?(this._server=_Z.createServer(((e,t)=>{const n=_Z.STATUS_CODES[426];t.writeHead(426,{"Content-Length":n.length,"Content-Type":"text/plain"}),t.end(n)})),this._server.listen(e.port,e.host,e.backlog,t)):e.server&&(this._server=e.server),this._server){const e=this.emit.bind(this,"connection");this._removeListeners=function(e,t){for(const n of Object.keys(t))e.on(n,t[n]);return function(){for(const n of Object.keys(t))e.removeListener(n,t[n])}}(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(t,n,r)=>{this.handleUpgrade(t,n,r,e)}})}!0===e.perMessageDeflate&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=0}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(2===this._state)return e&&this.once("close",(()=>{e(new Error("The server is not running"))})),void process.nextTick(RZ,this);if(e&&this.once("close",e),1!==this._state)if(this._state=1,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients&&this.clients.size?this._shouldEmitClose=!0:process.nextTick(RZ,this);else{const e=this._server;this._removeListeners(),this._removeListeners=this._server=null,e.close((()=>{RZ(this)}))}}shouldHandle(e){if(this.options.path){const t=e.url.indexOf("?");if((-1!==t?e.url.slice(0,t):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,t,n,r){t.on("error",OZ);const i=e.headers["sec-websocket-key"],s=e.headers.upgrade,o=+e.headers["sec-websocket-version"];if("GET"!==e.method){return void IZ(this,e,t,405,"Invalid HTTP method")}if(void 0===s||"websocket"!==s.toLowerCase()){return void IZ(this,e,t,400,"Invalid Upgrade header")}if(void 0===i||!AZ.test(i)){return void IZ(this,e,t,400,"Missing or invalid Sec-WebSocket-Key header")}if(8!==o&&13!==o){return void IZ(this,e,t,400,"Missing or invalid Sec-WebSocket-Version header")}if(!this.shouldHandle(e))return void LZ(t,400);const a=e.headers["sec-websocket-protocol"];let c=new Set;if(void 0!==a)try{c=SZ.parse(a)}catch(n){return void IZ(this,e,t,400,"Invalid Sec-WebSocket-Protocol header")}const l=e.headers["sec-websocket-extensions"],u={};if(this.options.perMessageDeflate&&void 0!==l){const n=new EZ(this.options.perMessageDeflate,!0,this.options.maxPayload);try{const e=xZ.parse(l);e[EZ.extensionName]&&(n.accept(e[EZ.extensionName]),u[EZ.extensionName]=n)}catch(n){return void IZ(this,e,t,400,"Invalid or unacceptable Sec-WebSocket-Extensions header")}}if(this.options.verifyClient){const s={origin:e.headers[""+(8===o?"sec-websocket-origin":"origin")],secure:!(!e.socket.authorized&&!e.socket.encrypted),req:e};if(2===this.options.verifyClient.length)return void this.options.verifyClient(s,((s,o,a,l)=>{if(!s)return LZ(t,o||401,a,l);this.completeUpgrade(u,i,c,e,t,n,r)}));if(!this.options.verifyClient(s))return LZ(t,401)}this.completeUpgrade(u,i,c,e,t,n,r)}completeUpgrade(e,t,n,r,i,s,o){if(!i.readable||!i.writable)return i.destroy();if(i[kZ])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>0)return LZ(i,503);const a=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${wZ("sha1").update(t+DZ).digest("base64")}`],c=new this.options.WebSocket(null,void 0,this.options);if(n.size){const e=this.options.handleProtocols?this.options.handleProtocols(n,r):n.values().next().value;e&&(a.push(`Sec-WebSocket-Protocol: ${e}`),c._protocol=e)}if(e[EZ.extensionName]){const t=e[EZ.extensionName].params,n=xZ.format({[EZ.extensionName]:[t]});a.push(`Sec-WebSocket-Extensions: ${n}`),c._extensions=e}this.emit("headers",a,r),i.write(a.concat("\r\n").join("\r\n")),i.removeListener("error",OZ),c.setSocket(i,s,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(c),c.on("close",(()=>{this.clients.delete(c),this._shouldEmitClose&&!this.clients.size&&process.nextTick(RZ,this)}))),o(c,r)}};function RZ(e){e._state=2,e.emit("close")}function OZ(){this.destroy()}function LZ(e,t,n,r){n=n||_Z.STATUS_CODES[t],r={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(n),...r},e.once("finish",e.destroy),e.end(`HTTP/1.1 ${t} ${_Z.STATUS_CODES[t]}\r\n`+Object.keys(r).map((e=>`${e}: ${r[e]}`)).join("\r\n")+"\r\n\r\n"+n)}function IZ(e,t,n,r,i){if(e.listenerCount("wsClientError")){const r=new Error(i);Error.captureStackTrace(r,IZ),e.emit("wsClientError",r,n,t)}else LZ(n,r,i)}const PZ=GY;PZ.createWebSocketStream=gZ,PZ.Server=CZ,PZ.Receiver=BK,PZ.Sender=ZK,PZ.WebSocket=PZ,PZ.WebSocketServer=PZ.Server;var NZ=PZ,jZ={exports:{}},FZ=Object.getOwnPropertySymbols,BZ=Object.prototype.hasOwnProperty,MZ=Object.prototype.propertyIsEnumerable;var UZ=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,r,i=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;s<arguments.length;s++){for(var o in n=Object(arguments[s]))BZ.call(n,o)&&(i[o]=n[o]);if(FZ){r=FZ(n);for(var a=0;a<r.length;a++)MZ.call(n,r[a])&&(i[r[a]]=n[r[a]])}}return i};!function(){var e=UZ,t=TU,n={origin:"*",methods:"GET,HEAD,PUT,PATCH,POST,DELETE",preflightContinue:!1,optionsSuccessStatus:204};function r(e){return"string"==typeof e||e instanceof String}function i(e,t){if(Array.isArray(t)){for(var n=0;n<t.length;++n)if(i(e,t[n]))return!0;return!1}return r(t)?e===t:t instanceof RegExp?t.test(e):!!t}function s(e,t){var n,s=t.headers.origin,o=[];return e.origin&&"*"!==e.origin?r(e.origin)?(o.push([{key:"Access-Control-Allow-Origin",value:e.origin}]),o.push([{key:"Vary",value:"Origin"}])):(n=i(s,e.origin),o.push([{key:"Access-Control-Allow-Origin",value:!!n&&s}]),o.push([{key:"Vary",value:"Origin"}])):o.push([{key:"Access-Control-Allow-Origin",value:"*"}]),o}function o(e){return!0===e.credentials?{key:"Access-Control-Allow-Credentials",value:"true"}:null}function a(e){var t=e.exposedHeaders;return t?(t.join&&(t=t.join(",")),t&&t.length?{key:"Access-Control-Expose-Headers",value:t}:null):null}function c(e,n){for(var r=0,i=e.length;r<i;r++){var s=e[r];s&&(Array.isArray(s)?c(s,n):"Vary"===s.key&&s.value?t(n,s.value):s.value&&n.setHeader(s.key,s.value))}}jZ.exports=function(t){var r=null;return r="function"==typeof t?t:function(e,n){n(null,t)},function(t,i,l){r(t,(function(r,u){if(r)l(r);else{var p=e({},n,u),h=null;p.origin&&"function"==typeof p.origin?h=p.origin:p.origin&&(h=function(e,t){t(null,p.origin)}),h?h(t.headers.origin,(function(e,n){e||!n?l(e):(p.origin=n,function(e,t,n,r){var i=[];"OPTIONS"===(t.method&&t.method.toUpperCase&&t.method.toUpperCase())?(i.push(s(e,t)),i.push(o(e)),i.push(function(e){var t=e.methods;return t.join&&(t=e.methods.join(",")),{key:"Access-Control-Allow-Methods",value:t}}(e)),i.push(function(e,t){var n=e.allowedHeaders||e.headers,r=[];return n?n.join&&(n=n.join(",")):(n=t.headers["access-control-request-headers"],r.push([{key:"Vary",value:"Access-Control-Request-Headers"}])),n&&n.length&&r.push([{key:"Access-Control-Allow-Headers",value:n}]),r}(e,t)),i.push(function(e){var t=("number"==typeof e.maxAge||e.maxAge)&&e.maxAge.toString();return t&&t.length?{key:"Access-Control-Max-Age",value:t}:null}(e)),i.push(a(e)),c(i,n),e.preflightContinue?r():(n.statusCode=e.optionsSuccessStatus,n.setHeader("Content-Length","0"),n.end())):(i.push(s(e,t)),i.push(o(e)),i.push(a(e)),c(i,n),r())}(p,t,i,l))})):l()}}))}}}();var qZ=jZ.exports;Object.defineProperty(EG,"__esModule",{value:!0}),EG.Server=EG.BaseServer=void 0;const HZ=L,$Z=S,zZ=TG,WZ=DG,GZ=p,VZ=kV,KZ=LV,YZ=NZ,ZZ=yV,QZ=CG,JZ=(0,ah.default)("engine"),XZ=Symbol("responseHeaders");class eQ extends GZ.EventEmitter{constructor(e={}){super(),this.middlewares=[],this.clients={},this.clientsCount=0,this.opts=Object.assign({wsEngine:YZ.Server,pingTimeout:2e4,pingInterval:25e3,upgradeTimeout:1e4,maxHttpBufferSize:1e6,transports:["polling","websocket"],allowUpgrades:!0,httpCompression:{threshold:1024},cors:!1,allowEIO3:!1},e),e.cookie&&(this.opts.cookie=Object.assign({name:"io",path:"/",httpOnly:!1!==e.cookie.path,sameSite:"lax"},e.cookie)),this.opts.cors&&this.use(qZ(this.opts.cors)),e.perMessageDeflate&&(this.opts.perMessageDeflate=Object.assign({threshold:1024},e.perMessageDeflate)),this.init()}_computePath(e){let t=(e.path||"/engine.io").replace(/\/$/,"");return!1!==e.addTrailingSlash&&(t+="/"),t}upgrades(e){return this.opts.allowUpgrades&&WZ.default[e].upgradesTo||[]}verify(e,t,n){const r=e._query.transport;if(!~this.opts.transports.indexOf(r)||"webtransport"===r)return JZ('unknown transport "%s"',r),n(nQ.errors.UNKNOWN_TRANSPORT,{transport:r});const i=function(e){if((e+="").length<1)return!1;if(!sQ[e.charCodeAt(0)])return JZ('invalid header, index 0, char "%s"',e.charCodeAt(0)),!0;if(e.length<2)return!1;if(!sQ[e.charCodeAt(1)])return JZ('invalid header, index 1, char "%s"',e.charCodeAt(1)),!0;if(e.length<3)return!1;if(!sQ[e.charCodeAt(2)])return JZ('invalid header, index 2, char "%s"',e.charCodeAt(2)),!0;if(e.length<4)return!1;if(!sQ[e.charCodeAt(3)])return JZ('invalid header, index 3, char "%s"',e.charCodeAt(3)),!0;for(let t=4;t<e.length;++t)if(!sQ[e.charCodeAt(t)])return JZ('invalid header, index "%i", char "%s"',t,e.charCodeAt(t)),!0;return!1}(e.headers.origin);if(i){const t=e.headers.origin;return e.headers.origin=null,JZ("origin header invalid"),n(nQ.errors.BAD_REQUEST,{name:"INVALID_ORIGIN",origin:t})}const s=e._query.sid;if(!s)return"GET"!==e.method?n(nQ.errors.BAD_HANDSHAKE_METHOD,{method:e.method}):"websocket"!==r||t?this.opts.allowRequest?this.opts.allowRequest(e,((e,t)=>{if(!t)return n(nQ.errors.FORBIDDEN,{message:e});n()})):n():(JZ("invalid transport upgrade"),n(nQ.errors.BAD_REQUEST,{name:"TRANSPORT_HANDSHAKE_ERROR"}));{if(!this.clients.hasOwnProperty(s))return JZ('unknown sid "%s"',s),n(nQ.errors.UNKNOWN_SID,{sid:s});const e=this.clients[s].transport.name;if(!t&&e!==r)return JZ("bad request: unexpected transport without upgrade"),n(nQ.errors.BAD_REQUEST,{name:"TRANSPORT_MISMATCH",transport:r,previousTransport:e})}n()}use(e){this.middlewares.push(e)}_applyMiddlewares(e,t,n){if(0===this.middlewares.length)return JZ("no middleware to apply, skipping"),n();const r=i=>{JZ("applying middleware n°%d",i+1),this.middlewares[i](e,t,(e=>{if(e)return n(e);i+1<this.middlewares.length?r(i+1):n()}))};r(0)}close(){JZ("closing all open clients");for(let e in this.clients)this.clients.hasOwnProperty(e)&&this.clients[e].close(!0);return this.cleanup(),this}generateId(e){return zZ.generateId()}async handshake(e,t,n){const r="4"===t._query.EIO?4:3;if(3===r&&!this.opts.allowEIO3)return JZ("unsupported protocol version"),this.emit("connection_error",{req:t,code:nQ.errors.UNSUPPORTED_PROTOCOL_VERSION,message:nQ.errorMessages[nQ.errors.UNSUPPORTED_PROTOCOL_VERSION],context:{protocol:r}}),void n(nQ.errors.UNSUPPORTED_PROTOCOL_VERSION);let i;try{i=await this.generateId(t)}catch(e){return JZ("error while generating an id"),this.emit("connection_error",{req:t,code:nQ.errors.BAD_REQUEST,message:nQ.errorMessages[nQ.errors.BAD_REQUEST],context:{name:"ID_GENERATION_ERROR",error:e}}),void n(nQ.errors.BAD_REQUEST)}JZ('handshaking client "%s"',i);try{var s=this.createTransport(e,t);"polling"===e?(s.maxHttpBufferSize=this.opts.maxHttpBufferSize,s.httpCompression=this.opts.httpCompression):"websocket"===e&&(s.perMessageDeflate=this.opts.perMessageDeflate)}catch(r){return JZ('error handshaking to transport "%s"',e),this.emit("connection_error",{req:t,code:nQ.errors.BAD_REQUEST,message:nQ.errorMessages[nQ.errors.BAD_REQUEST],context:{name:"TRANSPORT_HANDSHAKE_ERROR",error:r}}),void n(nQ.errors.BAD_REQUEST)}const o=new VZ.Socket(i,this,s,t,r);return s.on("headers",((e,t)=>{!t._query.sid&&(this.opts.cookie&&(e["Set-Cookie"]=[(0,KZ.serialize)(this.opts.cookie.name,i,this.opts.cookie)]),this.emit("initial_headers",e,t)),this.emit("headers",e,t)})),s.onRequest(t),this.clients[i]=o,this.clientsCount++,o.once("close",(()=>{delete this.clients[i],this.clientsCount--})),this.emit("connection",o),s}async onWebTransportSession(e){const t=setTimeout((()=>{JZ("the client failed to establish a bidirectional stream in the given period"),e.close()}),this.opts.upgradeTimeout),n=e.incomingBidirectionalStreams.getReader(),r=await n.read();if(r.done)return void JZ("session is closed");const i=r.value,s=(0,QZ.createPacketDecoderStream)(this.opts.maxHttpBufferSize,"nodebuffer"),o=i.readable.pipeThrough(s).getReader(),{value:a,done:c}=await o.read();if(c)return void JZ("stream is closed");if(clearTimeout(t),"open"!==a.type)return JZ("invalid WebTransport handshake"),e.close();if(void 0===a.data){const t=new ZZ.WebTransport(e,i,o),n=zZ.generateId();JZ('handshaking client "%s" (WebTransport)',n);const r=new VZ.Socket(n,this,t,null,4);return this.clients[n]=r,this.clientsCount++,r.once("close",(()=>{delete this.clients[n],this.clientsCount--})),void this.emit("connection",r)}const l=function(e){try{const t=JSON.parse(e);if("string"==typeof t.sid)return t.sid}catch(e){}}(a.data);if(!l)return JZ("invalid WebTransport handshake"),e.close();const u=this.clients[l];if(u)if(u.upgrading)JZ("transport has already been trying to upgrade"),e.close();else if(u.upgraded)JZ("transport had already been upgraded"),e.close();else{JZ("upgrading existing transport");const t=new ZZ.WebTransport(e,i,o);u.maybeUpgrade(t)}else JZ("upgrade attempt for closed client"),e.close()}}EG.BaseServer=eQ,eQ.errors={UNKNOWN_TRANSPORT:0,UNKNOWN_SID:1,BAD_HANDSHAKE_METHOD:2,BAD_REQUEST:3,FORBIDDEN:4,UNSUPPORTED_PROTOCOL_VERSION:5},eQ.errorMessages={0:"Transport unknown",1:"Session ID unknown",2:"Bad handshake method",3:"Bad request",4:"Forbidden",5:"Unsupported protocol version"};class tQ{constructor(e,t){this.req=e,this.socket=t,e[XZ]={}}setHeader(e,t){this.req[XZ][e]=t}getHeader(e){return this.req[XZ][e]}removeHeader(e){delete this.req[XZ][e]}write(){}writeHead(){}end(){this.socket.destroy()}}let nQ=class e extends eQ{init(){~this.opts.transports.indexOf("websocket")&&(this.ws&&this.ws.close(),this.ws=new this.opts.wsEngine({noServer:!0,clientTracking:!1,perMessageDeflate:this.opts.perMessageDeflate,maxPayload:this.opts.maxHttpBufferSize}),"function"==typeof this.ws.on&&this.ws.on("headers",((e,t)=>{const n=t[XZ]||{};delete t[XZ];!t._query.sid&&this.emit("initial_headers",n,t),this.emit("headers",n,t),JZ("writing headers: %j",n),Object.keys(n).forEach((t=>{e.push(`${t}: ${n[t]}`)}))})))}cleanup(){this.ws&&(JZ("closing webSocketServer"),this.ws.close())}prepare(e){e._query||(e._query=~e.url.indexOf("?")?HZ.parse((0,$Z.parse)(e.url).query):{})}createTransport(e,t){return new WZ.default[e](t)}handleRequest(t,n){JZ('handling "%s" http request "%s"',t.method,t.url),this.prepare(t),t.res=n;const r=(r,i)=>{if(void 0!==r)return this.emit("connection_error",{req:t,code:r,message:e.errorMessages[r],context:i}),void rQ(n,r,i);if(t._query.sid)JZ("setting new request for existing client"),this.clients[t._query.sid].transport.onRequest(t);else{const e=(e,t)=>rQ(n,e,t);this.handshake(t._query.transport,t,e)}};this._applyMiddlewares(t,n,(n=>{n?r(e.errors.BAD_REQUEST,{name:"MIDDLEWARE_FAILURE"}):this.verify(t,!1,r)}))}handleUpgrade(t,n,r){this.prepare(t);const i=new tQ(t,n),s=(s,o)=>{if(void 0!==s)return this.emit("connection_error",{req:t,code:s,message:e.errorMessages[s],context:o}),void iQ(n,s,o);const a=Buffer.from(r);r=null,i.writeHead(),this.ws.handleUpgrade(t,n,a,(e=>{this.onWebSocket(t,n,e)}))};this._applyMiddlewares(t,i,(n=>{n?s(e.errors.BAD_REQUEST,{name:"MIDDLEWARE_FAILURE"}):this.verify(t,!0,s)}))}onWebSocket(e,t,n){if(n.on("error",i),void 0!==WZ.default[e._query.transport]&&!WZ.default[e._query.transport].prototype.handlesUpgrades)return JZ("transport doesnt handle upgraded requests"),void n.close();const r=e._query.sid;if(e.websocket=n,r){const t=this.clients[r];if(t)if(t.upgrading)JZ("transport has already been trying to upgrade"),n.close();else if(t.upgraded)JZ("transport had already been upgraded"),n.close();else{JZ("upgrading existing transport"),n.removeListener("error",i);const r=this.createTransport(e._query.transport,e);r.perMessageDeflate=this.opts.perMessageDeflate,t.maybeUpgrade(r)}else JZ("upgrade attempt for closed client"),n.close()}else{const n=(e,n)=>iQ(t,e,n);this.handshake(e._query.transport,e,n)}function i(){JZ("websocket error before upgrade")}}attach(e,t={}){const n=this._computePath(t),r=t.destroyUpgradeTimeout||1e3;function i(e){return n===e.url.slice(0,n.length)}const s=e.listeners("request").slice(0);e.removeAllListeners("request"),e.on("close",this.close.bind(this)),e.on("listening",this.init.bind(this)),e.on("request",((t,r)=>{if(i(t))JZ('intercepting request for path "%s"',n),this.handleRequest(t,r);else{let n=0;const i=s.length;for(;n<i;n++)s[n].call(e,t,r)}})),~this.opts.transports.indexOf("websocket")&&e.on("upgrade",((e,n,s)=>{i(e)?this.handleUpgrade(e,n,s):!1!==t.destroyUpgrade&&setTimeout((function(){if(n.writable&&n.bytesWritten<=0)return n.on("error",(e=>{JZ("error while destroying upgrade: %s",e.message)})),n.end()}),r)}))}};function rQ(e,t,n){const r=t===nQ.errors.FORBIDDEN?403:400,i=n&&n.message?n.message:nQ.errorMessages[t];e.writeHead(r,{"Content-Type":"application/json"}),e.end(JSON.stringify({code:t,message:i}))}function iQ(e,t,n={}){if(e.on("error",(()=>{JZ("ignoring error from closed connection")})),e.writable){const r=n.message||nQ.errorMessages[t],i=Buffer.byteLength(r);e.write("HTTP/1.1 400 Bad Request\r\nConnection: close\r\nContent-type: text/html\r\nContent-Length: "+i+"\r\n\r\n"+r)}e.destroy()}EG.Server=nQ;const sQ=[0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];var oQ={},aQ={},cQ={};Object.defineProperty(cQ,"__esModule",{value:!0}),cQ.Polling=void 0;const lQ=AG,uQ=T,pQ=KM,hQ=(0,ah.default)("engine:polling"),dQ={gzip:uQ.createGzip,deflate:uQ.createDeflate};let fQ=class extends lQ.Transport{constructor(e){super(e),this.closeTimeout=3e4}get name(){return"polling"}get supportsFraming(){return!1}onRequest(e){const t=e.res;e.res=null,"get"===e.getMethod()?this.onPollRequest(e,t):"post"===e.getMethod()?this.onDataRequest(e,t):(t.writeStatus("500 Internal Server Error"),t.end())}onPollRequest(e,t){if(this.req)return hQ("request overlap"),this.onError("overlap from client"),t.writeStatus("500 Internal Server Error"),void t.end();hQ("setting request"),this.req=e,this.res=t;e.cleanup=()=>{this.req=this.res=null},t.onAborted((()=>{this.writable=!1,this.onError("poll connection closed prematurely")})),this.writable=!0,this.emit("drain"),this.writable&&this.shouldClose&&(hQ("triggering empty send to append close packet"),this.send([{type:"noop"}]))}onDataRequest(e,t){if(this.dataReq)return this.onError("data request overlap from client"),t.writeStatus("500 Internal Server Error"),void t.end();const n=Number(e.headers["content-length"]);if(!n)return this.onError("content-length header required"),void t.writeStatus("411 Length Required").end();if(n>this.maxHttpBufferSize)return this.onError("payload too large"),void t.writeStatus("413 Payload Too Large").end();if("application/octet-stream"===e.headers["content-type"]&&4===this.protocol)return this.onError("invalid content");let r;this.dataReq=e,this.dataRes=t;let i=0;const s={"Content-Type":"text/html"};this.headers(e,s);for(let e in s)t.writeHeader(e,String(s[e]));const o=e=>{this.onData(e.toString()),this.onDataRequestCleanup(),t.cork((()=>{t.end("ok")}))};t.onAborted((()=>{this.onDataRequestCleanup(),this.onError("data request connection closed prematurely")})),t.onData(((e,s)=>{const a=i+e.byteLength;if(a>n)return this.onError("content-length mismatch"),void t.close();if(!r){if(s)return void o(Buffer.from(e));r=Buffer.allocUnsafe(n)}if(Buffer.from(e).copy(r,i),s)return a!=n?(this.onError("content-length mismatch"),t.writeStatus("400 Content-Length Mismatch").end(),void this.onDataRequestCleanup()):void o(r);i=a}))}onDataRequestCleanup(){this.dataReq=this.dataRes=null}onData(e){hQ('received "%s"',e);const t=e=>{if("close"===e.type)return hQ("got xhr close packet"),this.onClose(),!1;this.onPacket(e)};3===this.protocol?this.parser.decodePayload(e,t):this.parser.decodePayload(e).forEach(t)}onClose(){this.writable&&this.send([{type:"noop"}]),super.onClose()}send(e){this.writable=!1,this.shouldClose&&(hQ("appending close packet to payload"),e.push({type:"close"}),this.shouldClose(),this.shouldClose=null);const t=t=>{const n=e.some((e=>e.options&&e.options.compress));this.write(t,{compress:n})};3===this.protocol?this.parser.encodePayload(e,this.supportsBinary,t):this.parser.encodePayload(e,t)}write(e,t){hQ('writing "%s"',e),this.doWrite(e,t,(()=>{this.req.cleanup()}))}doWrite(e,t,n){const r="string"==typeof e,i={"Content-Type":r?"text/plain; charset=UTF-8":"application/octet-stream"},s=e=>{this.headers(this.req,i),this.res.cork((()=>{Object.keys(i).forEach((e=>{this.res.writeHeader(e,String(i[e]))})),this.res.end(e)})),n()};if(!this.httpCompression||!t.compress)return void s(e);if((r?Buffer.byteLength(e):e.length)<this.httpCompression.threshold)return void s(e);const o=pQ(this.req).encodings(["gzip","deflate"]);o?this.compress(e,o,((e,t)=>{if(e)return this.res.writeStatus("500 Internal Server Error"),this.res.end(),void n(e);i["Content-Encoding"]=o,s(t)})):s(e)}compress(e,t,n){hQ("compressing");const r=[];let i=0;dQ[t](this.httpCompression).on("error",n).on("data",(function(e){r.push(e),i+=e.length})).on("end",(function(){n(null,Buffer.concat(r,i))})).end(e)}doClose(e){let t;hQ("closing");const n=()=>{clearTimeout(t),e(),this.onClose()};this.writable?(hQ("transport writable - closing right away"),this.send([{type:"close"}]),n()):this.discarded?(hQ("transport discarded - closing right away"),n()):(hQ("transport not writable - buffering orderly close"),this.shouldClose=n,t=setTimeout(n,this.closeTimeout))}headers(e,t){t=t||{};const n=e.headers["user-agent"];return n&&(~n.indexOf(";MSIE")||~n.indexOf("Trident/"))&&(t["X-XSS-Protection"]="0"),t["cache-control"]="no-store",this.emit("headers",t,e),t}};cQ.Polling=fQ;var mQ={};Object.defineProperty(mQ,"__esModule",{value:!0}),mQ.WebSocket=void 0;const gQ=AG,yQ=(0,ah.default)("engine:ws");let vQ=class extends gQ.Transport{constructor(e){super(e),this.writable=!1,this.perMessageDeflate=null}get name(){return"websocket"}get handlesUpgrades(){return!0}get supportsFraming(){return!0}send(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],r=t+1===e.length,i=e=>{const t="string"!=typeof e,n=this.perMessageDeflate&&Buffer.byteLength(e)>this.perMessageDeflate.threshold;yQ('writing "%s"',e),this.socket.send(e,t,n),r&&(this.writable=!0,this.emit("drain"))};n.options&&"string"==typeof n.options.wsPreEncoded?i(n.options.wsPreEncoded):this.parser.encodePacket(n,this.supportsBinary,i)}}doClose(e){yQ("closing"),e&&e(),this.socket.end()}};mQ.WebSocket=vQ,Object.defineProperty(aQ,"__esModule",{value:!0});const bQ=cQ,_Q=mQ;aQ.default={polling:bQ.Polling,websocket:_Q.WebSocket},Object.defineProperty(oQ,"__esModule",{value:!0}),oQ.uServer=void 0;const wQ=EG,xQ=aQ,EQ=(0,ah.default)("engine:uws");class SQ extends wQ.BaseServer{init(){}cleanup(){}prepare(e,t){e.method=e.getMethod().toUpperCase(),e.url=e.getUrl();const n=new URLSearchParams(e.getQuery());e._query=Object.fromEntries(n.entries()),e.headers={},e.forEach(((t,n)=>{e.headers[t]=n})),e.connection={remoteAddress:Buffer.from(t.getRemoteAddressAsText()).toString()},t.onAborted((()=>{EQ("response has been aborted")}))}createTransport(e,t){return new xQ.default[e](t)}attach(e,t={}){const n=this._computePath(t);e.any(n,this.handleRequest.bind(this)).ws(n,{compression:t.compression,idleTimeout:t.idleTimeout,maxBackpressure:t.maxBackpressure,maxPayloadLength:this.opts.maxHttpBufferSize,upgrade:this.handleUpgrade.bind(this),open:e=>{const t=e.getUserData().transport;t.socket=e,t.writable=!0,t.emit("drain")},message:(e,t,n)=>{e.getUserData().transport.onData(n?t:Buffer.from(t).toString())},close:(e,t,n)=>{e.getUserData().transport.onClose(t,n)}})}_applyMiddlewares(e,t,n){if(0===this.middlewares.length)return n();e.res=new TQ(t),super._applyMiddlewares(e,e.res,(t=>{e.res.writeHead(),n(t)}))}handleRequest(e,t){EQ('handling "%s" http request "%s"',t.getMethod(),t.getUrl()),this.prepare(t,e),t.res=e;const n=(n,r)=>{if(void 0!==n)return this.emit("connection_error",{req:t,code:n,message:wQ.Server.errorMessages[n],context:r}),void this.abortRequest(t.res,n,r);if(t._query.sid)EQ("setting new request for existing client"),this.clients[t._query.sid].transport.onRequest(t);else{const n=(t,n)=>this.abortRequest(e,t,n);this.handshake(t._query.transport,t,n)}};this._applyMiddlewares(t,e,(e=>{e?n(wQ.Server.errors.BAD_REQUEST,{name:"MIDDLEWARE_FAILURE"}):this.verify(t,!1,n)}))}handleUpgrade(e,t,n){EQ("on upgrade"),this.prepare(t,e),t.res=e;const r=async(r,i)=>{if(void 0!==r)return this.emit("connection_error",{req:t,code:r,message:wQ.Server.errorMessages[r],context:i}),void this.abortRequest(e,r,i);const s=t._query.sid;let o;if(s){const n=this.clients[s];n?n.upgrading?(EQ("transport has already been trying to upgrade"),e.close()):n.upgraded?(EQ("transport had already been upgraded"),e.close()):(EQ("upgrading existing transport"),o=this.createTransport(t._query.transport,t),n.maybeUpgrade(o)):(EQ("upgrade attempt for closed client"),e.close())}else if(o=await this.handshake(t._query.transport,t,((t,n)=>this.abortRequest(e,t,n))),!o)return;t.res.writeStatus("101 Switching Protocols"),e.upgrade({transport:o},t.getHeader("sec-websocket-key"),t.getHeader("sec-websocket-protocol"),t.getHeader("sec-websocket-extensions"),n)};this._applyMiddlewares(t,e,(e=>{e?r(wQ.Server.errors.BAD_REQUEST,{name:"MIDDLEWARE_FAILURE"}):this.verify(t,!0,r)}))}abortRequest(e,t,n){const r=t===wQ.Server.errors.FORBIDDEN?"403 Forbidden":"400 Bad Request",i=n&&n.message?n.message:wQ.Server.errorMessages[t];e.writeStatus(r),e.writeHeader("Content-Type","application/json"),e.end(JSON.stringify({code:t,message:i}))}}oQ.uServer=SQ;class TQ{constructor(e){this.res=e,this.statusWritten=!1,this.headers=[],this.isAborted=!1}set statusCode(e){e&&this.writeStatus(200===e?"200 OK":"204 No Content")}writeHead(e){this.statusCode=e}setHeader(e,t){Array.isArray(t)?t.forEach((t=>{this.writeHeader(e,t)})):this.writeHeader(e,t)}removeHeader(){}getHeader(){}writeStatus(e){if(!this.isAborted)return this.res.writeStatus(e),this.statusWritten=!0,this.writeBufferedHeaders(),this}writeHeader(e,t){this.isAborted||"Content-Length"!==e&&(this.statusWritten?this.res.writeHeader(e,t):this.headers.push([e,t]))}writeBufferedHeaders(){this.headers.forEach((([e,t])=>{this.res.writeHeader(e,t)}))}end(e){this.isAborted||this.res.cork((()=>{this.statusWritten||this.writeBufferedHeaders(),this.res.end(e)}))}onData(e){this.isAborted||this.res.onData(e)}onAborted(e){this.isAborted||this.res.onAborted((()=>{this.isAborted=!0,e()}))}cork(e){this.isAborted||this.res.cork(e)}}!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.protocol=e.Transport=e.Socket=e.uServer=e.parser=e.attach=e.listen=e.transports=e.Server=void 0;const t=x,n=EG;Object.defineProperty(e,"Server",{enumerable:!0,get:function(){return n.Server}});const r=DG;e.transports=r.default;const i=CG;e.parser=i;var s=oQ;Object.defineProperty(e,"uServer",{enumerable:!0,get:function(){return s.uServer}});var o=kV;Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return o.Socket}});var a=AG;function c(e,t){const r=new n.Server(t);return r.attach(e,t),r}Object.defineProperty(e,"Transport",{enumerable:!0,get:function(){return a.Transport}}),e.protocol=i.protocol,e.listen=function(e,n,r){"function"==typeof n&&(r=n,n={});const i=(0,t.createServer)((function(e,t){t.writeHead(501),t.end("Not Implemented")})),s=c(i,n);return s.httpServer=i,i.listen(e,r),s},e.attach=c}(xG);var DQ={},kQ={};function AQ(e){if(e)return function(e){for(var t in AQ.prototype)e[t]=AQ.prototype[t];return e}(e)}AQ.prototype.on=AQ.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},AQ.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},AQ.prototype.off=AQ.prototype.removeListener=AQ.prototype.removeAllListeners=AQ.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var i=0;i<r.length;i++)if((n=r[i])===t||n.fn===t){r.splice(i,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},AQ.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,t)}return this},AQ.prototype.emitReserved=AQ.prototype.emit,AQ.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},AQ.prototype.hasListeners=function(e){return!!this.listeners(e).length};var CQ=H(Object.freeze({__proto__:null,Emitter:AQ})),RQ={},OQ={};Object.defineProperty(OQ,"__esModule",{value:!0}),OQ.hasBinary=OQ.isBinary=void 0;const LQ="function"==typeof ArrayBuffer,IQ=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,PQ=Object.prototype.toString,NQ="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===PQ.call(Blob),jQ="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===PQ.call(File);function FQ(e){return LQ&&(e instanceof ArrayBuffer||IQ(e))||NQ&&e instanceof Blob||jQ&&e instanceof File}OQ.isBinary=FQ,OQ.hasBinary=function e(t,n){if(!t||"object"!=typeof t)return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n<r;n++)if(e(t[n]))return!0;return!1}if(FQ(t))return!0;if(t.toJSON&&"function"==typeof t.toJSON&&1===arguments.length)return e(t.toJSON(),!0);for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return!0;return!1},Object.defineProperty(RQ,"__esModule",{value:!0}),RQ.reconstructPacket=RQ.deconstructPacket=void 0;const BQ=OQ;function MQ(e,t){if(!e)return e;if((0,BQ.isBinary)(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=MQ(e[r],t);return n}if("object"==typeof e&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=MQ(e[r],t));return n}return e}function UQ(e,t){if(!e)return e;if(e&&!0===e._placeholder){if("number"==typeof e.num&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=UQ(e[n],t);else if("object"==typeof e)for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=UQ(e[n],t));return e}RQ.deconstructPacket=function(e){const t=[],n=e.data,r=e;return r.data=MQ(n,t),r.attachments=t.length,{packet:r,buffers:t}},RQ.reconstructPacket=function(e,t){return e.data=UQ(e.data,t),delete e.attachments,e},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Decoder=e.Encoder=e.PacketType=e.protocol=void 0;const t=CQ,n=RQ,r=OQ,i=(0,ah.default)("socket.io-parser"),s=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var o;e.protocol=5,function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"}(o=e.PacketType||(e.PacketType={}));function a(e){return"[object Object]"===Object.prototype.toString.call(e)}e.Encoder=class{constructor(e){this.replacer=e}encode(e){return i("encoding packet %j",e),e.type!==o.EVENT&&e.type!==o.ACK||!(0,r.hasBinary)(e)?[this.encodeAsString(e)]:this.encodeAsBinary({type:e.type===o.EVENT?o.BINARY_EVENT:o.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id})}encodeAsString(e){let t=""+e.type;return e.type!==o.BINARY_EVENT&&e.type!==o.BINARY_ACK||(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),null!=e.id&&(t+=e.id),null!=e.data&&(t+=JSON.stringify(e.data,this.replacer)),i("encoded %j as %s",e,t),t}encodeAsBinary(e){const t=(0,n.deconstructPacket)(e),r=this.encodeAsString(t.packet),i=t.buffers;return i.unshift(r),i}};class c extends t.Emitter{constructor(e){super(),this.reviver=e}add(e){let t;if("string"==typeof e){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const n=t.type===o.BINARY_EVENT;n||t.type===o.BINARY_ACK?(t.type=n?o.EVENT:o.ACK,this.reconstructor=new l(t),0===t.attachments&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else{if(!(0,r.isBinary)(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t))}}decodeString(e){let t=0;const n={type:Number(e.charAt(0))};if(void 0===o[n.type])throw new Error("unknown packet type "+n.type);if(n.type===o.BINARY_EVENT||n.type===o.BINARY_ACK){const r=t+1;for(;"-"!==e.charAt(++t)&&t!=e.length;);const i=e.substring(r,t);if(i!=Number(i)||"-"!==e.charAt(t))throw new Error("Illegal attachments");n.attachments=Number(i)}if("/"===e.charAt(t+1)){const r=t+1;for(;++t;){if(","===e.charAt(t))break;if(t===e.length)break}n.nsp=e.substring(r,t)}else n.nsp="/";const r=e.charAt(t+1);if(""!==r&&Number(r)==r){const r=t+1;for(;++t;){const n=e.charAt(t);if(null==n||Number(n)!=n){--t;break}if(t===e.length)break}n.id=Number(e.substring(r,t+1))}if(e.charAt(++t)){const r=this.tryParse(e.substr(t));if(!c.isPayloadValid(n.type,r))throw new Error("invalid payload");n.data=r}return i("decoded %s as %j",e,n),n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch(e){return!1}}static isPayloadValid(e,t){switch(e){case o.CONNECT:return a(t);case o.DISCONNECT:return void 0===t;case o.CONNECT_ERROR:return"string"==typeof t||a(t);case o.EVENT:case o.BINARY_EVENT:return Array.isArray(t)&&("number"==typeof t[0]||"string"==typeof t[0]&&-1===s.indexOf(t[0]));case o.ACK:case o.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}e.Decoder=c;class l{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const e=(0,n.reconstructPacket)(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}}(kQ),Object.defineProperty(DQ,"__esModule",{value:!0}),DQ.Client=void 0;const qQ=kQ,HQ=S,$Q=ah("socket.io:client");DQ.Client=class{constructor(e,t){this.sockets=new Map,this.nsps=new Map,this.server=e,this.conn=t,this.encoder=e.encoder,this.decoder=new e._parser.Decoder,this.id=t.id,this.setup()}get request(){return this.conn.request}setup(){this.onclose=this.onclose.bind(this),this.ondata=this.ondata.bind(this),this.onerror=this.onerror.bind(this),this.ondecoded=this.ondecoded.bind(this),this.decoder.on("decoded",this.ondecoded),this.conn.on("data",this.ondata),this.conn.on("error",this.onerror),this.conn.on("close",this.onclose),this.connectTimeout=setTimeout((()=>{0===this.nsps.size?($Q("no namespace joined yet, close the client"),this.close()):$Q("the client has already joined a namespace, nothing to do")}),this.server._connectTimeout)}connect(e,t={}){if(this.server._nsps.has(e))return $Q("connecting to namespace %s",e),this.doConnect(e,t);this.server._checkNamespace(e,t,(n=>{n?this.doConnect(e,t):($Q("creation of namespace %s was denied",e),this._packet({type:qQ.PacketType.CONNECT_ERROR,nsp:e,data:{message:"Invalid namespace"}}))}))}doConnect(e,t){const n=this.server.of(e);n._add(this,t,(e=>{this.sockets.set(e.id,e),this.nsps.set(n.name,e),this.connectTimeout&&(clearTimeout(this.connectTimeout),this.connectTimeout=void 0)}))}_disconnect(){for(const e of this.sockets.values())e.disconnect();this.sockets.clear(),this.close()}_remove(e){if(this.sockets.has(e.id)){const t=this.sockets.get(e.id).nsp.name;this.sockets.delete(e.id),this.nsps.delete(t)}else $Q("ignoring remove for %s",e.id)}close(){"open"===this.conn.readyState&&($Q("forcing transport close"),this.conn.close(),this.onclose("forced server close"))}_packet(e,t={}){if("open"!==this.conn.readyState)return void $Q("ignoring packet write %j",e);const n=t.preEncoded?e:this.encoder.encode(e);this.writeToEngine(n,t)}writeToEngine(e,t){if(t.volatile&&!this.conn.transport.writable)return void $Q("volatile packet is discarded since the transport is not currently writable");const n=Array.isArray(e)?e:[e];for(const e of n)this.conn.write(e,t)}ondata(e){try{this.decoder.add(e)}catch(e){$Q("invalid packet format"),this.onerror(e)}}ondecoded(e){let t,n;if(3===this.conn.protocol){const r=HQ.parse(e.nsp,!0);t=r.pathname,n=r.query}else t=e.nsp,n=e.data;const r=this.nsps.get(t);r||e.type!==qQ.PacketType.CONNECT?r&&e.type!==qQ.PacketType.CONNECT&&e.type!==qQ.PacketType.CONNECT_ERROR?process.nextTick((function(){r._onpacket(e)})):($Q("invalid state (packet type: %s)",e.type),this.close()):this.connect(t,n)}onerror(e){for(const t of this.sockets.values())t._onerror(e);this.conn.close()}onclose(e,t){$Q("client close with reason %s",e),this.destroy();for(const n of this.sockets.values())n._onclose(e,t);this.sockets.clear(),this.decoder.destroy()}destroy(){this.conn.removeListener("data",this.ondata),this.conn.removeListener("error",this.onerror),this.conn.removeListener("close",this.onclose),this.decoder.removeListener("decoded",this.ondecoded),this.connectTimeout&&(clearTimeout(this.connectTimeout),this.connectTimeout=void 0)}};var zQ={},WQ={},GQ={};Object.defineProperty(GQ,"__esModule",{value:!0}),GQ.StrictEventEmitter=void 0;const VQ=p;class KQ extends VQ.EventEmitter{on(e,t){return super.on(e,t)}once(e,t){return super.once(e,t)}emit(e,...t){return super.emit(e,...t)}emitReserved(e,...t){return super.emit(e,...t)}emitUntyped(e,...t){return super.emit(e,...t)}listeners(e){return super.listeners(e)}}GQ.StrictEventEmitter=KQ;var YQ,ZQ,QQ={};function JQ(){if(YQ)return QQ;YQ=1,Object.defineProperty(QQ,"__esModule",{value:!0}),QQ.RemoteSocket=QQ.BroadcastOperator=void 0;const e=XQ(),t=kQ;class n{constructor(e,t=new Set,n=new Set,r={}){this.adapter=e,this.rooms=t,this.exceptRooms=n,this.flags=r}to(e){const t=new Set(this.rooms);return Array.isArray(e)?e.forEach((e=>t.add(e))):t.add(e),new n(this.adapter,t,this.exceptRooms,this.flags)}in(e){return this.to(e)}except(e){const t=new Set(this.exceptRooms);return Array.isArray(e)?e.forEach((e=>t.add(e))):t.add(e),new n(this.adapter,this.rooms,t,this.flags)}compress(e){const t=Object.assign({},this.flags,{compress:e});return new n(this.adapter,this.rooms,this.exceptRooms,t)}get volatile(){const e=Object.assign({},this.flags,{volatile:!0});return new n(this.adapter,this.rooms,this.exceptRooms,e)}get local(){const e=Object.assign({},this.flags,{local:!0});return new n(this.adapter,this.rooms,this.exceptRooms,e)}timeout(e){const t=Object.assign({},this.flags,{timeout:e});return new n(this.adapter,this.rooms,this.exceptRooms,t)}emit(n,...r){if(e.RESERVED_EVENTS.has(n))throw new Error(`"${String(n)}" is a reserved event name`);const i=[n,...r],s={type:t.PacketType.EVENT,data:i};if(!("function"==typeof i[i.length-1]))return this.adapter.broadcast(s,{rooms:this.rooms,except:this.exceptRooms,flags:this.flags}),!0;const o=i.pop();let a=!1,c=[];const l=setTimeout((()=>{a=!0,o.apply(this,[new Error("operation has timed out"),this.flags.expectSingleResponse?null:c])}),this.flags.timeout);let u=-1,p=0,h=0;const d=()=>{a||u!==p||c.length!==h||(clearTimeout(l),o.apply(this,[null,this.flags.expectSingleResponse?c[0]:c]))};return this.adapter.broadcastWithAck(s,{rooms:this.rooms,except:this.exceptRooms,flags:this.flags},(e=>{h+=e,p++,d()}),(e=>{c.push(e),d()})),this.adapter.serverCount().then((e=>{u=e,d()})),!0}emitWithAck(e,...t){return new Promise(((n,r)=>{t.push(((e,t)=>e?(e.responses=t,r(e)):n(t))),this.emit(e,...t)}))}allSockets(){if(!this.adapter)throw new Error("No adapter for this namespace, are you trying to get the list of clients of a dynamic namespace?");return this.adapter.sockets(this.rooms)}fetchSockets(){return this.adapter.fetchSockets({rooms:this.rooms,except:this.exceptRooms,flags:this.flags}).then((t=>t.map((t=>t instanceof e.Socket?t:new r(this.adapter,t)))))}socketsJoin(e){this.adapter.addSockets({rooms:this.rooms,except:this.exceptRooms,flags:this.flags},Array.isArray(e)?e:[e])}socketsLeave(e){this.adapter.delSockets({rooms:this.rooms,except:this.exceptRooms,flags:this.flags},Array.isArray(e)?e:[e])}disconnectSockets(e=!1){this.adapter.disconnectSockets({rooms:this.rooms,except:this.exceptRooms,flags:this.flags},e)}}QQ.BroadcastOperator=n;class r{constructor(e,t){this.id=t.id,this.handshake=t.handshake,this.rooms=new Set(t.rooms),this.data=t.data,this.operator=new n(e,new Set([this.id]),new Set,{expectSingleResponse:!0})}timeout(e){return this.operator.timeout(e)}emit(e,...t){return this.operator.emit(e,...t)}join(e){return this.operator.socketsJoin(e)}leave(e){return this.operator.socketsLeave(e)}disconnect(e=!1){return this.operator.disconnectSockets(e),this}}return QQ.RemoteSocket=r,QQ}function XQ(){return ZQ||(ZQ=1,function(e){var t=U&&U.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.Socket=e.RESERVED_EVENTS=void 0;const n=kQ,r=t(ah),i=GQ,s=t(TG),o=JQ(),a=(0,r.default)("socket.io:socket"),c=new Set(["transport error","transport close","forced close","ping timeout","server shutting down","forced server close"]);function l(){}e.RESERVED_EVENTS=new Set(["connect","connect_error","disconnect","disconnecting","newListener","removeListener"]);class u extends i.StrictEventEmitter{constructor(e,t,r,i){super(),this.nsp=e,this.client=t,this.recovered=!1,this.data={},this.connected=!1,this.acks=new Map,this.fns=[],this.flags={},this.server=e.server,this.adapter=this.nsp.adapter,i?(this.id=i.sid,this.pid=i.pid,i.rooms.forEach((e=>this.join(e))),this.data=i.data,i.missedPackets.forEach((e=>{this.packet({type:n.PacketType.EVENT,data:e})})),this.recovered=!0):(3===t.conn.protocol?this.id="/"!==e.name?e.name+"#"+t.id:t.id:this.id=s.default.generateId(),this.server._opts.connectionStateRecovery&&(this.pid=s.default.generateId())),this.handshake=this.buildHandshake(r),this.on("error",l)}buildHandshake(e){var t,n,r,i;return{headers:(null===(t=this.request)||void 0===t?void 0:t.headers)||{},time:new Date+"",address:this.conn.remoteAddress,xdomain:!!(null===(n=this.request)||void 0===n?void 0:n.headers.origin),secure:!this.request||!!this.request.connection.encrypted,issued:+new Date,url:null===(r=this.request)||void 0===r?void 0:r.url,query:(null===(i=this.request)||void 0===i?void 0:i._query)||{},auth:e}}emit(t,...r){if(e.RESERVED_EVENTS.has(t))throw new Error(`"${String(t)}" is a reserved event name`);const i=[t,...r],s={type:n.PacketType.EVENT,data:i};if("function"==typeof i[i.length-1]){const e=this.nsp._ids++;a("emitting packet with ack id %d",e),this.registerAckCallback(e,i.pop()),s.id=e}const o=Object.assign({},this.flags);return this.flags={},this.nsp.server.opts.connectionStateRecovery?this.adapter.broadcast(s,{rooms:new Set([this.id]),except:new Set,flags:o}):(this.notifyOutgoingListeners(s),this.packet(s,o)),!0}emitWithAck(e,...t){const n=void 0!==this.flags.timeout;return new Promise(((r,i)=>{t.push(((e,t)=>n?e?i(e):r(t):r(e))),this.emit(e,...t)}))}registerAckCallback(e,t){const n=this.flags.timeout;if(void 0===n)return void this.acks.set(e,t);const r=setTimeout((()=>{a("event with ack id %d has timed out after %d ms",e,n),this.acks.delete(e),t.call(this,new Error("operation has timed out"))}),n);this.acks.set(e,((...e)=>{clearTimeout(r),t.apply(this,[null,...e])}))}to(e){return this.newBroadcastOperator().to(e)}in(e){return this.newBroadcastOperator().in(e)}except(e){return this.newBroadcastOperator().except(e)}send(...e){return this.emit("message",...e),this}write(...e){return this.emit("message",...e),this}packet(e,t={}){e.nsp=this.nsp.name,t.compress=!1!==t.compress,this.client._packet(e,t)}join(e){return a("join room %s",e),this.adapter.addAll(this.id,new Set(Array.isArray(e)?e:[e]))}leave(e){return a("leave room %s",e),this.adapter.del(this.id,e)}leaveAll(){this.adapter.delAll(this.id)}_onconnect(){a("socket connected - writing packet"),this.connected=!0,this.join(this.id),3===this.conn.protocol?this.packet({type:n.PacketType.CONNECT}):this.packet({type:n.PacketType.CONNECT,data:{sid:this.id,pid:this.pid}})}_onpacket(e){switch(a("got packet %j",e),e.type){case n.PacketType.EVENT:case n.PacketType.BINARY_EVENT:this.onevent(e);break;case n.PacketType.ACK:case n.PacketType.BINARY_ACK:this.onack(e);break;case n.PacketType.DISCONNECT:this.ondisconnect()}}onevent(e){const t=e.data||[];if(a("emitting event %j",t),null!=e.id&&(a("attaching ack callback to event"),t.push(this.ack(e.id))),this._anyListeners&&this._anyListeners.length){const e=this._anyListeners.slice();for(const n of e)n.apply(this,t)}this.dispatch(t)}ack(e){const t=this;let r=!1;return function(){if(r)return;const i=Array.prototype.slice.call(arguments);a("sending ack %j",i),t.packet({id:e,type:n.PacketType.ACK,data:i}),r=!0}}onack(e){const t=this.acks.get(e.id);"function"==typeof t?(a("calling ack %s with %j",e.id,e.data),t.apply(this,e.data),this.acks.delete(e.id)):a("bad ack %s",e.id)}ondisconnect(){a("got disconnect packet"),this._onclose("client namespace disconnect")}_onerror(e){this.emitReserved("error",e)}_onclose(e,t){if(!this.connected)return this;a("closing socket - reason %s",e),this.emitReserved("disconnecting",e,t),this.server._opts.connectionStateRecovery&&c.has(e)&&(a("connection state recovery is enabled for sid %s",this.id),this.adapter.persistSession({sid:this.id,pid:this.pid,rooms:[...this.rooms],data:this.data})),this._cleanup(),this.client._remove(this),this.connected=!1,this.emitReserved("disconnect",e,t)}_cleanup(){this.leaveAll(),this.nsp._remove(this),this.join=l}_error(e){this.packet({type:n.PacketType.CONNECT_ERROR,data:e})}disconnect(e=!1){return this.connected?(e?this.client._disconnect():(this.packet({type:n.PacketType.DISCONNECT}),this._onclose("server namespace disconnect")),this):this}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}get broadcast(){return this.newBroadcastOperator()}get local(){return this.newBroadcastOperator().local}timeout(e){return this.flags.timeout=e,this}dispatch(e){a("dispatching an event %j",e),this.run(e,(t=>{process.nextTick((()=>{if(t)return this._onerror(t);this.connected?super.emitUntyped.apply(this,e):a("ignore packet received after disconnection")}))}))}use(e){return this.fns.push(e),this}run(e,t){const n=this.fns.slice(0);if(!n.length)return t(null);!function r(i){n[i](e,(function(e){return e?t(e):n[i+1]?void r(i+1):t(null)}))}(0)}get disconnected(){return!this.connected}get request(){return this.client.request}get conn(){return this.client.conn}get rooms(){return this.adapter.socketRooms(this.id)||new Set}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const n of t)n.apply(this,e.data)}}newBroadcastOperator(){const e=Object.assign({},this.flags);return this.flags={},new o.BroadcastOperator(this.adapter,new Set,new Set([this.id]),e)}}e.Socket=u}(WQ)),WQ}!function(e){var t=U&&U.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.Namespace=e.RESERVED_EVENTS=void 0;const n=XQ(),r=GQ,i=t(ah),s=JQ(),o=(0,i.default)("socket.io:namespace");e.RESERVED_EVENTS=new Set(["connect","connection","new_namespace"]);class a extends r.StrictEventEmitter{constructor(e,t){super(),this.sockets=new Map,this._fns=[],this._ids=0,this.server=e,this.name=t,this._initAdapter()}_initAdapter(){this.adapter=new(this.server.adapter())(this)}use(e){return this._fns.push(e),this}run(e,t){const n=this._fns.slice(0);if(!n.length)return t(null);!function r(i){n[i](e,(function(e){return e?t(e):n[i+1]?void r(i+1):t(null)}))}(0)}to(e){return new s.BroadcastOperator(this.adapter).to(e)}in(e){return new s.BroadcastOperator(this.adapter).in(e)}except(e){return new s.BroadcastOperator(this.adapter).except(e)}async _add(e,t,n){var r;o("adding socket to nsp %s",this.name);const i=await this._createSocket(e,t);if((null===(r=this.server.opts.connectionStateRecovery)||void 0===r?void 0:r.skipMiddlewares)&&i.recovered&&"open"===e.conn.readyState)return this._doConnect(i,n);this.run(i,(t=>{process.nextTick((()=>"open"!==e.conn.readyState?(o("next called after client was closed - ignoring socket"),void i._cleanup()):t?(o("middleware error, sending CONNECT_ERROR packet to the client"),i._cleanup(),3===e.conn.protocol?i._error(t.data||t.message):i._error({message:t.message,data:t.data})):void this._doConnect(i,n)))}))}async _createSocket(e,t){const r=t.pid,i=t.offset;if(this.server.opts.connectionStateRecovery&&"string"==typeof r&&"string"==typeof i){let s;try{s=await this.adapter.restoreSession(r,i)}catch(e){o("error while restoring session: %s",e)}if(s)return o("connection state recovered for sid %s",s.sid),new n.Socket(this,e,t,s)}return new n.Socket(this,e,t)}_doConnect(e,t){this.sockets.set(e.id,e),e._onconnect(),t&&t(e),this.emitReserved("connect",e),this.emitReserved("connection",e)}_remove(e){this.sockets.has(e.id)?this.sockets.delete(e.id):o("ignoring remove for %s",e.id)}emit(e,...t){return new s.BroadcastOperator(this.adapter).emit(e,...t)}send(...e){return this.emit("message",...e),this}write(...e){return this.emit("message",...e),this}serverSideEmit(t,...n){if(e.RESERVED_EVENTS.has(t))throw new Error(`"${String(t)}" is a reserved event name`);return n.unshift(t),this.adapter.serverSideEmit(n),!0}serverSideEmitWithAck(e,...t){return new Promise(((n,r)=>{t.push(((e,t)=>e?(e.responses=t,r(e)):n(t))),this.serverSideEmit(e,...t)}))}_onServerSideEmit(e){super.emitUntyped.apply(this,e)}allSockets(){return new s.BroadcastOperator(this.adapter).allSockets()}compress(e){return new s.BroadcastOperator(this.adapter).compress(e)}get volatile(){return new s.BroadcastOperator(this.adapter).volatile}get local(){return new s.BroadcastOperator(this.adapter).local}timeout(e){return new s.BroadcastOperator(this.adapter).timeout(e)}fetchSockets(){return new s.BroadcastOperator(this.adapter).fetchSockets()}socketsJoin(e){return new s.BroadcastOperator(this.adapter).socketsJoin(e)}socketsLeave(e){return new s.BroadcastOperator(this.adapter).socketsLeave(e)}disconnectSockets(e=!1){return new s.BroadcastOperator(this.adapter).disconnectSockets(e)}}e.Namespace=a}(zQ);var eJ={},tJ={},nJ={},rJ={};Object.defineProperty(rJ,"__esModule",{value:!0}),rJ.yeast=rJ.decode=rJ.encode=void 0;const iJ="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),sJ=64,oJ={};let aJ,cJ=0,lJ=0;function uJ(e){let t="";do{t=iJ[e%sJ]+t,e=Math.floor(e/sJ)}while(e>0);return t}for(rJ.encode=uJ,rJ.decode=function(e){let t=0;for(lJ=0;lJ<e.length;lJ++)t=t*sJ+oJ[e.charAt(lJ)];return t},rJ.yeast=function(){const e=uJ(+new Date);return e!==aJ?(cJ=0,aJ=e):e+"."+uJ(cJ++)};lJ<sJ;lJ++)oJ[iJ[lJ]]=lJ;var pJ;Object.defineProperty(nJ,"__esModule",{value:!0}),nJ.SessionAwareAdapter=nJ.Adapter=void 0;const hJ=p,dJ=rJ,fJ=NZ,mJ="function"==typeof(null===(pJ=null==fJ?void 0:fJ.Sender)||void 0===pJ?void 0:pJ.frame);class gJ extends hJ.EventEmitter{constructor(e){super(),this.nsp=e,this.rooms=new Map,this.sids=new Map,this.encoder=e.server.encoder}init(){}close(){}serverCount(){return Promise.resolve(1)}addAll(e,t){this.sids.has(e)||this.sids.set(e,new Set);for(const n of t)this.sids.get(e).add(n),this.rooms.has(n)||(this.rooms.set(n,new Set),this.emit("create-room",n)),this.rooms.get(n).has(e)||(this.rooms.get(n).add(e),this.emit("join-room",n,e))}del(e,t){this.sids.has(e)&&this.sids.get(e).delete(t),this._del(t,e)}_del(e,t){const n=this.rooms.get(e);if(null!=n){n.delete(t)&&this.emit("leave-room",e,t),0===n.size&&this.rooms.delete(e)&&this.emit("delete-room",e)}}delAll(e){if(this.sids.has(e)){for(const t of this.sids.get(e))this._del(t,e);this.sids.delete(e)}}broadcast(e,t){const n=t.flags||{},r={preEncoded:!0,volatile:n.volatile,compress:n.compress};e.nsp=this.nsp.name;const i=this._encode(e,r);this.apply(t,(t=>{"function"==typeof t.notifyOutgoingListeners&&t.notifyOutgoingListeners(e),t.client.writeToEngine(i,r)}))}broadcastWithAck(e,t,n,r){const i=t.flags||{},s={preEncoded:!0,volatile:i.volatile,compress:i.compress};e.nsp=this.nsp.name,e.id=this.nsp._ids++;const o=this._encode(e,s);let a=0;this.apply(t,(t=>{a++,t.acks.set(e.id,r),"function"==typeof t.notifyOutgoingListeners&&t.notifyOutgoingListeners(e),t.client.writeToEngine(o,s)})),n(a)}_encode(e,t){const n=this.encoder.encode(e);if(mJ&&1===n.length&&"string"==typeof n[0]){const e=Buffer.from("4"+n[0]);t.wsPreEncodedFrame=fJ.Sender.frame(e,{readOnly:!1,mask:!1,rsv1:!1,opcode:1,fin:!0})}return n}sockets(e){const t=new Set;return this.apply({rooms:e},(e=>{t.add(e.id)})),Promise.resolve(t)}socketRooms(e){return this.sids.get(e)}fetchSockets(e){const t=[];return this.apply(e,(e=>{t.push(e)})),Promise.resolve(t)}addSockets(e,t){this.apply(e,(e=>{e.join(t)}))}delSockets(e,t){this.apply(e,(e=>{t.forEach((t=>e.leave(t)))}))}disconnectSockets(e,t){this.apply(e,(e=>{e.disconnect(t)}))}apply(e,t){const n=e.rooms,r=this.computeExceptSids(e.except);if(n.size){const e=new Set;for(const i of n)if(this.rooms.has(i))for(const n of this.rooms.get(i)){if(e.has(n)||r.has(n))continue;const i=this.nsp.sockets.get(n);i&&(t(i),e.add(n))}}else for(const[e]of this.sids){if(r.has(e))continue;const n=this.nsp.sockets.get(e);n&&t(n)}}computeExceptSids(e){const t=new Set;if(e&&e.size>0)for(const n of e)this.rooms.has(n)&&this.rooms.get(n).forEach((e=>t.add(e)));return t}serverSideEmit(e){console.warn("this adapter does not support the serverSideEmit() functionality")}persistSession(e){}restoreSession(e,t){return null}}nJ.Adapter=gJ;function yJ(e,t){const n=0===t.rooms.size||e.some((e=>t.rooms.has(e))),r=e.every((e=>!t.except.has(e)));return n&&r}nJ.SessionAwareAdapter=class extends gJ{constructor(e){super(e),this.nsp=e,this.sessions=new Map,this.packets=[],this.maxDisconnectionDuration=e.server.opts.connectionStateRecovery.maxDisconnectionDuration;const t=setInterval((()=>{const e=Date.now()-this.maxDisconnectionDuration;this.sessions.forEach(((t,n)=>{t.disconnectedAt<e&&this.sessions.delete(n)}));for(let t=this.packets.length-1;t>=0;t--){if(this.packets[t].emittedAt<e){this.packets.splice(0,t+1);break}}}),6e4);t.unref()}persistSession(e){e.disconnectedAt=Date.now(),this.sessions.set(e.pid,e)}restoreSession(e,t){const n=this.sessions.get(e);if(!n)return null;if(n.disconnectedAt+this.maxDisconnectionDuration<Date.now())return this.sessions.delete(e),null;const r=this.packets.findIndex((e=>e.id===t));if(-1===r)return null;const i=[];for(let e=r+1;e<this.packets.length;e++){const t=this.packets[e];yJ(n.rooms,t.opts)&&i.push(t.data)}return Promise.resolve(Object.assign(Object.assign({},n),{missedPackets:i}))}broadcast(e,t){var n;const r=2===e.type,i=void 0===e.id,s=void 0===(null===(n=t.flags)||void 0===n?void 0:n.volatile);if(r&&i&&s){const n=(0,dJ.yeast)();e.data.push(n),this.packets.push({id:n,opts:t,data:e.data,emittedAt:Date.now()})}super.broadcast(e,t)}};var vJ={};!function(e){var t=U&&U.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};Object.defineProperty(e,"__esModule",{value:!0}),e.ClusterAdapterWithHeartbeat=e.ClusterAdapter=e.MessageType=void 0;const n=nJ,r=w,i=(0,ah.debug)("socket.io-adapter"),s=5e3;function o(){return(0,r.randomBytes)(8).toString("hex")}var a;function c(e){return{rooms:[...e.rooms],except:[...e.except],flags:e.flags}}function l(e){return{rooms:new Set(e.rooms),except:new Set(e.except),flags:e.flags}}!function(e){e[e.INITIAL_HEARTBEAT=1]="INITIAL_HEARTBEAT",e[e.HEARTBEAT=2]="HEARTBEAT",e[e.BROADCAST=3]="BROADCAST",e[e.SOCKETS_JOIN=4]="SOCKETS_JOIN",e[e.SOCKETS_LEAVE=5]="SOCKETS_LEAVE",e[e.DISCONNECT_SOCKETS=6]="DISCONNECT_SOCKETS",e[e.FETCH_SOCKETS=7]="FETCH_SOCKETS",e[e.FETCH_SOCKETS_RESPONSE=8]="FETCH_SOCKETS_RESPONSE",e[e.SERVER_SIDE_EMIT=9]="SERVER_SIDE_EMIT",e[e.SERVER_SIDE_EMIT_RESPONSE=10]="SERVER_SIDE_EMIT_RESPONSE",e[e.BROADCAST_CLIENT_COUNT=11]="BROADCAST_CLIENT_COUNT",e[e.BROADCAST_ACK=12]="BROADCAST_ACK",e[e.ADAPTER_CLOSE=13]="ADAPTER_CLOSE"}(a=e.MessageType||(e.MessageType={}));class u extends n.Adapter{constructor(e){super(e),this.requests=new Map,this.ackRequests=new Map,this.uid=o()}onMessage(e,n){if(e.uid===this.uid)return i("[%s] ignore message from self",this.uid);switch(i("[%s] new event of type %d from %s",this.uid,e.type,e.uid),e.type){case a.BROADCAST:if(void 0!==e.data.requestId)super.broadcastWithAck(e.data.packet,l(e.data.opts),(t=>{i("[%s] waiting for %d client acknowledgements",this.uid,t),this.publishResponse(e.uid,{type:a.BROADCAST_CLIENT_COUNT,data:{requestId:e.data.requestId,clientCount:t}})}),(t=>{i("[%s] received acknowledgement with value %j",this.uid,t),this.publishResponse(e.uid,{type:a.BROADCAST_ACK,data:{requestId:e.data.requestId,packet:t}})}));else{const t=e.data.packet,r=l(e.data.opts);this.addOffsetIfNecessary(t,r,n),super.broadcast(t,r)}break;case a.SOCKETS_JOIN:super.addSockets(l(e.data.opts),e.data.rooms);break;case a.SOCKETS_LEAVE:super.delSockets(l(e.data.opts),e.data.rooms);break;case a.DISCONNECT_SOCKETS:super.disconnectSockets(l(e.data.opts),e.data.close);break;case a.FETCH_SOCKETS:i("[%s] calling fetchSockets with opts %j",this.uid,e.data.opts),super.fetchSockets(l(e.data.opts)).then((n=>{this.publishResponse(e.uid,{type:a.FETCH_SOCKETS_RESPONSE,data:{requestId:e.data.requestId,sockets:n.map((e=>{const n=e.handshake,r=t(n,["sessionStore"]);return{id:e.id,handshake:r,rooms:[...e.rooms],data:e.data}}))}})}));break;case a.SERVER_SIDE_EMIT:{const t=e.data.packet;if(!(void 0!==e.data.requestId))return void this.nsp._onServerSideEmit(t);let n=!1;const r=t=>{n||(n=!0,i("[%s] calling acknowledgement with %j",this.uid,t),this.publishResponse(e.uid,{type:a.SERVER_SIDE_EMIT_RESPONSE,data:{requestId:e.data.requestId,packet:t}}))};this.nsp._onServerSideEmit([...t,r]);break}case a.BROADCAST_CLIENT_COUNT:case a.BROADCAST_ACK:case a.FETCH_SOCKETS_RESPONSE:case a.SERVER_SIDE_EMIT_RESPONSE:this.onResponse(e);break;default:i("[%s] unknown message type: %s",this.uid,e.type)}}onResponse(e){var t,n;const r=e.data.requestId;switch(i("[%s] received response %s to request %s",this.uid,e.type,r),e.type){case a.BROADCAST_CLIENT_COUNT:null===(t=this.ackRequests.get(r))||void 0===t||t.clientCountCallback(e.data.clientCount);break;case a.BROADCAST_ACK:null===(n=this.ackRequests.get(r))||void 0===n||n.ack(e.data.packet);break;case a.FETCH_SOCKETS_RESPONSE:{const t=this.requests.get(r);if(!t)return;t.current++,e.data.sockets.forEach((e=>t.responses.push(e))),t.current===t.expected&&(clearTimeout(t.timeout),t.resolve(t.responses),this.requests.delete(r));break}case a.SERVER_SIDE_EMIT_RESPONSE:{const t=this.requests.get(r);if(!t)return;t.current++,t.responses.push(e.data.packet),t.current===t.expected&&(clearTimeout(t.timeout),t.resolve(null,t.responses),this.requests.delete(r));break}default:i("[%s] unknown response type: %s",this.uid,e.type)}}async broadcast(e,t){var n;if(!(null===(n=t.flags)||void 0===n?void 0:n.local))try{const n=await this.publishAndReturnOffset({type:a.BROADCAST,data:{packet:e,opts:c(t)}});this.addOffsetIfNecessary(e,t,n)}catch(e){return i("[%s] error while broadcasting message: %s",this.uid,e.message)}super.broadcast(e,t)}addOffsetIfNecessary(e,t,n){var r;if(!this.nsp.server.opts.connectionStateRecovery)return;const i=2===e.type,s=void 0===e.id,o=void 0===(null===(r=t.flags)||void 0===r?void 0:r.volatile);i&&s&&o&&e.data.push(n)}broadcastWithAck(e,t,n,r){var i;if(!(null===(i=null==t?void 0:t.flags)||void 0===i?void 0:i.local)){const i=o();this.ackRequests.set(i,{clientCountCallback:n,ack:r}),this.publish({type:a.BROADCAST,data:{packet:e,requestId:i,opts:c(t)}}),setTimeout((()=>{this.ackRequests.delete(i)}),t.flags.timeout)}super.broadcastWithAck(e,t,n,r)}async addSockets(e,t){var n;if(!(null===(n=e.flags)||void 0===n?void 0:n.local))try{await this.publishAndReturnOffset({type:a.SOCKETS_JOIN,data:{opts:c(e),rooms:t}})}catch(e){i("[%s] error while publishing message: %s",this.uid,e.message)}super.addSockets(e,t)}async delSockets(e,t){var n;if(!(null===(n=e.flags)||void 0===n?void 0:n.local))try{await this.publishAndReturnOffset({type:a.SOCKETS_LEAVE,data:{opts:c(e),rooms:t}})}catch(e){i("[%s] error while publishing message: %s",this.uid,e.message)}super.delSockets(e,t)}async disconnectSockets(e,t){var n;if(!(null===(n=e.flags)||void 0===n?void 0:n.local))try{await this.publishAndReturnOffset({type:a.DISCONNECT_SOCKETS,data:{opts:c(e),close:t}})}catch(e){i("[%s] error while publishing message: %s",this.uid,e.message)}super.disconnectSockets(e,t)}async fetchSockets(e){var t;const[n,r]=await Promise.all([super.fetchSockets(e),this.serverCount()]),i=r-1;if((null===(t=e.flags)||void 0===t?void 0:t.local)||i<=0)return n;const l=o();return new Promise(((t,r)=>{const o=setTimeout((()=>{const e=this.requests.get(l);e&&(r(new Error(`timeout reached: only ${e.current} responses received out of ${e.expected}`)),this.requests.delete(l))}),e.flags.timeout||s),u={type:a.FETCH_SOCKETS,resolve:t,timeout:o,current:0,expected:i,responses:n};this.requests.set(l,u),this.publish({type:a.FETCH_SOCKETS,data:{opts:c(e),requestId:l}})}))}async serverSideEmit(e){if(!("function"==typeof e[e.length-1]))return this.publish({type:a.SERVER_SIDE_EMIT,data:{packet:e}});const t=e.pop(),n=await this.serverCount()-1;if(i('[%s] waiting for %d responses to "serverSideEmit" request',this.uid,n),n<=0)return t(null,[]);const r=o(),c=setTimeout((()=>{const e=this.requests.get(r);e&&(t(new Error(`timeout reached: only ${e.current} responses received out of ${e.expected}`),e.responses),this.requests.delete(r))}),s),l={type:a.SERVER_SIDE_EMIT,resolve:t,timeout:c,current:0,expected:n,responses:[]};this.requests.set(r,l),this.publish({type:a.SERVER_SIDE_EMIT,data:{requestId:r,packet:e}})}publish(e){this.publishAndReturnOffset(e).catch((e=>{i("[%s] error while publishing message: %s",this.uid,e)}))}publishAndReturnOffset(e){return e.uid=this.uid,e.nsp=this.nsp.name,this.doPublish(e)}publishResponse(e,t){t.uid=this.uid,t.nsp=this.nsp.name,this.doPublishResponse(e,t).catch((e=>{i("[%s] error while publishing response: %s",this.uid,e)}))}}e.ClusterAdapter=u;e.ClusterAdapterWithHeartbeat=class extends u{constructor(e,t){super(e),this.nodesMap=new Map,this.customRequests=new Map,this._opts=Object.assign({heartbeatInterval:5e3,heartbeatTimeout:1e4},t),this.cleanupTimer=setInterval((()=>{const e=Date.now();this.nodesMap.forEach(((t,n)=>{e-t>this._opts.heartbeatTimeout&&(i("[%s] node %s seems down",this.uid,n),this.removeNode(n))}))}),1e3)}init(){this.publish({type:a.INITIAL_HEARTBEAT})}scheduleHeartbeat(){this.heartbeatTimer?this.heartbeatTimer.refresh():this.heartbeatTimer=setTimeout((()=>{this.publish({type:a.HEARTBEAT})}),this._opts.heartbeatInterval)}close(){this.publish({type:a.ADAPTER_CLOSE}),clearTimeout(this.heartbeatTimer),this.cleanupTimer&&clearInterval(this.cleanupTimer)}onMessage(e,t){if(e.uid===this.uid)return i("[%s] ignore message from self",this.uid);switch(e.uid&&"emitter"!==e.uid&&this.nodesMap.set(e.uid,Date.now()),i("[%s] new event of type %d from %s",this.uid,e.type,e.uid),e.type){case a.INITIAL_HEARTBEAT:this.publish({type:a.HEARTBEAT});break;case a.HEARTBEAT:break;case a.ADAPTER_CLOSE:this.removeNode(e.uid);break;default:super.onMessage(e,t)}}serverCount(){return Promise.resolve(1+this.nodesMap.size)}publish(e){return this.scheduleHeartbeat(),super.publish(e)}async serverSideEmit(e){if(!("function"==typeof e[e.length-1]))return this.publish({type:a.SERVER_SIDE_EMIT,data:{packet:e}});const t=e.pop(),n=this.nodesMap.size;if(i('[%s] waiting for %d responses to "serverSideEmit" request',this.uid,n),n<=0)return t(null,[]);const r=o(),c=setTimeout((()=>{const e=this.customRequests.get(r);e&&(t(new Error(`timeout reached: missing ${e.missingUids.size} responses`),e.responses),this.customRequests.delete(r))}),s),l={type:a.SERVER_SIDE_EMIT,resolve:t,timeout:c,missingUids:new Set([...this.nodesMap.keys()]),responses:[]};this.customRequests.set(r,l),this.publish({type:a.SERVER_SIDE_EMIT,data:{requestId:r,packet:e}})}async fetchSockets(e){var t;const[n,r]=await Promise.all([super.fetchSockets({rooms:e.rooms,except:e.except,flags:{local:!0}}),this.serverCount()]),i=r-1;if((null===(t=e.flags)||void 0===t?void 0:t.local)||i<=0)return n;const l=o();return new Promise(((t,r)=>{const i=setTimeout((()=>{const e=this.customRequests.get(l);e&&(r(new Error(`timeout reached: missing ${e.missingUids.size} responses`)),this.customRequests.delete(l))}),e.flags.timeout||s),o={type:a.FETCH_SOCKETS,resolve:t,timeout:i,missingUids:new Set([...this.nodesMap.keys()]),responses:n};this.customRequests.set(l,o),this.publish({type:a.FETCH_SOCKETS,data:{opts:c(e),requestId:l}})}))}onResponse(e){const t=e.data.requestId;switch(i("[%s] received response %s to request %s",this.uid,e.type,t),e.type){case a.FETCH_SOCKETS_RESPONSE:{const n=this.customRequests.get(t);if(!n)return;e.data.sockets.forEach((e=>n.responses.push(e))),n.missingUids.delete(e.uid),0===n.missingUids.size&&(clearTimeout(n.timeout),n.resolve(n.responses),this.customRequests.delete(t));break}case a.SERVER_SIDE_EMIT_RESPONSE:{const n=this.customRequests.get(t);if(!n)return;n.responses.push(e.data.packet),n.missingUids.delete(e.uid),0===n.missingUids.size&&(clearTimeout(n.timeout),n.resolve(null,n.responses),this.customRequests.delete(t));break}default:super.onResponse(e)}}removeNode(e){this.customRequests.forEach(((t,n)=>{t.missingUids.delete(e),0===t.missingUids.size&&(clearTimeout(t.timeout),t.type===a.FETCH_SOCKETS?t.resolve(t.responses):t.type===a.SERVER_SIDE_EMIT&&t.resolve(null,t.responses),this.customRequests.delete(n))})),this.nodesMap.delete(e)}}}(vJ),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MessageType=e.ClusterAdapterWithHeartbeat=e.ClusterAdapter=e.SessionAwareAdapter=e.Adapter=void 0;var t=nJ;Object.defineProperty(e,"Adapter",{enumerable:!0,get:function(){return t.Adapter}}),Object.defineProperty(e,"SessionAwareAdapter",{enumerable:!0,get:function(){return t.SessionAwareAdapter}});var n=vJ;Object.defineProperty(e,"ClusterAdapter",{enumerable:!0,get:function(){return n.ClusterAdapter}}),Object.defineProperty(e,"ClusterAdapterWithHeartbeat",{enumerable:!0,get:function(){return n.ClusterAdapterWithHeartbeat}}),Object.defineProperty(e,"MessageType",{enumerable:!0,get:function(){return n.MessageType}})}(tJ);var bJ=U&&U.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(eJ,"__esModule",{value:!0}),eJ.ParentNamespace=void 0;const _J=zQ,wJ=tJ,xJ=(0,bJ(ah).default)("socket.io:parent-namespace");class EJ extends _J.Namespace{constructor(e){super(e,"/_"+EJ.count++),this.children=new Set}_initAdapter(){this.adapter=new SJ(this,this.children)}emit(e,...t){return this.children.forEach((n=>{n.emit(e,...t)})),!0}createChild(e){xJ("creating child namespace %s",e);const t=new _J.Namespace(this.server,e);if(t._fns=this._fns.slice(0),this.listeners("connect").forEach((e=>t.on("connect",e))),this.listeners("connection").forEach((e=>t.on("connection",e))),this.children.add(t),this.server._opts.cleanupEmptyChildNamespaces){const n=t._remove;t._remove=r=>{n.call(t,r),0===t.sockets.size&&(xJ("closing child namespace %s",e),t.adapter.close(),this.server._nsps.delete(t.name),this.children.delete(t))}}return this.server._nsps.set(e,t),this.server.sockets.emitReserved("new_namespace",t),t}fetchSockets(){throw new Error("fetchSockets() is not supported on parent namespaces")}}eJ.ParentNamespace=EJ,EJ.count=0;class SJ extends wJ.Adapter{constructor(e,t){super(e),this.children=t}broadcast(e,t){this.children.forEach((n=>{n.adapter.broadcast(e,t)}))}}var TJ={},DJ=U&&U.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(TJ,"__esModule",{value:!0}),TJ.serveFile=TJ.restoreAdapter=TJ.patchAdapter=void 0;const kJ=tJ,AJ=s,CJ=(0,DJ(ah).default)("socket.io:adapter-uws"),RJ="",{addAll:OJ,del:LJ,broadcast:IJ}=kJ.Adapter.prototype;function PJ(e,t,n,r){const i=t.conn.id,s=t.conn.transport.socket;n&&(CJ("subscribe connection %s to topic %s",i,e),s.subscribe(e)),r.forEach((t=>{const n=`${e}${RJ}${t}`;CJ("subscribe connection %s to topic %s",i,n),s.subscribe(n)}))}TJ.patchAdapter=function(e){kJ.Adapter.prototype.addAll=function(e,t){const n=!this.sids.has(e);OJ.call(this,e,t);const r=this.nsp.sockets.get(e);r&&("websocket"!==r.conn.transport.name?n&&r.conn.on("upgrade",(()=>{const t=this.sids.get(e);t&&PJ(this.nsp.name,r,n,t)})):PJ(this.nsp.name,r,n,t))},kJ.Adapter.prototype.del=function(e,t){LJ.call(this,e,t);const n=this.nsp.sockets.get(e);if(n&&"websocket"===n.conn.transport.name){const e=n.conn.id,r=n.conn.transport.socket,i=`${this.nsp.name}${RJ}${t}`;CJ("unsubscribe connection %s from topic %s",e,i),r.unsubscribe(i)}},kJ.Adapter.prototype.broadcast=function(t,n){if(!(n.rooms.size<=1&&0===n.except.size))return void IJ.call(this,t,n);const r=n.flags||{},i={preEncoded:!0,volatile:r.volatile,compress:r.compress};t.nsp=this.nsp.name;const s=this.encoder.encode(t),o=0===n.rooms.size?this.nsp.name:`${this.nsp.name}${RJ}${n.rooms.keys().next().value}`;CJ("fast publish to %s",o),s.forEach((t=>{const n="string"!=typeof t;e.publish(o,n?t:"4"+t,n)})),this.apply(n,(e=>{"websocket"!==e.conn.transport.name&&e.client.writeToEngine(s,i)}))}},TJ.restoreAdapter=function(){kJ.Adapter.prototype.addAll=OJ,kJ.Adapter.prototype.del=LJ,kJ.Adapter.prototype.broadcast=IJ};TJ.serveFile=function(e,t){const{size:n}=(0,AJ.statSync)(t),r=(0,AJ.createReadStream)(t),i=()=>!r.destroyed&&r.destroy();e.onAborted(i),r.on("data",(t=>{const i=(e=>{const{buffer:t,byteOffset:n,byteLength:r}=e;return t.slice(n,n+r)})(t),s=e.getWriteOffset(),[o,a]=e.tryEnd(i,n);a||o||(r.pause(),e.onWritable((t=>{const[o,a]=e.tryEnd(i.slice(t-s),n);return!a&&o&&r.resume(),o})))})).on("error",(e=>{throw i(),e})).on("end",i)};var NJ="4.7.5";!function(e,t){var n=U&&U.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=U&&U.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=U&&U.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&n(t,e,i);return r(t,e),t},a=U&&U.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Namespace=t.Socket=t.Server=void 0;const c=x,l=s,u=T,d=KM,f=h,m=o,g=xG,y=DQ,v=p,b=zQ;Object.defineProperty(t,"Namespace",{enumerable:!0,get:function(){return b.Namespace}});const _=eJ,w=tJ,E=i(kQ),S=a(ah),D=XQ();Object.defineProperty(t,"Socket",{enumerable:!0,get:function(){return D.Socket}});const k=GQ,A=TJ,C=a(qZ),R=(0,S.default)("socket.io:server"),O=NJ,L=/\.map/;class I extends k.StrictEventEmitter{constructor(e,t={}){super(),this._nsps=new Map,this.parentNsps=new Map,this.parentNamespacesFromRegExp=new Map,"object"==typeof e&&e instanceof Object&&!e.listen&&(t=e,e=void 0),this.path(t.path||"/socket.io"),this.connectTimeout(t.connectTimeout||45e3),this.serveClient(!1!==t.serveClient),this._parser=t.parser||E,this.encoder=new this._parser.Encoder,this.opts=t,t.connectionStateRecovery?(t.connectionStateRecovery=Object.assign({maxDisconnectionDuration:12e4,skipMiddlewares:!0},t.connectionStateRecovery),this.adapter(t.adapter||w.SessionAwareAdapter)):this.adapter(t.adapter||w.Adapter),t.cleanupEmptyChildNamespaces=!!t.cleanupEmptyChildNamespaces,this.sockets=this.of("/"),(e||"number"==typeof e)&&this.attach(e),this.opts.cors&&(this._corsMiddleware=(0,C.default)(this.opts.cors))}get _opts(){return this.opts}serveClient(e){return arguments.length?(this._serveClient=e,this):this._serveClient}_checkNamespace(e,t,n){if(0===this.parentNsps.size)return n(!1);const r=this.parentNsps.keys(),i=()=>{const s=r.next();if(s.done)return n(!1);s.value(e,t,((t,r)=>{if(t||!r)return i();if(this._nsps.has(e))return R("dynamic namespace %s already exists",e),n(this._nsps.get(e));const o=this.parentNsps.get(s.value).createChild(e);R("dynamic namespace %s was created",e),n(o)}))};i()}path(e){if(!arguments.length)return this._path;this._path=e.replace(/\/$/,"");const t=this._path.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");return this.clientPathRegex=new RegExp("^"+t+"/socket\\.io(\\.msgpack|\\.esm)?(\\.min)?\\.js(\\.map)?(?:\\?|$)"),this}connectTimeout(e){return void 0===e?this._connectTimeout:(this._connectTimeout=e,this)}adapter(e){if(!arguments.length)return this._adapter;this._adapter=e;for(const e of this._nsps.values())e._initAdapter();return this}listen(e,t={}){return this.attach(e,t)}attach(e,t={}){if("function"==typeof e){throw new Error("You are trying to attach socket.io to an express request handler function. Please pass a http.Server instance.")}if(Number(e)==e&&(e=Number(e)),"number"==typeof e){R("creating http server and binding to %d",e);const t=e;e=c.createServer(((e,t)=>{t.writeHead(404),t.end()})),e.listen(t)}return Object.assign(t,this.opts),t.path=t.path||this._path,this.initEngine(e,t),this}attachApp(e,t={}){Object.assign(t,this.opts),t.path=t.path||this._path,R("creating uWebSockets.js-based engine with opts %j",t);const n=new g.uServer(t);n.attach(e,t),this.bind(n),this._serveClient&&e.get(`${this._path}/*`,((e,t)=>{if(!this.clientPathRegex.test(t.getUrl()))return void t.setYield(!0);const n=t.getUrl().replace(this._path,"").replace(/\?.*$/,"").replace(/^\//,""),r=L.test(n),i=r?"map":"source",s='"'+O+'"',o="W/"+s,a=t.getHeader("if-none-match");if(a&&(s===a||o===a))return R("serve client %s 304",i),e.writeStatus("304 Not Modified"),void e.end();R("serve client %s",i),e.writeHeader("cache-control","public, max-age=0"),e.writeHeader("content-type","application/"+(r?"json":"javascript")+"; charset=utf-8"),e.writeHeader("etag",s);const c=m.join(__dirname,"../client-dist/",n);(0,A.serveFile)(e,c)})),(0,A.patchAdapter)(e)}initEngine(e,t){R("creating engine.io instance with opts %j",t),this.eio=(0,g.attach)(e,t),this._serveClient&&this.attachServe(e),this.httpServer=e,this.bind(this.eio)}attachServe(e){R("attaching client serving req handler");const t=e.listeners("request").slice(0);e.removeAllListeners("request"),e.on("request",((n,r)=>{if(this.clientPathRegex.test(n.url))this._corsMiddleware?this._corsMiddleware(n,r,(()=>{this.serve(n,r)})):this.serve(n,r);else for(let i=0;i<t.length;i++)t[i].call(e,n,r)}))}serve(e,t){const n=e.url.replace(this._path,"").replace(/\?.*$/,""),r=L.test(n),i=r?"map":"source",s='"'+O+'"',o="W/"+s,a=e.headers["if-none-match"];if(a&&(s===a||o===a))return R("serve client %s 304",i),t.writeHead(304),void t.end();R("serve client %s",i),t.setHeader("Cache-Control","public, max-age=0"),t.setHeader("Content-Type","application/"+(r?"json":"javascript")+"; charset=utf-8"),t.setHeader("ETag",s),I.sendFile(n,e,t)}static sendFile(e,t,n){const r=(0,l.createReadStream)(m.join(__dirname,"../client-dist/",e)),i=e=>{e&&n.end()};switch(d(t).encodings(["br","gzip","deflate"])){case"br":n.writeHead(200,{"content-encoding":"br"}),(0,f.pipeline)(r,(0,u.createBrotliCompress)(),n,i);break;case"gzip":n.writeHead(200,{"content-encoding":"gzip"}),(0,f.pipeline)(r,(0,u.createGzip)(),n,i);break;case"deflate":n.writeHead(200,{"content-encoding":"deflate"}),(0,f.pipeline)(r,(0,u.createDeflate)(),n,i);break;default:n.writeHead(200),(0,f.pipeline)(r,n,i)}}bind(e){return this.engine=e,this.engine.on("connection",this.onconnection.bind(this)),this}onconnection(e){R("incoming connection with id %s",e.id);const t=new y.Client(this,e);return 3===e.protocol&&t.connect("/"),this}of(e,t){if("function"==typeof e||e instanceof RegExp){const n=new _.ParentNamespace(this);return R("initializing parent namespace %s",n.name),"function"==typeof e?this.parentNsps.set(e,n):(this.parentNsps.set(((t,n,r)=>r(null,e.test(t))),n),this.parentNamespacesFromRegExp.set(e,n)),t&&n.on("connect",t),n}"/"!==String(e)[0]&&(e="/"+e);let n=this._nsps.get(e);if(!n){for(const[t,n]of this.parentNamespacesFromRegExp)if(t.test(e))return R("attaching namespace %s to parent namespace %s",e,t),n.createChild(e);R("initializing namespace %s",e),n=new b.Namespace(this,e),this._nsps.set(e,n),"/"!==e&&this.sockets.emitReserved("new_namespace",n)}return t&&n.on("connect",t),n}close(e){this._nsps.forEach((e=>{e.sockets.forEach((e=>{e._onclose("server shutting down")})),e.adapter.close()})),this.engine.close(),(0,A.restoreAdapter)(),this.httpServer?this.httpServer.close(e):e&&e()}use(e){return this.sockets.use(e),this}to(e){return this.sockets.to(e)}in(e){return this.sockets.in(e)}except(e){return this.sockets.except(e)}send(...e){return this.sockets.emit("message",...e),this}write(...e){return this.sockets.emit("message",...e),this}serverSideEmit(e,...t){return this.sockets.serverSideEmit(e,...t)}serverSideEmitWithAck(e,...t){return this.sockets.serverSideEmitWithAck(e,...t)}allSockets(){return this.sockets.allSockets()}compress(e){return this.sockets.compress(e)}get volatile(){return this.sockets.volatile}get local(){return this.sockets.local}timeout(e){return this.sockets.timeout(e)}fetchSockets(){return this.sockets.fetchSockets()}socketsJoin(e){return this.sockets.socketsJoin(e)}socketsLeave(e){return this.sockets.socketsLeave(e)}disconnectSockets(e=!1){return this.sockets.disconnectSockets(e)}}t.Server=I;const P=Object.keys(v.EventEmitter.prototype).filter((function(e){return"function"==typeof v.EventEmitter.prototype[e]}));P.forEach((function(e){I.prototype[e]=function(){return this.sockets[e].apply(this.sockets,arguments)}})),e.exports=(e,t)=>new I(e,t),e.exports.Server=I,e.exports.Namespace=b.Namespace,e.exports.Socket=D.Socket,XQ()}(wG,wG.exports);var jJ=q(wG.exports);const{Server:FJ,Namespace:BJ,Socket:MJ}=jJ,UJ=e=>new Promise(((t,n)=>{const r=a.platform();let i;if("win32"===r)i=`start ${e}`;else if("darwin"===r)i=`open ${e}`;else{if("linux"!==r)return n(new Error(`Unsupported platform: ${r}`));i=`xdg-open ${e}`}d.exec(i,(e=>{if(e)return n(new Error(`Failed to open URL on ${r}: ${e.message}`));t()}))})),qJ=process.cwd(),HJ=o.join(qJ,"src","views");const $J=new ke;$J.name("theme").description("dev, list"),$J.command("create").description("Run development server with Webpack and BrowserSync").action(gf),$J.command("check").description("Run development server with Webpack and BrowserSync").action((async function(){const e=zr("Checking files...").start();try{const t=await qO(HJ,"views"),n=Object.keys(t);await HO(n,e)}catch(t){e.fail("Failed to retrieve files"),console.error(_t.red(`Failed to retrieve files - Error: ${t.message}`))}})),$J.command("dev").description("Run development server with Webpack and BrowserSync").action((async()=>{await mf();const{data:e}=await of.get("/apps"),t=e?.apps?.map((e=>({name:e.subdomain,value:e._id}))),n=await yl.prompt({type:"list",name:"app",message:"Choose the theme you want to use",choices:t});var r=e?.apps?.find((e=>e._id===n.app));const i=nq(),s=3e3,a=new x.Server(i),c=new FJ(a),l=zr("Start Server").start(),u=process.cwd(),p=o.join(u,"src");o.join(u,"src","assets");const h=o.join(u,"dist");d.exec("npx webpack --config webpack.config.js --mode development --stats errors-warnings",(async e=>{e&&console.log(e,"errrrrr");try{await I.access(p),await I.access(h)}catch{console.error("Error: Required directories do not exist."),process.exit(1)}i.use(nq.static(h)),i.get("/api/auth",((e,t)=>{const{redirect_url:n,token:r}=e.query;if(console.log("🚀 ~ app.get ~ req.query:",e.query),!n||!r)return t.status(400).send("Missing redirect_url or token");t.cookie("token",r,{httpOnly:!1,secure:"production"===process.env.NODE_ENV,expires:new Date(9999,0,1)}),t.redirect(n)})),i.get("/api/auth/logout",((e,t)=>{t.clearCookie("token",{httpOnly:!0,secure:"production"===process.env.NODE_ENV}),t.redirect("/")})),i.get("*",j(i,{viewsDirectory:p,secretKey:r.secretKey,watch:!0},"development")),zr("REloading");const t=zr("Connected"),n=zr("Budilding");c.on("connection",(e=>{t.stop(),t.start();const r=rq.watch([p,o.join(u,"tailwind.config.js")]);r.on("change",(()=>{r.close(),t.stop(),n.start(),d.exec(`cd ${u} && npx webpack --config webpack.config.js --mode development --stats errors-warnings`,(t=>{if(t)return console.log(t),void n.fail(_t.red("Build failed"));n.succeed(_t.blue("Rebuilt successfully")),e.emit("reload")}))})),e.on("disconnect",(()=>{r.close()}))})),c.on("disconnect",(()=>{console.log(_t.blue("Disconnected")),t.stop(),reloadSpinner.stop()})),a.listen(s,(()=>{l.succeed("Server Started"),console.log("Server running at http://localhost:3000"),UJ("http://localhost:3000")}))}))})),$J.command("list").description("List available themes").action((async()=>{const e=zr("Fetching Data...").start();try{const{data:t}=await of.get("/themes");e.stop();const n=t?.themes?.map((e=>({name:e.title,value:e._id}))),r=await yl.prompt({type:"list",name:"selectedThemeId",message:"Choose the theme you want to use:",choices:n}),i=t?.themes.find((e=>e._id===r.selectedThemeId));console.log("🚀 ~ getThemes ~ selectedTheme:",i)}catch(t){e.stop(),console.error("Failed to fetch data:",t)}}));const zJ=Object.create(null);zJ.open="0",zJ.close="1",zJ.ping="2",zJ.pong="3",zJ.message="4",zJ.upgrade="5",zJ.noop="6";const WJ=Object.create(null);Object.keys(zJ).forEach((e=>{WJ[zJ[e]]=e}));const GJ={type:"error",data:"parser error"},VJ=({type:e,data:t},n,r)=>t instanceof ArrayBuffer||ArrayBuffer.isView(t)?r(n?t:"b"+KJ(t,!0).toString("base64")):r(zJ[e]+(t||"")),KJ=(e,t)=>Buffer.isBuffer(e)||e instanceof Uint8Array&&!t?e:e instanceof ArrayBuffer?Buffer.from(e):Buffer.from(e.buffer,e.byteOffset,e.byteLength);let YJ;const ZJ=(e,t)=>{if("string"!=typeof e)return{type:"message",data:QJ(e,t)};const n=e.charAt(0);if("b"===n){const n=Buffer.from(e.substring(1),"base64");return{type:"message",data:QJ(n,t)}}return WJ[n]?e.length>1?{type:WJ[n],data:e.substring(1)}:{type:WJ[n]}:GJ},QJ=(e,t)=>"arraybuffer"===t?e instanceof ArrayBuffer?e:Buffer.isBuffer(e)?e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength):e.buffer:Buffer.isBuffer(e)?e:Buffer.from(e),JJ=String.fromCharCode(30);function XJ(){return new TransformStream({transform(e,t){!function(e,t){if(e.data instanceof ArrayBuffer||ArrayBuffer.isView(e.data))return t(KJ(e.data,!1));VJ(e,!0,(e=>{YJ||(YJ=new TextEncoder),t(YJ.encode(e))}))}(e,(n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const e=new DataView(i.buffer);e.setUint8(0,126),e.setUint16(1,r)}else{i=new Uint8Array(9);const e=new DataView(i.buffer);e.setUint8(0,127),e.setBigUint64(1,BigInt(r))}e.data&&"string"!=typeof e.data&&(i[0]|=128),t.enqueue(i),t.enqueue(n)}))}})}let eX;function tX(e){return e.reduce(((e,t)=>e+t.length),0)}function nX(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}const rX=global;function iX(e,...t){return t.reduce(((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t)),{})}const sX=rX.setTimeout,oX=rX.clearTimeout;function aX(e,t){t.useNativeTimers?(e.setTimeoutFn=sX.bind(rX),e.clearTimeoutFn=oX.bind(rX)):(e.setTimeoutFn=rX.setTimeout.bind(rX),e.clearTimeoutFn=rX.clearTimeout.bind(rX))}class cX extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type="TransportError"}}class lX extends AQ{constructor(e){super(),this.writable=!1,aX(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,t,n){return super.emitReserved("error",new cX(e,t,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(e){"open"===this.readyState&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=ZJ(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return-1===e.indexOf(":")?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(e){const t=function(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}(e);return t.length?"?"+t:""}}const uX="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),pX=64,hX={};let dX,fX=0,mX=0;function gX(e){let t="";do{t=uX[e%pX]+t,e=Math.floor(e/pX)}while(e>0);return t}function yX(){const e=gX(+new Date);return e!==dX?(fX=0,dX=e):e+"."+gX(fX++)}for(;mX<pX;mX++)hX[uX[mX]]=mX;
|
|
377
|
+
parse:function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var n={},r=t||{},i=e.split(NV),s=r.decode||IV,o=0;o<i.length;o++){var a=i[o],c=a.indexOf("=");if(!(c<0)){var l=a.substr(0,c).trim(),u=a.substr(++c,a.length).trim();'"'==u[0]&&(u=u.slice(1,-1)),null==n[l]&&(n[l]=FV(u,s))}}return n},serialize:function(e,t,n){var r=n||{},i=r.encode||PV;if("function"!=typeof i)throw new TypeError("option encode is invalid");if(!jV.test(e))throw new TypeError("argument name is invalid");var s=i(t);if(s&&!jV.test(s))throw new TypeError("argument val is invalid");var o=e+"="+s;if(null!=r.maxAge){var a=r.maxAge-0;if(isNaN(a)||!isFinite(a))throw new TypeError("option maxAge is invalid");o+="; Max-Age="+Math.floor(a)}if(r.domain){if(!jV.test(r.domain))throw new TypeError("option domain is invalid");o+="; Domain="+r.domain}if(r.path){if(!jV.test(r.path))throw new TypeError("option path is invalid");o+="; Path="+r.path}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");o+="; Expires="+r.expires.toUTCString()}r.httpOnly&&(o+="; HttpOnly");r.secure&&(o+="; Secure");if(r.sameSite){switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return o}},IV=decodeURIComponent,PV=encodeURIComponent,NV=/; */,jV=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function FV(e,t){try{return t(e)}catch(t){return e}}var BV,MV,UV,qV,HV,$V,zV={exports:{}},WV={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}},GV={exports:{}},VV={exports:{}};function KV(){if(UV)return VV.exports;UV=1;const e="function"==typeof __webpack_require__?__non_webpack_require__:rF;return"function"==typeof e.addon?VV.exports=e.addon.bind(e):VV.exports=function(){if(MV)return BV;MV=1;var e=s,t=o,n=a,r="function"==typeof __webpack_require__?__non_webpack_require__:rF,i=process.config&&process.config.variables||{},c=!!process.env.PREBUILDS_ONLY,l=process.versions.modules,u=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",p=process.env.npm_config_arch||n.arch(),h=process.env.npm_config_platform||n.platform(),d=process.env.LIBC||(function(t){return"linux"===t&&e.existsSync("/etc/alpine-release")}(h)?"musl":"glibc"),f=process.env.ARM_VERSION||("arm64"===p?"8":i.arm_version)||"",m=(process.versions.uv||"").split(".")[0];function g(e){return r(g.resolve(e))}function y(t){try{return e.readdirSync(t)}catch(e){return[]}}function v(e,n){var r=y(e).filter(n);return r[0]&&t.join(e,r[0])}function b(e){return/\.node$/.test(e)}function _(e){var t=e.split("-");if(2===t.length){var n=t[0],r=t[1].split("+");if(n&&r.length&&r.every(Boolean))return{name:e,platform:n,architectures:r}}}function w(e,t){return function(n){return null!=n&&n.platform===e&&n.architectures.includes(t)}}function x(e,t){return e.architectures.length-t.architectures.length}function E(e){var t=e.split("."),n={file:e,specificity:0};if("node"===t.pop()){for(var r=0;r<t.length;r++){var i=t[r];if("node"===i||"electron"===i||"node-webkit"===i)n.runtime=i;else if("napi"===i)n.napi=!0;else if("abi"===i.slice(0,3))n.abi=i.slice(3);else if("uv"===i.slice(0,2))n.uv=i.slice(2);else if("armv"===i.slice(0,4))n.armv=i.slice(4);else{if("glibc"!==i&&"musl"!==i)continue;n.libc=i}n.specificity++}return n}}function S(e,t){return function(n){return!(null==n||n.runtime&&n.runtime!==e&&!function(e){return"node"===e.runtime&&e.napi}(n)||n.abi&&n.abi!==t&&!n.napi||n.uv&&n.uv!==m||n.armv&&n.armv!==f||n.libc&&n.libc!==d)}}function T(e){return function(t,n){return t.runtime!==n.runtime?t.runtime===e?-1:1:t.abi!==n.abi?t.abi?-1:1:t.specificity!==n.specificity?t.specificity>n.specificity?-1:1:0}}return BV=g,g.resolve=g.path=function(e){e=t.resolve(e||".");try{var n=r(t.join(e,"package.json")).name.toUpperCase().replace(/-/g,"_");process.env[n+"_PREBUILD"]&&(e=process.env[n+"_PREBUILD"])}catch(e){}if(!c){var i=v(t.join(e,"build/Release"),b);if(i)return i;var s=v(t.join(e,"build/Debug"),b);if(s)return s}var o=D(e);if(o)return o;var a=D(t.dirname(process.execPath));if(a)return a;var g=["platform="+h,"arch="+p,"runtime="+u,"abi="+l,"uv="+m,f?"armv="+f:"","libc="+d,"node="+process.versions.node,process.versions.electron?"electron="+process.versions.electron:"","function"==typeof __webpack_require__?"webpack=true":""].filter(Boolean).join(" ");throw new Error("No native build was found for "+g+"\n loaded from: "+e+"\n");function D(e){var n=y(t.join(e,"prebuilds")).map(_).filter(w(h,p)).sort(x)[0];if(n){var r=t.join(e,"prebuilds",n.name),i=y(r).map(E).filter(S(u,l)).sort(T(u))[0];return i?t.join(r,i.file):void 0}}},g.parseTags=E,g.matchTags=S,g.compareTags=T,g.parseTuple=_,g.matchTuple=w,g.compareTuples=x,BV}(),VV.exports}const{EMPTY_BUFFER:YV}=WV,ZV=Buffer[Symbol.species];function QV(e,t,n,r,i){for(let s=0;s<i;s++)n[r+s]=e[s]^t[3&s]}function JV(e,t){for(let n=0;n<e.length;n++)e[n]^=t[3&n]}if(zV.exports={concat:function(e,t){if(0===e.length)return YV;if(1===e.length)return e[0];const n=Buffer.allocUnsafe(t);let r=0;for(let t=0;t<e.length;t++){const i=e[t];n.set(i,r),r+=i.length}return r<t?new ZV(n.buffer,n.byteOffset,r):n},mask:QV,toArrayBuffer:function(e){return e.length===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.length)},toBuffer:function e(t){if(e.readOnly=!0,Buffer.isBuffer(t))return t;let n;return t instanceof ArrayBuffer?n=new ZV(t):ArrayBuffer.isView(t)?n=new ZV(t.buffer,t.byteOffset,t.byteLength):(n=Buffer.from(t),e.readOnly=!1),n},unmask:JV},!process.env.WS_NO_BUFFER_UTIL)try{const e=function(){if($V)return GV.exports;$V=1;try{GV.exports=KV()(__dirname)}catch(e){GV.exports=(HV||(HV=1,qV={mask:(e,t,n,r,i)=>{for(var s=0;s<i;s++)n[r+s]=e[s]^t[3&s]},unmask:(e,t)=>{const n=e.length;for(var r=0;r<n;r++)e[r]^=t[3&r]}}),qV)}return GV.exports}();zV.exports.mask=function(t,n,r,i,s){s<48?QV(t,n,r,i,s):e.mask(t,n,r,i,s)},zV.exports.unmask=function(t,n){t.length<32?JV(t,n):e.unmask(t,n)}}catch(e){}var XV=zV.exports;const eK=Symbol("kDone"),tK=Symbol("kRun");const nK=T,rK=XV,iK=class{constructor(e){this[eK]=()=>{this.pending--,this[tK]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[tK]()}[tK](){if(this.pending!==this.concurrency&&this.jobs.length){const e=this.jobs.shift();this.pending++,e(this[eK])}}},{kStatusCode:sK}=WV,oK=Buffer[Symbol.species],aK=Buffer.from([0,0,255,255]),cK=Symbol("permessage-deflate"),lK=Symbol("total-length"),uK=Symbol("callback"),pK=Symbol("buffers"),hK=Symbol("error");let dK;var fK=class{constructor(e,t,n){if(this._maxPayload=0|n,this._options=e||{},this._threshold=void 0!==this._options.threshold?this._options.threshold:1024,this._isServer=!!t,this._deflate=null,this._inflate=null,this.params=null,!dK){const e=void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10;dK=new iK(e)}}static get extensionName(){return"permessage-deflate"}offer(){const e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:null==this._options.clientMaxWindowBits&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){const e=this._deflate[uK];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){const t=this._options,n=e.find((e=>!(!1===t.serverNoContextTakeover&&e.server_no_context_takeover||e.server_max_window_bits&&(!1===t.serverMaxWindowBits||"number"==typeof t.serverMaxWindowBits&&t.serverMaxWindowBits>e.server_max_window_bits)||"number"==typeof t.clientMaxWindowBits&&!e.client_max_window_bits)));if(!n)throw new Error("None of the extension offers can be accepted");return t.serverNoContextTakeover&&(n.server_no_context_takeover=!0),t.clientNoContextTakeover&&(n.client_no_context_takeover=!0),"number"==typeof t.serverMaxWindowBits&&(n.server_max_window_bits=t.serverMaxWindowBits),"number"==typeof t.clientMaxWindowBits?n.client_max_window_bits=t.clientMaxWindowBits:!0!==n.client_max_window_bits&&!1!==t.clientMaxWindowBits||delete n.client_max_window_bits,n}acceptAsClient(e){const t=e[0];if(!1===this._options.clientNoContextTakeover&&t.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(t.client_max_window_bits){if(!1===this._options.clientMaxWindowBits||"number"==typeof this._options.clientMaxWindowBits&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"')}else"number"==typeof this._options.clientMaxWindowBits&&(t.client_max_window_bits=this._options.clientMaxWindowBits);return t}normalizeParams(e){return e.forEach((e=>{Object.keys(e).forEach((t=>{let n=e[t];if(n.length>1)throw new Error(`Parameter "${t}" must have only a single value`);if(n=n[0],"client_max_window_bits"===t){if(!0!==n){const e=+n;if(!Number.isInteger(e)||e<8||e>15)throw new TypeError(`Invalid value for parameter "${t}": ${n}`);n=e}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${t}": ${n}`)}else if("server_max_window_bits"===t){const e=+n;if(!Number.isInteger(e)||e<8||e>15)throw new TypeError(`Invalid value for parameter "${t}": ${n}`);n=e}else{if("client_no_context_takeover"!==t&&"server_no_context_takeover"!==t)throw new Error(`Unknown parameter "${t}"`);if(!0!==n)throw new TypeError(`Invalid value for parameter "${t}": ${n}`)}e[t]=n}))})),e}decompress(e,t,n){dK.add((r=>{this._decompress(e,t,((e,t)=>{r(),n(e,t)}))}))}compress(e,t,n){dK.add((r=>{this._compress(e,t,((e,t)=>{r(),n(e,t)}))}))}_decompress(e,t,n){const r=this._isServer?"client":"server";if(!this._inflate){const e=`${r}_max_window_bits`,t="number"!=typeof this.params[e]?nK.Z_DEFAULT_WINDOWBITS:this.params[e];this._inflate=nK.createInflateRaw({...this._options.zlibInflateOptions,windowBits:t}),this._inflate[cK]=this,this._inflate[lK]=0,this._inflate[pK]=[],this._inflate.on("error",yK),this._inflate.on("data",gK)}this._inflate[uK]=n,this._inflate.write(e),t&&this._inflate.write(aK),this._inflate.flush((()=>{const e=this._inflate[hK];if(e)return this._inflate.close(),this._inflate=null,void n(e);const i=rK.concat(this._inflate[pK],this._inflate[lK]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[lK]=0,this._inflate[pK]=[],t&&this.params[`${r}_no_context_takeover`]&&this._inflate.reset()),n(null,i)}))}_compress(e,t,n){const r=this._isServer?"server":"client";if(!this._deflate){const e=`${r}_max_window_bits`,t="number"!=typeof this.params[e]?nK.Z_DEFAULT_WINDOWBITS:this.params[e];this._deflate=nK.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:t}),this._deflate[lK]=0,this._deflate[pK]=[],this._deflate.on("data",mK)}this._deflate[uK]=n,this._deflate.write(e),this._deflate.flush(nK.Z_SYNC_FLUSH,(()=>{if(!this._deflate)return;let e=rK.concat(this._deflate[pK],this._deflate[lK]);t&&(e=new oK(e.buffer,e.byteOffset,e.length-4)),this._deflate[uK]=null,this._deflate[lK]=0,this._deflate[pK]=[],t&&this.params[`${r}_no_context_takeover`]&&this._deflate.reset(),n(null,e)}))}};function mK(e){this[pK].push(e),this[lK]+=e.length}function gK(e){this[lK]+=e.length,this[cK]._maxPayload<1||this[lK]<=this[cK]._maxPayload?this[pK].push(e):(this[hK]=new RangeError("Max payload size exceeded"),this[hK].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[hK][sK]=1009,this.removeListener("data",gK),this.reset())}function yK(e){this[cK]._inflate=null,e[sK]=1007,this[uK](e)}var vK,bK,_K,wK={exports:{}},xK={exports:{}};const{isUtf8:EK}=v;function SK(e){const t=e.length;let n=0;for(;n<t;)if(128&e[n])if(192==(224&e[n])){if(n+1===t||128!=(192&e[n+1])||192==(254&e[n]))return!1;n+=2}else if(224==(240&e[n])){if(n+2>=t||128!=(192&e[n+1])||128!=(192&e[n+2])||224===e[n]&&128==(224&e[n+1])||237===e[n]&&160==(224&e[n+1]))return!1;n+=3}else{if(240!=(248&e[n]))return!1;if(n+3>=t||128!=(192&e[n+1])||128!=(192&e[n+2])||128!=(192&e[n+3])||240===e[n]&&128==(240&e[n+1])||244===e[n]&&e[n+1]>143||e[n]>244)return!1;n+=4}else n++;return!0}if(wK.exports={isValidStatusCode:function(e){return e>=1e3&&e<=1014&&1004!==e&&1005!==e&&1006!==e||e>=3e3&&e<=4999},isValidUTF8:SK,tokenChars:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0]},EK)wK.exports.isValidUTF8=function(e){return e.length<24?SK(e):EK(e)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{const e=function(){if(_K)return xK.exports;_K=1;try{xK.exports=KV()(__dirname)}catch(e){xK.exports=(bK||(bK=1,vK=function(e){const t=e.length;let n=0;for(;n<t;)if(128&e[n])if(192==(224&e[n])){if(n+1===t||128!=(192&e[n+1])||192==(254&e[n]))return!1;n+=2}else if(224==(240&e[n])){if(n+2>=t||128!=(192&e[n+1])||128!=(192&e[n+2])||224===e[n]&&128==(224&e[n+1])||237===e[n]&&160==(224&e[n+1]))return!1;n+=3}else{if(240!=(248&e[n]))return!1;if(n+3>=t||128!=(192&e[n+1])||128!=(192&e[n+2])||128!=(192&e[n+3])||240===e[n]&&128==(240&e[n+1])||244===e[n]&&e[n+1]>143||e[n]>244)return!1;n+=4}else n++;return!0}),vK)}return xK.exports}();wK.exports.isValidUTF8=function(t){return t.length<32?SK(t):e(t)}}catch(e){}var TK=wK.exports;const{Writable:DK}=h,kK=fK,{BINARY_TYPES:AK,EMPTY_BUFFER:CK,kStatusCode:RK,kWebSocket:OK}=WV,{concat:LK,toArrayBuffer:IK,unmask:PK}=XV,{isValidStatusCode:NK,isValidUTF8:jK}=TK,FK=Buffer[Symbol.species];var BK=class extends DK{constructor(e={}){super(),this._allowSynchronousEvents=void 0===e.allowSynchronousEvents||e.allowSynchronousEvents,this._binaryType=e.binaryType||AK[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=0|e.maxPayload,this._skipUTF8Validation=!!e.skipUTF8Validation,this[OK]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=0}_write(e,t,n){if(8===this._opcode&&0==this._state)return n();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(n)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){const t=this._buffers[0];return this._buffers[0]=new FK(t.buffer,t.byteOffset+e,t.length-e),new FK(t.buffer,t.byteOffset,e)}const t=Buffer.allocUnsafe(e);do{const n=this._buffers[0],r=t.length-e;e>=n.length?t.set(this._buffers.shift(),r):(t.set(new Uint8Array(n.buffer,n.byteOffset,e),r),this._buffers[0]=new FK(n.buffer,n.byteOffset+e,n.length-e)),e-=n.length}while(e>0);return t}startLoop(e){this._loop=!0;do{switch(this._state){case 0:this.getInfo(e);break;case 1:this.getPayloadLength16(e);break;case 2:this.getPayloadLength64(e);break;case 3:this.getMask();break;case 4:this.getData(e);break;case 5:case 6:return void(this._loop=!1)}}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2)return void(this._loop=!1);const t=this.consume(2);if(48&t[0]){return void e(this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3"))}const n=!(64&~t[0]);if(!n||this._extensions[kK.extensionName]){if(this._fin=!(128&~t[0]),this._opcode=15&t[0],this._payloadLength=127&t[1],0===this._opcode){if(n){return void e(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"))}if(!this._fragmented){return void e(this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE"))}this._opcode=this._fragmented}else if(1===this._opcode||2===this._opcode){if(this._fragmented){return void e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"))}this._compressed=n}else{if(!(this._opcode>7&&this._opcode<11)){return void e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"))}if(!this._fin){return void e(this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN"))}if(n){return void e(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"))}if(this._payloadLength>125||8===this._opcode&&1===this._payloadLength){return void e(this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH"))}}if(this._fin||this._fragmented||(this._fragmented=this._opcode),this._masked=!(128&~t[1]),this._isServer){if(!this._masked){return void e(this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK"))}}else if(this._masked){return void e(this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK"))}126===this._payloadLength?this._state=1:127===this._payloadLength?this._state=2:this.haveLength(e)}else{e(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"))}}getPayloadLength16(e){this._bufferedBytes<2?this._loop=!1:(this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e))}getPayloadLength64(e){if(this._bufferedBytes<8)return void(this._loop=!1);const t=this.consume(8),n=t.readUInt32BE(0);if(n>Math.pow(2,21)-1){e(this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH"))}else this._payloadLength=n*Math.pow(2,32)+t.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){e(this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"))}else this._masked?this._state=3:this._state=4}getMask(){this._bufferedBytes<4?this._loop=!1:(this._mask=this.consume(4),this._state=4)}getData(e){let t=CK;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength)return void(this._loop=!1);t=this.consume(this._payloadLength),this._masked&&this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3]&&PK(t,this._mask)}if(this._opcode>7)this.controlMessage(t,e);else{if(this._compressed)return this._state=5,void this.decompress(t,e);t.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(t)),this.dataMessage(e)}}decompress(e,t){this._extensions[kK.extensionName].decompress(e,this._fin,((e,n)=>{if(e)return t(e);if(n.length){if(this._messageLength+=n.length,this._messageLength>this._maxPayload&&this._maxPayload>0){const e=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");return void t(e)}this._fragments.push(n)}this.dataMessage(t),0===this._state&&this.startLoop(t)}))}dataMessage(e){if(!this._fin)return void(this._state=0);const t=this._messageLength,n=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],2===this._opcode){let r;r="nodebuffer"===this._binaryType?LK(n,t):"arraybuffer"===this._binaryType?IK(LK(n,t)):n,this._allowSynchronousEvents?(this.emit("message",r,!0),this._state=0):(this._state=6,setImmediate((()=>{this.emit("message",r,!0),this._state=0,this.startLoop(e)})))}else{const r=LK(n,t);if(!this._skipUTF8Validation&&!jK(r)){const t=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");return void e(t)}5===this._state||this._allowSynchronousEvents?(this.emit("message",r,!1),this._state=0):(this._state=6,setImmediate((()=>{this.emit("message",r,!1),this._state=0,this.startLoop(e)})))}}controlMessage(e,t){if(8!==this._opcode)this._allowSynchronousEvents?(this.emit(9===this._opcode?"ping":"pong",e),this._state=0):(this._state=6,setImmediate((()=>{this.emit(9===this._opcode?"ping":"pong",e),this._state=0,this.startLoop(t)})));else{if(0===e.length)this._loop=!1,this.emit("conclude",1005,CK),this.end();else{const n=e.readUInt16BE(0);if(!NK(n)){const e=this.createError(RangeError,`invalid status code ${n}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");return void t(e)}const r=new FK(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!jK(r)){const e=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");return void t(e)}this._loop=!1,this.emit("conclude",n,r),this.end()}this._state=0}}createError(e,t,n,r,i){this._loop=!1,this._errored=!0;const s=new e(n?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(s,this.createError),s.code=i,s[RK]=r,s}};const{randomFillSync:MK}=w,UK=fK,{EMPTY_BUFFER:qK}=WV,{isValidStatusCode:HK}=TK,{mask:$K,toBuffer:zK}=XV,WK=Symbol("kByteLength"),GK=Buffer.alloc(4),VK=8192;let KK,YK=VK;var ZK=class e{constructor(e,t,n){this._extensions=t||{},n&&(this._generateMask=n,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(e,t){let n,r,i=!1,s=2,o=!1;t.mask&&(n=t.maskBuffer||GK,t.generateMask?t.generateMask(n):(YK===VK&&(void 0===KK&&(KK=Buffer.alloc(VK)),MK(KK,0,VK),YK=0),n[0]=KK[YK++],n[1]=KK[YK++],n[2]=KK[YK++],n[3]=KK[YK++]),o=!(n[0]|n[1]|n[2]|n[3]),s=6),"string"==typeof e?r=t.mask&&!o||void 0===t[WK]?(e=Buffer.from(e)).length:t[WK]:(r=e.length,i=t.mask&&t.readOnly&&!o);let a=r;r>=65536?(s+=8,a=127):r>125&&(s+=2,a=126);const c=Buffer.allocUnsafe(i?r+s:s);return c[0]=t.fin?128|t.opcode:t.opcode,t.rsv1&&(c[0]|=64),c[1]=a,126===a?c.writeUInt16BE(r,2):127===a&&(c[2]=c[3]=0,c.writeUIntBE(r,4,6)),t.mask?(c[1]|=128,c[s-4]=n[0],c[s-3]=n[1],c[s-2]=n[2],c[s-1]=n[3],o?[c,e]:i?($K(e,n,c,s,r),[c]):($K(e,n,e,0,r),[c,e])):[c,e]}close(t,n,r,i){let s;if(void 0===t)s=qK;else{if("number"!=typeof t||!HK(t))throw new TypeError("First argument must be a valid error code number");if(void 0!==n&&n.length){const e=Buffer.byteLength(n);if(e>123)throw new RangeError("The message must not be greater than 123 bytes");s=Buffer.allocUnsafe(2+e),s.writeUInt16BE(t,0),"string"==typeof n?s.write(n,2):s.set(n,2)}else s=Buffer.allocUnsafe(2),s.writeUInt16BE(t,0)}const o={[WK]:s.length,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._deflating?this.enqueue([this.dispatch,s,!1,o,i]):this.sendFrame(e.frame(s,o),i)}ping(t,n,r){let i,s;if("string"==typeof t?(i=Buffer.byteLength(t),s=!1):(i=(t=zK(t)).length,s=zK.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");const o={[WK]:i,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:9,readOnly:s,rsv1:!1};this._deflating?this.enqueue([this.dispatch,t,!1,o,r]):this.sendFrame(e.frame(t,o),r)}pong(t,n,r){let i,s;if("string"==typeof t?(i=Buffer.byteLength(t),s=!1):(i=(t=zK(t)).length,s=zK.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");const o={[WK]:i,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:10,readOnly:s,rsv1:!1};this._deflating?this.enqueue([this.dispatch,t,!1,o,r]):this.sendFrame(e.frame(t,o),r)}send(t,n,r){const i=this._extensions[UK.extensionName];let s,o,a=n.binary?2:1,c=n.compress;if("string"==typeof t?(s=Buffer.byteLength(t),o=!1):(s=(t=zK(t)).length,o=zK.readOnly),this._firstFragment?(this._firstFragment=!1,c&&i&&i.params[i._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(c=s>=i._threshold),this._compress=c):(c=!1,a=0),n.fin&&(this._firstFragment=!0),i){const e={[WK]:s,fin:n.fin,generateMask:this._generateMask,mask:n.mask,maskBuffer:this._maskBuffer,opcode:a,readOnly:o,rsv1:c};this._deflating?this.enqueue([this.dispatch,t,this._compress,e,r]):this.dispatch(t,this._compress,e,r)}else this.sendFrame(e.frame(t,{[WK]:s,fin:n.fin,generateMask:this._generateMask,mask:n.mask,maskBuffer:this._maskBuffer,opcode:a,readOnly:o,rsv1:!1}),r)}dispatch(t,n,r,i){if(!n)return void this.sendFrame(e.frame(t,r),i);const s=this._extensions[UK.extensionName];this._bufferedBytes+=r[WK],this._deflating=!0,s.compress(t,r.fin,((t,n)=>{if(this._socket.destroyed){const e=new Error("The socket was closed while data was being compressed");"function"==typeof i&&i(e);for(let t=0;t<this._queue.length;t++){const n=this._queue[t],r=n[n.length-1];"function"==typeof r&&r(e)}}else this._bufferedBytes-=r[WK],this._deflating=!1,r.readOnly=!1,this.sendFrame(e.frame(n,r),i),this.dequeue()}))}dequeue(){for(;!this._deflating&&this._queue.length;){const e=this._queue.shift();this._bufferedBytes-=e[3][WK],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][WK],this._queue.push(e)}sendFrame(e,t){2===e.length?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],t),this._socket.uncork()):this._socket.write(e[0],t)}};const{kForOnEventAttribute:QK,kListener:JK}=WV,XK=Symbol("kCode"),eY=Symbol("kData"),tY=Symbol("kError"),nY=Symbol("kMessage"),rY=Symbol("kReason"),iY=Symbol("kTarget"),sY=Symbol("kType"),oY=Symbol("kWasClean");class aY{constructor(e){this[iY]=null,this[sY]=e}get target(){return this[iY]}get type(){return this[sY]}}Object.defineProperty(aY.prototype,"target",{enumerable:!0}),Object.defineProperty(aY.prototype,"type",{enumerable:!0});class cY extends aY{constructor(e,t={}){super(e),this[XK]=void 0===t.code?0:t.code,this[rY]=void 0===t.reason?"":t.reason,this[oY]=void 0!==t.wasClean&&t.wasClean}get code(){return this[XK]}get reason(){return this[rY]}get wasClean(){return this[oY]}}Object.defineProperty(cY.prototype,"code",{enumerable:!0}),Object.defineProperty(cY.prototype,"reason",{enumerable:!0}),Object.defineProperty(cY.prototype,"wasClean",{enumerable:!0});class lY extends aY{constructor(e,t={}){super(e),this[tY]=void 0===t.error?null:t.error,this[nY]=void 0===t.message?"":t.message}get error(){return this[tY]}get message(){return this[nY]}}Object.defineProperty(lY.prototype,"error",{enumerable:!0}),Object.defineProperty(lY.prototype,"message",{enumerable:!0});class uY extends aY{constructor(e,t={}){super(e),this[eY]=void 0===t.data?null:t.data}get data(){return this[eY]}}Object.defineProperty(uY.prototype,"data",{enumerable:!0});const pY={addEventListener(e,t,n={}){for(const r of this.listeners(e))if(!n[QK]&&r[JK]===t&&!r[QK])return;let r;if("message"===e)r=function(e,n){const r=new uY("message",{data:n?e:e.toString()});r[iY]=this,dY(t,this,r)};else if("close"===e)r=function(e,n){const r=new cY("close",{code:e,reason:n.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[iY]=this,dY(t,this,r)};else if("error"===e)r=function(e){const n=new lY("error",{error:e,message:e.message});n[iY]=this,dY(t,this,n)};else{if("open"!==e)return;r=function(){const e=new aY("open");e[iY]=this,dY(t,this,e)}}r[QK]=!!n[QK],r[JK]=t,n.once?this.once(e,r):this.on(e,r)},removeEventListener(e,t){for(const n of this.listeners(e))if(n[JK]===t&&!n[QK]){this.removeListener(e,n);break}}};var hY={CloseEvent:cY,ErrorEvent:lY,Event:aY,EventTarget:pY,MessageEvent:uY};function dY(e,t,n){"object"==typeof e&&e.handleEvent?e.handleEvent.call(e,n):e.call(t,n)}const{tokenChars:fY}=TK;function mY(e,t,n){void 0===e[t]?e[t]=[n]:e[t].push(n)}var gY={format:function(e){return Object.keys(e).map((t=>{let n=e[t];return Array.isArray(n)||(n=[n]),n.map((e=>[t].concat(Object.keys(e).map((t=>{let n=e[t];return Array.isArray(n)||(n=[n]),n.map((e=>!0===e?t:`${t}=${e}`)).join("; ")}))).join("; "))).join(", ")})).join(", ")},parse:function(e){const t=Object.create(null);let n,r,i=Object.create(null),s=!1,o=!1,a=!1,c=-1,l=-1,u=-1,p=0;for(;p<e.length;p++)if(l=e.charCodeAt(p),void 0===n)if(-1===u&&1===fY[l])-1===c&&(c=p);else if(0===p||32!==l&&9!==l){if(59!==l&&44!==l)throw new SyntaxError(`Unexpected character at index ${p}`);{if(-1===c)throw new SyntaxError(`Unexpected character at index ${p}`);-1===u&&(u=p);const r=e.slice(c,u);44===l?(mY(t,r,i),i=Object.create(null)):n=r,c=u=-1}}else-1===u&&-1!==c&&(u=p);else if(void 0===r)if(-1===u&&1===fY[l])-1===c&&(c=p);else if(32===l||9===l)-1===u&&-1!==c&&(u=p);else if(59===l||44===l){if(-1===c)throw new SyntaxError(`Unexpected character at index ${p}`);-1===u&&(u=p),mY(i,e.slice(c,u),!0),44===l&&(mY(t,n,i),i=Object.create(null),n=void 0),c=u=-1}else{if(61!==l||-1===c||-1!==u)throw new SyntaxError(`Unexpected character at index ${p}`);r=e.slice(c,p),c=u=-1}else if(o){if(1!==fY[l])throw new SyntaxError(`Unexpected character at index ${p}`);-1===c?c=p:s||(s=!0),o=!1}else if(a)if(1===fY[l])-1===c&&(c=p);else if(34===l&&-1!==c)a=!1,u=p;else{if(92!==l)throw new SyntaxError(`Unexpected character at index ${p}`);o=!0}else if(34===l&&61===e.charCodeAt(p-1))a=!0;else if(-1===u&&1===fY[l])-1===c&&(c=p);else if(-1===c||32!==l&&9!==l){if(59!==l&&44!==l)throw new SyntaxError(`Unexpected character at index ${p}`);{if(-1===c)throw new SyntaxError(`Unexpected character at index ${p}`);-1===u&&(u=p);let o=e.slice(c,u);s&&(o=o.replace(/\\/g,""),s=!1),mY(i,r,o),44===l&&(mY(t,n,i),i=Object.create(null),n=void 0),r=void 0,c=u=-1}}else-1===u&&(u=p);if(-1===c||a||32===l||9===l)throw new SyntaxError("Unexpected end of input");-1===u&&(u=p);const h=e.slice(c,u);return void 0===n?mY(t,h,i):(void 0===r?mY(i,h,!0):mY(i,r,s?h.replace(/\\/g,""):h),mY(t,n,i)),t}};const yY=p,vY=E,bY=x,_Y=O,wY=N,{randomBytes:xY,createHash:EY}=w,{URL:SY}=S,TY=fK,DY=BK,kY=ZK,{BINARY_TYPES:AY,EMPTY_BUFFER:CY,GUID:RY,kForOnEventAttribute:OY,kListener:LY,kStatusCode:IY,kWebSocket:PY,NOOP:NY}=WV,{EventTarget:{addEventListener:jY,removeEventListener:FY}}=hY,{format:BY,parse:MY}=gY,{toBuffer:UY}=XV,qY=Symbol("kAborted"),HY=[8,13],$Y=["CONNECTING","OPEN","CLOSING","CLOSED"],zY=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;let WY=class e extends yY{constructor(t,n,r){super(),this._binaryType=AY[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=CY,this._closeTimer=null,this._extensions={},this._paused=!1,this._protocol="",this._readyState=e.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,null!==t?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,void 0===n?n=[]:Array.isArray(n)||("object"==typeof n&&null!==n?(r=n,n=[]):n=[n]),VY(this,t,n,r)):(this._autoPong=r.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){AY.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(t,n,r){const i=new DY({allowSynchronousEvents:r.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:r.maxPayload,skipUTF8Validation:r.skipUTF8Validation});this._sender=new kY(t,this._extensions,r.generateMask),this._receiver=i,this._socket=t,i[PY]=this,t[PY]=this,i.on("conclude",XY),i.on("drain",eZ),i.on("error",tZ),i.on("message",rZ),i.on("ping",iZ),i.on("pong",sZ),t.setTimeout&&t.setTimeout(0),t.setNoDelay&&t.setNoDelay(),n.length>0&&t.unshift(n),t.on("close",aZ),t.on("data",cZ),t.on("end",lZ),t.on("error",uZ),this._readyState=e.OPEN,this.emit("open")}emitClose(){if(!this._socket)return this._readyState=e.CLOSED,void this.emit("close",this._closeCode,this._closeMessage);this._extensions[TY.extensionName]&&this._extensions[TY.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=e.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(t,n){if(this.readyState!==e.CLOSED)if(this.readyState!==e.CONNECTING)this.readyState!==e.CLOSING?(this._readyState=e.CLOSING,this._sender.close(t,n,!this._isServer,(e=>{e||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())})),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),3e4)):this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();else{const e="WebSocket was closed before the connection was established";QY(this,this._req,e)}}pause(){this.readyState!==e.CONNECTING&&this.readyState!==e.CLOSED&&(this._paused=!0,this._socket.pause())}ping(t,n,r){if(this.readyState===e.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");"function"==typeof t?(r=t,t=n=void 0):"function"==typeof n&&(r=n,n=void 0),"number"==typeof t&&(t=t.toString()),this.readyState===e.OPEN?(void 0===n&&(n=!this._isServer),this._sender.ping(t||CY,n,r)):JY(this,t,r)}pong(t,n,r){if(this.readyState===e.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");"function"==typeof t?(r=t,t=n=void 0):"function"==typeof n&&(r=n,n=void 0),"number"==typeof t&&(t=t.toString()),this.readyState===e.OPEN?(void 0===n&&(n=!this._isServer),this._sender.pong(t||CY,n,r)):JY(this,t,r)}resume(){this.readyState!==e.CONNECTING&&this.readyState!==e.CLOSED&&(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(t,n,r){if(this.readyState===e.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if("function"==typeof n&&(r=n,n={}),"number"==typeof t&&(t=t.toString()),this.readyState!==e.OPEN)return void JY(this,t,r);const i={binary:"string"!=typeof t,mask:!this._isServer,compress:!0,fin:!0,...n};this._extensions[TY.extensionName]||(i.compress=!1),this._sender.send(t||CY,i,r)}terminate(){if(this.readyState!==e.CLOSED)if(this.readyState!==e.CONNECTING)this._socket&&(this._readyState=e.CLOSING,this._socket.destroy());else{const e="WebSocket was closed before the connection was established";QY(this,this._req,e)}}};Object.defineProperty(WY,"CONNECTING",{enumerable:!0,value:$Y.indexOf("CONNECTING")}),Object.defineProperty(WY.prototype,"CONNECTING",{enumerable:!0,value:$Y.indexOf("CONNECTING")}),Object.defineProperty(WY,"OPEN",{enumerable:!0,value:$Y.indexOf("OPEN")}),Object.defineProperty(WY.prototype,"OPEN",{enumerable:!0,value:$Y.indexOf("OPEN")}),Object.defineProperty(WY,"CLOSING",{enumerable:!0,value:$Y.indexOf("CLOSING")}),Object.defineProperty(WY.prototype,"CLOSING",{enumerable:!0,value:$Y.indexOf("CLOSING")}),Object.defineProperty(WY,"CLOSED",{enumerable:!0,value:$Y.indexOf("CLOSED")}),Object.defineProperty(WY.prototype,"CLOSED",{enumerable:!0,value:$Y.indexOf("CLOSED")}),["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach((e=>{Object.defineProperty(WY.prototype,e,{enumerable:!0})})),["open","error","close","message"].forEach((e=>{Object.defineProperty(WY.prototype,`on${e}`,{enumerable:!0,get(){for(const t of this.listeners(e))if(t[OY])return t[LY];return null},set(t){for(const t of this.listeners(e))if(t[OY]){this.removeListener(e,t);break}"function"==typeof t&&this.addEventListener(e,t,{[OY]:!0})}})})),WY.prototype.addEventListener=jY,WY.prototype.removeEventListener=FY;var GY=WY;function VY(e,t,n,r){const i={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:HY[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(e._autoPong=i.autoPong,!HY.includes(i.protocolVersion))throw new RangeError(`Unsupported protocol version: ${i.protocolVersion} (supported versions: ${HY.join(", ")})`);let s;if(t instanceof SY)s=t;else try{s=new SY(t)}catch(e){throw new SyntaxError(`Invalid URL: ${t}`)}"http:"===s.protocol?s.protocol="ws:":"https:"===s.protocol&&(s.protocol="wss:"),e._url=s.href;const o="wss:"===s.protocol,a="ws+unix:"===s.protocol;let c;if("ws:"===s.protocol||o||a?a&&!s.pathname?c="The URL's pathname is empty":s.hash&&(c="The URL contains a fragment identifier"):c='The URL\'s protocol must be one of "ws:", "wss:", "http:", "https", or "ws+unix:"',c){const t=new SyntaxError(c);if(0===e._redirects)throw t;return void KY(e,t)}const l=o?443:80,u=xY(16).toString("base64"),p=o?vY.request:bY.request,h=new Set;let d,f;if(i.createConnection=i.createConnection||(o?ZY:YY),i.defaultPort=i.defaultPort||l,i.port=s.port||l,i.host=s.hostname.startsWith("[")?s.hostname.slice(1,-1):s.hostname,i.headers={...i.headers,"Sec-WebSocket-Version":i.protocolVersion,"Sec-WebSocket-Key":u,Connection:"Upgrade",Upgrade:"websocket"},i.path=s.pathname+s.search,i.timeout=i.handshakeTimeout,i.perMessageDeflate&&(d=new TY(!0!==i.perMessageDeflate?i.perMessageDeflate:{},!1,i.maxPayload),i.headers["Sec-WebSocket-Extensions"]=BY({[TY.extensionName]:d.offer()})),n.length){for(const e of n){if("string"!=typeof e||!zY.test(e)||h.has(e))throw new SyntaxError("An invalid or duplicated subprotocol was specified");h.add(e)}i.headers["Sec-WebSocket-Protocol"]=n.join(",")}if(i.origin&&(i.protocolVersion<13?i.headers["Sec-WebSocket-Origin"]=i.origin:i.headers.Origin=i.origin),(s.username||s.password)&&(i.auth=`${s.username}:${s.password}`),a){const e=i.path.split(":");i.socketPath=e[0],i.path=e[1]}if(i.followRedirects){if(0===e._redirects){e._originalIpc=a,e._originalSecure=o,e._originalHostOrSocketPath=a?i.socketPath:s.host;const t=r&&r.headers;if(r={...r,headers:{}},t)for(const[e,n]of Object.entries(t))r.headers[e.toLowerCase()]=n}else if(0===e.listenerCount("redirect")){const t=a?!!e._originalIpc&&i.socketPath===e._originalHostOrSocketPath:!e._originalIpc&&s.host===e._originalHostOrSocketPath;(!t||e._originalSecure&&!o)&&(delete i.headers.authorization,delete i.headers.cookie,t||delete i.headers.host,i.auth=void 0)}i.auth&&!r.headers.authorization&&(r.headers.authorization="Basic "+Buffer.from(i.auth).toString("base64")),f=e._req=p(i),e._redirects&&e.emit("redirect",e.url,f)}else f=e._req=p(i);i.timeout&&f.on("timeout",(()=>{QY(e,f,"Opening handshake has timed out")})),f.on("error",(t=>{null===f||f[qY]||(f=e._req=null,KY(e,t))})),f.on("response",(s=>{const o=s.headers.location,a=s.statusCode;if(o&&i.followRedirects&&a>=300&&a<400){if(++e._redirects>i.maxRedirects)return void QY(e,f,"Maximum redirects exceeded");let s;f.abort();try{s=new SY(o,t)}catch(t){const n=new SyntaxError(`Invalid URL: ${o}`);return void KY(e,n)}VY(e,s,n,r)}else e.emit("unexpected-response",f,s)||QY(e,f,`Unexpected server response: ${s.statusCode}`)})),f.on("upgrade",((t,n,r)=>{if(e.emit("upgrade",t),e.readyState!==WY.CONNECTING)return;f=e._req=null;const s=t.headers.upgrade;if(void 0===s||"websocket"!==s.toLowerCase())return void QY(e,n,"Invalid Upgrade header");const o=EY("sha1").update(u+RY).digest("base64");if(t.headers["sec-websocket-accept"]!==o)return void QY(e,n,"Invalid Sec-WebSocket-Accept header");const a=t.headers["sec-websocket-protocol"];let c;if(void 0!==a?h.size?h.has(a)||(c="Server sent an invalid subprotocol"):c="Server sent a subprotocol but none was requested":h.size&&(c="Server sent no subprotocol"),c)return void QY(e,n,c);a&&(e._protocol=a);const l=t.headers["sec-websocket-extensions"];if(void 0!==l){if(!d){return void QY(e,n,"Server sent a Sec-WebSocket-Extensions header but no extension was requested")}let t;try{t=MY(l)}catch(t){return void QY(e,n,"Invalid Sec-WebSocket-Extensions header")}const r=Object.keys(t);if(1!==r.length||r[0]!==TY.extensionName){return void QY(e,n,"Server indicated an extension that was not requested")}try{d.accept(t[TY.extensionName])}catch(t){return void QY(e,n,"Invalid Sec-WebSocket-Extensions header")}e._extensions[TY.extensionName]=d}e.setSocket(n,r,{allowSynchronousEvents:i.allowSynchronousEvents,generateMask:i.generateMask,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation})})),i.finishRequest?i.finishRequest(f,e):f.end()}function KY(e,t){e._readyState=WY.CLOSING,e.emit("error",t),e.emitClose()}function YY(e){return e.path=e.socketPath,_Y.connect(e)}function ZY(e){return e.path=void 0,e.servername||""===e.servername||(e.servername=_Y.isIP(e.host)?"":e.host),wY.connect(e)}function QY(e,t,n){e._readyState=WY.CLOSING;const r=new Error(n);Error.captureStackTrace(r,QY),t.setHeader?(t[qY]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick(KY,e,r)):(t.destroy(r),t.once("error",e.emit.bind(e,"error")),t.once("close",e.emitClose.bind(e)))}function JY(e,t,n){if(t){const n=UY(t).length;e._socket?e._sender._bufferedBytes+=n:e._bufferedAmount+=n}if(n){const t=new Error(`WebSocket is not open: readyState ${e.readyState} (${$Y[e.readyState]})`);process.nextTick(n,t)}}function XY(e,t){const n=this[PY];n._closeFrameReceived=!0,n._closeMessage=t,n._closeCode=e,void 0!==n._socket[PY]&&(n._socket.removeListener("data",cZ),process.nextTick(oZ,n._socket),1005===e?n.close():n.close(e,t))}function eZ(){const e=this[PY];e.isPaused||e._socket.resume()}function tZ(e){const t=this[PY];void 0!==t._socket[PY]&&(t._socket.removeListener("data",cZ),process.nextTick(oZ,t._socket),t.close(e[IY])),t.emit("error",e)}function nZ(){this[PY].emitClose()}function rZ(e,t){this[PY].emit("message",e,t)}function iZ(e){const t=this[PY];t._autoPong&&t.pong(e,!this._isServer,NY),t.emit("ping",e)}function sZ(e){this[PY].emit("pong",e)}function oZ(e){e.resume()}function aZ(){const e=this[PY];let t;this.removeListener("close",aZ),this.removeListener("data",cZ),this.removeListener("end",lZ),e._readyState=WY.CLOSING,this._readableState.endEmitted||e._closeFrameReceived||e._receiver._writableState.errorEmitted||null===(t=e._socket.read())||e._receiver.write(t),e._receiver.end(),this[PY]=void 0,clearTimeout(e._closeTimer),e._receiver._writableState.finished||e._receiver._writableState.errorEmitted?e.emitClose():(e._receiver.on("error",nZ),e._receiver.on("finish",nZ))}function cZ(e){this[PY]._receiver.write(e)||this.pause()}function lZ(){const e=this[PY];e._readyState=WY.CLOSING,e._receiver.end(),this.end()}function uZ(){const e=this[PY];this.removeListener("error",uZ),this.on("error",NY),e&&(e._readyState=WY.CLOSING,this.destroy())}var pZ=q(GY);const{Duplex:hZ}=h;function dZ(e){e.emit("close")}function fZ(){!this.destroyed&&this._writableState.finished&&this.destroy()}function mZ(e){this.removeListener("error",mZ),this.destroy(),0===this.listenerCount("error")&&this.emit("error",e)}var gZ=function(e,t){let n=!0;const r=new hZ({...t,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return e.on("message",(function(t,n){const i=!n&&r._readableState.objectMode?t.toString():t;r.push(i)||e.pause()})),e.once("error",(function(e){r.destroyed||(n=!1,r.destroy(e))})),e.once("close",(function(){r.destroyed||r.push(null)})),r._destroy=function(t,i){if(e.readyState===e.CLOSED)return i(t),void process.nextTick(dZ,r);let s=!1;e.once("error",(function(e){s=!0,i(e)})),e.once("close",(function(){s||i(t),process.nextTick(dZ,r)})),n&&e.terminate()},r._final=function(t){e.readyState!==e.CONNECTING?null!==e._socket&&(e._socket._writableState.finished?(t(),r._readableState.endEmitted&&r.destroy()):(e._socket.once("finish",(function(){t()})),e.close())):e.once("open",(function(){r._final(t)}))},r._read=function(){e.isPaused&&e.resume()},r._write=function(t,n,i){e.readyState!==e.CONNECTING?e.send(t,i):e.once("open",(function(){r._write(t,n,i)}))},r.on("end",fZ),r.on("error",mZ),r};const{tokenChars:yZ}=TK;var vZ={parse:function(e){const t=new Set;let n=-1,r=-1,i=0;for(;i<e.length;i++){const s=e.charCodeAt(i);if(-1===r&&1===yZ[s])-1===n&&(n=i);else if(0===i||32!==s&&9!==s){if(44!==s)throw new SyntaxError(`Unexpected character at index ${i}`);{if(-1===n)throw new SyntaxError(`Unexpected character at index ${i}`);-1===r&&(r=i);const s=e.slice(n,r);if(t.has(s))throw new SyntaxError(`The "${s}" subprotocol is duplicated`);t.add(s),n=r=-1}}else-1===r&&-1!==n&&(r=i)}if(-1===n||-1!==r)throw new SyntaxError("Unexpected end of input");const s=e.slice(n,i);if(t.has(s))throw new SyntaxError(`The "${s}" subprotocol is duplicated`);return t.add(s),t}};const bZ=p,_Z=x,{createHash:wZ}=w,xZ=gY,EZ=fK,SZ=vZ,TZ=GY,{GUID:DZ,kWebSocket:kZ}=WV,AZ=/^[+/0-9A-Za-z]{22}==$/;var CZ=class extends bZ{constructor(e,t){if(super(),null==(e={allowSynchronousEvents:!0,autoPong:!0,maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:TZ,...e}).port&&!e.server&&!e.noServer||null!=e.port&&(e.server||e.noServer)||e.server&&e.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(null!=e.port?(this._server=_Z.createServer(((e,t)=>{const n=_Z.STATUS_CODES[426];t.writeHead(426,{"Content-Length":n.length,"Content-Type":"text/plain"}),t.end(n)})),this._server.listen(e.port,e.host,e.backlog,t)):e.server&&(this._server=e.server),this._server){const e=this.emit.bind(this,"connection");this._removeListeners=function(e,t){for(const n of Object.keys(t))e.on(n,t[n]);return function(){for(const n of Object.keys(t))e.removeListener(n,t[n])}}(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(t,n,r)=>{this.handleUpgrade(t,n,r,e)}})}!0===e.perMessageDeflate&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=0}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(2===this._state)return e&&this.once("close",(()=>{e(new Error("The server is not running"))})),void process.nextTick(RZ,this);if(e&&this.once("close",e),1!==this._state)if(this._state=1,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients&&this.clients.size?this._shouldEmitClose=!0:process.nextTick(RZ,this);else{const e=this._server;this._removeListeners(),this._removeListeners=this._server=null,e.close((()=>{RZ(this)}))}}shouldHandle(e){if(this.options.path){const t=e.url.indexOf("?");if((-1!==t?e.url.slice(0,t):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,t,n,r){t.on("error",OZ);const i=e.headers["sec-websocket-key"],s=e.headers.upgrade,o=+e.headers["sec-websocket-version"];if("GET"!==e.method){return void IZ(this,e,t,405,"Invalid HTTP method")}if(void 0===s||"websocket"!==s.toLowerCase()){return void IZ(this,e,t,400,"Invalid Upgrade header")}if(void 0===i||!AZ.test(i)){return void IZ(this,e,t,400,"Missing or invalid Sec-WebSocket-Key header")}if(8!==o&&13!==o){return void IZ(this,e,t,400,"Missing or invalid Sec-WebSocket-Version header")}if(!this.shouldHandle(e))return void LZ(t,400);const a=e.headers["sec-websocket-protocol"];let c=new Set;if(void 0!==a)try{c=SZ.parse(a)}catch(n){return void IZ(this,e,t,400,"Invalid Sec-WebSocket-Protocol header")}const l=e.headers["sec-websocket-extensions"],u={};if(this.options.perMessageDeflate&&void 0!==l){const n=new EZ(this.options.perMessageDeflate,!0,this.options.maxPayload);try{const e=xZ.parse(l);e[EZ.extensionName]&&(n.accept(e[EZ.extensionName]),u[EZ.extensionName]=n)}catch(n){return void IZ(this,e,t,400,"Invalid or unacceptable Sec-WebSocket-Extensions header")}}if(this.options.verifyClient){const s={origin:e.headers[""+(8===o?"sec-websocket-origin":"origin")],secure:!(!e.socket.authorized&&!e.socket.encrypted),req:e};if(2===this.options.verifyClient.length)return void this.options.verifyClient(s,((s,o,a,l)=>{if(!s)return LZ(t,o||401,a,l);this.completeUpgrade(u,i,c,e,t,n,r)}));if(!this.options.verifyClient(s))return LZ(t,401)}this.completeUpgrade(u,i,c,e,t,n,r)}completeUpgrade(e,t,n,r,i,s,o){if(!i.readable||!i.writable)return i.destroy();if(i[kZ])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>0)return LZ(i,503);const a=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${wZ("sha1").update(t+DZ).digest("base64")}`],c=new this.options.WebSocket(null,void 0,this.options);if(n.size){const e=this.options.handleProtocols?this.options.handleProtocols(n,r):n.values().next().value;e&&(a.push(`Sec-WebSocket-Protocol: ${e}`),c._protocol=e)}if(e[EZ.extensionName]){const t=e[EZ.extensionName].params,n=xZ.format({[EZ.extensionName]:[t]});a.push(`Sec-WebSocket-Extensions: ${n}`),c._extensions=e}this.emit("headers",a,r),i.write(a.concat("\r\n").join("\r\n")),i.removeListener("error",OZ),c.setSocket(i,s,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(c),c.on("close",(()=>{this.clients.delete(c),this._shouldEmitClose&&!this.clients.size&&process.nextTick(RZ,this)}))),o(c,r)}};function RZ(e){e._state=2,e.emit("close")}function OZ(){this.destroy()}function LZ(e,t,n,r){n=n||_Z.STATUS_CODES[t],r={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(n),...r},e.once("finish",e.destroy),e.end(`HTTP/1.1 ${t} ${_Z.STATUS_CODES[t]}\r\n`+Object.keys(r).map((e=>`${e}: ${r[e]}`)).join("\r\n")+"\r\n\r\n"+n)}function IZ(e,t,n,r,i){if(e.listenerCount("wsClientError")){const r=new Error(i);Error.captureStackTrace(r,IZ),e.emit("wsClientError",r,n,t)}else LZ(n,r,i)}const PZ=GY;PZ.createWebSocketStream=gZ,PZ.Server=CZ,PZ.Receiver=BK,PZ.Sender=ZK,PZ.WebSocket=PZ,PZ.WebSocketServer=PZ.Server;var NZ=PZ,jZ={exports:{}},FZ=Object.getOwnPropertySymbols,BZ=Object.prototype.hasOwnProperty,MZ=Object.prototype.propertyIsEnumerable;var UZ=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,r,i=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;s<arguments.length;s++){for(var o in n=Object(arguments[s]))BZ.call(n,o)&&(i[o]=n[o]);if(FZ){r=FZ(n);for(var a=0;a<r.length;a++)MZ.call(n,r[a])&&(i[r[a]]=n[r[a]])}}return i};!function(){var e=UZ,t=TU,n={origin:"*",methods:"GET,HEAD,PUT,PATCH,POST,DELETE",preflightContinue:!1,optionsSuccessStatus:204};function r(e){return"string"==typeof e||e instanceof String}function i(e,t){if(Array.isArray(t)){for(var n=0;n<t.length;++n)if(i(e,t[n]))return!0;return!1}return r(t)?e===t:t instanceof RegExp?t.test(e):!!t}function s(e,t){var n,s=t.headers.origin,o=[];return e.origin&&"*"!==e.origin?r(e.origin)?(o.push([{key:"Access-Control-Allow-Origin",value:e.origin}]),o.push([{key:"Vary",value:"Origin"}])):(n=i(s,e.origin),o.push([{key:"Access-Control-Allow-Origin",value:!!n&&s}]),o.push([{key:"Vary",value:"Origin"}])):o.push([{key:"Access-Control-Allow-Origin",value:"*"}]),o}function o(e){return!0===e.credentials?{key:"Access-Control-Allow-Credentials",value:"true"}:null}function a(e){var t=e.exposedHeaders;return t?(t.join&&(t=t.join(",")),t&&t.length?{key:"Access-Control-Expose-Headers",value:t}:null):null}function c(e,n){for(var r=0,i=e.length;r<i;r++){var s=e[r];s&&(Array.isArray(s)?c(s,n):"Vary"===s.key&&s.value?t(n,s.value):s.value&&n.setHeader(s.key,s.value))}}jZ.exports=function(t){var r=null;return r="function"==typeof t?t:function(e,n){n(null,t)},function(t,i,l){r(t,(function(r,u){if(r)l(r);else{var p=e({},n,u),h=null;p.origin&&"function"==typeof p.origin?h=p.origin:p.origin&&(h=function(e,t){t(null,p.origin)}),h?h(t.headers.origin,(function(e,n){e||!n?l(e):(p.origin=n,function(e,t,n,r){var i=[];"OPTIONS"===(t.method&&t.method.toUpperCase&&t.method.toUpperCase())?(i.push(s(e,t)),i.push(o(e)),i.push(function(e){var t=e.methods;return t.join&&(t=e.methods.join(",")),{key:"Access-Control-Allow-Methods",value:t}}(e)),i.push(function(e,t){var n=e.allowedHeaders||e.headers,r=[];return n?n.join&&(n=n.join(",")):(n=t.headers["access-control-request-headers"],r.push([{key:"Vary",value:"Access-Control-Request-Headers"}])),n&&n.length&&r.push([{key:"Access-Control-Allow-Headers",value:n}]),r}(e,t)),i.push(function(e){var t=("number"==typeof e.maxAge||e.maxAge)&&e.maxAge.toString();return t&&t.length?{key:"Access-Control-Max-Age",value:t}:null}(e)),i.push(a(e)),c(i,n),e.preflightContinue?r():(n.statusCode=e.optionsSuccessStatus,n.setHeader("Content-Length","0"),n.end())):(i.push(s(e,t)),i.push(o(e)),i.push(a(e)),c(i,n),r())}(p,t,i,l))})):l()}}))}}}();var qZ=jZ.exports;Object.defineProperty(EG,"__esModule",{value:!0}),EG.Server=EG.BaseServer=void 0;const HZ=L,$Z=S,zZ=TG,WZ=DG,GZ=p,VZ=kV,KZ=LV,YZ=NZ,ZZ=yV,QZ=CG,JZ=(0,ah.default)("engine"),XZ=Symbol("responseHeaders");class eQ extends GZ.EventEmitter{constructor(e={}){super(),this.middlewares=[],this.clients={},this.clientsCount=0,this.opts=Object.assign({wsEngine:YZ.Server,pingTimeout:2e4,pingInterval:25e3,upgradeTimeout:1e4,maxHttpBufferSize:1e6,transports:["polling","websocket"],allowUpgrades:!0,httpCompression:{threshold:1024},cors:!1,allowEIO3:!1},e),e.cookie&&(this.opts.cookie=Object.assign({name:"io",path:"/",httpOnly:!1!==e.cookie.path,sameSite:"lax"},e.cookie)),this.opts.cors&&this.use(qZ(this.opts.cors)),e.perMessageDeflate&&(this.opts.perMessageDeflate=Object.assign({threshold:1024},e.perMessageDeflate)),this.init()}_computePath(e){let t=(e.path||"/engine.io").replace(/\/$/,"");return!1!==e.addTrailingSlash&&(t+="/"),t}upgrades(e){return this.opts.allowUpgrades&&WZ.default[e].upgradesTo||[]}verify(e,t,n){const r=e._query.transport;if(!~this.opts.transports.indexOf(r)||"webtransport"===r)return JZ('unknown transport "%s"',r),n(nQ.errors.UNKNOWN_TRANSPORT,{transport:r});const i=function(e){if((e+="").length<1)return!1;if(!sQ[e.charCodeAt(0)])return JZ('invalid header, index 0, char "%s"',e.charCodeAt(0)),!0;if(e.length<2)return!1;if(!sQ[e.charCodeAt(1)])return JZ('invalid header, index 1, char "%s"',e.charCodeAt(1)),!0;if(e.length<3)return!1;if(!sQ[e.charCodeAt(2)])return JZ('invalid header, index 2, char "%s"',e.charCodeAt(2)),!0;if(e.length<4)return!1;if(!sQ[e.charCodeAt(3)])return JZ('invalid header, index 3, char "%s"',e.charCodeAt(3)),!0;for(let t=4;t<e.length;++t)if(!sQ[e.charCodeAt(t)])return JZ('invalid header, index "%i", char "%s"',t,e.charCodeAt(t)),!0;return!1}(e.headers.origin);if(i){const t=e.headers.origin;return e.headers.origin=null,JZ("origin header invalid"),n(nQ.errors.BAD_REQUEST,{name:"INVALID_ORIGIN",origin:t})}const s=e._query.sid;if(!s)return"GET"!==e.method?n(nQ.errors.BAD_HANDSHAKE_METHOD,{method:e.method}):"websocket"!==r||t?this.opts.allowRequest?this.opts.allowRequest(e,((e,t)=>{if(!t)return n(nQ.errors.FORBIDDEN,{message:e});n()})):n():(JZ("invalid transport upgrade"),n(nQ.errors.BAD_REQUEST,{name:"TRANSPORT_HANDSHAKE_ERROR"}));{if(!this.clients.hasOwnProperty(s))return JZ('unknown sid "%s"',s),n(nQ.errors.UNKNOWN_SID,{sid:s});const e=this.clients[s].transport.name;if(!t&&e!==r)return JZ("bad request: unexpected transport without upgrade"),n(nQ.errors.BAD_REQUEST,{name:"TRANSPORT_MISMATCH",transport:r,previousTransport:e})}n()}use(e){this.middlewares.push(e)}_applyMiddlewares(e,t,n){if(0===this.middlewares.length)return JZ("no middleware to apply, skipping"),n();const r=i=>{JZ("applying middleware n°%d",i+1),this.middlewares[i](e,t,(e=>{if(e)return n(e);i+1<this.middlewares.length?r(i+1):n()}))};r(0)}close(){JZ("closing all open clients");for(let e in this.clients)this.clients.hasOwnProperty(e)&&this.clients[e].close(!0);return this.cleanup(),this}generateId(e){return zZ.generateId()}async handshake(e,t,n){const r="4"===t._query.EIO?4:3;if(3===r&&!this.opts.allowEIO3)return JZ("unsupported protocol version"),this.emit("connection_error",{req:t,code:nQ.errors.UNSUPPORTED_PROTOCOL_VERSION,message:nQ.errorMessages[nQ.errors.UNSUPPORTED_PROTOCOL_VERSION],context:{protocol:r}}),void n(nQ.errors.UNSUPPORTED_PROTOCOL_VERSION);let i;try{i=await this.generateId(t)}catch(e){return JZ("error while generating an id"),this.emit("connection_error",{req:t,code:nQ.errors.BAD_REQUEST,message:nQ.errorMessages[nQ.errors.BAD_REQUEST],context:{name:"ID_GENERATION_ERROR",error:e}}),void n(nQ.errors.BAD_REQUEST)}JZ('handshaking client "%s"',i);try{var s=this.createTransport(e,t);"polling"===e?(s.maxHttpBufferSize=this.opts.maxHttpBufferSize,s.httpCompression=this.opts.httpCompression):"websocket"===e&&(s.perMessageDeflate=this.opts.perMessageDeflate)}catch(r){return JZ('error handshaking to transport "%s"',e),this.emit("connection_error",{req:t,code:nQ.errors.BAD_REQUEST,message:nQ.errorMessages[nQ.errors.BAD_REQUEST],context:{name:"TRANSPORT_HANDSHAKE_ERROR",error:r}}),void n(nQ.errors.BAD_REQUEST)}const o=new VZ.Socket(i,this,s,t,r);return s.on("headers",((e,t)=>{!t._query.sid&&(this.opts.cookie&&(e["Set-Cookie"]=[(0,KZ.serialize)(this.opts.cookie.name,i,this.opts.cookie)]),this.emit("initial_headers",e,t)),this.emit("headers",e,t)})),s.onRequest(t),this.clients[i]=o,this.clientsCount++,o.once("close",(()=>{delete this.clients[i],this.clientsCount--})),this.emit("connection",o),s}async onWebTransportSession(e){const t=setTimeout((()=>{JZ("the client failed to establish a bidirectional stream in the given period"),e.close()}),this.opts.upgradeTimeout),n=e.incomingBidirectionalStreams.getReader(),r=await n.read();if(r.done)return void JZ("session is closed");const i=r.value,s=(0,QZ.createPacketDecoderStream)(this.opts.maxHttpBufferSize,"nodebuffer"),o=i.readable.pipeThrough(s).getReader(),{value:a,done:c}=await o.read();if(c)return void JZ("stream is closed");if(clearTimeout(t),"open"!==a.type)return JZ("invalid WebTransport handshake"),e.close();if(void 0===a.data){const t=new ZZ.WebTransport(e,i,o),n=zZ.generateId();JZ('handshaking client "%s" (WebTransport)',n);const r=new VZ.Socket(n,this,t,null,4);return this.clients[n]=r,this.clientsCount++,r.once("close",(()=>{delete this.clients[n],this.clientsCount--})),void this.emit("connection",r)}const l=function(e){try{const t=JSON.parse(e);if("string"==typeof t.sid)return t.sid}catch(e){}}(a.data);if(!l)return JZ("invalid WebTransport handshake"),e.close();const u=this.clients[l];if(u)if(u.upgrading)JZ("transport has already been trying to upgrade"),e.close();else if(u.upgraded)JZ("transport had already been upgraded"),e.close();else{JZ("upgrading existing transport");const t=new ZZ.WebTransport(e,i,o);u.maybeUpgrade(t)}else JZ("upgrade attempt for closed client"),e.close()}}EG.BaseServer=eQ,eQ.errors={UNKNOWN_TRANSPORT:0,UNKNOWN_SID:1,BAD_HANDSHAKE_METHOD:2,BAD_REQUEST:3,FORBIDDEN:4,UNSUPPORTED_PROTOCOL_VERSION:5},eQ.errorMessages={0:"Transport unknown",1:"Session ID unknown",2:"Bad handshake method",3:"Bad request",4:"Forbidden",5:"Unsupported protocol version"};class tQ{constructor(e,t){this.req=e,this.socket=t,e[XZ]={}}setHeader(e,t){this.req[XZ][e]=t}getHeader(e){return this.req[XZ][e]}removeHeader(e){delete this.req[XZ][e]}write(){}writeHead(){}end(){this.socket.destroy()}}let nQ=class e extends eQ{init(){~this.opts.transports.indexOf("websocket")&&(this.ws&&this.ws.close(),this.ws=new this.opts.wsEngine({noServer:!0,clientTracking:!1,perMessageDeflate:this.opts.perMessageDeflate,maxPayload:this.opts.maxHttpBufferSize}),"function"==typeof this.ws.on&&this.ws.on("headers",((e,t)=>{const n=t[XZ]||{};delete t[XZ];!t._query.sid&&this.emit("initial_headers",n,t),this.emit("headers",n,t),JZ("writing headers: %j",n),Object.keys(n).forEach((t=>{e.push(`${t}: ${n[t]}`)}))})))}cleanup(){this.ws&&(JZ("closing webSocketServer"),this.ws.close())}prepare(e){e._query||(e._query=~e.url.indexOf("?")?HZ.parse((0,$Z.parse)(e.url).query):{})}createTransport(e,t){return new WZ.default[e](t)}handleRequest(t,n){JZ('handling "%s" http request "%s"',t.method,t.url),this.prepare(t),t.res=n;const r=(r,i)=>{if(void 0!==r)return this.emit("connection_error",{req:t,code:r,message:e.errorMessages[r],context:i}),void rQ(n,r,i);if(t._query.sid)JZ("setting new request for existing client"),this.clients[t._query.sid].transport.onRequest(t);else{const e=(e,t)=>rQ(n,e,t);this.handshake(t._query.transport,t,e)}};this._applyMiddlewares(t,n,(n=>{n?r(e.errors.BAD_REQUEST,{name:"MIDDLEWARE_FAILURE"}):this.verify(t,!1,r)}))}handleUpgrade(t,n,r){this.prepare(t);const i=new tQ(t,n),s=(s,o)=>{if(void 0!==s)return this.emit("connection_error",{req:t,code:s,message:e.errorMessages[s],context:o}),void iQ(n,s,o);const a=Buffer.from(r);r=null,i.writeHead(),this.ws.handleUpgrade(t,n,a,(e=>{this.onWebSocket(t,n,e)}))};this._applyMiddlewares(t,i,(n=>{n?s(e.errors.BAD_REQUEST,{name:"MIDDLEWARE_FAILURE"}):this.verify(t,!0,s)}))}onWebSocket(e,t,n){if(n.on("error",i),void 0!==WZ.default[e._query.transport]&&!WZ.default[e._query.transport].prototype.handlesUpgrades)return JZ("transport doesnt handle upgraded requests"),void n.close();const r=e._query.sid;if(e.websocket=n,r){const t=this.clients[r];if(t)if(t.upgrading)JZ("transport has already been trying to upgrade"),n.close();else if(t.upgraded)JZ("transport had already been upgraded"),n.close();else{JZ("upgrading existing transport"),n.removeListener("error",i);const r=this.createTransport(e._query.transport,e);r.perMessageDeflate=this.opts.perMessageDeflate,t.maybeUpgrade(r)}else JZ("upgrade attempt for closed client"),n.close()}else{const n=(e,n)=>iQ(t,e,n);this.handshake(e._query.transport,e,n)}function i(){JZ("websocket error before upgrade")}}attach(e,t={}){const n=this._computePath(t),r=t.destroyUpgradeTimeout||1e3;function i(e){return n===e.url.slice(0,n.length)}const s=e.listeners("request").slice(0);e.removeAllListeners("request"),e.on("close",this.close.bind(this)),e.on("listening",this.init.bind(this)),e.on("request",((t,r)=>{if(i(t))JZ('intercepting request for path "%s"',n),this.handleRequest(t,r);else{let n=0;const i=s.length;for(;n<i;n++)s[n].call(e,t,r)}})),~this.opts.transports.indexOf("websocket")&&e.on("upgrade",((e,n,s)=>{i(e)?this.handleUpgrade(e,n,s):!1!==t.destroyUpgrade&&setTimeout((function(){if(n.writable&&n.bytesWritten<=0)return n.on("error",(e=>{JZ("error while destroying upgrade: %s",e.message)})),n.end()}),r)}))}};function rQ(e,t,n){const r=t===nQ.errors.FORBIDDEN?403:400,i=n&&n.message?n.message:nQ.errorMessages[t];e.writeHead(r,{"Content-Type":"application/json"}),e.end(JSON.stringify({code:t,message:i}))}function iQ(e,t,n={}){if(e.on("error",(()=>{JZ("ignoring error from closed connection")})),e.writable){const r=n.message||nQ.errorMessages[t],i=Buffer.byteLength(r);e.write("HTTP/1.1 400 Bad Request\r\nConnection: close\r\nContent-type: text/html\r\nContent-Length: "+i+"\r\n\r\n"+r)}e.destroy()}EG.Server=nQ;const sQ=[0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];var oQ={},aQ={},cQ={};Object.defineProperty(cQ,"__esModule",{value:!0}),cQ.Polling=void 0;const lQ=AG,uQ=T,pQ=KM,hQ=(0,ah.default)("engine:polling"),dQ={gzip:uQ.createGzip,deflate:uQ.createDeflate};let fQ=class extends lQ.Transport{constructor(e){super(e),this.closeTimeout=3e4}get name(){return"polling"}get supportsFraming(){return!1}onRequest(e){const t=e.res;e.res=null,"get"===e.getMethod()?this.onPollRequest(e,t):"post"===e.getMethod()?this.onDataRequest(e,t):(t.writeStatus("500 Internal Server Error"),t.end())}onPollRequest(e,t){if(this.req)return hQ("request overlap"),this.onError("overlap from client"),t.writeStatus("500 Internal Server Error"),void t.end();hQ("setting request"),this.req=e,this.res=t;e.cleanup=()=>{this.req=this.res=null},t.onAborted((()=>{this.writable=!1,this.onError("poll connection closed prematurely")})),this.writable=!0,this.emit("drain"),this.writable&&this.shouldClose&&(hQ("triggering empty send to append close packet"),this.send([{type:"noop"}]))}onDataRequest(e,t){if(this.dataReq)return this.onError("data request overlap from client"),t.writeStatus("500 Internal Server Error"),void t.end();const n=Number(e.headers["content-length"]);if(!n)return this.onError("content-length header required"),void t.writeStatus("411 Length Required").end();if(n>this.maxHttpBufferSize)return this.onError("payload too large"),void t.writeStatus("413 Payload Too Large").end();if("application/octet-stream"===e.headers["content-type"]&&4===this.protocol)return this.onError("invalid content");let r;this.dataReq=e,this.dataRes=t;let i=0;const s={"Content-Type":"text/html"};this.headers(e,s);for(let e in s)t.writeHeader(e,String(s[e]));const o=e=>{this.onData(e.toString()),this.onDataRequestCleanup(),t.cork((()=>{t.end("ok")}))};t.onAborted((()=>{this.onDataRequestCleanup(),this.onError("data request connection closed prematurely")})),t.onData(((e,s)=>{const a=i+e.byteLength;if(a>n)return this.onError("content-length mismatch"),void t.close();if(!r){if(s)return void o(Buffer.from(e));r=Buffer.allocUnsafe(n)}if(Buffer.from(e).copy(r,i),s)return a!=n?(this.onError("content-length mismatch"),t.writeStatus("400 Content-Length Mismatch").end(),void this.onDataRequestCleanup()):void o(r);i=a}))}onDataRequestCleanup(){this.dataReq=this.dataRes=null}onData(e){hQ('received "%s"',e);const t=e=>{if("close"===e.type)return hQ("got xhr close packet"),this.onClose(),!1;this.onPacket(e)};3===this.protocol?this.parser.decodePayload(e,t):this.parser.decodePayload(e).forEach(t)}onClose(){this.writable&&this.send([{type:"noop"}]),super.onClose()}send(e){this.writable=!1,this.shouldClose&&(hQ("appending close packet to payload"),e.push({type:"close"}),this.shouldClose(),this.shouldClose=null);const t=t=>{const n=e.some((e=>e.options&&e.options.compress));this.write(t,{compress:n})};3===this.protocol?this.parser.encodePayload(e,this.supportsBinary,t):this.parser.encodePayload(e,t)}write(e,t){hQ('writing "%s"',e),this.doWrite(e,t,(()=>{this.req.cleanup()}))}doWrite(e,t,n){const r="string"==typeof e,i={"Content-Type":r?"text/plain; charset=UTF-8":"application/octet-stream"},s=e=>{this.headers(this.req,i),this.res.cork((()=>{Object.keys(i).forEach((e=>{this.res.writeHeader(e,String(i[e]))})),this.res.end(e)})),n()};if(!this.httpCompression||!t.compress)return void s(e);if((r?Buffer.byteLength(e):e.length)<this.httpCompression.threshold)return void s(e);const o=pQ(this.req).encodings(["gzip","deflate"]);o?this.compress(e,o,((e,t)=>{if(e)return this.res.writeStatus("500 Internal Server Error"),this.res.end(),void n(e);i["Content-Encoding"]=o,s(t)})):s(e)}compress(e,t,n){hQ("compressing");const r=[];let i=0;dQ[t](this.httpCompression).on("error",n).on("data",(function(e){r.push(e),i+=e.length})).on("end",(function(){n(null,Buffer.concat(r,i))})).end(e)}doClose(e){let t;hQ("closing");const n=()=>{clearTimeout(t),e(),this.onClose()};this.writable?(hQ("transport writable - closing right away"),this.send([{type:"close"}]),n()):this.discarded?(hQ("transport discarded - closing right away"),n()):(hQ("transport not writable - buffering orderly close"),this.shouldClose=n,t=setTimeout(n,this.closeTimeout))}headers(e,t){t=t||{};const n=e.headers["user-agent"];return n&&(~n.indexOf(";MSIE")||~n.indexOf("Trident/"))&&(t["X-XSS-Protection"]="0"),t["cache-control"]="no-store",this.emit("headers",t,e),t}};cQ.Polling=fQ;var mQ={};Object.defineProperty(mQ,"__esModule",{value:!0}),mQ.WebSocket=void 0;const gQ=AG,yQ=(0,ah.default)("engine:ws");let vQ=class extends gQ.Transport{constructor(e){super(e),this.writable=!1,this.perMessageDeflate=null}get name(){return"websocket"}get handlesUpgrades(){return!0}get supportsFraming(){return!0}send(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],r=t+1===e.length,i=e=>{const t="string"!=typeof e,n=this.perMessageDeflate&&Buffer.byteLength(e)>this.perMessageDeflate.threshold;yQ('writing "%s"',e),this.socket.send(e,t,n),r&&(this.writable=!0,this.emit("drain"))};n.options&&"string"==typeof n.options.wsPreEncoded?i(n.options.wsPreEncoded):this.parser.encodePacket(n,this.supportsBinary,i)}}doClose(e){yQ("closing"),e&&e(),this.socket.end()}};mQ.WebSocket=vQ,Object.defineProperty(aQ,"__esModule",{value:!0});const bQ=cQ,_Q=mQ;aQ.default={polling:bQ.Polling,websocket:_Q.WebSocket},Object.defineProperty(oQ,"__esModule",{value:!0}),oQ.uServer=void 0;const wQ=EG,xQ=aQ,EQ=(0,ah.default)("engine:uws");class SQ extends wQ.BaseServer{init(){}cleanup(){}prepare(e,t){e.method=e.getMethod().toUpperCase(),e.url=e.getUrl();const n=new URLSearchParams(e.getQuery());e._query=Object.fromEntries(n.entries()),e.headers={},e.forEach(((t,n)=>{e.headers[t]=n})),e.connection={remoteAddress:Buffer.from(t.getRemoteAddressAsText()).toString()},t.onAborted((()=>{EQ("response has been aborted")}))}createTransport(e,t){return new xQ.default[e](t)}attach(e,t={}){const n=this._computePath(t);e.any(n,this.handleRequest.bind(this)).ws(n,{compression:t.compression,idleTimeout:t.idleTimeout,maxBackpressure:t.maxBackpressure,maxPayloadLength:this.opts.maxHttpBufferSize,upgrade:this.handleUpgrade.bind(this),open:e=>{const t=e.getUserData().transport;t.socket=e,t.writable=!0,t.emit("drain")},message:(e,t,n)=>{e.getUserData().transport.onData(n?t:Buffer.from(t).toString())},close:(e,t,n)=>{e.getUserData().transport.onClose(t,n)}})}_applyMiddlewares(e,t,n){if(0===this.middlewares.length)return n();e.res=new TQ(t),super._applyMiddlewares(e,e.res,(t=>{e.res.writeHead(),n(t)}))}handleRequest(e,t){EQ('handling "%s" http request "%s"',t.getMethod(),t.getUrl()),this.prepare(t,e),t.res=e;const n=(n,r)=>{if(void 0!==n)return this.emit("connection_error",{req:t,code:n,message:wQ.Server.errorMessages[n],context:r}),void this.abortRequest(t.res,n,r);if(t._query.sid)EQ("setting new request for existing client"),this.clients[t._query.sid].transport.onRequest(t);else{const n=(t,n)=>this.abortRequest(e,t,n);this.handshake(t._query.transport,t,n)}};this._applyMiddlewares(t,e,(e=>{e?n(wQ.Server.errors.BAD_REQUEST,{name:"MIDDLEWARE_FAILURE"}):this.verify(t,!1,n)}))}handleUpgrade(e,t,n){EQ("on upgrade"),this.prepare(t,e),t.res=e;const r=async(r,i)=>{if(void 0!==r)return this.emit("connection_error",{req:t,code:r,message:wQ.Server.errorMessages[r],context:i}),void this.abortRequest(e,r,i);const s=t._query.sid;let o;if(s){const n=this.clients[s];n?n.upgrading?(EQ("transport has already been trying to upgrade"),e.close()):n.upgraded?(EQ("transport had already been upgraded"),e.close()):(EQ("upgrading existing transport"),o=this.createTransport(t._query.transport,t),n.maybeUpgrade(o)):(EQ("upgrade attempt for closed client"),e.close())}else if(o=await this.handshake(t._query.transport,t,((t,n)=>this.abortRequest(e,t,n))),!o)return;t.res.writeStatus("101 Switching Protocols"),e.upgrade({transport:o},t.getHeader("sec-websocket-key"),t.getHeader("sec-websocket-protocol"),t.getHeader("sec-websocket-extensions"),n)};this._applyMiddlewares(t,e,(e=>{e?r(wQ.Server.errors.BAD_REQUEST,{name:"MIDDLEWARE_FAILURE"}):this.verify(t,!0,r)}))}abortRequest(e,t,n){const r=t===wQ.Server.errors.FORBIDDEN?"403 Forbidden":"400 Bad Request",i=n&&n.message?n.message:wQ.Server.errorMessages[t];e.writeStatus(r),e.writeHeader("Content-Type","application/json"),e.end(JSON.stringify({code:t,message:i}))}}oQ.uServer=SQ;class TQ{constructor(e){this.res=e,this.statusWritten=!1,this.headers=[],this.isAborted=!1}set statusCode(e){e&&this.writeStatus(200===e?"200 OK":"204 No Content")}writeHead(e){this.statusCode=e}setHeader(e,t){Array.isArray(t)?t.forEach((t=>{this.writeHeader(e,t)})):this.writeHeader(e,t)}removeHeader(){}getHeader(){}writeStatus(e){if(!this.isAborted)return this.res.writeStatus(e),this.statusWritten=!0,this.writeBufferedHeaders(),this}writeHeader(e,t){this.isAborted||"Content-Length"!==e&&(this.statusWritten?this.res.writeHeader(e,t):this.headers.push([e,t]))}writeBufferedHeaders(){this.headers.forEach((([e,t])=>{this.res.writeHeader(e,t)}))}end(e){this.isAborted||this.res.cork((()=>{this.statusWritten||this.writeBufferedHeaders(),this.res.end(e)}))}onData(e){this.isAborted||this.res.onData(e)}onAborted(e){this.isAborted||this.res.onAborted((()=>{this.isAborted=!0,e()}))}cork(e){this.isAborted||this.res.cork(e)}}!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.protocol=e.Transport=e.Socket=e.uServer=e.parser=e.attach=e.listen=e.transports=e.Server=void 0;const t=x,n=EG;Object.defineProperty(e,"Server",{enumerable:!0,get:function(){return n.Server}});const r=DG;e.transports=r.default;const i=CG;e.parser=i;var s=oQ;Object.defineProperty(e,"uServer",{enumerable:!0,get:function(){return s.uServer}});var o=kV;Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return o.Socket}});var a=AG;function c(e,t){const r=new n.Server(t);return r.attach(e,t),r}Object.defineProperty(e,"Transport",{enumerable:!0,get:function(){return a.Transport}}),e.protocol=i.protocol,e.listen=function(e,n,r){"function"==typeof n&&(r=n,n={});const i=(0,t.createServer)((function(e,t){t.writeHead(501),t.end("Not Implemented")})),s=c(i,n);return s.httpServer=i,i.listen(e,r),s},e.attach=c}(xG);var DQ={},kQ={};function AQ(e){if(e)return function(e){for(var t in AQ.prototype)e[t]=AQ.prototype[t];return e}(e)}AQ.prototype.on=AQ.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},AQ.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},AQ.prototype.off=AQ.prototype.removeListener=AQ.prototype.removeAllListeners=AQ.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var i=0;i<r.length;i++)if((n=r[i])===t||n.fn===t){r.splice(i,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},AQ.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,t)}return this},AQ.prototype.emitReserved=AQ.prototype.emit,AQ.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},AQ.prototype.hasListeners=function(e){return!!this.listeners(e).length};var CQ=H(Object.freeze({__proto__:null,Emitter:AQ})),RQ={},OQ={};Object.defineProperty(OQ,"__esModule",{value:!0}),OQ.hasBinary=OQ.isBinary=void 0;const LQ="function"==typeof ArrayBuffer,IQ=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,PQ=Object.prototype.toString,NQ="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===PQ.call(Blob),jQ="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===PQ.call(File);function FQ(e){return LQ&&(e instanceof ArrayBuffer||IQ(e))||NQ&&e instanceof Blob||jQ&&e instanceof File}OQ.isBinary=FQ,OQ.hasBinary=function e(t,n){if(!t||"object"!=typeof t)return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n<r;n++)if(e(t[n]))return!0;return!1}if(FQ(t))return!0;if(t.toJSON&&"function"==typeof t.toJSON&&1===arguments.length)return e(t.toJSON(),!0);for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return!0;return!1},Object.defineProperty(RQ,"__esModule",{value:!0}),RQ.reconstructPacket=RQ.deconstructPacket=void 0;const BQ=OQ;function MQ(e,t){if(!e)return e;if((0,BQ.isBinary)(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=MQ(e[r],t);return n}if("object"==typeof e&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=MQ(e[r],t));return n}return e}function UQ(e,t){if(!e)return e;if(e&&!0===e._placeholder){if("number"==typeof e.num&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=UQ(e[n],t);else if("object"==typeof e)for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=UQ(e[n],t));return e}RQ.deconstructPacket=function(e){const t=[],n=e.data,r=e;return r.data=MQ(n,t),r.attachments=t.length,{packet:r,buffers:t}},RQ.reconstructPacket=function(e,t){return e.data=UQ(e.data,t),delete e.attachments,e},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Decoder=e.Encoder=e.PacketType=e.protocol=void 0;const t=CQ,n=RQ,r=OQ,i=(0,ah.default)("socket.io-parser"),s=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var o;e.protocol=5,function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"}(o=e.PacketType||(e.PacketType={}));function a(e){return"[object Object]"===Object.prototype.toString.call(e)}e.Encoder=class{constructor(e){this.replacer=e}encode(e){return i("encoding packet %j",e),e.type!==o.EVENT&&e.type!==o.ACK||!(0,r.hasBinary)(e)?[this.encodeAsString(e)]:this.encodeAsBinary({type:e.type===o.EVENT?o.BINARY_EVENT:o.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id})}encodeAsString(e){let t=""+e.type;return e.type!==o.BINARY_EVENT&&e.type!==o.BINARY_ACK||(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),null!=e.id&&(t+=e.id),null!=e.data&&(t+=JSON.stringify(e.data,this.replacer)),i("encoded %j as %s",e,t),t}encodeAsBinary(e){const t=(0,n.deconstructPacket)(e),r=this.encodeAsString(t.packet),i=t.buffers;return i.unshift(r),i}};class c extends t.Emitter{constructor(e){super(),this.reviver=e}add(e){let t;if("string"==typeof e){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const n=t.type===o.BINARY_EVENT;n||t.type===o.BINARY_ACK?(t.type=n?o.EVENT:o.ACK,this.reconstructor=new l(t),0===t.attachments&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else{if(!(0,r.isBinary)(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t))}}decodeString(e){let t=0;const n={type:Number(e.charAt(0))};if(void 0===o[n.type])throw new Error("unknown packet type "+n.type);if(n.type===o.BINARY_EVENT||n.type===o.BINARY_ACK){const r=t+1;for(;"-"!==e.charAt(++t)&&t!=e.length;);const i=e.substring(r,t);if(i!=Number(i)||"-"!==e.charAt(t))throw new Error("Illegal attachments");n.attachments=Number(i)}if("/"===e.charAt(t+1)){const r=t+1;for(;++t;){if(","===e.charAt(t))break;if(t===e.length)break}n.nsp=e.substring(r,t)}else n.nsp="/";const r=e.charAt(t+1);if(""!==r&&Number(r)==r){const r=t+1;for(;++t;){const n=e.charAt(t);if(null==n||Number(n)!=n){--t;break}if(t===e.length)break}n.id=Number(e.substring(r,t+1))}if(e.charAt(++t)){const r=this.tryParse(e.substr(t));if(!c.isPayloadValid(n.type,r))throw new Error("invalid payload");n.data=r}return i("decoded %s as %j",e,n),n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch(e){return!1}}static isPayloadValid(e,t){switch(e){case o.CONNECT:return a(t);case o.DISCONNECT:return void 0===t;case o.CONNECT_ERROR:return"string"==typeof t||a(t);case o.EVENT:case o.BINARY_EVENT:return Array.isArray(t)&&("number"==typeof t[0]||"string"==typeof t[0]&&-1===s.indexOf(t[0]));case o.ACK:case o.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}e.Decoder=c;class l{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const e=(0,n.reconstructPacket)(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}}(kQ),Object.defineProperty(DQ,"__esModule",{value:!0}),DQ.Client=void 0;const qQ=kQ,HQ=S,$Q=ah("socket.io:client");DQ.Client=class{constructor(e,t){this.sockets=new Map,this.nsps=new Map,this.server=e,this.conn=t,this.encoder=e.encoder,this.decoder=new e._parser.Decoder,this.id=t.id,this.setup()}get request(){return this.conn.request}setup(){this.onclose=this.onclose.bind(this),this.ondata=this.ondata.bind(this),this.onerror=this.onerror.bind(this),this.ondecoded=this.ondecoded.bind(this),this.decoder.on("decoded",this.ondecoded),this.conn.on("data",this.ondata),this.conn.on("error",this.onerror),this.conn.on("close",this.onclose),this.connectTimeout=setTimeout((()=>{0===this.nsps.size?($Q("no namespace joined yet, close the client"),this.close()):$Q("the client has already joined a namespace, nothing to do")}),this.server._connectTimeout)}connect(e,t={}){if(this.server._nsps.has(e))return $Q("connecting to namespace %s",e),this.doConnect(e,t);this.server._checkNamespace(e,t,(n=>{n?this.doConnect(e,t):($Q("creation of namespace %s was denied",e),this._packet({type:qQ.PacketType.CONNECT_ERROR,nsp:e,data:{message:"Invalid namespace"}}))}))}doConnect(e,t){const n=this.server.of(e);n._add(this,t,(e=>{this.sockets.set(e.id,e),this.nsps.set(n.name,e),this.connectTimeout&&(clearTimeout(this.connectTimeout),this.connectTimeout=void 0)}))}_disconnect(){for(const e of this.sockets.values())e.disconnect();this.sockets.clear(),this.close()}_remove(e){if(this.sockets.has(e.id)){const t=this.sockets.get(e.id).nsp.name;this.sockets.delete(e.id),this.nsps.delete(t)}else $Q("ignoring remove for %s",e.id)}close(){"open"===this.conn.readyState&&($Q("forcing transport close"),this.conn.close(),this.onclose("forced server close"))}_packet(e,t={}){if("open"!==this.conn.readyState)return void $Q("ignoring packet write %j",e);const n=t.preEncoded?e:this.encoder.encode(e);this.writeToEngine(n,t)}writeToEngine(e,t){if(t.volatile&&!this.conn.transport.writable)return void $Q("volatile packet is discarded since the transport is not currently writable");const n=Array.isArray(e)?e:[e];for(const e of n)this.conn.write(e,t)}ondata(e){try{this.decoder.add(e)}catch(e){$Q("invalid packet format"),this.onerror(e)}}ondecoded(e){let t,n;if(3===this.conn.protocol){const r=HQ.parse(e.nsp,!0);t=r.pathname,n=r.query}else t=e.nsp,n=e.data;const r=this.nsps.get(t);r||e.type!==qQ.PacketType.CONNECT?r&&e.type!==qQ.PacketType.CONNECT&&e.type!==qQ.PacketType.CONNECT_ERROR?process.nextTick((function(){r._onpacket(e)})):($Q("invalid state (packet type: %s)",e.type),this.close()):this.connect(t,n)}onerror(e){for(const t of this.sockets.values())t._onerror(e);this.conn.close()}onclose(e,t){$Q("client close with reason %s",e),this.destroy();for(const n of this.sockets.values())n._onclose(e,t);this.sockets.clear(),this.decoder.destroy()}destroy(){this.conn.removeListener("data",this.ondata),this.conn.removeListener("error",this.onerror),this.conn.removeListener("close",this.onclose),this.decoder.removeListener("decoded",this.ondecoded),this.connectTimeout&&(clearTimeout(this.connectTimeout),this.connectTimeout=void 0)}};var zQ={},WQ={},GQ={};Object.defineProperty(GQ,"__esModule",{value:!0}),GQ.StrictEventEmitter=void 0;const VQ=p;class KQ extends VQ.EventEmitter{on(e,t){return super.on(e,t)}once(e,t){return super.once(e,t)}emit(e,...t){return super.emit(e,...t)}emitReserved(e,...t){return super.emit(e,...t)}emitUntyped(e,...t){return super.emit(e,...t)}listeners(e){return super.listeners(e)}}GQ.StrictEventEmitter=KQ;var YQ,ZQ,QQ={};function JQ(){if(YQ)return QQ;YQ=1,Object.defineProperty(QQ,"__esModule",{value:!0}),QQ.RemoteSocket=QQ.BroadcastOperator=void 0;const e=XQ(),t=kQ;class n{constructor(e,t=new Set,n=new Set,r={}){this.adapter=e,this.rooms=t,this.exceptRooms=n,this.flags=r}to(e){const t=new Set(this.rooms);return Array.isArray(e)?e.forEach((e=>t.add(e))):t.add(e),new n(this.adapter,t,this.exceptRooms,this.flags)}in(e){return this.to(e)}except(e){const t=new Set(this.exceptRooms);return Array.isArray(e)?e.forEach((e=>t.add(e))):t.add(e),new n(this.adapter,this.rooms,t,this.flags)}compress(e){const t=Object.assign({},this.flags,{compress:e});return new n(this.adapter,this.rooms,this.exceptRooms,t)}get volatile(){const e=Object.assign({},this.flags,{volatile:!0});return new n(this.adapter,this.rooms,this.exceptRooms,e)}get local(){const e=Object.assign({},this.flags,{local:!0});return new n(this.adapter,this.rooms,this.exceptRooms,e)}timeout(e){const t=Object.assign({},this.flags,{timeout:e});return new n(this.adapter,this.rooms,this.exceptRooms,t)}emit(n,...r){if(e.RESERVED_EVENTS.has(n))throw new Error(`"${String(n)}" is a reserved event name`);const i=[n,...r],s={type:t.PacketType.EVENT,data:i};if(!("function"==typeof i[i.length-1]))return this.adapter.broadcast(s,{rooms:this.rooms,except:this.exceptRooms,flags:this.flags}),!0;const o=i.pop();let a=!1,c=[];const l=setTimeout((()=>{a=!0,o.apply(this,[new Error("operation has timed out"),this.flags.expectSingleResponse?null:c])}),this.flags.timeout);let u=-1,p=0,h=0;const d=()=>{a||u!==p||c.length!==h||(clearTimeout(l),o.apply(this,[null,this.flags.expectSingleResponse?c[0]:c]))};return this.adapter.broadcastWithAck(s,{rooms:this.rooms,except:this.exceptRooms,flags:this.flags},(e=>{h+=e,p++,d()}),(e=>{c.push(e),d()})),this.adapter.serverCount().then((e=>{u=e,d()})),!0}emitWithAck(e,...t){return new Promise(((n,r)=>{t.push(((e,t)=>e?(e.responses=t,r(e)):n(t))),this.emit(e,...t)}))}allSockets(){if(!this.adapter)throw new Error("No adapter for this namespace, are you trying to get the list of clients of a dynamic namespace?");return this.adapter.sockets(this.rooms)}fetchSockets(){return this.adapter.fetchSockets({rooms:this.rooms,except:this.exceptRooms,flags:this.flags}).then((t=>t.map((t=>t instanceof e.Socket?t:new r(this.adapter,t)))))}socketsJoin(e){this.adapter.addSockets({rooms:this.rooms,except:this.exceptRooms,flags:this.flags},Array.isArray(e)?e:[e])}socketsLeave(e){this.adapter.delSockets({rooms:this.rooms,except:this.exceptRooms,flags:this.flags},Array.isArray(e)?e:[e])}disconnectSockets(e=!1){this.adapter.disconnectSockets({rooms:this.rooms,except:this.exceptRooms,flags:this.flags},e)}}QQ.BroadcastOperator=n;class r{constructor(e,t){this.id=t.id,this.handshake=t.handshake,this.rooms=new Set(t.rooms),this.data=t.data,this.operator=new n(e,new Set([this.id]),new Set,{expectSingleResponse:!0})}timeout(e){return this.operator.timeout(e)}emit(e,...t){return this.operator.emit(e,...t)}join(e){return this.operator.socketsJoin(e)}leave(e){return this.operator.socketsLeave(e)}disconnect(e=!1){return this.operator.disconnectSockets(e),this}}return QQ.RemoteSocket=r,QQ}function XQ(){return ZQ||(ZQ=1,function(e){var t=U&&U.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.Socket=e.RESERVED_EVENTS=void 0;const n=kQ,r=t(ah),i=GQ,s=t(TG),o=JQ(),a=(0,r.default)("socket.io:socket"),c=new Set(["transport error","transport close","forced close","ping timeout","server shutting down","forced server close"]);function l(){}e.RESERVED_EVENTS=new Set(["connect","connect_error","disconnect","disconnecting","newListener","removeListener"]);class u extends i.StrictEventEmitter{constructor(e,t,r,i){super(),this.nsp=e,this.client=t,this.recovered=!1,this.data={},this.connected=!1,this.acks=new Map,this.fns=[],this.flags={},this.server=e.server,this.adapter=this.nsp.adapter,i?(this.id=i.sid,this.pid=i.pid,i.rooms.forEach((e=>this.join(e))),this.data=i.data,i.missedPackets.forEach((e=>{this.packet({type:n.PacketType.EVENT,data:e})})),this.recovered=!0):(3===t.conn.protocol?this.id="/"!==e.name?e.name+"#"+t.id:t.id:this.id=s.default.generateId(),this.server._opts.connectionStateRecovery&&(this.pid=s.default.generateId())),this.handshake=this.buildHandshake(r),this.on("error",l)}buildHandshake(e){var t,n,r,i;return{headers:(null===(t=this.request)||void 0===t?void 0:t.headers)||{},time:new Date+"",address:this.conn.remoteAddress,xdomain:!!(null===(n=this.request)||void 0===n?void 0:n.headers.origin),secure:!this.request||!!this.request.connection.encrypted,issued:+new Date,url:null===(r=this.request)||void 0===r?void 0:r.url,query:(null===(i=this.request)||void 0===i?void 0:i._query)||{},auth:e}}emit(t,...r){if(e.RESERVED_EVENTS.has(t))throw new Error(`"${String(t)}" is a reserved event name`);const i=[t,...r],s={type:n.PacketType.EVENT,data:i};if("function"==typeof i[i.length-1]){const e=this.nsp._ids++;a("emitting packet with ack id %d",e),this.registerAckCallback(e,i.pop()),s.id=e}const o=Object.assign({},this.flags);return this.flags={},this.nsp.server.opts.connectionStateRecovery?this.adapter.broadcast(s,{rooms:new Set([this.id]),except:new Set,flags:o}):(this.notifyOutgoingListeners(s),this.packet(s,o)),!0}emitWithAck(e,...t){const n=void 0!==this.flags.timeout;return new Promise(((r,i)=>{t.push(((e,t)=>n?e?i(e):r(t):r(e))),this.emit(e,...t)}))}registerAckCallback(e,t){const n=this.flags.timeout;if(void 0===n)return void this.acks.set(e,t);const r=setTimeout((()=>{a("event with ack id %d has timed out after %d ms",e,n),this.acks.delete(e),t.call(this,new Error("operation has timed out"))}),n);this.acks.set(e,((...e)=>{clearTimeout(r),t.apply(this,[null,...e])}))}to(e){return this.newBroadcastOperator().to(e)}in(e){return this.newBroadcastOperator().in(e)}except(e){return this.newBroadcastOperator().except(e)}send(...e){return this.emit("message",...e),this}write(...e){return this.emit("message",...e),this}packet(e,t={}){e.nsp=this.nsp.name,t.compress=!1!==t.compress,this.client._packet(e,t)}join(e){return a("join room %s",e),this.adapter.addAll(this.id,new Set(Array.isArray(e)?e:[e]))}leave(e){return a("leave room %s",e),this.adapter.del(this.id,e)}leaveAll(){this.adapter.delAll(this.id)}_onconnect(){a("socket connected - writing packet"),this.connected=!0,this.join(this.id),3===this.conn.protocol?this.packet({type:n.PacketType.CONNECT}):this.packet({type:n.PacketType.CONNECT,data:{sid:this.id,pid:this.pid}})}_onpacket(e){switch(a("got packet %j",e),e.type){case n.PacketType.EVENT:case n.PacketType.BINARY_EVENT:this.onevent(e);break;case n.PacketType.ACK:case n.PacketType.BINARY_ACK:this.onack(e);break;case n.PacketType.DISCONNECT:this.ondisconnect()}}onevent(e){const t=e.data||[];if(a("emitting event %j",t),null!=e.id&&(a("attaching ack callback to event"),t.push(this.ack(e.id))),this._anyListeners&&this._anyListeners.length){const e=this._anyListeners.slice();for(const n of e)n.apply(this,t)}this.dispatch(t)}ack(e){const t=this;let r=!1;return function(){if(r)return;const i=Array.prototype.slice.call(arguments);a("sending ack %j",i),t.packet({id:e,type:n.PacketType.ACK,data:i}),r=!0}}onack(e){const t=this.acks.get(e.id);"function"==typeof t?(a("calling ack %s with %j",e.id,e.data),t.apply(this,e.data),this.acks.delete(e.id)):a("bad ack %s",e.id)}ondisconnect(){a("got disconnect packet"),this._onclose("client namespace disconnect")}_onerror(e){this.emitReserved("error",e)}_onclose(e,t){if(!this.connected)return this;a("closing socket - reason %s",e),this.emitReserved("disconnecting",e,t),this.server._opts.connectionStateRecovery&&c.has(e)&&(a("connection state recovery is enabled for sid %s",this.id),this.adapter.persistSession({sid:this.id,pid:this.pid,rooms:[...this.rooms],data:this.data})),this._cleanup(),this.client._remove(this),this.connected=!1,this.emitReserved("disconnect",e,t)}_cleanup(){this.leaveAll(),this.nsp._remove(this),this.join=l}_error(e){this.packet({type:n.PacketType.CONNECT_ERROR,data:e})}disconnect(e=!1){return this.connected?(e?this.client._disconnect():(this.packet({type:n.PacketType.DISCONNECT}),this._onclose("server namespace disconnect")),this):this}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}get broadcast(){return this.newBroadcastOperator()}get local(){return this.newBroadcastOperator().local}timeout(e){return this.flags.timeout=e,this}dispatch(e){a("dispatching an event %j",e),this.run(e,(t=>{process.nextTick((()=>{if(t)return this._onerror(t);this.connected?super.emitUntyped.apply(this,e):a("ignore packet received after disconnection")}))}))}use(e){return this.fns.push(e),this}run(e,t){const n=this.fns.slice(0);if(!n.length)return t(null);!function r(i){n[i](e,(function(e){return e?t(e):n[i+1]?void r(i+1):t(null)}))}(0)}get disconnected(){return!this.connected}get request(){return this.client.request}get conn(){return this.client.conn}get rooms(){return this.adapter.socketRooms(this.id)||new Set}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const n of t)n.apply(this,e.data)}}newBroadcastOperator(){const e=Object.assign({},this.flags);return this.flags={},new o.BroadcastOperator(this.adapter,new Set,new Set([this.id]),e)}}e.Socket=u}(WQ)),WQ}!function(e){var t=U&&U.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.Namespace=e.RESERVED_EVENTS=void 0;const n=XQ(),r=GQ,i=t(ah),s=JQ(),o=(0,i.default)("socket.io:namespace");e.RESERVED_EVENTS=new Set(["connect","connection","new_namespace"]);class a extends r.StrictEventEmitter{constructor(e,t){super(),this.sockets=new Map,this._fns=[],this._ids=0,this.server=e,this.name=t,this._initAdapter()}_initAdapter(){this.adapter=new(this.server.adapter())(this)}use(e){return this._fns.push(e),this}run(e,t){const n=this._fns.slice(0);if(!n.length)return t(null);!function r(i){n[i](e,(function(e){return e?t(e):n[i+1]?void r(i+1):t(null)}))}(0)}to(e){return new s.BroadcastOperator(this.adapter).to(e)}in(e){return new s.BroadcastOperator(this.adapter).in(e)}except(e){return new s.BroadcastOperator(this.adapter).except(e)}async _add(e,t,n){var r;o("adding socket to nsp %s",this.name);const i=await this._createSocket(e,t);if((null===(r=this.server.opts.connectionStateRecovery)||void 0===r?void 0:r.skipMiddlewares)&&i.recovered&&"open"===e.conn.readyState)return this._doConnect(i,n);this.run(i,(t=>{process.nextTick((()=>"open"!==e.conn.readyState?(o("next called after client was closed - ignoring socket"),void i._cleanup()):t?(o("middleware error, sending CONNECT_ERROR packet to the client"),i._cleanup(),3===e.conn.protocol?i._error(t.data||t.message):i._error({message:t.message,data:t.data})):void this._doConnect(i,n)))}))}async _createSocket(e,t){const r=t.pid,i=t.offset;if(this.server.opts.connectionStateRecovery&&"string"==typeof r&&"string"==typeof i){let s;try{s=await this.adapter.restoreSession(r,i)}catch(e){o("error while restoring session: %s",e)}if(s)return o("connection state recovered for sid %s",s.sid),new n.Socket(this,e,t,s)}return new n.Socket(this,e,t)}_doConnect(e,t){this.sockets.set(e.id,e),e._onconnect(),t&&t(e),this.emitReserved("connect",e),this.emitReserved("connection",e)}_remove(e){this.sockets.has(e.id)?this.sockets.delete(e.id):o("ignoring remove for %s",e.id)}emit(e,...t){return new s.BroadcastOperator(this.adapter).emit(e,...t)}send(...e){return this.emit("message",...e),this}write(...e){return this.emit("message",...e),this}serverSideEmit(t,...n){if(e.RESERVED_EVENTS.has(t))throw new Error(`"${String(t)}" is a reserved event name`);return n.unshift(t),this.adapter.serverSideEmit(n),!0}serverSideEmitWithAck(e,...t){return new Promise(((n,r)=>{t.push(((e,t)=>e?(e.responses=t,r(e)):n(t))),this.serverSideEmit(e,...t)}))}_onServerSideEmit(e){super.emitUntyped.apply(this,e)}allSockets(){return new s.BroadcastOperator(this.adapter).allSockets()}compress(e){return new s.BroadcastOperator(this.adapter).compress(e)}get volatile(){return new s.BroadcastOperator(this.adapter).volatile}get local(){return new s.BroadcastOperator(this.adapter).local}timeout(e){return new s.BroadcastOperator(this.adapter).timeout(e)}fetchSockets(){return new s.BroadcastOperator(this.adapter).fetchSockets()}socketsJoin(e){return new s.BroadcastOperator(this.adapter).socketsJoin(e)}socketsLeave(e){return new s.BroadcastOperator(this.adapter).socketsLeave(e)}disconnectSockets(e=!1){return new s.BroadcastOperator(this.adapter).disconnectSockets(e)}}e.Namespace=a}(zQ);var eJ={},tJ={},nJ={},rJ={};Object.defineProperty(rJ,"__esModule",{value:!0}),rJ.yeast=rJ.decode=rJ.encode=void 0;const iJ="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),sJ=64,oJ={};let aJ,cJ=0,lJ=0;function uJ(e){let t="";do{t=iJ[e%sJ]+t,e=Math.floor(e/sJ)}while(e>0);return t}for(rJ.encode=uJ,rJ.decode=function(e){let t=0;for(lJ=0;lJ<e.length;lJ++)t=t*sJ+oJ[e.charAt(lJ)];return t},rJ.yeast=function(){const e=uJ(+new Date);return e!==aJ?(cJ=0,aJ=e):e+"."+uJ(cJ++)};lJ<sJ;lJ++)oJ[iJ[lJ]]=lJ;var pJ;Object.defineProperty(nJ,"__esModule",{value:!0}),nJ.SessionAwareAdapter=nJ.Adapter=void 0;const hJ=p,dJ=rJ,fJ=NZ,mJ="function"==typeof(null===(pJ=null==fJ?void 0:fJ.Sender)||void 0===pJ?void 0:pJ.frame);class gJ extends hJ.EventEmitter{constructor(e){super(),this.nsp=e,this.rooms=new Map,this.sids=new Map,this.encoder=e.server.encoder}init(){}close(){}serverCount(){return Promise.resolve(1)}addAll(e,t){this.sids.has(e)||this.sids.set(e,new Set);for(const n of t)this.sids.get(e).add(n),this.rooms.has(n)||(this.rooms.set(n,new Set),this.emit("create-room",n)),this.rooms.get(n).has(e)||(this.rooms.get(n).add(e),this.emit("join-room",n,e))}del(e,t){this.sids.has(e)&&this.sids.get(e).delete(t),this._del(t,e)}_del(e,t){const n=this.rooms.get(e);if(null!=n){n.delete(t)&&this.emit("leave-room",e,t),0===n.size&&this.rooms.delete(e)&&this.emit("delete-room",e)}}delAll(e){if(this.sids.has(e)){for(const t of this.sids.get(e))this._del(t,e);this.sids.delete(e)}}broadcast(e,t){const n=t.flags||{},r={preEncoded:!0,volatile:n.volatile,compress:n.compress};e.nsp=this.nsp.name;const i=this._encode(e,r);this.apply(t,(t=>{"function"==typeof t.notifyOutgoingListeners&&t.notifyOutgoingListeners(e),t.client.writeToEngine(i,r)}))}broadcastWithAck(e,t,n,r){const i=t.flags||{},s={preEncoded:!0,volatile:i.volatile,compress:i.compress};e.nsp=this.nsp.name,e.id=this.nsp._ids++;const o=this._encode(e,s);let a=0;this.apply(t,(t=>{a++,t.acks.set(e.id,r),"function"==typeof t.notifyOutgoingListeners&&t.notifyOutgoingListeners(e),t.client.writeToEngine(o,s)})),n(a)}_encode(e,t){const n=this.encoder.encode(e);if(mJ&&1===n.length&&"string"==typeof n[0]){const e=Buffer.from("4"+n[0]);t.wsPreEncodedFrame=fJ.Sender.frame(e,{readOnly:!1,mask:!1,rsv1:!1,opcode:1,fin:!0})}return n}sockets(e){const t=new Set;return this.apply({rooms:e},(e=>{t.add(e.id)})),Promise.resolve(t)}socketRooms(e){return this.sids.get(e)}fetchSockets(e){const t=[];return this.apply(e,(e=>{t.push(e)})),Promise.resolve(t)}addSockets(e,t){this.apply(e,(e=>{e.join(t)}))}delSockets(e,t){this.apply(e,(e=>{t.forEach((t=>e.leave(t)))}))}disconnectSockets(e,t){this.apply(e,(e=>{e.disconnect(t)}))}apply(e,t){const n=e.rooms,r=this.computeExceptSids(e.except);if(n.size){const e=new Set;for(const i of n)if(this.rooms.has(i))for(const n of this.rooms.get(i)){if(e.has(n)||r.has(n))continue;const i=this.nsp.sockets.get(n);i&&(t(i),e.add(n))}}else for(const[e]of this.sids){if(r.has(e))continue;const n=this.nsp.sockets.get(e);n&&t(n)}}computeExceptSids(e){const t=new Set;if(e&&e.size>0)for(const n of e)this.rooms.has(n)&&this.rooms.get(n).forEach((e=>t.add(e)));return t}serverSideEmit(e){console.warn("this adapter does not support the serverSideEmit() functionality")}persistSession(e){}restoreSession(e,t){return null}}nJ.Adapter=gJ;function yJ(e,t){const n=0===t.rooms.size||e.some((e=>t.rooms.has(e))),r=e.every((e=>!t.except.has(e)));return n&&r}nJ.SessionAwareAdapter=class extends gJ{constructor(e){super(e),this.nsp=e,this.sessions=new Map,this.packets=[],this.maxDisconnectionDuration=e.server.opts.connectionStateRecovery.maxDisconnectionDuration;const t=setInterval((()=>{const e=Date.now()-this.maxDisconnectionDuration;this.sessions.forEach(((t,n)=>{t.disconnectedAt<e&&this.sessions.delete(n)}));for(let t=this.packets.length-1;t>=0;t--){if(this.packets[t].emittedAt<e){this.packets.splice(0,t+1);break}}}),6e4);t.unref()}persistSession(e){e.disconnectedAt=Date.now(),this.sessions.set(e.pid,e)}restoreSession(e,t){const n=this.sessions.get(e);if(!n)return null;if(n.disconnectedAt+this.maxDisconnectionDuration<Date.now())return this.sessions.delete(e),null;const r=this.packets.findIndex((e=>e.id===t));if(-1===r)return null;const i=[];for(let e=r+1;e<this.packets.length;e++){const t=this.packets[e];yJ(n.rooms,t.opts)&&i.push(t.data)}return Promise.resolve(Object.assign(Object.assign({},n),{missedPackets:i}))}broadcast(e,t){var n;const r=2===e.type,i=void 0===e.id,s=void 0===(null===(n=t.flags)||void 0===n?void 0:n.volatile);if(r&&i&&s){const n=(0,dJ.yeast)();e.data.push(n),this.packets.push({id:n,opts:t,data:e.data,emittedAt:Date.now()})}super.broadcast(e,t)}};var vJ={};!function(e){var t=U&&U.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};Object.defineProperty(e,"__esModule",{value:!0}),e.ClusterAdapterWithHeartbeat=e.ClusterAdapter=e.MessageType=void 0;const n=nJ,r=w,i=(0,ah.debug)("socket.io-adapter"),s=5e3;function o(){return(0,r.randomBytes)(8).toString("hex")}var a;function c(e){return{rooms:[...e.rooms],except:[...e.except],flags:e.flags}}function l(e){return{rooms:new Set(e.rooms),except:new Set(e.except),flags:e.flags}}!function(e){e[e.INITIAL_HEARTBEAT=1]="INITIAL_HEARTBEAT",e[e.HEARTBEAT=2]="HEARTBEAT",e[e.BROADCAST=3]="BROADCAST",e[e.SOCKETS_JOIN=4]="SOCKETS_JOIN",e[e.SOCKETS_LEAVE=5]="SOCKETS_LEAVE",e[e.DISCONNECT_SOCKETS=6]="DISCONNECT_SOCKETS",e[e.FETCH_SOCKETS=7]="FETCH_SOCKETS",e[e.FETCH_SOCKETS_RESPONSE=8]="FETCH_SOCKETS_RESPONSE",e[e.SERVER_SIDE_EMIT=9]="SERVER_SIDE_EMIT",e[e.SERVER_SIDE_EMIT_RESPONSE=10]="SERVER_SIDE_EMIT_RESPONSE",e[e.BROADCAST_CLIENT_COUNT=11]="BROADCAST_CLIENT_COUNT",e[e.BROADCAST_ACK=12]="BROADCAST_ACK",e[e.ADAPTER_CLOSE=13]="ADAPTER_CLOSE"}(a=e.MessageType||(e.MessageType={}));class u extends n.Adapter{constructor(e){super(e),this.requests=new Map,this.ackRequests=new Map,this.uid=o()}onMessage(e,n){if(e.uid===this.uid)return i("[%s] ignore message from self",this.uid);switch(i("[%s] new event of type %d from %s",this.uid,e.type,e.uid),e.type){case a.BROADCAST:if(void 0!==e.data.requestId)super.broadcastWithAck(e.data.packet,l(e.data.opts),(t=>{i("[%s] waiting for %d client acknowledgements",this.uid,t),this.publishResponse(e.uid,{type:a.BROADCAST_CLIENT_COUNT,data:{requestId:e.data.requestId,clientCount:t}})}),(t=>{i("[%s] received acknowledgement with value %j",this.uid,t),this.publishResponse(e.uid,{type:a.BROADCAST_ACK,data:{requestId:e.data.requestId,packet:t}})}));else{const t=e.data.packet,r=l(e.data.opts);this.addOffsetIfNecessary(t,r,n),super.broadcast(t,r)}break;case a.SOCKETS_JOIN:super.addSockets(l(e.data.opts),e.data.rooms);break;case a.SOCKETS_LEAVE:super.delSockets(l(e.data.opts),e.data.rooms);break;case a.DISCONNECT_SOCKETS:super.disconnectSockets(l(e.data.opts),e.data.close);break;case a.FETCH_SOCKETS:i("[%s] calling fetchSockets with opts %j",this.uid,e.data.opts),super.fetchSockets(l(e.data.opts)).then((n=>{this.publishResponse(e.uid,{type:a.FETCH_SOCKETS_RESPONSE,data:{requestId:e.data.requestId,sockets:n.map((e=>{const n=e.handshake,r=t(n,["sessionStore"]);return{id:e.id,handshake:r,rooms:[...e.rooms],data:e.data}}))}})}));break;case a.SERVER_SIDE_EMIT:{const t=e.data.packet;if(!(void 0!==e.data.requestId))return void this.nsp._onServerSideEmit(t);let n=!1;const r=t=>{n||(n=!0,i("[%s] calling acknowledgement with %j",this.uid,t),this.publishResponse(e.uid,{type:a.SERVER_SIDE_EMIT_RESPONSE,data:{requestId:e.data.requestId,packet:t}}))};this.nsp._onServerSideEmit([...t,r]);break}case a.BROADCAST_CLIENT_COUNT:case a.BROADCAST_ACK:case a.FETCH_SOCKETS_RESPONSE:case a.SERVER_SIDE_EMIT_RESPONSE:this.onResponse(e);break;default:i("[%s] unknown message type: %s",this.uid,e.type)}}onResponse(e){var t,n;const r=e.data.requestId;switch(i("[%s] received response %s to request %s",this.uid,e.type,r),e.type){case a.BROADCAST_CLIENT_COUNT:null===(t=this.ackRequests.get(r))||void 0===t||t.clientCountCallback(e.data.clientCount);break;case a.BROADCAST_ACK:null===(n=this.ackRequests.get(r))||void 0===n||n.ack(e.data.packet);break;case a.FETCH_SOCKETS_RESPONSE:{const t=this.requests.get(r);if(!t)return;t.current++,e.data.sockets.forEach((e=>t.responses.push(e))),t.current===t.expected&&(clearTimeout(t.timeout),t.resolve(t.responses),this.requests.delete(r));break}case a.SERVER_SIDE_EMIT_RESPONSE:{const t=this.requests.get(r);if(!t)return;t.current++,t.responses.push(e.data.packet),t.current===t.expected&&(clearTimeout(t.timeout),t.resolve(null,t.responses),this.requests.delete(r));break}default:i("[%s] unknown response type: %s",this.uid,e.type)}}async broadcast(e,t){var n;if(!(null===(n=t.flags)||void 0===n?void 0:n.local))try{const n=await this.publishAndReturnOffset({type:a.BROADCAST,data:{packet:e,opts:c(t)}});this.addOffsetIfNecessary(e,t,n)}catch(e){return i("[%s] error while broadcasting message: %s",this.uid,e.message)}super.broadcast(e,t)}addOffsetIfNecessary(e,t,n){var r;if(!this.nsp.server.opts.connectionStateRecovery)return;const i=2===e.type,s=void 0===e.id,o=void 0===(null===(r=t.flags)||void 0===r?void 0:r.volatile);i&&s&&o&&e.data.push(n)}broadcastWithAck(e,t,n,r){var i;if(!(null===(i=null==t?void 0:t.flags)||void 0===i?void 0:i.local)){const i=o();this.ackRequests.set(i,{clientCountCallback:n,ack:r}),this.publish({type:a.BROADCAST,data:{packet:e,requestId:i,opts:c(t)}}),setTimeout((()=>{this.ackRequests.delete(i)}),t.flags.timeout)}super.broadcastWithAck(e,t,n,r)}async addSockets(e,t){var n;if(!(null===(n=e.flags)||void 0===n?void 0:n.local))try{await this.publishAndReturnOffset({type:a.SOCKETS_JOIN,data:{opts:c(e),rooms:t}})}catch(e){i("[%s] error while publishing message: %s",this.uid,e.message)}super.addSockets(e,t)}async delSockets(e,t){var n;if(!(null===(n=e.flags)||void 0===n?void 0:n.local))try{await this.publishAndReturnOffset({type:a.SOCKETS_LEAVE,data:{opts:c(e),rooms:t}})}catch(e){i("[%s] error while publishing message: %s",this.uid,e.message)}super.delSockets(e,t)}async disconnectSockets(e,t){var n;if(!(null===(n=e.flags)||void 0===n?void 0:n.local))try{await this.publishAndReturnOffset({type:a.DISCONNECT_SOCKETS,data:{opts:c(e),close:t}})}catch(e){i("[%s] error while publishing message: %s",this.uid,e.message)}super.disconnectSockets(e,t)}async fetchSockets(e){var t;const[n,r]=await Promise.all([super.fetchSockets(e),this.serverCount()]),i=r-1;if((null===(t=e.flags)||void 0===t?void 0:t.local)||i<=0)return n;const l=o();return new Promise(((t,r)=>{const o=setTimeout((()=>{const e=this.requests.get(l);e&&(r(new Error(`timeout reached: only ${e.current} responses received out of ${e.expected}`)),this.requests.delete(l))}),e.flags.timeout||s),u={type:a.FETCH_SOCKETS,resolve:t,timeout:o,current:0,expected:i,responses:n};this.requests.set(l,u),this.publish({type:a.FETCH_SOCKETS,data:{opts:c(e),requestId:l}})}))}async serverSideEmit(e){if(!("function"==typeof e[e.length-1]))return this.publish({type:a.SERVER_SIDE_EMIT,data:{packet:e}});const t=e.pop(),n=await this.serverCount()-1;if(i('[%s] waiting for %d responses to "serverSideEmit" request',this.uid,n),n<=0)return t(null,[]);const r=o(),c=setTimeout((()=>{const e=this.requests.get(r);e&&(t(new Error(`timeout reached: only ${e.current} responses received out of ${e.expected}`),e.responses),this.requests.delete(r))}),s),l={type:a.SERVER_SIDE_EMIT,resolve:t,timeout:c,current:0,expected:n,responses:[]};this.requests.set(r,l),this.publish({type:a.SERVER_SIDE_EMIT,data:{requestId:r,packet:e}})}publish(e){this.publishAndReturnOffset(e).catch((e=>{i("[%s] error while publishing message: %s",this.uid,e)}))}publishAndReturnOffset(e){return e.uid=this.uid,e.nsp=this.nsp.name,this.doPublish(e)}publishResponse(e,t){t.uid=this.uid,t.nsp=this.nsp.name,this.doPublishResponse(e,t).catch((e=>{i("[%s] error while publishing response: %s",this.uid,e)}))}}e.ClusterAdapter=u;e.ClusterAdapterWithHeartbeat=class extends u{constructor(e,t){super(e),this.nodesMap=new Map,this.customRequests=new Map,this._opts=Object.assign({heartbeatInterval:5e3,heartbeatTimeout:1e4},t),this.cleanupTimer=setInterval((()=>{const e=Date.now();this.nodesMap.forEach(((t,n)=>{e-t>this._opts.heartbeatTimeout&&(i("[%s] node %s seems down",this.uid,n),this.removeNode(n))}))}),1e3)}init(){this.publish({type:a.INITIAL_HEARTBEAT})}scheduleHeartbeat(){this.heartbeatTimer?this.heartbeatTimer.refresh():this.heartbeatTimer=setTimeout((()=>{this.publish({type:a.HEARTBEAT})}),this._opts.heartbeatInterval)}close(){this.publish({type:a.ADAPTER_CLOSE}),clearTimeout(this.heartbeatTimer),this.cleanupTimer&&clearInterval(this.cleanupTimer)}onMessage(e,t){if(e.uid===this.uid)return i("[%s] ignore message from self",this.uid);switch(e.uid&&"emitter"!==e.uid&&this.nodesMap.set(e.uid,Date.now()),i("[%s] new event of type %d from %s",this.uid,e.type,e.uid),e.type){case a.INITIAL_HEARTBEAT:this.publish({type:a.HEARTBEAT});break;case a.HEARTBEAT:break;case a.ADAPTER_CLOSE:this.removeNode(e.uid);break;default:super.onMessage(e,t)}}serverCount(){return Promise.resolve(1+this.nodesMap.size)}publish(e){return this.scheduleHeartbeat(),super.publish(e)}async serverSideEmit(e){if(!("function"==typeof e[e.length-1]))return this.publish({type:a.SERVER_SIDE_EMIT,data:{packet:e}});const t=e.pop(),n=this.nodesMap.size;if(i('[%s] waiting for %d responses to "serverSideEmit" request',this.uid,n),n<=0)return t(null,[]);const r=o(),c=setTimeout((()=>{const e=this.customRequests.get(r);e&&(t(new Error(`timeout reached: missing ${e.missingUids.size} responses`),e.responses),this.customRequests.delete(r))}),s),l={type:a.SERVER_SIDE_EMIT,resolve:t,timeout:c,missingUids:new Set([...this.nodesMap.keys()]),responses:[]};this.customRequests.set(r,l),this.publish({type:a.SERVER_SIDE_EMIT,data:{requestId:r,packet:e}})}async fetchSockets(e){var t;const[n,r]=await Promise.all([super.fetchSockets({rooms:e.rooms,except:e.except,flags:{local:!0}}),this.serverCount()]),i=r-1;if((null===(t=e.flags)||void 0===t?void 0:t.local)||i<=0)return n;const l=o();return new Promise(((t,r)=>{const i=setTimeout((()=>{const e=this.customRequests.get(l);e&&(r(new Error(`timeout reached: missing ${e.missingUids.size} responses`)),this.customRequests.delete(l))}),e.flags.timeout||s),o={type:a.FETCH_SOCKETS,resolve:t,timeout:i,missingUids:new Set([...this.nodesMap.keys()]),responses:n};this.customRequests.set(l,o),this.publish({type:a.FETCH_SOCKETS,data:{opts:c(e),requestId:l}})}))}onResponse(e){const t=e.data.requestId;switch(i("[%s] received response %s to request %s",this.uid,e.type,t),e.type){case a.FETCH_SOCKETS_RESPONSE:{const n=this.customRequests.get(t);if(!n)return;e.data.sockets.forEach((e=>n.responses.push(e))),n.missingUids.delete(e.uid),0===n.missingUids.size&&(clearTimeout(n.timeout),n.resolve(n.responses),this.customRequests.delete(t));break}case a.SERVER_SIDE_EMIT_RESPONSE:{const n=this.customRequests.get(t);if(!n)return;n.responses.push(e.data.packet),n.missingUids.delete(e.uid),0===n.missingUids.size&&(clearTimeout(n.timeout),n.resolve(null,n.responses),this.customRequests.delete(t));break}default:super.onResponse(e)}}removeNode(e){this.customRequests.forEach(((t,n)=>{t.missingUids.delete(e),0===t.missingUids.size&&(clearTimeout(t.timeout),t.type===a.FETCH_SOCKETS?t.resolve(t.responses):t.type===a.SERVER_SIDE_EMIT&&t.resolve(null,t.responses),this.customRequests.delete(n))})),this.nodesMap.delete(e)}}}(vJ),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MessageType=e.ClusterAdapterWithHeartbeat=e.ClusterAdapter=e.SessionAwareAdapter=e.Adapter=void 0;var t=nJ;Object.defineProperty(e,"Adapter",{enumerable:!0,get:function(){return t.Adapter}}),Object.defineProperty(e,"SessionAwareAdapter",{enumerable:!0,get:function(){return t.SessionAwareAdapter}});var n=vJ;Object.defineProperty(e,"ClusterAdapter",{enumerable:!0,get:function(){return n.ClusterAdapter}}),Object.defineProperty(e,"ClusterAdapterWithHeartbeat",{enumerable:!0,get:function(){return n.ClusterAdapterWithHeartbeat}}),Object.defineProperty(e,"MessageType",{enumerable:!0,get:function(){return n.MessageType}})}(tJ);var bJ=U&&U.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(eJ,"__esModule",{value:!0}),eJ.ParentNamespace=void 0;const _J=zQ,wJ=tJ,xJ=(0,bJ(ah).default)("socket.io:parent-namespace");class EJ extends _J.Namespace{constructor(e){super(e,"/_"+EJ.count++),this.children=new Set}_initAdapter(){this.adapter=new SJ(this,this.children)}emit(e,...t){return this.children.forEach((n=>{n.emit(e,...t)})),!0}createChild(e){xJ("creating child namespace %s",e);const t=new _J.Namespace(this.server,e);if(t._fns=this._fns.slice(0),this.listeners("connect").forEach((e=>t.on("connect",e))),this.listeners("connection").forEach((e=>t.on("connection",e))),this.children.add(t),this.server._opts.cleanupEmptyChildNamespaces){const n=t._remove;t._remove=r=>{n.call(t,r),0===t.sockets.size&&(xJ("closing child namespace %s",e),t.adapter.close(),this.server._nsps.delete(t.name),this.children.delete(t))}}return this.server._nsps.set(e,t),this.server.sockets.emitReserved("new_namespace",t),t}fetchSockets(){throw new Error("fetchSockets() is not supported on parent namespaces")}}eJ.ParentNamespace=EJ,EJ.count=0;class SJ extends wJ.Adapter{constructor(e,t){super(e),this.children=t}broadcast(e,t){this.children.forEach((n=>{n.adapter.broadcast(e,t)}))}}var TJ={},DJ=U&&U.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(TJ,"__esModule",{value:!0}),TJ.serveFile=TJ.restoreAdapter=TJ.patchAdapter=void 0;const kJ=tJ,AJ=s,CJ=(0,DJ(ah).default)("socket.io:adapter-uws"),RJ="",{addAll:OJ,del:LJ,broadcast:IJ}=kJ.Adapter.prototype;function PJ(e,t,n,r){const i=t.conn.id,s=t.conn.transport.socket;n&&(CJ("subscribe connection %s to topic %s",i,e),s.subscribe(e)),r.forEach((t=>{const n=`${e}${RJ}${t}`;CJ("subscribe connection %s to topic %s",i,n),s.subscribe(n)}))}TJ.patchAdapter=function(e){kJ.Adapter.prototype.addAll=function(e,t){const n=!this.sids.has(e);OJ.call(this,e,t);const r=this.nsp.sockets.get(e);r&&("websocket"!==r.conn.transport.name?n&&r.conn.on("upgrade",(()=>{const t=this.sids.get(e);t&&PJ(this.nsp.name,r,n,t)})):PJ(this.nsp.name,r,n,t))},kJ.Adapter.prototype.del=function(e,t){LJ.call(this,e,t);const n=this.nsp.sockets.get(e);if(n&&"websocket"===n.conn.transport.name){const e=n.conn.id,r=n.conn.transport.socket,i=`${this.nsp.name}${RJ}${t}`;CJ("unsubscribe connection %s from topic %s",e,i),r.unsubscribe(i)}},kJ.Adapter.prototype.broadcast=function(t,n){if(!(n.rooms.size<=1&&0===n.except.size))return void IJ.call(this,t,n);const r=n.flags||{},i={preEncoded:!0,volatile:r.volatile,compress:r.compress};t.nsp=this.nsp.name;const s=this.encoder.encode(t),o=0===n.rooms.size?this.nsp.name:`${this.nsp.name}${RJ}${n.rooms.keys().next().value}`;CJ("fast publish to %s",o),s.forEach((t=>{const n="string"!=typeof t;e.publish(o,n?t:"4"+t,n)})),this.apply(n,(e=>{"websocket"!==e.conn.transport.name&&e.client.writeToEngine(s,i)}))}},TJ.restoreAdapter=function(){kJ.Adapter.prototype.addAll=OJ,kJ.Adapter.prototype.del=LJ,kJ.Adapter.prototype.broadcast=IJ};TJ.serveFile=function(e,t){const{size:n}=(0,AJ.statSync)(t),r=(0,AJ.createReadStream)(t),i=()=>!r.destroyed&&r.destroy();e.onAborted(i),r.on("data",(t=>{const i=(e=>{const{buffer:t,byteOffset:n,byteLength:r}=e;return t.slice(n,n+r)})(t),s=e.getWriteOffset(),[o,a]=e.tryEnd(i,n);a||o||(r.pause(),e.onWritable((t=>{const[o,a]=e.tryEnd(i.slice(t-s),n);return!a&&o&&r.resume(),o})))})).on("error",(e=>{throw i(),e})).on("end",i)};var NJ="4.7.5";!function(e,t){var n=U&&U.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=U&&U.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=U&&U.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&n(t,e,i);return r(t,e),t},a=U&&U.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Namespace=t.Socket=t.Server=void 0;const c=x,l=s,u=T,d=KM,f=h,m=o,g=xG,y=DQ,v=p,b=zQ;Object.defineProperty(t,"Namespace",{enumerable:!0,get:function(){return b.Namespace}});const _=eJ,w=tJ,E=i(kQ),S=a(ah),D=XQ();Object.defineProperty(t,"Socket",{enumerable:!0,get:function(){return D.Socket}});const k=GQ,A=TJ,C=a(qZ),R=(0,S.default)("socket.io:server"),O=NJ,L=/\.map/;class I extends k.StrictEventEmitter{constructor(e,t={}){super(),this._nsps=new Map,this.parentNsps=new Map,this.parentNamespacesFromRegExp=new Map,"object"==typeof e&&e instanceof Object&&!e.listen&&(t=e,e=void 0),this.path(t.path||"/socket.io"),this.connectTimeout(t.connectTimeout||45e3),this.serveClient(!1!==t.serveClient),this._parser=t.parser||E,this.encoder=new this._parser.Encoder,this.opts=t,t.connectionStateRecovery?(t.connectionStateRecovery=Object.assign({maxDisconnectionDuration:12e4,skipMiddlewares:!0},t.connectionStateRecovery),this.adapter(t.adapter||w.SessionAwareAdapter)):this.adapter(t.adapter||w.Adapter),t.cleanupEmptyChildNamespaces=!!t.cleanupEmptyChildNamespaces,this.sockets=this.of("/"),(e||"number"==typeof e)&&this.attach(e),this.opts.cors&&(this._corsMiddleware=(0,C.default)(this.opts.cors))}get _opts(){return this.opts}serveClient(e){return arguments.length?(this._serveClient=e,this):this._serveClient}_checkNamespace(e,t,n){if(0===this.parentNsps.size)return n(!1);const r=this.parentNsps.keys(),i=()=>{const s=r.next();if(s.done)return n(!1);s.value(e,t,((t,r)=>{if(t||!r)return i();if(this._nsps.has(e))return R("dynamic namespace %s already exists",e),n(this._nsps.get(e));const o=this.parentNsps.get(s.value).createChild(e);R("dynamic namespace %s was created",e),n(o)}))};i()}path(e){if(!arguments.length)return this._path;this._path=e.replace(/\/$/,"");const t=this._path.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");return this.clientPathRegex=new RegExp("^"+t+"/socket\\.io(\\.msgpack|\\.esm)?(\\.min)?\\.js(\\.map)?(?:\\?|$)"),this}connectTimeout(e){return void 0===e?this._connectTimeout:(this._connectTimeout=e,this)}adapter(e){if(!arguments.length)return this._adapter;this._adapter=e;for(const e of this._nsps.values())e._initAdapter();return this}listen(e,t={}){return this.attach(e,t)}attach(e,t={}){if("function"==typeof e){throw new Error("You are trying to attach socket.io to an express request handler function. Please pass a http.Server instance.")}if(Number(e)==e&&(e=Number(e)),"number"==typeof e){R("creating http server and binding to %d",e);const t=e;e=c.createServer(((e,t)=>{t.writeHead(404),t.end()})),e.listen(t)}return Object.assign(t,this.opts),t.path=t.path||this._path,this.initEngine(e,t),this}attachApp(e,t={}){Object.assign(t,this.opts),t.path=t.path||this._path,R("creating uWebSockets.js-based engine with opts %j",t);const n=new g.uServer(t);n.attach(e,t),this.bind(n),this._serveClient&&e.get(`${this._path}/*`,((e,t)=>{if(!this.clientPathRegex.test(t.getUrl()))return void t.setYield(!0);const n=t.getUrl().replace(this._path,"").replace(/\?.*$/,"").replace(/^\//,""),r=L.test(n),i=r?"map":"source",s='"'+O+'"',o="W/"+s,a=t.getHeader("if-none-match");if(a&&(s===a||o===a))return R("serve client %s 304",i),e.writeStatus("304 Not Modified"),void e.end();R("serve client %s",i),e.writeHeader("cache-control","public, max-age=0"),e.writeHeader("content-type","application/"+(r?"json":"javascript")+"; charset=utf-8"),e.writeHeader("etag",s);const c=m.join(__dirname,"../client-dist/",n);(0,A.serveFile)(e,c)})),(0,A.patchAdapter)(e)}initEngine(e,t){R("creating engine.io instance with opts %j",t),this.eio=(0,g.attach)(e,t),this._serveClient&&this.attachServe(e),this.httpServer=e,this.bind(this.eio)}attachServe(e){R("attaching client serving req handler");const t=e.listeners("request").slice(0);e.removeAllListeners("request"),e.on("request",((n,r)=>{if(this.clientPathRegex.test(n.url))this._corsMiddleware?this._corsMiddleware(n,r,(()=>{this.serve(n,r)})):this.serve(n,r);else for(let i=0;i<t.length;i++)t[i].call(e,n,r)}))}serve(e,t){const n=e.url.replace(this._path,"").replace(/\?.*$/,""),r=L.test(n),i=r?"map":"source",s='"'+O+'"',o="W/"+s,a=e.headers["if-none-match"];if(a&&(s===a||o===a))return R("serve client %s 304",i),t.writeHead(304),void t.end();R("serve client %s",i),t.setHeader("Cache-Control","public, max-age=0"),t.setHeader("Content-Type","application/"+(r?"json":"javascript")+"; charset=utf-8"),t.setHeader("ETag",s),I.sendFile(n,e,t)}static sendFile(e,t,n){const r=(0,l.createReadStream)(m.join(__dirname,"../client-dist/",e)),i=e=>{e&&n.end()};switch(d(t).encodings(["br","gzip","deflate"])){case"br":n.writeHead(200,{"content-encoding":"br"}),(0,f.pipeline)(r,(0,u.createBrotliCompress)(),n,i);break;case"gzip":n.writeHead(200,{"content-encoding":"gzip"}),(0,f.pipeline)(r,(0,u.createGzip)(),n,i);break;case"deflate":n.writeHead(200,{"content-encoding":"deflate"}),(0,f.pipeline)(r,(0,u.createDeflate)(),n,i);break;default:n.writeHead(200),(0,f.pipeline)(r,n,i)}}bind(e){return this.engine=e,this.engine.on("connection",this.onconnection.bind(this)),this}onconnection(e){R("incoming connection with id %s",e.id);const t=new y.Client(this,e);return 3===e.protocol&&t.connect("/"),this}of(e,t){if("function"==typeof e||e instanceof RegExp){const n=new _.ParentNamespace(this);return R("initializing parent namespace %s",n.name),"function"==typeof e?this.parentNsps.set(e,n):(this.parentNsps.set(((t,n,r)=>r(null,e.test(t))),n),this.parentNamespacesFromRegExp.set(e,n)),t&&n.on("connect",t),n}"/"!==String(e)[0]&&(e="/"+e);let n=this._nsps.get(e);if(!n){for(const[t,n]of this.parentNamespacesFromRegExp)if(t.test(e))return R("attaching namespace %s to parent namespace %s",e,t),n.createChild(e);R("initializing namespace %s",e),n=new b.Namespace(this,e),this._nsps.set(e,n),"/"!==e&&this.sockets.emitReserved("new_namespace",n)}return t&&n.on("connect",t),n}close(e){this._nsps.forEach((e=>{e.sockets.forEach((e=>{e._onclose("server shutting down")})),e.adapter.close()})),this.engine.close(),(0,A.restoreAdapter)(),this.httpServer?this.httpServer.close(e):e&&e()}use(e){return this.sockets.use(e),this}to(e){return this.sockets.to(e)}in(e){return this.sockets.in(e)}except(e){return this.sockets.except(e)}send(...e){return this.sockets.emit("message",...e),this}write(...e){return this.sockets.emit("message",...e),this}serverSideEmit(e,...t){return this.sockets.serverSideEmit(e,...t)}serverSideEmitWithAck(e,...t){return this.sockets.serverSideEmitWithAck(e,...t)}allSockets(){return this.sockets.allSockets()}compress(e){return this.sockets.compress(e)}get volatile(){return this.sockets.volatile}get local(){return this.sockets.local}timeout(e){return this.sockets.timeout(e)}fetchSockets(){return this.sockets.fetchSockets()}socketsJoin(e){return this.sockets.socketsJoin(e)}socketsLeave(e){return this.sockets.socketsLeave(e)}disconnectSockets(e=!1){return this.sockets.disconnectSockets(e)}}t.Server=I;const P=Object.keys(v.EventEmitter.prototype).filter((function(e){return"function"==typeof v.EventEmitter.prototype[e]}));P.forEach((function(e){I.prototype[e]=function(){return this.sockets[e].apply(this.sockets,arguments)}})),e.exports=(e,t)=>new I(e,t),e.exports.Server=I,e.exports.Namespace=b.Namespace,e.exports.Socket=D.Socket,XQ()}(wG,wG.exports);var jJ=q(wG.exports);const{Server:FJ,Namespace:BJ,Socket:MJ}=jJ,UJ=e=>new Promise(((t,n)=>{const r=a.platform();let i;if("win32"===r)i=`start ${e}`;else if("darwin"===r)i=`open ${e}`;else{if("linux"!==r)return n(new Error(`Unsupported platform: ${r}`));i=`xdg-open ${e}`}d.exec(i,(e=>{if(e)return n(new Error(`Failed to open URL on ${r}: ${e.message}`));t()}))})),qJ=process.cwd(),HJ=o.join(qJ,"src","views");const $J=new ke;$J.name("theme").description("dev, list"),$J.command("create").description("Run development server with Webpack and BrowserSync").action(gf),$J.command("check").description("Run development server with Webpack and BrowserSync").action((async function(){const e=zr("Checking files...").start();try{const t=await qO(HJ,"views"),n=Object.keys(t);await HO(n,e)}catch(t){e.fail("Failed to retrieve files"),console.error(_t.red(`Failed to retrieve files - Error: ${t.message}`))}})),$J.command("dev").description("Run development server with Webpack and BrowserSync").action((async()=>{await mf();const{data:e}=await of.get("/apps"),t=e?.apps?.map((e=>({name:e.subdomain,value:e._id}))),n=await yl.prompt({type:"list",name:"app",message:"Choose the theme you want to use",choices:t});var r=e?.apps?.find((e=>e._id===n.app));const i=nq(),s=3e3,a=new x.Server(i),c=new FJ(a),l=zr("Start Server").start(),u=process.cwd(),p=o.join(u,"src");o.join(u,"src","assets");const h=o.join(u,"dist");console.log("🚀 ~ initializeServer ~ distPath:",h),d.exec("npx webpack --config webpack.config.js --mode development --stats errors-warnings",(async e=>{e&&console.log(e,"errrrrr");try{await I.access(p),await I.access(h)}catch{console.error("Error: Required directories do not exist."),process.exit(1)}i.use(nq.static(h)),i.get("/api/auth",((e,t)=>{const{redirect_url:n,token:r}=e.query;if(console.log("🚀 ~ app.get ~ req.query:",e.query),!n||!r)return t.status(400).send("Missing redirect_url or token");t.cookie("token",r,{httpOnly:!1,secure:"production"===process.env.NODE_ENV,expires:new Date(9999,0,1)}),t.redirect(n)})),i.get("/api/auth/logout",((e,t)=>{t.clearCookie("token",{httpOnly:!0,secure:"production"===process.env.NODE_ENV}),t.redirect("/")})),i.get("*",j(i,{viewsDirectory:p,secretKey:r.secretKey,watch:!0},"development")),zr("REloading");const t=zr("Connected"),n=zr("Budilding");c.on("connection",(e=>{t.stop(),t.start();const r=rq.watch([p,o.join(u,"tailwind.config.js")]);r.on("change",(()=>{r.close(),t.stop(),n.start(),d.exec(`cd ${u} && npx webpack --config webpack.config.js --mode development --stats errors-warnings`,(t=>{if(t)return console.log(t),void n.fail(_t.red("Build failed"));n.succeed(_t.blue("Rebuilt successfully")),e.emit("reload")}))})),e.on("disconnect",(()=>{r.close()}))})),c.on("disconnect",(()=>{console.log(_t.blue("Disconnected")),t.stop(),reloadSpinner.stop()})),a.listen(s,(()=>{l.succeed("Server Started"),console.log("Server running at http://localhost:3000"),UJ("http://localhost:3000")}))}))})),$J.command("list").description("List available themes").action((async()=>{const e=zr("Fetching Data...").start();try{const{data:t}=await of.get("/themes");e.stop();const n=t?.themes?.map((e=>({name:e.title,value:e._id}))),r=await yl.prompt({type:"list",name:"selectedThemeId",message:"Choose the theme you want to use:",choices:n}),i=t?.themes.find((e=>e._id===r.selectedThemeId));console.log("🚀 ~ getThemes ~ selectedTheme:",i)}catch(t){e.stop(),console.error("Failed to fetch data:",t)}}));const zJ=Object.create(null);zJ.open="0",zJ.close="1",zJ.ping="2",zJ.pong="3",zJ.message="4",zJ.upgrade="5",zJ.noop="6";const WJ=Object.create(null);Object.keys(zJ).forEach((e=>{WJ[zJ[e]]=e}));const GJ={type:"error",data:"parser error"},VJ=({type:e,data:t},n,r)=>t instanceof ArrayBuffer||ArrayBuffer.isView(t)?r(n?t:"b"+KJ(t,!0).toString("base64")):r(zJ[e]+(t||"")),KJ=(e,t)=>Buffer.isBuffer(e)||e instanceof Uint8Array&&!t?e:e instanceof ArrayBuffer?Buffer.from(e):Buffer.from(e.buffer,e.byteOffset,e.byteLength);let YJ;const ZJ=(e,t)=>{if("string"!=typeof e)return{type:"message",data:QJ(e,t)};const n=e.charAt(0);if("b"===n){const n=Buffer.from(e.substring(1),"base64");return{type:"message",data:QJ(n,t)}}return WJ[n]?e.length>1?{type:WJ[n],data:e.substring(1)}:{type:WJ[n]}:GJ},QJ=(e,t)=>"arraybuffer"===t?e instanceof ArrayBuffer?e:Buffer.isBuffer(e)?e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength):e.buffer:Buffer.isBuffer(e)?e:Buffer.from(e),JJ=String.fromCharCode(30);function XJ(){return new TransformStream({transform(e,t){!function(e,t){if(e.data instanceof ArrayBuffer||ArrayBuffer.isView(e.data))return t(KJ(e.data,!1));VJ(e,!0,(e=>{YJ||(YJ=new TextEncoder),t(YJ.encode(e))}))}(e,(n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const e=new DataView(i.buffer);e.setUint8(0,126),e.setUint16(1,r)}else{i=new Uint8Array(9);const e=new DataView(i.buffer);e.setUint8(0,127),e.setBigUint64(1,BigInt(r))}e.data&&"string"!=typeof e.data&&(i[0]|=128),t.enqueue(i),t.enqueue(n)}))}})}let eX;function tX(e){return e.reduce(((e,t)=>e+t.length),0)}function nX(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}const rX=global;function iX(e,...t){return t.reduce(((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t)),{})}const sX=rX.setTimeout,oX=rX.clearTimeout;function aX(e,t){t.useNativeTimers?(e.setTimeoutFn=sX.bind(rX),e.clearTimeoutFn=oX.bind(rX)):(e.setTimeoutFn=rX.setTimeout.bind(rX),e.clearTimeoutFn=rX.clearTimeout.bind(rX))}class cX extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type="TransportError"}}class lX extends AQ{constructor(e){super(),this.writable=!1,aX(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,t,n){return super.emitReserved("error",new cX(e,t,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(e){"open"===this.readyState&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=ZJ(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return-1===e.indexOf(":")?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(e){const t=function(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}(e);return t.length?"?"+t:""}}const uX="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),pX=64,hX={};let dX,fX=0,mX=0;function gX(e){let t="";do{t=uX[e%pX]+t,e=Math.floor(e/pX)}while(e>0);return t}function yX(){const e=gX(+new Date);return e!==dX?(fX=0,dX=e):e+"."+gX(fX++)}for(;mX<pX;mX++)hX[uX[mX]]=mX;
|
|
378
378
|
/**
|
|
379
379
|
* Wrapper for built-in http.js to emulate the browser XMLHttpRequest object.
|
|
380
380
|
*
|
|
@@ -386,5 +386,5 @@ parse:function(e,t){if("string"!=typeof e)throw new TypeError("argument str must
|
|
|
386
386
|
* @author Dan DeFelippi <dan@driverdan.com>
|
|
387
387
|
* @contributor David Ellis <d.f.ellis@ieee.org>
|
|
388
388
|
* @license MIT
|
|
389
|
-
*/var vX=s,bX=S,_X=d.spawn,wX=xX;function xX(e){e=e||{};var t,n,r=this,i=x,s=E,o={},a=!1,c={"User-Agent":"node-XMLHttpRequest",Accept:"*/*"},l=Object.assign({},c),u=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","content-transfer-encoding","cookie","cookie2","date","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"],p=["TRACE","TRACK","CONNECT"],h=!1,d=!1,f=!1,m={};this.UNSENT=0,this.OPENED=1,this.HEADERS_RECEIVED=2,this.LOADING=3,this.DONE=4,this.readyState=this.UNSENT,this.onreadystatechange=null,this.responseText="",this.responseXML="",this.status=null,this.statusText=null;this.open=function(e,t,n,r,i){if(this.abort(),d=!1,f=!1,!function(e){return e&&-1===p.indexOf(e)}(e))throw new Error("SecurityError: Request method not allowed");o={method:e,url:t.toString(),async:"boolean"!=typeof n||n,user:r||null,password:i||null},g(this.OPENED)},this.setDisableHeaderCheck=function(e){a=e},this.setRequestHeader=function(e,t){if(this.readyState!=this.OPENED)throw new Error("INVALID_STATE_ERR: setRequestHeader can only be called when state is OPEN");if(!function(e){return a||e&&-1===u.indexOf(e.toLowerCase())}(e))return console.warn('Refused to set unsafe header "'+e+'"'),!1;if(h)throw new Error("INVALID_STATE_ERR: send flag is true");return l[e]=t,!0},this.getResponseHeader=function(e){return"string"==typeof e&&this.readyState>this.OPENED&&n.headers[e.toLowerCase()]&&!d?n.headers[e.toLowerCase()]:null},this.getAllResponseHeaders=function(){if(this.readyState<this.HEADERS_RECEIVED||d)return"";var e="";for(var t in n.headers)"set-cookie"!==t&&"set-cookie2"!==t&&(e+=t+": "+n.headers[t]+"\r\n");return e.substr(0,e.length-2)},this.getRequestHeader=function(e){return"string"==typeof e&&l[e]?l[e]:""},this.send=function(a){if(this.readyState!=this.OPENED)throw new Error("INVALID_STATE_ERR: connection must be opened before send() is called");if(h)throw new Error("INVALID_STATE_ERR: send has already been called");var c,u=!1,p=!1,f=bX.parse(o.url);switch(f.protocol){case"https:":u=!0;case"http:":c=f.hostname;break;case"file:":p=!0;break;case void 0:case"":c="localhost";break;default:throw new Error("Protocol not supported.")}if(p){if("GET"!==o.method)throw new Error("XMLHttpRequest: Only GET method is supported");if(o.async)vX.readFile(unescape(f.pathname),"utf8",(function(e,t){e?r.handleError(e,e.errno||-1):(r.status=200,r.responseText=t,g(r.DONE))}));else try{this.responseText=vX.readFileSync(unescape(f.pathname),"utf8"),this.status=200,g(r.DONE)}catch(e){this.handleError(e,e.errno||-1)}}else{var m=f.port||(u?443:80),y=f.pathname+(f.search?f.search:"");if(l.Host=c,u&&443===m||80===m||(l.Host+=":"+f.port),o.user){void 0===o.password&&(o.password="");var v=new Buffer(o.user+":"+o.password);l.Authorization="Basic "+v.toString("base64")}"GET"===o.method||"HEAD"===o.method?a=null:a?(l["Content-Length"]=Buffer.isBuffer(a)?a.length:Buffer.byteLength(a),l["Content-Type"]||(l["Content-Type"]="text/plain;charset=UTF-8")):"POST"===o.method&&(l["Content-Length"]=0);var b=e.agent||!1,_={host:c,port:m,path:y,method:o.method,headers:l,agent:b};if(u&&(_.pfx=e.pfx,_.key=e.key,_.passphrase=e.passphrase,_.cert=e.cert,_.ca=e.ca,_.ciphers=e.ciphers,_.rejectUnauthorized=!1!==e.rejectUnauthorized),d=!1,o.async){var w=u?s.request:i.request;h=!0,r.dispatchEvent("readystatechange");var x=function(i){if(302===(n=i).statusCode||303===n.statusCode||307===n.statusCode){o.url=n.headers.location;var s=bX.parse(o.url);c=s.hostname;var a={hostname:s.hostname,port:s.port,path:s.path,method:303===n.statusCode?"GET":o.method,headers:l};return u&&(a.pfx=e.pfx,a.key=e.key,a.passphrase=e.passphrase,a.cert=e.cert,a.ca=e.ca,a.ciphers=e.ciphers,a.rejectUnauthorized=!1!==e.rejectUnauthorized),void(t=w(a,x).on("error",E)).end()}n&&n.setEncoding&&n.setEncoding("utf8"),g(r.HEADERS_RECEIVED),r.status=n.statusCode,n.on("data",(function(e){e&&(r.responseText+=e),h&&g(r.LOADING)})),n.on("end",(function(){h&&(h=!1,g(r.DONE))})),n.on("error",(function(e){r.handleError(e)}))},E=function(e){r.handleError(e)};t=w(_,x).on("error",E),e.autoUnref&&t.on("socket",(e=>{e.unref()})),a&&t.write(a),t.end(),r.dispatchEvent("loadstart")}else{var S=".node-xmlhttprequest-content-"+process.pid,T=".node-xmlhttprequest-sync-"+process.pid;vX.writeFileSync(T,"","utf8");for(var D="var http = require('http'), https = require('https'), fs = require('fs');var doRequest = http"+(u?"s":"")+".request;var options = "+JSON.stringify(_)+";var responseText = '';var req = doRequest(options, function(response) {response.setEncoding('utf8');response.on('data', function(chunk) { responseText += chunk;});response.on('end', function() {fs.writeFileSync('"+S+"', 'NODE-XMLHTTPREQUEST-STATUS:' + response.statusCode + ',' + responseText, 'utf8');fs.unlinkSync('"+T+"');});response.on('error', function(error) {fs.writeFileSync('"+S+"', 'NODE-XMLHTTPREQUEST-ERROR:' + JSON.stringify(error), 'utf8');fs.unlinkSync('"+T+"');});}).on('error', function(error) {fs.writeFileSync('"+S+"', 'NODE-XMLHTTPREQUEST-ERROR:' + JSON.stringify(error), 'utf8');fs.unlinkSync('"+T+"');});"+(a?"req.write('"+JSON.stringify(a).slice(1,-1).replace(/'/g,"\\'")+"');":"")+"req.end();",k=_X(process.argv[0],["-e",D]);vX.existsSync(T););if(r.responseText=vX.readFileSync(S,"utf8"),k.stdin.end(),vX.unlinkSync(S),r.responseText.match(/^NODE-XMLHTTPREQUEST-ERROR:/)){var A=r.responseText.replace(/^NODE-XMLHTTPREQUEST-ERROR:/,"");r.handleError(A,503)}else r.status=r.responseText.replace(/^NODE-XMLHTTPREQUEST-STATUS:([0-9]*),.*/,"$1"),r.responseText=r.responseText.replace(/^NODE-XMLHTTPREQUEST-STATUS:[0-9]*,(.*)/,"$1"),g(r.DONE)}}},this.handleError=function(e,t){this.status=t||0,this.statusText=e,this.responseText=e.stack,d=!0,g(this.DONE)},this.abort=function(){t&&(t.abort(),t=null),l=Object.assign({},c),this.responseText="",this.responseXML="",d=f=!0,this.readyState===this.UNSENT||this.readyState===this.OPENED&&!h||this.readyState===this.DONE||(h=!1,g(this.DONE)),this.readyState=this.UNSENT},this.addEventListener=function(e,t){e in m||(m[e]=[]),m[e].push(t)},this.removeEventListener=function(e,t){e in m&&(m[e]=m[e].filter((function(e){return e!==t})))},this.dispatchEvent=function(e){if("function"==typeof r["on"+e]&&(this.readyState===this.DONE?setImmediate((function(){r["on"+e]()})):r["on"+e]()),e in m)for(let t=0,n=m[e].length;t<n;t++)this.readyState===this.DONE?setImmediate((function(){m[e][t].call(r)})):m[e][t].call(r)};var g=function(e){if(!(r.readyState===e||r.readyState===r.UNSENT&&f)&&(r.readyState=e,(o.async||r.readyState<r.OPENED||r.readyState===r.DONE)&&r.dispatchEvent("readystatechange"),r.readyState===r.DONE)){let e;e=f?"abort":d?"error":"load",r.dispatchEvent(e),r.dispatchEvent("loadend")}}}xX.XMLHttpRequest=xX;var EX=q(wX);const SX=EX||B({__proto__:null,default:EX},[wX]);class TX{constructor(){this.cookies=new Map}parseCookies(e){const t=e.getResponseHeader("set-cookie");t&&t.forEach((e=>{const t=function(e){const t=e.split("; "),n=t[0].indexOf("=");if(-1===n)return;const r=t[0].substring(0,n).trim();if(!r.length)return;let i=t[0].substring(n+1).trim();34===i.charCodeAt(0)&&(i=i.slice(1,-1));const s={name:r,value:i};for(let e=1;e<t.length;e++){const n=t[e].split("=");if(2!==n.length)continue;const r=n[0].trim(),i=n[1].trim();switch(r){case"Expires":s.expires=new Date(i);break;case"Max-Age":const e=new Date;e.setUTCSeconds(e.getUTCSeconds()+parseInt(i,10)),s.expires=e}}return s}(e);t&&this.cookies.set(t.name,t)}))}addCookies(e){const t=[];this.cookies.forEach(((e,n)=>{var r;(null===(r=e.expires)||void 0===r?void 0:r.getTime())<Date.now()?this.cookies.delete(n):t.push(`${n}=${e.value}`)})),t.length&&(e.setDisableHeaderCheck(!0),e.setRequestHeader("cookie",t.join("; ")))}}function DX(){}const kX=null!=new SX({xdomain:!1}).responseType;let AX=class e extends AQ{constructor(e,t){super(),aX(this,t),this.opts=t,this.method=t.method||"GET",this.uri=e,this.data=void 0!==t.data?t.data:null,this.create()}create(){var t;const n=iX(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new SX(n);try{r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let e in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(e)&&r.setRequestHeader(e,this.opts.extraHeaders[e])}}catch(e){}if("POST"===this.method)try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{r.setRequestHeader("Accept","*/*")}catch(e){}null===(t=this.opts.cookieJar)||void 0===t||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var e;3===r.readyState&&(null===(e=this.opts.cookieJar)||void 0===e||e.parseCookies(r)),4===r.readyState&&(200===r.status||1223===r.status?this.onLoad():this.setTimeoutFn((()=>{this.onError("number"==typeof r.status?r.status:0)}),0))},r.send(this.data)}catch(e){return void this.setTimeoutFn((()=>{this.onError(e)}),0)}"undefined"!=typeof document&&(this.index=e.requestsCount++,e.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=DX,t)try{this.xhr.abort()}catch(e){}"undefined"!=typeof document&&delete e.requests[this.index],this.xhr=null}}onLoad(){const e=this.xhr.responseText;null!==e&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}};if(AX.requestsCount=0,AX.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",CX);else if("function"==typeof addEventListener){addEventListener("onpagehide"in rX?"pagehide":"unload",CX,!1)}function CX(){for(let e in AX.requests)AX.requests.hasOwnProperty(e)&&AX.requests[e].abort()}const RX=pZ,OX=process.nextTick,LX="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();const IX={websocket:class extends lX{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),t=this.opts.protocols,n=LX?{}:iX(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=new RX(e,t,n)}catch(e){return this.emitReserved("error",e)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],r=t===e.length-1;VJ(n,this.supportsBinary,(e=>{const t={};if(n.options&&(t.compress=n.options.compress),this.opts.perMessageDeflate){("string"==typeof e?Buffer.byteLength(e):e.length)<this.opts.perMessageDeflate.threshold&&(t.compress=!1)}try{this.ws.send(e,t)}catch(e){}r&&OX((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=yX()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}check(){return!!RX}},webtransport:class extends lX{get name(){return"webtransport"}doOpen(){"function"==typeof WebTransport&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then((()=>{this.onClose()})).catch((e=>{this.onError("webtransport error",e)})),this.transport.ready.then((()=>{this.transport.createBidirectionalStream().then((e=>{const t=function(e,t){eX||(eX=new TextDecoder);const n=[];let r=0,i=-1,s=!1;return new TransformStream({transform(o,a){for(n.push(o);;){if(0===r){if(tX(n)<1)break;const e=nX(n,1);s=!(128&~e[0]),i=127&e[0],r=i<126?3:126===i?1:2}else if(1===r){if(tX(n)<2)break;const e=nX(n,2);i=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),r=3}else if(2===r){if(tX(n)<8)break;const e=nX(n,8),t=new DataView(e.buffer,e.byteOffset,e.length),s=t.getUint32(0);if(s>Math.pow(2,21)-1){a.enqueue(GJ);break}i=s*Math.pow(2,32)+t.getUint32(4),r=3}else{if(tX(n)<i)break;const e=nX(n,i);a.enqueue(ZJ(s?e:eX.decode(e),t)),r=0}if(0===i||i>e){a.enqueue(GJ);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(t).getReader(),r=XJ();r.readable.pipeTo(e.writable),this.writer=r.writable.getWriter();const i=()=>{n.read().then((({done:e,value:t})=>{e||(this.onPacket(t),i())})).catch((e=>{}))};i();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this.writer.write(s).then((()=>this.onOpen()))}))})))}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],r=t===e.length-1;this.writer.write(n).then((()=>{r&&OX((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){var e;null===(e=this.transport)||void 0===e||e.close()}},polling:class extends lX{constructor(e){if(super(e),this.polling=!1,"undefined"!=typeof location){const t="https:"===location.protocol;let n=location.port;n||(n=t?"443":"80"),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||n!==e.port}const t=e&&e.forceBase64;this.supportsBinary=kX&&!t,this.opts.withCredentials&&(this.cookieJar=new TX)}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this.polling||!this.writable){let e=0;this.polling&&(e++,this.once("pollComplete",(function(){--e||t()}))),this.writable||(e++,this.once("drain",(function(){--e||t()})))}else t()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){((e,t)=>{const n=e.split(JJ),r=[];for(let e=0;e<n.length;e++){const i=ZJ(n[e],t);if(r.push(i),"error"===i.type)break}return r})(e,this.socket.binaryType).forEach((e=>{if("opening"===this.readyState&&"open"===e.type&&this.onOpen(),"close"===e.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(e)})),"closed"!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this.poll())}doClose(){const e=()=>{this.write([{type:"close"}])};"open"===this.readyState?e():this.once("open",e)}write(e){this.writable=!1,((e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach(((e,s)=>{VJ(e,!1,(e=>{r[s]=e,++i===n&&t(r.join(JJ))}))}))})(e,(e=>{this.doWrite(e,(()=>{this.writable=!0,this.emitReserved("drain")}))}))}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=yX()),this.supportsBinary||t.sid||(t.b64=1),this.createUri(e,t)}request(e={}){return Object.assign(e,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new AX(this.uri(),e)}doWrite(e,t){const n=this.request({method:"POST",data:e});n.on("success",t),n.on("error",((e,t)=>{this.onError("xhr post error",e,t)}))}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",((e,t)=>{this.onError("xhr poll error",e,t)})),this.pollXhr=e}}},PX=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,NX=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function jX(e){if(e.length>2e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");-1!=n&&-1!=r&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=PX.exec(e||""),s={},o=14;for(;o--;)s[NX[o]]=i[o]||"";return-1!=n&&-1!=r&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=function(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");"/"!=t.slice(0,1)&&0!==t.length||r.splice(0,1);"/"==t.slice(-1)&&r.splice(r.length-1,1);return r}(0,s.path),s.queryKey=function(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(e,t,r){t&&(n[t]=r)})),n}(0,s.query),s}let FX=class e extends AQ{constructor(e,t={}){super(),this.binaryType="nodebuffer",this.writeBuffer=[],e&&"object"==typeof e&&(t=e,e=null),e?(e=jX(e),t.hostname=e.host,t.secure="https"===e.protocol||"wss"===e.protocol,t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=jX(t.host).host),aX(this,t),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=t.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(e){let t={},n=e.split("&");for(let e=0,r=n.length;e<r;e++){let r=n[e].split("=");t[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return t}(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,"function"==typeof addEventListener&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);const n=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new IX[e](n)}open(){let t;if(this.opts.rememberUpgrade&&e.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn((()=>{this.emitReserved("error","No transports available")}),0);t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(e){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",(e=>this.onClose("transport close",e)))}probe(t){let n=this.createTransport(t),r=!1;e.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",(t=>{if(!r)if("pong"===t.type&&"probe"===t.data){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;e.priorWebsocketSuccess="websocket"===n.name,this.transport.pause((()=>{r||"closed"!==this.readyState&&(u(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())}))}else{const e=new Error("probe error");e.transport=n.name,this.emitReserved("upgradeError",e)}})))};function s(){r||(r=!0,u(),n.close(),n=null)}const o=e=>{const t=new Error("probe error: "+e);t.transport=n.name,s(),this.emitReserved("upgradeError",t)};function a(){o("transport closed")}function c(){o("socket closed")}function l(e){n&&e.name!==n.name&&s()}const u=()=>{n.removeListener("open",i),n.removeListener("error",o),n.removeListener("close",a),this.off("close",c),this.off("upgrading",l)};n.once("open",i),n.once("error",o),n.once("close",a),this.once("close",c),this.once("upgrading",l),-1!==this.upgrades.indexOf("webtransport")&&"webtransport"!==t?this.setTimeoutFn((()=>{r||n.open()}),200):n.open()}onOpen(){if(this.readyState="open",e.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade){let e=0;const t=this.upgrades.length;for(;e<t;e++)this.probe(this.upgrades[e])}}onPacket(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),this.resetPingTimeout(),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data)}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.maxPayload=e.maxPayload,this.onOpen(),"closed"!==this.readyState&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn((()=>{this.onClose("ping timeout")}),this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this.getWritablePackets();this.transport.send(e),this.prevBufferLen=e.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let n=0;n<this.writeBuffer.length;n++){const r=this.writeBuffer[n].data;if(r&&(e+="string"==typeof(t=r)?function(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}(t):Math.ceil(1.33*(t.byteLength||t.size))),n>0&&e>this.maxPayload)return this.writeBuffer.slice(0,n);e+=2}var t;return this.writeBuffer}write(e,t,n){return this.sendPacket("message",e,t,n),this}send(e,t,n){return this.sendPacket("message",e,t,n),this}sendPacket(e,t,n,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof n&&(r=n,n=null),"closing"===this.readyState||"closed"===this.readyState)return;(n=n||{}).compress=!1!==n.compress;const i={type:e,data:t,options:n};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}close(){const e=()=>{this.onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},n=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(()=>{this.upgrading?n():e()})):this.upgrading?n():e()),this}onError(t){e.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(e,t){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const t=[];let n=0;const r=e.length;for(;n<r;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}};FX.protocol=4,FX.protocol;const BX="function"==typeof ArrayBuffer,MX=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,UX=Object.prototype.toString,qX="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===UX.call(Blob),HX="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===UX.call(File);function $X(e){return BX&&(e instanceof ArrayBuffer||MX(e))||qX&&e instanceof Blob||HX&&e instanceof File}function zX(e,t){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let t=0,n=e.length;t<n;t++)if(zX(e[t]))return!0;return!1}if($X(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1===arguments.length)return zX(e.toJSON(),!0);for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&zX(e[t]))return!0;return!1}function WX(e){const t=[],n=e.data,r=e;return r.data=GX(n,t),r.attachments=t.length,{packet:r,buffers:t}}function GX(e,t){if(!e)return e;if($X(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=GX(e[r],t);return n}if("object"==typeof e&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=GX(e[r],t));return n}return e}function VX(e,t){return e.data=KX(e.data,t),delete e.attachments,e}function KX(e,t){if(!e)return e;if(e&&!0===e._placeholder){if("number"==typeof e.num&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=KX(e[n],t);else if("object"==typeof e)for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=KX(e[n],t));return e}const YX=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var ZX;!function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"}(ZX||(ZX={}));function QX(e){return"[object Object]"===Object.prototype.toString.call(e)}class JX extends AQ{constructor(e){super(),this.reviver=e}add(e){let t;if("string"==typeof e){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const n=t.type===ZX.BINARY_EVENT;n||t.type===ZX.BINARY_ACK?(t.type=n?ZX.EVENT:ZX.ACK,this.reconstructor=new XX(t),0===t.attachments&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else{if(!$X(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t))}}decodeString(e){let t=0;const n={type:Number(e.charAt(0))};if(void 0===ZX[n.type])throw new Error("unknown packet type "+n.type);if(n.type===ZX.BINARY_EVENT||n.type===ZX.BINARY_ACK){const r=t+1;for(;"-"!==e.charAt(++t)&&t!=e.length;);const i=e.substring(r,t);if(i!=Number(i)||"-"!==e.charAt(t))throw new Error("Illegal attachments");n.attachments=Number(i)}if("/"===e.charAt(t+1)){const r=t+1;for(;++t;){if(","===e.charAt(t))break;if(t===e.length)break}n.nsp=e.substring(r,t)}else n.nsp="/";const r=e.charAt(t+1);if(""!==r&&Number(r)==r){const r=t+1;for(;++t;){const n=e.charAt(t);if(null==n||Number(n)!=n){--t;break}if(t===e.length)break}n.id=Number(e.substring(r,t+1))}if(e.charAt(++t)){const r=this.tryParse(e.substr(t));if(!JX.isPayloadValid(n.type,r))throw new Error("invalid payload");n.data=r}return n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch(e){return!1}}static isPayloadValid(e,t){switch(e){case ZX.CONNECT:return QX(t);case ZX.DISCONNECT:return void 0===t;case ZX.CONNECT_ERROR:return"string"==typeof t||QX(t);case ZX.EVENT:case ZX.BINARY_EVENT:return Array.isArray(t)&&("number"==typeof t[0]||"string"==typeof t[0]&&-1===YX.indexOf(t[0]));case ZX.ACK:case ZX.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class XX{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const e=VX(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}var e0=Object.freeze({__proto__:null,Decoder:JX,Encoder:class{constructor(e){this.replacer=e}encode(e){return e.type!==ZX.EVENT&&e.type!==ZX.ACK||!zX(e)?[this.encodeAsString(e)]:this.encodeAsBinary({type:e.type===ZX.EVENT?ZX.BINARY_EVENT:ZX.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id})}encodeAsString(e){let t=""+e.type;return e.type!==ZX.BINARY_EVENT&&e.type!==ZX.BINARY_ACK||(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),null!=e.id&&(t+=e.id),null!=e.data&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=WX(e),n=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(n),r}},get PacketType(){return ZX},protocol:5});function t0(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const n0=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class r0 extends AQ{constructor(e,t,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[t0(e,"open",this.onopen.bind(this)),t0(e,"packet",this.onpacket.bind(this)),t0(e,"error",this.onerror.bind(this)),t0(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){if(n0.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const n={type:ZX.EVENT,data:t,options:{}};if(n.options.compress=!1!==this.flags.compress,"function"==typeof t[t.length-1]){const e=this.ids++,r=t.pop();this._registerAckCallback(e,r),n.id=e}const r=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!r||!this.connected)||(this.connected?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n)),this.flags={},this}_registerAckCallback(e,t){var n;const r=null!==(n=this.flags.timeout)&&void 0!==n?n:this._opts.ackTimeout;if(void 0===r)return void(this.acks[e]=t);const i=this.io.setTimeoutFn((()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,new Error("operation has timed out"))}),r),s=(...e)=>{this.io.clearTimeoutFn(i),t.apply(this,e)};s.withError=!0,this.acks[e]=s}emitWithAck(e,...t){return new Promise(((n,r)=>{const i=(e,t)=>e?r(e):n(t);i.withError=!0,t.push(i),this.emit(e,...t)}))}_addToQueue(e){let t;"function"==typeof e[e.length-1]&&(t=e.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push(((e,...r)=>{if(n!==this._queue[0])return;return null!==e?n.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(e)):(this._queue.shift(),t&&t(null,...r)),n.pending=!1,this._drainQueue()})),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||0===this._queue.length)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){"function"==typeof this.auth?this.auth((e=>{this._sendConnectPacket(e)})):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:ZX.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach((e=>{if(!this.sendBuffer.some((t=>String(t.id)===e))){const t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,new Error("socket has been disconnected"))}}))}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case ZX.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case ZX.EVENT:case ZX.BINARY_EVENT:this.onevent(e);break;case ZX.ACK:case ZX.BINARY_ACK:this.onack(e);break;case ZX.DISCONNECT:this.ondisconnect();break;case ZX.CONNECT_ERROR:this.destroy();const t=new Error(e.data.message);t.data=e.data.data,this.emitReserved("connect_error",t)}}onevent(e){const t=e.data||[];null!=e.id&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const n of t)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&"string"==typeof e[e.length-1]&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let n=!1;return function(...r){n||(n=!0,t.packet({type:ZX.ACK,id:e,data:r}))}}onack(e){const t=this.acks[e.id];"function"==typeof t&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach((e=>this.emitEvent(e))),this.receiveBuffer=[],this.sendBuffer.forEach((e=>{this.notifyOutgoingListeners(e),this.packet(e)})),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach((e=>e())),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:ZX.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const n of t)n.apply(this,e.data)}}}function i0(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}i0.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=1&Math.floor(10*t)?e+n:e-n}return 0|Math.min(e,this.max)},i0.prototype.reset=function(){this.attempts=0},i0.prototype.setMin=function(e){this.ms=e},i0.prototype.setMax=function(e){this.max=e},i0.prototype.setJitter=function(e){this.jitter=e};class s0 extends AQ{constructor(e,t){var n;super(),this.nsps={},this.subs=[],e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.opts=t,aX(this,t),this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(n=t.randomizationFactor)&&void 0!==n?n:.5),this.backoff=new i0({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this._readyState="closed",this.uri=e;const r=t.parser||e0;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=!1!==t.autoConnect,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return void 0===e?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return void 0===e?this._reconnectionDelay:(this._reconnectionDelay=e,null===(t=this.backoff)||void 0===t||t.setMin(e),this)}randomizationFactor(e){var t;return void 0===e?this._randomizationFactor:(this._randomizationFactor=e,null===(t=this.backoff)||void 0===t||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return void 0===e?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,null===(t=this.backoff)||void 0===t||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new FX(this.uri,this.opts);const t=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const r=t0(t,"open",(function(){n.onopen(),e&&e()})),i=t=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",t),e?e(t):this.maybeReconnectOnOpen()},s=t0(t,"error",i);if(!1!==this._timeout){const e=this._timeout,n=this.setTimeoutFn((()=>{r(),i(new Error("timeout")),t.close()}),e);this.opts.autoUnref&&n.unref(),this.subs.push((()=>{this.clearTimeoutFn(n)}))}return this.subs.push(r),this.subs.push(s),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(t0(e,"ping",this.onping.bind(this)),t0(e,"data",this.ondata.bind(this)),t0(e,"error",this.onerror.bind(this)),t0(e,"close",this.onclose.bind(this)),t0(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(e){this.onclose("parse error",e)}}ondecoded(e){OX((()=>{this.emitReserved("packet",e)}),this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new r0(this,e,t),this.nsps[e]=n),n}_destroy(e){const t=Object.keys(this.nsps);for(const e of t){if(this.nsps[e].active)return}this._close()}_packet(e){const t=this.encoder.encode(e);for(let n=0;n<t.length;n++)this.engine.write(t[n],e.options)}cleanup(){this.subs.forEach((e=>e())),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(e,t){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn((()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open((t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",t)):e.onreconnect()})))}),t);this.opts.autoUnref&&n.unref(),this.subs.push((()=>{this.clearTimeoutFn(n)}))}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const o0={};function a0(e,t){"object"==typeof e&&(t=e,e=void 0);const n=function(e,t="",n){let r=e;n=n||"undefined"!=typeof location&&location,null==e&&(e=n.protocol+"//"+n.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(e=void 0!==n?n.protocol+"//"+e:"https://"+e),r=jX(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const i=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+i+":"+r.port+t,r.href=r.protocol+"://"+i+(n&&n.port===r.port?"":":"+r.port),r}(e,(t=t||{}).path||"/socket.io"),r=n.source,i=n.id,s=n.path,o=o0[i]&&s in o0[i].nsps;let a;return t.forceNew||t["force new connection"]||!1===t.multiplex||o?a=new s0(r,t):(o0[i]||(o0[i]=new s0(r,t)),a=o0[i]),n.query&&!t.query&&(t.query=n.queryKey),a.socket(n.path,t)}Object.assign(a0,{Manager:s0,Socket:r0,io:a0,connect:a0});const c0=async()=>{const e=zr("Login Init...").start();try{console.log(`${tf}/login`);const t=await fetch(`${tf}/login`,{method:"POST"});if(!t.ok)throw new Error("Network response was not ok");const n=await t.json(),{room:r,sessionId:i}=n;e.succeed();const s=zr("Wait User Auth").start();UJ(`https://partner.qumra.cloud/cli/auth?sessionId=${i}`).then((()=>{const e=a0("https://api.qumra.cloud");e.on("connect",(()=>{e.emit("authRoom",r)})),e.on("login",(({data:t,token:n})=>{rf("user",t),rf("token",n),s.succeed("success"),e.disconnect()}))})).catch((e=>console.error("Failed to open URL:",e)))}catch(t){e.stop(),console.error("Failed to fetch data:",t)}};new ke("user").command("login").description("Run development server with Webpack and BrowserSync").action(c0);df.parseFont("Standard","flf2a$ 6 5 16 15 13 0 24463 229\nStandard by Glenn Chappell & Ian Chai 3/93 -- based on Frank's .sig\nIncludes ISO Latin-1\nfiglet release 2.1 -- 12 Aug 1994\nModified for figlet 2.2 by John Cowan <cowan@ccil.org>\n to add Latin-{2,3,4,5} support (Unicode U+0100-017F).\nPermission is hereby given to modify this font, as long as the\nmodifier's name is placed on a comment line.\n\nModified by Paul Burton <solution@earthlink.net> 12/96 to include new parameter\nsupported by FIGlet and FIGWin. May also be slightly modified for better use\nof new full-width/kern/smush alternatives, but default output is NOT changed.\n\nFont modified May 20, 2012 by patorjk to add the 0xCA0 character\n $@\n $@\n $@\n $@\n $@\n $@@\n _ @\n | |@\n | |@\n |_|@\n (_)@\n @@\n _ _ @\n ( | )@\n V V @\n $ @\n $ @\n @@\n _ _ @\n _| || |_ @\n |_ .. _|@\n |_ _|@\n |_||_| @\n @@\n _ @\n | | @\n / __)@\n \\__ \\@\n ( /@\n |_| @@\n _ __@\n (_)/ /@\n / / @\n / /_ @\n /_/(_)@\n @@\n ___ @\n ( _ ) @\n / _ \\/\\@\n | (_> <@\n \\___/\\/@\n @@\n _ @\n ( )@\n |/ @\n $ @\n $ @\n @@\n __@\n / /@\n | | @\n | | @\n | | @\n \\_\\@@\n __ @\n \\ \\ @\n | |@\n | |@\n | |@\n /_/ @@\n @\n __/\\__@\n \\ /@\n /_ _\\@\n \\/ @\n @@\n @\n _ @\n _| |_ @\n |_ _|@\n |_| @\n @@\n @\n @\n @\n _ @\n ( )@\n |/ @@\n @\n @\n _____ @\n |_____|@\n $ @\n @@\n @\n @\n @\n _ @\n (_)@\n @@\n __@\n / /@\n / / @\n / / @\n /_/ @\n @@\n ___ @\n / _ \\ @\n | | | |@\n | |_| |@\n \\___/ @\n @@\n _ @\n / |@\n | |@\n | |@\n |_|@\n @@\n ____ @\n |___ \\ @\n __) |@\n / __/ @\n |_____|@\n @@\n _____ @\n |___ / @\n |_ \\ @\n ___) |@\n |____/ @\n @@\n _ _ @\n | || | @\n | || |_ @\n |__ _|@\n |_| @\n @@\n ____ @\n | ___| @\n |___ \\ @\n ___) |@\n |____/ @\n @@\n __ @\n / /_ @\n | '_ \\ @\n | (_) |@\n \\___/ @\n @@\n _____ @\n |___ |@\n / / @\n / / @\n /_/ @\n @@\n ___ @\n ( _ ) @\n / _ \\ @\n | (_) |@\n \\___/ @\n @@\n ___ @\n / _ \\ @\n | (_) |@\n \\__, |@\n /_/ @\n @@\n @\n _ @\n (_)@\n _ @\n (_)@\n @@\n @\n _ @\n (_)@\n _ @\n ( )@\n |/ @@\n __@\n / /@\n / / @\n \\ \\ @\n \\_\\@\n @@\n @\n _____ @\n |_____|@\n |_____|@\n $ @\n @@\n __ @\n \\ \\ @\n \\ \\@\n / /@\n /_/ @\n @@\n ___ @\n |__ \\@\n / /@\n |_| @\n (_) @\n @@\n ____ @\n / __ \\ @\n / / _` |@\n | | (_| |@\n \\ \\__,_|@\n \\____/ @@\n _ @\n / \\ @\n / _ \\ @\n / ___ \\ @\n /_/ \\_\\@\n @@\n ____ @\n | __ ) @\n | _ \\ @\n | |_) |@\n |____/ @\n @@\n ____ @\n / ___|@\n | | @\n | |___ @\n \\____|@\n @@\n ____ @\n | _ \\ @\n | | | |@\n | |_| |@\n |____/ @\n @@\n _____ @\n | ____|@\n | _| @\n | |___ @\n |_____|@\n @@\n _____ @\n | ___|@\n | |_ @\n | _| @\n |_| @\n @@\n ____ @\n / ___|@\n | | _ @\n | |_| |@\n \\____|@\n @@\n _ _ @\n | | | |@\n | |_| |@\n | _ |@\n |_| |_|@\n @@\n ___ @\n |_ _|@\n | | @\n | | @\n |___|@\n @@\n _ @\n | |@\n _ | |@\n | |_| |@\n \\___/ @\n @@\n _ __@\n | |/ /@\n | ' / @\n | . \\ @\n |_|\\_\\@\n @@\n _ @\n | | @\n | | @\n | |___ @\n |_____|@\n @@\n __ __ @\n | \\/ |@\n | |\\/| |@\n | | | |@\n |_| |_|@\n @@\n _ _ @\n | \\ | |@\n | \\| |@\n | |\\ |@\n |_| \\_|@\n @@\n ___ @\n / _ \\ @\n | | | |@\n | |_| |@\n \\___/ @\n @@\n ____ @\n | _ \\ @\n | |_) |@\n | __/ @\n |_| @\n @@\n ___ @\n / _ \\ @\n | | | |@\n | |_| |@\n \\__\\_\\@\n @@\n ____ @\n | _ \\ @\n | |_) |@\n | _ < @\n |_| \\_\\@\n @@\n ____ @\n / ___| @\n \\___ \\ @\n ___) |@\n |____/ @\n @@\n _____ @\n |_ _|@\n | | @\n | | @\n |_| @\n @@\n _ _ @\n | | | |@\n | | | |@\n | |_| |@\n \\___/ @\n @@\n __ __@\n \\ \\ / /@\n \\ \\ / / @\n \\ V / @\n \\_/ @\n @@\n __ __@\n \\ \\ / /@\n \\ \\ /\\ / / @\n \\ V V / @\n \\_/\\_/ @\n @@\n __ __@\n \\ \\/ /@\n \\ / @\n / \\ @\n /_/\\_\\@\n @@\n __ __@\n \\ \\ / /@\n \\ V / @\n | | @\n |_| @\n @@\n _____@\n |__ /@\n / / @\n / /_ @\n /____|@\n @@\n __ @\n | _|@\n | | @\n | | @\n | | @\n |__|@@\n __ @\n \\ \\ @\n \\ \\ @\n \\ \\ @\n \\_\\@\n @@\n __ @\n |_ |@\n | |@\n | |@\n | |@\n |__|@@\n /\\ @\n |/\\|@\n $ @\n $ @\n $ @\n @@\n @\n @\n @\n @\n _____ @\n |_____|@@\n _ @\n ( )@\n \\|@\n $ @\n $ @\n @@\n @\n __ _ @\n / _` |@\n | (_| |@\n \\__,_|@\n @@\n _ @\n | |__ @\n | '_ \\ @\n | |_) |@\n |_.__/ @\n @@\n @\n ___ @\n / __|@\n | (__ @\n \\___|@\n @@\n _ @\n __| |@\n / _` |@\n | (_| |@\n \\__,_|@\n @@\n @\n ___ @\n / _ \\@\n | __/@\n \\___|@\n @@\n __ @\n / _|@\n | |_ @\n | _|@\n |_| @\n @@\n @\n __ _ @\n / _` |@\n | (_| |@\n \\__, |@\n |___/ @@\n _ @\n | |__ @\n | '_ \\ @\n | | | |@\n |_| |_|@\n @@\n _ @\n (_)@\n | |@\n | |@\n |_|@\n @@\n _ @\n (_)@\n | |@\n | |@\n _/ |@\n |__/ @@\n _ @\n | | __@\n | |/ /@\n | < @\n |_|\\_\\@\n @@\n _ @\n | |@\n | |@\n | |@\n |_|@\n @@\n @\n _ __ ___ @\n | '_ ` _ \\ @\n | | | | | |@\n |_| |_| |_|@\n @@\n @\n _ __ @\n | '_ \\ @\n | | | |@\n |_| |_|@\n @@\n @\n ___ @\n / _ \\ @\n | (_) |@\n \\___/ @\n @@\n @\n _ __ @\n | '_ \\ @\n | |_) |@\n | .__/ @\n |_| @@\n @\n __ _ @\n / _` |@\n | (_| |@\n \\__, |@\n |_|@@\n @\n _ __ @\n | '__|@\n | | @\n |_| @\n @@\n @\n ___ @\n / __|@\n \\__ \\@\n |___/@\n @@\n _ @\n | |_ @\n | __|@\n | |_ @\n \\__|@\n @@\n @\n _ _ @\n | | | |@\n | |_| |@\n \\__,_|@\n @@\n @\n __ __@\n \\ \\ / /@\n \\ V / @\n \\_/ @\n @@\n @\n __ __@\n \\ \\ /\\ / /@\n \\ V V / @\n \\_/\\_/ @\n @@\n @\n __ __@\n \\ \\/ /@\n > < @\n /_/\\_\\@\n @@\n @\n _ _ @\n | | | |@\n | |_| |@\n \\__, |@\n |___/ @@\n @\n ____@\n |_ /@\n / / @\n /___|@\n @@\n __@\n / /@\n | | @\n < < @\n | | @\n \\_\\@@\n _ @\n | |@\n | |@\n | |@\n | |@\n |_|@@\n __ @\n \\ \\ @\n | | @\n > >@\n | | @\n /_/ @@\n /\\/|@\n |/\\/ @\n $ @\n $ @\n $ @\n @@\n _ _ @\n (_)_(_)@\n /_\\ @\n / _ \\ @\n /_/ \\_\\@\n @@\n _ _ @\n (_)_(_)@\n / _ \\ @\n | |_| |@\n \\___/ @\n @@\n _ _ @\n (_) (_)@\n | | | |@\n | |_| |@\n \\___/ @\n @@\n _ _ @\n (_)_(_)@\n / _` |@\n | (_| |@\n \\__,_|@\n @@\n _ _ @\n (_)_(_)@\n / _ \\ @\n | (_) |@\n \\___/ @\n @@\n _ _ @\n (_) (_)@\n | | | |@\n | |_| |@\n \\__,_|@\n @@\n ___ @\n / _ \\@\n | |/ /@\n | |\\ \\@\n | ||_/@\n |_| @@\n160 NO-BREAK SPACE\n $@\n $@\n $@\n $@\n $@\n $@@\n161 INVERTED EXCLAMATION MARK\n _ @\n (_)@\n | |@\n | |@\n |_|@\n @@\n162 CENT SIGN\n _ @\n | | @\n / __)@\n | (__ @\n \\ )@\n |_| @@\n163 POUND SIGN\n ___ @\n / ,_\\ @\n _| |_ @\n | |___ @\n (_,____|@\n @@\n164 CURRENCY SIGN\n /\\___/\\@\n \\ _ /@\n | (_) |@\n / ___ \\@\n \\/ \\/@\n @@\n165 YEN SIGN\n __ __ @\n \\ V / @\n |__ __|@\n |__ __|@\n |_| @\n @@\n166 BROKEN BAR\n _ @\n | |@\n |_|@\n _ @\n | |@\n |_|@@\n167 SECTION SIGN\n __ @\n _/ _)@\n / \\ \\ @\n \\ \\\\ \\@\n \\ \\_/@\n (__/ @@\n168 DIAERESIS\n _ _ @\n (_) (_)@\n $ $ @\n $ $ @\n $ $ @\n @@\n169 COPYRIGHT SIGN\n _____ @\n / ___ \\ @\n / / __| \\ @\n | | (__ |@\n \\ \\___| / @\n \\_____/ @@\n170 FEMININE ORDINAL INDICATOR\n __ _ @\n / _` |@\n \\__,_|@\n |____|@\n $ @\n @@\n171 LEFT-POINTING DOUBLE ANGLE QUOTATION MARK\n ____@\n / / /@\n / / / @\n \\ \\ \\ @\n \\_\\_\\@\n @@\n172 NOT SIGN\n @\n _____ @\n |___ |@\n |_|@\n $ @\n @@\n173 SOFT HYPHEN\n @\n @\n ____ @\n |____|@\n $ @\n @@\n174 REGISTERED SIGN\n _____ @\n / ___ \\ @\n / | _ \\ \\ @\n | | / |@\n \\ |_|_\\ / @\n \\_____/ @@\n175 MACRON\n _____ @\n |_____|@\n $ @\n $ @\n $ @\n @@\n176 DEGREE SIGN\n __ @\n / \\ @\n | () |@\n \\__/ @\n $ @\n @@\n177 PLUS-MINUS SIGN\n _ @\n _| |_ @\n |_ _|@\n _|_|_ @\n |_____|@\n @@\n178 SUPERSCRIPT TWO\n ___ @\n |_ )@\n / / @\n /___|@\n $ @\n @@\n179 SUPERSCRIPT THREE\n ____@\n |__ /@\n |_ \\@\n |___/@\n $ @\n @@\n180 ACUTE ACCENT\n __@\n /_/@\n $ @\n $ @\n $ @\n @@\n181 MICRO SIGN\n @\n _ _ @\n | | | |@\n | |_| |@\n | ._,_|@\n |_| @@\n182 PILCROW SIGN\n _____ @\n / |@\n | (| | |@\n \\__ | |@\n |_|_|@\n @@\n183 MIDDLE DOT\n @\n _ @\n (_)@\n $ @\n $ @\n @@\n184 CEDILLA\n @\n @\n @\n @\n _ @\n )_)@@\n185 SUPERSCRIPT ONE\n _ @\n / |@\n | |@\n |_|@\n $ @\n @@\n186 MASCULINE ORDINAL INDICATOR\n ___ @\n / _ \\@\n \\___/@\n |___|@\n $ @\n @@\n187 RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK\n ____ @\n \\ \\ \\ @\n \\ \\ \\@\n / / /@\n /_/_/ @\n @@\n188 VULGAR FRACTION ONE QUARTER\n _ __ @\n / | / / _ @\n | |/ / | | @\n |_/ /|_ _|@\n /_/ |_| @\n @@\n189 VULGAR FRACTION ONE HALF\n _ __ @\n / | / /__ @\n | |/ /_ )@\n |_/ / / / @\n /_/ /___|@\n @@\n190 VULGAR FRACTION THREE QUARTERS\n ____ __ @\n |__ / / / _ @\n |_ \\/ / | | @\n |___/ /|_ _|@\n /_/ |_| @\n @@\n191 INVERTED QUESTION MARK\n _ @\n (_) @\n | | @\n / /_ @\n \\___|@\n @@\n192 LATIN CAPITAL LETTER A WITH GRAVE\n __ @\n \\_\\ @\n /_\\ @\n / _ \\ @\n /_/ \\_\\@\n @@\n193 LATIN CAPITAL LETTER A WITH ACUTE\n __ @\n /_/ @\n /_\\ @\n / _ \\ @\n /_/ \\_\\@\n @@\n194 LATIN CAPITAL LETTER A WITH CIRCUMFLEX\n //\\ @\n |/_\\| @\n /_\\ @\n / _ \\ @\n /_/ \\_\\@\n @@\n195 LATIN CAPITAL LETTER A WITH TILDE\n /\\/| @\n |/\\/ @\n /_\\ @\n / _ \\ @\n /_/ \\_\\@\n @@\n196 LATIN CAPITAL LETTER A WITH DIAERESIS\n _ _ @\n (_)_(_)@\n /_\\ @\n / _ \\ @\n /_/ \\_\\@\n @@\n197 LATIN CAPITAL LETTER A WITH RING ABOVE\n _ @\n (o) @\n /_\\ @\n / _ \\ @\n /_/ \\_\\@\n @@\n198 LATIN CAPITAL LETTER AE\n ______ @\n / ____|@\n / _ _| @\n / __ |___ @\n /_/ |_____|@\n @@\n199 LATIN CAPITAL LETTER C WITH CEDILLA\n ____ @\n / ___|@\n | | @\n | |___ @\n \\____|@\n )_) @@\n200 LATIN CAPITAL LETTER E WITH GRAVE\n __ @\n _\\_\\_ @\n | ____|@\n | _|_ @\n |_____|@\n @@\n201 LATIN CAPITAL LETTER E WITH ACUTE\n __ @\n _/_/_ @\n | ____|@\n | _|_ @\n |_____|@\n @@\n202 LATIN CAPITAL LETTER E WITH CIRCUMFLEX\n //\\ @\n |/_\\| @\n | ____|@\n | _|_ @\n |_____|@\n @@\n203 LATIN CAPITAL LETTER E WITH DIAERESIS\n _ _ @\n (_)_(_)@\n | ____|@\n | _|_ @\n |_____|@\n @@\n204 LATIN CAPITAL LETTER I WITH GRAVE\n __ @\n \\_\\ @\n |_ _|@\n | | @\n |___|@\n @@\n205 LATIN CAPITAL LETTER I WITH ACUTE\n __ @\n /_/ @\n |_ _|@\n | | @\n |___|@\n @@\n206 LATIN CAPITAL LETTER I WITH CIRCUMFLEX\n //\\ @\n |/_\\|@\n |_ _|@\n | | @\n |___|@\n @@\n207 LATIN CAPITAL LETTER I WITH DIAERESIS\n _ _ @\n (_)_(_)@\n |_ _| @\n | | @\n |___| @\n @@\n208 LATIN CAPITAL LETTER ETH\n ____ @\n | _ \\ @\n _| |_| |@\n |__ __| |@\n |____/ @\n @@\n209 LATIN CAPITAL LETTER N WITH TILDE\n /\\/|@\n |/\\/ @\n | \\| |@\n | .` |@\n |_|\\_|@\n @@\n210 LATIN CAPITAL LETTER O WITH GRAVE\n __ @\n \\_\\ @\n / _ \\ @\n | |_| |@\n \\___/ @\n @@\n211 LATIN CAPITAL LETTER O WITH ACUTE\n __ @\n /_/ @\n / _ \\ @\n | |_| |@\n \\___/ @\n @@\n212 LATIN CAPITAL LETTER O WITH CIRCUMFLEX\n //\\ @\n |/_\\| @\n / _ \\ @\n | |_| |@\n \\___/ @\n @@\n213 LATIN CAPITAL LETTER O WITH TILDE\n /\\/| @\n |/\\/ @\n / _ \\ @\n | |_| |@\n \\___/ @\n @@\n214 LATIN CAPITAL LETTER O WITH DIAERESIS\n _ _ @\n (_)_(_)@\n / _ \\ @\n | |_| |@\n \\___/ @\n @@\n215 MULTIPLICATION SIGN\n @\n @\n /\\/\\@\n > <@\n \\/\\/@\n @@\n216 LATIN CAPITAL LETTER O WITH STROKE\n ____ @\n / _// @\n | |// |@\n | //| |@\n //__/ @\n @@\n217 LATIN CAPITAL LETTER U WITH GRAVE\n __ @\n _\\_\\_ @\n | | | |@\n | |_| |@\n \\___/ @\n @@\n218 LATIN CAPITAL LETTER U WITH ACUTE\n __ @\n _/_/_ @\n | | | |@\n | |_| |@\n \\___/ @\n @@\n219 LATIN CAPITAL LETTER U WITH CIRCUMFLEX\n //\\ @\n |/ \\| @\n | | | |@\n | |_| |@\n \\___/ @\n @@\n220 LATIN CAPITAL LETTER U WITH DIAERESIS\n _ _ @\n (_) (_)@\n | | | |@\n | |_| |@\n \\___/ @\n @@\n221 LATIN CAPITAL LETTER Y WITH ACUTE\n __ @\n __/_/__@\n \\ \\ / /@\n \\ V / @\n |_| @\n @@\n222 LATIN CAPITAL LETTER THORN\n _ @\n | |___ @\n | __ \\@\n | ___/@\n |_| @\n @@\n223 LATIN SMALL LETTER SHARP S\n ___ @\n / _ \\@\n | |/ /@\n | |\\ \\@\n | ||_/@\n |_| @@\n224 LATIN SMALL LETTER A WITH GRAVE\n __ @\n \\_\\_ @\n / _` |@\n | (_| |@\n \\__,_|@\n @@\n225 LATIN SMALL LETTER A WITH ACUTE\n __ @\n /_/_ @\n / _` |@\n | (_| |@\n \\__,_|@\n @@\n226 LATIN SMALL LETTER A WITH CIRCUMFLEX\n //\\ @\n |/_\\| @\n / _` |@\n | (_| |@\n \\__,_|@\n @@\n227 LATIN SMALL LETTER A WITH TILDE\n /\\/| @\n |/\\/_ @\n / _` |@\n | (_| |@\n \\__,_|@\n @@\n228 LATIN SMALL LETTER A WITH DIAERESIS\n _ _ @\n (_)_(_)@\n / _` |@\n | (_| |@\n \\__,_|@\n @@\n229 LATIN SMALL LETTER A WITH RING ABOVE\n __ @\n (()) @\n / _ '|@\n | (_| |@\n \\__,_|@\n @@\n230 LATIN SMALL LETTER AE\n @\n __ ____ @\n / _` _ \\@\n | (_| __/@\n \\__,____|@\n @@\n231 LATIN SMALL LETTER C WITH CEDILLA\n @\n ___ @\n / __|@\n | (__ @\n \\___|@\n )_) @@\n232 LATIN SMALL LETTER E WITH GRAVE\n __ @\n \\_\\ @\n / _ \\@\n | __/@\n \\___|@\n @@\n233 LATIN SMALL LETTER E WITH ACUTE\n __ @\n /_/ @\n / _ \\@\n | __/@\n \\___|@\n @@\n234 LATIN SMALL LETTER E WITH CIRCUMFLEX\n //\\ @\n |/_\\|@\n / _ \\@\n | __/@\n \\___|@\n @@\n235 LATIN SMALL LETTER E WITH DIAERESIS\n _ _ @\n (_)_(_)@\n / _ \\ @\n | __/ @\n \\___| @\n @@\n236 LATIN SMALL LETTER I WITH GRAVE\n __ @\n \\_\\@\n | |@\n | |@\n |_|@\n @@\n237 LATIN SMALL LETTER I WITH ACUTE\n __@\n /_/@\n | |@\n | |@\n |_|@\n @@\n238 LATIN SMALL LETTER I WITH CIRCUMFLEX\n //\\ @\n |/_\\|@\n | | @\n | | @\n |_| @\n @@\n239 LATIN SMALL LETTER I WITH DIAERESIS\n _ _ @\n (_)_(_)@\n | | @\n | | @\n |_| @\n @@\n240 LATIN SMALL LETTER ETH\n /\\/\\ @\n > < @\n _\\/\\ |@\n / __` |@\n \\____/ @\n @@\n241 LATIN SMALL LETTER N WITH TILDE\n /\\/| @\n |/\\/ @\n | '_ \\ @\n | | | |@\n |_| |_|@\n @@\n242 LATIN SMALL LETTER O WITH GRAVE\n __ @\n \\_\\ @\n / _ \\ @\n | (_) |@\n \\___/ @\n @@\n243 LATIN SMALL LETTER O WITH ACUTE\n __ @\n /_/ @\n / _ \\ @\n | (_) |@\n \\___/ @\n @@\n244 LATIN SMALL LETTER O WITH CIRCUMFLEX\n //\\ @\n |/_\\| @\n / _ \\ @\n | (_) |@\n \\___/ @\n @@\n245 LATIN SMALL LETTER O WITH TILDE\n /\\/| @\n |/\\/ @\n / _ \\ @\n | (_) |@\n \\___/ @\n @@\n246 LATIN SMALL LETTER O WITH DIAERESIS\n _ _ @\n (_)_(_)@\n / _ \\ @\n | (_) |@\n \\___/ @\n @@\n247 DIVISION SIGN\n @\n _ @\n _(_)_ @\n |_____|@\n (_) @\n @@\n248 LATIN SMALL LETTER O WITH STROKE\n @\n ____ @\n / _//\\ @\n | (//) |@\n \\//__/ @\n @@\n249 LATIN SMALL LETTER U WITH GRAVE\n __ @\n _\\_\\_ @\n | | | |@\n | |_| |@\n \\__,_|@\n @@\n250 LATIN SMALL LETTER U WITH ACUTE\n __ @\n _/_/_ @\n | | | |@\n | |_| |@\n \\__,_|@\n @@\n251 LATIN SMALL LETTER U WITH CIRCUMFLEX\n //\\ @\n |/ \\| @\n | | | |@\n | |_| |@\n \\__,_|@\n @@\n252 LATIN SMALL LETTER U WITH DIAERESIS\n _ _ @\n (_) (_)@\n | | | |@\n | |_| |@\n \\__,_|@\n @@\n253 LATIN SMALL LETTER Y WITH ACUTE\n __ @\n _/_/_ @\n | | | |@\n | |_| |@\n \\__, |@\n |___/ @@\n254 LATIN SMALL LETTER THORN\n _ @\n | |__ @\n | '_ \\ @\n | |_) |@\n | .__/ @\n |_| @@\n255 LATIN SMALL LETTER Y WITH DIAERESIS\n _ _ @\n (_) (_)@\n | | | |@\n | |_| |@\n \\__, |@\n |___/ @@\n0x0100 LATIN CAPITAL LETTER A WITH MACRON\n ____ @\n /___/ @\n /_\\ @\n / _ \\ @\n /_/ \\_\\@\n @@\n0x0101 LATIN SMALL LETTER A WITH MACRON\n ___ @\n /_ _/@\n / _` |@\n | (_| |@\n \\__,_|@\n @@\n0x0102 LATIN CAPITAL LETTER A WITH BREVE\n _ _ @\n \\\\_// @\n /_\\ @\n / _ \\ @\n /_/ \\_\\@\n @@\n0x0103 LATIN SMALL LETTER A WITH BREVE\n \\_/ @\n ___ @\n / _` |@\n | (_| |@\n \\__,_|@\n @@\n0x0104 LATIN CAPITAL LETTER A WITH OGONEK\n @\n _ @\n /_\\ @\n / _ \\ @\n /_/ \\_\\@\n (_(@@\n0x0105 LATIN SMALL LETTER A WITH OGONEK\n @\n __ _ @\n / _` |@\n | (_| |@\n \\__,_|@\n (_(@@\n0x0106 LATIN CAPITAL LETTER C WITH ACUTE\n __ @\n _/_/ @\n / ___|@\n | |___ @\n \\____|@\n @@\n0x0107 LATIN SMALL LETTER C WITH ACUTE\n __ @\n /__/@\n / __|@\n | (__ @\n \\___|@\n @@\n0x0108 LATIN CAPITAL LETTER C WITH CIRCUMFLEX\n /\\ @\n _//\\\\@\n / ___|@\n | |___ @\n \\____|@\n @@\n0x0109 LATIN SMALL LETTER C WITH CIRCUMFLEX\n /\\ @\n /_\\ @\n / __|@\n | (__ @\n \\___|@\n @@\n0x010A LATIN CAPITAL LETTER C WITH DOT ABOVE\n [] @\n ____ @\n / ___|@\n | |___ @\n \\____|@\n @@\n0x010B LATIN SMALL LETTER C WITH DOT ABOVE\n [] @\n ___ @\n / __|@\n | (__ @\n \\___|@\n @@\n0x010C LATIN CAPITAL LETTER C WITH CARON\n \\\\// @\n _\\/_ @\n / ___|@\n | |___ @\n \\____|@\n @@\n0x010D LATIN SMALL LETTER C WITH CARON\n \\\\//@\n _\\/ @\n / __|@\n | (__ @\n \\___|@\n @@\n0x010E LATIN CAPITAL LETTER D WITH CARON\n \\\\// @\n __\\/ @\n | _ \\ @\n | |_| |@\n |____/ @\n @@\n0x010F LATIN SMALL LETTER D WITH CARON\n \\/ _ @\n __| |@\n / _` |@\n | (_| |@\n \\__,_|@\n @@\n0x0110 LATIN CAPITAL LETTER D WITH STROKE\n ____ @\n |_ __ \\ @\n /| |/ | |@\n /|_|/_| |@\n |_____/ @\n @@\n0x0111 LATIN SMALL LETTER D WITH STROKE\n ---|@\n __| |@\n / _` |@\n | (_| |@\n \\__,_|@\n @@\n0x0112 LATIN CAPITAL LETTER E WITH MACRON\n ____ @\n /___/ @\n | ____|@\n | _|_ @\n |_____|@\n @@\n0x0113 LATIN SMALL LETTER E WITH MACRON\n ____@\n /_ _/@\n / _ \\ @\n | __/ @\n \\___| @\n @@\n0x0114 LATIN CAPITAL LETTER E WITH BREVE\n _ _ @\n \\\\_// @\n | ____|@\n | _|_ @\n |_____|@\n @@\n0x0115 LATIN SMALL LETTER E WITH BREVE\n \\\\ //@\n -- @\n / _ \\ @\n | __/ @\n \\___| @\n @@\n0x0116 LATIN CAPITAL LETTER E WITH DOT ABOVE\n [] @\n _____ @\n | ____|@\n | _|_ @\n |_____|@\n @@\n0x0117 LATIN SMALL LETTER E WITH DOT ABOVE\n [] @\n __ @\n / _ \\@\n | __/@\n \\___|@\n @@\n0x0118 LATIN CAPITAL LETTER E WITH OGONEK\n @\n _____ @\n | ____|@\n | _|_ @\n |_____|@\n (__(@@\n0x0119 LATIN SMALL LETTER E WITH OGONEK\n @\n ___ @\n / _ \\@\n | __/@\n \\___|@\n (_(@@\n0x011A LATIN CAPITAL LETTER E WITH CARON\n \\\\// @\n __\\/_ @\n | ____|@\n | _|_ @\n |_____|@\n @@\n0x011B LATIN SMALL LETTER E WITH CARON\n \\\\//@\n \\/ @\n / _ \\@\n | __/@\n \\___|@\n @@\n0x011C LATIN CAPITAL LETTER G WITH CIRCUMFLEX\n _/\\_ @\n / ___|@\n | | _ @\n | |_| |@\n \\____|@\n @@\n0x011D LATIN SMALL LETTER G WITH CIRCUMFLEX\n /\\ @\n _/_ \\@\n / _` |@\n | (_| |@\n \\__, |@\n |___/ @@\n0x011E LATIN CAPITAL LETTER G WITH BREVE\n _\\/_ @\n / ___|@\n | | _ @\n | |_| |@\n \\____|@\n @@\n0x011F LATIN SMALL LETTER G WITH BREVE\n \\___/ @\n __ _ @\n / _` |@\n | (_| |@\n \\__, |@\n |___/ @@\n0x0120 LATIN CAPITAL LETTER G WITH DOT ABOVE\n _[]_ @\n / ___|@\n | | _ @\n | |_| |@\n \\____|@\n @@\n0x0121 LATIN SMALL LETTER G WITH DOT ABOVE\n [] @\n __ _ @\n / _` |@\n | (_| |@\n \\__, |@\n |___/ @@\n0x0122 LATIN CAPITAL LETTER G WITH CEDILLA\n ____ @\n / ___|@\n | | _ @\n | |_| |@\n \\____|@\n )__) @@\n0x0123 LATIN SMALL LETTER G WITH CEDILLA\n @\n __ _ @\n / _` |@\n | (_| |@\n \\__, |@\n |_))))@@\n0x0124 LATIN CAPITAL LETTER H WITH CIRCUMFLEX\n _/ \\_ @\n | / \\ |@\n | |_| |@\n | _ |@\n |_| |_|@\n @@\n0x0125 LATIN SMALL LETTER H WITH CIRCUMFLEX\n _ /\\ @\n | |//\\ @\n | '_ \\ @\n | | | |@\n |_| |_|@\n @@\n0x0126 LATIN CAPITAL LETTER H WITH STROKE\n _ _ @\n | |=| |@\n | |_| |@\n | _ |@\n |_| |_|@\n @@\n0x0127 LATIN SMALL LETTER H WITH STROKE\n _ @\n |=|__ @\n | '_ \\ @\n | | | |@\n |_| |_|@\n @@\n0x0128 LATIN CAPITAL LETTER I WITH TILDE\n /\\//@\n |_ _|@\n | | @\n | | @\n |___|@\n @@\n0x0129 LATIN SMALL LETTER I WITH TILDE\n @\n /\\/@\n | |@\n | |@\n |_|@\n @@\n0x012A LATIN CAPITAL LETTER I WITH MACRON\n /___/@\n |_ _|@\n | | @\n | | @\n |___|@\n @@\n0x012B LATIN SMALL LETTER I WITH MACRON\n ____@\n /___/@\n | | @\n | | @\n |_| @\n @@\n0x012C LATIN CAPITAL LETTER I WITH BREVE\n \\__/@\n |_ _|@\n | | @\n | | @\n |___|@\n @@\n0x012D LATIN SMALL LETTER I WITH BREVE\n @\n \\_/@\n | |@\n | |@\n |_|@\n @@\n0x012E LATIN CAPITAL LETTER I WITH OGONEK\n ___ @\n |_ _|@\n | | @\n | | @\n |___|@\n (__(@@\n0x012F LATIN SMALL LETTER I WITH OGONEK\n _ @\n (_) @\n | | @\n | | @\n |_|_@\n (_(@@\n0x0130 LATIN CAPITAL LETTER I WITH DOT ABOVE\n _[] @\n |_ _|@\n | | @\n | | @\n |___|@\n @@\n0x0131 LATIN SMALL LETTER DOTLESS I\n @\n _ @\n | |@\n | |@\n |_|@\n @@\n0x0132 LATIN CAPITAL LIGATURE IJ\n ___ _ @\n |_ _|| |@\n | | | |@\n | |_| |@\n |__|__/ @\n @@\n0x0133 LATIN SMALL LIGATURE IJ\n _ _ @\n (_) (_)@\n | | | |@\n | | | |@\n |_|_/ |@\n |__/ @@\n0x0134 LATIN CAPITAL LETTER J WITH CIRCUMFLEX\n /\\ @\n /_\\|@\n _ | | @\n | |_| | @\n \\___/ @\n @@\n0x0135 LATIN SMALL LETTER J WITH CIRCUMFLEX\n /\\@\n /_\\@\n | |@\n | |@\n _/ |@\n |__/ @@\n0x0136 LATIN CAPITAL LETTER K WITH CEDILLA\n _ _ @\n | |/ / @\n | ' / @\n | . \\ @\n |_|\\_\\ @\n )__)@@\n0x0137 LATIN SMALL LETTER K WITH CEDILLA\n _ @\n | | __@\n | |/ /@\n | < @\n |_|\\_\\@\n )_)@@\n0x0138 LATIN SMALL LETTER KRA\n @\n _ __ @\n | |/ \\@\n | < @\n |_|\\_\\@\n @@\n0x0139 LATIN CAPITAL LETTER L WITH ACUTE\n _ //@\n | | // @\n | | @\n | |___ @\n |_____|@\n @@\n0x013A LATIN SMALL LETTER L WITH ACUTE\n //@\n | |@\n | |@\n | |@\n |_|@\n @@\n0x013B LATIN CAPITAL LETTER L WITH CEDILLA\n _ @\n | | @\n | | @\n | |___ @\n |_____|@\n )__)@@\n0x013C LATIN SMALL LETTER L WITH CEDILLA\n _ @\n | | @\n | | @\n | | @\n |_| @\n )_)@@\n0x013D LATIN CAPITAL LETTER L WITH CARON\n _ \\\\//@\n | | \\/ @\n | | @\n | |___ @\n |_____|@\n @@\n0x013E LATIN SMALL LETTER L WITH CARON\n _ \\\\//@\n | | \\/ @\n | | @\n | | @\n |_| @\n @@\n0x013F LATIN CAPITAL LETTER L WITH MIDDLE DOT\n _ @\n | | @\n | | [] @\n | |___ @\n |_____|@\n @@\n0x0140 LATIN SMALL LETTER L WITH MIDDLE DOT\n _ @\n | | @\n | | []@\n | | @\n |_| @\n @@\n0x0141 LATIN CAPITAL LETTER L WITH STROKE\n __ @\n | // @\n |//| @\n // |__ @\n |_____|@\n @@\n0x0142 LATIN SMALL LETTER L WITH STROKE\n _ @\n | |@\n |//@\n //|@\n |_|@\n @@\n0x0143 LATIN CAPITAL LETTER N WITH ACUTE\n _/ /_ @\n | \\ | |@\n | \\| |@\n | |\\ |@\n |_| \\_|@\n @@\n0x0144 LATIN SMALL LETTER N WITH ACUTE\n _ @\n _ /_/ @\n | '_ \\ @\n | | | |@\n |_| |_|@\n @@\n0x0145 LATIN CAPITAL LETTER N WITH CEDILLA\n _ _ @\n | \\ | |@\n | \\| |@\n | |\\ |@\n |_| \\_|@\n )_) @@\n0x0146 LATIN SMALL LETTER N WITH CEDILLA\n @\n _ __ @\n | '_ \\ @\n | | | |@\n |_| |_|@\n )_) @@\n0x0147 LATIN CAPITAL LETTER N WITH CARON\n _\\/ _ @\n | \\ | |@\n | \\| |@\n | |\\ |@\n |_| \\_|@\n @@\n0x0148 LATIN SMALL LETTER N WITH CARON\n \\\\// @\n _\\/_ @\n | '_ \\ @\n | | | |@\n |_| |_|@\n @@\n0x0149 LATIN SMALL LETTER N PRECEDED BY APOSTROPHE\n @\n _ __ @\n ( )| '_\\ @\n |/| | | |@\n |_| |_|@\n @@\n0x014A LATIN CAPITAL LETTER ENG\n _ _ @\n | \\ | |@\n | \\| |@\n | |\\ |@\n |_| \\ |@\n )_)@@\n0x014B LATIN SMALL LETTER ENG\n _ __ @\n | '_ \\ @\n | | | |@\n |_| | |@\n | |@\n |__ @@\n0x014C LATIN CAPITAL LETTER O WITH MACRON\n ____ @\n /_ _/ @\n / _ \\ @\n | (_) |@\n \\___/ @\n @@\n0x014D LATIN SMALL LETTER O WITH MACRON\n ____ @\n /_ _/ @\n / _ \\ @\n | (_) |@\n \\___/ @\n @@\n0x014E LATIN CAPITAL LETTER O WITH BREVE\n \\ / @\n _-_ @\n / _ \\ @\n | |_| |@\n \\___/ @\n @@\n0x014F LATIN SMALL LETTER O WITH BREVE\n \\ / @\n _-_ @\n / _ \\ @\n | |_| |@\n \\___/ @\n @@\n0x0150 LATIN CAPITAL LETTER O WITH DOUBLE ACUTE\n ___ @\n /_/_/@\n / _ \\ @\n | |_| |@\n \\___/ @\n @@\n0x0151 LATIN SMALL LETTER O WITH DOUBLE ACUTE\n ___ @\n /_/_/@\n / _ \\ @\n | |_| |@\n \\___/ @\n @@\n0x0152 LATIN CAPITAL LIGATURE OE\n ___ ___ @\n / _ \\| __|@\n | | | | | @\n | |_| | |__@\n \\___/|____@\n @@\n0x0153 LATIN SMALL LIGATURE OE\n @\n ___ ___ @\n / _ \\ / _ \\@\n | (_) | __/@\n \\___/ \\___|@\n @@\n0x0154 LATIN CAPITAL LETTER R WITH ACUTE\n _/_/ @\n | _ \\ @\n | |_) |@\n | _ < @\n |_| \\_\\@\n @@\n0x0155 LATIN SMALL LETTER R WITH ACUTE\n __@\n _ /_/@\n | '__|@\n | | @\n |_| @\n @@\n0x0156 LATIN CAPITAL LETTER R WITH CEDILLA\n ____ @\n | _ \\ @\n | |_) |@\n | _ < @\n |_| \\_\\@\n )_) @@\n0x0157 LATIN SMALL LETTER R WITH CEDILLA\n @\n _ __ @\n | '__|@\n | | @\n |_| @\n )_) @@\n0x0158 LATIN CAPITAL LETTER R WITH CARON\n _\\_/ @\n | _ \\ @\n | |_) |@\n | _ < @\n |_| \\_\\@\n @@\n0x0159 LATIN SMALL LETTER R WITH CARON\n \\\\// @\n _\\/_ @\n | '__|@\n | | @\n |_| @\n @@\n0x015A LATIN CAPITAL LETTER S WITH ACUTE\n _/_/ @\n / ___| @\n \\___ \\ @\n ___) |@\n |____/ @\n @@\n0x015B LATIN SMALL LETTER S WITH ACUTE\n __@\n _/_/@\n / __|@\n \\__ \\@\n |___/@\n @@\n0x015C LATIN CAPITAL LETTER S WITH CIRCUMFLEX\n _/\\_ @\n / ___| @\n \\___ \\ @\n ___) |@\n |____/ @\n @@\n0x015D LATIN SMALL LETTER S WITH CIRCUMFLEX\n @\n /_\\_@\n / __|@\n \\__ \\@\n |___/@\n @@\n0x015E LATIN CAPITAL LETTER S WITH CEDILLA\n ____ @\n / ___| @\n \\___ \\ @\n ___) |@\n |____/ @\n )__)@@\n0x015F LATIN SMALL LETTER S WITH CEDILLA\n @\n ___ @\n / __|@\n \\__ \\@\n |___/@\n )_)@@\n0x0160 LATIN CAPITAL LETTER S WITH CARON\n _\\_/ @\n / ___| @\n \\___ \\ @\n ___) |@\n |____/ @\n @@\n0x0161 LATIN SMALL LETTER S WITH CARON\n \\\\//@\n _\\/ @\n / __|@\n \\__ \\@\n |___/@\n @@\n0x0162 LATIN CAPITAL LETTER T WITH CEDILLA\n _____ @\n |_ _|@\n | | @\n | | @\n |_| @\n )__)@@\n0x0163 LATIN SMALL LETTER T WITH CEDILLA\n _ @\n | |_ @\n | __|@\n | |_ @\n \\__|@\n )_)@@\n0x0164 LATIN CAPITAL LETTER T WITH CARON\n _____ @\n |_ _|@\n | | @\n | | @\n |_| @\n @@\n0x0165 LATIN SMALL LETTER T WITH CARON\n \\/ @\n | |_ @\n | __|@\n | |_ @\n \\__|@\n @@\n0x0166 LATIN CAPITAL LETTER T WITH STROKE\n _____ @\n |_ _|@\n | | @\n -|-|- @\n |_| @\n @@\n0x0167 LATIN SMALL LETTER T WITH STROKE\n _ @\n | |_ @\n | __|@\n |-|_ @\n \\__|@\n @@\n0x0168 LATIN CAPITAL LETTER U WITH TILDE\n @\n _/\\/_ @\n | | | |@\n | |_| |@\n \\___/ @\n @@\n0x0169 LATIN SMALL LETTER U WITH TILDE\n @\n _/\\/_ @\n | | | |@\n | |_| |@\n \\__,_|@\n @@\n0x016A LATIN CAPITAL LETTER U WITH MACRON\n ____ @\n /__ _/@\n | | | |@\n | |_| |@\n \\___/ @\n @@\n0x016B LATIN SMALL LETTER U WITH MACRON\n ____ @\n / _ /@\n | | | |@\n | |_| |@\n \\__,_|@\n @@\n0x016C LATIN CAPITAL LETTER U WITH BREVE\n @\n \\_/_ @\n | | | |@\n | |_| |@\n \\____|@\n @@\n0x016D LATIN SMALL LETTER U WITH BREVE\n @\n \\_/_ @\n | | | |@\n | |_| |@\n \\__,_|@\n @@\n0x016E LATIN CAPITAL LETTER U WITH RING ABOVE\n O @\n __ _ @\n | | | |@\n | |_| |@\n \\___/ @\n @@\n0x016F LATIN SMALL LETTER U WITH RING ABOVE\n O @\n __ __ @\n | | | |@\n | |_| |@\n \\__,_|@\n @@\n0x0170 LATIN CAPITAL LETTER U WITH DOUBLE ACUTE\n -- --@\n /_//_/@\n | | | |@\n | |_| |@\n \\___/ @\n @@\n0x0171 LATIN SMALL LETTER U WITH DOUBLE ACUTE\n ____@\n _/_/_/@\n | | | |@\n | |_| |@\n \\__,_|@\n @@\n0x0172 LATIN CAPITAL LETTER U WITH OGONEK\n _ _ @\n | | | |@\n | | | |@\n | |_| |@\n \\___/ @\n (__(@@\n0x0173 LATIN SMALL LETTER U WITH OGONEK\n @\n _ _ @\n | | | |@\n | |_| |@\n \\__,_|@\n (_(@@\n0x0174 LATIN CAPITAL LETTER W WITH CIRCUMFLEX\n __ /\\ __@\n \\ \\ //\\\\/ /@\n \\ \\ /\\ / / @\n \\ V V / @\n \\_/\\_/ @\n @@\n0x0175 LATIN SMALL LETTER W WITH CIRCUMFLEX\n /\\ @\n __ //\\\\__@\n \\ \\ /\\ / /@\n \\ V V / @\n \\_/\\_/ @\n @@\n0x0176 LATIN CAPITAL LETTER Y WITH CIRCUMFLEX\n /\\ @\n __//\\\\ @\n \\ \\ / /@\n \\ V / @\n |_| @\n @@\n0x0177 LATIN SMALL LETTER Y WITH CIRCUMFLEX\n /\\ @\n //\\\\ @\n | | | |@\n | |_| |@\n \\__, |@\n |___/ @@\n0x0178 LATIN CAPITAL LETTER Y WITH DIAERESIS\n [] []@\n __ _@\n \\ \\ / /@\n \\ V / @\n |_| @\n @@\n0x0179 LATIN CAPITAL LETTER Z WITH ACUTE\n __/_/@\n |__ /@\n / / @\n / /_ @\n /____|@\n @@\n0x017A LATIN SMALL LETTER Z WITH ACUTE\n _ @\n _/_/@\n |_ /@\n / / @\n /___|@\n @@\n0x017B LATIN CAPITAL LETTER Z WITH DOT ABOVE\n __[]_@\n |__ /@\n / / @\n / /_ @\n /____|@\n @@\n0x017C LATIN SMALL LETTER Z WITH DOT ABOVE\n [] @\n ____@\n |_ /@\n / / @\n /___|@\n @@\n0x017D LATIN CAPITAL LETTER Z WITH CARON\n _\\_/_@\n |__ /@\n / / @\n / /_ @\n /____|@\n @@\n0x017E LATIN SMALL LETTER Z WITH CARON\n \\\\//@\n _\\/_@\n |_ /@\n / / @\n /___|@\n @@\n0x017F LATIN SMALL LETTER LONG S\n __ @\n / _|@\n |-| | @\n |-| | @\n |_| @\n @@\n0x02C7 CARON\n \\\\//@\n \\/ @\n $@\n $@\n $@\n $@@\n0x02D8 BREVE\n \\\\_//@\n \\_/ @\n $@\n $@\n $@\n $@@\n0x02D9 DOT ABOVE\n []@\n $@\n $@\n $@\n $@\n $@@\n0x02DB OGONEK\n $@\n $@\n $@\n $@\n $@\n )_) @@\n0x02DD DOUBLE ACUTE ACCENT\n _ _ @\n /_/_/@\n $@\n $@\n $@\n $@@\n0xCA0 KANNADA LETTER TTHA\n _____)@\n /_ ___/@\n / _ \\ @\n | (_) | @\n $\\___/$ @\n @@\n ");const l0=new ke,u0=process.cwd(),p0=o.join(u0,"qumra.config.json");function h0(e,t){s.existsSync(p0)||(console.error("Error: qumra.config.json not found!"),process.exit(1));const n=JSON.parse(s.readFileSync(p0,"utf-8")),r=n.version;let[i,o,a]=n.version.split(".").map(Number);try{if(t)switch(e){case"patch":a+=1;break;case"minor":o+=1,a=0;break;case"major":i+=1,o=0,a=0}else switch(e){case"patch":a=Math.max(0,a-1);break;case"minor":o>0&&(o-=1,a=0);break;case"major":i>0&&(i-=1,o=0,a=0)}n.version=`${i}.${o}.${a}`,s.writeFileSync(p0,JSON.stringify(n,null,2),"utf-8"),console.log(`Updated version to ${n.version}`)}catch(e){console.error("Error updating version:",e.message),n.version=r,s.writeFileSync(p0,JSON.stringify(n,null,2),"utf-8"),console.log(`Reverted to previous version: ${r}`)}}l0.name("version").description("Update project version (patch, minor, major)"),l0.command("patch").description("Increment the patch version").action((()=>h0("patch",!0))),l0.command("minor").description("Increment the minor version").action((()=>h0("minor",!0))),l0.command("major").description("Increment the major version").action((()=>h0("major",!0))),l0.command("unpatch").description("Decrement the patch version").action((()=>h0("patch",!1))),l0.command("unminor").description("Decrement the minor version").action((()=>h0("minor",!1))),l0.command("unmajor").description("Decrement the major version").action((()=>h0("major",!1)));const d0=new ke;d0.version(ef).description("CLI to create a new project"),d0.command("status").description("cli status").action((async()=>{const e=(e,t)=>e.split("\n").map((e=>{const n=Math.max(0,Math.floor((t-e.length)/2));return" ".repeat(n)+e})).join("\n"),t=100,n=df.textSync("Qumra Cloud CLI",{font:"Standard",horizontalLayout:"default",verticalLayout:"default",width:t,whitespaceBreak:!0}),r=df.textSync("Version 1.0.0",{font:"Standard",horizontalLayout:"default",verticalLayout:"default",width:t,whitespaceBreak:!0}),i=e(n,t),s=e(r,t),o=e("\n Welcome to Qumra Cloud CLI!\n \n At Qumra, we offer innovative cloud solutions to streamline your tech needs.\n Our tools are designed to make technology work for you with ease and efficiency.\n \n Learn more about our partners and how we collaborate to deliver the best:\n https://partners.qumra.cloud\n ",t);console.log(_t.green(i)),console.log(_t.green(s)),console.log(_t.green(o))})),d0.command("create-new-app").description("Create a new project").action(gf),d0.command("build").description("Build a project").action((()=>{const e=process.cwd(),t=o.join(e,"src","views"),n=o.join(e,"build"),r=o.join(n,"views.zip");s.existsSync(t)||(console.log(_t.red('Error: The "views" folder does not exist.')),process.exit(1)),s.existsSync(n)||s.mkdirSync(n);const i=zr('Compressing the "views" folder...').start(),a=s.createWriteStream(r),c=UO("zip",{zlib:{level:9}});a.on("close",(()=>{i.succeed(_t.blue(`"views" folder compressed successfully into ${r}`))})),c.on("warning",(e=>{if("ENOENT"!==e.code)throw e;console.warn(e)})),c.on("error",(e=>{throw i.fail(_t.red(`Failed to compress "views" folder: ${e.message}`)),e})),c.pipe(a),c.directory(t,!1),c.finalize()})),d0.command("publish").description("Publish your project").action((async function(){const e=function(){s.existsSync(YO)||(console.log('File "qumra.config.json" not found!'),process.exit(1));const e=s.readFileSync(YO,"utf-8");try{return JSON.parse(e)}catch(e){console.log(chalk.red('Failed to parse "qumra.config.json". Invalid JSON format.',e.message))}}(),t=zr("Checking files...").start();try{const n=await qO(GO),r=await qO(VO,"views"),i=await qO(KO,"locales"),a={...r,...i},c=Object.keys(a),l=Date.now();d.exec("npm run build",(r=>{r&&t.fail(r),HO(c,t).then((r=>{(async function(e,t){try{return(await of.post("/themes/uploadRequest",{paths:e,config:t})).data}catch(e){console.log("🚀 ~ uploadRequest ~ error:",e)}})(r.paths,e).then((i=>{(async function(e,t,n){const r=new sp;r.append("encryptionKey",e),r.append("paths",JSON.stringify(t));for(const[e,t]of Object.entries(n))r.append("files",s.createReadStream(t),{filename:o.basename(t),filepath:e}),r.append("filePaths",e);const i=zr(_t.cyan("Uploading theme...")).start();try{const e=await $O.post("/theme/upload",r,{onUploadProgress:e=>{const t=Math.round(100*e.loaded/e.total);i.text=_t.cyan(`Uploading theme... ${t}%`)}});return i.succeed(_t.green("Theme Files Upload successful!")),e.data}catch(e){throw i.fail(_t.red("Upload failed.")),console.error("🚀 ~ uploadTheme ~ error:",e.message),e.message}})(i.encryptionKey,r.paths,a).then((r=>{(async function(e,t,n){const r=new sp;r.append("encryptionKey",e),r.append("paths",JSON.stringify(t));for(const[e,t]of Object.entries(n))r.append("files",s.createReadStream(t),{filename:o.basename(t),filepath:e}),r.append("filePaths",e);const i=zr(_t.cyan("Uploading Assets Files...")).start();try{const e=await zO.post("/upload/assets",r,{onUploadProgress:e=>{const t=Math.round(100*e.loaded/e.total);i.text=_t.cyan(`Uploading theme... ${t}%`)}});return i.succeed(_t.green("Upload successful!")),e.data}catch(e){i.fail(_t.red("Assets Files Upload failed.")),console.error("🚀 ~ uploadAssets ~ error:",e.message)}})(i.encryptionKey,Object.keys(n),n).then((()=>{const n=((Date.now()-l)/1e3).toFixed(2);t.succeed(`Version ${e.version} upload completed successfully in ${n} seconds! 🎉🚀`)}))}))}))})).catch((e=>{}))}))}catch(e){console.error(`Failed to publish files - Error: ${e.message}`)}})),d0.command("login").description("developer login").action(c0),d0.addCommand($J),d0.addCommand(l0),d0.command("save").action((async()=>{await sf("token"),await rf("token",{test:"asdasdasd"})})),d0.parse(process.argv);
|
|
389
|
+
*/var vX=s,bX=S,_X=d.spawn,wX=xX;function xX(e){e=e||{};var t,n,r=this,i=x,s=E,o={},a=!1,c={"User-Agent":"node-XMLHttpRequest",Accept:"*/*"},l=Object.assign({},c),u=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","content-transfer-encoding","cookie","cookie2","date","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"],p=["TRACE","TRACK","CONNECT"],h=!1,d=!1,f=!1,m={};this.UNSENT=0,this.OPENED=1,this.HEADERS_RECEIVED=2,this.LOADING=3,this.DONE=4,this.readyState=this.UNSENT,this.onreadystatechange=null,this.responseText="",this.responseXML="",this.status=null,this.statusText=null;this.open=function(e,t,n,r,i){if(this.abort(),d=!1,f=!1,!function(e){return e&&-1===p.indexOf(e)}(e))throw new Error("SecurityError: Request method not allowed");o={method:e,url:t.toString(),async:"boolean"!=typeof n||n,user:r||null,password:i||null},g(this.OPENED)},this.setDisableHeaderCheck=function(e){a=e},this.setRequestHeader=function(e,t){if(this.readyState!=this.OPENED)throw new Error("INVALID_STATE_ERR: setRequestHeader can only be called when state is OPEN");if(!function(e){return a||e&&-1===u.indexOf(e.toLowerCase())}(e))return console.warn('Refused to set unsafe header "'+e+'"'),!1;if(h)throw new Error("INVALID_STATE_ERR: send flag is true");return l[e]=t,!0},this.getResponseHeader=function(e){return"string"==typeof e&&this.readyState>this.OPENED&&n.headers[e.toLowerCase()]&&!d?n.headers[e.toLowerCase()]:null},this.getAllResponseHeaders=function(){if(this.readyState<this.HEADERS_RECEIVED||d)return"";var e="";for(var t in n.headers)"set-cookie"!==t&&"set-cookie2"!==t&&(e+=t+": "+n.headers[t]+"\r\n");return e.substr(0,e.length-2)},this.getRequestHeader=function(e){return"string"==typeof e&&l[e]?l[e]:""},this.send=function(a){if(this.readyState!=this.OPENED)throw new Error("INVALID_STATE_ERR: connection must be opened before send() is called");if(h)throw new Error("INVALID_STATE_ERR: send has already been called");var c,u=!1,p=!1,f=bX.parse(o.url);switch(f.protocol){case"https:":u=!0;case"http:":c=f.hostname;break;case"file:":p=!0;break;case void 0:case"":c="localhost";break;default:throw new Error("Protocol not supported.")}if(p){if("GET"!==o.method)throw new Error("XMLHttpRequest: Only GET method is supported");if(o.async)vX.readFile(unescape(f.pathname),"utf8",(function(e,t){e?r.handleError(e,e.errno||-1):(r.status=200,r.responseText=t,g(r.DONE))}));else try{this.responseText=vX.readFileSync(unescape(f.pathname),"utf8"),this.status=200,g(r.DONE)}catch(e){this.handleError(e,e.errno||-1)}}else{var m=f.port||(u?443:80),y=f.pathname+(f.search?f.search:"");if(l.Host=c,u&&443===m||80===m||(l.Host+=":"+f.port),o.user){void 0===o.password&&(o.password="");var v=new Buffer(o.user+":"+o.password);l.Authorization="Basic "+v.toString("base64")}"GET"===o.method||"HEAD"===o.method?a=null:a?(l["Content-Length"]=Buffer.isBuffer(a)?a.length:Buffer.byteLength(a),l["Content-Type"]||(l["Content-Type"]="text/plain;charset=UTF-8")):"POST"===o.method&&(l["Content-Length"]=0);var b=e.agent||!1,_={host:c,port:m,path:y,method:o.method,headers:l,agent:b};if(u&&(_.pfx=e.pfx,_.key=e.key,_.passphrase=e.passphrase,_.cert=e.cert,_.ca=e.ca,_.ciphers=e.ciphers,_.rejectUnauthorized=!1!==e.rejectUnauthorized),d=!1,o.async){var w=u?s.request:i.request;h=!0,r.dispatchEvent("readystatechange");var x=function(i){if(302===(n=i).statusCode||303===n.statusCode||307===n.statusCode){o.url=n.headers.location;var s=bX.parse(o.url);c=s.hostname;var a={hostname:s.hostname,port:s.port,path:s.path,method:303===n.statusCode?"GET":o.method,headers:l};return u&&(a.pfx=e.pfx,a.key=e.key,a.passphrase=e.passphrase,a.cert=e.cert,a.ca=e.ca,a.ciphers=e.ciphers,a.rejectUnauthorized=!1!==e.rejectUnauthorized),void(t=w(a,x).on("error",E)).end()}n&&n.setEncoding&&n.setEncoding("utf8"),g(r.HEADERS_RECEIVED),r.status=n.statusCode,n.on("data",(function(e){e&&(r.responseText+=e),h&&g(r.LOADING)})),n.on("end",(function(){h&&(h=!1,g(r.DONE))})),n.on("error",(function(e){r.handleError(e)}))},E=function(e){r.handleError(e)};t=w(_,x).on("error",E),e.autoUnref&&t.on("socket",(e=>{e.unref()})),a&&t.write(a),t.end(),r.dispatchEvent("loadstart")}else{var S=".node-xmlhttprequest-content-"+process.pid,T=".node-xmlhttprequest-sync-"+process.pid;vX.writeFileSync(T,"","utf8");for(var D="var http = require('http'), https = require('https'), fs = require('fs');var doRequest = http"+(u?"s":"")+".request;var options = "+JSON.stringify(_)+";var responseText = '';var req = doRequest(options, function(response) {response.setEncoding('utf8');response.on('data', function(chunk) { responseText += chunk;});response.on('end', function() {fs.writeFileSync('"+S+"', 'NODE-XMLHTTPREQUEST-STATUS:' + response.statusCode + ',' + responseText, 'utf8');fs.unlinkSync('"+T+"');});response.on('error', function(error) {fs.writeFileSync('"+S+"', 'NODE-XMLHTTPREQUEST-ERROR:' + JSON.stringify(error), 'utf8');fs.unlinkSync('"+T+"');});}).on('error', function(error) {fs.writeFileSync('"+S+"', 'NODE-XMLHTTPREQUEST-ERROR:' + JSON.stringify(error), 'utf8');fs.unlinkSync('"+T+"');});"+(a?"req.write('"+JSON.stringify(a).slice(1,-1).replace(/'/g,"\\'")+"');":"")+"req.end();",k=_X(process.argv[0],["-e",D]);vX.existsSync(T););if(r.responseText=vX.readFileSync(S,"utf8"),k.stdin.end(),vX.unlinkSync(S),r.responseText.match(/^NODE-XMLHTTPREQUEST-ERROR:/)){var A=r.responseText.replace(/^NODE-XMLHTTPREQUEST-ERROR:/,"");r.handleError(A,503)}else r.status=r.responseText.replace(/^NODE-XMLHTTPREQUEST-STATUS:([0-9]*),.*/,"$1"),r.responseText=r.responseText.replace(/^NODE-XMLHTTPREQUEST-STATUS:[0-9]*,(.*)/,"$1"),g(r.DONE)}}},this.handleError=function(e,t){this.status=t||0,this.statusText=e,this.responseText=e.stack,d=!0,g(this.DONE)},this.abort=function(){t&&(t.abort(),t=null),l=Object.assign({},c),this.responseText="",this.responseXML="",d=f=!0,this.readyState===this.UNSENT||this.readyState===this.OPENED&&!h||this.readyState===this.DONE||(h=!1,g(this.DONE)),this.readyState=this.UNSENT},this.addEventListener=function(e,t){e in m||(m[e]=[]),m[e].push(t)},this.removeEventListener=function(e,t){e in m&&(m[e]=m[e].filter((function(e){return e!==t})))},this.dispatchEvent=function(e){if("function"==typeof r["on"+e]&&(this.readyState===this.DONE?setImmediate((function(){r["on"+e]()})):r["on"+e]()),e in m)for(let t=0,n=m[e].length;t<n;t++)this.readyState===this.DONE?setImmediate((function(){m[e][t].call(r)})):m[e][t].call(r)};var g=function(e){if(!(r.readyState===e||r.readyState===r.UNSENT&&f)&&(r.readyState=e,(o.async||r.readyState<r.OPENED||r.readyState===r.DONE)&&r.dispatchEvent("readystatechange"),r.readyState===r.DONE)){let e;e=f?"abort":d?"error":"load",r.dispatchEvent(e),r.dispatchEvent("loadend")}}}xX.XMLHttpRequest=xX;var EX=q(wX);const SX=EX||B({__proto__:null,default:EX},[wX]);class TX{constructor(){this.cookies=new Map}parseCookies(e){const t=e.getResponseHeader("set-cookie");t&&t.forEach((e=>{const t=function(e){const t=e.split("; "),n=t[0].indexOf("=");if(-1===n)return;const r=t[0].substring(0,n).trim();if(!r.length)return;let i=t[0].substring(n+1).trim();34===i.charCodeAt(0)&&(i=i.slice(1,-1));const s={name:r,value:i};for(let e=1;e<t.length;e++){const n=t[e].split("=");if(2!==n.length)continue;const r=n[0].trim(),i=n[1].trim();switch(r){case"Expires":s.expires=new Date(i);break;case"Max-Age":const e=new Date;e.setUTCSeconds(e.getUTCSeconds()+parseInt(i,10)),s.expires=e}}return s}(e);t&&this.cookies.set(t.name,t)}))}addCookies(e){const t=[];this.cookies.forEach(((e,n)=>{var r;(null===(r=e.expires)||void 0===r?void 0:r.getTime())<Date.now()?this.cookies.delete(n):t.push(`${n}=${e.value}`)})),t.length&&(e.setDisableHeaderCheck(!0),e.setRequestHeader("cookie",t.join("; ")))}}function DX(){}const kX=null!=new SX({xdomain:!1}).responseType;let AX=class e extends AQ{constructor(e,t){super(),aX(this,t),this.opts=t,this.method=t.method||"GET",this.uri=e,this.data=void 0!==t.data?t.data:null,this.create()}create(){var t;const n=iX(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new SX(n);try{r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let e in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(e)&&r.setRequestHeader(e,this.opts.extraHeaders[e])}}catch(e){}if("POST"===this.method)try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{r.setRequestHeader("Accept","*/*")}catch(e){}null===(t=this.opts.cookieJar)||void 0===t||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var e;3===r.readyState&&(null===(e=this.opts.cookieJar)||void 0===e||e.parseCookies(r)),4===r.readyState&&(200===r.status||1223===r.status?this.onLoad():this.setTimeoutFn((()=>{this.onError("number"==typeof r.status?r.status:0)}),0))},r.send(this.data)}catch(e){return void this.setTimeoutFn((()=>{this.onError(e)}),0)}"undefined"!=typeof document&&(this.index=e.requestsCount++,e.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=DX,t)try{this.xhr.abort()}catch(e){}"undefined"!=typeof document&&delete e.requests[this.index],this.xhr=null}}onLoad(){const e=this.xhr.responseText;null!==e&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}};if(AX.requestsCount=0,AX.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",CX);else if("function"==typeof addEventListener){addEventListener("onpagehide"in rX?"pagehide":"unload",CX,!1)}function CX(){for(let e in AX.requests)AX.requests.hasOwnProperty(e)&&AX.requests[e].abort()}const RX=pZ,OX=process.nextTick,LX="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();const IX={websocket:class extends lX{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),t=this.opts.protocols,n=LX?{}:iX(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=new RX(e,t,n)}catch(e){return this.emitReserved("error",e)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],r=t===e.length-1;VJ(n,this.supportsBinary,(e=>{const t={};if(n.options&&(t.compress=n.options.compress),this.opts.perMessageDeflate){("string"==typeof e?Buffer.byteLength(e):e.length)<this.opts.perMessageDeflate.threshold&&(t.compress=!1)}try{this.ws.send(e,t)}catch(e){}r&&OX((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=yX()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}check(){return!!RX}},webtransport:class extends lX{get name(){return"webtransport"}doOpen(){"function"==typeof WebTransport&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then((()=>{this.onClose()})).catch((e=>{this.onError("webtransport error",e)})),this.transport.ready.then((()=>{this.transport.createBidirectionalStream().then((e=>{const t=function(e,t){eX||(eX=new TextDecoder);const n=[];let r=0,i=-1,s=!1;return new TransformStream({transform(o,a){for(n.push(o);;){if(0===r){if(tX(n)<1)break;const e=nX(n,1);s=!(128&~e[0]),i=127&e[0],r=i<126?3:126===i?1:2}else if(1===r){if(tX(n)<2)break;const e=nX(n,2);i=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),r=3}else if(2===r){if(tX(n)<8)break;const e=nX(n,8),t=new DataView(e.buffer,e.byteOffset,e.length),s=t.getUint32(0);if(s>Math.pow(2,21)-1){a.enqueue(GJ);break}i=s*Math.pow(2,32)+t.getUint32(4),r=3}else{if(tX(n)<i)break;const e=nX(n,i);a.enqueue(ZJ(s?e:eX.decode(e),t)),r=0}if(0===i||i>e){a.enqueue(GJ);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(t).getReader(),r=XJ();r.readable.pipeTo(e.writable),this.writer=r.writable.getWriter();const i=()=>{n.read().then((({done:e,value:t})=>{e||(this.onPacket(t),i())})).catch((e=>{}))};i();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this.writer.write(s).then((()=>this.onOpen()))}))})))}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],r=t===e.length-1;this.writer.write(n).then((()=>{r&&OX((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){var e;null===(e=this.transport)||void 0===e||e.close()}},polling:class extends lX{constructor(e){if(super(e),this.polling=!1,"undefined"!=typeof location){const t="https:"===location.protocol;let n=location.port;n||(n=t?"443":"80"),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||n!==e.port}const t=e&&e.forceBase64;this.supportsBinary=kX&&!t,this.opts.withCredentials&&(this.cookieJar=new TX)}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this.polling||!this.writable){let e=0;this.polling&&(e++,this.once("pollComplete",(function(){--e||t()}))),this.writable||(e++,this.once("drain",(function(){--e||t()})))}else t()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){((e,t)=>{const n=e.split(JJ),r=[];for(let e=0;e<n.length;e++){const i=ZJ(n[e],t);if(r.push(i),"error"===i.type)break}return r})(e,this.socket.binaryType).forEach((e=>{if("opening"===this.readyState&&"open"===e.type&&this.onOpen(),"close"===e.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(e)})),"closed"!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this.poll())}doClose(){const e=()=>{this.write([{type:"close"}])};"open"===this.readyState?e():this.once("open",e)}write(e){this.writable=!1,((e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach(((e,s)=>{VJ(e,!1,(e=>{r[s]=e,++i===n&&t(r.join(JJ))}))}))})(e,(e=>{this.doWrite(e,(()=>{this.writable=!0,this.emitReserved("drain")}))}))}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=yX()),this.supportsBinary||t.sid||(t.b64=1),this.createUri(e,t)}request(e={}){return Object.assign(e,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new AX(this.uri(),e)}doWrite(e,t){const n=this.request({method:"POST",data:e});n.on("success",t),n.on("error",((e,t)=>{this.onError("xhr post error",e,t)}))}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",((e,t)=>{this.onError("xhr poll error",e,t)})),this.pollXhr=e}}},PX=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,NX=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function jX(e){if(e.length>2e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");-1!=n&&-1!=r&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=PX.exec(e||""),s={},o=14;for(;o--;)s[NX[o]]=i[o]||"";return-1!=n&&-1!=r&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=function(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");"/"!=t.slice(0,1)&&0!==t.length||r.splice(0,1);"/"==t.slice(-1)&&r.splice(r.length-1,1);return r}(0,s.path),s.queryKey=function(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(e,t,r){t&&(n[t]=r)})),n}(0,s.query),s}let FX=class e extends AQ{constructor(e,t={}){super(),this.binaryType="nodebuffer",this.writeBuffer=[],e&&"object"==typeof e&&(t=e,e=null),e?(e=jX(e),t.hostname=e.host,t.secure="https"===e.protocol||"wss"===e.protocol,t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=jX(t.host).host),aX(this,t),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=t.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(e){let t={},n=e.split("&");for(let e=0,r=n.length;e<r;e++){let r=n[e].split("=");t[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return t}(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,"function"==typeof addEventListener&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);const n=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new IX[e](n)}open(){let t;if(this.opts.rememberUpgrade&&e.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn((()=>{this.emitReserved("error","No transports available")}),0);t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(e){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",(e=>this.onClose("transport close",e)))}probe(t){let n=this.createTransport(t),r=!1;e.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",(t=>{if(!r)if("pong"===t.type&&"probe"===t.data){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;e.priorWebsocketSuccess="websocket"===n.name,this.transport.pause((()=>{r||"closed"!==this.readyState&&(u(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())}))}else{const e=new Error("probe error");e.transport=n.name,this.emitReserved("upgradeError",e)}})))};function s(){r||(r=!0,u(),n.close(),n=null)}const o=e=>{const t=new Error("probe error: "+e);t.transport=n.name,s(),this.emitReserved("upgradeError",t)};function a(){o("transport closed")}function c(){o("socket closed")}function l(e){n&&e.name!==n.name&&s()}const u=()=>{n.removeListener("open",i),n.removeListener("error",o),n.removeListener("close",a),this.off("close",c),this.off("upgrading",l)};n.once("open",i),n.once("error",o),n.once("close",a),this.once("close",c),this.once("upgrading",l),-1!==this.upgrades.indexOf("webtransport")&&"webtransport"!==t?this.setTimeoutFn((()=>{r||n.open()}),200):n.open()}onOpen(){if(this.readyState="open",e.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade){let e=0;const t=this.upgrades.length;for(;e<t;e++)this.probe(this.upgrades[e])}}onPacket(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),this.resetPingTimeout(),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data)}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.maxPayload=e.maxPayload,this.onOpen(),"closed"!==this.readyState&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn((()=>{this.onClose("ping timeout")}),this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this.getWritablePackets();this.transport.send(e),this.prevBufferLen=e.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let n=0;n<this.writeBuffer.length;n++){const r=this.writeBuffer[n].data;if(r&&(e+="string"==typeof(t=r)?function(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}(t):Math.ceil(1.33*(t.byteLength||t.size))),n>0&&e>this.maxPayload)return this.writeBuffer.slice(0,n);e+=2}var t;return this.writeBuffer}write(e,t,n){return this.sendPacket("message",e,t,n),this}send(e,t,n){return this.sendPacket("message",e,t,n),this}sendPacket(e,t,n,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof n&&(r=n,n=null),"closing"===this.readyState||"closed"===this.readyState)return;(n=n||{}).compress=!1!==n.compress;const i={type:e,data:t,options:n};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}close(){const e=()=>{this.onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},n=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(()=>{this.upgrading?n():e()})):this.upgrading?n():e()),this}onError(t){e.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(e,t){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const t=[];let n=0;const r=e.length;for(;n<r;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}};FX.protocol=4,FX.protocol;const BX="function"==typeof ArrayBuffer,MX=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,UX=Object.prototype.toString,qX="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===UX.call(Blob),HX="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===UX.call(File);function $X(e){return BX&&(e instanceof ArrayBuffer||MX(e))||qX&&e instanceof Blob||HX&&e instanceof File}function zX(e,t){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let t=0,n=e.length;t<n;t++)if(zX(e[t]))return!0;return!1}if($X(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1===arguments.length)return zX(e.toJSON(),!0);for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&zX(e[t]))return!0;return!1}function WX(e){const t=[],n=e.data,r=e;return r.data=GX(n,t),r.attachments=t.length,{packet:r,buffers:t}}function GX(e,t){if(!e)return e;if($X(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=GX(e[r],t);return n}if("object"==typeof e&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=GX(e[r],t));return n}return e}function VX(e,t){return e.data=KX(e.data,t),delete e.attachments,e}function KX(e,t){if(!e)return e;if(e&&!0===e._placeholder){if("number"==typeof e.num&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=KX(e[n],t);else if("object"==typeof e)for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=KX(e[n],t));return e}const YX=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var ZX;!function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"}(ZX||(ZX={}));function QX(e){return"[object Object]"===Object.prototype.toString.call(e)}class JX extends AQ{constructor(e){super(),this.reviver=e}add(e){let t;if("string"==typeof e){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const n=t.type===ZX.BINARY_EVENT;n||t.type===ZX.BINARY_ACK?(t.type=n?ZX.EVENT:ZX.ACK,this.reconstructor=new XX(t),0===t.attachments&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else{if(!$X(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t))}}decodeString(e){let t=0;const n={type:Number(e.charAt(0))};if(void 0===ZX[n.type])throw new Error("unknown packet type "+n.type);if(n.type===ZX.BINARY_EVENT||n.type===ZX.BINARY_ACK){const r=t+1;for(;"-"!==e.charAt(++t)&&t!=e.length;);const i=e.substring(r,t);if(i!=Number(i)||"-"!==e.charAt(t))throw new Error("Illegal attachments");n.attachments=Number(i)}if("/"===e.charAt(t+1)){const r=t+1;for(;++t;){if(","===e.charAt(t))break;if(t===e.length)break}n.nsp=e.substring(r,t)}else n.nsp="/";const r=e.charAt(t+1);if(""!==r&&Number(r)==r){const r=t+1;for(;++t;){const n=e.charAt(t);if(null==n||Number(n)!=n){--t;break}if(t===e.length)break}n.id=Number(e.substring(r,t+1))}if(e.charAt(++t)){const r=this.tryParse(e.substr(t));if(!JX.isPayloadValid(n.type,r))throw new Error("invalid payload");n.data=r}return n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch(e){return!1}}static isPayloadValid(e,t){switch(e){case ZX.CONNECT:return QX(t);case ZX.DISCONNECT:return void 0===t;case ZX.CONNECT_ERROR:return"string"==typeof t||QX(t);case ZX.EVENT:case ZX.BINARY_EVENT:return Array.isArray(t)&&("number"==typeof t[0]||"string"==typeof t[0]&&-1===YX.indexOf(t[0]));case ZX.ACK:case ZX.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class XX{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const e=VX(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}var e0=Object.freeze({__proto__:null,Decoder:JX,Encoder:class{constructor(e){this.replacer=e}encode(e){return e.type!==ZX.EVENT&&e.type!==ZX.ACK||!zX(e)?[this.encodeAsString(e)]:this.encodeAsBinary({type:e.type===ZX.EVENT?ZX.BINARY_EVENT:ZX.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id})}encodeAsString(e){let t=""+e.type;return e.type!==ZX.BINARY_EVENT&&e.type!==ZX.BINARY_ACK||(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),null!=e.id&&(t+=e.id),null!=e.data&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=WX(e),n=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(n),r}},get PacketType(){return ZX},protocol:5});function t0(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const n0=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class r0 extends AQ{constructor(e,t,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[t0(e,"open",this.onopen.bind(this)),t0(e,"packet",this.onpacket.bind(this)),t0(e,"error",this.onerror.bind(this)),t0(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){if(n0.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const n={type:ZX.EVENT,data:t,options:{}};if(n.options.compress=!1!==this.flags.compress,"function"==typeof t[t.length-1]){const e=this.ids++,r=t.pop();this._registerAckCallback(e,r),n.id=e}const r=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!r||!this.connected)||(this.connected?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n)),this.flags={},this}_registerAckCallback(e,t){var n;const r=null!==(n=this.flags.timeout)&&void 0!==n?n:this._opts.ackTimeout;if(void 0===r)return void(this.acks[e]=t);const i=this.io.setTimeoutFn((()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,new Error("operation has timed out"))}),r),s=(...e)=>{this.io.clearTimeoutFn(i),t.apply(this,e)};s.withError=!0,this.acks[e]=s}emitWithAck(e,...t){return new Promise(((n,r)=>{const i=(e,t)=>e?r(e):n(t);i.withError=!0,t.push(i),this.emit(e,...t)}))}_addToQueue(e){let t;"function"==typeof e[e.length-1]&&(t=e.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push(((e,...r)=>{if(n!==this._queue[0])return;return null!==e?n.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(e)):(this._queue.shift(),t&&t(null,...r)),n.pending=!1,this._drainQueue()})),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||0===this._queue.length)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){"function"==typeof this.auth?this.auth((e=>{this._sendConnectPacket(e)})):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:ZX.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach((e=>{if(!this.sendBuffer.some((t=>String(t.id)===e))){const t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,new Error("socket has been disconnected"))}}))}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case ZX.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case ZX.EVENT:case ZX.BINARY_EVENT:this.onevent(e);break;case ZX.ACK:case ZX.BINARY_ACK:this.onack(e);break;case ZX.DISCONNECT:this.ondisconnect();break;case ZX.CONNECT_ERROR:this.destroy();const t=new Error(e.data.message);t.data=e.data.data,this.emitReserved("connect_error",t)}}onevent(e){const t=e.data||[];null!=e.id&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const n of t)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&"string"==typeof e[e.length-1]&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let n=!1;return function(...r){n||(n=!0,t.packet({type:ZX.ACK,id:e,data:r}))}}onack(e){const t=this.acks[e.id];"function"==typeof t&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach((e=>this.emitEvent(e))),this.receiveBuffer=[],this.sendBuffer.forEach((e=>{this.notifyOutgoingListeners(e),this.packet(e)})),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach((e=>e())),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:ZX.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const n of t)n.apply(this,e.data)}}}function i0(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}i0.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=1&Math.floor(10*t)?e+n:e-n}return 0|Math.min(e,this.max)},i0.prototype.reset=function(){this.attempts=0},i0.prototype.setMin=function(e){this.ms=e},i0.prototype.setMax=function(e){this.max=e},i0.prototype.setJitter=function(e){this.jitter=e};class s0 extends AQ{constructor(e,t){var n;super(),this.nsps={},this.subs=[],e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.opts=t,aX(this,t),this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(n=t.randomizationFactor)&&void 0!==n?n:.5),this.backoff=new i0({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this._readyState="closed",this.uri=e;const r=t.parser||e0;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=!1!==t.autoConnect,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return void 0===e?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return void 0===e?this._reconnectionDelay:(this._reconnectionDelay=e,null===(t=this.backoff)||void 0===t||t.setMin(e),this)}randomizationFactor(e){var t;return void 0===e?this._randomizationFactor:(this._randomizationFactor=e,null===(t=this.backoff)||void 0===t||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return void 0===e?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,null===(t=this.backoff)||void 0===t||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new FX(this.uri,this.opts);const t=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const r=t0(t,"open",(function(){n.onopen(),e&&e()})),i=t=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",t),e?e(t):this.maybeReconnectOnOpen()},s=t0(t,"error",i);if(!1!==this._timeout){const e=this._timeout,n=this.setTimeoutFn((()=>{r(),i(new Error("timeout")),t.close()}),e);this.opts.autoUnref&&n.unref(),this.subs.push((()=>{this.clearTimeoutFn(n)}))}return this.subs.push(r),this.subs.push(s),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(t0(e,"ping",this.onping.bind(this)),t0(e,"data",this.ondata.bind(this)),t0(e,"error",this.onerror.bind(this)),t0(e,"close",this.onclose.bind(this)),t0(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(e){this.onclose("parse error",e)}}ondecoded(e){OX((()=>{this.emitReserved("packet",e)}),this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new r0(this,e,t),this.nsps[e]=n),n}_destroy(e){const t=Object.keys(this.nsps);for(const e of t){if(this.nsps[e].active)return}this._close()}_packet(e){const t=this.encoder.encode(e);for(let n=0;n<t.length;n++)this.engine.write(t[n],e.options)}cleanup(){this.subs.forEach((e=>e())),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(e,t){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn((()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open((t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",t)):e.onreconnect()})))}),t);this.opts.autoUnref&&n.unref(),this.subs.push((()=>{this.clearTimeoutFn(n)}))}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const o0={};function a0(e,t){"object"==typeof e&&(t=e,e=void 0);const n=function(e,t="",n){let r=e;n=n||"undefined"!=typeof location&&location,null==e&&(e=n.protocol+"//"+n.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(e=void 0!==n?n.protocol+"//"+e:"https://"+e),r=jX(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const i=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+i+":"+r.port+t,r.href=r.protocol+"://"+i+(n&&n.port===r.port?"":":"+r.port),r}(e,(t=t||{}).path||"/socket.io"),r=n.source,i=n.id,s=n.path,o=o0[i]&&s in o0[i].nsps;let a;return t.forceNew||t["force new connection"]||!1===t.multiplex||o?a=new s0(r,t):(o0[i]||(o0[i]=new s0(r,t)),a=o0[i]),n.query&&!t.query&&(t.query=n.queryKey),a.socket(n.path,t)}Object.assign(a0,{Manager:s0,Socket:r0,io:a0,connect:a0});const c0=async()=>{const e=zr("Login Init...").start();try{console.log(`${tf}/login`);const t=await fetch(`${tf}/login`,{method:"POST"});if(!t.ok)throw new Error("Network response was not ok");const n=await t.json(),{room:r,sessionId:i}=n;e.succeed();const s=zr("Wait User Auth").start();UJ(`https://partner.qumra.cloud/cli/auth?sessionId=${i}`).then((()=>{const e=a0("https://api.qumra.cloud");e.on("connect",(()=>{e.emit("authRoom",r)})),e.on("login",(t=>{console.log("🚀 ~ socket.on ~ res:",t);const{data:n,token:r}=t;rf("user",n),rf("token",r),s.succeed("success"),e.disconnect()}))})).catch((e=>console.error("Failed to open URL:",e)))}catch(t){e.stop(),console.error("Failed to fetch data:",t)}};new ke("user").command("login").description("Run development server with Webpack and BrowserSync").action(c0);df.parseFont("Standard","flf2a$ 6 5 16 15 13 0 24463 229\nStandard by Glenn Chappell & Ian Chai 3/93 -- based on Frank's .sig\nIncludes ISO Latin-1\nfiglet release 2.1 -- 12 Aug 1994\nModified for figlet 2.2 by John Cowan <cowan@ccil.org>\n to add Latin-{2,3,4,5} support (Unicode U+0100-017F).\nPermission is hereby given to modify this font, as long as the\nmodifier's name is placed on a comment line.\n\nModified by Paul Burton <solution@earthlink.net> 12/96 to include new parameter\nsupported by FIGlet and FIGWin. May also be slightly modified for better use\nof new full-width/kern/smush alternatives, but default output is NOT changed.\n\nFont modified May 20, 2012 by patorjk to add the 0xCA0 character\n $@\n $@\n $@\n $@\n $@\n $@@\n _ @\n | |@\n | |@\n |_|@\n (_)@\n @@\n _ _ @\n ( | )@\n V V @\n $ @\n $ @\n @@\n _ _ @\n _| || |_ @\n |_ .. _|@\n |_ _|@\n |_||_| @\n @@\n _ @\n | | @\n / __)@\n \\__ \\@\n ( /@\n |_| @@\n _ __@\n (_)/ /@\n / / @\n / /_ @\n /_/(_)@\n @@\n ___ @\n ( _ ) @\n / _ \\/\\@\n | (_> <@\n \\___/\\/@\n @@\n _ @\n ( )@\n |/ @\n $ @\n $ @\n @@\n __@\n / /@\n | | @\n | | @\n | | @\n \\_\\@@\n __ @\n \\ \\ @\n | |@\n | |@\n | |@\n /_/ @@\n @\n __/\\__@\n \\ /@\n /_ _\\@\n \\/ @\n @@\n @\n _ @\n _| |_ @\n |_ _|@\n |_| @\n @@\n @\n @\n @\n _ @\n ( )@\n |/ @@\n @\n @\n _____ @\n |_____|@\n $ @\n @@\n @\n @\n @\n _ @\n (_)@\n @@\n __@\n / /@\n / / @\n / / @\n /_/ @\n @@\n ___ @\n / _ \\ @\n | | | |@\n | |_| |@\n \\___/ @\n @@\n _ @\n / |@\n | |@\n | |@\n |_|@\n @@\n ____ @\n |___ \\ @\n __) |@\n / __/ @\n |_____|@\n @@\n _____ @\n |___ / @\n |_ \\ @\n ___) |@\n |____/ @\n @@\n _ _ @\n | || | @\n | || |_ @\n |__ _|@\n |_| @\n @@\n ____ @\n | ___| @\n |___ \\ @\n ___) |@\n |____/ @\n @@\n __ @\n / /_ @\n | '_ \\ @\n | (_) |@\n \\___/ @\n @@\n _____ @\n |___ |@\n / / @\n / / @\n /_/ @\n @@\n ___ @\n ( _ ) @\n / _ \\ @\n | (_) |@\n \\___/ @\n @@\n ___ @\n / _ \\ @\n | (_) |@\n \\__, |@\n /_/ @\n @@\n @\n _ @\n (_)@\n _ @\n (_)@\n @@\n @\n _ @\n (_)@\n _ @\n ( )@\n |/ @@\n __@\n / /@\n / / @\n \\ \\ @\n \\_\\@\n @@\n @\n _____ @\n |_____|@\n |_____|@\n $ @\n @@\n __ @\n \\ \\ @\n \\ \\@\n / /@\n /_/ @\n @@\n ___ @\n |__ \\@\n / /@\n |_| @\n (_) @\n @@\n ____ @\n / __ \\ @\n / / _` |@\n | | (_| |@\n \\ \\__,_|@\n \\____/ @@\n _ @\n / \\ @\n / _ \\ @\n / ___ \\ @\n /_/ \\_\\@\n @@\n ____ @\n | __ ) @\n | _ \\ @\n | |_) |@\n |____/ @\n @@\n ____ @\n / ___|@\n | | @\n | |___ @\n \\____|@\n @@\n ____ @\n | _ \\ @\n | | | |@\n | |_| |@\n |____/ @\n @@\n _____ @\n | ____|@\n | _| @\n | |___ @\n |_____|@\n @@\n _____ @\n | ___|@\n | |_ @\n | _| @\n |_| @\n @@\n ____ @\n / ___|@\n | | _ @\n | |_| |@\n \\____|@\n @@\n _ _ @\n | | | |@\n | |_| |@\n | _ |@\n |_| |_|@\n @@\n ___ @\n |_ _|@\n | | @\n | | @\n |___|@\n @@\n _ @\n | |@\n _ | |@\n | |_| |@\n \\___/ @\n @@\n _ __@\n | |/ /@\n | ' / @\n | . \\ @\n |_|\\_\\@\n @@\n _ @\n | | @\n | | @\n | |___ @\n |_____|@\n @@\n __ __ @\n | \\/ |@\n | |\\/| |@\n | | | |@\n |_| |_|@\n @@\n _ _ @\n | \\ | |@\n | \\| |@\n | |\\ |@\n |_| \\_|@\n @@\n ___ @\n / _ \\ @\n | | | |@\n | |_| |@\n \\___/ @\n @@\n ____ @\n | _ \\ @\n | |_) |@\n | __/ @\n |_| @\n @@\n ___ @\n / _ \\ @\n | | | |@\n | |_| |@\n \\__\\_\\@\n @@\n ____ @\n | _ \\ @\n | |_) |@\n | _ < @\n |_| \\_\\@\n @@\n ____ @\n / ___| @\n \\___ \\ @\n ___) |@\n |____/ @\n @@\n _____ @\n |_ _|@\n | | @\n | | @\n |_| @\n @@\n _ _ @\n | | | |@\n | | | |@\n | |_| |@\n \\___/ @\n @@\n __ __@\n \\ \\ / /@\n \\ \\ / / @\n \\ V / @\n \\_/ @\n @@\n __ __@\n \\ \\ / /@\n \\ \\ /\\ / / @\n \\ V V / @\n \\_/\\_/ @\n @@\n __ __@\n \\ \\/ /@\n \\ / @\n / \\ @\n /_/\\_\\@\n @@\n __ __@\n \\ \\ / /@\n \\ V / @\n | | @\n |_| @\n @@\n _____@\n |__ /@\n / / @\n / /_ @\n /____|@\n @@\n __ @\n | _|@\n | | @\n | | @\n | | @\n |__|@@\n __ @\n \\ \\ @\n \\ \\ @\n \\ \\ @\n \\_\\@\n @@\n __ @\n |_ |@\n | |@\n | |@\n | |@\n |__|@@\n /\\ @\n |/\\|@\n $ @\n $ @\n $ @\n @@\n @\n @\n @\n @\n _____ @\n |_____|@@\n _ @\n ( )@\n \\|@\n $ @\n $ @\n @@\n @\n __ _ @\n / _` |@\n | (_| |@\n \\__,_|@\n @@\n _ @\n | |__ @\n | '_ \\ @\n | |_) |@\n |_.__/ @\n @@\n @\n ___ @\n / __|@\n | (__ @\n \\___|@\n @@\n _ @\n __| |@\n / _` |@\n | (_| |@\n \\__,_|@\n @@\n @\n ___ @\n / _ \\@\n | __/@\n \\___|@\n @@\n __ @\n / _|@\n | |_ @\n | _|@\n |_| @\n @@\n @\n __ _ @\n / _` |@\n | (_| |@\n \\__, |@\n |___/ @@\n _ @\n | |__ @\n | '_ \\ @\n | | | |@\n |_| |_|@\n @@\n _ @\n (_)@\n | |@\n | |@\n |_|@\n @@\n _ @\n (_)@\n | |@\n | |@\n _/ |@\n |__/ @@\n _ @\n | | __@\n | |/ /@\n | < @\n |_|\\_\\@\n @@\n _ @\n | |@\n | |@\n | |@\n |_|@\n @@\n @\n _ __ ___ @\n | '_ ` _ \\ @\n | | | | | |@\n |_| |_| |_|@\n @@\n @\n _ __ @\n | '_ \\ @\n | | | |@\n |_| |_|@\n @@\n @\n ___ @\n / _ \\ @\n | (_) |@\n \\___/ @\n @@\n @\n _ __ @\n | '_ \\ @\n | |_) |@\n | .__/ @\n |_| @@\n @\n __ _ @\n / _` |@\n | (_| |@\n \\__, |@\n |_|@@\n @\n _ __ @\n | '__|@\n | | @\n |_| @\n @@\n @\n ___ @\n / __|@\n \\__ \\@\n |___/@\n @@\n _ @\n | |_ @\n | __|@\n | |_ @\n \\__|@\n @@\n @\n _ _ @\n | | | |@\n | |_| |@\n \\__,_|@\n @@\n @\n __ __@\n \\ \\ / /@\n \\ V / @\n \\_/ @\n @@\n @\n __ __@\n \\ \\ /\\ / /@\n \\ V V / @\n \\_/\\_/ @\n @@\n @\n __ __@\n \\ \\/ /@\n > < @\n /_/\\_\\@\n @@\n @\n _ _ @\n | | | |@\n | |_| |@\n \\__, |@\n |___/ @@\n @\n ____@\n |_ /@\n / / @\n /___|@\n @@\n __@\n / /@\n | | @\n < < @\n | | @\n \\_\\@@\n _ @\n | |@\n | |@\n | |@\n | |@\n |_|@@\n __ @\n \\ \\ @\n | | @\n > >@\n | | @\n /_/ @@\n /\\/|@\n |/\\/ @\n $ @\n $ @\n $ @\n @@\n _ _ @\n (_)_(_)@\n /_\\ @\n / _ \\ @\n /_/ \\_\\@\n @@\n _ _ @\n (_)_(_)@\n / _ \\ @\n | |_| |@\n \\___/ @\n @@\n _ _ @\n (_) (_)@\n | | | |@\n | |_| |@\n \\___/ @\n @@\n _ _ @\n (_)_(_)@\n / _` |@\n | (_| |@\n \\__,_|@\n @@\n _ _ @\n (_)_(_)@\n / _ \\ @\n | (_) |@\n \\___/ @\n @@\n _ _ @\n (_) (_)@\n | | | |@\n | |_| |@\n \\__,_|@\n @@\n ___ @\n / _ \\@\n | |/ /@\n | |\\ \\@\n | ||_/@\n |_| @@\n160 NO-BREAK SPACE\n $@\n $@\n $@\n $@\n $@\n $@@\n161 INVERTED EXCLAMATION MARK\n _ @\n (_)@\n | |@\n | |@\n |_|@\n @@\n162 CENT SIGN\n _ @\n | | @\n / __)@\n | (__ @\n \\ )@\n |_| @@\n163 POUND SIGN\n ___ @\n / ,_\\ @\n _| |_ @\n | |___ @\n (_,____|@\n @@\n164 CURRENCY SIGN\n /\\___/\\@\n \\ _ /@\n | (_) |@\n / ___ \\@\n \\/ \\/@\n @@\n165 YEN SIGN\n __ __ @\n \\ V / @\n |__ __|@\n |__ __|@\n |_| @\n @@\n166 BROKEN BAR\n _ @\n | |@\n |_|@\n _ @\n | |@\n |_|@@\n167 SECTION SIGN\n __ @\n _/ _)@\n / \\ \\ @\n \\ \\\\ \\@\n \\ \\_/@\n (__/ @@\n168 DIAERESIS\n _ _ @\n (_) (_)@\n $ $ @\n $ $ @\n $ $ @\n @@\n169 COPYRIGHT SIGN\n _____ @\n / ___ \\ @\n / / __| \\ @\n | | (__ |@\n \\ \\___| / @\n \\_____/ @@\n170 FEMININE ORDINAL INDICATOR\n __ _ @\n / _` |@\n \\__,_|@\n |____|@\n $ @\n @@\n171 LEFT-POINTING DOUBLE ANGLE QUOTATION MARK\n ____@\n / / /@\n / / / @\n \\ \\ \\ @\n \\_\\_\\@\n @@\n172 NOT SIGN\n @\n _____ @\n |___ |@\n |_|@\n $ @\n @@\n173 SOFT HYPHEN\n @\n @\n ____ @\n |____|@\n $ @\n @@\n174 REGISTERED SIGN\n _____ @\n / ___ \\ @\n / | _ \\ \\ @\n | | / |@\n \\ |_|_\\ / @\n \\_____/ @@\n175 MACRON\n _____ @\n |_____|@\n $ @\n $ @\n $ @\n @@\n176 DEGREE SIGN\n __ @\n / \\ @\n | () |@\n \\__/ @\n $ @\n @@\n177 PLUS-MINUS SIGN\n _ @\n _| |_ @\n |_ _|@\n _|_|_ @\n |_____|@\n @@\n178 SUPERSCRIPT TWO\n ___ @\n |_ )@\n / / @\n /___|@\n $ @\n @@\n179 SUPERSCRIPT THREE\n ____@\n |__ /@\n |_ \\@\n |___/@\n $ @\n @@\n180 ACUTE ACCENT\n __@\n /_/@\n $ @\n $ @\n $ @\n @@\n181 MICRO SIGN\n @\n _ _ @\n | | | |@\n | |_| |@\n | ._,_|@\n |_| @@\n182 PILCROW SIGN\n _____ @\n / |@\n | (| | |@\n \\__ | |@\n |_|_|@\n @@\n183 MIDDLE DOT\n @\n _ @\n (_)@\n $ @\n $ @\n @@\n184 CEDILLA\n @\n @\n @\n @\n _ @\n )_)@@\n185 SUPERSCRIPT ONE\n _ @\n / |@\n | |@\n |_|@\n $ @\n @@\n186 MASCULINE ORDINAL INDICATOR\n ___ @\n / _ \\@\n \\___/@\n |___|@\n $ @\n @@\n187 RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK\n ____ @\n \\ \\ \\ @\n \\ \\ \\@\n / / /@\n /_/_/ @\n @@\n188 VULGAR FRACTION ONE QUARTER\n _ __ @\n / | / / _ @\n | |/ / | | @\n |_/ /|_ _|@\n /_/ |_| @\n @@\n189 VULGAR FRACTION ONE HALF\n _ __ @\n / | / /__ @\n | |/ /_ )@\n |_/ / / / @\n /_/ /___|@\n @@\n190 VULGAR FRACTION THREE QUARTERS\n ____ __ @\n |__ / / / _ @\n |_ \\/ / | | @\n |___/ /|_ _|@\n /_/ |_| @\n @@\n191 INVERTED QUESTION MARK\n _ @\n (_) @\n | | @\n / /_ @\n \\___|@\n @@\n192 LATIN CAPITAL LETTER A WITH GRAVE\n __ @\n \\_\\ @\n /_\\ @\n / _ \\ @\n /_/ \\_\\@\n @@\n193 LATIN CAPITAL LETTER A WITH ACUTE\n __ @\n /_/ @\n /_\\ @\n / _ \\ @\n /_/ \\_\\@\n @@\n194 LATIN CAPITAL LETTER A WITH CIRCUMFLEX\n //\\ @\n |/_\\| @\n /_\\ @\n / _ \\ @\n /_/ \\_\\@\n @@\n195 LATIN CAPITAL LETTER A WITH TILDE\n /\\/| @\n |/\\/ @\n /_\\ @\n / _ \\ @\n /_/ \\_\\@\n @@\n196 LATIN CAPITAL LETTER A WITH DIAERESIS\n _ _ @\n (_)_(_)@\n /_\\ @\n / _ \\ @\n /_/ \\_\\@\n @@\n197 LATIN CAPITAL LETTER A WITH RING ABOVE\n _ @\n (o) @\n /_\\ @\n / _ \\ @\n /_/ \\_\\@\n @@\n198 LATIN CAPITAL LETTER AE\n ______ @\n / ____|@\n / _ _| @\n / __ |___ @\n /_/ |_____|@\n @@\n199 LATIN CAPITAL LETTER C WITH CEDILLA\n ____ @\n / ___|@\n | | @\n | |___ @\n \\____|@\n )_) @@\n200 LATIN CAPITAL LETTER E WITH GRAVE\n __ @\n _\\_\\_ @\n | ____|@\n | _|_ @\n |_____|@\n @@\n201 LATIN CAPITAL LETTER E WITH ACUTE\n __ @\n _/_/_ @\n | ____|@\n | _|_ @\n |_____|@\n @@\n202 LATIN CAPITAL LETTER E WITH CIRCUMFLEX\n //\\ @\n |/_\\| @\n | ____|@\n | _|_ @\n |_____|@\n @@\n203 LATIN CAPITAL LETTER E WITH DIAERESIS\n _ _ @\n (_)_(_)@\n | ____|@\n | _|_ @\n |_____|@\n @@\n204 LATIN CAPITAL LETTER I WITH GRAVE\n __ @\n \\_\\ @\n |_ _|@\n | | @\n |___|@\n @@\n205 LATIN CAPITAL LETTER I WITH ACUTE\n __ @\n /_/ @\n |_ _|@\n | | @\n |___|@\n @@\n206 LATIN CAPITAL LETTER I WITH CIRCUMFLEX\n //\\ @\n |/_\\|@\n |_ _|@\n | | @\n |___|@\n @@\n207 LATIN CAPITAL LETTER I WITH DIAERESIS\n _ _ @\n (_)_(_)@\n |_ _| @\n | | @\n |___| @\n @@\n208 LATIN CAPITAL LETTER ETH\n ____ @\n | _ \\ @\n _| |_| |@\n |__ __| |@\n |____/ @\n @@\n209 LATIN CAPITAL LETTER N WITH TILDE\n /\\/|@\n |/\\/ @\n | \\| |@\n | .` |@\n |_|\\_|@\n @@\n210 LATIN CAPITAL LETTER O WITH GRAVE\n __ @\n \\_\\ @\n / _ \\ @\n | |_| |@\n \\___/ @\n @@\n211 LATIN CAPITAL LETTER O WITH ACUTE\n __ @\n /_/ @\n / _ \\ @\n | |_| |@\n \\___/ @\n @@\n212 LATIN CAPITAL LETTER O WITH CIRCUMFLEX\n //\\ @\n |/_\\| @\n / _ \\ @\n | |_| |@\n \\___/ @\n @@\n213 LATIN CAPITAL LETTER O WITH TILDE\n /\\/| @\n |/\\/ @\n / _ \\ @\n | |_| |@\n \\___/ @\n @@\n214 LATIN CAPITAL LETTER O WITH DIAERESIS\n _ _ @\n (_)_(_)@\n / _ \\ @\n | |_| |@\n \\___/ @\n @@\n215 MULTIPLICATION SIGN\n @\n @\n /\\/\\@\n > <@\n \\/\\/@\n @@\n216 LATIN CAPITAL LETTER O WITH STROKE\n ____ @\n / _// @\n | |// |@\n | //| |@\n //__/ @\n @@\n217 LATIN CAPITAL LETTER U WITH GRAVE\n __ @\n _\\_\\_ @\n | | | |@\n | |_| |@\n \\___/ @\n @@\n218 LATIN CAPITAL LETTER U WITH ACUTE\n __ @\n _/_/_ @\n | | | |@\n | |_| |@\n \\___/ @\n @@\n219 LATIN CAPITAL LETTER U WITH CIRCUMFLEX\n //\\ @\n |/ \\| @\n | | | |@\n | |_| |@\n \\___/ @\n @@\n220 LATIN CAPITAL LETTER U WITH DIAERESIS\n _ _ @\n (_) (_)@\n | | | |@\n | |_| |@\n \\___/ @\n @@\n221 LATIN CAPITAL LETTER Y WITH ACUTE\n __ @\n __/_/__@\n \\ \\ / /@\n \\ V / @\n |_| @\n @@\n222 LATIN CAPITAL LETTER THORN\n _ @\n | |___ @\n | __ \\@\n | ___/@\n |_| @\n @@\n223 LATIN SMALL LETTER SHARP S\n ___ @\n / _ \\@\n | |/ /@\n | |\\ \\@\n | ||_/@\n |_| @@\n224 LATIN SMALL LETTER A WITH GRAVE\n __ @\n \\_\\_ @\n / _` |@\n | (_| |@\n \\__,_|@\n @@\n225 LATIN SMALL LETTER A WITH ACUTE\n __ @\n /_/_ @\n / _` |@\n | (_| |@\n \\__,_|@\n @@\n226 LATIN SMALL LETTER A WITH CIRCUMFLEX\n //\\ @\n |/_\\| @\n / _` |@\n | (_| |@\n \\__,_|@\n @@\n227 LATIN SMALL LETTER A WITH TILDE\n /\\/| @\n |/\\/_ @\n / _` |@\n | (_| |@\n \\__,_|@\n @@\n228 LATIN SMALL LETTER A WITH DIAERESIS\n _ _ @\n (_)_(_)@\n / _` |@\n | (_| |@\n \\__,_|@\n @@\n229 LATIN SMALL LETTER A WITH RING ABOVE\n __ @\n (()) @\n / _ '|@\n | (_| |@\n \\__,_|@\n @@\n230 LATIN SMALL LETTER AE\n @\n __ ____ @\n / _` _ \\@\n | (_| __/@\n \\__,____|@\n @@\n231 LATIN SMALL LETTER C WITH CEDILLA\n @\n ___ @\n / __|@\n | (__ @\n \\___|@\n )_) @@\n232 LATIN SMALL LETTER E WITH GRAVE\n __ @\n \\_\\ @\n / _ \\@\n | __/@\n \\___|@\n @@\n233 LATIN SMALL LETTER E WITH ACUTE\n __ @\n /_/ @\n / _ \\@\n | __/@\n \\___|@\n @@\n234 LATIN SMALL LETTER E WITH CIRCUMFLEX\n //\\ @\n |/_\\|@\n / _ \\@\n | __/@\n \\___|@\n @@\n235 LATIN SMALL LETTER E WITH DIAERESIS\n _ _ @\n (_)_(_)@\n / _ \\ @\n | __/ @\n \\___| @\n @@\n236 LATIN SMALL LETTER I WITH GRAVE\n __ @\n \\_\\@\n | |@\n | |@\n |_|@\n @@\n237 LATIN SMALL LETTER I WITH ACUTE\n __@\n /_/@\n | |@\n | |@\n |_|@\n @@\n238 LATIN SMALL LETTER I WITH CIRCUMFLEX\n //\\ @\n |/_\\|@\n | | @\n | | @\n |_| @\n @@\n239 LATIN SMALL LETTER I WITH DIAERESIS\n _ _ @\n (_)_(_)@\n | | @\n | | @\n |_| @\n @@\n240 LATIN SMALL LETTER ETH\n /\\/\\ @\n > < @\n _\\/\\ |@\n / __` |@\n \\____/ @\n @@\n241 LATIN SMALL LETTER N WITH TILDE\n /\\/| @\n |/\\/ @\n | '_ \\ @\n | | | |@\n |_| |_|@\n @@\n242 LATIN SMALL LETTER O WITH GRAVE\n __ @\n \\_\\ @\n / _ \\ @\n | (_) |@\n \\___/ @\n @@\n243 LATIN SMALL LETTER O WITH ACUTE\n __ @\n /_/ @\n / _ \\ @\n | (_) |@\n \\___/ @\n @@\n244 LATIN SMALL LETTER O WITH CIRCUMFLEX\n //\\ @\n |/_\\| @\n / _ \\ @\n | (_) |@\n \\___/ @\n @@\n245 LATIN SMALL LETTER O WITH TILDE\n /\\/| @\n |/\\/ @\n / _ \\ @\n | (_) |@\n \\___/ @\n @@\n246 LATIN SMALL LETTER O WITH DIAERESIS\n _ _ @\n (_)_(_)@\n / _ \\ @\n | (_) |@\n \\___/ @\n @@\n247 DIVISION SIGN\n @\n _ @\n _(_)_ @\n |_____|@\n (_) @\n @@\n248 LATIN SMALL LETTER O WITH STROKE\n @\n ____ @\n / _//\\ @\n | (//) |@\n \\//__/ @\n @@\n249 LATIN SMALL LETTER U WITH GRAVE\n __ @\n _\\_\\_ @\n | | | |@\n | |_| |@\n \\__,_|@\n @@\n250 LATIN SMALL LETTER U WITH ACUTE\n __ @\n _/_/_ @\n | | | |@\n | |_| |@\n \\__,_|@\n @@\n251 LATIN SMALL LETTER U WITH CIRCUMFLEX\n //\\ @\n |/ \\| @\n | | | |@\n | |_| |@\n \\__,_|@\n @@\n252 LATIN SMALL LETTER U WITH DIAERESIS\n _ _ @\n (_) (_)@\n | | | |@\n | |_| |@\n \\__,_|@\n @@\n253 LATIN SMALL LETTER Y WITH ACUTE\n __ @\n _/_/_ @\n | | | |@\n | |_| |@\n \\__, |@\n |___/ @@\n254 LATIN SMALL LETTER THORN\n _ @\n | |__ @\n | '_ \\ @\n | |_) |@\n | .__/ @\n |_| @@\n255 LATIN SMALL LETTER Y WITH DIAERESIS\n _ _ @\n (_) (_)@\n | | | |@\n | |_| |@\n \\__, |@\n |___/ @@\n0x0100 LATIN CAPITAL LETTER A WITH MACRON\n ____ @\n /___/ @\n /_\\ @\n / _ \\ @\n /_/ \\_\\@\n @@\n0x0101 LATIN SMALL LETTER A WITH MACRON\n ___ @\n /_ _/@\n / _` |@\n | (_| |@\n \\__,_|@\n @@\n0x0102 LATIN CAPITAL LETTER A WITH BREVE\n _ _ @\n \\\\_// @\n /_\\ @\n / _ \\ @\n /_/ \\_\\@\n @@\n0x0103 LATIN SMALL LETTER A WITH BREVE\n \\_/ @\n ___ @\n / _` |@\n | (_| |@\n \\__,_|@\n @@\n0x0104 LATIN CAPITAL LETTER A WITH OGONEK\n @\n _ @\n /_\\ @\n / _ \\ @\n /_/ \\_\\@\n (_(@@\n0x0105 LATIN SMALL LETTER A WITH OGONEK\n @\n __ _ @\n / _` |@\n | (_| |@\n \\__,_|@\n (_(@@\n0x0106 LATIN CAPITAL LETTER C WITH ACUTE\n __ @\n _/_/ @\n / ___|@\n | |___ @\n \\____|@\n @@\n0x0107 LATIN SMALL LETTER C WITH ACUTE\n __ @\n /__/@\n / __|@\n | (__ @\n \\___|@\n @@\n0x0108 LATIN CAPITAL LETTER C WITH CIRCUMFLEX\n /\\ @\n _//\\\\@\n / ___|@\n | |___ @\n \\____|@\n @@\n0x0109 LATIN SMALL LETTER C WITH CIRCUMFLEX\n /\\ @\n /_\\ @\n / __|@\n | (__ @\n \\___|@\n @@\n0x010A LATIN CAPITAL LETTER C WITH DOT ABOVE\n [] @\n ____ @\n / ___|@\n | |___ @\n \\____|@\n @@\n0x010B LATIN SMALL LETTER C WITH DOT ABOVE\n [] @\n ___ @\n / __|@\n | (__ @\n \\___|@\n @@\n0x010C LATIN CAPITAL LETTER C WITH CARON\n \\\\// @\n _\\/_ @\n / ___|@\n | |___ @\n \\____|@\n @@\n0x010D LATIN SMALL LETTER C WITH CARON\n \\\\//@\n _\\/ @\n / __|@\n | (__ @\n \\___|@\n @@\n0x010E LATIN CAPITAL LETTER D WITH CARON\n \\\\// @\n __\\/ @\n | _ \\ @\n | |_| |@\n |____/ @\n @@\n0x010F LATIN SMALL LETTER D WITH CARON\n \\/ _ @\n __| |@\n / _` |@\n | (_| |@\n \\__,_|@\n @@\n0x0110 LATIN CAPITAL LETTER D WITH STROKE\n ____ @\n |_ __ \\ @\n /| |/ | |@\n /|_|/_| |@\n |_____/ @\n @@\n0x0111 LATIN SMALL LETTER D WITH STROKE\n ---|@\n __| |@\n / _` |@\n | (_| |@\n \\__,_|@\n @@\n0x0112 LATIN CAPITAL LETTER E WITH MACRON\n ____ @\n /___/ @\n | ____|@\n | _|_ @\n |_____|@\n @@\n0x0113 LATIN SMALL LETTER E WITH MACRON\n ____@\n /_ _/@\n / _ \\ @\n | __/ @\n \\___| @\n @@\n0x0114 LATIN CAPITAL LETTER E WITH BREVE\n _ _ @\n \\\\_// @\n | ____|@\n | _|_ @\n |_____|@\n @@\n0x0115 LATIN SMALL LETTER E WITH BREVE\n \\\\ //@\n -- @\n / _ \\ @\n | __/ @\n \\___| @\n @@\n0x0116 LATIN CAPITAL LETTER E WITH DOT ABOVE\n [] @\n _____ @\n | ____|@\n | _|_ @\n |_____|@\n @@\n0x0117 LATIN SMALL LETTER E WITH DOT ABOVE\n [] @\n __ @\n / _ \\@\n | __/@\n \\___|@\n @@\n0x0118 LATIN CAPITAL LETTER E WITH OGONEK\n @\n _____ @\n | ____|@\n | _|_ @\n |_____|@\n (__(@@\n0x0119 LATIN SMALL LETTER E WITH OGONEK\n @\n ___ @\n / _ \\@\n | __/@\n \\___|@\n (_(@@\n0x011A LATIN CAPITAL LETTER E WITH CARON\n \\\\// @\n __\\/_ @\n | ____|@\n | _|_ @\n |_____|@\n @@\n0x011B LATIN SMALL LETTER E WITH CARON\n \\\\//@\n \\/ @\n / _ \\@\n | __/@\n \\___|@\n @@\n0x011C LATIN CAPITAL LETTER G WITH CIRCUMFLEX\n _/\\_ @\n / ___|@\n | | _ @\n | |_| |@\n \\____|@\n @@\n0x011D LATIN SMALL LETTER G WITH CIRCUMFLEX\n /\\ @\n _/_ \\@\n / _` |@\n | (_| |@\n \\__, |@\n |___/ @@\n0x011E LATIN CAPITAL LETTER G WITH BREVE\n _\\/_ @\n / ___|@\n | | _ @\n | |_| |@\n \\____|@\n @@\n0x011F LATIN SMALL LETTER G WITH BREVE\n \\___/ @\n __ _ @\n / _` |@\n | (_| |@\n \\__, |@\n |___/ @@\n0x0120 LATIN CAPITAL LETTER G WITH DOT ABOVE\n _[]_ @\n / ___|@\n | | _ @\n | |_| |@\n \\____|@\n @@\n0x0121 LATIN SMALL LETTER G WITH DOT ABOVE\n [] @\n __ _ @\n / _` |@\n | (_| |@\n \\__, |@\n |___/ @@\n0x0122 LATIN CAPITAL LETTER G WITH CEDILLA\n ____ @\n / ___|@\n | | _ @\n | |_| |@\n \\____|@\n )__) @@\n0x0123 LATIN SMALL LETTER G WITH CEDILLA\n @\n __ _ @\n / _` |@\n | (_| |@\n \\__, |@\n |_))))@@\n0x0124 LATIN CAPITAL LETTER H WITH CIRCUMFLEX\n _/ \\_ @\n | / \\ |@\n | |_| |@\n | _ |@\n |_| |_|@\n @@\n0x0125 LATIN SMALL LETTER H WITH CIRCUMFLEX\n _ /\\ @\n | |//\\ @\n | '_ \\ @\n | | | |@\n |_| |_|@\n @@\n0x0126 LATIN CAPITAL LETTER H WITH STROKE\n _ _ @\n | |=| |@\n | |_| |@\n | _ |@\n |_| |_|@\n @@\n0x0127 LATIN SMALL LETTER H WITH STROKE\n _ @\n |=|__ @\n | '_ \\ @\n | | | |@\n |_| |_|@\n @@\n0x0128 LATIN CAPITAL LETTER I WITH TILDE\n /\\//@\n |_ _|@\n | | @\n | | @\n |___|@\n @@\n0x0129 LATIN SMALL LETTER I WITH TILDE\n @\n /\\/@\n | |@\n | |@\n |_|@\n @@\n0x012A LATIN CAPITAL LETTER I WITH MACRON\n /___/@\n |_ _|@\n | | @\n | | @\n |___|@\n @@\n0x012B LATIN SMALL LETTER I WITH MACRON\n ____@\n /___/@\n | | @\n | | @\n |_| @\n @@\n0x012C LATIN CAPITAL LETTER I WITH BREVE\n \\__/@\n |_ _|@\n | | @\n | | @\n |___|@\n @@\n0x012D LATIN SMALL LETTER I WITH BREVE\n @\n \\_/@\n | |@\n | |@\n |_|@\n @@\n0x012E LATIN CAPITAL LETTER I WITH OGONEK\n ___ @\n |_ _|@\n | | @\n | | @\n |___|@\n (__(@@\n0x012F LATIN SMALL LETTER I WITH OGONEK\n _ @\n (_) @\n | | @\n | | @\n |_|_@\n (_(@@\n0x0130 LATIN CAPITAL LETTER I WITH DOT ABOVE\n _[] @\n |_ _|@\n | | @\n | | @\n |___|@\n @@\n0x0131 LATIN SMALL LETTER DOTLESS I\n @\n _ @\n | |@\n | |@\n |_|@\n @@\n0x0132 LATIN CAPITAL LIGATURE IJ\n ___ _ @\n |_ _|| |@\n | | | |@\n | |_| |@\n |__|__/ @\n @@\n0x0133 LATIN SMALL LIGATURE IJ\n _ _ @\n (_) (_)@\n | | | |@\n | | | |@\n |_|_/ |@\n |__/ @@\n0x0134 LATIN CAPITAL LETTER J WITH CIRCUMFLEX\n /\\ @\n /_\\|@\n _ | | @\n | |_| | @\n \\___/ @\n @@\n0x0135 LATIN SMALL LETTER J WITH CIRCUMFLEX\n /\\@\n /_\\@\n | |@\n | |@\n _/ |@\n |__/ @@\n0x0136 LATIN CAPITAL LETTER K WITH CEDILLA\n _ _ @\n | |/ / @\n | ' / @\n | . \\ @\n |_|\\_\\ @\n )__)@@\n0x0137 LATIN SMALL LETTER K WITH CEDILLA\n _ @\n | | __@\n | |/ /@\n | < @\n |_|\\_\\@\n )_)@@\n0x0138 LATIN SMALL LETTER KRA\n @\n _ __ @\n | |/ \\@\n | < @\n |_|\\_\\@\n @@\n0x0139 LATIN CAPITAL LETTER L WITH ACUTE\n _ //@\n | | // @\n | | @\n | |___ @\n |_____|@\n @@\n0x013A LATIN SMALL LETTER L WITH ACUTE\n //@\n | |@\n | |@\n | |@\n |_|@\n @@\n0x013B LATIN CAPITAL LETTER L WITH CEDILLA\n _ @\n | | @\n | | @\n | |___ @\n |_____|@\n )__)@@\n0x013C LATIN SMALL LETTER L WITH CEDILLA\n _ @\n | | @\n | | @\n | | @\n |_| @\n )_)@@\n0x013D LATIN CAPITAL LETTER L WITH CARON\n _ \\\\//@\n | | \\/ @\n | | @\n | |___ @\n |_____|@\n @@\n0x013E LATIN SMALL LETTER L WITH CARON\n _ \\\\//@\n | | \\/ @\n | | @\n | | @\n |_| @\n @@\n0x013F LATIN CAPITAL LETTER L WITH MIDDLE DOT\n _ @\n | | @\n | | [] @\n | |___ @\n |_____|@\n @@\n0x0140 LATIN SMALL LETTER L WITH MIDDLE DOT\n _ @\n | | @\n | | []@\n | | @\n |_| @\n @@\n0x0141 LATIN CAPITAL LETTER L WITH STROKE\n __ @\n | // @\n |//| @\n // |__ @\n |_____|@\n @@\n0x0142 LATIN SMALL LETTER L WITH STROKE\n _ @\n | |@\n |//@\n //|@\n |_|@\n @@\n0x0143 LATIN CAPITAL LETTER N WITH ACUTE\n _/ /_ @\n | \\ | |@\n | \\| |@\n | |\\ |@\n |_| \\_|@\n @@\n0x0144 LATIN SMALL LETTER N WITH ACUTE\n _ @\n _ /_/ @\n | '_ \\ @\n | | | |@\n |_| |_|@\n @@\n0x0145 LATIN CAPITAL LETTER N WITH CEDILLA\n _ _ @\n | \\ | |@\n | \\| |@\n | |\\ |@\n |_| \\_|@\n )_) @@\n0x0146 LATIN SMALL LETTER N WITH CEDILLA\n @\n _ __ @\n | '_ \\ @\n | | | |@\n |_| |_|@\n )_) @@\n0x0147 LATIN CAPITAL LETTER N WITH CARON\n _\\/ _ @\n | \\ | |@\n | \\| |@\n | |\\ |@\n |_| \\_|@\n @@\n0x0148 LATIN SMALL LETTER N WITH CARON\n \\\\// @\n _\\/_ @\n | '_ \\ @\n | | | |@\n |_| |_|@\n @@\n0x0149 LATIN SMALL LETTER N PRECEDED BY APOSTROPHE\n @\n _ __ @\n ( )| '_\\ @\n |/| | | |@\n |_| |_|@\n @@\n0x014A LATIN CAPITAL LETTER ENG\n _ _ @\n | \\ | |@\n | \\| |@\n | |\\ |@\n |_| \\ |@\n )_)@@\n0x014B LATIN SMALL LETTER ENG\n _ __ @\n | '_ \\ @\n | | | |@\n |_| | |@\n | |@\n |__ @@\n0x014C LATIN CAPITAL LETTER O WITH MACRON\n ____ @\n /_ _/ @\n / _ \\ @\n | (_) |@\n \\___/ @\n @@\n0x014D LATIN SMALL LETTER O WITH MACRON\n ____ @\n /_ _/ @\n / _ \\ @\n | (_) |@\n \\___/ @\n @@\n0x014E LATIN CAPITAL LETTER O WITH BREVE\n \\ / @\n _-_ @\n / _ \\ @\n | |_| |@\n \\___/ @\n @@\n0x014F LATIN SMALL LETTER O WITH BREVE\n \\ / @\n _-_ @\n / _ \\ @\n | |_| |@\n \\___/ @\n @@\n0x0150 LATIN CAPITAL LETTER O WITH DOUBLE ACUTE\n ___ @\n /_/_/@\n / _ \\ @\n | |_| |@\n \\___/ @\n @@\n0x0151 LATIN SMALL LETTER O WITH DOUBLE ACUTE\n ___ @\n /_/_/@\n / _ \\ @\n | |_| |@\n \\___/ @\n @@\n0x0152 LATIN CAPITAL LIGATURE OE\n ___ ___ @\n / _ \\| __|@\n | | | | | @\n | |_| | |__@\n \\___/|____@\n @@\n0x0153 LATIN SMALL LIGATURE OE\n @\n ___ ___ @\n / _ \\ / _ \\@\n | (_) | __/@\n \\___/ \\___|@\n @@\n0x0154 LATIN CAPITAL LETTER R WITH ACUTE\n _/_/ @\n | _ \\ @\n | |_) |@\n | _ < @\n |_| \\_\\@\n @@\n0x0155 LATIN SMALL LETTER R WITH ACUTE\n __@\n _ /_/@\n | '__|@\n | | @\n |_| @\n @@\n0x0156 LATIN CAPITAL LETTER R WITH CEDILLA\n ____ @\n | _ \\ @\n | |_) |@\n | _ < @\n |_| \\_\\@\n )_) @@\n0x0157 LATIN SMALL LETTER R WITH CEDILLA\n @\n _ __ @\n | '__|@\n | | @\n |_| @\n )_) @@\n0x0158 LATIN CAPITAL LETTER R WITH CARON\n _\\_/ @\n | _ \\ @\n | |_) |@\n | _ < @\n |_| \\_\\@\n @@\n0x0159 LATIN SMALL LETTER R WITH CARON\n \\\\// @\n _\\/_ @\n | '__|@\n | | @\n |_| @\n @@\n0x015A LATIN CAPITAL LETTER S WITH ACUTE\n _/_/ @\n / ___| @\n \\___ \\ @\n ___) |@\n |____/ @\n @@\n0x015B LATIN SMALL LETTER S WITH ACUTE\n __@\n _/_/@\n / __|@\n \\__ \\@\n |___/@\n @@\n0x015C LATIN CAPITAL LETTER S WITH CIRCUMFLEX\n _/\\_ @\n / ___| @\n \\___ \\ @\n ___) |@\n |____/ @\n @@\n0x015D LATIN SMALL LETTER S WITH CIRCUMFLEX\n @\n /_\\_@\n / __|@\n \\__ \\@\n |___/@\n @@\n0x015E LATIN CAPITAL LETTER S WITH CEDILLA\n ____ @\n / ___| @\n \\___ \\ @\n ___) |@\n |____/ @\n )__)@@\n0x015F LATIN SMALL LETTER S WITH CEDILLA\n @\n ___ @\n / __|@\n \\__ \\@\n |___/@\n )_)@@\n0x0160 LATIN CAPITAL LETTER S WITH CARON\n _\\_/ @\n / ___| @\n \\___ \\ @\n ___) |@\n |____/ @\n @@\n0x0161 LATIN SMALL LETTER S WITH CARON\n \\\\//@\n _\\/ @\n / __|@\n \\__ \\@\n |___/@\n @@\n0x0162 LATIN CAPITAL LETTER T WITH CEDILLA\n _____ @\n |_ _|@\n | | @\n | | @\n |_| @\n )__)@@\n0x0163 LATIN SMALL LETTER T WITH CEDILLA\n _ @\n | |_ @\n | __|@\n | |_ @\n \\__|@\n )_)@@\n0x0164 LATIN CAPITAL LETTER T WITH CARON\n _____ @\n |_ _|@\n | | @\n | | @\n |_| @\n @@\n0x0165 LATIN SMALL LETTER T WITH CARON\n \\/ @\n | |_ @\n | __|@\n | |_ @\n \\__|@\n @@\n0x0166 LATIN CAPITAL LETTER T WITH STROKE\n _____ @\n |_ _|@\n | | @\n -|-|- @\n |_| @\n @@\n0x0167 LATIN SMALL LETTER T WITH STROKE\n _ @\n | |_ @\n | __|@\n |-|_ @\n \\__|@\n @@\n0x0168 LATIN CAPITAL LETTER U WITH TILDE\n @\n _/\\/_ @\n | | | |@\n | |_| |@\n \\___/ @\n @@\n0x0169 LATIN SMALL LETTER U WITH TILDE\n @\n _/\\/_ @\n | | | |@\n | |_| |@\n \\__,_|@\n @@\n0x016A LATIN CAPITAL LETTER U WITH MACRON\n ____ @\n /__ _/@\n | | | |@\n | |_| |@\n \\___/ @\n @@\n0x016B LATIN SMALL LETTER U WITH MACRON\n ____ @\n / _ /@\n | | | |@\n | |_| |@\n \\__,_|@\n @@\n0x016C LATIN CAPITAL LETTER U WITH BREVE\n @\n \\_/_ @\n | | | |@\n | |_| |@\n \\____|@\n @@\n0x016D LATIN SMALL LETTER U WITH BREVE\n @\n \\_/_ @\n | | | |@\n | |_| |@\n \\__,_|@\n @@\n0x016E LATIN CAPITAL LETTER U WITH RING ABOVE\n O @\n __ _ @\n | | | |@\n | |_| |@\n \\___/ @\n @@\n0x016F LATIN SMALL LETTER U WITH RING ABOVE\n O @\n __ __ @\n | | | |@\n | |_| |@\n \\__,_|@\n @@\n0x0170 LATIN CAPITAL LETTER U WITH DOUBLE ACUTE\n -- --@\n /_//_/@\n | | | |@\n | |_| |@\n \\___/ @\n @@\n0x0171 LATIN SMALL LETTER U WITH DOUBLE ACUTE\n ____@\n _/_/_/@\n | | | |@\n | |_| |@\n \\__,_|@\n @@\n0x0172 LATIN CAPITAL LETTER U WITH OGONEK\n _ _ @\n | | | |@\n | | | |@\n | |_| |@\n \\___/ @\n (__(@@\n0x0173 LATIN SMALL LETTER U WITH OGONEK\n @\n _ _ @\n | | | |@\n | |_| |@\n \\__,_|@\n (_(@@\n0x0174 LATIN CAPITAL LETTER W WITH CIRCUMFLEX\n __ /\\ __@\n \\ \\ //\\\\/ /@\n \\ \\ /\\ / / @\n \\ V V / @\n \\_/\\_/ @\n @@\n0x0175 LATIN SMALL LETTER W WITH CIRCUMFLEX\n /\\ @\n __ //\\\\__@\n \\ \\ /\\ / /@\n \\ V V / @\n \\_/\\_/ @\n @@\n0x0176 LATIN CAPITAL LETTER Y WITH CIRCUMFLEX\n /\\ @\n __//\\\\ @\n \\ \\ / /@\n \\ V / @\n |_| @\n @@\n0x0177 LATIN SMALL LETTER Y WITH CIRCUMFLEX\n /\\ @\n //\\\\ @\n | | | |@\n | |_| |@\n \\__, |@\n |___/ @@\n0x0178 LATIN CAPITAL LETTER Y WITH DIAERESIS\n [] []@\n __ _@\n \\ \\ / /@\n \\ V / @\n |_| @\n @@\n0x0179 LATIN CAPITAL LETTER Z WITH ACUTE\n __/_/@\n |__ /@\n / / @\n / /_ @\n /____|@\n @@\n0x017A LATIN SMALL LETTER Z WITH ACUTE\n _ @\n _/_/@\n |_ /@\n / / @\n /___|@\n @@\n0x017B LATIN CAPITAL LETTER Z WITH DOT ABOVE\n __[]_@\n |__ /@\n / / @\n / /_ @\n /____|@\n @@\n0x017C LATIN SMALL LETTER Z WITH DOT ABOVE\n [] @\n ____@\n |_ /@\n / / @\n /___|@\n @@\n0x017D LATIN CAPITAL LETTER Z WITH CARON\n _\\_/_@\n |__ /@\n / / @\n / /_ @\n /____|@\n @@\n0x017E LATIN SMALL LETTER Z WITH CARON\n \\\\//@\n _\\/_@\n |_ /@\n / / @\n /___|@\n @@\n0x017F LATIN SMALL LETTER LONG S\n __ @\n / _|@\n |-| | @\n |-| | @\n |_| @\n @@\n0x02C7 CARON\n \\\\//@\n \\/ @\n $@\n $@\n $@\n $@@\n0x02D8 BREVE\n \\\\_//@\n \\_/ @\n $@\n $@\n $@\n $@@\n0x02D9 DOT ABOVE\n []@\n $@\n $@\n $@\n $@\n $@@\n0x02DB OGONEK\n $@\n $@\n $@\n $@\n $@\n )_) @@\n0x02DD DOUBLE ACUTE ACCENT\n _ _ @\n /_/_/@\n $@\n $@\n $@\n $@@\n0xCA0 KANNADA LETTER TTHA\n _____)@\n /_ ___/@\n / _ \\ @\n | (_) | @\n $\\___/$ @\n @@\n ");const l0=new ke,u0=process.cwd(),p0=o.join(u0,"qumra.config.json");function h0(e,t){s.existsSync(p0)||(console.error("Error: qumra.config.json not found!"),process.exit(1));const n=JSON.parse(s.readFileSync(p0,"utf-8")),r=n.version;let[i,o,a]=n.version.split(".").map(Number);try{if(t)switch(e){case"patch":a+=1;break;case"minor":o+=1,a=0;break;case"major":i+=1,o=0,a=0}else switch(e){case"patch":a=Math.max(0,a-1);break;case"minor":o>0&&(o-=1,a=0);break;case"major":i>0&&(i-=1,o=0,a=0)}n.version=`${i}.${o}.${a}`,s.writeFileSync(p0,JSON.stringify(n,null,2),"utf-8"),console.log(`Updated version to ${n.version}`)}catch(e){console.error("Error updating version:",e.message),n.version=r,s.writeFileSync(p0,JSON.stringify(n,null,2),"utf-8"),console.log(`Reverted to previous version: ${r}`)}}l0.name("version").description("Update project version (patch, minor, major)"),l0.command("patch").description("Increment the patch version").action((()=>h0("patch",!0))),l0.command("minor").description("Increment the minor version").action((()=>h0("minor",!0))),l0.command("major").description("Increment the major version").action((()=>h0("major",!0))),l0.command("unpatch").description("Decrement the patch version").action((()=>h0("patch",!1))),l0.command("unminor").description("Decrement the minor version").action((()=>h0("minor",!1))),l0.command("unmajor").description("Decrement the major version").action((()=>h0("major",!1)));const d0=new ke;d0.version(ef).description("CLI to create a new project"),d0.command("status").description("cli status").action((async()=>{const e=await sf("token");console.log(e);const t=(e,t)=>e.split("\n").map((e=>{const n=Math.max(0,Math.floor((t-e.length)/2));return" ".repeat(n)+e})).join("\n"),n=100,r=df.textSync("Qumra Cloud CLI",{font:"Standard",horizontalLayout:"default",verticalLayout:"default",width:n,whitespaceBreak:!0}),i=df.textSync("Version 1.0.0",{font:"Standard",horizontalLayout:"default",verticalLayout:"default",width:n,whitespaceBreak:!0}),s=t(r,n),o=t(i,n),a=t("\n Welcome to Qumra Cloud CLI!\n \n At Qumra, we offer innovative cloud solutions to streamline your tech needs.\n Our tools are designed to make technology work for you with ease and efficiency.\n \n Learn more about our partners and how we collaborate to deliver the best:\n https://partners.qumra.cloud\n ",n);console.log(_t.green(s)),console.log(_t.green(o)),console.log(_t.green(a))})),d0.command("create-new-app").description("Create a new project").action(gf),d0.command("build").description("Build a project").action((()=>{const e=process.cwd(),t=o.join(e,"src","views"),n=o.join(e,"build"),r=o.join(n,"views.zip");s.existsSync(t)||(console.log(_t.red('Error: The "views" folder does not exist.')),process.exit(1)),s.existsSync(n)||s.mkdirSync(n);const i=zr('Compressing the "views" folder...').start(),a=s.createWriteStream(r),c=UO("zip",{zlib:{level:9}});a.on("close",(()=>{i.succeed(_t.blue(`"views" folder compressed successfully into ${r}`))})),c.on("warning",(e=>{if("ENOENT"!==e.code)throw e;console.warn(e)})),c.on("error",(e=>{throw i.fail(_t.red(`Failed to compress "views" folder: ${e.message}`)),e})),c.pipe(a),c.directory(t,!1),c.finalize()})),d0.command("publish").description("Publish your project").action((async function(){const e=function(){s.existsSync(YO)||(console.log('File "qumra.config.json" not found!'),process.exit(1));const e=s.readFileSync(YO,"utf-8");try{return JSON.parse(e)}catch(e){console.log(chalk.red('Failed to parse "qumra.config.json". Invalid JSON format.',e.message))}}(),t=zr("Checking files...").start();try{const n=await qO(GO),r=await qO(VO,"views"),i=await qO(KO,"locales"),a={...r,...i},c=Object.keys(a),l=Date.now();d.exec("npm run build",(r=>{r&&t.fail(r),HO(c,t).then((r=>{(async function(e,t){try{return(await of.post("/themes/uploadRequest",{paths:e,config:t})).data}catch(e){console.log("🚀 ~ uploadRequest ~ error:",e)}})(r.paths,e).then((i=>{(async function(e,t,n){const r=new sp;r.append("encryptionKey",e),r.append("paths",JSON.stringify(t));for(const[e,t]of Object.entries(n))r.append("files",s.createReadStream(t),{filename:o.basename(t),filepath:e}),r.append("filePaths",e);const i=zr(_t.cyan("Uploading theme...")).start();try{const e=await $O.post("/theme/upload",r,{onUploadProgress:e=>{const t=Math.round(100*e.loaded/e.total);i.text=_t.cyan(`Uploading theme... ${t}%`)}});return i.succeed(_t.green("Theme Files Upload successful!")),e.data}catch(e){throw i.fail(_t.red("Upload failed.")),console.error("🚀 ~ uploadTheme ~ error:",e.message),e.message}})(i.encryptionKey,r.paths,a).then((r=>{(async function(e,t,n){const r=new sp;r.append("encryptionKey",e),r.append("paths",JSON.stringify(t));for(const[e,t]of Object.entries(n))r.append("files",s.createReadStream(t),{filename:o.basename(t),filepath:e}),r.append("filePaths",e);const i=zr(_t.cyan("Uploading Assets Files...")).start();try{const e=await zO.post("/upload/assets",r,{onUploadProgress:e=>{const t=Math.round(100*e.loaded/e.total);i.text=_t.cyan(`Uploading theme... ${t}%`)}});return i.succeed(_t.green("Upload successful!")),e.data}catch(e){i.fail(_t.red("Assets Files Upload failed.")),console.error("🚀 ~ uploadAssets ~ error:",e.message)}})(i.encryptionKey,Object.keys(n),n).then((()=>{const n=((Date.now()-l)/1e3).toFixed(2);t.succeed(`Version ${e.version} upload completed successfully in ${n} seconds! 🎉🚀`)}))}))}))})).catch((e=>{}))}))}catch(e){console.error(`Failed to publish files - Error: ${e.message}`)}})),d0.command("login").description("developer login").action(c0),d0.addCommand($J),d0.addCommand(l0),d0.command("save").action((async()=>{await sf("token"),await rf("token",{test:"asdasdasd"})})),d0.parse(process.argv);
|
|
390
390
|
//# sourceMappingURL=cli.cjs.map
|